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