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,3076 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { interpolateString as e, useStrings as t } from "../lib/strings.js";
|
|
3
|
+
import { t as n } from "../utils-C2EKeIw3.js";
|
|
4
|
+
import { n as r } from "../buttons-Co6GavvM.js";
|
|
5
|
+
import { a as i, r as a } from "../typography-Cv8MT-82.js";
|
|
6
|
+
import { r as o, t as s } from "../structure-BvW4vG4H.js";
|
|
7
|
+
import { r as c } from "../feedback-a9j9J-9A.js";
|
|
8
|
+
import { i as l, t as u } from "../overlays-DBqV0J_V.js";
|
|
9
|
+
import { _ as d, g as f } from "../primitives-DKPOGVpj.js";
|
|
10
|
+
import { n as p } from "../number-BNT_BIzJ.js";
|
|
11
|
+
import { t as m } from "../badge-BZXZT9wd.js";
|
|
12
|
+
import { t as h } from "../input-DMorJiTI.js";
|
|
13
|
+
import { d as g } from "../text-inputs-BhOcedTo.js";
|
|
14
|
+
import { n as _ } from "../display-ByI5tkqy.js";
|
|
15
|
+
import { t as v } from "../form-field-C6W-y2hR.js";
|
|
16
|
+
import { c as y, l as b, s as ee } from "../choice-inputs-CavA-SGV.js";
|
|
17
|
+
import { c as x, i as S, n as C, o as w, r as T, t as E, u as D } from "../item-pJ0GsOiJ.js";
|
|
18
|
+
import { c as O, i as k, n as te, o as A, s as j, t as M } from "../table-DnlAJ-xR.js";
|
|
19
|
+
import { g as N, l as P, n as ne } from "../data-display-b3d1TfL4.js";
|
|
20
|
+
import { O as re, f as ie } from "../table-ghtAQ-JJ.js";
|
|
21
|
+
import { Fragment as ae, useCallback as F, useId as oe, useMemo as I, useState as se } from "react";
|
|
22
|
+
import { Fragment as ce, jsx as L, jsxs as R } from "react/jsx-runtime";
|
|
23
|
+
import { ArrowLeft as le, ArrowRight as ue, Box as de, ChevronDown as fe, ClipboardCheck as z, Copy as pe, Eye as me, FileText as B, GripVertical as he, Layers3 as ge, ListChecks as _e, ListFilter as ve, PackageCheck as ye, Pencil as V, Plus as H, PlusCircle as U, ReceiptText as be, RefreshCw as xe, Save as Se, Search as W, ShieldCheck as Ce, SlidersHorizontal as G, Trash2 as K, X as q } from "lucide-react";
|
|
24
|
+
//#region src/components/features/products/products.strings.ts
|
|
25
|
+
var J = {
|
|
26
|
+
title: "Readiness",
|
|
27
|
+
description: "Publishing checks and operational setup.",
|
|
28
|
+
scoreLabel: "Overall readiness",
|
|
29
|
+
progressLabel: "Readiness progress",
|
|
30
|
+
createLabel: "Add check",
|
|
31
|
+
editLabel: "Edit check",
|
|
32
|
+
deleteLabel: "Delete check",
|
|
33
|
+
actionsLabel: "Check actions",
|
|
34
|
+
emptyTitle: "No readiness checks",
|
|
35
|
+
emptyDescription: "Pass readiness items from your product workflow to show progress.",
|
|
36
|
+
actionLabel: "Open"
|
|
37
|
+
}, we = {
|
|
38
|
+
title: "Structure",
|
|
39
|
+
description: "Media, taxonomy, options, and content coverage.",
|
|
40
|
+
createLabel: "Add metric",
|
|
41
|
+
viewLabel: "Open",
|
|
42
|
+
editLabel: "Edit metric",
|
|
43
|
+
deleteLabel: "Delete metric",
|
|
44
|
+
actionsLabel: "Metric actions",
|
|
45
|
+
emptyTitle: "No structure metrics",
|
|
46
|
+
emptyDescription: "Pass structure metrics to summarize the product setup."
|
|
47
|
+
}, Te = {
|
|
48
|
+
title: "Operations",
|
|
49
|
+
description: "Availability, channels, service rules, and fulfilment signals.",
|
|
50
|
+
createLabel: "Add signal",
|
|
51
|
+
editLabel: "Edit signal",
|
|
52
|
+
deleteLabel: "Delete signal",
|
|
53
|
+
actionsLabel: "Signal actions",
|
|
54
|
+
emptyTitle: "No operational signals",
|
|
55
|
+
emptyDescription: "Pass operational rows to show channel and availability health.",
|
|
56
|
+
actionLabel: "Open"
|
|
57
|
+
}, Y = {
|
|
58
|
+
title: "Product details",
|
|
59
|
+
description: "Core identity and catalogue fields.",
|
|
60
|
+
editLabel: "Edit details",
|
|
61
|
+
emptyTitle: "No details",
|
|
62
|
+
emptyDescription: "Pass metadata rows to render product details."
|
|
63
|
+
}, Ee = {
|
|
64
|
+
title: "Contract",
|
|
65
|
+
description: "Commercial terms, pricing rules, and customer-facing conditions.",
|
|
66
|
+
termsTitle: "Terms",
|
|
67
|
+
rulesTitle: "Rules",
|
|
68
|
+
actionLabel: "Manage contract",
|
|
69
|
+
editLabel: "Edit contract",
|
|
70
|
+
createRuleLabel: "Add rule",
|
|
71
|
+
viewRuleLabel: "Open rule",
|
|
72
|
+
editRuleLabel: "Edit rule",
|
|
73
|
+
deleteRuleLabel: "Delete rule",
|
|
74
|
+
ruleActionsLabel: "Rule actions",
|
|
75
|
+
emptyTitle: "No contract summary",
|
|
76
|
+
emptyDescription: "Pass metrics, terms, or rules to summarize the product contract."
|
|
77
|
+
}, X = {
|
|
78
|
+
title: "Options",
|
|
79
|
+
description: "Variant-driving choices and add-ons customers can select.",
|
|
80
|
+
manageLabel: "Manage options",
|
|
81
|
+
createLabel: "Add option",
|
|
82
|
+
viewLabel: "Open option",
|
|
83
|
+
editLabel: "Edit option",
|
|
84
|
+
deleteLabel: "Delete option",
|
|
85
|
+
actionsLabel: "Option actions",
|
|
86
|
+
emptyTitle: "No options",
|
|
87
|
+
emptyDescription: "Pass option groups to summarize configurable product choices."
|
|
88
|
+
}, Z = {
|
|
89
|
+
viewLabel: "Open option",
|
|
90
|
+
editLabel: "Edit option",
|
|
91
|
+
deleteLabel: "Delete option",
|
|
92
|
+
actionsLabel: "Option actions"
|
|
93
|
+
}, De = {
|
|
94
|
+
title: "Variant options",
|
|
95
|
+
description: "Define option groups and values before generating sellable variants.",
|
|
96
|
+
createLabel: "Add attribute",
|
|
97
|
+
editLabel: "Configure",
|
|
98
|
+
deleteLabel: "Delete option",
|
|
99
|
+
addValueLabel: "Add value",
|
|
100
|
+
addAnotherValueLabel: "Add another value",
|
|
101
|
+
addAnotherOptionLabel: "Add another option",
|
|
102
|
+
deleteValueLabel: "Delete value",
|
|
103
|
+
confirmDeleteOptionTitle: "Delete this option?",
|
|
104
|
+
confirmRemoveValuesTitle: "Save and remove these values?",
|
|
105
|
+
confirmRemoveValuesDescription: "Saving removes {count} value(s) from this option, and any variant built from them goes with it. This cannot be undone.",
|
|
106
|
+
confirmRemoveValuesLabel: "Save changes",
|
|
107
|
+
confirmDeleteOptionDescription: "Its values are removed from the product, and any variant built from them goes with it. This cannot be undone.",
|
|
108
|
+
doneLabel: "Done",
|
|
109
|
+
saveLabel: "Save",
|
|
110
|
+
cancelLabel: "Cancel",
|
|
111
|
+
expandOptionLabel: "Expand option",
|
|
112
|
+
collapseOptionLabel: "Collapse option",
|
|
113
|
+
actionsLabel: "Option actions",
|
|
114
|
+
optionNameLabel: "Option name",
|
|
115
|
+
optionValuesLabel: "Option values",
|
|
116
|
+
valuesLabel: "Values",
|
|
117
|
+
useForVariantsLabel: "Use for variants",
|
|
118
|
+
usedForVariantsLabel: "Used for variants",
|
|
119
|
+
notUsedForVariantsLabel: "Not used for variants",
|
|
120
|
+
emptyTitle: "No option groups",
|
|
121
|
+
emptyDescription: "Add options such as size, color, or packaging to create variant combinations.",
|
|
122
|
+
noValuesLabel: "No values"
|
|
123
|
+
}, Q = {
|
|
124
|
+
title: "Quote preview",
|
|
125
|
+
description: "How the product appears in a compact customer quote.",
|
|
126
|
+
subtotalLabel: "Subtotal",
|
|
127
|
+
taxLabel: "Tax",
|
|
128
|
+
discountLabel: "Discount",
|
|
129
|
+
totalLabel: "Total",
|
|
130
|
+
actionLabel: "Open quote",
|
|
131
|
+
createLineLabel: "Add line",
|
|
132
|
+
viewLineLabel: "Open line",
|
|
133
|
+
editLineLabel: "Edit line",
|
|
134
|
+
deleteLineLabel: "Delete line",
|
|
135
|
+
lineActionsLabel: "Line actions",
|
|
136
|
+
emptyTitle: "No quote lines",
|
|
137
|
+
emptyDescription: "Pass quote lines to preview pricing."
|
|
138
|
+
}, Oe = {
|
|
139
|
+
title: "Policies",
|
|
140
|
+
description: "Cancellation, booking, service, and customer-facing rules.",
|
|
141
|
+
createLabel: "Add policy",
|
|
142
|
+
viewLabel: "View",
|
|
143
|
+
editLabel: "Edit policy",
|
|
144
|
+
deleteLabel: "Delete policy",
|
|
145
|
+
actionsLabel: "Policy actions",
|
|
146
|
+
emptyTitle: "No policies",
|
|
147
|
+
emptyDescription: "Pass policies to summarize customer-facing rules."
|
|
148
|
+
}, ke = {
|
|
149
|
+
title: "Variants",
|
|
150
|
+
description: "Sellable combinations with price, availability, and SKU.",
|
|
151
|
+
createLabel: "Add variant",
|
|
152
|
+
viewLabel: "Open variant",
|
|
153
|
+
editLabel: "Edit",
|
|
154
|
+
duplicateLabel: "Duplicate",
|
|
155
|
+
deleteLabel: "Delete",
|
|
156
|
+
emptyTitle: "No variants",
|
|
157
|
+
emptyDescription: "Create or pass variants to show sellable rows.",
|
|
158
|
+
headers: {
|
|
159
|
+
variant: "Variant",
|
|
160
|
+
sku: "SKU",
|
|
161
|
+
price: "Price",
|
|
162
|
+
inventory: "Available",
|
|
163
|
+
channels: "Channels",
|
|
164
|
+
updated: "Updated",
|
|
165
|
+
actions: "Actions"
|
|
166
|
+
}
|
|
167
|
+
}, Ae = {
|
|
168
|
+
title: "Variants",
|
|
169
|
+
description: "Review generated combinations, select rows, and apply bulk operations.",
|
|
170
|
+
createLabel: "Add variant",
|
|
171
|
+
generateLabel: "Generate variants",
|
|
172
|
+
bulkEditLabel: "Bulk edit selected",
|
|
173
|
+
viewLabel: "Open variant",
|
|
174
|
+
editLabel: "Edit",
|
|
175
|
+
duplicateLabel: "Duplicate",
|
|
176
|
+
deleteLabel: "Delete",
|
|
177
|
+
bulkApplyLabel: "Apply changes",
|
|
178
|
+
bulkDeleteLabel: "Delete selected",
|
|
179
|
+
selectedLabel: (e, t) => `${e} of ${t} selected`,
|
|
180
|
+
groupCountLabel: (e) => `${e} ${e === 1 ? "variant" : "variants"}`,
|
|
181
|
+
clearSelectionLabel: "Clear",
|
|
182
|
+
selectAllLabel: "Select all variants",
|
|
183
|
+
selectRowLabel: (e) => `Select row ${e + 1}`,
|
|
184
|
+
emptyTitle: "No variants",
|
|
185
|
+
emptyDescription: "Generate variants from option groups or pass sellable rows from the app.",
|
|
186
|
+
headers: {
|
|
187
|
+
variant: "Variant",
|
|
188
|
+
price: "Price",
|
|
189
|
+
inventory: "Available",
|
|
190
|
+
sku: "SKU",
|
|
191
|
+
status: "Status",
|
|
192
|
+
updated: "Updated",
|
|
193
|
+
actions: "Actions"
|
|
194
|
+
}
|
|
195
|
+
}, je = {
|
|
196
|
+
title: "Variants",
|
|
197
|
+
description: "Configure option groups first, then manage the generated sellable variants.",
|
|
198
|
+
optionsTitle: "Variant options",
|
|
199
|
+
variantsTitle: "Variants",
|
|
200
|
+
groupByLabel: "Group by",
|
|
201
|
+
searchLabel: "Search variants",
|
|
202
|
+
filterLabel: "Filter variants",
|
|
203
|
+
generateLabel: "Generate variants",
|
|
204
|
+
createVariantLabel: "Add variant",
|
|
205
|
+
actionsLabel: "Variant manager actions"
|
|
206
|
+
}, Me = {
|
|
207
|
+
viewLabel: "Open variant",
|
|
208
|
+
editLabel: "Edit",
|
|
209
|
+
duplicateLabel: "Duplicate",
|
|
210
|
+
deleteLabel: "Delete",
|
|
211
|
+
actionsLabel: "Variant actions"
|
|
212
|
+
}, Ne = {
|
|
213
|
+
title: "Variant",
|
|
214
|
+
description: "Sellable variant details, options, pricing, and fulfilment data.",
|
|
215
|
+
backLabel: "Back",
|
|
216
|
+
factsTitle: "Variant facts",
|
|
217
|
+
selectedOptionsTitle: "Selected options",
|
|
218
|
+
relatedOptionsTitle: "Option groups",
|
|
219
|
+
viewOptionLabel: "Open option",
|
|
220
|
+
emptyTitle: "No variant selected",
|
|
221
|
+
emptyDescription: "Pass a variant to render a standalone variant detail surface.",
|
|
222
|
+
metadata: {
|
|
223
|
+
price: "Price",
|
|
224
|
+
inventory: "Available",
|
|
225
|
+
sku: "SKU",
|
|
226
|
+
channels: "Channels",
|
|
227
|
+
updated: "Updated"
|
|
228
|
+
}
|
|
229
|
+
}, Pe = {
|
|
230
|
+
title: "Edit variant",
|
|
231
|
+
description: "Controlled form for variant identity, pricing, inventory, and option values.",
|
|
232
|
+
identityTitle: "Identity",
|
|
233
|
+
commercialTitle: "Commercial setup",
|
|
234
|
+
optionsTitle: "Options",
|
|
235
|
+
saveLabel: "Save variant",
|
|
236
|
+
savingLabel: "Saving",
|
|
237
|
+
cancelLabel: "Cancel",
|
|
238
|
+
deleteLabel: "Delete variant",
|
|
239
|
+
statusPlaceholder: "Select status",
|
|
240
|
+
optionPlaceholder: "Select value",
|
|
241
|
+
fields: {
|
|
242
|
+
name: "Name",
|
|
243
|
+
description: "Description",
|
|
244
|
+
sku: "SKU",
|
|
245
|
+
price: "Price",
|
|
246
|
+
inventory: "Inventory",
|
|
247
|
+
status: "Status",
|
|
248
|
+
channels: "Channels"
|
|
249
|
+
},
|
|
250
|
+
placeholders: {
|
|
251
|
+
name: "750 ml bottle",
|
|
252
|
+
description: "Standard retail pack",
|
|
253
|
+
sku: "BAL-750-CL",
|
|
254
|
+
price: "US$ 24.00",
|
|
255
|
+
inventory: "82",
|
|
256
|
+
status: "Active",
|
|
257
|
+
channels: "Online store, POS"
|
|
258
|
+
}
|
|
259
|
+
}, Fe = {
|
|
260
|
+
mainLabel: "Product overview",
|
|
261
|
+
railLabel: "Product supporting information"
|
|
262
|
+
};
|
|
263
|
+
//#endregion
|
|
264
|
+
//#region src/components/features/products/partials/product-empty-state.tsx
|
|
265
|
+
function $({ title: e, description: t, action: r, className: i }) {
|
|
266
|
+
return /* @__PURE__ */ L(P, {
|
|
267
|
+
padding: "md",
|
|
268
|
+
border: !0,
|
|
269
|
+
title: e,
|
|
270
|
+
description: t,
|
|
271
|
+
actions: r,
|
|
272
|
+
className: n("product-empty-state--component bg-muted/20", i)
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
//#endregion
|
|
276
|
+
//#region src/components/features/products/partials/product-tone.tsx
|
|
277
|
+
var Ie = {
|
|
278
|
+
neutral: "secondary",
|
|
279
|
+
primary: "primary",
|
|
280
|
+
success: "success",
|
|
281
|
+
warning: "warning",
|
|
282
|
+
destructive: "destructive",
|
|
283
|
+
info: "info"
|
|
284
|
+
}, Le = {
|
|
285
|
+
neutral: "border-border bg-card text-muted-foreground",
|
|
286
|
+
primary: "border-primary-accent/20 bg-primary/5 text-primary-accent",
|
|
287
|
+
success: "border-success/20 bg-success/5 text-success",
|
|
288
|
+
warning: "border-warning/30 bg-warning/8 text-warning",
|
|
289
|
+
destructive: "border-destructive/25 bg-destructive/8 text-destructive",
|
|
290
|
+
info: "border-info/20 bg-info/5 text-info"
|
|
291
|
+
};
|
|
292
|
+
function Re(e) {
|
|
293
|
+
return Number.isFinite(e) ? Math.min(100, Math.max(0, Math.round(e))) : 0;
|
|
294
|
+
}
|
|
295
|
+
function ze({ tone: e = "neutral" }) {
|
|
296
|
+
return /* @__PURE__ */ L("span", {
|
|
297
|
+
"aria-hidden": "true",
|
|
298
|
+
className: n("product-tone-dot--component size-2 rounded-full", {
|
|
299
|
+
"bg-muted-foreground": e === "neutral",
|
|
300
|
+
"bg-primary": e === "primary",
|
|
301
|
+
"bg-success": e === "success",
|
|
302
|
+
"bg-warning": e === "warning",
|
|
303
|
+
"bg-destructive": e === "destructive",
|
|
304
|
+
"bg-info": e === "info"
|
|
305
|
+
})
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
//#endregion
|
|
309
|
+
//#region src/components/features/products/partials/product-metric-tile.tsx
|
|
310
|
+
function Be({ metric: e }) {
|
|
311
|
+
let t = e.tone ?? "neutral";
|
|
312
|
+
return /* @__PURE__ */ R("div", {
|
|
313
|
+
className: n("border-border product-metric-tile--component rounded-radius-md border p-surface-xs", Le[t]),
|
|
314
|
+
children: [/* @__PURE__ */ R(s, {
|
|
315
|
+
direction: "horizontal",
|
|
316
|
+
align: "start",
|
|
317
|
+
justify: "between",
|
|
318
|
+
gap: "md",
|
|
319
|
+
children: [/* @__PURE__ */ R(s, {
|
|
320
|
+
gap: "2xs",
|
|
321
|
+
className: "min-w-0",
|
|
322
|
+
children: [/* @__PURE__ */ L(i, {
|
|
323
|
+
size: "xs",
|
|
324
|
+
type: t === "neutral" ? "secondary" : "main",
|
|
325
|
+
className: "truncate",
|
|
326
|
+
children: e.label
|
|
327
|
+
}), /* @__PURE__ */ L(d, {
|
|
328
|
+
weight: "semibold",
|
|
329
|
+
className: "tabular-nums",
|
|
330
|
+
children: e.value
|
|
331
|
+
})]
|
|
332
|
+
}), "icon" in e && !!e.icon && /* @__PURE__ */ L("div", {
|
|
333
|
+
className: "shrink-0 opacity-80",
|
|
334
|
+
children: e.icon
|
|
335
|
+
})]
|
|
336
|
+
}), !!e.description && /* @__PURE__ */ L(i, {
|
|
337
|
+
size: "xs",
|
|
338
|
+
type: "secondary",
|
|
339
|
+
className: "mt-1.5 leading-snug",
|
|
340
|
+
children: e.description
|
|
341
|
+
})]
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
//#endregion
|
|
345
|
+
//#region src/components/features/products/partials/product-actions.tsx
|
|
346
|
+
function Ve({ item: e, actions: t, menuLabel: r, className: i }) {
|
|
347
|
+
return t.length === 0 ? null : /* @__PURE__ */ L("div", {
|
|
348
|
+
className: n("product-row-actions--component flex justify-end", i),
|
|
349
|
+
children: /* @__PURE__ */ L(re, {
|
|
350
|
+
row: e,
|
|
351
|
+
actions: t,
|
|
352
|
+
menuLabel: r,
|
|
353
|
+
displayMode: "menu"
|
|
354
|
+
})
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
//#endregion
|
|
358
|
+
//#region src/components/features/products/partials/product-rows.tsx
|
|
359
|
+
var He = "min-w-0 basis-48", Ue = "line-clamp-none break-words overflow-visible";
|
|
360
|
+
function We({ metric: e, actions: t }) {
|
|
361
|
+
let r = e.tone ?? "neutral";
|
|
362
|
+
return /* @__PURE__ */ R(E, {
|
|
363
|
+
className: "product-structure-metric-row--component product-structure-card--item",
|
|
364
|
+
children: [
|
|
365
|
+
/* @__PURE__ */ L(x, {
|
|
366
|
+
variant: "icon",
|
|
367
|
+
className: n("border-border rounded-full border", Le[r]),
|
|
368
|
+
children: e.icon ?? /* @__PURE__ */ L(ze, { tone: r })
|
|
369
|
+
}),
|
|
370
|
+
/* @__PURE__ */ R(T, {
|
|
371
|
+
className: He,
|
|
372
|
+
children: [/* @__PURE__ */ L(D, {
|
|
373
|
+
className: Ue,
|
|
374
|
+
children: e.label
|
|
375
|
+
}), !!e.description && /* @__PURE__ */ L(S, {
|
|
376
|
+
clamp: 2,
|
|
377
|
+
children: e.description
|
|
378
|
+
})]
|
|
379
|
+
}),
|
|
380
|
+
/* @__PURE__ */ R(C, {
|
|
381
|
+
className: "ml-auto shrink-0 gap-space-md",
|
|
382
|
+
children: [/* @__PURE__ */ L(d, {
|
|
383
|
+
weight: "semibold",
|
|
384
|
+
className: "tabular-nums",
|
|
385
|
+
children: e.value
|
|
386
|
+
}), t]
|
|
387
|
+
})
|
|
388
|
+
]
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
function Ge({ item: e, actionFallback: t, onSelect: i, actions: a }) {
|
|
392
|
+
let o = e.tone ?? (e.completed ? "success" : "neutral"), s = e.onSelect ?? i;
|
|
393
|
+
return /* @__PURE__ */ R(E, {
|
|
394
|
+
className: "product-readiness-row--component product-readiness-card--item",
|
|
395
|
+
children: [
|
|
396
|
+
/* @__PURE__ */ L(x, {
|
|
397
|
+
variant: "icon",
|
|
398
|
+
className: n("border-border rounded-full border", Le[o]),
|
|
399
|
+
children: /* @__PURE__ */ L(ze, { tone: o })
|
|
400
|
+
}),
|
|
401
|
+
/* @__PURE__ */ R(T, {
|
|
402
|
+
className: He,
|
|
403
|
+
children: [/* @__PURE__ */ L(D, {
|
|
404
|
+
className: Ue,
|
|
405
|
+
children: e.label
|
|
406
|
+
}), !!e.description && /* @__PURE__ */ L(S, {
|
|
407
|
+
clamp: 2,
|
|
408
|
+
children: e.description
|
|
409
|
+
})]
|
|
410
|
+
}),
|
|
411
|
+
!!(e.value || s || a) && /* @__PURE__ */ R(C, {
|
|
412
|
+
className: "ml-auto shrink-0 flex-wrap justify-end gap-space-md",
|
|
413
|
+
children: [
|
|
414
|
+
!!e.value && /* @__PURE__ */ L(m, {
|
|
415
|
+
tone: Ie[o],
|
|
416
|
+
children: e.value
|
|
417
|
+
}),
|
|
418
|
+
!!s && /* @__PURE__ */ L(r, {
|
|
419
|
+
type: "button",
|
|
420
|
+
tone: "secondary",
|
|
421
|
+
buttonStyle: "ghost",
|
|
422
|
+
onClick: s,
|
|
423
|
+
icon: ue,
|
|
424
|
+
iconPosition: "right",
|
|
425
|
+
children: e.actionLabel ?? t
|
|
426
|
+
}),
|
|
427
|
+
a
|
|
428
|
+
]
|
|
429
|
+
})
|
|
430
|
+
]
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
function Ke({ item: e, actionFallback: t, onSelect: a, actions: o }) {
|
|
434
|
+
let s = e.tone ?? "neutral", c = e.onSelect ?? a;
|
|
435
|
+
return /* @__PURE__ */ R(E, {
|
|
436
|
+
className: "product-operation-row--component product-operations-card--item",
|
|
437
|
+
children: [
|
|
438
|
+
/* @__PURE__ */ L(x, {
|
|
439
|
+
variant: "icon",
|
|
440
|
+
className: n("border-border rounded-full border", Le[s]),
|
|
441
|
+
children: /* @__PURE__ */ L(ze, { tone: s })
|
|
442
|
+
}),
|
|
443
|
+
/* @__PURE__ */ R(T, {
|
|
444
|
+
className: He,
|
|
445
|
+
children: [/* @__PURE__ */ L(D, {
|
|
446
|
+
className: Ue,
|
|
447
|
+
children: e.label
|
|
448
|
+
}), !!e.description && /* @__PURE__ */ L(S, {
|
|
449
|
+
clamp: 2,
|
|
450
|
+
children: e.description
|
|
451
|
+
})]
|
|
452
|
+
}),
|
|
453
|
+
!!(e.value || c || o) && /* @__PURE__ */ R(C, {
|
|
454
|
+
className: "ml-auto shrink-0 flex-wrap justify-end gap-space-md",
|
|
455
|
+
children: [
|
|
456
|
+
!!e.value && /* @__PURE__ */ L(i, {
|
|
457
|
+
tag: "span",
|
|
458
|
+
weight: "semibold",
|
|
459
|
+
children: e.value
|
|
460
|
+
}),
|
|
461
|
+
!!c && /* @__PURE__ */ L(r, {
|
|
462
|
+
type: "button",
|
|
463
|
+
tone: "secondary",
|
|
464
|
+
buttonStyle: "ghost",
|
|
465
|
+
onClick: c,
|
|
466
|
+
icon: ue,
|
|
467
|
+
iconPosition: "right",
|
|
468
|
+
children: e.actionLabel ?? t
|
|
469
|
+
}),
|
|
470
|
+
o
|
|
471
|
+
]
|
|
472
|
+
})
|
|
473
|
+
]
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
function qe({ item: e, actionLabel: t, onSelect: a, actions: o }) {
|
|
477
|
+
let s = e.tone ?? "neutral", c = "values" in e ? e.values : void 0;
|
|
478
|
+
return /* @__PURE__ */ R(E, {
|
|
479
|
+
className: "product-summary-row--component",
|
|
480
|
+
children: [
|
|
481
|
+
/* @__PURE__ */ L(x, {
|
|
482
|
+
variant: "icon",
|
|
483
|
+
className: n("border-border rounded-full border", Le[s]),
|
|
484
|
+
children: /* @__PURE__ */ L(ze, { tone: s })
|
|
485
|
+
}),
|
|
486
|
+
/* @__PURE__ */ R(T, {
|
|
487
|
+
className: He,
|
|
488
|
+
children: [
|
|
489
|
+
/* @__PURE__ */ L(D, {
|
|
490
|
+
className: Ue,
|
|
491
|
+
children: e.label
|
|
492
|
+
}),
|
|
493
|
+
!!e.description && /* @__PURE__ */ L(S, {
|
|
494
|
+
clamp: 2,
|
|
495
|
+
children: e.description
|
|
496
|
+
}),
|
|
497
|
+
!!c?.length && /* @__PURE__ */ L("div", {
|
|
498
|
+
className: "mt-space-md flex flex-wrap gap-space-xs",
|
|
499
|
+
children: c.map((e, t) => /* @__PURE__ */ L(m, {
|
|
500
|
+
tone: "secondary",
|
|
501
|
+
children: e
|
|
502
|
+
}, t))
|
|
503
|
+
})
|
|
504
|
+
]
|
|
505
|
+
}),
|
|
506
|
+
!!(e.value || e.badge || a || o) && /* @__PURE__ */ R(C, {
|
|
507
|
+
className: "ml-auto shrink-0 flex-wrap justify-end gap-space-md",
|
|
508
|
+
children: [
|
|
509
|
+
!!e.value && /* @__PURE__ */ L(i, {
|
|
510
|
+
tag: "span",
|
|
511
|
+
weight: "semibold",
|
|
512
|
+
children: e.value
|
|
513
|
+
}),
|
|
514
|
+
!!e.badge && e.badge,
|
|
515
|
+
!!a && /* @__PURE__ */ L(r, {
|
|
516
|
+
type: "button",
|
|
517
|
+
tone: "secondary",
|
|
518
|
+
buttonStyle: "ghost",
|
|
519
|
+
onClick: a,
|
|
520
|
+
icon: ue,
|
|
521
|
+
iconPosition: "right",
|
|
522
|
+
children: t
|
|
523
|
+
}),
|
|
524
|
+
o
|
|
525
|
+
]
|
|
526
|
+
})
|
|
527
|
+
]
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
//#endregion
|
|
531
|
+
//#region src/components/features/products/components/product-contract-overview.tsx
|
|
532
|
+
function Je({ metrics: e = [], terms: a = [], rules: c = [], onOpenContract: l, onEditContract: u, onCreateRule: d, onSelectRule: f, onEditRule: p, onDeleteRule: m, renderRuleActions: h, actions: g, footerSlot: v, empty: y, className: b, strings: ee }) {
|
|
533
|
+
let x = t(Ee, ee), S = e.length > 0 || a.length > 0 || c.length > 0, C = l || u || d ? /* @__PURE__ */ R("div", {
|
|
534
|
+
className: "flex items-center gap-space-md",
|
|
535
|
+
children: [
|
|
536
|
+
!!d && /* @__PURE__ */ L(r, {
|
|
537
|
+
type: "button",
|
|
538
|
+
tone: "secondary",
|
|
539
|
+
buttonStyle: "ghost",
|
|
540
|
+
onClick: d,
|
|
541
|
+
icon: H,
|
|
542
|
+
children: x.createRuleLabel
|
|
543
|
+
}),
|
|
544
|
+
!!u && /* @__PURE__ */ L(r, {
|
|
545
|
+
type: "button",
|
|
546
|
+
tone: "secondary",
|
|
547
|
+
buttonStyle: "ghost",
|
|
548
|
+
onClick: u,
|
|
549
|
+
icon: V,
|
|
550
|
+
children: x.editLabel
|
|
551
|
+
}),
|
|
552
|
+
!!l && /* @__PURE__ */ L(r, {
|
|
553
|
+
type: "button",
|
|
554
|
+
tone: "secondary",
|
|
555
|
+
buttonStyle: "ghost",
|
|
556
|
+
onClick: l,
|
|
557
|
+
icon: ue,
|
|
558
|
+
iconPosition: "right",
|
|
559
|
+
children: x.actionLabel
|
|
560
|
+
})
|
|
561
|
+
]
|
|
562
|
+
}) : void 0;
|
|
563
|
+
return /* @__PURE__ */ L(_, {
|
|
564
|
+
icon: /* @__PURE__ */ L(B, { className: "size-icon" }),
|
|
565
|
+
title: x.title,
|
|
566
|
+
description: x.description,
|
|
567
|
+
actions: g,
|
|
568
|
+
headerAction: C,
|
|
569
|
+
footerSlot: v,
|
|
570
|
+
contentClassName: "mt-1",
|
|
571
|
+
className: n("product-contract-overview--component w-full", b),
|
|
572
|
+
children: S ? /* @__PURE__ */ R(s, {
|
|
573
|
+
gap: "xl",
|
|
574
|
+
children: [
|
|
575
|
+
e.length > 0 && /* @__PURE__ */ L(o, {
|
|
576
|
+
columns: {
|
|
577
|
+
base: 1,
|
|
578
|
+
sm: 3
|
|
579
|
+
},
|
|
580
|
+
gap: "md",
|
|
581
|
+
children: e.map((e) => /* @__PURE__ */ L(Be, { metric: e }, e.id))
|
|
582
|
+
}),
|
|
583
|
+
a.length > 0 && /* @__PURE__ */ R(s, {
|
|
584
|
+
gap: "md",
|
|
585
|
+
children: [/* @__PURE__ */ L(i, {
|
|
586
|
+
weight: "semibold",
|
|
587
|
+
children: x.termsTitle
|
|
588
|
+
}), /* @__PURE__ */ L(ne, {
|
|
589
|
+
items: a,
|
|
590
|
+
columns: 2,
|
|
591
|
+
density: "compact"
|
|
592
|
+
})]
|
|
593
|
+
}),
|
|
594
|
+
c.length > 0 && /* @__PURE__ */ R(s, {
|
|
595
|
+
gap: "md",
|
|
596
|
+
children: [/* @__PURE__ */ L(i, {
|
|
597
|
+
weight: "semibold",
|
|
598
|
+
children: x.rulesTitle
|
|
599
|
+
}), /* @__PURE__ */ L(w, { children: c.map((e, t) => {
|
|
600
|
+
let n = f ? () => f(e) : void 0, r = p ? () => p(e) : void 0, i = m ? () => m(e) : void 0, a = [
|
|
601
|
+
...n ? [{
|
|
602
|
+
id: "open",
|
|
603
|
+
label: x.viewRuleLabel,
|
|
604
|
+
icon: /* @__PURE__ */ L(me, { className: "size-icon-md" }),
|
|
605
|
+
onClick: () => n(),
|
|
606
|
+
tone: "secondary",
|
|
607
|
+
buttonStyle: "ghost"
|
|
608
|
+
}] : [],
|
|
609
|
+
...r ? [{
|
|
610
|
+
id: "edit",
|
|
611
|
+
label: x.editRuleLabel,
|
|
612
|
+
icon: /* @__PURE__ */ L(V, { className: "size-icon-md" }),
|
|
613
|
+
onClick: () => r(),
|
|
614
|
+
tone: "secondary",
|
|
615
|
+
buttonStyle: "ghost"
|
|
616
|
+
}] : [],
|
|
617
|
+
...i ? [{
|
|
618
|
+
id: "delete",
|
|
619
|
+
label: x.deleteRuleLabel,
|
|
620
|
+
icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
|
|
621
|
+
onClick: () => i(),
|
|
622
|
+
tone: "destructive"
|
|
623
|
+
}] : []
|
|
624
|
+
], o = h ? h(e, {
|
|
625
|
+
index: t,
|
|
626
|
+
onSelect: n,
|
|
627
|
+
onEdit: r,
|
|
628
|
+
onDelete: i
|
|
629
|
+
}) : /* @__PURE__ */ L(Ve, {
|
|
630
|
+
item: e,
|
|
631
|
+
actions: a,
|
|
632
|
+
menuLabel: x.ruleActionsLabel
|
|
633
|
+
});
|
|
634
|
+
return /* @__PURE__ */ L(qe, {
|
|
635
|
+
item: e,
|
|
636
|
+
actions: o
|
|
637
|
+
}, e.id);
|
|
638
|
+
}) })]
|
|
639
|
+
})
|
|
640
|
+
]
|
|
641
|
+
}) : y ?? /* @__PURE__ */ L($, {
|
|
642
|
+
title: x.emptyTitle,
|
|
643
|
+
description: x.emptyDescription,
|
|
644
|
+
action: d ? /* @__PURE__ */ L(r, {
|
|
645
|
+
type: "button",
|
|
646
|
+
onClick: d,
|
|
647
|
+
icon: H,
|
|
648
|
+
children: x.createRuleLabel
|
|
649
|
+
}) : void 0
|
|
650
|
+
})
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
Je.displayName = "ProductContractOverview";
|
|
654
|
+
//#endregion
|
|
655
|
+
//#region src/components/features/products/components/product-details-card.tsx
|
|
656
|
+
function Ye({ title: e, description: i, metadata: a = [], media: o, onEditDetails: s, actions: c, headerEnd: l, footerSlot: u, empty: d, className: f, strings: p }) {
|
|
657
|
+
let m = t(Y, p), h = s ? /* @__PURE__ */ L(r, {
|
|
658
|
+
type: "button",
|
|
659
|
+
tone: "secondary",
|
|
660
|
+
buttonStyle: "ghost",
|
|
661
|
+
onClick: s,
|
|
662
|
+
icon: V,
|
|
663
|
+
children: m.editLabel
|
|
664
|
+
}) : void 0;
|
|
665
|
+
return /* @__PURE__ */ L(_, {
|
|
666
|
+
icon: /* @__PURE__ */ L(de, { className: "size-icon" }),
|
|
667
|
+
title: e ?? m.title,
|
|
668
|
+
description: i === !1 ? void 0 : i ?? m.description,
|
|
669
|
+
actions: c,
|
|
670
|
+
headerAction: h,
|
|
671
|
+
headerEnd: l,
|
|
672
|
+
footerSlot: u,
|
|
673
|
+
contentClassName: "mt-1",
|
|
674
|
+
className: n("product-details-card--component w-full", f),
|
|
675
|
+
children: a.length === 0 ? d ?? /* @__PURE__ */ L($, {
|
|
676
|
+
title: m.emptyTitle,
|
|
677
|
+
description: m.emptyDescription
|
|
678
|
+
}) : /* @__PURE__ */ L("div", {
|
|
679
|
+
className: "@container/product-details",
|
|
680
|
+
children: /* @__PURE__ */ R("div", {
|
|
681
|
+
className: n("grid min-w-0 grid-cols-1 gap-space-xl", o && "@xl/product-details:grid-cols-[12rem_minmax(0,1fr)]"),
|
|
682
|
+
children: [!!o && /* @__PURE__ */ L("div", {
|
|
683
|
+
className: "product-details-card--media overflow-hidden rounded-radius-md border border-border bg-muted/30",
|
|
684
|
+
children: o
|
|
685
|
+
}), /* @__PURE__ */ L(ne, {
|
|
686
|
+
items: a,
|
|
687
|
+
columns: o ? 1 : 2,
|
|
688
|
+
density: "compact",
|
|
689
|
+
className: "min-w-0 [&_.metadata-list--value]:break-words"
|
|
690
|
+
})]
|
|
691
|
+
})
|
|
692
|
+
})
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
Ye.displayName = "ProductDetailsCard";
|
|
696
|
+
//#endregion
|
|
697
|
+
//#region src/components/features/products/components/product-option-action-menu.tsx
|
|
698
|
+
function Xe({ option: e, index: r = 0, onSelectOption: i, onEditOption: a, onDeleteOption: o, renderOptionActions: s, menuLabel: c, className: l, strings: u }) {
|
|
699
|
+
let d = t(Z, u), f = i ? () => i(e) : void 0, p = a ? () => a(e) : void 0, m = o ? () => o(e) : void 0;
|
|
700
|
+
return f || p || m || s ? s ? /* @__PURE__ */ L("div", {
|
|
701
|
+
className: n("product-option-action-menu--component flex justify-end", l),
|
|
702
|
+
children: s(e, {
|
|
703
|
+
index: r,
|
|
704
|
+
onSelect: f,
|
|
705
|
+
onEdit: p,
|
|
706
|
+
onDelete: m
|
|
707
|
+
})
|
|
708
|
+
}) : /* @__PURE__ */ L(Ve, {
|
|
709
|
+
item: e,
|
|
710
|
+
menuLabel: c ?? d.actionsLabel,
|
|
711
|
+
className: n("product-option-action-menu--component", l),
|
|
712
|
+
actions: [
|
|
713
|
+
...f ? [{
|
|
714
|
+
id: "open",
|
|
715
|
+
label: d.viewLabel,
|
|
716
|
+
icon: /* @__PURE__ */ L(me, { className: "size-icon-md" }),
|
|
717
|
+
onClick: () => f(),
|
|
718
|
+
tone: "secondary",
|
|
719
|
+
buttonStyle: "ghost"
|
|
720
|
+
}] : [],
|
|
721
|
+
...p ? [{
|
|
722
|
+
id: "edit",
|
|
723
|
+
label: d.editLabel,
|
|
724
|
+
icon: /* @__PURE__ */ L(V, { className: "size-icon-md" }),
|
|
725
|
+
onClick: () => p(),
|
|
726
|
+
tone: "secondary",
|
|
727
|
+
buttonStyle: "ghost"
|
|
728
|
+
}] : [],
|
|
729
|
+
...m ? [{
|
|
730
|
+
id: "delete",
|
|
731
|
+
label: d.deleteLabel,
|
|
732
|
+
icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
|
|
733
|
+
onClick: () => m(),
|
|
734
|
+
tone: "destructive"
|
|
735
|
+
}] : []
|
|
736
|
+
]
|
|
737
|
+
}) : null;
|
|
738
|
+
}
|
|
739
|
+
Xe.displayName = "ProductOptionActionMenu";
|
|
740
|
+
//#endregion
|
|
741
|
+
//#region src/components/features/products/components/product-operations-card.tsx
|
|
742
|
+
function Ze({ items: e = [], onCreateOperation: i, onSelectOperation: a, onEditOperation: o, onDeleteOperation: s, renderOperationActions: c, actions: l, footerSlot: u, renderItem: d, empty: f, className: p, strings: m }) {
|
|
743
|
+
let h = t(Te, m), g = i ? /* @__PURE__ */ L(r, {
|
|
744
|
+
type: "button",
|
|
745
|
+
tone: "secondary",
|
|
746
|
+
buttonStyle: "ghost",
|
|
747
|
+
onClick: i,
|
|
748
|
+
icon: H,
|
|
749
|
+
children: h.createLabel
|
|
750
|
+
}) : void 0;
|
|
751
|
+
return /* @__PURE__ */ L(_, {
|
|
752
|
+
icon: /* @__PURE__ */ L(ye, { className: "size-icon" }),
|
|
753
|
+
title: h.title,
|
|
754
|
+
description: h.description,
|
|
755
|
+
actions: l,
|
|
756
|
+
headerAction: g,
|
|
757
|
+
footerSlot: u,
|
|
758
|
+
contentClassName: "mt-1",
|
|
759
|
+
className: n("product-operations-card--component w-full", p),
|
|
760
|
+
children: e.length === 0 ? f ?? /* @__PURE__ */ L($, {
|
|
761
|
+
title: h.emptyTitle,
|
|
762
|
+
description: h.emptyDescription,
|
|
763
|
+
action: i ? /* @__PURE__ */ L(r, {
|
|
764
|
+
type: "button",
|
|
765
|
+
onClick: i,
|
|
766
|
+
icon: H,
|
|
767
|
+
children: h.createLabel
|
|
768
|
+
}) : void 0
|
|
769
|
+
}) : /* @__PURE__ */ L(w, { children: e.map((e, t) => {
|
|
770
|
+
let n = a ? () => a(e) : void 0, r = o ? () => o(e) : void 0, i = s ? () => s(e) : void 0, l = [...r ? [{
|
|
771
|
+
id: "edit",
|
|
772
|
+
label: h.editLabel,
|
|
773
|
+
icon: /* @__PURE__ */ L(V, { className: "size-icon-md" }),
|
|
774
|
+
onClick: () => r(),
|
|
775
|
+
tone: "secondary",
|
|
776
|
+
buttonStyle: "ghost"
|
|
777
|
+
}] : [], ...i ? [{
|
|
778
|
+
id: "delete",
|
|
779
|
+
label: h.deleteLabel,
|
|
780
|
+
icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
|
|
781
|
+
onClick: () => i(),
|
|
782
|
+
tone: "destructive"
|
|
783
|
+
}] : []], u = c ? c(e, {
|
|
784
|
+
index: t,
|
|
785
|
+
onSelect: n,
|
|
786
|
+
onEdit: r,
|
|
787
|
+
onDelete: i
|
|
788
|
+
}) : /* @__PURE__ */ L(Ve, {
|
|
789
|
+
item: e,
|
|
790
|
+
actions: l,
|
|
791
|
+
menuLabel: h.actionsLabel
|
|
792
|
+
});
|
|
793
|
+
return d ? /* @__PURE__ */ L("div", { children: d(e, t) }, e.id) : /* @__PURE__ */ L(Ke, {
|
|
794
|
+
item: e,
|
|
795
|
+
actionFallback: h.actionLabel,
|
|
796
|
+
onSelect: n,
|
|
797
|
+
actions: u
|
|
798
|
+
}, e.id);
|
|
799
|
+
}) })
|
|
800
|
+
});
|
|
801
|
+
}
|
|
802
|
+
Ze.displayName = "ProductOperationsCard";
|
|
803
|
+
//#endregion
|
|
804
|
+
//#region src/components/features/products/components/product-options-matrix.tsx
|
|
805
|
+
function Qe(e) {
|
|
806
|
+
return typeof e == "string" || typeof e == "number" ? String(e) : "";
|
|
807
|
+
}
|
|
808
|
+
function $e(e) {
|
|
809
|
+
return typeof e == "string" || typeof e == "number" || typeof e == "bigint";
|
|
810
|
+
}
|
|
811
|
+
function et(e, t) {
|
|
812
|
+
let n = Qe(t.name);
|
|
813
|
+
return n ? `${e}: ${n}` : e;
|
|
814
|
+
}
|
|
815
|
+
function tt(e) {
|
|
816
|
+
return {
|
|
817
|
+
name: Qe(e.name),
|
|
818
|
+
values: (e.values ?? []).map((e) => ({
|
|
819
|
+
...e,
|
|
820
|
+
label: Qe(e.label)
|
|
821
|
+
}))
|
|
822
|
+
};
|
|
823
|
+
}
|
|
824
|
+
function nt({ optionGroups: a = [], surface: o = "card", collapsedOptionIds: c, defaultCollapsedOptionIds: d = [], onCollapsedOptionIdsChange: f, editingOptionId: p, defaultEditingOptionId: m, onEditingOptionIdChange: g, onCreateOption: y, onEditOption: b, onDeleteOption: x, confirmDelete: S, onAddValue: C, onDeleteValue: w, onOptionNameChange: T, onValueLabelChange: E, onDoneEditingOption: D, onSaveEditingOption: O, onCancelEditingOption: k, onToggleUsedForVariants: te, renderOptionActions: A, renderValue: j, showHeader: M, showCollapseControls: N = !0, showInlineActions: P = !0, showVariantToggle: ne = !0, actions: re, headerEnd: ie, footerSlot: oe, empty: le, className: ue, strings: de }) {
|
|
825
|
+
let z = t(De, de), pe = c !== void 0, [me, B] = se(d), ge = pe ? c : me, _e = I(() => new Set(ge), [ge]), ve = p !== void 0 || m !== void 0 || !!g || !!T || !!E || !!D || !!O || !!k, ye = p !== void 0, [V, be] = se(m ?? null), [xe, Se] = se({}), W = ve ? ye ? p : V : null, Ce = a.length > 0, G = o === "embedded" && M !== !1, J = Ce && !!y, we = F((e) => {
|
|
826
|
+
pe || B(e), f?.(e, a.filter((t) => e.includes(t.id)));
|
|
827
|
+
}, [
|
|
828
|
+
pe,
|
|
829
|
+
f,
|
|
830
|
+
a
|
|
831
|
+
]), Te = F((e) => {
|
|
832
|
+
let t = _e.has(e.id) ? ge.filter((t) => t !== e.id) : [...ge, e.id];
|
|
833
|
+
we(t);
|
|
834
|
+
}, [
|
|
835
|
+
_e,
|
|
836
|
+
ge,
|
|
837
|
+
we
|
|
838
|
+
]), Y = F((e, t) => {
|
|
839
|
+
ve && (ye || be(e), g?.(e, t));
|
|
840
|
+
}, [
|
|
841
|
+
ye,
|
|
842
|
+
g,
|
|
843
|
+
ve
|
|
844
|
+
]), Ee = F((e) => {
|
|
845
|
+
Se((t) => ({
|
|
846
|
+
...t,
|
|
847
|
+
[e.id]: tt(e)
|
|
848
|
+
})), Y(e.id, e), b?.(e);
|
|
849
|
+
}, [b, Y]), X = F((e) => xe[e.id] ?? tt(e), [xe]), Z = F((e, t) => {
|
|
850
|
+
Se((n) => ({
|
|
851
|
+
...n,
|
|
852
|
+
[e.id]: t(n[e.id] ?? tt(e))
|
|
853
|
+
}));
|
|
854
|
+
}, []), Q = F((e) => {
|
|
855
|
+
let t = X(e);
|
|
856
|
+
Se((t) => {
|
|
857
|
+
let { [e.id]: n, ...r } = t;
|
|
858
|
+
return r;
|
|
859
|
+
}), Y(null, e), k?.(e, t);
|
|
860
|
+
}, [
|
|
861
|
+
X,
|
|
862
|
+
k,
|
|
863
|
+
Y
|
|
864
|
+
]), Oe = F((e) => {
|
|
865
|
+
let t = X(e), n = e.values ?? [], r = new Set(n.map((e) => e.id)), i = new Set(t.values.map((e) => e.id));
|
|
866
|
+
O?.(e, t), T?.(e, t.name), n.forEach((n) => {
|
|
867
|
+
let r = t.values.find((e) => e.id === n.id);
|
|
868
|
+
r && Qe(n.label) !== Qe(r.label) && E?.(e, n, Qe(r.label));
|
|
869
|
+
}), t.values.forEach((t) => {
|
|
870
|
+
r.has(t.id) || C?.(e);
|
|
871
|
+
}), n.forEach((t) => {
|
|
872
|
+
i.has(t.id) || w?.(e, t);
|
|
873
|
+
}), Se((t) => {
|
|
874
|
+
let { [e.id]: n, ...r } = t;
|
|
875
|
+
return r;
|
|
876
|
+
}), Y(null, e), D?.(e);
|
|
877
|
+
}, [
|
|
878
|
+
X,
|
|
879
|
+
C,
|
|
880
|
+
w,
|
|
881
|
+
D,
|
|
882
|
+
T,
|
|
883
|
+
O,
|
|
884
|
+
E,
|
|
885
|
+
Y
|
|
886
|
+
]), ke = l(), [Ae, je] = se(null), Me = F((e) => {
|
|
887
|
+
let t = X(e), n = new Set(t.values.map((e) => e.id)), r = (e.values ?? []).filter((e) => !n.has(e.id)).length;
|
|
888
|
+
if (S === !1 || r === 0) {
|
|
889
|
+
Oe(e);
|
|
890
|
+
return;
|
|
891
|
+
}
|
|
892
|
+
je({
|
|
893
|
+
option: e,
|
|
894
|
+
removed: r
|
|
895
|
+
}), ke.show();
|
|
896
|
+
}, [
|
|
897
|
+
Oe,
|
|
898
|
+
S,
|
|
899
|
+
X,
|
|
900
|
+
ke
|
|
901
|
+
]), Ne = F((e) => {
|
|
902
|
+
W === e.id && (Se((t) => {
|
|
903
|
+
let { [e.id]: n, ...r } = t;
|
|
904
|
+
return r;
|
|
905
|
+
}), Y(null, e)), x?.(e);
|
|
906
|
+
}, [
|
|
907
|
+
x,
|
|
908
|
+
W,
|
|
909
|
+
Y
|
|
910
|
+
]), Pe = l(), [Fe, Ie] = se(null), Le = F((e) => {
|
|
911
|
+
if (S === !1) {
|
|
912
|
+
Ne(e);
|
|
913
|
+
return;
|
|
914
|
+
}
|
|
915
|
+
Ie(e), Pe.show();
|
|
916
|
+
}, [
|
|
917
|
+
S,
|
|
918
|
+
Ne,
|
|
919
|
+
Pe
|
|
920
|
+
]), Re = y ? /* @__PURE__ */ L(r, {
|
|
921
|
+
type: "button",
|
|
922
|
+
tone: "neutral",
|
|
923
|
+
onClick: y,
|
|
924
|
+
icon: H,
|
|
925
|
+
children: z.createLabel
|
|
926
|
+
}) : void 0, ze = G ? /* @__PURE__ */ L("div", {
|
|
927
|
+
className: "product-options-matrix--panel-header p-surface",
|
|
928
|
+
children: /* @__PURE__ */ R(s, {
|
|
929
|
+
direction: "horizontal",
|
|
930
|
+
gap: "md",
|
|
931
|
+
justify: "between",
|
|
932
|
+
children: [/* @__PURE__ */ L(i, {
|
|
933
|
+
weight: "semibold",
|
|
934
|
+
children: z.title
|
|
935
|
+
}), Re]
|
|
936
|
+
})
|
|
937
|
+
}) : null, Be = /* @__PURE__ */ R("div", {
|
|
938
|
+
className: "product-options-matrix--body min-w-0",
|
|
939
|
+
children: [
|
|
940
|
+
/* @__PURE__ */ R("div", {
|
|
941
|
+
className: "product-options-matrix--panel overflow-hidden rounded-radius-lg border border-border bg-background",
|
|
942
|
+
children: [ze, Ce ? /* @__PURE__ */ R("div", {
|
|
943
|
+
className: n("product-options-matrix--list", G && "border-t border-border/70"),
|
|
944
|
+
children: [a.map((e, t) => {
|
|
945
|
+
let a = e.values ?? [], o = _e.has(e.id), c = W === e.id, l = !!b || ve, u = !!x, d = !!C, f = X(e), p = A?.(e, {
|
|
946
|
+
index: t,
|
|
947
|
+
onEdit: l ? () => Ee(e) : void 0,
|
|
948
|
+
onDelete: x ? () => Le(e) : void 0,
|
|
949
|
+
onAddValue: C ? () => C(e) : void 0,
|
|
950
|
+
onToggleCollapsed: () => Te(e),
|
|
951
|
+
collapsed: o
|
|
952
|
+
}), m = [...d ? [{
|
|
953
|
+
id: "add-value",
|
|
954
|
+
label: z.addValueLabel,
|
|
955
|
+
icon: /* @__PURE__ */ L(H, { className: "size-icon-md" }),
|
|
956
|
+
onClick: () => C?.(e),
|
|
957
|
+
tone: "secondary",
|
|
958
|
+
buttonStyle: "ghost"
|
|
959
|
+
}] : [], ...u ? [{
|
|
960
|
+
id: "delete",
|
|
961
|
+
label: z.deleteLabel,
|
|
962
|
+
icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
|
|
963
|
+
onClick: () => Le(e),
|
|
964
|
+
tone: "destructive"
|
|
965
|
+
}] : []], g = P ? /* @__PURE__ */ R(ce, { children: [!!l && /* @__PURE__ */ L(r, {
|
|
966
|
+
type: "button",
|
|
967
|
+
tone: "secondary",
|
|
968
|
+
buttonStyle: "ghost",
|
|
969
|
+
onClick: () => Ee(e),
|
|
970
|
+
children: z.editLabel
|
|
971
|
+
}), /* @__PURE__ */ L(Ve, {
|
|
972
|
+
item: e,
|
|
973
|
+
actions: m,
|
|
974
|
+
menuLabel: z.actionsLabel
|
|
975
|
+
})] }) : null, _ = p === void 0 ? g : p;
|
|
976
|
+
if (c) return /* @__PURE__ */ L("div", {
|
|
977
|
+
className: "product-options-matrix--item product-options-matrix--item-editing border-b border-border/70 p-surface last:border-b-0",
|
|
978
|
+
children: /* @__PURE__ */ R("div", {
|
|
979
|
+
className: "grid min-w-0 grid-cols-[auto_minmax(0,1fr)] gap-x-space-md gap-y-space-lg",
|
|
980
|
+
children: [/* @__PURE__ */ L("span", {
|
|
981
|
+
className: "product-options-matrix--drag-handle mt-[2.625rem] flex size-icon-lg items-center justify-center text-muted-foreground",
|
|
982
|
+
"aria-hidden": "true",
|
|
983
|
+
children: /* @__PURE__ */ L(he, { className: "size-icon-sm" })
|
|
984
|
+
}), /* @__PURE__ */ R(s, {
|
|
985
|
+
gap: "lg",
|
|
986
|
+
className: "product-options-matrix--editor",
|
|
987
|
+
children: [
|
|
988
|
+
/* @__PURE__ */ L(v, {
|
|
989
|
+
label: z.optionNameLabel,
|
|
990
|
+
className: "product-options-matrix--editor-field",
|
|
991
|
+
children: /* @__PURE__ */ L(h, {
|
|
992
|
+
value: f.name,
|
|
993
|
+
onChange: (t) => {
|
|
994
|
+
let n = t.currentTarget.value;
|
|
995
|
+
Z(e, (e) => ({
|
|
996
|
+
...e,
|
|
997
|
+
name: n
|
|
998
|
+
}));
|
|
999
|
+
},
|
|
1000
|
+
"aria-label": z.optionNameLabel,
|
|
1001
|
+
className: "bg-background"
|
|
1002
|
+
})
|
|
1003
|
+
}),
|
|
1004
|
+
/* @__PURE__ */ R(s, {
|
|
1005
|
+
gap: "sm",
|
|
1006
|
+
className: "product-options-matrix--editor-field",
|
|
1007
|
+
children: [/* @__PURE__ */ L(i, {
|
|
1008
|
+
weight: "medium",
|
|
1009
|
+
children: z.optionValuesLabel
|
|
1010
|
+
}), /* @__PURE__ */ R(s, {
|
|
1011
|
+
gap: "xs",
|
|
1012
|
+
className: "product-options-matrix--editor-values",
|
|
1013
|
+
children: [
|
|
1014
|
+
f.values.length === 0 && /* @__PURE__ */ L(i, {
|
|
1015
|
+
size: "xs",
|
|
1016
|
+
type: "secondary",
|
|
1017
|
+
children: z.noValuesLabel
|
|
1018
|
+
}),
|
|
1019
|
+
f.values.map((t) => /* @__PURE__ */ R("div", {
|
|
1020
|
+
className: "product-options-matrix--editor-value grid min-w-0 grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-space-sm",
|
|
1021
|
+
children: [
|
|
1022
|
+
/* @__PURE__ */ L("span", {
|
|
1023
|
+
className: "flex size-icon-lg items-center justify-center text-muted-foreground",
|
|
1024
|
+
"aria-hidden": "true",
|
|
1025
|
+
children: /* @__PURE__ */ L(he, { className: "size-icon-sm" })
|
|
1026
|
+
}),
|
|
1027
|
+
/* @__PURE__ */ L(h, {
|
|
1028
|
+
value: Qe(t.label),
|
|
1029
|
+
onChange: (n) => {
|
|
1030
|
+
let r = n.currentTarget.value;
|
|
1031
|
+
Z(e, (e) => ({
|
|
1032
|
+
...e,
|
|
1033
|
+
values: e.values.map((e) => e.id === t.id ? {
|
|
1034
|
+
...e,
|
|
1035
|
+
label: r
|
|
1036
|
+
} : e)
|
|
1037
|
+
}));
|
|
1038
|
+
},
|
|
1039
|
+
"aria-label": `${z.optionValuesLabel}: ${Qe(t.label)}`,
|
|
1040
|
+
className: "bg-background"
|
|
1041
|
+
}),
|
|
1042
|
+
/* @__PURE__ */ R(r, {
|
|
1043
|
+
type: "button",
|
|
1044
|
+
size: "sm",
|
|
1045
|
+
iconOnly: !0,
|
|
1046
|
+
tone: "secondary",
|
|
1047
|
+
buttonStyle: "ghost",
|
|
1048
|
+
onClick: () => Z(e, (e) => ({
|
|
1049
|
+
...e,
|
|
1050
|
+
values: e.values.filter((e) => e.id !== t.id)
|
|
1051
|
+
})),
|
|
1052
|
+
"aria-label": z.deleteValueLabel,
|
|
1053
|
+
className: "text-muted-foreground hover:text-destructive",
|
|
1054
|
+
children: [/* @__PURE__ */ L(K, {
|
|
1055
|
+
className: "size-icon-sm",
|
|
1056
|
+
"aria-hidden": "true"
|
|
1057
|
+
}), /* @__PURE__ */ L(i, {
|
|
1058
|
+
tag: "span",
|
|
1059
|
+
size: "pxs",
|
|
1060
|
+
className: "sr-only",
|
|
1061
|
+
children: z.deleteValueLabel
|
|
1062
|
+
})]
|
|
1063
|
+
})
|
|
1064
|
+
]
|
|
1065
|
+
}, t.id)),
|
|
1066
|
+
/* @__PURE__ */ R("div", {
|
|
1067
|
+
className: "product-options-matrix--editor-add-value grid min-w-0 grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-space-sm",
|
|
1068
|
+
children: [
|
|
1069
|
+
/* @__PURE__ */ L("span", {
|
|
1070
|
+
className: "size-icon-lg",
|
|
1071
|
+
"aria-hidden": "true"
|
|
1072
|
+
}),
|
|
1073
|
+
/* @__PURE__ */ L(r, {
|
|
1074
|
+
type: "button",
|
|
1075
|
+
tone: "secondary",
|
|
1076
|
+
buttonStyle: "outline",
|
|
1077
|
+
onClick: () => Z(e, (t) => {
|
|
1078
|
+
let n = t.values.length + 1;
|
|
1079
|
+
return {
|
|
1080
|
+
...t,
|
|
1081
|
+
values: [...t.values, {
|
|
1082
|
+
id: `${e.id}-draft-value-${n}`,
|
|
1083
|
+
label: ""
|
|
1084
|
+
}]
|
|
1085
|
+
};
|
|
1086
|
+
}),
|
|
1087
|
+
fullWidth: !0,
|
|
1088
|
+
className: "justify-start border-input bg-background text-muted-foreground hover:bg-muted/60",
|
|
1089
|
+
children: z.addAnotherValueLabel
|
|
1090
|
+
}),
|
|
1091
|
+
/* @__PURE__ */ L("span", {
|
|
1092
|
+
className: "size-action-sm",
|
|
1093
|
+
"aria-hidden": "true"
|
|
1094
|
+
})
|
|
1095
|
+
]
|
|
1096
|
+
})
|
|
1097
|
+
]
|
|
1098
|
+
})]
|
|
1099
|
+
}),
|
|
1100
|
+
/* @__PURE__ */ R(s, {
|
|
1101
|
+
direction: "horizontal",
|
|
1102
|
+
gap: "md",
|
|
1103
|
+
justify: "between",
|
|
1104
|
+
wrap: !1,
|
|
1105
|
+
className: "product-options-matrix--editor-actions",
|
|
1106
|
+
children: [/* @__PURE__ */ L("div", { children: !!x && /* @__PURE__ */ L(r, {
|
|
1107
|
+
type: "button",
|
|
1108
|
+
tone: "destructive",
|
|
1109
|
+
buttonStyle: "outline",
|
|
1110
|
+
onClick: () => Le(e),
|
|
1111
|
+
children: z.deleteLabel
|
|
1112
|
+
}) }), /* @__PURE__ */ R(s, {
|
|
1113
|
+
direction: "horizontal",
|
|
1114
|
+
gap: "sm",
|
|
1115
|
+
justify: "end",
|
|
1116
|
+
wrap: !1,
|
|
1117
|
+
children: [/* @__PURE__ */ L(r, {
|
|
1118
|
+
type: "button",
|
|
1119
|
+
tone: "secondary",
|
|
1120
|
+
buttonStyle: "ghost",
|
|
1121
|
+
onClick: () => Q(e),
|
|
1122
|
+
children: z.cancelLabel
|
|
1123
|
+
}), /* @__PURE__ */ L(r, {
|
|
1124
|
+
type: "button",
|
|
1125
|
+
tone: "neutral",
|
|
1126
|
+
onClick: () => Me(e),
|
|
1127
|
+
children: z.saveLabel ?? z.doneLabel
|
|
1128
|
+
})]
|
|
1129
|
+
})]
|
|
1130
|
+
})
|
|
1131
|
+
]
|
|
1132
|
+
})]
|
|
1133
|
+
})
|
|
1134
|
+
}, e.id);
|
|
1135
|
+
let y = /* @__PURE__ */ R(s, {
|
|
1136
|
+
render: /* @__PURE__ */ L("span", {}),
|
|
1137
|
+
gap: "sm",
|
|
1138
|
+
children: [
|
|
1139
|
+
/* @__PURE__ */ R(s, {
|
|
1140
|
+
render: /* @__PURE__ */ L("span", {}),
|
|
1141
|
+
direction: "horizontal",
|
|
1142
|
+
gap: "sm",
|
|
1143
|
+
children: [/* @__PURE__ */ L(i, {
|
|
1144
|
+
tag: "span",
|
|
1145
|
+
weight: "semibold",
|
|
1146
|
+
className: "min-w-0 whitespace-normal break-words",
|
|
1147
|
+
children: e.name
|
|
1148
|
+
}), e.badge]
|
|
1149
|
+
}),
|
|
1150
|
+
!!e.description && /* @__PURE__ */ L(i, {
|
|
1151
|
+
tag: "span",
|
|
1152
|
+
size: "xs",
|
|
1153
|
+
type: "secondary",
|
|
1154
|
+
className: "max-w-prose",
|
|
1155
|
+
children: e.description
|
|
1156
|
+
}),
|
|
1157
|
+
!o && /* @__PURE__ */ L(s, {
|
|
1158
|
+
render: /* @__PURE__ */ L("span", {}),
|
|
1159
|
+
gap: "sm",
|
|
1160
|
+
className: "product-options-matrix--values",
|
|
1161
|
+
children: a.length === 0 ? /* @__PURE__ */ L(i, {
|
|
1162
|
+
tag: "span",
|
|
1163
|
+
size: "xs",
|
|
1164
|
+
type: "secondary",
|
|
1165
|
+
children: z.noValuesLabel
|
|
1166
|
+
}) : /* @__PURE__ */ L("span", {
|
|
1167
|
+
className: "flex flex-wrap gap-space-xs",
|
|
1168
|
+
children: a.map((a, o) => {
|
|
1169
|
+
let s = w ? () => w(e, a) : void 0, c = j?.(a, {
|
|
1170
|
+
option: e,
|
|
1171
|
+
optionIndex: t,
|
|
1172
|
+
valueIndex: o,
|
|
1173
|
+
onDelete: s
|
|
1174
|
+
});
|
|
1175
|
+
return c ? /* @__PURE__ */ L(ae, { children: c }, a.id) : /* @__PURE__ */ R("span", {
|
|
1176
|
+
className: n("product-options-matrix--value inline-flex max-w-full items-center gap-space-xs rounded-radius bg-muted px-space-sm py-space-xs text-pxs font-medium leading-none text-muted-foreground", a.disabled && "opacity-60"),
|
|
1177
|
+
children: [
|
|
1178
|
+
$e(a.label) ? /* @__PURE__ */ L(i, {
|
|
1179
|
+
tag: "span",
|
|
1180
|
+
size: "inherit",
|
|
1181
|
+
className: "min-w-0 whitespace-normal break-words",
|
|
1182
|
+
children: a.label
|
|
1183
|
+
}) : a.label,
|
|
1184
|
+
a.badge,
|
|
1185
|
+
!!s && P && /* @__PURE__ */ R(r, {
|
|
1186
|
+
type: "button",
|
|
1187
|
+
size: "sm",
|
|
1188
|
+
iconOnly: !0,
|
|
1189
|
+
tone: "secondary",
|
|
1190
|
+
buttonStyle: "ghost",
|
|
1191
|
+
onClick: s,
|
|
1192
|
+
"aria-label": z.deleteValueLabel,
|
|
1193
|
+
className: "size-icon-sm shrink-0 rounded-radius text-muted-foreground/70 hover:text-destructive",
|
|
1194
|
+
children: [/* @__PURE__ */ L(q, {
|
|
1195
|
+
className: "size-icon-sm",
|
|
1196
|
+
"aria-hidden": "true"
|
|
1197
|
+
}), /* @__PURE__ */ L(i, {
|
|
1198
|
+
tag: "span",
|
|
1199
|
+
size: "pxs",
|
|
1200
|
+
className: "sr-only",
|
|
1201
|
+
children: z.deleteValueLabel
|
|
1202
|
+
})]
|
|
1203
|
+
})
|
|
1204
|
+
]
|
|
1205
|
+
}, a.id);
|
|
1206
|
+
})
|
|
1207
|
+
})
|
|
1208
|
+
})
|
|
1209
|
+
]
|
|
1210
|
+
});
|
|
1211
|
+
return /* @__PURE__ */ L("div", {
|
|
1212
|
+
className: "product-options-matrix--item border-b border-border/70 last:border-b-0",
|
|
1213
|
+
children: /* @__PURE__ */ R("div", {
|
|
1214
|
+
className: "grid min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-space-md gap-y-space-md p-surface @2xl/product-options-matrix:grid-cols-[auto_minmax(0,1fr)_auto]",
|
|
1215
|
+
children: [
|
|
1216
|
+
N ? /* @__PURE__ */ R(r, {
|
|
1217
|
+
type: "button",
|
|
1218
|
+
size: "sm",
|
|
1219
|
+
iconOnly: !0,
|
|
1220
|
+
tone: "secondary",
|
|
1221
|
+
buttonStyle: "ghost",
|
|
1222
|
+
onClick: () => Te(e),
|
|
1223
|
+
"aria-expanded": !o,
|
|
1224
|
+
"aria-label": o ? z.expandOptionLabel : z.collapseOptionLabel,
|
|
1225
|
+
className: "product-options-matrix--collapse-trigger mt-space-2xs shrink-0 text-muted-foreground",
|
|
1226
|
+
children: [/* @__PURE__ */ L(fe, {
|
|
1227
|
+
className: n("size-icon-sm transition-transform", o && "-rotate-90"),
|
|
1228
|
+
"aria-hidden": "true"
|
|
1229
|
+
}), /* @__PURE__ */ L(i, {
|
|
1230
|
+
tag: "span",
|
|
1231
|
+
size: "pxs",
|
|
1232
|
+
className: "sr-only",
|
|
1233
|
+
children: o ? z.expandOptionLabel : z.collapseOptionLabel
|
|
1234
|
+
})]
|
|
1235
|
+
}) : /* @__PURE__ */ L("span", {
|
|
1236
|
+
className: "product-options-matrix--drag-handle flex size-icon-lg items-center justify-center text-muted-foreground",
|
|
1237
|
+
"aria-hidden": "true",
|
|
1238
|
+
children: /* @__PURE__ */ L(he, { className: "size-icon-sm" })
|
|
1239
|
+
}),
|
|
1240
|
+
/* @__PURE__ */ L("div", {
|
|
1241
|
+
className: "product-options-matrix--item-main min-w-0",
|
|
1242
|
+
children: l && !P ? /* @__PURE__ */ L(r, {
|
|
1243
|
+
type: "button",
|
|
1244
|
+
tone: "secondary",
|
|
1245
|
+
buttonStyle: "ghost",
|
|
1246
|
+
onClick: () => Ee(e),
|
|
1247
|
+
"aria-label": et(z.editLabel, e),
|
|
1248
|
+
className: "h-auto min-h-0 w-full justify-start whitespace-normal rounded-radius p-0 text-left hover:bg-transparent focus-visible:ring-offset-2",
|
|
1249
|
+
children: y
|
|
1250
|
+
}) : y
|
|
1251
|
+
}),
|
|
1252
|
+
(ne || !!_) && /* @__PURE__ */ R("div", {
|
|
1253
|
+
className: "product-options-matrix--item-actions col-start-2 flex min-w-fit items-center gap-space-md justify-start @2xl/product-options-matrix:justify-end lg:col-start-auto",
|
|
1254
|
+
children: [!!te && ne && /* @__PURE__ */ R("div", {
|
|
1255
|
+
className: "inline-flex items-center gap-space-sm",
|
|
1256
|
+
children: [/* @__PURE__ */ L(i, {
|
|
1257
|
+
tag: "span",
|
|
1258
|
+
id: `product-option-${e.id}-variant-toggle-label`,
|
|
1259
|
+
size: "pxs",
|
|
1260
|
+
type: "secondary",
|
|
1261
|
+
weight: "medium",
|
|
1262
|
+
children: z.useForVariantsLabel
|
|
1263
|
+
}), /* @__PURE__ */ L(ee, {
|
|
1264
|
+
checked: !!e.usedForVariants,
|
|
1265
|
+
onValueChange: (t) => te(e, t),
|
|
1266
|
+
"aria-labelledby": `product-option-${e.id}-variant-toggle-label`
|
|
1267
|
+
})]
|
|
1268
|
+
}), _]
|
|
1269
|
+
})
|
|
1270
|
+
]
|
|
1271
|
+
})
|
|
1272
|
+
}, e.id);
|
|
1273
|
+
}), !!J && /* @__PURE__ */ L("div", {
|
|
1274
|
+
className: "product-options-matrix--create-row border-t border-border/70",
|
|
1275
|
+
children: /* @__PURE__ */ L(r, {
|
|
1276
|
+
type: "button",
|
|
1277
|
+
tone: "secondary",
|
|
1278
|
+
buttonStyle: "ghost",
|
|
1279
|
+
onClick: y,
|
|
1280
|
+
icon: U,
|
|
1281
|
+
className: "h-auto min-h-action-sm w-full justify-start rounded-none px-surface py-space-sm text-foreground hover:bg-muted/60",
|
|
1282
|
+
children: z.addAnotherOptionLabel
|
|
1283
|
+
})
|
|
1284
|
+
})]
|
|
1285
|
+
}) : /* @__PURE__ */ L("div", {
|
|
1286
|
+
className: n(G && "border-t border-border/70"),
|
|
1287
|
+
children: le ?? /* @__PURE__ */ L($, {
|
|
1288
|
+
title: z.emptyTitle,
|
|
1289
|
+
description: z.emptyDescription,
|
|
1290
|
+
action: y && !G ? /* @__PURE__ */ L(r, {
|
|
1291
|
+
type: "button",
|
|
1292
|
+
onClick: y,
|
|
1293
|
+
icon: H,
|
|
1294
|
+
children: z.createLabel
|
|
1295
|
+
}) : void 0
|
|
1296
|
+
})
|
|
1297
|
+
})]
|
|
1298
|
+
}),
|
|
1299
|
+
!!(S !== !1 && Ae) && /* @__PURE__ */ L(u, {
|
|
1300
|
+
...ke.overlayProps,
|
|
1301
|
+
destructive: !0,
|
|
1302
|
+
title: z.confirmRemoveValuesTitle,
|
|
1303
|
+
description: e(z.confirmRemoveValuesDescription, { count: Ae.removed }),
|
|
1304
|
+
strings: { confirm: z.confirmRemoveValuesLabel },
|
|
1305
|
+
onConfirm: () => Oe(Ae.option)
|
|
1306
|
+
}),
|
|
1307
|
+
!!(S !== !1 && x) && /* @__PURE__ */ L(u, {
|
|
1308
|
+
...Pe.overlayProps,
|
|
1309
|
+
destructive: !0,
|
|
1310
|
+
title: z.confirmDeleteOptionTitle,
|
|
1311
|
+
description: z.confirmDeleteOptionDescription,
|
|
1312
|
+
strings: { confirm: z.deleteLabel },
|
|
1313
|
+
onConfirm: () => {
|
|
1314
|
+
Fe && Ne(Fe);
|
|
1315
|
+
}
|
|
1316
|
+
})
|
|
1317
|
+
]
|
|
1318
|
+
});
|
|
1319
|
+
return o === "embedded" ? /* @__PURE__ */ L("section", {
|
|
1320
|
+
"aria-label": z.title,
|
|
1321
|
+
className: n("product-options-matrix--component @container/product-options-matrix min-w-0", ue),
|
|
1322
|
+
children: Be
|
|
1323
|
+
}) : /* @__PURE__ */ L(_, {
|
|
1324
|
+
title: z.title,
|
|
1325
|
+
description: z.description,
|
|
1326
|
+
actions: re,
|
|
1327
|
+
headerAction: Re,
|
|
1328
|
+
headerEnd: ie,
|
|
1329
|
+
footerSlot: oe,
|
|
1330
|
+
contentClassName: "mt-1",
|
|
1331
|
+
className: n("product-options-matrix--component @container/product-options-matrix w-full", ue),
|
|
1332
|
+
children: Be
|
|
1333
|
+
});
|
|
1334
|
+
}
|
|
1335
|
+
nt.displayName = "ProductOptionsMatrix";
|
|
1336
|
+
//#endregion
|
|
1337
|
+
//#region src/components/features/products/components/product-options-summary.tsx
|
|
1338
|
+
function rt({ options: e = [], onManageOptions: i, onCreateOption: a, onSelectOption: o, onEditOption: s, onDeleteOption: c, renderOptionActions: l, actions: u, footerSlot: d, renderOption: f, empty: p, className: m, strings: h }) {
|
|
1339
|
+
let g = t(X, h), v = !!(o || s || c || l), y = [...u ?? [], ...a && i ? [{
|
|
1340
|
+
id: "manage-options",
|
|
1341
|
+
label: g.manageLabel,
|
|
1342
|
+
icon: /* @__PURE__ */ L(G, { className: "size-icon-md" }),
|
|
1343
|
+
onClick: i
|
|
1344
|
+
}] : []], b = a || i ? /* @__PURE__ */ L(r, {
|
|
1345
|
+
type: "button",
|
|
1346
|
+
tone: "secondary",
|
|
1347
|
+
buttonStyle: "ghost",
|
|
1348
|
+
onClick: a ?? i,
|
|
1349
|
+
icon: a ? H : G,
|
|
1350
|
+
children: a ? g.createLabel : g.manageLabel
|
|
1351
|
+
}) : void 0;
|
|
1352
|
+
return /* @__PURE__ */ L(_, {
|
|
1353
|
+
icon: /* @__PURE__ */ L(G, { className: "size-icon" }),
|
|
1354
|
+
title: g.title,
|
|
1355
|
+
description: g.description,
|
|
1356
|
+
actions: y.length > 0 ? y : void 0,
|
|
1357
|
+
headerAction: b,
|
|
1358
|
+
footerSlot: d,
|
|
1359
|
+
contentClassName: "mt-1",
|
|
1360
|
+
className: n("product-options-summary--component w-full", m),
|
|
1361
|
+
children: e.length === 0 ? p ?? /* @__PURE__ */ L($, {
|
|
1362
|
+
title: g.emptyTitle,
|
|
1363
|
+
description: g.emptyDescription,
|
|
1364
|
+
action: a ? /* @__PURE__ */ L(r, {
|
|
1365
|
+
type: "button",
|
|
1366
|
+
onClick: a,
|
|
1367
|
+
icon: H,
|
|
1368
|
+
children: g.createLabel
|
|
1369
|
+
}) : void 0
|
|
1370
|
+
}) : /* @__PURE__ */ L(w, { children: e.map((e, t) => (() => {
|
|
1371
|
+
let n = v ? /* @__PURE__ */ L(Xe, {
|
|
1372
|
+
option: e,
|
|
1373
|
+
index: t,
|
|
1374
|
+
onSelectOption: o,
|
|
1375
|
+
onEditOption: s,
|
|
1376
|
+
onDeleteOption: c,
|
|
1377
|
+
renderOptionActions: l,
|
|
1378
|
+
menuLabel: g.actionsLabel,
|
|
1379
|
+
strings: {
|
|
1380
|
+
viewLabel: g.viewLabel,
|
|
1381
|
+
editLabel: g.editLabel,
|
|
1382
|
+
deleteLabel: g.deleteLabel,
|
|
1383
|
+
actionsLabel: g.actionsLabel
|
|
1384
|
+
}
|
|
1385
|
+
}) : void 0;
|
|
1386
|
+
return f ? /* @__PURE__ */ L("div", { children: f(e, t) }, e.id) : /* @__PURE__ */ L(qe, {
|
|
1387
|
+
item: e,
|
|
1388
|
+
actions: n
|
|
1389
|
+
}, e.id);
|
|
1390
|
+
})()) })
|
|
1391
|
+
});
|
|
1392
|
+
}
|
|
1393
|
+
rt.displayName = "ProductOptionsSummary";
|
|
1394
|
+
//#endregion
|
|
1395
|
+
//#region src/components/features/products/components/product-policies-card.tsx
|
|
1396
|
+
function it({ policies: e = [], onCreatePolicy: i, onSelectPolicy: a, onEditPolicy: o, onDeletePolicy: s, renderPolicyActions: c, actions: l, footerSlot: u, renderPolicy: d, empty: f, className: p, strings: m }) {
|
|
1397
|
+
let h = t(Oe, m), g = i ? /* @__PURE__ */ L(r, {
|
|
1398
|
+
type: "button",
|
|
1399
|
+
tone: "secondary",
|
|
1400
|
+
buttonStyle: "ghost",
|
|
1401
|
+
onClick: i,
|
|
1402
|
+
icon: H,
|
|
1403
|
+
children: h.createLabel
|
|
1404
|
+
}) : void 0;
|
|
1405
|
+
return /* @__PURE__ */ L(_, {
|
|
1406
|
+
icon: /* @__PURE__ */ L(Ce, { className: "size-icon" }),
|
|
1407
|
+
title: h.title,
|
|
1408
|
+
description: h.description,
|
|
1409
|
+
actions: l,
|
|
1410
|
+
headerAction: g,
|
|
1411
|
+
footerSlot: u,
|
|
1412
|
+
contentClassName: "mt-1",
|
|
1413
|
+
className: n("product-policies-card--component w-full", p),
|
|
1414
|
+
children: e.length === 0 ? f ?? /* @__PURE__ */ L($, {
|
|
1415
|
+
title: h.emptyTitle,
|
|
1416
|
+
description: h.emptyDescription,
|
|
1417
|
+
action: i ? /* @__PURE__ */ L(r, {
|
|
1418
|
+
type: "button",
|
|
1419
|
+
onClick: i,
|
|
1420
|
+
icon: H,
|
|
1421
|
+
children: h.createLabel
|
|
1422
|
+
}) : void 0
|
|
1423
|
+
}) : /* @__PURE__ */ L(w, { children: e.map((e, t) => (() => {
|
|
1424
|
+
let n = a ? () => a(e) : void 0, r = o ? () => o(e) : void 0, i = s ? () => s(e) : void 0, l = [...r ? [{
|
|
1425
|
+
id: "edit",
|
|
1426
|
+
label: h.editLabel,
|
|
1427
|
+
icon: /* @__PURE__ */ L(V, { className: "size-icon-md" }),
|
|
1428
|
+
onClick: () => r(),
|
|
1429
|
+
tone: "secondary",
|
|
1430
|
+
buttonStyle: "ghost"
|
|
1431
|
+
}] : [], ...i ? [{
|
|
1432
|
+
id: "delete",
|
|
1433
|
+
label: h.deleteLabel,
|
|
1434
|
+
icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
|
|
1435
|
+
onClick: () => i(),
|
|
1436
|
+
tone: "destructive"
|
|
1437
|
+
}] : []], u = c ? c(e, {
|
|
1438
|
+
index: t,
|
|
1439
|
+
onSelect: n,
|
|
1440
|
+
onEdit: r,
|
|
1441
|
+
onDelete: i
|
|
1442
|
+
}) : /* @__PURE__ */ L(Ve, {
|
|
1443
|
+
item: e,
|
|
1444
|
+
actions: l,
|
|
1445
|
+
menuLabel: h.actionsLabel
|
|
1446
|
+
});
|
|
1447
|
+
return d ? /* @__PURE__ */ L("div", { children: d(e, t) }, e.id) : /* @__PURE__ */ L(qe, {
|
|
1448
|
+
item: e,
|
|
1449
|
+
actionLabel: h.viewLabel,
|
|
1450
|
+
onSelect: n,
|
|
1451
|
+
actions: u
|
|
1452
|
+
}, e.id);
|
|
1453
|
+
})()) })
|
|
1454
|
+
});
|
|
1455
|
+
}
|
|
1456
|
+
it.displayName = "ProductPoliciesCard";
|
|
1457
|
+
//#endregion
|
|
1458
|
+
//#region src/components/features/products/components/product-quote-preview-card.tsx
|
|
1459
|
+
function at({ lines: e = [], subtotal: a, tax: o, discount: c, total: l, onOpenQuote: u, onCreateLine: f, onSelectLine: p, onEditLine: m, onDeleteLine: h, renderLineActions: g, actions: v, footerSlot: y, empty: b, className: ee, strings: x }) {
|
|
1460
|
+
let O = t(Q, x), k = f || u ? /* @__PURE__ */ R("div", {
|
|
1461
|
+
className: "flex items-center gap-space-md",
|
|
1462
|
+
children: [!!f && /* @__PURE__ */ L(r, {
|
|
1463
|
+
type: "button",
|
|
1464
|
+
tone: "secondary",
|
|
1465
|
+
buttonStyle: "ghost",
|
|
1466
|
+
onClick: f,
|
|
1467
|
+
icon: H,
|
|
1468
|
+
children: O.createLineLabel
|
|
1469
|
+
}), !!u && /* @__PURE__ */ L(r, {
|
|
1470
|
+
type: "button",
|
|
1471
|
+
tone: "secondary",
|
|
1472
|
+
buttonStyle: "ghost",
|
|
1473
|
+
onClick: u,
|
|
1474
|
+
icon: ue,
|
|
1475
|
+
iconPosition: "right",
|
|
1476
|
+
children: O.actionLabel
|
|
1477
|
+
})]
|
|
1478
|
+
}) : void 0;
|
|
1479
|
+
return /* @__PURE__ */ L(_, {
|
|
1480
|
+
icon: /* @__PURE__ */ L(be, { className: "size-icon" }),
|
|
1481
|
+
title: O.title,
|
|
1482
|
+
description: O.description,
|
|
1483
|
+
actions: v,
|
|
1484
|
+
headerAction: k,
|
|
1485
|
+
footerSlot: y,
|
|
1486
|
+
contentClassName: "mt-1",
|
|
1487
|
+
className: n("product-quote-preview-card--component w-full", ee),
|
|
1488
|
+
children: e.length === 0 ? b ?? /* @__PURE__ */ L($, {
|
|
1489
|
+
title: O.emptyTitle,
|
|
1490
|
+
description: O.emptyDescription,
|
|
1491
|
+
action: f ? /* @__PURE__ */ L(r, {
|
|
1492
|
+
type: "button",
|
|
1493
|
+
onClick: f,
|
|
1494
|
+
icon: H,
|
|
1495
|
+
children: O.createLineLabel
|
|
1496
|
+
}) : void 0
|
|
1497
|
+
}) : /* @__PURE__ */ R(s, {
|
|
1498
|
+
gap: "lg",
|
|
1499
|
+
children: [/* @__PURE__ */ L(w, { children: e.map((e, t) => {
|
|
1500
|
+
let n = p ? () => p(e) : void 0, r = m ? () => m(e) : void 0, i = h ? () => h(e) : void 0, a = [
|
|
1501
|
+
...n ? [{
|
|
1502
|
+
id: "open",
|
|
1503
|
+
label: O.viewLineLabel,
|
|
1504
|
+
icon: /* @__PURE__ */ L(me, { className: "size-icon-md" }),
|
|
1505
|
+
onClick: () => n(),
|
|
1506
|
+
tone: "secondary",
|
|
1507
|
+
buttonStyle: "ghost"
|
|
1508
|
+
}] : [],
|
|
1509
|
+
...r ? [{
|
|
1510
|
+
id: "edit",
|
|
1511
|
+
label: O.editLineLabel,
|
|
1512
|
+
icon: /* @__PURE__ */ L(V, { className: "size-icon-md" }),
|
|
1513
|
+
onClick: () => r(),
|
|
1514
|
+
tone: "secondary",
|
|
1515
|
+
buttonStyle: "ghost"
|
|
1516
|
+
}] : [],
|
|
1517
|
+
...i ? [{
|
|
1518
|
+
id: "delete",
|
|
1519
|
+
label: O.deleteLineLabel,
|
|
1520
|
+
icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
|
|
1521
|
+
onClick: () => i(),
|
|
1522
|
+
tone: "destructive"
|
|
1523
|
+
}] : []
|
|
1524
|
+
], o = g ? g(e, {
|
|
1525
|
+
index: t,
|
|
1526
|
+
onSelect: n,
|
|
1527
|
+
onEdit: r,
|
|
1528
|
+
onDelete: i
|
|
1529
|
+
}) : /* @__PURE__ */ L(Ve, {
|
|
1530
|
+
item: e,
|
|
1531
|
+
actions: a,
|
|
1532
|
+
menuLabel: O.lineActionsLabel
|
|
1533
|
+
});
|
|
1534
|
+
return /* @__PURE__ */ R(E, {
|
|
1535
|
+
size: "sm",
|
|
1536
|
+
className: "rounded-radius-md border border-border bg-muted/20 px-row-x py-row-y",
|
|
1537
|
+
children: [/* @__PURE__ */ R(T, { children: [
|
|
1538
|
+
/* @__PURE__ */ L(D, { children: e.label }),
|
|
1539
|
+
!!e.description && /* @__PURE__ */ L(S, { children: e.description }),
|
|
1540
|
+
!!e.quantity && /* @__PURE__ */ L(S, { children: e.quantity })
|
|
1541
|
+
] }), /* @__PURE__ */ R(C, { children: [/* @__PURE__ */ L(d, {
|
|
1542
|
+
weight: "semibold",
|
|
1543
|
+
className: "tabular-nums",
|
|
1544
|
+
children: e.amount
|
|
1545
|
+
}), o] })]
|
|
1546
|
+
}, e.id);
|
|
1547
|
+
}) }), /* @__PURE__ */ L("div", {
|
|
1548
|
+
className: "rounded-radius-md bg-muted/30 p-surface",
|
|
1549
|
+
children: /* @__PURE__ */ R(s, {
|
|
1550
|
+
gap: "sm",
|
|
1551
|
+
children: [
|
|
1552
|
+
a !== void 0 && /* @__PURE__ */ L(N, {
|
|
1553
|
+
label: O.subtotalLabel,
|
|
1554
|
+
value: a,
|
|
1555
|
+
mono: !0
|
|
1556
|
+
}),
|
|
1557
|
+
o !== void 0 && /* @__PURE__ */ L(N, {
|
|
1558
|
+
label: O.taxLabel,
|
|
1559
|
+
value: o,
|
|
1560
|
+
mono: !0
|
|
1561
|
+
}),
|
|
1562
|
+
c !== void 0 && /* @__PURE__ */ L(N, {
|
|
1563
|
+
label: O.discountLabel,
|
|
1564
|
+
value: c,
|
|
1565
|
+
mono: !0,
|
|
1566
|
+
valueClassName: "text-success"
|
|
1567
|
+
}),
|
|
1568
|
+
/* @__PURE__ */ L(N, {
|
|
1569
|
+
label: /* @__PURE__ */ L(i, {
|
|
1570
|
+
tag: "span",
|
|
1571
|
+
weight: "semibold",
|
|
1572
|
+
lineHeight: "tight",
|
|
1573
|
+
children: O.totalLabel
|
|
1574
|
+
}),
|
|
1575
|
+
value: l ?? "-",
|
|
1576
|
+
mono: !0,
|
|
1577
|
+
valueClassName: "font-semibold"
|
|
1578
|
+
})
|
|
1579
|
+
]
|
|
1580
|
+
})
|
|
1581
|
+
})]
|
|
1582
|
+
})
|
|
1583
|
+
});
|
|
1584
|
+
}
|
|
1585
|
+
at.displayName = "ProductQuotePreviewCard";
|
|
1586
|
+
//#endregion
|
|
1587
|
+
//#region src/components/features/products/components/product-readiness-card.tsx
|
|
1588
|
+
function ot({ items: e = [], score: a, scoreLabel: o, summary: l, onCreateReadinessItem: u, onSelectReadinessItem: d, onEditReadinessItem: f, onDeleteReadinessItem: m, renderReadinessItemActions: h, actions: g, footerSlot: v, renderItem: y, empty: b, className: ee, strings: x }) {
|
|
1589
|
+
let S = t(J, x), C = a === void 0 ? void 0 : Re(a), T = u ? /* @__PURE__ */ L(r, {
|
|
1590
|
+
type: "button",
|
|
1591
|
+
tone: "secondary",
|
|
1592
|
+
buttonStyle: "ghost",
|
|
1593
|
+
onClick: u,
|
|
1594
|
+
icon: H,
|
|
1595
|
+
children: S.createLabel
|
|
1596
|
+
}) : void 0;
|
|
1597
|
+
return /* @__PURE__ */ R(_, {
|
|
1598
|
+
icon: /* @__PURE__ */ L(z, { className: "size-icon" }),
|
|
1599
|
+
title: S.title,
|
|
1600
|
+
description: S.description,
|
|
1601
|
+
actions: g,
|
|
1602
|
+
headerAction: T,
|
|
1603
|
+
footerSlot: v,
|
|
1604
|
+
contentClassName: "mt-1",
|
|
1605
|
+
className: n("product-readiness-card--component w-full", ee),
|
|
1606
|
+
children: [
|
|
1607
|
+
C !== void 0 && /* @__PURE__ */ R("div", {
|
|
1608
|
+
className: "mb-space-lg rounded-radius-md border border-border bg-muted/20 p-surface",
|
|
1609
|
+
children: [/* @__PURE__ */ R(s, {
|
|
1610
|
+
direction: "horizontal",
|
|
1611
|
+
align: "center",
|
|
1612
|
+
justify: "between",
|
|
1613
|
+
gap: "lg",
|
|
1614
|
+
className: "mb-space-md",
|
|
1615
|
+
children: [/* @__PURE__ */ L(i, {
|
|
1616
|
+
size: "xs",
|
|
1617
|
+
type: "secondary",
|
|
1618
|
+
children: o ?? S.scoreLabel
|
|
1619
|
+
}), /* @__PURE__ */ L(p, {
|
|
1620
|
+
value: C,
|
|
1621
|
+
scaled: !0,
|
|
1622
|
+
size: "xs",
|
|
1623
|
+
weight: "semibold"
|
|
1624
|
+
})]
|
|
1625
|
+
}), /* @__PURE__ */ L(c, {
|
|
1626
|
+
value: C,
|
|
1627
|
+
"aria-label": typeof o == "string" ? o : S.progressLabel,
|
|
1628
|
+
"aria-valuetext": `${C}%`,
|
|
1629
|
+
className: "h-1.5"
|
|
1630
|
+
})]
|
|
1631
|
+
}),
|
|
1632
|
+
!!l && /* @__PURE__ */ L(i, {
|
|
1633
|
+
type: "secondary",
|
|
1634
|
+
className: "mb-space-lg leading-relaxed",
|
|
1635
|
+
children: l
|
|
1636
|
+
}),
|
|
1637
|
+
e.length === 0 ? b ?? /* @__PURE__ */ L($, {
|
|
1638
|
+
title: S.emptyTitle,
|
|
1639
|
+
description: S.emptyDescription,
|
|
1640
|
+
action: u ? /* @__PURE__ */ L(r, {
|
|
1641
|
+
type: "button",
|
|
1642
|
+
onClick: u,
|
|
1643
|
+
icon: H,
|
|
1644
|
+
children: S.createLabel
|
|
1645
|
+
}) : void 0
|
|
1646
|
+
}) : /* @__PURE__ */ L(w, { children: e.map((e, t) => {
|
|
1647
|
+
let n = d ? () => d(e) : void 0, r = f ? () => f(e) : void 0, i = m ? () => m(e) : void 0, a = [...r ? [{
|
|
1648
|
+
id: "edit",
|
|
1649
|
+
label: S.editLabel,
|
|
1650
|
+
icon: /* @__PURE__ */ L(V, { className: "size-icon-md" }),
|
|
1651
|
+
onClick: () => r(),
|
|
1652
|
+
tone: "secondary",
|
|
1653
|
+
buttonStyle: "ghost"
|
|
1654
|
+
}] : [], ...i ? [{
|
|
1655
|
+
id: "delete",
|
|
1656
|
+
label: S.deleteLabel,
|
|
1657
|
+
icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
|
|
1658
|
+
onClick: () => i(),
|
|
1659
|
+
tone: "destructive"
|
|
1660
|
+
}] : []], o = h ? h(e, {
|
|
1661
|
+
index: t,
|
|
1662
|
+
onSelect: n,
|
|
1663
|
+
onEdit: r,
|
|
1664
|
+
onDelete: i
|
|
1665
|
+
}) : /* @__PURE__ */ L(Ve, {
|
|
1666
|
+
item: e,
|
|
1667
|
+
actions: a,
|
|
1668
|
+
menuLabel: S.actionsLabel
|
|
1669
|
+
});
|
|
1670
|
+
return y ? /* @__PURE__ */ L("div", { children: y(e, t) }, e.id) : /* @__PURE__ */ L(Ge, {
|
|
1671
|
+
item: e,
|
|
1672
|
+
actionFallback: S.actionLabel,
|
|
1673
|
+
onSelect: n,
|
|
1674
|
+
actions: o
|
|
1675
|
+
}, e.id);
|
|
1676
|
+
}) })
|
|
1677
|
+
]
|
|
1678
|
+
});
|
|
1679
|
+
}
|
|
1680
|
+
ot.displayName = "ProductReadinessCard";
|
|
1681
|
+
//#endregion
|
|
1682
|
+
//#region src/components/features/products/components/product-structure-card.tsx
|
|
1683
|
+
function st({ metrics: e = [], onCreateMetric: i, onSelectMetric: a, onEditMetric: o, onDeleteMetric: s, renderMetricActions: c, actions: l, footerSlot: u, empty: d, className: f, strings: p }) {
|
|
1684
|
+
let m = t(we, p), h = i ? /* @__PURE__ */ L(r, {
|
|
1685
|
+
type: "button",
|
|
1686
|
+
tone: "secondary",
|
|
1687
|
+
buttonStyle: "ghost",
|
|
1688
|
+
onClick: i,
|
|
1689
|
+
icon: H,
|
|
1690
|
+
children: m.createLabel
|
|
1691
|
+
}) : void 0;
|
|
1692
|
+
return /* @__PURE__ */ L(_, {
|
|
1693
|
+
icon: /* @__PURE__ */ L(ge, { className: "size-icon" }),
|
|
1694
|
+
title: m.title,
|
|
1695
|
+
description: m.description,
|
|
1696
|
+
actions: l,
|
|
1697
|
+
headerAction: h,
|
|
1698
|
+
footerSlot: u,
|
|
1699
|
+
contentClassName: "mt-1",
|
|
1700
|
+
className: n("product-structure-card--component w-full", f),
|
|
1701
|
+
children: e.length === 0 ? d ?? /* @__PURE__ */ L($, {
|
|
1702
|
+
title: m.emptyTitle,
|
|
1703
|
+
description: m.emptyDescription,
|
|
1704
|
+
action: i ? /* @__PURE__ */ L(r, {
|
|
1705
|
+
type: "button",
|
|
1706
|
+
onClick: i,
|
|
1707
|
+
icon: H,
|
|
1708
|
+
children: m.createLabel
|
|
1709
|
+
}) : void 0
|
|
1710
|
+
}) : /* @__PURE__ */ L(w, { children: e.map((e, t) => {
|
|
1711
|
+
let n = a ? () => a(e) : void 0, r = o ? () => o(e) : void 0, i = s ? () => s(e) : void 0, l = [
|
|
1712
|
+
...n ? [{
|
|
1713
|
+
id: "open",
|
|
1714
|
+
label: m.viewLabel,
|
|
1715
|
+
icon: /* @__PURE__ */ L(me, { className: "size-icon-md" }),
|
|
1716
|
+
onClick: () => n(),
|
|
1717
|
+
tone: "secondary",
|
|
1718
|
+
buttonStyle: "ghost"
|
|
1719
|
+
}] : [],
|
|
1720
|
+
...r ? [{
|
|
1721
|
+
id: "edit",
|
|
1722
|
+
label: m.editLabel,
|
|
1723
|
+
icon: /* @__PURE__ */ L(V, { className: "size-icon-md" }),
|
|
1724
|
+
onClick: () => r(),
|
|
1725
|
+
tone: "secondary",
|
|
1726
|
+
buttonStyle: "ghost"
|
|
1727
|
+
}] : [],
|
|
1728
|
+
...i ? [{
|
|
1729
|
+
id: "delete",
|
|
1730
|
+
label: m.deleteLabel,
|
|
1731
|
+
icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
|
|
1732
|
+
onClick: () => i(),
|
|
1733
|
+
tone: "destructive"
|
|
1734
|
+
}] : []
|
|
1735
|
+
], u = c ? c(e, {
|
|
1736
|
+
index: t,
|
|
1737
|
+
onSelect: n,
|
|
1738
|
+
onEdit: r,
|
|
1739
|
+
onDelete: i
|
|
1740
|
+
}) : /* @__PURE__ */ L(Ve, {
|
|
1741
|
+
item: e,
|
|
1742
|
+
actions: l,
|
|
1743
|
+
menuLabel: m.actionsLabel
|
|
1744
|
+
});
|
|
1745
|
+
return /* @__PURE__ */ L(We, {
|
|
1746
|
+
metric: e,
|
|
1747
|
+
actions: u
|
|
1748
|
+
}, e.id);
|
|
1749
|
+
}) })
|
|
1750
|
+
});
|
|
1751
|
+
}
|
|
1752
|
+
st.displayName = "ProductStructureCard";
|
|
1753
|
+
//#endregion
|
|
1754
|
+
//#region src/components/features/products/components/product-variants-table.tsx
|
|
1755
|
+
function ct({ variant: e, channelsLabel: t }) {
|
|
1756
|
+
return /* @__PURE__ */ R("div", {
|
|
1757
|
+
className: "product-variants-table--variant-cell min-w-0",
|
|
1758
|
+
children: [
|
|
1759
|
+
/* @__PURE__ */ R(s, {
|
|
1760
|
+
direction: "horizontal",
|
|
1761
|
+
gap: "sm",
|
|
1762
|
+
children: [/* @__PURE__ */ L(i, {
|
|
1763
|
+
weight: "semibold",
|
|
1764
|
+
className: "truncate",
|
|
1765
|
+
children: e.name
|
|
1766
|
+
}), !!e.status && /* @__PURE__ */ L(m, {
|
|
1767
|
+
tone: e.statusTone ?? "secondary",
|
|
1768
|
+
children: e.status
|
|
1769
|
+
})]
|
|
1770
|
+
}),
|
|
1771
|
+
!!e.description && /* @__PURE__ */ L(i, {
|
|
1772
|
+
size: "xs",
|
|
1773
|
+
type: "secondary",
|
|
1774
|
+
className: "mt-space-2xs",
|
|
1775
|
+
children: e.description
|
|
1776
|
+
}),
|
|
1777
|
+
!!(e.options?.length || e.channels) && /* @__PURE__ */ R(s, {
|
|
1778
|
+
direction: "horizontal",
|
|
1779
|
+
gap: "xs",
|
|
1780
|
+
className: "mt-space-xs",
|
|
1781
|
+
children: [e.options?.map((e, t) => /* @__PURE__ */ L(m, {
|
|
1782
|
+
tone: "secondary",
|
|
1783
|
+
children: e
|
|
1784
|
+
}, t)), !!e.channels && /* @__PURE__ */ R(i, {
|
|
1785
|
+
tag: "span",
|
|
1786
|
+
size: "xs",
|
|
1787
|
+
type: "secondary",
|
|
1788
|
+
className: "pl-space-2xs",
|
|
1789
|
+
children: [
|
|
1790
|
+
t,
|
|
1791
|
+
": ",
|
|
1792
|
+
e.channels
|
|
1793
|
+
]
|
|
1794
|
+
})]
|
|
1795
|
+
})
|
|
1796
|
+
]
|
|
1797
|
+
});
|
|
1798
|
+
}
|
|
1799
|
+
function lt({ value: e, emphasis: t = !1 }) {
|
|
1800
|
+
return /* @__PURE__ */ L(e ? d : f, {
|
|
1801
|
+
weight: t ? "semibold" : void 0,
|
|
1802
|
+
className: "min-w-0 tabular-nums",
|
|
1803
|
+
children: e ?? "-"
|
|
1804
|
+
});
|
|
1805
|
+
}
|
|
1806
|
+
function ut({ variants: e = [], onCreateVariant: i, onSelectVariant: a, onEditVariant: o, onDuplicateVariant: s, onDeleteVariant: c, renderVariantActions: l, actions: u, footerSlot: d, empty: f, className: p, strings: m }) {
|
|
1807
|
+
let h = t(ke, m), g = I(() => {
|
|
1808
|
+
if (l) return;
|
|
1809
|
+
let e = [
|
|
1810
|
+
...a ? [{
|
|
1811
|
+
id: "open",
|
|
1812
|
+
label: h.viewLabel,
|
|
1813
|
+
icon: /* @__PURE__ */ L(me, {
|
|
1814
|
+
className: "size-icon-sm",
|
|
1815
|
+
"aria-hidden": "true"
|
|
1816
|
+
}),
|
|
1817
|
+
onClick: a,
|
|
1818
|
+
buttonStyle: "ghost"
|
|
1819
|
+
}] : [],
|
|
1820
|
+
...o ? [{
|
|
1821
|
+
id: "edit",
|
|
1822
|
+
label: h.editLabel,
|
|
1823
|
+
icon: /* @__PURE__ */ L(V, {
|
|
1824
|
+
className: "size-icon-sm",
|
|
1825
|
+
"aria-hidden": "true"
|
|
1826
|
+
}),
|
|
1827
|
+
onClick: o,
|
|
1828
|
+
buttonStyle: "ghost"
|
|
1829
|
+
}] : [],
|
|
1830
|
+
...s ? [{
|
|
1831
|
+
id: "duplicate",
|
|
1832
|
+
label: h.duplicateLabel,
|
|
1833
|
+
icon: /* @__PURE__ */ L(pe, {
|
|
1834
|
+
className: "size-icon-sm",
|
|
1835
|
+
"aria-hidden": "true"
|
|
1836
|
+
}),
|
|
1837
|
+
onClick: s,
|
|
1838
|
+
buttonStyle: "ghost"
|
|
1839
|
+
}] : [],
|
|
1840
|
+
...c ? [{
|
|
1841
|
+
id: "delete",
|
|
1842
|
+
label: h.deleteLabel,
|
|
1843
|
+
icon: /* @__PURE__ */ L(K, {
|
|
1844
|
+
className: "size-icon-sm",
|
|
1845
|
+
"aria-hidden": "true"
|
|
1846
|
+
}),
|
|
1847
|
+
onClick: c,
|
|
1848
|
+
tone: "destructive"
|
|
1849
|
+
}] : []
|
|
1850
|
+
];
|
|
1851
|
+
return e.length > 0 ? e : void 0;
|
|
1852
|
+
}, [
|
|
1853
|
+
c,
|
|
1854
|
+
s,
|
|
1855
|
+
o,
|
|
1856
|
+
a,
|
|
1857
|
+
l,
|
|
1858
|
+
h.deleteLabel,
|
|
1859
|
+
h.duplicateLabel,
|
|
1860
|
+
h.editLabel,
|
|
1861
|
+
h.viewLabel
|
|
1862
|
+
]), v = I(() => {
|
|
1863
|
+
let e = [
|
|
1864
|
+
{
|
|
1865
|
+
accessorKey: "name",
|
|
1866
|
+
header: h.headers.variant,
|
|
1867
|
+
cell: ({ row: e }) => /* @__PURE__ */ L(ct, {
|
|
1868
|
+
variant: e.original,
|
|
1869
|
+
channelsLabel: h.headers.channels
|
|
1870
|
+
})
|
|
1871
|
+
},
|
|
1872
|
+
{
|
|
1873
|
+
accessorKey: "price",
|
|
1874
|
+
header: h.headers.price,
|
|
1875
|
+
cell: ({ row: e }) => /* @__PURE__ */ L(lt, {
|
|
1876
|
+
value: e.original.price,
|
|
1877
|
+
emphasis: !0
|
|
1878
|
+
}),
|
|
1879
|
+
meta: { align: "start" }
|
|
1880
|
+
},
|
|
1881
|
+
{
|
|
1882
|
+
accessorKey: "inventory",
|
|
1883
|
+
header: h.headers.inventory,
|
|
1884
|
+
cell: ({ row: e }) => /* @__PURE__ */ L(lt, { value: e.original.inventory })
|
|
1885
|
+
},
|
|
1886
|
+
{
|
|
1887
|
+
accessorKey: "sku",
|
|
1888
|
+
header: h.headers.sku,
|
|
1889
|
+
cell: ({ row: e }) => /* @__PURE__ */ L(lt, { value: e.original.sku })
|
|
1890
|
+
},
|
|
1891
|
+
{
|
|
1892
|
+
accessorKey: "updatedAt",
|
|
1893
|
+
header: h.headers.updated,
|
|
1894
|
+
cell: ({ row: e }) => /* @__PURE__ */ L(lt, { value: e.original.updatedAt })
|
|
1895
|
+
}
|
|
1896
|
+
];
|
|
1897
|
+
return l && e.push({
|
|
1898
|
+
id: "actions",
|
|
1899
|
+
header: h.headers.actions,
|
|
1900
|
+
cell: ({ row: e }) => l(e.original, {
|
|
1901
|
+
index: e.index,
|
|
1902
|
+
onSelect: a ? () => a(e.original) : void 0,
|
|
1903
|
+
onEdit: o ? () => o(e.original) : void 0,
|
|
1904
|
+
onDuplicate: s ? () => s(e.original) : void 0,
|
|
1905
|
+
onDelete: c ? () => c(e.original) : void 0
|
|
1906
|
+
}),
|
|
1907
|
+
meta: { align: "end" }
|
|
1908
|
+
}), e;
|
|
1909
|
+
}, [
|
|
1910
|
+
c,
|
|
1911
|
+
s,
|
|
1912
|
+
o,
|
|
1913
|
+
a,
|
|
1914
|
+
l,
|
|
1915
|
+
h.headers.actions,
|
|
1916
|
+
h.headers.channels,
|
|
1917
|
+
h.headers.inventory,
|
|
1918
|
+
h.headers.price,
|
|
1919
|
+
h.headers.sku,
|
|
1920
|
+
h.headers.updated,
|
|
1921
|
+
h.headers.variant
|
|
1922
|
+
]), y = i ? /* @__PURE__ */ L(r, {
|
|
1923
|
+
type: "button",
|
|
1924
|
+
tone: "secondary",
|
|
1925
|
+
buttonStyle: "ghost",
|
|
1926
|
+
onClick: i,
|
|
1927
|
+
icon: H,
|
|
1928
|
+
children: h.createLabel
|
|
1929
|
+
}) : void 0;
|
|
1930
|
+
return /* @__PURE__ */ L(_, {
|
|
1931
|
+
icon: /* @__PURE__ */ L(_e, { className: "size-icon" }),
|
|
1932
|
+
title: h.title,
|
|
1933
|
+
description: h.description,
|
|
1934
|
+
actions: u,
|
|
1935
|
+
headerAction: y,
|
|
1936
|
+
footerSlot: d,
|
|
1937
|
+
contentClassName: "mt-1",
|
|
1938
|
+
className: n("product-variants-table--component w-full", p),
|
|
1939
|
+
children: e.length === 0 ? f ?? /* @__PURE__ */ L($, {
|
|
1940
|
+
title: h.emptyTitle,
|
|
1941
|
+
description: h.emptyDescription,
|
|
1942
|
+
action: i ? /* @__PURE__ */ L(r, {
|
|
1943
|
+
type: "button",
|
|
1944
|
+
onClick: i,
|
|
1945
|
+
icon: H,
|
|
1946
|
+
children: h.createLabel
|
|
1947
|
+
}) : void 0
|
|
1948
|
+
}) : /* @__PURE__ */ L(ie, {
|
|
1949
|
+
data: e,
|
|
1950
|
+
columns: v,
|
|
1951
|
+
getRowId: (e) => e.id,
|
|
1952
|
+
enableColumnVisibility: !0,
|
|
1953
|
+
surface: "glass",
|
|
1954
|
+
size: "sm",
|
|
1955
|
+
rowActions: g,
|
|
1956
|
+
rowActionsMenuLabel: h.headers.actions,
|
|
1957
|
+
rowActionsDisplayMode: "menu",
|
|
1958
|
+
storageKey: "product-variants",
|
|
1959
|
+
className: "product-variants-table--table",
|
|
1960
|
+
tableContainerClassName: "max-h-none",
|
|
1961
|
+
strings: { emptyState: { message: h.emptyTitle } }
|
|
1962
|
+
})
|
|
1963
|
+
});
|
|
1964
|
+
}
|
|
1965
|
+
ut.displayName = "ProductVariantsTable";
|
|
1966
|
+
//#endregion
|
|
1967
|
+
//#region src/components/features/products/components/product-overview.tsx
|
|
1968
|
+
function dt({ details: e, contract: r, options: i, variants: a, readiness: o, structure: c, operations: l, quote: u, policies: d, slots: f, className: p, mainClassName: m, railClassName: h, strings: g }) {
|
|
1969
|
+
let _ = t(Fe, g), v = !!(o || c || l || u || d || f?.railTop || f?.railBottom);
|
|
1970
|
+
return /* @__PURE__ */ R(s, {
|
|
1971
|
+
gap: "xl",
|
|
1972
|
+
className: n("product-overview--component @container/product-overview", p),
|
|
1973
|
+
children: [
|
|
1974
|
+
f?.before,
|
|
1975
|
+
/* @__PURE__ */ R("div", {
|
|
1976
|
+
className: n("grid min-w-0 grid-cols-1 gap-space-xl", v && "@5xl/product-overview:grid-cols-[minmax(0,1fr)_22rem]"),
|
|
1977
|
+
children: [/* @__PURE__ */ R(s, {
|
|
1978
|
+
render: /* @__PURE__ */ L("section", {}),
|
|
1979
|
+
gap: "xl",
|
|
1980
|
+
"aria-label": _.mainLabel,
|
|
1981
|
+
className: n("product-overview--main", m),
|
|
1982
|
+
children: [
|
|
1983
|
+
f?.mainTop,
|
|
1984
|
+
!!e && /* @__PURE__ */ L(Ye, { ...e }),
|
|
1985
|
+
!!r && /* @__PURE__ */ L(Je, { ...r }),
|
|
1986
|
+
!!i && /* @__PURE__ */ L(rt, { ...i }),
|
|
1987
|
+
!!a && /* @__PURE__ */ L(ut, { ...a }),
|
|
1988
|
+
f?.mainBottom
|
|
1989
|
+
]
|
|
1990
|
+
}), !!v && /* @__PURE__ */ R(s, {
|
|
1991
|
+
render: /* @__PURE__ */ L("aside", {}),
|
|
1992
|
+
gap: "xl",
|
|
1993
|
+
"aria-label": _.railLabel,
|
|
1994
|
+
className: n("product-overview--rail", h),
|
|
1995
|
+
children: [
|
|
1996
|
+
f?.railTop,
|
|
1997
|
+
!!o && /* @__PURE__ */ L(ot, { ...o }),
|
|
1998
|
+
!!c && /* @__PURE__ */ L(st, { ...c }),
|
|
1999
|
+
!!l && /* @__PURE__ */ L(Ze, { ...l }),
|
|
2000
|
+
!!u && /* @__PURE__ */ L(at, { ...u }),
|
|
2001
|
+
!!d && /* @__PURE__ */ L(it, { ...d }),
|
|
2002
|
+
f?.railBottom
|
|
2003
|
+
]
|
|
2004
|
+
})]
|
|
2005
|
+
}),
|
|
2006
|
+
f?.after
|
|
2007
|
+
]
|
|
2008
|
+
});
|
|
2009
|
+
}
|
|
2010
|
+
dt.displayName = "ProductOverview";
|
|
2011
|
+
//#endregion
|
|
2012
|
+
//#region src/components/features/products/components/product-variant-action-menu.tsx
|
|
2013
|
+
function ft({ variant: e, index: r = 0, onSelectVariant: i, onEditVariant: a, onDuplicateVariant: o, onDeleteVariant: s, renderVariantActions: c, menuLabel: l, className: u, strings: d }) {
|
|
2014
|
+
let f = t(Me, d), p = i ? () => i(e) : void 0, m = a ? () => a(e) : void 0, h = o ? () => o(e) : void 0, g = s ? () => s(e) : void 0;
|
|
2015
|
+
return p || m || h || g || c ? c ? /* @__PURE__ */ L("div", {
|
|
2016
|
+
className: n("product-variant-action-menu--component flex justify-end", u),
|
|
2017
|
+
children: c(e, {
|
|
2018
|
+
index: r,
|
|
2019
|
+
onSelect: p,
|
|
2020
|
+
onEdit: m,
|
|
2021
|
+
onDuplicate: h,
|
|
2022
|
+
onDelete: g
|
|
2023
|
+
})
|
|
2024
|
+
}) : /* @__PURE__ */ L(Ve, {
|
|
2025
|
+
item: e,
|
|
2026
|
+
menuLabel: l ?? f.actionsLabel,
|
|
2027
|
+
className: n("product-variant-action-menu--component", u),
|
|
2028
|
+
actions: [
|
|
2029
|
+
...p ? [{
|
|
2030
|
+
id: "open",
|
|
2031
|
+
label: f.viewLabel,
|
|
2032
|
+
icon: /* @__PURE__ */ L(me, { className: "size-icon-md" }),
|
|
2033
|
+
onClick: () => p(),
|
|
2034
|
+
tone: "secondary",
|
|
2035
|
+
buttonStyle: "ghost"
|
|
2036
|
+
}] : [],
|
|
2037
|
+
...m ? [{
|
|
2038
|
+
id: "edit",
|
|
2039
|
+
label: f.editLabel,
|
|
2040
|
+
icon: /* @__PURE__ */ L(V, { className: "size-icon-md" }),
|
|
2041
|
+
onClick: () => m(),
|
|
2042
|
+
tone: "secondary",
|
|
2043
|
+
buttonStyle: "ghost"
|
|
2044
|
+
}] : [],
|
|
2045
|
+
...h ? [{
|
|
2046
|
+
id: "duplicate",
|
|
2047
|
+
label: f.duplicateLabel,
|
|
2048
|
+
icon: /* @__PURE__ */ L(pe, { className: "size-icon-md" }),
|
|
2049
|
+
onClick: () => h(),
|
|
2050
|
+
tone: "secondary",
|
|
2051
|
+
buttonStyle: "ghost"
|
|
2052
|
+
}] : [],
|
|
2053
|
+
...g ? [{
|
|
2054
|
+
id: "delete",
|
|
2055
|
+
label: f.deleteLabel,
|
|
2056
|
+
icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
|
|
2057
|
+
onClick: () => g(),
|
|
2058
|
+
tone: "destructive"
|
|
2059
|
+
}] : []
|
|
2060
|
+
]
|
|
2061
|
+
}) : null;
|
|
2062
|
+
}
|
|
2063
|
+
ft.displayName = "ProductVariantActionMenu";
|
|
2064
|
+
//#endregion
|
|
2065
|
+
//#region src/components/features/products/components/product-variant-details.tsx
|
|
2066
|
+
var pt = (e) => e != null && e !== !1 && e !== "";
|
|
2067
|
+
function mt(e, t) {
|
|
2068
|
+
return [
|
|
2069
|
+
{
|
|
2070
|
+
label: t.price,
|
|
2071
|
+
value: e.price
|
|
2072
|
+
},
|
|
2073
|
+
{
|
|
2074
|
+
label: t.inventory,
|
|
2075
|
+
value: e.inventory
|
|
2076
|
+
},
|
|
2077
|
+
{
|
|
2078
|
+
label: t.sku,
|
|
2079
|
+
value: e.sku
|
|
2080
|
+
},
|
|
2081
|
+
{
|
|
2082
|
+
label: t.channels,
|
|
2083
|
+
value: e.channels
|
|
2084
|
+
},
|
|
2085
|
+
{
|
|
2086
|
+
label: t.updated,
|
|
2087
|
+
value: e.updatedAt
|
|
2088
|
+
}
|
|
2089
|
+
].filter((e) => pt(e.value));
|
|
2090
|
+
}
|
|
2091
|
+
function ht({ variant: e, metadata: a, optionItems: o = [], media: c, onBack: l, onSelectVariant: u, onEditVariant: d, onDuplicateVariant: f, onDeleteVariant: p, onSelectOption: h, actions: g, headerEnd: v, footerSlot: y, empty: b, renderActions: ee, renderMetadata: x, renderOption: S, className: C, strings: T }) {
|
|
2092
|
+
let E = t(Ne, T), D = e ? a ?? mt(e, E.metadata) : [], O = !!(e && (u || d || f || p || ee)), k = /* @__PURE__ */ R("div", {
|
|
2093
|
+
className: "product-variant-details--header-actions flex items-center gap-space-md",
|
|
2094
|
+
children: [!!l && /* @__PURE__ */ L(r, {
|
|
2095
|
+
type: "button",
|
|
2096
|
+
tone: "secondary",
|
|
2097
|
+
buttonStyle: "ghost",
|
|
2098
|
+
onClick: l,
|
|
2099
|
+
icon: le,
|
|
2100
|
+
children: E.backLabel
|
|
2101
|
+
}), !!O && e && /* @__PURE__ */ L(ft, {
|
|
2102
|
+
variant: e,
|
|
2103
|
+
onSelectVariant: u,
|
|
2104
|
+
onEditVariant: d,
|
|
2105
|
+
onDuplicateVariant: f,
|
|
2106
|
+
onDeleteVariant: p,
|
|
2107
|
+
renderVariantActions: ee
|
|
2108
|
+
})]
|
|
2109
|
+
}), te = e?.options ?? [];
|
|
2110
|
+
return /* @__PURE__ */ L(_, {
|
|
2111
|
+
icon: /* @__PURE__ */ L(_e, { className: "size-icon" }),
|
|
2112
|
+
title: e?.name ?? E.title,
|
|
2113
|
+
titleSuffix: e?.status ? /* @__PURE__ */ L(m, {
|
|
2114
|
+
tone: e.statusTone ?? "secondary",
|
|
2115
|
+
children: e.status
|
|
2116
|
+
}) : void 0,
|
|
2117
|
+
description: e?.description ?? E.description,
|
|
2118
|
+
actions: g,
|
|
2119
|
+
headerAction: l || O ? k : void 0,
|
|
2120
|
+
headerEnd: v,
|
|
2121
|
+
footerSlot: y,
|
|
2122
|
+
contentClassName: "mt-1",
|
|
2123
|
+
className: n("product-variant-details--component w-full", C),
|
|
2124
|
+
children: e ? /* @__PURE__ */ R(s, {
|
|
2125
|
+
gap: "xl",
|
|
2126
|
+
className: "product-variant-details--body",
|
|
2127
|
+
children: [
|
|
2128
|
+
!!c && /* @__PURE__ */ L("div", {
|
|
2129
|
+
className: "product-variant-details--media overflow-hidden rounded-radius-md border border-border bg-muted/30",
|
|
2130
|
+
children: c
|
|
2131
|
+
}),
|
|
2132
|
+
x ? x(e) : /* @__PURE__ */ L(ne, {
|
|
2133
|
+
title: E.factsTitle,
|
|
2134
|
+
items: D,
|
|
2135
|
+
columns: 3,
|
|
2136
|
+
density: "compact",
|
|
2137
|
+
className: "product-variant-details--metadata"
|
|
2138
|
+
}),
|
|
2139
|
+
!!te.length && /* @__PURE__ */ R(s, {
|
|
2140
|
+
gap: "md",
|
|
2141
|
+
className: "product-variant-details--selected-options",
|
|
2142
|
+
children: [/* @__PURE__ */ L(i, {
|
|
2143
|
+
weight: "semibold",
|
|
2144
|
+
children: E.selectedOptionsTitle
|
|
2145
|
+
}), /* @__PURE__ */ L("div", {
|
|
2146
|
+
className: "flex flex-wrap gap-space-sm",
|
|
2147
|
+
children: te.map((e, t) => /* @__PURE__ */ L(m, {
|
|
2148
|
+
tone: "secondary",
|
|
2149
|
+
children: e
|
|
2150
|
+
}, t))
|
|
2151
|
+
})]
|
|
2152
|
+
}),
|
|
2153
|
+
!!o.length && /* @__PURE__ */ R(s, {
|
|
2154
|
+
gap: "md",
|
|
2155
|
+
className: "product-variant-details--related-options",
|
|
2156
|
+
children: [/* @__PURE__ */ L(i, {
|
|
2157
|
+
weight: "semibold",
|
|
2158
|
+
children: E.relatedOptionsTitle
|
|
2159
|
+
}), /* @__PURE__ */ L(w, { children: o.map((e, t) => S ? /* @__PURE__ */ L("div", { children: S(e, t) }, e.id) : /* @__PURE__ */ L(qe, {
|
|
2160
|
+
item: e,
|
|
2161
|
+
actionLabel: E.viewOptionLabel,
|
|
2162
|
+
onSelect: h ? () => h(e) : void 0
|
|
2163
|
+
}, e.id)) })]
|
|
2164
|
+
})
|
|
2165
|
+
]
|
|
2166
|
+
}) : b ?? /* @__PURE__ */ L($, {
|
|
2167
|
+
title: E.emptyTitle,
|
|
2168
|
+
description: E.emptyDescription
|
|
2169
|
+
})
|
|
2170
|
+
});
|
|
2171
|
+
}
|
|
2172
|
+
ht.displayName = "ProductVariantDetails";
|
|
2173
|
+
//#endregion
|
|
2174
|
+
//#region src/components/features/products/components/product-variant-editor.tsx
|
|
2175
|
+
var gt = (e) => e.map((e) => ({
|
|
2176
|
+
value: e.value,
|
|
2177
|
+
label: e.label,
|
|
2178
|
+
disabled: e.disabled
|
|
2179
|
+
}));
|
|
2180
|
+
function _t({ value: e, defaultValue: a, optionFields: o = [], statusOptions: s = [], onValueChange: c, onSubmit: l, onError: u, onCancel: d, onDelete: f, actions: p, headerEnd: m, footerSlot: y, disabled: ee = !1, submitting: x = !1, className: S, strings: C }) {
|
|
2181
|
+
let w = t(Pe, C), T = oe(), E = e !== void 0, [D, O] = se(a ?? {}), [k, te] = se(!1), A = (E ? e : D) ?? {}, j = x || k, M = ee || j, N = (e) => {
|
|
2182
|
+
E || O(e), c?.(e);
|
|
2183
|
+
}, P = (e, t) => {
|
|
2184
|
+
N({
|
|
2185
|
+
...A,
|
|
2186
|
+
[e]: t
|
|
2187
|
+
});
|
|
2188
|
+
}, ne = (e, t) => {
|
|
2189
|
+
N({
|
|
2190
|
+
...A,
|
|
2191
|
+
options: {
|
|
2192
|
+
...A.options ?? {},
|
|
2193
|
+
[e.id]: t
|
|
2194
|
+
}
|
|
2195
|
+
});
|
|
2196
|
+
}, re = async (e) => {
|
|
2197
|
+
if (e.preventDefault(), l && !j) {
|
|
2198
|
+
te(!0);
|
|
2199
|
+
try {
|
|
2200
|
+
await l(A);
|
|
2201
|
+
} catch (e) {
|
|
2202
|
+
u?.(e);
|
|
2203
|
+
} finally {
|
|
2204
|
+
te(!1);
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
}, ie = /* @__PURE__ */ R("div", {
|
|
2208
|
+
className: "product-variant-editor--footer flex flex-col-reverse gap-space-md @sm/product-variant-editor:flex-row @sm/product-variant-editor:items-center @sm/product-variant-editor:justify-between",
|
|
2209
|
+
children: [/* @__PURE__ */ L("div", { children: !!f && /* @__PURE__ */ L(r, {
|
|
2210
|
+
type: "button",
|
|
2211
|
+
tone: "destructive",
|
|
2212
|
+
buttonStyle: "ghost",
|
|
2213
|
+
onClick: () => f(A),
|
|
2214
|
+
disabled: M,
|
|
2215
|
+
icon: K,
|
|
2216
|
+
children: w.deleteLabel
|
|
2217
|
+
}) }), /* @__PURE__ */ R("div", {
|
|
2218
|
+
className: "flex flex-col-reverse gap-space-md @sm/product-variant-editor:flex-row @sm/product-variant-editor:justify-end",
|
|
2219
|
+
children: [!!d && /* @__PURE__ */ L(r, {
|
|
2220
|
+
type: "button",
|
|
2221
|
+
tone: "secondary",
|
|
2222
|
+
buttonStyle: "ghost",
|
|
2223
|
+
onClick: d,
|
|
2224
|
+
disabled: M,
|
|
2225
|
+
icon: q,
|
|
2226
|
+
children: w.cancelLabel
|
|
2227
|
+
}), !!l && /* @__PURE__ */ L(r, {
|
|
2228
|
+
type: "submit",
|
|
2229
|
+
form: T,
|
|
2230
|
+
disabled: M,
|
|
2231
|
+
icon: Se,
|
|
2232
|
+
children: j ? w.savingLabel : w.saveLabel
|
|
2233
|
+
})]
|
|
2234
|
+
})]
|
|
2235
|
+
}), ae = !!(f || d || l);
|
|
2236
|
+
return /* @__PURE__ */ L(_, {
|
|
2237
|
+
icon: /* @__PURE__ */ L(V, { className: "size-4" }),
|
|
2238
|
+
title: w.title,
|
|
2239
|
+
description: w.description,
|
|
2240
|
+
actions: p,
|
|
2241
|
+
headerEnd: m,
|
|
2242
|
+
footerSlot: y ?? (ae ? ie : void 0),
|
|
2243
|
+
footerDivider: !0,
|
|
2244
|
+
contentClassName: "mt-1",
|
|
2245
|
+
className: n("product-variant-editor--component @container/product-variant-editor w-full", S),
|
|
2246
|
+
children: /* @__PURE__ */ R("form", {
|
|
2247
|
+
id: T,
|
|
2248
|
+
className: "product-variant-editor--form grid gap-5",
|
|
2249
|
+
onSubmit: re,
|
|
2250
|
+
children: [
|
|
2251
|
+
/* @__PURE__ */ R("section", {
|
|
2252
|
+
className: "product-variant-editor--section grid gap-space-lg",
|
|
2253
|
+
children: [/* @__PURE__ */ L(i, {
|
|
2254
|
+
weight: "semibold",
|
|
2255
|
+
children: w.identityTitle
|
|
2256
|
+
}), /* @__PURE__ */ R("div", {
|
|
2257
|
+
className: "grid gap-space-lg @sm/product-variant-editor:grid-cols-2",
|
|
2258
|
+
children: [
|
|
2259
|
+
/* @__PURE__ */ L(v, {
|
|
2260
|
+
label: w.fields.name,
|
|
2261
|
+
required: !0,
|
|
2262
|
+
children: /* @__PURE__ */ L(h, {
|
|
2263
|
+
value: A.name ?? "",
|
|
2264
|
+
onChange: (e) => P("name", e.target.value),
|
|
2265
|
+
placeholder: w.placeholders.name,
|
|
2266
|
+
disabled: M
|
|
2267
|
+
})
|
|
2268
|
+
}),
|
|
2269
|
+
/* @__PURE__ */ L(v, {
|
|
2270
|
+
label: w.fields.sku,
|
|
2271
|
+
children: /* @__PURE__ */ L(h, {
|
|
2272
|
+
value: A.sku ?? "",
|
|
2273
|
+
onChange: (e) => P("sku", e.target.value),
|
|
2274
|
+
placeholder: w.placeholders.sku,
|
|
2275
|
+
disabled: M
|
|
2276
|
+
})
|
|
2277
|
+
}),
|
|
2278
|
+
/* @__PURE__ */ L(v, {
|
|
2279
|
+
label: w.fields.description,
|
|
2280
|
+
className: "@sm/product-variant-editor:col-span-2",
|
|
2281
|
+
children: /* @__PURE__ */ L(g, {
|
|
2282
|
+
value: A.description ?? "",
|
|
2283
|
+
onChange: (e) => P("description", e.target.value),
|
|
2284
|
+
placeholder: w.placeholders.description,
|
|
2285
|
+
disabled: M,
|
|
2286
|
+
autoResize: !0,
|
|
2287
|
+
minRows: 2
|
|
2288
|
+
})
|
|
2289
|
+
})
|
|
2290
|
+
]
|
|
2291
|
+
})]
|
|
2292
|
+
}),
|
|
2293
|
+
/* @__PURE__ */ R("section", {
|
|
2294
|
+
className: "product-variant-editor--section grid gap-space-lg",
|
|
2295
|
+
children: [/* @__PURE__ */ L(i, {
|
|
2296
|
+
weight: "semibold",
|
|
2297
|
+
children: w.commercialTitle
|
|
2298
|
+
}), /* @__PURE__ */ R("div", {
|
|
2299
|
+
className: "grid gap-space-lg @sm/product-variant-editor:grid-cols-2",
|
|
2300
|
+
children: [
|
|
2301
|
+
/* @__PURE__ */ L(v, {
|
|
2302
|
+
label: w.fields.price,
|
|
2303
|
+
children: /* @__PURE__ */ L(h, {
|
|
2304
|
+
value: A.price ?? "",
|
|
2305
|
+
onChange: (e) => P("price", e.target.value),
|
|
2306
|
+
placeholder: w.placeholders.price,
|
|
2307
|
+
disabled: M
|
|
2308
|
+
})
|
|
2309
|
+
}),
|
|
2310
|
+
/* @__PURE__ */ L(v, {
|
|
2311
|
+
label: w.fields.inventory,
|
|
2312
|
+
children: /* @__PURE__ */ L(h, {
|
|
2313
|
+
value: A.inventory ?? "",
|
|
2314
|
+
onChange: (e) => P("inventory", e.target.value),
|
|
2315
|
+
placeholder: w.placeholders.inventory,
|
|
2316
|
+
disabled: M,
|
|
2317
|
+
inputMode: "numeric"
|
|
2318
|
+
})
|
|
2319
|
+
}),
|
|
2320
|
+
/* @__PURE__ */ L(v, {
|
|
2321
|
+
label: w.fields.status,
|
|
2322
|
+
children: s.length > 0 ? /* @__PURE__ */ L(b, {
|
|
2323
|
+
options: gt(s),
|
|
2324
|
+
value: A.status ?? null,
|
|
2325
|
+
onValueChange: (e) => P("status", e ?? ""),
|
|
2326
|
+
placeholder: w.statusPlaceholder,
|
|
2327
|
+
disabled: M,
|
|
2328
|
+
"aria-label": w.fields.status
|
|
2329
|
+
}) : /* @__PURE__ */ L(h, {
|
|
2330
|
+
value: A.status ?? "",
|
|
2331
|
+
onChange: (e) => P("status", e.target.value),
|
|
2332
|
+
placeholder: w.placeholders.status,
|
|
2333
|
+
disabled: M
|
|
2334
|
+
})
|
|
2335
|
+
}),
|
|
2336
|
+
/* @__PURE__ */ L(v, {
|
|
2337
|
+
label: w.fields.channels,
|
|
2338
|
+
children: /* @__PURE__ */ L(h, {
|
|
2339
|
+
value: A.channels ?? "",
|
|
2340
|
+
onChange: (e) => P("channels", e.target.value),
|
|
2341
|
+
placeholder: w.placeholders.channels,
|
|
2342
|
+
disabled: M
|
|
2343
|
+
})
|
|
2344
|
+
})
|
|
2345
|
+
]
|
|
2346
|
+
})]
|
|
2347
|
+
}),
|
|
2348
|
+
!!o.length && /* @__PURE__ */ R("section", {
|
|
2349
|
+
className: "product-variant-editor--section grid gap-space-lg",
|
|
2350
|
+
children: [/* @__PURE__ */ L(i, {
|
|
2351
|
+
weight: "semibold",
|
|
2352
|
+
children: w.optionsTitle
|
|
2353
|
+
}), /* @__PURE__ */ L("div", {
|
|
2354
|
+
className: "grid gap-space-lg @sm/product-variant-editor:grid-cols-2",
|
|
2355
|
+
children: o.map((e) => {
|
|
2356
|
+
let t = e.value ?? A.options?.[e.id] ?? "", n = !!e.choices?.length;
|
|
2357
|
+
return /* @__PURE__ */ L(v, {
|
|
2358
|
+
label: e.label,
|
|
2359
|
+
helperText: e.helperText,
|
|
2360
|
+
children: n ? /* @__PURE__ */ L(b, {
|
|
2361
|
+
options: gt(e.choices ?? []),
|
|
2362
|
+
value: t || null,
|
|
2363
|
+
onValueChange: (t) => ne(e, t),
|
|
2364
|
+
placeholder: e.placeholder ?? w.optionPlaceholder,
|
|
2365
|
+
disabled: M,
|
|
2366
|
+
"aria-label": e.label
|
|
2367
|
+
}) : /* @__PURE__ */ L(h, {
|
|
2368
|
+
value: t,
|
|
2369
|
+
onChange: (t) => ne(e, t.target.value),
|
|
2370
|
+
placeholder: e.placeholder ?? w.optionPlaceholder,
|
|
2371
|
+
disabled: M
|
|
2372
|
+
})
|
|
2373
|
+
}, e.id);
|
|
2374
|
+
})
|
|
2375
|
+
})]
|
|
2376
|
+
})
|
|
2377
|
+
]
|
|
2378
|
+
})
|
|
2379
|
+
});
|
|
2380
|
+
}
|
|
2381
|
+
_t.displayName = "ProductVariantEditor";
|
|
2382
|
+
//#endregion
|
|
2383
|
+
//#region src/components/features/products/components/product-variants-bulk-table.tsx
|
|
2384
|
+
var vt = [
|
|
2385
|
+
"variant",
|
|
2386
|
+
"sku",
|
|
2387
|
+
"price",
|
|
2388
|
+
"inventory",
|
|
2389
|
+
"status"
|
|
2390
|
+
], yt = "text", bt = "text", xt = "multiple";
|
|
2391
|
+
function St(e) {
|
|
2392
|
+
return typeof e == "string" || typeof e == "number" ? String(e) : "";
|
|
2393
|
+
}
|
|
2394
|
+
function Ct(e, t) {
|
|
2395
|
+
let n = e.optionValues?.[t.id];
|
|
2396
|
+
if (n != null && n !== !1 && n !== "") return n;
|
|
2397
|
+
let r = e.optionValueIds?.[t.id];
|
|
2398
|
+
return t.values?.find((e) => e.id === r)?.label ?? void 0;
|
|
2399
|
+
}
|
|
2400
|
+
function wt(e, t) {
|
|
2401
|
+
return e.name !== void 0 && e.name !== null && e.name !== "" ? e.name : t.filter((e) => e.usedForVariants !== !1).map((t) => Ct(e, t)).filter((e) => e != null && e !== "").map((e) => St(e)).filter(Boolean).join(" / ") || "-";
|
|
2402
|
+
}
|
|
2403
|
+
function Tt(e, t) {
|
|
2404
|
+
return t.filter((e) => e.usedForVariants !== !1).map((t) => Ct(e, t)).filter((e) => e != null && e !== "");
|
|
2405
|
+
}
|
|
2406
|
+
function Et(e) {
|
|
2407
|
+
return e.map(St).filter(Boolean).join(" / ");
|
|
2408
|
+
}
|
|
2409
|
+
function Dt(e, t) {
|
|
2410
|
+
return St(Ct(e, t)) || "-";
|
|
2411
|
+
}
|
|
2412
|
+
function Ot(e, t) {
|
|
2413
|
+
return e.map((e) => t.get(e)).filter((e) => !!e);
|
|
2414
|
+
}
|
|
2415
|
+
function kt(e) {
|
|
2416
|
+
return e == null || e === "" ? "-" : e;
|
|
2417
|
+
}
|
|
2418
|
+
function At(e) {
|
|
2419
|
+
return e != null && e !== "";
|
|
2420
|
+
}
|
|
2421
|
+
function jt(e) {
|
|
2422
|
+
return e === "sku" || e === "price" || e === "inventory";
|
|
2423
|
+
}
|
|
2424
|
+
function Mt(e, t) {
|
|
2425
|
+
return e === "text" || e === "field" ? e : e[t] ?? bt;
|
|
2426
|
+
}
|
|
2427
|
+
function Nt(e, t, n, r) {
|
|
2428
|
+
return {
|
|
2429
|
+
index: e,
|
|
2430
|
+
field: t,
|
|
2431
|
+
previousValue: n,
|
|
2432
|
+
value: r
|
|
2433
|
+
};
|
|
2434
|
+
}
|
|
2435
|
+
function Pt(e, t, r, i, a) {
|
|
2436
|
+
let o = St(e);
|
|
2437
|
+
if (r === "field") {
|
|
2438
|
+
let e = !!i;
|
|
2439
|
+
return /* @__PURE__ */ L(h, {
|
|
2440
|
+
readOnly: !e,
|
|
2441
|
+
value: o,
|
|
2442
|
+
onChange: e ? (e) => i(e.currentTarget.value) : void 0,
|
|
2443
|
+
onBlur: a ? (e) => a(e.currentTarget.value) : void 0,
|
|
2444
|
+
"aria-label": t,
|
|
2445
|
+
className: n("h-control-lg w-full min-w-36 bg-background px-control shadow-xs", !e && "text-muted-foreground")
|
|
2446
|
+
});
|
|
2447
|
+
}
|
|
2448
|
+
let s = At(e) ? d : f;
|
|
2449
|
+
return /* @__PURE__ */ L(s, {
|
|
2450
|
+
className: "min-w-0 whitespace-normal break-words tabular-nums",
|
|
2451
|
+
children: kt(e)
|
|
2452
|
+
});
|
|
2453
|
+
}
|
|
2454
|
+
function Ft({ variants: e = [], optionGroups: o = [], groupByOptionId: c, visibleColumns: l = vt, optionCombinationDisplay: u = yt, cellDisplay: d = bt, selectionMode: f, renderOptionCombination: p, renderCell: h, selectedVariantIds: g, defaultSelectedVariantIds: v = [], onSelectedVariantIdsChange: b, onVariantFieldChange: ee, onVariantFieldBlur: x, onCreateVariant: S, onGenerateVariants: C, onSelectVariant: w, onEditVariant: T, onDuplicateVariant: E, onDeleteVariant: D, onBulkEdit: N, onBulkApply: P, onBulkDelete: ne, renderVariantActions: re, renderBulkActions: ie, actions: oe, headerEnd: ce, footerSlot: le, empty: ue, surface: de = "card", className: fe, strings: z }) {
|
|
2455
|
+
let B = t(Ae, z), he = g !== void 0, [ge, ve] = se(v), ye = !!(ie || N || P || ne), U = (f ?? (ye || he || b ? xt : "none")) === "multiple", be = I(() => U ? he ? g : ge : [], [
|
|
2456
|
+
ge,
|
|
2457
|
+
U,
|
|
2458
|
+
he,
|
|
2459
|
+
g
|
|
2460
|
+
]), Se = I(() => new Map(e.map((e) => [e.id, e])), [e]), W = I(() => Ot(be, Se), [Se, be]), Ce = I(() => new Set(be), [be]), G = I(() => new Set(l), [l]), q = I(() => o.find((e) => e.id === c), [o, c]), J = I(() => new Map(e.map((e, t) => [e.id, t])), [e]), we = I(() => {
|
|
2461
|
+
if (!q) return e;
|
|
2462
|
+
let t = new Map((q.values ?? []).map((e, t) => [e.id, t]));
|
|
2463
|
+
return [...e].sort((e, n) => {
|
|
2464
|
+
let r = e.optionValueIds?.[q.id], i = n.optionValueIds?.[q.id], a = r === void 0 ? void 0 : t.get(r), o = i === void 0 ? void 0 : t.get(i), s = a ?? 2 ** 53 - 1, c = o ?? 2 ** 53 - 1;
|
|
2465
|
+
return s === c ? (J.get(e.id) ?? 0) - (J.get(n.id) ?? 0) : s - c;
|
|
2466
|
+
});
|
|
2467
|
+
}, [
|
|
2468
|
+
q,
|
|
2469
|
+
J,
|
|
2470
|
+
e
|
|
2471
|
+
]), Te = I(() => {
|
|
2472
|
+
if (!q) return /* @__PURE__ */ new Map();
|
|
2473
|
+
let t = /* @__PURE__ */ new Map();
|
|
2474
|
+
return e.forEach((e) => {
|
|
2475
|
+
let n = Dt(e, q);
|
|
2476
|
+
t.set(n, (t.get(n) ?? 0) + 1);
|
|
2477
|
+
}), t;
|
|
2478
|
+
}, [q, e]), Y = U && ye, Ee = e.length > 0, X = U && Ee && e.every((e) => Ce.has(e.id)), Z = !!(w || T || E || D || re), De = l.filter((e) => G.has(e)).length + +!!U + +!!Z, Q = F((e) => {
|
|
2479
|
+
let t = Ot(e, Se);
|
|
2480
|
+
he || ve(e), b?.(e, t);
|
|
2481
|
+
}, [
|
|
2482
|
+
he,
|
|
2483
|
+
b,
|
|
2484
|
+
Se
|
|
2485
|
+
]), Oe = F(() => Q([]), [Q]), ke = F((e, t) => {
|
|
2486
|
+
if (!U) return;
|
|
2487
|
+
let n = t === !0 ? Array.from(/* @__PURE__ */ new Set([...be, e.id])) : be.filter((t) => t !== e.id);
|
|
2488
|
+
Q(n);
|
|
2489
|
+
}, [
|
|
2490
|
+
U,
|
|
2491
|
+
be,
|
|
2492
|
+
Q
|
|
2493
|
+
]), je = F((t) => {
|
|
2494
|
+
U && Q(t === !0 ? e.map((e) => e.id) : []);
|
|
2495
|
+
}, [
|
|
2496
|
+
U,
|
|
2497
|
+
Q,
|
|
2498
|
+
e
|
|
2499
|
+
]), Me = {
|
|
2500
|
+
selectedRows: W,
|
|
2501
|
+
selectedIds: be,
|
|
2502
|
+
allRows: e,
|
|
2503
|
+
selectedCount: W.length,
|
|
2504
|
+
totalCount: e.length,
|
|
2505
|
+
allRowsSelected: X,
|
|
2506
|
+
clearSelection: Oe,
|
|
2507
|
+
setSelectedIds: Q
|
|
2508
|
+
}, Ne = S || C ? /* @__PURE__ */ R(s, {
|
|
2509
|
+
direction: "horizontal",
|
|
2510
|
+
gap: "sm",
|
|
2511
|
+
justify: "end",
|
|
2512
|
+
className: "product-variants-bulk-table--header-actions",
|
|
2513
|
+
children: [!!C && /* @__PURE__ */ L(r, {
|
|
2514
|
+
type: "button",
|
|
2515
|
+
tone: "secondary",
|
|
2516
|
+
buttonStyle: "outline",
|
|
2517
|
+
onClick: C,
|
|
2518
|
+
icon: xe,
|
|
2519
|
+
children: B.generateLabel
|
|
2520
|
+
}), !!S && /* @__PURE__ */ L(r, {
|
|
2521
|
+
type: "button",
|
|
2522
|
+
tone: "secondary",
|
|
2523
|
+
buttonStyle: "ghost",
|
|
2524
|
+
onClick: S,
|
|
2525
|
+
icon: H,
|
|
2526
|
+
children: B.createLabel
|
|
2527
|
+
})]
|
|
2528
|
+
}) : void 0, Pe = Y ? /* @__PURE__ */ R(s, {
|
|
2529
|
+
direction: "horizontal",
|
|
2530
|
+
gap: "md",
|
|
2531
|
+
justify: "between",
|
|
2532
|
+
className: "product-variants-bulk-table--bulk-toolbar rounded-radius-lg bg-muted/45 px-space-lg py-space-md",
|
|
2533
|
+
children: [/* @__PURE__ */ R(s, {
|
|
2534
|
+
direction: "horizontal",
|
|
2535
|
+
gap: "md",
|
|
2536
|
+
children: [/* @__PURE__ */ L(i, {
|
|
2537
|
+
size: "xs",
|
|
2538
|
+
type: "secondary",
|
|
2539
|
+
children: B.selectedLabel(W.length, e.length)
|
|
2540
|
+
}), !!W.length && /* @__PURE__ */ L(r, {
|
|
2541
|
+
type: "button",
|
|
2542
|
+
tone: "secondary",
|
|
2543
|
+
buttonStyle: "ghost",
|
|
2544
|
+
size: "sm",
|
|
2545
|
+
onClick: Oe,
|
|
2546
|
+
children: B.clearSelectionLabel
|
|
2547
|
+
})]
|
|
2548
|
+
}), /* @__PURE__ */ R(s, {
|
|
2549
|
+
direction: "horizontal",
|
|
2550
|
+
gap: "md",
|
|
2551
|
+
justify: "end",
|
|
2552
|
+
children: [
|
|
2553
|
+
!!N && /* @__PURE__ */ L(r, {
|
|
2554
|
+
type: "button",
|
|
2555
|
+
tone: "secondary",
|
|
2556
|
+
buttonStyle: "solid",
|
|
2557
|
+
disabled: !W.length,
|
|
2558
|
+
onClick: () => N(W),
|
|
2559
|
+
className: "bg-background text-foreground hover:bg-background/80",
|
|
2560
|
+
children: B.bulkEditLabel
|
|
2561
|
+
}),
|
|
2562
|
+
!!ne && /* @__PURE__ */ R(r, {
|
|
2563
|
+
type: "button",
|
|
2564
|
+
tone: "secondary",
|
|
2565
|
+
buttonStyle: "ghost",
|
|
2566
|
+
disabled: !W.length,
|
|
2567
|
+
onClick: () => ne(W),
|
|
2568
|
+
icon: K,
|
|
2569
|
+
className: "text-muted-foreground hover:text-destructive disabled:text-muted-foreground/55",
|
|
2570
|
+
children: [
|
|
2571
|
+
B.bulkDeleteLabel,
|
|
2572
|
+
" (",
|
|
2573
|
+
W.length,
|
|
2574
|
+
")"
|
|
2575
|
+
]
|
|
2576
|
+
}),
|
|
2577
|
+
!!P && /* @__PURE__ */ L(r, {
|
|
2578
|
+
type: "button",
|
|
2579
|
+
tone: "secondary",
|
|
2580
|
+
buttonStyle: "ghost",
|
|
2581
|
+
disabled: !W.length,
|
|
2582
|
+
onClick: () => P(W),
|
|
2583
|
+
className: "text-muted-foreground disabled:text-muted-foreground/55",
|
|
2584
|
+
children: B.bulkApplyLabel
|
|
2585
|
+
}),
|
|
2586
|
+
ie?.(Me)
|
|
2587
|
+
]
|
|
2588
|
+
})]
|
|
2589
|
+
}) : null, Fe = e.length === 0 ? ue ?? /* @__PURE__ */ L($, {
|
|
2590
|
+
title: B.emptyTitle,
|
|
2591
|
+
description: B.emptyDescription,
|
|
2592
|
+
action: C ? /* @__PURE__ */ L(r, {
|
|
2593
|
+
type: "button",
|
|
2594
|
+
onClick: C,
|
|
2595
|
+
icon: xe,
|
|
2596
|
+
children: B.generateLabel
|
|
2597
|
+
}) : void 0
|
|
2598
|
+
}) : /* @__PURE__ */ R(s, {
|
|
2599
|
+
gap: "md",
|
|
2600
|
+
className: "product-variants-bulk-table--body",
|
|
2601
|
+
children: [Pe, /* @__PURE__ */ L("div", {
|
|
2602
|
+
className: "product-variants-bulk-table--table overflow-hidden rounded-radius-lg border border-border bg-background",
|
|
2603
|
+
children: /* @__PURE__ */ R(M, {
|
|
2604
|
+
containerClassName: "[scrollbar-gutter:stable] [scrollbar-width:thin] [&::-webkit-scrollbar]:h-2.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-border [&::-webkit-scrollbar-track]:bg-muted/40",
|
|
2605
|
+
className: "min-w-max border-collapse",
|
|
2606
|
+
children: [
|
|
2607
|
+
/* @__PURE__ */ R("colgroup", { children: [
|
|
2608
|
+
U && /* @__PURE__ */ L("col", {
|
|
2609
|
+
className: "w-14 min-w-14 max-w-14",
|
|
2610
|
+
style: { width: "3.5rem" }
|
|
2611
|
+
}),
|
|
2612
|
+
G.has("variant") && /* @__PURE__ */ L("col", {}),
|
|
2613
|
+
G.has("sku") && /* @__PURE__ */ L("col", {}),
|
|
2614
|
+
G.has("price") && /* @__PURE__ */ L("col", {}),
|
|
2615
|
+
G.has("inventory") && /* @__PURE__ */ L("col", {}),
|
|
2616
|
+
G.has("status") && /* @__PURE__ */ L("col", {}),
|
|
2617
|
+
G.has("updated") && /* @__PURE__ */ L("col", {}),
|
|
2618
|
+
Z && /* @__PURE__ */ L("col", { style: { width: "4.5rem" } })
|
|
2619
|
+
] }),
|
|
2620
|
+
/* @__PURE__ */ L(j, { children: /* @__PURE__ */ R(O, {
|
|
2621
|
+
className: "h-12 border-b border-border/70 bg-muted/45",
|
|
2622
|
+
children: [
|
|
2623
|
+
U && /* @__PURE__ */ L(A, {
|
|
2624
|
+
className: "w-14 min-w-14 max-w-14 px-0 py-space-md text-center align-middle",
|
|
2625
|
+
style: { width: "3.5rem" },
|
|
2626
|
+
children: /* @__PURE__ */ L(y, {
|
|
2627
|
+
checked: X,
|
|
2628
|
+
onCheckedChange: je,
|
|
2629
|
+
"aria-label": B.selectAllLabel,
|
|
2630
|
+
className: "mx-auto"
|
|
2631
|
+
})
|
|
2632
|
+
}),
|
|
2633
|
+
G.has("variant") && /* @__PURE__ */ L(A, {
|
|
2634
|
+
className: "px-space-lg py-space-md text-left align-middle",
|
|
2635
|
+
children: /* @__PURE__ */ L(a, {
|
|
2636
|
+
className: "whitespace-normal",
|
|
2637
|
+
children: B.headers.variant
|
|
2638
|
+
})
|
|
2639
|
+
}),
|
|
2640
|
+
G.has("sku") && /* @__PURE__ */ L(A, {
|
|
2641
|
+
className: "px-space-lg py-space-md text-left align-middle",
|
|
2642
|
+
children: /* @__PURE__ */ L(a, {
|
|
2643
|
+
className: "whitespace-normal",
|
|
2644
|
+
children: B.headers.sku
|
|
2645
|
+
})
|
|
2646
|
+
}),
|
|
2647
|
+
G.has("price") && /* @__PURE__ */ L(A, {
|
|
2648
|
+
className: "px-space-lg py-space-md text-left align-middle",
|
|
2649
|
+
children: /* @__PURE__ */ L(a, {
|
|
2650
|
+
className: "whitespace-normal",
|
|
2651
|
+
children: B.headers.price
|
|
2652
|
+
})
|
|
2653
|
+
}),
|
|
2654
|
+
G.has("inventory") && /* @__PURE__ */ L(A, {
|
|
2655
|
+
className: "px-space-lg py-space-md text-left align-middle",
|
|
2656
|
+
children: /* @__PURE__ */ L(a, {
|
|
2657
|
+
className: "whitespace-normal",
|
|
2658
|
+
children: B.headers.inventory
|
|
2659
|
+
})
|
|
2660
|
+
}),
|
|
2661
|
+
G.has("status") && /* @__PURE__ */ L(A, {
|
|
2662
|
+
className: "px-space-lg py-space-md text-left align-middle",
|
|
2663
|
+
children: /* @__PURE__ */ L(a, {
|
|
2664
|
+
className: "whitespace-normal",
|
|
2665
|
+
children: B.headers.status
|
|
2666
|
+
})
|
|
2667
|
+
}),
|
|
2668
|
+
G.has("updated") && /* @__PURE__ */ L(A, {
|
|
2669
|
+
className: "px-space-lg py-space-md text-left align-middle",
|
|
2670
|
+
children: /* @__PURE__ */ L(a, {
|
|
2671
|
+
className: "whitespace-normal",
|
|
2672
|
+
children: B.headers.updated
|
|
2673
|
+
})
|
|
2674
|
+
}),
|
|
2675
|
+
Z && /* @__PURE__ */ L(A, {
|
|
2676
|
+
className: "px-space-lg py-space-md text-right align-middle",
|
|
2677
|
+
children: /* @__PURE__ */ L(a, {
|
|
2678
|
+
className: "whitespace-normal",
|
|
2679
|
+
children: B.headers.actions
|
|
2680
|
+
})
|
|
2681
|
+
})
|
|
2682
|
+
]
|
|
2683
|
+
}) }),
|
|
2684
|
+
/* @__PURE__ */ L(te, { children: we.map((e, t) => {
|
|
2685
|
+
let n = J.get(e.id) ?? t, r = q ? Dt(e, q) : null, a = t > 0 ? we[t - 1] : void 0, c = q && a ? Dt(a, q) : null, l = !!q && r !== c, f = Ce.has(e.id), g = {
|
|
2686
|
+
index: n,
|
|
2687
|
+
onSelect: w ? () => w(e) : void 0,
|
|
2688
|
+
onEdit: T ? () => T(e) : void 0,
|
|
2689
|
+
onDuplicate: E ? () => E(e) : void 0,
|
|
2690
|
+
onDelete: D ? () => D(e) : void 0,
|
|
2691
|
+
isSelected: f,
|
|
2692
|
+
onToggleSelected: U ? (t) => ke(e, t) : void 0
|
|
2693
|
+
}, _ = q ? o.filter((e) => e.id !== q.id) : o, v = Tt(e, _), b = q ? wt({
|
|
2694
|
+
...e,
|
|
2695
|
+
name: void 0
|
|
2696
|
+
}, _) : wt(e, o), S = b === "-" && q ? wt(e, o) : b, C = Et(v), te = C === St(S), A = (t, r, i = bt) => {
|
|
2697
|
+
let a = jt(t) && ee ? (i) => ee(e, t, i, Nt(n, t, r, i)) : void 0, o = jt(t) && x ? (i) => x(e, t, i, Nt(n, t, r, i)) : void 0;
|
|
2698
|
+
return {
|
|
2699
|
+
index: n,
|
|
2700
|
+
column: t,
|
|
2701
|
+
value: r,
|
|
2702
|
+
variantName: S,
|
|
2703
|
+
optionValues: v,
|
|
2704
|
+
optionLabel: C,
|
|
2705
|
+
cellDisplay: i,
|
|
2706
|
+
onValueChange: a,
|
|
2707
|
+
onBlur: o
|
|
2708
|
+
};
|
|
2709
|
+
}, j = (t, n, r, i) => {
|
|
2710
|
+
let a = A(t, n, r), o = h?.(e, a);
|
|
2711
|
+
return o === void 0 ? i(a) : o;
|
|
2712
|
+
}, M = u !== "none" && v.length > 0 && (q ? !te : u === "tags" || !te), N = u === "none" ? null : p?.(e, {
|
|
2713
|
+
optionGroups: o,
|
|
2714
|
+
optionValues: v,
|
|
2715
|
+
optionLabel: C,
|
|
2716
|
+
display: u
|
|
2717
|
+
}), P = [
|
|
2718
|
+
...w ? [{
|
|
2719
|
+
id: "view",
|
|
2720
|
+
label: B.viewLabel,
|
|
2721
|
+
icon: /* @__PURE__ */ L(me, { className: "size-icon-md" }),
|
|
2722
|
+
onClick: () => w(e),
|
|
2723
|
+
tone: "secondary",
|
|
2724
|
+
buttonStyle: "ghost"
|
|
2725
|
+
}] : [],
|
|
2726
|
+
...T ? [{
|
|
2727
|
+
id: "edit",
|
|
2728
|
+
label: B.editLabel,
|
|
2729
|
+
icon: /* @__PURE__ */ L(V, { className: "size-icon-md" }),
|
|
2730
|
+
onClick: () => T(e),
|
|
2731
|
+
tone: "secondary",
|
|
2732
|
+
buttonStyle: "ghost"
|
|
2733
|
+
}] : [],
|
|
2734
|
+
...E ? [{
|
|
2735
|
+
id: "duplicate",
|
|
2736
|
+
label: B.duplicateLabel,
|
|
2737
|
+
icon: /* @__PURE__ */ L(pe, { className: "size-icon-md" }),
|
|
2738
|
+
onClick: () => E(e),
|
|
2739
|
+
tone: "secondary",
|
|
2740
|
+
buttonStyle: "ghost"
|
|
2741
|
+
}] : [],
|
|
2742
|
+
...D ? [{
|
|
2743
|
+
id: "delete",
|
|
2744
|
+
label: B.deleteLabel,
|
|
2745
|
+
icon: /* @__PURE__ */ L(K, { className: "size-icon-md" }),
|
|
2746
|
+
onClick: () => D(e),
|
|
2747
|
+
tone: "destructive"
|
|
2748
|
+
}] : []
|
|
2749
|
+
];
|
|
2750
|
+
return /* @__PURE__ */ R(ae, { children: [l && /* @__PURE__ */ L(O, {
|
|
2751
|
+
className: "product-variants-bulk-table--group-row border-b border-border/70 bg-muted/30",
|
|
2752
|
+
children: /* @__PURE__ */ L(k, {
|
|
2753
|
+
colSpan: De,
|
|
2754
|
+
className: "px-space-lg py-space-md align-middle",
|
|
2755
|
+
children: /* @__PURE__ */ R(s, {
|
|
2756
|
+
direction: "horizontal",
|
|
2757
|
+
gap: "sm",
|
|
2758
|
+
wrap: !1,
|
|
2759
|
+
children: [/* @__PURE__ */ L(i, {
|
|
2760
|
+
tag: "span",
|
|
2761
|
+
weight: "semibold",
|
|
2762
|
+
className: "min-w-0 whitespace-normal break-words",
|
|
2763
|
+
children: r
|
|
2764
|
+
}), /* @__PURE__ */ L(i, {
|
|
2765
|
+
tag: "span",
|
|
2766
|
+
size: "xs",
|
|
2767
|
+
type: "secondary",
|
|
2768
|
+
className: "whitespace-nowrap",
|
|
2769
|
+
children: B.groupCountLabel(Te.get(r ?? "") ?? 0)
|
|
2770
|
+
})]
|
|
2771
|
+
})
|
|
2772
|
+
})
|
|
2773
|
+
}), /* @__PURE__ */ R(O, {
|
|
2774
|
+
className: "h-20 border-b border-border/70 last:border-b-0",
|
|
2775
|
+
children: [
|
|
2776
|
+
U && /* @__PURE__ */ L(k, {
|
|
2777
|
+
className: "w-14 min-w-14 max-w-14 px-0 py-space-lg text-center align-middle",
|
|
2778
|
+
style: { width: "3.5rem" },
|
|
2779
|
+
children: /* @__PURE__ */ L(y, {
|
|
2780
|
+
checked: f,
|
|
2781
|
+
onCheckedChange: (t) => ke(e, t),
|
|
2782
|
+
"aria-label": B.selectRowLabel(n),
|
|
2783
|
+
className: "mx-auto"
|
|
2784
|
+
})
|
|
2785
|
+
}),
|
|
2786
|
+
G.has("variant") && /* @__PURE__ */ L(k, {
|
|
2787
|
+
className: "px-space-lg py-space-lg align-middle",
|
|
2788
|
+
children: j("variant", S, bt, () => /* @__PURE__ */ R(s, {
|
|
2789
|
+
gap: "xs",
|
|
2790
|
+
children: [
|
|
2791
|
+
/* @__PURE__ */ L(i, {
|
|
2792
|
+
weight: "medium",
|
|
2793
|
+
className: "min-w-0 whitespace-normal break-words",
|
|
2794
|
+
children: S
|
|
2795
|
+
}),
|
|
2796
|
+
N,
|
|
2797
|
+
!N && M && u === "text" && /* @__PURE__ */ L(i, {
|
|
2798
|
+
size: "xs",
|
|
2799
|
+
type: "secondary",
|
|
2800
|
+
className: "min-w-0 whitespace-normal break-words",
|
|
2801
|
+
children: v.map((t, n) => /* @__PURE__ */ R("span", { children: [n > 0 ? " / " : null, t] }, `${e.id}-option-text-${n}`))
|
|
2802
|
+
}),
|
|
2803
|
+
!N && M && u === "tags" && /* @__PURE__ */ L(s, {
|
|
2804
|
+
direction: "horizontal",
|
|
2805
|
+
gap: "xs",
|
|
2806
|
+
children: v.map((t, n) => /* @__PURE__ */ L(m, {
|
|
2807
|
+
size: "sm",
|
|
2808
|
+
tone: "secondary",
|
|
2809
|
+
className: "max-w-full",
|
|
2810
|
+
children: t
|
|
2811
|
+
}, `${e.id}-option-${n}`))
|
|
2812
|
+
})
|
|
2813
|
+
]
|
|
2814
|
+
}))
|
|
2815
|
+
}),
|
|
2816
|
+
G.has("sku") && /* @__PURE__ */ L(k, {
|
|
2817
|
+
className: "px-space-lg py-space-md align-middle",
|
|
2818
|
+
children: j("sku", e.sku, Mt(d, "sku"), (t) => Pt(e.sku, `${B.headers.sku}: ${St(S)}`, t.cellDisplay, t.onValueChange, t.onBlur))
|
|
2819
|
+
}),
|
|
2820
|
+
G.has("price") && /* @__PURE__ */ L(k, {
|
|
2821
|
+
className: "px-space-lg py-space-md align-middle",
|
|
2822
|
+
children: j("price", e.price, Mt(d, "price"), (t) => Pt(e.price, `${B.headers.price}: ${St(S)}`, t.cellDisplay, t.onValueChange, t.onBlur))
|
|
2823
|
+
}),
|
|
2824
|
+
G.has("inventory") && /* @__PURE__ */ L(k, {
|
|
2825
|
+
className: "px-space-lg py-space-md align-middle",
|
|
2826
|
+
children: j("inventory", e.inventory, Mt(d, "inventory"), (t) => Pt(e.inventory, `${B.headers.inventory}: ${St(S)}`, t.cellDisplay, t.onValueChange, t.onBlur))
|
|
2827
|
+
}),
|
|
2828
|
+
G.has("status") && /* @__PURE__ */ L(k, {
|
|
2829
|
+
className: "px-space-lg py-space-lg align-middle",
|
|
2830
|
+
children: j("status", e.status, bt, () => e.status ? /* @__PURE__ */ L(m, {
|
|
2831
|
+
tone: e.statusTone ?? "secondary",
|
|
2832
|
+
children: e.status
|
|
2833
|
+
}) : /* @__PURE__ */ L(i, {
|
|
2834
|
+
type: "secondary",
|
|
2835
|
+
children: "-"
|
|
2836
|
+
}))
|
|
2837
|
+
}),
|
|
2838
|
+
G.has("updated") && /* @__PURE__ */ L(k, {
|
|
2839
|
+
className: "px-space-lg py-space-lg align-middle",
|
|
2840
|
+
children: j("updated", e.updatedAt, bt, () => /* @__PURE__ */ L(i, {
|
|
2841
|
+
size: "xs",
|
|
2842
|
+
type: "secondary",
|
|
2843
|
+
children: kt(e.updatedAt)
|
|
2844
|
+
}))
|
|
2845
|
+
}),
|
|
2846
|
+
Z && /* @__PURE__ */ L(k, {
|
|
2847
|
+
className: "px-space-lg py-space-lg text-right align-middle",
|
|
2848
|
+
children: re ? re(e, g) : /* @__PURE__ */ L(Ve, {
|
|
2849
|
+
item: e,
|
|
2850
|
+
actions: P,
|
|
2851
|
+
menuLabel: B.headers.actions
|
|
2852
|
+
})
|
|
2853
|
+
})
|
|
2854
|
+
]
|
|
2855
|
+
})] }, e.id);
|
|
2856
|
+
}) })
|
|
2857
|
+
]
|
|
2858
|
+
})
|
|
2859
|
+
})]
|
|
2860
|
+
});
|
|
2861
|
+
return de === "embedded" ? /* @__PURE__ */ L("section", {
|
|
2862
|
+
"aria-label": B.title,
|
|
2863
|
+
className: n("product-variants-bulk-table--component min-w-0", fe),
|
|
2864
|
+
children: Fe
|
|
2865
|
+
}) : /* @__PURE__ */ L(_, {
|
|
2866
|
+
icon: /* @__PURE__ */ L(_e, { className: "size-icon" }),
|
|
2867
|
+
title: B.title,
|
|
2868
|
+
description: B.description,
|
|
2869
|
+
actions: oe,
|
|
2870
|
+
headerAction: Ne,
|
|
2871
|
+
headerEnd: ce,
|
|
2872
|
+
footerSlot: le,
|
|
2873
|
+
contentClassName: "mt-1",
|
|
2874
|
+
className: n("product-variants-bulk-table--component w-full", fe),
|
|
2875
|
+
children: Fe
|
|
2876
|
+
});
|
|
2877
|
+
}
|
|
2878
|
+
Ft.displayName = "ProductVariantsBulkTable";
|
|
2879
|
+
//#endregion
|
|
2880
|
+
//#region src/components/features/products/components/product-variants-manager.tsx
|
|
2881
|
+
function It({ optionGroups: e = [], variants: a = [], visibleColumns: o, optionCombinationDisplay: c, cellDisplay: l, selectionMode: u, renderOptionCombination: d, renderCell: f, selectedVariantIds: p, defaultSelectedVariantIds: m, onSelectedVariantIdsChange: h, onVariantFieldChange: g, onVariantFieldBlur: v, collapsedOptionIds: y, defaultCollapsedOptionIds: ee, onCollapsedOptionIdsChange: x, editingOptionId: S, defaultEditingOptionId: C, onEditingOptionIdChange: w, onCreateOption: T, onEditOption: E, onDeleteOption: D, onAddValue: O, onDeleteValue: k, onOptionNameChange: te, onValueLabelChange: A, onDoneEditingOption: j, onSaveEditingOption: M, onCancelEditingOption: N, onToggleUsedForVariants: P, renderOptionActions: ne, renderValue: re, onCreateVariant: ie, onGenerateVariants: ae, onSelectVariant: oe, onEditVariant: ce, onDuplicateVariant: le, onDeleteVariant: ue, onBulkEdit: de, onBulkApply: fe, onBulkDelete: z, renderVariantActions: pe, renderBulkActions: me, groupByOptionId: B, defaultGroupByOptionId: he, onGroupByOptionIdChange: ge, onSearchVariants: _e, onFilterVariants: ye, controlsEnd: V, actions: U, headerEnd: be, footerSlot: Se, className: Ce, strings: G, optionsStrings: K, variantsStrings: q }) {
|
|
2882
|
+
let J = t(je, G), we = I(() => e.filter((e) => e.usedForVariants !== !1), [e]), Te = we[0]?.id ?? null, Y = B !== void 0, [Ee, X] = se(he ?? Te), Z = B ?? Ee ?? Te, De = I(() => we.map((e) => ({
|
|
2883
|
+
value: e.id,
|
|
2884
|
+
label: String(typeof e.name == "string" || typeof e.name == "number" ? e.name : e.id)
|
|
2885
|
+
})), [we]), Q = F((t) => {
|
|
2886
|
+
let n = e.find((e) => e.id === t);
|
|
2887
|
+
Y || X(t ?? null), ge?.(t, n);
|
|
2888
|
+
}, [
|
|
2889
|
+
Y,
|
|
2890
|
+
ge,
|
|
2891
|
+
e
|
|
2892
|
+
]), Oe = ae || ie ? /* @__PURE__ */ R(s, {
|
|
2893
|
+
direction: "horizontal",
|
|
2894
|
+
gap: "sm",
|
|
2895
|
+
justify: "end",
|
|
2896
|
+
className: "product-variants-manager--header-actions",
|
|
2897
|
+
children: [!!ae && /* @__PURE__ */ L(r, {
|
|
2898
|
+
type: "button",
|
|
2899
|
+
tone: "secondary",
|
|
2900
|
+
buttonStyle: "outline",
|
|
2901
|
+
onClick: ae,
|
|
2902
|
+
icon: xe,
|
|
2903
|
+
children: J.generateLabel
|
|
2904
|
+
}), !!ie && /* @__PURE__ */ L(r, {
|
|
2905
|
+
type: "button",
|
|
2906
|
+
tone: "secondary",
|
|
2907
|
+
buttonStyle: "outline",
|
|
2908
|
+
onClick: ie,
|
|
2909
|
+
icon: H,
|
|
2910
|
+
children: J.createVariantLabel
|
|
2911
|
+
})]
|
|
2912
|
+
}) : void 0;
|
|
2913
|
+
return /* @__PURE__ */ L(_, {
|
|
2914
|
+
title: J.title,
|
|
2915
|
+
description: J.description,
|
|
2916
|
+
actions: U,
|
|
2917
|
+
actionsLabel: J.actionsLabel,
|
|
2918
|
+
headerAction: Oe,
|
|
2919
|
+
headerEnd: be,
|
|
2920
|
+
footerSlot: Se,
|
|
2921
|
+
contentClassName: "mt-1 px-0 pb-0",
|
|
2922
|
+
className: n("product-variants-manager--component w-full", Ce),
|
|
2923
|
+
children: /* @__PURE__ */ R(s, {
|
|
2924
|
+
gap: "none",
|
|
2925
|
+
className: "product-variants-manager--body",
|
|
2926
|
+
children: [
|
|
2927
|
+
/* @__PURE__ */ L("section", {
|
|
2928
|
+
className: "product-variants-manager--options min-w-0 px-surface pb-space-lg",
|
|
2929
|
+
children: /* @__PURE__ */ L(nt, {
|
|
2930
|
+
optionGroups: e,
|
|
2931
|
+
collapsedOptionIds: y,
|
|
2932
|
+
defaultCollapsedOptionIds: ee,
|
|
2933
|
+
onCollapsedOptionIdsChange: x,
|
|
2934
|
+
editingOptionId: S,
|
|
2935
|
+
defaultEditingOptionId: C,
|
|
2936
|
+
onEditingOptionIdChange: w,
|
|
2937
|
+
surface: "embedded",
|
|
2938
|
+
onCreateOption: T,
|
|
2939
|
+
onEditOption: E,
|
|
2940
|
+
onDeleteOption: D,
|
|
2941
|
+
onAddValue: O,
|
|
2942
|
+
onDeleteValue: k,
|
|
2943
|
+
onOptionNameChange: te,
|
|
2944
|
+
onValueLabelChange: A,
|
|
2945
|
+
onDoneEditingOption: j,
|
|
2946
|
+
onSaveEditingOption: M,
|
|
2947
|
+
onCancelEditingOption: N,
|
|
2948
|
+
onToggleUsedForVariants: P,
|
|
2949
|
+
renderOptionActions: ne,
|
|
2950
|
+
renderValue: re,
|
|
2951
|
+
showHeader: !1,
|
|
2952
|
+
showCollapseControls: !1,
|
|
2953
|
+
showInlineActions: !1,
|
|
2954
|
+
showVariantToggle: !1,
|
|
2955
|
+
strings: {
|
|
2956
|
+
title: J.optionsTitle,
|
|
2957
|
+
...K
|
|
2958
|
+
}
|
|
2959
|
+
})
|
|
2960
|
+
}),
|
|
2961
|
+
/* @__PURE__ */ L("div", {
|
|
2962
|
+
className: "product-variants-manager--controls border-t border-border/70 px-surface py-space-md",
|
|
2963
|
+
children: /* @__PURE__ */ R(s, {
|
|
2964
|
+
direction: "horizontal",
|
|
2965
|
+
gap: "md",
|
|
2966
|
+
justify: "between",
|
|
2967
|
+
children: [/* @__PURE__ */ R(s, {
|
|
2968
|
+
direction: "horizontal",
|
|
2969
|
+
gap: "sm",
|
|
2970
|
+
wrap: !1,
|
|
2971
|
+
className: "product-variants-manager--group-by",
|
|
2972
|
+
children: [/* @__PURE__ */ L(i, {
|
|
2973
|
+
type: "secondary",
|
|
2974
|
+
className: "whitespace-nowrap",
|
|
2975
|
+
children: J.groupByLabel
|
|
2976
|
+
}), De.length > 0 && /* @__PURE__ */ L(b, {
|
|
2977
|
+
options: De,
|
|
2978
|
+
value: Z,
|
|
2979
|
+
onValueChange: Q,
|
|
2980
|
+
"aria-label": J.groupByLabel,
|
|
2981
|
+
className: "min-w-32 bg-background"
|
|
2982
|
+
})]
|
|
2983
|
+
}), /* @__PURE__ */ R(s, {
|
|
2984
|
+
direction: "horizontal",
|
|
2985
|
+
gap: "sm",
|
|
2986
|
+
justify: "end",
|
|
2987
|
+
wrap: !1,
|
|
2988
|
+
className: "product-variants-manager--controls-end",
|
|
2989
|
+
children: [/* @__PURE__ */ R("div", {
|
|
2990
|
+
className: "product-variants-manager--tool-buttons inline-flex overflow-hidden rounded-radius border border-border bg-background shadow-xs",
|
|
2991
|
+
children: [/* @__PURE__ */ R(r, {
|
|
2992
|
+
type: "button",
|
|
2993
|
+
size: "sm",
|
|
2994
|
+
iconOnly: !0,
|
|
2995
|
+
tone: "secondary",
|
|
2996
|
+
buttonStyle: "ghost",
|
|
2997
|
+
onClick: _e,
|
|
2998
|
+
"aria-label": J.searchLabel,
|
|
2999
|
+
className: "rounded-none border-r border-border text-muted-foreground hover:text-foreground",
|
|
3000
|
+
children: [/* @__PURE__ */ L(W, {
|
|
3001
|
+
className: "size-icon-sm",
|
|
3002
|
+
"aria-hidden": "true"
|
|
3003
|
+
}), /* @__PURE__ */ L(i, {
|
|
3004
|
+
tag: "span",
|
|
3005
|
+
size: "pxs",
|
|
3006
|
+
className: "sr-only",
|
|
3007
|
+
children: J.searchLabel
|
|
3008
|
+
})]
|
|
3009
|
+
}), /* @__PURE__ */ R(r, {
|
|
3010
|
+
type: "button",
|
|
3011
|
+
size: "sm",
|
|
3012
|
+
iconOnly: !0,
|
|
3013
|
+
tone: "secondary",
|
|
3014
|
+
buttonStyle: "ghost",
|
|
3015
|
+
onClick: ye,
|
|
3016
|
+
"aria-label": J.filterLabel,
|
|
3017
|
+
className: "rounded-none text-muted-foreground hover:text-foreground",
|
|
3018
|
+
children: [/* @__PURE__ */ L(ve, {
|
|
3019
|
+
className: "size-icon-sm",
|
|
3020
|
+
"aria-hidden": "true"
|
|
3021
|
+
}), /* @__PURE__ */ L(i, {
|
|
3022
|
+
tag: "span",
|
|
3023
|
+
size: "pxs",
|
|
3024
|
+
className: "sr-only",
|
|
3025
|
+
children: J.filterLabel
|
|
3026
|
+
})]
|
|
3027
|
+
})]
|
|
3028
|
+
}), V]
|
|
3029
|
+
})]
|
|
3030
|
+
})
|
|
3031
|
+
}),
|
|
3032
|
+
/* @__PURE__ */ L("section", {
|
|
3033
|
+
className: "product-variants-manager--variants min-w-0 px-surface pb-surface pt-space-md",
|
|
3034
|
+
children: /* @__PURE__ */ L(Ft, {
|
|
3035
|
+
variants: a,
|
|
3036
|
+
optionGroups: e,
|
|
3037
|
+
groupByOptionId: Z,
|
|
3038
|
+
visibleColumns: o,
|
|
3039
|
+
optionCombinationDisplay: c,
|
|
3040
|
+
cellDisplay: l,
|
|
3041
|
+
selectionMode: u,
|
|
3042
|
+
renderOptionCombination: d,
|
|
3043
|
+
renderCell: f,
|
|
3044
|
+
surface: "embedded",
|
|
3045
|
+
selectedVariantIds: p,
|
|
3046
|
+
defaultSelectedVariantIds: m,
|
|
3047
|
+
onSelectedVariantIdsChange: h,
|
|
3048
|
+
onVariantFieldChange: g,
|
|
3049
|
+
onVariantFieldBlur: v,
|
|
3050
|
+
onCreateVariant: ie,
|
|
3051
|
+
onGenerateVariants: ae,
|
|
3052
|
+
onSelectVariant: oe,
|
|
3053
|
+
onEditVariant: ce,
|
|
3054
|
+
onDuplicateVariant: le,
|
|
3055
|
+
onDeleteVariant: ue,
|
|
3056
|
+
onBulkEdit: de,
|
|
3057
|
+
onBulkApply: fe,
|
|
3058
|
+
onBulkDelete: z,
|
|
3059
|
+
renderVariantActions: pe,
|
|
3060
|
+
renderBulkActions: me,
|
|
3061
|
+
strings: {
|
|
3062
|
+
title: J.variantsTitle,
|
|
3063
|
+
generateLabel: J.generateLabel,
|
|
3064
|
+
...q
|
|
3065
|
+
}
|
|
3066
|
+
})
|
|
3067
|
+
})
|
|
3068
|
+
]
|
|
3069
|
+
})
|
|
3070
|
+
});
|
|
3071
|
+
}
|
|
3072
|
+
It.displayName = "ProductVariantsManager";
|
|
3073
|
+
//#endregion
|
|
3074
|
+
export { Je as ProductContractOverview, Ye as ProductDetailsCard, Ze as ProductOperationsCard, Xe as ProductOptionActionMenu, nt as ProductOptionsMatrix, rt as ProductOptionsSummary, dt as ProductOverview, it as ProductPoliciesCard, at as ProductQuotePreviewCard, ot as ProductReadinessCard, st as ProductStructureCard, ft as ProductVariantActionMenu, ht as ProductVariantDetails, _t as ProductVariantEditor, Ft as ProductVariantsBulkTable, It as ProductVariantsManager, ut as ProductVariantsTable, Ee as defaultProductContractOverviewStrings, Y as defaultProductDetailsCardStrings, Te as defaultProductOperationsCardStrings, Z as defaultProductOptionActionMenuStrings, De as defaultProductOptionsMatrixStrings, X as defaultProductOptionsSummaryStrings, Fe as defaultProductOverviewStrings, Oe as defaultProductPoliciesCardStrings, Q as defaultProductQuotePreviewCardStrings, J as defaultProductReadinessCardStrings, we as defaultProductStructureCardStrings, Me as defaultProductVariantActionMenuStrings, Ne as defaultProductVariantDetailsStrings, Pe as defaultProductVariantEditorStrings, Ae as defaultProductVariantsBulkTableStrings, je as defaultProductVariantsManagerStrings, ke as defaultProductVariantsTableStrings };
|
|
3075
|
+
|
|
3076
|
+
//# sourceMappingURL=products.js.map
|