@cellarnode/ui 0.17.3 → 0.19.1
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/chat/unified-timeline.d.ts +15 -0
- package/dist/chat/unified-timeline.d.ts.map +1 -1
- package/dist/chat/unified-timeline.js.map +1 -1
- 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/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- 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/attachments-card.d.ts +9 -0
- package/dist/offer/attachments-card.d.ts.map +1 -0
- package/dist/offer/attachments-card.js +16 -0
- package/dist/offer/attachments-card.js.map +1 -0
- package/dist/offer/attachments-card.stories.d.ts +17 -0
- package/dist/offer/attachments-card.stories.d.ts.map +1 -0
- package/dist/offer/attachments-card.stories.js +24 -0
- package/dist/offer/attachments-card.stories.js.map +1 -0
- package/dist/offer/buyer-notes-card.d.ts +7 -0
- package/dist/offer/buyer-notes-card.d.ts.map +1 -0
- package/dist/offer/buyer-notes-card.js +6 -0
- package/dist/offer/buyer-notes-card.js.map +1 -0
- package/dist/offer/buyer-notes-card.stories.d.ts +16 -0
- package/dist/offer/buyer-notes-card.stories.d.ts.map +1 -0
- package/dist/offer/buyer-notes-card.stories.js +25 -0
- package/dist/offer/buyer-notes-card.stories.js.map +1 -0
- package/dist/offer/counter-slide-over.d.ts +44 -0
- package/dist/offer/counter-slide-over.d.ts.map +1 -0
- package/dist/offer/counter-slide-over.js +81 -0
- package/dist/offer/counter-slide-over.js.map +1 -0
- package/dist/offer/counter-slide-over.stories.d.ts +23 -0
- package/dist/offer/counter-slide-over.stories.d.ts.map +1 -0
- package/dist/offer/counter-slide-over.stories.js +235 -0
- package/dist/offer/counter-slide-over.stories.js.map +1 -0
- package/dist/offer/facts-card.d.ts +32 -0
- package/dist/offer/facts-card.d.ts.map +1 -0
- package/dist/offer/facts-card.js +87 -0
- package/dist/offer/facts-card.js.map +1 -0
- package/dist/offer/facts-card.stories.d.ts +25 -0
- package/dist/offer/facts-card.stories.d.ts.map +1 -0
- package/dist/offer/facts-card.stories.js +177 -0
- package/dist/offer/facts-card.stories.js.map +1 -0
- package/dist/offer/index.d.ts +39 -0
- package/dist/offer/index.d.ts.map +1 -1
- package/dist/offer/index.js +21 -0
- package/dist/offer/index.js.map +1 -1
- package/dist/offer/inline-counter-form.d.ts +16 -0
- package/dist/offer/inline-counter-form.d.ts.map +1 -1
- package/dist/offer/inline-counter-form.js +8 -0
- package/dist/offer/inline-counter-form.js.map +1 -1
- package/dist/offer/match-compatibility-card.d.ts +16 -0
- package/dist/offer/match-compatibility-card.d.ts.map +1 -0
- package/dist/offer/match-compatibility-card.js +27 -0
- package/dist/offer/match-compatibility-card.js.map +1 -0
- package/dist/offer/match-compatibility-card.stories.d.ts +19 -0
- package/dist/offer/match-compatibility-card.stories.d.ts.map +1 -0
- package/dist/offer/match-compatibility-card.stories.js +111 -0
- package/dist/offer/match-compatibility-card.stories.js.map +1 -0
- package/dist/offer/match-glyph.d.ts +14 -0
- package/dist/offer/match-glyph.d.ts.map +1 -0
- package/dist/offer/match-glyph.js +40 -0
- package/dist/offer/match-glyph.js.map +1 -0
- package/dist/offer/match-glyph.stories.d.ts +26 -0
- package/dist/offer/match-glyph.stories.d.ts.map +1 -0
- package/dist/offer/match-glyph.stories.js +26 -0
- package/dist/offer/match-glyph.stories.js.map +1 -0
- package/dist/offer/match-headline-bar.d.ts +11 -0
- package/dist/offer/match-headline-bar.d.ts.map +1 -0
- package/dist/offer/match-headline-bar.js +28 -0
- package/dist/offer/match-headline-bar.js.map +1 -0
- package/dist/offer/match-headline-bar.stories.d.ts +17 -0
- package/dist/offer/match-headline-bar.stories.d.ts.map +1 -0
- package/dist/offer/match-headline-bar.stories.js +39 -0
- package/dist/offer/match-headline-bar.stories.js.map +1 -0
- package/dist/offer/match-preview.d.ts +18 -0
- package/dist/offer/match-preview.d.ts.map +1 -0
- package/dist/offer/match-preview.js +13 -0
- package/dist/offer/match-preview.js.map +1 -0
- package/dist/offer/match-preview.stories.d.ts +18 -0
- package/dist/offer/match-preview.stories.d.ts.map +1 -0
- package/dist/offer/match-preview.stories.js +103 -0
- package/dist/offer/match-preview.stories.js.map +1 -0
- package/dist/offer/negotiation-section.d.ts +11 -0
- package/dist/offer/negotiation-section.d.ts.map +1 -0
- package/dist/offer/negotiation-section.js +99 -0
- package/dist/offer/negotiation-section.js.map +1 -0
- package/dist/offer/negotiation-section.stories.d.ts +18 -0
- package/dist/offer/negotiation-section.stories.d.ts.map +1 -0
- package/dist/offer/negotiation-section.stories.js +156 -0
- package/dist/offer/negotiation-section.stories.js.map +1 -0
- package/dist/offer/new-activity-pill.d.ts +7 -0
- package/dist/offer/new-activity-pill.d.ts.map +1 -0
- package/dist/offer/new-activity-pill.js +8 -0
- package/dist/offer/new-activity-pill.js.map +1 -0
- package/dist/offer/new-activity-pill.stories.d.ts +17 -0
- package/dist/offer/new-activity-pill.stories.d.ts.map +1 -0
- package/dist/offer/new-activity-pill.stories.js +22 -0
- package/dist/offer/new-activity-pill.stories.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/offer-document.d.ts +33 -0
- package/dist/offer/offer-document.d.ts.map +1 -0
- package/dist/offer/offer-document.js +125 -0
- package/dist/offer/offer-document.js.map +1 -0
- package/dist/offer/offer-document.stories.d.ts +25 -0
- package/dist/offer/offer-document.stories.d.ts.map +1 -0
- package/dist/offer/offer-document.stories.js +168 -0
- package/dist/offer/offer-document.stories.js.map +1 -0
- package/dist/offer/offer-export-button.d.ts +8 -0
- package/dist/offer/offer-export-button.d.ts.map +1 -0
- package/dist/offer/offer-export-button.js +11 -0
- package/dist/offer/offer-export-button.js.map +1 -0
- package/dist/offer/offer-export-button.stories.d.ts +15 -0
- package/dist/offer/offer-export-button.stories.d.ts.map +1 -0
- package/dist/offer/offer-export-button.stories.js +11 -0
- package/dist/offer/offer-export-button.stories.js.map +1 -0
- package/dist/offer/offer-product-card.d.ts +32 -0
- package/dist/offer/offer-product-card.d.ts.map +1 -0
- package/dist/offer/offer-product-card.js +10 -0
- package/dist/offer/offer-product-card.js.map +1 -0
- package/dist/offer/offer-product-card.stories.d.ts +16 -0
- package/dist/offer/offer-product-card.stories.d.ts.map +1 -0
- package/dist/offer/offer-product-card.stories.js +40 -0
- package/dist/offer/offer-product-card.stories.js.map +1 -0
- package/dist/offer/opportunity-card.d.ts +16 -0
- package/dist/offer/opportunity-card.d.ts.map +1 -0
- package/dist/offer/opportunity-card.js +9 -0
- package/dist/offer/opportunity-card.js.map +1 -0
- package/dist/offer/opportunity-card.stories.d.ts +16 -0
- package/dist/offer/opportunity-card.stories.d.ts.map +1 -0
- package/dist/offer/opportunity-card.stories.js +33 -0
- package/dist/offer/opportunity-card.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/offer/parties-card.d.ts +11 -0
- package/dist/offer/parties-card.d.ts.map +1 -0
- package/dist/offer/parties-card.js +14 -0
- package/dist/offer/parties-card.js.map +1 -0
- package/dist/offer/parties-card.stories.d.ts +17 -0
- package/dist/offer/parties-card.stories.d.ts.map +1 -0
- package/dist/offer/parties-card.stories.js +37 -0
- package/dist/offer/parties-card.stories.js.map +1 -0
- package/dist/offer/terms-card.d.ts +17 -0
- package/dist/offer/terms-card.d.ts.map +1 -0
- package/dist/offer/terms-card.js +50 -0
- package/dist/offer/terms-card.js.map +1 -0
- package/dist/offer/terms-card.stories.d.ts +17 -0
- package/dist/offer/terms-card.stories.d.ts.map +1 -0
- package/dist/offer/terms-card.stories.js +42 -0
- package/dist/offer/terms-card.stories.js.map +1 -0
- package/dist/offer/timeline-event.d.ts +12 -0
- package/dist/offer/timeline-event.d.ts.map +1 -0
- package/dist/offer/timeline-event.js +57 -0
- package/dist/offer/timeline-event.js.map +1 -0
- package/dist/offer/timeline-event.stories.d.ts +21 -0
- package/dist/offer/timeline-event.stories.d.ts.map +1 -0
- package/dist/offer/timeline-event.stories.js +57 -0
- package/dist/offer/timeline-event.stories.js.map +1 -0
- package/dist/offer/types.d.ts +118 -0
- package/dist/offer/types.d.ts.map +1 -1
- package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.d.ts +2 -0
- package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.js +40 -0
- package/dist/opportunities/__a11y__/opportunity-card-actions-menu.a11y.test.js.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.d.ts +2 -0
- package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.js +31 -0
- package/dist/opportunities/__a11y__/opportunity-celebration.a11y.test.js.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.d.ts +2 -0
- package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.js +42 -0
- package/dist/opportunities/__a11y__/opportunity-detail-panel.a11y.test.js.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.d.ts +2 -0
- package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.js +59 -0
- package/dist/opportunities/__a11y__/opportunity-filter-bar.a11y.test.js.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.d.ts +2 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.js +54 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-card.a11y.test.js.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.d.ts +2 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.js +40 -0
- package/dist/opportunities/__a11y__/opportunity-stacked-list.a11y.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.js +40 -0
- package/dist/opportunities/__tests__/opportunity-add-to-journey-button.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.js +74 -0
- package/dist/opportunities/__tests__/opportunity-card-actions-menu.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-celebration.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-celebration.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-celebration.test.js +46 -0
- package/dist/opportunities/__tests__/opportunity-celebration.test.js.map +1 -0
- 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-filter-bar-drawer.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar-drawer.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar-drawer.test.js +77 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar-drawer.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar.test.js +107 -0
- package/dist/opportunities/__tests__/opportunity-filter-bar.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-reopen-button.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-reopen-button.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-reopen-button.test.js +29 -0
- package/dist/opportunities/__tests__/opportunity-reopen-button.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-republish-button.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-republish-button.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-republish-button.test.js +29 -0
- package/dist/opportunities/__tests__/opportunity-republish-button.test.js.map +1 -0
- package/dist/opportunities/__tests__/opportunity-resume-draft-button.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-resume-draft-button.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-resume-draft-button.test.js +19 -0
- package/dist/opportunities/__tests__/opportunity-resume-draft-button.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__/opportunity-view-offers-button.test.d.ts +2 -0
- package/dist/opportunities/__tests__/opportunity-view-offers-button.test.d.ts.map +1 -0
- package/dist/opportunities/__tests__/opportunity-view-offers-button.test.js +23 -0
- package/dist/opportunities/__tests__/opportunity-view-offers-button.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/index.d.ts +51 -1
- package/dist/opportunities/index.d.ts.map +1 -1
- package/dist/opportunities/index.js +35 -0
- package/dist/opportunities/index.js.map +1 -1
- package/dist/opportunities/opportunities-table.d.ts +4 -0
- package/dist/opportunities/opportunities-table.d.ts.map +1 -1
- package/dist/opportunities/opportunities-table.js +4 -0
- package/dist/opportunities/opportunities-table.js.map +1 -1
- package/dist/opportunities/opportunity-add-to-journey-button.d.ts +12 -0
- package/dist/opportunities/opportunity-add-to-journey-button.d.ts.map +1 -0
- package/dist/opportunities/opportunity-add-to-journey-button.js +42 -0
- package/dist/opportunities/opportunity-add-to-journey-button.js.map +1 -0
- package/dist/opportunities/opportunity-card-actions-menu.d.ts +9 -0
- package/dist/opportunities/opportunity-card-actions-menu.d.ts.map +1 -0
- package/dist/opportunities/opportunity-card-actions-menu.js +33 -0
- package/dist/opportunities/opportunity-card-actions-menu.js.map +1 -0
- package/dist/opportunities/opportunity-card-actions-menu.stories.d.ts +14 -0
- package/dist/opportunities/opportunity-card-actions-menu.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-card-actions-menu.stories.js +12 -0
- package/dist/opportunities/opportunity-card-actions-menu.stories.js.map +1 -0
- package/dist/opportunities/opportunity-celebration.d.ts +8 -0
- package/dist/opportunities/opportunity-celebration.d.ts.map +1 -0
- package/dist/opportunities/opportunity-celebration.js +17 -0
- package/dist/opportunities/opportunity-celebration.js.map +1 -0
- package/dist/opportunities/opportunity-celebration.stories.d.ts +17 -0
- package/dist/opportunities/opportunity-celebration.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-celebration.stories.js +30 -0
- package/dist/opportunities/opportunity-celebration.stories.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-filter-bar-drawer.d.ts +10 -0
- package/dist/opportunities/opportunity-filter-bar-drawer.d.ts.map +1 -0
- package/dist/opportunities/opportunity-filter-bar-drawer.js +54 -0
- package/dist/opportunities/opportunity-filter-bar-drawer.js.map +1 -0
- package/dist/opportunities/opportunity-filter-bar.d.ts +14 -0
- package/dist/opportunities/opportunity-filter-bar.d.ts.map +1 -0
- package/dist/opportunities/opportunity-filter-bar.js +65 -0
- package/dist/opportunities/opportunity-filter-bar.js.map +1 -0
- package/dist/opportunities/opportunity-filter-bar.stories.d.ts +25 -0
- package/dist/opportunities/opportunity-filter-bar.stories.d.ts.map +1 -0
- package/dist/opportunities/opportunity-filter-bar.stories.js +63 -0
- package/dist/opportunities/opportunity-filter-bar.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-reopen-button.d.ts +11 -0
- package/dist/opportunities/opportunity-reopen-button.d.ts.map +1 -0
- package/dist/opportunities/opportunity-reopen-button.js +20 -0
- package/dist/opportunities/opportunity-reopen-button.js.map +1 -0
- package/dist/opportunities/opportunity-republish-button.d.ts +7 -0
- package/dist/opportunities/opportunity-republish-button.d.ts.map +1 -0
- package/dist/opportunities/opportunity-republish-button.js +14 -0
- package/dist/opportunities/opportunity-republish-button.js.map +1 -0
- package/dist/opportunities/opportunity-resume-draft-button.d.ts +7 -0
- package/dist/opportunities/opportunity-resume-draft-button.d.ts.map +1 -0
- package/dist/opportunities/opportunity-resume-draft-button.js +7 -0
- package/dist/opportunities/opportunity-resume-draft-button.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 +51 -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/opportunity-view-offers-button.d.ts +7 -0
- package/dist/opportunities/opportunity-view-offers-button.d.ts.map +1 -0
- package/dist/opportunities/opportunity-view-offers-button.js +8 -0
- package/dist/opportunities/opportunity-view-offers-button.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 +22 -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/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.d.ts +2 -0
- package/dist/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.js +53 -0
- package/dist/opportunities/wizard/__a11y__/opportunity-wizard.a11y.test.js.map +1 -0
- package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.d.ts +2 -0
- package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.js +32 -0
- package/dist/opportunities/wizard/__a11y__/wizard-stepper.a11y.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.js +127 -0
- package/dist/opportunities/wizard/__tests__/opportunity-wizard.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-opportunities.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/step-opportunities.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-opportunities.test.js +93 -0
- package/dist/opportunities/wizard/__tests__/step-opportunities.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.js +141 -0
- package/dist/opportunities/wizard/__tests__/step-pricing-timeline.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-review.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/step-review.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-review.test.js +80 -0
- package/dist/opportunities/wizard/__tests__/step-review.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-tender-basics.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/step-tender-basics.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/step-tender-basics.test.js +76 -0
- package/dist/opportunities/wizard/__tests__/step-tender-basics.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.js +192 -0
- package/dist/opportunities/wizard/__tests__/use-wizard-draft.test.js.map +1 -0
- package/dist/opportunities/wizard/__tests__/wizard-stepper.test.d.ts +2 -0
- package/dist/opportunities/wizard/__tests__/wizard-stepper.test.d.ts.map +1 -0
- package/dist/opportunities/wizard/__tests__/wizard-stepper.test.js +61 -0
- package/dist/opportunities/wizard/__tests__/wizard-stepper.test.js.map +1 -0
- package/dist/opportunities/wizard/opportunity-wizard.d.ts +29 -0
- package/dist/opportunities/wizard/opportunity-wizard.d.ts.map +1 -0
- package/dist/opportunities/wizard/opportunity-wizard.js +196 -0
- package/dist/opportunities/wizard/opportunity-wizard.js.map +1 -0
- package/dist/opportunities/wizard/opportunity-wizard.stories.d.ts +12 -0
- package/dist/opportunities/wizard/opportunity-wizard.stories.d.ts.map +1 -0
- package/dist/opportunities/wizard/opportunity-wizard.stories.js +49 -0
- package/dist/opportunities/wizard/opportunity-wizard.stories.js.map +1 -0
- package/dist/opportunities/wizard/step-opportunities.d.ts +9 -0
- package/dist/opportunities/wizard/step-opportunities.d.ts.map +1 -0
- package/dist/opportunities/wizard/step-opportunities.js +80 -0
- package/dist/opportunities/wizard/step-opportunities.js.map +1 -0
- package/dist/opportunities/wizard/step-pricing-timeline.d.ts +9 -0
- package/dist/opportunities/wizard/step-pricing-timeline.d.ts.map +1 -0
- package/dist/opportunities/wizard/step-pricing-timeline.js +64 -0
- package/dist/opportunities/wizard/step-pricing-timeline.js.map +1 -0
- package/dist/opportunities/wizard/step-review.d.ts +9 -0
- package/dist/opportunities/wizard/step-review.d.ts.map +1 -0
- package/dist/opportunities/wizard/step-review.js +34 -0
- package/dist/opportunities/wizard/step-review.js.map +1 -0
- package/dist/opportunities/wizard/step-tender-basics.d.ts +16 -0
- package/dist/opportunities/wizard/step-tender-basics.d.ts.map +1 -0
- package/dist/opportunities/wizard/step-tender-basics.js +39 -0
- package/dist/opportunities/wizard/step-tender-basics.js.map +1 -0
- package/dist/opportunities/wizard/use-wizard-draft.d.ts +41 -0
- package/dist/opportunities/wizard/use-wizard-draft.d.ts.map +1 -0
- package/dist/opportunities/wizard/use-wizard-draft.js +214 -0
- package/dist/opportunities/wizard/use-wizard-draft.js.map +1 -0
- package/dist/opportunities/wizard/wizard-stepper.d.ts +20 -0
- package/dist/opportunities/wizard/wizard-stepper.d.ts.map +1 -0
- package/dist/opportunities/wizard/wizard-stepper.js +26 -0
- package/dist/opportunities/wizard/wizard-stepper.js.map +1 -0
- package/dist/opportunities/wizard/wizard-stepper.stories.d.ts +22 -0
- package/dist/opportunities/wizard/wizard-stepper.stories.d.ts.map +1 -0
- package/dist/opportunities/wizard/wizard-stepper.stories.js +47 -0
- package/dist/opportunities/wizard/wizard-stepper.stories.js.map +1 -0
- package/dist/opportunities/wizard/wizard.types.d.ts +176 -0
- package/dist/opportunities/wizard/wizard.types.d.ts.map +1 -0
- package/dist/opportunities/wizard/wizard.types.js +62 -0
- package/dist/opportunities/wizard/wizard.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 +13 -4
- package/src/offer/offer-document.print.css +72 -0
- 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,54 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as Dialog from "@radix-ui/react-dialog";
|
|
4
|
+
import { X } from "lucide-react";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
export function OpportunityFilterBarDrawer({ open, onOpenChange, filters, values, onApply }) {
|
|
7
|
+
const [local, setLocal] = React.useState(values);
|
|
8
|
+
// Re-sync from props whenever the drawer re-opens (so cancel + re-open shows the current filters).
|
|
9
|
+
React.useEffect(() => {
|
|
10
|
+
if (open) {
|
|
11
|
+
// eslint-disable-next-line @eslint-react/set-state-in-effect -- idempotent: functional updater returns prev unchanged when already equal
|
|
12
|
+
setLocal((prev) => (prev === values ? prev : values));
|
|
13
|
+
}
|
|
14
|
+
}, [open, values]);
|
|
15
|
+
const set = (key, v) => setLocal(prev => {
|
|
16
|
+
const next = { ...prev };
|
|
17
|
+
if (v === undefined || v === null || v === "" || (Array.isArray(v) && v.length === 0)) {
|
|
18
|
+
delete next[key];
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
next[key] = v;
|
|
22
|
+
}
|
|
23
|
+
return next;
|
|
24
|
+
});
|
|
25
|
+
return (_jsx(Dialog.Root, { open: open, onOpenChange: onOpenChange, children: _jsxs(Dialog.Portal, { children: [_jsx(Dialog.Overlay, { className: "fixed inset-0 bg-black/30 backdrop-blur-xs data-[state=open]:animate-in data-[state=open]:fade-in z-40" }), _jsxs(Dialog.Content, { "aria-label": "Advanced filters", className: "fixed right-0 top-0 z-50 flex h-full w-full max-w-md flex-col bg-background p-6 shadow-xl data-[state=open]:animate-in data-[state=open]:slide-in-from-right-[30%]", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx(Dialog.Title, { className: "text-lg font-semibold", children: "Advanced filters" }), _jsx(Dialog.Close, { asChild: true, children: _jsx("button", { type: "button", "aria-label": "Close", className: "rounded-sm p-1 hover:bg-accent", children: _jsx(X, { "aria-hidden": true, className: "size-4" }) }) })] }), _jsx(Dialog.Description, { className: "sr-only", children: "Refine opportunities by additional criteria." }), _jsx("div", { className: "mt-6 flex flex-col gap-6 overflow-y-auto", children: filters.map(f => (_jsx(FilterControl, { config: f, value: local[f.key], onChange: (v) => set(f.key, v) }, f.key))) }), _jsxs("div", { className: "mt-8 flex justify-end gap-2", children: [_jsx(Dialog.Close, { asChild: true, children: _jsx("button", { type: "button", className: "rounded-md border border-border bg-background px-3 py-1.5 text-sm", children: "Cancel" }) }), _jsx("button", { type: "button", className: "rounded-md bg-emerald-700 px-3 py-1.5 text-sm text-white hover:bg-emerald-800", onClick: () => onApply(local), children: "Apply filters" })] })] })] }) }));
|
|
26
|
+
}
|
|
27
|
+
function FilterControl({ config, value, onChange }) {
|
|
28
|
+
switch (config.kind) {
|
|
29
|
+
case "select": {
|
|
30
|
+
if (config.multi) {
|
|
31
|
+
const selected = Array.isArray(value) ? value : [];
|
|
32
|
+
return (_jsxs("fieldset", { children: [_jsx("legend", { className: "mb-2 text-sm font-medium", children: config.label }), _jsx("div", { className: "flex flex-wrap gap-2", children: config.options.map(o => {
|
|
33
|
+
const isOn = selected.includes(o.value);
|
|
34
|
+
return (_jsx("button", { type: "button", "aria-pressed": isOn, onClick: () => onChange(isOn ? selected.filter(x => x !== o.value) : [...selected, o.value]), className: cn("rounded-full border px-3 py-1 text-xs", isOn ? "bg-emerald-700 text-white border-emerald-700" : "border-border"), children: o.label }, o.value));
|
|
35
|
+
}) })] }));
|
|
36
|
+
}
|
|
37
|
+
return (_jsxs("div", { children: [_jsx("label", { htmlFor: `adv-${config.key}`, className: "block text-sm font-medium", children: config.label }), _jsxs("select", { id: `adv-${config.key}`, className: "mt-1 w-full rounded-md border border-border bg-background px-3 py-1.5 text-sm", value: value ?? "", onChange: (e) => onChange(e.target.value || undefined), children: [_jsx("option", { value: "", children: "Any" }), config.options.map(o => _jsx("option", { value: o.value, children: o.label }, o.value))] })] }));
|
|
38
|
+
}
|
|
39
|
+
case "dateRange": {
|
|
40
|
+
const v = value ?? {};
|
|
41
|
+
const fromId = `adv-${config.key}-from`;
|
|
42
|
+
const toId = `adv-${config.key}-to`;
|
|
43
|
+
return (_jsxs("div", { children: [_jsx("span", { className: "block text-sm font-medium", children: config.label }), _jsxs("div", { className: "mt-1 flex gap-2", children: [_jsxs("label", { htmlFor: fromId, className: "sr-only", children: [config.label, " from"] }), _jsx("input", { id: fromId, type: "date", "aria-label": `${config.label} from`, value: v.from ?? "", min: config.min?.toISOString().slice(0, 10), max: config.max?.toISOString().slice(0, 10), onChange: (e) => onChange({ ...v, from: e.target.value || undefined }), className: "rounded-md border border-border bg-background px-2 py-1 text-sm" }), _jsxs("label", { htmlFor: toId, className: "sr-only", children: [config.label, " to"] }), _jsx("input", { id: toId, type: "date", "aria-label": `${config.label} to`, value: v.to ?? "", min: config.min?.toISOString().slice(0, 10), max: config.max?.toISOString().slice(0, 10), onChange: (e) => onChange({ ...v, to: e.target.value || undefined }), className: "rounded-md border border-border bg-background px-2 py-1 text-sm" })] })] }));
|
|
44
|
+
}
|
|
45
|
+
case "numberRange": {
|
|
46
|
+
const v = value ?? {};
|
|
47
|
+
const fmt = config.format ?? ((n) => n.toString());
|
|
48
|
+
const minId = `adv-${config.key}-min`;
|
|
49
|
+
const maxId = `adv-${config.key}-max`;
|
|
50
|
+
return (_jsxs("div", { children: [_jsx("span", { className: "block text-sm font-medium", children: config.label }), _jsxs("div", { className: "mt-2 flex items-center gap-3", children: [_jsxs("label", { htmlFor: minId, className: "sr-only", children: [config.label, " minimum"] }), _jsx("input", { id: minId, type: "number", "aria-label": `${config.label} minimum`, min: config.min, max: config.max, step: config.step, value: v.min ?? "", onChange: (e) => onChange({ ...v, min: e.target.value === "" ? undefined : Number(e.target.value) }), className: "w-24 rounded-md border border-border bg-background px-2 py-1 text-sm" }), _jsx("span", { className: "text-sm text-muted-foreground", children: "to" }), _jsxs("label", { htmlFor: maxId, className: "sr-only", children: [config.label, " maximum"] }), _jsx("input", { id: maxId, type: "number", "aria-label": `${config.label} maximum`, min: config.min, max: config.max, step: config.step, value: v.max ?? "", onChange: (e) => onChange({ ...v, max: e.target.value === "" ? undefined : Number(e.target.value) }), className: "w-24 rounded-md border border-border bg-background px-2 py-1 text-sm" }), _jsxs("span", { className: "text-xs text-muted-foreground", children: ["(range ", fmt(config.min), "\u2013", fmt(config.max), ")"] })] })] }));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=opportunity-filter-bar-drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-filter-bar-drawer.js","sourceRoot":"","sources":["../../src/opportunities/opportunity-filter-bar-drawer.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AACjC,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAWlC,MAAM,UAAU,0BAA0B,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAmC;IAC1H,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAA0B,MAAM,CAAC,CAAC;IAC1E,mGAAmG;IACnG,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,IAAI,EAAE,CAAC;YACT,yIAAyI;YACzI,QAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;QACxD,CAAC;IACH,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IAEnB,MAAM,GAAG,GAAG,CAAC,GAAW,EAAE,CAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QACvD,MAAM,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;QACzB,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC;YACtF,OAAO,IAAI,CA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C,CAAC,MAAM,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,EACpG,SAAS,EAAC,sEAAsE,GAChF,EACF,gBAAM,SAAS,EAAC,+BAA+B,wBACrC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,YAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,SACpC,IACH,IACF,CACP,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ChipFilterConfig, AdvancedFilterConfig, SortOption } from "./types";
|
|
2
|
+
export interface OpportunityFilterBarProps {
|
|
3
|
+
chipFilters: ChipFilterConfig[];
|
|
4
|
+
advancedFilters: AdvancedFilterConfig[];
|
|
5
|
+
sortOptions: SortOption[];
|
|
6
|
+
searchValue: string;
|
|
7
|
+
onSearchChange: (value: string) => void;
|
|
8
|
+
activeFilters: Record<string, unknown>;
|
|
9
|
+
onFiltersChange: (next: Record<string, unknown>) => void;
|
|
10
|
+
totalCount: number;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function OpportunityFilterBar(props: OpportunityFilterBarProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=opportunity-filter-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-filter-bar.d.ts","sourceRoot":"","sources":["../../src/opportunities/opportunity-filter-bar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGlF,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,gBAAgB,EAAE,CAAC;IAChC,eAAe,EAAE,oBAAoB,EAAE,CAAC;IACxC,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACzD,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAkBD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,2CA0IpE"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as Select from "@radix-ui/react-select";
|
|
4
|
+
import { ChevronDown, Search, SlidersHorizontal, X } from "lucide-react";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
import { OpportunityFilterBarDrawer } from "./opportunity-filter-bar-drawer";
|
|
7
|
+
// Stable debouncer: stores the latest `fn` in a ref so consumers don't have to memoize it.
|
|
8
|
+
// Without this, every parent re-render creates a new `fn` identity, which — if `fn` were a useCallback dep —
|
|
9
|
+
// would reset the debounce timer on every keystroke in production.
|
|
10
|
+
function useDebouncedCallback(fn, delayMs) {
|
|
11
|
+
const fnRef = React.useRef(fn);
|
|
12
|
+
React.useEffect(() => { fnRef.current = fn; }, [fn]);
|
|
13
|
+
const timerRef = React.useRef(null);
|
|
14
|
+
return React.useCallback((...args) => {
|
|
15
|
+
if (timerRef.current)
|
|
16
|
+
clearTimeout(timerRef.current);
|
|
17
|
+
timerRef.current = setTimeout(() => fnRef.current(...args), delayMs);
|
|
18
|
+
}, [delayMs]);
|
|
19
|
+
}
|
|
20
|
+
export function OpportunityFilterBar(props) {
|
|
21
|
+
const { chipFilters, advancedFilters, sortOptions, searchValue, onSearchChange, activeFilters, onFiltersChange, totalCount, className, } = props;
|
|
22
|
+
const [localSearch, setLocalSearch] = React.useState(searchValue);
|
|
23
|
+
React.useEffect(() => {
|
|
24
|
+
// eslint-disable-next-line @eslint-react/set-state-in-effect -- idempotent: functional updater returns prev unchanged when already equal
|
|
25
|
+
setLocalSearch((prev) => (prev === searchValue ? prev : searchValue));
|
|
26
|
+
}, [searchValue]);
|
|
27
|
+
const debouncedSearch = useDebouncedCallback((v) => onSearchChange(v), 300);
|
|
28
|
+
const [drawerOpen, setDrawerOpen] = React.useState(false);
|
|
29
|
+
const currentSort = activeFilters._sort ?? sortOptions[0]?.key;
|
|
30
|
+
const hasActive = Object.entries(activeFilters).some(([k, v]) => k !== "_sort" && v !== undefined && v !== null && v !== "" && !(Array.isArray(v) && v.length === 0));
|
|
31
|
+
const setFilter = (key, value) => {
|
|
32
|
+
const next = { ...activeFilters, [key]: value };
|
|
33
|
+
if (value === undefined || value === null || value === "" || (Array.isArray(value) && value.length === 0)) {
|
|
34
|
+
delete next[key];
|
|
35
|
+
}
|
|
36
|
+
onFiltersChange(next);
|
|
37
|
+
};
|
|
38
|
+
const clearAll = () => onFiltersChange(currentSort ? { _sort: currentSort } : {});
|
|
39
|
+
return (_jsxs("div", { className: cn("flex flex-col gap-3", className), children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [chipFilters.map(chip => (_jsx(ChipGroup, { config: chip, value: activeFilters[chip.key], onChange: (next) => setFilter(chip.key, next) }, chip.key))), _jsxs("div", { className: "ml-auto flex items-center gap-2", children: [_jsxs("div", { className: "relative", children: [_jsx(Search, { "aria-hidden": true, className: "absolute left-2 top-1/2 -translate-y-1/2 size-4 text-muted-foreground" }), _jsx("label", { htmlFor: "opportunity-filter-search", className: "sr-only", children: "Search opportunities" }), _jsx("input", { id: "opportunity-filter-search", type: "text", className: "w-56 rounded-sm border border-border bg-background pl-8 pr-3 py-1.5 text-sm", placeholder: "Search...", value: localSearch, onChange: (e) => { setLocalSearch(e.target.value); debouncedSearch(e.target.value); } })] }), _jsxs(Select.Root, { value: currentSort, onValueChange: (v) => setFilter("_sort", v), children: [_jsxs(Select.Trigger, { className: "inline-flex items-center gap-1 rounded-md border border-border bg-background px-3 py-1.5 text-sm focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-emerald-500", "aria-label": "Sort order", children: [_jsx(Select.Value, {}), _jsx(Select.Icon, { children: _jsx(ChevronDown, { "aria-hidden": true, className: "size-4" }) })] }), _jsx(Select.Portal, { children: _jsx(Select.Content, { className: "overflow-hidden rounded-md border border-border bg-popover shadow-md z-50", position: "popper", sideOffset: 4, children: _jsx(Select.Viewport, { className: "p-1", children: sortOptions.map(opt => (_jsx(Select.Item, { value: opt.key, className: "cursor-pointer rounded-sm px-2 py-1 text-sm data-[highlighted]:bg-accent data-[highlighted]:outline-hidden focus-visible:outline-hidden", children: _jsx(Select.ItemText, { children: opt.label }) }, opt.key))) }) }) })] }), advancedFilters.length > 0 ? (_jsxs("button", { type: "button", className: "inline-flex items-center gap-1 rounded-sm border border-border bg-background px-3 py-1.5 text-sm", onClick: () => setDrawerOpen(true), children: [_jsx(SlidersHorizontal, { "aria-hidden": true, className: "size-4" }), " Advanced"] })) : null] })] }), hasActive ? (_jsxs("div", { className: "flex flex-wrap items-center gap-2 text-xs", children: [Object.entries(activeFilters).map(([key, value]) => {
|
|
40
|
+
if (key === "_sort")
|
|
41
|
+
return null;
|
|
42
|
+
if (value == null || value === "" || (Array.isArray(value) && value.length === 0))
|
|
43
|
+
return null;
|
|
44
|
+
const displayValue = Array.isArray(value) ? value.join(", ") : String(value);
|
|
45
|
+
return (_jsxs("button", { className: "inline-flex items-center gap-1 rounded-full bg-accent px-2 py-0.5 hover:bg-accent/80", onClick: () => setFilter(key, Array.isArray(value) ? [] : undefined), "aria-label": `Remove filter: ${key}`, children: [_jsxs("span", { children: [key, ": ", displayValue] }), _jsx(X, { "aria-hidden": true, className: "size-3" })] }, key));
|
|
46
|
+
}), _jsx("button", { type: "button", className: "text-muted-foreground underline underline-offset-2", onClick: clearAll, children: "Clear all" })] })) : null, _jsxs("div", { role: "status", "aria-live": "polite", className: "sr-only", children: [totalCount, " opportunities shown"] }), _jsx(OpportunityFilterBarDrawer, { open: drawerOpen, onOpenChange: setDrawerOpen, filters: advancedFilters, values: activeFilters, onApply: (next) => { onFiltersChange(next); setDrawerOpen(false); } })] }));
|
|
47
|
+
}
|
|
48
|
+
function ChipGroup({ config, value, onChange }) {
|
|
49
|
+
if (config.multi) {
|
|
50
|
+
const selected = Array.isArray(value) ? value : [];
|
|
51
|
+
return (_jsx("div", { role: "group", "aria-label": config.label, className: "flex flex-wrap items-center gap-1", children: config.options.map(opt => {
|
|
52
|
+
const isOn = selected.includes(opt.value);
|
|
53
|
+
return (_jsxs("button", { type: "button", "aria-pressed": isOn, onClick: () => onChange(isOn ? selected.filter(x => x !== opt.value) : [...selected, opt.value]), className: cn("rounded-full border px-3 py-1 text-xs font-medium", isOn
|
|
54
|
+
? "bg-emerald-700 text-white border-emerald-700"
|
|
55
|
+
: "bg-background text-foreground border-border hover:bg-accent"), children: [opt.label, opt.count != null ? ` (${opt.count})` : ""] }, opt.value));
|
|
56
|
+
}) }));
|
|
57
|
+
}
|
|
58
|
+
return (_jsx("div", { role: "radiogroup", "aria-label": config.label, className: "flex flex-wrap items-center gap-1", children: config.options.map(opt => {
|
|
59
|
+
const isOn = value === opt.value;
|
|
60
|
+
return (_jsxs("button", { type: "button", role: "radio", "aria-checked": isOn, onClick: () => onChange(opt.value), className: cn("rounded-full border px-3 py-1 text-xs font-medium", isOn
|
|
61
|
+
? "bg-emerald-700 text-white border-emerald-700"
|
|
62
|
+
: "bg-background text-foreground border-border hover:bg-accent"), children: [opt.label, opt.count != null ? ` (${opt.count})` : ""] }, opt.value));
|
|
63
|
+
}) }));
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=opportunity-filter-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-filter-bar.js","sourceRoot":"","sources":["../../src/opportunities/opportunity-filter-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,GAAG,CAAC,KAAK,CAAC;YACjC,OAAO,CACL,kBAEE,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,OAAO,kBACE,IAAI,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAClC,SAAS,EAAE,EAAE,CACX,mDAAmD,EACnD,IAAI;oBACF,CAAC,CAAC,8CAA8C;oBAChD,CAAC,CAAC,6DAA6D,CAClE,aAEA,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,KAZjD,GAAG,CAAC,KAAK,CAaP,CACV,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { OpportunityFilterBar } from "./opportunity-filter-bar";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof OpportunityFilterBar;
|
|
6
|
+
tags: string[];
|
|
7
|
+
args: {
|
|
8
|
+
chipFilters: never[];
|
|
9
|
+
advancedFilters: never[];
|
|
10
|
+
sortOptions: never[];
|
|
11
|
+
searchValue: string;
|
|
12
|
+
onSearchChange: () => void;
|
|
13
|
+
activeFilters: {};
|
|
14
|
+
onFiltersChange: () => void;
|
|
15
|
+
totalCount: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof meta>;
|
|
20
|
+
export declare const Default: Story;
|
|
21
|
+
export declare const SingleSelectChips: Story;
|
|
22
|
+
export declare const MultiSelectChips: Story;
|
|
23
|
+
export declare const AllFiltersActive: Story;
|
|
24
|
+
export declare const URLRestored: Story;
|
|
25
|
+
//# sourceMappingURL=opportunity-filter-bar.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-filter-bar.stories.d.ts","sourceRoot":"","sources":["../../src/opportunities/opportunity-filter-bar.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE,QAAA,MAAM,IAAI;;;;;;;;;;;;;;CAcmC,CAAC;AAC9C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAkDnC,eAAO,MAAM,OAAO,EAAE,KAAkC,CAAC;AACzD,eAAO,MAAM,iBAAiB,EAAE,KAAsE,CAAC;AACvG,eAAO,MAAM,gBAAgB,EAAE,KAAgH,CAAC;AAChJ,eAAO,MAAM,gBAAgB,EAAE,KAA2H,CAAC;AAC3J,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { OpportunityFilterBar } from "./opportunity-filter-bar";
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Opportunities/OpportunityFilterBar",
|
|
6
|
+
component: OpportunityFilterBar,
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
args: {
|
|
9
|
+
chipFilters: [],
|
|
10
|
+
advancedFilters: [],
|
|
11
|
+
sortOptions: [],
|
|
12
|
+
searchValue: "",
|
|
13
|
+
onSearchChange: () => { },
|
|
14
|
+
activeFilters: {},
|
|
15
|
+
onFiltersChange: () => { },
|
|
16
|
+
totalCount: 0,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
20
|
+
const statusChip = {
|
|
21
|
+
key: "status", label: "Status",
|
|
22
|
+
options: [
|
|
23
|
+
{ value: "all", label: "All", count: 24 },
|
|
24
|
+
{ value: "open", label: "Open", count: 12 },
|
|
25
|
+
{ value: "closed", label: "Closed", count: 8 },
|
|
26
|
+
{ value: "expired", label: "Expired", count: 4 },
|
|
27
|
+
],
|
|
28
|
+
};
|
|
29
|
+
const channelMulti = {
|
|
30
|
+
key: "channel", label: "Channel",
|
|
31
|
+
multi: true,
|
|
32
|
+
options: [
|
|
33
|
+
{ value: "monopoly", label: "Monopoly" },
|
|
34
|
+
{ value: "importer", label: "Importer" },
|
|
35
|
+
{ value: "open", label: "Open Market" },
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
const advanced = [
|
|
39
|
+
{ kind: "select", key: "category", label: "Category", options: [{ value: "wine", label: "Wine" }, { value: "spirit", label: "Spirit" }] },
|
|
40
|
+
{ kind: "numberRange", key: "volume", label: "Volume", min: 0, max: 100000, step: 500 },
|
|
41
|
+
{ kind: "dateRange", key: "deadline", label: "Deadline window" },
|
|
42
|
+
];
|
|
43
|
+
const sort = [
|
|
44
|
+
{ key: "newest", label: "Newest" },
|
|
45
|
+
{ key: "deadline", label: "Deadline (soonest)" },
|
|
46
|
+
];
|
|
47
|
+
function Wrap({ initialFilters = { status: "open" }, chips = [statusChip] }) {
|
|
48
|
+
const [sv, setSv] = React.useState("");
|
|
49
|
+
const [filters, setFilters] = React.useState(initialFilters);
|
|
50
|
+
return (_jsx(OpportunityFilterBar, { chipFilters: chips, advancedFilters: advanced, sortOptions: sort, searchValue: sv, onSearchChange: setSv, activeFilters: filters, onFiltersChange: setFilters, totalCount: 12 }));
|
|
51
|
+
}
|
|
52
|
+
export const Default = { render: () => _jsx(Wrap, {}) };
|
|
53
|
+
export const SingleSelectChips = { render: () => _jsx(Wrap, { initialFilters: { status: "open" } }) };
|
|
54
|
+
export const MultiSelectChips = { render: () => _jsx(Wrap, { initialFilters: { channel: ["monopoly", "importer"] }, chips: [channelMulti] }) };
|
|
55
|
+
export const AllFiltersActive = { render: () => _jsx(Wrap, { initialFilters: { status: "open", category: "wine", volume: { min: 5000, max: 30000 } } }) };
|
|
56
|
+
export const URLRestored = {
|
|
57
|
+
render: () => {
|
|
58
|
+
// Simulate restoring state from URL search params on mount
|
|
59
|
+
const initial = { status: "expired", _sort: "deadline" };
|
|
60
|
+
return _jsx(Wrap, { initialFilters: initial });
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=opportunity-filter-bar.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-filter-bar.stories.js","sourceRoot":"","sources":["../../src/opportunities/opportunity-filter-bar.stories.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,oCAAoC;IAC3C,SAAS,EAAE,oBAAoB;IAC/B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,IAAI,EAAE;QACJ,WAAW,EAAE,EAAE;QACf,eAAe,EAAE,EAAE;QACnB,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,EAAE;QACf,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;QACxB,aAAa,EAAE,EAAE;QACjB,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC;QACzB,UAAU,EAAE,CAAC;KACd;CAC0C,CAAC;AAC9C,eAAe,IAAI,CAAC;AAGpB,MAAM,UAAU,GAAqB;IACnC,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ;IAC9B,OAAO,EAAE;QACP,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;QACzC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;QAC3C,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE;QAC9C,EAAE,KAAK,EAAE,SAAS,EA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,KAAK,EAAE,UAAU,EAAE,CAAC;QACzD,OAAO,KAAC,IAAI,IAAC,cAAc,EAAE,OAAO,GAAI,CAAC;IAC3C,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface OffersCountChipProps {
|
|
2
|
+
count: number;
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function OffersCountChip({ count, className }: OffersCountChipProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=opportunity-offers-count-chip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-offers-count-chip.d.ts","sourceRoot":"","sources":["../../src/opportunities/opportunity-offers-count-chip.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,oBAAoB,2CAgBzE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Inbox } from "lucide-react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
export function OffersCountChip({ count, className }) {
|
|
5
|
+
const label = count === 0 ? "No offers yet" : `${count} offer${count === 1 ? "" : "s"} received`;
|
|
6
|
+
return (_jsxs("span", { role: "status", "aria-label": label, className: cn("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", count > 0 ? "bg-emerald-50 text-emerald-800" : "bg-slate-100 text-slate-600", className), children: [_jsx(Inbox, { "aria-hidden": true, className: "size-3" }), count] }));
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=opportunity-offers-count-chip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-offers-count-chip.js","sourceRoot":"","sources":["../../src/opportunities/opportunity-offers-count-chip.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAOlC,MAAM,UAAU,eAAe,CAAC,EAAE,KAAK,EAAE,SAAS,EAAwB;IACxE,MAAM,KAAK,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,KAAK,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC;IACjG,OAAO,CACL,gBACE,IAAI,EAAC,QAAQ,gBACD,KAAK,EACjB,SAAS,EAAE,EAAE,CACX,6EAA6E,EAC7E,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC,CAAC,6BAA6B,EAC5E,SAAS,CACV,aAED,KAAC,KAAK,yBAAa,SAAS,EAAC,QAAQ,GAAG,EACvC,KAAK,IACD,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { OffersCountChip } from "./opportunity-offers-count-chip";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof OffersCountChip;
|
|
6
|
+
tags: string[];
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<typeof meta>;
|
|
10
|
+
export declare const Zero: Story;
|
|
11
|
+
export declare const One: Story;
|
|
12
|
+
export declare const Many: Story;
|
|
13
|
+
//# sourceMappingURL=opportunity-offers-count-chip.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-offers-count-chip.stories.d.ts","sourceRoot":"","sources":["../../src/opportunities/opportunity-offers-count-chip.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,QAAA,MAAM,IAAI;;;;CAI8B,CAAC;AACzC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,IAAI,EAAE,KAA8B,CAAC;AAClD,eAAO,MAAM,GAAG,EAAE,KAA8B,CAAC;AACjD,eAAO,MAAM,IAAI,EAAE,KAA8B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OffersCountChip } from "./opportunity-offers-count-chip";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: "Opportunities/OffersCountChip",
|
|
4
|
+
component: OffersCountChip,
|
|
5
|
+
tags: ["autodocs"],
|
|
6
|
+
};
|
|
7
|
+
export default meta;
|
|
8
|
+
export const Zero = { args: { count: 0 } };
|
|
9
|
+
export const One = { args: { count: 1 } };
|
|
10
|
+
export const Many = { args: { count: 7 } };
|
|
11
|
+
//# sourceMappingURL=opportunity-offers-count-chip.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-offers-count-chip.stories.js","sourceRoot":"","sources":["../../src/opportunities/opportunity-offers-count-chip.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,+BAA+B;IACtC,SAAS,EAAE,eAAe;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;CACoB,CAAC;AACzC,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,IAAI,GAAU,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;AAClD,MAAM,CAAC,MAAM,GAAG,GAAU,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;AACjD,MAAM,CAAC,MAAM,IAAI,GAAU,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ReopenButtonProps {
|
|
2
|
+
/** Mutation callback — should return a promise. */
|
|
3
|
+
onReopen: () => Promise<void>;
|
|
4
|
+
/** Visually disabled + aria-disabled. Click is a no-op. */
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
/** Tooltip text shown when disabled. */
|
|
7
|
+
disabledReason?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function ReopenButton({ onReopen, disabled, disabledReason, className }: ReopenButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=opportunity-reopen-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-reopen-button.d.ts","sourceRoot":"","sources":["../../src/opportunities/opportunity-reopen-button.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,iBAAiB;IAChC,mDAAmD;IACnD,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wCAAwC;IACxC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,QAAgB,EAAE,cAAc,EAAE,SAAS,EAAE,EAAE,iBAAiB,2CA0BxG"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { RotateCcw } from "lucide-react";
|
|
4
|
+
import { cn } from "../lib/utils";
|
|
5
|
+
export function ReopenButton({ onReopen, disabled = false, disabledReason, className }) {
|
|
6
|
+
const [busy, setBusy] = React.useState(false);
|
|
7
|
+
const handle = async () => {
|
|
8
|
+
if (disabled || busy)
|
|
9
|
+
return;
|
|
10
|
+
setBusy(true);
|
|
11
|
+
try {
|
|
12
|
+
await onReopen();
|
|
13
|
+
}
|
|
14
|
+
finally {
|
|
15
|
+
setBusy(false);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
return (_jsxs("button", { type: "button", onClick: handle, "aria-disabled": disabled || undefined, "aria-busy": busy || undefined, title: disabled ? disabledReason : undefined, className: cn("inline-flex items-center gap-1.5 rounded-md border border-border bg-background px-3 py-1.5 text-xs font-medium text-foreground", disabled ? "cursor-not-allowed opacity-60" : "hover:bg-accent", className), children: [_jsx(RotateCcw, { "aria-hidden": true, className: "size-3.5" }), "Reopen"] }));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=opportunity-reopen-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-reopen-button.js","sourceRoot":"","sources":["../../src/opportunities/opportunity-reopen-button.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAYlC,MAAM,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAE,QAAQ,GAAG,KAAK,EAAE,cAAc,EAAE,SAAS,EAAqB;IACvG,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,MAAM,GAAG,KAAK,IAAI,EAAE;QACxB,IAAI,QAAQ,IAAI,IAAI;YAAE,OAAO;QAC7B,OAAO,CAAC,IAAI,CAAC,CAAC;QACd,IAAI,CAAC;YAAC,MAAM,QAAQ,EAAE,CAAC;QAAC,CAAC;gBAAS,CAAC;YAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAAC,CAAC;IACvD,CAAC,CAAC;IAEF,OAAO,CACL,kBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,MAAM,mBACA,QAAQ,IAAI,SAAS,eACzB,IAAI,IAAI,SAAS,EAC5B,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,EAC5C,SAAS,EAAE,EAAE,CACX,gIAAgI,EAChI,QAAQ,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,iBAAiB,EAC9D,SAAS,CACV,aAED,KAAC,SAAS,yBAAa,SAAS,EAAC,UAAU,GAAG,cAEvC,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface RepublishButtonProps {
|
|
2
|
+
/** Called when user clicks Republish. Caller performs the mutation + navigation to new draft. */
|
|
3
|
+
onRepublish: () => Promise<void>;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function RepublishButton({ onRepublish, className }: RepublishButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=opportunity-republish-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-republish-button.d.ts","sourceRoot":"","sources":["../../src/opportunities/opportunity-republish-button.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,oBAAoB;IACnC,iGAAiG;IACjG,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,eAAe,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE,oBAAoB,2CAgB/E"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { RefreshCw } from "lucide-react";
|
|
4
|
+
import { cn } from "../lib/utils";
|
|
5
|
+
export function RepublishButton({ onRepublish, className }) {
|
|
6
|
+
const [busy, setBusy] = React.useState(false);
|
|
7
|
+
return (_jsxs("button", { type: "button", onClick: async () => { setBusy(true); try {
|
|
8
|
+
await onRepublish();
|
|
9
|
+
}
|
|
10
|
+
finally {
|
|
11
|
+
setBusy(false);
|
|
12
|
+
} }, "aria-busy": busy || undefined, className: cn("inline-flex items-center gap-1.5 rounded-md bg-emerald-700 px-3 py-1.5 text-xs font-medium text-white hover:bg-emerald-800", className), children: [_jsx(RefreshCw, { "aria-hidden": true, className: "size-3.5" }), "Republish"] }));
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=opportunity-republish-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-republish-button.js","sourceRoot":"","sources":["../../src/opportunities/opportunity-republish-button.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAQlC,MAAM,UAAU,eAAe,CAAC,EAAE,WAAW,EAAE,SAAS,EAAwB;IAC9E,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,OAAO,CACL,kBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,KAAK,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;YAAC,MAAM,WAAW,EAAE,CAAC;QAAC,CAAC;gBAAS,CAAC;YAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAAC,CAAC,CAAC,CAAC,eACrF,IAAI,IAAI,SAAS,EAC5B,SAAS,EAAE,EAAE,CACX,4HAA4H,EAC5H,SAAS,CACV,aAED,KAAC,SAAS,yBAAa,SAAS,EAAC,UAAU,GAAG,iBAEvC,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface ResumeDraftButtonProps {
|
|
2
|
+
/** Called on click. Consumer navigates to /opportunities/new/:draftId. */
|
|
3
|
+
onResume: () => void;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function ResumeDraftButton({ onResume, className }: ResumeDraftButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=opportunity-resume-draft-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-resume-draft-button.d.ts","sourceRoot":"","sources":["../../src/opportunities/opportunity-resume-draft-button.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,sBAAsB;IACrC,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,sBAAsB,2CAchF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ArrowRight } from "lucide-react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
export function ResumeDraftButton({ onResume, className }) {
|
|
5
|
+
return (_jsxs("button", { type: "button", onClick: onResume, className: cn("inline-flex items-center gap-1.5 rounded-md bg-emerald-700 px-3 py-1.5 text-xs font-medium text-white hover:bg-emerald-800", className), children: ["Resume draft", _jsx(ArrowRight, { "aria-hidden": true, className: "size-3.5" })] }));
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=opportunity-resume-draft-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-resume-draft-button.js","sourceRoot":"","sources":["../../src/opportunities/opportunity-resume-draft-button.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAQlC,MAAM,UAAU,iBAAiB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAA0B;IAC/E,OAAO,CACL,kBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,QAAQ,EACjB,SAAS,EAAE,EAAE,CACX,4HAA4H,EAC5H,SAAS,CACV,6BAGD,KAAC,UAAU,yBAAa,SAAS,EAAC,UAAU,GAAG,IACxC,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { OpportunityView, OpportunityTab } from "./types";
|
|
3
|
+
export interface OpportunityStackedCardProps {
|
|
4
|
+
opportunity: OpportunityView;
|
|
5
|
+
leftBadge: React.ReactNode;
|
|
6
|
+
metaRight: React.ReactNode;
|
|
7
|
+
primaryAction: React.ReactNode;
|
|
8
|
+
actionsMenu?: React.ReactNode;
|
|
9
|
+
tabs: OpportunityTab[];
|
|
10
|
+
expanded?: boolean;
|
|
11
|
+
onExpandChange?: (next: boolean) => void;
|
|
12
|
+
deEmphasized?: boolean;
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
export type OpportunityStackedCardComponent = React.FC<OpportunityStackedCardProps> & {
|
|
17
|
+
Skeleton: React.FC;
|
|
18
|
+
};
|
|
19
|
+
export declare const OpportunityStackedCard: OpportunityStackedCardComponent;
|
|
20
|
+
//# sourceMappingURL=opportunity-stacked-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-stacked-card.d.ts","sourceRoot":"","sources":["../../src/opportunities/opportunity-stacked-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAgB,MAAM,SAAS,CAAC;AAU7E,MAAM,WAAW,2BAA2B;IAC1C,WAAW,EAAE,eAAe,CAAC;IAC7B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,aAAa,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CAGpB;AAeD,MAAM,MAAM,+BAA+B,GAAG,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAAC,GAAG;IACpF,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC;CACpB,CAAC;AAwIF,eAAO,MAAM,sBAAsB,EAAiC,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { ChevronDown } from "lucide-react";
|
|
4
|
+
import { CountryFlag } from "../components/country-flag";
|
|
5
|
+
import { useAnimatedNumber } from "../hooks/use-animated-number";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
import { useCascadeIndex } from "../skeleton/stagger";
|
|
8
|
+
import { OpportunityDetailPanel } from "./opportunity-detail-panel";
|
|
9
|
+
// Stable keys for subtitle facts — keeps order-sensitivity (same index ⇒ same slot)
|
|
10
|
+
// but encodes content so React can still detect swaps without index-only keying.
|
|
11
|
+
function subtitleFactKey(fact, index) {
|
|
12
|
+
return fact.type === "text"
|
|
13
|
+
? `t:${index}:${fact.text}`
|
|
14
|
+
: `c:${index}:${fact.value}:${fact.suffix}`;
|
|
15
|
+
}
|
|
16
|
+
// NOTE (rules-of-hooks): always call useAnimatedNumber — never behind a conditional return.
|
|
17
|
+
// For text facts we still call the hook with 0 and ignore the result.
|
|
18
|
+
function SubtitleFactView({ fact }) {
|
|
19
|
+
const countValue = fact.type === "count" ? fact.value : 0;
|
|
20
|
+
const display = useAnimatedNumber(countValue, { durationMs: 800 });
|
|
21
|
+
if (fact.type === "text")
|
|
22
|
+
return _jsx("span", { children: fact.text });
|
|
23
|
+
return (_jsxs("span", { "data-opportunity-number-counter": true, children: [display.toLocaleString(), " ", fact.suffix] }));
|
|
24
|
+
}
|
|
25
|
+
function OpportunityStackedCardBase(props) {
|
|
26
|
+
const { opportunity, leftBadge, metaRight, primaryAction, actionsMenu, tabs, expanded: controlled, onExpandChange, deEmphasized = false, readOnly = false, className, } = props;
|
|
27
|
+
const [uncontrolled, setUncontrolled] = React.useState(false);
|
|
28
|
+
const isControlled = controlled !== undefined;
|
|
29
|
+
const isExpanded = isControlled ? controlled : uncontrolled;
|
|
30
|
+
const setExpanded = (next) => {
|
|
31
|
+
if (!isControlled)
|
|
32
|
+
setUncontrolled(next);
|
|
33
|
+
onExpandChange?.(next);
|
|
34
|
+
};
|
|
35
|
+
const panelId = `row-${opportunity.id}-panel`;
|
|
36
|
+
const titleId = `row-${opportunity.id}-title`;
|
|
37
|
+
const triggerDisabled = readOnly || tabs.length === 0;
|
|
38
|
+
return (_jsxs("article", { "data-opportunity-row": true, "data-status": opportunity.status, "data-de-emphasized": deEmphasized || undefined, "data-read-only": readOnly || undefined, className: cn("group relative flex flex-col gap-3 rounded-lg border border-border bg-card px-4 py-3 transition-[transform,box-shadow,border-color] duration-200",
|
|
39
|
+
// De-emphasis preserves primary-action contrast: dim bg + mute title/subtitle via descendant selectors only.
|
|
40
|
+
"[&[data-de-emphasized='true']]:bg-muted/30", "[&[data-de-emphasized='true']_h3]:text-muted-foreground", "[&[data-de-emphasized='true']_p]:text-muted-foreground/80", !readOnly && "hover:-translate-y-0.5 hover:shadow-md hover:border-emerald-300", className), children: [_jsxs("div", { className: "flex items-center gap-3 w-full", children: [_jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [leftBadge, _jsx(CountryFlag, { code: opportunity.countryCode })] }), triggerDisabled ? (_jsxs("div", { className: "flex-1 min-w-0", children: [_jsxs("h3", { id: titleId, className: "truncate text-sm font-semibold text-foreground", children: [opportunity.buyerName, " \u00B7 ", opportunity.productName] }), _jsx("p", { className: "mt-1 flex flex-wrap items-center gap-x-1 truncate text-xs text-muted-foreground", children: opportunity.subtitleFacts.map((f, i) => (_jsxs(React.Fragment, { children: [i > 0 ? _jsx("span", { "aria-hidden": true, children: "\u00B7" }) : null, _jsx(SubtitleFactView, { fact: f })] }, subtitleFactKey(f, i)))) })] })) : (_jsxs("button", { type: "button", "aria-expanded": isExpanded, "aria-controls": panelId, onClick: () => setExpanded(!isExpanded), className: cn("group/trigger flex-1 min-w-0 text-left rounded-sm", "focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-emerald-500"), children: [_jsxs("span", { className: "sr-only", children: [isExpanded ? "Collapse" : "Expand", " details for "] }), _jsxs("h3", { id: titleId, className: "truncate text-sm font-semibold text-foreground", children: [opportunity.buyerName, " \u00B7 ", opportunity.productName] }), _jsx("p", { className: "mt-1 flex flex-wrap items-center gap-x-1 truncate text-xs text-muted-foreground", children: opportunity.subtitleFacts.map((f, i) => (_jsxs(React.Fragment, { children: [i > 0 ? _jsx("span", { "aria-hidden": true, children: "\u00B7" }) : null, _jsx(SubtitleFactView, { fact: f })] }, subtitleFactKey(f, i)))) }), _jsx(ChevronDown, { "aria-hidden": true, "data-expanded": isExpanded || undefined, className: "absolute right-4 top-1/2 -translate-y-1/2 size-4 text-muted-foreground transition-transform duration-200 data-[expanded]:rotate-180 md:hidden" })] })), _jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [metaRight, primaryAction, actionsMenu] })] }), isExpanded ? (_jsx("div", { id: panelId, role: "region", "aria-labelledby": titleId, className: "w-full border-t border-border pt-4", children: _jsx(OpportunityDetailPanel, { tabs: tabs }) })) : null] }));
|
|
41
|
+
}
|
|
42
|
+
function OpportunityStackedCardSkeleton() {
|
|
43
|
+
const i = useCascadeIndex();
|
|
44
|
+
return (_jsxs("div", { "data-skeleton": true, "data-tier": "data", style: { "--skeleton-delay": `${i * 120}ms` }, className: "flex items-center gap-3 rounded-lg border border-border bg-card px-4 py-3", children: [_jsx("div", { className: "size-6 rounded-sm bg-muted/50" }), _jsxs("div", { className: "flex-1 space-y-2", children: [_jsx("div", { className: "h-3 w-1/2 rounded-sm bg-muted/60" }), _jsx("div", { className: "h-2 w-1/3 rounded-sm bg-muted/40" })] }), _jsx("div", { className: "h-8 w-24 rounded-sm bg-muted/50" })] }));
|
|
45
|
+
}
|
|
46
|
+
export const OpportunityStackedCard = OpportunityStackedCardBase;
|
|
47
|
+
OpportunityStackedCard.Skeleton = OpportunityStackedCardSkeleton;
|
|
48
|
+
//# sourceMappingURL=opportunity-stacked-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-stacked-card.js","sourceRoot":"","sources":["../../src/opportunities/opportunity-stacked-card.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,oFAAoF;AACpF,iFAAiF;AACjF,SAAS,eAAe,CAAC,IAAkB,EAAE,KAAa;IACxD,OAAO,IAAI,CAAC,IAAI,KAAK,MAAM;QACzB,CAAC,CAAC,KAAK,KAAK,IAAI,IAAI,CAAC,IAAI,EAAE;QAC3B,CAAC,CAAC,KAAK,K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K,SAAS,EAAC,kBAAkB,aAC/B,cAAK,SAAS,EAAC,kCAAkC,GAAG,EACpD,cAAK,SAAS,EAAC,kCAAkC,GAAG,IAChD,EACN,cAAK,SAAS,EAAC,iCAAiC,GAAG,IAC/C,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,0BAA6D,CAAC;AACpG,sBAAsB,CAAC,QAAQ,GAAG,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { StoryObj, StoryFn } from "@storybook/react-vite";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("./opportunity-stacked-card").OpportunityStackedCardComponent;
|
|
5
|
+
tags: string[];
|
|
6
|
+
};
|
|
7
|
+
export default meta;
|
|
8
|
+
type Story = StoryObj<typeof meta>;
|
|
9
|
+
export declare const Producer: Story;
|
|
10
|
+
export declare const ImporterOpen: Story;
|
|
11
|
+
export declare const ImporterClosedDeEmphasized: Story;
|
|
12
|
+
export declare const ImporterExpired: Story;
|
|
13
|
+
export declare const ImporterDraft: Story;
|
|
14
|
+
export declare const InJourney: Story;
|
|
15
|
+
export declare const Expanded: Story;
|
|
16
|
+
export declare const ReadOnlyPreview: Story;
|
|
17
|
+
export declare const LongTitleTruncation: Story;
|
|
18
|
+
export declare const NoDeadline: Story;
|
|
19
|
+
export declare const ZeroOffersCount: Story;
|
|
20
|
+
export declare const LoadingSkeleton: {
|
|
21
|
+
render: StoryFn;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=opportunity-stacked-card.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunity-stacked-card.stories.d.ts","sourceRoot":"","sources":["../../src/opportunities/opportunity-stacked-card.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAwBrE,QAAA,MAAM,IAAI;;;;CAIqC,CAAC;AAChD,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAWnC,eAAO,MAAM,QAAQ,EAAE,KAQtB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAQ1B,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,KASxC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAS7B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KASvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAS7B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAQjC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAQ7B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE;IAAE,MAAM,EAAE,OAAO,CAAA;CAU9C,CAAC"}
|