@cellarnode/ui 0.17.4 → 0.19.2
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/journey-card.d.ts +9 -1
- package/dist/components/journey-card.d.ts.map +1 -1
- package/dist/components/journey-card.js +13 -6
- package/dist/components/journey-card.js.map +1 -1
- package/dist/components/journey-card.stories.d.ts +2 -0
- package/dist/components/journey-card.stories.d.ts.map +1 -1
- package/dist/components/journey-card.stories.js +43 -0
- package/dist/components/journey-card.stories.js.map +1 -1
- package/dist/components/sortable-card-context.d.ts +18 -0
- package/dist/components/sortable-card-context.d.ts.map +1 -0
- package/dist/components/sortable-card-context.js +18 -0
- package/dist/components/sortable-card-context.js.map +1 -0
- package/dist/components/sortable-card-shell.d.ts +40 -21
- package/dist/components/sortable-card-shell.d.ts.map +1 -1
- package/dist/components/sortable-card-shell.js +46 -39
- package/dist/components/sortable-card-shell.js.map +1 -1
- package/dist/components/sortable-card-shell.stories.d.ts +1 -1
- package/dist/components/sortable-card-shell.stories.d.ts.map +1 -1
- package/dist/components/sortable-card-shell.stories.js +28 -15
- package/dist/components/sortable-card-shell.stories.js.map +1 -1
- package/dist/components/sortable-card-shell.test.js +57 -16
- package/dist/components/sortable-card-shell.test.js.map +1 -1
- 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/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-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/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-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-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-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/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-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-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-list.d.ts.map +1 -1
- package/dist/opportunities/opportunity-stacked-list.js +3 -1
- package/dist/opportunities/opportunity-stacked-list.js.map +1 -1
- 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/two-column-section.d.ts.map +1 -1
- package/dist/opportunities/two-column-section.js +4 -3
- package/dist/opportunities/two-column-section.js.map +1 -1
- 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/package.json +13 -4
- package/src/offer/offer-document.print.css +72 -0
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import type { ConversationEvent, TranslationFn } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Chat-scoped timeline for message + negotiation-event rendering in the
|
|
4
|
+
* chat surface.
|
|
5
|
+
*
|
|
6
|
+
* Deviation from the unified offer page spec (§10.2): the spec proposed
|
|
7
|
+
* extending this component with an offer-event kind registry so the offer
|
|
8
|
+
* page's negotiation timeline would reuse it. We instead ship a dedicated
|
|
9
|
+
* `NegotiationSection` wrapper in `ui/src/offer/` that renders offer-scoped
|
|
10
|
+
* `TimelineEvent` rows directly and reuses this file's scroll / virtualize
|
|
11
|
+
* / jump-to-latest UX pattern. See `ui/src/offer/negotiation-section.tsx`.
|
|
12
|
+
* Rationale: avoids cross-leaking offer data structures (`offer_responses`
|
|
13
|
+
* vs `chat_messages`) into the chat feature.
|
|
14
|
+
*
|
|
15
|
+
* @see {@link ../offer/negotiation-section.tsx}
|
|
16
|
+
*/
|
|
2
17
|
interface UnifiedTimelineProps {
|
|
3
18
|
items: ConversationEvent[];
|
|
4
19
|
currentOrgId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unified-timeline.d.ts","sourceRoot":"","sources":["../../src/chat/unified-timeline.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEhE,UAAU,oBAAoB;IAC5B,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IAC1C,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,qEAAqE;IACrE,CAAC,CAAC,EAAE,aAAa,CAAC;CACnB;AAkID,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,OAAO,EACP,UAAU,EACV,cAAc,EACd,CAAY,GACb,EAAE,oBAAoB,2CAwMtB"}
|
|
1
|
+
{"version":3,"file":"unified-timeline.d.ts","sourceRoot":"","sources":["../../src/chat/unified-timeline.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEhE;;;;;;;;;;;;;;GAcG;AACH,UAAU,oBAAoB;IAC5B,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IAC1C,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,qEAAqE;IACrE,CAAC,CAAC,EAAE,aAAa,CAAC;CACnB;AAkID,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,OAAO,EACP,UAAU,EACV,cAAc,EACd,CAAY,GACb,EAAE,oBAAoB,2CAwMtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unified-timeline.js","sourceRoot":"","sources":["../../src/chat/unified-timeline.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"unified-timeline.js","sourceRoot":"","sources":["../../src/chat/unified-timeline.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,C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QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,YAAY,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,CACvE,KAAC,YAAY,IAEX,IAAI,EAAE,IAAI,EACV,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,iBAAiB,EAAE,iBAAiB,EACpC,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAC9B,CAAC,EAAE,CAAC,IATC,IAAI,CAAC,EAAE,CAUZ,CACH,CAAC,CACH,EAEA,QAAQ,IAAI,KAAC,eAAe,KAAG,EAE/B,gBAAgB,IAAI,CACnB,KAAC,MAAM,IACL,IAAI,EAAC,IAAI,EACT,SAAS,EAAC,2DAA2D,EACrE,OAAO,EAAE,GAAG,EAAE;oBACZ,IAAI,CAAC,SAAS,CAAC,OAAO;wBAAE,OAAO;oBAC/B,SAAS,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,YAAY,CAAC;oBAC7D,gBAAgB,CAAC,OAAO,GAAG,IAAI,CAAC;oBAChC,mBAAmB,CAAC,KAAK,CAAC,CAAC;gBAC7B,CAAC,YAEA,CAAC,CAAC,cAAc,EAAE,gBAAgB,CAAC,GAC7B,CACV,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -42,8 +42,16 @@ export interface JourneyCardProps {
|
|
|
42
42
|
animate?: boolean;
|
|
43
43
|
/** Disable hover lift (used inside drag overlay) */
|
|
44
44
|
disableHover?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Force-show the drag grip in the top-left corner. Normally the card
|
|
47
|
+
* auto-detects whether it is rendered inside a `SortableCardShell` via
|
|
48
|
+
* `SortableCardContext`. Set to `false` to suppress the grip even when
|
|
49
|
+
* nested in a shell (e.g. inside a drag overlay preview). Set to `true`
|
|
50
|
+
* to show it outside of a shell (rare).
|
|
51
|
+
*/
|
|
52
|
+
showGrip?: boolean;
|
|
45
53
|
onClick?: () => void;
|
|
46
54
|
className?: string;
|
|
47
55
|
}
|
|
48
|
-
export declare function JourneyCard({ productImage, productInitials, title, subtitle, modified, activityDot, matchScore, progress, metaRight, metaRightTone, participants, titleIcon, actionsSlot, variant, animate, disableHover, onClick, className, }: JourneyCardProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export declare function JourneyCard({ productImage, productInitials, title, subtitle, modified, activityDot, matchScore, progress, metaRight, metaRightTone, participants, titleIcon, actionsSlot, variant, animate, disableHover, showGrip, onClick, className, }: JourneyCardProps): import("react/jsx-runtime").JSX.Element;
|
|
49
57
|
//# sourceMappingURL=journey-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"journey-card.d.ts","sourceRoot":"","sources":["../../src/components/journey-card.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"journey-card.d.ts","sourceRoot":"","sources":["../../src/components/journey-card.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG9D,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;AAErE,MAAM,WAAW,gBAAgB;IAC/B,iGAAiG;IACjG,YAAY,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACxD,2FAA2F;IAC3F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,8EAA8E;IAC9E,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,gDAAgD;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8FAA8F;IAC9F,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,+BAA+B;IAC/B,aAAa,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAChD,2CAA2C;IAC3C,YAAY,CAAC,EAAE,UAAU,EAAE,CAAC;IAC5B,6FAA6F;IAC7F,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,8CAA8C;IAC9C,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,gCAAgC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oDAAoD;IACpD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AASD,wBAAgB,WAAW,CAAC,EAC1B,YAAY,EACZ,eAAe,EACf,KAAK,EACL,QAAQ,EACR,QAAgB,EAChB,WAAW,EACX,UAAU,EACV,QAAQ,EACR,SAAS,EACT,aAAyB,EACzB,YAAY,EACZ,SAAS,EACT,WAAW,EACX,OAAmB,EACnB,OAAe,EACf,YAAoB,EACpB,QAAQ,EACR,OAAO,EACP,SAAS,GACV,EAAE,gBAAgB,2CAyMlB"}
|
|
@@ -1,32 +1,39 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { motion } from "motion/react";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Grip } from "lucide-react";
|
|
3
5
|
import { cn } from "../lib/utils";
|
|
4
6
|
import { AvatarStack } from "./avatar-stack";
|
|
7
|
+
import { SortableCardContext } from "./sortable-card-context";
|
|
5
8
|
const VARIANT_BG = {
|
|
6
9
|
default: "bg-[var(--card)]",
|
|
7
10
|
sent: "bg-[color-mix(in_oklab,white_96%,var(--primary)_4%)]",
|
|
8
11
|
won: "bg-[var(--tone-success-surface)] border-[color-mix(in_oklab,white_72%,var(--success)_28%)]",
|
|
9
12
|
lost: "bg-[color-mix(in_oklab,white_97%,var(--foreground)_3%)] opacity-90",
|
|
10
13
|
};
|
|
11
|
-
export function JourneyCard({ productImage, productInitials, title, subtitle, modified = false, activityDot, matchScore, progress, metaRight, metaRightTone = "default", participants, titleIcon, actionsSlot, variant = "default", animate = false, disableHover = false, onClick, className, }) {
|
|
14
|
+
export function JourneyCard({ productImage, productInitials, title, subtitle, modified = false, activityDot, matchScore, progress, metaRight, metaRightTone = "default", participants, titleIcon, actionsSlot, variant = "default", animate = false, disableHover = false, showGrip, onClick, className, }) {
|
|
12
15
|
const showInitials = !productImage && !!productInitials;
|
|
16
|
+
const { isDraggable } = React.use(SortableCardContext);
|
|
17
|
+
// Default: show grip whenever the card is nested in a SortableCardShell.
|
|
18
|
+
// Consumers can override either direction via `showGrip`.
|
|
19
|
+
const renderGrip = showGrip ?? isDraggable;
|
|
13
20
|
const shell = (_jsxs("div", { role: onClick ? "button" : undefined, tabIndex: onClick ? 0 : undefined, onClick: onClick, onKeyDown: (e) => {
|
|
14
21
|
if (onClick && (e.key === "Enter" || e.key === " ")) {
|
|
15
22
|
e.preventDefault();
|
|
16
23
|
onClick();
|
|
17
24
|
}
|
|
18
|
-
}, className: cn("group relative rounded-xl border border-[color-mix(in_oklab,var(--border)_60%,transparent)] p-3", "backdrop-blur-[14px] backdrop-saturate-[120%]", "shadow-[0_1px_2px_oklch(0.2_0.005_230/0.04),0_8px_24px_-18px_oklch(0.2_0.005_230/0.08),inset_0_1px_0_oklch(1_0_0/0.35)]", !disableHover &&
|
|
25
|
+
}, className: cn("group relative rounded-xl border border-[color-mix(in_oklab,var(--border)_60%,transparent)] p-3.5", "backdrop-blur-[14px] backdrop-saturate-[120%]", "shadow-[0_1px_2px_oklch(0.2_0.005_230/0.04),0_8px_24px_-18px_oklch(0.2_0.005_230/0.08),inset_0_1px_0_oklch(1_0_0/0.35)]", !disableHover &&
|
|
19
26
|
"transition-[transform,border-color,box-shadow] duration-[var(--duration-standard)] ease-[var(--ease-emphasized)] will-change-transform", !disableHover &&
|
|
20
|
-
"hover:-translate-y-1 hover:border-[color-mix(in_oklab,var(--primary)_22%,var(--border))] hover:shadow-[0_8px_20px_-12px_oklch(0.2_0.005_230/0.08),0_20px_50px_-30px_oklch(0.40_0.062_178/0.28),inset_0_1px_0_oklch(1_0_0/0.45)] hover:z-10 focus-within:z-10 has-[[data-open]]:z-50", VARIANT_BG[variant], onClick && "cursor-pointer", className), children: [_jsxs("div", { className: "flex items-start gap-[10px]", children: [productImage ? (_jsx("img", { src: productImage.url, alt: productImage.altText ?? "", width:
|
|
27
|
+
"hover:-translate-y-1 hover:border-[color-mix(in_oklab,var(--primary)_22%,var(--border))] hover:shadow-[0_8px_20px_-12px_oklch(0.2_0.005_230/0.08),0_20px_50px_-30px_oklch(0.40_0.062_178/0.28),inset_0_1px_0_oklch(1_0_0/0.45)] hover:z-10 focus-within:z-10 has-[[data-open]]:z-50", VARIANT_BG[variant], onClick && "cursor-pointer", className), children: [renderGrip && (_jsx("span", { "aria-hidden": "true", title: "Drag to reorder", className: "pointer-events-none absolute left-1.5 top-1.5 z-10 flex size-5 items-center justify-center rounded text-[var(--muted-foreground)] opacity-30 transition-opacity duration-[var(--duration-standard)] ease-[var(--ease-emphasized)] group-hover:opacity-100", children: _jsx(Grip, { className: "size-3.5" }) })), _jsxs("div", { className: cn("flex items-start gap-[10px]", renderGrip && "pl-5"), children: [productImage ? (_jsx("img", { src: productImage.url, alt: productImage.altText ?? "", width: 48, height: 48, loading: "lazy", className: "size-12 shrink-0 rounded-lg object-cover shadow-[0_2px_8px_-2px_oklch(0_0_0/0.15),inset_0_1px_0_oklch(1_0_0/0.2)]" })) : showInitials ? (_jsx("div", { className: "flex size-12 shrink-0 items-center justify-center rounded-lg text-sm font-bold tracking-tight text-white shadow-[0_2px_8px_-2px_oklch(0_0_0/0.15),inset_0_1px_0_oklch(1_0_0/0.2)]", style: {
|
|
21
28
|
background: "linear-gradient(135deg, color-mix(in oklab, var(--primary) 60%, white) 0%, color-mix(in oklab, var(--accent-secondary) 60%, white) 100%)",
|
|
22
29
|
fontFamily: "Sora, sans-serif",
|
|
23
|
-
}, "aria-hidden": "true", children: productInitials })) : (_jsx("div", { className: "flex size-
|
|
30
|
+
}, "aria-hidden": "true", children: productInitials })) : (_jsx("div", { className: "flex size-12 shrink-0 items-center justify-center rounded-lg text-lg", style: {
|
|
24
31
|
background: "color-mix(in oklab, white 94%, var(--primary) 6%)",
|
|
25
32
|
border: "1.5px dashed color-mix(in oklab, var(--primary) 30%, white)",
|
|
26
33
|
color: "color-mix(in oklab, var(--primary) 60%, var(--muted-foreground))",
|
|
27
|
-
}, "aria-hidden": "true", children: "+" })), _jsxs("div", { className: "min-w-0 flex-1 pt-0.5", children: [_jsxs("div", { className: "mb-[3px] flex items-center gap-1.5", children: [_jsx("div", { className: "min-w-0 flex-1 truncate font-display text-
|
|
34
|
+
}, "aria-hidden": "true", children: "+" })), _jsxs("div", { className: "min-w-0 flex-1 pt-0.5", children: [_jsxs("div", { className: "mb-[3px] flex items-center gap-1.5", children: [_jsx("div", { className: "min-w-0 flex-1 truncate font-display text-sm/tight font-semibold tracking-tight text-foreground", children: title }), modified && (_jsx("span", { title: "Modified for this offer", "aria-label": "Modified for this offer", className: "size-[7px] shrink-0 rounded-full bg-[var(--accent-secondary)] shadow-[0_0_0_3px_color-mix(in_oklab,var(--accent-secondary)_15%,transparent)]" })), activityDot && !modified && (_jsx("span", { title: "Recent activity", "aria-label": "Recent activity", className: "size-[7px] shrink-0 rounded-full bg-[var(--primary)] shadow-[0_0_0_3px_color-mix(in_oklab,var(--primary)_15%,transparent)]" })), titleIcon && (_jsx("span", { className: "shrink-0 text-[var(--accent-secondary)]", children: titleIcon })), typeof matchScore === "number" && (_jsxs("span", { className: cn("shrink-0 rounded-md px-1.5 py-[1px] text-[10px] font-semibold tabular-nums", matchScore >= 80
|
|
28
35
|
? "bg-[color-mix(in_oklab,var(--primary)_10%,transparent)] text-[color-mix(in_oklab,black_30%,var(--primary)_70%)]"
|
|
29
|
-
: "bg-[color-mix(in_oklab,var(--primary)_6%,transparent)] text-[var(--muted-foreground)]"), children: [matchScore, "%"] }))] }), subtitle && (_jsx("div", { className: "truncate text-
|
|
36
|
+
: "bg-[color-mix(in_oklab,var(--primary)_6%,transparent)] text-[var(--muted-foreground)]"), children: [matchScore, "%"] }))] }), subtitle && (_jsx("div", { className: "truncate text-xs/snug text-[var(--muted-foreground)]", children: subtitle }))] })] }), typeof progress === "number" && (_jsx("div", { className: "mt-[10px] h-1 overflow-hidden rounded-full bg-[color-mix(in_oklab,var(--primary)_8%,transparent)]", role: "progressbar", "aria-valuenow": Math.round(progress * 100), "aria-valuemin": 0, "aria-valuemax": 100, children: _jsx("div", { className: "h-full transition-[width] duration-[var(--duration-hero)] ease-[var(--ease-emphasized)]", style: {
|
|
30
37
|
width: `${Math.max(0, Math.min(1, progress)) * 100}%`,
|
|
31
38
|
background: "linear-gradient(90deg, var(--primary), color-mix(in oklab, var(--primary) 70%, var(--accent-secondary)))",
|
|
32
39
|
} }) })), ((participants && participants.length > 0) || metaRight || actionsSlot) && (_jsx("div", { className: "mx-0 my-[10px] h-px bg-linear-to-r from-transparent via-[color-mix(in_oklab,var(--primary)_15%,transparent)] to-transparent" })), ((participants && participants.length > 0) || metaRight || actionsSlot) && (_jsxs("div", { className: "flex items-center gap-2", children: [participants && participants.length > 0 ? (_jsx(AvatarStack, { orgs: participants, size: "sm" })) : (_jsx("span", {})), _jsx("span", { className: "flex-1" }), metaRight && (_jsx("span", { className: cn("text-right font-display text-xs tabular-nums tracking-tight", metaRightTone === "success" &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"journey-card.js","sourceRoot":"","sources":["../../src/components/journey-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"journey-card.js","sourceRoot":"","sources":["../../src/components/journey-card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,WAAW,EAAmB,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAsD9D,MAAM,UAAU,GAAuC;IACrD,OAAO,EAAE,kBAAkB;IAC3B,IAAI,EAAE,sDAAsD;IAC5D,GAAG,EAAE,4FAA4F;IACjG,IAAI,EAAE,oEAAoE;CAC3E,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,EAC1B,YAAY,EACZ,eAAe,EACf,KAAK,EACL,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,WAAW,EACX,UAAU,EACV,QAAQ,EACR,SAAS,EACT,aAAa,GAAG,SAAS,EACzB,YAAY,EACZ,SAAS,EACT,WAAW,EACX,OAAO,GAAG,SAAS,EACnB,OAAO,GAAG,KAAK,EACf,YAAY,GAAG,KAAK,EACpB,QAAQ,EACR,OAAO,EACP,SAAS,GACQ;IACjB,MAAM,YAAY,GAAG,CAAC,YAAY,IAAI,CAAC,CAAC,eAAe,CAAC;IACxD,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IACvD,yEAAyE;I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EAAE,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAC3C,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EACvC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,YAEtD,KAAK,GACK,CACd,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -11,5 +11,7 @@ export declare const Sent: Story;
|
|
|
11
11
|
export declare const Won: Story;
|
|
12
12
|
export declare const WithAnimation: Story;
|
|
13
13
|
export declare const WithActivityDot: Story;
|
|
14
|
+
export declare const WithDragGrip: Story;
|
|
15
|
+
export declare const WithDragGripForceShown: Story;
|
|
14
16
|
export declare const WithActionsSlot: Story;
|
|
15
17
|
//# sourceMappingURL=journey-card.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"journey-card.stories.d.ts","sourceRoot":"","sources":["../../src/components/journey-card.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"journey-card.stories.d.ts","sourceRoot":"","sources":["../../src/components/journey-card.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGpE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAYhC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAE9C,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,KAUxC,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAWvB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAUzB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAclB,CAAC;AAEF,eAAO,MAAM,GAAG,EAAE,KAejB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAU7B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KA0B1B,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAoBpC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KA2B7B,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Award, MoreHorizontal } from "lucide-react";
|
|
3
3
|
import { JourneyCard } from "./journey-card";
|
|
4
|
+
import { SortableCardContext } from "./sortable-card-shell";
|
|
4
5
|
const meta = {
|
|
5
6
|
title: "Components/JourneyCard",
|
|
6
7
|
component: JourneyCard,
|
|
@@ -105,6 +106,48 @@ export const WithActivityDot = {
|
|
|
105
106
|
metaRightTone: "muted",
|
|
106
107
|
},
|
|
107
108
|
};
|
|
109
|
+
export const WithDragGrip = {
|
|
110
|
+
name: "With drag grip (inside SortableCardShell)",
|
|
111
|
+
decorators: [
|
|
112
|
+
(Story) => (_jsx(SortableCardContext, { value: { isDraggable: true }, children: _jsx(Story, {}) })),
|
|
113
|
+
],
|
|
114
|
+
args: {
|
|
115
|
+
productInitials: "CR",
|
|
116
|
+
title: "Chardonnay Reserve 2021",
|
|
117
|
+
subtitle: "Nordic Wines · Organic whites",
|
|
118
|
+
participants: [{ id: "nw", name: "Nordic Wines" }],
|
|
119
|
+
metaRight: "2d ago",
|
|
120
|
+
metaRightTone: "muted",
|
|
121
|
+
onClick: () => { },
|
|
122
|
+
},
|
|
123
|
+
parameters: {
|
|
124
|
+
docs: {
|
|
125
|
+
description: {
|
|
126
|
+
story: "Cards rendered inside a `SortableCardShell` show a top-left grip affordance (6-dot grid, opacity 30% idle / 100% on hover). The grip is purely visual — `pointer-events-none` — so the whole card remains the drag activation surface. Toggle the story in isolation (not inside a shell) via the `Selected` story to verify the grip disappears outside a drag context.",
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
export const WithDragGripForceShown = {
|
|
132
|
+
name: "With drag grip (showGrip={true})",
|
|
133
|
+
args: {
|
|
134
|
+
showGrip: true,
|
|
135
|
+
productInitials: "CR",
|
|
136
|
+
title: "Chardonnay Reserve 2021",
|
|
137
|
+
subtitle: "Nordic Wines · Organic whites",
|
|
138
|
+
participants: [{ id: "nw", name: "Nordic Wines" }],
|
|
139
|
+
metaRight: "2d ago",
|
|
140
|
+
metaRightTone: "muted",
|
|
141
|
+
onClick: () => { },
|
|
142
|
+
},
|
|
143
|
+
parameters: {
|
|
144
|
+
docs: {
|
|
145
|
+
description: {
|
|
146
|
+
story: "`showGrip` overrides auto-detection. Use `true` to force the grip outside a `SortableCardShell` context, or `false` to suppress it inside one (e.g. in a drag-overlay preview).",
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
};
|
|
108
151
|
export const WithActionsSlot = {
|
|
109
152
|
args: {
|
|
110
153
|
productInitials: "CR",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"journey-card.stories.js","sourceRoot":"","sources":["../../src/components/journey-card.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,WAAW,EAAyB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"journey-card.stories.js","sourceRoot":"","sources":["../../src/components/journey-card.stories.tsx"],"names":[],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
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SortableCardContext — minimal leaf module.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from `sortable-card-shell.tsx` so card components (e.g.
|
|
5
|
+
* `JourneyCard`) can read the context to decide whether to render a
|
|
6
|
+
* drag affordance WITHOUT transitively importing `@dnd-kit/dom` at
|
|
7
|
+
* module load. `@dnd-kit/dom` touches `ResizeObserver` when imported,
|
|
8
|
+
* which breaks jsdom-based tests that don't polyfill it.
|
|
9
|
+
*
|
|
10
|
+
* The shell itself re-exports this via `sortable-card-shell.tsx` for
|
|
11
|
+
* back-compat, so `import { SortableCardContext } from "./sortable-card-shell"`
|
|
12
|
+
* still works for existing consumers and tests.
|
|
13
|
+
*/
|
|
14
|
+
export interface SortableCardContextValue {
|
|
15
|
+
isDraggable: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const SortableCardContext: import("react").Context<SortableCardContextValue>;
|
|
18
|
+
//# sourceMappingURL=sortable-card-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortable-card-context.d.ts","sourceRoot":"","sources":["../../src/components/sortable-card-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,mBAAmB,mDAE9B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SortableCardContext — minimal leaf module.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from `sortable-card-shell.tsx` so card components (e.g.
|
|
5
|
+
* `JourneyCard`) can read the context to decide whether to render a
|
|
6
|
+
* drag affordance WITHOUT transitively importing `@dnd-kit/dom` at
|
|
7
|
+
* module load. `@dnd-kit/dom` touches `ResizeObserver` when imported,
|
|
8
|
+
* which breaks jsdom-based tests that don't polyfill it.
|
|
9
|
+
*
|
|
10
|
+
* The shell itself re-exports this via `sortable-card-shell.tsx` for
|
|
11
|
+
* back-compat, so `import { SortableCardContext } from "./sortable-card-shell"`
|
|
12
|
+
* still works for existing consumers and tests.
|
|
13
|
+
*/
|
|
14
|
+
import { createContext } from "react";
|
|
15
|
+
export const SortableCardContext = createContext({
|
|
16
|
+
isDraggable: false,
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=sortable-card-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortable-card-context.js","sourceRoot":"","sources":["../../src/components/sortable-card-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAMtC,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAA2B;IACzE,WAAW,EAAE,KAAK;CACnB,CAAC,CAAC"}
|
|
@@ -1,32 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SortableCardShell —
|
|
2
|
+
* SortableCardShell — whole-card drag wrapper.
|
|
3
3
|
*
|
|
4
|
-
* Journey/kanban
|
|
5
|
-
* 1. The whole card is the drag activation surface
|
|
6
|
-
* 2.
|
|
7
|
-
*
|
|
8
|
-
* they must NOT start a drag.
|
|
9
|
-
*
|
|
10
|
-
* This shell wraps children in a div whose ref is dnd-kit's activation region.
|
|
11
|
-
* The grip icon is purely visual (`pointer-events-none` + `aria-hidden`) and
|
|
12
|
-
* is NOT used as the drag handle — it's an affordance hint only.
|
|
4
|
+
* Journey/kanban cards want two things:
|
|
5
|
+
* 1. The whole card is the drag activation surface.
|
|
6
|
+
* 2. Clicks on `<button>`/`<a>`/menus/etc. inside the card must still
|
|
7
|
+
* work — they must NOT start a drag.
|
|
13
8
|
*
|
|
14
9
|
* To keep clicks on interactive descendants from activating a drag, we
|
|
15
10
|
* configure `PointerSensor` per-draggable with a `preventActivation` hook
|
|
16
|
-
* that inspects the pointer target with `Element.closest(...)`. Any
|
|
17
|
-
* matching a known interactive selector — or carrying a
|
|
18
|
-
* attribute — cancels activation before the drag starts.
|
|
11
|
+
* that inspects the pointer target with `Element.closest(...)`. Any
|
|
12
|
+
* element matching a known interactive selector — or carrying a
|
|
13
|
+
* `data-no-drag` attribute — cancels activation before the drag starts.
|
|
14
|
+
*
|
|
15
|
+
* This shell does NOT render a grip affordance. Consumers that want one
|
|
16
|
+
* (e.g. JourneyCard) can read the exported `SortableCardContext` to
|
|
17
|
+
* detect they are inside a drag shell and render their own grip in a
|
|
18
|
+
* layout-appropriate position.
|
|
19
19
|
*
|
|
20
20
|
* Requires the optional peer dependencies `@dnd-kit/react` and `@dnd-kit/dom`.
|
|
21
21
|
* Not exported from the main barrel — import directly from
|
|
22
22
|
* `@cellarnode/ui/sortable-card-shell`.
|
|
23
23
|
*/
|
|
24
24
|
import { type ReactNode } from "react";
|
|
25
|
+
import { SortableCardContext, type SortableCardContextValue } from "./sortable-card-context";
|
|
26
|
+
export { SortableCardContext };
|
|
27
|
+
export type { SortableCardContextValue };
|
|
25
28
|
/**
|
|
26
29
|
* CSS selector for elements inside a draggable card that should NOT
|
|
27
30
|
* activate a drag when clicked. Consumers can opt any element out by
|
|
28
31
|
* adding the `data-no-drag` attribute.
|
|
29
32
|
*
|
|
33
|
+
* Notable exclusion: `[role='button']` and `[role='link']` are NOT in
|
|
34
|
+
* this list. JourneyCard (and similar card wrappers) set `role='button'`
|
|
35
|
+
* on their root div for keyboard a11y. If we matched those, `closest()`
|
|
36
|
+
* would resolve to the card wrapper itself and drag would never activate.
|
|
37
|
+
* `@dnd-kit/dom`'s own activation constraints (5px distance, 200ms delay)
|
|
38
|
+
* already prevent tap-clicks from starting accidental drags, so dropping
|
|
39
|
+
* these roles is safe.
|
|
40
|
+
*
|
|
30
41
|
* Exported so consumers can extend or reuse it in custom sensor configs.
|
|
31
42
|
*/
|
|
32
43
|
export declare const SORTABLE_CARD_NO_DRAG_SELECTOR: string;
|
|
@@ -47,14 +58,20 @@ interface SortableCardShellCommonProps {
|
|
|
47
58
|
isShaking?: boolean;
|
|
48
59
|
/** Extra classes for the wrapper element. */
|
|
49
60
|
className?: string;
|
|
50
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* @deprecated The shell no longer renders a grip. Card components
|
|
63
|
+
* render their own grip internally (see `JourneyCard`). Retained as
|
|
64
|
+
* a no-op for backwards compatibility with older consumer code.
|
|
65
|
+
*/
|
|
51
66
|
gripClassName?: string;
|
|
52
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* @deprecated The shell no longer renders a grip. Card components
|
|
69
|
+
* render their own grip internally. No-op.
|
|
70
|
+
*/
|
|
53
71
|
hideGrip?: boolean;
|
|
54
72
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* `pointer-events-none`). Defaults to "Drag to reorder".
|
|
73
|
+
* @deprecated The shell no longer renders a grip. Card components
|
|
74
|
+
* render their own grip internally. No-op.
|
|
58
75
|
*/
|
|
59
76
|
gripTitle?: string;
|
|
60
77
|
children: ReactNode;
|
|
@@ -86,13 +103,15 @@ interface SortableCardShellDraggableProps {
|
|
|
86
103
|
*/
|
|
87
104
|
export type SortableCardShellProps = SortableCardShellCommonProps & (SortableCardShellSortableProps | SortableCardShellDraggableProps);
|
|
88
105
|
/**
|
|
89
|
-
*
|
|
106
|
+
* Whole-card drag wrapper used by producer + importer journey boards.
|
|
90
107
|
*
|
|
91
|
-
* Visual states:
|
|
108
|
+
* Visual states applied to the wrapper:
|
|
92
109
|
* - `isDragSource` / `isDragging`: wrapper dims to `opacity-40`.
|
|
93
110
|
* - `isDropTarget` (sortable only): 2px primary line above the card.
|
|
94
111
|
* - `isShaking`: applies `card-shake` class (consumer-defined keyframes).
|
|
112
|
+
*
|
|
113
|
+
* The shell exposes `SortableCardContext` so children can render their
|
|
114
|
+
* own drag affordance (e.g. a grip icon in `JourneyCard`).
|
|
95
115
|
*/
|
|
96
116
|
export declare function SortableCardShell(props: SortableCardShellProps): import("react/jsx-runtime").JSX.Element;
|
|
97
|
-
export {};
|
|
98
117
|
//# sourceMappingURL=sortable-card-shell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sortable-card-shell.d.ts","sourceRoot":"","sources":["../../src/components/sortable-card-shell.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAW,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"sortable-card-shell.d.ts","sourceRoot":"","sources":["../../src/components/sortable-card-shell.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAW,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAI1D,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC9B,MAAM,yBAAyB,CAAC;AAMjC,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,YAAY,EAAE,wBAAwB,EAAE,CAAC;AAIzC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,8BAA8B,QAsB9B,CAAC;AAcd,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,WAAW,CAAC;AAE7D;;GAEG;AACH,UAAU,4BAA4B;IACpC,qDAAqD;IACrD,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,oFAAoF;IACpF,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;GAGG;AACH,UAAU,8BAA8B;IACtC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,UAAU,+BAA+B;IACvC,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,4BAA4B,GAC/D,CAAC,8BAA8B,GAAG,+BAA+B,CAAC,CAAC;AAIrE;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,2CAsD9D"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
|
-
* SortableCardShell —
|
|
3
|
+
* SortableCardShell — whole-card drag wrapper.
|
|
4
4
|
*
|
|
5
|
-
* Journey/kanban
|
|
6
|
-
* 1. The whole card is the drag activation surface
|
|
7
|
-
* 2.
|
|
8
|
-
*
|
|
9
|
-
* they must NOT start a drag.
|
|
10
|
-
*
|
|
11
|
-
* This shell wraps children in a div whose ref is dnd-kit's activation region.
|
|
12
|
-
* The grip icon is purely visual (`pointer-events-none` + `aria-hidden`) and
|
|
13
|
-
* is NOT used as the drag handle — it's an affordance hint only.
|
|
5
|
+
* Journey/kanban cards want two things:
|
|
6
|
+
* 1. The whole card is the drag activation surface.
|
|
7
|
+
* 2. Clicks on `<button>`/`<a>`/menus/etc. inside the card must still
|
|
8
|
+
* work — they must NOT start a drag.
|
|
14
9
|
*
|
|
15
10
|
* To keep clicks on interactive descendants from activating a drag, we
|
|
16
11
|
* configure `PointerSensor` per-draggable with a `preventActivation` hook
|
|
17
|
-
* that inspects the pointer target with `Element.closest(...)`. Any
|
|
18
|
-
* matching a known interactive selector — or carrying a
|
|
19
|
-
* attribute — cancels activation before the drag starts.
|
|
12
|
+
* that inspects the pointer target with `Element.closest(...)`. Any
|
|
13
|
+
* element matching a known interactive selector — or carrying a
|
|
14
|
+
* `data-no-drag` attribute — cancels activation before the drag starts.
|
|
15
|
+
*
|
|
16
|
+
* This shell does NOT render a grip affordance. Consumers that want one
|
|
17
|
+
* (e.g. JourneyCard) can read the exported `SortableCardContext` to
|
|
18
|
+
* detect they are inside a drag shell and render their own grip in a
|
|
19
|
+
* layout-appropriate position.
|
|
20
20
|
*
|
|
21
21
|
* Requires the optional peer dependencies `@dnd-kit/react` and `@dnd-kit/dom`.
|
|
22
22
|
* Not exported from the main barrel — import directly from
|
|
@@ -24,15 +24,28 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
24
24
|
*/
|
|
25
25
|
import { useMemo } from "react";
|
|
26
26
|
import { PointerSensor } from "@dnd-kit/dom";
|
|
27
|
-
import { GripVertical } from "lucide-react";
|
|
28
27
|
import { cn } from "../lib/utils";
|
|
29
28
|
import { useDraggableCard, useSortableCard } from "../hooks/use-kanban-dnd";
|
|
29
|
+
import { SortableCardContext, } from "./sortable-card-context";
|
|
30
|
+
// Re-export for backwards compatibility: consumers that imported the
|
|
31
|
+
// context + type from `./sortable-card-shell` should keep working without
|
|
32
|
+
// changes. New code should import directly from `./sortable-card-context`
|
|
33
|
+
// to avoid pulling in `@dnd-kit/dom` at module load.
|
|
34
|
+
export { SortableCardContext };
|
|
30
35
|
// ─── Interactive-element guard ──────────────────────────────────────────────
|
|
31
36
|
/**
|
|
32
37
|
* CSS selector for elements inside a draggable card that should NOT
|
|
33
38
|
* activate a drag when clicked. Consumers can opt any element out by
|
|
34
39
|
* adding the `data-no-drag` attribute.
|
|
35
40
|
*
|
|
41
|
+
* Notable exclusion: `[role='button']` and `[role='link']` are NOT in
|
|
42
|
+
* this list. JourneyCard (and similar card wrappers) set `role='button'`
|
|
43
|
+
* on their root div for keyboard a11y. If we matched those, `closest()`
|
|
44
|
+
* would resolve to the card wrapper itself and drag would never activate.
|
|
45
|
+
* `@dnd-kit/dom`'s own activation constraints (5px distance, 200ms delay)
|
|
46
|
+
* already prevent tap-clicks from starting accidental drags, so dropping
|
|
47
|
+
* these roles is safe.
|
|
48
|
+
*
|
|
36
49
|
* Exported so consumers can extend or reuse it in custom sensor configs.
|
|
37
50
|
*/
|
|
38
51
|
export const SORTABLE_CARD_NO_DRAG_SELECTOR = [
|
|
@@ -44,8 +57,6 @@ export const SORTABLE_CARD_NO_DRAG_SELECTOR = [
|
|
|
44
57
|
"select",
|
|
45
58
|
"label",
|
|
46
59
|
"summary",
|
|
47
|
-
"[role='button']",
|
|
48
|
-
"[role='link']",
|
|
49
60
|
"[role='menuitem']",
|
|
50
61
|
"[role='menu']",
|
|
51
62
|
"[role='menubar']",
|
|
@@ -71,15 +82,18 @@ function shouldPreventDragActivation(event) {
|
|
|
71
82
|
}
|
|
72
83
|
// ─── Component ──────────────────────────────────────────────────────────────
|
|
73
84
|
/**
|
|
74
|
-
*
|
|
85
|
+
* Whole-card drag wrapper used by producer + importer journey boards.
|
|
75
86
|
*
|
|
76
|
-
* Visual states:
|
|
87
|
+
* Visual states applied to the wrapper:
|
|
77
88
|
* - `isDragSource` / `isDragging`: wrapper dims to `opacity-40`.
|
|
78
89
|
* - `isDropTarget` (sortable only): 2px primary line above the card.
|
|
79
90
|
* - `isShaking`: applies `card-shake` class (consumer-defined keyframes).
|
|
91
|
+
*
|
|
92
|
+
* The shell exposes `SortableCardContext` so children can render their
|
|
93
|
+
* own drag affordance (e.g. a grip icon in `JourneyCard`).
|
|
80
94
|
*/
|
|
81
95
|
export function SortableCardShell(props) {
|
|
82
|
-
const { id, data, disabled, isShaking, className,
|
|
96
|
+
const { id, data, disabled, isShaking, className, children } = props;
|
|
83
97
|
// Per-draggable PointerSensor with an interactive-element guard. Stable
|
|
84
98
|
// across renders — the sensor constructor doesn't depend on props.
|
|
85
99
|
const sensors = useMemo(() => [
|
|
@@ -87,14 +101,15 @@ export function SortableCardShell(props) {
|
|
|
87
101
|
preventActivation: (event) => shouldPreventDragActivation(event),
|
|
88
102
|
}),
|
|
89
103
|
], []);
|
|
104
|
+
const contextValue = useMemo(() => ({ isDraggable: !disabled }), [disabled]);
|
|
90
105
|
if (props.mode === "draggable") {
|
|
91
|
-
return (_jsx(DraggableShell, { id: id, data: data, disabled: disabled, isShaking: isShaking, className: className,
|
|
106
|
+
return (_jsx(SortableCardContext, { value: contextValue, children: _jsx(DraggableShell, { id: id, data: data, disabled: disabled, isShaking: isShaking, className: className, sensors: sensors, children: children }) }));
|
|
92
107
|
}
|
|
93
|
-
// Sortable mode (default). TS narrows `props` so `index` and `group`
|
|
94
|
-
// guaranteed to be `number` + `string` — no casts needed.
|
|
95
|
-
return (_jsx(SortableShell, { id: id, index: props.index, group: props.group, data: data, disabled: disabled, isShaking: isShaking, className: className,
|
|
108
|
+
// Sortable mode (default). TS narrows `props` so `index` and `group`
|
|
109
|
+
// are guaranteed to be `number` + `string` — no casts needed.
|
|
110
|
+
return (_jsx(SortableCardContext, { value: contextValue, children: _jsx(SortableShell, { id: id, index: props.index, group: props.group, data: data, disabled: disabled, isShaking: isShaking, className: className, sensors: sensors, children: children }) }));
|
|
96
111
|
}
|
|
97
|
-
function SortableShell({ id, index, group, data, disabled, isShaking, className,
|
|
112
|
+
function SortableShell({ id, index, group, data, disabled, isShaking, className, sensors, children, }) {
|
|
98
113
|
const { ref, isDragSource, isDropTarget } = useSortableCard({
|
|
99
114
|
id,
|
|
100
115
|
index,
|
|
@@ -103,32 +118,24 @@ function SortableShell({ id, index, group, data, disabled, isShaking, className,
|
|
|
103
118
|
disabled,
|
|
104
119
|
sensors,
|
|
105
120
|
});
|
|
106
|
-
return (_jsx(Wrapper, { innerRef: ref, isDragSource: isDragSource, isDropTarget: isDropTarget, showDropTargetLine: true, isShaking: isShaking, className: className,
|
|
121
|
+
return (_jsx(Wrapper, { innerRef: ref, isDragSource: isDragSource, isDropTarget: isDropTarget, showDropTargetLine: true, isShaking: isShaking, className: className, children: children }));
|
|
107
122
|
}
|
|
108
|
-
function DraggableShell({ id, data, disabled, isShaking, className,
|
|
123
|
+
function DraggableShell({ id, data, disabled, isShaking, className, sensors, children, }) {
|
|
109
124
|
const { ref, isDragging } = useDraggableCard({
|
|
110
125
|
id,
|
|
111
126
|
data,
|
|
112
127
|
disabled,
|
|
113
128
|
sensors,
|
|
114
129
|
});
|
|
115
|
-
return (_jsx(Wrapper, { innerRef: ref, isDragSource: isDragging, isDropTarget: false, showDropTargetLine: false, isShaking: isShaking, className: className,
|
|
130
|
+
return (_jsx(Wrapper, { innerRef: ref, isDragSource: isDragging, isDropTarget: false, showDropTargetLine: false, isShaking: isShaking, className: className, children: children }));
|
|
116
131
|
}
|
|
117
|
-
function Wrapper({ innerRef, isDragSource, isDropTarget, showDropTargetLine, isShaking, className,
|
|
118
|
-
return (
|
|
119
|
-
// No ARIA role — let the consumer's card content own semantics.
|
|
120
|
-
className: cn("relative group flex cursor-grab select-none items-stretch gap-1 transition-all hover:z-10 has-[[data-open]]:z-50 active:cursor-grabbing",
|
|
132
|
+
function Wrapper({ innerRef, isDragSource, isDropTarget, showDropTargetLine, isShaking, className, children, }) {
|
|
133
|
+
return (_jsx("div", { ref: innerRef, className: cn("relative cursor-grab select-none transition-all hover:z-10 has-[[data-open]]:z-50 active:cursor-grabbing",
|
|
121
134
|
// Unified drag-source dim (producer used 30, importer 50, standardizing on 40)
|
|
122
135
|
isDragSource && "opacity-40",
|
|
123
136
|
// Drop-target insertion line (sortable only)
|
|
124
137
|
showDropTargetLine &&
|
|
125
138
|
isDropTarget &&
|
|
126
|
-
"before:absolute before:-top-1 before:left-0 before:right-0 before:h-0.5 before:rounded-full before:bg-primary", isShaking && "card-shake", className), "data-drag-source": isDragSource ? "true" : undefined, "data-drop-target": isDropTarget ? "true" : undefined, children:
|
|
127
|
-
// Pointer-events off — grip is purely visual. The wrapper is the
|
|
128
|
-
// drag activation surface.
|
|
129
|
-
"pointer-events-none flex shrink-0 items-center justify-center p-1 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-60",
|
|
130
|
-
// While dragging, keep the grip visible (parent wrapper already
|
|
131
|
-
// dims to 40%, so this gives a ~40% grip which reads correctly).
|
|
132
|
-
isDragSource && "opacity-100", gripClassName), children: _jsx(GripVertical, { className: "size-3.5" }) })) : null, _jsx("div", { className: "min-w-0 flex-1", children: children })] }));
|
|
139
|
+
"before:absolute before:-top-1 before:left-0 before:right-0 before:h-0.5 before:rounded-full before:bg-primary", isShaking && "card-shake", className), "data-drag-source": isDragSource ? "true" : undefined, "data-drop-target": isDropTarget ? "true" : undefined, children: children }));
|
|
133
140
|
}
|
|
134
141
|
//# sourceMappingURL=sortable-card-shell.js.map
|