themelia-react-ui 0.0.0-stage → 1.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 +64 -0
- package/LICENSE +21 -0
- package/README.md +249 -2
- package/THIRD_PARTY_NOTICES.md +65 -0
- package/dist/accordion-BRWh3BM1.js +205 -0
- package/dist/accordion-BRWh3BM1.js.map +1 -0
- package/dist/action-menu-Cx3SdfbN.js +265 -0
- package/dist/action-menu-Cx3SdfbN.js.map +1 -0
- package/dist/action-presentation.js +11 -0
- package/dist/action-presentation.js.map +1 -0
- package/dist/affordance-geometry.generated-DXl-Zb3Z.js +23 -0
- package/dist/affordance-geometry.generated-DXl-Zb3Z.js.map +1 -0
- package/dist/ai-artifact-DkOArd3-.js +1121 -0
- package/dist/ai-artifact-DkOArd3-.js.map +1 -0
- package/dist/anchored-positioning-DPnKTvNs.js +6 -0
- package/dist/anchored-positioning-DPnKTvNs.js.map +1 -0
- package/dist/app-shell-BH_bGcE2.js +235 -0
- package/dist/app-shell-BH_bGcE2.js.map +1 -0
- package/dist/attachment-DsLgNHXt.js +244 -0
- package/dist/attachment-DsLgNHXt.js.map +1 -0
- package/dist/auth-BDB1V_2q.js +704 -0
- package/dist/auth-BDB1V_2q.js.map +1 -0
- package/dist/avatar-CsnWaYmt.js +173 -0
- package/dist/avatar-CsnWaYmt.js.map +1 -0
- package/dist/badge-BZXZT9wd.js +92 -0
- package/dist/badge-BZXZT9wd.js.map +1 -0
- package/dist/base/accordion.js +3 -0
- package/dist/base/action-menu.js +3 -0
- package/dist/base/attachment.js +3 -0
- package/dist/base/avatar.js +3 -0
- package/dist/base/badge.js +3 -0
- package/dist/base/buttons.js +3 -0
- package/dist/base/cards.js +4 -0
- package/dist/base/carousel.js +251 -0
- package/dist/base/carousel.js.map +1 -0
- package/dist/base/cascader.js +361 -0
- package/dist/base/cascader.js.map +1 -0
- package/dist/base/chart.js +3 -0
- package/dist/base/choice-inputs.js +3 -0
- package/dist/base/code-block.js +3 -0
- package/dist/base/combobox.js +3 -0
- package/dist/base/command.js +3 -0
- package/dist/base/copyable.js +3 -0
- package/dist/base/date-pickers.js +4 -0
- package/dist/base/display.js +8 -0
- package/dist/base/feedback.js +4 -0
- package/dist/base/forms-numeric.js +3 -0
- package/dist/base/forms.js +4 -0
- package/dist/base/item.js +3 -0
- package/dist/base/media-gallery.js +3 -0
- package/dist/base/navigation.js +8 -0
- package/dist/base/popover-menu.js +3 -0
- package/dist/base/popover.js +3 -0
- package/dist/base/qr-code.js +63 -0
- package/dist/base/qr-code.js.map +1 -0
- package/dist/base/repeaters.js +620 -0
- package/dist/base/repeaters.js.map +1 -0
- package/dist/base/sheet.js +3 -0
- package/dist/base/sidebar.js +3 -0
- package/dist/base/signature-pad.js +364 -0
- package/dist/base/signature-pad.js.map +1 -0
- package/dist/base/skeleton.js +3 -0
- package/dist/base/spinner.js +3 -0
- package/dist/base/structure.js +3 -0
- package/dist/base/table.js +3 -0
- package/dist/base/text-inputs.js +4 -0
- package/dist/base/toaster.js +102 -0
- package/dist/base/toaster.js.map +1 -0
- package/dist/base/tree.js +3 -0
- package/dist/base/upload-queue.js +3 -0
- package/dist/base/upload.js +5 -0
- package/dist/base/value-inputs.js +3 -0
- package/dist/blocks/admin.js +478 -0
- package/dist/blocks/admin.js.map +1 -0
- package/dist/blocks/ai.js +1021 -0
- package/dist/blocks/ai.js.map +1 -0
- package/dist/blocks/analytics.js +1499 -0
- package/dist/blocks/analytics.js.map +1 -0
- package/dist/blocks/collaboration.js +3 -0
- package/dist/blocks/commerce/receipt.js +3 -0
- package/dist/blocks/commerce.js +3393 -0
- package/dist/blocks/commerce.js.map +1 -0
- package/dist/blocks/data-display.js +3 -0
- package/dist/blocks/onboarding.js +128 -0
- package/dist/blocks/onboarding.js.map +1 -0
- package/dist/blocks/timelines.js +3 -0
- package/dist/breadcrumbs-DdQ_I5ra.js +127 -0
- package/dist/breadcrumbs-DdQ_I5ra.js.map +1 -0
- package/dist/button-BS6l5JUw.js +47 -0
- package/dist/button-BS6l5JUw.js.map +1 -0
- package/dist/buttons-Co6GavvM.js +674 -0
- package/dist/buttons-Co6GavvM.js.map +1 -0
- package/dist/cards-BMB0laLG.js +66 -0
- package/dist/cards-BMB0laLG.js.map +1 -0
- package/dist/chart-DVfcwQu6.js +149 -0
- package/dist/chart-DVfcwQu6.js.map +1 -0
- package/dist/choice-inputs-CavA-SGV.js +644 -0
- package/dist/choice-inputs-CavA-SGV.js.map +1 -0
- package/dist/code-block-DIlqzoiD.js +183 -0
- package/dist/code-block-DIlqzoiD.js.map +1 -0
- package/dist/collapsible-DsnktFNv.js +81 -0
- package/dist/collapsible-DsnktFNv.js.map +1 -0
- package/dist/collection-content-C4fthJV_.js +53 -0
- package/dist/collection-content-C4fthJV_.js.map +1 -0
- package/dist/combobox-CHD750do.js +850 -0
- package/dist/combobox-CHD750do.js.map +1 -0
- package/dist/combobox-HDftpzxt.js +273 -0
- package/dist/combobox-HDftpzxt.js.map +1 -0
- package/dist/command-D0kWBZfd.js +421 -0
- package/dist/command-D0kWBZfd.js.map +1 -0
- package/dist/comments-CvYeglMS.js +1132 -0
- package/dist/comments-CvYeglMS.js.map +1 -0
- package/dist/component-vocabulary.js +26 -0
- package/dist/component-vocabulary.js.map +1 -0
- package/dist/components/base/accordion/accordion-variants.d.ts +36 -0
- package/dist/components/base/accordion/accordion.d.ts +20 -0
- package/dist/components/base/accordion/accordion.strings.d.ts +15 -0
- package/dist/components/base/accordion/accordion.types.d.ts +74 -0
- package/dist/components/base/accordion/index.d.ts +4 -0
- package/dist/components/base/accordion/smart-accordion.d.ts +7 -0
- package/dist/components/base/action-menu/action-menu.d.ts +147 -0
- package/dist/components/base/action-menu/action-menu.strings.d.ts +4 -0
- package/dist/components/base/action-menu/index.d.ts +11 -0
- package/dist/components/base/attachment/attachment.d.ts +17 -0
- package/dist/components/base/attachment/attachment.types.d.ts +49 -0
- package/dist/components/base/attachment/index.d.ts +2 -0
- package/dist/components/base/avatar/avatar.d.ts +24 -0
- package/dist/components/base/avatar/index.d.ts +14 -0
- package/dist/components/base/avatar/stacked-avatars.d.ts +39 -0
- package/dist/components/base/badge/badge.d.ts +22 -0
- package/dist/components/base/badge/badge.recipes.d.ts +20 -0
- package/dist/components/base/badge/index.d.ts +2 -0
- package/dist/components/base/buttons/base-button.d.ts +24 -0
- package/dist/components/base/buttons/button-group.d.ts +28 -0
- package/dist/components/base/buttons/button-group.recipes.d.ts +6 -0
- package/dist/components/base/buttons/button.d.ts +47 -0
- package/dist/components/base/buttons/button.recipes.d.ts +23 -0
- package/dist/components/base/buttons/button.variants.d.ts +8 -0
- package/dist/components/base/buttons/index.d.ts +7 -0
- package/dist/components/base/buttons/loader-button.d.ts +40 -0
- package/dist/components/base/buttons/text-button.d.ts +19 -0
- package/dist/components/base/buttons/tooltip-button.d.ts +7 -0
- package/dist/components/base/cards/card-actions.d.ts +41 -0
- package/dist/components/base/cards/card.recipes.d.ts +28 -0
- package/dist/components/base/cards/index.d.ts +5 -0
- package/dist/components/base/cards/partials/card-primitives.d.ts +21 -0
- package/dist/components/base/cards/partials/has-renderable-content.d.ts +8 -0
- package/dist/components/base/cards/partials/smart-card-actions-menu.d.ts +8 -0
- package/dist/components/base/cards/partials/smart-card-alert.d.ts +20 -0
- package/dist/components/base/cards/partials/smart-card-header-row.d.ts +33 -0
- package/dist/components/base/cards/partials/smart-card-skeleton.d.ts +16 -0
- package/dist/components/base/cards/smart-card.d.ts +9 -0
- package/dist/components/base/cards/smart-card.strings.d.ts +18 -0
- package/dist/components/base/cards/smart-card.tokens.d.ts +44 -0
- package/dist/components/base/cards/smart-card.types.d.ts +144 -0
- package/dist/components/base/carousel/carousel.d.ts +105 -0
- package/dist/components/base/carousel/carousel.strings.d.ts +6 -0
- package/dist/components/base/carousel/index.d.ts +2 -0
- package/dist/components/base/cascader/cascader.d.ts +2 -0
- package/dist/components/base/cascader/cascader.types.d.ts +57 -0
- package/dist/components/base/cascader/index.d.ts +2 -0
- package/dist/components/base/chart/chart.d.ts +99 -0
- package/dist/components/base/chart/index.d.ts +9 -0
- package/dist/components/base/choice-inputs/card-checkbox-group.d.ts +27 -0
- package/dist/components/base/choice-inputs/card-radio-group.d.ts +19 -0
- package/dist/components/base/choice-inputs/checkbox.d.ts +17 -0
- package/dist/components/base/choice-inputs/choice-types.d.ts +57 -0
- package/dist/components/base/choice-inputs/index.d.ts +28 -0
- package/dist/components/base/choice-inputs/list-radio-group.d.ts +13 -0
- package/dist/components/base/choice-inputs/pill-radio-group.d.ts +27 -0
- package/dist/components/base/choice-inputs/select-popup.d.ts +26 -0
- package/dist/components/base/choice-inputs/select.d.ts +94 -0
- package/dist/components/base/choice-inputs/switch-card.d.ts +36 -0
- package/dist/components/base/choice-inputs/switch.d.ts +38 -0
- package/dist/components/base/choice-inputs/toggle-field.d.ts +41 -0
- package/dist/components/base/code-block/code-block.d.ts +3 -0
- package/dist/components/base/code-block/code-block.types.d.ts +46 -0
- package/dist/components/base/code-block/index.d.ts +2 -0
- package/dist/components/base/code-block/use-code-copy.d.ts +6 -0
- package/dist/components/base/combobox/index.d.ts +27 -0
- package/dist/components/base/command/command.d.ts +73 -0
- package/dist/components/base/command/index.d.ts +1 -0
- package/dist/components/base/copyable/copyable.d.ts +36 -0
- package/dist/components/base/copyable/index.d.ts +1 -0
- package/dist/components/base/date-pickers/date-picker-footer.d.ts +14 -0
- package/dist/components/base/date-pickers/date-picker-header.d.ts +10 -0
- package/dist/components/base/date-pickers/date-picker-helpers.d.ts +87 -0
- package/dist/components/base/date-pickers/date-picker-internals.d.ts +10 -0
- package/dist/components/base/date-pickers/date-picker-multiple.d.ts +20 -0
- package/dist/components/base/date-pickers/date-picker-range.d.ts +15 -0
- package/dist/components/base/date-pickers/date-picker-single.d.ts +15 -0
- package/dist/components/base/date-pickers/date-picker.d.ts +3 -0
- package/dist/components/base/date-pickers/date-picker.recipes.d.ts +18 -0
- package/dist/components/base/date-pickers/date-pickers.strings.d.ts +14 -0
- package/dist/components/base/date-pickers/datepicker.types.d.ts +285 -0
- package/dist/components/base/date-pickers/index.d.ts +7 -0
- package/dist/components/base/date-pickers/month-year-picker.d.ts +4 -0
- package/dist/components/base/date-pickers/time-picker.d.ts +70 -0
- package/dist/components/base/display/alert-dialog.d.ts +25 -0
- package/dist/components/base/display/boolean-indicator.d.ts +25 -0
- package/dist/components/base/display/collapsible.d.ts +21 -0
- package/dist/components/base/display/content-block.d.ts +73 -0
- package/dist/components/base/display/content-block.strings.d.ts +5 -0
- package/dist/components/base/display/date-block.d.ts +70 -0
- package/dist/components/base/display/dialog.d.ts +35 -0
- package/dist/components/base/display/icon-badge/icon-badge.d.ts +45 -0
- package/dist/components/base/display/icon-badge/index.d.ts +1 -0
- package/dist/components/base/display/icon-size.d.ts +5 -0
- package/dist/components/base/display/index.d.ts +31 -0
- package/dist/components/base/display/placeholder-pattern.d.ts +7 -0
- package/dist/components/base/display/scroll-area.d.ts +12 -0
- package/dist/components/base/display/separator.d.ts +10 -0
- package/dist/components/base/display/surface-title.d.ts +10 -0
- package/dist/components/base/display/tooltip.d.ts +28 -0
- package/dist/components/base/display/visually-hidden.d.ts +14 -0
- package/dist/components/base/feedback/alert.d.ts +49 -0
- package/dist/components/base/feedback/empty.d.ts +48 -0
- package/dist/components/base/feedback/index.d.ts +27 -0
- package/dist/components/base/feedback/progress.d.ts +81 -0
- package/dist/components/base/feedback/progress.strings.d.ts +5 -0
- package/dist/components/base/feedback/state-display.d.ts +39 -0
- package/dist/components/base/forms/controlled-form-field.d.ts +32 -0
- package/dist/components/base/forms/controlled-form-field.strings.d.ts +7 -0
- package/dist/components/base/forms/form-field.d.ts +38 -0
- package/dist/components/base/forms/form-sizing.d.ts +86 -0
- package/dist/components/base/forms/index.d.ts +4 -0
- package/dist/components/base/forms/operation-password-form.d.ts +16 -0
- package/dist/components/base/forms/workflow.d.ts +68 -0
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +47 -0
- package/dist/components/base/forms-numeric/currency-input.d.ts +44 -0
- package/dist/components/base/forms-numeric/decimal-input.d.ts +53 -0
- package/dist/components/base/forms-numeric/dimensions-input.d.ts +79 -0
- package/dist/components/base/forms-numeric/index.d.ts +21 -0
- package/dist/components/base/forms-numeric/money-input.d.ts +67 -0
- package/dist/components/base/forms-numeric/money-input.strings.d.ts +6 -0
- package/dist/components/base/forms-numeric/percentage-input.d.ts +8 -0
- package/dist/components/base/forms-numeric/rounding-mode-select.d.ts +12 -0
- package/dist/components/base/forms-numeric/weight-input.d.ts +54 -0
- package/dist/components/base/item/index.d.ts +2 -0
- package/dist/components/base/item/item.d.ts +12 -0
- package/dist/components/base/item/item.types.d.ts +100 -0
- package/dist/components/base/media-gallery/index.d.ts +2 -0
- package/dist/components/base/media-gallery/media-gallery.d.ts +45 -0
- package/dist/components/base/navigation/breadcrumbs.d.ts +37 -0
- package/dist/components/base/navigation/dropdown-menu.d.ts +45 -0
- package/dist/components/base/navigation/index.d.ts +21 -0
- package/dist/components/base/navigation/language-switcher.d.ts +12 -0
- package/dist/components/base/navigation/navigation-tabs.d.ts +40 -0
- package/dist/components/base/navigation/overflow-tab-bar.d.ts +43 -0
- package/dist/components/base/navigation/page-header/index.d.ts +1 -0
- package/dist/components/base/navigation/page-header/page-header.d.ts +88 -0
- package/dist/components/base/navigation/pagination.d.ts +61 -0
- package/dist/components/base/navigation/tab-scroll-viewport.d.ts +12 -0
- package/dist/components/base/navigation/tabs.d.ts +23 -0
- package/dist/components/base/popover/collection-content.d.ts +22 -0
- package/dist/components/base/popover/index.d.ts +1 -0
- package/dist/components/base/popover/popover.d.ts +54 -0
- package/dist/components/base/popover/popover.recipes.d.ts +29 -0
- package/dist/components/base/popover-menu/index.d.ts +3 -0
- package/dist/components/base/popover-menu/popover-menu.d.ts +82 -0
- package/dist/components/base/popover-menu/popover-menu.types.d.ts +30 -0
- package/dist/components/base/qr-code/index.d.ts +8 -0
- package/dist/components/base/qr-code/qr-code.d.ts +13 -0
- package/dist/components/base/repeaters/index.d.ts +21 -0
- package/dist/components/base/repeaters/key-value-editor.d.ts +27 -0
- package/dist/components/base/repeaters/localized-object-field.d.ts +35 -0
- package/dist/components/base/repeaters/localized-string-field.d.ts +25 -0
- package/dist/components/base/repeaters/localized-string-repeater.d.ts +44 -0
- package/dist/components/base/repeaters/object-repeater.d.ts +66 -0
- package/dist/components/base/repeaters/repeater.d.ts +87 -0
- package/dist/components/base/repeaters/repeaters.strings.d.ts +16 -0
- package/dist/components/base/repeaters/string-repeater.d.ts +65 -0
- package/dist/components/base/repeaters/string-repeater.utils.d.ts +2 -0
- package/dist/components/base/sheet/index.d.ts +1 -0
- package/dist/components/base/sheet/sheet.d.ts +35 -0
- package/dist/components/base/sidebar/index.d.ts +6 -0
- package/dist/components/base/sidebar/sidebar.d.ts +135 -0
- package/dist/components/base/signature-pad/index.d.ts +4 -0
- package/dist/components/base/signature-pad/signature-pad.d.ts +4 -0
- package/dist/components/base/signature-pad/signature-pad.types.d.ts +66 -0
- package/dist/components/base/signature-pad/signature-pad.utils.d.ts +8 -0
- package/dist/components/base/skeleton/index.d.ts +14 -0
- package/dist/components/base/skeleton/skeleton.d.ts +54 -0
- package/dist/components/base/spinner/index.d.ts +1 -0
- package/dist/components/base/spinner/spinner.d.ts +32 -0
- package/dist/components/base/structure/adaptive-grid.d.ts +3 -0
- package/dist/components/base/structure/grid-cell.d.ts +3 -0
- package/dist/components/base/structure/grid.d.ts +3 -0
- package/dist/components/base/structure/index.d.ts +5 -0
- package/dist/components/base/structure/stack.d.ts +3 -0
- package/dist/components/base/structure/structure.context.d.ts +6 -0
- package/dist/components/base/structure/structure.recipes.d.ts +27 -0
- package/dist/components/base/structure/structure.responsive.d.ts +5 -0
- package/dist/components/base/structure/structure.types.d.ts +51 -0
- package/dist/components/base/table/index.d.ts +18 -0
- package/dist/components/base/text-inputs/hooks/index.d.ts +1 -0
- package/dist/components/base/text-inputs/hooks/use-form-field-state.d.ts +48 -0
- package/dist/components/base/text-inputs/index.d.ts +21 -0
- package/dist/components/base/text-inputs/input-group.d.ts +46 -0
- package/dist/components/base/text-inputs/input.d.ts +45 -0
- package/dist/components/base/text-inputs/password-input.d.ts +28 -0
- package/dist/components/base/text-inputs/slug-field.d.ts +21 -0
- package/dist/components/base/text-inputs/textarea.d.ts +37 -0
- package/dist/components/base/toaster/index.d.ts +1 -0
- package/dist/components/base/toaster/toaster.d.ts +6 -0
- package/dist/components/base/tree/hierarchy.d.ts +11 -0
- package/dist/components/base/tree/index.d.ts +2 -0
- package/dist/components/base/tree/tree.d.ts +3 -0
- package/dist/components/base/tree/tree.types.d.ts +47 -0
- package/dist/components/base/upload/avatar-upload.d.ts +39 -0
- package/dist/components/base/upload/dropzone.d.ts +40 -0
- package/dist/components/base/upload/file-picker-input.d.ts +15 -0
- package/dist/components/base/upload/file-upload.d.ts +9 -0
- package/dist/components/base/upload/file-upload.strings.d.ts +18 -0
- package/dist/components/base/upload/file-upload.types.d.ts +68 -0
- package/dist/components/base/upload/file-upload.validation.d.ts +21 -0
- package/dist/components/base/upload/image-upload.d.ts +57 -0
- package/dist/components/base/upload/index.d.ts +26 -0
- package/dist/components/base/upload/use-file-drop-target.d.ts +22 -0
- package/dist/components/base/upload-queue/index.d.ts +3 -0
- package/dist/components/base/upload-queue/upload-progress-list.d.ts +55 -0
- package/dist/components/base/upload-queue/upload-tray.d.ts +46 -0
- package/dist/components/base/value-inputs/color-input.d.ts +26 -0
- package/dist/components/base/value-inputs/date-time-input.d.ts +19 -0
- package/dist/components/base/value-inputs/index.d.ts +25 -0
- package/dist/components/base/value-inputs/phone-input.d.ts +48 -0
- package/dist/components/base/value-inputs/slider.d.ts +59 -0
- package/dist/components/base/value-inputs/tags-input.d.ts +67 -0
- package/dist/components/blocks/admin/action-surfaces/index.d.ts +127 -0
- package/dist/components/blocks/admin/admin.strings.d.ts +11 -0
- package/dist/components/blocks/admin/api-key-list/api-key-list.d.ts +2 -0
- package/dist/components/blocks/admin/api-key-list/api-key-list.strings.d.ts +16 -0
- package/dist/components/blocks/admin/api-key-list/api-key-list.types.d.ts +58 -0
- package/dist/components/blocks/admin/api-key-list/index.d.ts +3 -0
- package/dist/components/blocks/admin/index.d.ts +4 -0
- package/dist/components/blocks/admin/role-permission/index.d.ts +2 -0
- package/dist/components/blocks/admin/role-permission/role-permission.d.ts +5 -0
- package/dist/components/blocks/admin/role-permission/types.d.ts +26 -0
- package/dist/components/blocks/ai/ai-agent/ai-agent.d.ts +5 -0
- package/dist/components/blocks/ai/ai-agent/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-agent/types.d.ts +30 -0
- package/dist/components/blocks/ai/ai-artifact/ai-artifact.d.ts +5 -0
- package/dist/components/blocks/ai/ai-artifact/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-artifact/types.d.ts +50 -0
- package/dist/components/blocks/ai/ai-attachment/ai-attachment.d.ts +5 -0
- package/dist/components/blocks/ai/ai-attachment/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-attachment/types.d.ts +35 -0
- package/dist/components/blocks/ai/ai-chain-of-thought/ai-chain-of-thought.d.ts +5 -0
- package/dist/components/blocks/ai/ai-chain-of-thought/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-chain-of-thought/types.d.ts +36 -0
- package/dist/components/blocks/ai/ai-citation/ai-citation.d.ts +5 -0
- package/dist/components/blocks/ai/ai-citation/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-citation/types.d.ts +38 -0
- package/dist/components/blocks/ai/ai-classification/ai-classification.d.ts +2 -0
- package/dist/components/blocks/ai/ai-classification/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-classification/types.d.ts +27 -0
- package/dist/components/blocks/ai/ai-code-block/ai-code-block.d.ts +6 -0
- package/dist/components/blocks/ai/ai-code-block/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-code-block/types.d.ts +38 -0
- package/dist/components/blocks/ai/ai-confidence/ai-confidence.d.ts +5 -0
- package/dist/components/blocks/ai/ai-confidence/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-confidence/types.d.ts +25 -0
- package/dist/components/blocks/ai/ai-confirmation/ai-confirmation.d.ts +5 -0
- package/dist/components/blocks/ai/ai-confirmation/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-confirmation/types.d.ts +40 -0
- package/dist/components/blocks/ai/ai-feedback/ai-feedback.d.ts +5 -0
- package/dist/components/blocks/ai/ai-feedback/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-feedback/types.d.ts +24 -0
- package/dist/components/blocks/ai/ai-file-tree/ai-file-tree.d.ts +5 -0
- package/dist/components/blocks/ai/ai-file-tree/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-file-tree/types.d.ts +59 -0
- package/dist/components/blocks/ai/ai-inline-citation/ai-inline-citation.d.ts +5 -0
- package/dist/components/blocks/ai/ai-inline-citation/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-inline-citation/types.d.ts +22 -0
- package/dist/components/blocks/ai/ai-message-bubble/ai-message-bubble.d.ts +6 -0
- package/dist/components/blocks/ai/ai-message-bubble/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-message-bubble/types.d.ts +35 -0
- package/dist/components/blocks/ai/ai-package-info/ai-package-info.d.ts +5 -0
- package/dist/components/blocks/ai/ai-package-info/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-package-info/types.d.ts +39 -0
- package/dist/components/blocks/ai/ai-prompt-suggestions/ai-prompt-suggestions.d.ts +5 -0
- package/dist/components/blocks/ai/ai-prompt-suggestions/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-prompt-suggestions/types.d.ts +26 -0
- package/dist/components/blocks/ai/ai-reasoning/ai-reasoning.d.ts +5 -0
- package/dist/components/blocks/ai/ai-reasoning/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-reasoning/types.d.ts +32 -0
- package/dist/components/blocks/ai/ai-shimmer/ai-shimmer.d.ts +5 -0
- package/dist/components/blocks/ai/ai-shimmer/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-shimmer/types.d.ts +11 -0
- package/dist/components/blocks/ai/ai-sources/ai-sources.d.ts +5 -0
- package/dist/components/blocks/ai/ai-sources/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-sources/types.d.ts +44 -0
- package/dist/components/blocks/ai/ai-summary/ai-summary.d.ts +2 -0
- package/dist/components/blocks/ai/ai-summary/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-summary/types.d.ts +32 -0
- package/dist/components/blocks/ai/ai-task/ai-task.d.ts +5 -0
- package/dist/components/blocks/ai/ai-task/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-task/types.d.ts +38 -0
- package/dist/components/blocks/ai/ai-token-usage/ai-token-usage.d.ts +5 -0
- package/dist/components/blocks/ai/ai-token-usage/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-token-usage/types.d.ts +22 -0
- package/dist/components/blocks/ai/ai-tool-call/ai-tool-call.d.ts +5 -0
- package/dist/components/blocks/ai/ai-tool-call/index.d.ts +2 -0
- package/dist/components/blocks/ai/ai-tool-call/types.d.ts +38 -0
- package/dist/components/blocks/ai/ai.strings.d.ts +36 -0
- package/dist/components/blocks/ai/index.d.ts +24 -0
- package/dist/components/blocks/ai/use-copy-feedback.d.ts +6 -0
- package/dist/components/blocks/analytics/activity-heatmap/activity-heatmap.d.ts +5 -0
- package/dist/components/blocks/analytics/activity-heatmap/index.d.ts +2 -0
- package/dist/components/blocks/analytics/activity-heatmap/types.d.ts +20 -0
- package/dist/components/blocks/analytics/analytics.strings.d.ts +35 -0
- package/dist/components/blocks/analytics/atoms/metric-skeleton.d.ts +13 -0
- package/dist/components/blocks/analytics/atoms/metric-sparkline.d.ts +15 -0
- package/dist/components/blocks/analytics/atoms/metric-trend-chip.d.ts +15 -0
- package/dist/components/blocks/analytics/chart-card/chart-card.d.ts +42 -0
- package/dist/components/blocks/analytics/chart-card/index.d.ts +1 -0
- package/dist/components/blocks/analytics/format-metric-value.d.ts +8 -0
- package/dist/components/blocks/analytics/index.d.ts +34 -0
- package/dist/components/blocks/analytics/metric/index.d.ts +1 -0
- package/dist/components/blocks/analytics/metric/metric.d.ts +28 -0
- package/dist/components/blocks/analytics/metric-bar/index.d.ts +1 -0
- package/dist/components/blocks/analytics/metric-bar/metric-bar.d.ts +22 -0
- package/dist/components/blocks/analytics/metric-comparison/index.d.ts +1 -0
- package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +26 -0
- package/dist/components/blocks/analytics/metric-gradient/index.d.ts +1 -0
- package/dist/components/blocks/analytics/metric-gradient/metric-gradient.d.ts +19 -0
- package/dist/components/blocks/analytics/metric-grid/index.d.ts +1 -0
- package/dist/components/blocks/analytics/metric-grid/metric-grid.d.ts +33 -0
- package/dist/components/blocks/analytics/metric-micro-grid/index.d.ts +1 -0
- package/dist/components/blocks/analytics/metric-micro-grid/metric-micro-grid.d.ts +23 -0
- package/dist/components/blocks/analytics/time-ruler/index.d.ts +2 -0
- package/dist/components/blocks/analytics/time-ruler/time-ruler.d.ts +5 -0
- package/dist/components/blocks/analytics/time-ruler/types.d.ts +32 -0
- package/dist/components/blocks/analytics/types.d.ts +83 -0
- package/dist/components/blocks/collaboration/index.d.ts +1 -0
- package/dist/components/blocks/collaboration/message/index.d.ts +2 -0
- package/dist/components/blocks/collaboration/message/message.d.ts +8 -0
- package/dist/components/blocks/collaboration/message/message.types.d.ts +30 -0
- package/dist/components/blocks/commerce/address-card/address-card.d.ts +5 -0
- package/dist/components/blocks/commerce/address-card/index.d.ts +2 -0
- package/dist/components/blocks/commerce/address-card/types.d.ts +43 -0
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.d.ts +12 -0
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.types.d.ts +36 -0
- package/dist/components/blocks/commerce/booking-calendar-event-card/index.d.ts +2 -0
- package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +5 -0
- package/dist/components/blocks/commerce/cart-summary/index.d.ts +2 -0
- package/dist/components/blocks/commerce/cart-summary/types.d.ts +53 -0
- package/dist/components/blocks/commerce/coupon-input/coupon-input.d.ts +5 -0
- package/dist/components/blocks/commerce/coupon-input/index.d.ts +2 -0
- package/dist/components/blocks/commerce/coupon-input/types.d.ts +35 -0
- package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +5 -0
- package/dist/components/blocks/commerce/discount-stack/index.d.ts +2 -0
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +27 -0
- package/dist/components/blocks/commerce/format-signed-amount.d.ts +22 -0
- package/dist/components/blocks/commerce/giftcard-card/giftcard-card.d.ts +62 -0
- package/dist/components/blocks/commerce/giftcard-card/index.d.ts +2 -0
- package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-compact.d.ts +10 -0
- package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-copy-button.d.ts +9 -0
- package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-dark.d.ts +7 -0
- package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-full.d.ts +11 -0
- package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-illustrated.d.ts +10 -0
- package/dist/components/blocks/commerce/giftcard-card/partials/giftcard-minimal.d.ts +10 -0
- package/dist/components/blocks/commerce/giftcard-card/types.d.ts +83 -0
- package/dist/components/blocks/commerce/index.d.ts +34 -0
- package/dist/components/blocks/commerce/inventory-level/index.d.ts +3 -0
- package/dist/components/blocks/commerce/inventory-level/inventory-level.d.ts +5 -0
- package/dist/components/blocks/commerce/inventory-level/inventory-level.strings.d.ts +10 -0
- package/dist/components/blocks/commerce/inventory-level/types.d.ts +20 -0
- package/dist/components/blocks/commerce/inventory-section/index.d.ts +2 -0
- package/dist/components/blocks/commerce/inventory-section/inventory-section.d.ts +5 -0
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +105 -0
- package/dist/components/blocks/commerce/invoice-header/index.d.ts +2 -0
- package/dist/components/blocks/commerce/invoice-header/invoice-header.d.ts +5 -0
- package/dist/components/blocks/commerce/invoice-header/types.d.ts +51 -0
- package/dist/components/blocks/commerce/invoice-line-items/index.d.ts +2 -0
- package/dist/components/blocks/commerce/invoice-line-items/invoice-line-items.d.ts +5 -0
- package/dist/components/blocks/commerce/invoice-line-items/types.d.ts +64 -0
- package/dist/components/blocks/commerce/invoice-mini/index.d.ts +2 -0
- package/dist/components/blocks/commerce/invoice-mini/invoice-mini.d.ts +5 -0
- package/dist/components/blocks/commerce/invoice-mini/types.d.ts +28 -0
- package/dist/components/blocks/commerce/loyalty-points/index.d.ts +2 -0
- package/dist/components/blocks/commerce/loyalty-points/loyalty-points.d.ts +5 -0
- package/dist/components/blocks/commerce/loyalty-points/types.d.ts +32 -0
- package/dist/components/blocks/commerce/order-status/index.d.ts +2 -0
- package/dist/components/blocks/commerce/order-status/order-status.d.ts +5 -0
- package/dist/components/blocks/commerce/order-status/types.d.ts +35 -0
- package/dist/components/blocks/commerce/order-timeline/index.d.ts +2 -0
- package/dist/components/blocks/commerce/order-timeline/order-timeline.d.ts +5 -0
- package/dist/components/blocks/commerce/order-timeline/types.d.ts +22 -0
- package/dist/components/blocks/commerce/payment-method/index.d.ts +2 -0
- package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +5 -0
- package/dist/components/blocks/commerce/payment-method/types.d.ts +33 -0
- package/dist/components/blocks/commerce/payment-timeline/index.d.ts +2 -0
- package/dist/components/blocks/commerce/payment-timeline/payment-timeline.d.ts +5 -0
- package/dist/components/blocks/commerce/payment-timeline/types.d.ts +15 -0
- package/dist/components/blocks/commerce/receipt/index.d.ts +3 -0
- package/dist/components/blocks/commerce/receipt/receipt-items.d.ts +2 -0
- package/dist/components/blocks/commerce/receipt/receipt.d.ts +3 -0
- package/dist/components/blocks/commerce/receipt/types.d.ts +42 -0
- package/dist/components/blocks/commerce/refund-status/index.d.ts +2 -0
- package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +5 -0
- package/dist/components/blocks/commerce/refund-status/types.d.ts +37 -0
- package/dist/components/blocks/commerce/seo-listing/index.d.ts +3 -0
- package/dist/components/blocks/commerce/seo-listing/seo-listing-card.d.ts +5 -0
- package/dist/components/blocks/commerce/seo-listing/seo-listing-score.d.ts +5 -0
- package/dist/components/blocks/commerce/seo-listing/types.d.ts +92 -0
- package/dist/components/blocks/commerce/shipment-tracking/index.d.ts +2 -0
- package/dist/components/blocks/commerce/shipment-tracking/shipment-tracking.d.ts +5 -0
- package/dist/components/blocks/commerce/shipment-tracking/types.d.ts +44 -0
- package/dist/components/blocks/commerce/subscription-summary/index.d.ts +2 -0
- package/dist/components/blocks/commerce/subscription-summary/subscription-summary.d.ts +5 -0
- package/dist/components/blocks/commerce/subscription-summary/types.d.ts +39 -0
- package/dist/components/blocks/commerce/tax-breakdown/index.d.ts +2 -0
- package/dist/components/blocks/commerce/tax-breakdown/tax-breakdown.d.ts +5 -0
- package/dist/components/blocks/commerce/tax-breakdown/types.d.ts +34 -0
- package/dist/components/blocks/commerce/upcoming-booking/index.d.ts +2 -0
- package/dist/components/blocks/commerce/upcoming-booking/types.d.ts +29 -0
- package/dist/components/blocks/commerce/upcoming-booking/upcoming-booking.d.ts +5 -0
- package/dist/components/blocks/commerce/vendor-profile/index.d.ts +3 -0
- package/dist/components/blocks/commerce/vendor-profile/types.d.ts +86 -0
- package/dist/components/blocks/commerce/vendor-profile/vendor-profile.d.ts +2 -0
- package/dist/components/blocks/commerce/voucher-entry/index.d.ts +2 -0
- package/dist/components/blocks/commerce/voucher-entry/types.d.ts +33 -0
- package/dist/components/blocks/commerce/voucher-entry/voucher-entry.d.ts +5 -0
- package/dist/components/blocks/data-display/dense-info-card/dense-info.strings.d.ts +6 -0
- package/dist/components/blocks/data-display/dense-info-card/helpers.d.ts +19 -0
- package/dist/components/blocks/data-display/dense-info-card/index.d.ts +7 -0
- package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-classification.d.ts +5 -0
- package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-dashboard.d.ts +5 -0
- package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-financial.d.ts +5 -0
- package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-project.d.ts +5 -0
- package/dist/components/blocks/data-display/dense-info-card/partials/dense-info-score.d.ts +5 -0
- package/dist/components/blocks/data-display/dense-info-card/types.d.ts +183 -0
- package/dist/components/blocks/data-display/empty-state/empty-state.d.ts +2 -0
- package/dist/components/blocks/data-display/empty-state/empty-state.strings.d.ts +19 -0
- package/dist/components/blocks/data-display/empty-state/empty-state.types.d.ts +86 -0
- package/dist/components/blocks/data-display/empty-state/index.d.ts +5 -0
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/document-stack.d.ts +9 -0
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/inbox-clean.d.ts +9 -0
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/index.d.ts +25 -0
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/search-glass.d.ts +9 -0
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/stacked-cards.d.ts +11 -0
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/types.d.ts +4 -0
- package/dist/components/blocks/data-display/empty-state/partials/illustrations/users-circle.d.ts +9 -0
- package/dist/components/blocks/data-display/index.d.ts +6 -0
- package/dist/components/blocks/data-display/inline-stat/index.d.ts +1 -0
- package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +35 -0
- package/dist/components/blocks/data-display/metadata/index.d.ts +4 -0
- package/dist/components/blocks/data-display/metadata/metadata-list.d.ts +78 -0
- package/dist/components/blocks/data-display/metadata/metadata-list.strings.d.ts +18 -0
- package/dist/components/blocks/data-display/metadata/metadata-value.d.ts +142 -0
- package/dist/components/blocks/data-display/relationship-card-frame.d.ts +40 -0
- package/dist/components/blocks/onboarding/checklist/checklist.d.ts +2 -0
- package/dist/components/blocks/onboarding/checklist/checklist.strings.d.ts +15 -0
- package/dist/components/blocks/onboarding/checklist/checklist.types.d.ts +64 -0
- package/dist/components/blocks/onboarding/checklist/index.d.ts +4 -0
- package/dist/components/blocks/onboarding/checklist/partials/step-status-indicator.d.ts +12 -0
- package/dist/components/blocks/onboarding/index.d.ts +7 -0
- package/dist/components/blocks/timelines/changelog/changelog-timeline.d.ts +5 -0
- package/dist/components/blocks/timelines/changelog/index.d.ts +2 -0
- package/dist/components/blocks/timelines/changelog/types.d.ts +33 -0
- package/dist/components/blocks/timelines/index.d.ts +5 -0
- package/dist/components/blocks/timelines/milestones/index.d.ts +2 -0
- package/dist/components/blocks/timelines/milestones/milestones-timeline.d.ts +5 -0
- package/dist/components/blocks/timelines/milestones/types.d.ts +32 -0
- package/dist/components/blocks/timelines/shared/index.d.ts +1 -0
- package/dist/components/blocks/timelines/shared/timeline.d.ts +40 -0
- package/dist/components/blocks/timelines/steps-card/index.d.ts +2 -0
- package/dist/components/blocks/timelines/steps-card/steps-card.d.ts +9 -0
- package/dist/components/blocks/timelines/steps-card/types.d.ts +38 -0
- package/dist/components/features/activities/activities-feed.d.ts +5 -0
- package/dist/components/features/activities/activities.config.d.ts +6 -0
- package/dist/components/features/activities/activities.strings.d.ts +38 -0
- package/dist/components/features/activities/activities.types.d.ts +431 -0
- package/dist/components/features/activities/activity-event-adapter.d.ts +38 -0
- package/dist/components/features/activities/activity-log.d.ts +6 -0
- package/dist/components/features/activities/hooks/index.d.ts +2 -0
- package/dist/components/features/activities/hooks/use-activity-feed.d.ts +44 -0
- package/dist/components/features/activities/hooks/use-activity-resources.d.ts +22 -0
- package/dist/components/features/activities/index.d.ts +8 -0
- package/dist/components/features/activities/partials/activity-actions-menu.d.ts +11 -0
- package/dist/components/features/activities/partials/activity-changes.d.ts +8 -0
- package/dist/components/features/activities/partials/activity-date-label.d.ts +9 -0
- package/dist/components/features/activities/partials/activity-empty-state.d.ts +9 -0
- package/dist/components/features/activities/partials/activity-headline.d.ts +20 -0
- package/dist/components/features/activities/partials/activity-marker.d.ts +25 -0
- package/dist/components/features/activities/partials/activity-resource-tag.d.ts +11 -0
- package/dist/components/features/activities/partials/activity-row.d.ts +68 -0
- package/dist/components/features/activities/partials/index.d.ts +8 -0
- package/dist/components/features/activities/partials/tone-tokens.d.ts +25 -0
- package/dist/components/features/ai-chat/ai-chat.d.ts +81 -0
- package/dist/components/features/ai-chat/ai-chat.strings.d.ts +56 -0
- package/dist/components/features/ai-chat/ai-chat.types.d.ts +170 -0
- package/dist/components/features/ai-chat/hooks/index.d.ts +1 -0
- package/dist/components/features/ai-chat/hooks/use-ai-chat-scroll.d.ts +15 -0
- package/dist/components/features/ai-chat/index.d.ts +5 -0
- package/dist/components/features/ai-chat/partials/ai-chat-attachments-strip.d.ts +15 -0
- package/dist/components/features/ai-chat/partials/ai-chat-conversation.d.ts +28 -0
- package/dist/components/features/ai-chat/partials/ai-chat-empty-state.d.ts +22 -0
- package/dist/components/features/ai-chat/partials/ai-chat-message.d.ts +21 -0
- package/dist/components/features/ai-chat/partials/ai-chat-prompt-input.d.ts +59 -0
- package/dist/components/features/ai-chat/partials/ai-chat-queue.d.ts +19 -0
- package/dist/components/features/ai-chat/partials/ai-chat-suggestions-row.d.ts +18 -0
- package/dist/components/features/ai-chat/partials/index.d.ts +7 -0
- package/dist/components/features/async-preview/async-preview.d.ts +84 -0
- package/dist/components/features/async-preview/async-preview.strings.d.ts +14 -0
- package/dist/components/features/async-preview/async-preview.types.d.ts +133 -0
- package/dist/components/features/async-preview/hooks/index.d.ts +1 -0
- package/dist/components/features/async-preview/hooks/use-async-preview.d.ts +8 -0
- package/dist/components/features/async-preview/index.d.ts +6 -0
- package/dist/components/features/async-preview/partials/index.d.ts +1 -0
- package/dist/components/features/async-preview/preview-trigger-cell.d.ts +45 -0
- package/dist/components/features/combobox/async-resource-combobox.d.ts +94 -0
- package/dist/components/features/combobox/combobox.d.ts +20 -0
- package/dist/components/features/combobox/combobox.strings.d.ts +14 -0
- package/dist/components/features/combobox/components/combobox-dropdown.d.ts +57 -0
- package/dist/components/features/combobox/components/error-message.d.ts +15 -0
- package/dist/components/features/combobox/components/highlighted-text.d.ts +14 -0
- package/dist/components/features/combobox/components/index.d.ts +13 -0
- package/dist/components/features/combobox/components/loading-more.d.ts +15 -0
- package/dist/components/features/combobox/components/status-content.d.ts +21 -0
- package/dist/components/features/combobox/constants.d.ts +19 -0
- package/dist/components/features/combobox/hooks/index.d.ts +2 -0
- package/dist/components/features/combobox/hooks/use-combobox-core.d.ts +30 -0
- package/dist/components/features/combobox/hooks/use-debounced-search.d.ts +10 -0
- package/dist/components/features/combobox/hooks/use-grouped-items.d.ts +9 -0
- package/dist/components/features/combobox/hooks/use-load-more.d.ts +12 -0
- package/dist/components/features/combobox/index.d.ts +13 -0
- package/dist/components/features/combobox/types.d.ts +184 -0
- package/dist/components/features/comments/comments-provider.d.ts +15 -0
- package/dist/components/features/comments/comments.d.ts +2 -0
- package/dist/components/features/comments/comments.strings.d.ts +91 -0
- package/dist/components/features/comments/comments.types.d.ts +369 -0
- package/dist/components/features/comments/hooks/index.d.ts +4 -0
- package/dist/components/features/comments/hooks/use-attachment-upload.d.ts +28 -0
- package/dist/components/features/comments/hooks/use-comments.d.ts +34 -0
- package/dist/components/features/comments/index.d.ts +8 -0
- package/dist/components/features/comments/partials/comment-attachment-chip.d.ts +23 -0
- package/dist/components/features/comments/partials/comment-composer.d.ts +12 -0
- package/dist/components/features/comments/partials/comment-content.d.ts +13 -0
- package/dist/components/features/comments/partials/comment-empty.d.ts +12 -0
- package/dist/components/features/comments/partials/comment-item.d.ts +3 -0
- package/dist/components/features/comments/partials/comment-timeline.d.ts +3 -0
- package/dist/components/features/comments/partials/index.d.ts +9 -0
- package/dist/components/features/data-view/data-view-filtering.d.ts +3 -0
- package/dist/components/features/data-view/data-view.d.ts +7 -0
- package/dist/components/features/data-view/data-view.strings.d.ts +9 -0
- package/dist/components/features/data-view/data-view.types.d.ts +191 -0
- package/dist/components/features/data-view/hooks/index.d.ts +1 -0
- package/dist/components/features/data-view/hooks/use-data-view.d.ts +2 -0
- package/dist/components/features/data-view/index.d.ts +4 -0
- package/dist/components/features/email-composer/document.d.ts +8 -0
- package/dist/components/features/email-composer/email-composer.d.ts +2 -0
- package/dist/components/features/email-composer/email-html.d.ts +5 -0
- package/dist/components/features/email-composer/engine.d.ts +18 -0
- package/dist/components/features/email-composer/http.d.ts +6 -0
- package/dist/components/features/email-composer/index.d.ts +6 -0
- package/dist/components/features/email-composer/partials/body-editor.d.ts +11 -0
- package/dist/components/features/email-composer/partials/data-status.d.ts +8 -0
- package/dist/components/features/email-composer/partials/html-preview.d.ts +6 -0
- package/dist/components/features/email-composer/partials/recipients.d.ts +14 -0
- package/dist/components/features/email-composer/partials/variables.d.ts +11 -0
- package/dist/components/features/email-composer/strings.d.ts +79 -0
- package/dist/components/features/email-composer/types.d.ts +195 -0
- package/dist/components/features/email-composer/use-composer.d.ts +119 -0
- package/dist/components/features/event-calendar/colors.d.ts +29 -0
- package/dist/components/features/event-calendar/event-calendar-day-cell.d.ts +5 -0
- package/dist/components/features/event-calendar/event-calendar-event-badge.d.ts +5 -0
- package/dist/components/features/event-calendar/event-calendar-event-card.d.ts +16 -0
- package/dist/components/features/event-calendar/event-calendar-header.d.ts +8 -0
- package/dist/components/features/event-calendar/event-calendar-legend.d.ts +5 -0
- package/dist/components/features/event-calendar/event-calendar.d.ts +5 -0
- package/dist/components/features/event-calendar/event-calendar.types.d.ts +350 -0
- package/dist/components/features/event-calendar/index.d.ts +11 -0
- package/dist/components/features/event-calendar/use-event-calendar-data.d.ts +15 -0
- package/dist/components/features/event-calendar/use-event-calendar.d.ts +24 -0
- package/dist/components/features/filters/facets/async-select-facet.d.ts +28 -0
- package/dist/components/features/filters/facets/date-facet.d.ts +18 -0
- package/dist/components/features/filters/facets/range-facet.d.ts +30 -0
- package/dist/components/features/filters/facets/search-facet.d.ts +27 -0
- package/dist/components/features/filters/facets/select-facet.d.ts +19 -0
- package/dist/components/features/filters/facets/tags-facet.d.ts +27 -0
- package/dist/components/features/filters/filter-context.d.ts +61 -0
- package/dist/components/features/filters/filter-layout.d.ts +16 -0
- package/dist/components/features/filters/filter-query.d.ts +21 -0
- package/dist/components/features/filters/filters.strings.d.ts +103 -0
- package/dist/components/features/filters/filters.types.d.ts +222 -0
- package/dist/components/features/filters/hooks/index.d.ts +3 -0
- package/dist/components/features/filters/hooks/use-async-options.d.ts +16 -0
- package/dist/components/features/filters/hooks/use-filter-groups.d.ts +16 -0
- package/dist/components/features/filters/index.d.ts +42 -0
- package/dist/components/features/filters/operator-options.d.ts +9 -0
- package/dist/components/features/filters/partials/active-filter-item.d.ts +37 -0
- package/dist/components/features/filters/partials/async-filter-content.d.ts +21 -0
- package/dist/components/features/filters/partials/date-filter-content.d.ts +14 -0
- package/dist/components/features/filters/partials/filter-error-boundary.d.ts +9 -0
- package/dist/components/features/filters/partials/filter-list-content.d.ts +24 -0
- package/dist/components/features/filters/partials/filter-list-item.d.ts +19 -0
- package/dist/components/features/filters/partials/filter-operator-select.d.ts +22 -0
- package/dist/components/features/filters/partials/filter-pill.d.ts +26 -0
- package/dist/components/features/filters/partials/filter-popover-content.d.ts +36 -0
- package/dist/components/features/filters/partials/filter-tabs.d.ts +14 -0
- package/dist/components/features/filters/partials/filter-value-display.d.ts +21 -0
- package/dist/components/features/filters/partials/filters-button.d.ts +32 -0
- package/dist/components/features/filters/partials/index.d.ts +14 -0
- package/dist/components/features/filters/partials/regular-filter-content.d.ts +28 -0
- package/dist/components/features/filters/partials/search-filters-list.d.ts +25 -0
- package/dist/components/features/filters/partials/tags-filter-content.d.ts +28 -0
- package/dist/components/features/filters/utils/filter-utils.d.ts +37 -0
- package/dist/components/features/filters/validators.d.ts +63 -0
- package/dist/components/features/global-search/global-search-dialog.d.ts +13 -0
- package/dist/components/features/global-search/global-search.d.ts +52 -0
- package/dist/components/features/global-search/global-search.strings.d.ts +36 -0
- package/dist/components/features/global-search/global-search.types.d.ts +105 -0
- package/dist/components/features/global-search/hooks/index.d.ts +2 -0
- package/dist/components/features/global-search/hooks/use-global-search.d.ts +33 -0
- package/dist/components/features/global-search/index.d.ts +9 -0
- package/dist/components/features/global-search/partials/global-search-empty-state.d.ts +7 -0
- package/dist/components/features/global-search/partials/global-search-footer.d.ts +13 -0
- package/dist/components/features/global-search/partials/global-search-idle-state.d.ts +12 -0
- package/dist/components/features/global-search/partials/global-search-input.d.ts +17 -0
- package/dist/components/features/global-search/partials/global-search-result-row.d.ts +16 -0
- package/dist/components/features/global-search/partials/global-search-tabs.d.ts +13 -0
- package/dist/components/features/global-search/partials/index.d.ts +12 -0
- package/dist/components/features/global-search/partials/tone-palettes.d.ts +8 -0
- package/dist/components/features/kanban/hooks/index.d.ts +1 -0
- package/dist/components/features/kanban/hooks/use-kanban.d.ts +32 -0
- package/dist/components/features/kanban/index.d.ts +5 -0
- package/dist/components/features/kanban/kanban-context.d.ts +25 -0
- package/dist/components/features/kanban/kanban-keyboard.d.ts +10 -0
- package/dist/components/features/kanban/kanban.d.ts +38 -0
- package/dist/components/features/kanban/kanban.strings.d.ts +24 -0
- package/dist/components/features/kanban/kanban.types.d.ts +168 -0
- package/dist/components/features/map/index.d.ts +13 -0
- package/dist/components/features/map/map.d.ts +166 -0
- package/dist/components/features/map/place-autocomplete.d.ts +97 -0
- package/dist/components/features/map/public-leaflet.types.d.ts +71 -0
- package/dist/components/features/map/use-map-color-scheme.d.ts +2 -0
- package/dist/components/features/media-library/hooks/index.d.ts +1 -0
- package/dist/components/features/media-library/hooks/use-media-library.d.ts +5 -0
- package/dist/components/features/media-library/index.d.ts +6 -0
- package/dist/components/features/media-library/media-library.d.ts +3 -0
- package/dist/components/features/media-library/media-library.strings.d.ts +124 -0
- package/dist/components/features/media-library/media-library.types.d.ts +568 -0
- package/dist/components/features/media-library/media-resource-gallery.d.ts +2 -0
- package/dist/components/features/media-library/partials/index.d.ts +1 -0
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +10 -0
- package/dist/components/features/mentions/hooks/index.d.ts +2 -0
- package/dist/components/features/mentions/hooks/use-mentions-search.d.ts +41 -0
- package/dist/components/features/mentions/hooks/use-mentions.d.ts +35 -0
- package/dist/components/features/mentions/index.d.ts +5 -0
- package/dist/components/features/mentions/mentions.strings.d.ts +26 -0
- package/dist/components/features/mentions/mentions.types.d.ts +100 -0
- package/dist/components/features/mentions/partials/index.d.ts +4 -0
- package/dist/components/features/mentions/partials/mention-chip.d.ts +29 -0
- package/dist/components/features/mentions/partials/mention-content.d.ts +22 -0
- package/dist/components/features/mentions/partials/mention-inline-suggestions.d.ts +36 -0
- package/dist/components/features/mentions/partials/mention-picker.d.ts +31 -0
- package/dist/components/features/mentions/utils/build-mention-html.d.ts +24 -0
- package/dist/components/features/mentions/utils/index.d.ts +3 -0
- package/dist/components/features/mentions/utils/parse-mentions-from-html.d.ts +13 -0
- package/dist/components/features/mentions/utils/split-html-by-mentions.d.ts +16 -0
- package/dist/components/features/overlays/alert-dialog.d.ts +4 -0
- package/dist/components/features/overlays/dialog.d.ts +4 -0
- package/dist/components/features/overlays/drawer.d.ts +4 -0
- package/dist/components/features/overlays/hooks/index.d.ts +2 -0
- package/dist/components/features/overlays/hooks/use-overlay-actions.d.ts +24 -0
- package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +36 -0
- package/dist/components/features/overlays/index.d.ts +6 -0
- package/dist/components/features/overlays/overlays.strings.d.ts +19 -0
- package/dist/components/features/overlays/overlays.types.d.ts +169 -0
- package/dist/components/features/products/components/index.d.ts +17 -0
- package/dist/components/features/products/components/product-contract-overview.d.ts +5 -0
- package/dist/components/features/products/components/product-details-card.d.ts +5 -0
- package/dist/components/features/products/components/product-operations-card.d.ts +5 -0
- package/dist/components/features/products/components/product-option-action-menu.d.ts +5 -0
- package/dist/components/features/products/components/product-options-matrix.d.ts +5 -0
- package/dist/components/features/products/components/product-options-summary.d.ts +5 -0
- package/dist/components/features/products/components/product-overview.d.ts +5 -0
- package/dist/components/features/products/components/product-policies-card.d.ts +5 -0
- package/dist/components/features/products/components/product-quote-preview-card.d.ts +5 -0
- package/dist/components/features/products/components/product-readiness-card.d.ts +5 -0
- package/dist/components/features/products/components/product-structure-card.d.ts +5 -0
- package/dist/components/features/products/components/product-variant-action-menu.d.ts +5 -0
- package/dist/components/features/products/components/product-variant-details.d.ts +5 -0
- package/dist/components/features/products/components/product-variant-editor.d.ts +5 -0
- package/dist/components/features/products/components/product-variants-bulk-table.d.ts +5 -0
- package/dist/components/features/products/components/product-variants-manager.d.ts +5 -0
- package/dist/components/features/products/components/product-variants-table.d.ts +5 -0
- package/dist/components/features/products/index.d.ts +3 -0
- package/dist/components/features/products/partials/index.d.ts +7 -0
- package/dist/components/features/products/partials/product-actions.d.ts +10 -0
- package/dist/components/features/products/partials/product-empty-state.d.ts +10 -0
- package/dist/components/features/products/partials/product-metric-tile.d.ts +4 -0
- package/dist/components/features/products/partials/product-rows.d.ts +35 -0
- package/dist/components/features/products/partials/product-tone.d.ts +8 -0
- package/dist/components/features/products/partials/product-values.d.ts +1 -0
- package/dist/components/features/products/partials/product-variant-table-parts.d.ts +28 -0
- package/dist/components/features/products/products.strings.d.ts +308 -0
- package/dist/components/features/products/products.types.d.ts +906 -0
- package/dist/components/features/questionnaire/index.d.ts +3 -0
- package/dist/components/features/questionnaire/questionnaire-control.d.ts +3 -0
- package/dist/components/features/questionnaire/questionnaire.d.ts +2 -0
- package/dist/components/features/questionnaire/questionnaire.types.d.ts +98 -0
- package/dist/components/features/questionnaire/questionnaire.utils.d.ts +5 -0
- package/dist/components/features/resource/index.d.ts +3 -0
- package/dist/components/features/resource/resource.d.ts +8 -0
- package/dist/components/features/resource/resource.strings.d.ts +12 -0
- package/dist/components/features/resource/resource.types.d.ts +161 -0
- package/dist/components/features/resource-assignment/hooks/index.d.ts +2 -0
- package/dist/components/features/resource-assignment/hooks/use-shared-resource-card.d.ts +32 -0
- package/dist/components/features/resource-assignment/index.d.ts +6 -0
- package/dist/components/features/resource-assignment/partials/default-shared-resource-partials.d.ts +31 -0
- package/dist/components/features/resource-assignment/partials/index.d.ts +1 -0
- package/dist/components/features/resource-assignment/resource-assignment.d.ts +12 -0
- package/dist/components/features/resource-assignment/resource-assignment.strings.d.ts +17 -0
- package/dist/components/features/resource-assignment/resource-assignment.types.d.ts +193 -0
- package/dist/components/features/rich-text-editor/form-rich-text-editor.d.ts +6 -0
- package/dist/components/features/rich-text-editor/index.d.ts +5 -0
- package/dist/components/features/rich-text-editor/partials/caret-helpers.d.ts +28 -0
- package/dist/components/features/rich-text-editor/partials/counts-footer.d.ts +32 -0
- package/dist/components/features/rich-text-editor/partials/html-helpers.d.ts +7 -0
- package/dist/components/features/rich-text-editor/partials/index.d.ts +7 -0
- package/dist/components/features/rich-text-editor/partials/rich-text-editor-fallback.d.ts +8 -0
- package/dist/components/features/rich-text-editor/partials/rich-text-editor-tiptap.d.ts +3 -0
- package/dist/components/features/rich-text-editor/partials/rich-text-editor-toolbar.d.ts +33 -0
- package/dist/components/features/rich-text-editor/rich-text-editor.d.ts +3 -0
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +6 -0
- package/dist/components/features/rich-text-editor/rich-text-editor.strings.d.ts +32 -0
- package/dist/components/features/rich-text-editor/rich-text-editor.types.d.ts +111 -0
- package/dist/components/features/schema-form/hooks/index.d.ts +1 -0
- package/dist/components/features/schema-form/hooks/use-schema-form.d.ts +23 -0
- package/dist/components/features/schema-form/index.d.ts +5 -0
- package/dist/components/features/schema-form/partials/index.d.ts +3 -0
- package/dist/components/features/schema-form/partials/schema-form-actions.d.ts +23 -0
- package/dist/components/features/schema-form/partials/schema-form-empty.d.ts +12 -0
- package/dist/components/features/schema-form/partials/schema-form-field.d.ts +12 -0
- package/dist/components/features/schema-form/schema-form.d.ts +5 -0
- package/dist/components/features/schema-form/schema-form.strings.d.ts +11 -0
- package/dist/components/features/schema-form/schema-form.types.d.ts +271 -0
- package/dist/components/features/schema-form/schema-form.utils.d.ts +18 -0
- package/dist/components/features/suggestions/hooks/index.d.ts +1 -0
- package/dist/components/features/suggestions/hooks/use-suggestions.d.ts +9 -0
- package/dist/components/features/suggestions/index.d.ts +4 -0
- package/dist/components/features/suggestions/suggestions.d.ts +5 -0
- package/dist/components/features/suggestions/suggestions.strings.d.ts +16 -0
- package/dist/components/features/suggestions/suggestions.types.d.ts +79 -0
- package/dist/components/features/sync/index.d.ts +3 -0
- package/dist/components/features/sync/sync-range-dialog-form.d.ts +5 -0
- package/dist/components/features/sync/sync.strings.d.ts +18 -0
- package/dist/components/features/sync/sync.types.d.ts +44 -0
- package/dist/components/features/table/column-visibility-toggle.d.ts +5 -0
- package/dist/components/features/table/data-table.d.ts +6 -0
- package/dist/components/features/table/filter-bar.d.ts +5 -0
- package/dist/components/features/table/hooks.d.ts +47 -0
- package/dist/components/features/table/index.d.ts +16 -0
- package/dist/components/features/table/pagination.d.ts +5 -0
- package/dist/components/features/table/partials/cell-renderers.d.ts +141 -0
- package/dist/components/features/table/partials/cell-value.d.ts +121 -0
- package/dist/components/features/table/partials/fullscreen-toggle.d.ts +16 -0
- package/dist/components/features/table/partials/resource-cell.d.ts +63 -0
- package/dist/components/features/table/partials/table-link.d.ts +3 -0
- package/dist/components/features/table/table-actions.d.ts +5 -0
- package/dist/components/features/table/table-body.d.ts +5 -0
- package/dist/components/features/table/table-header.d.ts +6 -0
- package/dist/components/features/table/table-helpers.d.ts +39 -0
- package/dist/components/features/table/table-toolbar.d.ts +5 -0
- package/dist/components/features/table/table.strings.d.ts +3 -0
- package/dist/components/features/table/table.types.d.ts +489 -0
- package/dist/components/features/theme-tweaker/admin-ui-theme-provider.d.ts +6 -0
- package/dist/components/features/theme-tweaker/index.d.ts +10 -0
- package/dist/components/features/theme-tweaker/theme-provider-settings.d.ts +49 -0
- package/dist/components/features/theme-tweaker/theme-scope.d.ts +7 -0
- package/dist/components/features/theme-tweaker/theme-tweaker.d.ts +2 -0
- package/dist/components/features/theme-tweaker/theme-tweaker.fields.d.ts +7 -0
- package/dist/components/features/theme-tweaker/theme-tweaker.recipes.d.ts +25 -0
- package/dist/components/features/theme-tweaker/theme-tweaker.strings.d.ts +75 -0
- package/dist/components/features/theme-tweaker/theme-tweaker.types.d.ts +161 -0
- package/dist/components/features/theme-tweaker/theme-tweaker.utils.d.ts +23 -0
- package/dist/components/features/theme-tweaker/use-applied-theme.d.ts +11 -0
- package/dist/components/layout/app-shell/app-layout.d.ts +12 -0
- package/dist/components/layout/app-shell/app-shell.types.d.ts +151 -0
- package/dist/components/layout/app-shell/index.d.ts +6 -0
- package/dist/components/layout/app-shell/sidebar-inset-layout.d.ts +2 -0
- package/dist/components/layout/app-shell/stacked-layout.d.ts +2 -0
- package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +2 -0
- package/dist/components/layout/auth/auth-card.d.ts +2 -0
- package/dist/components/layout/auth/auth-footer-links.d.ts +2 -0
- package/dist/components/layout/auth/auth-form.d.ts +11 -0
- package/dist/components/layout/auth/auth-hooks.d.ts +4 -0
- package/dist/components/layout/auth/auth-method-switch.d.ts +4 -0
- package/dist/components/layout/auth/auth-shell.d.ts +2 -0
- package/dist/components/layout/auth/auth-social-providers.d.ts +3 -0
- package/dist/components/layout/auth/auth-split-panel.d.ts +2 -0
- package/dist/components/layout/auth/auth.strings.d.ts +21 -0
- package/dist/components/layout/auth/auth.types.d.ts +282 -0
- package/dist/components/layout/auth/index.d.ts +10 -0
- package/dist/components/layout/containers/container.recipes.d.ts +5 -0
- package/dist/components/layout/containers/containers.types.d.ts +17 -0
- package/dist/components/layout/containers/content-container.d.ts +3 -0
- package/dist/components/layout/containers/index.d.ts +5 -0
- package/dist/components/layout/containers/page-viewport.d.ts +3 -0
- package/dist/components/layout/containers/section.d.ts +3 -0
- package/dist/components/layout/containers/two-column-layout.d.ts +27 -0
- package/dist/components/layout/header/header.d.ts +2 -0
- package/dist/components/layout/header/header.types.d.ts +198 -0
- package/dist/components/layout/header/index.d.ts +9 -0
- package/dist/components/layout/header/partials/header-breadcrumbs.d.ts +4 -0
- package/dist/components/layout/header/partials/header-global-search-trigger.d.ts +2 -0
- package/dist/components/layout/header/partials/header-notifications.d.ts +2 -0
- package/dist/components/layout/header/partials/header-search.d.ts +2 -0
- package/dist/components/layout/header/partials/header-tool-button.d.ts +4 -0
- package/dist/components/layout/header/partials/header-tool-popover.d.ts +2 -0
- package/dist/components/layout/header/partials/header-user-menu.d.ts +2 -0
- package/dist/components/layout/hooks/index.d.ts +3 -0
- package/dist/components/layout/hooks/use-active-path.d.ts +1 -0
- package/dist/components/layout/hooks/use-command-shortcut.d.ts +7 -0
- package/dist/components/layout/hooks/use-layout-link.d.ts +2 -0
- package/dist/components/layout/index.d.ts +24 -0
- package/dist/components/layout/layout.types.d.ts +91 -0
- package/dist/components/layout/navigation/breadcrumb-progress/breadcrumb-progress.d.ts +5 -0
- package/dist/components/layout/navigation/breadcrumb-progress/index.d.ts +2 -0
- package/dist/components/layout/navigation/breadcrumb-progress/types.d.ts +24 -0
- package/dist/components/layout/navigation/category-nav/category-nav.d.ts +5 -0
- package/dist/components/layout/navigation/category-nav/index.d.ts +2 -0
- package/dist/components/layout/navigation/category-nav/types.d.ts +22 -0
- package/dist/components/layout/navigation/index.d.ts +17 -0
- package/dist/components/layout/navigation/section-nav/index.d.ts +1 -0
- package/dist/components/layout/navigation/section-nav/section-nav.d.ts +29 -0
- package/dist/components/layout/navigation/side-nav.d.ts +58 -0
- package/dist/components/layout/page/index.d.ts +4 -0
- package/dist/components/layout/page/page.d.ts +3 -0
- package/dist/components/layout/page/page.types.d.ts +138 -0
- package/dist/components/layout/page/partials/page-actions.d.ts +2 -0
- package/dist/components/layout/page/partials/page-header.d.ts +2 -0
- package/dist/components/layout/settings/index.d.ts +1 -0
- package/dist/components/layout/settings/settings.d.ts +65 -0
- package/dist/components/layout/sidebar/app-sidebar.d.ts +7 -0
- package/dist/components/layout/sidebar/components/sidebar-grouped-navigation.d.ts +4 -0
- package/dist/components/layout/sidebar/components/sidebar-logo.d.ts +10 -0
- package/dist/components/layout/sidebar/components/sidebar-navigation-footer.d.ts +2 -0
- package/dist/components/layout/sidebar/components/sidebar-navigation-user.d.ts +23 -0
- package/dist/components/layout/sidebar/components/sidebar-navigation.d.ts +4 -0
- package/dist/components/layout/sidebar/components/sidebar-workspace-dropdown.d.ts +2 -0
- package/dist/components/layout/sidebar/index.d.ts +11 -0
- package/dist/components/layout/sidebar/sidebar.context.d.ts +17 -0
- package/dist/components/layout/sidebar/sidebar.d.ts +9 -0
- package/dist/components/layout/sidebar/sidebar.types.d.ts +218 -0
- package/dist/components/layout/sidebar/sidebar.utils.d.ts +29 -0
- package/dist/components/layout/workspace/index.d.ts +3 -0
- package/dist/components/layout/workspace/workspace.d.ts +6 -0
- package/dist/components/layout/workspace/workspace.strings.d.ts +18 -0
- package/dist/components/layout/workspace/workspace.types.d.ts +141 -0
- package/dist/components/primitives/date.d.ts +63 -0
- package/dist/components/primitives/dimensions.d.ts +30 -0
- package/dist/components/primitives/duration.d.ts +23 -0
- package/dist/components/primitives/file-size.d.ts +23 -0
- package/dist/components/primitives/index.d.ts +11 -0
- package/dist/components/primitives/initials-format.d.ts +21 -0
- package/dist/components/primitives/initials.d.ts +16 -0
- package/dist/components/primitives/link.d.ts +28 -0
- package/dist/components/primitives/money.d.ts +79 -0
- package/dist/components/primitives/name.d.ts +16 -0
- package/dist/components/primitives/number.d.ts +23 -0
- package/dist/components/primitives/value.d.ts +23 -0
- package/dist/components/typography/content-typography.d.ts +4 -0
- package/dist/components/typography/display-label.d.ts +5 -0
- package/dist/components/typography/heading.d.ts +16 -0
- package/dist/components/typography/index.d.ts +10 -0
- package/dist/components/typography/label.d.ts +8 -0
- package/dist/components/typography/rich-text/index.d.ts +2 -0
- package/dist/components/typography/rich-text/rich-text.d.ts +6 -0
- package/dist/components/typography/text-link.d.ts +7 -0
- package/dist/components/typography/text.d.ts +17 -0
- package/dist/components/typography/text.styles.d.ts +50 -0
- package/dist/components/ui/accordion.d.ts +6 -0
- package/dist/components/ui/alert-dialog.d.ts +21 -0
- package/dist/components/ui/avatar.d.ts +11 -0
- package/dist/components/ui/badge.d.ts +5 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/button-group.d.ts +12 -0
- package/dist/components/ui/button.d.ts +12 -0
- package/dist/components/ui/calendar.d.ts +10 -0
- package/dist/components/ui/card.d.ts +11 -0
- package/dist/components/ui/checkbox.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts +9 -0
- package/dist/components/ui/combobox.d.ts +40 -0
- package/dist/components/ui/command.d.ts +50 -0
- package/dist/components/ui/dialog.d.ts +26 -0
- package/dist/components/ui/disclosure-panel.d.ts +14 -0
- package/dist/components/ui/empty.d.ts +11 -0
- package/dist/components/ui/input-group.d.ts +18 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/item.d.ts +22 -0
- package/dist/components/ui/overlay.recipes.d.ts +2 -0
- package/dist/components/ui/pagination.d.ts +17 -0
- package/dist/components/ui/popover.d.ts +22 -0
- package/dist/components/ui/select.d.ts +18 -0
- package/dist/components/ui/separator.d.ts +3 -0
- package/dist/components/ui/sheet.d.ts +25 -0
- package/dist/components/ui/sidebar.d.ts +64 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/slot.d.ts +6 -0
- package/dist/components/ui/sonner.d.ts +3 -0
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/components/ui/table.d.ts +13 -0
- package/dist/components/ui/tabs.d.ts +10 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/toggle-group.d.ts +12 -0
- package/dist/components/ui/toggle.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts +13 -0
- package/dist/containers-CPNyNo1_.js +124 -0
- package/dist/containers-CPNyNo1_.js.map +1 -0
- package/dist/content-typography-CnwgMJ37.js +6 -0
- package/dist/content-typography-CnwgMJ37.js.map +1 -0
- package/dist/copyable-B7SBXJMr.js +65 -0
- package/dist/copyable-B7SBXJMr.js.map +1 -0
- package/dist/data-display-b3d1TfL4.js +1129 -0
- package/dist/data-display-b3d1TfL4.js.map +1 -0
- package/dist/date-BFNMnrS5.js +140 -0
- package/dist/date-BFNMnrS5.js.map +1 -0
- package/dist/date-picker-DI6kPNof.js +1521 -0
- package/dist/date-picker-DI6kPNof.js.map +1 -0
- package/dist/date-pickers-ByP6Cv2z.js +224 -0
- package/dist/date-pickers-ByP6Cv2z.js.map +1 -0
- package/dist/disclosure-panel-B0HFNZ9x.js +35 -0
- package/dist/disclosure-panel-B0HFNZ9x.js.map +1 -0
- package/dist/display-ByI5tkqy.js +343 -0
- package/dist/display-ByI5tkqy.js.map +1 -0
- package/dist/dropdown-menu-BlnyHr-9.js +186 -0
- package/dist/dropdown-menu-BlnyHr-9.js.map +1 -0
- package/dist/editable-text-recipe-Bkm6wKHp.js +10 -0
- package/dist/editable-text-recipe-Bkm6wKHp.js.map +1 -0
- package/dist/favicon.svg +1 -0
- package/dist/features/activities.js +1360 -0
- package/dist/features/activities.js.map +1 -0
- package/dist/features/ai-chat.js +567 -0
- package/dist/features/ai-chat.js.map +1 -0
- package/dist/features/async-preview.js +478 -0
- package/dist/features/async-preview.js.map +1 -0
- package/dist/features/combobox.js +3 -0
- package/dist/features/comments.js +3 -0
- package/dist/features/data-view.js +519 -0
- package/dist/features/data-view.js.map +1 -0
- package/dist/features/email-composer/engine.js +2 -0
- package/dist/features/email-composer.js +1099 -0
- package/dist/features/email-composer.js.map +1 -0
- package/dist/features/event-calendar.js +711 -0
- package/dist/features/event-calendar.js.map +1 -0
- package/dist/features/filters.js +3 -0
- package/dist/features/global-search.js +593 -0
- package/dist/features/global-search.js.map +1 -0
- package/dist/features/kanban.js +425 -0
- package/dist/features/kanban.js.map +1 -0
- package/dist/features/map/images/layers-2x.png +0 -0
- package/dist/features/map/images/layers.png +0 -0
- package/dist/features/map/images/marker-icon-2x.png +0 -0
- package/dist/features/map/images/marker-icon.png +0 -0
- package/dist/features/map/images/marker-shadow.png +0 -0
- package/dist/features/map/images/spritesheet-2x.png +0 -0
- package/dist/features/map/images/spritesheet.png +0 -0
- package/dist/features/map/images/spritesheet.svg +156 -0
- package/dist/features/map/style.css +809 -0
- package/dist/features/map.js +1052 -0
- package/dist/features/map.js.map +1 -0
- package/dist/features/media-library.js +2007 -0
- package/dist/features/media-library.js.map +1 -0
- package/dist/features/mentions.js +3 -0
- package/dist/features/overlays.js +3 -0
- package/dist/features/products.js +3076 -0
- package/dist/features/products.js.map +1 -0
- package/dist/features/questionnaire.js +365 -0
- package/dist/features/questionnaire.js.map +1 -0
- package/dist/features/resource-assignment.js +317 -0
- package/dist/features/resource-assignment.js.map +1 -0
- package/dist/features/resource.js +254 -0
- package/dist/features/resource.js.map +1 -0
- package/dist/features/rich-text-editor.js +23 -0
- package/dist/features/rich-text-editor.js.map +1 -0
- package/dist/features/schema-form.js +744 -0
- package/dist/features/schema-form.js.map +1 -0
- package/dist/features/suggestions.js +149 -0
- package/dist/features/suggestions.js.map +1 -0
- package/dist/features/sync.js +136 -0
- package/dist/features/sync.js.map +1 -0
- package/dist/features/table.js +3 -0
- package/dist/features/theme-tweaker.js +2083 -0
- package/dist/features/theme-tweaker.js.map +1 -0
- package/dist/feedback-a9j9J-9A.js +391 -0
- package/dist/feedback-a9j9J-9A.js.map +1 -0
- package/dist/field-affordance-recipes-CHdUtn2Z.js +17 -0
- package/dist/field-affordance-recipes-CHdUtn2Z.js.map +1 -0
- package/dist/field-state-recipes-CBTRt9Bt.js +11 -0
- package/dist/field-state-recipes-CBTRt9Bt.js.map +1 -0
- package/dist/filters-qtrcv1hf.js +2203 -0
- package/dist/filters-qtrcv1hf.js.map +1 -0
- package/dist/form-field-C6W-y2hR.js +48 -0
- package/dist/form-field-C6W-y2hR.js.map +1 -0
- package/dist/form-sizing-39NohSqn.js +99 -0
- package/dist/form-sizing-39NohSqn.js.map +1 -0
- package/dist/format-iamDSqs2.js +110 -0
- package/dist/format-iamDSqs2.js.map +1 -0
- package/dist/forms-BF-HSbff.js +194 -0
- package/dist/forms-BF-HSbff.js.map +1 -0
- package/dist/forms-numeric-Y15Bg5Nr.js +867 -0
- package/dist/forms-numeric-Y15Bg5Nr.js.map +1 -0
- package/dist/header-B8ex54cY.js +452 -0
- package/dist/header-B8ex54cY.js.map +1 -0
- package/dist/hooks/use-debounce.d.ts +1 -0
- package/dist/hooks/use-debounced-callback.d.ts +40 -0
- package/dist/hooks/use-files.d.ts +48 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/useFormErrors.d.ts +7 -0
- package/dist/hooks-D6UBVzf2.js +88 -0
- package/dist/hooks-D6UBVzf2.js.map +1 -0
- package/dist/http-CLTVJc5I.js +331 -0
- package/dist/http-CLTVJc5I.js.map +1 -0
- package/dist/icon-badge-Dv0RYQwj.js +53 -0
- package/dist/icon-badge-Dv0RYQwj.js.map +1 -0
- package/dist/icon-size-B6PVwjbC.js +18 -0
- package/dist/icon-size-B6PVwjbC.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +7 -0
- package/dist/initials-format-CDoQEOd_.js +35 -0
- package/dist/initials-format-CDoQEOd_.js.map +1 -0
- package/dist/input-DMorJiTI.js +202 -0
- package/dist/input-DMorJiTI.js.map +1 -0
- package/dist/input-ci9fIgFH.js +20 -0
- package/dist/input-ci9fIgFH.js.map +1 -0
- package/dist/item-pJ0GsOiJ.js +257 -0
- package/dist/item-pJ0GsOiJ.js.map +1 -0
- package/dist/layout/app-shell.js +3 -0
- package/dist/layout/auth.js +3 -0
- package/dist/layout/containers.js +3 -0
- package/dist/layout/header.js +3 -0
- package/dist/layout/hooks.js +3 -0
- package/dist/layout/navigation.js +3 -0
- package/dist/layout/page.js +3 -0
- package/dist/layout/settings.js +3 -0
- package/dist/layout/sidebar.js +4 -0
- package/dist/layout/workspace.js +3 -0
- package/dist/layout.js +13 -0
- package/dist/layout.types-Cn7aUzJp.js +20 -0
- package/dist/layout.types-Cn7aUzJp.js.map +1 -0
- package/dist/lib/action-presentation.d.ts +15 -0
- package/dist/lib/affordance-geometry.generated.d.ts +18 -0
- package/dist/lib/anchored-positioning.d.ts +5 -0
- package/dist/lib/command-filter.d.ts +1 -0
- package/dist/lib/component-vocabulary.d.ts +12 -0
- package/dist/lib/editable-text-recipe.d.ts +6 -0
- package/dist/lib/email-composer.d.ts +6 -0
- package/dist/lib/field-affordance-recipes.d.ts +20 -0
- package/dist/lib/field-state-recipes.d.ts +10 -0
- package/dist/lib/format.d.ts +53 -0
- package/dist/lib/motion-recipes.d.ts +8 -0
- package/dist/lib/navigation-row-recipes.d.ts +26 -0
- package/dist/lib/overlay-anatomy-recipes.d.ts +8 -0
- package/dist/lib/row-recipes.d.ts +3 -0
- package/dist/lib/sanitize-html.d.ts +8 -0
- package/dist/lib/strings.d.ts +16 -0
- package/dist/lib/strings.js +32 -0
- package/dist/lib/strings.js.map +1 -0
- package/dist/lib/surface-recipes.d.ts +27 -0
- package/dist/lib/theme-scope.d.ts +31 -0
- package/dist/lib/token-merge.generated.d.ts +2 -0
- package/dist/lib/track-recipes.d.ts +4 -0
- package/dist/lib/ui-provider/defaults.d.ts +12 -0
- package/dist/lib/ui-provider/hooks.d.ts +13 -0
- package/dist/lib/ui-provider/index.d.ts +28 -0
- package/dist/lib/ui-provider/provider.d.ts +15 -0
- package/dist/lib/ui-provider/scale.d.ts +5 -0
- package/dist/lib/ui-provider/store.d.ts +11 -0
- package/dist/lib/ui-provider/types.d.ts +157 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +2 -0
- package/dist/map-demo-tile.svg +1 -0
- package/dist/media-gallery-Ca4YmvBi.js +200 -0
- package/dist/media-gallery-Ca4YmvBi.js.map +1 -0
- package/dist/mentions-CRio8mTm.js +563 -0
- package/dist/mentions-CRio8mTm.js.map +1 -0
- package/dist/message-B5-6LeYl.js +108 -0
- package/dist/message-B5-6LeYl.js.map +1 -0
- package/dist/motion-recipes-B6jKXEcN.js +27 -0
- package/dist/motion-recipes-B6jKXEcN.js.map +1 -0
- package/dist/navigation-BTrEb5u4.js +267 -0
- package/dist/navigation-BTrEb5u4.js.map +1 -0
- package/dist/navigation-DqEITuD2.js +265 -0
- package/dist/navigation-DqEITuD2.js.map +1 -0
- package/dist/navigation-row-recipes-BFpvGPGE.js +29 -0
- package/dist/navigation-row-recipes-BFpvGPGE.js.map +1 -0
- package/dist/number-BNT_BIzJ.js +269 -0
- package/dist/number-BNT_BIzJ.js.map +1 -0
- package/dist/overlay.recipes-BxW5FIfK.js +6 -0
- package/dist/overlay.recipes-BxW5FIfK.js.map +1 -0
- package/dist/overlays-DBqV0J_V.js +982 -0
- package/dist/overlays-DBqV0J_V.js.map +1 -0
- package/dist/page-BMBGjJY8.js +202 -0
- package/dist/page-BMBGjJY8.js.map +1 -0
- package/dist/page-header-BH41wCyY.js +112 -0
- package/dist/page-header-BH41wCyY.js.map +1 -0
- package/dist/pagination-C29vvt3I.js +149 -0
- package/dist/pagination-C29vvt3I.js.map +1 -0
- package/dist/popover-TInGXsjg.js +194 -0
- package/dist/popover-TInGXsjg.js.map +1 -0
- package/dist/popover-menu-BzqXqE72.js +99 -0
- package/dist/popover-menu-BzqXqE72.js.map +1 -0
- package/dist/popover.recipes-zgBhMlUu.js +34 -0
- package/dist/popover.recipes-zgBhMlUu.js.map +1 -0
- package/dist/primitives-DKPOGVpj.js +330 -0
- package/dist/primitives-DKPOGVpj.js.map +1 -0
- package/dist/primitives.js +7 -0
- package/dist/receipt-DYWTQGEc.js +113 -0
- package/dist/receipt-DYWTQGEc.js.map +1 -0
- package/dist/rich-text-B7sBAdDG.js +32 -0
- package/dist/rich-text-B7sBAdDG.js.map +1 -0
- package/dist/rich-text-editor-BZSJchAF.js +575 -0
- package/dist/rich-text-editor-BZSJchAF.js.map +1 -0
- package/dist/rich-text-editor.recipes-DxvOE0Lp.js +72 -0
- package/dist/rich-text-editor.recipes-DxvOE0Lp.js.map +1 -0
- package/dist/rich-text-editor.strings-BpnIQgMl.js +25 -0
- package/dist/rich-text-editor.strings-BpnIQgMl.js.map +1 -0
- package/dist/row-recipes-DL8n7t_b.js +10 -0
- package/dist/row-recipes-DL8n7t_b.js.map +1 -0
- package/dist/sanitize-html-BG9FGe-j.js +64 -0
- package/dist/sanitize-html-BG9FGe-j.js.map +1 -0
- package/dist/scroll-area-BheMQ270.js +47 -0
- package/dist/scroll-area-BheMQ270.js.map +1 -0
- package/dist/select-B2mb-qN2.js +108 -0
- package/dist/select-B2mb-qN2.js.map +1 -0
- package/dist/separator-DO0EbCEm.js +17 -0
- package/dist/separator-DO0EbCEm.js.map +1 -0
- package/dist/separator-Gk_WXH-l.js +21 -0
- package/dist/separator-Gk_WXH-l.js.map +1 -0
- package/dist/services/actions/action-adapters.d.ts +77 -0
- package/dist/services/actions/action-overlay-outlet.d.ts +3 -0
- package/dist/services/actions/action-provider.d.ts +7 -0
- package/dist/services/actions/action-scope.d.ts +3 -0
- package/dist/services/actions/action-store.d.ts +55 -0
- package/dist/services/actions/actions.strings.d.ts +2 -0
- package/dist/services/actions/actions.types.d.ts +322 -0
- package/dist/services/actions/hooks.d.ts +8 -0
- package/dist/services/actions/index.d.ts +8 -0
- package/dist/services/actions.js +811 -0
- package/dist/services/actions.js.map +1 -0
- package/dist/settings-D9f_wdIC.js +160 -0
- package/dist/settings-D9f_wdIC.js.map +1 -0
- package/dist/sheet-vOUloJ4O.js +205 -0
- package/dist/sheet-vOUloJ4O.js.map +1 -0
- package/dist/sidebar-C3UKkbC5.js +501 -0
- package/dist/sidebar-C3UKkbC5.js.map +1 -0
- package/dist/sidebar-CNBKFDRW.js +598 -0
- package/dist/sidebar-CNBKFDRW.js.map +1 -0
- package/dist/skeleton-BvRhK8y-.js +264 -0
- package/dist/skeleton-BvRhK8y-.js.map +1 -0
- package/dist/slot-CLF9kLrS.js +16 -0
- package/dist/slot-CLF9kLrS.js.map +1 -0
- package/dist/smart-card-B5FcKODh.js +577 -0
- package/dist/smart-card-B5FcKODh.js.map +1 -0
- package/dist/spinner-JtlFJ7Nc.js +78 -0
- package/dist/spinner-JtlFJ7Nc.js.map +1 -0
- package/dist/structure-BvW4vG4H.js +95 -0
- package/dist/structure-BvW4vG4H.js.map +1 -0
- package/dist/structure.recipes-DjqnBpwz.js +548 -0
- package/dist/structure.recipes-DjqnBpwz.js.map +1 -0
- package/dist/style.css +3 -0
- package/dist/surface-recipes-CQfRr-VL.js +27 -0
- package/dist/surface-recipes-CQfRr-VL.js.map +1 -0
- package/dist/table-DnlAJ-xR.js +146 -0
- package/dist/table-DnlAJ-xR.js.map +1 -0
- package/dist/table-ghtAQ-JJ.js +1424 -0
- package/dist/table-ghtAQ-JJ.js.map +1 -0
- package/dist/tabs-DY09eoZg.js +187 -0
- package/dist/tabs-DY09eoZg.js.map +1 -0
- package/dist/text-inputs-BhOcedTo.js +331 -0
- package/dist/text-inputs-BhOcedTo.js.map +1 -0
- package/dist/text.styles-BwB7vAF2.js +64 -0
- package/dist/text.styles-BwB7vAF2.js.map +1 -0
- package/dist/theme-scope-kStaAer0.js +39 -0
- package/dist/theme-scope-kStaAer0.js.map +1 -0
- package/dist/theme.css +872 -0
- package/dist/timelines-CnZ2S_Gr.js +446 -0
- package/dist/timelines-CnZ2S_Gr.js.map +1 -0
- package/dist/track-recipes-LLPNVwFg.js +10 -0
- package/dist/track-recipes-LLPNVwFg.js.map +1 -0
- package/dist/tree-COD9BGdU.js +185 -0
- package/dist/tree-COD9BGdU.js.map +1 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/locale.types.d.ts +7 -0
- package/dist/types/pagination.types.d.ts +24 -0
- package/dist/typography/rich-text.js +3 -0
- package/dist/typography-Cv8MT-82.js +96 -0
- package/dist/typography-Cv8MT-82.js.map +1 -0
- package/dist/typography.js +3 -0
- package/dist/ui-provider-CftIB6TY.js +128 -0
- package/dist/ui-provider-CftIB6TY.js.map +1 -0
- package/dist/ui-provider.js +4 -0
- package/dist/upload-DIzw1dx1.js +849 -0
- package/dist/upload-DIzw1dx1.js.map +1 -0
- package/dist/upload-queue-xRJ3qDmd.js +410 -0
- package/dist/upload-queue-xRJ3qDmd.js.map +1 -0
- package/dist/use-debounce-DZ_1ZBPa.js +18 -0
- package/dist/use-debounce-DZ_1ZBPa.js.map +1 -0
- package/dist/use-debounced-callback-Cx1h-hdv.js +30 -0
- package/dist/use-debounced-callback-Cx1h-hdv.js.map +1 -0
- package/dist/use-file-drop-target-BX7GnhoQ.js +39 -0
- package/dist/use-file-drop-target-BX7GnhoQ.js.map +1 -0
- package/dist/use-mobile-vaLKwgyf.js +15 -0
- package/dist/use-mobile-vaLKwgyf.js.map +1 -0
- package/dist/utils-C2EKeIw3.js +72 -0
- package/dist/utils-C2EKeIw3.js.map +1 -0
- package/dist/value-inputs-Co1fu-xv.js +824 -0
- package/dist/value-inputs-Co1fu-xv.js.map +1 -0
- package/dist/workspace-Cbqz4FzN.js +402 -0
- package/dist/workspace-Cbqz4FzN.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +32 -0
- package/docs/consumer-skill/examples/app-layout.tsx +31 -0
- package/docs/consumer-skill/examples/composition.tsx +37 -0
- package/docs/consumer-skill/examples/content-workflow.tsx +13 -0
- package/docs/consumer-skill/examples/destructive-confirm.tsx +42 -0
- package/docs/consumer-skill/examples/detail.tsx +28 -0
- package/docs/consumer-skill/examples/edit.tsx +61 -0
- package/docs/consumer-skill/examples/email-composer.tsx +25 -0
- package/docs/consumer-skill/examples/hierarchy-capture.tsx +25 -0
- package/docs/consumer-skill/examples/index-table.tsx +36 -0
- package/docs/consumer-skill/examples/manifest.json +94 -0
- package/docs/consumer-skill/examples/receipt.tsx +19 -0
- package/docs/consumer-skill/references/composition.md +170 -0
- package/docs/consumer-skill/references/design-contract.md +145 -0
- package/docs/consumer-skill/references/discovery.md +33 -0
- package/docs/consumer-skill/references/installation.md +66 -0
- package/docs/consumer-skill/references/integration.md +57 -0
- package/docs/consumer-skill/references/public-api.json +17527 -0
- package/docs/consumer-skill/references/theming.md +56 -0
- package/docs/consumer-skill/references/tokens.json +422 -0
- package/docs/consumer-skill/references/workflows.md +39 -0
- package/docs/consumer-skill/scripts/discovery.mjs +79 -0
- package/docs/consumer-skill/scripts/find-components.mjs +11 -0
- package/package.json +621 -4
|
@@ -0,0 +1,2007 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useStrings as e } from "../lib/strings.js";
|
|
3
|
+
import { t } from "../utils-C2EKeIw3.js";
|
|
4
|
+
import { n } from "../buttons-Co6GavvM.js";
|
|
5
|
+
import { a as r, r as i } from "../typography-Cv8MT-82.js";
|
|
6
|
+
import { r as a, t as o } from "../structure-BvW4vG4H.js";
|
|
7
|
+
import { n as s, t as c } from "../feedback-a9j9J-9A.js";
|
|
8
|
+
import { r as l } from "../overlays-DBqV0J_V.js";
|
|
9
|
+
import { a as u, i as d, t as f } from "../primitives-DKPOGVpj.js";
|
|
10
|
+
import { n as p, t as m } from "../number-BNT_BIzJ.js";
|
|
11
|
+
import { t as h } from "../badge-BZXZT9wd.js";
|
|
12
|
+
import { t as g } from "../input-DMorJiTI.js";
|
|
13
|
+
import { t as _ } from "../form-field-C6W-y2hR.js";
|
|
14
|
+
import { l as v, s as y } from "../choice-inputs-CavA-SGV.js";
|
|
15
|
+
import { a as b } from "../upload-queue-xRJ3qDmd.js";
|
|
16
|
+
import { l as x } from "../data-display-b3d1TfL4.js";
|
|
17
|
+
import { createContext as S, useCallback as C, useContext as w, useEffect as T, useMemo as E, useRef as D, useState as O } from "react";
|
|
18
|
+
import { Fragment as ee, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
19
|
+
import { ArrowLeft as te, ArrowRight as ne, Check as j, File as M, Grid2X2 as re, ImageIcon as N, ImagePlus as ie, Info as P, Layers3 as ae, LayoutList as oe, Lock as F, Play as se, Plus as I, Search as ce, Star as L, Trash2 as le, UploadCloud as R, Video as ue, X as de } from "lucide-react";
|
|
20
|
+
import { createPortal as fe } from "react-dom";
|
|
21
|
+
//#region src/components/features/media-library/media-library.strings.ts
|
|
22
|
+
var pe = {
|
|
23
|
+
title: "Add media",
|
|
24
|
+
description: "Pick from the library, or upload new files.",
|
|
25
|
+
close: "Close media library",
|
|
26
|
+
tabs: {
|
|
27
|
+
library: "Library",
|
|
28
|
+
upload: "Upload"
|
|
29
|
+
},
|
|
30
|
+
searchPlaceholder: "Search by name or tag...",
|
|
31
|
+
clearSearch: "Clear search",
|
|
32
|
+
typeFilterLabel: "Type",
|
|
33
|
+
collectionFilterLabel: "Collection",
|
|
34
|
+
sortLabel: "Sort",
|
|
35
|
+
viewLabel: "View",
|
|
36
|
+
allTypes: "All",
|
|
37
|
+
images: "Images",
|
|
38
|
+
videos: "Videos",
|
|
39
|
+
files: "Files",
|
|
40
|
+
allCollections: "All collections",
|
|
41
|
+
sortNewest: "Newest",
|
|
42
|
+
sortName: "Name",
|
|
43
|
+
sortSize: "Size",
|
|
44
|
+
sortUsage: "Most used",
|
|
45
|
+
gridView: "Grid view",
|
|
46
|
+
tableView: "Table view",
|
|
47
|
+
countAll: "{count} items",
|
|
48
|
+
countFiltered: "{count} of {total} items",
|
|
49
|
+
countSearch: "{count} of {total} items for \"{query}\"",
|
|
50
|
+
activeSearchLabel: "Search",
|
|
51
|
+
resultsLabel: "Media results",
|
|
52
|
+
emptyLibraryTitle: "Library is empty",
|
|
53
|
+
emptyLibraryDescription: "Upload images or videos to start building the library.",
|
|
54
|
+
emptyFilteredTitle: "No media matches",
|
|
55
|
+
emptyFilteredDescription: "Try a different search term, or clear the filters.",
|
|
56
|
+
clearFilters: "Clear filters",
|
|
57
|
+
uploadMedia: "Upload media",
|
|
58
|
+
loading: "Loading media...",
|
|
59
|
+
errorTitle: "Media could not load",
|
|
60
|
+
errorDescription: "Try again or adjust your filters.",
|
|
61
|
+
cardDetails: "Details for {name}",
|
|
62
|
+
privateLabel: "Private",
|
|
63
|
+
publicLabel: "Public",
|
|
64
|
+
typeImage: "Image",
|
|
65
|
+
typeVideo: "Video",
|
|
66
|
+
typeFile: "File",
|
|
67
|
+
unknownSize: "Unknown",
|
|
68
|
+
notUsed: "Not used yet",
|
|
69
|
+
usedIn: "{count} {count, plural, one {place} other {places}}",
|
|
70
|
+
table: {
|
|
71
|
+
name: "Name",
|
|
72
|
+
type: "Type",
|
|
73
|
+
size: "Size",
|
|
74
|
+
collection: "Collection",
|
|
75
|
+
used: "Used"
|
|
76
|
+
},
|
|
77
|
+
detail: {
|
|
78
|
+
title: "Details",
|
|
79
|
+
altText: "Alt text",
|
|
80
|
+
altPlaceholder: "Describe this media for screen readers",
|
|
81
|
+
collection: "Collection",
|
|
82
|
+
tags: "Tags",
|
|
83
|
+
tagsPlaceholder: "Comma-separated",
|
|
84
|
+
public: "Public",
|
|
85
|
+
publicHint: "Served from the public CDN",
|
|
86
|
+
privateHint: "Only visible in the admin",
|
|
87
|
+
type: "Type",
|
|
88
|
+
size: "Size",
|
|
89
|
+
dimensions: "Dimensions",
|
|
90
|
+
uploaded: "Uploaded",
|
|
91
|
+
usedIn: "Used in",
|
|
92
|
+
replace: "Replace file",
|
|
93
|
+
delete: "Delete",
|
|
94
|
+
close: "Close details"
|
|
95
|
+
},
|
|
96
|
+
upload: {
|
|
97
|
+
dropTitle: "Drag files here or click to browse",
|
|
98
|
+
dropHint: "JPG, PNG, WebP, SVG and MP4 up to 50 MB per file",
|
|
99
|
+
dragOver: "Release to stage files",
|
|
100
|
+
collection: "Collection",
|
|
101
|
+
tags: "Tags",
|
|
102
|
+
tagsPlaceholder: "Comma-separated",
|
|
103
|
+
public: "Public",
|
|
104
|
+
publicHint: "Serve from the public CDN",
|
|
105
|
+
noFiles: "No files staged",
|
|
106
|
+
stagedCount: "{count} {count, plural, one {file} other {files}}",
|
|
107
|
+
removeFile: "Remove {name}",
|
|
108
|
+
uploading: "Uploading",
|
|
109
|
+
done: "Done"
|
|
110
|
+
},
|
|
111
|
+
footer: {
|
|
112
|
+
pickOne: "Pick one item",
|
|
113
|
+
pickMany: "Pick one or more items",
|
|
114
|
+
selectedCount: "{count} selected",
|
|
115
|
+
clear: "Clear",
|
|
116
|
+
cancel: "Cancel",
|
|
117
|
+
confirmEmpty: "Add to product",
|
|
118
|
+
confirmOne: "Add 1 item",
|
|
119
|
+
confirmMany: "Add {count} items",
|
|
120
|
+
noFiles: "No files staged",
|
|
121
|
+
stagedSummary: "{count} {count, plural, one {file} other {files}} · {size}",
|
|
122
|
+
upload: "Upload",
|
|
123
|
+
uploadMany: "Upload {count} files",
|
|
124
|
+
uploading: "Uploading..."
|
|
125
|
+
},
|
|
126
|
+
gallery: {
|
|
127
|
+
emptyTitle: "No media attached",
|
|
128
|
+
emptyDescription: "Add images, video, or files to this resource.",
|
|
129
|
+
add: "Add media",
|
|
130
|
+
addMore: "Add more",
|
|
131
|
+
addTile: "Add another media item",
|
|
132
|
+
cover: "Cover",
|
|
133
|
+
primary: "Primary",
|
|
134
|
+
setPrimary: "Set primary",
|
|
135
|
+
remove: "Remove",
|
|
136
|
+
movePrevious: "Move previous",
|
|
137
|
+
moveNext: "Move next",
|
|
138
|
+
itemPosition: "{index} of {total}",
|
|
139
|
+
maxReached: "Maximum reached"
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
function z(e, t) {
|
|
143
|
+
return e.replace(/\{(\w+), plural, one \{([^}]*)\} other \{([^}]*)\}\}/g, (e, n, r, i) => Number(t[n]) === 1 ? r : i).replace(/\{(\w+)\}/g, (e, n) => String(t[n] ?? ""));
|
|
144
|
+
}
|
|
145
|
+
//#endregion
|
|
146
|
+
//#region src/components/features/media-library/hooks/use-media-library.ts
|
|
147
|
+
var me = {
|
|
148
|
+
collection: void 0,
|
|
149
|
+
tags: [],
|
|
150
|
+
public: !0
|
|
151
|
+
}, he = [];
|
|
152
|
+
function B(e, t, n) {
|
|
153
|
+
let [r, i] = O(t), a = e ?? r;
|
|
154
|
+
return [a, C((t) => {
|
|
155
|
+
let r = typeof t == "function" ? t(a) : t;
|
|
156
|
+
e === void 0 && i(r), n?.(r);
|
|
157
|
+
}, [
|
|
158
|
+
e,
|
|
159
|
+
n,
|
|
160
|
+
a
|
|
161
|
+
])];
|
|
162
|
+
}
|
|
163
|
+
var ge = {
|
|
164
|
+
getId: (e) => e.id,
|
|
165
|
+
getName: (e) => e.name,
|
|
166
|
+
getType: (e) => e.type,
|
|
167
|
+
getSrc: (e) => e.src,
|
|
168
|
+
getAlt: (e) => e.alt,
|
|
169
|
+
getSize: (e) => e.size,
|
|
170
|
+
getWidth: (e) => e.width,
|
|
171
|
+
getHeight: (e) => e.height,
|
|
172
|
+
getDuration: (e) => e.duration,
|
|
173
|
+
getCollection: (e) => e.collection,
|
|
174
|
+
getTags: (e) => e.tags ?? [],
|
|
175
|
+
getPublic: (e) => e.public,
|
|
176
|
+
getUploadedAt: (e) => e.uploadedAt,
|
|
177
|
+
getUsageCount: (e) => e.usageCount,
|
|
178
|
+
getTint: (e) => e.tint,
|
|
179
|
+
getMimeType: (e) => e.mimeType
|
|
180
|
+
};
|
|
181
|
+
function _e(e) {
|
|
182
|
+
return {
|
|
183
|
+
...ge,
|
|
184
|
+
...e ?? {}
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
function ve(e) {
|
|
188
|
+
return u(e) ?? "";
|
|
189
|
+
}
|
|
190
|
+
function ye(e, t) {
|
|
191
|
+
let n = t.getWidth(e), r = t.getHeight(e);
|
|
192
|
+
return !n || !r ? "" : `${n} x ${r}`;
|
|
193
|
+
}
|
|
194
|
+
function be(e, t) {
|
|
195
|
+
let n = t.getUploadedAt(e);
|
|
196
|
+
if (!n) return 0;
|
|
197
|
+
let r = (n instanceof Date ? n : new Date(n)).getTime();
|
|
198
|
+
return Number.isFinite(r) ? r : 0;
|
|
199
|
+
}
|
|
200
|
+
function xe(e) {
|
|
201
|
+
return e.type.startsWith("image/") ? "image" : e.type.startsWith("video/") ? "video" : "file";
|
|
202
|
+
}
|
|
203
|
+
function Se(e) {
|
|
204
|
+
if (e.type.startsWith("image/") && typeof URL < "u" && typeof URL.createObjectURL == "function") return URL.createObjectURL(e);
|
|
205
|
+
}
|
|
206
|
+
function Ce(e) {
|
|
207
|
+
e && typeof URL < "u" && typeof URL.revokeObjectURL == "function" && URL.revokeObjectURL(e);
|
|
208
|
+
}
|
|
209
|
+
function we(e) {
|
|
210
|
+
return Array.isArray(e) ? {
|
|
211
|
+
items: e,
|
|
212
|
+
total: e.length
|
|
213
|
+
} : e;
|
|
214
|
+
}
|
|
215
|
+
function V(e, t) {
|
|
216
|
+
return t && typeof e == "object" && e ? {
|
|
217
|
+
...e,
|
|
218
|
+
...t
|
|
219
|
+
} : e;
|
|
220
|
+
}
|
|
221
|
+
function H(e, t, n, r, i) {
|
|
222
|
+
let a = n.trim().toLowerCase();
|
|
223
|
+
return e.filter((e) => r !== "all" && t.getType(e) !== r || i !== "all" && t.getCollection(e) !== i ? !1 : !a || [
|
|
224
|
+
t.getName(e),
|
|
225
|
+
t.getAlt(e),
|
|
226
|
+
t.getCollection(e),
|
|
227
|
+
...t.getTags(e)
|
|
228
|
+
].filter(Boolean).join(" ").toLowerCase().includes(a));
|
|
229
|
+
}
|
|
230
|
+
function Te(e, t, n) {
|
|
231
|
+
let r = e.slice();
|
|
232
|
+
return n === "name" ? r.sort((e, n) => t.getName(e).localeCompare(t.getName(n))) : n === "size" ? r.sort((e, n) => (t.getSize(n) ?? 0) - (t.getSize(e) ?? 0)) : n === "usage" ? r.sort((e, n) => (t.getUsageCount(n) ?? 0) - (t.getUsageCount(e) ?? 0)) : r.sort((e, n) => be(n, t) - be(e, t)), r;
|
|
233
|
+
}
|
|
234
|
+
function Ee({ items: e = he, fetcher: t, accessors: n, selectionMode: r = "multiple", value: i, defaultValue: a = [], onValueChange: o, onItemUpdate: s, onItemDelete: c, onUpload: l, onError: u, tab: d, defaultTab: f = "library", onTabChange: p, view: m, defaultView: h = "grid", onViewChange: g, query: _, defaultQuery: v = "", onQueryChange: y, type: b, defaultType: x = "all", onTypeChange: S, collection: w, defaultCollection: ee = "all", onCollectionChange: k, sort: A, defaultSort: te = "newest", onSortChange: ne, uploadOptions: j, defaultUploadOptions: M, onUploadOptionsChange: re } = {}) {
|
|
235
|
+
let N = E(() => _e(n), [n]), [ie, P] = B(d, f, p), [ae, oe] = B(m, h, g), [F, se] = B(_, v, y), [I, ce] = B(b, x, S), [L, le] = B(w, ee, k), [R, ue] = B(A, te, ne), [de, fe] = O(null), [pe, z] = O(() => [...a]), [ge, ve] = O([]), [ye, be] = O(), [Ee, U] = O(!1), [W, G] = O(null), [De, Oe] = O([]), [ke, Ae] = O(() => /* @__PURE__ */ new Set()), [je, Me] = O({}), [Ne, K] = O([]), [Pe, Fe] = O(!1), Ie = E(() => ({
|
|
236
|
+
...me,
|
|
237
|
+
...M,
|
|
238
|
+
tags: M?.tags ?? me.tags
|
|
239
|
+
}), [M]), [Le, Re] = B(E(() => j ? {
|
|
240
|
+
...me,
|
|
241
|
+
...j,
|
|
242
|
+
tags: j.tags ?? me.tags
|
|
243
|
+
} : void 0, [j]), Ie, re), q = i !== void 0, J = E(() => q ? [...i ?? []] : pe, [
|
|
244
|
+
pe,
|
|
245
|
+
q,
|
|
246
|
+
i
|
|
247
|
+
]), Y = E(() => new Set(J), [J]), ze = D(/* @__PURE__ */ new Set()), X = D(null), Z = D(/* @__PURE__ */ new Map());
|
|
248
|
+
T(() => {
|
|
249
|
+
if (!t) return;
|
|
250
|
+
let e = new AbortController();
|
|
251
|
+
return U(!0), G(null), t({
|
|
252
|
+
query: F,
|
|
253
|
+
type: I,
|
|
254
|
+
collection: L === "all" ? void 0 : L,
|
|
255
|
+
sort: R,
|
|
256
|
+
signal: e.signal
|
|
257
|
+
}).then((t) => {
|
|
258
|
+
if (e.signal.aborted) return;
|
|
259
|
+
let n = we(t);
|
|
260
|
+
ve(n.items), be(n.total);
|
|
261
|
+
}).catch((t) => {
|
|
262
|
+
e.signal.aborted || (G(t), u?.(t));
|
|
263
|
+
}).finally(() => {
|
|
264
|
+
e.signal.aborted || U(!1);
|
|
265
|
+
}), () => e.abort();
|
|
266
|
+
}, [
|
|
267
|
+
L,
|
|
268
|
+
t,
|
|
269
|
+
u,
|
|
270
|
+
F,
|
|
271
|
+
R,
|
|
272
|
+
I
|
|
273
|
+
]), T(() => {
|
|
274
|
+
let e = ze.current;
|
|
275
|
+
return () => {
|
|
276
|
+
X.current?.abort();
|
|
277
|
+
for (let t of e) Ce(t);
|
|
278
|
+
e.clear();
|
|
279
|
+
};
|
|
280
|
+
}, []);
|
|
281
|
+
let Be = E(() => t ? ge : [...De, ...e], [
|
|
282
|
+
De,
|
|
283
|
+
ge,
|
|
284
|
+
t,
|
|
285
|
+
e
|
|
286
|
+
]), Q = E(() => Be.filter((e) => !ke.has(N.getId(e))).map((e) => V(e, je[N.getId(e)])), [
|
|
287
|
+
N,
|
|
288
|
+
je,
|
|
289
|
+
ke,
|
|
290
|
+
Be
|
|
291
|
+
]), Ve = E(() => {
|
|
292
|
+
let e = t ? Q : H(Q, N, F, I, L);
|
|
293
|
+
return t ? e : Te(e, N, R);
|
|
294
|
+
}, [
|
|
295
|
+
N,
|
|
296
|
+
L,
|
|
297
|
+
t,
|
|
298
|
+
Q,
|
|
299
|
+
F,
|
|
300
|
+
R,
|
|
301
|
+
I
|
|
302
|
+
]), He = ye ?? Q.length, Ue = Ve.length, We = E(() => Q.filter((e) => Y.has(N.getId(e))), [
|
|
303
|
+
N,
|
|
304
|
+
Q,
|
|
305
|
+
Y
|
|
306
|
+
]), Ge = !!F.trim() || I !== "all" || L !== "all", $ = C((e) => {
|
|
307
|
+
q || z(e);
|
|
308
|
+
let t = new Set(e), n = Q.filter((e) => t.has(N.getId(e)));
|
|
309
|
+
o?.(e, n);
|
|
310
|
+
}, [
|
|
311
|
+
N,
|
|
312
|
+
q,
|
|
313
|
+
o,
|
|
314
|
+
Q
|
|
315
|
+
]), Ke = C((e) => {
|
|
316
|
+
let t = new Set(r === "single" ? [] : Y);
|
|
317
|
+
Y.has(e) && r !== "single" ? t.delete(e) : t.add(e), $(Array.from(t));
|
|
318
|
+
}, [
|
|
319
|
+
$,
|
|
320
|
+
Y,
|
|
321
|
+
r
|
|
322
|
+
]), qe = C(() => $([]), [$]), Je = C(() => {
|
|
323
|
+
se(""), ce("all"), le("all");
|
|
324
|
+
}, [
|
|
325
|
+
le,
|
|
326
|
+
se,
|
|
327
|
+
ce
|
|
328
|
+
]), Ye = C((e) => {
|
|
329
|
+
K((t) => [...t, ...e.map((e, t) => {
|
|
330
|
+
let n = Se(e);
|
|
331
|
+
return n && ze.current.add(n), {
|
|
332
|
+
id: `staged-${Date.now()}-${t}`,
|
|
333
|
+
file: e,
|
|
334
|
+
name: e.name,
|
|
335
|
+
size: e.size,
|
|
336
|
+
type: xe(e),
|
|
337
|
+
src: n,
|
|
338
|
+
progress: 0,
|
|
339
|
+
status: "staged"
|
|
340
|
+
};
|
|
341
|
+
})]);
|
|
342
|
+
}, []), Xe = C((e) => {
|
|
343
|
+
K((t) => {
|
|
344
|
+
let n = t.find((t) => t.id === e);
|
|
345
|
+
return n?.src && (Ce(n.src), ze.current.delete(n.src)), t.filter((t) => t.id !== e);
|
|
346
|
+
});
|
|
347
|
+
}, []), Ze = C(() => {
|
|
348
|
+
K((e) => {
|
|
349
|
+
for (let t of e) t.src && (Ce(t.src), ze.current.delete(t.src));
|
|
350
|
+
return [];
|
|
351
|
+
});
|
|
352
|
+
}, []), Qe = C((e) => {
|
|
353
|
+
Re((t) => ({
|
|
354
|
+
...t,
|
|
355
|
+
...e
|
|
356
|
+
}));
|
|
357
|
+
}, [Re]), $e = C((e, t) => {
|
|
358
|
+
K((n) => n.map((n) => n.id === e ? {
|
|
359
|
+
...n,
|
|
360
|
+
...t
|
|
361
|
+
} : n));
|
|
362
|
+
}, []);
|
|
363
|
+
return {
|
|
364
|
+
tab: ie,
|
|
365
|
+
setTab: P,
|
|
366
|
+
view: ae,
|
|
367
|
+
setView: oe,
|
|
368
|
+
query: F,
|
|
369
|
+
setQuery: se,
|
|
370
|
+
type: I,
|
|
371
|
+
setType: ce,
|
|
372
|
+
collection: L,
|
|
373
|
+
setCollection: le,
|
|
374
|
+
sort: R,
|
|
375
|
+
setSort: ue,
|
|
376
|
+
detailId: de,
|
|
377
|
+
setDetailId: fe,
|
|
378
|
+
items: Q,
|
|
379
|
+
visibleItems: Ve,
|
|
380
|
+
selectedIds: J,
|
|
381
|
+
selectedItems: We,
|
|
382
|
+
selectedSet: Y,
|
|
383
|
+
toggleSelection: Ke,
|
|
384
|
+
clearSelection: qe,
|
|
385
|
+
clearFilters: Je,
|
|
386
|
+
loading: Ee,
|
|
387
|
+
error: W,
|
|
388
|
+
hasFilters: Ge,
|
|
389
|
+
totalCount: He,
|
|
390
|
+
filteredCount: Ue,
|
|
391
|
+
stagedFiles: Ne,
|
|
392
|
+
addFiles: Ye,
|
|
393
|
+
removeStagedFile: Xe,
|
|
394
|
+
clearStagedFiles: Ze,
|
|
395
|
+
updateUploadOptions: Qe,
|
|
396
|
+
uploadOptions: Le,
|
|
397
|
+
uploading: Pe,
|
|
398
|
+
startUpload: C(async () => {
|
|
399
|
+
if (Pe || Ne.length === 0) return;
|
|
400
|
+
let e = new AbortController();
|
|
401
|
+
X.current?.abort(), X.current = e, G(null), Fe(!0), K((e) => e.map((e) => ({
|
|
402
|
+
...e,
|
|
403
|
+
status: "uploading",
|
|
404
|
+
progress: 0
|
|
405
|
+
})));
|
|
406
|
+
let t = {
|
|
407
|
+
signal: e.signal,
|
|
408
|
+
setProgress: (t, n) => {
|
|
409
|
+
e.signal.aborted || $e(t, { progress: Math.max(0, Math.min(100, n)) });
|
|
410
|
+
},
|
|
411
|
+
setFileStatus: (t, n, r) => {
|
|
412
|
+
e.signal.aborted || $e(t, {
|
|
413
|
+
status: n,
|
|
414
|
+
error: r
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
try {
|
|
419
|
+
let n = Ne.map((e) => e.file), i = await l?.(n, Le, t);
|
|
420
|
+
if (e.signal.aborted) return;
|
|
421
|
+
if (K((e) => e.map((e) => ({
|
|
422
|
+
...e,
|
|
423
|
+
status: "done",
|
|
424
|
+
progress: 100
|
|
425
|
+
}))), i?.length) {
|
|
426
|
+
Oe((e) => [...i, ...e]);
|
|
427
|
+
let e = i.map((e) => N.getId(e));
|
|
428
|
+
$(r === "single" ? e.slice(0, 1) : Array.from(/* @__PURE__ */ new Set([...e, ...J])));
|
|
429
|
+
}
|
|
430
|
+
Ze(), P("library");
|
|
431
|
+
} catch (t) {
|
|
432
|
+
if (e.signal.aborted) return;
|
|
433
|
+
G(t), K((e) => e.map((e) => e.status === "uploading" ? {
|
|
434
|
+
...e,
|
|
435
|
+
status: "error",
|
|
436
|
+
error: "Upload failed"
|
|
437
|
+
} : e)), u?.(t);
|
|
438
|
+
} finally {
|
|
439
|
+
X.current === e && (X.current = null, Fe(!1));
|
|
440
|
+
}
|
|
441
|
+
}, [
|
|
442
|
+
N,
|
|
443
|
+
$,
|
|
444
|
+
Ze,
|
|
445
|
+
u,
|
|
446
|
+
l,
|
|
447
|
+
J,
|
|
448
|
+
r,
|
|
449
|
+
P,
|
|
450
|
+
$e,
|
|
451
|
+
Ne,
|
|
452
|
+
Le,
|
|
453
|
+
Pe
|
|
454
|
+
]),
|
|
455
|
+
cancelUpload: C(() => {
|
|
456
|
+
X.current?.abort(), X.current = null, Fe(!1), K((e) => e.map((e) => e.status === "uploading" ? {
|
|
457
|
+
...e,
|
|
458
|
+
status: "staged",
|
|
459
|
+
progress: 0,
|
|
460
|
+
error: void 0
|
|
461
|
+
} : e));
|
|
462
|
+
}, []),
|
|
463
|
+
updateItem: C(async (e, t) => {
|
|
464
|
+
let n = N.getId(e), r = `update:${n}`, i = (Z.current.get(r) ?? 0) + 1;
|
|
465
|
+
Z.current.set(r, i);
|
|
466
|
+
let a = je[n];
|
|
467
|
+
G(null), Me((e) => ({
|
|
468
|
+
...e,
|
|
469
|
+
[n]: {
|
|
470
|
+
...e[n],
|
|
471
|
+
...t
|
|
472
|
+
}
|
|
473
|
+
}));
|
|
474
|
+
try {
|
|
475
|
+
return await s?.(e, t), !0;
|
|
476
|
+
} catch (e) {
|
|
477
|
+
return Z.current.get(r) === i && Me((e) => {
|
|
478
|
+
let t = { ...e };
|
|
479
|
+
return a ? t[n] = a : delete t[n], t;
|
|
480
|
+
}), G(e), u?.(e), !1;
|
|
481
|
+
}
|
|
482
|
+
}, [
|
|
483
|
+
N,
|
|
484
|
+
je,
|
|
485
|
+
u,
|
|
486
|
+
s
|
|
487
|
+
]),
|
|
488
|
+
removeItem: C(async (e) => {
|
|
489
|
+
let t = N.getId(e), n = `delete:${t}`, r = (Z.current.get(n) ?? 0) + 1;
|
|
490
|
+
Z.current.set(n, r);
|
|
491
|
+
let i = ke.has(t);
|
|
492
|
+
G(null), Ae((e) => new Set(e).add(t));
|
|
493
|
+
try {
|
|
494
|
+
return await c?.(e), Y.has(t) && $(J.filter((e) => e !== t)), !0;
|
|
495
|
+
} catch (e) {
|
|
496
|
+
return !i && Z.current.get(n) === r && Ae((e) => {
|
|
497
|
+
let n = new Set(e);
|
|
498
|
+
return n.delete(t), n;
|
|
499
|
+
}), G(e), u?.(e), !1;
|
|
500
|
+
}
|
|
501
|
+
}, [
|
|
502
|
+
N,
|
|
503
|
+
$,
|
|
504
|
+
u,
|
|
505
|
+
c,
|
|
506
|
+
ke,
|
|
507
|
+
J,
|
|
508
|
+
Y
|
|
509
|
+
]),
|
|
510
|
+
accessors: N
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
//#endregion
|
|
514
|
+
//#region src/components/features/media-library/partials/media-library-partials.tsx
|
|
515
|
+
function U(e, t) {
|
|
516
|
+
return k(e === "image" ? N : e === "video" ? ue : M, { className: t ?? "size-icon" });
|
|
517
|
+
}
|
|
518
|
+
function W(e, t) {
|
|
519
|
+
return e === "image" ? t.typeImage : e === "video" ? t.typeVideo : t.typeFile;
|
|
520
|
+
}
|
|
521
|
+
function G(e, t) {
|
|
522
|
+
return e ? z(t.usedIn, { count: e }) : t.notUsed;
|
|
523
|
+
}
|
|
524
|
+
function De({ children: e, tint: n, className: r }) {
|
|
525
|
+
return /* @__PURE__ */ k("div", {
|
|
526
|
+
className: t("media-library-preview relative overflow-hidden bg-muted", r),
|
|
527
|
+
style: n ? { background: n } : void 0,
|
|
528
|
+
children: e
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
function Oe({ src: e, alt: t, type: n, className: r, loading: i = "lazy" }) {
|
|
532
|
+
let [a, o] = O(!1);
|
|
533
|
+
return T(() => {
|
|
534
|
+
o(!1);
|
|
535
|
+
}, [e]), !e || a ? /* @__PURE__ */ k("div", {
|
|
536
|
+
className: "media-library-preview--fallback flex size-full items-center justify-center text-muted-foreground",
|
|
537
|
+
children: U(n, "size-6")
|
|
538
|
+
}) : /* @__PURE__ */ k("img", {
|
|
539
|
+
src: e,
|
|
540
|
+
alt: t,
|
|
541
|
+
loading: i,
|
|
542
|
+
className: r,
|
|
543
|
+
onError: () => o(!0)
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
function ke({ icon: e, title: n, description: r, action: i, className: a }) {
|
|
547
|
+
return /* @__PURE__ */ k(x, {
|
|
548
|
+
title: n,
|
|
549
|
+
description: r ?? !1,
|
|
550
|
+
actions: i,
|
|
551
|
+
media: e ?? /* @__PURE__ */ k(N, {
|
|
552
|
+
className: "size-icon",
|
|
553
|
+
"aria-hidden": "true"
|
|
554
|
+
}),
|
|
555
|
+
mediaVariant: "icon-soft",
|
|
556
|
+
padding: "md",
|
|
557
|
+
border: !0,
|
|
558
|
+
className: t("media-library-empty-state--component min-h-64 bg-muted/20", a)
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
function Ae({ query: e, type: i, typeFilters: a, collection: s, sort: c, view: l, collections: u = [], strings: d, onQueryChange: f, onTypeChange: p, onCollectionChange: m, onSortChange: _, onViewChange: y, onClearFilters: b, toolbarEnd: x }) {
|
|
562
|
+
let S = [
|
|
563
|
+
{
|
|
564
|
+
value: "all",
|
|
565
|
+
label: d.allTypes,
|
|
566
|
+
icon: null
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
value: "image",
|
|
570
|
+
label: d.images,
|
|
571
|
+
icon: N
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
value: "video",
|
|
575
|
+
label: d.videos,
|
|
576
|
+
icon: ue
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
value: "file",
|
|
580
|
+
label: d.files,
|
|
581
|
+
icon: M
|
|
582
|
+
}
|
|
583
|
+
].filter((e) => (a ?? [
|
|
584
|
+
"all",
|
|
585
|
+
"image",
|
|
586
|
+
"video"
|
|
587
|
+
]).includes(e.value)), C = [{
|
|
588
|
+
value: "all",
|
|
589
|
+
label: d.allCollections
|
|
590
|
+
}, ...u.map((e) => ({
|
|
591
|
+
value: e.value,
|
|
592
|
+
label: String(e.label)
|
|
593
|
+
}))], w = [
|
|
594
|
+
{
|
|
595
|
+
value: "newest",
|
|
596
|
+
label: d.sortNewest
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
value: "name",
|
|
600
|
+
label: d.sortName
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
value: "size",
|
|
604
|
+
label: d.sortSize
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
value: "usage",
|
|
608
|
+
label: d.sortUsage
|
|
609
|
+
}
|
|
610
|
+
], T = e.trim(), E = T.length > 0, D = E || i !== "all" || s !== "all";
|
|
611
|
+
return /* @__PURE__ */ A(o, {
|
|
612
|
+
direction: "horizontal",
|
|
613
|
+
wrap: !0,
|
|
614
|
+
align: "center",
|
|
615
|
+
gap: "md",
|
|
616
|
+
className: "media-library-toolbar--component",
|
|
617
|
+
children: [
|
|
618
|
+
/* @__PURE__ */ A(o, {
|
|
619
|
+
gap: "xs",
|
|
620
|
+
className: "media-library-toolbar--search min-w-52 flex-1",
|
|
621
|
+
children: [/* @__PURE__ */ k(g, {
|
|
622
|
+
value: e,
|
|
623
|
+
onChange: (e) => f(e.target.value),
|
|
624
|
+
placeholder: d.searchPlaceholder,
|
|
625
|
+
startIcon: ce,
|
|
626
|
+
clearable: !0,
|
|
627
|
+
onClear: () => f(""),
|
|
628
|
+
strings: { clear: d.clearSearch },
|
|
629
|
+
className: t("rounded-radius bg-background", E && "border-info/60 bg-info/5 text-foreground shadow-xs ring-1 ring-info/15")
|
|
630
|
+
}), !!E && /* @__PURE__ */ k(o, {
|
|
631
|
+
direction: "horizontal",
|
|
632
|
+
gap: "xs",
|
|
633
|
+
wrap: !1,
|
|
634
|
+
className: "media-library-toolbar--search-value px-space-xs",
|
|
635
|
+
children: /* @__PURE__ */ A(h, {
|
|
636
|
+
tone: "info",
|
|
637
|
+
className: "max-w-full",
|
|
638
|
+
children: [
|
|
639
|
+
/* @__PURE__ */ k(ce, {
|
|
640
|
+
className: "size-icon-sm",
|
|
641
|
+
"aria-hidden": "true"
|
|
642
|
+
}),
|
|
643
|
+
/* @__PURE__ */ k(r, {
|
|
644
|
+
tag: "span",
|
|
645
|
+
size: "inherit",
|
|
646
|
+
className: "text-current",
|
|
647
|
+
children: d.activeSearchLabel
|
|
648
|
+
}),
|
|
649
|
+
/* @__PURE__ */ k(r, {
|
|
650
|
+
tag: "span",
|
|
651
|
+
size: "inherit",
|
|
652
|
+
weight: "normal",
|
|
653
|
+
className: "min-w-0 truncate text-current",
|
|
654
|
+
children: T
|
|
655
|
+
})
|
|
656
|
+
]
|
|
657
|
+
})
|
|
658
|
+
})]
|
|
659
|
+
}),
|
|
660
|
+
/* @__PURE__ */ k("div", {
|
|
661
|
+
className: "media-library-toolbar--type-toggle flex h-action items-center rounded-radius-md bg-muted p-space-2xs",
|
|
662
|
+
role: "tablist",
|
|
663
|
+
"aria-label": d.typeFilterLabel,
|
|
664
|
+
children: S.map((e) => {
|
|
665
|
+
let a = e.icon, o = i === e.value;
|
|
666
|
+
return /* @__PURE__ */ A(n, {
|
|
667
|
+
type: "button",
|
|
668
|
+
role: "tab",
|
|
669
|
+
"aria-selected": o,
|
|
670
|
+
tone: "secondary",
|
|
671
|
+
buttonStyle: "ghost",
|
|
672
|
+
size: "sm",
|
|
673
|
+
className: t("rounded-radius-sm shadow-none", o ? "bg-background text-foreground shadow-xs hover:bg-background" : "text-muted-foreground hover:bg-transparent hover:text-foreground"),
|
|
674
|
+
onClick: () => p(e.value),
|
|
675
|
+
children: [a && /* @__PURE__ */ k(a, { className: "size-icon-md" }), /* @__PURE__ */ k(r, {
|
|
676
|
+
tag: "span",
|
|
677
|
+
size: "xs",
|
|
678
|
+
weight: "medium",
|
|
679
|
+
className: "text-inherit",
|
|
680
|
+
children: e.label
|
|
681
|
+
})]
|
|
682
|
+
}, e.value);
|
|
683
|
+
})
|
|
684
|
+
}),
|
|
685
|
+
/* @__PURE__ */ k("div", {
|
|
686
|
+
className: "min-w-40",
|
|
687
|
+
children: /* @__PURE__ */ k(v, {
|
|
688
|
+
value: s,
|
|
689
|
+
options: C,
|
|
690
|
+
onValueChange: (e) => m(e ?? "all"),
|
|
691
|
+
placeholder: d.collectionFilterLabel,
|
|
692
|
+
"aria-label": d.collectionFilterLabel,
|
|
693
|
+
className: "bg-background"
|
|
694
|
+
})
|
|
695
|
+
}),
|
|
696
|
+
/* @__PURE__ */ k("div", {
|
|
697
|
+
className: "min-w-32",
|
|
698
|
+
children: /* @__PURE__ */ k(v, {
|
|
699
|
+
value: c,
|
|
700
|
+
options: w,
|
|
701
|
+
onValueChange: (e) => _(e ?? "newest"),
|
|
702
|
+
placeholder: d.sortLabel,
|
|
703
|
+
"aria-label": d.sortLabel,
|
|
704
|
+
className: "bg-background"
|
|
705
|
+
})
|
|
706
|
+
}),
|
|
707
|
+
/* @__PURE__ */ A("div", {
|
|
708
|
+
className: "media-library-toolbar--view-toggle ml-auto flex h-action items-center rounded-radius-md bg-muted p-space-2xs",
|
|
709
|
+
children: [/* @__PURE__ */ k(n, {
|
|
710
|
+
type: "button",
|
|
711
|
+
tone: l === "grid" ? "neutral" : "secondary",
|
|
712
|
+
buttonStyle: l === "grid" ? "solid" : "ghost",
|
|
713
|
+
size: "sm",
|
|
714
|
+
iconOnly: !0,
|
|
715
|
+
className: t(l === "grid" && "bg-background text-foreground shadow-xs hover:bg-background"),
|
|
716
|
+
"aria-label": d.gridView,
|
|
717
|
+
onClick: () => y("grid"),
|
|
718
|
+
children: /* @__PURE__ */ k(re, { className: "size-icon-md" })
|
|
719
|
+
}), /* @__PURE__ */ k(n, {
|
|
720
|
+
type: "button",
|
|
721
|
+
tone: l === "table" ? "neutral" : "secondary",
|
|
722
|
+
buttonStyle: l === "table" ? "solid" : "ghost",
|
|
723
|
+
size: "sm",
|
|
724
|
+
iconOnly: !0,
|
|
725
|
+
className: t(l === "table" && "bg-background text-foreground shadow-xs hover:bg-background"),
|
|
726
|
+
"aria-label": d.tableView,
|
|
727
|
+
onClick: () => y("table"),
|
|
728
|
+
children: /* @__PURE__ */ k(oe, { className: "size-icon-md" })
|
|
729
|
+
})]
|
|
730
|
+
}),
|
|
731
|
+
!!D && /* @__PURE__ */ k(n, {
|
|
732
|
+
type: "button",
|
|
733
|
+
tone: "secondary",
|
|
734
|
+
buttonStyle: "ghost",
|
|
735
|
+
size: "sm",
|
|
736
|
+
onClick: b,
|
|
737
|
+
children: d.clearFilters
|
|
738
|
+
}),
|
|
739
|
+
x
|
|
740
|
+
]
|
|
741
|
+
});
|
|
742
|
+
}
|
|
743
|
+
function je({ item: e, selected: i = !1, density: s = "comfortable", showMeta: c = !0, accessors: l, strings: u, onToggle: f, onDetails: p, className: m }) {
|
|
744
|
+
let g = l.getType(e), _ = l.getName(e), v = l.getSrc(e), y = l.getAlt(e) || _, b = l.getSize(e), x = l.getUsageCount(e), S = l.getPublic(e) === !1, C = l.getDuration(e);
|
|
745
|
+
return /* @__PURE__ */ A("div", {
|
|
746
|
+
"data-selected": i || void 0,
|
|
747
|
+
"data-density": s,
|
|
748
|
+
className: t("media-library-card--component relative group/card overflow-hidden rounded-radius-lg border border-border/70 bg-card text-left shadow-xs transition-all", "hover:border-primary/30 hover:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", i && "media-library-card--selected border-primary ring-1 ring-primary", m),
|
|
749
|
+
onClick: f,
|
|
750
|
+
children: [
|
|
751
|
+
!!f && /* @__PURE__ */ k(n, {
|
|
752
|
+
type: "button",
|
|
753
|
+
tone: "secondary",
|
|
754
|
+
buttonStyle: "ghost",
|
|
755
|
+
"aria-label": _,
|
|
756
|
+
"aria-pressed": i,
|
|
757
|
+
className: "media-library-card--select absolute inset-0 z-10 h-full w-full rounded-radius-lg [&:not([aria-disabled=true]):not(:disabled)]:hover:bg-transparent focus-visible:ring-inset",
|
|
758
|
+
onClick: (e) => {
|
|
759
|
+
e.stopPropagation(), f();
|
|
760
|
+
}
|
|
761
|
+
}),
|
|
762
|
+
/* @__PURE__ */ A(De, {
|
|
763
|
+
tint: l.getTint(e),
|
|
764
|
+
className: t(s === "compact" ? "aspect-square" : "aspect-[4/3]"),
|
|
765
|
+
children: [
|
|
766
|
+
/* @__PURE__ */ k(Oe, {
|
|
767
|
+
src: v,
|
|
768
|
+
alt: y,
|
|
769
|
+
type: g,
|
|
770
|
+
className: "size-full object-cover"
|
|
771
|
+
}),
|
|
772
|
+
/* @__PURE__ */ k("span", {
|
|
773
|
+
className: t("media-library-card--check absolute left-2 top-2 inline-flex size-icon-lg items-center justify-center rounded-radius-md border border-border bg-background/95 text-transparent opacity-0 shadow-xs backdrop-blur transition-opacity group-hover/card:opacity-100 group-focus-within/card:opacity-100", i && "bg-primary text-primary-foreground opacity-100"),
|
|
774
|
+
"aria-hidden": "true",
|
|
775
|
+
children: /* @__PURE__ */ k(j, { className: "size-icon-sm" })
|
|
776
|
+
}),
|
|
777
|
+
!!p && /* @__PURE__ */ k(n, {
|
|
778
|
+
type: "button",
|
|
779
|
+
tone: "secondary",
|
|
780
|
+
buttonStyle: "solid",
|
|
781
|
+
size: "sm",
|
|
782
|
+
iconOnly: !0,
|
|
783
|
+
className: "media-library-card--details absolute z-20 right-2 top-2 opacity-0 shadow-sm transition-opacity group-hover/card:opacity-100 group-focus-within/card:opacity-100",
|
|
784
|
+
"aria-label": z(u.cardDetails, { name: _ }),
|
|
785
|
+
onClick: (e) => {
|
|
786
|
+
e.stopPropagation(), p();
|
|
787
|
+
},
|
|
788
|
+
children: /* @__PURE__ */ k(P, { className: "size-icon-md" })
|
|
789
|
+
}),
|
|
790
|
+
g === "video" && !!C && /* @__PURE__ */ A(h, {
|
|
791
|
+
tone: "secondary",
|
|
792
|
+
className: "media-library-card--duration absolute bottom-2 left-2 bg-inverse-background text-inverse-foreground",
|
|
793
|
+
children: [/* @__PURE__ */ k(se, { className: "size-icon-sm fill-current" }), C]
|
|
794
|
+
}),
|
|
795
|
+
S && /* @__PURE__ */ k(h, {
|
|
796
|
+
tone: "secondary",
|
|
797
|
+
className: "media-library-card--private absolute bottom-2 right-2 bg-card text-card-foreground",
|
|
798
|
+
children: /* @__PURE__ */ k(F, { className: "size-icon-sm" })
|
|
799
|
+
})
|
|
800
|
+
]
|
|
801
|
+
}),
|
|
802
|
+
/* @__PURE__ */ k("div", {
|
|
803
|
+
className: t("media-library-card--body", s === "compact" ? "p-surface-xs" : "p-surface"),
|
|
804
|
+
children: /* @__PURE__ */ A(a, {
|
|
805
|
+
columns: 1,
|
|
806
|
+
gap: "xs",
|
|
807
|
+
children: [/* @__PURE__ */ k(r, {
|
|
808
|
+
tag: "div",
|
|
809
|
+
weight: "semibold",
|
|
810
|
+
className: "truncate",
|
|
811
|
+
children: _
|
|
812
|
+
}), c && /* @__PURE__ */ A(o, {
|
|
813
|
+
direction: "horizontal",
|
|
814
|
+
align: "center",
|
|
815
|
+
gap: "md",
|
|
816
|
+
className: "min-w-0",
|
|
817
|
+
children: [/* @__PURE__ */ k(d, {
|
|
818
|
+
value: b,
|
|
819
|
+
size: "xs",
|
|
820
|
+
className: "truncate",
|
|
821
|
+
emptyLabel: u.unknownSize
|
|
822
|
+
}), !!x && /* @__PURE__ */ A(r, {
|
|
823
|
+
tag: "span",
|
|
824
|
+
size: "xs",
|
|
825
|
+
type: "secondary",
|
|
826
|
+
className: "ml-auto inline-flex items-center gap-space-xs",
|
|
827
|
+
children: [/* @__PURE__ */ k(ae, { className: "size-icon-sm" }), x]
|
|
828
|
+
})]
|
|
829
|
+
})]
|
|
830
|
+
})
|
|
831
|
+
})
|
|
832
|
+
]
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
function Me({ items: e, selectedSet: a, accessors: o, strings: s, onToggle: c, onDetails: l }) {
|
|
836
|
+
return /* @__PURE__ */ A("div", {
|
|
837
|
+
className: "media-library-list--component min-w-180",
|
|
838
|
+
children: [/* @__PURE__ */ A("div", {
|
|
839
|
+
className: "sticky top-0 z-10 grid grid-cols-[32px_42px_minmax(0,1fr)_86px_88px_120px_72px_34px] items-center gap-space-lg border-b border-border bg-background px-row-x py-row-y",
|
|
840
|
+
children: [
|
|
841
|
+
/* @__PURE__ */ k("span", {}),
|
|
842
|
+
/* @__PURE__ */ k("span", {}),
|
|
843
|
+
/* @__PURE__ */ k(i, { children: s.table.name }),
|
|
844
|
+
/* @__PURE__ */ k(i, { children: s.table.type }),
|
|
845
|
+
/* @__PURE__ */ k(i, { children: s.table.size }),
|
|
846
|
+
/* @__PURE__ */ k(i, { children: s.table.collection }),
|
|
847
|
+
/* @__PURE__ */ k(i, { children: s.table.used }),
|
|
848
|
+
/* @__PURE__ */ k("span", {})
|
|
849
|
+
]
|
|
850
|
+
}), e.map((e) => {
|
|
851
|
+
let i = o.getId(e), u = a.has(i), f = o.getType(e), p = o.getName(e), m = o.getSrc(e), g = o.getPublic(e) === !1;
|
|
852
|
+
return /* @__PURE__ */ A("div", {
|
|
853
|
+
"data-selected": u || void 0,
|
|
854
|
+
className: t("media-library-list--row relative grid grid-cols-[32px_42px_minmax(0,1fr)_86px_88px_120px_72px_34px] items-center gap-space-lg border-b border-border/60 px-row-x py-row-y last:border-b-0", "cursor-pointer rounded-radius transition-colors hover:bg-muted/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset", u && "bg-primary/10"),
|
|
855
|
+
onClick: () => c(i),
|
|
856
|
+
children: [
|
|
857
|
+
/* @__PURE__ */ k(n, {
|
|
858
|
+
type: "button",
|
|
859
|
+
tone: "secondary",
|
|
860
|
+
buttonStyle: "ghost",
|
|
861
|
+
"aria-label": p,
|
|
862
|
+
"aria-pressed": u,
|
|
863
|
+
className: "media-library-list--select absolute inset-0 z-10 h-full w-full [&:not([aria-disabled=true]):not(:disabled)]:hover:bg-transparent focus-visible:ring-inset",
|
|
864
|
+
onClick: (e) => {
|
|
865
|
+
e.stopPropagation(), c(i);
|
|
866
|
+
}
|
|
867
|
+
}),
|
|
868
|
+
/* @__PURE__ */ k("span", {
|
|
869
|
+
className: t("inline-flex size-icon-lg items-center justify-center rounded-radius-md border border-border text-transparent", u && "border-primary bg-primary text-primary-foreground"),
|
|
870
|
+
"aria-hidden": "true",
|
|
871
|
+
children: /* @__PURE__ */ k(j, { className: "size-icon-sm" })
|
|
872
|
+
}),
|
|
873
|
+
/* @__PURE__ */ k(De, {
|
|
874
|
+
tint: o.getTint(e),
|
|
875
|
+
className: "size-9 rounded-radius-md",
|
|
876
|
+
children: m ? /* @__PURE__ */ k("img", {
|
|
877
|
+
src: m,
|
|
878
|
+
alt: "",
|
|
879
|
+
loading: "lazy",
|
|
880
|
+
className: "size-full object-cover"
|
|
881
|
+
}) : /* @__PURE__ */ k("div", {
|
|
882
|
+
className: "flex size-full items-center justify-center text-muted-foreground",
|
|
883
|
+
children: U(f, "size-icon")
|
|
884
|
+
})
|
|
885
|
+
}),
|
|
886
|
+
/* @__PURE__ */ A(r, {
|
|
887
|
+
tag: "div",
|
|
888
|
+
weight: "semibold",
|
|
889
|
+
className: "flex min-w-0 items-center gap-space-xs truncate",
|
|
890
|
+
children: [p, g && /* @__PURE__ */ k(F, { className: "size-icon-sm shrink-0 text-muted-foreground" })]
|
|
891
|
+
}),
|
|
892
|
+
/* @__PURE__ */ k(h, {
|
|
893
|
+
tone: "secondary",
|
|
894
|
+
children: W(f, s)
|
|
895
|
+
}),
|
|
896
|
+
/* @__PURE__ */ k(d, {
|
|
897
|
+
value: o.getSize(e),
|
|
898
|
+
size: "xs",
|
|
899
|
+
emptyLabel: s.unknownSize
|
|
900
|
+
}),
|
|
901
|
+
/* @__PURE__ */ k(r, {
|
|
902
|
+
size: "xs",
|
|
903
|
+
type: "secondary",
|
|
904
|
+
className: "truncate",
|
|
905
|
+
children: o.getCollection(e) || "-"
|
|
906
|
+
}),
|
|
907
|
+
/* @__PURE__ */ k(r, {
|
|
908
|
+
size: "xs",
|
|
909
|
+
type: "secondary",
|
|
910
|
+
children: o.getUsageCount(e) ? o.getUsageCount(e) : "-"
|
|
911
|
+
}),
|
|
912
|
+
/* @__PURE__ */ k(n, {
|
|
913
|
+
type: "button",
|
|
914
|
+
tone: "secondary",
|
|
915
|
+
buttonStyle: "ghost",
|
|
916
|
+
size: "sm",
|
|
917
|
+
iconOnly: !0,
|
|
918
|
+
className: "relative z-20",
|
|
919
|
+
"aria-label": z(s.cardDetails, { name: p }),
|
|
920
|
+
onClick: (e) => {
|
|
921
|
+
e.stopPropagation(), l(i);
|
|
922
|
+
},
|
|
923
|
+
children: /* @__PURE__ */ k(P, { className: "size-icon-md" })
|
|
924
|
+
})
|
|
925
|
+
]
|
|
926
|
+
}, i);
|
|
927
|
+
})]
|
|
928
|
+
});
|
|
929
|
+
}
|
|
930
|
+
function Ne({ item: e, collections: t = [], accessors: i, strings: s, onClose: c, onUpdate: l, onRemove: u, renderDetail: p }) {
|
|
931
|
+
if (!e) return null;
|
|
932
|
+
let m = i.getName(e), b = i.getType(e), x = i.getSrc(e), S = i.getCollection(e) ?? t[0]?.value ?? "", C = i.getTags(e), w = i.getPublic(e) ?? !0, T = p?.(e, {
|
|
933
|
+
accessors: i,
|
|
934
|
+
update: l,
|
|
935
|
+
remove: u,
|
|
936
|
+
close: c
|
|
937
|
+
});
|
|
938
|
+
return T ? /* @__PURE__ */ k(ee, { children: T }) : /* @__PURE__ */ A("aside", {
|
|
939
|
+
className: "media-library-detail-panel--component flex min-h-0 w-full flex-col border-l border-border bg-background @2xl/media-library:w-72",
|
|
940
|
+
children: [/* @__PURE__ */ k("div", {
|
|
941
|
+
className: "media-library-detail-panel--header border-b border-border p-surface",
|
|
942
|
+
children: /* @__PURE__ */ A(o, {
|
|
943
|
+
direction: "horizontal",
|
|
944
|
+
align: "center",
|
|
945
|
+
gap: "md",
|
|
946
|
+
children: [/* @__PURE__ */ k(n, {
|
|
947
|
+
type: "button",
|
|
948
|
+
tone: "secondary",
|
|
949
|
+
buttonStyle: "ghost",
|
|
950
|
+
size: "sm",
|
|
951
|
+
iconOnly: !0,
|
|
952
|
+
"aria-label": s.detail.close,
|
|
953
|
+
onClick: c,
|
|
954
|
+
children: /* @__PURE__ */ k(te, { className: "size-icon-md" })
|
|
955
|
+
}), /* @__PURE__ */ k(r, {
|
|
956
|
+
weight: "semibold",
|
|
957
|
+
children: s.detail.title
|
|
958
|
+
})]
|
|
959
|
+
})
|
|
960
|
+
}), /* @__PURE__ */ A("div", {
|
|
961
|
+
className: "media-library-detail-panel--body grid min-h-0 gap-space-xl overflow-y-auto p-surface",
|
|
962
|
+
children: [
|
|
963
|
+
/* @__PURE__ */ A(De, {
|
|
964
|
+
tint: i.getTint(e),
|
|
965
|
+
className: "aspect-[4/3] rounded-radius border border-border",
|
|
966
|
+
children: [/* @__PURE__ */ k(Oe, {
|
|
967
|
+
src: x,
|
|
968
|
+
alt: i.getAlt(e) || m,
|
|
969
|
+
type: b,
|
|
970
|
+
className: "size-full object-cover"
|
|
971
|
+
}), b === "video" && !!i.getDuration(e) && /* @__PURE__ */ A(h, {
|
|
972
|
+
className: "absolute bottom-2 right-2 bg-inverse-background text-inverse-foreground",
|
|
973
|
+
children: [/* @__PURE__ */ k(se, { className: "size-icon-sm fill-current" }), i.getDuration(e)]
|
|
974
|
+
})]
|
|
975
|
+
}),
|
|
976
|
+
/* @__PURE__ */ k(r, {
|
|
977
|
+
tag: "div",
|
|
978
|
+
weight: "semibold",
|
|
979
|
+
className: "break-words",
|
|
980
|
+
children: m
|
|
981
|
+
}),
|
|
982
|
+
/* @__PURE__ */ k(a, {
|
|
983
|
+
render: /* @__PURE__ */ k("dl", {}),
|
|
984
|
+
columns: 1,
|
|
985
|
+
gap: "md",
|
|
986
|
+
className: "media-library-detail-panel--facts",
|
|
987
|
+
children: [
|
|
988
|
+
[s.detail.type, W(b, s)],
|
|
989
|
+
[s.detail.size, /* @__PURE__ */ k(d, {
|
|
990
|
+
value: i.getSize(e),
|
|
991
|
+
weight: "medium",
|
|
992
|
+
emptyLabel: s.unknownSize
|
|
993
|
+
})],
|
|
994
|
+
[s.detail.dimensions, /* @__PURE__ */ k(f, {
|
|
995
|
+
width: i.getWidth(e),
|
|
996
|
+
height: i.getHeight(e),
|
|
997
|
+
weight: "medium",
|
|
998
|
+
emptyLabel: s.unknownSize
|
|
999
|
+
})],
|
|
1000
|
+
[s.detail.uploaded, String(i.getUploadedAt(e) ?? "-")],
|
|
1001
|
+
[s.detail.usedIn, G(i.getUsageCount(e), s)]
|
|
1002
|
+
].map(([e, t]) => /* @__PURE__ */ A(o, {
|
|
1003
|
+
direction: "horizontal",
|
|
1004
|
+
justify: "between",
|
|
1005
|
+
gap: "xl",
|
|
1006
|
+
children: [/* @__PURE__ */ k("dt", { children: /* @__PURE__ */ k(r, {
|
|
1007
|
+
tag: "span",
|
|
1008
|
+
size: "xs",
|
|
1009
|
+
type: "secondary",
|
|
1010
|
+
children: e
|
|
1011
|
+
}) }), /* @__PURE__ */ k("dd", {
|
|
1012
|
+
className: "m-0 text-right",
|
|
1013
|
+
children: typeof t == "string" ? /* @__PURE__ */ k(r, {
|
|
1014
|
+
tag: "span",
|
|
1015
|
+
weight: "medium",
|
|
1016
|
+
children: t
|
|
1017
|
+
}) : t
|
|
1018
|
+
})]
|
|
1019
|
+
}, e))
|
|
1020
|
+
}),
|
|
1021
|
+
/* @__PURE__ */ k(_, {
|
|
1022
|
+
label: s.detail.altText,
|
|
1023
|
+
children: /* @__PURE__ */ k(g, {
|
|
1024
|
+
value: i.getAlt(e) ?? "",
|
|
1025
|
+
placeholder: s.detail.altPlaceholder,
|
|
1026
|
+
onChange: (e) => l({ alt: e.target.value })
|
|
1027
|
+
})
|
|
1028
|
+
}),
|
|
1029
|
+
/* @__PURE__ */ k(_, {
|
|
1030
|
+
label: s.detail.collection,
|
|
1031
|
+
children: /* @__PURE__ */ k(v, {
|
|
1032
|
+
value: S,
|
|
1033
|
+
options: t.map((e) => ({
|
|
1034
|
+
value: e.value,
|
|
1035
|
+
label: String(e.label)
|
|
1036
|
+
})),
|
|
1037
|
+
"aria-label": s.detail.collection,
|
|
1038
|
+
onValueChange: (e) => l({ collection: e })
|
|
1039
|
+
})
|
|
1040
|
+
}),
|
|
1041
|
+
/* @__PURE__ */ k(_, {
|
|
1042
|
+
label: s.detail.tags,
|
|
1043
|
+
children: /* @__PURE__ */ k(g, {
|
|
1044
|
+
value: C.join(", "),
|
|
1045
|
+
placeholder: s.detail.tagsPlaceholder,
|
|
1046
|
+
onChange: (e) => l({ tags: e.target.value.split(",").map((e) => e.trim()).filter(Boolean) })
|
|
1047
|
+
})
|
|
1048
|
+
}),
|
|
1049
|
+
/* @__PURE__ */ k("div", {
|
|
1050
|
+
className: "media-library-detail-panel--public rounded-radius border border-border bg-muted/20 p-surface",
|
|
1051
|
+
children: /* @__PURE__ */ A(o, {
|
|
1052
|
+
direction: "horizontal",
|
|
1053
|
+
align: "center",
|
|
1054
|
+
justify: "between",
|
|
1055
|
+
gap: "xl",
|
|
1056
|
+
children: [/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k(r, {
|
|
1057
|
+
weight: "semibold",
|
|
1058
|
+
children: s.detail.public
|
|
1059
|
+
}), /* @__PURE__ */ k(r, {
|
|
1060
|
+
size: "xs",
|
|
1061
|
+
type: "secondary",
|
|
1062
|
+
children: w ? s.detail.publicHint : s.detail.privateHint
|
|
1063
|
+
})] }), /* @__PURE__ */ k(y, {
|
|
1064
|
+
"aria-label": s.detail.public,
|
|
1065
|
+
checked: w,
|
|
1066
|
+
onValueChange: (e) => l({ public: e })
|
|
1067
|
+
})]
|
|
1068
|
+
})
|
|
1069
|
+
}),
|
|
1070
|
+
/* @__PURE__ */ A("div", {
|
|
1071
|
+
className: "media-library-detail-panel--actions flex flex-wrap gap-space-md",
|
|
1072
|
+
children: [/* @__PURE__ */ A(n, {
|
|
1073
|
+
type: "button",
|
|
1074
|
+
tone: "secondary",
|
|
1075
|
+
buttonStyle: "outline",
|
|
1076
|
+
children: [/* @__PURE__ */ k(R, { className: "size-icon-md" }), s.detail.replace]
|
|
1077
|
+
}), /* @__PURE__ */ A(n, {
|
|
1078
|
+
type: "button",
|
|
1079
|
+
tone: "destructive",
|
|
1080
|
+
buttonStyle: "ghost",
|
|
1081
|
+
onClick: u,
|
|
1082
|
+
children: [/* @__PURE__ */ k(le, { className: "size-icon-md" }), s.detail.delete]
|
|
1083
|
+
})]
|
|
1084
|
+
})
|
|
1085
|
+
]
|
|
1086
|
+
})]
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
1089
|
+
function K({ stagedFiles: e, uploadOptions: t, collections: i = [], uploading: a = !1, strings: s, onFiles: c, onRemoveFile: l, onOptionsChange: u, empty: f }) {
|
|
1090
|
+
return /* @__PURE__ */ k("div", {
|
|
1091
|
+
className: "media-library-upload-panel--component p-surface",
|
|
1092
|
+
children: /* @__PURE__ */ A(o, {
|
|
1093
|
+
gap: "xl",
|
|
1094
|
+
children: [
|
|
1095
|
+
/* @__PURE__ */ k(b, {
|
|
1096
|
+
onDrop: c,
|
|
1097
|
+
accept: "image/*,video/*",
|
|
1098
|
+
multiple: !0,
|
|
1099
|
+
size: "md",
|
|
1100
|
+
strings: {
|
|
1101
|
+
instruction: s.upload.dropTitle,
|
|
1102
|
+
helper: s.upload.dropHint,
|
|
1103
|
+
dragOver: s.upload.dragOver
|
|
1104
|
+
}
|
|
1105
|
+
}),
|
|
1106
|
+
e.length > 0 ? /* @__PURE__ */ k(o, {
|
|
1107
|
+
gap: "md",
|
|
1108
|
+
className: "media-library-upload-panel--staged",
|
|
1109
|
+
children: e.map((e) => /* @__PURE__ */ A("div", {
|
|
1110
|
+
className: "media-library-upload-panel--staged-file flex items-center gap-space-lg rounded-radius border border-border bg-card px-row-x py-row-y",
|
|
1111
|
+
children: [
|
|
1112
|
+
/* @__PURE__ */ k(De, {
|
|
1113
|
+
className: "size-10 rounded-radius-md",
|
|
1114
|
+
children: e.src ? /* @__PURE__ */ k("img", {
|
|
1115
|
+
src: e.src,
|
|
1116
|
+
alt: e.name,
|
|
1117
|
+
className: "size-full object-cover"
|
|
1118
|
+
}) : /* @__PURE__ */ k("div", {
|
|
1119
|
+
className: "flex size-full items-center justify-center text-muted-foreground",
|
|
1120
|
+
children: U(e.type, "size-icon")
|
|
1121
|
+
})
|
|
1122
|
+
}),
|
|
1123
|
+
/* @__PURE__ */ A("div", {
|
|
1124
|
+
className: "min-w-0 flex-1",
|
|
1125
|
+
children: [
|
|
1126
|
+
/* @__PURE__ */ A("div", {
|
|
1127
|
+
className: "flex items-baseline gap-space-lg",
|
|
1128
|
+
children: [/* @__PURE__ */ k(r, {
|
|
1129
|
+
weight: "semibold",
|
|
1130
|
+
className: "truncate",
|
|
1131
|
+
children: e.name
|
|
1132
|
+
}), /* @__PURE__ */ k(d, {
|
|
1133
|
+
value: e.size,
|
|
1134
|
+
size: "xs",
|
|
1135
|
+
className: "ml-auto shrink-0"
|
|
1136
|
+
})]
|
|
1137
|
+
}),
|
|
1138
|
+
(e.status === "uploading" || e.status === "done") && /* @__PURE__ */ k("div", {
|
|
1139
|
+
className: "mt-space-md h-1 overflow-hidden rounded-full bg-muted",
|
|
1140
|
+
children: /* @__PURE__ */ k("div", {
|
|
1141
|
+
className: "h-full rounded-full bg-primary transition-[width]",
|
|
1142
|
+
style: { width: `${e.progress}%` }
|
|
1143
|
+
})
|
|
1144
|
+
}),
|
|
1145
|
+
e.status === "error" && /* @__PURE__ */ k(r, {
|
|
1146
|
+
type: "error",
|
|
1147
|
+
children: e.error
|
|
1148
|
+
})
|
|
1149
|
+
]
|
|
1150
|
+
}),
|
|
1151
|
+
e.status === "done" ? /* @__PURE__ */ k(h, {
|
|
1152
|
+
tone: "success",
|
|
1153
|
+
children: s.upload.done
|
|
1154
|
+
}) : e.status === "uploading" ? /* @__PURE__ */ k(p, {
|
|
1155
|
+
value: Math.round(e.progress),
|
|
1156
|
+
scaled: !0,
|
|
1157
|
+
size: "xs",
|
|
1158
|
+
type: "secondary"
|
|
1159
|
+
}) : /* @__PURE__ */ k(n, {
|
|
1160
|
+
type: "button",
|
|
1161
|
+
tone: "secondary",
|
|
1162
|
+
buttonStyle: "ghost",
|
|
1163
|
+
size: "sm",
|
|
1164
|
+
iconOnly: !0,
|
|
1165
|
+
disabled: a,
|
|
1166
|
+
"aria-label": z(s.upload.removeFile, { name: e.name }),
|
|
1167
|
+
onClick: () => l(e.id),
|
|
1168
|
+
children: /* @__PURE__ */ k(de, { className: "size-icon-md" })
|
|
1169
|
+
})
|
|
1170
|
+
]
|
|
1171
|
+
}, e.id))
|
|
1172
|
+
}) : f,
|
|
1173
|
+
/* @__PURE__ */ A("div", {
|
|
1174
|
+
className: "media-library-upload-panel--options grid gap-space-lg rounded-radius border border-border bg-muted/20 p-surface @2xl/media-library:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_auto]",
|
|
1175
|
+
children: [
|
|
1176
|
+
/* @__PURE__ */ k(_, {
|
|
1177
|
+
label: s.upload.collection,
|
|
1178
|
+
children: /* @__PURE__ */ k(v, {
|
|
1179
|
+
value: t.collection ?? i[0]?.value,
|
|
1180
|
+
options: i.map((e) => ({
|
|
1181
|
+
value: e.value,
|
|
1182
|
+
label: String(e.label)
|
|
1183
|
+
})),
|
|
1184
|
+
"aria-label": s.upload.collection,
|
|
1185
|
+
onValueChange: (e) => u({ collection: e })
|
|
1186
|
+
})
|
|
1187
|
+
}),
|
|
1188
|
+
/* @__PURE__ */ k(_, {
|
|
1189
|
+
label: s.upload.tags,
|
|
1190
|
+
children: /* @__PURE__ */ k(g, {
|
|
1191
|
+
value: t.tags.join(", "),
|
|
1192
|
+
placeholder: s.upload.tagsPlaceholder,
|
|
1193
|
+
onChange: (e) => u({ tags: e.target.value.split(",").map((e) => e.trim()).filter(Boolean) })
|
|
1194
|
+
})
|
|
1195
|
+
}),
|
|
1196
|
+
/* @__PURE__ */ A(o, {
|
|
1197
|
+
direction: "horizontal",
|
|
1198
|
+
align: "center",
|
|
1199
|
+
justify: "between",
|
|
1200
|
+
gap: "xl",
|
|
1201
|
+
className: "@2xl/media-library:self-end",
|
|
1202
|
+
children: [/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k(r, {
|
|
1203
|
+
weight: "semibold",
|
|
1204
|
+
children: s.upload.public
|
|
1205
|
+
}), /* @__PURE__ */ k(r, {
|
|
1206
|
+
size: "xs",
|
|
1207
|
+
type: "secondary",
|
|
1208
|
+
children: s.upload.publicHint
|
|
1209
|
+
})] }), /* @__PURE__ */ k(y, {
|
|
1210
|
+
"aria-label": s.upload.public,
|
|
1211
|
+
checked: t.public,
|
|
1212
|
+
onValueChange: (e) => u({ public: e })
|
|
1213
|
+
})]
|
|
1214
|
+
})
|
|
1215
|
+
]
|
|
1216
|
+
})
|
|
1217
|
+
]
|
|
1218
|
+
})
|
|
1219
|
+
});
|
|
1220
|
+
}
|
|
1221
|
+
function Pe({ tab: e, selectedIds: i, selectionMode: a, stagedFiles: o, strings: s, onClearSelection: c, className: l }) {
|
|
1222
|
+
let d = i.length, f = o.reduce((e, t) => e + t.size, 0), p = o.length, m = t("media-library-footer-summary--component flex min-w-0 items-center gap-space-lg", l);
|
|
1223
|
+
return e === "upload" ? /* @__PURE__ */ k("div", {
|
|
1224
|
+
className: m,
|
|
1225
|
+
"aria-live": "polite",
|
|
1226
|
+
children: /* @__PURE__ */ k(r, {
|
|
1227
|
+
size: "xs",
|
|
1228
|
+
type: "secondary",
|
|
1229
|
+
className: "truncate",
|
|
1230
|
+
children: p === 0 ? s.footer.noFiles : z(s.footer.stagedSummary, {
|
|
1231
|
+
count: p,
|
|
1232
|
+
size: u(f) ?? s.unknownSize
|
|
1233
|
+
})
|
|
1234
|
+
})
|
|
1235
|
+
}) : /* @__PURE__ */ k("div", {
|
|
1236
|
+
className: m,
|
|
1237
|
+
"aria-live": "polite",
|
|
1238
|
+
children: d > 0 ? /* @__PURE__ */ A(ee, { children: [/* @__PURE__ */ k(r, {
|
|
1239
|
+
weight: "semibold",
|
|
1240
|
+
className: "whitespace-nowrap",
|
|
1241
|
+
children: z(s.footer.selectedCount, { count: d })
|
|
1242
|
+
}), /* @__PURE__ */ k(n, {
|
|
1243
|
+
type: "button",
|
|
1244
|
+
tone: "secondary",
|
|
1245
|
+
buttonStyle: "ghost",
|
|
1246
|
+
size: "sm",
|
|
1247
|
+
onClick: c,
|
|
1248
|
+
children: s.footer.clear
|
|
1249
|
+
})] }) : /* @__PURE__ */ k(r, {
|
|
1250
|
+
size: "xs",
|
|
1251
|
+
type: "secondary",
|
|
1252
|
+
className: "truncate",
|
|
1253
|
+
children: a === "single" ? s.footer.pickOne : s.footer.pickMany
|
|
1254
|
+
})
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1257
|
+
function Fe({ tab: e, selectedItems: r, selectedIds: i, stagedFiles: a, uploading: o = !1, strings: s, confirmLabel: c, cancelLabel: l, onCancel: u, onConfirm: d, onUpload: f, onCancelUpload: p, className: m }) {
|
|
1258
|
+
let h = i.length, g = a.length;
|
|
1259
|
+
return e === "upload" ? /* @__PURE__ */ A("div", {
|
|
1260
|
+
className: t("media-library-footer-actions--component flex min-w-0 flex-col-reverse gap-space-md @md/media-library:flex-row @md/media-library:justify-end", m),
|
|
1261
|
+
children: [/* @__PURE__ */ k(n, {
|
|
1262
|
+
type: "button",
|
|
1263
|
+
tone: "secondary",
|
|
1264
|
+
buttonStyle: "ghost",
|
|
1265
|
+
disabled: o,
|
|
1266
|
+
onClick: p,
|
|
1267
|
+
children: l ?? s.footer.cancel
|
|
1268
|
+
}), /* @__PURE__ */ k(n, {
|
|
1269
|
+
type: "button",
|
|
1270
|
+
disabled: g === 0 || o,
|
|
1271
|
+
onClick: f,
|
|
1272
|
+
loading: o,
|
|
1273
|
+
strings: { loading: s.footer.uploading },
|
|
1274
|
+
children: g <= 1 ? s.footer.upload : z(s.footer.uploadMany, { count: g })
|
|
1275
|
+
})]
|
|
1276
|
+
}) : /* @__PURE__ */ A("div", {
|
|
1277
|
+
className: t("media-library-footer-actions--component flex min-w-0 flex-col-reverse gap-space-md @md/media-library:flex-row @md/media-library:justify-end", m),
|
|
1278
|
+
children: [/* @__PURE__ */ k(n, {
|
|
1279
|
+
type: "button",
|
|
1280
|
+
tone: "secondary",
|
|
1281
|
+
buttonStyle: "ghost",
|
|
1282
|
+
onClick: u,
|
|
1283
|
+
children: l ?? s.footer.cancel
|
|
1284
|
+
}), /* @__PURE__ */ k(n, {
|
|
1285
|
+
type: "button",
|
|
1286
|
+
disabled: h === 0,
|
|
1287
|
+
onClick: d,
|
|
1288
|
+
children: c ?? (h === 0 ? s.footer.confirmEmpty : r.length === 1 ? s.footer.confirmOne : z(s.footer.confirmMany, { count: h }))
|
|
1289
|
+
})]
|
|
1290
|
+
});
|
|
1291
|
+
}
|
|
1292
|
+
function Ie({ tab: e, selectedItems: n, selectedIds: r, selectionMode: i, stagedFiles: a, uploading: o = !1, strings: s, confirmLabel: c, cancelLabel: l, onCancel: u, onConfirm: d, onClearSelection: f, onUpload: p, onCancelUpload: m, chrome: h = "section", className: g }) {
|
|
1293
|
+
return /* @__PURE__ */ k("footer", {
|
|
1294
|
+
className: t("media-library-footer--component", h === "section" && "border-t border-border bg-background p-surface", g),
|
|
1295
|
+
children: /* @__PURE__ */ A("div", {
|
|
1296
|
+
className: "flex min-w-0 flex-col gap-space-lg @md/media-library:flex-row @md/media-library:justify-between",
|
|
1297
|
+
children: [/* @__PURE__ */ k(Pe, {
|
|
1298
|
+
tab: e,
|
|
1299
|
+
selectedIds: r,
|
|
1300
|
+
selectionMode: i,
|
|
1301
|
+
stagedFiles: a,
|
|
1302
|
+
strings: s,
|
|
1303
|
+
onClearSelection: f
|
|
1304
|
+
}), /* @__PURE__ */ k(Fe, {
|
|
1305
|
+
tab: e,
|
|
1306
|
+
selectedItems: n,
|
|
1307
|
+
selectedIds: r,
|
|
1308
|
+
stagedFiles: a,
|
|
1309
|
+
uploading: o,
|
|
1310
|
+
strings: s,
|
|
1311
|
+
confirmLabel: c,
|
|
1312
|
+
cancelLabel: l,
|
|
1313
|
+
onCancel: u,
|
|
1314
|
+
onConfirm: d,
|
|
1315
|
+
onUpload: p,
|
|
1316
|
+
onCancelUpload: m
|
|
1317
|
+
})]
|
|
1318
|
+
})
|
|
1319
|
+
});
|
|
1320
|
+
}
|
|
1321
|
+
//#endregion
|
|
1322
|
+
//#region src/components/features/media-library/media-library.tsx
|
|
1323
|
+
var Le = S(null);
|
|
1324
|
+
function Re(e, t, n) {
|
|
1325
|
+
return E(() => {
|
|
1326
|
+
if (e) return e;
|
|
1327
|
+
let r = /* @__PURE__ */ new Set();
|
|
1328
|
+
for (let e of t) {
|
|
1329
|
+
let t = n(e);
|
|
1330
|
+
t && r.add(t);
|
|
1331
|
+
}
|
|
1332
|
+
return Array.from(r).map((e) => ({
|
|
1333
|
+
value: e,
|
|
1334
|
+
label: e
|
|
1335
|
+
}));
|
|
1336
|
+
}, [
|
|
1337
|
+
e,
|
|
1338
|
+
n,
|
|
1339
|
+
t
|
|
1340
|
+
]);
|
|
1341
|
+
}
|
|
1342
|
+
function q({ title: i, description: a, confirmLabel: l, cancelLabel: u, selectionMode: d = "multiple", density: f = "comfortable", showMeta: p = !0, allowUpload: h = !0, typeFilters: g, confirmOnSelect: _ = !1, onConfirm: v, onCancel: y, onClose: b, strings: x, slots: S, heightClassName: C, className: T, items: E, fetcher: D, accessors: O, collections: ee, value: te, defaultValue: ne, onValueChange: j, onItemUpdate: M, onItemDelete: re, onUpload: ie, onError: P, tab: ae, defaultTab: oe, onTabChange: F, view: se, defaultView: I, onViewChange: ce, query: L, defaultQuery: le, onQueryChange: ue, type: de, defaultType: me, onTypeChange: he, collection: B, defaultCollection: ge, onCollectionChange: _e, sort: ve, defaultSort: ye, onSortChange: be, uploadOptions: xe, defaultUploadOptions: Se, onUploadOptionsChange: Ce, ...we }) {
|
|
1343
|
+
let V = e(pe, x), H = Ee({
|
|
1344
|
+
items: E,
|
|
1345
|
+
fetcher: D,
|
|
1346
|
+
accessors: O,
|
|
1347
|
+
collections: ee,
|
|
1348
|
+
selectionMode: d,
|
|
1349
|
+
value: te,
|
|
1350
|
+
defaultValue: ne,
|
|
1351
|
+
onValueChange: j,
|
|
1352
|
+
onItemUpdate: M,
|
|
1353
|
+
onItemDelete: re,
|
|
1354
|
+
onUpload: ie,
|
|
1355
|
+
onError: P,
|
|
1356
|
+
tab: ae,
|
|
1357
|
+
defaultTab: oe,
|
|
1358
|
+
onTabChange: F,
|
|
1359
|
+
view: se,
|
|
1360
|
+
defaultView: I,
|
|
1361
|
+
onViewChange: ce,
|
|
1362
|
+
query: L,
|
|
1363
|
+
defaultQuery: le,
|
|
1364
|
+
onQueryChange: ue,
|
|
1365
|
+
type: de,
|
|
1366
|
+
defaultType: me,
|
|
1367
|
+
onTypeChange: he,
|
|
1368
|
+
collection: B,
|
|
1369
|
+
defaultCollection: ge,
|
|
1370
|
+
onCollectionChange: _e,
|
|
1371
|
+
sort: ve,
|
|
1372
|
+
defaultSort: ye,
|
|
1373
|
+
onSortChange: be,
|
|
1374
|
+
uploadOptions: xe,
|
|
1375
|
+
defaultUploadOptions: Se,
|
|
1376
|
+
onUploadOptionsChange: Ce
|
|
1377
|
+
}), Te = Re(ee, H.items, H.accessors.getCollection), U = h ? H.tab : "library", W = H.detailId ? H.items.find((e) => H.accessors.getId(e) === H.detailId) ?? null : null, G = w(Le), De = !S?.footer, Oe = G && De ? /* @__PURE__ */ k(Pe, {
|
|
1378
|
+
tab: U,
|
|
1379
|
+
selectedIds: H.selectedIds,
|
|
1380
|
+
selectionMode: d,
|
|
1381
|
+
stagedFiles: H.stagedFiles,
|
|
1382
|
+
strings: V,
|
|
1383
|
+
onClearSelection: H.clearSelection,
|
|
1384
|
+
className: "media-library-dialog--selection-summary shrink-0 justify-end"
|
|
1385
|
+
}) : null, q = !!(i || a || S?.headerStart), J = !!(h || S?.headerEnd || Oe), Y = q || J, ze = () => {
|
|
1386
|
+
v?.(H.selectedItems, H.selectedIds), b?.();
|
|
1387
|
+
}, X = () => {
|
|
1388
|
+
y?.(), b?.();
|
|
1389
|
+
}, Z = (e) => {
|
|
1390
|
+
let t = H.accessors.getId(e);
|
|
1391
|
+
H.toggleSelection(t), _ && (v?.([e], [t]), b?.());
|
|
1392
|
+
}, Be = H.query.trim(), Q = Be.length > 0 ? z(V.countSearch, {
|
|
1393
|
+
count: H.filteredCount,
|
|
1394
|
+
total: H.totalCount,
|
|
1395
|
+
query: Be
|
|
1396
|
+
}) : H.filteredCount === H.totalCount ? z(V.countAll, { count: H.totalCount }) : z(V.countFiltered, {
|
|
1397
|
+
count: H.filteredCount,
|
|
1398
|
+
total: H.totalCount
|
|
1399
|
+
}), Ve = S?.footer ?? (G ? /* @__PURE__ */ k(Fe, {
|
|
1400
|
+
tab: U,
|
|
1401
|
+
selectedItems: H.selectedItems,
|
|
1402
|
+
selectedIds: H.selectedIds,
|
|
1403
|
+
stagedFiles: H.stagedFiles,
|
|
1404
|
+
uploading: H.uploading,
|
|
1405
|
+
strings: V,
|
|
1406
|
+
confirmLabel: l,
|
|
1407
|
+
cancelLabel: u,
|
|
1408
|
+
onCancel: X,
|
|
1409
|
+
onConfirm: ze,
|
|
1410
|
+
onUpload: H.startUpload,
|
|
1411
|
+
onCancelUpload: () => {
|
|
1412
|
+
H.cancelUpload(), H.clearStagedFiles(), H.setTab("library");
|
|
1413
|
+
},
|
|
1414
|
+
className: "ml-auto"
|
|
1415
|
+
}) : /* @__PURE__ */ k(Ie, {
|
|
1416
|
+
tab: U,
|
|
1417
|
+
selectedItems: H.selectedItems,
|
|
1418
|
+
selectedIds: H.selectedIds,
|
|
1419
|
+
selectionMode: d,
|
|
1420
|
+
stagedFiles: H.stagedFiles,
|
|
1421
|
+
uploading: H.uploading,
|
|
1422
|
+
strings: V,
|
|
1423
|
+
confirmLabel: l,
|
|
1424
|
+
cancelLabel: u,
|
|
1425
|
+
onCancel: X,
|
|
1426
|
+
onConfirm: ze,
|
|
1427
|
+
onClearSelection: H.clearSelection,
|
|
1428
|
+
onUpload: H.startUpload,
|
|
1429
|
+
onCancelUpload: () => {
|
|
1430
|
+
H.cancelUpload(), H.clearStagedFiles(), H.setTab("library");
|
|
1431
|
+
}
|
|
1432
|
+
}));
|
|
1433
|
+
return /* @__PURE__ */ A("section", {
|
|
1434
|
+
className: t("media-library--component @container/media-library flex min-h-0 flex-col overflow-hidden rounded-radius border border-border bg-background", C ?? "h-190 max-h-[calc(100vh-7rem)]", T),
|
|
1435
|
+
...we,
|
|
1436
|
+
children: [
|
|
1437
|
+
Y && /* @__PURE__ */ A("header", {
|
|
1438
|
+
className: "media-library--header flex flex-col gap-space-lg border-b border-border p-surface @2xl/media-library:flex-row @2xl/media-library:items-center @2xl/media-library:justify-between",
|
|
1439
|
+
children: [q && /* @__PURE__ */ A(o, {
|
|
1440
|
+
direction: "horizontal",
|
|
1441
|
+
align: "start",
|
|
1442
|
+
gap: "lg",
|
|
1443
|
+
className: "min-w-0",
|
|
1444
|
+
children: [S?.headerStart, (i || a) && /* @__PURE__ */ A("div", {
|
|
1445
|
+
className: "min-w-0",
|
|
1446
|
+
children: [!!i && /* @__PURE__ */ k(r, {
|
|
1447
|
+
tag: "div",
|
|
1448
|
+
weight: "semibold",
|
|
1449
|
+
children: i
|
|
1450
|
+
}), !!a && /* @__PURE__ */ k(r, {
|
|
1451
|
+
type: "secondary",
|
|
1452
|
+
className: "mt-0.5",
|
|
1453
|
+
children: a
|
|
1454
|
+
})]
|
|
1455
|
+
})]
|
|
1456
|
+
}), J && /* @__PURE__ */ A("div", {
|
|
1457
|
+
className: t("media-library--header-controls flex min-w-0 flex-wrap items-center gap-space-md", Oe ? "flex-1 justify-between" : "@2xl/media-library:justify-end"),
|
|
1458
|
+
children: [/* @__PURE__ */ A(o, {
|
|
1459
|
+
direction: "horizontal",
|
|
1460
|
+
wrap: !0,
|
|
1461
|
+
align: "center",
|
|
1462
|
+
gap: "md",
|
|
1463
|
+
className: "min-w-0",
|
|
1464
|
+
children: [h && /* @__PURE__ */ A("div", {
|
|
1465
|
+
className: "media-library--tabs flex items-center rounded-radius-md bg-muted p-space-2xs",
|
|
1466
|
+
role: "tablist",
|
|
1467
|
+
children: [/* @__PURE__ */ A(n, {
|
|
1468
|
+
type: "button",
|
|
1469
|
+
role: "tab",
|
|
1470
|
+
"aria-selected": U === "library",
|
|
1471
|
+
tone: "secondary",
|
|
1472
|
+
buttonStyle: "ghost",
|
|
1473
|
+
size: "sm",
|
|
1474
|
+
className: t("rounded-radius-sm shadow-none", U === "library" ? "bg-background text-foreground shadow-xs hover:bg-background" : "text-muted-foreground hover:bg-transparent hover:text-foreground"),
|
|
1475
|
+
onClick: () => H.setTab("library"),
|
|
1476
|
+
children: [/* @__PURE__ */ k(N, { className: "size-icon-md" }), V.tabs.library]
|
|
1477
|
+
}), /* @__PURE__ */ A(n, {
|
|
1478
|
+
type: "button",
|
|
1479
|
+
role: "tab",
|
|
1480
|
+
"aria-selected": U === "upload",
|
|
1481
|
+
tone: "secondary",
|
|
1482
|
+
buttonStyle: "ghost",
|
|
1483
|
+
size: "sm",
|
|
1484
|
+
className: t("rounded-radius-sm shadow-none", U === "upload" ? "bg-background text-foreground shadow-xs hover:bg-background" : "text-muted-foreground hover:bg-transparent hover:text-foreground"),
|
|
1485
|
+
onClick: () => H.setTab("upload"),
|
|
1486
|
+
children: [
|
|
1487
|
+
/* @__PURE__ */ k(R, { className: "size-icon-md" }),
|
|
1488
|
+
V.tabs.upload,
|
|
1489
|
+
H.stagedFiles.length > 0 && /* @__PURE__ */ k(m, {
|
|
1490
|
+
value: H.stagedFiles.length,
|
|
1491
|
+
size: "xs",
|
|
1492
|
+
align: "center",
|
|
1493
|
+
className: "rounded-full bg-background/20 px-1.5"
|
|
1494
|
+
})
|
|
1495
|
+
]
|
|
1496
|
+
})]
|
|
1497
|
+
}), S?.headerEnd]
|
|
1498
|
+
}), Oe]
|
|
1499
|
+
})]
|
|
1500
|
+
}),
|
|
1501
|
+
/* @__PURE__ */ A("div", {
|
|
1502
|
+
className: "media-library--body flex min-h-0 flex-1",
|
|
1503
|
+
children: [U === "upload" ? /* @__PURE__ */ k("div", {
|
|
1504
|
+
className: "min-w-0 flex-1 overflow-y-auto",
|
|
1505
|
+
children: /* @__PURE__ */ k(K, {
|
|
1506
|
+
stagedFiles: H.stagedFiles,
|
|
1507
|
+
uploadOptions: H.uploadOptions,
|
|
1508
|
+
collections: Te,
|
|
1509
|
+
uploading: H.uploading,
|
|
1510
|
+
strings: V,
|
|
1511
|
+
onFiles: H.addFiles,
|
|
1512
|
+
onRemoveFile: H.removeStagedFile,
|
|
1513
|
+
onOptionsChange: H.updateUploadOptions,
|
|
1514
|
+
empty: S?.uploadEmpty
|
|
1515
|
+
})
|
|
1516
|
+
}) : /* @__PURE__ */ A("div", {
|
|
1517
|
+
className: t("media-library--library min-w-0 flex-1 flex-col", W ? "hidden @2xl/media-library:flex" : "flex"),
|
|
1518
|
+
children: [/* @__PURE__ */ A("div", {
|
|
1519
|
+
className: "media-library--toolbar border-b border-border/70 p-surface",
|
|
1520
|
+
children: [/* @__PURE__ */ k(Ae, {
|
|
1521
|
+
query: H.query,
|
|
1522
|
+
type: H.type,
|
|
1523
|
+
typeFilters: g,
|
|
1524
|
+
collection: H.collection,
|
|
1525
|
+
sort: H.sort,
|
|
1526
|
+
view: H.view,
|
|
1527
|
+
collections: Te,
|
|
1528
|
+
strings: V,
|
|
1529
|
+
onQueryChange: H.setQuery,
|
|
1530
|
+
onTypeChange: H.setType,
|
|
1531
|
+
onCollectionChange: H.setCollection,
|
|
1532
|
+
onSortChange: H.setSort,
|
|
1533
|
+
onViewChange: H.setView,
|
|
1534
|
+
onClearFilters: H.clearFilters,
|
|
1535
|
+
toolbarEnd: S?.toolbarEnd
|
|
1536
|
+
}), /* @__PURE__ */ k(r, {
|
|
1537
|
+
size: "xs",
|
|
1538
|
+
type: "secondary",
|
|
1539
|
+
className: "mt-space-md",
|
|
1540
|
+
"aria-live": "polite",
|
|
1541
|
+
children: Q
|
|
1542
|
+
})]
|
|
1543
|
+
}), /* @__PURE__ */ k("div", {
|
|
1544
|
+
role: "region",
|
|
1545
|
+
"aria-label": V.resultsLabel,
|
|
1546
|
+
tabIndex: 0,
|
|
1547
|
+
className: "media-library--results min-h-0 flex-1 overflow-y-auto p-surface focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
|
|
1548
|
+
children: H.loading ? S?.loading ?? /* @__PURE__ */ k(s, {
|
|
1549
|
+
className: "min-h-64",
|
|
1550
|
+
label: V.loading
|
|
1551
|
+
}) : H.error ? S?.error ?? /* @__PURE__ */ k(c, {
|
|
1552
|
+
title: V.errorTitle,
|
|
1553
|
+
description: V.errorDescription
|
|
1554
|
+
}) : H.visibleItems.length === 0 ? S?.empty ?? /* @__PURE__ */ k(ke, {
|
|
1555
|
+
title: H.hasFilters ? V.emptyFilteredTitle : V.emptyLibraryTitle,
|
|
1556
|
+
description: H.hasFilters ? V.emptyFilteredDescription : V.emptyLibraryDescription,
|
|
1557
|
+
action: H.hasFilters ? /* @__PURE__ */ k(n, {
|
|
1558
|
+
type: "button",
|
|
1559
|
+
tone: "secondary",
|
|
1560
|
+
buttonStyle: "outline",
|
|
1561
|
+
onClick: H.clearFilters,
|
|
1562
|
+
children: V.clearFilters
|
|
1563
|
+
}) : h ? /* @__PURE__ */ A(n, {
|
|
1564
|
+
type: "button",
|
|
1565
|
+
onClick: () => H.setTab("upload"),
|
|
1566
|
+
children: [/* @__PURE__ */ k(R, { className: "size-icon-md" }), V.uploadMedia]
|
|
1567
|
+
}) : void 0
|
|
1568
|
+
}) : H.view === "table" ? /* @__PURE__ */ k("div", {
|
|
1569
|
+
className: "overflow-x-auto",
|
|
1570
|
+
children: /* @__PURE__ */ k(Me, {
|
|
1571
|
+
items: H.visibleItems,
|
|
1572
|
+
selectedSet: H.selectedSet,
|
|
1573
|
+
selectionMode: d,
|
|
1574
|
+
accessors: H.accessors,
|
|
1575
|
+
strings: V,
|
|
1576
|
+
onToggle: (e) => {
|
|
1577
|
+
let t = H.items.find((t) => H.accessors.getId(t) === e);
|
|
1578
|
+
t && Z(t);
|
|
1579
|
+
},
|
|
1580
|
+
onDetails: H.setDetailId
|
|
1581
|
+
})
|
|
1582
|
+
}) : /* @__PURE__ */ k("div", {
|
|
1583
|
+
className: t("media-library--grid grid min-w-0 gap-space-lg", f === "compact" ? "grid-cols-[repeat(auto-fill,minmax(136px,1fr))]" : "grid-cols-[repeat(auto-fill,minmax(168px,1fr))]"),
|
|
1584
|
+
children: H.visibleItems.map((e) => {
|
|
1585
|
+
let t = H.accessors.getId(e), n = {
|
|
1586
|
+
id: t,
|
|
1587
|
+
selected: H.selectedSet.has(t),
|
|
1588
|
+
selectionMode: d,
|
|
1589
|
+
accessors: H.accessors,
|
|
1590
|
+
toggle: () => Z(e),
|
|
1591
|
+
openDetails: () => H.setDetailId(t)
|
|
1592
|
+
}, r = S?.renderItem?.(e, n);
|
|
1593
|
+
return r ? /* @__PURE__ */ k("div", { children: r }, t) : /* @__PURE__ */ k(je, {
|
|
1594
|
+
item: e,
|
|
1595
|
+
selected: n.selected,
|
|
1596
|
+
density: f,
|
|
1597
|
+
showMeta: p,
|
|
1598
|
+
selectionMode: d,
|
|
1599
|
+
accessors: H.accessors,
|
|
1600
|
+
strings: V,
|
|
1601
|
+
onToggle: n.toggle,
|
|
1602
|
+
onDetails: n.openDetails
|
|
1603
|
+
}, t);
|
|
1604
|
+
})
|
|
1605
|
+
})
|
|
1606
|
+
})]
|
|
1607
|
+
}), U === "library" && /* @__PURE__ */ k(Ne, {
|
|
1608
|
+
item: W,
|
|
1609
|
+
collections: Te,
|
|
1610
|
+
accessors: H.accessors,
|
|
1611
|
+
strings: V,
|
|
1612
|
+
onClose: () => H.setDetailId(null),
|
|
1613
|
+
onUpdate: (e) => W ? H.updateItem(W, e) : Promise.resolve(!1),
|
|
1614
|
+
onRemove: async () => {
|
|
1615
|
+
if (!W) return !1;
|
|
1616
|
+
let e = await H.removeItem(W);
|
|
1617
|
+
return e && H.setDetailId(null), e;
|
|
1618
|
+
},
|
|
1619
|
+
renderDetail: S?.renderDetail
|
|
1620
|
+
})]
|
|
1621
|
+
}),
|
|
1622
|
+
G ? G.element ? fe(Ve, G.element) : null : Ve
|
|
1623
|
+
]
|
|
1624
|
+
});
|
|
1625
|
+
}
|
|
1626
|
+
function J({ open: n, onOpenChange: r, trigger: i, dialogTitle: a, dialogDescription: o, onClose: s, className: c, dialogClassName: u, contentClassName: d, closeOnEscape: f = !0, closeOnBackdropClick: p = !0, ...m }) {
|
|
1627
|
+
let h = e(pe, m.strings), [g, _] = O(!1), [v, y] = O(null), b = n !== void 0, x = b ? n : g, S = (e) => {
|
|
1628
|
+
b || _(e), r?.(e);
|
|
1629
|
+
}, C = () => {
|
|
1630
|
+
S(!1), s?.();
|
|
1631
|
+
};
|
|
1632
|
+
return /* @__PURE__ */ k(Le.Provider, {
|
|
1633
|
+
value: { element: v },
|
|
1634
|
+
children: /* @__PURE__ */ k(l, {
|
|
1635
|
+
open: x,
|
|
1636
|
+
onOpenChange: S,
|
|
1637
|
+
onClose: s,
|
|
1638
|
+
trigger: i,
|
|
1639
|
+
title: a ?? h.title,
|
|
1640
|
+
description: o ?? h.description,
|
|
1641
|
+
size: "full",
|
|
1642
|
+
showCancel: !1,
|
|
1643
|
+
showConfirm: !1,
|
|
1644
|
+
footer: /* @__PURE__ */ k("div", {
|
|
1645
|
+
ref: y,
|
|
1646
|
+
className: "media-library-dialog--footer @container/media-library w-full"
|
|
1647
|
+
}),
|
|
1648
|
+
className: t("media-library-dialog--component max-h-[calc(100vh-2rem)] max-w-[min(1060px,calc(100vw-2rem))] sm:max-w-[min(1060px,calc(100vw-2rem))]", u),
|
|
1649
|
+
contentClassName: t("media-library-dialog--body flex min-h-0 flex-col overflow-hidden p-0", d),
|
|
1650
|
+
closeOnBackdropClick: p,
|
|
1651
|
+
closeOnEscape: f,
|
|
1652
|
+
children: /* @__PURE__ */ k(q, {
|
|
1653
|
+
...m,
|
|
1654
|
+
onClose: C,
|
|
1655
|
+
className: t("media-library-dialog--library rounded-none border-0", c),
|
|
1656
|
+
heightClassName: m.heightClassName ?? "min-h-0 flex-1",
|
|
1657
|
+
strings: m.strings
|
|
1658
|
+
})
|
|
1659
|
+
})
|
|
1660
|
+
});
|
|
1661
|
+
}
|
|
1662
|
+
//#endregion
|
|
1663
|
+
//#region src/components/features/media-library/media-resource-gallery.tsx
|
|
1664
|
+
function Y(e, t, n) {
|
|
1665
|
+
let r = e.slice(), [i] = r.splice(t, 1);
|
|
1666
|
+
return i === void 0 || r.splice(n, 0, i), r;
|
|
1667
|
+
}
|
|
1668
|
+
function ze({ items: i, accessors: a, title: s, description: c, primaryId: l, onPrimaryChange: u, onRemove: f, onReorder: p, onAdd: m, maxItems: g, layout: _ = "field", density: v = "comfortable", readOnly: y = !1, empty: b, action: x, renderItem: S, strings: C, className: w, ...T }) {
|
|
1669
|
+
let E = e(pe, C), D = _e(a), O = i.length, ee = l ?? (O > 0 ? D.getId(i[0]) : void 0), j = !y && !!m && (g === void 0 || O < g), re = j && (_ === "field" || O > 0) ? /* @__PURE__ */ k(n, {
|
|
1670
|
+
type: "button",
|
|
1671
|
+
tone: "secondary",
|
|
1672
|
+
buttonStyle: "outline",
|
|
1673
|
+
icon: I,
|
|
1674
|
+
onClick: m,
|
|
1675
|
+
children: E.gallery.add
|
|
1676
|
+
}) : g !== void 0 && O >= g ? /* @__PURE__ */ k(h, {
|
|
1677
|
+
tone: "secondary",
|
|
1678
|
+
children: E.gallery.maxReached
|
|
1679
|
+
}) : null, N = (e, t) => {
|
|
1680
|
+
if (t < 0 || t >= O || e === t) return;
|
|
1681
|
+
let n = Y(i, e, t);
|
|
1682
|
+
p?.(n.map((e) => D.getId(e)), n);
|
|
1683
|
+
}, P = !!(s || c || x || re), ae = O === 0 && _ !== "field", oe = () => !j || _ !== "field" ? null : /* @__PURE__ */ A(n, {
|
|
1684
|
+
type: "button",
|
|
1685
|
+
tone: "secondary",
|
|
1686
|
+
buttonStyle: "ghost",
|
|
1687
|
+
className: t("media-resource-gallery--add-tile h-auto min-h-24 w-full flex-col rounded-radius border border-dashed border-border bg-background text-muted-foreground shadow-none", "aspect-square hover:border-primary-accent/50 hover:bg-primary/5 hover:text-primary-accent focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"),
|
|
1688
|
+
"aria-label": E.gallery.addTile,
|
|
1689
|
+
onClick: m,
|
|
1690
|
+
children: [/* @__PURE__ */ k(I, { className: "size-icon" }), /* @__PURE__ */ k(r, {
|
|
1691
|
+
tag: "span",
|
|
1692
|
+
size: "inherit",
|
|
1693
|
+
className: "sr-only",
|
|
1694
|
+
children: E.gallery.addTile
|
|
1695
|
+
})]
|
|
1696
|
+
});
|
|
1697
|
+
return /* @__PURE__ */ A("section", {
|
|
1698
|
+
className: t("media-resource-gallery--component @container/media-resource-gallery rounded-radius border border-border bg-card shadow-xs", w),
|
|
1699
|
+
"data-layout": _,
|
|
1700
|
+
"data-density": v,
|
|
1701
|
+
...T,
|
|
1702
|
+
children: [P && /* @__PURE__ */ k("header", {
|
|
1703
|
+
className: "media-resource-gallery--header p-surface",
|
|
1704
|
+
children: /* @__PURE__ */ A(o, {
|
|
1705
|
+
direction: {
|
|
1706
|
+
base: "vertical",
|
|
1707
|
+
md: "horizontal"
|
|
1708
|
+
},
|
|
1709
|
+
gap: "lg",
|
|
1710
|
+
align: { md: "start" },
|
|
1711
|
+
justify: { md: "between" },
|
|
1712
|
+
children: [/* @__PURE__ */ A("div", {
|
|
1713
|
+
className: "min-w-0",
|
|
1714
|
+
children: [!!s && /* @__PURE__ */ k(r, {
|
|
1715
|
+
tag: "div",
|
|
1716
|
+
weight: "semibold",
|
|
1717
|
+
children: s
|
|
1718
|
+
}), !!c && /* @__PURE__ */ k(r, {
|
|
1719
|
+
type: "secondary",
|
|
1720
|
+
className: "mt-0.5",
|
|
1721
|
+
children: c
|
|
1722
|
+
})]
|
|
1723
|
+
}), /* @__PURE__ */ k(o, {
|
|
1724
|
+
direction: "horizontal",
|
|
1725
|
+
wrap: !0,
|
|
1726
|
+
align: "center",
|
|
1727
|
+
gap: "md",
|
|
1728
|
+
className: "media-resource-gallery--actions",
|
|
1729
|
+
children: x ?? re
|
|
1730
|
+
})]
|
|
1731
|
+
})
|
|
1732
|
+
}), ae ? /* @__PURE__ */ k("div", {
|
|
1733
|
+
className: "media-resource-gallery--empty px-surface pb-surface",
|
|
1734
|
+
children: b ?? /* @__PURE__ */ k(ke, {
|
|
1735
|
+
title: E.gallery.emptyTitle,
|
|
1736
|
+
description: E.gallery.emptyDescription,
|
|
1737
|
+
action: j ? /* @__PURE__ */ k(n, {
|
|
1738
|
+
type: "button",
|
|
1739
|
+
icon: ie,
|
|
1740
|
+
onClick: m,
|
|
1741
|
+
children: E.gallery.add
|
|
1742
|
+
}) : void 0
|
|
1743
|
+
})
|
|
1744
|
+
}) : /* @__PURE__ */ A("div", {
|
|
1745
|
+
className: t("grid min-w-0 grid-cols-1", _ === "list" ? "gap-space-md" : "gap-space-lg", "media-resource-gallery--items p-surface", P && "pt-0", _ === "list" ? void 0 : _ === "field" ? "grid-cols-[repeat(auto-fill,minmax(96px,1fr))] @md/media-resource-gallery:grid-cols-[repeat(auto-fill,minmax(108px,1fr))]" : v === "compact" ? "grid-cols-[repeat(auto-fill,minmax(132px,1fr))]" : "grid-cols-[repeat(auto-fill,minmax(164px,1fr))]"),
|
|
1746
|
+
children: [i.map((e, i) => {
|
|
1747
|
+
let a = D.getId(e), s = D.getName(e), c = D.getType(e), l = D.getSrc(e), p = D.getAlt(e) || s, m = a === ee, g = D.getPublic(e) === !1, b = D.getDuration(e), x = i > 0, C = i < O - 1, w = S?.(e, {
|
|
1748
|
+
id: a,
|
|
1749
|
+
index: i,
|
|
1750
|
+
total: O,
|
|
1751
|
+
primary: m,
|
|
1752
|
+
accessors: D,
|
|
1753
|
+
canMovePrevious: x,
|
|
1754
|
+
canMoveNext: C,
|
|
1755
|
+
setPrimary: () => u?.(a, e),
|
|
1756
|
+
remove: () => f?.(a, e),
|
|
1757
|
+
movePrevious: () => N(i, i - 1),
|
|
1758
|
+
moveNext: () => N(i, i + 1)
|
|
1759
|
+
});
|
|
1760
|
+
return w ? /* @__PURE__ */ k("div", { children: w }, a) : _ === "field" ? /* @__PURE__ */ A("div", {
|
|
1761
|
+
className: t("media-resource-gallery--item group/gallery relative aspect-square overflow-hidden rounded-radius border border-border bg-background shadow-xs", "transition-colors hover:border-primary/40 focus-within:border-primary/50", m && "col-span-2 row-span-2 min-h-52"),
|
|
1762
|
+
"data-primary": m || void 0,
|
|
1763
|
+
children: [
|
|
1764
|
+
l ? /* @__PURE__ */ k("img", {
|
|
1765
|
+
src: l,
|
|
1766
|
+
alt: p,
|
|
1767
|
+
loading: "lazy",
|
|
1768
|
+
className: "size-full object-cover"
|
|
1769
|
+
}) : /* @__PURE__ */ k("div", {
|
|
1770
|
+
className: "flex size-full items-center justify-center bg-muted text-muted-foreground",
|
|
1771
|
+
children: /* @__PURE__ */ k(M, { className: m ? "size-7" : "size-icon-lg" })
|
|
1772
|
+
}),
|
|
1773
|
+
m && /* @__PURE__ */ k(h, {
|
|
1774
|
+
tone: "secondary",
|
|
1775
|
+
className: "absolute left-2 top-2 bg-background/90 shadow-xs",
|
|
1776
|
+
children: E.gallery.cover
|
|
1777
|
+
}),
|
|
1778
|
+
c === "video" && !!b && /* @__PURE__ */ A(h, {
|
|
1779
|
+
tone: "secondary",
|
|
1780
|
+
className: "absolute bottom-2 left-2 bg-foreground text-background",
|
|
1781
|
+
children: [/* @__PURE__ */ k(se, { className: "size-icon-sm fill-current" }), b]
|
|
1782
|
+
}),
|
|
1783
|
+
g && /* @__PURE__ */ k("span", {
|
|
1784
|
+
className: "absolute bottom-2 right-2 inline-flex size-6 items-center justify-center rounded-full border border-border bg-background/90 text-muted-foreground shadow-xs",
|
|
1785
|
+
children: /* @__PURE__ */ k(F, { className: "size-icon-sm" })
|
|
1786
|
+
}),
|
|
1787
|
+
!y && /* @__PURE__ */ k(n, {
|
|
1788
|
+
type: "button",
|
|
1789
|
+
tone: "secondary",
|
|
1790
|
+
buttonStyle: "solid",
|
|
1791
|
+
size: "sm",
|
|
1792
|
+
iconOnly: !0,
|
|
1793
|
+
className: "absolute right-2 top-2 opacity-0 shadow-sm transition-opacity group-hover/gallery:opacity-100 group-focus-within/gallery:opacity-100",
|
|
1794
|
+
"aria-label": E.gallery.remove,
|
|
1795
|
+
onClick: () => f?.(a, e),
|
|
1796
|
+
children: /* @__PURE__ */ k(de, { className: "size-icon-md" })
|
|
1797
|
+
})
|
|
1798
|
+
]
|
|
1799
|
+
}, a) : _ === "list" ? /* @__PURE__ */ A(o, {
|
|
1800
|
+
direction: "horizontal",
|
|
1801
|
+
wrap: !0,
|
|
1802
|
+
align: "center",
|
|
1803
|
+
gap: "lg",
|
|
1804
|
+
className: t("media-resource-gallery--item min-w-0 rounded-radius border border-border bg-background px-row-x", v === "compact" ? "py-row-y-sm" : "py-row-y"),
|
|
1805
|
+
"data-primary": m || void 0,
|
|
1806
|
+
children: [
|
|
1807
|
+
/* @__PURE__ */ k("div", {
|
|
1808
|
+
className: "relative size-12 shrink-0 overflow-hidden rounded-radius-md bg-muted",
|
|
1809
|
+
children: l ? /* @__PURE__ */ k("img", {
|
|
1810
|
+
src: l,
|
|
1811
|
+
alt: p,
|
|
1812
|
+
loading: "lazy",
|
|
1813
|
+
className: "size-full object-cover"
|
|
1814
|
+
}) : /* @__PURE__ */ k("div", {
|
|
1815
|
+
className: "flex size-full items-center justify-center text-muted-foreground",
|
|
1816
|
+
children: /* @__PURE__ */ k(M, { className: "size-icon" })
|
|
1817
|
+
})
|
|
1818
|
+
}),
|
|
1819
|
+
/* @__PURE__ */ A("div", {
|
|
1820
|
+
className: "min-w-0 flex-1",
|
|
1821
|
+
children: [/* @__PURE__ */ A(o, {
|
|
1822
|
+
direction: "horizontal",
|
|
1823
|
+
wrap: !0,
|
|
1824
|
+
align: "center",
|
|
1825
|
+
gap: "md",
|
|
1826
|
+
className: "min-w-0",
|
|
1827
|
+
children: [/* @__PURE__ */ k(r, {
|
|
1828
|
+
tag: "div",
|
|
1829
|
+
weight: "semibold",
|
|
1830
|
+
className: "min-w-0 break-all",
|
|
1831
|
+
children: s
|
|
1832
|
+
}), m && /* @__PURE__ */ k(h, {
|
|
1833
|
+
tone: "info",
|
|
1834
|
+
children: E.gallery.primary
|
|
1835
|
+
})]
|
|
1836
|
+
}), /* @__PURE__ */ A(r, {
|
|
1837
|
+
size: "xs",
|
|
1838
|
+
type: "secondary",
|
|
1839
|
+
children: [
|
|
1840
|
+
z(E.gallery.itemPosition, {
|
|
1841
|
+
index: i + 1,
|
|
1842
|
+
total: O
|
|
1843
|
+
}),
|
|
1844
|
+
" · ",
|
|
1845
|
+
/* @__PURE__ */ k(d, {
|
|
1846
|
+
value: D.getSize(e),
|
|
1847
|
+
size: "xs",
|
|
1848
|
+
align: "left",
|
|
1849
|
+
emptyLabel: E.unknownSize
|
|
1850
|
+
})
|
|
1851
|
+
]
|
|
1852
|
+
})]
|
|
1853
|
+
}),
|
|
1854
|
+
!y && /* @__PURE__ */ A("div", {
|
|
1855
|
+
className: "media-resource-gallery--item-actions flex basis-full flex-wrap items-center justify-end gap-space-xs @sm/media-resource-gallery:basis-auto",
|
|
1856
|
+
children: [
|
|
1857
|
+
/* @__PURE__ */ k(n, {
|
|
1858
|
+
type: "button",
|
|
1859
|
+
tone: "secondary",
|
|
1860
|
+
buttonStyle: "ghost",
|
|
1861
|
+
size: "sm",
|
|
1862
|
+
iconOnly: !0,
|
|
1863
|
+
disabled: m,
|
|
1864
|
+
"aria-label": E.gallery.setPrimary,
|
|
1865
|
+
onClick: () => u?.(a, e),
|
|
1866
|
+
children: /* @__PURE__ */ k(L, { className: "size-icon-md" })
|
|
1867
|
+
}),
|
|
1868
|
+
/* @__PURE__ */ k(n, {
|
|
1869
|
+
type: "button",
|
|
1870
|
+
tone: "secondary",
|
|
1871
|
+
buttonStyle: "ghost",
|
|
1872
|
+
size: "sm",
|
|
1873
|
+
iconOnly: !0,
|
|
1874
|
+
disabled: !x,
|
|
1875
|
+
"aria-label": E.gallery.movePrevious,
|
|
1876
|
+
onClick: () => N(i, i - 1),
|
|
1877
|
+
children: /* @__PURE__ */ k(te, { className: "size-icon-md" })
|
|
1878
|
+
}),
|
|
1879
|
+
/* @__PURE__ */ k(n, {
|
|
1880
|
+
type: "button",
|
|
1881
|
+
tone: "secondary",
|
|
1882
|
+
buttonStyle: "ghost",
|
|
1883
|
+
size: "sm",
|
|
1884
|
+
iconOnly: !0,
|
|
1885
|
+
disabled: !C,
|
|
1886
|
+
"aria-label": E.gallery.moveNext,
|
|
1887
|
+
onClick: () => N(i, i + 1),
|
|
1888
|
+
children: /* @__PURE__ */ k(ne, { className: "size-icon-md" })
|
|
1889
|
+
}),
|
|
1890
|
+
/* @__PURE__ */ k(n, {
|
|
1891
|
+
type: "button",
|
|
1892
|
+
tone: "destructive",
|
|
1893
|
+
buttonStyle: "ghost",
|
|
1894
|
+
size: "sm",
|
|
1895
|
+
iconOnly: !0,
|
|
1896
|
+
"aria-label": E.gallery.remove,
|
|
1897
|
+
onClick: () => f?.(a, e),
|
|
1898
|
+
children: /* @__PURE__ */ k(le, { className: "size-icon-md" })
|
|
1899
|
+
})
|
|
1900
|
+
]
|
|
1901
|
+
})
|
|
1902
|
+
]
|
|
1903
|
+
}, a) : /* @__PURE__ */ A("div", {
|
|
1904
|
+
className: "media-resource-gallery--item group/gallery overflow-hidden rounded-radius border border-border bg-background shadow-xs transition-colors hover:border-primary/40",
|
|
1905
|
+
"data-primary": m || void 0,
|
|
1906
|
+
children: [/* @__PURE__ */ A("div", {
|
|
1907
|
+
className: "relative aspect-[4/3] bg-muted",
|
|
1908
|
+
children: [l ? /* @__PURE__ */ k("img", {
|
|
1909
|
+
src: l,
|
|
1910
|
+
alt: p,
|
|
1911
|
+
loading: "lazy",
|
|
1912
|
+
className: "size-full object-cover"
|
|
1913
|
+
}) : /* @__PURE__ */ k("div", {
|
|
1914
|
+
className: "flex size-full items-center justify-center text-muted-foreground",
|
|
1915
|
+
children: /* @__PURE__ */ k(M, { className: "size-6" })
|
|
1916
|
+
}), /* @__PURE__ */ A("div", {
|
|
1917
|
+
className: "absolute left-2 top-2 flex flex-wrap gap-space-xs",
|
|
1918
|
+
children: [m && /* @__PURE__ */ k(h, {
|
|
1919
|
+
tone: "info",
|
|
1920
|
+
className: "bg-card",
|
|
1921
|
+
children: E.gallery.primary
|
|
1922
|
+
}), /* @__PURE__ */ k(h, {
|
|
1923
|
+
tone: "secondary",
|
|
1924
|
+
className: "bg-card text-card-foreground",
|
|
1925
|
+
children: z(E.gallery.itemPosition, {
|
|
1926
|
+
index: i + 1,
|
|
1927
|
+
total: O
|
|
1928
|
+
})
|
|
1929
|
+
})]
|
|
1930
|
+
})]
|
|
1931
|
+
}), /* @__PURE__ */ k("div", {
|
|
1932
|
+
className: t("media-resource-gallery--item-body", v === "compact" ? "p-surface-xs" : "p-surface"),
|
|
1933
|
+
children: /* @__PURE__ */ A(o, {
|
|
1934
|
+
gap: "md",
|
|
1935
|
+
children: [/* @__PURE__ */ A("div", {
|
|
1936
|
+
className: "min-w-0",
|
|
1937
|
+
children: [/* @__PURE__ */ k(r, {
|
|
1938
|
+
tag: "div",
|
|
1939
|
+
weight: "semibold",
|
|
1940
|
+
className: "truncate",
|
|
1941
|
+
children: s
|
|
1942
|
+
}), /* @__PURE__ */ k(d, {
|
|
1943
|
+
value: D.getSize(e),
|
|
1944
|
+
size: "xs",
|
|
1945
|
+
align: "left",
|
|
1946
|
+
emptyLabel: E.unknownSize
|
|
1947
|
+
})]
|
|
1948
|
+
}), !y && /* @__PURE__ */ A("div", {
|
|
1949
|
+
className: "flex items-center gap-space-xs",
|
|
1950
|
+
children: [
|
|
1951
|
+
/* @__PURE__ */ k(n, {
|
|
1952
|
+
type: "button",
|
|
1953
|
+
tone: "secondary",
|
|
1954
|
+
buttonStyle: "ghost",
|
|
1955
|
+
size: "sm",
|
|
1956
|
+
iconOnly: !0,
|
|
1957
|
+
disabled: m,
|
|
1958
|
+
"aria-label": E.gallery.setPrimary,
|
|
1959
|
+
onClick: () => u?.(a, e),
|
|
1960
|
+
children: /* @__PURE__ */ k(L, { className: "size-icon-md" })
|
|
1961
|
+
}),
|
|
1962
|
+
/* @__PURE__ */ k(n, {
|
|
1963
|
+
type: "button",
|
|
1964
|
+
tone: "secondary",
|
|
1965
|
+
buttonStyle: "ghost",
|
|
1966
|
+
size: "sm",
|
|
1967
|
+
iconOnly: !0,
|
|
1968
|
+
disabled: !x,
|
|
1969
|
+
"aria-label": E.gallery.movePrevious,
|
|
1970
|
+
onClick: () => N(i, i - 1),
|
|
1971
|
+
children: /* @__PURE__ */ k(te, { className: "size-icon-md" })
|
|
1972
|
+
}),
|
|
1973
|
+
/* @__PURE__ */ k(n, {
|
|
1974
|
+
type: "button",
|
|
1975
|
+
tone: "secondary",
|
|
1976
|
+
buttonStyle: "ghost",
|
|
1977
|
+
size: "sm",
|
|
1978
|
+
iconOnly: !0,
|
|
1979
|
+
disabled: !C,
|
|
1980
|
+
"aria-label": E.gallery.moveNext,
|
|
1981
|
+
onClick: () => N(i, i + 1),
|
|
1982
|
+
children: /* @__PURE__ */ k(ne, { className: "size-icon-md" })
|
|
1983
|
+
}),
|
|
1984
|
+
/* @__PURE__ */ k(n, {
|
|
1985
|
+
type: "button",
|
|
1986
|
+
tone: "destructive",
|
|
1987
|
+
buttonStyle: "ghost",
|
|
1988
|
+
size: "sm",
|
|
1989
|
+
iconOnly: !0,
|
|
1990
|
+
className: "ml-auto",
|
|
1991
|
+
"aria-label": E.gallery.remove,
|
|
1992
|
+
onClick: () => f?.(a, e),
|
|
1993
|
+
children: /* @__PURE__ */ k(le, { className: "size-icon-md" })
|
|
1994
|
+
})
|
|
1995
|
+
]
|
|
1996
|
+
})]
|
|
1997
|
+
})
|
|
1998
|
+
})]
|
|
1999
|
+
}, a);
|
|
2000
|
+
}), oe()]
|
|
2001
|
+
})]
|
|
2002
|
+
});
|
|
2003
|
+
}
|
|
2004
|
+
//#endregion
|
|
2005
|
+
export { q as MediaLibrary, je as MediaLibraryCard, Ne as MediaLibraryDetailPanel, J as MediaLibraryDialog, ke as MediaLibraryEmptyState, Ie as MediaLibraryFooter, Me as MediaLibraryList, Ae as MediaLibraryToolbar, K as MediaLibraryUploadPanel, ze as MediaResourceGallery, pe as defaultMediaLibraryStrings, ve as formatMediaLibrarySize, z as formatMediaLibraryString, ye as getMediaLibraryDimensions, _e as resolveMediaLibraryAccessors, Ee as useMediaLibrary };
|
|
2006
|
+
|
|
2007
|
+
//# sourceMappingURL=media-library.js.map
|