themelia-react-ui 2.0.6 → 3.0.0
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/CHANGELOG.md +250 -0
- package/MIGRATION.md +746 -7
- package/README.md +27 -23
- package/dist/{accordion-0tQUZ20r.js → accordion-DNVqwEIC.js} +36 -36
- package/dist/accordion-DNVqwEIC.js.map +1 -0
- package/dist/action-menu-D5343RwT.js +286 -0
- package/dist/action-menu-D5343RwT.js.map +1 -0
- package/dist/ai-artifact-otrz9ZwS.js +1214 -0
- package/dist/ai-artifact-otrz9ZwS.js.map +1 -0
- package/dist/anchored-positioning-1U_eBFNx.js +9 -0
- package/dist/anchored-positioning-1U_eBFNx.js.map +1 -0
- package/dist/app-shell-CPN30Nb1.js +372 -0
- package/dist/app-shell-CPN30Nb1.js.map +1 -0
- package/dist/{attachment-BCpA4e7i.js → attachment-D2-fpfmv.js} +15 -15
- package/dist/{attachment-BCpA4e7i.js.map → attachment-D2-fpfmv.js.map} +1 -1
- package/dist/{auth-B0girIk_.js → auth-g_oUTDDC.js} +234 -241
- package/dist/auth-g_oUTDDC.js.map +1 -0
- package/dist/{avatar-B9Jnp-T-.js → avatar-Ca3Ihrq4.js} +4 -4
- package/dist/{avatar-B9Jnp-T-.js.map → avatar-Ca3Ihrq4.js.map} +1 -1
- package/dist/{badge-wWauMgAt.js → badge-oGiXblW7.js} +8 -9
- package/dist/badge-oGiXblW7.js.map +1 -0
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +2 -2
- package/dist/base/cards.js +3 -3
- package/dist/base/carousel.js +11 -11
- package/dist/base/carousel.js.map +1 -1
- package/dist/base/cascader.js +1 -1
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +1 -1
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +7 -7
- package/dist/base/feedback.js +4 -4
- package/dist/base/forms-numeric.js +2 -2
- package/dist/base/forms.js +2 -2
- package/dist/base/inline-edit.js +13 -13
- package/dist/base/inline-edit.js.map +1 -1
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +203 -2
- package/dist/base/media-gallery.js.map +1 -0
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +7 -7
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +32 -22
- package/dist/base/qr-code.js.map +1 -1
- package/dist/base/repeaters.js +91 -88
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sidebar.js +2 -2
- package/dist/base/signature-pad.js +14 -14
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +6 -12
- package/dist/base/spinner.js.map +1 -1
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +3 -3
- package/dist/base/toaster.js +2 -2
- package/dist/base/tree.js +2 -2
- package/dist/base/upload-queue.js +303 -2
- package/dist/base/upload-queue.js.map +1 -0
- package/dist/base/upload.js +3 -4
- package/dist/base/value-inputs.js +1 -1
- package/dist/{batch-action-bar-BoqWIIpV.js → batch-action-bar-D6MZQNnC.js} +10 -10
- package/dist/{batch-action-bar-BoqWIIpV.js.map → batch-action-bar-D6MZQNnC.js.map} +1 -1
- package/dist/blocks/admin.js +242 -228
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +395 -357
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/charts.js +1022 -0
- package/dist/blocks/analytics/charts.js.map +1 -0
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +171 -1365
- package/dist/blocks/analytics.js.map +1 -1
- package/dist/blocks/collaboration.js +1 -1
- package/dist/blocks/commerce/receipt.js +1 -1
- package/dist/blocks/commerce.js +1487 -1358
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -3
- package/dist/blocks/onboarding.js +91 -82
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +25 -25
- package/dist/blocks/planning.js.map +1 -1
- package/dist/blocks/timelines.js +2 -2
- package/dist/{breadcrumbs-Bp9Ke7kd.js → breadcrumbs-CQ9JSlez.js} +52 -45
- package/dist/breadcrumbs-CQ9JSlez.js.map +1 -0
- package/dist/{button-ChBovTx0.js → button-rd6FiHfQ.js} +12 -8
- package/dist/button-rd6FiHfQ.js.map +1 -0
- package/dist/{buttons-DeW0bQeK.js → buttons-pZVgPTZn.js} +230 -246
- package/dist/buttons-pZVgPTZn.js.map +1 -0
- package/dist/{cards-CNXnmvV5.js → cards-CgWyqvgZ.js} +25 -22
- package/dist/{cards-CNXnmvV5.js.map → cards-CgWyqvgZ.js.map} +1 -1
- package/dist/cascader-Cf05pwaq.js +444 -0
- package/dist/cascader-Cf05pwaq.js.map +1 -0
- package/dist/{chart-I7ROnsl8.js → chart-CygRCyIZ.js} +5 -5
- package/dist/{chart-I7ROnsl8.js.map → chart-CygRCyIZ.js.map} +1 -1
- package/dist/{checkbox-MoyHIAPs.js → checkbox-Dy5_XBMZ.js} +4 -4
- package/dist/{checkbox-MoyHIAPs.js.map → checkbox-Dy5_XBMZ.js.map} +1 -1
- package/dist/{choice-inputs-DHGtx0QV.js → choice-inputs-oJEsrb5Y.js} +113 -114
- package/dist/choice-inputs-oJEsrb5Y.js.map +1 -0
- package/dist/{code-block-BSJyq9e-.js → code-block-BrLD7mCi.js} +44 -60
- package/dist/code-block-BrLD7mCi.js.map +1 -0
- package/dist/collapsible-CRCCg_bO.js +80 -0
- package/dist/collapsible-CRCCg_bO.js.map +1 -0
- package/dist/{collection-content-CSnwtOTH.js → collection-content-D7SoDlYd.js} +3 -3
- package/dist/{collection-content-CSnwtOTH.js.map → collection-content-D7SoDlYd.js.map} +1 -1
- package/dist/combobox-Dl6f6kHz.js +362 -0
- package/dist/combobox-Dl6f6kHz.js.map +1 -0
- package/dist/combobox-DrDXtSSt.js +929 -0
- package/dist/combobox-DrDXtSSt.js.map +1 -0
- package/dist/command-CjZ2VzKC.js +432 -0
- package/dist/command-CjZ2VzKC.js.map +1 -0
- package/dist/comments-C2MZyRmh.js +1214 -0
- package/dist/comments-C2MZyRmh.js.map +1 -0
- package/dist/components/base/accordion/accordion.d.ts +11 -3
- package/dist/components/base/action-menu/action-menu.d.ts +11 -3
- package/dist/components/base/buttons/button.d.ts +2 -2
- package/dist/components/base/buttons/index.d.ts +1 -1
- package/dist/components/base/buttons/loader-button.d.ts +6 -15
- package/dist/components/base/cards/index.d.ts +1 -1
- package/dist/components/base/cards/partials/card-body-context.d.ts +6 -0
- package/dist/components/base/cards/smart-card.d.ts +0 -2
- package/dist/components/base/cards/smart-card.types.d.ts +12 -10
- package/dist/components/base/cascader/cascader.d.ts +8 -2
- package/dist/components/base/cascader/cascader.types.d.ts +24 -2
- package/dist/components/base/cascader/index.d.ts +1 -1
- package/dist/components/base/choice-inputs/switch.d.ts +1 -1
- package/dist/components/base/code-block/use-code-copy.d.ts +2 -6
- package/dist/components/base/command/command.d.ts +1 -1
- package/dist/components/base/date-pickers/datepicker.types.d.ts +1 -3
- package/dist/components/base/display/dialog.d.ts +3 -9
- package/dist/components/base/display/index.d.ts +2 -3
- package/dist/components/base/display/separator.d.ts +1 -1
- package/dist/components/base/feedback/alert.d.ts +2 -1
- package/dist/components/base/feedback/empty.d.ts +10 -2
- package/dist/components/base/forms/workflow.d.ts +2 -2
- package/dist/components/base/forms-numeric/dimensions-input.d.ts +9 -17
- package/dist/components/base/forms-numeric/index.d.ts +3 -3
- package/dist/components/base/item/item.types.d.ts +6 -2
- package/dist/components/base/metadata-list/index.d.ts +1 -3
- package/dist/components/base/metadata-list/metadata-list.d.ts +4 -1
- package/dist/components/base/navigation/index.d.ts +2 -2
- package/dist/components/base/navigation/language-switcher.d.ts +7 -6
- package/dist/components/base/navigation/navigation-tabs.d.ts +8 -1
- package/dist/components/base/navigation/page-header/index.d.ts +1 -1
- package/dist/components/base/navigation/page-header/page-header.d.ts +13 -17
- package/dist/components/base/navigation/pagination.d.ts +5 -5
- package/dist/components/base/popover/popover.recipes.d.ts +0 -1
- package/dist/components/base/qr-code/qr-code.d.ts +4 -0
- package/dist/components/base/repeaters/index.d.ts +1 -1
- package/dist/components/base/repeaters/key-value-editor.d.ts +4 -0
- package/dist/components/base/sheet/sheet.d.ts +6 -15
- package/dist/components/base/sidebar/index.d.ts +1 -6
- package/dist/components/base/sidebar/sidebar.d.ts +38 -10
- package/dist/components/base/skeleton/skeleton.d.ts +1 -1
- package/dist/components/base/structure/structure.types.d.ts +11 -2
- package/dist/components/base/text-inputs/index.d.ts +1 -1
- package/dist/components/base/tree/index.d.ts +1 -0
- package/dist/components/base/tree/tree.d.ts +2 -2
- package/dist/components/base/tree/tree.types.d.ts +7 -1
- package/dist/components/base/upload/file-upload.validation.d.ts +37 -1
- package/dist/components/base/upload/image-upload.d.ts +2 -0
- package/dist/components/base/upload/index.d.ts +3 -9
- package/dist/components/base/value-inputs/date-time-input.d.ts +4 -0
- package/dist/components/base/value-inputs/slider.d.ts +5 -2
- package/dist/components/blocks/admin/action-surfaces/index.d.ts +17 -4
- package/dist/components/blocks/admin/api-key-list/api-key-list.types.d.ts +9 -3
- package/dist/components/blocks/admin/index.d.ts +1 -1
- package/dist/components/blocks/ai/ai-artifact/ai-artifact.d.ts +1 -1
- package/dist/components/blocks/ai/ai-artifact/types.d.ts +9 -4
- package/dist/components/blocks/ai/ai-chain-of-thought/ai-chain-of-thought.d.ts +1 -1
- package/dist/components/blocks/ai/ai-chain-of-thought/types.d.ts +11 -1
- package/dist/components/blocks/ai/ai-citation/ai-citation.d.ts +1 -1
- package/dist/components/blocks/ai/ai-citation/types.d.ts +6 -0
- package/dist/components/blocks/ai/ai-confirmation/ai-confirmation.d.ts +1 -1
- package/dist/components/blocks/ai/ai-confirmation/types.d.ts +21 -5
- package/dist/components/blocks/ai/ai-feedback/types.d.ts +7 -2
- package/dist/components/blocks/ai/ai-inline-citation/types.d.ts +9 -3
- package/dist/components/blocks/ai/ai-package-info/ai-package-info.d.ts +1 -1
- package/dist/components/blocks/ai/ai-package-info/types.d.ts +6 -0
- package/dist/components/blocks/ai/ai-sources/ai-sources.d.ts +1 -1
- package/dist/components/blocks/ai/ai-sources/types.d.ts +8 -2
- package/dist/components/blocks/ai/ai-task/ai-task.d.ts +1 -1
- package/dist/components/blocks/ai/ai-task/types.d.ts +10 -1
- package/dist/components/blocks/ai/ai-tool-call/ai-tool-call.d.ts +1 -1
- package/dist/components/blocks/ai/ai-tool-call/types.d.ts +6 -0
- package/dist/components/blocks/ai/ai.strings.d.ts +2 -0
- package/dist/components/blocks/analytics/activity-heatmap/types.d.ts +1 -1
- package/dist/components/blocks/analytics/analytics.strings.d.ts +2 -0
- package/dist/components/blocks/analytics/atoms/metric-trend-chip.d.ts +11 -1
- package/dist/components/blocks/analytics/chart-card/chart-card.d.ts +7 -5
- package/dist/components/blocks/analytics/charts/index.d.ts +27 -0
- package/dist/components/blocks/analytics/index.d.ts +17 -24
- package/dist/components/blocks/analytics/metric/metric.d.ts +5 -5
- package/dist/components/blocks/analytics/metric-grid/metric-grid.d.ts +2 -2
- package/dist/components/blocks/analytics/types.d.ts +12 -3
- package/dist/components/blocks/analytics/usage-card/usage-card.strings.d.ts +2 -0
- package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
- package/dist/components/blocks/commerce/address-card/types.d.ts +5 -16
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.d.ts +2 -2
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.types.d.ts +6 -4
- package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +0 -2
- package/dist/components/blocks/commerce/cart-summary/index.d.ts +2 -2
- package/dist/components/blocks/commerce/cart-summary/types.d.ts +9 -11
- package/dist/components/blocks/commerce/coupon-input/coupon-input.d.ts +1 -1
- package/dist/components/blocks/commerce/coupon-input/types.d.ts +7 -3
- package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +0 -2
- package/dist/components/blocks/commerce/discount-stack/index.d.ts +2 -2
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +4 -6
- package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +1 -1
- package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +2 -0
- package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-balance.d.ts +18 -0
- package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-compact.d.ts +1 -1
- package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-copy-button.d.ts +0 -1
- package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-dark.d.ts +1 -1
- package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-full.d.ts +1 -1
- package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-illustrated.d.ts +1 -1
- package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-minimal.d.ts +1 -1
- package/dist/components/blocks/commerce/giftcard-card/types.d.ts +16 -5
- package/dist/components/blocks/commerce/index.d.ts +8 -8
- package/dist/components/blocks/commerce/inventory-level/inventory-level.strings.d.ts +2 -0
- package/dist/components/blocks/commerce/inventory-level/types.d.ts +1 -1
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +0 -5
- package/dist/components/blocks/commerce/invoice-line-items/types.d.ts +6 -3
- package/dist/components/blocks/commerce/loyalty-points/loyalty-points.d.ts +1 -1
- package/dist/components/blocks/commerce/loyalty-points/types.d.ts +11 -5
- package/dist/components/blocks/commerce/order-status/order-status.d.ts +1 -1
- package/dist/components/blocks/commerce/order-status/types.d.ts +8 -8
- package/dist/components/blocks/commerce/order-timeline/order-timeline.d.ts +1 -1
- package/dist/components/blocks/commerce/order-timeline/types.d.ts +3 -1
- package/dist/components/blocks/commerce/payment-method/index.d.ts +2 -2
- package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +0 -8
- package/dist/components/blocks/commerce/payment-method/types.d.ts +0 -2
- package/dist/components/blocks/commerce/receipt/index.d.ts +1 -1
- package/dist/components/blocks/commerce/receipt/receipt-items.d.ts +1 -1
- package/dist/components/blocks/commerce/receipt/types.d.ts +10 -0
- package/dist/components/blocks/commerce/refund-status/index.d.ts +2 -2
- package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +0 -2
- package/dist/components/blocks/commerce/refund-status/types.d.ts +0 -2
- package/dist/components/blocks/commerce/seo-listing/types.d.ts +7 -0
- package/dist/components/blocks/commerce/shared/code-entry.d.ts +39 -0
- package/dist/components/blocks/commerce/shared/order-status.d.ts +1 -1
- package/dist/components/blocks/commerce/subscription-summary/subscription-summary.d.ts +1 -1
- package/dist/components/blocks/commerce/subscription-summary/types.d.ts +10 -1
- package/dist/components/blocks/commerce/upcoming-booking/index.d.ts +2 -1
- package/dist/components/blocks/commerce/upcoming-booking/types.d.ts +8 -0
- package/dist/components/blocks/commerce/upcoming-booking/upcoming-booking.d.ts +2 -2
- package/dist/components/blocks/commerce/vendor-profile/types.d.ts +4 -5
- package/dist/components/blocks/commerce/voucher-entry/types.d.ts +6 -3
- package/dist/components/blocks/commerce/voucher-entry/voucher-entry.d.ts +1 -1
- package/dist/components/blocks/content-block-hooks.d.ts +22 -0
- package/dist/components/blocks/data-display/dense-info-card/dense-info.strings.d.ts +5 -1
- package/dist/components/blocks/data-display/dense-info-card/helpers.d.ts +3 -1
- package/dist/components/blocks/data-display/dense-info-card/index.d.ts +1 -1
- package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-classification.d.ts +1 -1
- package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-dashboard.d.ts +1 -1
- package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-financial.d.ts +1 -1
- package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-project.d.ts +1 -1
- package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-score.d.ts +1 -1
- package/dist/components/blocks/data-display/dense-info-card/types.d.ts +12 -5
- package/dist/components/blocks/data-display/empty-state/empty-state.types.d.ts +6 -0
- package/dist/components/blocks/data-display/index.d.ts +0 -1
- package/dist/components/blocks/data-display/relationship-card-frame.d.ts +1 -1
- package/dist/components/blocks/onboarding/checklist/checklist.types.d.ts +5 -3
- package/dist/components/blocks/planning/task-card.types.d.ts +7 -3
- package/dist/components/blocks/timelines/changelog/types.d.ts +2 -2
- package/dist/components/blocks/timelines/index.d.ts +2 -2
- package/dist/components/blocks/timelines/milestones/types.d.ts +2 -2
- package/dist/components/blocks/timelines/shared/timeline.d.ts +6 -0
- package/dist/components/blocks/timelines/steps-card/index.d.ts +2 -1
- package/dist/components/blocks/timelines/steps-card/steps-card.d.ts +2 -2
- package/dist/components/blocks/timelines/steps-card/types.d.ts +13 -1
- package/dist/components/features/activities/activities.strings.d.ts +5 -3
- package/dist/components/features/activities/activities.types.d.ts +28 -11
- package/dist/components/features/activities/hooks/use-activity-feed.d.ts +6 -0
- package/dist/components/features/activities/index.d.ts +1 -1
- package/dist/components/features/activities/partials/activity-headline.d.ts +5 -0
- package/dist/components/features/activities/partials/activity-row.d.ts +12 -13
- package/dist/components/features/activities/partials/row-layers.d.ts +7 -0
- package/dist/components/features/activities/relative-time.d.ts +18 -0
- package/dist/components/features/ai-chat/ai-chat.d.ts +6 -2
- package/dist/components/features/ai-chat/ai-chat.strings.d.ts +41 -2
- package/dist/components/features/ai-chat/ai-chat.types.d.ts +6 -0
- package/dist/components/features/ai-chat/partials/ai-chat-attachments-strip.d.ts +5 -1
- package/dist/components/features/ai-chat/partials/ai-chat-prompt-input.d.ts +2 -2
- package/dist/components/features/ai-chat/partials/ai-chat-queue.d.ts +3 -1
- package/dist/components/features/ai-chat/partials/ai-chat-suggestions-row.d.ts +6 -1
- package/dist/components/features/appointment-calendar/appointment-calendar.d.ts +1 -1
- package/dist/components/features/appointment-calendar/appointment-calendar.types.d.ts +19 -5
- package/dist/components/features/appointment-calendar/index.d.ts +1 -1
- package/dist/components/features/appointment-calendar/partials/appointment-agenda.d.ts +18 -10
- package/dist/components/features/async-preview/async-preview.d.ts +2 -2
- package/dist/components/features/async-preview/async-preview.types.d.ts +30 -1
- package/dist/components/features/async-preview/preview-trigger-cell.d.ts +7 -2
- package/dist/components/features/combobox/async-resource-combobox.d.ts +2 -2
- package/dist/components/features/combobox/combobox.d.ts +12 -3
- package/dist/components/features/combobox/components/error-message.d.ts +3 -1
- package/dist/components/features/combobox/hooks/use-combobox-core.d.ts +2 -2
- package/dist/components/features/combobox/index.d.ts +1 -1
- package/dist/components/features/combobox/types.d.ts +47 -45
- package/dist/components/features/comments/comments.strings.d.ts +6 -5
- package/dist/components/features/comments/comments.types.d.ts +40 -26
- package/dist/components/features/comments/hooks/use-attachment-upload.d.ts +5 -1
- package/dist/components/features/comments/hooks/use-comments.d.ts +8 -1
- package/dist/components/features/data-view/data-view.strings.d.ts +9 -2
- package/dist/components/features/data-view/data-view.types.d.ts +15 -2
- package/dist/components/features/email-composer/email-html.d.ts +5 -0
- package/dist/components/features/email-composer/http.d.ts +2 -0
- package/dist/components/features/email-composer/strings.d.ts +17 -2
- package/dist/components/features/email-composer/types.d.ts +17 -2
- package/dist/components/features/email-composer/use-composer.d.ts +2 -78
- package/dist/components/features/event-calendar/event-calendar-day-cell.d.ts +1 -1
- package/dist/components/features/event-calendar/event-calendar-event-badge.d.ts +1 -1
- package/dist/components/features/event-calendar/event-calendar-header.d.ts +1 -1
- package/dist/components/features/event-calendar/event-calendar-legend.d.ts +2 -2
- package/dist/components/features/event-calendar/event-calendar.d.ts +1 -1
- package/dist/components/features/event-calendar/event-calendar.types.d.ts +126 -21
- package/dist/components/features/filters/facets/range-facet.d.ts +13 -8
- package/dist/components/features/filters/filter-context.d.ts +9 -0
- package/dist/components/features/filters/filters.strings.d.ts +36 -3
- package/dist/components/features/filters/filters.types.d.ts +72 -5
- package/dist/components/features/filters/hooks/use-filter-draft.d.ts +1 -0
- package/dist/components/features/filters/index.d.ts +2 -2
- package/dist/components/features/filters/operator-options.d.ts +25 -2
- package/dist/components/features/filters/partials/active-filter-item.d.ts +0 -13
- package/dist/components/features/filters/partials/async-options-status.d.ts +32 -0
- package/dist/components/features/filters/partials/filter-draft-footer.d.ts +11 -0
- package/dist/components/features/filters/partials/filter-operator-select.d.ts +4 -2
- package/dist/components/features/filters/partials/filter-pill.d.ts +5 -1
- package/dist/components/features/filters/partials/filter-tabs.d.ts +2 -1
- package/dist/components/features/filters/partials/regular-filter-content.d.ts +1 -1
- package/dist/components/features/filters/utils/filter-utils.d.ts +29 -4
- package/dist/components/features/global-search/global-search-dialog.d.ts +7 -1
- package/dist/components/features/global-search/global-search.d.ts +7 -1
- package/dist/components/features/global-search/global-search.strings.d.ts +19 -3
- package/dist/components/features/global-search/global-search.types.d.ts +30 -6
- package/dist/components/features/global-search/index.d.ts +1 -1
- package/dist/components/features/global-search/partials/global-search-idle-state.d.ts +6 -1
- package/dist/components/features/global-search/partials/global-search-input.d.ts +2 -0
- package/dist/components/features/kanban/index.d.ts +2 -2
- package/dist/components/features/kanban/kanban-context.d.ts +4 -0
- package/dist/components/features/kanban/kanban-keyboard.d.ts +7 -2
- package/dist/components/features/kanban/kanban.d.ts +10 -1
- package/dist/components/features/kanban/kanban.strings.d.ts +11 -2
- package/dist/components/features/kanban/kanban.types.d.ts +26 -0
- package/dist/components/features/map/map.d.ts +4 -0
- package/dist/components/features/map/place-autocomplete.d.ts +10 -1
- package/dist/components/features/media-library/hooks/use-media-library.d.ts +3 -1
- package/dist/components/features/media-library/media-library.d.ts +1 -1
- package/dist/components/features/media-library/media-library.strings.d.ts +33 -3
- package/dist/components/features/media-library/media-library.types.d.ts +47 -2
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
- package/dist/components/features/mentions/hooks/use-mentions-search.d.ts +7 -0
- package/dist/components/features/mentions/index.d.ts +1 -1
- package/dist/components/features/mentions/mentions.strings.d.ts +10 -2
- package/dist/components/features/mentions/partials/mention-chip.d.ts +1 -0
- package/dist/components/features/mentions/partials/mention-inline-suggestions.d.ts +8 -1
- package/dist/components/features/mentions/partials/mention-picker.d.ts +8 -1
- package/dist/components/features/mentions/partials/mention-search-error.d.ts +6 -0
- package/dist/components/features/mentions/utils/index.d.ts +0 -1
- package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
- package/dist/components/features/overlays/dialog.d.ts +1 -1
- package/dist/components/features/overlays/drawer.d.ts +1 -1
- package/dist/components/features/overlays/index.d.ts +2 -2
- package/dist/components/features/overlays/overlays.strings.d.ts +2 -1
- package/dist/components/features/overlays/overlays.types.d.ts +27 -10
- package/dist/components/features/products/components/index.d.ts +0 -10
- package/dist/components/features/products/components/product-contract-overview.d.ts +1 -1
- package/dist/components/features/products/components/product-details-card.d.ts +1 -1
- package/dist/components/features/products/components/product-operations-card.d.ts +1 -1
- package/dist/components/features/products/components/product-option-action-menu.d.ts +1 -1
- package/dist/components/features/products/components/product-options-summary.d.ts +1 -1
- package/dist/components/features/products/components/product-policies-card.d.ts +1 -1
- package/dist/components/features/products/components/product-quote-preview-card.d.ts +1 -1
- package/dist/components/features/products/components/product-readiness-card.d.ts +1 -1
- package/dist/components/features/products/components/product-structure-card.d.ts +1 -1
- package/dist/components/features/products/components/product-variant-action-menu.d.ts +1 -1
- package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
- package/dist/components/features/products/components/product-variants-table.d.ts +1 -1
- package/dist/components/features/products/partials/product-surface.d.ts +15 -0
- package/dist/components/features/products/products.strings.d.ts +8 -0
- package/dist/components/features/products/products.types.d.ts +25 -7
- package/dist/components/features/questionnaire/questionnaire.types.d.ts +6 -4
- package/dist/components/features/resource/index.d.ts +2 -3
- package/dist/components/features/resource/resource.d.ts +2 -10
- package/dist/components/features/resource/resource.types.d.ts +7 -149
- package/dist/components/features/resource-assignment/partials/assignment-surface.d.ts +15 -0
- package/dist/components/features/resource-assignment/resource-assignment.strings.d.ts +6 -1
- package/dist/components/features/resource-assignment/resource-assignment.types.d.ts +6 -0
- package/dist/components/features/rich-text-editor/partials/caret-helpers.d.ts +5 -7
- package/dist/components/features/rich-text-editor/partials/html-helpers.d.ts +2 -3
- package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +6 -2
- package/dist/components/features/rich-text-editor/partials/index.d.ts +2 -3
- package/dist/components/features/rich-text-editor/partials/rich-text-editor-tiptap.d.ts +0 -1
- package/dist/components/features/rich-text-editor/partials/rich-text-editor-toolbar.d.ts +2 -3
- package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +13 -1
- package/dist/components/features/schema-form/hooks/use-schema-form.d.ts +5 -0
- package/dist/components/features/schema-form/schema-form.d.ts +1 -1
- package/dist/components/features/schema-form/schema-form.types.d.ts +13 -5
- package/dist/components/features/suggestions/suggestions.strings.d.ts +14 -0
- package/dist/components/features/suggestions/suggestions.types.d.ts +12 -4
- package/dist/components/features/table/data-table.d.ts +1 -1
- package/dist/components/features/table/filter-bar.d.ts +1 -1
- package/dist/components/features/table/pagination.d.ts +1 -1
- package/dist/components/features/table/partials/cell-value.d.ts +1 -1
- package/dist/components/features/table/table-body.d.ts +1 -1
- package/dist/components/features/table/table-header.d.ts +1 -1
- package/dist/components/features/table/table-helpers.d.ts +31 -9
- package/dist/components/features/table/table-region.recipes.d.ts +11 -0
- package/dist/components/features/table/table-toolbar.d.ts +1 -1
- package/dist/components/features/table/table.strings.d.ts +1 -0
- package/dist/components/features/table/table.types.d.ts +74 -48
- package/dist/components/features/theme-tweaker/theme-provider-settings.d.ts +4 -0
- package/dist/components/features/theme-tweaker/theme-tweaker.strings.d.ts +10 -7
- package/dist/components/features/theme-tweaker/theme-tweaker.utils.d.ts +17 -0
- package/dist/components/layout/app-shell/app-shell.types.d.ts +46 -49
- package/dist/components/layout/app-shell/index.d.ts +2 -2
- package/dist/components/layout/app-shell/shell-regions.d.ts +9 -0
- package/dist/components/layout/app-shell/shell-skip-link.d.ts +9 -0
- package/dist/components/layout/app-shell/sidebar-inset-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/stacked-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
- package/dist/components/layout/auth/auth-shell.d.ts +1 -1
- package/dist/components/layout/auth/auth.types.d.ts +0 -5
- package/dist/components/layout/containers/inline-gutter-context.d.ts +7 -0
- package/dist/components/layout/containers/main-landmark-context.d.ts +6 -0
- package/dist/components/layout/header/header.types.d.ts +16 -6
- package/dist/components/layout/header/partials/header-global-search-trigger.d.ts +1 -1
- package/dist/components/layout/header/partials/header-notifications.d.ts +1 -1
- package/dist/components/layout/header/partials/header-search.d.ts +1 -1
- package/dist/components/layout/hooks/use-command-shortcut.d.ts +10 -1
- package/dist/components/layout/layout.types.d.ts +2 -2
- package/dist/components/layout/navigation/breadcrumb-progress/breadcrumb-progress.d.ts +1 -1
- package/dist/components/layout/navigation/breadcrumb-progress/types.d.ts +9 -0
- package/dist/components/layout/navigation/section-nav/section-nav.d.ts +8 -1
- package/dist/components/layout/page/index.d.ts +2 -3
- package/dist/components/layout/page/page.strings.d.ts +12 -0
- package/dist/components/layout/page/page.types.d.ts +7 -110
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/layout/settings/index.d.ts +1 -1
- package/dist/components/layout/settings/settings.d.ts +3 -5
- package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-grouped-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-navigation-footer.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/index.d.ts +1 -1
- package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +15 -7
- package/dist/components/layout/sidebar/sidebar.types.d.ts +10 -12
- package/dist/components/layout/sidebar/sidebar.utils.d.ts +4 -0
- package/dist/components/layout/workspace/workspace.strings.d.ts +2 -2
- package/dist/components/layout/workspace/workspace.types.d.ts +13 -7
- package/dist/components/primitives/date.d.ts +22 -3
- package/dist/components/primitives/file-size.d.ts +8 -2
- package/dist/components/primitives/index.d.ts +1 -1
- package/dist/components/primitives/initials.d.ts +3 -1
- package/dist/components/primitives/link.d.ts +8 -1
- package/dist/components/primitives/money.d.ts +1 -1
- package/dist/components/primitives/number.d.ts +2 -1
- package/dist/components/typography/heading.d.ts +9 -3
- package/dist/components/typography/index.d.ts +1 -1
- package/dist/components/typography/text-link.d.ts +10 -3
- package/dist/components/ui/badge.d.ts +2 -4
- package/dist/components/ui/breadcrumb.d.ts +2 -3
- package/dist/components/ui/button.d.ts +8 -2
- package/dist/components/ui/collapsible.d.ts +1 -4
- package/dist/components/ui/command.d.ts +20 -18
- package/dist/components/ui/dialog.d.ts +3 -9
- package/dist/components/ui/empty.d.ts +2 -2
- package/dist/components/ui/input-group.d.ts +3 -3
- package/dist/components/ui/item.d.ts +3 -3
- package/dist/components/ui/popover.d.ts +3 -7
- package/dist/components/ui/sheet.d.ts +4 -12
- package/dist/components/ui/sidebar-state.d.ts +6 -1
- package/dist/components/ui/sidebar.d.ts +7 -4
- package/dist/components/ui/tabs.d.ts +2 -2
- package/dist/components/ui/toggle-group.d.ts +3 -3
- package/dist/components/ui/toggle.d.ts +2 -2
- package/dist/components/ui/tooltip.d.ts +1 -3
- package/dist/{containers-CSdc32h9.js → containers-BdfLTP4w.js} +37 -32
- package/dist/containers-BdfLTP4w.js.map +1 -0
- package/dist/content-block-hooks-Z3iKjqd1.js +17 -0
- package/dist/content-block-hooks-Z3iKjqd1.js.map +1 -0
- package/dist/{copyable-3fdHfMR3.js → copyable-Bmr14W0d.js} +6 -6
- package/dist/{copyable-3fdHfMR3.js.map → copyable-Bmr14W0d.js.map} +1 -1
- package/dist/{data-display-Cmj-xZYl.js → data-display-CWe9SOYh.js} +264 -251
- package/dist/data-display-CWe9SOYh.js.map +1 -0
- package/dist/date-3qsCE1ID.js +209 -0
- package/dist/date-3qsCE1ID.js.map +1 -0
- package/dist/{date-picker-CyQlFYsP.js → date-picker-D1keJQIG.js} +129 -129
- package/dist/date-picker-D1keJQIG.js.map +1 -0
- package/dist/date-pickers-D8aJoeHc.js +185 -0
- package/dist/date-pickers-D8aJoeHc.js.map +1 -0
- package/dist/disclosure-panel-B0HFNZ9x.js.map +1 -1
- package/dist/{display-CT_N2a3w.js → display-VlmP1I0i.js} +23 -46
- package/dist/display-VlmP1I0i.js.map +1 -0
- package/dist/{dropdown-menu-C08iIugv.js → dropdown-menu-B8hjvbkS.js} +9 -9
- package/dist/{dropdown-menu-C08iIugv.js.map → dropdown-menu-B8hjvbkS.js.map} +1 -1
- package/dist/dropzone-CHBNK3de.js +116 -0
- package/dist/dropzone-CHBNK3de.js.map +1 -0
- package/dist/features/activities.js +682 -628
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +258 -226
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +436 -340
- package/dist/features/appointment-calendar.js.map +1 -1
- package/dist/features/async-preview.js +351 -265
- package/dist/features/async-preview.js.map +1 -1
- package/dist/features/combobox.js +2 -2
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +212 -151
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer/engine.js +1 -1
- package/dist/features/email-composer.js +344 -315
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +504 -355
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +2 -2
- package/dist/features/global-search.js +250 -206
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +269 -189
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map.js +385 -371
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +1571 -1199
- package/dist/features/media-library.js.map +1 -1
- package/dist/features/mentions.js +2 -2
- package/dist/features/overlays.js +2 -2
- package/dist/features/products.js +1780 -1691
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +165 -152
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +223 -191
- package/dist/features/resource-assignment.js.map +1 -1
- package/dist/features/resource.js +55 -220
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +3 -3
- package/dist/features/schema-form.js +280 -228
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +48 -39
- package/dist/features/suggestions.js.map +1 -1
- package/dist/features/table.js +2 -2
- package/dist/features/theme-tweaker.js +723 -633
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/feedback-DmqmXKLn.js +254 -0
- package/dist/feedback-DmqmXKLn.js.map +1 -0
- package/dist/{field-affordance-recipes-D6H7tVJi.js → field-affordance-recipes-DfbMadot.js} +13 -9
- package/dist/field-affordance-recipes-DfbMadot.js.map +1 -0
- package/dist/{field-state-recipes-7sza8QbC.js → field-state-recipes-EtCxpEy3.js} +6 -2
- package/dist/field-state-recipes-EtCxpEy3.js.map +1 -0
- package/dist/filters-BviMRMLS.js +2692 -0
- package/dist/filters-BviMRMLS.js.map +1 -0
- package/dist/{focus-recipes-B653VaLq.js → focus-recipes-DSkiUvUp.js} +3 -3
- package/dist/focus-recipes-DSkiUvUp.js.map +1 -0
- package/dist/{form-field-CAPdwdnZ.js → form-field-BdfCwSoQ.js} +5 -5
- package/dist/{form-field-CAPdwdnZ.js.map → form-field-BdfCwSoQ.js.map} +1 -1
- package/dist/{form-sizing-CgcrUbLU.js → form-sizing-DE_dZw32.js} +3 -3
- package/dist/{form-sizing-CgcrUbLU.js.map → form-sizing-DE_dZw32.js.map} +1 -1
- package/dist/{forms-B3W8CH7-.js → forms-B8DzJnBN.js} +35 -35
- package/dist/forms-B8DzJnBN.js.map +1 -0
- package/dist/forms-numeric-DOBswjKj.js +992 -0
- package/dist/forms-numeric-DOBswjKj.js.map +1 -0
- package/dist/{header-ZIIsRKxP.js → header-Cq3G0ZRP.js} +100 -95
- package/dist/header-Cq3G0ZRP.js.map +1 -0
- package/dist/{hooks-BitHSh-Y.js → hooks-DHfeSMAO.js} +34 -14
- package/dist/hooks-DHfeSMAO.js.map +1 -0
- package/dist/{http-D_6rOnzU.js → http-Cu-GPpss.js} +61 -35
- package/dist/http-Cu-GPpss.js.map +1 -0
- package/dist/{icon-badge-npxF1SLX.js → icon-badge-B0Kq7wom.js} +3 -3
- package/dist/{icon-badge-npxF1SLX.js.map → icon-badge-B0Kq7wom.js.map} +1 -1
- package/dist/index.js +6 -6
- package/dist/inline-gutter-context-CSqmrMFZ.js +11 -0
- package/dist/inline-gutter-context-CSqmrMFZ.js.map +1 -0
- package/dist/{input-DIREVYHs.js → input-2YrgTUrz.js} +3 -3
- package/dist/{input-DIREVYHs.js.map → input-2YrgTUrz.js.map} +1 -1
- package/dist/{input-7KAc7XQL.js → input-DfJyrjoR.js} +6 -6
- package/dist/{input-7KAc7XQL.js.map → input-DfJyrjoR.js.map} +1 -1
- package/dist/{interaction-recipes-4wZ2tvfb.js → interaction-recipes-DmuS1ase.js} +2 -2
- package/dist/{interaction-recipes-4wZ2tvfb.js.map → interaction-recipes-DmuS1ase.js.map} +1 -1
- package/dist/item-GJ9mvCcg.js +279 -0
- package/dist/item-GJ9mvCcg.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +2 -2
- package/dist/layout/settings.js +2 -2
- package/dist/layout/sidebar.js +3 -3
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +12 -12
- package/dist/{layout.types-E_GAApzO.js → layout.types-DbtnyAtd.js} +11 -8
- package/dist/layout.types-DbtnyAtd.js.map +1 -0
- package/dist/lib/anchored-positioning.d.ts +11 -0
- package/dist/lib/field-affordance-recipes.d.ts +10 -0
- package/dist/lib/field-state-recipes.d.ts +6 -0
- package/dist/lib/focus-recipes.d.ts +7 -0
- package/dist/lib/format.d.ts +25 -0
- package/dist/lib/money-format.d.ts +6 -0
- package/dist/lib/motion-recipes.d.ts +6 -0
- package/dist/lib/surface-recipes.d.ts +32 -2
- package/dist/lib/theme-scope.d.ts +17 -1
- package/dist/lib/token-merge.generated.d.ts +13 -19
- package/dist/lib/ui-provider/index.d.ts +1 -1
- package/dist/lib/ui-provider/types.d.ts +5 -0
- package/dist/lib/use-controllable-state.d.ts +16 -0
- package/dist/lib/use-copy-feedback.d.ts +15 -0
- package/dist/lib/utils.js +1 -1
- package/dist/lib/variant-props.d.ts +9 -0
- package/dist/main-landmark-context-BAsyqp2I.js +11 -0
- package/dist/main-landmark-context-BAsyqp2I.js.map +1 -0
- package/dist/mentions-zz0ewNIq.js +670 -0
- package/dist/mentions-zz0ewNIq.js.map +1 -0
- package/dist/{message-BJHnn43M.js → message-BiiVrRrm.js} +10 -7
- package/dist/{message-BJHnn43M.js.map → message-BiiVrRrm.js.map} +1 -1
- package/dist/{metadata-list-XkqZ_UXH.js → metadata-list-G85roWjS.js} +13 -12
- package/dist/metadata-list-G85roWjS.js.map +1 -0
- package/dist/{motion-recipes-DitYv6P2.js → motion-recipes-CUc_aHuG.js} +7 -4
- package/dist/motion-recipes-CUc_aHuG.js.map +1 -0
- package/dist/navigation-C0Be5C3i.js +304 -0
- package/dist/navigation-C0Be5C3i.js.map +1 -0
- package/dist/{navigation-Bt-v7rWP.js → navigation-CmqaQR_G.js} +99 -103
- package/dist/navigation-CmqaQR_G.js.map +1 -0
- package/dist/number-NFWKIoiK.js +340 -0
- package/dist/number-NFWKIoiK.js.map +1 -0
- package/dist/{overflow-tab-bar-BQCA2Zn2.js → overflow-tab-bar-DV7HE_3t.js} +8 -8
- package/dist/{overflow-tab-bar-BQCA2Zn2.js.map → overflow-tab-bar-DV7HE_3t.js.map} +1 -1
- package/dist/overlays-D-gAIfPF.js +1018 -0
- package/dist/overlays-D-gAIfPF.js.map +1 -0
- package/dist/page-D4pQhgSq.js +216 -0
- package/dist/page-D4pQhgSq.js.map +1 -0
- package/dist/{page-header-commands-DIKspJfx.js → page-header-commands-elelNOfd.js} +29 -29
- package/dist/{page-header-commands-DIKspJfx.js.map → page-header-commands-elelNOfd.js.map} +1 -1
- package/dist/{pagination-Br8TdV9A.js → pagination-BuSWw1US.js} +22 -23
- package/dist/pagination-BuSWw1US.js.map +1 -0
- package/dist/{popover-k8TdUcAt.js → popover-BpMxbqEK.js} +73 -69
- package/dist/popover-BpMxbqEK.js.map +1 -0
- package/dist/{popover-menu-yn-o0kyA.js → popover-menu-CO-_iiuz.js} +7 -7
- package/dist/{popover-menu-yn-o0kyA.js.map → popover-menu-CO-_iiuz.js.map} +1 -1
- package/dist/{popover.recipes-DJ0AkUan.js → popover.recipes-BqkdvlZn.js} +3 -4
- package/dist/{popover.recipes-DJ0AkUan.js.map → popover.recipes-BqkdvlZn.js.map} +1 -1
- package/dist/{portal-recipes-DyUXqUtD.js → portal-recipes-BPeS4rGB.js} +2 -2
- package/dist/{portal-recipes-DyUXqUtD.js.map → portal-recipes-BPeS4rGB.js.map} +1 -1
- package/dist/primitives-BlC1lXBr.js +447 -0
- package/dist/primitives-BlC1lXBr.js.map +1 -0
- package/dist/primitives.js +4 -4
- package/dist/{progress-DZFXXzPs.js → progress-RARK8AjB.js} +5 -5
- package/dist/{progress-DZFXXzPs.js.map → progress-RARK8AjB.js.map} +1 -1
- package/dist/receipt-CUf2Vegp.js +114 -0
- package/dist/receipt-CUf2Vegp.js.map +1 -0
- package/dist/{rich-text-BnTzZjIo.js → rich-text-Cypm9__d.js} +7 -8
- package/dist/{rich-text-BnTzZjIo.js.map → rich-text-Cypm9__d.js.map} +1 -1
- package/dist/rich-text-editor-Z6cQepsA.js +919 -0
- package/dist/rich-text-editor-Z6cQepsA.js.map +1 -0
- package/dist/rich-text-editor-toolbar-DYbRJARB.js +100 -0
- package/dist/rich-text-editor-toolbar-DYbRJARB.js.map +1 -0
- package/dist/rich-text-tree-DdKHIJx4.js +154 -0
- package/dist/rich-text-tree-DdKHIJx4.js.map +1 -0
- package/dist/safe-image-src-C6kQSMBZ.js +17 -0
- package/dist/safe-image-src-C6kQSMBZ.js.map +1 -0
- package/dist/{scroll-area-Bj6CRUif.js → scroll-area-B9HKbji0.js} +3 -3
- package/dist/{scroll-area-Bj6CRUif.js.map → scroll-area-B9HKbji0.js.map} +1 -1
- package/dist/{separator-DM6gs2vu.js → separator-DaDe26sf.js} +3 -3
- package/dist/separator-DaDe26sf.js.map +1 -0
- package/dist/{separator-B9ewiCGO.js → separator-KGsNXt2J.js} +2 -2
- package/dist/{separator-B9ewiCGO.js.map → separator-KGsNXt2J.js.map} +1 -1
- package/dist/services/actions/action-adapters.d.ts +5 -2
- package/dist/services/actions/index.d.ts +1 -1
- package/dist/services/actions.js +2 -2
- package/dist/services/actions.js.map +1 -1
- package/dist/settings-D5j_RJvT.js +160 -0
- package/dist/settings-D5j_RJvT.js.map +1 -0
- package/dist/sheet-B6j_BE9O.js +241 -0
- package/dist/sheet-B6j_BE9O.js.map +1 -0
- package/dist/{sidebar-CmD6a-HK.js → sidebar-C-iQ_TJP.js} +377 -351
- package/dist/sidebar-C-iQ_TJP.js.map +1 -0
- package/dist/sidebar-D5VO2W8S.js +715 -0
- package/dist/sidebar-D5VO2W8S.js.map +1 -0
- package/dist/{skeleton-DDgdhmu9.js → skeleton-Cab_KgVo.js} +12 -12
- package/dist/skeleton-Cab_KgVo.js.map +1 -0
- package/dist/{smart-card-B6vLxqa_.js → smart-card-C59z6KFO.js} +217 -210
- package/dist/smart-card-C59z6KFO.js.map +1 -0
- package/dist/{structure-DZJ2wbAU.js → structure-DElaQwwN.js} +2 -2
- package/dist/{structure-DZJ2wbAU.js.map → structure-DElaQwwN.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{surface-recipes-C8mNycaY.js → surface-recipes-DV6rrOFq.js} +10 -2
- package/dist/surface-recipes-DV6rrOFq.js.map +1 -0
- package/dist/{table-CXSPHH25.js → table-CSRUgpdK.js} +62 -61
- package/dist/table-CSRUgpdK.js.map +1 -0
- package/dist/table-DdXDBsR_.js +1657 -0
- package/dist/table-DdXDBsR_.js.map +1 -0
- package/dist/{tabs-C4Kr_hCr.js → tabs-WnHfV2pM.js} +27 -27
- package/dist/tabs-WnHfV2pM.js.map +1 -0
- package/dist/{text-inputs-jdkS3ReG.js → text-inputs-ljyBYaCd.js} +112 -112
- package/dist/text-inputs-ljyBYaCd.js.map +1 -0
- package/dist/theme.css +21 -5
- package/dist/timelines-mOmS9Eh3.js +479 -0
- package/dist/timelines-mOmS9Eh3.js.map +1 -0
- package/dist/tooltip-yjX-Uv-p.js +112 -0
- package/dist/tooltip-yjX-Uv-p.js.map +1 -0
- package/dist/{tree-CeYVzdFE.js → tree-YpkxUG2Z.js} +80 -72
- package/dist/tree-YpkxUG2Z.js.map +1 -0
- package/dist/typography/rich-text.js +1 -1
- package/dist/{typography-C7-YMW1S.js → typography-C0dELqYV.js} +46 -40
- package/dist/typography-C0dELqYV.js.map +1 -0
- package/dist/typography.js +1 -1
- package/dist/{ui-provider-C-74NVLc.js → ui-provider-Bu1S-o96.js} +4 -3
- package/dist/ui-provider-Bu1S-o96.js.map +1 -0
- package/dist/ui-provider.js +2 -2
- package/dist/{upload-Hdm5gObf.js → upload-DMuMYJFT.js} +276 -268
- package/dist/upload-DMuMYJFT.js.map +1 -0
- package/dist/{usage-card-9s8hLDfn.js → usage-card-DDPki5P1.js} +57 -54
- package/dist/usage-card-DDPki5P1.js.map +1 -0
- package/dist/use-controllable-state-BlP8SyBI.js +13 -0
- package/dist/use-controllable-state-BlP8SyBI.js.map +1 -0
- package/dist/use-copy-feedback-CzcaqlLf.js +28 -0
- package/dist/use-copy-feedback-CzcaqlLf.js.map +1 -0
- package/dist/use-metric-format-options-Dk4rC1NO.js +251 -0
- package/dist/use-metric-format-options-Dk4rC1NO.js.map +1 -0
- package/dist/{utils-DhuoqFy4.js → utils-BVbAG2J6.js} +98 -76
- package/dist/utils-BVbAG2J6.js.map +1 -0
- package/dist/value-inputs-h5MwjGCo.js +982 -0
- package/dist/value-inputs-h5MwjGCo.js.map +1 -0
- package/dist/value-typography-D15uwfj-.js +154 -0
- package/dist/value-typography-D15uwfj-.js.map +1 -0
- package/dist/workspace-DIryPqBt.js +400 -0
- package/dist/workspace-DIryPqBt.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +7 -0
- package/docs/consumer-skill/agents/themelia-ui-designer.md +11 -2
- package/docs/consumer-skill/examples/analytics.tsx +1 -1
- package/docs/consumer-skill/examples/app-layout.tsx +3 -3
- package/docs/consumer-skill/examples/commerce-lines.tsx +7 -5
- package/docs/consumer-skill/examples/detail.tsx +3 -2
- package/docs/consumer-skill/examples/email-composer.tsx +1 -1
- package/docs/consumer-skill/examples/index-table.tsx +2 -2
- package/docs/consumer-skill/examples/scoped-directory.tsx +7 -6
- package/docs/consumer-skill/references/agents-md.md +20 -16
- package/docs/consumer-skill/references/analytics.md +20 -6
- package/docs/consumer-skill/references/building-views.md +213 -0
- package/docs/consumer-skill/references/catalogue.md +617 -0
- package/docs/consumer-skill/references/component-contracts.json +10202 -18084
- package/docs/consumer-skill/references/composition.md +21 -17
- package/docs/consumer-skill/references/discovery.md +8 -5
- package/docs/consumer-skill/references/installation.md +10 -4
- package/docs/consumer-skill/references/integration.md +5 -5
- package/docs/consumer-skill/references/product-composition.md +2 -2
- package/docs/consumer-skill/references/public-api.json +580 -633
- package/docs/consumer-skill/references/review.md +6 -4
- package/docs/consumer-skill/references/screen-archetypes.md +2 -2
- package/docs/consumer-skill/references/theming.md +1 -1
- package/docs/consumer-skill/references/tokens.json +4 -4
- package/docs/consumer-skill/references/workflows.md +7 -7
- package/docs/consumer-skill/scripts/composition-policy.mjs +40 -20
- package/docs/consumer-skill/scripts/composition.mjs +4 -1
- package/docs/consumer-skill/scripts/discovery.mjs +3 -1
- package/docs/consumer-skill/scripts/setup-skills.mjs +31 -4
- package/docs/consumer-skills/themelia-components/SKILL.md +8 -4
- package/docs/consumer-skills/themelia-composition/SKILL.md +7 -3
- package/docs/consumer-skills/themelia-design/SKILL.md +7 -1
- package/docs/consumer-skills/themelia-tokenization/SKILL.md +1 -1
- package/package.json +9 -12
- package/templates/README.md +3 -2
- package/templates/admin-shell-template.tsx +49 -9
- package/templates/analytics-operations-template.tsx +20 -24
- package/templates/customers-template.tsx +12 -9
- package/templates/index.ts +2 -8
- package/templates/orders-template.tsx +28 -24
- package/templates/products-template.tsx +14 -4
- package/templates/user-permissions-template.tsx +11 -14
- package/dist/accordion-0tQUZ20r.js.map +0 -1
- package/dist/action-menu-C0gjzLyE.js +0 -284
- package/dist/action-menu-C0gjzLyE.js.map +0 -1
- package/dist/ai-artifact-CGGpQryR.js +0 -1200
- package/dist/ai-artifact-CGGpQryR.js.map +0 -1
- package/dist/anchored-positioning-DPnKTvNs.js +0 -6
- package/dist/anchored-positioning-DPnKTvNs.js.map +0 -1
- package/dist/app-shell-EHuuRDGy.js +0 -321
- package/dist/app-shell-EHuuRDGy.js.map +0 -1
- package/dist/auth-B0girIk_.js.map +0 -1
- package/dist/badge-wWauMgAt.js.map +0 -1
- package/dist/base/sheet.js +0 -3
- package/dist/breadcrumbs-Bp9Ke7kd.js.map +0 -1
- package/dist/button-ChBovTx0.js.map +0 -1
- package/dist/buttons-DeW0bQeK.js.map +0 -1
- package/dist/cascader-CrAl9zD5.js +0 -439
- package/dist/cascader-CrAl9zD5.js.map +0 -1
- package/dist/choice-inputs-DHGtx0QV.js.map +0 -1
- package/dist/code-block-BSJyq9e-.js.map +0 -1
- package/dist/collapsible-BzJ91LUG.js +0 -81
- package/dist/collapsible-BzJ91LUG.js.map +0 -1
- package/dist/combobox-Bcvu5J8O.js +0 -363
- package/dist/combobox-Bcvu5J8O.js.map +0 -1
- package/dist/combobox-C2JiSQPc.js +0 -915
- package/dist/combobox-C2JiSQPc.js.map +0 -1
- package/dist/command-9e52NPgK.js +0 -425
- package/dist/command-9e52NPgK.js.map +0 -1
- package/dist/comments-BsgErEqd.js +0 -1174
- package/dist/comments-BsgErEqd.js.map +0 -1
- package/dist/components/base/buttons/tooltip-button.d.ts +0 -7
- package/dist/components/base/display/content-block.d.ts +0 -75
- package/dist/components/base/display/content-block.strings.d.ts +0 -5
- package/dist/components/base/sheet/index.d.ts +0 -29
- package/dist/components/blocks/ai/use-copy-feedback.d.ts +0 -6
- package/dist/components/blocks/data-display/metadata/index.d.ts +0 -30
- package/dist/components/features/mentions/utils/split-html-by-mentions.d.ts +0 -10
- package/dist/components/features/resource/resource.strings.d.ts +0 -12
- package/dist/components/features/rich-text-editor/partials/rich-text-editor-fallback.d.ts +0 -8
- package/dist/components/features/sync/index.d.ts +0 -26
- package/dist/components/features/sync/sync-range-dialog-form.d.ts +0 -5
- package/dist/components/features/sync/sync.strings.d.ts +0 -18
- package/dist/components/features/sync/sync.types.d.ts +0 -44
- package/dist/components/layout/page/partials/page-actions.d.ts +0 -3
- package/dist/components/ui/slot.d.ts +0 -6
- package/dist/containers-CSdc32h9.js.map +0 -1
- package/dist/data-display-Cmj-xZYl.js.map +0 -1
- package/dist/date-Br0FicVv.js +0 -144
- package/dist/date-Br0FicVv.js.map +0 -1
- package/dist/date-picker-CyQlFYsP.js.map +0 -1
- package/dist/date-pickers-tj2MXmXd.js +0 -185
- package/dist/date-pickers-tj2MXmXd.js.map +0 -1
- package/dist/display-CT_N2a3w.js.map +0 -1
- package/dist/features/sync.js +0 -142
- package/dist/features/sync.js.map +0 -1
- package/dist/feedback-Dzo1xtAU.js +0 -246
- package/dist/feedback-Dzo1xtAU.js.map +0 -1
- package/dist/field-affordance-recipes-D6H7tVJi.js.map +0 -1
- package/dist/field-state-recipes-7sza8QbC.js.map +0 -1
- package/dist/filters-Dl80yYtN.js +0 -2415
- package/dist/filters-Dl80yYtN.js.map +0 -1
- package/dist/focus-recipes-B653VaLq.js.map +0 -1
- package/dist/forms-B3W8CH7-.js.map +0 -1
- package/dist/forms-numeric-CwjQJe-O.js +0 -991
- package/dist/forms-numeric-CwjQJe-O.js.map +0 -1
- package/dist/header-ZIIsRKxP.js.map +0 -1
- package/dist/hooks-BitHSh-Y.js.map +0 -1
- package/dist/http-D_6rOnzU.js.map +0 -1
- package/dist/item-FfWnaYST.js +0 -278
- package/dist/item-FfWnaYST.js.map +0 -1
- package/dist/layout.types-E_GAApzO.js.map +0 -1
- package/dist/media-gallery-C81DAnKI.js +0 -203
- package/dist/media-gallery-C81DAnKI.js.map +0 -1
- package/dist/mentions-qOnedSt4.js +0 -639
- package/dist/mentions-qOnedSt4.js.map +0 -1
- package/dist/metadata-list-XkqZ_UXH.js.map +0 -1
- package/dist/motion-recipes-DitYv6P2.js.map +0 -1
- package/dist/navigation-BgtPJAhi.js +0 -288
- package/dist/navigation-BgtPJAhi.js.map +0 -1
- package/dist/navigation-Bt-v7rWP.js.map +0 -1
- package/dist/number-CYqBcrSj.js +0 -346
- package/dist/number-CYqBcrSj.js.map +0 -1
- package/dist/overlays-CC8zI3Du.js +0 -1017
- package/dist/overlays-CC8zI3Du.js.map +0 -1
- package/dist/page-BoQ1VaFJ.js +0 -331
- package/dist/page-BoQ1VaFJ.js.map +0 -1
- package/dist/pagination-Br8TdV9A.js.map +0 -1
- package/dist/popover-k8TdUcAt.js.map +0 -1
- package/dist/primitives-BkkQjYl7.js +0 -385
- package/dist/primitives-BkkQjYl7.js.map +0 -1
- package/dist/receipt-C7LhOg7Q.js +0 -116
- package/dist/receipt-C7LhOg7Q.js.map +0 -1
- package/dist/rich-text-editor-CAurDwT5.js +0 -1273
- package/dist/rich-text-editor-CAurDwT5.js.map +0 -1
- package/dist/rich-text-editor-toolbar-DbXig7Jk.js +0 -99
- package/dist/rich-text-editor-toolbar-DbXig7Jk.js.map +0 -1
- package/dist/rich-text-tree-BqyQ_7-R.js +0 -66
- package/dist/rich-text-tree-BqyQ_7-R.js.map +0 -1
- package/dist/sanitize-html-BWkH4dLM.js +0 -105
- package/dist/sanitize-html-BWkH4dLM.js.map +0 -1
- package/dist/separator-DM6gs2vu.js.map +0 -1
- package/dist/settings-DZPHgpx4.js +0 -155
- package/dist/settings-DZPHgpx4.js.map +0 -1
- package/dist/sheet-C4DHsgLk.js +0 -250
- package/dist/sheet-C4DHsgLk.js.map +0 -1
- package/dist/sidebar-C8BnDwTH.js +0 -709
- package/dist/sidebar-C8BnDwTH.js.map +0 -1
- package/dist/sidebar-CmD6a-HK.js.map +0 -1
- package/dist/skeleton-DDgdhmu9.js.map +0 -1
- package/dist/slot-CLF9kLrS.js +0 -16
- package/dist/slot-CLF9kLrS.js.map +0 -1
- package/dist/smart-card-B6vLxqa_.js.map +0 -1
- package/dist/surface-recipes-C8mNycaY.js.map +0 -1
- package/dist/table-CBonSdTp.js +0 -1584
- package/dist/table-CBonSdTp.js.map +0 -1
- package/dist/table-CXSPHH25.js.map +0 -1
- package/dist/tabs-C4Kr_hCr.js.map +0 -1
- package/dist/text-inputs-jdkS3ReG.js.map +0 -1
- package/dist/timelines-CoPwdJP0.js +0 -458
- package/dist/timelines-CoPwdJP0.js.map +0 -1
- package/dist/tooltip-31NwIpTo.js +0 -113
- package/dist/tooltip-31NwIpTo.js.map +0 -1
- package/dist/tree-CeYVzdFE.js.map +0 -1
- package/dist/typography-C7-YMW1S.js.map +0 -1
- package/dist/ui-provider-C-74NVLc.js.map +0 -1
- package/dist/upload-Hdm5gObf.js.map +0 -1
- package/dist/upload-queue-D0sYPuqo.js +0 -409
- package/dist/upload-queue-D0sYPuqo.js.map +0 -1
- package/dist/usage-card-9s8hLDfn.js.map +0 -1
- package/dist/utils-DhuoqFy4.js.map +0 -1
- package/dist/value-inputs-D3aPgq9H.js +0 -980
- package/dist/value-inputs-D3aPgq9H.js.map +0 -1
- package/dist/value-typography-uSzzG9Gf.js +0 -122
- package/dist/value-typography-uSzzG9Gf.js.map +0 -1
- package/dist/workspace-CC8Vchiu.js +0 -411
- package/dist/workspace-CC8Vchiu.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-assignment.js","names":["_Fragment","ContentComponent","Text","DisplayLabel","Stack","CardPrimaryAction","ActionDialog","ContentBlock","EmptyState","Fragment$1","defaultSharedResourceCardStrings","useSharedResourceCard","internalOpen","setInternalOpen","useState","defaultOpen","isConfirming","setIsConfirming","internalSelectedSuggestion","setInternalSelectedSuggestion","defaultValue","isOpenControlled","open","isValueControlled","value","isSelectorOpen","selectedSuggestion","hasResource","resource","initializedOpenCycleRef","useRef","hasOpenedRef","hasExplicitDefaultValueRef","setSelectorOpen","useCallback","nextOpen","onOpenChange","setSelectedSuggestion","selection","onValueChange","openSelector","isFirstOpen","initial","mapInitialSelected","onDialogOpen","closeSelector","onDialogClose","canConfirmSelection","useMemo","isConfirmDisabled","confirmSelection","onConfirmSelection","error","onError","DefaultDialogSummary","useStrings","strings","selected","context","label","getSelectionLabel","DefaultResourceContent","_context","s","DefaultEmptyContent","PackageOpen","Button","DefaultDialogContent","componentProps","selectorProps","SelectorComponent","SharedResourceCard","stringsProp","selectorContext","selector","canUseSelector","selectorActionLabel","visibleBaseActionCount","actions","action","usesDefaultEmptyAction","renderEmptyContent","EmptyContentComponent","shouldInlineSelectorAction","resolvedActions","baseActions","resolvedHeaderAction","headerAction","resourceContent","renderResourceContent","ResourceContentComponent","sections","visibleSections","section","sectionsClassName","SectionComponent","emptyContent","DialogContentComponent","DialogSummaryComponent","dialogContentProps","cardBody","shouldRenderDialog","hasCustomViewAction","viewAction","viewActionContent","viewLink","Eye","viewActionNode","cn","dialogNode","className"],"sources":["../../src/components/features/resource-assignment/resource-assignment.strings.ts","../../src/components/features/resource-assignment/hooks/use-shared-resource-card.ts","../../src/components/features/resource-assignment/partials/default-shared-resource-partials.tsx","../../src/components/features/resource-assignment/resource-assignment.tsx"],"sourcesContent":["/**\n * Default user-facing strings for the resource-assignment feature.\n *\n * Consumers wire backend i18n at the call site:\n *\n * <SharedResourceCard\n * strings={{ noResourceSelected: t('resourceAssignment.empty') }}\n * …\n * />\n */\n\nexport interface SharedResourceCardStrings {\n\tcurrentlySelected: string;\n\tnoResourceContent: string;\n\tnoResourceSelected: string;\n\tchangeAction: string;\n}\n\nexport const defaultSharedResourceCardStrings: SharedResourceCardStrings = {\n\tcurrentlySelected: 'Currently selected:',\n\tnoResourceContent: 'No resource content configured.',\n\tnoResourceSelected: 'No resource selected.',\n\tchangeAction: 'Change',\n};\n","import { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport type { SharedResourceCardContext } from '../resource-assignment.types';\n\nexport type UseSharedResourceCardOptions<TResource, TSuggestion> = {\n\t/** Persisted assignment. `null` is the only empty state. */\n\tresource: TResource | null;\n\t/** Map persisted data when neither `value` nor first-open `defaultValue` supplies selection. */\n\tmapInitialSelected: (resource: TResource | null) => TSuggestion | null;\n\t/** Persist a confirmed suggestion. Returned promises are awaited. */\n\tonConfirmSelection: (selection: TSuggestion) => void | Promise<void>;\n\t/** Disable confirmation for a pending candidate. */\n\tisConfirmDisabled?: (selection: TSuggestion | null) => boolean;\n\t/** Called once per closed-to-open cycle, including an initially open selector. */\n\tonDialogOpen?: (selection: TSuggestion | null) => void;\n\t/** Called after selection mode closes or confirmation succeeds. */\n\tonDialogClose?: () => void;\n\t/** Called when `onConfirmSelection` throws. Library DEV-logs the error;\n\t * consumer wires telemetry. */\n\tonError?: (error: unknown, selection: TSuggestion) => void;\n\t/** Controlled selector visibility. An initial `true` value initializes selection. */\n\topen?: boolean;\n\t/** Initial selector visibility; `true` initializes selection after mount. */\n\tdefaultOpen?: boolean;\n\t/** Controlled visibility callback and uncontrolled visibility observer. */\n\tonOpenChange?: (open: boolean) => void;\n\t/** Controlled pending suggestion; authoritative over mapping on every open. */\n\tvalue?: TSuggestion | null;\n\t/** Initial uncontrolled suggestion; authoritative over mapping on the first open. */\n\tdefaultValue?: TSuggestion | null;\n\t/** Controlled selection callback and uncontrolled selection observer. */\n\tonValueChange?: (selection: TSuggestion | null) => void;\n};\n\nexport type UseSharedResourceCardResult<TResource, TSuggestion> =\n\tSharedResourceCardContext<TResource, TSuggestion>;\n\nexport function useSharedResourceCard<TResource, TSuggestion>({\n\tresource,\n\tmapInitialSelected,\n\tonConfirmSelection,\n\tisConfirmDisabled,\n\tonDialogOpen,\n\tonDialogClose,\n\tonError,\n\topen,\n\tdefaultOpen = false,\n\tonOpenChange,\n\tvalue,\n\tdefaultValue,\n\tonValueChange,\n}: UseSharedResourceCardOptions<TResource, TSuggestion>): UseSharedResourceCardResult<TResource, TSuggestion> {\n\tconst [internalOpen, setInternalOpen] = useState(defaultOpen);\n\tconst [isConfirming, setIsConfirming] = useState(false);\n\tconst [internalSelectedSuggestion, setInternalSelectedSuggestion] =\n\t\tuseState<TSuggestion | null>(defaultValue ?? null);\n\tconst isOpenControlled = open !== undefined;\n\tconst isValueControlled = value !== undefined;\n\tconst isSelectorOpen = isOpenControlled ? open : internalOpen;\n\tconst selectedSuggestion = isValueControlled ? value : internalSelectedSuggestion;\n\tconst hasResource = resource !== null;\n\tconst initializedOpenCycleRef = useRef(false);\n\tconst hasOpenedRef = useRef(false);\n\tconst hasExplicitDefaultValueRef = useRef(defaultValue !== undefined);\n\n\tconst setSelectorOpen = useCallback((nextOpen: boolean) => {\n\t\tif (!isOpenControlled) setInternalOpen(nextOpen);\n\t\tonOpenChange?.(nextOpen);\n\t}, [isOpenControlled, onOpenChange]);\n\n\tconst setSelectedSuggestion = useCallback((selection: TSuggestion | null) => {\n\t\tif (!isValueControlled) setInternalSelectedSuggestion(selection);\n\t\tonValueChange?.(selection);\n\t}, [isValueControlled, onValueChange]);\n\n\tconst openSelector = useCallback(() => {\n\t\tsetSelectorOpen(true);\n\t}, [setSelectorOpen]);\n\n\tuseEffect(() => {\n\t\tif (!isSelectorOpen) {\n\t\t\tinitializedOpenCycleRef.current = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif (initializedOpenCycleRef.current) {\n\t\t\treturn;\n\t\t}\n\n\t\tinitializedOpenCycleRef.current = true;\n\t\tconst isFirstOpen = !hasOpenedRef.current;\n\t\tlet initial: TSuggestion | null;\n\n\t\tif (isValueControlled) {\n\t\t\tinitial = value;\n\t\t} else if (isFirstOpen && hasExplicitDefaultValueRef.current) {\n\t\t\tinitial = internalSelectedSuggestion;\n\t\t} else {\n\t\t\tinitial = mapInitialSelected(resource);\n\t\t\tsetSelectedSuggestion(initial);\n\t\t}\n\n\t\thasOpenedRef.current = true;\n\t\tonDialogOpen?.(initial);\n\t}, [\n\t\tinternalSelectedSuggestion,\n\t\tisSelectorOpen,\n\t\tisValueControlled,\n\t\tmapInitialSelected,\n\t\tonDialogOpen,\n\t\tresource,\n\t\tsetSelectedSuggestion,\n\t\tvalue,\n\t]);\n\n\tconst closeSelector = useCallback(() => {\n\t\tif (isConfirming) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetSelectorOpen(false);\n\t\tsetSelectedSuggestion(null);\n\t\tonDialogClose?.();\n\t}, [isConfirming, onDialogClose, setSelectedSuggestion, setSelectorOpen]);\n\n\tconst canConfirmSelection = useMemo(() => {\n\t\tif (selectedSuggestion === null) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!isConfirmDisabled) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn !isConfirmDisabled(selectedSuggestion);\n\t}, [isConfirmDisabled, selectedSuggestion]);\n\n\tconst confirmSelection = useCallback(async () => {\n\t\tif (\n\t\t\tisConfirming ||\n\t\t\t!canConfirmSelection ||\n\t\t\tselectedSuggestion === null\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsConfirming(true);\n\n\t\ttry {\n\t\t\tawait onConfirmSelection(selectedSuggestion);\n\t\t\tsetSelectorOpen(false);\n\t\t\tsetSelectedSuggestion(null);\n\t\t\tonDialogClose?.();\n\t\t} catch (error) {\n\t\t\tif (import.meta.env?.DEV) {\n\t\t\t\tconsole.warn('SharedResourceCard confirmation failed:', error);\n\t\t\t}\n\t\t\tonError?.(error, selectedSuggestion);\n\t\t} finally {\n\t\t\tsetIsConfirming(false);\n\t\t}\n\t}, [\n\t\tcanConfirmSelection,\n\t\tisConfirming,\n\t\tonConfirmSelection,\n\t\tonDialogClose,\n\t\tonError,\n\t\tselectedSuggestion,\n\t\tsetSelectedSuggestion,\n\t\tsetSelectorOpen,\n\t]);\n\n\treturn useMemo(\n\t\t() => ({\n\t\t\tresource,\n\t\t\thasResource,\n\t\t\tisSelectorOpen,\n\t\t\tisConfirming,\n\t\t\tselectedSuggestion,\n\t\t\tsetSelectedSuggestion,\n\t\t\topenSelector,\n\t\t\tcloseSelector,\n\t\t\tconfirmSelection,\n\t\t\tcanConfirmSelection,\n\t\t}),\n\t\t[\n\t\t\tcanConfirmSelection,\n\t\t\tcloseSelector,\n\t\t\tconfirmSelection,\n\t\t\thasResource,\n\t\t\tisConfirming,\n\t\t\tisSelectorOpen,\n\t\t\topenSelector,\n\t\t\tresource,\n\t\t\tselectedSuggestion,\n\t\t\tsetSelectedSuggestion,\n\t\t],\n\t);\n}\n","import { Stack } from '../../../base/structure';\n/**\n * Default partial implementations for `<SharedResourceCard>`.\n *\n * Consumers can override any of these by passing\n * `ResourceContentComponent` / `EmptyContentComponent` /\n * `selector.DialogContentComponent` / `selector.DialogSummaryComponent`\n * to `<SharedResourceCard>`. Strings flow through the `strings` prop\n * deep-merged over `defaultSharedResourceCardStrings`.\n */\nimport { Button } from '../../../base/buttons';\nimport { EmptyState } from '../../../blocks/data-display';\nimport { DisplayLabel, Text } from '../../../typography';\nimport { useStrings, type StringsProp } from '../../../../lib/strings';\nimport { PackageOpen } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport { defaultSharedResourceCardStrings, type SharedResourceCardStrings } from '../resource-assignment.strings';\nimport type {\n\tSharedResourceCardContentProps,\n\tSharedResourceCardDialogContentProps,\n\tSharedResourceCardDialogSummaryProps,\n\tSharedResourceSelectorComponentProps,\n} from '../resource-assignment.types';\n\ntype DefaultStrings = StringsProp<SharedResourceCardStrings>;\n\nexport function DefaultDialogSummary<TResource, TSuggestion>({\n\tcontext,\n\tstrings,\n\tgetSelectionLabel,\n}: SharedResourceCardDialogSummaryProps<TResource, TSuggestion> & {\n\t/** Overrides this surface's own copy. */\n\tstrings?: DefaultStrings;\n\t/** Builds the summary shown for the current selection. */\n\tgetSelectionLabel?: (selection: TSuggestion) => ReactNode;\n}) {\n\tconst s = useStrings(defaultSharedResourceCardStrings, strings);\n\tconst selected = context.selectedSuggestion;\n\n\tif (selected === null) {\n\t\treturn null;\n\t}\n\n\tconst label = getSelectionLabel?.(selected) ?? (\n\t\ttypeof selected === 'object' &&\n\t\tselected !== null &&\n\t\t'label' in selected &&\n\t\ttypeof selected.label === 'string'\n\t\t\t? selected.label\n\t\t\t: null\n\t);\n\n\tif (label === null || label === undefined || label === '') {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Stack gap=\"dense\" className=\"default-dialog-summary--component shared-resource-card--dialog-summary\">\n\t\t\t<DisplayLabel>{s.currentlySelected}</DisplayLabel>\n\t\t\t<Text type=\"inherit\">{label}</Text>\n\t\t</Stack>\n\t);\n}\nDefaultDialogSummary.displayName = 'DefaultDialogSummary';\n\nexport function DefaultResourceContent<TResource, TSuggestion>({\n\tcontext: _context,\n\tstrings,\n}: SharedResourceCardContentProps<TResource, TSuggestion> & { strings?: DefaultStrings }) {\n\tconst s = useStrings(defaultSharedResourceCardStrings, strings);\n\treturn <Text type=\"secondary\" className=\"default-resource-content--component\">{s.noResourceContent}</Text>;\n}\nDefaultResourceContent.displayName = 'DefaultResourceContent';\n\nexport function DefaultEmptyContent<TResource, TSuggestion>({\n\tcontext,\n\tstrings,\n}: SharedResourceCardContentProps<TResource, TSuggestion> & { strings?: DefaultStrings }) {\n\tconst s = useStrings(defaultSharedResourceCardStrings, strings);\n\treturn (\n\t\t<EmptyState\n\t\t\ttitle={s.noResourceSelected}\n\t\t\tdescription={false}\n\t\t\tmedia={<PackageOpen className=\"size-icon\" />}\n\t\t\tmediaVariant=\"icon-soft\"\n\t\t\tactions={<Button\n\t\t\t\ttone=\"secondary\"\n\t\t\t\tbuttonStyle=\"outline\"\n\t\t\t\tonClick={context.openSelector}\n\t\t\t\ttype=\"button\"\n\t\t\t>\n\t\t\t\t{s.changeAction}\n\t\t\t</Button>}\n\t\t\tclassName=\"default-empty-content--component\"\n\t\t/>\n\t);\n}\nDefaultEmptyContent.displayName = 'DefaultEmptyContent';\n\nexport function DefaultDialogContent<\n\tTResource,\n\tTSuggestion,\n\tTSelectorProps extends object = Record<never, never>,\n>({\n\tSelectorComponent,\n\tselectorProps,\n\tcontext,\n}: SharedResourceCardDialogContentProps<TResource, TSuggestion, TSelectorProps>) {\n\tconst componentProps = {\n\t\t...(selectorProps ?? {} as TSelectorProps),\n\t\tonSelect: context.setSelectedSuggestion,\n\t\tselected: context.selectedSuggestion,\n\t\tinModal: true,\n\t\tlockOnSelect: false,\n\t\tcontext: 'dialog' as const,\n\t} as SharedResourceSelectorComponentProps<TSuggestion, TSelectorProps>;\n\n\treturn (\n\t\t<div className=\"default-dialog-content--component\">\n\t\t\t<SelectorComponent {...componentProps} />\n\t\t</div>\n\t);\n}\nDefaultDialogContent.displayName = 'DefaultDialogContent';\n","import { Eye } from 'lucide-react';\nimport { type ReactNode, useMemo } from 'react';\n\nimport { Button } from '../../base/buttons';\nimport { CardPrimaryAction } from '../../base/cards';\nimport { ContentBlock } from '../../base/display';\nimport { Stack } from '../../base/structure';\nimport { Text } from '../../typography';\nimport { ActionDialog } from '../overlays';\nimport { useStrings } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport { defaultSharedResourceCardStrings } from './resource-assignment.strings';\nimport { type SharedResourceCardProps } from './resource-assignment.types';\nimport { useSharedResourceCard } from './hooks';\nimport {\n\tDefaultDialogContent,\n\tDefaultDialogSummary,\n\tDefaultEmptyContent,\n\tDefaultResourceContent,\n} from './partials';\n\n/**\n * Stateful, card-free relationship assignment workflow.\n *\n * Consumers own persisted resources, selector data, mutations, routing, and\n * translations. The feature owns pending selection, confirmation state,\n * failure handling, and the default assignment presentation.\n */\nexport function SharedResourceCard<\n\tTResource,\n\tTSuggestion,\n\tTSelectorProps extends object = Record<never, never>,\n>({\n\ticon,\n\ttitle,\n\tdescription,\n\tclassName,\n\tcontentClassName,\n\talert,\n\talertTone,\n\tactions,\n\theaderAction,\n\tfooterText,\n\tresource,\n\tselector,\n\tsections,\n\tsectionsClassName,\n\tviewAction,\n\tviewLink,\n\tResourceContentComponent,\n\tEmptyContentComponent,\n\trenderResourceContent,\n\trenderEmptyContent,\n\tstrings: stringsProp,\n}: SharedResourceCardProps<TResource, TSuggestion, TSelectorProps>) {\n\tconst strings = useStrings(defaultSharedResourceCardStrings, stringsProp);\n\tconst selectorContext = useSharedResourceCard<TResource, TSuggestion>({\n\t\tresource,\n\t\tmapInitialSelected:\n\t\t\tselector?.mapInitialSelected ?? (() => null as TSuggestion | null),\n\t\tonConfirmSelection:\n\t\t\tselector?.onConfirmSelection ?? (() => undefined),\n\t\tisConfirmDisabled: selector?.isConfirmDisabled,\n\t\tonDialogOpen: selector?.onDialogOpen,\n\t\tonDialogClose: selector?.onDialogClose,\n\t\tonError: selector?.onError,\n\t\topen: selector?.open,\n\t\tdefaultOpen: selector?.defaultOpen,\n\t\tonOpenChange: selector?.onOpenChange,\n\t\tvalue: selector?.value,\n\t\tdefaultValue: selector?.defaultValue,\n\t\tonValueChange: selector?.onValueChange,\n\t});\n\n\tconst canUseSelector = selector !== undefined;\n\tconst selectorActionLabel = selector?.actionLabel?.trim();\n\tconst visibleBaseActionCount = actions?.filter((action) => action.visible !== false).length ?? 0;\n\t// The default empty state already carries the selector call to action, so\n\t// the header does not repeat it until a resource is assigned.\n\tconst usesDefaultEmptyAction = canUseSelector\n\t\t&& !selectorContext.hasResource\n\t\t&& !renderEmptyContent\n\t\t&& !EmptyContentComponent;\n\tconst shouldInlineSelectorAction = Boolean(\n\t\tcanUseSelector && selectorActionLabel && visibleBaseActionCount === 0 && !usesDefaultEmptyAction,\n\t);\n\tconst resolvedActions = useMemo(() => {\n\t\tconst baseActions = actions ?? [];\n\n\t\tif (!canUseSelector || !selectorActionLabel || usesDefaultEmptyAction) {\n\t\t\treturn baseActions.length > 0 ? baseActions : undefined;\n\t\t}\n\n\t\tif (shouldInlineSelectorAction) {\n\t\t\treturn baseActions.length > 0 ? baseActions : undefined;\n\t\t}\n\n\t\treturn [\n\t\t\t...baseActions,\n\t\t\t{\n\t\t\t\tid: 'shared-resource-selector-change',\n\t\t\t\tlabel: selectorActionLabel,\n\t\t\t\tonClick: selectorContext.openSelector,\n\t\t\t},\n\t\t];\n\t}, [\n\t\tactions,\n\t\tcanUseSelector,\n\t\tselectorActionLabel,\n\t\tselectorContext.openSelector,\n\t\tshouldInlineSelectorAction,\n\t\tusesDefaultEmptyAction,\n\t]);\n\tconst resolvedHeaderAction = headerAction || shouldInlineSelectorAction ? (\n\t\t<>\n\t\t\t{headerAction}\n\t\t\t{shouldInlineSelectorAction && (\n\t\t\t\t<Button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\tbuttonStyle=\"outline\"\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\tonClick={selectorContext.openSelector}\n\t\t\t\t\tclassName=\"shared-resource-card--selector-action\"\n\t\t\t\t>\n\t\t\t\t\t{selectorActionLabel}\n\t\t\t\t</Button>\n\t\t\t)}\n\t\t</>\n\t) : undefined;\n\n\tconst resourceContent: ReactNode = useMemo(() => {\n\t\tif (renderResourceContent) {\n\t\t\treturn renderResourceContent(selectorContext);\n\t\t}\n\n\t\tif (ResourceContentComponent) {\n\t\t\tconst ContentComponent = ResourceContentComponent;\n\t\t\treturn <ContentComponent context={selectorContext} />;\n\t\t}\n\n\t\tif (Array.isArray(sections) && sections.length > 0) {\n\t\t\tconst visibleSections = sections.filter((section) => {\n\t\t\t\treturn section.when ? section.when(selectorContext) : true;\n\t\t\t});\n\n\t\t\tif (visibleSections.length > 0) {\n\t\t\t\treturn (\n\t\t\t\t\t<div className={sectionsClassName ?? 'grid gap-space-lg'}>\n\t\t\t\t\t\t{visibleSections.map((section) => {\n\t\t\t\t\t\t\tconst SectionComponent = section.Component;\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<div key={section.id} className={section.className}>\n\t\t\t\t\t\t\t\t\t<SectionComponent context={selectorContext} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn <DefaultResourceContent context={selectorContext} strings={strings} />;\n\t}, [\n\t\tResourceContentComponent,\n\t\trenderResourceContent,\n\t\tsections,\n\t\tsectionsClassName,\n\t\tselectorContext,\n\t\tstrings,\n\t]);\n\n\tconst emptyContent: ReactNode = useMemo(() => {\n\t\tif (renderEmptyContent) {\n\t\t\treturn renderEmptyContent(selectorContext);\n\t\t}\n\n\t\tif (EmptyContentComponent) {\n\t\t\tconst ContentComponent = EmptyContentComponent;\n\t\t\treturn <ContentComponent context={selectorContext} />;\n\t\t}\n\n\t\tif (!canUseSelector) {\n\t\t\treturn <Text type=\"secondary\">{strings.noResourceSelected}</Text>;\n\t\t}\n\n\t\treturn <DefaultEmptyContent context={selectorContext} strings={strings} />;\n\t}, [\n\t\tEmptyContentComponent,\n\t\tcanUseSelector,\n\t\trenderEmptyContent,\n\t\tselectorContext,\n\t\tstrings,\n\t]);\n\n\tconst DialogContentComponent = selector?.DialogContentComponent;\n\tconst DialogSummaryComponent = selector?.DialogSummaryComponent;\n\tconst SelectorComponent = selector?.SelectorComponent;\n\tconst selectorProps = selector?.selectorProps;\n\tconst dialogContentProps = selector?.dialogContentProps ?? {};\n\tconst hasResource = selectorContext.hasResource;\n\tconst cardBody = hasResource ? resourceContent : emptyContent;\n\tconst shouldRenderDialog = Boolean(\n\t\tcanUseSelector && selector && SelectorComponent,\n\t);\n\tconst hasCustomViewAction = viewAction !== undefined;\n\tlet viewActionContent: ReactNode = null;\n\n\tif (hasResource && hasCustomViewAction) {\n\t\tviewActionContent = viewAction;\n\t} else if (hasResource && viewLink) {\n\t\tviewActionContent = (\n\t\t\t<CardPrimaryAction href={viewLink.href} icon={Eye}>\n\t\t\t\t{viewLink.label}\n\t\t\t</CardPrimaryAction>\n\t\t);\n\t}\n\n\tconst viewActionNode = viewActionContent === null || viewActionContent === false\n\t\t? null\n\t\t: (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'shared-resource-card--view-action',\n\t\t\t\t\t!hasCustomViewAction && viewLink?.className,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{viewActionContent}\n\t\t\t</div>\n\t\t);\n\tconst dialogNode =\n\t\tshouldRenderDialog && selector && SelectorComponent ? (\n\t\t<ActionDialog\n\t\t\t\topen={selectorContext.isSelectorOpen}\n\t\t\t\tonOpenChange={(open) => {\n\t\t\t\t\tif (!open) {\n\t\t\t\t\t\tselectorContext.closeSelector();\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\ttitle={selector.title}\n\t\t\t\tdescription={selector.description}\n\t\t\t\tsize={selector.dialogSize ?? '2xl'}\n\t\t\t\tshowCancel={false}\n\t\t\t\tshowConfirm={false}\n\t\t\t\tfooter={\n\t\t\t\t\t<Stack\n\t\t\t\t\t\tdirection={{ base: 'vertical', sm: 'horizontal' }}\n\t\t\t\t\t\tgap=\"sm\"\n\t\t\t\t\t\talign={{ base: 'stretch', sm: 'center' }}\n\t\t\t\t\t\tjustify=\"end\"\n\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\tbuttonStyle=\"outline\"\n\t\t\t\t\t\t\tonClick={selectorContext.closeSelector}\n\t\t\t\t\t\t\tdisabled={selectorContext.isConfirming}\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{selector.cancelText}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button tone=\"primary\"\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tvoid selectorContext.confirmSelection();\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t!selectorContext.canConfirmSelection ||\n\t\t\t\t\t\t\t\tselectorContext.isConfirming\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tloading={selectorContext.isConfirming}\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{selector.confirmText}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</Stack>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<Stack gap=\"lg\" className=\"shared-resource-card--dialog-body\">\n\t\t\t\t\t{DialogContentComponent ? (\n\t\t\t\t\t\t<DialogContentComponent\n\t\t\t\t\t\t\tSelectorComponent={SelectorComponent}\n\t\t\t\t\t\t\tselectorProps={selectorProps}\n\t\t\t\t\t\t\tcontext={selectorContext}\n\t\t\t\t\t\t\t{...dialogContentProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<DefaultDialogContent<TResource, TSuggestion, TSelectorProps>\n\t\t\t\t\t\t\tSelectorComponent={SelectorComponent}\n\t\t\t\t\t\t\tselectorProps={selectorProps}\n\t\t\t\t\t\t\tcontext={selectorContext}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{DialogSummaryComponent ? (\n\t\t\t\t\t\t<DialogSummaryComponent context={selectorContext} />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<DefaultDialogSummary\n\t\t\t\t\t\t\tcontext={selectorContext}\n\t\t\t\t\t\t\tstrings={strings}\n\t\t\t\t\t\t\tgetSelectionLabel={selector.getSelectionLabel}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\t\t</ActionDialog>\n\t\t) : null;\n\n\treturn (\n\t\t<>\n\t\t\t<ContentBlock\n\t\t\t\ticon={icon}\n\t\t\t\ttitle={title}\n\t\t\t\tdescription={description}\n\t\t\t\tdata-state={hasResource ? 'selected' : 'empty'}\n\t\t\t\tclassName={cn('shared-resource-card--component', className)}\n\t\t\t\tcontentGap=\"lg\"\n\t\t\t\tcontentClassName={contentClassName}\n\t\t\t\talert={alert}\n\t\t\t\talertTone={alertTone}\n\t\t\t\tactions={resolvedActions}\n\t\t\t\theaderAction={resolvedHeaderAction}\n\t\t\t\tfooterText={footerText}\n\t\t\t>\n\t\t\t\t{cardBody}\n\t\t\t\t{viewActionNode}\n\t\t\t</ContentBlock>\n\t\t\t{dialogNode}\n\t\t</>\n\t);\n}\n\nSharedResourceCard.displayName = 'SharedResourceCard';\n"],"mappings":";;;;;;;;;;;;;;AAkBA,IAAaU,IAA8D;CAC1E,mBAAmB;CACnB,mBAAmB;CACnB,oBAAoB;CACpB,cAAc;AACf;;;ACcA,SAAgBC,EAA8C,EAC7D,aACA,uBACA,uBACA,sBACA,iBACA,kBACA,YACA,SACA,iBAAc,IACd,iBACA,UACA,iBACA,oBAC6G;CAC7G,IAAM,CAACC,GAAcC,KAAmBC,EAASC,CAAW,GACtD,CAACC,GAAcC,KAAmBH,EAAS,EAAK,GAChD,CAACI,GAA4BC,KAClCL,EAA6BM,KAAgB,IAAI,GAC5CC,IAAmBC,MAAS,KAAA,GAC5BC,IAAoBC,MAAU,KAAA,GAC9BC,IAAiBJ,IAAmBC,IAAOV,GAC3Cc,IAAqBH,IAAoBC,IAAQN,GACjDS,IAAcC,MAAa,MAC3BC,IAA0BC,EAAO,EAAK,GACtCC,IAAeD,EAAO,EAAK,GAC3BE,IAA6BF,EAAOV,MAAiB,KAAA,CAAS,GAE9Da,IAAkBC,GAAa,MAAsB;EAE1D,AADKb,KAAkBR,EAAgBsB,CAAQ,GAC/CC,IAAeD,CAAQ;CACxB,GAAG,CAACd,GAAkBe,CAAY,CAAC,GAE7BC,IAAwBH,GAAa,MAAkC;EAE5E,AADKX,KAAmBJ,E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ACtE,GAAD;GAAO,KAAI;GAAK,WAAU;GAA1B,UAAA,CACE6F,IACA,kBAACA,GAAD;IACoB;IACJ;IACf,SAASxB;IACT,GAAI0B;GACJ,CAAA,IAED,kBAAChC,GAAD;IACoB;IACJ;IACf,SAASM;GACT,CAAA,GAGDyB,IACA,kBAACA,GAAD,EAAwB,SAASzB,EAAkB,CAAA,IAEnD,kBAACnB,GAAD;IACC,SAASmB;IACA;IACT,mBAAmBC,EAAS;GAC5B,CAAA,CAEI;;CACK,CAAA,IACV;CAEL,OACC,kBAAA1E,GAAA,EAAA,UAAA,CACC,kBAACO,GAAD;EACO;EACC;EACM;EACb,cAAYoB,IAAc,aAAa;EACvC,WAAWiF,EAAG,mCAAmCE,CAAS;EAC1D,YAAW;EACO;EACX;EACI;EACX,SAAS1B;EACT,cAAcE;EACF;EAZb,UAAA,CAcEc,IACAO,EACY;CACb,CAAA,GAAAE,EACA,EAAA,CAAA;AAEJ;AAEA,EAAmB,cAAc"}
|
|
1
|
+
{"version":3,"file":"resource-assignment.js","names":["_Fragment","ContentComponent","Text","DisplayLabel","focusRecipes","Button","Stack","Card","CardPrimaryAction","ActionDialog","EmptyState","Fragment$1","defaultSharedResourceCardStrings","useSharedResourceCard","internalOpen","setInternalOpen","useState","defaultOpen","isConfirming","setIsConfirming","confirmError","setConfirmError","internalSelectedSuggestion","setInternalSelectedSuggestion","defaultValue","isOpenControlled","open","isValueControlled","value","isSelectorOpen","selectedSuggestion","hasResource","resource","initializedOpenCycleRef","useRef","hasOpenedRef","hasExplicitDefaultValueRef","setSelectorOpen","useCallback","nextOpen","onOpenChange","setSelectedSuggestion","selection","onValueChange","openSelector","isFirstOpen","initial","mapInitialSelected","onDialogOpen","closeSelector","onDialogClose","canConfirmSelection","useMemo","isConfirmDisabled","confirmSelection","onConfirmSelection","error","onError","assignmentBlockProps","cn","className","contentClassName","DefaultDialogSummary","useStrings","strings","selected","context","label","getSelectionLabel","DefaultResourceContent","_context","s","DefaultEmptyContent","PackageOpen","DefaultDialogContent","componentProps","selectorProps","SelectorComponent","SharedResourceCard","stringsProp","cardRef","selectorActionRef","selectorOpenerRef","focusAfterSelector","opener","selectorContext","selector","canUseSelector","selectorActionLabel","visibleBaseActionCount","actions","action","usesDefaultEmptyAction","renderEmptyContent","EmptyContentComponent","shouldInlineSelectorAction","resolvedActions","baseActions","resolvedHeaderAction","headerAction","resourceContent","renderResourceContent","ResourceContentComponent","sections","visibleSections","section","sectionsClassName","SectionComponent","emptyContent","DialogContentComponent","DialogSummaryComponent","dialogContentProps","confirmErrorMessage","cardBody","shouldRenderDialog","hasCustomViewAction","viewAction","viewActionContent","viewLink","Eye","viewActionNode","dialogNode","footerText"],"sources":["../../src/components/features/resource-assignment/resource-assignment.strings.ts","../../src/components/features/resource-assignment/hooks/use-shared-resource-card.ts","../../src/components/features/resource-assignment/partials/assignment-surface.ts","../../src/components/features/resource-assignment/partials/default-shared-resource-partials.tsx","../../src/components/features/resource-assignment/resource-assignment.tsx"],"sourcesContent":["/**\n * Default user-facing strings for the resource-assignment feature.\n *\n * Consumers wire backend i18n at the call site:\n *\n * <SharedResourceCard\n * strings={{ noResourceSelected: t('resourceAssignment.empty') }}\n * …\n * />\n */\n\nexport interface SharedResourceCardStrings {\n\tcurrentlySelected: string;\n\tnoResourceContent: string;\n\tnoResourceSelected: string;\n\t/** Empty-state action that opens the selector for a first assignment. */\n\tassignAction?: string;\n\t/** Accessible name of the selector dialog's corner dismiss control. */\n\tcloseLabel?: string;\n\t/** Shown in the selector dialog when confirmation rejects without a message. */\n\tconfirmErrorMessage?: string;\n}\n\nexport const defaultSharedResourceCardStrings: SharedResourceCardStrings = {\n\tcurrentlySelected: 'Currently selected:',\n\tnoResourceContent: 'No resource content configured.',\n\tnoResourceSelected: 'No resource selected.',\n\tassignAction: 'Choose',\n\tcloseLabel: 'Close',\n\tconfirmErrorMessage: 'The selection could not be saved. Try again.',\n};\n","import { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport type { SharedResourceCardContext } from '../resource-assignment.types';\n\nexport type UseSharedResourceCardOptions<TResource, TSuggestion> = {\n\t/** Persisted assignment. `null` is the only empty state. */\n\tresource: TResource | null;\n\t/** Map persisted data when neither `value` nor first-open `defaultValue` supplies selection. */\n\tmapInitialSelected: (resource: TResource | null) => TSuggestion | null;\n\t/** Persist a confirmed suggestion. Returned promises are awaited. */\n\tonConfirmSelection: (selection: TSuggestion) => void | Promise<void>;\n\t/** Disable confirmation for a pending candidate. */\n\tisConfirmDisabled?: (selection: TSuggestion | null) => boolean;\n\t/** Called once per closed-to-open cycle, including an initially open selector. */\n\tonDialogOpen?: (selection: TSuggestion | null) => void;\n\t/** Called after selection mode closes or confirmation succeeds. */\n\tonDialogClose?: () => void;\n\t/** Called when `onConfirmSelection` throws. Library DEV-logs the error;\n\t * consumer wires telemetry. */\n\tonError?: (error: unknown, selection: TSuggestion) => void;\n\t/** Controlled selector visibility. An initial `true` value initializes selection. */\n\topen?: boolean;\n\t/** Initial selector visibility; `true` initializes selection after mount. */\n\tdefaultOpen?: boolean;\n\t/** Controlled visibility callback and uncontrolled visibility observer. */\n\tonOpenChange?: (open: boolean) => void;\n\t/** Controlled pending suggestion; authoritative over mapping on every open. */\n\tvalue?: TSuggestion | null;\n\t/** Initial uncontrolled suggestion; authoritative over mapping on the first open. */\n\tdefaultValue?: TSuggestion | null;\n\t/** Controlled selection callback and uncontrolled selection observer. */\n\tonValueChange?: (selection: TSuggestion | null) => void;\n};\n\nexport type UseSharedResourceCardResult<TResource, TSuggestion> =\n\tSharedResourceCardContext<TResource, TSuggestion>;\n\nexport function useSharedResourceCard<TResource, TSuggestion>({\n\tresource,\n\tmapInitialSelected,\n\tonConfirmSelection,\n\tisConfirmDisabled,\n\tonDialogOpen,\n\tonDialogClose,\n\tonError,\n\topen,\n\tdefaultOpen = false,\n\tonOpenChange,\n\tvalue,\n\tdefaultValue,\n\tonValueChange,\n}: UseSharedResourceCardOptions<TResource, TSuggestion>): UseSharedResourceCardResult<TResource, TSuggestion> {\n\tconst [internalOpen, setInternalOpen] = useState(defaultOpen);\n\tconst [isConfirming, setIsConfirming] = useState(false);\n\tconst [confirmError, setConfirmError] = useState<unknown>(null);\n\tconst [internalSelectedSuggestion, setInternalSelectedSuggestion] =\n\t\tuseState<TSuggestion | null>(defaultValue ?? null);\n\tconst isOpenControlled = open !== undefined;\n\tconst isValueControlled = value !== undefined;\n\tconst isSelectorOpen = isOpenControlled ? open : internalOpen;\n\tconst selectedSuggestion = isValueControlled ? value : internalSelectedSuggestion;\n\tconst hasResource = resource !== null;\n\tconst initializedOpenCycleRef = useRef(false);\n\tconst hasOpenedRef = useRef(false);\n\tconst hasExplicitDefaultValueRef = useRef(defaultValue !== undefined);\n\n\tconst setSelectorOpen = useCallback((nextOpen: boolean) => {\n\t\tif (!isOpenControlled) setInternalOpen(nextOpen);\n\t\tonOpenChange?.(nextOpen);\n\t}, [isOpenControlled, onOpenChange]);\n\n\tconst setSelectedSuggestion = useCallback((selection: TSuggestion | null) => {\n\t\t// A new candidate, or a closed selector, makes the last failure stale.\n\t\tsetConfirmError(null);\n\t\tif (!isValueControlled) setInternalSelectedSuggestion(selection);\n\t\tonValueChange?.(selection);\n\t}, [isValueControlled, onValueChange]);\n\n\tconst openSelector = useCallback(() => {\n\t\tsetSelectorOpen(true);\n\t}, [setSelectorOpen]);\n\n\tuseEffect(() => {\n\t\tif (!isSelectorOpen) {\n\t\t\tinitializedOpenCycleRef.current = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif (initializedOpenCycleRef.current) {\n\t\t\treturn;\n\t\t}\n\n\t\tinitializedOpenCycleRef.current = true;\n\t\tsetConfirmError(null);\n\t\tconst isFirstOpen = !hasOpenedRef.current;\n\t\tlet initial: TSuggestion | null;\n\n\t\tif (isValueControlled) {\n\t\t\tinitial = value;\n\t\t} else if (isFirstOpen && hasExplicitDefaultValueRef.current) {\n\t\t\tinitial = internalSelectedSuggestion;\n\t\t} else {\n\t\t\tinitial = mapInitialSelected(resource);\n\t\t\tsetSelectedSuggestion(initial);\n\t\t}\n\n\t\thasOpenedRef.current = true;\n\t\tonDialogOpen?.(initial);\n\t}, [\n\t\tinternalSelectedSuggestion,\n\t\tisSelectorOpen,\n\t\tisValueControlled,\n\t\tmapInitialSelected,\n\t\tonDialogOpen,\n\t\tresource,\n\t\tsetSelectedSuggestion,\n\t\tvalue,\n\t]);\n\n\tconst closeSelector = useCallback(() => {\n\t\tif (isConfirming) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetSelectorOpen(false);\n\t\tsetSelectedSuggestion(null);\n\t\tonDialogClose?.();\n\t}, [isConfirming, onDialogClose, setSelectedSuggestion, setSelectorOpen]);\n\n\tconst canConfirmSelection = useMemo(() => {\n\t\tif (selectedSuggestion === null) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!isConfirmDisabled) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn !isConfirmDisabled(selectedSuggestion);\n\t}, [isConfirmDisabled, selectedSuggestion]);\n\n\tconst confirmSelection = useCallback(async () => {\n\t\tif (\n\t\t\tisConfirming ||\n\t\t\t!canConfirmSelection ||\n\t\t\tselectedSuggestion === null\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsConfirming(true);\n\t\tsetConfirmError(null);\n\n\t\ttry {\n\t\t\tawait onConfirmSelection(selectedSuggestion);\n\t\t\tsetSelectorOpen(false);\n\t\t\tsetSelectedSuggestion(null);\n\t\t\tonDialogClose?.();\n\t\t} catch (error) {\n\t\t\tif (import.meta.env?.DEV) {\n\t\t\t\tconsole.warn('SharedResourceCard confirmation failed:', error);\n\t\t\t}\n\t\t\tsetConfirmError(error ?? new Error('SharedResourceCard confirmation failed'));\n\t\t\tonError?.(error, selectedSuggestion);\n\t\t} finally {\n\t\t\tsetIsConfirming(false);\n\t\t}\n\t}, [\n\t\tcanConfirmSelection,\n\t\tisConfirming,\n\t\tonConfirmSelection,\n\t\tonDialogClose,\n\t\tonError,\n\t\tselectedSuggestion,\n\t\tsetSelectedSuggestion,\n\t\tsetSelectorOpen,\n\t]);\n\n\treturn useMemo(\n\t\t() => ({\n\t\t\tresource,\n\t\t\thasResource,\n\t\t\tisSelectorOpen,\n\t\t\tisConfirming,\n\t\t\tconfirmError,\n\t\t\tselectedSuggestion,\n\t\t\tsetSelectedSuggestion,\n\t\t\topenSelector,\n\t\t\tcloseSelector,\n\t\t\tconfirmSelection,\n\t\t\tcanConfirmSelection,\n\t\t}),\n\t\t[\n\t\t\tcanConfirmSelection,\n\t\t\tcloseSelector,\n\t\t\tconfirmError,\n\t\t\tconfirmSelection,\n\t\t\thasResource,\n\t\t\tisConfirming,\n\t\t\tisSelectorOpen,\n\t\t\topenSelector,\n\t\t\tresource,\n\t\t\tselectedSuggestion,\n\t\t\tsetSelectedSuggestion,\n\t\t],\n\t);\n}\n","import { cn } from '../../../../lib/utils';\n\n/**\n * The assignment card used to render through the deprecated ContentBlock\n * adapter and now composes Card directly. It keeps the DOM hooks that adapter\n * painted, so consumer selectors written against them still match.\n */\nexport function assignmentBlockProps(className?: string, contentClassName?: string) {\n\treturn {\n\t\tsurface: 'flat',\n\t\tpadding: 'none',\n\t\t'data-component': 'content-block',\n\t\t'data-slot': 'content-block',\n\t\tclassName: cn('content-block--component', className),\n\t\theaderClassName: 'content-block--header',\n\t\tcontentClassName: cn('content-block--content', contentClassName),\n\t\tfooterClassName: 'content-block--footer',\n\t} as const;\n}\n","import { Stack } from '../../../base/structure';\n/**\n * Default partial implementations for `<SharedResourceCard>`.\n *\n * Consumers can override any of these by passing\n * `ResourceContentComponent` / `EmptyContentComponent` /\n * `selector.DialogContentComponent` / `selector.DialogSummaryComponent`\n * to `<SharedResourceCard>`. Strings flow through the `strings` prop\n * deep-merged over `defaultSharedResourceCardStrings`.\n */\nimport { Button } from '../../../base/buttons';\nimport { EmptyState } from '../../../blocks/data-display';\nimport { DisplayLabel, Text } from '../../../typography';\nimport { useStrings, type StringsProp } from '../../../../lib/strings';\nimport { PackageOpen } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport { defaultSharedResourceCardStrings, type SharedResourceCardStrings } from '../resource-assignment.strings';\nimport type {\n\tSharedResourceCardContentProps,\n\tSharedResourceCardDialogContentProps,\n\tSharedResourceCardDialogSummaryProps,\n\tSharedResourceSelectorComponentProps,\n} from '../resource-assignment.types';\n\ntype DefaultStrings = StringsProp<SharedResourceCardStrings>;\n\nexport function DefaultDialogSummary<TResource, TSuggestion>({\n\tcontext,\n\tstrings,\n\tgetSelectionLabel,\n}: SharedResourceCardDialogSummaryProps<TResource, TSuggestion> & {\n\t/** Overrides this surface's own copy. */\n\tstrings?: DefaultStrings;\n\t/** Builds the summary shown for the current selection. */\n\tgetSelectionLabel?: (selection: TSuggestion) => ReactNode;\n}) {\n\tconst s = useStrings(defaultSharedResourceCardStrings, strings);\n\tconst selected = context.selectedSuggestion;\n\n\tif (selected === null) {\n\t\treturn null;\n\t}\n\n\tconst label = getSelectionLabel?.(selected) ?? (\n\t\ttypeof selected === 'object' &&\n\t\tselected !== null &&\n\t\t'label' in selected &&\n\t\ttypeof selected.label === 'string'\n\t\t\t? selected.label\n\t\t\t: null\n\t);\n\n\tif (label === null || label === undefined || label === '') {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Stack gap=\"dense\" className=\"default-dialog-summary--component shared-resource-card--dialog-summary\">\n\t\t\t<DisplayLabel>{s.currentlySelected}</DisplayLabel>\n\t\t\t<Text type=\"inherit\">{label}</Text>\n\t\t</Stack>\n\t);\n}\nDefaultDialogSummary.displayName = 'DefaultDialogSummary';\n\nexport function DefaultResourceContent<TResource, TSuggestion>({\n\tcontext: _context,\n\tstrings,\n}: SharedResourceCardContentProps<TResource, TSuggestion> & { strings?: DefaultStrings }) {\n\tconst s = useStrings(defaultSharedResourceCardStrings, strings);\n\treturn <Text type=\"secondary\" className=\"default-resource-content--component\">{s.noResourceContent}</Text>;\n}\nDefaultResourceContent.displayName = 'DefaultResourceContent';\n\nexport function DefaultEmptyContent<TResource, TSuggestion>({\n\tcontext,\n\tstrings,\n}: SharedResourceCardContentProps<TResource, TSuggestion> & { strings?: DefaultStrings }) {\n\tconst s = useStrings(defaultSharedResourceCardStrings, strings);\n\treturn (\n\t\t<EmptyState\n\t\t\ttitle={s.noResourceSelected}\n\t\t\tdescription={false}\n\t\t\tmedia={<PackageOpen className=\"size-icon\" />}\n\t\t\tmediaVariant=\"icon-soft\"\n\t\t\tactions={<Button\n\t\t\t\ttone=\"secondary\"\n\t\t\t\tbuttonStyle=\"outline\"\n\t\t\t\tonClick={context.openSelector}\n\t\t\t\ttype=\"button\"\n\t\t\t>\n\t\t\t\t{s.assignAction ?? defaultSharedResourceCardStrings.assignAction}\n\t\t\t</Button>}\n\t\t\tclassName=\"default-empty-content--component\"\n\t\t/>\n\t);\n}\nDefaultEmptyContent.displayName = 'DefaultEmptyContent';\n\nexport function DefaultDialogContent<\n\tTResource,\n\tTSuggestion,\n\tTSelectorProps extends object = Record<never, never>,\n>({\n\tSelectorComponent,\n\tselectorProps,\n\tcontext,\n}: SharedResourceCardDialogContentProps<TResource, TSuggestion, TSelectorProps>) {\n\tconst componentProps = {\n\t\t...(selectorProps ?? {} as TSelectorProps),\n\t\tonSelect: context.setSelectedSuggestion,\n\t\tselected: context.selectedSuggestion,\n\t\tinModal: true,\n\t\tlockOnSelect: false,\n\t\tcontext: 'dialog' as const,\n\t} as SharedResourceSelectorComponentProps<TSuggestion, TSelectorProps>;\n\n\treturn (\n\t\t<div className=\"default-dialog-content--component\">\n\t\t\t<SelectorComponent {...componentProps} />\n\t\t</div>\n\t);\n}\nDefaultDialogContent.displayName = 'DefaultDialogContent';\n","import { Eye } from 'lucide-react';\nimport { type ReactNode, useCallback, useLayoutEffect, useMemo, useRef } from 'react';\n\nimport { Button } from '../../base/buttons';\nimport { Card, CardPrimaryAction } from '../../base/cards';\nimport { Stack } from '../../base/structure';\nimport { Text } from '../../typography';\nimport { ActionDialog } from '../overlays';\nimport { focusRecipes } from '../../../lib/focus-recipes';\nimport { useStrings } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport { defaultSharedResourceCardStrings } from './resource-assignment.strings';\nimport { type SharedResourceCardProps } from './resource-assignment.types';\nimport { useSharedResourceCard } from './hooks';\nimport { assignmentBlockProps } from './partials/assignment-surface';\nimport {\n\tDefaultDialogContent,\n\tDefaultDialogSummary,\n\tDefaultEmptyContent,\n\tDefaultResourceContent,\n} from './partials';\n\n/**\n * Stateful, card-free relationship assignment workflow.\n *\n * Consumers own persisted resources, selector data, mutations, routing, and\n * translations. The feature owns pending selection, confirmation state,\n * failure handling, and the default assignment presentation.\n */\nexport function SharedResourceCard<\n\tTResource,\n\tTSuggestion,\n\tTSelectorProps extends object = Record<never, never>,\n>({\n\ticon,\n\ttitle,\n\tdescription,\n\tclassName,\n\tcontentClassName,\n\talert,\n\talertTone,\n\tactions,\n\theaderAction,\n\tfooterText,\n\tresource,\n\tselector,\n\tsections,\n\tsectionsClassName,\n\tviewAction,\n\tviewLink,\n\tResourceContentComponent,\n\tEmptyContentComponent,\n\trenderResourceContent,\n\trenderEmptyContent,\n\tstrings: stringsProp,\n}: SharedResourceCardProps<TResource, TSuggestion, TSelectorProps>) {\n\tconst strings = useStrings(defaultSharedResourceCardStrings, stringsProp);\n\tconst cardRef = useRef<HTMLDivElement>(null);\n\tconst selectorActionRef = useRef<HTMLButtonElement>(null);\n\t/*\n\t * The overlay returns focus to the control that opened the selector. The\n\t * first assignment replaces that control (the empty-state action), so the\n\t * dialog's `finalFocus` names the change action instead, or the assignment\n\t * itself when the card has none.\n\t */\n\tconst selectorOpenerRef = useRef<Element | null>(null);\n\tconst focusAfterSelector = useCallback(() => {\n\t\tconst opener = selectorOpenerRef.current;\n\t\tif (opener instanceof HTMLElement && opener.isConnected && opener !== opener.ownerDocument.body) return true;\n\t\treturn selectorActionRef.current ?? cardRef.current;\n\t}, []);\n\tconst selectorContext = useSharedResourceCard<TResource, TSuggestion>({\n\t\tresource,\n\t\tmapInitialSelected:\n\t\t\tselector?.mapInitialSelected ?? (() => null as TSuggestion | null),\n\t\tonConfirmSelection:\n\t\t\tselector?.onConfirmSelection ?? (() => undefined),\n\t\tisConfirmDisabled: selector?.isConfirmDisabled,\n\t\tonDialogOpen: selector?.onDialogOpen,\n\t\tonDialogClose: selector?.onDialogClose,\n\t\tonError: selector?.onError,\n\t\topen: selector?.open,\n\t\tdefaultOpen: selector?.defaultOpen,\n\t\tonOpenChange: selector?.onOpenChange,\n\t\tvalue: selector?.value,\n\t\tdefaultValue: selector?.defaultValue,\n\t\tonValueChange: selector?.onValueChange,\n\t});\n\n\tconst isSelectorOpen = selectorContext.isSelectorOpen;\n\t// Remembered as the selector opens, before the dialog takes focus.\n\tuseLayoutEffect(() => {\n\t\tif (isSelectorOpen) selectorOpenerRef.current = cardRef.current?.ownerDocument.activeElement ?? null;\n\t}, [isSelectorOpen]);\n\n\tconst canUseSelector = selector !== undefined;\n\tconst selectorActionLabel = selector?.actionLabel?.trim();\n\tconst visibleBaseActionCount = actions?.filter((action) => action.visible !== false).length ?? 0;\n\t// The default empty state already carries the selector call to action, so\n\t// the header does not repeat it until a resource is assigned.\n\tconst usesDefaultEmptyAction = canUseSelector\n\t\t&& !selectorContext.hasResource\n\t\t&& !renderEmptyContent\n\t\t&& !EmptyContentComponent;\n\tconst shouldInlineSelectorAction = Boolean(\n\t\tcanUseSelector && selectorActionLabel && visibleBaseActionCount === 0 && !usesDefaultEmptyAction,\n\t);\n\tconst resolvedActions = useMemo(() => {\n\t\tconst baseActions = actions ?? [];\n\n\t\tif (!canUseSelector || !selectorActionLabel || usesDefaultEmptyAction) {\n\t\t\treturn baseActions.length > 0 ? baseActions : undefined;\n\t\t}\n\n\t\tif (shouldInlineSelectorAction) {\n\t\t\treturn baseActions.length > 0 ? baseActions : undefined;\n\t\t}\n\n\t\treturn [\n\t\t\t...baseActions,\n\t\t\t{\n\t\t\t\tid: 'shared-resource-selector-change',\n\t\t\t\tlabel: selectorActionLabel,\n\t\t\t\tonClick: selectorContext.openSelector,\n\t\t\t},\n\t\t];\n\t}, [\n\t\tactions,\n\t\tcanUseSelector,\n\t\tselectorActionLabel,\n\t\tselectorContext.openSelector,\n\t\tshouldInlineSelectorAction,\n\t\tusesDefaultEmptyAction,\n\t]);\n\tconst resolvedHeaderAction = headerAction || shouldInlineSelectorAction ? (\n\t\t<>\n\t\t\t{headerAction}\n\t\t\t{shouldInlineSelectorAction && (\n\t\t\t\t<Button\n\t\t\t\t\tref={selectorActionRef}\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\tbuttonStyle=\"outline\"\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\tonClick={selectorContext.openSelector}\n\t\t\t\t\tclassName=\"shared-resource-card--selector-action\"\n\t\t\t\t>\n\t\t\t\t\t{selectorActionLabel}\n\t\t\t\t</Button>\n\t\t\t)}\n\t\t</>\n\t) : undefined;\n\n\tconst resourceContent: ReactNode = useMemo(() => {\n\t\tif (renderResourceContent) {\n\t\t\treturn renderResourceContent(selectorContext);\n\t\t}\n\n\t\tif (ResourceContentComponent) {\n\t\t\tconst ContentComponent = ResourceContentComponent;\n\t\t\treturn <ContentComponent context={selectorContext} />;\n\t\t}\n\n\t\tif (Array.isArray(sections) && sections.length > 0) {\n\t\t\tconst visibleSections = sections.filter((section) => {\n\t\t\t\treturn section.when ? section.when(selectorContext) : true;\n\t\t\t});\n\n\t\t\tif (visibleSections.length > 0) {\n\t\t\t\treturn (\n\t\t\t\t\t<div className={sectionsClassName ?? 'grid gap-space-lg'}>\n\t\t\t\t\t\t{visibleSections.map((section) => {\n\t\t\t\t\t\t\tconst SectionComponent = section.Component;\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<div key={section.id} className={section.className}>\n\t\t\t\t\t\t\t\t\t<SectionComponent context={selectorContext} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t})}\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn <DefaultResourceContent context={selectorContext} strings={strings} />;\n\t}, [\n\t\tResourceContentComponent,\n\t\trenderResourceContent,\n\t\tsections,\n\t\tsectionsClassName,\n\t\tselectorContext,\n\t\tstrings,\n\t]);\n\n\tconst emptyContent: ReactNode = useMemo(() => {\n\t\tif (renderEmptyContent) {\n\t\t\treturn renderEmptyContent(selectorContext);\n\t\t}\n\n\t\tif (EmptyContentComponent) {\n\t\t\tconst ContentComponent = EmptyContentComponent;\n\t\t\treturn <ContentComponent context={selectorContext} />;\n\t\t}\n\n\t\tif (!canUseSelector) {\n\t\t\treturn <Text type=\"secondary\">{strings.noResourceSelected}</Text>;\n\t\t}\n\n\t\treturn <DefaultEmptyContent context={selectorContext} strings={strings} />;\n\t}, [\n\t\tEmptyContentComponent,\n\t\tcanUseSelector,\n\t\trenderEmptyContent,\n\t\tselectorContext,\n\t\tstrings,\n\t]);\n\n\tconst DialogContentComponent = selector?.DialogContentComponent;\n\tconst DialogSummaryComponent = selector?.DialogSummaryComponent;\n\tconst SelectorComponent = selector?.SelectorComponent;\n\tconst selectorProps = selector?.selectorProps;\n\tconst dialogContentProps = selector?.dialogContentProps ?? {};\n\tconst hasResource = selectorContext.hasResource;\n\tconst confirmError = selectorContext.confirmError;\n\tconst confirmErrorMessage = confirmError === null || confirmError === undefined\n\t\t? undefined\n\t\t: confirmError instanceof Error && confirmError.message\n\t\t\t? confirmError.message\n\t\t\t: strings.confirmErrorMessage ?? defaultSharedResourceCardStrings.confirmErrorMessage;\n\tconst cardBody = hasResource ? resourceContent : emptyContent;\n\tconst shouldRenderDialog = Boolean(\n\t\tcanUseSelector && selector && SelectorComponent,\n\t);\n\tconst hasCustomViewAction = viewAction !== undefined;\n\tlet viewActionContent: ReactNode = null;\n\n\tif (hasResource && hasCustomViewAction) {\n\t\tviewActionContent = viewAction;\n\t} else if (hasResource && viewLink) {\n\t\tviewActionContent = (\n\t\t\t<CardPrimaryAction href={viewLink.href} icon={Eye}>\n\t\t\t\t{viewLink.label}\n\t\t\t</CardPrimaryAction>\n\t\t);\n\t}\n\n\tconst viewActionNode = viewActionContent === null || viewActionContent === false\n\t\t? null\n\t\t: (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'shared-resource-card--view-action',\n\t\t\t\t\t!hasCustomViewAction && viewLink?.className,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{viewActionContent}\n\t\t\t</div>\n\t\t);\n\tconst dialogNode =\n\t\tshouldRenderDialog && selector && SelectorComponent ? (\n\t\t<ActionDialog\n\t\t\t\topen={selectorContext.isSelectorOpen}\n\t\t\t\tonOpenChange={(open) => {\n\t\t\t\t\tif (!open) {\n\t\t\t\t\t\tselectorContext.closeSelector();\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tfinalFocus={focusAfterSelector}\n\t\t\t\ttitle={selector.title}\n\t\t\t\tdescription={selector.description}\n\t\t\t\tsize={selector.dialogSize ?? '2xl'}\n\t\t\t\tstrings={{ close: strings.closeLabel }}\n\t\t\t\ttone={confirmErrorMessage ? 'destructive' : 'neutral'}\n\t\t\t\talertMessage={confirmErrorMessage}\n\t\t\t\tshowCancel={false}\n\t\t\t\tshowConfirm={false}\n\t\t\t\tfooter={\n\t\t\t\t\t<Stack\n\t\t\t\t\t\tdirection={{ base: 'vertical', sm: 'horizontal' }}\n\t\t\t\t\t\tgap=\"sm\"\n\t\t\t\t\t\talign={{ base: 'stretch', sm: 'center' }}\n\t\t\t\t\t\tjustify=\"end\"\n\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\t\tbuttonStyle=\"outline\"\n\t\t\t\t\t\t\tonClick={selectorContext.closeSelector}\n\t\t\t\t\t\t\tdisabled={selectorContext.isConfirming}\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{selector.cancelText}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button tone=\"primary\"\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tvoid selectorContext.confirmSelection();\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t!selectorContext.canConfirmSelection ||\n\t\t\t\t\t\t\t\tselectorContext.isConfirming\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tloading={selectorContext.isConfirming}\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{selector.confirmText}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</Stack>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<Stack gap=\"lg\" className=\"shared-resource-card--dialog-body\">\n\t\t\t\t\t{DialogContentComponent ? (\n\t\t\t\t\t\t<DialogContentComponent\n\t\t\t\t\t\t\tSelectorComponent={SelectorComponent}\n\t\t\t\t\t\t\tselectorProps={selectorProps}\n\t\t\t\t\t\t\tcontext={selectorContext}\n\t\t\t\t\t\t\t{...dialogContentProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<DefaultDialogContent<TResource, TSuggestion, TSelectorProps>\n\t\t\t\t\t\t\tSelectorComponent={SelectorComponent}\n\t\t\t\t\t\t\tselectorProps={selectorProps}\n\t\t\t\t\t\t\tcontext={selectorContext}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{DialogSummaryComponent ? (\n\t\t\t\t\t\t<DialogSummaryComponent context={selectorContext} />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<DefaultDialogSummary\n\t\t\t\t\t\t\tcontext={selectorContext}\n\t\t\t\t\t\t\tstrings={strings}\n\t\t\t\t\t\t\tgetSelectionLabel={selector.getSelectionLabel}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\t\t</ActionDialog>\n\t\t) : null;\n\n\treturn (\n\t\t<>\n\t\t\t<Card\n\t\t\t\tref={cardRef}\n\t\t\t\t// Focusable only by script: where focus lands when the selector's opener is gone.\n\t\t\t\ttabIndex={-1}\n\t\t\t\tdata-state={hasResource ? 'selected' : 'empty'}\n\t\t\t\t{...assignmentBlockProps(cn('shared-resource-card--component outline-none', focusRecipes.edge, className), contentClassName)}\n\t\t\t\ticon={icon}\n\t\t\t\ttitle={title}\n\t\t\t\tdescription={description}\n\t\t\t\tcontentGap=\"lg\"\n\t\t\t\talert={alert}\n\t\t\t\talertTone={alertTone}\n\t\t\t\tactions={resolvedActions}\n\t\t\t\theaderAction={resolvedHeaderAction}\n\t\t\t\tfooterSlot={footerText}\n\t\t\t>\n\t\t\t\t{cardBody}\n\t\t\t\t{viewActionNode}\n\t\t\t</Card>\n\t\t\t{dialogNode}\n\t\t</>\n\t);\n}\n\nSharedResourceCard.displayName = 'SharedResourceCard';\n"],"mappings":";;;;;;;;;;;;;;;AAuBA,IAAaY,IAA8D;CAC1E,mBAAmB;CACnB,mBAAmB;CACnB,oBAAoB;CACpB,cAAc;CACd,YAAY;CACZ,qBAAqB;AACtB;;;ACOA,SAAgBC,EAA8C,EAC7D,aACA,uBACA,uBACA,sBACA,iBACA,kBACA,YACA,SACA,iBAAc,IACd,iBACA,UACA,iBACA,oBAC6G;CAC7G,IAAM,CAACC,GAAcC,KAAmBC,EAASC,CAAW,GACtD,CAACC,GAAcC,KAAmBH,EAAS,EAAK,GAChD,CAACI,GAAcC,KAAmBL,EAAkB,IAAI,GACxD,CAACM,GAA4BC,KAClCP,EAA6BQ,KAAgB,IAAI,GAC5CC,IAAmBC,MAAS,KAAA,GAC5BC,IAAoBC,MAAU,KAAA,GAC9BC,IAAiBJ,IAAmBC,IAAOZ,GAC3CgB,IAAqBH,IAAoBC,IAAQN,GACjDS,IAAcC,MAAa,MAC3BC,IAA0BC,EAAO,EAAK,GACtCC,IAAeD,EAAO,EAAK,GAC3BE,KAA6BF,E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AAA,CACF;;EAGR,UAAA,kBAAChF,GAAD;GAAO,KAAI;GAAK,WAAU;GAA1B,UAAA,CACEuG,KACA,kBAACA,IAAD;IACoB;IACJ;IACf,SAASxB;IACT,GAAI0B;GACJ,CAAA,IAED,kBAACrC,GAAD;IACoB;IACJ;IACf,SAASW;GACT,CAAA,GAGDyB,KACA,kBAACA,IAAD,EAAwB,SAASzB,EAAkB,CAAA,IAEnD,kBAACvB,GAAD;IACC,SAASuB;IACA;IACT,mBAAmBC,EAAS;GAC5B,CAAA,CAEI;;CACK,CAAA,IACV;CAEL,OACC,kBAAAtF,GAAA,EAAA,UAAA,CACC,kBAACO,GAAD;EACC,KAAKyE;EAEL,UAAU;EACV,cAAYjD,IAAc,aAAa;EACvC,GAAI2B,EAAqBC,EAAG,gDAAgDvD,EAAa,MAAMwD,CAAS,GAAGC,CAAgB;EACrH;EACC;EACM;EACb,YAAW;EACJ;EACI;EACX,SAASmC;EACT,cAAcE;EACd,YAAYwB;EAdb,UAAA,CAgBET,IACAO,EACI;CACL,CAAA,GAAAC,EACA,EAAA,CAAA;AAEJ;AAEA,EAAmB,cAAc"}
|
|
@@ -1,89 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { t } from "../
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { i as u, n as d, s as f } from "../avatar-B9Jnp-T-.js";
|
|
11
|
-
import { n as p } from "../display-CT_N2a3w.js";
|
|
12
|
-
import { t as m } from "../metadata-list-XkqZ_UXH.js";
|
|
13
|
-
import { t as h } from "../navigation-Bt-v7rWP.js";
|
|
14
|
-
import { t as g } from "../overflow-tab-bar-BQCA2Zn2.js";
|
|
15
|
-
import { s as _ } from "../data-display-Cmj-xZYl.js";
|
|
16
|
-
import { useState as v } from "react";
|
|
17
|
-
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
18
|
-
//#region src/components/features/resource/resource.strings.ts
|
|
19
|
-
var x = {
|
|
20
|
-
loadingLabel: "Loading resources",
|
|
21
|
-
loadingDescription: "Preparing the latest data for this view.",
|
|
22
|
-
emptyTitle: "No resources found",
|
|
23
|
-
emptyDescription: "There are no records available for this view.",
|
|
24
|
-
errorTitle: "Resources unavailable",
|
|
25
|
-
errorDescription: "The resource data could not be loaded.",
|
|
26
|
-
retryLabel: "Try again",
|
|
27
|
-
tabsAriaLabel: "Resource sections"
|
|
28
|
-
};
|
|
29
|
-
//#endregion
|
|
2
|
+
import { t as e } from "../utils-BVbAG2J6.js";
|
|
3
|
+
import { c as t } from "../typography-C0dELqYV.js";
|
|
4
|
+
import { t as n } from "../structure-DElaQwwN.js";
|
|
5
|
+
import { c as r } from "../surface-recipes-DV6rrOFq.js";
|
|
6
|
+
import { t as i } from "../smart-card-C59z6KFO.js";
|
|
7
|
+
import { t as a } from "../metadata-list-G85roWjS.js";
|
|
8
|
+
import { s as o } from "../data-display-CWe9SOYh.js";
|
|
9
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
30
10
|
//#region src/components/features/resource/resource.tsx
|
|
31
|
-
function
|
|
32
|
-
|
|
33
|
-
className: t("resource-header--avatar size-avatar-lg", k),
|
|
34
|
-
children: [!!o && /* @__PURE__ */ y(f, {
|
|
35
|
-
src: o,
|
|
36
|
-
alt: s ?? j
|
|
37
|
-
}), /* @__PURE__ */ y(u, { children: p ?? /* @__PURE__ */ y(c, {
|
|
38
|
-
value: j,
|
|
39
|
-
strategy: "first-words"
|
|
40
|
-
}) })]
|
|
41
|
-
}) : A ? /* @__PURE__ */ y(l, {
|
|
42
|
-
icon: A,
|
|
43
|
-
shape: "square",
|
|
44
|
-
tone: g,
|
|
45
|
-
className: t("resource-header--icon size-avatar-lg [&>svg]:size-icon-lg", k)
|
|
46
|
-
}) : null);
|
|
47
|
-
return /* @__PURE__ */ y(h, {
|
|
48
|
-
eyebrow: i,
|
|
49
|
-
title: e,
|
|
50
|
-
description: n,
|
|
51
|
-
leading: M,
|
|
52
|
-
titleSuffix: _ ? /* @__PURE__ */ y(r, {
|
|
53
|
-
"data-slot": "resource-header-badges",
|
|
54
|
-
direction: "horizontal",
|
|
55
|
-
gap: "sm",
|
|
56
|
-
className: "resource-header--badges shrink-0",
|
|
57
|
-
children: _
|
|
58
|
-
}) : void 0,
|
|
59
|
-
afterDescription: v ? /* @__PURE__ */ y(r, {
|
|
60
|
-
"data-slot": "resource-header-metadata",
|
|
61
|
-
direction: "horizontal",
|
|
62
|
-
gap: "md",
|
|
63
|
-
className: "resource-header--metadata mt-space-sm",
|
|
64
|
-
children: v
|
|
65
|
-
}) : void 0,
|
|
66
|
-
actions: x,
|
|
67
|
-
primaryAction: S,
|
|
68
|
-
secondaryActions: C,
|
|
69
|
-
maxVisibleSecondaryActions: w,
|
|
70
|
-
moreActionsLabel: T,
|
|
71
|
-
renderLink: E,
|
|
72
|
-
withSeparator: !1,
|
|
73
|
-
className: t("resource-header--component", D),
|
|
74
|
-
contentClassName: O,
|
|
75
|
-
eyebrowClassName: "resource-header--eyebrow",
|
|
76
|
-
titleClassName: "resource-header--title truncate",
|
|
77
|
-
descriptionClassName: "resource-header--description max-w-3xl",
|
|
78
|
-
actionsClassName: "resource-header--actions flex-wrap"
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
function C({ children: e, leading: n, trailing: i, sticky: a = !1, className: o }) {
|
|
82
|
-
return /* @__PURE__ */ y("div", {
|
|
11
|
+
function l({ children: t, leading: i, trailing: a, sticky: o = !1, className: l }) {
|
|
12
|
+
return /* @__PURE__ */ s("div", {
|
|
83
13
|
"data-component": "resource-action-bar",
|
|
84
14
|
"data-slot": "resource-action-bar",
|
|
85
|
-
className:
|
|
86
|
-
children: /* @__PURE__ */
|
|
15
|
+
className: e("resource-action-bar--component box-border px-surface py-row-y-lg", r.frame, o && "sticky top-shell-header z-30", l),
|
|
16
|
+
children: /* @__PURE__ */ c(n, {
|
|
87
17
|
direction: {
|
|
88
18
|
base: "vertical",
|
|
89
19
|
sm: "horizontal"
|
|
@@ -93,177 +23,82 @@ function C({ children: e, leading: n, trailing: i, sticky: a = !1, className: o
|
|
|
93
23
|
justify: { sm: "between" },
|
|
94
24
|
wrap: { sm: !1 },
|
|
95
25
|
className: "resource-action-bar--layout",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
26
|
+
children: [/* @__PURE__ */ s(n, {
|
|
97
27
|
"data-slot": "resource-action-leading",
|
|
98
28
|
direction: "horizontal",
|
|
99
29
|
gap: "md",
|
|
100
30
|
className: "resource-action-bar--leading flex-1",
|
|
101
|
-
children:
|
|
102
|
-
}), !!
|
|
31
|
+
children: i ?? t
|
|
32
|
+
}), !!a && /* @__PURE__ */ s(n, {
|
|
103
33
|
"data-slot": "resource-action-trailing",
|
|
104
34
|
direction: "horizontal",
|
|
105
35
|
gap: "md",
|
|
106
36
|
className: "resource-action-bar--trailing shrink-0",
|
|
107
|
-
children:
|
|
37
|
+
children: a
|
|
108
38
|
})]
|
|
109
39
|
})
|
|
110
40
|
});
|
|
111
41
|
}
|
|
112
|
-
function
|
|
113
|
-
return /* @__PURE__ */
|
|
114
|
-
...
|
|
42
|
+
function u({ "aria-label": t, ...n }) {
|
|
43
|
+
return /* @__PURE__ */ s(o, {
|
|
44
|
+
...n,
|
|
45
|
+
ariaLabel: t,
|
|
115
46
|
"data-component": "resource-empty-state",
|
|
116
47
|
"data-slot": "resource-empty-state",
|
|
117
|
-
className:
|
|
48
|
+
className: e("resource-empty-state--component", n.className)
|
|
118
49
|
});
|
|
119
50
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
description: P.loadingDescription,
|
|
135
|
-
skeleton: !0,
|
|
136
|
-
lines: 4,
|
|
137
|
-
className: "resource-shell--loading rounded-surface border border-border bg-card"
|
|
138
|
-
}), R = D?.empty ?? _ ?? /* @__PURE__ */ y(w, {
|
|
139
|
-
title: P.emptyTitle,
|
|
140
|
-
description: P.emptyDescription,
|
|
141
|
-
border: !0
|
|
142
|
-
}), z = /* @__PURE__ */ y(a, {
|
|
143
|
-
title: P.errorTitle,
|
|
144
|
-
description: T instanceof Error ? T.message : typeof T == "string" || typeof T == "number" ? String(T) : P.errorDescription,
|
|
145
|
-
onRetry: E,
|
|
146
|
-
retryLabel: P.retryLabel
|
|
147
|
-
}), B = D?.error ?? (T && typeof T != "boolean" && typeof T != "string" && typeof T != "number" && !(T instanceof Error) ? T : z), V = C ? L : T ? B : v ? R : n;
|
|
148
|
-
return /* @__PURE__ */ b("section", {
|
|
149
|
-
"data-component": `resource-${N}-shell`,
|
|
150
|
-
"data-slot": `resource-${N}-shell`,
|
|
151
|
-
className: t(`resource-${N}-shell--component flex min-w-0 flex-col`, s.subjects, N === "index" && "@container/resource-index", N === "show" && "@container/resource-show", O),
|
|
152
|
-
children: [
|
|
153
|
-
!!F && /* @__PURE__ */ y("div", {
|
|
154
|
-
"data-slot": `resource-${N}-header`,
|
|
155
|
-
className: `resource-${N}-shell--header`,
|
|
156
|
-
children: F
|
|
157
|
-
}),
|
|
158
|
-
!!I && /* @__PURE__ */ y("div", {
|
|
159
|
-
"data-slot": `resource-${N}-toolbar`,
|
|
160
|
-
className: `resource-${N}-shell--toolbar`,
|
|
161
|
-
children: I
|
|
162
|
-
}),
|
|
163
|
-
/* @__PURE__ */ b("div", {
|
|
164
|
-
"data-slot": `resource-${N}-layout`,
|
|
165
|
-
className: t(`resource-${N}-shell--layout grid min-w-0`, s.subjects, D?.aside && N === "show" && "@4xl/resource-show:grid-cols-[minmax(0,1fr)_var(--shell-sidebar-width)]", D?.aside && N === "index" && "@4xl/resource-index:grid-cols-[minmax(0,1fr)_var(--shell-sidebar-width)]"),
|
|
166
|
-
children: [/* @__PURE__ */ b(r, {
|
|
167
|
-
gap: o.subjects,
|
|
168
|
-
children: [/* @__PURE__ */ y("div", {
|
|
169
|
-
"data-slot": `resource-${N}-content`,
|
|
170
|
-
className: t(`resource-${N}-shell--content flex min-w-0 flex-col`, s.subjects, A),
|
|
171
|
-
children: V
|
|
172
|
-
}), !!D?.footer && /* @__PURE__ */ y("div", {
|
|
173
|
-
"data-slot": `resource-${N}-footer`,
|
|
174
|
-
className: `resource-${N}-shell--footer`,
|
|
175
|
-
children: D.footer
|
|
176
|
-
})]
|
|
177
|
-
}), !!D?.aside && /* @__PURE__ */ y("aside", {
|
|
178
|
-
"data-slot": `resource-${N}-aside`,
|
|
179
|
-
className: t(`resource-${N}-shell--aside flex min-w-0 flex-col`, s.subjects, M),
|
|
180
|
-
children: D.aside
|
|
181
|
-
})]
|
|
182
|
-
})
|
|
183
|
-
]
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
function E(e) {
|
|
187
|
-
return /* @__PURE__ */ y(T, {
|
|
188
|
-
...e,
|
|
189
|
-
variant: "index"
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
function D(e) {
|
|
193
|
-
return /* @__PURE__ */ y(T, {
|
|
194
|
-
...e,
|
|
195
|
-
variant: "show"
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
function O({ tabs: n, activeTab: i, defaultActiveTab: a, onTabChange: o, tabsClassName: s, moreLabel: c, tabsAriaLabel: l, toolbar: u, slots: d, className: f, strings: p, ...m }) {
|
|
199
|
-
let h = e(x, p), [_, S] = v(a), C = /* @__PURE__ */ b(r, {
|
|
200
|
-
gap: "lg",
|
|
201
|
-
"data-slot": "tabbed-resource-toolbar",
|
|
202
|
-
className: "tabbed-resource-shell--toolbar",
|
|
203
|
-
children: [/* @__PURE__ */ y(g, {
|
|
204
|
-
items: n,
|
|
205
|
-
value: i === void 0 ? _ : i,
|
|
206
|
-
onValueChange: (e) => {
|
|
207
|
-
i === void 0 && _ !== void 0 && S(e), o?.(e);
|
|
208
|
-
},
|
|
209
|
-
className: s,
|
|
210
|
-
strings: {
|
|
211
|
-
more: c,
|
|
212
|
-
navigationLabel: l ?? h.tabsAriaLabel
|
|
213
|
-
}
|
|
214
|
-
}), u]
|
|
215
|
-
});
|
|
216
|
-
return /* @__PURE__ */ y(D, {
|
|
217
|
-
...m,
|
|
218
|
-
strings: p,
|
|
219
|
-
className: t("tabbed-resource-shell--component", f),
|
|
220
|
-
toolbar: C,
|
|
221
|
-
slots: {
|
|
222
|
-
...d,
|
|
223
|
-
toolbar: d?.toolbar ?? C
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
function k({ title: e, description: n, actions: r, headerAction: i, children: a, footer: o, padding: s = "md", surface: c = "card", className: l, contentClassName: u, name: d }) {
|
|
228
|
-
return /* @__PURE__ */ y(p, {
|
|
229
|
-
"data-component": d,
|
|
230
|
-
"data-slot": d,
|
|
231
|
-
title: e,
|
|
51
|
+
var d = {
|
|
52
|
+
"data-component": "content-block",
|
|
53
|
+
"data-slot": "content-block"
|
|
54
|
+
}, f = {
|
|
55
|
+
root: "content-block--component",
|
|
56
|
+
header: "content-block--header",
|
|
57
|
+
content: "content-block--content",
|
|
58
|
+
footer: "content-block--footer"
|
|
59
|
+
};
|
|
60
|
+
function p({ title: t, description: n, actions: r, headerAction: a, children: o, footer: c, padding: l = "md", surface: u = "card", className: p, contentClassName: m, name: h }) {
|
|
61
|
+
return /* @__PURE__ */ s(i, {
|
|
62
|
+
...d,
|
|
63
|
+
"data-padding": l,
|
|
64
|
+
title: t,
|
|
232
65
|
description: n,
|
|
233
66
|
actions: r,
|
|
234
|
-
headerAction:
|
|
235
|
-
footerSlot:
|
|
236
|
-
padding:
|
|
237
|
-
surface:
|
|
238
|
-
className:
|
|
239
|
-
|
|
240
|
-
|
|
67
|
+
headerAction: a,
|
|
68
|
+
footerSlot: c,
|
|
69
|
+
padding: l,
|
|
70
|
+
surface: u,
|
|
71
|
+
className: e(f.root, `${h}--component`, p),
|
|
72
|
+
headerClassName: f.header,
|
|
73
|
+
contentClassName: e(f.content, m),
|
|
74
|
+
footerClassName: f.footer,
|
|
75
|
+
children: o
|
|
241
76
|
});
|
|
242
77
|
}
|
|
243
|
-
function
|
|
244
|
-
return /* @__PURE__ */
|
|
245
|
-
...
|
|
78
|
+
function m({ metadata: n, metadataColumns: r = 2, metadataDense: i = !1, body: o, help: l, children: u, contentClassName: d, ...f }) {
|
|
79
|
+
return /* @__PURE__ */ c(p, {
|
|
80
|
+
...f,
|
|
246
81
|
name: "resource-details-section",
|
|
247
|
-
contentClassName:
|
|
82
|
+
contentClassName: e("resource-details-section--content grid gap-space-xl", d),
|
|
248
83
|
children: [
|
|
249
|
-
!!
|
|
84
|
+
!!n?.length && /* @__PURE__ */ s(a, {
|
|
250
85
|
adaptTo: "container",
|
|
251
|
-
items:
|
|
86
|
+
items: n,
|
|
252
87
|
columns: r,
|
|
253
88
|
density: i ? "compact" : "default"
|
|
254
89
|
}),
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
!!
|
|
90
|
+
o,
|
|
91
|
+
u,
|
|
92
|
+
!!l && /* @__PURE__ */ s(t, {
|
|
258
93
|
size: "xs",
|
|
259
94
|
type: "secondary",
|
|
260
95
|
className: "resource-details-section--help",
|
|
261
|
-
children:
|
|
96
|
+
children: l
|
|
262
97
|
})
|
|
263
98
|
]
|
|
264
99
|
});
|
|
265
100
|
}
|
|
266
101
|
//#endregion
|
|
267
|
-
export {
|
|
102
|
+
export { l as ResourceActionBar, m as ResourceDetailsSection, u as ResourceEmptyState };
|
|
268
103
|
|
|
269
104
|
//# sourceMappingURL=resource.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.js","names":["Text","Stack","LoadingState","ErrorState","compositionRhythm","compositionClasses","Initials","IconBadge","AvatarFallback","Avatar","AvatarImage","ContentBlock","MetadataList","PageHeading","OverflowTabBar","EmptyState","defaultResourceStrings","ResourceHeader","Icon","icon","titleText","title","resolvedMedia","media","avatarUrl","avatarFallback","cn","mediaClassName","avatarAlt","iconTone","badges","metadata","className","ResourceActionBar","sticky","leading","children","trailing","ResourceEmptyState","props","ResourceShellFrame","emptyState","stringsProp","strings","useStrings","header","slots","headerClassName","toolbarNode","toolbar","loadingNode","emptyNode","emptySlot","defaultErrorNode","error","errorNode","body","loading","variant","contentClassName","asideClassName","ResourceIndexShell","ResourceShowShell","TabbedResourceShell","selectedTab","setSelectedTab","useState","defaultActiveTab","tabs","activeTab","id","onTabChange","tabsClassName","moreLabel","tabsAriaLabel","ResourceCard","name","footer","ResourceDetailsSection","metadataColumns","metadataDense","help"],"sources":["../../src/components/features/resource/resource.strings.ts","../../src/components/features/resource/resource.tsx"],"sourcesContent":["/** Default copy for state-aware resource workspace replacement states. */\nexport interface ResourceStrings {\n\tloadingLabel: string;\n\tloadingDescription: string;\n\temptyTitle: string;\n\temptyDescription: string;\n\terrorTitle: string;\n\terrorDescription: string;\n\tretryLabel: string;\n\ttabsAriaLabel: string;\n}\n\nexport const defaultResourceStrings: ResourceStrings = {\n\tloadingLabel: 'Loading resources',\n\tloadingDescription: 'Preparing the latest data for this view.',\n\temptyTitle: 'No resources found',\n\temptyDescription: 'There are no records available for this view.',\n\terrorTitle: 'Resources unavailable',\n\terrorDescription: 'The resource data could not be loaded.',\n\tretryLabel: 'Try again',\n\ttabsAriaLabel: 'Resource sections',\n};\n","/** State-aware resource workspace primitives for coordinated index/show surfaces. */\nimport { useState } from 'react';\n\nimport { ContentBlock, IconBadge } from '../../base/display';\nimport { Avatar, AvatarFallback, AvatarImage } from '../../base/avatar';\nimport { ErrorState, LoadingState } from '../../base/feedback';\nimport { MetadataList } from '../../base/metadata-list';\nimport { EmptyState } from '../../blocks/data-display';\nimport { OverflowTabBar, PageHeading } from '../../base/navigation';\nimport { Stack } from '../../base/structure';\nimport {compositionClasses, compositionRhythm} from '../../base/structure/composition.recipes';\nimport { Initials } from '../../primitives';\nimport { Text } from '../../typography';\nimport { useStrings } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\n\nimport { defaultResourceStrings } from './resource.strings';\nimport type {\n\tResourceActionBarProps,\n\tResourceDetailsSectionProps,\n\tResourceEmptyStateProps,\n\tResourceHeaderProps,\n\tResourceIndexShellProps,\n\tResourceShowShellProps,\n\tTabbedResourceShellProps,\n} from './resource.types';\n\n/** @deprecated Use Page from themelia-react-ui/layout/page; PageHeader is available for embedded headers. */\nexport function ResourceHeader({\n\ttitle,\n\tdescription,\n\teyebrow,\n\tmedia,\n\tavatarUrl,\n\tavatarAlt,\n\tavatarFallback,\n\ticon,\n\ticonTone = 'neutral',\n\tbadges,\n\tmetadata,\n\tactions,\n\tprimaryAction,\n\tsecondaryActions,\n\tmaxVisibleSecondaryActions,\n\tmoreActionsLabel,\n\trenderLink,\n\tclassName,\n\tcontentClassName,\n\tmediaClassName,\n}: ResourceHeaderProps) {\n\tconst Icon = icon;\n\tconst titleText = typeof title === 'string' ? title : '';\n\tconst resolvedMedia =\n\t\tmedia ??\n\t\t(avatarUrl || avatarFallback ? (\n\t\t\t<Avatar className={cn('resource-header--avatar size-avatar-lg', mediaClassName)}>\n\t\t\t\t{!!avatarUrl && <AvatarImage src={avatarUrl} alt={avatarAlt ?? titleText} />}\n\t\t\t\t<AvatarFallback>{avatarFallback ?? <Initials value={titleText} strategy=\"first-words\" />}</AvatarFallback>\n\t\t\t</Avatar>\n\t\t) : Icon ? (\n\t\t\t<IconBadge\n\t\t\t\ticon={Icon}\n\t\t\t\tshape=\"square\"\n\t\t\t\ttone={iconTone}\n\t\t\t\tclassName={cn('resource-header--icon size-avatar-lg [&>svg]:size-icon-lg', mediaClassName)}\n\t\t\t/>\n\t\t) : null);\n\n\treturn (\n\t\t<PageHeading\n\t\t\teyebrow={eyebrow}\n\t\t\ttitle={title}\n\t\t\tdescription={description}\n\t\t\tleading={resolvedMedia}\n\t\t\ttitleSuffix={\n\t\t\t\tbadges ? (\n\t\t\t\t\t<Stack\n\t\t\t\t\t\tdata-slot=\"resource-header-badges\"\n\t\t\t\t\t\tdirection=\"horizontal\"\n\t\t\t\t\t\tgap=\"sm\"\n\t\t\t\t\t\tclassName=\"resource-header--badges shrink-0\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{badges}\n\t\t\t\t\t</Stack>\n\t\t\t\t) : undefined\n\t\t\t}\n\t\t\tafterDescription={\n\t\t\t\tmetadata ? (\n\t\t\t\t\t<Stack\n\t\t\t\t\t\tdata-slot=\"resource-header-metadata\"\n\t\t\t\t\t\tdirection=\"horizontal\"\n\t\t\t\t\t\tgap=\"md\"\n\t\t\t\t\t\tclassName=\"resource-header--metadata mt-space-sm\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{metadata}\n\t\t\t\t\t</Stack>\n\t\t\t\t) : undefined\n\t\t\t}\n\t\t\tactions={actions}\n\t\t\tprimaryAction={primaryAction}\n\t\t\tsecondaryActions={secondaryActions}\n\t\t\tmaxVisibleSecondaryActions={maxVisibleSecondaryActions}\n\t\t\tmoreActionsLabel={moreActionsLabel}\n\t\t\trenderLink={renderLink}\n\t\t\twithSeparator={false}\n\t\t\tclassName={cn('resource-header--component', className)}\n\t\t\tcontentClassName={contentClassName}\n\t\t\teyebrowClassName=\"resource-header--eyebrow\"\n\t\t\ttitleClassName=\"resource-header--title truncate\"\n\t\t\tdescriptionClassName=\"resource-header--description max-w-3xl\"\n\t\t\tactionsClassName=\"resource-header--actions flex-wrap\"\n\t\t/>\n\t);\n}\n\nexport function ResourceActionBar({ children, leading, trailing, sticky = false, className }: ResourceActionBarProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-component=\"resource-action-bar\"\n\t\t\tdata-slot=\"resource-action-bar\"\n\t\t\tclassName={cn(\n\t\t\t\t'resource-action-bar--component box-border rounded-surface border border-border bg-card text-card-foreground px-surface py-row-y-lg shadow-xs',\n\t\t\t\tsticky && 'sticky top-shell-header z-30',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<Stack\n\t\t\t\tdirection={{ base: 'vertical', sm: 'horizontal' }}\n\t\t\t\tgap=\"lg\"\n\t\t\t\talign={{ sm: 'center' }}\n\t\t\t\tjustify={{ sm: 'between' }}\n\t\t\t\twrap={{ sm: false }}\n\t\t\t\tclassName=\"resource-action-bar--layout\"\n\t\t\t>\n\t\t\t\t<Stack\n\t\t\t\t\tdata-slot=\"resource-action-leading\"\n\t\t\t\t\tdirection=\"horizontal\"\n\t\t\t\t\tgap=\"md\"\n\t\t\t\t\tclassName=\"resource-action-bar--leading flex-1\"\n\t\t\t\t>\n\t\t\t\t\t{leading ?? children}\n\t\t\t\t</Stack>\n\t\t\t\t{!!trailing && (\n\t\t\t\t\t<Stack\n\t\t\t\t\t\tdata-slot=\"resource-action-trailing\"\n\t\t\t\t\t\tdirection=\"horizontal\"\n\t\t\t\t\t\tgap=\"md\"\n\t\t\t\t\t\tclassName=\"resource-action-bar--trailing shrink-0\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{trailing}\n\t\t\t\t\t</Stack>\n\t\t\t\t)}\n\t\t\t</Stack>\n\t\t</div>\n\t);\n}\n\nexport function ResourceEmptyState(props: ResourceEmptyStateProps) {\n\treturn (\n\t\t<EmptyState\n\t\t\t{...props}\n\t\t\tdata-component=\"resource-empty-state\"\n\t\t\tdata-slot=\"resource-empty-state\"\n\t\t\tclassName={cn('resource-empty-state--component', props.className)}\n\t\t/>\n\t);\n}\n\nfunction ResourceShellFrame({\n\tchildren,\n\ttitle,\n\tdescription,\n\tactions,\n\tprimaryAction,\n\tsecondaryActions,\n\tmaxVisibleSecondaryActions,\n\tmoreActionsLabel,\n\trenderLink,\n\ttoolbar,\n\temptySlot,\n\tempty: emptyState = false,\n\tloading = false,\n\terror,\n\tonRetry,\n\tslots,\n\tclassName,\n\theaderClassName,\n\tcontentClassName,\n\tstrings: stringsProp,\n\tasideClassName,\n\tvariant,\n}: ResourceIndexShellProps & {\n\tasideClassName?: string;\n\tvariant: 'index' | 'show';\n}) {\n\tconst strings = useStrings(defaultResourceStrings, stringsProp);\n\tconst header =\n\t\tslots?.header ??\n\t\t(title ? (\n\t\t\t<ResourceHeader\n\t\t\t\ttitle={title}\n\t\t\t\tdescription={description}\n\t\t\t\tactions={actions}\n\t\t\t\tprimaryAction={primaryAction}\n\t\t\t\tsecondaryActions={secondaryActions}\n\t\t\t\tmaxVisibleSecondaryActions={maxVisibleSecondaryActions}\n\t\t\t\tmoreActionsLabel={moreActionsLabel}\n\t\t\t\trenderLink={renderLink}\n\t\t\t\tclassName={headerClassName}\n\t\t\t/>\n\t\t) : null);\n\tconst toolbarNode = slots?.toolbar ?? toolbar;\n\tconst loadingNode = slots?.loading ?? (\n\t\t<LoadingState\n\t\t\tvariant=\"panel\"\n\t\t\tlabel={strings.loadingLabel}\n\t\t\tdescription={strings.loadingDescription}\n\t\t\tskeleton\n\t\t\tlines={4}\n\t\t\tclassName=\"resource-shell--loading rounded-surface border border-border bg-card\"\n\t\t/>\n\t);\n\tconst emptyNode = slots?.empty ?? emptySlot ?? (\n\t\t<ResourceEmptyState title={strings.emptyTitle} description={strings.emptyDescription} border />\n\t);\n\tconst defaultErrorNode = (\n\t\t<ErrorState\n\t\t\ttitle={strings.errorTitle}\n\t\t\tdescription={\n\t\t\t\terror instanceof Error\n\t\t\t\t\t? error.message\n\t\t\t\t\t: typeof error === 'string' || typeof error === 'number'\n\t\t\t\t\t\t? String(error)\n\t\t\t\t\t\t: strings.errorDescription\n\t\t\t}\n\t\t\tonRetry={onRetry}\n\t\t\tretryLabel={strings.retryLabel}\n\t\t/>\n\t);\n\tconst errorNode =\n\t\tslots?.error ??\n\t\t(error &&\n\t\ttypeof error !== 'boolean' &&\n\t\ttypeof error !== 'string' &&\n\t\ttypeof error !== 'number' &&\n\t\t!(error instanceof Error)\n\t\t\t? error\n\t\t\t: defaultErrorNode);\n\tconst body = loading ? loadingNode : error ? errorNode : emptyState ? emptyNode : children;\n\n\treturn (\n\t\t<section\n\t\t\tdata-component={`resource-${variant}-shell`}\n\t\t\tdata-slot={`resource-${variant}-shell`}\n\t\t\tclassName={cn(\n\t\t\t\t`resource-${variant}-shell--component flex min-w-0 flex-col`, compositionClasses.subjects,\n\t\t\t\tvariant === 'index' && '@container/resource-index',\n\t\t\t\tvariant === 'show' && '@container/resource-show',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t{!!header && (\n\t\t\t\t<div data-slot={`resource-${variant}-header`} className={`resource-${variant}-shell--header`}>\n\t\t\t\t\t{header}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{!!toolbarNode && (\n\t\t\t\t<div data-slot={`resource-${variant}-toolbar`} className={`resource-${variant}-shell--toolbar`}>\n\t\t\t\t\t{toolbarNode}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t<div\n\t\t\t\tdata-slot={`resource-${variant}-layout`}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t`resource-${variant}-shell--layout grid min-w-0`, compositionClasses.subjects,\n\t\t\t\t\tslots?.aside &&\n\t\t\t\t\t\tvariant === 'show' &&\n\t\t\t\t\t\t'@4xl/resource-show:grid-cols-[minmax(0,1fr)_var(--shell-sidebar-width)]',\n\t\t\t\t\tslots?.aside &&\n\t\t\t\t\t\tvariant === 'index' &&\n\t\t\t\t\t\t'@4xl/resource-index:grid-cols-[minmax(0,1fr)_var(--shell-sidebar-width)]',\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<Stack gap={compositionRhythm.subjects}>\n\t\t\t\t\t<div\n\t\t\t\t\t\tdata-slot={`resource-${variant}-content`}\n\t\t\t\t\t\tclassName={cn(`resource-${variant}-shell--content flex min-w-0 flex-col`, compositionClasses.subjects, contentClassName)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{body}\n\t\t\t\t\t</div>\n\t\t\t\t\t{!!slots?.footer && (\n\t\t\t\t\t\t<div data-slot={`resource-${variant}-footer`} className={`resource-${variant}-shell--footer`}>\n\t\t\t\t\t\t\t{slots.footer}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</Stack>\n\t\t\t\t{!!slots?.aside && (\n\t\t\t\t\t<aside\n\t\t\t\t\t\tdata-slot={`resource-${variant}-aside`}\n\t\t\t\t\t\tclassName={cn(`resource-${variant}-shell--aside flex min-w-0 flex-col`, compositionClasses.subjects, asideClassName)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{slots.aside}\n\t\t\t\t\t</aside>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</section>\n\t);\n}\n\n/** @deprecated Use Page from themelia-react-ui/layout/page; PageHeader is available for embedded headers. */\nexport function ResourceIndexShell(props: ResourceIndexShellProps) {\n\treturn <ResourceShellFrame {...props} variant=\"index\" />;\n}\n\n/** @deprecated Use Page from themelia-react-ui/layout/page; PageHeader is available for embedded headers. */\nexport function ResourceShowShell(props: ResourceShowShellProps) {\n\treturn <ResourceShellFrame {...props} variant=\"show\" />;\n}\n\n/** @deprecated Use Page from themelia-react-ui/layout/page; PageHeader is available for embedded headers. */\nexport function TabbedResourceShell({\n\ttabs,\n\tactiveTab,\n\tdefaultActiveTab,\n\tonTabChange,\n\ttabsClassName,\n\tmoreLabel,\n\ttabsAriaLabel,\n\ttoolbar,\n\tslots,\n\tclassName,\n\tstrings: stringsProp,\n\t...props\n}: TabbedResourceShellProps) {\n\tconst strings = useStrings(defaultResourceStrings, stringsProp);\n\tconst [selectedTab, setSelectedTab] = useState(defaultActiveTab);\n\tconst handleTabChange = (id: string) => {\n\t\t// A shell without an initial default has always left selection to its caller.\n\t\tif (activeTab === undefined && selectedTab !== undefined) setSelectedTab(id);\n\t\tonTabChange?.(id);\n\t};\n\n\tconst toolbarNode = (\n\t\t<Stack gap=\"lg\" data-slot=\"tabbed-resource-toolbar\" className=\"tabbed-resource-shell--toolbar\">\n\t\t\t<OverflowTabBar\n\t\t\t\titems={tabs}\n\t\t\t\tvalue={activeTab === undefined ? selectedTab : activeTab}\n\t\t\t\tonValueChange={handleTabChange}\n\t\t\t\tclassName={tabsClassName}\n\t\t\t\tstrings={{\n\t\t\t\t\tmore: moreLabel,\n\t\t\t\t\tnavigationLabel: tabsAriaLabel ?? strings.tabsAriaLabel,\n\t\t\t\t}}\n\t\t\t/>\n\t\t\t{toolbar}\n\t\t</Stack>\n\t);\n\n\treturn (\n\t\t<ResourceShowShell\n\t\t\t{...props}\n\t\t\tstrings={stringsProp}\n\t\t\tclassName={cn('tabbed-resource-shell--component', className)}\n\t\t\ttoolbar={toolbarNode}\n\t\t\tslots={{ ...slots, toolbar: slots?.toolbar ?? toolbarNode }}\n\t\t/>\n\t);\n}\n\nfunction ResourceCard({\n\ttitle,\n\tdescription,\n\tactions,\n\theaderAction,\n\tchildren,\n\tfooter,\n\tpadding = 'md',\n\tsurface = 'card',\n\tclassName,\n\tcontentClassName,\n\tname,\n}: ResourceDetailsSectionProps & { name: string }) {\n\treturn (\n\t\t<ContentBlock\n\t\t\tdata-component={name}\n\t\t\tdata-slot={name}\n\t\t\ttitle={title}\n\t\t\tdescription={description}\n\t\t\tactions={actions}\n\t\t\theaderAction={headerAction}\n\t\t\tfooterSlot={footer}\n\t\t\tpadding={padding}\n\t\t\tsurface={surface}\n\t\t\tclassName={cn(`${name}--component`, className)}\n\t\t\tcontentClassName={contentClassName}\n\t\t>\n\t\t\t{children}\n\t\t</ContentBlock>\n\t);\n}\n\nexport function ResourceDetailsSection({\n\tmetadata,\n\tmetadataColumns = 2,\n\tmetadataDense = false,\n\tbody,\n\thelp,\n\tchildren,\n\tcontentClassName,\n\t...props\n}: ResourceDetailsSectionProps) {\n\treturn (\n\t\t<ResourceCard\n\t\t\t{...props}\n\t\t\tname=\"resource-details-section\"\n\t\t\tcontentClassName={cn('resource-details-section--content grid gap-space-xl', contentClassName)}\n\t\t>\n\t\t\t{!!metadata?.length && (\n\t\t\t\t<MetadataList adaptTo=\"container\" items={metadata} columns={metadataColumns} density={metadataDense ? 'compact' : 'default'} />\n\t\t\t)}\n\t\t\t{body}\n\t\t\t{children}\n\t\t\t{!!help && (\n\t\t\t\t<Text size=\"xs\" type=\"secondary\" className=\"resource-details-section--help\">\n\t\t\t\t\t{help}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t</ResourceCard>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAYA,IAAagB,IAA0C;CACtD,cAAc;CACd,oBAAoB;CACpB,YAAY;CACZ,kBAAkB;CAClB,YAAY;CACZ,kBAAkB;CAClB,YAAY;CACZ,eAAe;AAChB;;;ACOA,SAAgBC,EAAe,EAC9B,UACA,gBACA,YACA,UACA,cACA,cACA,mBACA,SACA,cAAW,WACX,WACA,aACA,YACA,kBACA,qBACA,+BACA,qBACA,eACA,cACA,qBACA,qBACuB;CACvB,IAAMC,IAAOC,GACPC,IAAY,OAAOC,KAAU,WAAWA,IAAQ,IAChDC,IACLC,MACCC,KAAaC,IACb,kBAAChB,GAAD;EAAQ,WAAWiB,EAAG,0CAA0CC,CAAc;EAA9E,UAAA,CACE,CAAC,CAACH,KAAa,kBAACd,GAAD;GAAa,KAAKc;GAAW,KAAKI,KAAaR;EAAY,CAAA,GAC3E,kBAACZ,GAAD,EAAA,UAAiBiB,KAAkB,kBAACnB,GAAD;GAAU,OAAOc;GAAW,UAAS;EAAe,CAAA,EAAkB,CAAA,CAClG;CACL,CAAA,IAAAF,IACH,kBAACX,GAAD;EACC,MAAMW;EACN,OAAM;EACN,MAAMW;EACN,WAAWH,EAAG,6DAA6DC,CAAc;CACzF,CAAA,IACE;CAEL,OACC,kBAACd,GAAD;EACU;EACF;EACM;EACb,SAASS;EACT,aACCQ,IACC,kBAAC7B,GAAD;GACC,aAAU;GACV,WAAU;GACV,KAAI;GACJ,WAAU;GAET,UAAA6B;EACK,CAAA,IACJ,KAAA;EAEL,kBACCC,IACC,kBAAC9B,GAAD;GACC,aAAU;GACV,WAAU;GACV,KAAI;GACJ,WAAU;GAET,UAAA8B;EACK,CAAA,IACJ,KAAA;EAEI;EACM;EACG;EACU;EACV;EACN;EACZ,eAAe;EACf,WAAWL,EAAG,8BAA8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AACa,GAAD;EACC,GAAIvB;EACJ,SAASG;EACT,WAAWhB,EAAG,oCAAoCM,CAAS;EAC3D,SAASgB;EACT,OAAO;GAAE,GAAGF;GAAO,SAASA,GAAO,WAAWE;EAAY;CAC1D,CAAA;AAEH;AAEA,SAAS2B,EAAa,EACrB,UACA,gBACA,YACA,iBACA,aACA,WACA,aAAU,MACV,aAAU,QACV,cACA,qBACA,WACkD;CAClD,OACC,kBAAChE,GAAD;EACC,kBAAgBiE;EAChB,aAAWA;EACJ;EACM;EACJ;EACK;EACd,YAAYC;EACH;EACA;EACT,WAAWnD,EAAG,GAAGkD,EAAK,cAAc5C,CAAS;EAC3B;EAEjB;CACY,CAAA;AAEhB;AAEA,SAAgB8C,EAAuB,EACtC,aACA,qBAAkB,GAClB,mBAAgB,IAChB,SACA,SACA,aACA,qBACA,GAAGvC,KAC4B;CAC/B,OACC,kBAACoC,GAAD;EACC,GAAIpC;EACJ,MAAK;EACL,kBAAkBb,EAAG,uDAAuDiC,CAAgB;EAH7F,UAAA;GAKE,CAAC,CAAC5B,GAAU,UACZ,kBAACnB,GAAD;IAAc,SAAQ;IAAY,OAAOmB;IAAU,SAASgD;IAAiB,SAASC,IAAgB,YAAY;GAAY,CAAA;GAE9HxB;GACApB;GACA,CAAC,CAAC6C,KACF,kBAACjF,GAAD;IAAM,MAAK;IAAK,MAAK;IAAY,WAAU;IACzC,UAAAiF;GACI,CAAA;EAEM;;AAEhB"}
|
|
1
|
+
{"version":3,"file":"resource.js","names":["cn","Text","Stack","surfaceRecipes","Card","MetadataList","EmptyState","ResourceActionBar","sticky","className","leading","children","trailing","ResourceEmptyState","ariaLabel","props","RESOURCE_BLOCK_HOOKS","RESOURCE_BLOCK_CLASSES","ResourceCard","padding","footer","name","contentClassName","ResourceDetailsSection","metadata","metadataColumns","metadataDense","body","help"],"sources":["../../src/components/features/resource/resource.tsx"],"sourcesContent":["/** Resource workspace parts that compose inside a Page: the action bar, details sections and the empty state. */\nimport { Card } from '../../base/cards';\nimport { MetadataList } from '../../base/metadata-list';\nimport { EmptyState } from '../../blocks/data-display';\nimport { Stack } from '../../base/structure';\nimport { Text } from '../../typography';\nimport { cn } from '../../../lib/utils';\nimport { surfaceRecipes } from '../../../lib/surface-recipes';\n\nimport type {\n\tResourceActionBarProps,\n\tResourceDetailsSectionProps,\n\tResourceEmptyStateProps,\n} from './resource.types';\n\nexport function ResourceActionBar({ children, leading, trailing, sticky = false, className }: ResourceActionBarProps) {\n\treturn (\n\t\t<div\n\t\t\tdata-component=\"resource-action-bar\"\n\t\t\tdata-slot=\"resource-action-bar\"\n\t\t\tclassName={cn(\n\t\t\t\t'resource-action-bar--component box-border px-surface py-row-y-lg',\n\t\t\t\tsurfaceRecipes.frame,\n\t\t\t\tsticky && 'sticky top-shell-header z-30',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<Stack\n\t\t\t\tdirection={{ base: 'vertical', sm: 'horizontal' }}\n\t\t\t\tgap=\"lg\"\n\t\t\t\talign={{ sm: 'center' }}\n\t\t\t\tjustify={{ sm: 'between' }}\n\t\t\t\twrap={{ sm: false }}\n\t\t\t\tclassName=\"resource-action-bar--layout\"\n\t\t\t>\n\t\t\t\t<Stack\n\t\t\t\t\tdata-slot=\"resource-action-leading\"\n\t\t\t\t\tdirection=\"horizontal\"\n\t\t\t\t\tgap=\"md\"\n\t\t\t\t\tclassName=\"resource-action-bar--leading flex-1\"\n\t\t\t\t>\n\t\t\t\t\t{leading ?? children}\n\t\t\t\t</Stack>\n\t\t\t\t{!!trailing && (\n\t\t\t\t\t<Stack\n\t\t\t\t\t\tdata-slot=\"resource-action-trailing\"\n\t\t\t\t\t\tdirection=\"horizontal\"\n\t\t\t\t\t\tgap=\"md\"\n\t\t\t\t\t\tclassName=\"resource-action-bar--trailing shrink-0\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{trailing}\n\t\t\t\t\t</Stack>\n\t\t\t\t)}\n\t\t\t</Stack>\n\t\t</div>\n\t);\n}\n\nexport function ResourceEmptyState({ 'aria-label': ariaLabel, ...props }: ResourceEmptyStateProps) {\n\treturn (\n\t\t<EmptyState\n\t\t\t{...props}\n\t\t\tariaLabel={ariaLabel}\n\t\t\tdata-component=\"resource-empty-state\"\n\t\t\tdata-slot=\"resource-empty-state\"\n\t\t\tclassName={cn('resource-empty-state--component', props.className)}\n\t\t/>\n\t);\n}\n\n/*\n * Resource sections used to render through the deprecated ContentBlock adapter\n * and now compose Card directly. They keep the DOM hooks that adapter painted\n * (it replaced the section's own data attributes with its own), so consumer\n * selectors written against them still match. The section's identity stays on\n * its `--component` class.\n */\nconst RESOURCE_BLOCK_HOOKS = { 'data-component': 'content-block', 'data-slot': 'content-block' } as const;\nconst RESOURCE_BLOCK_CLASSES = {\n\troot: 'content-block--component',\n\theader: 'content-block--header',\n\tcontent: 'content-block--content',\n\tfooter: 'content-block--footer',\n} as const;\n\nfunction ResourceCard({\n\ttitle,\n\tdescription,\n\tactions,\n\theaderAction,\n\tchildren,\n\tfooter,\n\tpadding = 'md',\n\tsurface = 'card',\n\tclassName,\n\tcontentClassName,\n\tname,\n}: ResourceDetailsSectionProps & { name: string }) {\n\treturn (\n\t\t<Card\n\t\t\t{...RESOURCE_BLOCK_HOOKS}\n\t\t\tdata-padding={padding}\n\t\t\ttitle={title}\n\t\t\tdescription={description}\n\t\t\tactions={actions}\n\t\t\theaderAction={headerAction}\n\t\t\tfooterSlot={footer}\n\t\t\tpadding={padding}\n\t\t\tsurface={surface}\n\t\t\tclassName={cn(RESOURCE_BLOCK_CLASSES.root, `${name}--component`, className)}\n\t\t\theaderClassName={RESOURCE_BLOCK_CLASSES.header}\n\t\t\tcontentClassName={cn(RESOURCE_BLOCK_CLASSES.content, contentClassName)}\n\t\t\tfooterClassName={RESOURCE_BLOCK_CLASSES.footer}\n\t\t>\n\t\t\t{children}\n\t\t</Card>\n\t);\n}\n\nexport function ResourceDetailsSection({\n\tmetadata,\n\tmetadataColumns = 2,\n\tmetadataDense = false,\n\tbody,\n\thelp,\n\tchildren,\n\tcontentClassName,\n\t...props\n}: ResourceDetailsSectionProps) {\n\treturn (\n\t\t<ResourceCard\n\t\t\t{...props}\n\t\t\tname=\"resource-details-section\"\n\t\t\tcontentClassName={cn('resource-details-section--content grid gap-space-xl', contentClassName)}\n\t\t>\n\t\t\t{!!metadata?.length && (\n\t\t\t\t<MetadataList adaptTo=\"container\" items={metadata} columns={metadataColumns} density={metadataDense ? 'compact' : 'default'} />\n\t\t\t)}\n\t\t\t{body}\n\t\t\t{children}\n\t\t\t{!!help && (\n\t\t\t\t<Text size=\"xs\" type=\"secondary\" className=\"resource-details-section--help\">\n\t\t\t\t\t{help}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t</ResourceCard>\n\t);\n}\n"],"mappings":";;;;;;;;;;AAeA,SAAgBO,EAAkB,EAAE,aAAU,YAAS,aAAU,YAAS,IAAO,gBAAqC;CACrH,OACC,kBAAC,OAAD;EACC,kBAAe;EACf,aAAU;EACV,WAAWP,EACV,oEACAG,EAAe,OACfK,KAAU,gCACVC,CACD;EAEA,UAAA,kBAACP,GAAD;GACC,WAAW;IAAE,MAAM;IAAY,IAAI;GAAa;GAChD,KAAI;GACJ,OAAO,EAAE,IAAI,SAAS;GACtB,SAAS,EAAE,IAAI,UAAU;GACzB,MAAM,EAAE,IAAI,GAAM;GAClB,WAAU;GANX,UAAA,CAQC,kBAACA,GAAD;IACC,aAAU;IACV,WAAU;IACV,KAAI;IACJ,WAAU;IAET,UAAAQ,KAAWC;GACN,CAAA,GACN,CAAC,CAACC,KACF,kBAACV,GAAD;IACC,aAAU;IACV,WAAU;IACV,KAAI;IACJ,WAAU;IAET,UAAAU;GACK,CAAA,CAEF;;CACH,CAAA;AAEP;AAEA,SAAgBC,EAAmB,EAAE,cAAcC,GAAW,GAAGC,KAAkC;CAClG,OACC,kBAACT,GAAD;EACC,GAAIS;EACO;EACX,kBAAe;EACf,aAAU;EACV,WAAWf,EAAG,mCAAmCe,EAAM,SAAS;CAChE,CAAA;AAEH;AASA,IAAMC,IAAuB;CAAE,kBAAkB;CAAiB,aAAa;AAAgB,GACzFC,IAAyB;CAC9B,MAAM;CACN,QAAQ;CACR,SAAS;CACT,QAAQ;AACT;AAEA,SAASC,EAAa,EACrB,UACA,gBACA,YACA,iBACA,aACA,WACA,aAAU,MACV,aAAU,QACV,cACA,qBACA,WACkD;CAClD,OACC,kBAACd,GAAD;EACC,GAAIY;EACJ,gBAAcG;EACP;EACM;EACJ;EACK;EACd,YAAYC;EACH;EACA;EACT,WAAWpB,EAAGiB,EAAuB,MAAM,GAAGI,EAAK,cAAcZ,CAAS;EAC1E,iBAAiBQ,EAAuB;EACxC,kBAAkBjB,EAAGiB,EAAuB,SAASK,CAAgB;EACrE,iBAAiBL,EAAuB;EAEvC;CACI,CAAA;AAER;AAEA,SAAgBM,EAAuB,EACtC,aACA,qBAAkB,GAClB,mBAAgB,IAChB,SACA,SACA,aACA,qBACA,GAAGR,KAC4B;CAC/B,OACC,kBAACG,GAAD;EACC,GAAIH;EACJ,MAAK;EACL,kBAAkBf,EAAG,uDAAuDsB,CAAgB;EAH7F,UAAA;GAKE,CAAC,CAACE,GAAU,UACZ,kBAACnB,GAAD;IAAc,SAAQ;IAAY,OAAOmB;IAAU,SAASC;IAAiB,SAASC,IAAgB,YAAY;GAAY,CAAA;GAE9HC;GACAhB;GACA,CAAC,CAACiB,KACF,kBAAC3B,GAAD;IAAM,MAAK;IAAK,MAAK;IAAY,WAAU;IACzC,UAAA2B;GACI,CAAA;EAEM;;AAEhB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "../utils-
|
|
3
|
-
import { t } from "../rich-text-editor-toolbar-
|
|
2
|
+
import { t as e } from "../utils-BVbAG2J6.js";
|
|
3
|
+
import { t } from "../rich-text-editor-toolbar-DYbRJARB.js";
|
|
4
4
|
import { t as n } from "../rich-text-editor.strings-CB59ekH2.js";
|
|
5
|
-
import { n as r, t as i } from "../rich-text-editor-
|
|
5
|
+
import { n as r, t as i } from "../rich-text-editor-Z6cQepsA.js";
|
|
6
6
|
import { useMemo as a, useRef as o } from "react";
|
|
7
7
|
import { jsx as s } from "react/jsx-runtime";
|
|
8
8
|
import { useController as c, useFormContext as l } from "react-hook-form";
|