themelia-react-ui 2.0.3 → 2.0.5
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 +185 -0
- package/README.md +168 -36
- package/dist/{accordion-Cjb6sx0G.js → accordion-B9MHG0cT.js} +11 -11
- package/dist/accordion-B9MHG0cT.js.map +1 -0
- package/dist/action-menu-Dr8K-ghE.js +284 -0
- package/dist/action-menu-Dr8K-ghE.js.map +1 -0
- package/dist/{affordance-geometry.generated-tF36bREk.js → affordance-geometry.generated-P-aVJisu.js} +42 -36
- package/dist/affordance-geometry.generated-P-aVJisu.js.map +1 -0
- package/dist/{ai-artifact-DvTwDVyL.js → ai-artifact-C58tQcBy.js} +387 -350
- package/dist/ai-artifact-C58tQcBy.js.map +1 -0
- package/dist/app-shell-B_IuNWOo.js +321 -0
- package/dist/app-shell-B_IuNWOo.js.map +1 -0
- package/dist/{attachment-BxDfL2mw.js → attachment-Dg_69lPS.js} +9 -9
- package/dist/{attachment-BxDfL2mw.js.map → attachment-Dg_69lPS.js.map} +1 -1
- package/dist/{auth-BGua8ouh.js → auth-DTkkshS8.js} +44 -47
- package/dist/auth-DTkkshS8.js.map +1 -0
- package/dist/{avatar-DAPlDvhJ.js → avatar-CeZaFmNH.js} +8 -8
- package/dist/avatar-CeZaFmNH.js.map +1 -0
- package/dist/{badge-HpFqoqSY.js → badge-xIiV_E7f.js} +5 -5
- package/dist/{badge-HpFqoqSY.js.map → badge-xIiV_E7f.js.map} +1 -1
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +3 -3
- package/dist/base/cascader.js +2 -372
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +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 +6 -6
- package/dist/base/feedback.js +3 -3
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +3 -3
- package/dist/base/inline-edit.js +10 -10
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +7 -7
- package/dist/base/popover-menu.js +1 -1
- package/dist/base/popover.js +1 -1
- package/dist/base/qr-code.js +1 -1
- package/dist/base/repeaters.js +12 -12
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +2 -2
- package/dist/base/signature-pad.js +7 -7
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +4 -4
- 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 +36 -36
- 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 +1 -1
- package/dist/{batch-action-bar-DnUJ21NQ.js → batch-action-bar-Cb8cuvyy.js} +6 -6
- package/dist/batch-action-bar-Cb8cuvyy.js.map +1 -0
- package/dist/blocks/admin.js +23 -23
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +230 -216
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +326 -307
- 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 +1247 -1169
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +6 -6
- package/dist/blocks/onboarding.js.map +1 -1
- package/dist/blocks/planning.js +11 -11
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-C-oqs1sQ.js → breadcrumbs-J-K2kl4c.js} +6 -6
- package/dist/{breadcrumbs-C-oqs1sQ.js.map → breadcrumbs-J-K2kl4c.js.map} +1 -1
- package/dist/{button-DVzspB_G.js → button-S2Cubiiz.js} +3 -3
- package/dist/button-S2Cubiiz.js.map +1 -0
- package/dist/{buttons-DPZekJFu.js → buttons-BedGfygC.js} +16 -16
- package/dist/buttons-BedGfygC.js.map +1 -0
- package/dist/cards-rNX1M4Xn.js +69 -0
- package/dist/cards-rNX1M4Xn.js.map +1 -0
- package/dist/cascader-B1MiqkBq.js +439 -0
- package/dist/cascader-B1MiqkBq.js.map +1 -0
- package/dist/chart-Darg_0Kv.js +162 -0
- package/dist/chart-Darg_0Kv.js.map +1 -0
- package/dist/{checkbox-AWIhNhmo.js → checkbox-fflqmODR.js} +9 -5
- package/dist/checkbox-fflqmODR.js.map +1 -0
- package/dist/choice-inputs-zUgBZfE4.js +777 -0
- package/dist/choice-inputs-zUgBZfE4.js.map +1 -0
- package/dist/{code-block-DeneBJR_.js → code-block-BzmM9Eig.js} +9 -9
- package/dist/code-block-BzmM9Eig.js.map +1 -0
- package/dist/{collapsible-C-_l4hpy.js → collapsible-BkAI_XD4.js} +5 -5
- package/dist/{collapsible-C-_l4hpy.js.map → collapsible-BkAI_XD4.js.map} +1 -1
- package/dist/{collection-content-By56pLog.js → collection-content-gDh1v6O4.js} +3 -3
- package/dist/{collection-content-By56pLog.js.map → collection-content-gDh1v6O4.js.map} +1 -1
- package/dist/combobox-BEx0vJgF.js +362 -0
- package/dist/combobox-BEx0vJgF.js.map +1 -0
- package/dist/{combobox-Dxo2fAYQ.js → combobox-BwzoXFSG.js} +254 -247
- package/dist/combobox-BwzoXFSG.js.map +1 -0
- package/dist/{command-C25VMRII.js → command-CrlPIL6m.js} +12 -12
- package/dist/command-CrlPIL6m.js.map +1 -0
- package/dist/{comments-DD0DUPwJ.js → comments-Dmpp0YIc.js} +380 -379
- package/dist/comments-Dmpp0YIc.js.map +1 -0
- package/dist/components/base/action-menu/action-menu.d.ts +9 -1
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/cards/card.recipes.d.ts +16 -7
- package/dist/components/base/cards/partials/card-primitives.d.ts +9 -2
- package/dist/components/base/cards/partials/smart-card-header-row.d.ts +3 -1
- package/dist/components/base/cards/smart-card.types.d.ts +11 -7
- package/dist/components/base/cascader/cascader-panel.d.ts +76 -0
- package/dist/components/base/chart/chart.d.ts +6 -1
- package/dist/components/base/choice-inputs/checkbox.d.ts +7 -2
- package/dist/components/base/choice-inputs/choice-types.d.ts +1 -1
- package/dist/components/base/choice-inputs/switch-card.d.ts +7 -0
- package/dist/components/base/choice-inputs/toggle-field.d.ts +7 -0
- package/dist/components/base/combobox/index.d.ts +4 -2
- package/dist/components/base/date-pickers/datepicker.types.d.ts +7 -0
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/forms/controlled-form-field.d.ts +6 -6
- package/dist/components/base/forms/form-field.d.ts +5 -3
- package/dist/components/base/forms/form-sizing.d.ts +7 -7
- package/dist/components/base/forms/index.d.ts +1 -0
- package/dist/components/base/forms/server-errors.d.ts +16 -0
- package/dist/components/base/forms/workflow.d.ts +11 -2
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +4 -0
- package/dist/components/base/metadata-list/metadata-list.d.ts +3 -1
- package/dist/components/base/navigation/dropdown-menu.d.ts +1 -1
- package/dist/components/base/navigation/page-header/page-header-commands.d.ts +14 -7
- package/dist/components/base/navigation/page-header/page-header.d.ts +13 -4
- package/dist/components/base/popover/popover.d.ts +3 -3
- package/dist/components/base/popover/popover.recipes.d.ts +10 -6
- package/dist/components/base/sheet/sheet.d.ts +2 -0
- package/dist/components/base/sidebar/index.d.ts +1 -1
- package/dist/components/base/sidebar/sidebar.d.ts +27 -5
- package/dist/components/base/structure/composition.recipes.d.ts +17 -0
- package/dist/components/base/text-inputs/hooks/use-form-field-state.d.ts +7 -2
- package/dist/components/base/text-inputs/input.d.ts +4 -2
- package/dist/components/base/text-inputs/textarea.d.ts +4 -2
- package/dist/components/base/toaster/index.d.ts +1 -0
- package/dist/components/base/value-inputs/date-time-input.d.ts +2 -1
- package/dist/components/base/value-inputs/slider.d.ts +5 -1
- package/dist/components/base/value-inputs/tags-input.d.ts +5 -1
- package/dist/components/blocks/ai/ai-file-tree/types.d.ts +1 -1
- package/dist/components/blocks/ai/ai-tool-call/types.d.ts +3 -1
- package/dist/components/blocks/ai/ai.strings.d.ts +2 -0
- package/dist/components/blocks/analytics/metric-comparison/metric-comparison.d.ts +2 -0
- package/dist/components/blocks/analytics/usage-card/usage-card.strings.d.ts +2 -0
- package/dist/components/blocks/commerce/cart-summary/cart-summary.d.ts +1 -1
- package/dist/components/blocks/commerce/cart-summary/types.d.ts +3 -1
- package/dist/components/blocks/commerce/discount-stack/discount-stack.d.ts +1 -1
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +3 -1
- package/dist/components/blocks/commerce/fulfillment-group/fulfillment-group.d.ts +1 -1
- package/dist/components/blocks/commerce/fulfillment-group/types.d.ts +11 -2
- package/dist/components/blocks/commerce/index.d.ts +7 -6
- package/dist/components/blocks/commerce/inventory-section/inventory-section.d.ts +1 -1
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +7 -2
- package/dist/components/blocks/commerce/invoice-header/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-header/invoice-header.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-header/types.d.ts +20 -6
- package/dist/components/blocks/commerce/invoice-line-items/invoice-line-items.d.ts +1 -1
- package/dist/components/blocks/commerce/invoice-line-items/types.d.ts +24 -7
- package/dist/components/blocks/commerce/invoice-mini/index.d.ts +2 -1
- package/dist/components/blocks/commerce/invoice-mini/types.d.ts +7 -1
- package/dist/components/blocks/commerce/order-customer/order-customer.d.ts +1 -1
- package/dist/components/blocks/commerce/order-customer/types.d.ts +9 -1
- package/dist/components/blocks/commerce/refund-status/refund-status.d.ts +1 -1
- package/dist/components/blocks/commerce/refund-status/types.d.ts +3 -1
- package/dist/components/blocks/commerce/shipment-tracking/shipment-tracking.d.ts +1 -1
- package/dist/components/blocks/commerce/shipment-tracking/types.d.ts +3 -1
- package/dist/components/blocks/commerce/tax-breakdown/tax-breakdown.d.ts +1 -1
- package/dist/components/blocks/commerce/tax-breakdown/types.d.ts +3 -1
- package/dist/components/features/activities/activities.types.d.ts +8 -2
- package/dist/components/features/activities/partials/activity-marker.d.ts +7 -3
- package/dist/components/features/activities/partials/activity-row.d.ts +24 -0
- package/dist/components/features/event-calendar/colors.d.ts +2 -2
- package/dist/components/features/event-calendar/event-calendar.types.d.ts +4 -0
- package/dist/components/features/filters/facets/select-facet.d.ts +2 -1
- package/dist/components/features/filters/filters.strings.d.ts +4 -0
- package/dist/components/features/filters/filters.types.d.ts +3 -0
- package/dist/components/features/filters/partials/filter-editor-header.d.ts +16 -0
- package/dist/components/features/filters/partials/filter-popover-content.d.ts +1 -1
- package/dist/components/features/filters/partials/nested-filter-options.d.ts +21 -0
- package/dist/components/features/filters/partials/regular-filter-content.d.ts +2 -1
- package/dist/components/features/filters/utils/filter-utils.d.ts +21 -3
- package/dist/components/features/global-search/global-search.types.d.ts +2 -0
- package/dist/components/features/global-search/partials/global-search-input.d.ts +10 -0
- package/dist/components/features/global-search/partials/global-search-result-row.d.ts +7 -1
- package/dist/components/features/media-library/media-library.strings.d.ts +2 -0
- package/dist/components/features/media-library/media-library.types.d.ts +14 -4
- package/dist/components/features/media-library/partials/media-library-partials.d.ts +1 -1
- package/dist/components/features/products/components/product-options-matrix.d.ts +1 -1
- package/dist/components/features/products/components/product-variant-editor.d.ts +1 -1
- package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
- package/dist/components/features/products/products.strings.d.ts +9 -1
- package/dist/components/features/products/products.types.d.ts +43 -6
- package/dist/components/features/resource/resource.d.ts +5 -1
- package/dist/components/features/resource/resource.types.d.ts +12 -1
- package/dist/components/features/rich-text-editor/partials/image-uploads.d.ts +1 -1
- package/dist/components/features/rich-text-editor/rich-text-editor.recipes.d.ts +12 -2
- package/dist/components/features/table/partials/resource-cell.d.ts +22 -5
- package/dist/components/features/table/table.types.d.ts +1 -1
- package/dist/components/layout/app-shell/app-shell.types.d.ts +35 -6
- package/dist/components/layout/app-shell/index.d.ts +1 -1
- package/dist/components/layout/app-shell/shell-regions.d.ts +27 -0
- package/dist/components/layout/app-shell/sidebar-inset-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/stacked-layout.d.ts +1 -1
- package/dist/components/layout/app-shell/topbar-sidebar-layout.d.ts +1 -1
- package/dist/components/layout/containers/two-column-layout.d.ts +2 -0
- package/dist/components/layout/header/header.recipes.d.ts +6 -0
- package/dist/components/layout/header/header.types.d.ts +6 -6
- package/dist/components/layout/navigation/section-nav/section-nav.d.ts +5 -0
- package/dist/components/layout/page/index.d.ts +2 -1
- package/dist/components/layout/page/page.d.ts +1 -0
- package/dist/components/layout/page/page.strings.d.ts +11 -0
- package/dist/components/layout/page/page.types.d.ts +69 -17
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/layout/settings/settings.d.ts +9 -2
- package/dist/components/layout/sidebar/app-sidebar.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-grouped-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/components/sidebar-navigation.d.ts +1 -1
- package/dist/components/layout/sidebar/index.d.ts +2 -1
- package/dist/components/layout/sidebar/sidebar-navigation-rail.d.ts +36 -0
- package/dist/components/layout/sidebar/sidebar.context.d.ts +5 -7
- package/dist/components/layout/sidebar/sidebar.types.d.ts +48 -10
- package/dist/components/layout/sidebar/sidebar.utils.d.ts +9 -1
- package/dist/components/layout/workspace/workspace.types.d.ts +8 -1
- package/dist/components/typography/text.styles.d.ts +26 -1
- package/dist/components/ui/alert-dialog.d.ts +2 -2
- package/dist/components/ui/combobox.d.ts +1 -1
- package/dist/components/ui/dialog.d.ts +2 -2
- package/dist/components/ui/overlay-layer.d.ts +18 -0
- package/dist/components/ui/sheet.d.ts +5 -1
- package/dist/components/ui/sidebar-state.d.ts +82 -0
- package/dist/components/ui/sidebar.d.ts +5 -17
- package/dist/composition.recipes-COdiFhxB.js +19 -0
- package/dist/composition.recipes-COdiFhxB.js.map +1 -0
- package/dist/containers-CIxwbZt5.js +112 -0
- package/dist/containers-CIxwbZt5.js.map +1 -0
- package/dist/{control-group-recipes-DBXmfh2E.js → control-group-recipes-fMuFo0H7.js} +6 -6
- package/dist/control-group-recipes-fMuFo0H7.js.map +1 -0
- package/dist/{copyable-ClBuk_UK.js → copyable-DIznBqiT.js} +7 -7
- package/dist/{copyable-ClBuk_UK.js.map → copyable-DIznBqiT.js.map} +1 -1
- package/dist/{data-display-DT_khPl_.js → data-display-BdgCAw8T.js} +277 -285
- package/dist/data-display-BdgCAw8T.js.map +1 -0
- package/dist/{date-DCrsDTZc.js → date-Cq8ioE4o.js} +5 -5
- package/dist/{date-DCrsDTZc.js.map → date-Cq8ioE4o.js.map} +1 -1
- package/dist/{date-picker-B2K3ucWn.js → date-picker-RlIzKom_.js} +501 -480
- package/dist/date-picker-RlIzKom_.js.map +1 -0
- package/dist/date-pickers-DY-CpXS1.js +179 -0
- package/dist/date-pickers-DY-CpXS1.js.map +1 -0
- package/dist/{display-hAc1HjpI.js → display-KsZLw9Ov.js} +9 -9
- package/dist/{display-hAc1HjpI.js.map → display-KsZLw9Ov.js.map} +1 -1
- package/dist/dropdown-menu-CLs8Lihj.js +194 -0
- package/dist/dropdown-menu-CLs8Lihj.js.map +1 -0
- package/dist/features/activities.js +302 -253
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +15 -14
- package/dist/features/ai-chat.js.map +1 -1
- package/dist/features/appointment-calendar.js +222 -220
- package/dist/features/appointment-calendar.js.map +1 -1
- package/dist/features/async-preview.js +11 -10
- 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 +13 -13
- package/dist/features/data-view.js.map +1 -1
- package/dist/features/email-composer.js +249 -249
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +264 -269
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +167 -138
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +6 -7
- package/dist/features/kanban.js.map +1 -1
- package/dist/features/map.js +269 -260
- package/dist/features/map.js.map +1 -1
- package/dist/features/media-library.js +827 -777
- 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 +1246 -1169
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +13 -13
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +8 -8
- package/dist/features/resource.js +127 -123
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +254 -253
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +3 -3
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +95 -96
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-BYIhtitP.js → feedback-Dm4izqFn.js} +81 -80
- package/dist/feedback-Dm4izqFn.js.map +1 -0
- package/dist/{field-affordance-recipes-DZhnIL_Y.js → field-affordance-recipes-DWcNcOjh.js} +4 -4
- package/dist/field-affordance-recipes-DWcNcOjh.js.map +1 -0
- package/dist/{filters-DJVAveHA.js → filters-DzgSJpMK.js} +693 -645
- package/dist/filters-DzgSJpMK.js.map +1 -0
- package/dist/{form-field-CwH9y77i.js → form-field-BriWAXyg.js} +14 -8
- package/dist/form-field-BriWAXyg.js.map +1 -0
- package/dist/{form-sizing-BdP_Mf5p.js → form-sizing-Bs2qFUeE.js} +4 -4
- package/dist/form-sizing-Bs2qFUeE.js.map +1 -0
- package/dist/forms-C0RGnJTe.js +216 -0
- package/dist/forms-C0RGnJTe.js.map +1 -0
- package/dist/{forms-numeric-B_jraJaQ.js → forms-numeric-DIhghX1Q.js} +295 -291
- package/dist/forms-numeric-DIhghX1Q.js.map +1 -0
- package/dist/{header-BSfIEWbI.js → header-DMMxG__r.js} +67 -63
- package/dist/header-DMMxG__r.js.map +1 -0
- package/dist/header.recipes-BigdJjw1.js +6 -0
- package/dist/header.recipes-BigdJjw1.js.map +1 -0
- package/dist/hooks/useFormErrors.d.ts +1 -1
- package/dist/{hooks-ClH9thn4.js → hooks-DB6CJ4MR.js} +26 -14
- package/dist/hooks-DB6CJ4MR.js.map +1 -0
- package/dist/{icon-badge-DYKIwvOV.js → icon-badge-DZF-YjQp.js} +4 -4
- package/dist/{icon-badge-DYKIwvOV.js.map → icon-badge-DZF-YjQp.js.map} +1 -1
- package/dist/index.js +4 -5
- package/dist/input-CvyDQlY7.js +289 -0
- package/dist/input-CvyDQlY7.js.map +1 -0
- package/dist/input-DMBwAZmr.js +21 -0
- package/dist/input-DMBwAZmr.js.map +1 -0
- package/dist/item-DjCcM18E.js +277 -0
- package/dist/item-DjCcM18E.js.map +1 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth.js +1 -1
- package/dist/layout/containers.js +1 -1
- package/dist/layout/header.js +1 -1
- package/dist/layout/hooks.js +1 -1
- package/dist/layout/navigation.js +1 -1
- package/dist/layout/page.js +2 -2
- package/dist/layout/settings.js +1 -1
- package/dist/layout/sidebar.js +3 -3
- package/dist/layout/workspace.js +1 -1
- package/dist/layout.js +11 -11
- package/dist/lib/affordance-geometry.generated.d.ts +41 -35
- package/dist/lib/control-group-recipes.d.ts +5 -5
- package/dist/lib/field-affordance-recipes.d.ts +2 -2
- package/dist/lib/motion-recipes.d.ts +3 -0
- package/dist/lib/navigation-row-recipes.d.ts +7 -7
- package/dist/lib/overlay-anatomy-recipes.d.ts +3 -3
- package/dist/lib/portal-recipes.d.ts +3 -0
- package/dist/lib/token-merge.generated.d.ts +13 -10
- package/dist/lib/ui-provider/types.d.ts +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/map-demo-tile.svg +1 -1
- package/dist/{media-gallery-3zIVLMWH.js → media-gallery-C-vChPmE.js} +6 -6
- package/dist/{media-gallery-3zIVLMWH.js.map → media-gallery-C-vChPmE.js.map} +1 -1
- package/dist/{mentions-CGlEJ15c.js → mentions-0_4nWuI-.js} +10 -10
- package/dist/{mentions-CGlEJ15c.js.map → mentions-0_4nWuI-.js.map} +1 -1
- package/dist/{message-DZ_ruyUV.js → message-g8p7eVtN.js} +7 -7
- package/dist/message-g8p7eVtN.js.map +1 -0
- package/dist/metadata-list-C3MkU-Om.js +443 -0
- package/dist/metadata-list-C3MkU-Om.js.map +1 -0
- package/dist/{motion-recipes-ChBg4HBq.js → motion-recipes-DitYv6P2.js} +10 -2
- package/dist/motion-recipes-DitYv6P2.js.map +1 -0
- package/dist/navigation-C90-oQFq.js +255 -0
- package/dist/navigation-C90-oQFq.js.map +1 -0
- package/dist/{navigation-BzhHI3lo.js → navigation-DaRjthVk.js} +101 -82
- package/dist/navigation-DaRjthVk.js.map +1 -0
- package/dist/{navigation-row-recipes-BFLCk_Aq.js → navigation-row-recipes-BGVLvU_O.js} +9 -9
- package/dist/navigation-row-recipes-BGVLvU_O.js.map +1 -0
- package/dist/{number-DbV1Dija.js → number-CRU3kGuk.js} +5 -5
- package/dist/{number-DbV1Dija.js.map → number-CRU3kGuk.js.map} +1 -1
- package/dist/overflow-tab-bar-IVFVQFV6.js +172 -0
- package/dist/overflow-tab-bar-IVFVQFV6.js.map +1 -0
- package/dist/overlays-BSgCtM2v.js +1013 -0
- package/dist/overlays-BSgCtM2v.js.map +1 -0
- package/dist/page-DUUKDAjo.js +331 -0
- package/dist/page-DUUKDAjo.js.map +1 -0
- package/dist/page-header-commands-7P3sfE9u.js +193 -0
- package/dist/page-header-commands-7P3sfE9u.js.map +1 -0
- package/dist/{pagination-BL25hu2s.js → pagination-CgCjElfu.js} +7 -7
- package/dist/{pagination-BL25hu2s.js.map → pagination-CgCjElfu.js.map} +1 -1
- package/dist/popover-B85RenIl.js +201 -0
- package/dist/popover-B85RenIl.js.map +1 -0
- package/dist/{popover-menu-Cn9rUkdc.js → popover-menu-DlnQ2zlR.js} +7 -7
- package/dist/{popover-menu-Cn9rUkdc.js.map → popover-menu-DlnQ2zlR.js.map} +1 -1
- package/dist/{popover.recipes-D3j8R8Yp.js → popover.recipes-DdiEp0rd.js} +18 -11
- package/dist/popover.recipes-DdiEp0rd.js.map +1 -0
- package/dist/portal-recipes-BpsV_iRw.js +9 -0
- package/dist/portal-recipes-BpsV_iRw.js.map +1 -0
- package/dist/{primitives-BFK08r9M.js → primitives-ByWgGUgt.js} +6 -6
- package/dist/{primitives-BFK08r9M.js.map → primitives-ByWgGUgt.js.map} +1 -1
- package/dist/primitives.js +4 -4
- package/dist/{progress-B1VnCT0K.js → progress-BJhQP9WX.js} +9 -9
- package/dist/{progress-B1VnCT0K.js.map → progress-BJhQP9WX.js.map} +1 -1
- package/dist/{receipt-BVSOH3Xo.js → receipt-tOc7B3hw.js} +7 -7
- package/dist/receipt-tOc7B3hw.js.map +1 -0
- package/dist/{rich-text-GOUyKQ-s.js → rich-text-Dth5E882.js} +4 -4
- package/dist/{rich-text-GOUyKQ-s.js.map → rich-text-Dth5E882.js.map} +1 -1
- package/dist/{rich-text-editor-cRLC-eBK.js → rich-text-editor-C1fOjBTd.js} +429 -430
- package/dist/rich-text-editor-C1fOjBTd.js.map +1 -0
- package/dist/{rich-text-editor-toolbar-DfXg0-VC.js → rich-text-editor-toolbar-laT3tpBT.js} +33 -29
- package/dist/rich-text-editor-toolbar-laT3tpBT.js.map +1 -0
- package/dist/{scroll-area-DcI-M1UT.js → scroll-area-B0dB2cBi.js} +2 -2
- package/dist/{scroll-area-DcI-M1UT.js.map → scroll-area-B0dB2cBi.js.map} +1 -1
- package/dist/{separator-Bom7NsGO.js → separator-Bb17I4pu.js} +2 -2
- package/dist/{separator-Bom7NsGO.js.map → separator-Bb17I4pu.js.map} +1 -1
- package/dist/{separator-BDV-Y648.js → separator-Ct_WSWTJ.js} +3 -3
- package/dist/{separator-BDV-Y648.js.map → separator-Ct_WSWTJ.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/settings-Bar5wiSo.js +167 -0
- package/dist/settings-Bar5wiSo.js.map +1 -0
- package/dist/sheet-BGPERY55.js +250 -0
- package/dist/sheet-BGPERY55.js.map +1 -0
- package/dist/sidebar-D-JYMMbY.js +686 -0
- package/dist/sidebar-D-JYMMbY.js.map +1 -0
- package/dist/sidebar-f9gRWXIR.js +1001 -0
- package/dist/sidebar-f9gRWXIR.js.map +1 -0
- package/dist/skeleton-BapcJd9C.js +265 -0
- package/dist/skeleton-BapcJd9C.js.map +1 -0
- package/dist/smart-card-CW0hjetE.js +617 -0
- package/dist/smart-card-CW0hjetE.js.map +1 -0
- package/dist/{structure-BmisBK-3.js → structure-DuxKl954.js} +3 -3
- package/dist/{structure-BmisBK-3.js.map → structure-DuxKl954.js.map} +1 -1
- package/dist/{structure.recipes-EPz60cU8.js → structure.recipes-BB4-n58V.js} +2 -2
- package/dist/{structure.recipes-EPz60cU8.js.map → structure.recipes-BB4-n58V.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{table-DsfzoUia.js → table-B4TE7iOV.js} +3 -3
- package/dist/{table-DsfzoUia.js.map → table-B4TE7iOV.js.map} +1 -1
- package/dist/{table-BweFy_P9.js → table-CFOWY9pQ.js} +394 -388
- package/dist/table-CFOWY9pQ.js.map +1 -0
- package/dist/{tabs-CDocW5D1.js → tabs-e7ko9S2o.js} +11 -11
- package/dist/tabs-e7ko9S2o.js.map +1 -0
- package/dist/{text-inputs-f9Ia-aCi.js → text-inputs-B1culiSK.js} +107 -104
- package/dist/text-inputs-B1culiSK.js.map +1 -0
- package/dist/{text.styles-g4He6UIW.js → text.styles-B64My8RZ.js} +25 -10
- package/dist/text.styles-B64My8RZ.js.map +1 -0
- package/dist/theme.css +192 -149
- package/dist/{timelines-CwM_9IhD.js → timelines-D3Sl9ueq.js} +13 -12
- package/dist/timelines-D3Sl9ueq.js.map +1 -0
- package/dist/tooltip-8wz5S_Zr.js +113 -0
- package/dist/tooltip-8wz5S_Zr.js.map +1 -0
- package/dist/{tree-WnKQzwbq.js → tree-CzUJHnFs.js} +9 -9
- package/dist/{tree-WnKQzwbq.js.map → tree-CzUJHnFs.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-BQnine1k.js +117 -0
- package/dist/typography-BQnine1k.js.map +1 -0
- package/dist/typography.js +1 -1
- package/dist/ui-provider-C-74NVLc.js +178 -0
- package/dist/ui-provider-C-74NVLc.js.map +1 -0
- package/dist/ui-provider.js +2 -3
- package/dist/{upload-CXyxmQBP.js → upload-BOW6U2tI.js} +25 -24
- package/dist/upload-BOW6U2tI.js.map +1 -0
- package/dist/{upload-queue-Boscubn9.js → upload-queue-qUXn1ykN.js} +16 -14
- package/dist/upload-queue-qUXn1ykN.js.map +1 -0
- package/dist/{usage-card-BhO5eqkX.js → usage-card-BeSLY0i0.js} +145 -137
- package/dist/usage-card-BeSLY0i0.js.map +1 -0
- package/dist/{utils-BRhFDwuU.js → utils-B6kKb8jB.js} +303 -144
- package/dist/utils-B6kKb8jB.js.map +1 -0
- package/dist/value-inputs-skdVB2zh.js +980 -0
- package/dist/value-inputs-skdVB2zh.js.map +1 -0
- package/dist/{value-typography-BP8OG6h5.js → value-typography-uAmWUAL1.js} +2 -2
- package/dist/{value-typography-BP8OG6h5.js.map → value-typography-uAmWUAL1.js.map} +1 -1
- package/dist/workspace-DHeHv0qw.js +411 -0
- package/dist/workspace-DHeHv0qw.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +15 -129
- package/docs/consumer-skill/agents/themelia-ui-designer.md +96 -0
- package/docs/consumer-skill/examples/app-layout.tsx +74 -13
- package/docs/consumer-skill/examples/authentication.tsx +77 -0
- package/docs/consumer-skill/examples/commerce-lines.tsx +271 -0
- package/docs/consumer-skill/examples/custom-composition.tsx +21 -0
- package/docs/consumer-skill/examples/detail.tsx +5 -4
- package/docs/consumer-skill/examples/edit.tsx +30 -38
- package/docs/consumer-skill/examples/editable-sections.tsx +38 -0
- package/docs/consumer-skill/examples/index-table.tsx +4 -4
- package/docs/consumer-skill/examples/manifest.json +88 -1
- package/docs/consumer-skill/examples/product-media.tsx +41 -0
- package/docs/consumer-skill/examples/product-parts.tsx +81 -0
- package/docs/consumer-skill/examples/rhf-bindings.tsx +86 -0
- package/docs/consumer-skill/examples/rhf-edit-page.tsx +141 -0
- package/docs/consumer-skill/examples/rhf-overlay-form.tsx +105 -0
- package/docs/consumer-skill/examples/rhf-transport.tsx +28 -0
- package/docs/consumer-skill/examples/token-domain-structure.tsx +68 -0
- package/docs/consumer-skill/references/agents-md.md +23 -11
- package/docs/consumer-skill/references/analytics.md +18 -1
- package/docs/consumer-skill/references/authentication.md +42 -0
- package/docs/consumer-skill/references/commerce-composition.md +97 -0
- package/docs/consumer-skill/references/component-contracts.json +325201 -0
- package/docs/consumer-skill/references/composition-mapping.md +106 -0
- package/docs/consumer-skill/references/composition.md +198 -46
- package/docs/consumer-skill/references/critique-rubric.md +98 -0
- package/docs/consumer-skill/references/custom-composition.md +261 -0
- package/docs/consumer-skill/references/data-reading.md +79 -0
- package/docs/consumer-skill/references/design-contract.md +43 -9
- package/docs/consumer-skill/references/discovery.md +109 -8
- package/docs/consumer-skill/references/domain-structures.md +124 -0
- package/docs/consumer-skill/references/installation.md +51 -36
- package/docs/consumer-skill/references/integration.md +41 -2
- package/docs/consumer-skill/references/product-composition.md +94 -0
- package/docs/consumer-skill/references/public-api.json +4390 -475
- package/docs/consumer-skill/references/review.md +47 -5
- package/docs/consumer-skill/references/rhf-workflows.md +93 -0
- package/docs/consumer-skill/references/screen-archetypes.md +34 -0
- package/docs/consumer-skill/references/screen-decisions.md +126 -0
- package/docs/consumer-skill/references/theming.md +25 -27
- package/docs/consumer-skill/references/tokens.json +20 -11
- package/docs/consumer-skill/references/view-craft.md +153 -0
- package/docs/consumer-skill/references/view-spec.md +73 -0
- package/docs/consumer-skill/references/workflows.md +9 -2
- package/docs/consumer-skill/scripts/composition-policy.mjs +39 -3
- package/docs/consumer-skill/scripts/composition-schema.d.mts +2 -0
- package/docs/consumer-skill/scripts/composition-schema.mjs +32 -0
- package/docs/consumer-skill/scripts/composition.mjs +254 -0
- package/docs/consumer-skill/scripts/discovery.mjs +96 -10
- package/docs/consumer-skill/scripts/inspect-component.mjs +11 -0
- package/docs/consumer-skill/scripts/inspect-tokens.mjs +11 -0
- package/docs/consumer-skill/scripts/inspection.mjs +193 -0
- package/docs/consumer-skill/scripts/map-composition.mjs +12 -0
- package/docs/consumer-skill/scripts/setup-skills.mjs +111 -0
- package/docs/consumer-skill/scripts/surface-policy.mjs +5 -5
- package/docs/consumer-skills/themelia-components/SKILL.md +31 -0
- package/docs/consumer-skills/themelia-composition/SKILL.md +34 -0
- package/docs/consumer-skills/themelia-design/SKILL.md +55 -0
- package/docs/consumer-skills/themelia-forms/SKILL.md +12 -0
- package/docs/consumer-skills/themelia-foundation/SKILL.md +15 -0
- package/docs/consumer-skills/themelia-tokenization/SKILL.md +42 -0
- package/package.json +4 -2
- package/templates/README.md +39 -0
- package/templates/admin-shell-template.tsx +382 -0
- package/templates/analytics-operations-template.tsx +376 -0
- package/templates/customers-template.tsx +509 -0
- package/templates/index.ts +29 -0
- package/templates/orders-template.tsx +1102 -0
- package/templates/products-template.tsx +834 -0
- package/templates/user-permissions-template.tsx +450 -0
- package/dist/accordion-Cjb6sx0G.js.map +0 -1
- package/dist/action-menu-CllU52Mm.js +0 -280
- package/dist/action-menu-CllU52Mm.js.map +0 -1
- package/dist/affordance-geometry.generated-tF36bREk.js.map +0 -1
- package/dist/ai-artifact-DvTwDVyL.js.map +0 -1
- package/dist/app-shell-C4FhvCqF.js +0 -236
- package/dist/app-shell-C4FhvCqF.js.map +0 -1
- package/dist/auth-BGua8ouh.js.map +0 -1
- package/dist/avatar-DAPlDvhJ.js.map +0 -1
- package/dist/base/cascader.js.map +0 -1
- package/dist/batch-action-bar-DnUJ21NQ.js.map +0 -1
- package/dist/button-DVzspB_G.js.map +0 -1
- package/dist/buttons-DPZekJFu.js.map +0 -1
- package/dist/cards-BaBZR-AU.js +0 -68
- package/dist/cards-BaBZR-AU.js.map +0 -1
- package/dist/chart-ZOYyK2xG.js +0 -155
- package/dist/chart-ZOYyK2xG.js.map +0 -1
- package/dist/checkbox-AWIhNhmo.js.map +0 -1
- package/dist/choice-inputs-CNHvARCJ.js +0 -770
- package/dist/choice-inputs-CNHvARCJ.js.map +0 -1
- package/dist/code-block-DeneBJR_.js.map +0 -1
- package/dist/combobox-DaHESuiL.js +0 -355
- package/dist/combobox-DaHESuiL.js.map +0 -1
- package/dist/combobox-Dxo2fAYQ.js.map +0 -1
- package/dist/command-C25VMRII.js.map +0 -1
- package/dist/comments-DD0DUPwJ.js.map +0 -1
- package/dist/containers-Mu1LMGV1.js +0 -103
- package/dist/containers-Mu1LMGV1.js.map +0 -1
- package/dist/control-group-recipes-DBXmfh2E.js.map +0 -1
- package/dist/data-display-DT_khPl_.js.map +0 -1
- package/dist/date-picker-B2K3ucWn.js.map +0 -1
- package/dist/date-pickers-Ds8gLaoP.js +0 -175
- package/dist/date-pickers-Ds8gLaoP.js.map +0 -1
- package/dist/dropdown-menu-Cl4X7L5S.js +0 -193
- package/dist/dropdown-menu-Cl4X7L5S.js.map +0 -1
- package/dist/feedback-BYIhtitP.js.map +0 -1
- package/dist/field-affordance-recipes-DZhnIL_Y.js.map +0 -1
- package/dist/filters-DJVAveHA.js.map +0 -1
- package/dist/form-field-CwH9y77i.js.map +0 -1
- package/dist/form-sizing-BdP_Mf5p.js.map +0 -1
- package/dist/forms-B9G_xwzi.js +0 -194
- package/dist/forms-B9G_xwzi.js.map +0 -1
- package/dist/forms-numeric-B_jraJaQ.js.map +0 -1
- package/dist/header-BSfIEWbI.js.map +0 -1
- package/dist/hooks-ClH9thn4.js.map +0 -1
- package/dist/input-CZw8iU99.js +0 -21
- package/dist/input-CZw8iU99.js.map +0 -1
- package/dist/input-DQdEd0YD.js +0 -263
- package/dist/input-DQdEd0YD.js.map +0 -1
- package/dist/item-K5_ghvze.js +0 -275
- package/dist/item-K5_ghvze.js.map +0 -1
- package/dist/message-DZ_ruyUV.js.map +0 -1
- package/dist/metadata-list-8N16ZMW_.js +0 -405
- package/dist/metadata-list-8N16ZMW_.js.map +0 -1
- package/dist/motion-recipes-ChBg4HBq.js.map +0 -1
- package/dist/navigation-Bnotn4AQ.js +0 -145
- package/dist/navigation-Bnotn4AQ.js.map +0 -1
- package/dist/navigation-BzhHI3lo.js.map +0 -1
- package/dist/navigation-row-recipes-BFLCk_Aq.js.map +0 -1
- package/dist/overflow-tab-bar-CWY7Nogn.js +0 -282
- package/dist/overflow-tab-bar-CWY7Nogn.js.map +0 -1
- package/dist/overlays-tMkF-VAN.js +0 -1003
- package/dist/overlays-tMkF-VAN.js.map +0 -1
- package/dist/page-CL9YeH_V.js +0 -224
- package/dist/page-CL9YeH_V.js.map +0 -1
- package/dist/page-header-commands-DOb6WsfD.js +0 -126
- package/dist/page-header-commands-DOb6WsfD.js.map +0 -1
- package/dist/popover-gnTOhbFM.js +0 -198
- package/dist/popover-gnTOhbFM.js.map +0 -1
- package/dist/popover.recipes-D3j8R8Yp.js.map +0 -1
- package/dist/receipt-BVSOH3Xo.js.map +0 -1
- package/dist/rich-text-editor-cRLC-eBK.js.map +0 -1
- package/dist/rich-text-editor-toolbar-DfXg0-VC.js.map +0 -1
- package/dist/settings-ybnjVwbd.js +0 -171
- package/dist/settings-ybnjVwbd.js.map +0 -1
- package/dist/sheet-ijlsjq-n.js +0 -213
- package/dist/sheet-ijlsjq-n.js.map +0 -1
- package/dist/sidebar-Db6gkh3U.js +0 -619
- package/dist/sidebar-Db6gkh3U.js.map +0 -1
- package/dist/sidebar-DkTO4VTO.js +0 -512
- package/dist/sidebar-DkTO4VTO.js.map +0 -1
- package/dist/skeleton-Byjnt7qr.js +0 -264
- package/dist/skeleton-Byjnt7qr.js.map +0 -1
- package/dist/smart-card-DiC5aac3.js +0 -604
- package/dist/smart-card-DiC5aac3.js.map +0 -1
- package/dist/table-BweFy_P9.js.map +0 -1
- package/dist/tabs-CDocW5D1.js.map +0 -1
- package/dist/text-inputs-f9Ia-aCi.js.map +0 -1
- package/dist/text.styles-g4He6UIW.js.map +0 -1
- package/dist/theme-scope-BJ6eE2xt.js +0 -50
- package/dist/theme-scope-BJ6eE2xt.js.map +0 -1
- package/dist/timelines-CwM_9IhD.js.map +0 -1
- package/dist/tooltip-yiRJUFjp.js +0 -111
- package/dist/tooltip-yiRJUFjp.js.map +0 -1
- package/dist/typography-UTnveOEy.js +0 -117
- package/dist/typography-UTnveOEy.js.map +0 -1
- package/dist/ui-provider-C_U0Xma4.js +0 -136
- package/dist/ui-provider-C_U0Xma4.js.map +0 -1
- package/dist/upload-CXyxmQBP.js.map +0 -1
- package/dist/upload-queue-Boscubn9.js.map +0 -1
- package/dist/usage-card-BhO5eqkX.js.map +0 -1
- package/dist/use-mobile-vaLKwgyf.js +0 -15
- package/dist/use-mobile-vaLKwgyf.js.map +0 -1
- package/dist/utils-BRhFDwuU.js.map +0 -1
- package/dist/value-inputs-TaX4OjNk.js +0 -963
- package/dist/value-inputs-TaX4OjNk.js.map +0 -1
- package/dist/workspace-B-OEm3Kf.js +0 -408
- package/dist/workspace-B-OEm3Kf.js.map +0 -1
package/dist/blocks/commerce.js
CHANGED
|
@@ -1,47 +1,49 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { m as e } from "../ui-provider-C-74NVLc.js";
|
|
3
3
|
import { mergeStrings as t, useStrings as n } from "../lib/strings.js";
|
|
4
|
-
import { t as r } from "../utils-
|
|
5
|
-
import { n as i, t as a } from "../buttons-
|
|
6
|
-
import { c as o, o as s, s as c, t as l } from "../typography-
|
|
7
|
-
import { i as u, r as d, t as f } from "../structure-
|
|
4
|
+
import { t as r } from "../utils-B6kKb8jB.js";
|
|
5
|
+
import { n as i, t as a } from "../buttons-BedGfygC.js";
|
|
6
|
+
import { c as o, o as s, s as c, t as l } from "../typography-BQnine1k.js";
|
|
7
|
+
import { i as u, r as d, t as f } from "../structure-DuxKl954.js";
|
|
8
8
|
import { i as p } from "../tone-recipes-BPsRAvhu.js";
|
|
9
|
-
import { d as m, h, p as g, t as _ } from "../smart-card-
|
|
10
|
-
import { t as v } from "../progress-
|
|
11
|
-
import {
|
|
12
|
-
import { n as x } from "../
|
|
13
|
-
import { t as
|
|
14
|
-
import {
|
|
15
|
-
import { t as
|
|
16
|
-
import {
|
|
17
|
-
import { t as
|
|
18
|
-
import {
|
|
19
|
-
import { t as
|
|
20
|
-
import {
|
|
21
|
-
import { t as
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import { i as
|
|
31
|
-
import {
|
|
32
|
-
import { n as
|
|
33
|
-
import {
|
|
9
|
+
import { d as m, h, p as g, t as _ } from "../smart-card-CW0hjetE.js";
|
|
10
|
+
import { t as v } from "../progress-BJhQP9WX.js";
|
|
11
|
+
import { i as y, t as b } from "../surface-recipes-BKRVW8Os.js";
|
|
12
|
+
import { n as x, t as S } from "../composition.recipes-COdiFhxB.js";
|
|
13
|
+
import { n as C, t as w } from "../action-menu-Dr8K-ghE.js";
|
|
14
|
+
import { n as T } from "../cards-rNX1M4Xn.js";
|
|
15
|
+
import { t as E } from "../interaction-recipes-XR9ZpVYL.js";
|
|
16
|
+
import { _ as D, c as O, g as k, m as A, o as j, u as M } from "../primitives-ByWgGUgt.js";
|
|
17
|
+
import { t as N } from "../initials-format-CDoQEOd_.js";
|
|
18
|
+
import { n as ee, r as te, t as P } from "../number-CRU3kGuk.js";
|
|
19
|
+
import { t as F } from "../icon-badge-DZF-YjQp.js";
|
|
20
|
+
import { i as ne, n as re, s as ie } from "../avatar-CeZaFmNH.js";
|
|
21
|
+
import { t as I } from "../badge-xIiV_E7f.js";
|
|
22
|
+
import { t as ae } from "../separator-Ct_WSWTJ.js";
|
|
23
|
+
import { t as L } from "../input-CvyDQlY7.js";
|
|
24
|
+
import { t as oe } from "../copyable-DIznBqiT.js";
|
|
25
|
+
import { t as R } from "../form-field-BriWAXyg.js";
|
|
26
|
+
import { a as se, l as ce, r as le } from "../choice-inputs-zUgBZfE4.js";
|
|
27
|
+
import { i as ue, n as z, o as de } from "../display-KsZLw9Ov.js";
|
|
28
|
+
import { u as fe } from "../value-inputs-skdVB2zh.js";
|
|
29
|
+
import { d as pe, n as me } from "../forms-numeric-DIhghX1Q.js";
|
|
30
|
+
import { c as B, i as V, n as he, o as ge, r as H, t as U, u as W } from "../item-DjCcM18E.js";
|
|
31
|
+
import { t as G } from "../metadata-list-C3MkU-Om.js";
|
|
32
|
+
import { i as _e, n as ve, r as ye, t as be } from "../tabs-e7ko9S2o.js";
|
|
33
|
+
import { m as K } from "../data-display-BdgCAw8T.js";
|
|
34
|
+
import { n as xe, t as Se } from "../receipt-tOc7B3hw.js";
|
|
35
|
+
import { s as Ce } from "../timelines-D3Sl9ueq.js";
|
|
34
36
|
import { forwardRef as we, useEffect as Te, useId as Ee, useMemo as De, useRef as Oe, useState as ke } from "react";
|
|
35
|
-
import { Fragment as Ae, jsx as
|
|
37
|
+
import { Fragment as Ae, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
36
38
|
import { ArrowRight as je, CalendarClock as Me, Check as Ne, CheckCircle2 as Pe, ChevronRight as Fe, Circle as Ie, CircleAlert as Le, Copy as Re, Edit2 as ze, ExternalLink as Be, Loader2 as Ve, Pencil as He, Star as Ue, Trash2 as We, TriangleAlert as Ge, X as Ke } from "lucide-react";
|
|
37
39
|
//#region src/components/blocks/commerce/upcoming-booking/upcoming-booking.tsx
|
|
38
40
|
function qe({ bookings: e, className: t, locale: n, dateTone: i = "neutral", dateVariant: a = "default", timePlacement: o = "below" }) {
|
|
39
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ q(ge, {
|
|
40
42
|
className: r("upcoming-booking--component w-full", t),
|
|
41
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
43
|
+
children: e.map((e, t) => /* @__PURE__ */ J(U, {
|
|
42
44
|
className: "items-center",
|
|
43
45
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ q(B, { children: /* @__PURE__ */ q(ue, {
|
|
45
47
|
date: e.date,
|
|
46
48
|
time: o === "below" ? e.time : void 0,
|
|
47
49
|
tone: i,
|
|
@@ -50,20 +52,20 @@ function qe({ bookings: e, className: t, locale: n, dateTone: i = "neutral", dat
|
|
|
50
52
|
timePlacement: "below",
|
|
51
53
|
layout: "stacked"
|
|
52
54
|
}) }),
|
|
53
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ J(H, {
|
|
54
56
|
className: "min-w-0 sm:min-w-48",
|
|
55
|
-
children: [/* @__PURE__ */ W
|
|
57
|
+
children: [/* @__PURE__ */ q(W, { children: e.service }), /* @__PURE__ */ q(V, {
|
|
56
58
|
clamp: 1,
|
|
57
59
|
children: e.customer
|
|
58
60
|
})]
|
|
59
61
|
}),
|
|
60
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ J(he, {
|
|
61
63
|
className: "ml-auto shrink-0 flex-wrap justify-end",
|
|
62
|
-
children: [o === "inline-trailing" && /* @__PURE__ */
|
|
64
|
+
children: [o === "inline-trailing" && /* @__PURE__ */ q(k, {
|
|
63
65
|
size: "xs",
|
|
64
66
|
className: "shrink-0 tabular-nums",
|
|
65
67
|
children: e.time
|
|
66
|
-
}), /* @__PURE__ */
|
|
68
|
+
}), /* @__PURE__ */ q(D, {
|
|
67
69
|
type: "inherit",
|
|
68
70
|
weight: "semibold",
|
|
69
71
|
className: "shrink-0 tabular-nums",
|
|
@@ -78,33 +80,33 @@ qe.displayName = "UpcomingBookingRow";
|
|
|
78
80
|
//#endregion
|
|
79
81
|
//#region src/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.tsx
|
|
80
82
|
function Je(e) {
|
|
81
|
-
return typeof e == "string" || typeof e == "number" || typeof e == "bigint" ? /* @__PURE__ */
|
|
83
|
+
return typeof e == "string" || typeof e == "number" || typeof e == "bigint" ? /* @__PURE__ */ q(D, {
|
|
82
84
|
type: "inherit",
|
|
83
85
|
children: String(e)
|
|
84
86
|
}) : e;
|
|
85
87
|
}
|
|
86
88
|
function Ye({ title: e, description: t, status: n, items: i, actionLabel: a, onAction: o, className: c, contentClassName: l }) {
|
|
87
|
-
return /* @__PURE__ */
|
|
89
|
+
return /* @__PURE__ */ J(z, {
|
|
88
90
|
title: e,
|
|
89
91
|
titleSuffix: n,
|
|
90
92
|
description: t,
|
|
91
93
|
className: r("booking-calendar-event-card--component @container/booking-calendar-event-card", c),
|
|
92
94
|
contentClassName: r("grid gap-space-2xl", l),
|
|
93
|
-
children: [/* @__PURE__ */
|
|
95
|
+
children: [/* @__PURE__ */ q("dl", {
|
|
94
96
|
className: "booking-calendar-event-card--details grid gap-space-lg @md/booking-calendar-event-card:grid-cols-2",
|
|
95
|
-
children: i.map((e) => /* @__PURE__ */
|
|
97
|
+
children: i.map((e) => /* @__PURE__ */ J("div", {
|
|
96
98
|
className: r("grid min-w-0 gap-normal", e.fullWidth === !0 && "@md/booking-calendar-event-card:col-span-2"),
|
|
97
|
-
children: [/* @__PURE__ */
|
|
99
|
+
children: [/* @__PURE__ */ q("dt", {
|
|
98
100
|
className: "flex",
|
|
99
|
-
children: /* @__PURE__ */
|
|
100
|
-
}), /* @__PURE__ */
|
|
101
|
+
children: /* @__PURE__ */ q(s, { children: e.label })
|
|
102
|
+
}), /* @__PURE__ */ q("dd", {
|
|
101
103
|
className: "min-w-0 leading-normal",
|
|
102
104
|
children: Je(e.value)
|
|
103
105
|
})]
|
|
104
106
|
}, e.id))
|
|
105
|
-
}), /* @__PURE__ */
|
|
107
|
+
}), /* @__PURE__ */ q("div", {
|
|
106
108
|
className: "booking-calendar-event-card--action flex justify-end",
|
|
107
|
-
children: /* @__PURE__ */
|
|
109
|
+
children: /* @__PURE__ */ q(T, {
|
|
108
110
|
fullWidth: !1,
|
|
109
111
|
className: "w-full @md/booking-calendar-event-card:w-auto",
|
|
110
112
|
onClick: o,
|
|
@@ -126,47 +128,47 @@ var Xe = {
|
|
|
126
128
|
//#region src/components/blocks/commerce/loyalty-points/loyalty-points.tsx
|
|
127
129
|
function Ze({ balance: e, tier: t, tierTone: a = "neutral", history: s = [], onRedeem: l, className: u, strings: d }) {
|
|
128
130
|
let p = n(Xe, d);
|
|
129
|
-
return /* @__PURE__ */
|
|
131
|
+
return /* @__PURE__ */ J(z, {
|
|
130
132
|
title: p.balanceLabel,
|
|
131
|
-
titleSuffix: /* @__PURE__ */
|
|
133
|
+
titleSuffix: /* @__PURE__ */ q(I, {
|
|
132
134
|
tone: a,
|
|
133
135
|
children: t ?? p.tier
|
|
134
136
|
}),
|
|
135
137
|
contentGap: "2xl",
|
|
136
138
|
className: r("loyalty-points--component w-full", u),
|
|
137
139
|
children: [
|
|
138
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ J(f, {
|
|
139
141
|
gap: "dense",
|
|
140
142
|
className: "loyalty-points--balance",
|
|
141
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ q(c, {
|
|
142
144
|
tag: "h3",
|
|
143
145
|
className: "tabular-nums text-inherit",
|
|
144
|
-
children: typeof e == "number" ? /* @__PURE__ */
|
|
146
|
+
children: typeof e == "number" ? /* @__PURE__ */ q(P, {
|
|
145
147
|
type: "inherit",
|
|
146
148
|
value: e,
|
|
147
149
|
align: "left"
|
|
148
150
|
}) : e
|
|
149
|
-
}), /* @__PURE__ */
|
|
151
|
+
}), /* @__PURE__ */ q(o, {
|
|
150
152
|
size: "xs",
|
|
151
153
|
type: "secondary",
|
|
152
154
|
children: p.pointsAvailable
|
|
153
155
|
})]
|
|
154
156
|
}),
|
|
155
|
-
s.length > 0 && /* @__PURE__ */
|
|
157
|
+
s.length > 0 && /* @__PURE__ */ q(ge, { children: s.map((e) => /* @__PURE__ */ J(U, {
|
|
156
158
|
size: "sm",
|
|
157
|
-
children: [/* @__PURE__ */
|
|
159
|
+
children: [/* @__PURE__ */ J(H, { children: [/* @__PURE__ */ q(W, {
|
|
158
160
|
bold: !1,
|
|
159
161
|
children: e.label
|
|
160
|
-
}), /* @__PURE__ */
|
|
162
|
+
}), /* @__PURE__ */ q(V, {
|
|
161
163
|
clamp: 1,
|
|
162
164
|
children: e.date
|
|
163
|
-
})] }), /* @__PURE__ */
|
|
165
|
+
})] }), /* @__PURE__ */ q(he, { children: /* @__PURE__ */ q(o, {
|
|
164
166
|
weight: "semibold",
|
|
165
167
|
className: r("tabular-nums", e.positive ? "text-success" : "text-destructive"),
|
|
166
168
|
children: e.points
|
|
167
169
|
}) })]
|
|
168
170
|
}, e.date + e.label)) }),
|
|
169
|
-
!!l && /* @__PURE__ */
|
|
171
|
+
!!l && /* @__PURE__ */ q(i, {
|
|
170
172
|
tone: "primary",
|
|
171
173
|
fullWidth: !0,
|
|
172
174
|
onClick: l,
|
|
@@ -187,9 +189,9 @@ function $e(e) {
|
|
|
187
189
|
function et(e) {
|
|
188
190
|
return typeof e == "string" || typeof e == "number";
|
|
189
191
|
}
|
|
190
|
-
var
|
|
192
|
+
var Y = we(function({ label: e, amount: t, note: n, total: i = !1, deduction: a = !1, rollup: s = !1, className: c, ...l }, u) {
|
|
191
193
|
let d = n != null && n !== !1 && n !== "";
|
|
192
|
-
return /* @__PURE__ */
|
|
194
|
+
return /* @__PURE__ */ J("div", {
|
|
193
195
|
ref: u,
|
|
194
196
|
"data-slot": "amount-row",
|
|
195
197
|
"data-total": i ? "" : void 0,
|
|
@@ -198,28 +200,28 @@ var K = we(function({ label: e, amount: t, note: n, total: i = !1, deduction: a
|
|
|
198
200
|
className: r("amount-row--component flex min-w-0 items-baseline gap-space-md", s && "mt-space-sm border-t border-border pt-space-lg", c),
|
|
199
201
|
...l,
|
|
200
202
|
children: [
|
|
201
|
-
et(e) ? /* @__PURE__ */
|
|
203
|
+
et(e) ? /* @__PURE__ */ q(o, {
|
|
202
204
|
tag: "span",
|
|
203
205
|
type: i ? "inherit" : "secondary",
|
|
204
206
|
weight: i ? "semibold" : "regular",
|
|
205
207
|
lineHeight: i ? "tight" : "normal",
|
|
206
208
|
className: "amount-row--label min-w-0 flex-1 wrap-anywhere",
|
|
207
209
|
children: e
|
|
208
|
-
}) : /* @__PURE__ */
|
|
210
|
+
}) : /* @__PURE__ */ q("span", {
|
|
209
211
|
className: "amount-row--label min-w-0 flex-1",
|
|
210
212
|
children: e
|
|
211
213
|
}),
|
|
212
|
-
!!d && (et(n) ? /* @__PURE__ */
|
|
214
|
+
!!d && (et(n) ? /* @__PURE__ */ q(o, {
|
|
213
215
|
tag: "span",
|
|
214
216
|
size: "xs",
|
|
215
217
|
type: "secondary",
|
|
216
218
|
className: "amount-row--note shrink-0 tabular-nums",
|
|
217
219
|
children: n
|
|
218
|
-
}) : /* @__PURE__ */
|
|
220
|
+
}) : /* @__PURE__ */ q("span", {
|
|
219
221
|
className: "amount-row--note inline-flex shrink-0 items-center",
|
|
220
222
|
children: n
|
|
221
223
|
})),
|
|
222
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ q(o, {
|
|
223
225
|
tag: "span",
|
|
224
226
|
type: a ? "success" : "inherit",
|
|
225
227
|
weight: i ? "bold" : "medium",
|
|
@@ -229,11 +231,11 @@ var K = we(function({ label: e, amount: t, note: n, total: i = !1, deduction: a
|
|
|
229
231
|
]
|
|
230
232
|
});
|
|
231
233
|
});
|
|
232
|
-
|
|
234
|
+
Y.displayName = "AmountRow";
|
|
233
235
|
//#endregion
|
|
234
236
|
//#region src/components/blocks/commerce/summary-panel/summary-panel.tsx
|
|
235
|
-
var
|
|
236
|
-
return /* @__PURE__ */
|
|
237
|
+
var X = we(function({ className: e, children: t, ...n }, i) {
|
|
238
|
+
return /* @__PURE__ */ q(f, {
|
|
237
239
|
ref: i,
|
|
238
240
|
gap: "sm",
|
|
239
241
|
"data-slot": "summary-panel",
|
|
@@ -242,7 +244,7 @@ var q = we(function({ className: e, children: t, ...n }, i) {
|
|
|
242
244
|
children: t
|
|
243
245
|
});
|
|
244
246
|
});
|
|
245
|
-
|
|
247
|
+
X.displayName = "SummaryPanel";
|
|
246
248
|
//#endregion
|
|
247
249
|
//#region src/components/blocks/commerce/discount-stack/types.ts
|
|
248
250
|
var tt = {
|
|
@@ -253,32 +255,33 @@ var tt = {
|
|
|
253
255
|
//#region src/components/blocks/commerce/discount-stack/discount-stack.tsx
|
|
254
256
|
function nt(e) {
|
|
255
257
|
let t = e.kind ?? e.type;
|
|
256
|
-
if (t != null && t !== "") return e.badge ? /* @__PURE__ */
|
|
258
|
+
if (t != null && t !== "") return e.badge ? /* @__PURE__ */ q(I, {
|
|
257
259
|
tone: e.badge,
|
|
258
260
|
size: "sm",
|
|
259
261
|
children: t
|
|
260
262
|
}) : t;
|
|
261
263
|
}
|
|
262
|
-
function rt({ discounts: e, totalSavings: t, className: i, strings: a,
|
|
263
|
-
let
|
|
264
|
-
return /* @__PURE__ */
|
|
265
|
-
...
|
|
266
|
-
surface:
|
|
267
|
-
padding:
|
|
268
|
-
|
|
264
|
+
function rt({ discounts: e, totalSavings: t, className: i, strings: a, surface: o = "flat", padding: s = o === "flat" ? "none" : "md", headerDivider: c, ...l }) {
|
|
265
|
+
let u = n(tt, a);
|
|
266
|
+
return /* @__PURE__ */ q(_, {
|
|
267
|
+
...l,
|
|
268
|
+
surface: o,
|
|
269
|
+
padding: s,
|
|
270
|
+
headerDivider: c,
|
|
271
|
+
title: u.title,
|
|
269
272
|
"data-slot": "discount-stack",
|
|
270
273
|
className: r("discount-stack--component w-full", i),
|
|
271
|
-
children: /* @__PURE__ */
|
|
274
|
+
children: /* @__PURE__ */ J(X, {
|
|
272
275
|
className: "discount-stack--ledger",
|
|
273
|
-
children: [e.map((e, t) => /* @__PURE__ */
|
|
276
|
+
children: [e.map((e, t) => /* @__PURE__ */ q(Y, {
|
|
274
277
|
className: "discount-stack--row",
|
|
275
278
|
label: e.label,
|
|
276
279
|
note: nt(e),
|
|
277
280
|
amount: e.amount,
|
|
278
281
|
deduction: !0
|
|
279
|
-
}, e.id ?? `${e.type ?? ""}-${e.label}-${String(t)}`)), /* @__PURE__ */
|
|
282
|
+
}, e.id ?? `${e.type ?? ""}-${e.label}-${String(t)}`)), /* @__PURE__ */ q(Y, {
|
|
280
283
|
className: "discount-stack--total",
|
|
281
|
-
label:
|
|
284
|
+
label: u.totalSavings,
|
|
282
285
|
amount: t,
|
|
283
286
|
total: !0,
|
|
284
287
|
deduction: !0,
|
|
@@ -309,56 +312,59 @@ function st(e) {
|
|
|
309
312
|
for (let t = e.length - 1; t >= 0; --t) if (e[t]?.done) return t;
|
|
310
313
|
return -1;
|
|
311
314
|
}
|
|
312
|
-
function ct({ trackingNumber: e, carrier: t, status: i, steps: a, details: o = [], onCopyTracking: s, className: c, strings: l,
|
|
313
|
-
let
|
|
315
|
+
function ct({ trackingNumber: e, carrier: t, status: i, steps: a, details: o = [], onCopyTracking: s, className: c, strings: l, surface: u = "flat", padding: d = u === "flat" ? "none" : "md", headerDivider: f, ...p }) {
|
|
316
|
+
let m = n(ot, l), h = i === "delivered" ? -1 : st(a), g = a.map((e, t) => ({
|
|
314
317
|
id: e.id ?? `${e.label}-${String(t)}`,
|
|
315
318
|
title: e.label,
|
|
316
319
|
timestamp: e.timestamp,
|
|
317
|
-
status: t ===
|
|
318
|
-
}))
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
320
|
+
status: t === h ? "current" : e.done ? "completed" : "pending"
|
|
321
|
+
})), v = [
|
|
322
|
+
{
|
|
323
|
+
id: "tracking-number",
|
|
324
|
+
label: m.trackingNumber,
|
|
325
|
+
value: /* @__PURE__ */ q(oe, {
|
|
326
|
+
value: e,
|
|
327
|
+
mono: !0,
|
|
328
|
+
truncate: !0,
|
|
329
|
+
onCopy: s,
|
|
330
|
+
strings: { copyLabel: m.copyTrackingNumber },
|
|
331
|
+
className: "shipment-tracking--tracking-number"
|
|
332
|
+
})
|
|
333
|
+
},
|
|
334
|
+
...t ? [{
|
|
335
|
+
id: "carrier",
|
|
336
|
+
label: m.carrier,
|
|
337
|
+
value: t
|
|
338
|
+
}] : [],
|
|
339
|
+
...o.map((e, t) => ({
|
|
340
|
+
id: `detail-${String(t)}`,
|
|
341
|
+
label: e.label,
|
|
342
|
+
value: e.value
|
|
343
|
+
}))
|
|
344
|
+
];
|
|
345
|
+
return /* @__PURE__ */ J(_, {
|
|
346
|
+
...p,
|
|
347
|
+
surface: u,
|
|
348
|
+
padding: d,
|
|
349
|
+
headerDivider: f,
|
|
350
|
+
title: m.title,
|
|
351
|
+
titleSuffix: /* @__PURE__ */ q(I, {
|
|
325
352
|
tone: at[i],
|
|
326
353
|
className: "shipment-tracking--status",
|
|
327
|
-
children:
|
|
354
|
+
children: m[i]
|
|
328
355
|
}),
|
|
329
356
|
contentGap: "2xl",
|
|
330
357
|
"data-slot": "shipment-tracking",
|
|
331
358
|
className: r("shipment-tracking--component w-full", c),
|
|
332
|
-
children: [/* @__PURE__ */ G
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
truncate: !0,
|
|
342
|
-
onCopy: s,
|
|
343
|
-
strings: { copyLabel: d.copyTrackingNumber },
|
|
344
|
-
className: "shipment-tracking--tracking-number"
|
|
345
|
-
}),
|
|
346
|
-
valueClassName: "min-w-0"
|
|
347
|
-
}),
|
|
348
|
-
!!t && /* @__PURE__ */ W(U, {
|
|
349
|
-
label: d.carrier,
|
|
350
|
-
value: t,
|
|
351
|
-
valueWeight: "medium"
|
|
352
|
-
}),
|
|
353
|
-
o.map((e, t) => /* @__PURE__ */ W(U, {
|
|
354
|
-
label: e.label,
|
|
355
|
-
value: e.value,
|
|
356
|
-
valueWeight: "medium",
|
|
357
|
-
valueClassName: "min-w-0 truncate"
|
|
358
|
-
}, `${e.label}-${String(t)}`))
|
|
359
|
-
]
|
|
360
|
-
}), m.length > 0 && /* @__PURE__ */ W(Ce, {
|
|
361
|
-
items: m,
|
|
359
|
+
children: [/* @__PURE__ */ q(G, {
|
|
360
|
+
items: v,
|
|
361
|
+
columns: {
|
|
362
|
+
base: 1,
|
|
363
|
+
sm: 2
|
|
364
|
+
},
|
|
365
|
+
className: "shipment-tracking--facts"
|
|
366
|
+
}), g.length > 0 && /* @__PURE__ */ q(Ce, {
|
|
367
|
+
items: g,
|
|
362
368
|
dotSize: "sm",
|
|
363
369
|
className: "shipment-tracking--rail"
|
|
364
370
|
})]
|
|
@@ -367,7 +373,7 @@ function ct({ trackingNumber: e, carrier: t, status: i, steps: a, details: o = [
|
|
|
367
373
|
ct.displayName = "ShipmentTracking";
|
|
368
374
|
//#endregion
|
|
369
375
|
//#region src/components/blocks/commerce/giftcard-card/types.ts
|
|
370
|
-
var
|
|
376
|
+
var Z = {
|
|
371
377
|
status: {
|
|
372
378
|
active: "Active",
|
|
373
379
|
redeemed: "Redeemed",
|
|
@@ -391,23 +397,28 @@ var J = {
|
|
|
391
397
|
redeemed: "secondary",
|
|
392
398
|
expired: "destructive",
|
|
393
399
|
disabled: "warning"
|
|
394
|
-
}, ut = "bg-inverse-background from-inverse-background via-inverse-surface to-inverse-background",
|
|
400
|
+
}, ut = "bg-inverse-background from-inverse-background via-inverse-surface to-inverse-background", Q = {
|
|
401
|
+
purple: "from-chart-3 to-chart-4",
|
|
402
|
+
green: "from-chart-1 to-chart-2",
|
|
403
|
+
warm: "from-chart-5 to-warning",
|
|
404
|
+
blue: "from-chart-2 to-chart-3"
|
|
405
|
+
}, dt = {
|
|
395
406
|
purple: {
|
|
396
407
|
card: ut,
|
|
397
|
-
strip:
|
|
408
|
+
strip: Q.purple
|
|
398
409
|
},
|
|
399
410
|
green: {
|
|
400
411
|
card: ut,
|
|
401
|
-
strip:
|
|
412
|
+
strip: Q.green
|
|
402
413
|
},
|
|
403
414
|
warm: {
|
|
404
415
|
card: ut,
|
|
405
|
-
strip:
|
|
416
|
+
strip: Q.warm
|
|
406
417
|
}
|
|
407
418
|
}, ft = {
|
|
408
|
-
purple:
|
|
409
|
-
green:
|
|
410
|
-
warm:
|
|
419
|
+
purple: Q.purple,
|
|
420
|
+
green: Q.green,
|
|
421
|
+
warm: Q.warm
|
|
411
422
|
}, pt = {
|
|
412
423
|
green: {
|
|
413
424
|
line: p.success.solid,
|
|
@@ -422,59 +433,59 @@ var J = {
|
|
|
422
433
|
iconBg: `${p.warning.tint} ${p.warning.ink}`
|
|
423
434
|
}
|
|
424
435
|
}, mt = {
|
|
425
|
-
green:
|
|
426
|
-
blue:
|
|
427
|
-
amber:
|
|
436
|
+
green: Q.green,
|
|
437
|
+
blue: Q.blue,
|
|
438
|
+
amber: Q.warm
|
|
428
439
|
};
|
|
429
440
|
//#endregion
|
|
430
441
|
//#region src/components/blocks/commerce/giftcard-card/partials/giftcard-compact.tsx
|
|
431
442
|
function ht({ code: e, amount: t, remainingAmount: i, status: a, recipientName: o, gradient: s = "purple", className: c, strings: l }) {
|
|
432
|
-
let u = n(
|
|
433
|
-
return /* @__PURE__ */
|
|
443
|
+
let u = n(Z, l).status[a], d = lt[a], p = !!i && i !== t, m = p ? i : t;
|
|
444
|
+
return /* @__PURE__ */ J(U, {
|
|
434
445
|
size: "sm",
|
|
435
446
|
variant: "outline",
|
|
436
447
|
padding: "default",
|
|
437
448
|
className: r("giftcard-card--component giftcard-compact--component flex-nowrap shadow-sm transition-colors duration-150 hover:border-border", c),
|
|
438
449
|
children: [
|
|
439
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ q(B, {
|
|
440
451
|
variant: "image",
|
|
441
|
-
children: /* @__PURE__ */
|
|
452
|
+
children: /* @__PURE__ */ q("div", {
|
|
442
453
|
className: r("flex size-full items-center justify-center bg-gradient-to-br p-space-2xs", ft[s]),
|
|
443
|
-
children: /* @__PURE__ */
|
|
454
|
+
children: /* @__PURE__ */ q("span", { className: "size-full rounded-radius bg-inverse-background" })
|
|
444
455
|
})
|
|
445
456
|
}),
|
|
446
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ J(H, {
|
|
447
458
|
className: "min-w-0",
|
|
448
|
-
children: [/* @__PURE__ */ W
|
|
459
|
+
children: [/* @__PURE__ */ q(W, {
|
|
449
460
|
className: "w-full max-w-full truncate whitespace-nowrap",
|
|
450
|
-
children: /* @__PURE__ */
|
|
461
|
+
children: /* @__PURE__ */ q(A, {
|
|
451
462
|
type: "inherit",
|
|
452
463
|
children: e
|
|
453
464
|
})
|
|
454
|
-
}), !!o && /* @__PURE__ */
|
|
465
|
+
}), !!o && /* @__PURE__ */ q(V, {
|
|
455
466
|
clamp: 1,
|
|
456
467
|
children: o
|
|
457
468
|
})]
|
|
458
469
|
}),
|
|
459
|
-
/* @__PURE__ */
|
|
470
|
+
/* @__PURE__ */ q(he, {
|
|
460
471
|
className: "shrink-0",
|
|
461
|
-
children: /* @__PURE__ */
|
|
472
|
+
children: /* @__PURE__ */ J(f, {
|
|
462
473
|
gap: "2xs",
|
|
463
474
|
align: "end",
|
|
464
475
|
className: "shrink-0",
|
|
465
|
-
children: [/* @__PURE__ */
|
|
476
|
+
children: [/* @__PURE__ */ J("div", {
|
|
466
477
|
className: "flex items-baseline gap-space-xs",
|
|
467
|
-
children: [/* @__PURE__ */
|
|
478
|
+
children: [/* @__PURE__ */ q(D, {
|
|
468
479
|
type: "inherit",
|
|
469
480
|
weight: "bold",
|
|
470
481
|
className: "tabular-nums",
|
|
471
482
|
children: m
|
|
472
|
-
}), !!p && /* @__PURE__ */
|
|
483
|
+
}), !!p && /* @__PURE__ */ q(D, {
|
|
473
484
|
size: "xs",
|
|
474
485
|
className: "line-through tabular-nums text-muted-foreground",
|
|
475
486
|
children: t
|
|
476
487
|
})]
|
|
477
|
-
}), /* @__PURE__ */
|
|
488
|
+
}), /* @__PURE__ */ q(I, {
|
|
478
489
|
tone: d,
|
|
479
490
|
size: "sm",
|
|
480
491
|
children: u
|
|
@@ -488,7 +499,7 @@ ht.displayName = "GiftcardCompact";
|
|
|
488
499
|
//#endregion
|
|
489
500
|
//#region src/components/blocks/commerce/giftcard-card/partials/giftcard-copy-button.tsx
|
|
490
501
|
function gt({ code: e, strings: t, inverse: a = !1, className: s }) {
|
|
491
|
-
let c = n(
|
|
502
|
+
let c = n(Z, t), l = Oe(0), [u, d] = ke({
|
|
492
503
|
code: e,
|
|
493
504
|
state: "idle"
|
|
494
505
|
}), f = u.code === e ? u.state : "idle";
|
|
@@ -517,7 +528,7 @@ function gt({ code: e, strings: t, inverse: a = !1, className: s }) {
|
|
|
517
528
|
});
|
|
518
529
|
}
|
|
519
530
|
};
|
|
520
|
-
return /* @__PURE__ */
|
|
531
|
+
return /* @__PURE__ */ J(Ae, { children: [/* @__PURE__ */ q(i, {
|
|
521
532
|
type: "button",
|
|
522
533
|
tone: "secondary",
|
|
523
534
|
buttonStyle: "ghost",
|
|
@@ -529,11 +540,11 @@ function gt({ code: e, strings: t, inverse: a = !1, className: s }) {
|
|
|
529
540
|
withTooltip: p,
|
|
530
541
|
className: r("giftcard-copy--component", s, a && "text-inverse-foreground [&:hover:not(:active):not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-inverse-surface [&:hover:not(:active):not(:disabled):not([data-disabled]):not([aria-disabled=true])]:text-inverse-foreground [&:active:not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-inverse-surface-strong focus-visible:bg-inverse-surface"),
|
|
531
542
|
onClick: () => void h(),
|
|
532
|
-
children: /* @__PURE__ */
|
|
543
|
+
children: /* @__PURE__ */ q(m, {
|
|
533
544
|
"aria-hidden": !0,
|
|
534
545
|
className: r("size-icon-sm", f === "pending" && "animate-spin")
|
|
535
546
|
})
|
|
536
|
-
}), (f === "copied" || f === "failed") && /* @__PURE__ */
|
|
547
|
+
}), (f === "copied" || f === "failed") && /* @__PURE__ */ q(o, {
|
|
537
548
|
tag: "span",
|
|
538
549
|
role: "status",
|
|
539
550
|
className: "sr-only",
|
|
@@ -543,70 +554,70 @@ function gt({ code: e, strings: t, inverse: a = !1, className: s }) {
|
|
|
543
554
|
//#endregion
|
|
544
555
|
//#region src/components/blocks/commerce/giftcard-card/partials/giftcard-dark.tsx
|
|
545
556
|
function _t({ code: e, amount: t, remainingAmount: a, status: s, recipientName: l, expiresAt: u, onView: d, className: p, strings: m }) {
|
|
546
|
-
let h = n(
|
|
557
|
+
let h = n(Z, m), g = h.status[s], v = lt[s], y = !!a && a !== t, b = y ? a : t, x = [...l ? [{
|
|
547
558
|
label: h.recipient,
|
|
548
559
|
value: l
|
|
549
560
|
}] : [], ...u ? [{
|
|
550
561
|
label: h.expires,
|
|
551
562
|
value: u
|
|
552
563
|
}] : []];
|
|
553
|
-
return /* @__PURE__ */
|
|
564
|
+
return /* @__PURE__ */ q(_, {
|
|
554
565
|
surface: "card",
|
|
555
566
|
className: r("giftcard-card--component giftcard-dark--component dark max-w-sm", p),
|
|
556
|
-
children: /* @__PURE__ */
|
|
567
|
+
children: /* @__PURE__ */ J(f, {
|
|
557
568
|
gap: "lg",
|
|
558
569
|
className: "giftcard-dark--body",
|
|
559
570
|
children: [
|
|
560
|
-
/* @__PURE__ */
|
|
571
|
+
/* @__PURE__ */ J(f, {
|
|
561
572
|
direction: "horizontal",
|
|
562
573
|
justify: "between",
|
|
563
574
|
align: "center",
|
|
564
575
|
gap: "md",
|
|
565
576
|
wrap: !1,
|
|
566
|
-
children: [/* @__PURE__ */
|
|
577
|
+
children: [/* @__PURE__ */ q(o, {
|
|
567
578
|
tag: "span",
|
|
568
579
|
className: "text-inverse-muted",
|
|
569
580
|
children: h.giftCard
|
|
570
|
-
}), /* @__PURE__ */
|
|
581
|
+
}), /* @__PURE__ */ q(I, {
|
|
571
582
|
tone: v,
|
|
572
583
|
className: "shrink-0",
|
|
573
584
|
children: g
|
|
574
585
|
})]
|
|
575
586
|
}),
|
|
576
|
-
/* @__PURE__ */
|
|
587
|
+
/* @__PURE__ */ J("div", {
|
|
577
588
|
className: "flex items-baseline gap-space-md",
|
|
578
|
-
children: [/* @__PURE__ */
|
|
589
|
+
children: [/* @__PURE__ */ q(c, {
|
|
579
590
|
tag: "h2",
|
|
580
591
|
size: "2xl",
|
|
581
592
|
className: "tabular-nums text-inverse-foreground",
|
|
582
593
|
children: b
|
|
583
|
-
}), !!y && /* @__PURE__ */
|
|
594
|
+
}), !!y && /* @__PURE__ */ q(D, {
|
|
584
595
|
className: "line-through tabular-nums text-inverse-disabled",
|
|
585
596
|
children: t
|
|
586
597
|
})]
|
|
587
598
|
}),
|
|
588
|
-
/* @__PURE__ */
|
|
589
|
-
className: "giftcard-dark--code rounded-
|
|
590
|
-
children: /* @__PURE__ */
|
|
599
|
+
/* @__PURE__ */ q("div", {
|
|
600
|
+
className: "giftcard-dark--code rounded-radius border border-inverse-border bg-inverse-surface p-surface-xs",
|
|
601
|
+
children: /* @__PURE__ */ J(f, {
|
|
591
602
|
direction: "horizontal",
|
|
592
603
|
align: "center",
|
|
593
604
|
gap: "md",
|
|
594
|
-
children: [/* @__PURE__ */
|
|
605
|
+
children: [/* @__PURE__ */ q(A, {
|
|
595
606
|
className: "flex-1 tracking-[0.15em] text-inverse-foreground",
|
|
596
607
|
children: e
|
|
597
|
-
}), /* @__PURE__ */
|
|
608
|
+
}), /* @__PURE__ */ q(gt, {
|
|
598
609
|
code: e,
|
|
599
610
|
strings: h,
|
|
600
611
|
inverse: !0
|
|
601
612
|
})]
|
|
602
613
|
})
|
|
603
614
|
}),
|
|
604
|
-
/* @__PURE__ */
|
|
615
|
+
/* @__PURE__ */ q(G, {
|
|
605
616
|
items: x,
|
|
606
617
|
columns: 1,
|
|
607
618
|
className: "[&_.metadata-list--label]:text-inverse-muted [&_.metadata-list--value]:text-inverse-foreground"
|
|
608
619
|
}),
|
|
609
|
-
!!d && /* @__PURE__ */
|
|
620
|
+
!!d && /* @__PURE__ */ q(i, {
|
|
610
621
|
tone: "neutral",
|
|
611
622
|
buttonStyle: "solid",
|
|
612
623
|
fullWidth: !0,
|
|
@@ -621,7 +632,7 @@ _t.displayName = "GiftcardCardDark";
|
|
|
621
632
|
//#endregion
|
|
622
633
|
//#region src/components/blocks/commerce/giftcard-card/partials/giftcard-full.tsx
|
|
623
634
|
function vt({ code: e, amount: t, remainingAmount: a, status: l, recipientName: u, senderName: d, message: p, expiresAt: m, createdAt: h, template: g, onView: _, gradient: v = "purple", pattern: y = "none", className: b, strings: x }) {
|
|
624
|
-
let S = n(
|
|
635
|
+
let S = n(Z, x), C = S.status[l], w = lt[l], T = !!a && a !== t, E = T ? a : t, O = [
|
|
625
636
|
...u ? [{
|
|
626
637
|
label: S.to,
|
|
627
638
|
value: u
|
|
@@ -635,86 +646,86 @@ function vt({ code: e, amount: t, remainingAmount: a, status: l, recipientName:
|
|
|
635
646
|
value: m
|
|
636
647
|
}] : []
|
|
637
648
|
];
|
|
638
|
-
return /* @__PURE__ */
|
|
649
|
+
return /* @__PURE__ */ J("div", {
|
|
639
650
|
className: r("giftcard-card--component w-full max-w-sm transition-shadow", "hover:shadow-md", b),
|
|
640
|
-
children: [/* @__PURE__ */
|
|
641
|
-
className: r("relative overflow-hidden rounded-t-
|
|
651
|
+
children: [/* @__PURE__ */ J("div", {
|
|
652
|
+
className: r("relative overflow-hidden rounded-t-surface bg-linear-to-br p-surface", dt[v].card),
|
|
642
653
|
children: [
|
|
643
|
-
/* @__PURE__ */
|
|
654
|
+
/* @__PURE__ */ q("div", {
|
|
644
655
|
"aria-hidden": !0,
|
|
645
656
|
className: r("absolute inset-x-0 top-0 z-10 h-1 bg-gradient-to-r", dt[v].strip)
|
|
646
657
|
}),
|
|
647
|
-
y === "circles" && /* @__PURE__ */
|
|
658
|
+
y === "circles" && /* @__PURE__ */ J(Ae, { children: [/* @__PURE__ */ q("div", {
|
|
648
659
|
className: "absolute -top-8 -right-8 h-32 w-32 rounded-full bg-inverse-decoration",
|
|
649
660
|
"aria-hidden": "true"
|
|
650
|
-
}), /* @__PURE__ */
|
|
661
|
+
}), /* @__PURE__ */ q("div", {
|
|
651
662
|
className: "absolute -bottom-4 -left-4 h-20 w-20 rounded-full bg-inverse-decoration",
|
|
652
663
|
"aria-hidden": "true"
|
|
653
664
|
})] }),
|
|
654
|
-
y === "waves" && /* @__PURE__ */
|
|
665
|
+
y === "waves" && /* @__PURE__ */ J("svg", {
|
|
655
666
|
className: "absolute inset-0 h-full w-full opacity-5",
|
|
656
667
|
viewBox: "0 0 400 200",
|
|
657
668
|
preserveAspectRatio: "none",
|
|
658
669
|
"aria-hidden": "true",
|
|
659
|
-
children: [/* @__PURE__ */
|
|
670
|
+
children: [/* @__PURE__ */ q("path", {
|
|
660
671
|
d: "M0 80 C100 20, 200 140, 400 60 L400 200 L0 200 Z",
|
|
661
672
|
className: "fill-inverse-foreground"
|
|
662
|
-
}), /* @__PURE__ */
|
|
673
|
+
}), /* @__PURE__ */ q("path", {
|
|
663
674
|
d: "M0 120 C120 60, 280 180, 400 100 L400 200 L0 200 Z",
|
|
664
675
|
className: "fill-inverse-foreground"
|
|
665
676
|
})]
|
|
666
677
|
}),
|
|
667
|
-
/* @__PURE__ */
|
|
678
|
+
/* @__PURE__ */ q("div", {
|
|
668
679
|
className: "absolute top-4 right-4 z-10",
|
|
669
|
-
children: /* @__PURE__ */
|
|
670
|
-
tone:
|
|
680
|
+
children: /* @__PURE__ */ q(I, {
|
|
681
|
+
tone: w,
|
|
671
682
|
inline: !0,
|
|
672
683
|
dot: !0,
|
|
673
684
|
className: "border border-inverse-border bg-inverse-background text-inverse-foreground shadow-sm",
|
|
674
|
-
"data-status":
|
|
675
|
-
children:
|
|
685
|
+
"data-status": w,
|
|
686
|
+
children: C
|
|
676
687
|
})
|
|
677
688
|
}),
|
|
678
|
-
/* @__PURE__ */
|
|
689
|
+
/* @__PURE__ */ J(f, {
|
|
679
690
|
gap: "xl",
|
|
680
691
|
className: "relative z-10",
|
|
681
692
|
children: [
|
|
682
|
-
/* @__PURE__ */
|
|
693
|
+
/* @__PURE__ */ q(o, {
|
|
683
694
|
weight: "medium",
|
|
684
695
|
className: "text-inverse-muted",
|
|
685
696
|
children: S.giftCard
|
|
686
697
|
}),
|
|
687
|
-
/* @__PURE__ */
|
|
698
|
+
/* @__PURE__ */ J(f, {
|
|
688
699
|
gap: "dense",
|
|
689
|
-
children: [/* @__PURE__ */
|
|
700
|
+
children: [/* @__PURE__ */ q(s, {
|
|
690
701
|
tone: "inverse",
|
|
691
702
|
children: S.balance
|
|
692
|
-
}), /* @__PURE__ */
|
|
703
|
+
}), /* @__PURE__ */ J(f, {
|
|
693
704
|
direction: "horizontal",
|
|
694
705
|
align: "baseline",
|
|
695
706
|
gap: "lg",
|
|
696
|
-
children: [/* @__PURE__ */
|
|
707
|
+
children: [/* @__PURE__ */ q(c, {
|
|
697
708
|
tag: "h2",
|
|
698
709
|
size: "2xl",
|
|
699
710
|
className: "text-inverse-foreground tabular-nums drop-shadow-sm",
|
|
700
|
-
children:
|
|
701
|
-
}), !!
|
|
711
|
+
children: E
|
|
712
|
+
}), !!T && /* @__PURE__ */ q(D, {
|
|
702
713
|
className: "line-through tabular-nums text-inverse-disabled",
|
|
703
714
|
children: t
|
|
704
715
|
})]
|
|
705
716
|
})]
|
|
706
717
|
}),
|
|
707
|
-
/* @__PURE__ */
|
|
718
|
+
/* @__PURE__ */ q("div", {
|
|
708
719
|
className: r("giftcard-full--code", "rounded-radius p-surface-xs", "bg-inverse-surface", "border border-inverse-border", "shadow-sm"),
|
|
709
|
-
children: /* @__PURE__ */
|
|
720
|
+
children: /* @__PURE__ */ J(f, {
|
|
710
721
|
direction: "horizontal",
|
|
711
722
|
align: "center",
|
|
712
723
|
gap: "md",
|
|
713
|
-
children: [/* @__PURE__ */
|
|
724
|
+
children: [/* @__PURE__ */ q(A, {
|
|
714
725
|
weight: "semibold",
|
|
715
726
|
className: "flex-1 tracking-[0.2em] text-inverse-foreground",
|
|
716
727
|
children: e
|
|
717
|
-
}), /* @__PURE__ */
|
|
728
|
+
}), /* @__PURE__ */ q(gt, {
|
|
718
729
|
code: e,
|
|
719
730
|
strings: S,
|
|
720
731
|
inverse: !0
|
|
@@ -724,15 +735,15 @@ function vt({ code: e, amount: t, remainingAmount: a, status: l, recipientName:
|
|
|
724
735
|
]
|
|
725
736
|
})
|
|
726
737
|
]
|
|
727
|
-
}), /* @__PURE__ */
|
|
728
|
-
className: "box-border rounded-b-
|
|
729
|
-
children: /* @__PURE__ */
|
|
738
|
+
}), /* @__PURE__ */ q("div", {
|
|
739
|
+
className: "box-border rounded-b-surface bg-card text-card-foreground p-surface shadow-sm border border-t-0 border-border",
|
|
740
|
+
children: /* @__PURE__ */ J(f, {
|
|
730
741
|
gap: "xl",
|
|
731
742
|
children: [
|
|
732
|
-
!!p && /* @__PURE__ */
|
|
743
|
+
!!p && /* @__PURE__ */ J(f, {
|
|
733
744
|
gap: "normal",
|
|
734
745
|
className: "giftcard-full--message",
|
|
735
|
-
children: [/* @__PURE__ */
|
|
746
|
+
children: [/* @__PURE__ */ q(s, { children: S.personalMessage }), /* @__PURE__ */ J(o, {
|
|
736
747
|
type: "secondary",
|
|
737
748
|
lineHeight: "relaxed",
|
|
738
749
|
className: "italic",
|
|
@@ -743,14 +754,15 @@ function vt({ code: e, amount: t, remainingAmount: a, status: l, recipientName:
|
|
|
743
754
|
]
|
|
744
755
|
})]
|
|
745
756
|
}),
|
|
746
|
-
/* @__PURE__ */
|
|
747
|
-
|
|
757
|
+
/* @__PURE__ */ q(G, {
|
|
758
|
+
adaptTo: "container",
|
|
759
|
+
items: O,
|
|
748
760
|
columns: {
|
|
749
761
|
base: 1,
|
|
750
762
|
sm: 2
|
|
751
763
|
}
|
|
752
764
|
}),
|
|
753
|
-
!!_ && /* @__PURE__ */
|
|
765
|
+
!!_ && /* @__PURE__ */ q(i, {
|
|
754
766
|
tone: "secondary",
|
|
755
767
|
buttonStyle: "outline",
|
|
756
768
|
fullWidth: !0,
|
|
@@ -766,85 +778,86 @@ vt.displayName = "GiftcardFull";
|
|
|
766
778
|
//#endregion
|
|
767
779
|
//#region src/components/blocks/commerce/giftcard-card/partials/giftcard-illustrated.tsx
|
|
768
780
|
function yt({ code: e, amount: t, remainingAmount: a, status: l, recipientName: u, expiresAt: d, onView: p, headerColor: m = "green", className: h, strings: g }) {
|
|
769
|
-
let v = n(
|
|
781
|
+
let v = n(Z, g), y = v.status[l], b = lt[l], x = !!a && a !== t, S = x ? a : t, C = [...u ? [{
|
|
770
782
|
label: v.recipient,
|
|
771
783
|
value: u
|
|
772
784
|
}] : [], ...d ? [{
|
|
773
785
|
label: v.expires,
|
|
774
786
|
value: d
|
|
775
787
|
}] : []];
|
|
776
|
-
return /* @__PURE__ */
|
|
788
|
+
return /* @__PURE__ */ J(_, {
|
|
777
789
|
surface: "card",
|
|
778
790
|
padding: "none",
|
|
779
791
|
className: r("giftcard-card--component giftcard-illustrated--component max-w-sm", h),
|
|
780
|
-
children: [/* @__PURE__ */
|
|
792
|
+
children: [/* @__PURE__ */ J("div", {
|
|
781
793
|
className: "relative flex h-16 items-center justify-between overflow-hidden bg-inverse-background bg-gradient-to-br from-inverse-background via-inverse-surface to-inverse-background px-surface",
|
|
782
794
|
children: [
|
|
783
|
-
/* @__PURE__ */
|
|
795
|
+
/* @__PURE__ */ q("div", {
|
|
784
796
|
"aria-hidden": !0,
|
|
785
797
|
className: r("absolute inset-x-0 top-0 h-1 bg-gradient-to-r", mt[m])
|
|
786
798
|
}),
|
|
787
|
-
/* @__PURE__ */
|
|
799
|
+
/* @__PURE__ */ q("div", {
|
|
788
800
|
className: "absolute inset-0 opacity-80",
|
|
789
801
|
style: { backgroundImage: "repeating-linear-gradient(45deg, transparent 0 10px, color-mix(in oklch, var(--inverse-foreground) 3%, transparent) 10px 20px)" },
|
|
790
802
|
"aria-hidden": "true"
|
|
791
803
|
}),
|
|
792
|
-
/* @__PURE__ */
|
|
804
|
+
/* @__PURE__ */ q(s, {
|
|
793
805
|
tone: "inverse",
|
|
794
806
|
className: "relative",
|
|
795
807
|
children: v.giftCard
|
|
796
808
|
})
|
|
797
809
|
]
|
|
798
|
-
}), /* @__PURE__ */
|
|
810
|
+
}), /* @__PURE__ */ J(f, {
|
|
799
811
|
gap: "lg",
|
|
800
812
|
className: "giftcard-illustrated--body p-surface",
|
|
801
813
|
children: [
|
|
802
|
-
/* @__PURE__ */
|
|
814
|
+
/* @__PURE__ */ J("div", {
|
|
803
815
|
className: "flex items-start justify-between",
|
|
804
|
-
children: [/* @__PURE__ */
|
|
816
|
+
children: [/* @__PURE__ */ J(f, {
|
|
805
817
|
gap: "dense",
|
|
806
|
-
children: [/* @__PURE__ */
|
|
818
|
+
children: [/* @__PURE__ */ J("div", {
|
|
807
819
|
className: "flex items-baseline gap-space-md",
|
|
808
|
-
children: [/* @__PURE__ */
|
|
820
|
+
children: [/* @__PURE__ */ q(c, {
|
|
809
821
|
tag: "h2",
|
|
810
822
|
size: "2xl",
|
|
811
823
|
className: "tabular-nums text-inherit",
|
|
812
824
|
children: S
|
|
813
|
-
}), !!x && /* @__PURE__ */
|
|
825
|
+
}), !!x && /* @__PURE__ */ q(D, {
|
|
814
826
|
className: "line-through tabular-nums text-muted-foreground",
|
|
815
827
|
children: t
|
|
816
828
|
})]
|
|
817
|
-
}), /* @__PURE__ */
|
|
829
|
+
}), /* @__PURE__ */ q(o, {
|
|
818
830
|
size: "xs",
|
|
819
831
|
type: "secondary",
|
|
820
832
|
children: v.balance
|
|
821
833
|
})]
|
|
822
|
-
}), /* @__PURE__ */
|
|
834
|
+
}), /* @__PURE__ */ q(I, {
|
|
823
835
|
tone: b,
|
|
824
836
|
children: y
|
|
825
837
|
})]
|
|
826
838
|
}),
|
|
827
|
-
/* @__PURE__ */
|
|
828
|
-
className: "giftcard-illustrated--code rounded-
|
|
829
|
-
children: /* @__PURE__ */
|
|
839
|
+
/* @__PURE__ */ q("div", {
|
|
840
|
+
className: "giftcard-illustrated--code rounded-radius border border-border bg-muted/30 p-surface-xs",
|
|
841
|
+
children: /* @__PURE__ */ J(f, {
|
|
830
842
|
direction: "horizontal",
|
|
831
843
|
align: "center",
|
|
832
844
|
gap: "md",
|
|
833
|
-
children: [/* @__PURE__ */
|
|
845
|
+
children: [/* @__PURE__ */ q(A, {
|
|
834
846
|
type: "inherit",
|
|
835
847
|
className: "flex-1 tracking-[0.15em]",
|
|
836
848
|
children: e
|
|
837
|
-
}), /* @__PURE__ */
|
|
849
|
+
}), /* @__PURE__ */ q(gt, {
|
|
838
850
|
code: e,
|
|
839
851
|
strings: v
|
|
840
852
|
})]
|
|
841
853
|
})
|
|
842
854
|
}),
|
|
843
|
-
/* @__PURE__ */
|
|
844
|
-
|
|
855
|
+
/* @__PURE__ */ q(G, {
|
|
856
|
+
adaptTo: "container",
|
|
857
|
+
items: C,
|
|
845
858
|
columns: 2
|
|
846
859
|
}),
|
|
847
|
-
!!p && /* @__PURE__ */
|
|
860
|
+
!!p && /* @__PURE__ */ q(i, {
|
|
848
861
|
tone: "secondary",
|
|
849
862
|
buttonStyle: "outline",
|
|
850
863
|
fullWidth: !0,
|
|
@@ -859,80 +872,80 @@ yt.displayName = "GiftcardCardIllustrated";
|
|
|
859
872
|
//#endregion
|
|
860
873
|
//#region src/components/blocks/commerce/giftcard-card/partials/giftcard-minimal.tsx
|
|
861
874
|
function bt({ code: e, amount: t, remainingAmount: i, status: s, recipientName: l, expiresAt: u, onView: d, color: p = "green", className: m, strings: h }) {
|
|
862
|
-
let g = n(
|
|
875
|
+
let g = n(Z, h), v = g.status[s], y = lt[s], b = !!i && i !== t, x = b ? i : t, S = pt[p], C = [...l ? [{
|
|
863
876
|
label: g.recipient,
|
|
864
877
|
value: l
|
|
865
878
|
}] : [], ...u ? [{
|
|
866
879
|
label: g.expires,
|
|
867
880
|
value: u
|
|
868
881
|
}] : []];
|
|
869
|
-
return /* @__PURE__ */
|
|
882
|
+
return /* @__PURE__ */ q(_, {
|
|
870
883
|
surface: "card",
|
|
871
884
|
className: r("giftcard-card--component giftcard-minimal--component max-w-sm", m),
|
|
872
|
-
children: /* @__PURE__ */
|
|
885
|
+
children: /* @__PURE__ */ J(f, {
|
|
873
886
|
gap: "lg",
|
|
874
887
|
className: "giftcard-minimal--body",
|
|
875
888
|
children: [
|
|
876
|
-
/* @__PURE__ */
|
|
889
|
+
/* @__PURE__ */ q("div", {
|
|
877
890
|
"aria-hidden": "true",
|
|
878
891
|
className: r("h-1 w-12 rounded-radius-sm", S.line)
|
|
879
892
|
}),
|
|
880
|
-
/* @__PURE__ */
|
|
893
|
+
/* @__PURE__ */ J(f, {
|
|
881
894
|
direction: "horizontal",
|
|
882
895
|
justify: "between",
|
|
883
896
|
align: "center",
|
|
884
897
|
gap: "md",
|
|
885
898
|
wrap: !1,
|
|
886
|
-
children: [/* @__PURE__ */
|
|
899
|
+
children: [/* @__PURE__ */ q(o, {
|
|
887
900
|
tag: "span",
|
|
888
901
|
type: "secondary",
|
|
889
902
|
children: g.giftCard
|
|
890
|
-
}), /* @__PURE__ */
|
|
903
|
+
}), /* @__PURE__ */ q(I, {
|
|
891
904
|
tone: y,
|
|
892
905
|
size: "sm",
|
|
893
906
|
className: "shrink-0",
|
|
894
907
|
children: v
|
|
895
908
|
})]
|
|
896
909
|
}),
|
|
897
|
-
/* @__PURE__ */
|
|
910
|
+
/* @__PURE__ */ J("div", {
|
|
898
911
|
className: "flex items-baseline gap-space-md",
|
|
899
|
-
children: [/* @__PURE__ */
|
|
912
|
+
children: [/* @__PURE__ */ q(c, {
|
|
900
913
|
tag: "h2",
|
|
901
914
|
size: "2xl",
|
|
902
915
|
className: "tabular-nums text-inherit",
|
|
903
916
|
children: x
|
|
904
|
-
}), !!b && /* @__PURE__ */
|
|
917
|
+
}), !!b && /* @__PURE__ */ q(D, {
|
|
905
918
|
className: "line-through tabular-nums text-muted-foreground",
|
|
906
919
|
children: t
|
|
907
920
|
})]
|
|
908
921
|
}),
|
|
909
|
-
/* @__PURE__ */
|
|
910
|
-
className: "giftcard-minimal--code rounded-
|
|
911
|
-
children: /* @__PURE__ */
|
|
922
|
+
/* @__PURE__ */ q("div", {
|
|
923
|
+
className: "giftcard-minimal--code rounded-radius border border-border bg-muted/30 p-surface-xs",
|
|
924
|
+
children: /* @__PURE__ */ J(f, {
|
|
912
925
|
direction: "horizontal",
|
|
913
926
|
align: "center",
|
|
914
927
|
gap: "sm",
|
|
915
|
-
children: [/* @__PURE__ */
|
|
928
|
+
children: [/* @__PURE__ */ q(A, {
|
|
916
929
|
type: "inherit",
|
|
917
930
|
className: "flex-1 tracking-[0.15em]",
|
|
918
931
|
children: e
|
|
919
|
-
}), /* @__PURE__ */
|
|
932
|
+
}), /* @__PURE__ */ q(gt, {
|
|
920
933
|
code: e,
|
|
921
934
|
strings: g,
|
|
922
935
|
className: "shrink-0"
|
|
923
936
|
})]
|
|
924
937
|
})
|
|
925
938
|
}),
|
|
926
|
-
/* @__PURE__ */
|
|
927
|
-
items:
|
|
939
|
+
/* @__PURE__ */ q(G, {
|
|
940
|
+
items: C,
|
|
928
941
|
columns: 1,
|
|
929
942
|
density: "compact",
|
|
930
943
|
className: "[&_.metadata-list--grid]:gap-space-sm"
|
|
931
944
|
}),
|
|
932
|
-
!!d && /* @__PURE__ */
|
|
945
|
+
!!d && /* @__PURE__ */ J(a, {
|
|
933
946
|
onClick: d,
|
|
934
947
|
className: "group/link self-start",
|
|
935
|
-
children: [g.viewDetails, /* @__PURE__ */
|
|
948
|
+
children: [g.viewDetails, /* @__PURE__ */ q(je, {
|
|
936
949
|
"aria-hidden": "true",
|
|
937
950
|
className: "ml-1 size-icon-sm transition-transform group-hover/link:translate-x-0.5"
|
|
938
951
|
})]
|
|
@@ -947,23 +960,23 @@ bt.displayName = "GiftcardCardMinimal";
|
|
|
947
960
|
function xt(e) {
|
|
948
961
|
let t = r("giftcard-card--component", e.className);
|
|
949
962
|
switch (e.variant) {
|
|
950
|
-
case "compact": return /* @__PURE__ */
|
|
963
|
+
case "compact": return /* @__PURE__ */ q(ht, {
|
|
951
964
|
...e,
|
|
952
965
|
className: t
|
|
953
966
|
});
|
|
954
|
-
case "minimal": return /* @__PURE__ */
|
|
967
|
+
case "minimal": return /* @__PURE__ */ q(bt, {
|
|
955
968
|
...e,
|
|
956
969
|
className: t
|
|
957
970
|
});
|
|
958
|
-
case "dark": return /* @__PURE__ */
|
|
971
|
+
case "dark": return /* @__PURE__ */ q(_t, {
|
|
959
972
|
...e,
|
|
960
973
|
className: t
|
|
961
974
|
});
|
|
962
|
-
case "illustrated": return /* @__PURE__ */
|
|
975
|
+
case "illustrated": return /* @__PURE__ */ q(yt, {
|
|
963
976
|
...e,
|
|
964
977
|
className: t
|
|
965
978
|
});
|
|
966
|
-
default: return /* @__PURE__ */
|
|
979
|
+
default: return /* @__PURE__ */ q(vt, {
|
|
967
980
|
...e,
|
|
968
981
|
className: t
|
|
969
982
|
});
|
|
@@ -986,159 +999,159 @@ var St = {
|
|
|
986
999
|
destructive: "destructive"
|
|
987
1000
|
};
|
|
988
1001
|
function wt({ children: e, tone: t }) {
|
|
989
|
-
return m(e) ? /* @__PURE__ */
|
|
1002
|
+
return m(e) ? /* @__PURE__ */ q(I, {
|
|
990
1003
|
tone: Ct[t ?? "secondary"],
|
|
991
1004
|
className: "vendor-profile--change shrink-0 tabular-nums",
|
|
992
1005
|
children: e
|
|
993
1006
|
}) : null;
|
|
994
1007
|
}
|
|
995
|
-
var Tt = we(function({ name: e, initials: t, avatarUrl: a, role: o, verified: c = !1, earnings: l, earningsChange: u, earningsChangeTone: p, metrics: h = [], stats: g = [], view: v, defaultView: y = "overview", onViewChange: b, onMessage: x, onHire:
|
|
996
|
-
let k = n(St, E), [
|
|
997
|
-
(e === "overview" || e === "stats") &&
|
|
998
|
-
},
|
|
1008
|
+
var Tt = we(function({ name: e, initials: t, avatarUrl: a, role: o, verified: c = !1, earnings: l, earningsChange: u, earningsChangeTone: p, metrics: h = [], stats: g = [], view: v, defaultView: y = "overview", onViewChange: b, onMessage: x, onHire: C, surface: w, className: T, strings: E }, O) {
|
|
1009
|
+
let k = n(St, E), [A, j] = ke(y), N = v !== void 0, ee = m(l), te = ee || h.length > 0, P = g.length > 0, F = [...te ? ["overview"] : [], ...P ? ["stats"] : []], ae = N ? v : A, L = F.includes(ae) ? ae : F[0] ?? "overview", oe = F.length > 0, R = !!(x || C), se = (e) => {
|
|
1010
|
+
(e === "overview" || e === "stats") && F.includes(e) && (N || j(e), b?.(e));
|
|
1011
|
+
}, ce = /* @__PURE__ */ J(f, {
|
|
999
1012
|
gap: "xl",
|
|
1000
1013
|
className: "vendor-profile--overview",
|
|
1001
|
-
children: [
|
|
1014
|
+
children: [ee && /* @__PURE__ */ J(f, {
|
|
1002
1015
|
gap: "normal",
|
|
1003
1016
|
className: "vendor-profile--earnings",
|
|
1004
|
-
children: [/* @__PURE__ */
|
|
1017
|
+
children: [/* @__PURE__ */ q(s, { children: k.totalEarnings }), /* @__PURE__ */ J(f, {
|
|
1005
1018
|
direction: "horizontal",
|
|
1006
1019
|
gap: "sm",
|
|
1007
1020
|
align: "baseline",
|
|
1008
|
-
children: [/* @__PURE__ */
|
|
1021
|
+
children: [/* @__PURE__ */ q(D, {
|
|
1009
1022
|
type: "inherit",
|
|
1010
1023
|
size: "base",
|
|
1011
1024
|
weight: "semibold",
|
|
1012
1025
|
className: "tabular-nums",
|
|
1013
1026
|
children: l
|
|
1014
|
-
}), /* @__PURE__ */
|
|
1027
|
+
}), /* @__PURE__ */ q(wt, {
|
|
1015
1028
|
tone: p,
|
|
1016
1029
|
children: u
|
|
1017
1030
|
})]
|
|
1018
1031
|
})]
|
|
1019
|
-
}), h.length > 0 && /* @__PURE__ */
|
|
1032
|
+
}), h.length > 0 && /* @__PURE__ */ q("div", {
|
|
1020
1033
|
className: "vendor-profile--metrics divide-y divide-border/60",
|
|
1021
|
-
children: h.map((e, t) => /* @__PURE__ */
|
|
1034
|
+
children: h.map((e, t) => /* @__PURE__ */ q(K, {
|
|
1022
1035
|
className: "py-row-y first:pt-0 last:pb-0",
|
|
1023
1036
|
label: e.label,
|
|
1024
1037
|
value: e.value,
|
|
1025
1038
|
valueWeight: "medium"
|
|
1026
1039
|
}, e.id ?? t))
|
|
1027
1040
|
})]
|
|
1028
|
-
}),
|
|
1041
|
+
}), le = /* @__PURE__ */ q(d, {
|
|
1029
1042
|
columns: {
|
|
1030
1043
|
base: 1,
|
|
1031
1044
|
sm: 2
|
|
1032
1045
|
},
|
|
1033
1046
|
gap: "xl",
|
|
1034
1047
|
className: "vendor-profile--stats",
|
|
1035
|
-
children: g.map((e, t) => /* @__PURE__ */
|
|
1048
|
+
children: g.map((e, t) => /* @__PURE__ */ J(f, {
|
|
1036
1049
|
gap: "normal",
|
|
1037
1050
|
className: "vendor-profile--stat",
|
|
1038
|
-
children: [/* @__PURE__ */
|
|
1051
|
+
children: [/* @__PURE__ */ q(s, {
|
|
1039
1052
|
className: "truncate",
|
|
1040
1053
|
children: e.label
|
|
1041
|
-
}), /* @__PURE__ */
|
|
1054
|
+
}), /* @__PURE__ */ J(f, {
|
|
1042
1055
|
direction: "horizontal",
|
|
1043
1056
|
gap: "sm",
|
|
1044
1057
|
align: "baseline",
|
|
1045
|
-
children: [/* @__PURE__ */
|
|
1058
|
+
children: [/* @__PURE__ */ q(D, {
|
|
1046
1059
|
type: "inherit",
|
|
1047
1060
|
weight: "semibold",
|
|
1048
1061
|
className: "min-w-0 tabular-nums",
|
|
1049
1062
|
children: e.value
|
|
1050
|
-
}), /* @__PURE__ */
|
|
1063
|
+
}), /* @__PURE__ */ q(wt, {
|
|
1051
1064
|
tone: e.changeTone,
|
|
1052
1065
|
children: e.change
|
|
1053
1066
|
})]
|
|
1054
1067
|
})]
|
|
1055
1068
|
}, e.id ?? t))
|
|
1056
|
-
}),
|
|
1057
|
-
value:
|
|
1058
|
-
onValueChange:
|
|
1069
|
+
}), ue = F.length > 1 ? /* @__PURE__ */ J(be, {
|
|
1070
|
+
value: L,
|
|
1071
|
+
onValueChange: se,
|
|
1059
1072
|
className: "vendor-profile--tabs gap-space-lg",
|
|
1060
1073
|
children: [
|
|
1061
|
-
/* @__PURE__ */
|
|
1062
|
-
className: "grid h-auto w-full grid-cols-2 rounded-
|
|
1063
|
-
children: [/* @__PURE__ */
|
|
1074
|
+
/* @__PURE__ */ J(ye, {
|
|
1075
|
+
className: "grid h-auto w-full grid-cols-2 rounded-radius p-space-xs",
|
|
1076
|
+
children: [/* @__PURE__ */ q(_e, {
|
|
1064
1077
|
value: "overview",
|
|
1065
|
-
className: "h-action-sm rounded-
|
|
1078
|
+
className: "h-action-sm rounded-radius px-control-sm text-pxs",
|
|
1066
1079
|
children: k.tabOverview
|
|
1067
|
-
}), /* @__PURE__ */
|
|
1080
|
+
}), /* @__PURE__ */ q(_e, {
|
|
1068
1081
|
value: "stats",
|
|
1069
|
-
className: "h-action-sm rounded-
|
|
1082
|
+
className: "h-action-sm rounded-radius px-control-sm text-pxs",
|
|
1070
1083
|
children: k.tabStats
|
|
1071
1084
|
})]
|
|
1072
1085
|
}),
|
|
1073
|
-
/* @__PURE__ */
|
|
1086
|
+
/* @__PURE__ */ q(ve, {
|
|
1074
1087
|
value: "overview",
|
|
1075
1088
|
className: "mt-0",
|
|
1076
|
-
children:
|
|
1089
|
+
children: ce
|
|
1077
1090
|
}),
|
|
1078
|
-
/* @__PURE__ */
|
|
1091
|
+
/* @__PURE__ */ q(ve, {
|
|
1079
1092
|
value: "stats",
|
|
1080
1093
|
className: "mt-0",
|
|
1081
|
-
children:
|
|
1094
|
+
children: le
|
|
1082
1095
|
})
|
|
1083
1096
|
]
|
|
1084
|
-
}) :
|
|
1085
|
-
return /* @__PURE__ */
|
|
1086
|
-
ref:
|
|
1097
|
+
}) : L === "stats" ? le : ce;
|
|
1098
|
+
return /* @__PURE__ */ q(_, {
|
|
1099
|
+
ref: O,
|
|
1087
1100
|
surface: w,
|
|
1088
1101
|
padding: w === "flat" ? "none" : "md",
|
|
1089
1102
|
gap: "xl",
|
|
1090
|
-
headerStart: /* @__PURE__ */
|
|
1103
|
+
headerStart: /* @__PURE__ */ J(U, {
|
|
1091
1104
|
className: "vendor-profile--identity flex-nowrap py-0",
|
|
1092
|
-
children: [/* @__PURE__ */
|
|
1105
|
+
children: [/* @__PURE__ */ q(B, {
|
|
1093
1106
|
variant: "avatar",
|
|
1094
|
-
children: /* @__PURE__ */
|
|
1107
|
+
children: /* @__PURE__ */ J(re, { children: [!!a && /* @__PURE__ */ q(ie, {
|
|
1095
1108
|
src: a,
|
|
1096
1109
|
alt: e
|
|
1097
|
-
}), /* @__PURE__ */
|
|
1110
|
+
}), /* @__PURE__ */ q(ne, { children: t ?? /* @__PURE__ */ q(M, {
|
|
1098
1111
|
value: e,
|
|
1099
1112
|
strategy: "first-words"
|
|
1100
1113
|
}) })] })
|
|
1101
|
-
}), /* @__PURE__ */
|
|
1114
|
+
}), /* @__PURE__ */ J(H, { children: [/* @__PURE__ */ J(f, {
|
|
1102
1115
|
direction: "horizontal",
|
|
1103
1116
|
gap: "sm",
|
|
1104
1117
|
wrap: !1,
|
|
1105
1118
|
className: "min-w-0",
|
|
1106
|
-
children: [/* @__PURE__ */ W
|
|
1119
|
+
children: [/* @__PURE__ */ q(W, {
|
|
1107
1120
|
className: "min-w-0 truncate",
|
|
1108
1121
|
children: e
|
|
1109
|
-
}), !!c && /* @__PURE__ */
|
|
1122
|
+
}), !!c && /* @__PURE__ */ q(I, {
|
|
1110
1123
|
tone: "success",
|
|
1111
1124
|
className: "shrink-0",
|
|
1112
1125
|
children: k.verifiedAriaLabel
|
|
1113
1126
|
})]
|
|
1114
|
-
}), !!o && /* @__PURE__ */
|
|
1127
|
+
}), !!o && /* @__PURE__ */ q(V, {
|
|
1115
1128
|
clamp: 2,
|
|
1116
1129
|
children: o
|
|
1117
1130
|
})] })]
|
|
1118
1131
|
}),
|
|
1119
|
-
footerSlot:
|
|
1120
|
-
className: "vendor-profile--actions flex flex-wrap
|
|
1121
|
-
children: [!!x && /* @__PURE__ */
|
|
1132
|
+
footerSlot: R ? /* @__PURE__ */ J("div", {
|
|
1133
|
+
className: r("vendor-profile--actions flex flex-wrap", S.commands),
|
|
1134
|
+
children: [!!x && /* @__PURE__ */ q(i, {
|
|
1122
1135
|
type: "button",
|
|
1123
1136
|
tone: "secondary",
|
|
1124
1137
|
buttonStyle: "outline",
|
|
1125
1138
|
className: "min-w-0 flex-1",
|
|
1126
1139
|
onClick: x,
|
|
1127
1140
|
children: k.message
|
|
1128
|
-
}), !!
|
|
1141
|
+
}), !!C && /* @__PURE__ */ J(i, {
|
|
1129
1142
|
type: "button",
|
|
1130
1143
|
tone: "primary",
|
|
1131
1144
|
className: "min-w-0 flex-1",
|
|
1132
|
-
onClick:
|
|
1133
|
-
children: [k.hire, /* @__PURE__ */
|
|
1145
|
+
onClick: C,
|
|
1146
|
+
children: [k.hire, /* @__PURE__ */ q(Fe, {
|
|
1134
1147
|
className: "size-icon-sm",
|
|
1135
1148
|
"aria-hidden": "true"
|
|
1136
1149
|
})]
|
|
1137
1150
|
})]
|
|
1138
1151
|
}) : void 0,
|
|
1139
|
-
contentClassName: r(!
|
|
1152
|
+
contentClassName: r(!oe && "hidden"),
|
|
1140
1153
|
className: r("vendor-profile--component", T),
|
|
1141
|
-
children:
|
|
1154
|
+
children: oe ? ue : null
|
|
1142
1155
|
});
|
|
1143
1156
|
});
|
|
1144
1157
|
Tt.displayName = "VendorProfileCard";
|
|
@@ -1157,82 +1170,82 @@ var Et = {
|
|
|
1157
1170
|
//#region src/components/blocks/commerce/inventory-level/inventory-level.tsx
|
|
1158
1171
|
function Dt({ productName: e, variant: t, stock: i, reorderLevel: a, maxStock: s, lastRestocked: c, className: l, strings: u }) {
|
|
1159
1172
|
let d = n(Et, u), p = Ee(), m = i <= a, h = i <= a * .5, g = h ? "destructive" : m ? "warning" : "success", _ = h ? d.statusCritical : m ? d.statusLowStock : d.statusInStock;
|
|
1160
|
-
return /* @__PURE__ */
|
|
1173
|
+
return /* @__PURE__ */ J(f, {
|
|
1161
1174
|
"data-component": "inventory-level",
|
|
1162
1175
|
"data-slot": "inventory-level",
|
|
1163
1176
|
gap: "xl",
|
|
1164
1177
|
className: r("inventory-level--component", l),
|
|
1165
1178
|
children: [
|
|
1166
|
-
/* @__PURE__ */
|
|
1179
|
+
/* @__PURE__ */ J(f, {
|
|
1167
1180
|
gap: "dense",
|
|
1168
1181
|
className: "inventory-level--product",
|
|
1169
|
-
children: [/* @__PURE__ */
|
|
1182
|
+
children: [/* @__PURE__ */ J(f, {
|
|
1170
1183
|
direction: "horizontal",
|
|
1171
1184
|
gap: "sm",
|
|
1172
1185
|
wrap: !1,
|
|
1173
1186
|
className: "min-w-0",
|
|
1174
|
-
children: [/* @__PURE__ */
|
|
1187
|
+
children: [/* @__PURE__ */ q(o, {
|
|
1175
1188
|
type: "inherit",
|
|
1176
1189
|
weight: "semibold",
|
|
1177
1190
|
className: "min-w-0 truncate",
|
|
1178
1191
|
children: e
|
|
1179
|
-
}), /* @__PURE__ */
|
|
1192
|
+
}), /* @__PURE__ */ q(I, {
|
|
1180
1193
|
tone: g,
|
|
1181
1194
|
className: "shrink-0",
|
|
1182
1195
|
children: _
|
|
1183
1196
|
})]
|
|
1184
|
-
}), !!t && /* @__PURE__ */
|
|
1197
|
+
}), !!t && /* @__PURE__ */ q(o, {
|
|
1185
1198
|
size: "xs",
|
|
1186
1199
|
type: "secondary",
|
|
1187
1200
|
className: "truncate",
|
|
1188
1201
|
children: `${d.variantLabel}: ${t}`
|
|
1189
1202
|
})]
|
|
1190
1203
|
}),
|
|
1191
|
-
/* @__PURE__ */
|
|
1204
|
+
/* @__PURE__ */ J(f, {
|
|
1192
1205
|
id: p,
|
|
1193
1206
|
gap: "dense",
|
|
1194
1207
|
className: "inventory-level--stock",
|
|
1195
|
-
children: [/* @__PURE__ */
|
|
1208
|
+
children: [/* @__PURE__ */ q(P, {
|
|
1196
1209
|
type: "inherit",
|
|
1197
1210
|
value: i,
|
|
1198
1211
|
weight: "semibold",
|
|
1199
1212
|
align: "left"
|
|
1200
|
-
}), /* @__PURE__ */
|
|
1213
|
+
}), /* @__PURE__ */ q(o, {
|
|
1201
1214
|
size: "xs",
|
|
1202
1215
|
type: "secondary",
|
|
1203
1216
|
children: d.unitsAvailable
|
|
1204
1217
|
})]
|
|
1205
1218
|
}),
|
|
1206
|
-
/* @__PURE__ */
|
|
1219
|
+
/* @__PURE__ */ J(f, {
|
|
1207
1220
|
gap: "md",
|
|
1208
1221
|
className: "inventory-level--gauge",
|
|
1209
|
-
children: [/* @__PURE__ */
|
|
1222
|
+
children: [/* @__PURE__ */ q(v, {
|
|
1210
1223
|
value: i,
|
|
1211
1224
|
max: s,
|
|
1212
1225
|
tone: g,
|
|
1213
1226
|
"aria-labelledby": p
|
|
1214
|
-
}), /* @__PURE__ */
|
|
1227
|
+
}), /* @__PURE__ */ J("div", {
|
|
1215
1228
|
className: "flex items-center justify-between",
|
|
1216
|
-
children: [/* @__PURE__ */
|
|
1229
|
+
children: [/* @__PURE__ */ J(o, {
|
|
1217
1230
|
size: "xs",
|
|
1218
1231
|
type: "secondary",
|
|
1219
1232
|
children: [
|
|
1220
1233
|
d.reorderAtLabel,
|
|
1221
1234
|
": ",
|
|
1222
|
-
/* @__PURE__ */
|
|
1235
|
+
/* @__PURE__ */ q(P, {
|
|
1223
1236
|
type: "inherit",
|
|
1224
1237
|
value: a,
|
|
1225
1238
|
weight: "medium",
|
|
1226
1239
|
align: "left"
|
|
1227
1240
|
})
|
|
1228
1241
|
]
|
|
1229
|
-
}), !!c && /* @__PURE__ */
|
|
1242
|
+
}), !!c && /* @__PURE__ */ J(o, {
|
|
1230
1243
|
size: "xs",
|
|
1231
1244
|
type: "secondary",
|
|
1232
1245
|
children: [
|
|
1233
1246
|
d.lastRestockedLabel,
|
|
1234
1247
|
": ",
|
|
1235
|
-
/* @__PURE__ */
|
|
1248
|
+
/* @__PURE__ */ q(k, {
|
|
1236
1249
|
size: "xs",
|
|
1237
1250
|
children: c
|
|
1238
1251
|
})
|
|
@@ -1254,34 +1267,35 @@ var Ot = {
|
|
|
1254
1267
|
};
|
|
1255
1268
|
//#endregion
|
|
1256
1269
|
//#region src/components/blocks/commerce/tax-breakdown/tax-breakdown.tsx
|
|
1257
|
-
function kt({ subtotal: e, taxes: t, totalTax: i, total: a, className: o, strings: s,
|
|
1258
|
-
let
|
|
1259
|
-
return /* @__PURE__ */
|
|
1260
|
-
...
|
|
1261
|
-
surface:
|
|
1262
|
-
padding:
|
|
1263
|
-
|
|
1270
|
+
function kt({ subtotal: e, taxes: t, totalTax: i, total: a, className: o, strings: s, surface: c = "flat", padding: l = c === "flat" ? "none" : "md", headerDivider: u, ...d }) {
|
|
1271
|
+
let f = n(Ot, s);
|
|
1272
|
+
return /* @__PURE__ */ q(_, {
|
|
1273
|
+
...d,
|
|
1274
|
+
surface: c,
|
|
1275
|
+
padding: l,
|
|
1276
|
+
headerDivider: u,
|
|
1277
|
+
title: f.title,
|
|
1264
1278
|
"data-slot": "tax-breakdown",
|
|
1265
1279
|
className: r("tax-breakdown--component w-full", o),
|
|
1266
|
-
children: /* @__PURE__ */
|
|
1280
|
+
children: /* @__PURE__ */ J(X, {
|
|
1267
1281
|
className: "tax-breakdown--ledger",
|
|
1268
1282
|
children: [
|
|
1269
|
-
/* @__PURE__ */
|
|
1270
|
-
label:
|
|
1283
|
+
/* @__PURE__ */ q(Y, {
|
|
1284
|
+
label: f.subtotal,
|
|
1271
1285
|
amount: e
|
|
1272
1286
|
}),
|
|
1273
|
-
t.map((e, t) => /* @__PURE__ */
|
|
1287
|
+
t.map((e, t) => /* @__PURE__ */ q(Y, {
|
|
1274
1288
|
className: "tax-breakdown--line",
|
|
1275
1289
|
label: e.label,
|
|
1276
1290
|
note: e.rate,
|
|
1277
1291
|
amount: e.amount
|
|
1278
1292
|
}, e.id ?? `${e.label}-${t}`)),
|
|
1279
|
-
!!i && t.length > 1 && /* @__PURE__ */
|
|
1280
|
-
label:
|
|
1293
|
+
!!i && t.length > 1 && /* @__PURE__ */ q(Y, {
|
|
1294
|
+
label: f.totalTax,
|
|
1281
1295
|
amount: i
|
|
1282
1296
|
}),
|
|
1283
|
-
/* @__PURE__ */
|
|
1284
|
-
label:
|
|
1297
|
+
/* @__PURE__ */ q(Y, {
|
|
1298
|
+
label: f.total,
|
|
1285
1299
|
amount: a,
|
|
1286
1300
|
total: !0,
|
|
1287
1301
|
rollup: !0
|
|
@@ -1305,84 +1319,84 @@ var At = {
|
|
|
1305
1319
|
//#region src/components/blocks/commerce/subscription-summary/subscription-summary.tsx
|
|
1306
1320
|
function jt({ planName: e, priceLabel: t, cycleLabel: a, nextBillingDate: l, statusLabel: u, perks: d = [], onManage: p, onUpgrade: m, className: h, strings: g }) {
|
|
1307
1321
|
let _ = n(At, g);
|
|
1308
|
-
return /* @__PURE__ */
|
|
1322
|
+
return /* @__PURE__ */ J(z, {
|
|
1309
1323
|
title: _.title,
|
|
1310
|
-
titleSuffix: u ? /* @__PURE__ */
|
|
1324
|
+
titleSuffix: u ? /* @__PURE__ */ q(I, {
|
|
1311
1325
|
tone: "success",
|
|
1312
1326
|
children: u
|
|
1313
1327
|
}) : null,
|
|
1314
1328
|
contentGap: "2xl",
|
|
1315
1329
|
className: r("subscription-summary--component w-full", h),
|
|
1316
1330
|
children: [
|
|
1317
|
-
/* @__PURE__ */
|
|
1331
|
+
/* @__PURE__ */ J(f, {
|
|
1318
1332
|
gap: "lg",
|
|
1319
1333
|
className: "subscription-summary--plan",
|
|
1320
|
-
children: [/* @__PURE__ */
|
|
1334
|
+
children: [/* @__PURE__ */ J(f, {
|
|
1321
1335
|
direction: "horizontal",
|
|
1322
1336
|
justify: "between",
|
|
1323
1337
|
align: "end",
|
|
1324
1338
|
gap: "lg",
|
|
1325
|
-
children: [/* @__PURE__ */
|
|
1339
|
+
children: [/* @__PURE__ */ J(f, {
|
|
1326
1340
|
gap: "dense",
|
|
1327
1341
|
className: "min-w-0",
|
|
1328
|
-
children: [/* @__PURE__ */
|
|
1342
|
+
children: [/* @__PURE__ */ q(s, { children: _.plan }), /* @__PURE__ */ q(c, {
|
|
1329
1343
|
className: "text-inherit",
|
|
1330
1344
|
tag: "h3",
|
|
1331
1345
|
children: e
|
|
1332
1346
|
})]
|
|
1333
|
-
}), /* @__PURE__ */
|
|
1347
|
+
}), /* @__PURE__ */ J(f, {
|
|
1334
1348
|
direction: "horizontal",
|
|
1335
1349
|
align: "baseline",
|
|
1336
1350
|
gap: "xs",
|
|
1337
1351
|
className: "shrink-0",
|
|
1338
|
-
children: [/* @__PURE__ */
|
|
1352
|
+
children: [/* @__PURE__ */ q(D, {
|
|
1339
1353
|
type: "inherit",
|
|
1340
1354
|
weight: "bold",
|
|
1341
1355
|
className: "tabular-nums",
|
|
1342
1356
|
children: t
|
|
1343
|
-
}), /* @__PURE__ */
|
|
1357
|
+
}), /* @__PURE__ */ q(o, {
|
|
1344
1358
|
type: "secondary",
|
|
1345
1359
|
children: a
|
|
1346
1360
|
})]
|
|
1347
1361
|
})]
|
|
1348
|
-
}), /* @__PURE__ */
|
|
1362
|
+
}), /* @__PURE__ */ q(K, {
|
|
1349
1363
|
label: _.nextBilling,
|
|
1350
1364
|
value: l,
|
|
1351
1365
|
valueWeight: "semibold",
|
|
1352
1366
|
valueClassName: "tabular-nums"
|
|
1353
1367
|
})]
|
|
1354
1368
|
}),
|
|
1355
|
-
d.length > 0 && /* @__PURE__ */
|
|
1369
|
+
d.length > 0 && /* @__PURE__ */ J(f, {
|
|
1356
1370
|
gap: "md",
|
|
1357
1371
|
className: "subscription-summary--perks",
|
|
1358
|
-
children: [/* @__PURE__ */
|
|
1372
|
+
children: [/* @__PURE__ */ q(s, { children: _.perks }), /* @__PURE__ */ q(ge, { children: d.map((e, t) => {
|
|
1359
1373
|
let n = e.icon;
|
|
1360
|
-
return /* @__PURE__ */
|
|
1374
|
+
return /* @__PURE__ */ J(U, {
|
|
1361
1375
|
size: "sm",
|
|
1362
1376
|
density: "compact",
|
|
1363
|
-
children: [!!n && /* @__PURE__ */
|
|
1377
|
+
children: [!!n && /* @__PURE__ */ q(B, { children: /* @__PURE__ */ q(n, {
|
|
1364
1378
|
"aria-hidden": "true",
|
|
1365
1379
|
className: "size-icon text-muted-foreground"
|
|
1366
|
-
}) }), /* @__PURE__ */
|
|
1380
|
+
}) }), /* @__PURE__ */ q(H, { children: /* @__PURE__ */ q(W, {
|
|
1367
1381
|
bold: !1,
|
|
1368
1382
|
children: e.label
|
|
1369
1383
|
}) })]
|
|
1370
1384
|
}, `${e.label}-${t}`);
|
|
1371
1385
|
}) })]
|
|
1372
1386
|
}),
|
|
1373
|
-
(p || m) && /* @__PURE__ */
|
|
1387
|
+
(p || m) && /* @__PURE__ */ J("div", {
|
|
1374
1388
|
className: "flex items-center gap-space-md",
|
|
1375
|
-
children: [!!p && /* @__PURE__ */
|
|
1389
|
+
children: [!!p && /* @__PURE__ */ q(i, {
|
|
1376
1390
|
tone: "secondary",
|
|
1377
1391
|
buttonStyle: "outline",
|
|
1378
1392
|
onClick: p,
|
|
1379
1393
|
className: "flex-1",
|
|
1380
1394
|
children: _.manage
|
|
1381
|
-
}), !!m && /* @__PURE__ */
|
|
1395
|
+
}), !!m && /* @__PURE__ */ J(i, {
|
|
1382
1396
|
tone: "primary",
|
|
1383
1397
|
onClick: m,
|
|
1384
1398
|
className: "flex-1",
|
|
1385
|
-
children: [_.upgrade, /* @__PURE__ */
|
|
1399
|
+
children: [_.upgrade, /* @__PURE__ */ q(Fe, { className: "ml-1 size-icon-md" })]
|
|
1386
1400
|
})]
|
|
1387
1401
|
})
|
|
1388
1402
|
]
|
|
@@ -1407,91 +1421,92 @@ var Mt = {
|
|
|
1407
1421
|
"processing",
|
|
1408
1422
|
"completed"
|
|
1409
1423
|
];
|
|
1410
|
-
function
|
|
1424
|
+
function Pt(e) {
|
|
1411
1425
|
return e != null && e !== !1 && e !== "";
|
|
1412
1426
|
}
|
|
1413
|
-
function
|
|
1414
|
-
let
|
|
1415
|
-
return /* @__PURE__ */
|
|
1416
|
-
...
|
|
1417
|
-
surface:
|
|
1418
|
-
padding:
|
|
1419
|
-
|
|
1427
|
+
function Ft({ stage: e, amount: t, reason: i, method: a, eta: s, requestedAt: c, className: l, strings: u, surface: d = "flat", padding: m = d === "flat" ? "none" : "md", headerDivider: h, ...g }) {
|
|
1428
|
+
let v = n(Mt, u), y = Nt.indexOf(e), b = Pt(i) || Pt(a) || Pt(s);
|
|
1429
|
+
return /* @__PURE__ */ J(_, {
|
|
1430
|
+
...g,
|
|
1431
|
+
surface: d,
|
|
1432
|
+
padding: m,
|
|
1433
|
+
headerDivider: h,
|
|
1434
|
+
title: v.title,
|
|
1420
1435
|
contentGap: "2xl",
|
|
1421
1436
|
"data-slot": "refund-status",
|
|
1422
1437
|
className: r("refund-status--component w-full", l),
|
|
1423
1438
|
children: [
|
|
1424
|
-
/* @__PURE__ */
|
|
1439
|
+
/* @__PURE__ */ J(f, {
|
|
1425
1440
|
gap: "dense",
|
|
1426
|
-
children: [/* @__PURE__ */
|
|
1427
|
-
label:
|
|
1441
|
+
children: [/* @__PURE__ */ q(Y, {
|
|
1442
|
+
label: v.amount,
|
|
1428
1443
|
amount: t,
|
|
1429
1444
|
total: !0,
|
|
1430
1445
|
className: "refund-status--amount"
|
|
1431
|
-
}), !!c && /* @__PURE__ */
|
|
1446
|
+
}), !!c && /* @__PURE__ */ J(o, {
|
|
1432
1447
|
size: "xs",
|
|
1433
1448
|
type: "secondary",
|
|
1434
1449
|
children: [
|
|
1435
|
-
|
|
1450
|
+
v.requested,
|
|
1436
1451
|
": ",
|
|
1437
|
-
/* @__PURE__ */
|
|
1452
|
+
/* @__PURE__ */ q(k, {
|
|
1438
1453
|
size: "xs",
|
|
1439
1454
|
children: c
|
|
1440
1455
|
})
|
|
1441
1456
|
]
|
|
1442
1457
|
})]
|
|
1443
1458
|
}),
|
|
1444
|
-
/* @__PURE__ */
|
|
1459
|
+
/* @__PURE__ */ q("ol", {
|
|
1445
1460
|
className: "refund-status--stages m-0 flex list-none items-start p-0",
|
|
1446
1461
|
children: Nt.map((e, t) => {
|
|
1447
|
-
let n = t <=
|
|
1448
|
-
return /* @__PURE__ */
|
|
1462
|
+
let n = t <= y, i = t === y;
|
|
1463
|
+
return /* @__PURE__ */ J("li", {
|
|
1449
1464
|
"data-reached": n ? "" : void 0,
|
|
1450
1465
|
"data-current": i ? "" : void 0,
|
|
1451
1466
|
"aria-current": i ? "step" : void 0,
|
|
1452
1467
|
className: "refund-status--stage flex min-w-0 flex-1 flex-col items-start gap-space-sm",
|
|
1453
|
-
children: [/* @__PURE__ */
|
|
1468
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1454
1469
|
"aria-hidden": "true",
|
|
1455
1470
|
className: "flex w-full items-center",
|
|
1456
|
-
children: [/* @__PURE__ */
|
|
1471
|
+
children: [/* @__PURE__ */ q("div", {
|
|
1457
1472
|
className: r("relative flex size-icon-lg shrink-0 items-center justify-center rounded-full", n ? "bg-success text-success-foreground" : "border border-border bg-card text-muted-foreground", i && r("ring-4", p.success.halo)),
|
|
1458
|
-
children: n ? /* @__PURE__ */
|
|
1473
|
+
children: n ? /* @__PURE__ */ q(Ne, { className: "size-icon-sm" }) : /* @__PURE__ */ q(P, {
|
|
1459
1474
|
type: "inherit",
|
|
1460
1475
|
value: t + 1,
|
|
1461
1476
|
size: "xs",
|
|
1462
1477
|
weight: "medium",
|
|
1463
1478
|
align: "center"
|
|
1464
1479
|
})
|
|
1465
|
-
}), t < Nt.length - 1 && /* @__PURE__ */
|
|
1466
|
-
}), /* @__PURE__ */
|
|
1480
|
+
}), t < Nt.length - 1 && /* @__PURE__ */ q("div", { className: r("h-0.5 flex-1", t < y ? "bg-success" : "bg-border") })]
|
|
1481
|
+
}), /* @__PURE__ */ q(o, {
|
|
1467
1482
|
size: "xs",
|
|
1468
1483
|
weight: i ? "semibold" : "medium",
|
|
1469
1484
|
type: n ? "main" : "secondary",
|
|
1470
1485
|
lineHeight: "tight",
|
|
1471
1486
|
className: "refund-status--stage-label",
|
|
1472
|
-
children:
|
|
1487
|
+
children: v[e]
|
|
1473
1488
|
})]
|
|
1474
1489
|
}, e);
|
|
1475
1490
|
})
|
|
1476
1491
|
}),
|
|
1477
|
-
!!
|
|
1492
|
+
!!b && /* @__PURE__ */ J(f, {
|
|
1478
1493
|
gap: "md",
|
|
1479
1494
|
className: "refund-status--facts",
|
|
1480
1495
|
children: [
|
|
1481
|
-
|
|
1482
|
-
label:
|
|
1496
|
+
Pt(i) && /* @__PURE__ */ q(K, {
|
|
1497
|
+
label: v.reason,
|
|
1483
1498
|
value: i,
|
|
1484
1499
|
className: "items-start",
|
|
1485
1500
|
valueWeight: "medium",
|
|
1486
1501
|
valueClassName: "text-end"
|
|
1487
1502
|
}),
|
|
1488
|
-
|
|
1489
|
-
label:
|
|
1503
|
+
Pt(a) && /* @__PURE__ */ q(K, {
|
|
1504
|
+
label: v.method,
|
|
1490
1505
|
value: a,
|
|
1491
1506
|
valueWeight: "medium"
|
|
1492
1507
|
}),
|
|
1493
|
-
|
|
1494
|
-
label:
|
|
1508
|
+
Pt(s) && /* @__PURE__ */ q(K, {
|
|
1509
|
+
label: v.eta,
|
|
1495
1510
|
value: s,
|
|
1496
1511
|
valueWeight: "medium",
|
|
1497
1512
|
valueClassName: "tabular-nums"
|
|
@@ -1501,43 +1516,43 @@ function Pt({ stage: e, amount: t, reason: i, method: a, eta: s, requestedAt: c,
|
|
|
1501
1516
|
]
|
|
1502
1517
|
});
|
|
1503
1518
|
}
|
|
1504
|
-
|
|
1505
|
-
var
|
|
1519
|
+
Ft.displayName = "RefundStatusCard";
|
|
1520
|
+
var It = Ft;
|
|
1506
1521
|
//#endregion
|
|
1507
1522
|
//#region src/components/blocks/commerce/shared/address-lines.tsx
|
|
1508
|
-
function
|
|
1523
|
+
function Lt({ address: e, prominent: t = !1, className: n, ...i }) {
|
|
1509
1524
|
let a = [
|
|
1510
1525
|
e.city,
|
|
1511
1526
|
e.region,
|
|
1512
1527
|
e.postalCode
|
|
1513
1528
|
].filter(Boolean).join(", ");
|
|
1514
|
-
return /* @__PURE__ */
|
|
1529
|
+
return /* @__PURE__ */ J(f, {
|
|
1515
1530
|
gap: "2xs",
|
|
1516
|
-
render: /* @__PURE__ */
|
|
1531
|
+
render: /* @__PURE__ */ q("address", { ...i }),
|
|
1517
1532
|
className: r("address-lines--component not-italic", n),
|
|
1518
1533
|
children: [
|
|
1519
|
-
!!e.name && /* @__PURE__ */
|
|
1534
|
+
!!e.name && /* @__PURE__ */ q(o, {
|
|
1520
1535
|
type: "inherit",
|
|
1521
1536
|
weight: t ? "semibold" : "regular",
|
|
1522
1537
|
children: e.name
|
|
1523
1538
|
}),
|
|
1524
|
-
/* @__PURE__ */
|
|
1539
|
+
/* @__PURE__ */ q(o, {
|
|
1525
1540
|
type: "inherit",
|
|
1526
1541
|
children: e.line1
|
|
1527
1542
|
}),
|
|
1528
|
-
!!e.line2 && /* @__PURE__ */
|
|
1543
|
+
!!e.line2 && /* @__PURE__ */ q(o, {
|
|
1529
1544
|
type: "inherit",
|
|
1530
1545
|
children: e.line2
|
|
1531
1546
|
}),
|
|
1532
|
-
!!a && /* @__PURE__ */
|
|
1547
|
+
!!a && /* @__PURE__ */ q(o, {
|
|
1533
1548
|
type: "inherit",
|
|
1534
1549
|
children: a
|
|
1535
1550
|
}),
|
|
1536
|
-
/* @__PURE__ */
|
|
1551
|
+
/* @__PURE__ */ q(o, {
|
|
1537
1552
|
type: "secondary",
|
|
1538
1553
|
children: e.country
|
|
1539
1554
|
}),
|
|
1540
|
-
!!e.phone && /* @__PURE__ */
|
|
1555
|
+
!!e.phone && /* @__PURE__ */ q(O, {
|
|
1541
1556
|
value: e.phone,
|
|
1542
1557
|
className: "self-start"
|
|
1543
1558
|
})
|
|
@@ -1546,7 +1561,7 @@ function It({ address: e, prominent: t = !1, className: n, ...i }) {
|
|
|
1546
1561
|
}
|
|
1547
1562
|
//#endregion
|
|
1548
1563
|
//#region src/components/blocks/commerce/address-card/types.ts
|
|
1549
|
-
var
|
|
1564
|
+
var Rt = {
|
|
1550
1565
|
defaultBadge: "Default",
|
|
1551
1566
|
edit: "Edit",
|
|
1552
1567
|
remove: "Remove",
|
|
@@ -1557,42 +1572,42 @@ var Lt = {
|
|
|
1557
1572
|
};
|
|
1558
1573
|
//#endregion
|
|
1559
1574
|
//#region src/components/blocks/commerce/address-card/address-card.tsx
|
|
1560
|
-
function
|
|
1561
|
-
let
|
|
1562
|
-
shipping:
|
|
1563
|
-
billing:
|
|
1564
|
-
pickup:
|
|
1565
|
-
},
|
|
1566
|
-
return m &&
|
|
1575
|
+
function zt({ kind: e = "shipping", name: t, line1: i, line2: a, city: s, region: c, postalCode: l, country: u, phone: d, default: p = !1, onEdit: m, onRemove: h, onMakeDefault: g, surface: v = "flat", padding: y = v === "flat" ? "none" : "md", headerDivider: b, className: x, strings: S, ...C }) {
|
|
1576
|
+
let w = n(Rt, S), T = {
|
|
1577
|
+
shipping: w.shipping,
|
|
1578
|
+
billing: w.billing,
|
|
1579
|
+
pickup: w.pickup
|
|
1580
|
+
}, E = [];
|
|
1581
|
+
return m && E.push({
|
|
1567
1582
|
id: "edit",
|
|
1568
|
-
label:
|
|
1569
|
-
icon: /* @__PURE__ */
|
|
1583
|
+
label: w.edit,
|
|
1584
|
+
icon: /* @__PURE__ */ q(ze, { className: "size-icon-md" }),
|
|
1570
1585
|
onClick: m
|
|
1571
|
-
}), g && !p &&
|
|
1586
|
+
}), g && !p && E.push({
|
|
1572
1587
|
id: "make-default",
|
|
1573
|
-
label:
|
|
1574
|
-
icon: /* @__PURE__ */
|
|
1588
|
+
label: w.makeDefault,
|
|
1589
|
+
icon: /* @__PURE__ */ q(Ue, { className: "size-icon-md" }),
|
|
1575
1590
|
onClick: g
|
|
1576
|
-
}), h &&
|
|
1591
|
+
}), h && E.push({
|
|
1577
1592
|
id: "remove",
|
|
1578
|
-
label:
|
|
1579
|
-
icon: /* @__PURE__ */
|
|
1593
|
+
label: w.remove,
|
|
1594
|
+
icon: /* @__PURE__ */ q(We, { className: "size-icon-md" }),
|
|
1580
1595
|
onClick: h
|
|
1581
|
-
}), /* @__PURE__ */
|
|
1596
|
+
}), /* @__PURE__ */ q(_, {
|
|
1582
1597
|
...C,
|
|
1583
1598
|
surface: v,
|
|
1584
1599
|
padding: y,
|
|
1585
1600
|
headerDivider: b,
|
|
1586
|
-
title:
|
|
1587
|
-
titleSuffix: p ? /* @__PURE__ */
|
|
1601
|
+
title: T[e],
|
|
1602
|
+
titleSuffix: p ? /* @__PURE__ */ q(I, {
|
|
1588
1603
|
tone: "neutral",
|
|
1589
|
-
children:
|
|
1604
|
+
children: w.defaultBadge
|
|
1590
1605
|
}) : null,
|
|
1591
|
-
actions:
|
|
1606
|
+
actions: E.length > 0 ? E : void 0,
|
|
1592
1607
|
className: r("address-card--component w-full", x),
|
|
1593
|
-
children: /* @__PURE__ */
|
|
1608
|
+
children: /* @__PURE__ */ J(f, {
|
|
1594
1609
|
gap: "md",
|
|
1595
|
-
children: [/* @__PURE__ */
|
|
1610
|
+
children: [/* @__PURE__ */ q(Lt, {
|
|
1596
1611
|
address: {
|
|
1597
1612
|
name: t,
|
|
1598
1613
|
line1: i,
|
|
@@ -1603,9 +1618,9 @@ function Rt({ kind: e = "shipping", name: t, line1: i, line2: a, city: s, region
|
|
|
1603
1618
|
country: u
|
|
1604
1619
|
},
|
|
1605
1620
|
prominent: !0
|
|
1606
|
-
}), !!d && /* @__PURE__ */
|
|
1621
|
+
}), !!d && /* @__PURE__ */ q(O, {
|
|
1607
1622
|
value: d,
|
|
1608
|
-
display: /* @__PURE__ */
|
|
1623
|
+
display: /* @__PURE__ */ q(o, {
|
|
1609
1624
|
type: "inherit",
|
|
1610
1625
|
tag: "span",
|
|
1611
1626
|
children: d
|
|
@@ -1615,10 +1630,10 @@ function Rt({ kind: e = "shipping", name: t, line1: i, line2: a, city: s, region
|
|
|
1615
1630
|
})
|
|
1616
1631
|
});
|
|
1617
1632
|
}
|
|
1618
|
-
|
|
1633
|
+
zt.displayName = "AddressCard";
|
|
1619
1634
|
//#endregion
|
|
1620
1635
|
//#region src/components/blocks/commerce/voucher-entry/types.ts
|
|
1621
|
-
var
|
|
1636
|
+
var Bt = {
|
|
1622
1637
|
title: "Redeem a gift card",
|
|
1623
1638
|
inputLabel: "Gift card code",
|
|
1624
1639
|
placeholder: "Enter gift card code",
|
|
@@ -1628,53 +1643,53 @@ var zt = {
|
|
|
1628
1643
|
balance: "Available balance",
|
|
1629
1644
|
applied: "Applied",
|
|
1630
1645
|
notFound: "That gift card code is not valid."
|
|
1631
|
-
},
|
|
1632
|
-
function
|
|
1633
|
-
let m = n(
|
|
1634
|
-
return e ? /* @__PURE__ */
|
|
1646
|
+
}, Vt = (e) => e.toUpperCase();
|
|
1647
|
+
function Ht({ appliedCode: e, balance: t, error: a, loading: o, onCheck: c, onRemove: l, className: u, strings: d }) {
|
|
1648
|
+
let m = n(Bt, d), h = Ee(), [g, _] = ke(""), v = g.trim();
|
|
1649
|
+
return e ? /* @__PURE__ */ q(z, {
|
|
1635
1650
|
title: m.title,
|
|
1636
1651
|
className: r("voucher-entry--component w-full", u),
|
|
1637
|
-
children: /* @__PURE__ */
|
|
1652
|
+
children: /* @__PURE__ */ J(U, {
|
|
1638
1653
|
size: "sm",
|
|
1639
1654
|
variant: "muted",
|
|
1640
1655
|
className: r("items-center gap-y-space-sm border", p.success.edge, p.success.wash),
|
|
1641
1656
|
children: [
|
|
1642
|
-
/* @__PURE__ */
|
|
1657
|
+
/* @__PURE__ */ q(B, { children: /* @__PURE__ */ q(F, {
|
|
1643
1658
|
icon: Ne,
|
|
1644
1659
|
tone: "success",
|
|
1645
1660
|
size: "md"
|
|
1646
1661
|
}) }),
|
|
1647
|
-
/* @__PURE__ */
|
|
1662
|
+
/* @__PURE__ */ J(H, {
|
|
1648
1663
|
className: "min-w-0 basis-48",
|
|
1649
|
-
children: [/* @__PURE__ */
|
|
1664
|
+
children: [/* @__PURE__ */ J(f, {
|
|
1650
1665
|
direction: "horizontal",
|
|
1651
1666
|
align: "center",
|
|
1652
1667
|
gap: "sm",
|
|
1653
1668
|
className: "min-w-0",
|
|
1654
|
-
children: [/* @__PURE__ */ W
|
|
1669
|
+
children: [/* @__PURE__ */ q(W, {
|
|
1655
1670
|
className: "max-w-full",
|
|
1656
|
-
children: /* @__PURE__ */
|
|
1671
|
+
children: /* @__PURE__ */ q(A, {
|
|
1657
1672
|
type: "inherit",
|
|
1658
1673
|
className: "tracking-wider",
|
|
1659
1674
|
children: e
|
|
1660
1675
|
})
|
|
1661
|
-
}), /* @__PURE__ */
|
|
1676
|
+
}), /* @__PURE__ */ q(s, {
|
|
1662
1677
|
className: "shrink-0",
|
|
1663
1678
|
children: m.applied
|
|
1664
1679
|
})]
|
|
1665
|
-
}), !!t && /* @__PURE__ */
|
|
1680
|
+
}), !!t && /* @__PURE__ */ q(V, {
|
|
1666
1681
|
clamp: 1,
|
|
1667
1682
|
children: m.balance
|
|
1668
1683
|
})]
|
|
1669
1684
|
}),
|
|
1670
|
-
/* @__PURE__ */
|
|
1685
|
+
/* @__PURE__ */ J(he, {
|
|
1671
1686
|
className: "ml-auto shrink-0 gap-space-sm",
|
|
1672
|
-
children: [!!t && /* @__PURE__ */
|
|
1687
|
+
children: [!!t && /* @__PURE__ */ q(D, {
|
|
1673
1688
|
type: "inherit",
|
|
1674
1689
|
weight: "semibold",
|
|
1675
1690
|
className: "shrink-0 tabular-nums",
|
|
1676
1691
|
children: t
|
|
1677
|
-
}), !!l && /* @__PURE__ */
|
|
1692
|
+
}), !!l && /* @__PURE__ */ q(i, {
|
|
1678
1693
|
type: "button",
|
|
1679
1694
|
tone: "destructive",
|
|
1680
1695
|
buttonStyle: "ghost",
|
|
@@ -1683,38 +1698,38 @@ function Vt({ appliedCode: e, balance: t, error: a, loading: o, onCheck: c, onRe
|
|
|
1683
1698
|
onClick: l,
|
|
1684
1699
|
"aria-label": m.remove,
|
|
1685
1700
|
className: "size-action-xs shrink-0 text-muted-foreground hover:text-destructive",
|
|
1686
|
-
children: /* @__PURE__ */
|
|
1701
|
+
children: /* @__PURE__ */ q(Ke, { className: "size-icon-sm" })
|
|
1687
1702
|
})]
|
|
1688
1703
|
})
|
|
1689
1704
|
]
|
|
1690
1705
|
})
|
|
1691
|
-
}) : /* @__PURE__ */
|
|
1706
|
+
}) : /* @__PURE__ */ q(z, {
|
|
1692
1707
|
title: m.title,
|
|
1693
1708
|
className: r("voucher-entry--component w-full", u),
|
|
1694
|
-
children: /* @__PURE__ */
|
|
1709
|
+
children: /* @__PURE__ */ q("form", {
|
|
1695
1710
|
onSubmit: (e) => {
|
|
1696
1711
|
e.preventDefault(), v && c?.(v);
|
|
1697
1712
|
},
|
|
1698
|
-
children: /* @__PURE__ */
|
|
1713
|
+
children: /* @__PURE__ */ q(R, {
|
|
1699
1714
|
label: m.inputLabel,
|
|
1700
1715
|
htmlFor: h,
|
|
1701
1716
|
error: a,
|
|
1702
1717
|
hint: a ? void 0 : m.helperText,
|
|
1703
|
-
children: /* @__PURE__ */
|
|
1718
|
+
children: /* @__PURE__ */ J("div", {
|
|
1704
1719
|
className: "flex flex-wrap gap-space-md",
|
|
1705
|
-
children: [/* @__PURE__ */
|
|
1720
|
+
children: [/* @__PURE__ */ q("div", {
|
|
1706
1721
|
className: "min-w-48 flex-1",
|
|
1707
|
-
children: /* @__PURE__ */
|
|
1722
|
+
children: /* @__PURE__ */ q(L, {
|
|
1708
1723
|
id: h,
|
|
1709
1724
|
value: g,
|
|
1710
|
-
onChange: (e) => _(
|
|
1725
|
+
onChange: (e) => _(Vt(e.target.value)),
|
|
1711
1726
|
placeholder: m.placeholder,
|
|
1712
1727
|
autoCapitalize: "characters",
|
|
1713
1728
|
spellCheck: !1,
|
|
1714
1729
|
className: "font-mono",
|
|
1715
1730
|
invalid: !!a
|
|
1716
1731
|
})
|
|
1717
|
-
}), /* @__PURE__ */
|
|
1732
|
+
}), /* @__PURE__ */ q(i, {
|
|
1718
1733
|
tone: "primary",
|
|
1719
1734
|
type: "submit",
|
|
1720
1735
|
loading: o,
|
|
@@ -1727,14 +1742,14 @@ function Vt({ appliedCode: e, balance: t, error: a, loading: o, onCheck: c, onRe
|
|
|
1727
1742
|
})
|
|
1728
1743
|
});
|
|
1729
1744
|
}
|
|
1730
|
-
|
|
1745
|
+
Ht.displayName = "VoucherEntry";
|
|
1731
1746
|
//#endregion
|
|
1732
1747
|
//#region src/components/blocks/commerce/shared/line-thumbnail.tsx
|
|
1733
|
-
function
|
|
1734
|
-
return /* @__PURE__ */
|
|
1748
|
+
function Ut({ title: e }) {
|
|
1749
|
+
return /* @__PURE__ */ q("div", {
|
|
1735
1750
|
"aria-hidden": "true",
|
|
1736
1751
|
className: "line-thumbnail--placeholder flex size-full items-center justify-center rounded-[inherit] bg-muted ring-1 ring-border/60",
|
|
1737
|
-
children: /* @__PURE__ */
|
|
1752
|
+
children: /* @__PURE__ */ q(M, {
|
|
1738
1753
|
value: e,
|
|
1739
1754
|
strategy: "first-words",
|
|
1740
1755
|
fallback: e.trim().slice(0, 2).toUpperCase(),
|
|
@@ -1744,9 +1759,9 @@ function Ht({ title: e }) {
|
|
|
1744
1759
|
})
|
|
1745
1760
|
});
|
|
1746
1761
|
}
|
|
1747
|
-
function
|
|
1762
|
+
function Wt({ src: e, alt: t, title: n }) {
|
|
1748
1763
|
let [r, i] = ke(void 0), a = e?.trim() ? e : void 0;
|
|
1749
|
-
return !a || r === a ? /* @__PURE__ */
|
|
1764
|
+
return !a || r === a ? /* @__PURE__ */ q(Ut, { title: n }) : /* @__PURE__ */ q("img", {
|
|
1750
1765
|
src: a,
|
|
1751
1766
|
alt: t ?? n,
|
|
1752
1767
|
className: "line-thumbnail--image",
|
|
@@ -1755,7 +1770,7 @@ function Ut({ src: e, alt: t, title: n }) {
|
|
|
1755
1770
|
}
|
|
1756
1771
|
//#endregion
|
|
1757
1772
|
//#region src/components/blocks/commerce/cart-summary/types.ts
|
|
1758
|
-
var
|
|
1773
|
+
var Gt = {
|
|
1759
1774
|
title: "Cart",
|
|
1760
1775
|
subtotal: "Subtotal",
|
|
1761
1776
|
tax: "Tax",
|
|
@@ -1764,61 +1779,62 @@ var Wt = {
|
|
|
1764
1779
|
total: "Total",
|
|
1765
1780
|
checkout: "Checkout",
|
|
1766
1781
|
formatQuantity: (e) => `×${e}`
|
|
1767
|
-
},
|
|
1782
|
+
}, Kt = (e) => [
|
|
1768
1783
|
e.productTitle,
|
|
1769
1784
|
e.title,
|
|
1770
1785
|
e.name
|
|
1771
|
-
].find((e) => !!e?.trim()) ?? e.id,
|
|
1786
|
+
].find((e) => !!e?.trim()) ?? e.id, qt = (e) => [
|
|
1772
1787
|
e.imageUrl,
|
|
1773
1788
|
e.imageSrc,
|
|
1774
1789
|
e.src,
|
|
1775
1790
|
e.url
|
|
1776
1791
|
].find((e) => !!e?.trim());
|
|
1777
|
-
function
|
|
1778
|
-
let
|
|
1779
|
-
return /* @__PURE__ */
|
|
1780
|
-
...
|
|
1781
|
-
surface:
|
|
1782
|
-
padding:
|
|
1783
|
-
|
|
1792
|
+
function Jt({ items: e, subtotal: t, tax: a, shipping: s, discount: c, total: l, onCheckout: u, className: d, strings: p, surface: m = "flat", padding: h = m === "flat" ? "none" : "md", headerDivider: g, ...v }) {
|
|
1793
|
+
let y = n(Gt, p), b = !!(t || a || s || c);
|
|
1794
|
+
return /* @__PURE__ */ J(_, {
|
|
1795
|
+
...v,
|
|
1796
|
+
surface: m,
|
|
1797
|
+
padding: h,
|
|
1798
|
+
headerDivider: g,
|
|
1799
|
+
title: y.title,
|
|
1784
1800
|
contentGap: "2xl",
|
|
1785
1801
|
"data-slot": "cart-summary",
|
|
1786
1802
|
className: r("cart-summary--component w-full", d),
|
|
1787
1803
|
children: [
|
|
1788
|
-
/* @__PURE__ */
|
|
1789
|
-
let t =
|
|
1790
|
-
return /* @__PURE__ */
|
|
1804
|
+
/* @__PURE__ */ q(ge, { children: e.map((e) => {
|
|
1805
|
+
let t = Kt(e), n = qt(e);
|
|
1806
|
+
return /* @__PURE__ */ J(U, {
|
|
1791
1807
|
className: "cart-summary--item",
|
|
1792
1808
|
children: [
|
|
1793
|
-
/* @__PURE__ */
|
|
1809
|
+
/* @__PURE__ */ q(B, {
|
|
1794
1810
|
variant: "image",
|
|
1795
1811
|
className: "cart-summary--item-media",
|
|
1796
|
-
children: /* @__PURE__ */
|
|
1812
|
+
children: /* @__PURE__ */ q(Wt, {
|
|
1797
1813
|
src: n,
|
|
1798
1814
|
alt: e.imageAlt,
|
|
1799
1815
|
title: t
|
|
1800
1816
|
})
|
|
1801
1817
|
}),
|
|
1802
|
-
/* @__PURE__ */
|
|
1818
|
+
/* @__PURE__ */ J(H, {
|
|
1803
1819
|
className: "cart-summary--item-content",
|
|
1804
|
-
children: [/* @__PURE__ */ W
|
|
1820
|
+
children: [/* @__PURE__ */ q(W, { children: t }), !!e.variantTitle && /* @__PURE__ */ q(V, {
|
|
1805
1821
|
clamp: 1,
|
|
1806
1822
|
children: e.variantTitle
|
|
1807
1823
|
})]
|
|
1808
1824
|
}),
|
|
1809
|
-
/* @__PURE__ */
|
|
1825
|
+
/* @__PURE__ */ q(he, {
|
|
1810
1826
|
className: "cart-summary--item-actions",
|
|
1811
|
-
children: /* @__PURE__ */
|
|
1827
|
+
children: /* @__PURE__ */ J(f, {
|
|
1812
1828
|
gap: "2xs",
|
|
1813
1829
|
align: "end",
|
|
1814
1830
|
className: "shrink-0",
|
|
1815
|
-
children: [/* @__PURE__ */
|
|
1831
|
+
children: [/* @__PURE__ */ q(o, {
|
|
1816
1832
|
tag: "span",
|
|
1817
1833
|
size: "xs",
|
|
1818
1834
|
type: "secondary",
|
|
1819
1835
|
className: "cart-summary--quantity tabular-nums",
|
|
1820
|
-
children:
|
|
1821
|
-
}), /* @__PURE__ */
|
|
1836
|
+
children: y.formatQuantity(e.qty)
|
|
1837
|
+
}), /* @__PURE__ */ q(D, {
|
|
1822
1838
|
type: "inherit",
|
|
1823
1839
|
weight: "semibold",
|
|
1824
1840
|
className: "tabular-nums",
|
|
@@ -1829,45 +1845,45 @@ function qt({ items: e, subtotal: t, tax: a, shipping: s, discount: c, total: l,
|
|
|
1829
1845
|
]
|
|
1830
1846
|
}, e.id);
|
|
1831
1847
|
}) }),
|
|
1832
|
-
/* @__PURE__ */
|
|
1848
|
+
/* @__PURE__ */ J(X, {
|
|
1833
1849
|
className: "cart-summary--totals",
|
|
1834
1850
|
children: [
|
|
1835
|
-
!!t && /* @__PURE__ */
|
|
1836
|
-
label:
|
|
1851
|
+
!!t && /* @__PURE__ */ q(Y, {
|
|
1852
|
+
label: y.subtotal,
|
|
1837
1853
|
amount: t
|
|
1838
1854
|
}),
|
|
1839
|
-
!!a && /* @__PURE__ */
|
|
1840
|
-
label:
|
|
1855
|
+
!!a && /* @__PURE__ */ q(Y, {
|
|
1856
|
+
label: y.tax,
|
|
1841
1857
|
amount: a
|
|
1842
1858
|
}),
|
|
1843
|
-
!!s && /* @__PURE__ */
|
|
1844
|
-
label:
|
|
1859
|
+
!!s && /* @__PURE__ */ q(Y, {
|
|
1860
|
+
label: y.shipping,
|
|
1845
1861
|
amount: s
|
|
1846
1862
|
}),
|
|
1847
|
-
!!c && /* @__PURE__ */
|
|
1848
|
-
label:
|
|
1863
|
+
!!c && /* @__PURE__ */ q(Y, {
|
|
1864
|
+
label: y.discount,
|
|
1849
1865
|
amount: c,
|
|
1850
1866
|
deduction: !0
|
|
1851
1867
|
}),
|
|
1852
|
-
/* @__PURE__ */
|
|
1853
|
-
label:
|
|
1868
|
+
/* @__PURE__ */ q(Y, {
|
|
1869
|
+
label: y.total,
|
|
1854
1870
|
amount: l,
|
|
1855
1871
|
total: !0,
|
|
1856
|
-
rollup:
|
|
1872
|
+
rollup: b
|
|
1857
1873
|
})
|
|
1858
1874
|
]
|
|
1859
1875
|
}),
|
|
1860
|
-
!!u && /* @__PURE__ */
|
|
1876
|
+
!!u && /* @__PURE__ */ q(i, {
|
|
1861
1877
|
tone: "primary",
|
|
1862
1878
|
onClick: u,
|
|
1863
1879
|
fullWidth: !0,
|
|
1864
|
-
children:
|
|
1880
|
+
children: y.checkout
|
|
1865
1881
|
})
|
|
1866
1882
|
]
|
|
1867
1883
|
});
|
|
1868
1884
|
}
|
|
1869
|
-
|
|
1870
|
-
var
|
|
1885
|
+
Jt.displayName = "CartSummaryCard";
|
|
1886
|
+
var Yt = Jt, Xt = {
|
|
1871
1887
|
title: "Have a code?",
|
|
1872
1888
|
fieldLabel: "Coupon code",
|
|
1873
1889
|
placeholder: "Enter coupon code",
|
|
@@ -1875,50 +1891,50 @@ var Jt = qt, Yt = {
|
|
|
1875
1891
|
remove: "Remove",
|
|
1876
1892
|
applied: "Applied",
|
|
1877
1893
|
invalid: "That code is not valid"
|
|
1878
|
-
},
|
|
1879
|
-
function
|
|
1880
|
-
let h = n(
|
|
1881
|
-
return e ? /* @__PURE__ */
|
|
1894
|
+
}, Zt = (e) => e.toUpperCase();
|
|
1895
|
+
function Qt({ appliedCode: e, appliedDiscount: t, error: a, onApply: c, onRemove: l, loading: u, className: d, strings: m }) {
|
|
1896
|
+
let h = n(Xt, m), [g, _] = ke(""), v = g.trim();
|
|
1897
|
+
return e ? /* @__PURE__ */ q(z, {
|
|
1882
1898
|
title: h.title,
|
|
1883
1899
|
className: r("coupon-input--component w-full", d),
|
|
1884
|
-
children: /* @__PURE__ */
|
|
1900
|
+
children: /* @__PURE__ */ J(U, {
|
|
1885
1901
|
size: "sm",
|
|
1886
1902
|
variant: "muted",
|
|
1887
1903
|
className: r("items-center gap-y-space-sm border", p.success.edge, p.success.wash),
|
|
1888
1904
|
children: [
|
|
1889
|
-
/* @__PURE__ */
|
|
1905
|
+
/* @__PURE__ */ q(B, { children: /* @__PURE__ */ q(F, {
|
|
1890
1906
|
icon: Ne,
|
|
1891
1907
|
tone: "success",
|
|
1892
1908
|
size: "md"
|
|
1893
1909
|
}) }),
|
|
1894
|
-
/* @__PURE__ */
|
|
1910
|
+
/* @__PURE__ */ q(H, {
|
|
1895
1911
|
className: "min-w-0",
|
|
1896
|
-
children: /* @__PURE__ */
|
|
1912
|
+
children: /* @__PURE__ */ J(f, {
|
|
1897
1913
|
direction: "horizontal",
|
|
1898
1914
|
align: "center",
|
|
1899
1915
|
gap: "sm",
|
|
1900
1916
|
wrap: !1,
|
|
1901
1917
|
className: "min-w-0",
|
|
1902
|
-
children: [/* @__PURE__ */ W
|
|
1918
|
+
children: [/* @__PURE__ */ q(W, {
|
|
1903
1919
|
className: "min-w-0 truncate font-mono tracking-wider",
|
|
1904
1920
|
title: e,
|
|
1905
1921
|
children: e
|
|
1906
|
-
}), /* @__PURE__ */
|
|
1922
|
+
}), /* @__PURE__ */ q(s, {
|
|
1907
1923
|
className: "shrink-0",
|
|
1908
1924
|
children: h.applied
|
|
1909
1925
|
})]
|
|
1910
1926
|
})
|
|
1911
1927
|
}),
|
|
1912
|
-
/* @__PURE__ */
|
|
1928
|
+
/* @__PURE__ */ J(he, {
|
|
1913
1929
|
className: "ml-auto shrink-0 gap-space-sm",
|
|
1914
|
-
children: [!!t && /* @__PURE__ */
|
|
1930
|
+
children: [!!t && /* @__PURE__ */ q(o, {
|
|
1915
1931
|
tag: "span",
|
|
1916
1932
|
size: "xs",
|
|
1917
1933
|
weight: "semibold",
|
|
1918
1934
|
type: "success",
|
|
1919
1935
|
className: "tabular-nums shrink-0",
|
|
1920
1936
|
children: $e(t)
|
|
1921
|
-
}), !!l && /* @__PURE__ */
|
|
1937
|
+
}), !!l && /* @__PURE__ */ q(i, {
|
|
1922
1938
|
type: "button",
|
|
1923
1939
|
tone: "destructive",
|
|
1924
1940
|
buttonStyle: "ghost",
|
|
@@ -1927,23 +1943,23 @@ function Zt({ appliedCode: e, appliedDiscount: t, error: a, onApply: c, onRemove
|
|
|
1927
1943
|
onClick: l,
|
|
1928
1944
|
"aria-label": h.remove,
|
|
1929
1945
|
className: "size-action-xs shrink-0 text-muted-foreground hover:text-destructive",
|
|
1930
|
-
children: /* @__PURE__ */
|
|
1946
|
+
children: /* @__PURE__ */ q(Ke, { className: "size-icon-sm" })
|
|
1931
1947
|
})]
|
|
1932
1948
|
})
|
|
1933
1949
|
]
|
|
1934
1950
|
})
|
|
1935
|
-
}) : /* @__PURE__ */
|
|
1951
|
+
}) : /* @__PURE__ */ q(z, {
|
|
1936
1952
|
title: h.title,
|
|
1937
1953
|
className: r("coupon-input--component w-full", d),
|
|
1938
|
-
children: /* @__PURE__ */
|
|
1954
|
+
children: /* @__PURE__ */ J(f, {
|
|
1939
1955
|
gap: "md",
|
|
1940
|
-
children: [/* @__PURE__ */
|
|
1956
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1941
1957
|
className: "flex flex-wrap gap-space-md",
|
|
1942
|
-
children: [/* @__PURE__ */
|
|
1958
|
+
children: [/* @__PURE__ */ q("div", {
|
|
1943
1959
|
className: "min-w-44 flex-1",
|
|
1944
|
-
children: /* @__PURE__ */
|
|
1960
|
+
children: /* @__PURE__ */ q(L, {
|
|
1945
1961
|
value: g,
|
|
1946
|
-
onChange: (e) => _(
|
|
1962
|
+
onChange: (e) => _(Zt(e.target.value)),
|
|
1947
1963
|
"aria-label": h.fieldLabel,
|
|
1948
1964
|
placeholder: h.placeholder,
|
|
1949
1965
|
autoCapitalize: "characters",
|
|
@@ -1951,7 +1967,7 @@ function Zt({ appliedCode: e, appliedDiscount: t, error: a, onApply: c, onRemove
|
|
|
1951
1967
|
className: "font-mono",
|
|
1952
1968
|
invalid: !!a
|
|
1953
1969
|
})
|
|
1954
|
-
}), /* @__PURE__ */
|
|
1970
|
+
}), /* @__PURE__ */ q(i, {
|
|
1955
1971
|
tone: "primary",
|
|
1956
1972
|
size: "md",
|
|
1957
1973
|
onClick: () => c?.(v),
|
|
@@ -1960,7 +1976,7 @@ function Zt({ appliedCode: e, appliedDiscount: t, error: a, onApply: c, onRemove
|
|
|
1960
1976
|
className: "shrink-0",
|
|
1961
1977
|
children: h.apply
|
|
1962
1978
|
})]
|
|
1963
|
-
}), !!a && /* @__PURE__ */
|
|
1979
|
+
}), !!a && /* @__PURE__ */ q(o, {
|
|
1964
1980
|
size: "xs",
|
|
1965
1981
|
type: "error",
|
|
1966
1982
|
children: a || h.invalid
|
|
@@ -1968,16 +1984,16 @@ function Zt({ appliedCode: e, appliedDiscount: t, error: a, onApply: c, onRemove
|
|
|
1968
1984
|
})
|
|
1969
1985
|
});
|
|
1970
1986
|
}
|
|
1971
|
-
|
|
1987
|
+
Qt.displayName = "CouponInputCard";
|
|
1972
1988
|
//#endregion
|
|
1973
1989
|
//#region src/components/blocks/commerce/order-status/types.ts
|
|
1974
|
-
var
|
|
1990
|
+
var $t = {
|
|
1975
1991
|
title: "Order status",
|
|
1976
1992
|
statusLabel: "Current status",
|
|
1977
1993
|
eta: "ETA",
|
|
1978
1994
|
latestEvent: "Latest event",
|
|
1979
1995
|
currentStep: "Current step"
|
|
1980
|
-
},
|
|
1996
|
+
}, en = {
|
|
1981
1997
|
pending: "warning",
|
|
1982
1998
|
paid: "info",
|
|
1983
1999
|
fulfilled: "info",
|
|
@@ -1985,11 +2001,11 @@ var Qt = {
|
|
|
1985
2001
|
delivered: "success",
|
|
1986
2002
|
cancelled: "destructive"
|
|
1987
2003
|
};
|
|
1988
|
-
function
|
|
1989
|
-
let u = n(
|
|
1990
|
-
return /* @__PURE__ */
|
|
2004
|
+
function tn({ orderNumber: e, status: t, statusTone: i, events: a, currentEta: s, className: c, strings: l }) {
|
|
2005
|
+
let u = n($t, l), d = i ?? en[t], f = a.reduce((e, t, n) => t.complete ? n : e, -1), m = a.find((e) => !e.complete);
|
|
2006
|
+
return /* @__PURE__ */ J(z, {
|
|
1991
2007
|
title: u.title,
|
|
1992
|
-
titleSuffix: /* @__PURE__ */
|
|
2008
|
+
titleSuffix: /* @__PURE__ */ q(I, {
|
|
1993
2009
|
tone: d,
|
|
1994
2010
|
className: "capitalize",
|
|
1995
2011
|
children: t
|
|
@@ -1997,37 +2013,37 @@ function en({ orderNumber: e, status: t, statusTone: i, events: a, currentEta: s
|
|
|
1997
2013
|
description: `#${e}`,
|
|
1998
2014
|
contentGap: "xl",
|
|
1999
2015
|
className: r("order-status--component w-full", c),
|
|
2000
|
-
children: [!!s && /* @__PURE__ */
|
|
2016
|
+
children: [!!s && /* @__PURE__ */ q(K, {
|
|
2001
2017
|
label: u.eta,
|
|
2002
2018
|
value: s,
|
|
2003
2019
|
className: "order-status--eta",
|
|
2004
2020
|
valueWeight: "medium",
|
|
2005
2021
|
valueClassName: "tabular-nums"
|
|
2006
|
-
}), a.length > 0 && /* @__PURE__ */
|
|
2022
|
+
}), a.length > 0 && /* @__PURE__ */ q("ol", {
|
|
2007
2023
|
className: "m-0 p-0 list-none",
|
|
2008
2024
|
children: a.map((e, t) => {
|
|
2009
2025
|
let n = t === a.length - 1, i = m ? e === m : t === f;
|
|
2010
|
-
return /* @__PURE__ */
|
|
2026
|
+
return /* @__PURE__ */ J("li", {
|
|
2011
2027
|
className: "relative flex gap-space-lg",
|
|
2012
|
-
children: [/* @__PURE__ */
|
|
2028
|
+
children: [/* @__PURE__ */ J("div", {
|
|
2013
2029
|
className: "flex flex-col items-center",
|
|
2014
|
-
children: [/* @__PURE__ */
|
|
2030
|
+
children: [/* @__PURE__ */ q("span", {
|
|
2015
2031
|
className: r("flex size-6 shrink-0 items-center justify-center rounded-full border", e.complete ? "border-success bg-success text-success-foreground" : "border-border bg-card text-muted-foreground", i && !e.complete && r("border-2 border-primary-accent ring-4", p.primary.tint, p.primary.ink, p.primary.halo)),
|
|
2016
|
-
children: e.complete ? /* @__PURE__ */
|
|
2032
|
+
children: e.complete ? /* @__PURE__ */ q(Ne, {
|
|
2017
2033
|
className: "size-icon-md",
|
|
2018
2034
|
strokeWidth: 2.5
|
|
2019
|
-
}) : i ? /* @__PURE__ */
|
|
2020
|
-
}), !n && /* @__PURE__ */
|
|
2035
|
+
}) : i ? /* @__PURE__ */ q(Me, { className: "size-icon-md" }) : /* @__PURE__ */ q(Ie, { className: "size-icon-sm" })
|
|
2036
|
+
}), !n && /* @__PURE__ */ q("span", {
|
|
2021
2037
|
"aria-hidden": "true",
|
|
2022
2038
|
className: r("min-h-6 w-px flex-1", t < f ? "bg-success" : "bg-border")
|
|
2023
2039
|
})]
|
|
2024
|
-
}), /* @__PURE__ */
|
|
2040
|
+
}), /* @__PURE__ */ J("div", {
|
|
2025
2041
|
className: r("min-w-0 flex-1 pb-space-xl", n && "pb-0"),
|
|
2026
|
-
children: [/* @__PURE__ */
|
|
2042
|
+
children: [/* @__PURE__ */ q(o, {
|
|
2027
2043
|
weight: e.complete || i ? "semibold" : "medium",
|
|
2028
2044
|
className: r(!e.complete && !i && "text-muted-foreground"),
|
|
2029
2045
|
children: e.label
|
|
2030
|
-
}), !!e.timestamp && /* @__PURE__ */
|
|
2046
|
+
}), !!e.timestamp && /* @__PURE__ */ q(k, {
|
|
2031
2047
|
size: "xs",
|
|
2032
2048
|
className: "tabular-nums",
|
|
2033
2049
|
children: e.timestamp
|
|
@@ -2038,10 +2054,10 @@ function en({ orderNumber: e, status: t, statusTone: i, events: a, currentEta: s
|
|
|
2038
2054
|
})]
|
|
2039
2055
|
});
|
|
2040
2056
|
}
|
|
2041
|
-
|
|
2057
|
+
tn.displayName = "OrderStatusCard";
|
|
2042
2058
|
//#endregion
|
|
2043
2059
|
//#region src/components/blocks/commerce/payment-method/types.ts
|
|
2044
|
-
var
|
|
2060
|
+
var nn = {
|
|
2045
2061
|
title: "Payment method",
|
|
2046
2062
|
default: "Default",
|
|
2047
2063
|
cardHolder: "Card holder",
|
|
@@ -2057,7 +2073,7 @@ var tn = {
|
|
|
2057
2073
|
unknown: "Card"
|
|
2058
2074
|
},
|
|
2059
2075
|
formatCard: (e, t) => `${e} ending ${t}`
|
|
2060
|
-
},
|
|
2076
|
+
}, rn = {
|
|
2061
2077
|
visa: "VISA",
|
|
2062
2078
|
mastercard: "MasterCard",
|
|
2063
2079
|
amex: "AMEX",
|
|
@@ -2065,20 +2081,20 @@ var tn = {
|
|
|
2065
2081
|
applepay: "Apple Pay",
|
|
2066
2082
|
googlepay: "Google Pay",
|
|
2067
2083
|
unknown: "Card"
|
|
2068
|
-
},
|
|
2069
|
-
function
|
|
2070
|
-
let b = n(
|
|
2071
|
-
return /* @__PURE__ */
|
|
2084
|
+
}, an = "bg-inverse-background from-inverse-background via-inverse-surface-strong to-inverse-background";
|
|
2085
|
+
function on({ brand: e, last4: t, expiry: a, holderName: c, default: l = !1, onChange: u, variant: d = "card", surface: p = "flat", padding: m = p === "flat" ? "none" : "md", headerDivider: h, className: g, strings: v, ...y }) {
|
|
2086
|
+
let b = n(nn, v), x = b.formatCard(b.brands[e], t);
|
|
2087
|
+
return /* @__PURE__ */ q(_, {
|
|
2072
2088
|
...y,
|
|
2073
2089
|
surface: p,
|
|
2074
2090
|
padding: m,
|
|
2075
2091
|
headerDivider: h,
|
|
2076
2092
|
title: b.title,
|
|
2077
|
-
titleSuffix: l ? /* @__PURE__ */
|
|
2093
|
+
titleSuffix: l ? /* @__PURE__ */ q(I, {
|
|
2078
2094
|
tone: "neutral",
|
|
2079
2095
|
children: b.default
|
|
2080
2096
|
}) : null,
|
|
2081
|
-
headerAction: u ? /* @__PURE__ */
|
|
2097
|
+
headerAction: u ? /* @__PURE__ */ q(i, {
|
|
2082
2098
|
buttonStyle: "ghost",
|
|
2083
2099
|
tone: "secondary",
|
|
2084
2100
|
onClick: u,
|
|
@@ -2086,30 +2102,30 @@ function an({ brand: e, last4: t, expiry: a, holderName: c, default: l = !1, onC
|
|
|
2086
2102
|
}) : void 0,
|
|
2087
2103
|
"data-variant": d,
|
|
2088
2104
|
className: r("payment-method--component w-full", g),
|
|
2089
|
-
children: d === "row" ? /* @__PURE__ */
|
|
2105
|
+
children: d === "row" ? /* @__PURE__ */ J(f, {
|
|
2090
2106
|
gap: "dense",
|
|
2091
2107
|
className: "payment-method--identity min-w-0",
|
|
2092
2108
|
children: [
|
|
2093
|
-
/* @__PURE__ */
|
|
2109
|
+
/* @__PURE__ */ q(o, {
|
|
2094
2110
|
type: "inherit",
|
|
2095
2111
|
weight: "semibold",
|
|
2096
2112
|
className: "payment-method--name",
|
|
2097
2113
|
children: x
|
|
2098
2114
|
}),
|
|
2099
|
-
!!c && /* @__PURE__ */
|
|
2115
|
+
!!c && /* @__PURE__ */ q(o, {
|
|
2100
2116
|
size: "xs",
|
|
2101
2117
|
type: "secondary",
|
|
2102
2118
|
className: "payment-method--holder truncate",
|
|
2103
2119
|
children: c
|
|
2104
2120
|
}),
|
|
2105
|
-
!!a && /* @__PURE__ */
|
|
2121
|
+
!!a && /* @__PURE__ */ J(o, {
|
|
2106
2122
|
size: "xs",
|
|
2107
2123
|
type: "secondary",
|
|
2108
2124
|
className: "payment-method--expiry",
|
|
2109
2125
|
children: [
|
|
2110
2126
|
b.expires,
|
|
2111
2127
|
" ",
|
|
2112
|
-
/* @__PURE__ */
|
|
2128
|
+
/* @__PURE__ */ q(D, {
|
|
2113
2129
|
type: "inherit",
|
|
2114
2130
|
className: "tabular-nums",
|
|
2115
2131
|
children: a
|
|
@@ -2117,27 +2133,27 @@ function an({ brand: e, last4: t, expiry: a, holderName: c, default: l = !1, onC
|
|
|
2117
2133
|
]
|
|
2118
2134
|
})
|
|
2119
2135
|
]
|
|
2120
|
-
}) : /* @__PURE__ */
|
|
2121
|
-
className: r("payment-method--face relative flex aspect-[85.6/53.98] w-full max-w-[22rem] flex-col justify-between overflow-hidden rounded-
|
|
2136
|
+
}) : /* @__PURE__ */ J("div", {
|
|
2137
|
+
className: r("payment-method--face relative flex aspect-[85.6/53.98] w-full max-w-[22rem] flex-col justify-between overflow-hidden rounded-surface bg-linear-to-br p-surface text-inverse-foreground shadow-sm ring-1 ring-inverse-border", an),
|
|
2122
2138
|
children: [
|
|
2123
|
-
/* @__PURE__ */
|
|
2124
|
-
/* @__PURE__ */
|
|
2139
|
+
/* @__PURE__ */ q(de, { children: x }),
|
|
2140
|
+
/* @__PURE__ */ J("div", {
|
|
2125
2141
|
"aria-hidden": "true",
|
|
2126
2142
|
className: "relative flex items-start justify-between",
|
|
2127
|
-
children: [/* @__PURE__ */
|
|
2143
|
+
children: [/* @__PURE__ */ q("div", {
|
|
2128
2144
|
className: "flex size-7 items-center justify-center rounded-radius-md bg-gradient-to-br from-muted to-muted-foreground/60 shadow-sm",
|
|
2129
|
-
children: /* @__PURE__ */
|
|
2130
|
-
}), /* @__PURE__ */
|
|
2145
|
+
children: /* @__PURE__ */ q("div", { className: "size-icon rounded-radius-sm border border-warning-foreground/25 bg-warning-foreground/15" })
|
|
2146
|
+
}), /* @__PURE__ */ q(o, {
|
|
2131
2147
|
tag: "span",
|
|
2132
2148
|
weight: "bold",
|
|
2133
2149
|
className: "rounded-radius-xs bg-inverse-surface px-space-md py-space-2xs tracking-[0.15em] text-inverse-foreground",
|
|
2134
|
-
children:
|
|
2150
|
+
children: rn[e]
|
|
2135
2151
|
})]
|
|
2136
2152
|
}),
|
|
2137
|
-
/* @__PURE__ */
|
|
2153
|
+
/* @__PURE__ */ q("div", {
|
|
2138
2154
|
"aria-hidden": "true",
|
|
2139
2155
|
className: "relative",
|
|
2140
|
-
children: /* @__PURE__ */
|
|
2156
|
+
children: /* @__PURE__ */ J(o, {
|
|
2141
2157
|
tag: "span",
|
|
2142
2158
|
size: "sm",
|
|
2143
2159
|
weight: "semibold",
|
|
@@ -2145,30 +2161,30 @@ function an({ brand: e, last4: t, expiry: a, holderName: c, default: l = !1, onC
|
|
|
2145
2161
|
children: ["•••• •••• •••• ", t]
|
|
2146
2162
|
})
|
|
2147
2163
|
}),
|
|
2148
|
-
/* @__PURE__ */
|
|
2164
|
+
/* @__PURE__ */ J(f, {
|
|
2149
2165
|
direction: "horizontal",
|
|
2150
2166
|
align: "end",
|
|
2151
2167
|
justify: "between",
|
|
2152
2168
|
gap: "lg",
|
|
2153
2169
|
className: "relative",
|
|
2154
|
-
children: [/* @__PURE__ */
|
|
2170
|
+
children: [/* @__PURE__ */ q("div", {
|
|
2155
2171
|
className: "min-w-0",
|
|
2156
|
-
children: !!c && /* @__PURE__ */
|
|
2172
|
+
children: !!c && /* @__PURE__ */ J(Ae, { children: [/* @__PURE__ */ q(s, {
|
|
2157
2173
|
tone: "inverse",
|
|
2158
2174
|
className: "block",
|
|
2159
2175
|
children: b.cardHolder
|
|
2160
|
-
}), /* @__PURE__ */
|
|
2176
|
+
}), /* @__PURE__ */ q(o, {
|
|
2161
2177
|
weight: "semibold",
|
|
2162
2178
|
className: "truncate text-inverse-foreground",
|
|
2163
2179
|
children: c
|
|
2164
2180
|
})] })
|
|
2165
|
-
}), !!a && /* @__PURE__ */
|
|
2181
|
+
}), !!a && /* @__PURE__ */ J("div", {
|
|
2166
2182
|
className: "text-right shrink-0",
|
|
2167
|
-
children: [/* @__PURE__ */
|
|
2183
|
+
children: [/* @__PURE__ */ q(s, {
|
|
2168
2184
|
tone: "inverse",
|
|
2169
2185
|
className: "block",
|
|
2170
2186
|
children: b.expires
|
|
2171
|
-
}), /* @__PURE__ */
|
|
2187
|
+
}), /* @__PURE__ */ q(D, {
|
|
2172
2188
|
weight: "semibold",
|
|
2173
2189
|
className: "tabular-nums text-inverse-foreground",
|
|
2174
2190
|
children: a
|
|
@@ -2179,49 +2195,49 @@ function an({ brand: e, last4: t, expiry: a, holderName: c, default: l = !1, onC
|
|
|
2179
2195
|
})
|
|
2180
2196
|
});
|
|
2181
2197
|
}
|
|
2182
|
-
|
|
2183
|
-
function
|
|
2184
|
-
return /* @__PURE__ */
|
|
2198
|
+
on.displayName = "PaymentMethod";
|
|
2199
|
+
function sn({ variant: e = "row", ...t }) {
|
|
2200
|
+
return /* @__PURE__ */ q(on, {
|
|
2185
2201
|
variant: e,
|
|
2186
2202
|
...t
|
|
2187
2203
|
});
|
|
2188
2204
|
}
|
|
2189
|
-
|
|
2205
|
+
sn.displayName = "PaymentMethodCard";
|
|
2190
2206
|
//#endregion
|
|
2191
2207
|
//#region src/components/blocks/commerce/seo-listing/seo-listing-score.ts
|
|
2192
|
-
var
|
|
2208
|
+
var cn = {
|
|
2193
2209
|
titleMin: 35,
|
|
2194
2210
|
titleMax: 60,
|
|
2195
2211
|
descriptionMin: 120,
|
|
2196
2212
|
descriptionMax: 160,
|
|
2197
2213
|
permalinkMax: 75
|
|
2198
2214
|
};
|
|
2199
|
-
function
|
|
2215
|
+
function ln(e) {
|
|
2200
2216
|
return {
|
|
2201
|
-
...
|
|
2217
|
+
...cn,
|
|
2202
2218
|
...e
|
|
2203
2219
|
};
|
|
2204
2220
|
}
|
|
2205
|
-
function
|
|
2221
|
+
function un(e) {
|
|
2206
2222
|
return Number.isFinite(e) ? Math.max(0, Math.min(1, e)) : 0;
|
|
2207
2223
|
}
|
|
2208
|
-
function
|
|
2224
|
+
function dn(e, t) {
|
|
2209
2225
|
if (t <= 0) return "missing";
|
|
2210
2226
|
let n = e / t;
|
|
2211
2227
|
return n >= .9 ? "good" : n >= .5 ? "review" : "missing";
|
|
2212
2228
|
}
|
|
2213
|
-
function
|
|
2214
|
-
let a = Math.round(
|
|
2229
|
+
function fn(e, t, n, r, i) {
|
|
2230
|
+
let a = Math.round(un(t) * n);
|
|
2215
2231
|
return {
|
|
2216
2232
|
id: e,
|
|
2217
2233
|
score: a,
|
|
2218
2234
|
maxScore: n,
|
|
2219
2235
|
actual: r,
|
|
2220
|
-
status:
|
|
2236
|
+
status: dn(a, n),
|
|
2221
2237
|
...i
|
|
2222
2238
|
};
|
|
2223
2239
|
}
|
|
2224
|
-
function
|
|
2240
|
+
function pn(e, t, n) {
|
|
2225
2241
|
let r = e.trim().length;
|
|
2226
2242
|
if (r === 0) return 0;
|
|
2227
2243
|
if (r >= t && r <= n) return 1;
|
|
@@ -2230,61 +2246,61 @@ function dn(e, t, n) {
|
|
|
2230
2246
|
let i = r - n;
|
|
2231
2247
|
return Math.max(.55, 1 - i / n);
|
|
2232
2248
|
}
|
|
2233
|
-
function
|
|
2249
|
+
function $(e) {
|
|
2234
2250
|
let t = e?.trim() ?? "";
|
|
2235
2251
|
return t ? ((t.split("#")[0] ?? "").split("?")[0] ?? "").replace(/^https?:\/\/[^/]+/i, "").replace(/^\/+|\/+$/g, "") : "";
|
|
2236
2252
|
}
|
|
2237
|
-
function
|
|
2238
|
-
return
|
|
2253
|
+
function mn(e) {
|
|
2254
|
+
return $(e).split("/").filter(Boolean).at(-1) ?? "";
|
|
2239
2255
|
}
|
|
2240
|
-
function
|
|
2241
|
-
let n =
|
|
2256
|
+
function hn(e, t = cn.permalinkMax) {
|
|
2257
|
+
let n = $(e);
|
|
2242
2258
|
return n ? n.length <= t ? 1 : n.length > t * 2 ? .35 : Math.max(.55, 1 - (n.length - t) / t) : 0;
|
|
2243
2259
|
}
|
|
2244
|
-
function
|
|
2245
|
-
let t =
|
|
2260
|
+
function gn(e) {
|
|
2261
|
+
let t = mn(e);
|
|
2246
2262
|
return t ? /^[\p{L}\p{N}]+(?:-[\p{L}\p{N}]+)*$/u.test(t) && t === t.toLowerCase() ? 1 : !/\s/.test(t) && !/[?#]/.test(t) ? .65 : .25 : 0;
|
|
2247
2263
|
}
|
|
2248
|
-
function
|
|
2264
|
+
function _n(e) {
|
|
2249
2265
|
let t = e?.trim() ?? "";
|
|
2250
2266
|
return t ? /^https:\/\//i.test(t) ? 1 : /^http:\/\//i.test(t) ? .6 : .45 : 0;
|
|
2251
2267
|
}
|
|
2252
|
-
function
|
|
2268
|
+
function vn(e) {
|
|
2253
2269
|
let t = e.keyword?.trim().toLowerCase();
|
|
2254
2270
|
if (!t) return null;
|
|
2255
2271
|
let n = [
|
|
2256
2272
|
e.title,
|
|
2257
2273
|
e.description,
|
|
2258
|
-
|
|
2274
|
+
$(e.permalink)
|
|
2259
2275
|
].filter(Boolean).join(" ").toLowerCase();
|
|
2260
2276
|
return n ? n.includes(t) ? 1 : .35 : 0;
|
|
2261
2277
|
}
|
|
2262
|
-
function
|
|
2263
|
-
let t =
|
|
2264
|
-
|
|
2278
|
+
function yn(e) {
|
|
2279
|
+
let t = ln(e.limits), n = e.title?.trim() ?? "", r = e.description?.trim() ?? "", i = $(e.permalink), a = mn(e.permalink), o = [
|
|
2280
|
+
fn("title", pn(n, t.titleMin, t.titleMax), 30, n.length, {
|
|
2265
2281
|
min: t.titleMin,
|
|
2266
2282
|
max: t.titleMax
|
|
2267
2283
|
}),
|
|
2268
|
-
|
|
2284
|
+
fn("description", pn(r, t.descriptionMin, t.descriptionMax), 30, r.length, {
|
|
2269
2285
|
min: t.descriptionMin,
|
|
2270
2286
|
max: t.descriptionMax
|
|
2271
2287
|
}),
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
], s =
|
|
2276
|
-
s !== null && o.push(
|
|
2288
|
+
fn("permalink", hn(e.permalink, t.permalinkMax), 15, i.length, { max: t.permalinkMax }),
|
|
2289
|
+
fn("slug", gn(e.permalink), 10, a.length),
|
|
2290
|
+
fn("url", _n(e.baseUrl), 10, e.baseUrl?.trim().length ?? 0)
|
|
2291
|
+
], s = vn(e);
|
|
2292
|
+
s !== null && o.push(fn("keyword", s, 5, e.keyword?.trim().length ?? 0));
|
|
2277
2293
|
let c = Math.round(o.reduce((e, t) => e + t.score, 0) / o.reduce((e, t) => e + t.maxScore, 0) * 100);
|
|
2278
2294
|
return {
|
|
2279
2295
|
score: c,
|
|
2280
|
-
status:
|
|
2296
|
+
status: dn(c, 100),
|
|
2281
2297
|
checks: o,
|
|
2282
2298
|
limits: t
|
|
2283
2299
|
};
|
|
2284
2300
|
}
|
|
2285
2301
|
//#endregion
|
|
2286
2302
|
//#region src/components/blocks/commerce/seo-listing/types.ts
|
|
2287
|
-
var
|
|
2303
|
+
var bn = {
|
|
2288
2304
|
title: "Search engine listing",
|
|
2289
2305
|
editLabel: "Edit search listing",
|
|
2290
2306
|
scoreLabel: "SEO score",
|
|
@@ -2317,76 +2333,76 @@ var vn = {
|
|
|
2317
2333
|
url: "Prefer a secure canonical URL.",
|
|
2318
2334
|
keyword: "Use the focus keyword in the title, description, or permalink."
|
|
2319
2335
|
}
|
|
2320
|
-
},
|
|
2336
|
+
}, xn = {
|
|
2321
2337
|
good: "success",
|
|
2322
2338
|
review: "warning",
|
|
2323
2339
|
missing: "destructive"
|
|
2324
|
-
},
|
|
2340
|
+
}, Sn = {
|
|
2325
2341
|
good: "[&_[data-slot=progress-indicator]]:bg-success",
|
|
2326
2342
|
review: "[&_[data-slot=progress-indicator]]:bg-warning",
|
|
2327
2343
|
missing: "[&_[data-slot=progress-indicator]]:bg-destructive"
|
|
2328
|
-
},
|
|
2344
|
+
}, Cn = {
|
|
2329
2345
|
good: Pe,
|
|
2330
2346
|
review: Ge,
|
|
2331
2347
|
missing: Le
|
|
2332
|
-
},
|
|
2348
|
+
}, wn = {
|
|
2333
2349
|
good: "text-success",
|
|
2334
2350
|
review: "text-warning-accent",
|
|
2335
2351
|
missing: "text-destructive"
|
|
2336
2352
|
};
|
|
2337
|
-
function
|
|
2353
|
+
function Tn(e) {
|
|
2338
2354
|
return e.replace(/^\/+|\/+$/g, "");
|
|
2339
2355
|
}
|
|
2340
|
-
function
|
|
2341
|
-
let r =
|
|
2356
|
+
function En(e, t, n) {
|
|
2357
|
+
let r = $(n).split("/").filter(Boolean);
|
|
2342
2358
|
return [
|
|
2343
2359
|
e,
|
|
2344
|
-
...t.map(
|
|
2360
|
+
...t.map(Tn).filter(Boolean),
|
|
2345
2361
|
...r
|
|
2346
2362
|
].filter(Boolean);
|
|
2347
2363
|
}
|
|
2348
|
-
function
|
|
2364
|
+
function Dn(e, t, n) {
|
|
2349
2365
|
if (!e.trim()) return;
|
|
2350
|
-
let r = e.replace(/\/+$/g, ""), i = [...t.map(
|
|
2366
|
+
let r = e.replace(/\/+$/g, ""), i = [...t.map(Tn).filter(Boolean), ...$(n).split("/").filter(Boolean)].join("/");
|
|
2351
2367
|
return i ? `${r}/${i}` : r;
|
|
2352
2368
|
}
|
|
2353
|
-
function
|
|
2369
|
+
function On(e, t) {
|
|
2354
2370
|
return e.id === "title" || e.id === "description" ? `${e.actual}/${e.max} ${t.characters} · ${t.targetLabel} ${e.min}-${e.max}` : e.id === "permalink" ? `${e.actual}/${e.max} ${t.characters} ${t.maxLabel}` : t.checkHints[e.id];
|
|
2355
2371
|
}
|
|
2356
|
-
function
|
|
2357
|
-
let i =
|
|
2358
|
-
return /* @__PURE__ */
|
|
2372
|
+
function kn({ check: e, detail: t, strings: n }) {
|
|
2373
|
+
let i = Cn[e.status];
|
|
2374
|
+
return /* @__PURE__ */ q("div", {
|
|
2359
2375
|
className: "seo-listing-card--check min-w-0",
|
|
2360
|
-
children: /* @__PURE__ */
|
|
2376
|
+
children: /* @__PURE__ */ J(f, {
|
|
2361
2377
|
direction: "horizontal",
|
|
2362
2378
|
gap: "md",
|
|
2363
2379
|
align: "start",
|
|
2364
2380
|
wrap: !1,
|
|
2365
|
-
children: [/* @__PURE__ */
|
|
2366
|
-
className: r("seo-listing-card--check-icon size-icon shrink-0 translate-y-0.5",
|
|
2381
|
+
children: [/* @__PURE__ */ q(i, {
|
|
2382
|
+
className: r("seo-listing-card--check-icon size-icon shrink-0 translate-y-0.5", wn[e.status]),
|
|
2367
2383
|
"aria-hidden": "true"
|
|
2368
|
-
}), /* @__PURE__ */
|
|
2384
|
+
}), /* @__PURE__ */ J(f, {
|
|
2369
2385
|
gap: "dense",
|
|
2370
2386
|
className: "min-w-0 flex-1",
|
|
2371
|
-
children: [/* @__PURE__ */
|
|
2387
|
+
children: [/* @__PURE__ */ J(f, {
|
|
2372
2388
|
direction: "horizontal",
|
|
2373
2389
|
gap: "sm",
|
|
2374
2390
|
justify: "between",
|
|
2375
2391
|
wrap: !1,
|
|
2376
|
-
children: [/* @__PURE__ */
|
|
2392
|
+
children: [/* @__PURE__ */ q(o, {
|
|
2377
2393
|
type: "inherit",
|
|
2378
2394
|
tag: "span",
|
|
2379
2395
|
weight: "medium",
|
|
2380
2396
|
className: "truncate",
|
|
2381
2397
|
children: n.checkLabels[e.id]
|
|
2382
|
-
}), /* @__PURE__ */
|
|
2383
|
-
tone:
|
|
2398
|
+
}), /* @__PURE__ */ q(I, {
|
|
2399
|
+
tone: xn[e.status],
|
|
2384
2400
|
size: "sm",
|
|
2385
2401
|
inline: !0,
|
|
2386
2402
|
className: "shrink-0",
|
|
2387
2403
|
children: n.status[e.status]
|
|
2388
2404
|
})]
|
|
2389
|
-
}), /* @__PURE__ */
|
|
2405
|
+
}), /* @__PURE__ */ q(o, {
|
|
2390
2406
|
size: "xs",
|
|
2391
2407
|
type: "secondary",
|
|
2392
2408
|
lineHeight: "snug",
|
|
@@ -2396,75 +2412,75 @@ function Dn({ check: e, detail: t, strings: n }) {
|
|
|
2396
2412
|
})
|
|
2397
2413
|
});
|
|
2398
2414
|
}
|
|
2399
|
-
function
|
|
2400
|
-
let
|
|
2415
|
+
function An({ siteName: e, baseUrl: t, pathSegments: a = [], permalink: s, title: c, description: u, price: d, keyword: p, score: m, limits: h, showChecks: g = !0, onEdit: y, surface: b = "flat", padding: x = b === "flat" ? "none" : "md", headerDivider: S, className: C, strings: w }) {
|
|
2416
|
+
let T = n(bn, w), E = t?.trim() || T.urlFallback, O = e?.trim() || T.siteFallback, A = c?.trim() || T.titleFallback, j = u?.trim() || T.descriptionFallback, M = m ?? yn({
|
|
2401
2417
|
title: c,
|
|
2402
2418
|
description: u,
|
|
2403
2419
|
permalink: s,
|
|
2404
2420
|
baseUrl: t,
|
|
2405
2421
|
keyword: p,
|
|
2406
2422
|
limits: h
|
|
2407
|
-
}),
|
|
2408
|
-
return /* @__PURE__ */
|
|
2423
|
+
}), N = Dn(E, a, s), ee = En(E, a, s), te = xn[M.status];
|
|
2424
|
+
return /* @__PURE__ */ J(_, {
|
|
2409
2425
|
surface: b,
|
|
2410
2426
|
padding: x,
|
|
2411
2427
|
headerDivider: S,
|
|
2412
|
-
title:
|
|
2413
|
-
titleSuffix: /* @__PURE__ */
|
|
2414
|
-
tone:
|
|
2428
|
+
title: T.title,
|
|
2429
|
+
titleSuffix: /* @__PURE__ */ J(I, {
|
|
2430
|
+
tone: te,
|
|
2415
2431
|
size: "sm",
|
|
2416
2432
|
inline: !0,
|
|
2417
2433
|
className: "shrink-0",
|
|
2418
2434
|
children: [
|
|
2419
|
-
|
|
2435
|
+
M.score,
|
|
2420
2436
|
"/100 ",
|
|
2421
|
-
|
|
2437
|
+
T.status[M.status]
|
|
2422
2438
|
]
|
|
2423
2439
|
}),
|
|
2424
|
-
className: r("seo-listing-card--component @container/seo-listing-card w-full",
|
|
2440
|
+
className: r("seo-listing-card--component @container/seo-listing-card w-full", C),
|
|
2425
2441
|
contentGap: "2xl",
|
|
2426
|
-
headerAction: y ? /* @__PURE__ */
|
|
2442
|
+
headerAction: y ? /* @__PURE__ */ q(i, {
|
|
2427
2443
|
type: "button",
|
|
2428
2444
|
tone: "secondary",
|
|
2429
2445
|
buttonStyle: "ghost",
|
|
2430
2446
|
size: "sm",
|
|
2431
2447
|
iconOnly: !0,
|
|
2432
|
-
"aria-label":
|
|
2448
|
+
"aria-label": T.editLabel,
|
|
2433
2449
|
onClick: y,
|
|
2434
|
-
children: /* @__PURE__ */
|
|
2450
|
+
children: /* @__PURE__ */ q(He, { className: "size-icon-sm" })
|
|
2435
2451
|
}) : void 0,
|
|
2436
|
-
children: [/* @__PURE__ */
|
|
2452
|
+
children: [/* @__PURE__ */ q("div", {
|
|
2437
2453
|
"data-artwork": "serp",
|
|
2438
2454
|
className: "seo-listing-card--preview min-w-0 rounded-radius border border-border/60 bg-background text-foreground p-surface shadow-xs",
|
|
2439
|
-
children: /* @__PURE__ */
|
|
2455
|
+
children: /* @__PURE__ */ J(f, {
|
|
2440
2456
|
gap: "sm",
|
|
2441
2457
|
className: "min-w-0",
|
|
2442
2458
|
children: [
|
|
2443
|
-
/* @__PURE__ */
|
|
2459
|
+
/* @__PURE__ */ J(f, {
|
|
2444
2460
|
direction: "horizontal",
|
|
2445
2461
|
gap: "sm",
|
|
2446
2462
|
wrap: !1,
|
|
2447
|
-
children: [/* @__PURE__ */
|
|
2463
|
+
children: [/* @__PURE__ */ q(o, {
|
|
2448
2464
|
type: "inherit",
|
|
2449
2465
|
weight: "medium",
|
|
2450
2466
|
className: "truncate",
|
|
2451
|
-
children:
|
|
2452
|
-
}), !!
|
|
2467
|
+
children: O
|
|
2468
|
+
}), !!N && /* @__PURE__ */ q(Be, {
|
|
2453
2469
|
className: "size-icon-sm shrink-0 text-muted-foreground",
|
|
2454
2470
|
"aria-hidden": "true"
|
|
2455
2471
|
})]
|
|
2456
2472
|
}),
|
|
2457
|
-
/* @__PURE__ */
|
|
2473
|
+
/* @__PURE__ */ q("div", {
|
|
2458
2474
|
className: "seo-listing-card--url flex min-w-0 flex-wrap items-center gap-x-space-sm gap-y-space-2xs",
|
|
2459
|
-
children:
|
|
2475
|
+
children: ee.map((e, t) => /* @__PURE__ */ J("span", {
|
|
2460
2476
|
className: "inline-flex min-w-0 items-center gap-space-sm",
|
|
2461
|
-
children: [/* @__PURE__ */
|
|
2477
|
+
children: [/* @__PURE__ */ q(o, {
|
|
2462
2478
|
tag: "span",
|
|
2463
2479
|
size: "xs",
|
|
2464
2480
|
type: "secondary",
|
|
2465
2481
|
className: "truncate",
|
|
2466
2482
|
children: e
|
|
2467
|
-
}), t <
|
|
2483
|
+
}), t < ee.length - 1 && /* @__PURE__ */ q(o, {
|
|
2468
2484
|
tag: "span",
|
|
2469
2485
|
size: "xs",
|
|
2470
2486
|
type: "secondary",
|
|
@@ -2473,151 +2489,157 @@ function On({ siteName: e, baseUrl: t, pathSegments: a = [], permalink: s, title
|
|
|
2473
2489
|
})]
|
|
2474
2490
|
}, `${e}-${t}`))
|
|
2475
2491
|
}),
|
|
2476
|
-
|
|
2477
|
-
href:
|
|
2492
|
+
N ? /* @__PURE__ */ q(l, {
|
|
2493
|
+
href: N,
|
|
2478
2494
|
size: "base",
|
|
2479
2495
|
lineHeight: "snug",
|
|
2480
2496
|
underline: !1,
|
|
2481
2497
|
className: "seo-listing-card--snippet-title block text-[#1a0dab] dark:text-[#8ab4f8]",
|
|
2482
|
-
children:
|
|
2483
|
-
}) : /* @__PURE__ */
|
|
2498
|
+
children: A
|
|
2499
|
+
}) : /* @__PURE__ */ q(o, {
|
|
2484
2500
|
type: "inherit",
|
|
2485
2501
|
size: "base",
|
|
2486
2502
|
lineHeight: "snug",
|
|
2487
2503
|
className: "seo-listing-card--snippet-title text-[#1a0dab] dark:text-[#8ab4f8]",
|
|
2488
|
-
children:
|
|
2504
|
+
children: A
|
|
2489
2505
|
}),
|
|
2490
|
-
/* @__PURE__ */
|
|
2506
|
+
/* @__PURE__ */ q(o, {
|
|
2491
2507
|
type: "secondary",
|
|
2492
2508
|
lineHeight: "relaxed",
|
|
2493
2509
|
className: "seo-listing-card--description max-w-4xl",
|
|
2494
|
-
children:
|
|
2510
|
+
children: j
|
|
2495
2511
|
}),
|
|
2496
|
-
!!d && /* @__PURE__ */
|
|
2512
|
+
!!d && /* @__PURE__ */ q(k, {
|
|
2497
2513
|
size: "xs",
|
|
2498
2514
|
className: "seo-listing-card--price block tabular-nums",
|
|
2499
2515
|
children: d
|
|
2500
2516
|
})
|
|
2501
2517
|
]
|
|
2502
2518
|
})
|
|
2503
|
-
}), /* @__PURE__ */
|
|
2519
|
+
}), /* @__PURE__ */ J(f, {
|
|
2504
2520
|
gap: "lg",
|
|
2505
2521
|
className: "seo-listing-card--score",
|
|
2506
2522
|
children: [
|
|
2507
|
-
/* @__PURE__ */
|
|
2523
|
+
/* @__PURE__ */ J(f, {
|
|
2508
2524
|
direction: "horizontal",
|
|
2509
2525
|
gap: "lg",
|
|
2510
2526
|
justify: "between",
|
|
2511
2527
|
align: "start",
|
|
2512
2528
|
wrap: !1,
|
|
2513
|
-
children: [/* @__PURE__ */
|
|
2529
|
+
children: [/* @__PURE__ */ J(f, {
|
|
2514
2530
|
gap: "dense",
|
|
2515
2531
|
className: "min-w-0",
|
|
2516
|
-
children: [/* @__PURE__ */
|
|
2532
|
+
children: [/* @__PURE__ */ q(o, {
|
|
2517
2533
|
type: "inherit",
|
|
2518
2534
|
weight: "semibold",
|
|
2519
|
-
children:
|
|
2520
|
-
}), /* @__PURE__ */
|
|
2535
|
+
children: T.scoreLabel
|
|
2536
|
+
}), /* @__PURE__ */ J(k, {
|
|
2521
2537
|
size: "xs",
|
|
2522
2538
|
className: "tabular-nums",
|
|
2523
2539
|
children: [
|
|
2524
|
-
/* @__PURE__ */
|
|
2525
|
-
value:
|
|
2540
|
+
/* @__PURE__ */ q(P, {
|
|
2541
|
+
value: M.checks.length,
|
|
2526
2542
|
size: "xs",
|
|
2527
2543
|
type: "secondary",
|
|
2528
2544
|
align: "left"
|
|
2529
2545
|
}),
|
|
2530
2546
|
" ",
|
|
2531
|
-
|
|
2547
|
+
T.checksLabel
|
|
2532
2548
|
]
|
|
2533
2549
|
})]
|
|
2534
|
-
}), /* @__PURE__ */
|
|
2550
|
+
}), /* @__PURE__ */ J(D, {
|
|
2535
2551
|
type: "inherit",
|
|
2536
2552
|
weight: "semibold",
|
|
2537
2553
|
className: "shrink-0 tabular-nums",
|
|
2538
|
-
children: [
|
|
2554
|
+
children: [M.score, "/100"]
|
|
2539
2555
|
})]
|
|
2540
2556
|
}),
|
|
2541
|
-
/* @__PURE__ */
|
|
2542
|
-
value:
|
|
2543
|
-
"aria-label":
|
|
2544
|
-
className: r("seo-listing-card--score-progress", "[&_[data-slot=progress-track]]:h-space-md",
|
|
2557
|
+
/* @__PURE__ */ q(v, {
|
|
2558
|
+
value: M.score,
|
|
2559
|
+
"aria-label": T.scoreLabel,
|
|
2560
|
+
className: r("seo-listing-card--score-progress", "[&_[data-slot=progress-track]]:h-space-md", Sn[M.status])
|
|
2545
2561
|
}),
|
|
2546
|
-
!!g && /* @__PURE__ */
|
|
2562
|
+
!!g && /* @__PURE__ */ q("div", {
|
|
2547
2563
|
className: "seo-listing-card--checks grid gap-x-space-2xl gap-y-space-lg @xl/seo-listing-card:grid-cols-2",
|
|
2548
|
-
children:
|
|
2564
|
+
children: M.checks.map((e) => /* @__PURE__ */ q(kn, {
|
|
2549
2565
|
check: e,
|
|
2550
|
-
detail:
|
|
2551
|
-
strings:
|
|
2566
|
+
detail: On(e, T),
|
|
2567
|
+
strings: T
|
|
2552
2568
|
}, e.id))
|
|
2553
2569
|
})
|
|
2554
2570
|
]
|
|
2555
2571
|
})]
|
|
2556
2572
|
});
|
|
2557
2573
|
}
|
|
2558
|
-
|
|
2574
|
+
An.displayName = "SeoListingCard";
|
|
2559
2575
|
//#endregion
|
|
2560
2576
|
//#region src/components/blocks/commerce/invoice-mini/types.ts
|
|
2561
|
-
var
|
|
2577
|
+
var jn = {
|
|
2578
|
+
draft: "Draft",
|
|
2562
2579
|
paid: "Paid",
|
|
2563
2580
|
pending: "Pending",
|
|
2564
2581
|
overdue: "Overdue",
|
|
2582
|
+
disputed: "Disputed",
|
|
2565
2583
|
items: (e) => e === 1 ? "1 line item" : `${e} line items`,
|
|
2566
2584
|
due: "Due"
|
|
2567
|
-
},
|
|
2585
|
+
}, Mn = {
|
|
2586
|
+
draft: "secondary",
|
|
2568
2587
|
paid: "success",
|
|
2569
2588
|
pending: "warning",
|
|
2570
|
-
overdue: "destructive"
|
|
2589
|
+
overdue: "destructive",
|
|
2590
|
+
disputed: "warning"
|
|
2571
2591
|
};
|
|
2572
2592
|
//#endregion
|
|
2573
2593
|
//#region src/components/blocks/commerce/invoice-mini/invoice-mini.tsx
|
|
2574
|
-
function
|
|
2575
|
-
let s = t(
|
|
2594
|
+
function Nn({ invoice: e, className: n, strings: i, ...a }) {
|
|
2595
|
+
let s = t(jn, i), c = {
|
|
2596
|
+
draft: s.draft,
|
|
2576
2597
|
paid: s.paid,
|
|
2577
2598
|
pending: s.pending,
|
|
2578
|
-
overdue: s.overdue
|
|
2599
|
+
overdue: s.overdue,
|
|
2600
|
+
disputed: s.disputed
|
|
2579
2601
|
};
|
|
2580
|
-
return /* @__PURE__ */
|
|
2602
|
+
return /* @__PURE__ */ J(f, {
|
|
2581
2603
|
...a,
|
|
2582
2604
|
gap: "md",
|
|
2583
2605
|
"data-component": "invoice-mini",
|
|
2584
2606
|
"data-slot": "invoice-mini",
|
|
2585
2607
|
className: r("invoice-mini--component", n),
|
|
2586
2608
|
children: [
|
|
2587
|
-
/* @__PURE__ */
|
|
2609
|
+
/* @__PURE__ */ J(f, {
|
|
2588
2610
|
direction: "horizontal",
|
|
2589
2611
|
gap: "sm",
|
|
2590
2612
|
wrap: !1,
|
|
2591
|
-
children: [/* @__PURE__ */
|
|
2613
|
+
children: [/* @__PURE__ */ q(A, {
|
|
2592
2614
|
type: "inherit",
|
|
2593
2615
|
className: "min-w-0 truncate tracking-wide",
|
|
2594
2616
|
children: e.invoiceNumber
|
|
2595
|
-
}), /* @__PURE__ */
|
|
2596
|
-
tone:
|
|
2617
|
+
}), /* @__PURE__ */ q(I, {
|
|
2618
|
+
tone: Mn[e.status],
|
|
2597
2619
|
size: "sm",
|
|
2598
2620
|
className: "shrink-0",
|
|
2599
2621
|
children: c[e.status]
|
|
2600
2622
|
})]
|
|
2601
2623
|
}),
|
|
2602
|
-
/* @__PURE__ */
|
|
2624
|
+
/* @__PURE__ */ q(o, {
|
|
2603
2625
|
type: "secondary",
|
|
2604
2626
|
className: "truncate",
|
|
2605
2627
|
children: e.customerName
|
|
2606
2628
|
}),
|
|
2607
|
-
/* @__PURE__ */
|
|
2629
|
+
/* @__PURE__ */ J(f, {
|
|
2608
2630
|
direction: "horizontal",
|
|
2609
2631
|
gap: "lg",
|
|
2610
2632
|
align: "end",
|
|
2611
2633
|
justify: "between",
|
|
2612
2634
|
className: "pt-space-xs",
|
|
2613
|
-
children: [/* @__PURE__ */
|
|
2635
|
+
children: [/* @__PURE__ */ J(f, {
|
|
2614
2636
|
gap: "2xs",
|
|
2615
2637
|
className: "min-w-0",
|
|
2616
|
-
children: [/* @__PURE__ */
|
|
2638
|
+
children: [/* @__PURE__ */ q(o, {
|
|
2617
2639
|
size: "xs",
|
|
2618
2640
|
type: "secondary",
|
|
2619
2641
|
children: s.items(e.lineItemsCount)
|
|
2620
|
-
}), /* @__PURE__ */
|
|
2642
|
+
}), /* @__PURE__ */ J(k, {
|
|
2621
2643
|
size: "xs",
|
|
2622
2644
|
className: "whitespace-nowrap tabular-nums",
|
|
2623
2645
|
children: [
|
|
@@ -2626,7 +2648,7 @@ function jn({ invoice: e, className: n, strings: i, ...a }) {
|
|
|
2626
2648
|
e.dueDate
|
|
2627
2649
|
]
|
|
2628
2650
|
})]
|
|
2629
|
-
}), /* @__PURE__ */
|
|
2651
|
+
}), /* @__PURE__ */ q(D, {
|
|
2630
2652
|
type: "inherit",
|
|
2631
2653
|
size: "base",
|
|
2632
2654
|
weight: "bold",
|
|
@@ -2638,63 +2660,76 @@ function jn({ invoice: e, className: n, strings: i, ...a }) {
|
|
|
2638
2660
|
]
|
|
2639
2661
|
});
|
|
2640
2662
|
}
|
|
2641
|
-
|
|
2663
|
+
Nn.displayName = "InvoiceMini";
|
|
2642
2664
|
//#endregion
|
|
2643
2665
|
//#region src/components/blocks/commerce/invoice-header/types.ts
|
|
2644
|
-
var
|
|
2666
|
+
var Pn = {
|
|
2645
2667
|
title: "Invoice",
|
|
2646
2668
|
billFrom: "Bill from",
|
|
2647
2669
|
billTo: "Bill to",
|
|
2648
2670
|
issued: "Issued",
|
|
2649
2671
|
due: "Due",
|
|
2650
2672
|
amountDue: "Amount due",
|
|
2673
|
+
draft: "Draft",
|
|
2651
2674
|
paid: "Paid",
|
|
2652
2675
|
pending: "Pending",
|
|
2653
|
-
overdue: "Overdue"
|
|
2676
|
+
overdue: "Overdue",
|
|
2677
|
+
disputed: "Disputed"
|
|
2654
2678
|
};
|
|
2655
2679
|
//#endregion
|
|
2656
2680
|
//#region src/components/blocks/commerce/invoice-header/invoice-header.tsx
|
|
2657
|
-
function
|
|
2658
|
-
return /* @__PURE__ */
|
|
2681
|
+
function Fn({ eyebrow: e, name: t, location: n, details: r }) {
|
|
2682
|
+
return /* @__PURE__ */ J(f, {
|
|
2659
2683
|
gap: "xs",
|
|
2660
2684
|
className: "invoice-header--party",
|
|
2661
2685
|
children: [
|
|
2662
|
-
/* @__PURE__ */
|
|
2686
|
+
/* @__PURE__ */ q(s, {
|
|
2663
2687
|
tag: "div",
|
|
2664
2688
|
children: e
|
|
2665
2689
|
}),
|
|
2666
|
-
/* @__PURE__ */
|
|
2690
|
+
/* @__PURE__ */ q(o, {
|
|
2667
2691
|
type: "inherit",
|
|
2668
2692
|
weight: "semibold",
|
|
2669
2693
|
lineHeight: "snug",
|
|
2670
2694
|
children: t
|
|
2671
2695
|
}),
|
|
2672
|
-
!!n && /* @__PURE__ */
|
|
2696
|
+
!!n && /* @__PURE__ */ q(o, {
|
|
2673
2697
|
tag: "div",
|
|
2674
2698
|
size: "xs",
|
|
2675
2699
|
type: "secondary",
|
|
2676
2700
|
lineHeight: "snug",
|
|
2677
2701
|
children: n
|
|
2702
|
+
}),
|
|
2703
|
+
!!r && /* @__PURE__ */ q(o, {
|
|
2704
|
+
tag: "div",
|
|
2705
|
+
size: "xs",
|
|
2706
|
+
type: "secondary",
|
|
2707
|
+
lineHeight: "snug",
|
|
2708
|
+
className: "invoice-header--party-details",
|
|
2709
|
+
children: r
|
|
2678
2710
|
})
|
|
2679
2711
|
]
|
|
2680
2712
|
});
|
|
2681
2713
|
}
|
|
2682
|
-
function
|
|
2683
|
-
let
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2714
|
+
function In({ invoiceNumber: e, status: t, statusTone: i, from: a, to: o, issuedDate: s, dueDate: c, amount: l, className: d, strings: p, surface: m = "flat", padding: h = m === "flat" ? "none" : "md", headerDivider: g, ...v }) {
|
|
2715
|
+
let y = n(Pn, p), b = {
|
|
2716
|
+
draft: y.draft,
|
|
2717
|
+
paid: y.paid,
|
|
2718
|
+
pending: y.pending,
|
|
2719
|
+
overdue: y.overdue,
|
|
2720
|
+
disputed: y.disputed
|
|
2721
|
+
}, x = i ?? (t ? Mn[t] : void 0);
|
|
2722
|
+
return /* @__PURE__ */ J(_, {
|
|
2723
|
+
...v,
|
|
2724
|
+
surface: m,
|
|
2725
|
+
padding: h,
|
|
2726
|
+
headerDivider: g,
|
|
2727
|
+
title: y.title,
|
|
2728
|
+
titleSuffix: t ? /* @__PURE__ */ q(I, {
|
|
2729
|
+
tone: x,
|
|
2730
|
+
children: b[t]
|
|
2731
|
+
}) : void 0,
|
|
2732
|
+
description: /* @__PURE__ */ q(A, {
|
|
2698
2733
|
type: "inherit",
|
|
2699
2734
|
className: "invoice-header--number tracking-wide",
|
|
2700
2735
|
children: e
|
|
@@ -2703,37 +2738,39 @@ function Pn({ invoiceNumber: e, status: t, statusTone: i, from: a, to: o, issued
|
|
|
2703
2738
|
"data-component": "invoice-header",
|
|
2704
2739
|
"data-slot": "invoice-header",
|
|
2705
2740
|
className: r("invoice-header--component min-w-0", d),
|
|
2706
|
-
children: [/* @__PURE__ */
|
|
2741
|
+
children: [/* @__PURE__ */ J(u, {
|
|
2707
2742
|
minColumnWidth: "sm",
|
|
2708
2743
|
gap: "xl",
|
|
2709
2744
|
className: "invoice-header--parties",
|
|
2710
|
-
children: [/* @__PURE__ */
|
|
2711
|
-
eyebrow:
|
|
2745
|
+
children: [/* @__PURE__ */ q(Fn, {
|
|
2746
|
+
eyebrow: y.billFrom,
|
|
2712
2747
|
name: a.name,
|
|
2713
|
-
location: a.location
|
|
2714
|
-
|
|
2715
|
-
|
|
2748
|
+
location: a.location,
|
|
2749
|
+
details: a.details
|
|
2750
|
+
}), /* @__PURE__ */ q(Fn, {
|
|
2751
|
+
eyebrow: y.billTo,
|
|
2716
2752
|
name: o.name,
|
|
2717
|
-
location: o.location
|
|
2753
|
+
location: o.location,
|
|
2754
|
+
details: o.details
|
|
2718
2755
|
})]
|
|
2719
|
-
}), /* @__PURE__ */
|
|
2756
|
+
}), /* @__PURE__ */ J(f, {
|
|
2720
2757
|
gap: "sm",
|
|
2721
2758
|
className: "invoice-header--amounts",
|
|
2722
2759
|
children: [
|
|
2723
|
-
!!s && /* @__PURE__ */
|
|
2724
|
-
label:
|
|
2760
|
+
!!s && /* @__PURE__ */ q(K, {
|
|
2761
|
+
label: y.issued,
|
|
2725
2762
|
value: s,
|
|
2726
2763
|
valueWeight: "medium",
|
|
2727
2764
|
valueClassName: "tabular-nums"
|
|
2728
2765
|
}),
|
|
2729
|
-
!!c && /* @__PURE__ */
|
|
2730
|
-
label:
|
|
2766
|
+
!!c && /* @__PURE__ */ q(K, {
|
|
2767
|
+
label: y.due,
|
|
2731
2768
|
value: c,
|
|
2732
2769
|
valueWeight: "medium",
|
|
2733
2770
|
valueClassName: "tabular-nums"
|
|
2734
2771
|
}),
|
|
2735
|
-
/* @__PURE__ */
|
|
2736
|
-
label:
|
|
2772
|
+
/* @__PURE__ */ q(Y, {
|
|
2773
|
+
label: y.amountDue,
|
|
2737
2774
|
amount: l,
|
|
2738
2775
|
total: !0
|
|
2739
2776
|
})
|
|
@@ -2741,23 +2778,26 @@ function Pn({ invoiceNumber: e, status: t, statusTone: i, from: a, to: o, issued
|
|
|
2741
2778
|
})]
|
|
2742
2779
|
});
|
|
2743
2780
|
}
|
|
2744
|
-
|
|
2781
|
+
In.displayName = "InvoiceHeader";
|
|
2745
2782
|
//#endregion
|
|
2746
2783
|
//#region src/components/blocks/commerce/invoice-line-items/types.ts
|
|
2747
|
-
var
|
|
2784
|
+
var Ln = {
|
|
2748
2785
|
item: "Item",
|
|
2749
2786
|
quantity: "Qty",
|
|
2750
2787
|
price: "Price",
|
|
2751
2788
|
subtotal: "Subtotal",
|
|
2752
2789
|
tax: "Tax",
|
|
2753
2790
|
total: "Total"
|
|
2754
|
-
},
|
|
2791
|
+
}, Rn = {
|
|
2792
|
+
card: r("overflow-hidden rounded-surface border border-border bg-card text-card-foreground", b.card),
|
|
2793
|
+
flat: ""
|
|
2794
|
+
}, zn = {
|
|
2755
2795
|
left: "text-left justify-start",
|
|
2756
2796
|
right: "text-right justify-end",
|
|
2757
2797
|
center: "text-center justify-center"
|
|
2758
|
-
};
|
|
2759
|
-
function
|
|
2760
|
-
return /* @__PURE__ */
|
|
2798
|
+
}, Bn = "minmax(3rem,auto)", Vn = "minmax(6.5rem,auto)", Hn = "minmax(7rem,auto)", Un = "grid-cols-[minmax(0,1fr)_auto] @lg/invoice-line-items:grid-cols-[minmax(0,1fr)_minmax(3rem,auto)_minmax(6.5rem,auto)_minmax(7rem,auto)]", Wn = "hidden @lg/invoice-line-items:flex", Gn = "grid-cols-(--invoice-line-items-columns) @lg/invoice-line-items:grid-cols-(--invoice-line-items-wide-columns)", Kn = "@lg/invoice-line-items:hidden", qn = "whitespace-nowrap tabular-nums";
|
|
2799
|
+
function Jn({ amount: e, currency: t, weight: n = "regular" }) {
|
|
2800
|
+
return /* @__PURE__ */ q(te, {
|
|
2761
2801
|
type: "inherit",
|
|
2762
2802
|
amount: e,
|
|
2763
2803
|
currency: t,
|
|
@@ -2766,35 +2806,58 @@ function Q({ amount: e, currency: t, weight: n = "regular" }) {
|
|
|
2766
2806
|
weight: n
|
|
2767
2807
|
});
|
|
2768
2808
|
}
|
|
2769
|
-
function
|
|
2809
|
+
function Yn(e, t) {
|
|
2770
2810
|
return [
|
|
2771
2811
|
{
|
|
2772
2812
|
id: "description",
|
|
2773
2813
|
header: t.item,
|
|
2774
2814
|
width: "minmax(0,1fr)",
|
|
2775
|
-
cell: (
|
|
2776
|
-
|
|
2777
|
-
className: "
|
|
2778
|
-
children:
|
|
2815
|
+
cell: (t) => /* @__PURE__ */ J(f, {
|
|
2816
|
+
gap: "dense",
|
|
2817
|
+
className: "min-w-0",
|
|
2818
|
+
children: [/* @__PURE__ */ q(o, {
|
|
2819
|
+
type: "inherit",
|
|
2820
|
+
className: "break-words",
|
|
2821
|
+
children: t.description
|
|
2822
|
+
}), /* @__PURE__ */ J(o, {
|
|
2823
|
+
tag: "div",
|
|
2824
|
+
size: "xs",
|
|
2825
|
+
type: "secondary",
|
|
2826
|
+
className: r("invoice-line-items--calculation tabular-nums", Kn),
|
|
2827
|
+
children: [
|
|
2828
|
+
/* @__PURE__ */ q(P, {
|
|
2829
|
+
type: "inherit",
|
|
2830
|
+
value: t.qty
|
|
2831
|
+
}),
|
|
2832
|
+
" × ",
|
|
2833
|
+
/* @__PURE__ */ q(Jn, {
|
|
2834
|
+
amount: t.price,
|
|
2835
|
+
currency: e
|
|
2836
|
+
})
|
|
2837
|
+
]
|
|
2838
|
+
})]
|
|
2779
2839
|
})
|
|
2780
2840
|
},
|
|
2781
2841
|
{
|
|
2782
2842
|
id: "qty",
|
|
2783
2843
|
header: t.quantity,
|
|
2784
|
-
width:
|
|
2785
|
-
align: "
|
|
2786
|
-
|
|
2844
|
+
width: Bn,
|
|
2845
|
+
align: "right",
|
|
2846
|
+
headerClassName: Wn,
|
|
2847
|
+
cellClassName: r(qn, Wn),
|
|
2848
|
+
cell: (e) => /* @__PURE__ */ q(P, {
|
|
2787
2849
|
type: "inherit",
|
|
2788
|
-
value: e.qty
|
|
2789
|
-
align: "center"
|
|
2850
|
+
value: e.qty
|
|
2790
2851
|
})
|
|
2791
2852
|
},
|
|
2792
2853
|
{
|
|
2793
2854
|
id: "price",
|
|
2794
2855
|
header: t.price,
|
|
2795
|
-
width:
|
|
2856
|
+
width: Vn,
|
|
2796
2857
|
align: "right",
|
|
2797
|
-
|
|
2858
|
+
headerClassName: Wn,
|
|
2859
|
+
cellClassName: r(qn, Wn),
|
|
2860
|
+
cell: (t) => /* @__PURE__ */ q(Jn, {
|
|
2798
2861
|
amount: t.price,
|
|
2799
2862
|
currency: e
|
|
2800
2863
|
})
|
|
@@ -2802,43 +2865,44 @@ function Rn(e, t) {
|
|
|
2802
2865
|
{
|
|
2803
2866
|
id: "total",
|
|
2804
2867
|
header: t.total,
|
|
2805
|
-
width:
|
|
2868
|
+
width: Hn,
|
|
2806
2869
|
align: "right",
|
|
2807
|
-
|
|
2870
|
+
cellClassName: qn,
|
|
2871
|
+
cell: (t) => /* @__PURE__ */ q(Jn, {
|
|
2808
2872
|
amount: t.total,
|
|
2809
2873
|
currency: e
|
|
2810
2874
|
})
|
|
2811
2875
|
}
|
|
2812
2876
|
];
|
|
2813
2877
|
}
|
|
2814
|
-
function
|
|
2878
|
+
function Xn(e, t, n, r) {
|
|
2815
2879
|
let i = e.reduce((e, t) => e + t.total, 0), a = Math.round(i * t * 100) / 100, o = i + a;
|
|
2816
2880
|
return [
|
|
2817
2881
|
{
|
|
2818
2882
|
label: r.subtotal,
|
|
2819
|
-
value: /* @__PURE__ */
|
|
2883
|
+
value: /* @__PURE__ */ q(Jn, {
|
|
2820
2884
|
amount: i,
|
|
2821
2885
|
currency: n
|
|
2822
2886
|
})
|
|
2823
2887
|
},
|
|
2824
2888
|
{
|
|
2825
|
-
label: /* @__PURE__ */
|
|
2889
|
+
label: /* @__PURE__ */ J(Ae, { children: [
|
|
2826
2890
|
r.tax,
|
|
2827
2891
|
" (",
|
|
2828
|
-
/* @__PURE__ */
|
|
2892
|
+
/* @__PURE__ */ q(ee, {
|
|
2829
2893
|
type: "inherit",
|
|
2830
2894
|
value: t
|
|
2831
2895
|
}),
|
|
2832
2896
|
")"
|
|
2833
2897
|
] }),
|
|
2834
|
-
value: /* @__PURE__ */
|
|
2898
|
+
value: /* @__PURE__ */ q(Jn, {
|
|
2835
2899
|
amount: a,
|
|
2836
2900
|
currency: n
|
|
2837
2901
|
})
|
|
2838
2902
|
},
|
|
2839
2903
|
{
|
|
2840
2904
|
label: r.total,
|
|
2841
|
-
value: /* @__PURE__ */
|
|
2905
|
+
value: /* @__PURE__ */ q(Jn, {
|
|
2842
2906
|
amount: o,
|
|
2843
2907
|
currency: n,
|
|
2844
2908
|
weight: "bold"
|
|
@@ -2847,69 +2911,71 @@ function zn(e, t, n, r) {
|
|
|
2847
2911
|
}
|
|
2848
2912
|
];
|
|
2849
2913
|
}
|
|
2850
|
-
function
|
|
2851
|
-
let
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2914
|
+
function Zn({ items: t, columns: i, footerRows: a, taxRate: c = .2, currency: l, surface: u = "card", className: d, strings: p }) {
|
|
2915
|
+
let m = n(Ln, p), { defaultCurrency: h } = e(), g = l ?? h ?? "€", _ = u === "flat", v = i ?? Yn(g, m), b = a ?? (i ? [] : Xn(t, c, g, m)), x = (e) => e.map((e) => e.width ?? "1fr").join(" "), S = !!i && v.some((e) => e.wideOnly), C = i ? S ? {
|
|
2916
|
+
"--invoice-line-items-columns": x(v.filter((e) => !e.wideOnly)),
|
|
2917
|
+
"--invoice-line-items-wide-columns": x(v)
|
|
2918
|
+
} : { gridTemplateColumns: x(v) } : void 0, w = _ ? "py-row-y" : "px-row-x py-row-y", T = "col-span-full grid min-w-0 grid-cols-subgrid";
|
|
2919
|
+
return /* @__PURE__ */ J("div", {
|
|
2920
|
+
"data-surface": u,
|
|
2921
|
+
className: r("invoice-line-items--component", "@container/invoice-line-items box-border w-full min-w-0 max-w-full", Rn[u], d),
|
|
2922
|
+
children: [/* @__PURE__ */ q("div", {
|
|
2923
|
+
className: r("invoice-line-items--scroller w-full min-w-0", i && "overflow-x-auto", i && _ && "-mx-space-xs w-auto px-space-xs"),
|
|
2924
|
+
children: /* @__PURE__ */ J("div", {
|
|
2925
|
+
className: r("invoice-line-items--body grid min-w-min gap-x-space-md", !i && Un, S && Gn),
|
|
2926
|
+
style: C,
|
|
2927
|
+
children: [/* @__PURE__ */ q("div", {
|
|
2928
|
+
className: r("invoice-line-items--header", T, w, _ ? "border-b border-border/60" : y.band, !i && "hidden @lg/invoice-line-items:grid"),
|
|
2929
|
+
children: v.map((e) => /* @__PURE__ */ q("div", {
|
|
2930
|
+
className: r("flex min-w-0", zn[e.align ?? "left"], i && e.wideOnly && Wn, e.headerClassName),
|
|
2931
|
+
children: /* @__PURE__ */ q(s, {
|
|
2932
|
+
className: "min-w-0 truncate",
|
|
2933
|
+
children: e.header
|
|
2934
|
+
})
|
|
2935
|
+
}, e.id))
|
|
2936
|
+
}), t.map((e, t) => /* @__PURE__ */ q("div", {
|
|
2937
|
+
className: r("invoice-line-items--row", T, w, _ ? t > 0 && "border-t border-border/60" : t % 2 == 1 && y.wash),
|
|
2938
|
+
children: v.map((n) => /* @__PURE__ */ q("div", {
|
|
2939
|
+
"data-column": n.id,
|
|
2940
|
+
className: r("flex min-w-0 items-start", zn[n.align ?? "left"], i && n.wideOnly && Wn, n.cellClassName),
|
|
2941
|
+
children: n.cell(e, t)
|
|
2942
|
+
}, n.id))
|
|
2943
|
+
}, t))]
|
|
2944
|
+
})
|
|
2945
|
+
}), b.length > 0 && /* @__PURE__ */ J(Ae, { children: [/* @__PURE__ */ q(ae, {}), /* @__PURE__ */ q("div", {
|
|
2946
|
+
className: r("invoice-line-items--footer", _ ? "pt-surface" : "px-row-x py-surface"),
|
|
2947
|
+
children: /* @__PURE__ */ q(f, {
|
|
2948
|
+
gap: "sm",
|
|
2949
|
+
children: b.map((e, t) => /* @__PURE__ */ J(f, {
|
|
2950
|
+
direction: "horizontal",
|
|
2881
2951
|
gap: "sm",
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
children:
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
}, t))
|
|
2901
|
-
})
|
|
2902
|
-
})] })
|
|
2903
|
-
]
|
|
2952
|
+
justify: "between",
|
|
2953
|
+
align: "baseline",
|
|
2954
|
+
className: r(e.emphasis === "total" && "pt-space-md"),
|
|
2955
|
+
children: [/* @__PURE__ */ q(o, {
|
|
2956
|
+
type: e.emphasis === "total" ? "inherit" : "secondary",
|
|
2957
|
+
weight: e.emphasis === "total" ? "bold" : "regular",
|
|
2958
|
+
children: e.label
|
|
2959
|
+
}), Qn(e.value) ? /* @__PURE__ */ q(D, {
|
|
2960
|
+
type: "inherit",
|
|
2961
|
+
weight: e.emphasis === "total" ? "bold" : "regular",
|
|
2962
|
+
children: e.value
|
|
2963
|
+
}) : /* @__PURE__ */ q("div", {
|
|
2964
|
+
className: "invoice-line-items--footer-value shrink-0",
|
|
2965
|
+
children: e.value
|
|
2966
|
+
})]
|
|
2967
|
+
}, t))
|
|
2968
|
+
})
|
|
2969
|
+
})] })]
|
|
2904
2970
|
});
|
|
2905
2971
|
}
|
|
2906
|
-
|
|
2907
|
-
function
|
|
2972
|
+
Zn.displayName = "InvoiceLineItems";
|
|
2973
|
+
function Qn(e) {
|
|
2908
2974
|
return typeof e == "string" || typeof e == "number" || typeof e == "bigint";
|
|
2909
2975
|
}
|
|
2910
2976
|
//#endregion
|
|
2911
2977
|
//#region src/components/blocks/commerce/order-timeline/order-timeline.tsx
|
|
2912
|
-
function
|
|
2978
|
+
function $n({ title: e, description: t, events: n, footerText: i, className: a }) {
|
|
2913
2979
|
let o = n.map((e) => ({
|
|
2914
2980
|
id: e.id,
|
|
2915
2981
|
title: e.title,
|
|
@@ -2917,47 +2983,47 @@ function Hn({ title: e, description: t, events: n, footerText: i, className: a }
|
|
|
2917
2983
|
timestamp: e.timestamp,
|
|
2918
2984
|
status: e.status
|
|
2919
2985
|
}));
|
|
2920
|
-
return /* @__PURE__ */
|
|
2986
|
+
return /* @__PURE__ */ q(z, {
|
|
2921
2987
|
"data-component": "order-timeline",
|
|
2922
2988
|
"data-slot": "order-timeline",
|
|
2923
2989
|
title: e,
|
|
2924
2990
|
description: t,
|
|
2925
2991
|
footerText: i,
|
|
2926
2992
|
className: r("order-timeline--component", a),
|
|
2927
|
-
children: /* @__PURE__ */
|
|
2993
|
+
children: /* @__PURE__ */ q(Ce, { items: o })
|
|
2928
2994
|
});
|
|
2929
2995
|
}
|
|
2930
|
-
|
|
2996
|
+
$n.displayName = "OrderTimeline";
|
|
2931
2997
|
//#endregion
|
|
2932
2998
|
//#region src/components/blocks/commerce/payment-timeline/payment-timeline.tsx
|
|
2933
|
-
function
|
|
2999
|
+
function er({ events: e, className: t }) {
|
|
2934
3000
|
let n = e.map((e, t) => ({
|
|
2935
3001
|
id: `${e.label}-${String(t)}`,
|
|
2936
3002
|
title: e.label,
|
|
2937
3003
|
description: e.date,
|
|
2938
3004
|
icon: e.icon,
|
|
2939
3005
|
status: e.done ? "success" : "pending",
|
|
2940
|
-
children: e.amount ? /* @__PURE__ */
|
|
3006
|
+
children: e.amount ? /* @__PURE__ */ q(D, {
|
|
2941
3007
|
type: "inherit",
|
|
2942
3008
|
weight: "medium",
|
|
2943
3009
|
className: "tabular-nums",
|
|
2944
3010
|
children: e.amount
|
|
2945
3011
|
}) : void 0
|
|
2946
3012
|
}));
|
|
2947
|
-
return /* @__PURE__ */
|
|
3013
|
+
return /* @__PURE__ */ q("div", {
|
|
2948
3014
|
"data-component": "payment-timeline",
|
|
2949
3015
|
"data-slot": "payment-timeline",
|
|
2950
3016
|
className: r("payment-timeline--component min-w-0", t),
|
|
2951
|
-
children: /* @__PURE__ */
|
|
3017
|
+
children: /* @__PURE__ */ q(Ce, {
|
|
2952
3018
|
items: n,
|
|
2953
3019
|
dotSize: "lg"
|
|
2954
3020
|
})
|
|
2955
3021
|
});
|
|
2956
3022
|
}
|
|
2957
|
-
|
|
3023
|
+
er.displayName = "PaymentTimeline";
|
|
2958
3024
|
//#endregion
|
|
2959
3025
|
//#region src/components/blocks/commerce/inventory-section/types.ts
|
|
2960
|
-
var
|
|
3026
|
+
var tr = {
|
|
2961
3027
|
title: "Inventory",
|
|
2962
3028
|
description: "Manage stock tracking, availability, fulfillment, and compliance details.",
|
|
2963
3029
|
status: {
|
|
@@ -3048,48 +3114,48 @@ var Wn = {
|
|
|
3048
3114
|
clearAll: "Clear tags",
|
|
3049
3115
|
summary: (e, t) => `${e} / ${t} tags`
|
|
3050
3116
|
}
|
|
3051
|
-
},
|
|
3117
|
+
}, nr = {
|
|
3052
3118
|
in_stock: "success",
|
|
3053
3119
|
low_stock: "warning",
|
|
3054
3120
|
out_of_stock: "destructive",
|
|
3055
3121
|
untracked: "secondary"
|
|
3056
3122
|
};
|
|
3057
|
-
function
|
|
3123
|
+
function rr(e) {
|
|
3058
3124
|
if (e === void 0 || e.trim() === "") return;
|
|
3059
3125
|
let t = Number(e);
|
|
3060
3126
|
return Number.isFinite(t) ? t : void 0;
|
|
3061
3127
|
}
|
|
3062
|
-
function
|
|
3128
|
+
function ir(e) {
|
|
3063
3129
|
if (!(e.trackQuantity ?? !0)) return "untracked";
|
|
3064
|
-
let t =
|
|
3130
|
+
let t = rr(e.available) ?? 0;
|
|
3065
3131
|
if (t <= 0) return "out_of_stock";
|
|
3066
|
-
let n =
|
|
3132
|
+
let n = rr(e.lowStockThreshold);
|
|
3067
3133
|
return n !== void 0 && t <= n ? "low_stock" : "in_stock";
|
|
3068
3134
|
}
|
|
3069
|
-
function
|
|
3070
|
-
return /* @__PURE__ */
|
|
3135
|
+
function ar({ children: e, className: t }) {
|
|
3136
|
+
return /* @__PURE__ */ q(o, {
|
|
3071
3137
|
type: "inherit",
|
|
3072
3138
|
weight: "semibold",
|
|
3073
3139
|
className: r("inventory-section-card--section-title", t),
|
|
3074
3140
|
children: e
|
|
3075
3141
|
});
|
|
3076
3142
|
}
|
|
3077
|
-
function
|
|
3078
|
-
return /* @__PURE__ */
|
|
3143
|
+
function or({ metric: e }) {
|
|
3144
|
+
return /* @__PURE__ */ J("div", {
|
|
3079
3145
|
className: "inventory-section-card--metric min-w-0",
|
|
3080
3146
|
children: [
|
|
3081
|
-
/* @__PURE__ */
|
|
3147
|
+
/* @__PURE__ */ q(o, {
|
|
3082
3148
|
size: "xs",
|
|
3083
3149
|
type: "secondary",
|
|
3084
3150
|
children: e.label
|
|
3085
3151
|
}),
|
|
3086
|
-
/* @__PURE__ */
|
|
3152
|
+
/* @__PURE__ */ q(D, {
|
|
3087
3153
|
type: "inherit",
|
|
3088
3154
|
weight: "semibold",
|
|
3089
3155
|
className: "tabular-nums",
|
|
3090
3156
|
children: e.value
|
|
3091
3157
|
}),
|
|
3092
|
-
!!e.description && /* @__PURE__ */
|
|
3158
|
+
!!e.description && /* @__PURE__ */ q(o, {
|
|
3093
3159
|
size: "xs",
|
|
3094
3160
|
type: "secondary",
|
|
3095
3161
|
lineHeight: "snug",
|
|
@@ -3098,8 +3164,8 @@ function Jn({ metric: e }) {
|
|
|
3098
3164
|
]
|
|
3099
3165
|
});
|
|
3100
3166
|
}
|
|
3101
|
-
function
|
|
3102
|
-
let
|
|
3167
|
+
function sr({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly: s = !1, visibleSections: c, visibleFields: l, locationOptions: u = [], countryOptions: p = [], tagRecommendations: m, maxTags: h, onGenerateSku: g, onRestock: v, surface: y = "flat", padding: b = y === "flat" ? "none" : "md", headerDivider: x, className: S, strings: C }) {
|
|
3168
|
+
let w = n(tr, C), T = ir(e), E = o || s, D = e.trackQuantity ?? !0, O = e.requiresShipping ?? !0, k = E || !O, A = (e) => c?.[e] !== !1, j = (e) => l?.[e] !== !1, M = (n, r) => {
|
|
3103
3169
|
let i = e[n], a = {
|
|
3104
3170
|
...e,
|
|
3105
3171
|
[n]: r
|
|
@@ -3109,260 +3175,261 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3109
3175
|
value: r,
|
|
3110
3176
|
previousValue: i
|
|
3111
3177
|
});
|
|
3112
|
-
},
|
|
3113
|
-
if (!g ||
|
|
3178
|
+
}, N = () => {
|
|
3179
|
+
if (!g || E) return;
|
|
3114
3180
|
let t = g(e);
|
|
3115
|
-
typeof t == "string" &&
|
|
3116
|
-
},
|
|
3181
|
+
typeof t == "string" && M("sku", t);
|
|
3182
|
+
}, ee = [
|
|
3117
3183
|
{
|
|
3118
3184
|
id: "available",
|
|
3119
|
-
label:
|
|
3120
|
-
value:
|
|
3121
|
-
description:
|
|
3185
|
+
label: w.summary.available,
|
|
3186
|
+
value: D ? e.available || "0" : "—",
|
|
3187
|
+
description: D ? void 0 : w.summary.untracked
|
|
3122
3188
|
},
|
|
3123
3189
|
{
|
|
3124
3190
|
id: "committed",
|
|
3125
|
-
label:
|
|
3191
|
+
label: w.summary.committed,
|
|
3126
3192
|
value: e.committed || "0"
|
|
3127
3193
|
},
|
|
3128
3194
|
{
|
|
3129
3195
|
id: "incoming",
|
|
3130
|
-
label:
|
|
3196
|
+
label: w.summary.incoming,
|
|
3131
3197
|
value: e.incoming || "0"
|
|
3132
3198
|
},
|
|
3133
3199
|
{
|
|
3134
3200
|
id: "threshold",
|
|
3135
|
-
label:
|
|
3201
|
+
label: w.summary.threshold,
|
|
3136
3202
|
value: e.lowStockThreshold || "-"
|
|
3137
3203
|
}
|
|
3138
3204
|
];
|
|
3139
|
-
return /* @__PURE__ */
|
|
3140
|
-
surface:
|
|
3141
|
-
padding:
|
|
3205
|
+
return /* @__PURE__ */ J(_, {
|
|
3206
|
+
surface: y,
|
|
3207
|
+
padding: b,
|
|
3208
|
+
headerDivider: x,
|
|
3142
3209
|
gap: "xl",
|
|
3143
|
-
title:
|
|
3144
|
-
description:
|
|
3145
|
-
titleSuffix: /* @__PURE__ */
|
|
3146
|
-
tone:
|
|
3147
|
-
children:
|
|
3210
|
+
title: w.title,
|
|
3211
|
+
description: w.description,
|
|
3212
|
+
titleSuffix: /* @__PURE__ */ q(I, {
|
|
3213
|
+
tone: nr[T],
|
|
3214
|
+
children: w.status[T]
|
|
3148
3215
|
}),
|
|
3149
|
-
headerAction: /* @__PURE__ */
|
|
3216
|
+
headerAction: /* @__PURE__ */ J(f, {
|
|
3150
3217
|
direction: "horizontal",
|
|
3151
3218
|
gap: "sm",
|
|
3152
3219
|
className: "w-full @md/inventory-section-card:w-auto @md/inventory-section-card:justify-end",
|
|
3153
|
-
children: [!!g && /* @__PURE__ */
|
|
3220
|
+
children: [!!g && /* @__PURE__ */ q(i, {
|
|
3154
3221
|
type: "button",
|
|
3155
3222
|
tone: "secondary",
|
|
3156
3223
|
buttonStyle: "outline",
|
|
3157
3224
|
size: "sm",
|
|
3158
|
-
onClick:
|
|
3159
|
-
disabled:
|
|
3160
|
-
children:
|
|
3161
|
-
}), !!v && /* @__PURE__ */
|
|
3225
|
+
onClick: N,
|
|
3226
|
+
disabled: E,
|
|
3227
|
+
children: w.actions.generateSku
|
|
3228
|
+
}), !!v && /* @__PURE__ */ q(i, {
|
|
3162
3229
|
type: "button",
|
|
3163
3230
|
tone: "secondary",
|
|
3164
3231
|
buttonStyle: "ghost",
|
|
3165
3232
|
size: "sm",
|
|
3166
3233
|
onClick: () => v(e),
|
|
3167
|
-
disabled:
|
|
3168
|
-
children:
|
|
3234
|
+
disabled: E,
|
|
3235
|
+
children: w.actions.restock
|
|
3169
3236
|
})]
|
|
3170
3237
|
}),
|
|
3171
|
-
className: r("inventory-section-card--component @container/inventory-section-card w-full",
|
|
3238
|
+
className: r("inventory-section-card--component @container/inventory-section-card w-full", S),
|
|
3172
3239
|
contentGap: "2xl",
|
|
3173
3240
|
children: [
|
|
3174
|
-
!!
|
|
3241
|
+
!!A("summary") && /* @__PURE__ */ q("div", {
|
|
3175
3242
|
className: "inventory-section-card--summary grid min-w-0 grid-cols-1 gap-space-xl @md/inventory-section-card:grid-cols-2 @3xl/inventory-section-card:grid-cols-4",
|
|
3176
|
-
children:
|
|
3243
|
+
children: ee.map((e) => /* @__PURE__ */ q(or, { metric: e }, e.id))
|
|
3177
3244
|
}),
|
|
3178
|
-
!!
|
|
3179
|
-
render: /* @__PURE__ */
|
|
3245
|
+
!!A("identity") && /* @__PURE__ */ J(f, {
|
|
3246
|
+
render: /* @__PURE__ */ q("section", {}),
|
|
3180
3247
|
gap: "md",
|
|
3181
3248
|
className: "inventory-section-card--identity",
|
|
3182
|
-
children: [/* @__PURE__ */
|
|
3183
|
-
label:
|
|
3249
|
+
children: [/* @__PURE__ */ q(ar, { children: w.sections.identity }), /* @__PURE__ */ J(d, { children: [!!j("sku") && /* @__PURE__ */ q(R, {
|
|
3250
|
+
label: w.fields.sku,
|
|
3184
3251
|
error: a?.sku,
|
|
3185
|
-
hint:
|
|
3186
|
-
children: /* @__PURE__ */
|
|
3252
|
+
hint: w.hints.sku,
|
|
3253
|
+
children: /* @__PURE__ */ q(L, {
|
|
3187
3254
|
value: e.sku ?? "",
|
|
3188
|
-
onChange: (e) =>
|
|
3189
|
-
placeholder:
|
|
3190
|
-
disabled:
|
|
3255
|
+
onChange: (e) => M("sku", e.target.value),
|
|
3256
|
+
placeholder: w.placeholders.sku,
|
|
3257
|
+
disabled: E,
|
|
3191
3258
|
invalid: !!a?.sku
|
|
3192
3259
|
})
|
|
3193
|
-
}), !!
|
|
3194
|
-
label:
|
|
3260
|
+
}), !!j("barcode") && /* @__PURE__ */ q(R, {
|
|
3261
|
+
label: w.fields.barcode,
|
|
3195
3262
|
error: a?.barcode,
|
|
3196
|
-
hint:
|
|
3197
|
-
children: /* @__PURE__ */
|
|
3263
|
+
hint: w.hints.barcode,
|
|
3264
|
+
children: /* @__PURE__ */ q(L, {
|
|
3198
3265
|
value: e.barcode ?? "",
|
|
3199
|
-
onChange: (e) =>
|
|
3200
|
-
placeholder:
|
|
3201
|
-
disabled:
|
|
3266
|
+
onChange: (e) => M("barcode", e.target.value),
|
|
3267
|
+
placeholder: w.placeholders.barcode,
|
|
3268
|
+
disabled: E,
|
|
3202
3269
|
invalid: !!a?.barcode
|
|
3203
3270
|
})
|
|
3204
3271
|
})] })]
|
|
3205
3272
|
}),
|
|
3206
|
-
!!
|
|
3207
|
-
render: /* @__PURE__ */
|
|
3273
|
+
!!A("tracking") && /* @__PURE__ */ J(f, {
|
|
3274
|
+
render: /* @__PURE__ */ q("section", {}),
|
|
3208
3275
|
gap: "md",
|
|
3209
3276
|
className: "inventory-section-card--tracking",
|
|
3210
3277
|
children: [
|
|
3211
|
-
/* @__PURE__ */
|
|
3212
|
-
!!
|
|
3213
|
-
label:
|
|
3214
|
-
description:
|
|
3215
|
-
value:
|
|
3216
|
-
onValueChange: (e) =>
|
|
3217
|
-
disabled:
|
|
3278
|
+
/* @__PURE__ */ q(ar, { children: w.sections.tracking }),
|
|
3279
|
+
!!j("trackQuantity") && /* @__PURE__ */ q(se, {
|
|
3280
|
+
label: w.fields.trackQuantity,
|
|
3281
|
+
description: w.hints.available,
|
|
3282
|
+
value: D,
|
|
3283
|
+
onValueChange: (e) => M("trackQuantity", e),
|
|
3284
|
+
disabled: E
|
|
3218
3285
|
}),
|
|
3219
|
-
/* @__PURE__ */
|
|
3286
|
+
/* @__PURE__ */ J("div", {
|
|
3220
3287
|
className: "inventory-section-card--tracking-grid grid min-w-0 grid-cols-1 gap-space-xl @md/inventory-section-card:grid-cols-2 @3xl/inventory-section-card:grid-cols-4",
|
|
3221
3288
|
children: [
|
|
3222
|
-
!!
|
|
3223
|
-
label:
|
|
3289
|
+
!!j("available") && /* @__PURE__ */ q(R, {
|
|
3290
|
+
label: w.fields.available,
|
|
3224
3291
|
error: a?.available,
|
|
3225
|
-
hint:
|
|
3226
|
-
children: /* @__PURE__ */
|
|
3292
|
+
hint: w.hints.available,
|
|
3293
|
+
children: /* @__PURE__ */ q(pe, {
|
|
3227
3294
|
value: e.available ?? "",
|
|
3228
|
-
onChange: (e) =>
|
|
3229
|
-
placeholder:
|
|
3295
|
+
onChange: (e) => M("available", e.target.value),
|
|
3296
|
+
placeholder: w.placeholders.available,
|
|
3230
3297
|
min: 0,
|
|
3231
3298
|
decimalPlaces: 0,
|
|
3232
3299
|
step: 1,
|
|
3233
|
-
disabled:
|
|
3300
|
+
disabled: E || !D,
|
|
3234
3301
|
invalid: !!a?.available
|
|
3235
3302
|
})
|
|
3236
3303
|
}),
|
|
3237
|
-
!!
|
|
3238
|
-
label:
|
|
3304
|
+
!!j("committed") && /* @__PURE__ */ q(R, {
|
|
3305
|
+
label: w.fields.committed,
|
|
3239
3306
|
error: a?.committed,
|
|
3240
|
-
hint:
|
|
3241
|
-
children: /* @__PURE__ */
|
|
3307
|
+
hint: w.hints.committed,
|
|
3308
|
+
children: /* @__PURE__ */ q(pe, {
|
|
3242
3309
|
value: e.committed ?? "",
|
|
3243
|
-
onChange: (e) =>
|
|
3244
|
-
placeholder:
|
|
3310
|
+
onChange: (e) => M("committed", e.target.value),
|
|
3311
|
+
placeholder: w.placeholders.committed,
|
|
3245
3312
|
min: 0,
|
|
3246
3313
|
decimalPlaces: 0,
|
|
3247
3314
|
step: 1,
|
|
3248
|
-
disabled:
|
|
3315
|
+
disabled: E || !D,
|
|
3249
3316
|
invalid: !!a?.committed
|
|
3250
3317
|
})
|
|
3251
3318
|
}),
|
|
3252
|
-
!!
|
|
3253
|
-
label:
|
|
3319
|
+
!!j("incoming") && /* @__PURE__ */ q(R, {
|
|
3320
|
+
label: w.fields.incoming,
|
|
3254
3321
|
error: a?.incoming,
|
|
3255
|
-
hint:
|
|
3256
|
-
children: /* @__PURE__ */
|
|
3322
|
+
hint: w.hints.incoming,
|
|
3323
|
+
children: /* @__PURE__ */ q(pe, {
|
|
3257
3324
|
value: e.incoming ?? "",
|
|
3258
|
-
onChange: (e) =>
|
|
3259
|
-
placeholder:
|
|
3325
|
+
onChange: (e) => M("incoming", e.target.value),
|
|
3326
|
+
placeholder: w.placeholders.incoming,
|
|
3260
3327
|
min: 0,
|
|
3261
3328
|
decimalPlaces: 0,
|
|
3262
3329
|
step: 1,
|
|
3263
|
-
disabled:
|
|
3330
|
+
disabled: E || !D,
|
|
3264
3331
|
invalid: !!a?.incoming
|
|
3265
3332
|
})
|
|
3266
3333
|
}),
|
|
3267
|
-
!!
|
|
3268
|
-
label:
|
|
3334
|
+
!!j("lowStockThreshold") && /* @__PURE__ */ q(R, {
|
|
3335
|
+
label: w.fields.lowStockThreshold,
|
|
3269
3336
|
error: a?.lowStockThreshold,
|
|
3270
|
-
hint:
|
|
3271
|
-
children: /* @__PURE__ */
|
|
3337
|
+
hint: w.hints.lowStockThreshold,
|
|
3338
|
+
children: /* @__PURE__ */ q(pe, {
|
|
3272
3339
|
value: e.lowStockThreshold ?? "",
|
|
3273
|
-
onChange: (e) =>
|
|
3274
|
-
placeholder:
|
|
3340
|
+
onChange: (e) => M("lowStockThreshold", e.target.value),
|
|
3341
|
+
placeholder: w.placeholders.lowStockThreshold,
|
|
3275
3342
|
min: 0,
|
|
3276
3343
|
decimalPlaces: 0,
|
|
3277
3344
|
step: 1,
|
|
3278
|
-
disabled:
|
|
3345
|
+
disabled: E || !D,
|
|
3279
3346
|
invalid: !!a?.lowStockThreshold
|
|
3280
3347
|
})
|
|
3281
3348
|
})
|
|
3282
3349
|
]
|
|
3283
3350
|
}),
|
|
3284
|
-
!!
|
|
3285
|
-
label:
|
|
3351
|
+
!!j("inventoryPolicy") && /* @__PURE__ */ q(R, {
|
|
3352
|
+
label: w.fields.inventoryPolicy,
|
|
3286
3353
|
error: a?.inventoryPolicy,
|
|
3287
|
-
hint:
|
|
3288
|
-
children: /* @__PURE__ */
|
|
3354
|
+
hint: w.hints.inventoryPolicy,
|
|
3355
|
+
children: /* @__PURE__ */ q(le, {
|
|
3289
3356
|
columns: 2,
|
|
3290
3357
|
value: e.inventoryPolicy ?? "deny",
|
|
3291
|
-
onValueChange: (e) =>
|
|
3292
|
-
disabled:
|
|
3358
|
+
onValueChange: (e) => M("inventoryPolicy", e),
|
|
3359
|
+
disabled: E || !D,
|
|
3293
3360
|
invalid: !!a?.inventoryPolicy,
|
|
3294
3361
|
options: [{
|
|
3295
3362
|
value: "deny",
|
|
3296
|
-
label:
|
|
3297
|
-
description:
|
|
3363
|
+
label: w.policyOptions.deny.label,
|
|
3364
|
+
description: w.policyOptions.deny.description
|
|
3298
3365
|
}, {
|
|
3299
3366
|
value: "continue",
|
|
3300
|
-
label:
|
|
3301
|
-
description:
|
|
3367
|
+
label: w.policyOptions.continue.label,
|
|
3368
|
+
description: w.policyOptions.continue.description
|
|
3302
3369
|
}]
|
|
3303
3370
|
})
|
|
3304
3371
|
})
|
|
3305
3372
|
]
|
|
3306
3373
|
}),
|
|
3307
|
-
!!
|
|
3308
|
-
render: /* @__PURE__ */
|
|
3374
|
+
!!A("location") && /* @__PURE__ */ J(f, {
|
|
3375
|
+
render: /* @__PURE__ */ q("section", {}),
|
|
3309
3376
|
gap: "md",
|
|
3310
3377
|
className: "inventory-section-card--location",
|
|
3311
|
-
children: [/* @__PURE__ */
|
|
3312
|
-
label:
|
|
3378
|
+
children: [/* @__PURE__ */ q(ar, { children: w.sections.location }), /* @__PURE__ */ J(d, { children: [!!j("locationId") && /* @__PURE__ */ q(R, {
|
|
3379
|
+
label: w.fields.locationId,
|
|
3313
3380
|
error: a?.locationId,
|
|
3314
|
-
hint:
|
|
3315
|
-
children: u.length > 0 ? /* @__PURE__ */
|
|
3381
|
+
hint: w.hints.locationId,
|
|
3382
|
+
children: u.length > 0 ? /* @__PURE__ */ q(ce, {
|
|
3316
3383
|
value: e.locationId ?? null,
|
|
3317
|
-
onValueChange: (e) =>
|
|
3384
|
+
onValueChange: (e) => M("locationId", e),
|
|
3318
3385
|
options: u,
|
|
3319
|
-
placeholder:
|
|
3320
|
-
disabled:
|
|
3386
|
+
placeholder: w.placeholders.locationId,
|
|
3387
|
+
disabled: E,
|
|
3321
3388
|
invalid: !!a?.locationId,
|
|
3322
3389
|
allowClear: !0
|
|
3323
|
-
}) : /* @__PURE__ */
|
|
3390
|
+
}) : /* @__PURE__ */ q(L, {
|
|
3324
3391
|
value: e.locationId ?? "",
|
|
3325
|
-
onChange: (e) =>
|
|
3326
|
-
placeholder:
|
|
3327
|
-
disabled:
|
|
3392
|
+
onChange: (e) => M("locationId", e.target.value),
|
|
3393
|
+
placeholder: w.placeholders.locationId,
|
|
3394
|
+
disabled: E,
|
|
3328
3395
|
invalid: !!a?.locationId
|
|
3329
3396
|
})
|
|
3330
|
-
}), !!
|
|
3331
|
-
label:
|
|
3397
|
+
}), !!j("binLocation") && /* @__PURE__ */ q(R, {
|
|
3398
|
+
label: w.fields.binLocation,
|
|
3332
3399
|
error: a?.binLocation,
|
|
3333
|
-
hint:
|
|
3334
|
-
children: /* @__PURE__ */
|
|
3400
|
+
hint: w.hints.binLocation,
|
|
3401
|
+
children: /* @__PURE__ */ q(L, {
|
|
3335
3402
|
value: e.binLocation ?? "",
|
|
3336
|
-
onChange: (e) =>
|
|
3337
|
-
placeholder:
|
|
3338
|
-
disabled:
|
|
3403
|
+
onChange: (e) => M("binLocation", e.target.value),
|
|
3404
|
+
placeholder: w.placeholders.binLocation,
|
|
3405
|
+
disabled: E,
|
|
3339
3406
|
invalid: !!a?.binLocation
|
|
3340
3407
|
})
|
|
3341
3408
|
})] })]
|
|
3342
3409
|
}),
|
|
3343
|
-
!!
|
|
3344
|
-
render: /* @__PURE__ */
|
|
3410
|
+
!!A("shipping") && /* @__PURE__ */ J(f, {
|
|
3411
|
+
render: /* @__PURE__ */ q("section", {}),
|
|
3345
3412
|
gap: "md",
|
|
3346
3413
|
className: "inventory-section-card--shipping",
|
|
3347
3414
|
children: [
|
|
3348
|
-
/* @__PURE__ */
|
|
3349
|
-
!!
|
|
3350
|
-
label:
|
|
3351
|
-
description:
|
|
3352
|
-
value:
|
|
3353
|
-
onValueChange: (e) =>
|
|
3354
|
-
disabled:
|
|
3415
|
+
/* @__PURE__ */ q(ar, { children: w.sections.shipping }),
|
|
3416
|
+
!!j("requiresShipping") && /* @__PURE__ */ q(se, {
|
|
3417
|
+
label: w.fields.requiresShipping,
|
|
3418
|
+
description: w.hints.weight,
|
|
3419
|
+
value: O,
|
|
3420
|
+
onValueChange: (e) => M("requiresShipping", e),
|
|
3421
|
+
disabled: E
|
|
3355
3422
|
}),
|
|
3356
|
-
!!
|
|
3357
|
-
label:
|
|
3423
|
+
!!j("weight") && /* @__PURE__ */ q(R, {
|
|
3424
|
+
label: w.fields.weight,
|
|
3358
3425
|
error: a?.weight ?? a?.weightUnit,
|
|
3359
|
-
hint:
|
|
3360
|
-
children: /* @__PURE__ */
|
|
3426
|
+
hint: w.hints.weight,
|
|
3427
|
+
children: /* @__PURE__ */ q(me, {
|
|
3361
3428
|
value: e.weight ?? "",
|
|
3362
3429
|
unit: e.weightUnit ?? "kg",
|
|
3363
|
-
onChange: (e) =>
|
|
3364
|
-
onUnitChange: (e) =>
|
|
3365
|
-
disabled:
|
|
3430
|
+
onChange: (e) => M("weight", e.target.value),
|
|
3431
|
+
onUnitChange: (e) => M("weightUnit", e),
|
|
3432
|
+
disabled: k,
|
|
3366
3433
|
invalid: !!a?.weight || !!a?.weightUnit,
|
|
3367
3434
|
decimalPlaces: 2,
|
|
3368
3435
|
min: 0
|
|
@@ -3370,91 +3437,91 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3370
3437
|
})
|
|
3371
3438
|
]
|
|
3372
3439
|
}),
|
|
3373
|
-
!!
|
|
3374
|
-
render: /* @__PURE__ */
|
|
3440
|
+
!!A("customs") && /* @__PURE__ */ J(f, {
|
|
3441
|
+
render: /* @__PURE__ */ q("section", {}),
|
|
3375
3442
|
gap: "md",
|
|
3376
3443
|
className: "inventory-section-card--customs",
|
|
3377
|
-
children: [/* @__PURE__ */
|
|
3378
|
-
label:
|
|
3444
|
+
children: [/* @__PURE__ */ q(ar, { children: w.sections.customs }), /* @__PURE__ */ J(d, { children: [!!j("countryOfOrigin") && /* @__PURE__ */ q(R, {
|
|
3445
|
+
label: w.fields.countryOfOrigin,
|
|
3379
3446
|
error: a?.countryOfOrigin,
|
|
3380
|
-
hint:
|
|
3381
|
-
children: p.length > 0 ? /* @__PURE__ */
|
|
3447
|
+
hint: w.hints.countryOfOrigin,
|
|
3448
|
+
children: p.length > 0 ? /* @__PURE__ */ q(ce, {
|
|
3382
3449
|
value: e.countryOfOrigin ?? null,
|
|
3383
|
-
onValueChange: (e) =>
|
|
3450
|
+
onValueChange: (e) => M("countryOfOrigin", e),
|
|
3384
3451
|
options: p,
|
|
3385
|
-
placeholder:
|
|
3386
|
-
disabled:
|
|
3452
|
+
placeholder: w.placeholders.countryOfOrigin,
|
|
3453
|
+
disabled: k,
|
|
3387
3454
|
invalid: !!a?.countryOfOrigin,
|
|
3388
3455
|
allowClear: !0
|
|
3389
|
-
}) : /* @__PURE__ */
|
|
3456
|
+
}) : /* @__PURE__ */ q(L, {
|
|
3390
3457
|
value: e.countryOfOrigin ?? "",
|
|
3391
|
-
onChange: (e) =>
|
|
3392
|
-
placeholder:
|
|
3393
|
-
disabled:
|
|
3458
|
+
onChange: (e) => M("countryOfOrigin", e.target.value),
|
|
3459
|
+
placeholder: w.placeholders.countryOfOrigin,
|
|
3460
|
+
disabled: k,
|
|
3394
3461
|
invalid: !!a?.countryOfOrigin
|
|
3395
3462
|
})
|
|
3396
|
-
}), !!
|
|
3397
|
-
label:
|
|
3463
|
+
}), !!j("hsCode") && /* @__PURE__ */ q(R, {
|
|
3464
|
+
label: w.fields.hsCode,
|
|
3398
3465
|
error: a?.hsCode,
|
|
3399
|
-
hint:
|
|
3400
|
-
children: /* @__PURE__ */
|
|
3466
|
+
hint: w.hints.hsCode,
|
|
3467
|
+
children: /* @__PURE__ */ q(L, {
|
|
3401
3468
|
value: e.hsCode ?? "",
|
|
3402
|
-
onChange: (e) =>
|
|
3403
|
-
placeholder:
|
|
3404
|
-
disabled:
|
|
3469
|
+
onChange: (e) => M("hsCode", e.target.value),
|
|
3470
|
+
placeholder: w.placeholders.hsCode,
|
|
3471
|
+
disabled: k,
|
|
3405
3472
|
invalid: !!a?.hsCode
|
|
3406
3473
|
})
|
|
3407
3474
|
})] })]
|
|
3408
3475
|
}),
|
|
3409
|
-
!!
|
|
3410
|
-
render: /* @__PURE__ */
|
|
3476
|
+
!!A("tags") && !!j("tags") && /* @__PURE__ */ J(f, {
|
|
3477
|
+
render: /* @__PURE__ */ q("section", {}),
|
|
3411
3478
|
gap: "md",
|
|
3412
3479
|
className: "inventory-section-card--tags",
|
|
3413
|
-
children: [/* @__PURE__ */
|
|
3414
|
-
label:
|
|
3480
|
+
children: [/* @__PURE__ */ q(ar, { children: w.sections.tags }), /* @__PURE__ */ q(R, {
|
|
3481
|
+
label: w.fields.tags,
|
|
3415
3482
|
error: a?.tags,
|
|
3416
|
-
hint:
|
|
3417
|
-
children: /* @__PURE__ */
|
|
3483
|
+
hint: w.hints.tags,
|
|
3484
|
+
children: /* @__PURE__ */ q(fe, {
|
|
3418
3485
|
value: e.tags ?? [],
|
|
3419
|
-
onValueChange: (e) =>
|
|
3486
|
+
onValueChange: (e) => M("tags", e),
|
|
3420
3487
|
recommendations: m,
|
|
3421
3488
|
maxTags: h,
|
|
3422
3489
|
showMaxTags: h !== void 0,
|
|
3423
|
-
disabled:
|
|
3490
|
+
disabled: E,
|
|
3424
3491
|
invalid: !!a?.tags,
|
|
3425
|
-
strings:
|
|
3492
|
+
strings: w.tagInput
|
|
3426
3493
|
})
|
|
3427
3494
|
})]
|
|
3428
3495
|
})
|
|
3429
3496
|
]
|
|
3430
3497
|
});
|
|
3431
3498
|
}
|
|
3432
|
-
|
|
3499
|
+
sr.displayName = "InventorySectionCard";
|
|
3433
3500
|
//#endregion
|
|
3434
3501
|
//#region src/components/blocks/commerce/shared/order-status.ts
|
|
3435
|
-
var
|
|
3502
|
+
var cr = {
|
|
3436
3503
|
unfulfilled: "warning",
|
|
3437
3504
|
partiallyFulfilled: "warning",
|
|
3438
3505
|
fulfilled: "success",
|
|
3439
3506
|
scheduled: "info",
|
|
3440
3507
|
onHold: "neutral",
|
|
3441
3508
|
cancelled: "destructive"
|
|
3442
|
-
},
|
|
3509
|
+
}, lr = {
|
|
3443
3510
|
pending: "warning",
|
|
3444
3511
|
authorized: "info",
|
|
3445
3512
|
paid: "success",
|
|
3446
3513
|
partiallyRefunded: "neutral",
|
|
3447
3514
|
refunded: "neutral",
|
|
3448
3515
|
voided: "neutral"
|
|
3449
|
-
},
|
|
3516
|
+
}, ur = {
|
|
3450
3517
|
success: "success",
|
|
3451
3518
|
pending: "warning",
|
|
3452
3519
|
failure: "destructive"
|
|
3453
|
-
},
|
|
3520
|
+
}, dr = /* @__PURE__ */ new Set([
|
|
3454
3521
|
"refund",
|
|
3455
3522
|
"void",
|
|
3456
3523
|
"chargeback"
|
|
3457
|
-
]),
|
|
3524
|
+
]), fr = {
|
|
3458
3525
|
fulfillment: {
|
|
3459
3526
|
unfulfilled: "Unfulfilled",
|
|
3460
3527
|
partiallyFulfilled: "Partially fulfilled",
|
|
@@ -3471,59 +3538,59 @@ var Xn = {
|
|
|
3471
3538
|
refunded: "Refunded",
|
|
3472
3539
|
voided: "Voided"
|
|
3473
3540
|
}
|
|
3474
|
-
},
|
|
3475
|
-
...
|
|
3541
|
+
}, pr = {
|
|
3542
|
+
...fr,
|
|
3476
3543
|
formatOrderNumber: (e) => `#${e}`,
|
|
3477
3544
|
formatOrigin: (e, t) => `${e} from ${t}`,
|
|
3478
3545
|
moreActions: "More actions"
|
|
3479
3546
|
};
|
|
3480
3547
|
//#endregion
|
|
3481
3548
|
//#region src/components/blocks/commerce/order-header/order-header.tsx
|
|
3482
|
-
function
|
|
3483
|
-
let g = n(
|
|
3484
|
-
return /* @__PURE__ */
|
|
3549
|
+
function mr({ orderNumber: e, fulfillmentStatus: t, paymentStatus: i, placedAt: a, source: s, actions: l, renderLink: u, headingTag: d = "h1", className: p, strings: m, ...h }) {
|
|
3550
|
+
let g = n(pr, m), _ = a && s ? g.formatOrigin(a, s) : a || s || void 0;
|
|
3551
|
+
return /* @__PURE__ */ J(f, {
|
|
3485
3552
|
...h,
|
|
3486
3553
|
gap: "xs",
|
|
3487
3554
|
"data-slot": "order-header",
|
|
3488
3555
|
className: r("order-header--component min-w-0", p),
|
|
3489
|
-
children: [/* @__PURE__ */
|
|
3556
|
+
children: [/* @__PURE__ */ J(f, {
|
|
3490
3557
|
direction: "horizontal",
|
|
3491
3558
|
gap: "md",
|
|
3492
3559
|
align: "center",
|
|
3493
3560
|
wrap: !1,
|
|
3494
3561
|
className: "order-header--title-row min-w-0",
|
|
3495
|
-
children: [/* @__PURE__ */
|
|
3562
|
+
children: [/* @__PURE__ */ J(f, {
|
|
3496
3563
|
direction: "horizontal",
|
|
3497
3564
|
gap: "md",
|
|
3498
3565
|
align: "center",
|
|
3499
3566
|
wrap: !0,
|
|
3500
3567
|
className: "order-header--title-line min-w-0 flex-1",
|
|
3501
3568
|
children: [
|
|
3502
|
-
/* @__PURE__ */
|
|
3569
|
+
/* @__PURE__ */ q(c, {
|
|
3503
3570
|
tag: d,
|
|
3504
3571
|
size: "lg",
|
|
3505
3572
|
className: "order-header--number text-inherit",
|
|
3506
3573
|
children: g.formatOrderNumber(e)
|
|
3507
3574
|
}),
|
|
3508
|
-
!!i && /* @__PURE__ */
|
|
3509
|
-
tone:
|
|
3575
|
+
!!i && /* @__PURE__ */ q(I, {
|
|
3576
|
+
tone: lr[i],
|
|
3510
3577
|
"data-axis": "payment",
|
|
3511
3578
|
className: "order-header--payment",
|
|
3512
3579
|
children: g.payment[i]
|
|
3513
3580
|
}),
|
|
3514
|
-
!!t && /* @__PURE__ */
|
|
3515
|
-
tone:
|
|
3581
|
+
!!t && /* @__PURE__ */ q(I, {
|
|
3582
|
+
tone: cr[t],
|
|
3516
3583
|
"data-axis": "fulfillment",
|
|
3517
3584
|
className: "order-header--fulfillment",
|
|
3518
3585
|
children: g.fulfillment[t]
|
|
3519
3586
|
})
|
|
3520
3587
|
]
|
|
3521
|
-
}), !!l?.length && /* @__PURE__ */
|
|
3588
|
+
}), !!l?.length && /* @__PURE__ */ q(C, {
|
|
3522
3589
|
actions: l,
|
|
3523
3590
|
srText: g.moreActions,
|
|
3524
3591
|
renderLink: u
|
|
3525
3592
|
})]
|
|
3526
|
-
}), !!_ && /* @__PURE__ */
|
|
3593
|
+
}), !!_ && /* @__PURE__ */ q(o, {
|
|
3527
3594
|
size: "xs",
|
|
3528
3595
|
type: "secondary",
|
|
3529
3596
|
className: "order-header--origin",
|
|
@@ -3531,58 +3598,58 @@ function nr({ orderNumber: e, fulfillmentStatus: t, paymentStatus: i, placedAt:
|
|
|
3531
3598
|
})]
|
|
3532
3599
|
});
|
|
3533
3600
|
}
|
|
3534
|
-
|
|
3601
|
+
mr.displayName = "OrderHeader";
|
|
3535
3602
|
//#endregion
|
|
3536
3603
|
//#region src/components/blocks/commerce/order-line-item/types.ts
|
|
3537
|
-
var
|
|
3604
|
+
var hr = { formatUnitPrice: (e, t) => `${e} × ${t}` };
|
|
3538
3605
|
//#endregion
|
|
3539
3606
|
//#region src/components/blocks/commerce/order-line-item/order-line-item.tsx
|
|
3540
|
-
function
|
|
3541
|
-
let v = n(
|
|
3542
|
-
return /* @__PURE__ */
|
|
3607
|
+
function gr({ id: e, title: t, variantTitle: i, sku: a, imageSrc: s, imageAlt: c, unitPrice: l, quantity: u, total: d, properties: p, children: m, className: h, strings: g, ..._ }) {
|
|
3608
|
+
let v = n(hr, g), y = !!i || !!a;
|
|
3609
|
+
return /* @__PURE__ */ q("div", {
|
|
3543
3610
|
..._,
|
|
3544
3611
|
"data-slot": "order-line-item",
|
|
3545
3612
|
"data-line-id": e,
|
|
3546
3613
|
className: r("order-line-item--component @container/order-line-item min-w-0", h),
|
|
3547
|
-
children: /* @__PURE__ */
|
|
3614
|
+
children: /* @__PURE__ */ J("div", {
|
|
3548
3615
|
className: "flex min-w-0 items-start gap-space-lg",
|
|
3549
|
-
children: [/* @__PURE__ */
|
|
3616
|
+
children: [/* @__PURE__ */ q(B, {
|
|
3550
3617
|
variant: "image",
|
|
3551
3618
|
className: "order-line-item--media",
|
|
3552
|
-
children: /* @__PURE__ */
|
|
3619
|
+
children: /* @__PURE__ */ q(Wt, {
|
|
3553
3620
|
src: s,
|
|
3554
3621
|
alt: c,
|
|
3555
3622
|
title: t
|
|
3556
3623
|
})
|
|
3557
|
-
}), /* @__PURE__ */
|
|
3558
|
-
className: "order-line-item--layout grid min-w-0 flex-1 gap-space-sm @md/order-line-item:grid-cols-[minmax(0,1fr)_auto_minmax(5rem,auto)] @md/order-line-item:items-
|
|
3559
|
-
children: [/* @__PURE__ */
|
|
3624
|
+
}), /* @__PURE__ */ J("div", {
|
|
3625
|
+
className: "order-line-item--layout grid min-w-0 flex-1 gap-space-sm @md/order-line-item:grid-cols-[minmax(0,1fr)_auto_minmax(5rem,auto)] @md/order-line-item:items-baseline @md/order-line-item:gap-x-space-xl",
|
|
3626
|
+
children: [/* @__PURE__ */ J(f, {
|
|
3560
3627
|
gap: "xs",
|
|
3561
3628
|
className: "order-line-item--body min-w-0",
|
|
3562
3629
|
children: [
|
|
3563
|
-
/* @__PURE__ */
|
|
3630
|
+
/* @__PURE__ */ q(o, {
|
|
3564
3631
|
type: "inherit",
|
|
3565
3632
|
weight: "medium",
|
|
3566
3633
|
className: "order-line-item--title wrap-anywhere",
|
|
3567
3634
|
children: t
|
|
3568
3635
|
}),
|
|
3569
|
-
!!y && /* @__PURE__ */
|
|
3636
|
+
!!y && /* @__PURE__ */ J(f, {
|
|
3570
3637
|
direction: "horizontal",
|
|
3571
3638
|
gap: "sm",
|
|
3572
3639
|
align: "center",
|
|
3573
3640
|
wrap: !0,
|
|
3574
3641
|
className: "order-line-item--meta",
|
|
3575
|
-
children: [!!i && /* @__PURE__ */
|
|
3642
|
+
children: [!!i && /* @__PURE__ */ q(I, {
|
|
3576
3643
|
tone: "neutral",
|
|
3577
3644
|
size: "sm",
|
|
3578
3645
|
children: i
|
|
3579
|
-
}), !!a && /* @__PURE__ */
|
|
3646
|
+
}), !!a && /* @__PURE__ */ q(A, {
|
|
3580
3647
|
size: "xs",
|
|
3581
3648
|
type: "secondary",
|
|
3582
3649
|
children: a
|
|
3583
3650
|
})]
|
|
3584
3651
|
}),
|
|
3585
|
-
!!p?.length && /* @__PURE__ */
|
|
3652
|
+
!!p?.length && /* @__PURE__ */ q(G, {
|
|
3586
3653
|
layout: "rows",
|
|
3587
3654
|
density: "compact",
|
|
3588
3655
|
className: "order-line-item--properties",
|
|
@@ -3594,13 +3661,13 @@ function ir({ id: e, title: t, variantTitle: i, sku: a, imageSrc: s, imageAlt: c
|
|
|
3594
3661
|
}),
|
|
3595
3662
|
m
|
|
3596
3663
|
]
|
|
3597
|
-
}), /* @__PURE__ */
|
|
3664
|
+
}), /* @__PURE__ */ J("div", {
|
|
3598
3665
|
className: "order-line-item--figures flex min-w-0 items-baseline justify-between gap-space-md @md/order-line-item:contents",
|
|
3599
|
-
children: [/* @__PURE__ */
|
|
3666
|
+
children: [/* @__PURE__ */ J("span", {
|
|
3600
3667
|
className: "order-line-item--price inline-flex items-baseline gap-space-xs @md/order-line-item:justify-end",
|
|
3601
3668
|
children: [
|
|
3602
|
-
/* @__PURE__ */
|
|
3603
|
-
/* @__PURE__ */
|
|
3669
|
+
/* @__PURE__ */ q(de, { children: v.formatUnitPrice(l, u) }),
|
|
3670
|
+
/* @__PURE__ */ q(o, {
|
|
3604
3671
|
tag: "span",
|
|
3605
3672
|
size: "xs",
|
|
3606
3673
|
type: "secondary",
|
|
@@ -3608,14 +3675,14 @@ function ir({ id: e, title: t, variantTitle: i, sku: a, imageSrc: s, imageAlt: c
|
|
|
3608
3675
|
className: "tabular-nums",
|
|
3609
3676
|
children: l
|
|
3610
3677
|
}),
|
|
3611
|
-
/* @__PURE__ */
|
|
3678
|
+
/* @__PURE__ */ q(o, {
|
|
3612
3679
|
tag: "span",
|
|
3613
3680
|
size: "xs",
|
|
3614
3681
|
type: "secondary",
|
|
3615
3682
|
"aria-hidden": "true",
|
|
3616
3683
|
children: "×"
|
|
3617
3684
|
}),
|
|
3618
|
-
/* @__PURE__ */
|
|
3685
|
+
/* @__PURE__ */ q(o, {
|
|
3619
3686
|
type: "inherit",
|
|
3620
3687
|
tag: "span",
|
|
3621
3688
|
size: "xs",
|
|
@@ -3625,7 +3692,7 @@ function ir({ id: e, title: t, variantTitle: i, sku: a, imageSrc: s, imageAlt: c
|
|
|
3625
3692
|
children: u
|
|
3626
3693
|
})
|
|
3627
3694
|
]
|
|
3628
|
-
}), /* @__PURE__ */
|
|
3695
|
+
}), /* @__PURE__ */ q(o, {
|
|
3629
3696
|
type: "inherit",
|
|
3630
3697
|
tag: "span",
|
|
3631
3698
|
weight: "medium",
|
|
@@ -3637,100 +3704,100 @@ function ir({ id: e, title: t, variantTitle: i, sku: a, imageSrc: s, imageAlt: c
|
|
|
3637
3704
|
})
|
|
3638
3705
|
});
|
|
3639
3706
|
}
|
|
3640
|
-
|
|
3707
|
+
gr.displayName = "OrderLineItem";
|
|
3641
3708
|
//#endregion
|
|
3642
3709
|
//#region src/components/blocks/commerce/fulfillment-group/types.ts
|
|
3643
|
-
var
|
|
3644
|
-
...
|
|
3645
|
-
fulfillment:
|
|
3710
|
+
var _r = {
|
|
3711
|
+
...hr,
|
|
3712
|
+
fulfillment: fr.fulfillment,
|
|
3646
3713
|
formatHeading: (e, t) => `${e} (${t})`,
|
|
3647
3714
|
moreActions: "More actions"
|
|
3648
3715
|
};
|
|
3649
3716
|
//#endregion
|
|
3650
3717
|
//#region src/components/blocks/commerce/fulfillment-group/fulfillment-group.tsx
|
|
3651
|
-
function
|
|
3652
|
-
let
|
|
3653
|
-
return /* @__PURE__ */
|
|
3654
|
-
...
|
|
3655
|
-
surface:
|
|
3656
|
-
padding:
|
|
3718
|
+
function vr({ status: e, location: t, notice: i, noticeIcon: a, items: s, count: c, children: l, actions: u, renderLink: d, surface: p = "card", padding: h = p === "flat" ? "none" : "md", className: g, strings: v, ...y }) {
|
|
3719
|
+
let b = n(_r, v), S = De(() => ({ formatUnitPrice: b.formatUnitPrice }), [b.formatUnitPrice]), T = b.fulfillment[e], E = c ?? s?.length, D = E === void 0 ? T : b.formatHeading(T, E), [O, ...k] = (u ?? []).filter((e) => e.visible !== !1), A = t != null && t !== "", j = i != null && i !== "";
|
|
3720
|
+
return /* @__PURE__ */ q(_, {
|
|
3721
|
+
...y,
|
|
3722
|
+
surface: p,
|
|
3723
|
+
padding: h,
|
|
3657
3724
|
"data-status": e,
|
|
3658
|
-
title: /* @__PURE__ */
|
|
3725
|
+
title: /* @__PURE__ */ q("span", {
|
|
3659
3726
|
role: "heading",
|
|
3660
3727
|
"aria-level": 2,
|
|
3661
3728
|
className: "fulfillment-group--heading inline-flex max-w-full",
|
|
3662
|
-
children: /* @__PURE__ */
|
|
3663
|
-
tone:
|
|
3664
|
-
children:
|
|
3729
|
+
children: /* @__PURE__ */ q(I, {
|
|
3730
|
+
tone: cr[e],
|
|
3731
|
+
children: D
|
|
3665
3732
|
})
|
|
3666
3733
|
}),
|
|
3667
|
-
description:
|
|
3734
|
+
description: A || j ? /* @__PURE__ */ J(f, {
|
|
3668
3735
|
gap: "2xs",
|
|
3669
3736
|
className: "fulfillment-group--context",
|
|
3670
|
-
children: [!!
|
|
3737
|
+
children: [!!A && /* @__PURE__ */ q(o, {
|
|
3671
3738
|
tag: "div",
|
|
3672
3739
|
type: "secondary",
|
|
3673
3740
|
className: "fulfillment-group--location",
|
|
3674
3741
|
children: t
|
|
3675
|
-
}), !!
|
|
3742
|
+
}), !!j && /* @__PURE__ */ J(f, {
|
|
3676
3743
|
direction: "horizontal",
|
|
3677
3744
|
gap: "sm",
|
|
3678
3745
|
align: "center",
|
|
3679
3746
|
wrap: !1,
|
|
3680
3747
|
className: "fulfillment-group--notice text-muted-foreground",
|
|
3681
|
-
children: [!!a && /* @__PURE__ */
|
|
3748
|
+
children: [!!a && /* @__PURE__ */ q(a, {
|
|
3682
3749
|
"aria-hidden": "true",
|
|
3683
3750
|
className: "size-icon-sm shrink-0"
|
|
3684
|
-
}), /* @__PURE__ */
|
|
3751
|
+
}), /* @__PURE__ */ q(o, {
|
|
3685
3752
|
tag: "span",
|
|
3686
3753
|
type: "secondary",
|
|
3687
3754
|
children: i
|
|
3688
3755
|
})]
|
|
3689
3756
|
})]
|
|
3690
3757
|
}) : void 0,
|
|
3691
|
-
footerSlot:
|
|
3758
|
+
footerSlot: O ? /* @__PURE__ */ J(f, {
|
|
3692
3759
|
direction: "horizontal",
|
|
3693
|
-
gap:
|
|
3760
|
+
gap: x.commands,
|
|
3694
3761
|
justify: "end",
|
|
3695
3762
|
className: "fulfillment-group--actions",
|
|
3696
|
-
children: [/* @__PURE__ */
|
|
3697
|
-
actions: [
|
|
3698
|
-
renderLink:
|
|
3699
|
-
}),
|
|
3700
|
-
actions:
|
|
3763
|
+
children: [/* @__PURE__ */ q(w, {
|
|
3764
|
+
actions: [O],
|
|
3765
|
+
renderLink: d
|
|
3766
|
+
}), k.length > 0 && /* @__PURE__ */ q(C, {
|
|
3767
|
+
actions: k,
|
|
3701
3768
|
context: "commands",
|
|
3702
|
-
srText:
|
|
3769
|
+
srText: b.moreActions,
|
|
3703
3770
|
buttonProps: { size: "sm" },
|
|
3704
|
-
renderLink:
|
|
3771
|
+
renderLink: d
|
|
3705
3772
|
})]
|
|
3706
3773
|
}) : void 0,
|
|
3707
|
-
className: r("fulfillment-group--component w-full",
|
|
3708
|
-
children: m(
|
|
3774
|
+
className: r("fulfillment-group--component w-full", g),
|
|
3775
|
+
children: m(l) ? /* @__PURE__ */ q("div", {
|
|
3709
3776
|
className: "fulfillment-group--items min-w-0",
|
|
3710
|
-
children:
|
|
3711
|
-
}) : /* @__PURE__ */
|
|
3777
|
+
children: l
|
|
3778
|
+
}) : /* @__PURE__ */ q("ul", {
|
|
3712
3779
|
className: "fulfillment-group--items m-0 min-w-0 list-none p-0",
|
|
3713
|
-
children: (s ?? []).map((e) => /* @__PURE__ */
|
|
3780
|
+
children: (s ?? []).map((e) => /* @__PURE__ */ q("li", {
|
|
3714
3781
|
className: "fulfillment-group--line border-t border-border/60 py-space-lg first:border-t-0 first:pt-0 last:pb-0",
|
|
3715
|
-
children: /* @__PURE__ */
|
|
3782
|
+
children: /* @__PURE__ */ q(gr, {
|
|
3716
3783
|
...e,
|
|
3717
|
-
strings:
|
|
3784
|
+
strings: S
|
|
3718
3785
|
})
|
|
3719
3786
|
}, e.id))
|
|
3720
3787
|
})
|
|
3721
3788
|
});
|
|
3722
3789
|
}
|
|
3723
|
-
|
|
3790
|
+
vr.displayName = "FulfillmentGroup";
|
|
3724
3791
|
//#endregion
|
|
3725
3792
|
//#region src/components/blocks/commerce/order-summary/types.ts
|
|
3726
|
-
var
|
|
3793
|
+
var yr = {
|
|
3727
3794
|
title: "Payment",
|
|
3728
|
-
payment:
|
|
3795
|
+
payment: fr.payment
|
|
3729
3796
|
};
|
|
3730
3797
|
//#endregion
|
|
3731
3798
|
//#region src/components/blocks/commerce/order-summary/order-summary.tsx
|
|
3732
|
-
function
|
|
3733
|
-
return /* @__PURE__ */
|
|
3799
|
+
function br({ line: e, total: t = !1, rollup: n = !1 }) {
|
|
3800
|
+
return /* @__PURE__ */ q(Y, {
|
|
3734
3801
|
label: e.label,
|
|
3735
3802
|
note: e.note,
|
|
3736
3803
|
amount: e.amount,
|
|
@@ -3739,45 +3806,45 @@ function cr({ line: e, total: t = !1, rollup: n = !1 }) {
|
|
|
3739
3806
|
rollup: n
|
|
3740
3807
|
});
|
|
3741
3808
|
}
|
|
3742
|
-
function
|
|
3743
|
-
let p = n(
|
|
3744
|
-
return /* @__PURE__ */
|
|
3809
|
+
function xr({ goods: e, total: t, payments: i, paymentStatus: a, alert: o, surface: s = "flat", padding: c = s === "flat" ? "none" : "md", headerDivider: l, className: u, strings: d, ...f }) {
|
|
3810
|
+
let p = n(yr, d), m = o != null && o !== !1 && o !== "";
|
|
3811
|
+
return /* @__PURE__ */ J(_, {
|
|
3745
3812
|
...f,
|
|
3746
3813
|
surface: s,
|
|
3747
3814
|
padding: c,
|
|
3748
3815
|
headerDivider: l,
|
|
3749
3816
|
title: p.title,
|
|
3750
|
-
titleSuffix: a ? /* @__PURE__ */
|
|
3751
|
-
tone:
|
|
3817
|
+
titleSuffix: a ? /* @__PURE__ */ q(I, {
|
|
3818
|
+
tone: lr[a],
|
|
3752
3819
|
className: "order-summary--status",
|
|
3753
3820
|
children: p.payment[a]
|
|
3754
3821
|
}) : void 0,
|
|
3755
3822
|
contentGap: "xl",
|
|
3756
|
-
contentBottom: m ? /* @__PURE__ */
|
|
3823
|
+
contentBottom: m ? /* @__PURE__ */ J(g, {
|
|
3757
3824
|
tone: "warning",
|
|
3758
3825
|
role: "note",
|
|
3759
3826
|
className: "order-summary--alert",
|
|
3760
|
-
children: [/* @__PURE__ */
|
|
3827
|
+
children: [/* @__PURE__ */ q(Ge, { "aria-hidden": "true" }), /* @__PURE__ */ q(h, { children: o })]
|
|
3761
3828
|
}) : void 0,
|
|
3762
3829
|
"data-slot": "order-summary",
|
|
3763
3830
|
className: r("order-summary--component w-full", u),
|
|
3764
|
-
children: [/* @__PURE__ */
|
|
3831
|
+
children: [/* @__PURE__ */ J(X, {
|
|
3765
3832
|
className: "order-summary--goods",
|
|
3766
|
-
children: [e.map((e, t) => /* @__PURE__ */
|
|
3833
|
+
children: [e.map((e, t) => /* @__PURE__ */ q(br, { line: e }, e.id ?? String(t))), /* @__PURE__ */ q(br, {
|
|
3767
3834
|
line: t,
|
|
3768
3835
|
total: !0,
|
|
3769
3836
|
rollup: e.length > 0
|
|
3770
3837
|
})]
|
|
3771
|
-
}), !!i?.length && /* @__PURE__ */
|
|
3838
|
+
}), !!i?.length && /* @__PURE__ */ q(X, {
|
|
3772
3839
|
className: "order-summary--payments",
|
|
3773
|
-
children: i.map((e, t) => /* @__PURE__ */
|
|
3840
|
+
children: i.map((e, t) => /* @__PURE__ */ q(br, { line: e }, e.id ?? String(t)))
|
|
3774
3841
|
})]
|
|
3775
3842
|
});
|
|
3776
3843
|
}
|
|
3777
|
-
|
|
3844
|
+
xr.displayName = "OrderSummary";
|
|
3778
3845
|
//#endregion
|
|
3779
3846
|
//#region src/components/blocks/commerce/order-transactions/types.ts
|
|
3780
|
-
var
|
|
3847
|
+
var Sr = {
|
|
3781
3848
|
title: "Transactions",
|
|
3782
3849
|
kind: {
|
|
3783
3850
|
authorization: "Authorization",
|
|
@@ -3797,9 +3864,9 @@ var ur = {
|
|
|
3797
3864
|
};
|
|
3798
3865
|
//#endregion
|
|
3799
3866
|
//#region src/components/blocks/commerce/order-transactions/order-transactions.tsx
|
|
3800
|
-
function
|
|
3801
|
-
let u = n(
|
|
3802
|
-
return /* @__PURE__ */
|
|
3867
|
+
function Cr({ transactions: e, surface: t = "flat", padding: i = t === "flat" ? "none" : "md", headerDivider: a, className: s, strings: c, ...l }) {
|
|
3868
|
+
let u = n(Sr, c);
|
|
3869
|
+
return /* @__PURE__ */ q(_, {
|
|
3803
3870
|
...l,
|
|
3804
3871
|
surface: t,
|
|
3805
3872
|
padding: i,
|
|
@@ -3807,53 +3874,53 @@ function dr({ transactions: e, surface: t = "flat", padding: i = t === "flat" ?
|
|
|
3807
3874
|
title: u.title,
|
|
3808
3875
|
"data-slot": "order-transactions",
|
|
3809
3876
|
className: r("order-transactions--component w-full", s),
|
|
3810
|
-
children: e.length === 0 ? /* @__PURE__ */
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
}) : /* @__PURE__ */
|
|
3877
|
+
children: e.length === 0 ? /* @__PURE__ */ q(o, {
|
|
3878
|
+
role: "status",
|
|
3879
|
+
type: "secondary",
|
|
3880
|
+
"data-slot": "empty",
|
|
3881
|
+
className: "order-transactions--empty",
|
|
3882
|
+
children: u.empty
|
|
3883
|
+
}) : /* @__PURE__ */ q("ol", {
|
|
3817
3884
|
className: "order-transactions--list m-0 list-none p-0",
|
|
3818
3885
|
children: e.map((e) => {
|
|
3819
|
-
let t =
|
|
3886
|
+
let t = dr.has(e.kind), n = e.status === "failure", r = Qe(e.amount), i = t && !n ? `−${r}` : r, a = [
|
|
3820
3887
|
e.processedAt,
|
|
3821
3888
|
e.method,
|
|
3822
3889
|
e.gateway
|
|
3823
3890
|
].filter((e) => !!e);
|
|
3824
|
-
return /* @__PURE__ */
|
|
3891
|
+
return /* @__PURE__ */ J("li", {
|
|
3825
3892
|
"data-status": e.status,
|
|
3826
3893
|
"data-kind": e.kind,
|
|
3827
3894
|
"data-outgoing": t ? "" : void 0,
|
|
3828
3895
|
className: "order-transactions--row flex min-w-0 items-start gap-space-lg border-t border-border/60 py-row-y-lg first:border-t-0 first:pt-0 last:pb-0",
|
|
3829
|
-
children: [/* @__PURE__ */
|
|
3896
|
+
children: [/* @__PURE__ */ J(f, {
|
|
3830
3897
|
gap: "2xs",
|
|
3831
3898
|
className: "order-transactions--body min-w-0 flex-1",
|
|
3832
3899
|
children: [
|
|
3833
|
-
/* @__PURE__ */
|
|
3900
|
+
/* @__PURE__ */ J(f, {
|
|
3834
3901
|
direction: "horizontal",
|
|
3835
3902
|
gap: "sm",
|
|
3836
3903
|
align: "center",
|
|
3837
3904
|
wrap: !0,
|
|
3838
3905
|
className: "min-w-0",
|
|
3839
|
-
children: [/* @__PURE__ */
|
|
3906
|
+
children: [/* @__PURE__ */ q(o, {
|
|
3840
3907
|
type: "inherit",
|
|
3841
3908
|
tag: "span",
|
|
3842
3909
|
weight: "medium",
|
|
3843
3910
|
children: u.kind[e.kind]
|
|
3844
|
-
}), e.status !== "success" && /* @__PURE__ */
|
|
3845
|
-
tone:
|
|
3911
|
+
}), e.status !== "success" && /* @__PURE__ */ q(I, {
|
|
3912
|
+
tone: ur[e.status],
|
|
3846
3913
|
size: "sm",
|
|
3847
3914
|
className: "order-transactions--status",
|
|
3848
3915
|
children: u.status[e.status]
|
|
3849
3916
|
})]
|
|
3850
3917
|
}),
|
|
3851
|
-
/* @__PURE__ */
|
|
3918
|
+
/* @__PURE__ */ q(f, {
|
|
3852
3919
|
direction: "horizontal",
|
|
3853
3920
|
gap: "md",
|
|
3854
3921
|
wrap: !0,
|
|
3855
3922
|
className: "order-transactions--meta min-w-0",
|
|
3856
|
-
children: a.map((e, t) => /* @__PURE__ */
|
|
3923
|
+
children: a.map((e, t) => /* @__PURE__ */ q(o, {
|
|
3857
3924
|
tag: "span",
|
|
3858
3925
|
size: "xs",
|
|
3859
3926
|
type: "secondary",
|
|
@@ -3861,18 +3928,18 @@ function dr({ transactions: e, surface: t = "flat", padding: i = t === "flat" ?
|
|
|
3861
3928
|
children: e
|
|
3862
3929
|
}, `${String(t)}-${e}`))
|
|
3863
3930
|
}),
|
|
3864
|
-
!!e.reference && /* @__PURE__ */
|
|
3931
|
+
!!e.reference && /* @__PURE__ */ J(o, {
|
|
3865
3932
|
tag: "span",
|
|
3866
3933
|
size: "xs",
|
|
3867
3934
|
type: "secondary",
|
|
3868
3935
|
className: "order-transactions--reference min-w-0 break-all",
|
|
3869
|
-
children: [/* @__PURE__ */
|
|
3936
|
+
children: [/* @__PURE__ */ q(de, { children: `${u.reference}: ` }), /* @__PURE__ */ q(A, {
|
|
3870
3937
|
type: "inherit",
|
|
3871
3938
|
children: e.reference
|
|
3872
3939
|
})]
|
|
3873
3940
|
})
|
|
3874
3941
|
]
|
|
3875
|
-
}), /* @__PURE__ */
|
|
3942
|
+
}), /* @__PURE__ */ q(o, {
|
|
3876
3943
|
tag: "span",
|
|
3877
3944
|
weight: "semibold",
|
|
3878
3945
|
type: n ? "secondary" : "main",
|
|
@@ -3884,10 +3951,10 @@ function dr({ transactions: e, surface: t = "flat", padding: i = t === "flat" ?
|
|
|
3884
3951
|
})
|
|
3885
3952
|
});
|
|
3886
3953
|
}
|
|
3887
|
-
|
|
3954
|
+
Cr.displayName = "OrderTransactions";
|
|
3888
3955
|
//#endregion
|
|
3889
3956
|
//#region src/components/blocks/commerce/order-customer/types.ts
|
|
3890
|
-
var
|
|
3957
|
+
var wr = {
|
|
3891
3958
|
title: "Customer",
|
|
3892
3959
|
shippingAddress: "Shipping address",
|
|
3893
3960
|
billingAddress: "Billing address",
|
|
@@ -3899,103 +3966,114 @@ var fr = {
|
|
|
3899
3966
|
};
|
|
3900
3967
|
//#endregion
|
|
3901
3968
|
//#region src/components/blocks/commerce/order-customer/order-customer.tsx
|
|
3902
|
-
function
|
|
3903
|
-
return /* @__PURE__ */
|
|
3969
|
+
function Tr({ label: e, editLabel: t, address: n, onEdit: a, replacement: c, emptyLabel: l, note: u, className: d }) {
|
|
3970
|
+
return /* @__PURE__ */ J(f, {
|
|
3904
3971
|
gap: "sm",
|
|
3905
|
-
className: r("order-customer--address min-w-0",
|
|
3906
|
-
children: [
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3972
|
+
className: r("order-customer--address min-w-0", d),
|
|
3973
|
+
children: [
|
|
3974
|
+
/* @__PURE__ */ J(f, {
|
|
3975
|
+
direction: "horizontal",
|
|
3976
|
+
gap: "sm",
|
|
3977
|
+
align: "center",
|
|
3978
|
+
justify: "between",
|
|
3979
|
+
wrap: !1,
|
|
3980
|
+
className: "min-h-action-sm",
|
|
3981
|
+
children: [/* @__PURE__ */ q(s, {
|
|
3982
|
+
tag: "div",
|
|
3983
|
+
children: e
|
|
3984
|
+
}), !!a && /* @__PURE__ */ q(i, {
|
|
3985
|
+
type: "button",
|
|
3986
|
+
tone: "secondary",
|
|
3987
|
+
buttonStyle: "ghost",
|
|
3988
|
+
size: "sm",
|
|
3989
|
+
iconOnly: !0,
|
|
3990
|
+
"aria-label": t,
|
|
3991
|
+
onClick: a,
|
|
3992
|
+
className: "order-customer--edit",
|
|
3993
|
+
children: /* @__PURE__ */ q(He, {
|
|
3994
|
+
"aria-hidden": "true",
|
|
3995
|
+
className: "size-icon-sm"
|
|
3996
|
+
})
|
|
3997
|
+
})]
|
|
3998
|
+
}),
|
|
3999
|
+
c ? /* @__PURE__ */ q(o, {
|
|
4000
|
+
type: "secondary",
|
|
4001
|
+
children: c
|
|
4002
|
+
}) : n ? /* @__PURE__ */ q(Lt, { address: n }) : /* @__PURE__ */ q(o, {
|
|
4003
|
+
type: "secondary",
|
|
4004
|
+
children: l
|
|
4005
|
+
}),
|
|
4006
|
+
!!u && /* @__PURE__ */ q(o, {
|
|
3914
4007
|
tag: "div",
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
iconOnly: !0,
|
|
3922
|
-
"aria-label": t,
|
|
3923
|
-
onClick: a,
|
|
3924
|
-
className: "order-customer--edit",
|
|
3925
|
-
children: /* @__PURE__ */ W(He, {
|
|
3926
|
-
"aria-hidden": "true",
|
|
3927
|
-
className: "size-icon-sm"
|
|
3928
|
-
})
|
|
3929
|
-
})]
|
|
3930
|
-
}), c ? /* @__PURE__ */ W(o, {
|
|
3931
|
-
type: "secondary",
|
|
3932
|
-
children: c
|
|
3933
|
-
}) : n ? /* @__PURE__ */ W(It, { address: n }) : /* @__PURE__ */ W(o, {
|
|
3934
|
-
type: "secondary",
|
|
3935
|
-
children: l
|
|
3936
|
-
})]
|
|
4008
|
+
size: "xs",
|
|
4009
|
+
type: "secondary",
|
|
4010
|
+
className: "order-customer--address-note",
|
|
4011
|
+
children: u
|
|
4012
|
+
})
|
|
4013
|
+
]
|
|
3937
4014
|
});
|
|
3938
4015
|
}
|
|
3939
|
-
function
|
|
3940
|
-
let
|
|
3941
|
-
return /* @__PURE__ */
|
|
3942
|
-
...
|
|
3943
|
-
surface:
|
|
3944
|
-
padding:
|
|
3945
|
-
headerDivider:
|
|
3946
|
-
title:
|
|
4016
|
+
function Er({ name: e, email: t, phone: i, orderCount: a, shippingAddress: o, shippingMethod: s, showShippingAddress: c = !0, billingAddress: l, billingSameAsShipping: d = !1, onOpenCustomer: p, onEditShipping: m, onEditBilling: h, surface: g = "flat", padding: v = g === "flat" ? "none" : "md", headerDivider: y, className: b, strings: x, ...S }) {
|
|
4017
|
+
let C = n(wr, x), w = !!t || !!i;
|
|
4018
|
+
return /* @__PURE__ */ J(_, {
|
|
4019
|
+
...S,
|
|
4020
|
+
surface: g,
|
|
4021
|
+
padding: v,
|
|
4022
|
+
headerDivider: y,
|
|
4023
|
+
title: C.title,
|
|
3947
4024
|
contentGap: "2xl",
|
|
3948
4025
|
"data-slot": "order-customer",
|
|
3949
|
-
className: r("order-customer--component w-full",
|
|
4026
|
+
className: r("order-customer--component w-full", b),
|
|
3950
4027
|
children: [
|
|
3951
|
-
/* @__PURE__ */
|
|
3952
|
-
className: r("order-customer--identity flex-nowrap", !!
|
|
3953
|
-
padding:
|
|
3954
|
-
render:
|
|
4028
|
+
/* @__PURE__ */ q(U, {
|
|
4029
|
+
className: r("order-customer--identity flex-nowrap", !!p && r("-mx-row-x w-auto text-start", E.rowHover)),
|
|
4030
|
+
padding: p ? "default" : "none",
|
|
4031
|
+
render: p ? /* @__PURE__ */ q("button", {
|
|
3955
4032
|
type: "button",
|
|
3956
|
-
onClick:
|
|
4033
|
+
onClick: p
|
|
3957
4034
|
}) : void 0,
|
|
3958
|
-
media: /* @__PURE__ */
|
|
4035
|
+
media: /* @__PURE__ */ q(re, { children: /* @__PURE__ */ q(ne, { children: N(e) }) }),
|
|
3959
4036
|
title: e,
|
|
3960
|
-
description: a === void 0 ? void 0 :
|
|
4037
|
+
description: a === void 0 ? void 0 : C.formatOrderCount(a)
|
|
3961
4038
|
}),
|
|
3962
|
-
!!
|
|
4039
|
+
!!w && /* @__PURE__ */ J(f, {
|
|
3963
4040
|
gap: "xs",
|
|
3964
4041
|
className: "order-customer--contact min-w-0",
|
|
3965
|
-
children: [!!t && /* @__PURE__ */
|
|
4042
|
+
children: [!!t && /* @__PURE__ */ q(j, {
|
|
3966
4043
|
value: t,
|
|
3967
4044
|
className: "self-start"
|
|
3968
|
-
}), !!i && /* @__PURE__ */
|
|
4045
|
+
}), !!i && /* @__PURE__ */ q(O, {
|
|
3969
4046
|
value: i,
|
|
3970
4047
|
className: "self-start"
|
|
3971
4048
|
})]
|
|
3972
4049
|
}),
|
|
3973
|
-
/* @__PURE__ */
|
|
4050
|
+
/* @__PURE__ */ J(u, {
|
|
3974
4051
|
minColumnWidth: "sm",
|
|
3975
4052
|
gap: "xl",
|
|
3976
4053
|
className: "order-customer--addresses",
|
|
3977
|
-
children: [/* @__PURE__ */
|
|
3978
|
-
label:
|
|
3979
|
-
editLabel:
|
|
4054
|
+
children: [c && /* @__PURE__ */ q(Tr, {
|
|
4055
|
+
label: C.shippingAddress,
|
|
4056
|
+
editLabel: C.editShipping,
|
|
3980
4057
|
address: o,
|
|
3981
|
-
onEdit:
|
|
3982
|
-
emptyLabel:
|
|
4058
|
+
onEdit: m,
|
|
4059
|
+
emptyLabel: C.noAddress,
|
|
4060
|
+
note: s,
|
|
3983
4061
|
className: "order-customer--shipping"
|
|
3984
|
-
}), /* @__PURE__ */
|
|
3985
|
-
label:
|
|
3986
|
-
editLabel:
|
|
3987
|
-
address:
|
|
3988
|
-
onEdit:
|
|
3989
|
-
replacement:
|
|
3990
|
-
emptyLabel:
|
|
4062
|
+
}), /* @__PURE__ */ q(Tr, {
|
|
4063
|
+
label: C.billingAddress,
|
|
4064
|
+
editLabel: C.editBilling,
|
|
4065
|
+
address: l,
|
|
4066
|
+
onEdit: h,
|
|
4067
|
+
replacement: d ? C.sameAsShipping : void 0,
|
|
4068
|
+
emptyLabel: C.noAddress,
|
|
3991
4069
|
className: "order-customer--billing"
|
|
3992
4070
|
})]
|
|
3993
4071
|
})
|
|
3994
4072
|
]
|
|
3995
4073
|
});
|
|
3996
4074
|
}
|
|
3997
|
-
|
|
4075
|
+
Er.displayName = "OrderCustomer";
|
|
3998
4076
|
//#endregion
|
|
3999
|
-
export {
|
|
4077
|
+
export { zt as AddressCard, Y as AmountRow, Ye as BookingCalendarEventCard, Yt as CartSummary, Jt as CartSummaryCard, Qt as CouponInputCard, cn as DEFAULT_SEO_LISTING_LIMITS, it as DiscountStack, rt as DiscountStackPreview, vr as FulfillmentGroup, xt as GiftcardCard, Dt as InventoryLevel, sr as InventorySectionCard, In as InvoiceHeader, Zn as InvoiceLineItems, Nn as InvoiceMini, Ze as LoyaltyPoints, Er as OrderCustomer, mr as OrderHeader, gr as OrderLineItem, tn as OrderStatusCard, xr as OrderSummary, $n as OrderTimeline, Cr as OrderTransactions, on as PaymentMethod, sn as PaymentMethodCard, er as PaymentTimeline, xe as Receipt, Se as ReceiptItems, It as RefundStatus, Ft as RefundStatusCard, An as SeoListingCard, ct as ShipmentTracking, jt as SubscriptionSummaryCard, X as SummaryPanel, kt as TaxBreakdownCard, qe as UpcomingBookingRow, Tt as VendorProfileCard, Ht as VoucherEntry, yn as calculateSeoListingScore, Rt as defaultAddressCardStrings, Gt as defaultCartSummaryStrings, Xt as defaultCouponInputStrings, tt as defaultDiscountStackStrings, _r as defaultFulfillmentGroupStrings, Et as defaultInventoryLevelStrings, tr as defaultInventorySectionStrings, Pn as defaultInvoiceHeaderStrings, Ln as defaultInvoiceLineItemsStrings, jn as defaultInvoiceMiniStrings, Xe as defaultLoyaltyPointsStrings, wr as defaultOrderCustomerStrings, pr as defaultOrderHeaderStrings, hr as defaultOrderLineItemStrings, $t as defaultOrderStatusStrings, yr as defaultOrderSummaryStrings, Sr as defaultOrderTransactionsStrings, nn as defaultPaymentMethodStrings, Mt as defaultRefundStatusStrings, bn as defaultSeoListingCardStrings, ot as defaultShipmentTrackingStrings, At as defaultSubscriptionSummaryStrings, Ot as defaultTaxBreakdownStrings, St as defaultVendorProfileStrings, Bt as defaultVoucherEntryStrings, cr as fulfillmentStatusTone, $ as getSeoPermalinkPath, mn as getSeoPermalinkSlug, Mn as invoiceStatusTone, lr as paymentStatusTone, ur as transactionStatusTone };
|
|
4000
4078
|
|
|
4001
4079
|
//# sourceMappingURL=commerce.js.map
|