themelia-react-ui 2.0.5 → 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 +326 -0
- package/MIGRATION.md +858 -0
- package/README.md +35 -24
- package/dist/{accordion-B9MHG0cT.js → accordion-DNVqwEIC.js} +37 -37
- 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-Dg_69lPS.js → attachment-D2-fpfmv.js} +15 -15
- package/dist/{attachment-Dg_69lPS.js.map → attachment-D2-fpfmv.js.map} +1 -1
- package/dist/{auth-DTkkshS8.js → auth-g_oUTDDC.js} +236 -243
- package/dist/auth-g_oUTDDC.js.map +1 -0
- package/dist/{avatar-CeZaFmNH.js → avatar-Ca3Ihrq4.js} +4 -4
- package/dist/{avatar-CeZaFmNH.js.map → avatar-Ca3Ihrq4.js.map} +1 -1
- package/dist/{badge-xIiV_E7f.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 +208 -198
- 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 +8 -14
- 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-Cb8cuvyy.js → batch-action-bar-D6MZQNnC.js} +10 -10
- package/dist/{batch-action-bar-Cb8cuvyy.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 +398 -354
- 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 +173 -1392
- 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 +1533 -1399
- 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-CQ9JSlez.js +136 -0
- package/dist/breadcrumbs-CQ9JSlez.js.map +1 -0
- package/dist/{button-S2Cubiiz.js → button-rd6FiHfQ.js} +12 -8
- package/dist/button-rd6FiHfQ.js.map +1 -0
- package/dist/{buttons-BedGfygC.js → buttons-pZVgPTZn.js} +230 -246
- package/dist/buttons-pZVgPTZn.js.map +1 -0
- package/dist/{cards-rNX1M4Xn.js → cards-CgWyqvgZ.js} +25 -22
- package/dist/{cards-rNX1M4Xn.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-Darg_0Kv.js → chart-CygRCyIZ.js} +5 -5
- package/dist/{chart-Darg_0Kv.js.map → chart-CygRCyIZ.js.map} +1 -1
- package/dist/{checkbox-fflqmODR.js → checkbox-Dy5_XBMZ.js} +4 -4
- package/dist/{checkbox-fflqmODR.js.map → checkbox-Dy5_XBMZ.js.map} +1 -1
- package/dist/{choice-inputs-zUgBZfE4.js → choice-inputs-oJEsrb5Y.js} +195 -184
- package/dist/choice-inputs-oJEsrb5Y.js.map +1 -0
- package/dist/{code-block-BzmM9Eig.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-gDh1v6O4.js → collection-content-D7SoDlYd.js} +3 -3
- package/dist/{collection-content-gDh1v6O4.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/choice-types.d.ts +4 -0
- package/dist/components/base/choice-inputs/pill-radio-group.d.ts +7 -6
- 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/combobox/combobox-field.d.ts +2 -2
- package/dist/components/base/command/command.d.ts +1 -1
- package/dist/components/base/date-pickers/date-picker-internals.d.ts +3 -1
- package/dist/components/base/date-pickers/datepicker.types.d.ts +11 -7
- package/dist/components/base/date-pickers/time-picker.d.ts +17 -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/feedback/state-display.d.ts +5 -1
- package/dist/components/base/feedback/state-display.strings.d.ts +9 -0
- package/dist/components/base/forms/form-field.d.ts +7 -2
- package/dist/components/base/forms/workflow.d.ts +2 -2
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +4 -1
- package/dist/components/base/forms-numeric/decimal-input.d.ts +2 -2
- package/dist/components/base/forms-numeric/dimensions-input.d.ts +13 -18
- package/dist/components/base/forms-numeric/index.d.ts +3 -3
- package/dist/components/base/forms-numeric/numeric-composite-field.d.ts +12 -0
- package/dist/components/base/forms-numeric/weight-input.d.ts +6 -1
- 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 +17 -8
- 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 +6 -1
- 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 +40 -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/avatar-upload.d.ts +2 -1
- package/dist/components/base/upload/file-upload.validation.d.ts +37 -1
- package/dist/components/base/upload/image-upload.d.ts +4 -1
- 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 +8 -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-reasoning/types.d.ts +2 -0
- package/dist/components/blocks/ai/ai-sources/ai-sources.d.ts +1 -1
- package/dist/components/blocks/ai/ai-sources/types.d.ts +10 -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 +8 -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 +7 -3
- package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +2 -0
- package/dist/components/blocks/analytics/metric-grid/metric-grid.d.ts +4 -5
- package/dist/components/blocks/analytics/types.d.ts +13 -4
- 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 +12 -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 +10 -3
- 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 +46 -22
- package/dist/components/features/activities/hooks/use-activity-feed.d.ts +6 -0
- package/dist/components/features/activities/hooks/use-activity-resources.d.ts +2 -1
- 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/hooks/use-ai-chat-scroll.d.ts +1 -1
- 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 +20 -4
- 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 +4 -3
- package/dist/components/features/combobox/hooks/use-combobox-state.d.ts +1 -0
- package/dist/components/features/combobox/hooks/use-load-more.d.ts +1 -0
- package/dist/components/features/combobox/index.d.ts +1 -1
- package/dist/components/features/combobox/types.d.ts +68 -37
- 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 +19 -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/date-facet.d.ts +4 -2
- package/dist/components/features/filters/facets/range-facet.d.ts +24 -7
- 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 +75 -8
- 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/date-filter-content.d.ts +3 -2
- 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-popover-content.d.ts +4 -2
- package/dist/components/features/filters/partials/filter-tabs.d.ts +2 -1
- package/dist/components/features/filters/partials/range-filter-content.d.ts +12 -0
- package/dist/components/features/filters/partials/regular-filter-content.d.ts +1 -1
- package/dist/components/features/filters/utils/filter-utils.d.ts +34 -5
- 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 +39 -3
- package/dist/components/features/media-library/media-library.types.d.ts +82 -9
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +3 -3
- package/dist/components/features/mentions/hooks/use-mentions-search.d.ts +7 -0
- package/dist/components/features/mentions/hooks/use-mentions.d.ts +16 -1
- 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 +12 -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/hooks/use-overlay-visibility.d.ts +2 -2
- 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 +26 -8
- package/dist/components/features/questionnaire/questionnaire.types.d.ts +7 -2
- 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 -147
- 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/form-rich-text-editor.d.ts +1 -1
- package/dist/components/features/rich-text-editor/partials/caret-helpers.d.ts +5 -7
- package/dist/components/features/rich-text-editor/partials/editor-field-aria.d.ts +14 -0
- 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 +5 -4
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +1 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +30 -4
- package/dist/components/features/schema-form/hooks/use-schema-form.d.ts +10 -1
- package/dist/components/features/schema-form/partials/schema-form-field.d.ts +3 -1
- 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/schema-form/schema-form.utils.d.ts +1 -1
- package/dist/components/features/suggestions/suggestions.strings.d.ts +14 -0
- package/dist/components/features/suggestions/suggestions.types.d.ts +13 -5
- 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/index.d.ts +1 -0
- 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 +37 -12
- 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 +4 -0
- package/dist/components/features/table/table.types.d.ts +91 -49
- 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 +19 -8
- 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 +6 -4
- 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/navigation/side-nav.d.ts +3 -2
- package/dist/components/layout/normalize-layout-path.d.ts +1 -0
- 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 +4 -6
- 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 +17 -7
- package/dist/components/layout/sidebar/sidebar.context.d.ts +1 -0
- package/dist/components/layout/sidebar/sidebar.types.d.ts +12 -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 +11 -3
- package/dist/components/primitives/money.d.ts +2 -2
- package/dist/components/primitives/number.d.ts +3 -2
- package/dist/components/typography/heading.d.ts +9 -3
- package/dist/components/typography/index.d.ts +1 -1
- package/dist/components/typography/rich-text/rich-text-tree.d.ts +7 -5
- 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-CIxwbZt5.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-DIznBqiT.js → copyable-Bmr14W0d.js} +6 -6
- package/dist/{copyable-DIznBqiT.js.map → copyable-Bmr14W0d.js.map} +1 -1
- package/dist/{data-display-BdgCAw8T.js → data-display-CWe9SOYh.js} +264 -250
- 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-D1keJQIG.js +1617 -0
- 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-KsZLw9Ov.js → display-VlmP1I0i.js} +23 -46
- package/dist/display-VlmP1I0i.js.map +1 -0
- package/dist/{dropdown-menu-CLs8Lihj.js → dropdown-menu-B8hjvbkS.js} +9 -9
- package/dist/{dropdown-menu-CLs8Lihj.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 +767 -700
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +280 -235
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +430 -334
- 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 +347 -313
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +501 -348
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +2 -2
- package/dist/features/global-search.js +250 -210
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +280 -210
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map/style.css +15 -0
- package/dist/features/map.js +435 -404
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +1745 -1195
- 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 +1862 -1759
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +188 -168
- 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 -217
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +28 -19
- package/dist/features/rich-text-editor.js.map +1 -1
- package/dist/features/schema-form.js +380 -287
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +90 -74
- package/dist/features/suggestions.js.map +1 -1
- package/dist/features/table.js +2 -2
- package/dist/features/theme-tweaker.js +718 -627
- 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-DWcNcOjh.js → field-affordance-recipes-DfbMadot.js} +13 -9
- package/dist/field-affordance-recipes-DfbMadot.js.map +1 -0
- package/dist/field-control-attributes-B6i335wr.js +18 -0
- package/dist/field-control-attributes-B6i335wr.js.map +1 -0
- package/dist/field-state-recipes-EtCxpEy3.js +18 -0
- 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-BdfCwSoQ.js +74 -0
- package/dist/form-field-BdfCwSoQ.js.map +1 -0
- package/dist/{form-sizing-Bs2qFUeE.js → form-sizing-DE_dZw32.js} +3 -3
- package/dist/{form-sizing-Bs2qFUeE.js.map → form-sizing-DE_dZw32.js.map} +1 -1
- package/dist/{forms-C0RGnJTe.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-DMMxG__r.js → header-Cq3G0ZRP.js} +163 -158
- package/dist/header-Cq3G0ZRP.js.map +1 -0
- package/dist/hooks/use-files.d.ts +2 -0
- package/dist/{hooks-DB6CJ4MR.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-DZF-YjQp.js → icon-badge-B0Kq7wom.js} +3 -3
- package/dist/{icon-badge-DZF-YjQp.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-DMBwAZmr.js → input-2YrgTUrz.js} +3 -3
- package/dist/{input-DMBwAZmr.js.map → input-2YrgTUrz.js.map} +1 -1
- package/dist/{input-CvyDQlY7.js → input-DfJyrjoR.js} +7 -7
- package/dist/{input-CvyDQlY7.js.map → input-DfJyrjoR.js.map} +1 -1
- package/dist/{interaction-recipes-XR9ZpVYL.js → interaction-recipes-DmuS1ase.js} +2 -2
- package/dist/{interaction-recipes-XR9ZpVYL.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-DbtnyAtd.js +33 -0
- 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-control-attributes.d.ts +11 -0
- package/dist/lib/field-state-recipes.d.ts +8 -0
- package/dist/lib/focus-recipes.d.ts +7 -0
- package/dist/lib/format.d.ts +26 -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 +33 -3
- package/dist/lib/theme-scope.d.ts +17 -1
- package/dist/lib/token-merge.generated.d.ts +19 -25
- 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-BiiVrRrm.js +138 -0
- package/dist/message-BiiVrRrm.js.map +1 -0
- package/dist/{metadata-list-C3MkU-Om.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-CmqaQR_G.js +257 -0
- package/dist/navigation-CmqaQR_G.js.map +1 -0
- package/dist/normalize-layout-path-BmEgg6fu.js +14 -0
- package/dist/normalize-layout-path-BmEgg6fu.js.map +1 -0
- package/dist/number-NFWKIoiK.js +340 -0
- package/dist/number-NFWKIoiK.js.map +1 -0
- package/dist/{overflow-tab-bar-IVFVQFV6.js → overflow-tab-bar-DV7HE_3t.js} +8 -8
- package/dist/{overflow-tab-bar-IVFVQFV6.js.map → overflow-tab-bar-DV7HE_3t.js.map} +1 -1
- package/dist/{overlays-BSgCtM2v.js → overlays-D-gAIfPF.js} +369 -364
- 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-7P3sfE9u.js → page-header-commands-elelNOfd.js} +29 -29
- package/dist/{page-header-commands-7P3sfE9u.js.map → page-header-commands-elelNOfd.js.map} +1 -1
- package/dist/{pagination-CgCjElfu.js → pagination-BuSWw1US.js} +22 -23
- package/dist/pagination-BuSWw1US.js.map +1 -0
- package/dist/popover-BpMxbqEK.js +205 -0
- package/dist/popover-BpMxbqEK.js.map +1 -0
- package/dist/{popover-menu-DlnQ2zlR.js → popover-menu-CO-_iiuz.js} +7 -7
- package/dist/{popover-menu-DlnQ2zlR.js.map → popover-menu-CO-_iiuz.js.map} +1 -1
- package/dist/{popover.recipes-DdiEp0rd.js → popover.recipes-BqkdvlZn.js} +3 -4
- package/dist/{popover.recipes-DdiEp0rd.js.map → popover.recipes-BqkdvlZn.js.map} +1 -1
- package/dist/{portal-recipes-BpsV_iRw.js → portal-recipes-BPeS4rGB.js} +2 -2
- package/dist/{portal-recipes-BpsV_iRw.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-BJhQP9WX.js → progress-RARK8AjB.js} +5 -5
- package/dist/{progress-BJhQP9WX.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-Cypm9__d.js +44 -0
- package/dist/rich-text-Cypm9__d.js.map +1 -0
- 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/{scroll-area-B0dB2cBi.js → scroll-area-B9HKbji0.js} +3 -3
- package/dist/{scroll-area-B0dB2cBi.js.map → scroll-area-B9HKbji0.js.map} +1 -1
- package/dist/{separator-Ct_WSWTJ.js → separator-DaDe26sf.js} +3 -3
- package/dist/separator-DaDe26sf.js.map +1 -0
- package/dist/{separator-Bb17I4pu.js → separator-KGsNXt2J.js} +2 -2
- package/dist/{separator-Bb17I4pu.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-f9gRWXIR.js → sidebar-C-iQ_TJP.js} +379 -350
- 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-BapcJd9C.js → skeleton-Cab_KgVo.js} +13 -13
- package/dist/skeleton-Cab_KgVo.js.map +1 -0
- package/dist/{smart-card-CW0hjetE.js → smart-card-C59z6KFO.js} +217 -210
- package/dist/smart-card-C59z6KFO.js.map +1 -0
- package/dist/{structure-DuxKl954.js → structure-DElaQwwN.js} +2 -2
- package/dist/{structure-DuxKl954.js.map → structure-DElaQwwN.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{surface-recipes-BKRVW8Os.js → surface-recipes-DV6rrOFq.js} +11 -3
- package/dist/surface-recipes-DV6rrOFq.js.map +1 -0
- package/dist/table-CSRUgpdK.js +180 -0
- 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-WnHfV2pM.js +192 -0
- package/dist/tabs-WnHfV2pM.js.map +1 -0
- package/dist/{text-inputs-B1culiSK.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-CzUJHnFs.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-BQnine1k.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-DMuMYJFT.js +875 -0
- package/dist/upload-DMuMYJFT.js.map +1 -0
- package/dist/{usage-card-BeSLY0i0.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-B6kKb8jB.js → utils-BVbAG2J6.js} +128 -112
- 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/edit.tsx +3 -3
- 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 +27 -23
- package/docs/consumer-skill/references/analytics.md +33 -4
- 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 +25852 -32067
- package/docs/consumer-skill/references/composition.md +42 -21
- package/docs/consumer-skill/references/design-contract.md +1 -0
- package/docs/consumer-skill/references/discovery.md +8 -5
- package/docs/consumer-skill/references/installation.md +59 -10
- package/docs/consumer-skill/references/integration.md +28 -5
- package/docs/consumer-skill/references/product-composition.md +2 -2
- package/docs/consumer-skill/references/public-api.json +726 -641
- package/docs/consumer-skill/references/review.md +57 -15
- package/docs/consumer-skill/references/rhf-workflows.md +72 -0
- package/docs/consumer-skill/references/screen-archetypes.md +2 -2
- package/docs/consumer-skill/references/theming.md +8 -3
- 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 +178 -44
- 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 +74 -10
- 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 +12 -13
- package/templates/README.md +3 -2
- package/templates/admin-shell-template.tsx +50 -11
- package/templates/analytics-operations-template.tsx +20 -24
- package/templates/customers-template.tsx +30 -25
- 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-B9MHG0cT.js.map +0 -1
- package/dist/action-menu-Dr8K-ghE.js +0 -284
- package/dist/action-menu-Dr8K-ghE.js.map +0 -1
- package/dist/ai-artifact-C58tQcBy.js +0 -1185
- package/dist/ai-artifact-C58tQcBy.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-B_IuNWOo.js +0 -321
- package/dist/app-shell-B_IuNWOo.js.map +0 -1
- package/dist/auth-DTkkshS8.js.map +0 -1
- package/dist/badge-xIiV_E7f.js.map +0 -1
- package/dist/base/sheet.js +0 -3
- package/dist/breadcrumbs-J-K2kl4c.js +0 -129
- package/dist/breadcrumbs-J-K2kl4c.js.map +0 -1
- package/dist/button-S2Cubiiz.js.map +0 -1
- package/dist/buttons-BedGfygC.js.map +0 -1
- package/dist/cascader-B1MiqkBq.js +0 -439
- package/dist/cascader-B1MiqkBq.js.map +0 -1
- package/dist/choice-inputs-zUgBZfE4.js.map +0 -1
- package/dist/code-block-BzmM9Eig.js.map +0 -1
- package/dist/collapsible-BkAI_XD4.js +0 -81
- package/dist/collapsible-BkAI_XD4.js.map +0 -1
- package/dist/combobox-BEx0vJgF.js +0 -362
- package/dist/combobox-BEx0vJgF.js.map +0 -1
- package/dist/combobox-BwzoXFSG.js +0 -884
- package/dist/combobox-BwzoXFSG.js.map +0 -1
- package/dist/command-CrlPIL6m.js +0 -425
- package/dist/command-CrlPIL6m.js.map +0 -1
- package/dist/comments-Dmpp0YIc.js +0 -1169
- package/dist/comments-Dmpp0YIc.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 -16
- 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-CIxwbZt5.js.map +0 -1
- package/dist/data-display-BdgCAw8T.js.map +0 -1
- package/dist/date-Cq8ioE4o.js +0 -144
- package/dist/date-Cq8ioE4o.js.map +0 -1
- package/dist/date-picker-RlIzKom_.js +0 -1551
- package/dist/date-picker-RlIzKom_.js.map +0 -1
- package/dist/date-pickers-DY-CpXS1.js +0 -179
- package/dist/date-pickers-DY-CpXS1.js.map +0 -1
- package/dist/display-KsZLw9Ov.js.map +0 -1
- package/dist/features/sync.js +0 -142
- package/dist/features/sync.js.map +0 -1
- package/dist/feedback-Dm4izqFn.js +0 -240
- package/dist/feedback-Dm4izqFn.js.map +0 -1
- package/dist/field-affordance-recipes-DWcNcOjh.js.map +0 -1
- package/dist/field-state-recipes-BVA2CWHo.js +0 -12
- package/dist/field-state-recipes-BVA2CWHo.js.map +0 -1
- package/dist/filters-DzgSJpMK.js +0 -2257
- package/dist/filters-DzgSJpMK.js.map +0 -1
- package/dist/focus-recipes-B653VaLq.js.map +0 -1
- package/dist/form-field-BriWAXyg.js +0 -63
- package/dist/form-field-BriWAXyg.js.map +0 -1
- package/dist/forms-C0RGnJTe.js.map +0 -1
- package/dist/forms-numeric-DIhghX1Q.js +0 -910
- package/dist/forms-numeric-DIhghX1Q.js.map +0 -1
- package/dist/header-DMMxG__r.js.map +0 -1
- package/dist/hooks-DB6CJ4MR.js.map +0 -1
- package/dist/http-D_6rOnzU.js.map +0 -1
- package/dist/item-DjCcM18E.js +0 -277
- package/dist/item-DjCcM18E.js.map +0 -1
- package/dist/layout.types-Cn7aUzJp.js +0 -20
- package/dist/layout.types-Cn7aUzJp.js.map +0 -1
- package/dist/media-gallery-C-vChPmE.js +0 -203
- package/dist/media-gallery-C-vChPmE.js.map +0 -1
- package/dist/mentions-0_4nWuI-.js +0 -570
- package/dist/mentions-0_4nWuI-.js.map +0 -1
- package/dist/message-g8p7eVtN.js +0 -128
- package/dist/message-g8p7eVtN.js.map +0 -1
- package/dist/metadata-list-C3MkU-Om.js.map +0 -1
- package/dist/motion-recipes-DitYv6P2.js.map +0 -1
- package/dist/navigation-C90-oQFq.js +0 -255
- package/dist/navigation-C90-oQFq.js.map +0 -1
- package/dist/navigation-DaRjthVk.js +0 -288
- package/dist/navigation-DaRjthVk.js.map +0 -1
- package/dist/number-CRU3kGuk.js +0 -354
- package/dist/number-CRU3kGuk.js.map +0 -1
- package/dist/overlays-BSgCtM2v.js.map +0 -1
- package/dist/page-DUUKDAjo.js +0 -331
- package/dist/page-DUUKDAjo.js.map +0 -1
- package/dist/pagination-CgCjElfu.js.map +0 -1
- package/dist/popover-B85RenIl.js +0 -201
- package/dist/popover-B85RenIl.js.map +0 -1
- package/dist/primitives-ByWgGUgt.js +0 -380
- package/dist/primitives-ByWgGUgt.js.map +0 -1
- package/dist/receipt-tOc7B3hw.js +0 -116
- package/dist/receipt-tOc7B3hw.js.map +0 -1
- package/dist/rich-text-Dth5E882.js +0 -78
- package/dist/rich-text-Dth5E882.js.map +0 -1
- package/dist/rich-text-editor-C1fOjBTd.js +0 -1195
- package/dist/rich-text-editor-C1fOjBTd.js.map +0 -1
- package/dist/rich-text-editor-toolbar-laT3tpBT.js +0 -98
- package/dist/rich-text-editor-toolbar-laT3tpBT.js.map +0 -1
- package/dist/sanitize-html-DsQmI48u.js +0 -92
- package/dist/sanitize-html-DsQmI48u.js.map +0 -1
- package/dist/separator-Ct_WSWTJ.js.map +0 -1
- package/dist/settings-Bar5wiSo.js +0 -167
- package/dist/settings-Bar5wiSo.js.map +0 -1
- package/dist/sheet-BGPERY55.js +0 -250
- package/dist/sheet-BGPERY55.js.map +0 -1
- package/dist/sidebar-D-JYMMbY.js +0 -686
- package/dist/sidebar-D-JYMMbY.js.map +0 -1
- package/dist/sidebar-f9gRWXIR.js.map +0 -1
- package/dist/skeleton-BapcJd9C.js.map +0 -1
- package/dist/slot-CLF9kLrS.js +0 -16
- package/dist/slot-CLF9kLrS.js.map +0 -1
- package/dist/smart-card-CW0hjetE.js.map +0 -1
- package/dist/surface-recipes-BKRVW8Os.js.map +0 -1
- package/dist/table-B4TE7iOV.js +0 -175
- package/dist/table-B4TE7iOV.js.map +0 -1
- package/dist/table-CFOWY9pQ.js +0 -1536
- package/dist/table-CFOWY9pQ.js.map +0 -1
- package/dist/tabs-e7ko9S2o.js +0 -191
- package/dist/tabs-e7ko9S2o.js.map +0 -1
- package/dist/text-inputs-B1culiSK.js.map +0 -1
- package/dist/timelines-D3Sl9ueq.js +0 -458
- package/dist/timelines-D3Sl9ueq.js.map +0 -1
- package/dist/tooltip-8wz5S_Zr.js +0 -113
- package/dist/tooltip-8wz5S_Zr.js.map +0 -1
- package/dist/tree-CzUJHnFs.js.map +0 -1
- package/dist/typography-BQnine1k.js.map +0 -1
- package/dist/ui-provider-C-74NVLc.js.map +0 -1
- package/dist/upload-BOW6U2tI.js +0 -855
- package/dist/upload-BOW6U2tI.js.map +0 -1
- package/dist/upload-queue-qUXn1ykN.js +0 -409
- package/dist/upload-queue-qUXn1ykN.js.map +0 -1
- package/dist/usage-card-BeSLY0i0.js.map +0 -1
- package/dist/utils-B6kKb8jB.js.map +0 -1
- package/dist/value-inputs-skdVB2zh.js +0 -980
- package/dist/value-inputs-skdVB2zh.js.map +0 -1
- package/dist/value-typography-uAmWUAL1.js +0 -116
- package/dist/value-typography-uAmWUAL1.js.map +0 -1
- package/dist/workspace-DHeHv0qw.js +0 -411
- package/dist/workspace-DHeHv0qw.js.map +0 -1
|
@@ -1,3 +1,204 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { useStrings as e } from "../lib/strings.js";
|
|
3
|
+
import { t } from "../utils-BVbAG2J6.js";
|
|
4
|
+
import { c as n } from "../typography-C0dELqYV.js";
|
|
5
|
+
import { t as r } from "../focus-recipes-DSkiUvUp.js";
|
|
6
|
+
import { r as i, t as a } from "../structure-DElaQwwN.js";
|
|
7
|
+
import { i as o } from "../tone-recipes-BPsRAvhu.js";
|
|
8
|
+
import { a as s } from "../surface-recipes-DV6rrOFq.js";
|
|
9
|
+
import { t as c } from "../badge-oGiXblW7.js";
|
|
10
|
+
import { n as l } from "../field-affordance-recipes-DfbMadot.js";
|
|
11
|
+
import { n as u, t as d } from "../upload.recipes-BbxTqrCT.js";
|
|
12
|
+
import { forwardRef as f, useCallback as p, useEffect as m, useId as h, useMemo as g, useRef as _, useState as v } from "react";
|
|
13
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
14
|
+
import { ImagePlus as x, X as S } from "lucide-react";
|
|
15
|
+
import { DndContext as C, KeyboardSensor as w, PointerSensor as T, useSensor as E, useSensors as D } from "@dnd-kit/core";
|
|
16
|
+
import { SortableContext as O, rectSortingStrategy as k, sortableKeyboardCoordinates as ee, useSortable as A } from "@dnd-kit/sortable";
|
|
17
|
+
import { CSS as j } from "@dnd-kit/utilities";
|
|
18
|
+
//#region src/components/base/media-gallery/media-gallery.tsx
|
|
19
|
+
var M = {
|
|
20
|
+
addInstruction: "Drop or click to add images",
|
|
21
|
+
helper: "",
|
|
22
|
+
dragOver: "Release to select",
|
|
23
|
+
cover: "Cover",
|
|
24
|
+
removeAria: "Remove image",
|
|
25
|
+
maxReached: "You have reached the maximum number of images.",
|
|
26
|
+
pickedUp: "Picked up {name}.",
|
|
27
|
+
movedTo: "{name} moved to position {position}.",
|
|
28
|
+
dropped: "Dropped {name}.",
|
|
29
|
+
cancelled: "Sorting cancelled for {name}."
|
|
30
|
+
}, N = 0, P = () => `media-${Date.now().toString(36)}-${(N++).toString(36)}`;
|
|
31
|
+
function F({ item: e, isFirst: n, disabled: i, onRemove: a, strings: u, tileClassName: d }) {
|
|
32
|
+
let { attributes: f, listeners: p, setNodeRef: m, setActivatorNodeRef: h, transform: g, transition: _, isDragging: v } = A({
|
|
33
|
+
id: e.id,
|
|
34
|
+
disabled: i
|
|
35
|
+
}), x = {
|
|
36
|
+
transform: j.Transform.toString(g),
|
|
37
|
+
transition: _
|
|
38
|
+
};
|
|
39
|
+
return /* @__PURE__ */ b("div", {
|
|
40
|
+
ref: m,
|
|
41
|
+
style: x,
|
|
42
|
+
className: t("media-gallery--item", "group relative aspect-square overflow-hidden rounded-radius border border-border/60", s.wash, v && `z-10 shadow-lg ring-2 ${o.primary.halo}`, i && "opacity-50", d),
|
|
43
|
+
children: [/* @__PURE__ */ b("div", {
|
|
44
|
+
ref: h,
|
|
45
|
+
"aria-label": e.file.name,
|
|
46
|
+
className: t(`absolute inset-0 cursor-grab outline-none active:cursor-grabbing ${r.inset}`, i && "pointer-events-none"),
|
|
47
|
+
...f,
|
|
48
|
+
...p,
|
|
49
|
+
children: [/* @__PURE__ */ y("img", {
|
|
50
|
+
src: e.previewUrl,
|
|
51
|
+
alt: e.file.name,
|
|
52
|
+
className: "absolute inset-0 size-full object-cover",
|
|
53
|
+
draggable: !1
|
|
54
|
+
}), n && /* @__PURE__ */ y(c, {
|
|
55
|
+
size: "sm",
|
|
56
|
+
tone: "secondary",
|
|
57
|
+
className: "media-gallery--cover absolute start-space-sm top-space-sm bg-card shadow-sm ring-1 ring-border",
|
|
58
|
+
children: u.cover
|
|
59
|
+
})]
|
|
60
|
+
}), /* @__PURE__ */ y("button", {
|
|
61
|
+
type: "button",
|
|
62
|
+
"aria-label": `${u.removeAria}: ${e.file.name}`,
|
|
63
|
+
disabled: i,
|
|
64
|
+
onPointerDown: (e) => e.stopPropagation(),
|
|
65
|
+
onClick: (e) => {
|
|
66
|
+
e.stopPropagation(), a();
|
|
67
|
+
},
|
|
68
|
+
className: t(l.target, l.focus, "absolute end-space-sm top-space-sm z-10 bg-card text-card-foreground shadow-sm ring-1 ring-border", "opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100"),
|
|
69
|
+
children: /* @__PURE__ */ y(S, { className: l.icon })
|
|
70
|
+
})]
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
var I = f(function({ value: r, onValueChange: o, accept: s = ".png,.jpg,.jpeg,.gif,.webp", maxFiles: c, disabled: l = !1, invalid: f = !1, className: S, tileClassName: A, strings: j }, N) {
|
|
74
|
+
let I = e(M, j), L = h(), R = _(null), [z, B] = v([]), V = D(E(T, { activationConstraint: { distance: 6 } }), E(w, { coordinateGetter: ee })), H = _([]);
|
|
75
|
+
H.current = z, m(() => {
|
|
76
|
+
if (!r) return;
|
|
77
|
+
let e = H.current;
|
|
78
|
+
if (e.length === r.length && e.every((e, t) => e.file === r[t])) return;
|
|
79
|
+
let t = [...e], n = r.map((e) => {
|
|
80
|
+
let n = t.findIndex((t) => t.file === e);
|
|
81
|
+
return n >= 0 ? t.splice(n, 1)[0] : {
|
|
82
|
+
id: P(),
|
|
83
|
+
file: e,
|
|
84
|
+
previewUrl: URL.createObjectURL(e)
|
|
85
|
+
};
|
|
86
|
+
});
|
|
87
|
+
t.forEach((e) => URL.revokeObjectURL(e.previewUrl)), H.current = n, B(n);
|
|
88
|
+
}, [r]), m(() => () => {
|
|
89
|
+
H.current.forEach((e) => URL.revokeObjectURL(e.previewUrl)), H.current = [];
|
|
90
|
+
}, []);
|
|
91
|
+
let U = p((e) => {
|
|
92
|
+
H.current = e, B(e), o?.(e.map((e) => e.file));
|
|
93
|
+
}, [o]), W = p((e) => {
|
|
94
|
+
if (l) return;
|
|
95
|
+
let t = H.current, n = s.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean), r = e.filter((e) => n.length === 0 || n.some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t) : t.endsWith("/*") ? e.type.toLowerCase().startsWith(t.slice(0, -1)) : e.type.toLowerCase() === t)), i = c !== void 0 && Number.isFinite(c) ? Math.max(0, Math.floor(c) - t.length) : r.length, a = r.slice(0, i).map((e) => ({
|
|
96
|
+
id: P(),
|
|
97
|
+
file: e,
|
|
98
|
+
previewUrl: URL.createObjectURL(e)
|
|
99
|
+
}));
|
|
100
|
+
a.length > 0 && U([...t, ...a]);
|
|
101
|
+
}, [
|
|
102
|
+
s,
|
|
103
|
+
U,
|
|
104
|
+
l,
|
|
105
|
+
c
|
|
106
|
+
]), G = p((e) => {
|
|
107
|
+
if (l) return;
|
|
108
|
+
let t = H.current, n = t.find((t) => t.id === e);
|
|
109
|
+
n && (URL.revokeObjectURL(n.previewUrl), U(t.filter((t) => t.id !== e)));
|
|
110
|
+
}, [U, l]), K = p((e) => {
|
|
111
|
+
let t = e.target.files;
|
|
112
|
+
t && t.length !== 0 && (W(Array.from(t)), R.current && (R.current.value = ""));
|
|
113
|
+
}, [W]), { isDragging: q, dropTargetProps: J } = u({
|
|
114
|
+
disabled: l,
|
|
115
|
+
onFiles: W
|
|
116
|
+
}), Y = p((e) => {
|
|
117
|
+
if (l) return;
|
|
118
|
+
let { active: t, over: n } = e;
|
|
119
|
+
if (!n || t.id === n.id) return;
|
|
120
|
+
let r = H.current, i = r.findIndex((e) => e.id === t.id), a = r.findIndex((e) => e.id === n.id);
|
|
121
|
+
if (i < 0 || a < 0) return;
|
|
122
|
+
let o = [...r], [s] = o.splice(i, 1);
|
|
123
|
+
o.splice(a, 0, s), U(o);
|
|
124
|
+
}, [U, l]), X = (e, t, n) => e.replace("{name}", z.find((e) => e.id === t)?.file.name ?? I.removeAria).replace("{position}", String(z.findIndex((e) => e.id === (n ?? t)) + 1)), Z = {
|
|
125
|
+
onDragStart: ({ active: e }) => X(I.pickedUp ?? M.pickedUp, e.id),
|
|
126
|
+
onDragOver: ({ active: e, over: t }) => t ? X(I.movedTo ?? M.movedTo, e.id, t.id) : void 0,
|
|
127
|
+
onDragEnd: ({ active: e }) => X(I.dropped ?? M.dropped, e.id),
|
|
128
|
+
onDragCancel: ({ active: e }) => X(I.cancelled ?? M.cancelled, e.id)
|
|
129
|
+
}, Q = g(() => z.map((e) => e.id), [z]), $ = c !== void 0 && z.length >= c;
|
|
130
|
+
return /* @__PURE__ */ b(a, {
|
|
131
|
+
ref: N,
|
|
132
|
+
gap: "lg",
|
|
133
|
+
className: t("media-gallery--component", S),
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ y(C, {
|
|
136
|
+
sensors: V,
|
|
137
|
+
onDragEnd: Y,
|
|
138
|
+
accessibility: { announcements: Z },
|
|
139
|
+
children: /* @__PURE__ */ y(O, {
|
|
140
|
+
items: Q,
|
|
141
|
+
strategy: k,
|
|
142
|
+
children: /* @__PURE__ */ b(i, {
|
|
143
|
+
columns: {
|
|
144
|
+
base: 2,
|
|
145
|
+
sm: 3,
|
|
146
|
+
md: 4
|
|
147
|
+
},
|
|
148
|
+
gap: "md",
|
|
149
|
+
children: [z.map((e, t) => /* @__PURE__ */ y(F, {
|
|
150
|
+
item: e,
|
|
151
|
+
isFirst: t === 0,
|
|
152
|
+
disabled: l,
|
|
153
|
+
onRemove: () => G(e.id),
|
|
154
|
+
strings: I,
|
|
155
|
+
tileClassName: A
|
|
156
|
+
}, e.id)), !$ && /* @__PURE__ */ b("div", {
|
|
157
|
+
...J,
|
|
158
|
+
className: t("relative flex aspect-square items-center justify-center rounded-radius border border-dashed text-center outline-none transition-colors", d.hover, "has-[input:focus-visible]:ring-3", f ? t(d.invalid, d.focus.input.invalid) : t(d.idle, d.focus.input.valid), l && "cursor-not-allowed opacity-50", !l && q && d.dragging),
|
|
159
|
+
children: [/* @__PURE__ */ y("input", {
|
|
160
|
+
id: L,
|
|
161
|
+
ref: R,
|
|
162
|
+
type: "file",
|
|
163
|
+
className: "absolute inset-0 z-10 size-full cursor-pointer opacity-0 disabled:cursor-not-allowed",
|
|
164
|
+
"aria-label": I.addInstruction,
|
|
165
|
+
"aria-invalid": f || void 0,
|
|
166
|
+
accept: s,
|
|
167
|
+
multiple: !0,
|
|
168
|
+
disabled: l,
|
|
169
|
+
onChange: K
|
|
170
|
+
}), /* @__PURE__ */ b(a, {
|
|
171
|
+
align: "center",
|
|
172
|
+
gap: "sm",
|
|
173
|
+
className: "px-space-sm",
|
|
174
|
+
children: [/* @__PURE__ */ y(x, {
|
|
175
|
+
className: "size-icon-lg text-muted-foreground",
|
|
176
|
+
"aria-hidden": "true"
|
|
177
|
+
}), /* @__PURE__ */ y(n, {
|
|
178
|
+
weight: "medium",
|
|
179
|
+
align: "center",
|
|
180
|
+
children: q ? I.dragOver : I.addInstruction
|
|
181
|
+
})]
|
|
182
|
+
})]
|
|
183
|
+
})]
|
|
184
|
+
})
|
|
185
|
+
})
|
|
186
|
+
}),
|
|
187
|
+
!!$ && /* @__PURE__ */ y(n, {
|
|
188
|
+
size: "xs",
|
|
189
|
+
type: "secondary",
|
|
190
|
+
children: I.maxReached
|
|
191
|
+
}),
|
|
192
|
+
!$ && !!I.helper && /* @__PURE__ */ y(n, {
|
|
193
|
+
size: "xs",
|
|
194
|
+
type: "secondary",
|
|
195
|
+
children: I.helper
|
|
196
|
+
})
|
|
197
|
+
]
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
I.displayName = "MediaGallery";
|
|
201
|
+
//#endregion
|
|
202
|
+
export { I as MediaGallery, M as defaultMediaGalleryStrings };
|
|
203
|
+
|
|
204
|
+
//# sourceMappingURL=media-gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-gallery.js","names":["Text","focusRecipes","Grid","Stack","toneRecipes","neutralFillRecipes","Badge","fieldAffordanceRecipes","useFileDropTarget","uploadDropTargetRecipes","defaultMediaGalleryStrings","counter","makeId","SortableTile","useSortable","item","style","CSS","transform","setNodeRef","cn","isDragging","disabled","tileClassName","setActivatorNodeRef","attributes","listeners","isFirst","strings","onRemove","X","MediaGallery","forwardRef","stringsProp","useStrings","inputId","useId","inputRef","useRef","items","setItems","useState","sensors","useSensors","useSensor","PointerSensor","KeyboardSensor","sortableKeyboardCoordinates","itemsRef","useEffect","value","prev","index","remaining","next","file","it","commit","useCallback","onValueChange","addFiles","rules","accept","rule","accepted","incoming","limit","maxFiles","additions","remove","target","id","onPickerChange","list","onDragEnd","event","over","active","from","to","moved","announce","template","overId","announcements","tileIds","useMemo","isFull","className","DndContext","SortableContext","rectSortingStrategy","i","dropTargetProps","invalid","ImagePlus"],"sources":["../../src/components/base/media-gallery/media-gallery.tsx"],"sourcesContent":["/**\n * MediaGallery — multi-image upload + sortable thumbnail grid. Drop a batch\n * of images onto the dashed top tile or click to open the picker; tiles\n * appear inline and can be reordered via drag (`@dnd-kit/sortable`). The\n * first tile is implicitly the \"cover\" and is marked with a small chip;\n * each tile has a hover-revealed remove button.\n *\n * Use for product galleries, mood boards, or any collection where the order\n * matters and the consumer needs the final `File[]` (and the order of those\n * files) on submit.\n *\n * Strings overridable for i18n.\n */\nimport { forwardRef, useCallback, useEffect, useId, useMemo, useRef, useState } from 'react';\nimport type { ChangeEvent } from 'react';\nimport {\n\tDndContext,\n\ttype DragEndEvent,\n\ttype Announcements,\n\tPointerSensor,\n\tKeyboardSensor,\n\tuseSensor,\n\tuseSensors,\n} from '@dnd-kit/core';\nimport {\n\tSortableContext,\n\trectSortingStrategy,\n\tsortableKeyboardCoordinates,\n\tuseSortable,\n} from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\nimport { ImagePlus, X } from 'lucide-react';\nimport { Badge } from '../badge';\nimport { Text } from '../../typography';\nimport { Grid, Stack } from '../structure';\nimport { useStrings, type StringsProp } from '../../../lib/strings';\nimport { cn } from '../../../lib/utils';\nimport { fieldAffordanceRecipes } from '../../../lib/field-affordance-recipes';\nimport { useFileDropTarget } from '../upload/use-file-drop-target';\nimport { focusRecipes } from '../../../lib/focus-recipes';\nimport { uploadDropTargetRecipes } from '../upload/upload.recipes';\nimport { toneRecipes } from '../../../lib/tone-recipes';\nimport { neutralFillRecipes } from '../../../lib/surface-recipes';\n\nexport interface MediaGalleryStrings {\n\taddInstruction: string;\n\thelper: string;\n\tdragOver: string;\n\tcover: string;\n\tremoveAria: string;\n\tmaxReached: string;\n\t/** Sort announcements; {name} is the filename and {position} is its one-based position. */\n\tpickedUp?: string;\n\tmovedTo?: string;\n\tdropped?: string;\n\tcancelled?: string;\n}\n\nexport const defaultMediaGalleryStrings = {\n\taddInstruction: 'Drop or click to add images',\n\thelper: '',\n\tdragOver: 'Release to select',\n\tcover: 'Cover',\n\tremoveAria: 'Remove image',\n\tmaxReached: 'You have reached the maximum number of images.',\n\tpickedUp: 'Picked up {name}.',\n\tmovedTo: '{name} moved to position {position}.',\n\tdropped: 'Dropped {name}.',\n\tcancelled: 'Sorting cancelled for {name}.',\n} satisfies MediaGalleryStrings;\n\nexport interface MediaGalleryProps {\n\t/** Selected files. Controlled. */\n\tvalue?: File[];\n\tonValueChange?: (files: File[]) => void;\n\t/** Accepted MIME types or extensions. */\n\taccept?: string;\n\t/** Caps how many files may be added. */\n\tmaxFiles?: number;\n\t/** Disables the control and blocks drops. */\n\tdisabled?: boolean;\n\t/** Applies the invalid styling. */\n\tinvalid?: boolean;\n\tclassName?: string;\n\t/** Merged onto each media tile. */\n\ttileClassName?: string;\n\t/** Overrides the upload, remove, and empty copy. */\n\tstrings?: StringsProp<MediaGalleryStrings>;\n}\n\ninterface InternalItem {\n\tid: string;\n\tfile: File;\n\tpreviewUrl: string;\n}\n\nlet counter = 0;\nconst makeId = () => `media-${Date.now().toString(36)}-${(counter++).toString(36)}`;\n\nfunction SortableTile({\n\titem,\n\tisFirst,\n\tdisabled,\n\tonRemove,\n\tstrings,\n\ttileClassName,\n}: {\n\titem: InternalItem;\n\tisFirst: boolean;\n\t/** Disables the control and blocks drops. */\n\tdisabled: boolean;\n\tonRemove: () => void;\n\t/** Overrides the upload, remove, and empty copy. */\n\tstrings: MediaGalleryStrings;\n\t/** Merged onto each media tile. */\n\ttileClassName?: string;\n}) {\n\tconst { attributes, listeners, setNodeRef, setActivatorNodeRef, transform, transition, isDragging } =\n\t\tuseSortable({ id: item.id, disabled });\n\tconst style = {\n\t\ttransform: CSS.Transform.toString(transform),\n\t\ttransition,\n\t} as React.CSSProperties;\n\n\treturn (\n\t\t<div\n\t\t\tref={setNodeRef}\n\t\t\tstyle={style}\n\t\t\tclassName={cn(\n\t\t\t\t'media-gallery--item',\n\t\t\t\t'group relative aspect-square overflow-hidden rounded-radius border border-border/60', neutralFillRecipes.wash,\n\t\t\t\tisDragging && `z-10 shadow-lg ring-2 ${toneRecipes.primary.halo}`,\n\t\t\t\tdisabled && 'opacity-50',\n\t\t\t\ttileClassName,\n\t\t\t)}\n\t\t>\n\t\t\t<div\n\t\t\t\tref={setActivatorNodeRef}\n\t\t\t\taria-label={item.file.name}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t`absolute inset-0 cursor-grab outline-none active:cursor-grabbing ${focusRecipes.inset}`,\n\t\t\t\t\tdisabled && 'pointer-events-none',\n\t\t\t\t)}\n\t\t\t\t{...attributes}\n\t\t\t\t{...listeners}\n\t\t\t>\n\t\t\t\t<img\n\t\t\t\t\tsrc={item.previewUrl}\n\t\t\t\t\talt={item.file.name}\n\t\t\t\t\tclassName=\"absolute inset-0 size-full object-cover\"\n\t\t\t\t\tdraggable={false}\n\t\t\t\t/>\n\t\t\t\t{isFirst && (\n\t\t\t\t\t<Badge\n\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\ttone=\"secondary\"\n\t\t\t\t\t\tclassName=\"media-gallery--cover absolute start-space-sm top-space-sm bg-card shadow-sm ring-1 ring-border\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{strings.cover}\n\t\t\t\t\t</Badge>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\taria-label={`${strings.removeAria}: ${item.file.name}`}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tonPointerDown={(e) => e.stopPropagation()}\n\t\t\t\tonClick={(e) => {\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t\tonRemove();\n\t\t\t\t}}\n\t\t\t\tclassName={cn(\n\t\t\t\t\tfieldAffordanceRecipes.target,\n\t\t\t\t\tfieldAffordanceRecipes.focus,\n\t\t\t\t\t'absolute end-space-sm top-space-sm z-10 bg-card text-card-foreground shadow-sm ring-1 ring-border',\n\t\t\t\t\t'opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100',\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<X className={fieldAffordanceRecipes.icon} />\n\t\t\t</button>\n\t\t</div>\n\t);\n}\n\nexport const MediaGallery = forwardRef<HTMLDivElement, MediaGalleryProps>(function MediaGallery({\n\tvalue,\n\tonValueChange,\n\taccept = '.png,.jpg,.jpeg,.gif,.webp',\n\tmaxFiles,\n\tdisabled = false,\n\tinvalid = false,\n\tclassName,\n\ttileClassName,\n\tstrings: stringsProp,\n}: MediaGalleryProps, ref) {\n\tconst strings = useStrings(defaultMediaGalleryStrings, stringsProp);\n\tconst inputId = useId();\n\tconst inputRef = useRef<HTMLInputElement | null>(null);\n\tconst [items, setItems] = useState<InternalItem[]>([]);\n\n\tconst sensors = useSensors(useSensor(PointerSensor, { activationConstraint: { distance: 6 } }), useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates }));\n\n\t// Track the live preview-URL set in a ref so the unmount cleanup sees the\n\t// latest values without depending on render-time `items`. Without this,\n\t// the cleanup closes over the initial empty array and any object URLs\n\t// created during the lifetime of the component leak (the browser will\n\t// still hold them until the document unloads).\n\tconst itemsRef = useRef<InternalItem[]>([]);\n\titemsRef.current = items;\n\n\t// Reconcile by file identity so order changes preserve sortable ids and URLs.\n\tuseEffect(() => {\n\t\tif (!value) return;\n\t\tconst prev = itemsRef.current;\n\t\tif (prev.length === value.length && prev.every((item, index) => item.file === value[index])) return;\n\t\tconst remaining = [...prev];\n\t\tconst next = value.map((file) => {\n\t\t\tconst index = remaining.findIndex((item) => item.file === file);\n\t\t\tif (index >= 0) return remaining.splice(index, 1)[0];\n\t\t\treturn { id: makeId(), file, previewUrl: URL.createObjectURL(file) };\n\t\t});\n\t\tremaining.forEach((item) => URL.revokeObjectURL(item.previewUrl));\n\t\titemsRef.current = next;\n\t\tsetItems(next);\n\t}, [value]);\n\n\t// Cleanup on unmount — revoke whatever previews were live at the time.\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\titemsRef.current.forEach((it) => URL.revokeObjectURL(it.previewUrl));\n\t\t\titemsRef.current = [];\n\t\t};\n\t}, []);\n\n\tconst commit = useCallback((next: InternalItem[]) => {\n\t\titemsRef.current = next;\n\t\tsetItems(next);\n\t\tonValueChange?.(next.map((item) => item.file));\n\t}, [onValueChange]);\n\n\tconst addFiles = useCallback((incoming: File[]) => {\n\t\tif (disabled) return;\n\t\tconst prev = itemsRef.current;\n\t\tconst rules = accept.split(',').map((rule) => rule.trim().toLowerCase()).filter(Boolean);\n\t\tconst accepted = incoming.filter((file) => rules.length === 0 || rules.some((rule) => {\n\t\t\tif (rule.startsWith('.')) return file.name.toLowerCase().endsWith(rule);\n\t\t\tif (rule.endsWith('/*')) return file.type.toLowerCase().startsWith(rule.slice(0, -1));\n\t\t\treturn file.type.toLowerCase() === rule;\n\t\t}));\n\t\tconst limit = maxFiles !== undefined && Number.isFinite(maxFiles) ? Math.max(0, Math.floor(maxFiles) - prev.length) : accepted.length;\n\t\tconst additions = accepted.slice(0, limit).map((file) => ({ id: makeId(), file, previewUrl: URL.createObjectURL(file) }));\n\t\tif (additions.length > 0) commit([...prev, ...additions]);\n\t}, [accept, commit, disabled, maxFiles]);\n\n\tconst remove = useCallback((id: string) => {\n\t\tif (disabled) return;\n\t\tconst prev = itemsRef.current;\n\t\tconst target = prev.find((item) => item.id === id);\n\t\tif (!target) return;\n\t\tURL.revokeObjectURL(target.previewUrl);\n\t\tcommit(prev.filter((item) => item.id !== id));\n\t}, [commit, disabled]);\n\n\tconst onPickerChange = useCallback(\n\t\t(e: ChangeEvent<HTMLInputElement>) => {\n\t\t\tconst list = e.target.files;\n\t\t\tif (!list || list.length === 0) return;\n\t\t\taddFiles(Array.from(list));\n\t\t\tif (inputRef.current) inputRef.current.value = '';\n\t\t},\n\t\t[addFiles],\n\t);\n\n\tconst { isDragging, dropTargetProps } = useFileDropTarget({ disabled, onFiles: addFiles });\n\tconst onDragEnd = useCallback((event: DragEndEvent) => {\n\t\tif (disabled) return;\n\t\tconst { active, over } = event;\n\t\tif (!over || active.id === over.id) return;\n\t\tconst prev = itemsRef.current;\n\t\tconst from = prev.findIndex((item) => item.id === active.id);\n\t\tconst to = prev.findIndex((item) => item.id === over.id);\n\t\tif (from < 0 || to < 0) return;\n\t\tconst next = [...prev];\n\t\tconst [moved] = next.splice(from, 1);\n\t\tnext.splice(to, 0, moved);\n\t\tcommit(next);\n\t}, [commit, disabled]);\n\n\tconst announce = (template: string, id: string | number, overId?: string | number) => template\n\t\t.replace('{name}', items.find(item => item.id === id)?.file.name ?? strings.removeAria)\n\t\t.replace('{position}', String(items.findIndex(item => item.id === (overId ?? id)) + 1));\n\tconst announcements: Announcements = {\n\t\tonDragStart: ({ active }) => announce(strings.pickedUp ?? defaultMediaGalleryStrings.pickedUp, active.id),\n\t\tonDragOver: ({ active, over }) => over ? announce(strings.movedTo ?? defaultMediaGalleryStrings.movedTo, active.id, over.id) : undefined,\n\t\tonDragEnd: ({ active }) => announce(strings.dropped ?? defaultMediaGalleryStrings.dropped, active.id),\n\t\tonDragCancel: ({ active }) => announce(strings.cancelled ?? defaultMediaGalleryStrings.cancelled, active.id),\n\t};\n\tconst tileIds = useMemo(() => items.map((it) => it.id), [items]);\n\tconst isFull = maxFiles !== undefined && items.length >= maxFiles;\n\n\treturn (\n\t\t<Stack ref={ref} gap=\"lg\" className={cn('media-gallery--component', className)}>\n\t\t\t<DndContext sensors={sensors} onDragEnd={onDragEnd} accessibility={{ announcements }}>\n\t\t\t\t<SortableContext items={tileIds} strategy={rectSortingStrategy}>\n\t\t\t\t\t<Grid columns={{ base: 2, sm: 3, md: 4 }} gap=\"md\">\n\t\t\t\t\t\t{items.map((item, i) => (\n\t\t\t\t\t\t\t<SortableTile\n\t\t\t\t\t\t\t\tkey={item.id}\n\t\t\t\t\t\t\t\titem={item}\n\t\t\t\t\t\t\t\tisFirst={i === 0}\n\t\t\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\t\t\tonRemove={() => remove(item.id)}\n\t\t\t\t\t\t\t\tstrings={strings}\n\t\t\t\t\t\t\t\ttileClassName={tileClassName}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t))}\n\n\t\t\t\t\t\t{!isFull && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t{...dropTargetProps}\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t'relative flex aspect-square items-center justify-center rounded-radius border border-dashed text-center outline-none transition-colors',\n\t\t\t\t\t\t\t\t\tuploadDropTargetRecipes.hover,\n\t\t\t\t\t\t\t\t\t// Keyboard focus on the file input frames the tile like any field; an\n\t\t\t\t\t\t\t\t\t// invalid tile keeps its destructive border and tints the halo.\n\t\t\t\t\t\t\t\t\t'has-[input:focus-visible]:ring-3',\n\t\t\t\t\t\t\t\t\tinvalid ? cn(uploadDropTargetRecipes.invalid, uploadDropTargetRecipes.focus.input.invalid) : cn(uploadDropTargetRecipes.idle, uploadDropTargetRecipes.focus.input.valid),\n\t\t\t\t\t\t\t\t\tdisabled && 'cursor-not-allowed opacity-50',\n\t\t\t\t\t\t\t\t\t!disabled && isDragging && uploadDropTargetRecipes.dragging,\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\tid={inputId}\n\t\t\t\t\t\t\t\t\tref={inputRef}\n\t\t\t\t\t\t\t\t\ttype=\"file\"\n\t\t\t\t\t\t\t\t\tclassName=\"absolute inset-0 z-10 size-full cursor-pointer opacity-0 disabled:cursor-not-allowed\"\n\t\t\t\t\t\t\t\t\taria-label={strings.addInstruction}\n\t\t\t\t\t\t\t\t\taria-invalid={invalid || undefined}\n\t\t\t\t\t\t\t\t\taccept={accept}\n\t\t\t\t\t\t\t\t\tmultiple\n\t\t\t\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\t\t\t\tonChange={onPickerChange}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Stack align=\"center\" gap=\"sm\" className=\"px-space-sm\">\n\t\t\t\t\t\t\t\t\t<ImagePlus className=\"size-icon-lg text-muted-foreground\" aria-hidden=\"true\" />\n\t\t\t\t\t\t\t\t\t<Text weight=\"medium\" align=\"center\">\n\t\t\t\t\t\t\t\t\t\t{isDragging ? strings.dragOver : strings.addInstruction}\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t</Stack>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Grid>\n\t\t\t\t</SortableContext>\n\t\t\t</DndContext>\n\n\t\t\t{!!isFull && (\n\t\t\t\t<Text size=\"xs\" type=\"secondary\">\n\t\t\t\t\t{strings.maxReached}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t\t{!isFull && !!strings.helper && (\n\t\t\t\t<Text size=\"xs\" type=\"secondary\">\n\t\t\t\t\t{strings.helper}\n\t\t\t\t</Text>\n\t\t\t)}\n\t\t</Stack>\n\t);\n});\n\nMediaGallery.displayName = 'MediaGallery';\n"],"mappings":";;;;;;;;;;;;;;;;;;AA0DA,IAAaU,IAA6B;CACzC,gBAAgB;CAChB,QAAQ;CACR,UAAU;CACV,OAAO;CACP,YAAY;CACZ,YAAY;CACZ,UAAU;CACV,SAAS;CACT,SAAS;CACT,WAAW;AACZ,GA2BIC,IAAU,GACRC,UAAe,SAAS,KAAK,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,IAAI,IAAA,CAAW,SAAS,EAAE;AAEhF,SAASC,EAAa,EACrB,SACA,YACA,aACA,aACA,YACA,oBAWE;CACF,IAAM,EAAE,eAAY,cAAW,eAAY,wBAAqB,cAAW,eAAY,kBACtFC,EAAY;EAAE,IAAIC,EAAK;EAAI;CAAS,CAAC,GAChCC,IAAQ;EACb,WAAWC,EAAI,UAAU,SAASC,CAAS;EAC3C;CACD;CAEA,OACC,kBAAC,OAAD;EACC,KAAKC;EACE;EACP,WAAWC,EACV,uBACA,uFAAuFf,EAAmB,MAC1GgB,KAAc,yBAAyBjB,EAAY,QAAQ,QAC3DkB,KAAY,cACZC,CACD;EATD,UAAA,CAWC,kBAAC,OAAD;GACC,KAAKC;GACL,cAAYT,EAAK,KAAK;GACtB,WAAWK,EACV,oEAAoEnB,EAAa,SACjFqB,KAAY,qBACb;GACA,GAAIG;GACJ,GAAIC;GARL,UAAA,CAUC,kBAAC,OAAD;IACC,KAAKX,EAAK;IACV,KAAKA,EAAK,KAAK;IACf,WAAU;IACV,WAAW;GACX,CAAA,GACAY,KACA,kBAACrB,GAAD;IACC,MAAK;IACL,MAAK;I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E,EACV,0IACAX,EAAwB,OAGxB,oCACAqF,IAAU1E,EAAGX,EAAwB,SAASA,EAAwB,MAAM,MAAM,OAAO,IAAIW,EAAGX,EAAwB,MAAMA,EAAwB,MAAM,MAAM,KAAK,GACvKa,KAAY,iCACZ,CAACA,KAAYD,KAAcZ,EAAwB,QACpD;OAXD,UAAA,CAaC,kBAAC,SAAD;QACC,IAAI0B;QACJ,KAAKE;QACL,MAAK;QACL,WAAU;QACV,cAAYT,EAAQ;QACpB,gBAAckE,KAAW,KAAA;QACjB;QACR,UAAA;QACU;QACV,UAAUtB;OACV,CAAA,GACD,kBAACrE,GAAD;QAAO,OAAM;QAAS,KAAI;QAAK,WAAU;QAAzC,UAAA,CACC,kBAAC4F,GAAD;SAAW,WAAU;SAAqC,eAAY;QAAQ,CAAA,GAC9E,kBAAC/F,GAAD;SAAM,QAAO;SAAS,OAAM;SAC1B,UAAAqB,IAAaO,EAAQ,WAAWA,EAAQ;QACpC,CAAA,CACA;OACH,CAAA,CAAA;MAED,CAAA,CAAA;;IACU,CAAA;GACN,CAAA;GAEX,CAAC,CAAC2D,KACF,kBAACvF,GAAD;IAAM,MAAK;IAAK,MAAK;IACnB,UAAA4B,EAAQ;GACJ,CAAA;GAEN,CAAC2D,KAAU,CAAC,CAAC3D,EAAQ,UACrB,kBAAC5B,GAAD;IAAM,MAAK;IAAK,MAAK;IACnB,UAAA4B,EAAQ;GACJ,CAAA;EAED;;AAET,CAAC;AAED,EAAa,cAAc"}
|
package/dist/base/navigation.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h } from "../dropdown-menu-
|
|
3
|
-
import { n as g, t as _ } from "../breadcrumbs-
|
|
4
|
-
import {
|
|
5
|
-
import { i as
|
|
6
|
-
import { n as
|
|
7
|
-
import { a as
|
|
8
|
-
export { _ as Breadcrumbs, m as DropdownMenu, l as DropdownMenuCheckboxItem, f as DropdownMenuContent, o as DropdownMenuGroup, e as DropdownMenuItem, u as DropdownMenuLabel, p as DropdownMenuLinkItem, t as DropdownMenuPortal, s as DropdownMenuRadioGroup, h as DropdownMenuRadioItem, n as DropdownMenuSeparator, r as DropdownMenuShortcut, d as DropdownMenuSub, c as DropdownMenuSubContent, a as DropdownMenuSubTrigger, i as DropdownMenuTrigger, v as LanguageSwitcher,
|
|
2
|
+
import { a as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h } from "../dropdown-menu-B8hjvbkS.js";
|
|
3
|
+
import { n as g, t as _ } from "../breadcrumbs-CQ9JSlez.js";
|
|
4
|
+
import { a as v, i as y, n as b, r as x, t as S } from "../navigation-CmqaQR_G.js";
|
|
5
|
+
import { i as C, n as w, o as T, r as E, t as D } from "../tabs-WnHfV2pM.js";
|
|
6
|
+
import { n as O, t as k } from "../overflow-tab-bar-DV7HE_3t.js";
|
|
7
|
+
import { a as A, c as j, i as M, n as N, o as P, r as F, s as I, t as L } from "../pagination-BuSWw1US.js";
|
|
8
|
+
export { _ as Breadcrumbs, m as DropdownMenu, l as DropdownMenuCheckboxItem, f as DropdownMenuContent, o as DropdownMenuGroup, e as DropdownMenuItem, u as DropdownMenuLabel, p as DropdownMenuLinkItem, t as DropdownMenuPortal, s as DropdownMenuRadioGroup, h as DropdownMenuRadioItem, n as DropdownMenuSeparator, r as DropdownMenuShortcut, d as DropdownMenuSub, c as DropdownMenuSubContent, a as DropdownMenuSubTrigger, i as DropdownMenuTrigger, v as LanguageSwitcher, x as NavigationTabs, k as OverflowTabBar, S as PageHeading, L as PaginationContent, N as PaginationEllipsis, F as PaginationItem, M as PaginationLink, A as PaginationNext, P as PaginationPrevious, I as PaginationRoot, D as Tabs, w as TabsContent, E as TabsList, C as TabsTrigger, g as defaultBreadcrumbsStrings, y as defaultNavigationTabsStrings, O as defaultOverflowTabBarStrings, b as defaultPageHeadingStrings, j as defaultPaginationStrings, T as defaultTabsScrollStrings };
|
package/dist/base/popover.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../popover-
|
|
2
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../popover-BpMxbqEK.js";
|
|
3
3
|
export { i as Popover, o as PopoverAnchor, s as PopoverContent, r as PopoverDescription, a as PopoverFooter, n as PopoverHeader, e as PopoverTitle, t as PopoverTrigger };
|
package/dist/base/qr-code.js
CHANGED
|
@@ -1,34 +1,43 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as e } from "../utils-
|
|
2
|
+
import { t as e } from "../utils-BVbAG2J6.js";
|
|
3
3
|
import { forwardRef as t, useEffect as n, useRef as r, useState as i } from "react";
|
|
4
4
|
import { jsx as a } from "react/jsx-runtime";
|
|
5
5
|
import { formatHex as o, parse as s } from "culori";
|
|
6
6
|
import c from "qrcode";
|
|
7
7
|
//#region src/components/base/qr-code/qr-code.tsx
|
|
8
|
-
|
|
9
|
-
let
|
|
8
|
+
function l(e) {
|
|
9
|
+
let t = (t) => {
|
|
10
|
+
let n = Number.parseInt(e.slice(t, t + 2), 16) / 255;
|
|
11
|
+
return n <= .04045 ? n / 12.92 : ((n + .055) / 1.055) ** 2.4;
|
|
12
|
+
};
|
|
13
|
+
return .2126 * t(1) + .7152 * t(3) + .0722 * t(5);
|
|
14
|
+
}
|
|
15
|
+
var u = t(function({ data: t, foreground: u, background: d, robustness: f = "M", quietZone: p = 0, className: m, ...h }, g) {
|
|
16
|
+
let _ = r(null), [v, y] = i("");
|
|
10
17
|
if (n(() => {
|
|
11
|
-
let e =
|
|
18
|
+
let e = _.current;
|
|
12
19
|
if (!e) return;
|
|
13
20
|
let n = 0, r = !0, i = async () => {
|
|
14
|
-
let i = ++n, a = getComputedStyle(e),
|
|
21
|
+
let i = ++n, a = getComputedStyle(e), m = (e, t, n) => {
|
|
15
22
|
let r = s((e ?? a.getPropertyValue(t)).trim());
|
|
16
23
|
return r ? o(r) ?? n : n;
|
|
17
24
|
};
|
|
18
25
|
try {
|
|
19
|
-
let e =
|
|
26
|
+
let e = m(u, "--foreground", "#000000"), a = m(d, "--background", "#ffffff");
|
|
27
|
+
u === void 0 && d === void 0 && l(e) > l(a) && ([e, a] = [a, e]);
|
|
28
|
+
let o = await c.toString(t.trim(), {
|
|
20
29
|
type: "svg",
|
|
21
30
|
width: 200,
|
|
22
|
-
margin: 0,
|
|
23
|
-
errorCorrectionLevel:
|
|
31
|
+
margin: Math.max(0, Math.floor(p)),
|
|
32
|
+
errorCorrectionLevel: f,
|
|
24
33
|
color: {
|
|
25
|
-
dark:
|
|
26
|
-
light:
|
|
34
|
+
dark: e,
|
|
35
|
+
light: a
|
|
27
36
|
}
|
|
28
37
|
});
|
|
29
|
-
r && i === n &&
|
|
38
|
+
r && i === n && y(o);
|
|
30
39
|
} catch {
|
|
31
|
-
r && i === n &&
|
|
40
|
+
r && i === n && y("");
|
|
32
41
|
}
|
|
33
42
|
};
|
|
34
43
|
i();
|
|
@@ -44,23 +53,24 @@ var l = t(function({ data: t, foreground: l, background: u, robustness: d = "M",
|
|
|
44
53
|
};
|
|
45
54
|
}, [
|
|
46
55
|
t,
|
|
47
|
-
l,
|
|
48
56
|
u,
|
|
49
|
-
d
|
|
57
|
+
d,
|
|
58
|
+
f,
|
|
59
|
+
p
|
|
50
60
|
]), !t.trim()) return null;
|
|
51
|
-
let
|
|
61
|
+
let b = h["aria-label"] !== void 0 || h["aria-labelledby"] !== void 0;
|
|
52
62
|
return /* @__PURE__ */ a("div", {
|
|
53
|
-
role:
|
|
54
|
-
...
|
|
63
|
+
role: b ? "img" : void 0,
|
|
64
|
+
...h,
|
|
55
65
|
ref: (e) => {
|
|
56
|
-
if (
|
|
57
|
-
|
|
66
|
+
if (_.current = e, typeof g == "function") return g(e);
|
|
67
|
+
g && (g.current = e);
|
|
58
68
|
},
|
|
59
|
-
className: e("qr-code--component size-full [&_svg]:size-full",
|
|
60
|
-
dangerouslySetInnerHTML: { __html:
|
|
69
|
+
className: e("qr-code--component size-full [&_svg]:size-full", m),
|
|
70
|
+
dangerouslySetInnerHTML: { __html: v }
|
|
61
71
|
});
|
|
62
72
|
});
|
|
63
73
|
//#endregion
|
|
64
|
-
export {
|
|
74
|
+
export { u as QRCode };
|
|
65
75
|
|
|
66
76
|
//# sourceMappingURL=qr-code.js.map
|
package/dist/base/qr-code.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qr-code.js","names":["cn","QR","QRCode","forwardRef","props","host","useRef","svg","setSvg","useState","useEffect","element","generation","active","generate","current","styles","color","parsed","parse","override","token","formatHex","fallback","
|
|
1
|
+
{"version":3,"file":"qr-code.js","names":["cn","QR","luminance","channel","value","hex","offset","QRCode","forwardRef","props","host","useRef","svg","setSvg","useState","useEffect","element","generation","active","generate","current","styles","color","parsed","parse","override","token","formatHex","fallback","dark","foreground","light","background","next","data","quietZone","robustness","observer","node","labelled","ref","className"],"sources":["../../src/components/base/qr-code/qr-code.tsx"],"sourcesContent":["import { formatHex, parse } from 'culori';\nimport QR from 'qrcode';\nimport { forwardRef, useEffect, useRef, useState, type HTMLAttributes } from 'react';\nimport { cn } from '../../../lib/utils';\n\nexport type QRCodeProps = HTMLAttributes<HTMLDivElement> & {\n /** Encoded payload. Pass `aria-label` to describe it; the code is then exposed as one image. */\n data: string;\n foreground?: string;\n background?: string;\n robustness?: 'L' | 'M' | 'Q' | 'H';\n /** Blank modules around the code. Defaults to `0`; scanners expect four when the code sits on a busy surface. */\n quietZone?: number;\n};\n\n/** Relative luminance of a `#rrggbb` colour, enough to tell which of two is darker. */\nfunction luminance(hex: string) {\n const channel = (offset: number) => { const value = Number.parseInt(hex.slice(offset, offset + 2), 16) / 255; return value <= 0.04045 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4; };\n return 0.2126 * channel(1) + 0.7152 * channel(3) + 0.0722 * channel(5);\n}\n\nexport const QRCode = forwardRef<HTMLDivElement, QRCodeProps>(function QRCode({data, foreground, background, robustness = 'M', quietZone = 0, className, ...props}, ref) {\n const host = useRef<HTMLDivElement | null>(null);\n const [svg, setSvg] = useState('');\n useEffect(() => {\n const element = host.current;\n if (!element) return;\n let generation = 0;\n let active = true;\n const generate = async () => {\n const current = ++generation;\n const styles = getComputedStyle(element);\n const color = (override: string | undefined, token: string, fallback: string) => {\n const parsed = parse((override ?? styles.getPropertyValue(token)).trim());\n return parsed ? formatHex(parsed) ?? fallback : fallback;\n };\n try {\n let dark = color(foreground,'--foreground','#000000'), light = color(background,'--background','#ffffff');\n // Theme colours flip in dark mode. Scanners expect dark modules on a light\n // ground, so an inherited pair keeps that polarity; explicit colours are kept as given.\n if (foreground === undefined && background === undefined && luminance(dark) > luminance(light)) [dark, light] = [light, dark];\n const next = await QR.toString(data.trim(), {type:'svg', width:200, margin:Math.max(0, Math.floor(quietZone)), errorCorrectionLevel:robustness, color:{dark, light}});\n if(active && current === generation) setSvg(next);\n } catch { if(active && current === generation) setSvg(''); }\n };\n void generate();\n // Themes inherit from the actual host; observe only theme attributes, never generated SVG children.\n const observer = new MutationObserver(() => {void generate();});\n for (let node: HTMLElement | null = element; node; node = node.parentElement) observer.observe(node, {attributes:true, attributeFilter:['class','style']});\n return () => {active=false;observer.disconnect();};\n },[data,foreground,background,robustness,quietZone]);\n if (!data.trim()) return null;\n // A labelled code is one image to assistive technology; the generated SVG has no name of its own.\n const labelled = props['aria-label'] !== undefined || props['aria-labelledby'] !== undefined;\n return <div role={labelled ? 'img' : undefined} {...props} ref={node => {host.current=node;if(typeof ref==='function') return ref(node);if(ref)ref.current=node;}} className={cn('qr-code--component size-full [&_svg]:size-full',className)} dangerouslySetInnerHTML={{__html:svg}} />;\n});\n"],"mappings":";;;;;;;AAgBA,SAASE,EAAU,GAAa;CAC/B,IAAMC,KAAW,MAAmB;EAAE,IAAMC,IAAQ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