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