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