themelia-react-ui 2.0.3 → 2.0.4
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 +50 -0
- package/README.md +65 -28
- package/dist/{accordion-Cjb6sx0G.js → accordion-96o0pN62.js} +5 -5
- package/dist/{accordion-Cjb6sx0G.js.map → accordion-96o0pN62.js.map} +1 -1
- package/dist/action-menu-CHgs8vmj.js +281 -0
- package/dist/action-menu-CHgs8vmj.js.map +1 -0
- package/dist/{affordance-geometry.generated-tF36bREk.js → affordance-geometry.generated-B8yGOr8-.js} +7 -1
- package/dist/affordance-geometry.generated-B8yGOr8-.js.map +1 -0
- package/dist/{ai-artifact-DvTwDVyL.js → ai-artifact-BZUGwBq6.js} +277 -276
- package/dist/ai-artifact-BZUGwBq6.js.map +1 -0
- package/dist/{app-shell-C4FhvCqF.js → app-shell-D63ATkIK.js} +84 -83
- package/dist/app-shell-D63ATkIK.js.map +1 -0
- package/dist/{attachment-BxDfL2mw.js → attachment-DkoqHPPl.js} +7 -7
- package/dist/{attachment-BxDfL2mw.js.map → attachment-DkoqHPPl.js.map} +1 -1
- package/dist/{auth-BGua8ouh.js → auth-D2FVZ1MH.js} +10 -10
- package/dist/{auth-BGua8ouh.js.map → auth-D2FVZ1MH.js.map} +1 -1
- package/dist/{avatar-DAPlDvhJ.js → avatar-DWO_HHhB.js} +5 -5
- package/dist/{avatar-DAPlDvhJ.js.map → avatar-DWO_HHhB.js.map} +1 -1
- package/dist/{badge-HpFqoqSY.js → badge-DErMA7ul.js} +4 -4
- package/dist/{badge-HpFqoqSY.js.map → badge-DErMA7ul.js.map} +1 -1
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/batch-action-bar.js +1 -1
- package/dist/base/buttons.js +1 -1
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +3 -3
- package/dist/base/cascader.js +13 -13
- 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 +1 -1
- package/dist/base/command.js +1 -1
- package/dist/base/copyable.js +1 -1
- package/dist/base/date-pickers.js +2 -2
- package/dist/base/display.js +6 -6
- package/dist/base/feedback.js +3 -3
- package/dist/base/forms-numeric.js +1 -1
- package/dist/base/forms.js +3 -3
- package/dist/base/inline-edit.js +10 -10
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/metadata-list.js +1 -1
- package/dist/base/navigation.js +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 +9 -9
- 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 +4 -4
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +3 -3
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/{batch-action-bar-DnUJ21NQ.js → batch-action-bar-CdfIkCsV.js} +4 -4
- package/dist/{batch-action-bar-DnUJ21NQ.js.map → batch-action-bar-CdfIkCsV.js.map} +1 -1
- package/dist/blocks/admin.js +20 -20
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +15 -15
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +17 -17
- 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 +570 -567
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +2 -2
- package/dist/blocks/onboarding.js +5 -5
- package/dist/blocks/planning.js +11 -11
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-C-oqs1sQ.js → breadcrumbs-B-WFKecD.js} +4 -4
- package/dist/{breadcrumbs-C-oqs1sQ.js.map → breadcrumbs-B-WFKecD.js.map} +1 -1
- package/dist/{button-DVzspB_G.js → button-DkmK-z8E.js} +2 -2
- package/dist/{button-DVzspB_G.js.map → button-DkmK-z8E.js.map} +1 -1
- package/dist/{buttons-DPZekJFu.js → buttons-BbfzgczK.js} +8 -8
- package/dist/{buttons-DPZekJFu.js.map → buttons-BbfzgczK.js.map} +1 -1
- package/dist/{cards-BaBZR-AU.js → cards-4JTWqvVe.js} +10 -10
- package/dist/cards-4JTWqvVe.js.map +1 -0
- package/dist/{chart-ZOYyK2xG.js → chart-C19flDQb.js} +4 -4
- package/dist/{chart-ZOYyK2xG.js.map → chart-C19flDQb.js.map} +1 -1
- package/dist/{checkbox-AWIhNhmo.js → checkbox-CzYUTPeJ.js} +9 -5
- package/dist/checkbox-CzYUTPeJ.js.map +1 -0
- package/dist/{choice-inputs-CNHvARCJ.js → choice-inputs-JLtij2y4.js} +182 -176
- package/dist/choice-inputs-JLtij2y4.js.map +1 -0
- package/dist/{code-block-DeneBJR_.js → code-block-CGNaUtAE.js} +7 -7
- package/dist/{code-block-DeneBJR_.js.map → code-block-CGNaUtAE.js.map} +1 -1
- package/dist/{collapsible-C-_l4hpy.js → collapsible-Do4G0zcC.js} +3 -3
- package/dist/{collapsible-C-_l4hpy.js.map → collapsible-Do4G0zcC.js.map} +1 -1
- package/dist/{collection-content-By56pLog.js → collection-content-C0e8SsTm.js} +3 -3
- package/dist/{collection-content-By56pLog.js.map → collection-content-C0e8SsTm.js.map} +1 -1
- package/dist/{combobox-Dxo2fAYQ.js → combobox-CBJDs6w_.js} +12 -12
- package/dist/{combobox-Dxo2fAYQ.js.map → combobox-CBJDs6w_.js.map} +1 -1
- package/dist/{combobox-DaHESuiL.js → combobox-hbhSS18O.js} +7 -7
- package/dist/{combobox-DaHESuiL.js.map → combobox-hbhSS18O.js.map} +1 -1
- package/dist/{command-C25VMRII.js → command-D8NrBj-b.js} +7 -7
- package/dist/{command-C25VMRII.js.map → command-D8NrBj-b.js.map} +1 -1
- package/dist/{comments-DD0DUPwJ.js → comments-Di4w0H_S.js} +383 -382
- package/dist/comments-Di4w0H_S.js.map +1 -0
- package/dist/components/base/action-menu/action-menu.d.ts +2 -0
- package/dist/components/base/cards/card.recipes.d.ts +12 -5
- package/dist/components/base/cards/smart-card.types.d.ts +12 -7
- package/dist/components/base/choice-inputs/checkbox.d.ts +7 -2
- package/dist/components/base/choice-inputs/switch-card.d.ts +7 -0
- package/dist/components/base/choice-inputs/toggle-field.d.ts +7 -0
- package/dist/components/base/date-pickers/datepicker.types.d.ts +7 -0
- package/dist/components/base/forms/controlled-form-field.d.ts +6 -6
- package/dist/components/base/forms/form-field.d.ts +5 -3
- package/dist/components/base/forms/index.d.ts +1 -0
- package/dist/components/base/forms/server-errors.d.ts +16 -0
- package/dist/components/base/forms/workflow.d.ts +5 -2
- package/dist/components/base/metadata-list/metadata-list.d.ts +3 -1
- package/dist/components/base/navigation/page-header/page-header.d.ts +4 -2
- package/dist/components/base/structure/composition.recipes.d.ts +17 -0
- package/dist/components/base/text-inputs/hooks/use-form-field-state.d.ts +7 -2
- package/dist/components/base/text-inputs/input.d.ts +4 -2
- package/dist/components/base/text-inputs/textarea.d.ts +4 -2
- package/dist/components/base/value-inputs/date-time-input.d.ts +2 -1
- package/dist/components/base/value-inputs/slider.d.ts +5 -1
- package/dist/components/base/value-inputs/tags-input.d.ts +5 -1
- package/dist/components/typography/text.styles.d.ts +26 -1
- package/dist/composition.recipes-COdiFhxB.js +19 -0
- package/dist/composition.recipes-COdiFhxB.js.map +1 -0
- package/dist/containers-CRmHf7GP.js +104 -0
- package/dist/containers-CRmHf7GP.js.map +1 -0
- package/dist/{copyable-ClBuk_UK.js → copyable-CnGCZdX4.js} +4 -4
- package/dist/{copyable-ClBuk_UK.js.map → copyable-CnGCZdX4.js.map} +1 -1
- package/dist/{data-display-DT_khPl_.js → data-display-D4oujtx0.js} +239 -238
- package/dist/data-display-D4oujtx0.js.map +1 -0
- package/dist/{date-DCrsDTZc.js → date-Q7jnXxpk.js} +5 -5
- package/dist/{date-DCrsDTZc.js.map → date-Q7jnXxpk.js.map} +1 -1
- package/dist/{date-picker-B2K3ucWn.js → date-picker-zOt1oNss.js} +102 -90
- package/dist/date-picker-zOt1oNss.js.map +1 -0
- package/dist/date-pickers-cj8IXbDC.js +179 -0
- package/dist/date-pickers-cj8IXbDC.js.map +1 -0
- package/dist/{display-hAc1HjpI.js → display-BB4BL_-K.js} +8 -8
- package/dist/{display-hAc1HjpI.js.map → display-BB4BL_-K.js.map} +1 -1
- package/dist/{dropdown-menu-Cl4X7L5S.js → dropdown-menu-CjY8Vt7W.js} +8 -8
- package/dist/{dropdown-menu-Cl4X7L5S.js.map → dropdown-menu-CjY8Vt7W.js.map} +1 -1
- package/dist/features/activities.js +11 -11
- package/dist/features/ai-chat.js +9 -9
- package/dist/features/appointment-calendar.js +222 -220
- package/dist/features/appointment-calendar.js.map +1 -1
- package/dist/features/async-preview.js +8 -8
- package/dist/features/combobox.js +1 -1
- package/dist/features/comments.js +1 -1
- package/dist/features/data-view.js +10 -10
- package/dist/features/email-composer.js +275 -274
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +199 -198
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +12 -12
- package/dist/features/kanban.js +4 -4
- package/dist/features/map.js +7 -7
- package/dist/features/media-library.js +623 -622
- 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 +973 -969
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +12 -12
- package/dist/features/resource-assignment.js +8 -8
- package/dist/features/resource.js +113 -112
- package/dist/features/resource.js.map +1 -1
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +254 -253
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +3 -3
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +19 -19
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-BYIhtitP.js → feedback-DZNL5Lg1.js} +9 -9
- package/dist/{feedback-BYIhtitP.js.map → feedback-DZNL5Lg1.js.map} +1 -1
- package/dist/{field-affordance-recipes-DZhnIL_Y.js → field-affordance-recipes-DjwGx8eM.js} +2 -2
- package/dist/{field-affordance-recipes-DZhnIL_Y.js.map → field-affordance-recipes-DjwGx8eM.js.map} +1 -1
- package/dist/{filters-DJVAveHA.js → filters-BcT-uoFy.js} +19 -19
- package/dist/{filters-DJVAveHA.js.map → filters-BcT-uoFy.js.map} +1 -1
- package/dist/{form-field-CwH9y77i.js → form-field-CsgRmdit.js} +14 -8
- package/dist/form-field-CsgRmdit.js.map +1 -0
- package/dist/{form-sizing-BdP_Mf5p.js → form-sizing-NXgjkmBG.js} +3 -3
- package/dist/{form-sizing-BdP_Mf5p.js.map → form-sizing-NXgjkmBG.js.map} +1 -1
- package/dist/{forms-B9G_xwzi.js → forms-BV5m5aQF.js} +83 -65
- package/dist/forms-BV5m5aQF.js.map +1 -0
- package/dist/{forms-numeric-B_jraJaQ.js → forms-numeric-Cd33AKbD.js} +288 -288
- package/dist/forms-numeric-Cd33AKbD.js.map +1 -0
- package/dist/{header-BSfIEWbI.js → header-BA697l4a.js} +14 -14
- package/dist/{header-BSfIEWbI.js.map → header-BA697l4a.js.map} +1 -1
- package/dist/hooks/useFormErrors.d.ts +1 -1
- package/dist/{hooks-ClH9thn4.js → hooks-BQ-L7Uu2.js} +2 -2
- package/dist/{hooks-ClH9thn4.js.map → hooks-BQ-L7Uu2.js.map} +1 -1
- package/dist/{icon-badge-DYKIwvOV.js → icon-badge-COWbCCWu.js} +3 -3
- package/dist/{icon-badge-DYKIwvOV.js.map → icon-badge-COWbCCWu.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/input-Cdw4k0fb.js +289 -0
- package/dist/input-Cdw4k0fb.js.map +1 -0
- package/dist/{input-CZw8iU99.js → input-DOPL5_QE.js} +3 -3
- package/dist/{input-CZw8iU99.js.map → input-DOPL5_QE.js.map} +1 -1
- package/dist/item-BvZ2DR_x.js +277 -0
- package/dist/item-BvZ2DR_x.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 +6 -0
- package/dist/lib/ui-provider/types.d.ts +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/{media-gallery-3zIVLMWH.js → media-gallery-CSl5W1Fy.js} +6 -6
- package/dist/{media-gallery-3zIVLMWH.js.map → media-gallery-CSl5W1Fy.js.map} +1 -1
- package/dist/{mentions-CGlEJ15c.js → mentions-RKOQaaIB.js} +8 -8
- package/dist/{mentions-CGlEJ15c.js.map → mentions-RKOQaaIB.js.map} +1 -1
- package/dist/{message-DZ_ruyUV.js → message-INU2xsxu.js} +4 -4
- package/dist/{message-DZ_ruyUV.js.map → message-INU2xsxu.js.map} +1 -1
- package/dist/metadata-list-qVV7AVxa.js +443 -0
- package/dist/metadata-list-qVV7AVxa.js.map +1 -0
- package/dist/{navigation-BzhHI3lo.js → navigation-BQNcg1jT.js} +8 -8
- package/dist/{navigation-BzhHI3lo.js.map → navigation-BQNcg1jT.js.map} +1 -1
- package/dist/{navigation-Bnotn4AQ.js → navigation-DLF3E1IC.js} +7 -7
- package/dist/{navigation-Bnotn4AQ.js.map → navigation-DLF3E1IC.js.map} +1 -1
- package/dist/{navigation-row-recipes-BFLCk_Aq.js → navigation-row-recipes-WZEs-hYo.js} +2 -2
- package/dist/{navigation-row-recipes-BFLCk_Aq.js.map → navigation-row-recipes-WZEs-hYo.js.map} +1 -1
- package/dist/{number-DbV1Dija.js → number-E_OiIfJz.js} +5 -5
- package/dist/{number-DbV1Dija.js.map → number-E_OiIfJz.js.map} +1 -1
- package/dist/{overflow-tab-bar-CWY7Nogn.js → overflow-tab-bar-CrbqMteP.js} +107 -105
- package/dist/overflow-tab-bar-CrbqMteP.js.map +1 -0
- package/dist/{overlays-tMkF-VAN.js → overlays-BlKynmde.js} +228 -227
- package/dist/overlays-BlKynmde.js.map +1 -0
- package/dist/page-CIwNUtGr.js +227 -0
- package/dist/page-CIwNUtGr.js.map +1 -0
- package/dist/page-header-commands-DFMlNYzN.js +128 -0
- package/dist/page-header-commands-DFMlNYzN.js.map +1 -0
- package/dist/{pagination-BL25hu2s.js → pagination-Ch8X_47u.js} +5 -5
- package/dist/{pagination-BL25hu2s.js.map → pagination-Ch8X_47u.js.map} +1 -1
- package/dist/{popover-menu-Cn9rUkdc.js → popover-menu-BYaCdFhf.js} +6 -6
- package/dist/{popover-menu-Cn9rUkdc.js.map → popover-menu-BYaCdFhf.js.map} +1 -1
- package/dist/{popover-gnTOhbFM.js → popover-uwzX2vo7.js} +4 -4
- package/dist/{popover-gnTOhbFM.js.map → popover-uwzX2vo7.js.map} +1 -1
- package/dist/{primitives-BFK08r9M.js → primitives-Du64iDbb.js} +6 -6
- package/dist/{primitives-BFK08r9M.js.map → primitives-Du64iDbb.js.map} +1 -1
- package/dist/primitives.js +4 -4
- package/dist/{progress-B1VnCT0K.js → progress-BvF2oCdV.js} +5 -5
- package/dist/{progress-B1VnCT0K.js.map → progress-BvF2oCdV.js.map} +1 -1
- package/dist/{receipt-BVSOH3Xo.js → receipt-D789Jwyy.js} +6 -6
- package/dist/{receipt-BVSOH3Xo.js.map → receipt-D789Jwyy.js.map} +1 -1
- package/dist/{rich-text-GOUyKQ-s.js → rich-text-CLJEf76s.js} +4 -4
- package/dist/{rich-text-GOUyKQ-s.js.map → rich-text-CLJEf76s.js.map} +1 -1
- package/dist/{rich-text-editor-cRLC-eBK.js → rich-text-editor-Cm1dpUpQ.js} +10 -10
- package/dist/{rich-text-editor-cRLC-eBK.js.map → rich-text-editor-Cm1dpUpQ.js.map} +1 -1
- package/dist/{rich-text-editor-toolbar-DfXg0-VC.js → rich-text-editor-toolbar-L__e4x47.js} +4 -4
- package/dist/{rich-text-editor-toolbar-DfXg0-VC.js.map → rich-text-editor-toolbar-L__e4x47.js.map} +1 -1
- package/dist/{scroll-area-DcI-M1UT.js → scroll-area-La5RXsEk.js} +2 -2
- package/dist/{scroll-area-DcI-M1UT.js.map → scroll-area-La5RXsEk.js.map} +1 -1
- package/dist/{separator-Bom7NsGO.js → separator-DAEV0w65.js} +2 -2
- package/dist/{separator-Bom7NsGO.js.map → separator-DAEV0w65.js.map} +1 -1
- package/dist/{separator-BDV-Y648.js → separator-GNfPG-90.js} +3 -3
- package/dist/{separator-BDV-Y648.js.map → separator-GNfPG-90.js.map} +1 -1
- package/dist/services/actions.js +1 -1
- package/dist/settings-BA2iboic.js +174 -0
- package/dist/settings-BA2iboic.js.map +1 -0
- package/dist/{sheet-ijlsjq-n.js → sheet-DoAxTb2J.js} +7 -7
- package/dist/{sheet-ijlsjq-n.js.map → sheet-DoAxTb2J.js.map} +1 -1
- package/dist/{sidebar-DkTO4VTO.js → sidebar-ByqKR_W5.js} +13 -13
- package/dist/{sidebar-DkTO4VTO.js.map → sidebar-ByqKR_W5.js.map} +1 -1
- package/dist/{sidebar-Db6gkh3U.js → sidebar-D2iSnGJ7.js} +11 -11
- package/dist/{sidebar-Db6gkh3U.js.map → sidebar-D2iSnGJ7.js.map} +1 -1
- package/dist/{skeleton-Byjnt7qr.js → skeleton-CUj8O5Bd.js} +3 -3
- package/dist/{skeleton-Byjnt7qr.js.map → skeleton-CUj8O5Bd.js.map} +1 -1
- package/dist/smart-card-CqkzQsK-.js +614 -0
- package/dist/smart-card-CqkzQsK-.js.map +1 -0
- package/dist/{structure-BmisBK-3.js → structure-C0V0_Fyf.js} +3 -3
- package/dist/{structure-BmisBK-3.js.map → structure-C0V0_Fyf.js.map} +1 -1
- package/dist/{structure.recipes-EPz60cU8.js → structure.recipes-BB4-n58V.js} +2 -2
- package/dist/{structure.recipes-EPz60cU8.js.map → structure.recipes-BB4-n58V.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{table-DsfzoUia.js → table-CpvnzJn9.js} +3 -3
- package/dist/{table-DsfzoUia.js.map → table-CpvnzJn9.js.map} +1 -1
- package/dist/{table-BweFy_P9.js → table-DH7rozUv.js} +19 -19
- package/dist/{table-BweFy_P9.js.map → table-DH7rozUv.js.map} +1 -1
- package/dist/{tabs-CDocW5D1.js → tabs-eqVsJZWO.js} +7 -7
- package/dist/{tabs-CDocW5D1.js.map → tabs-eqVsJZWO.js.map} +1 -1
- package/dist/{text-inputs-f9Ia-aCi.js → text-inputs-DXItiR0O.js} +101 -98
- package/dist/text-inputs-DXItiR0O.js.map +1 -0
- package/dist/{text.styles-g4He6UIW.js → text.styles-B64My8RZ.js} +25 -10
- package/dist/text.styles-B64My8RZ.js.map +1 -0
- package/dist/theme.css +152 -112
- package/dist/{timelines-CwM_9IhD.js → timelines-DmtztAY_.js} +10 -10
- package/dist/{timelines-CwM_9IhD.js.map → timelines-DmtztAY_.js.map} +1 -1
- package/dist/{tooltip-yiRJUFjp.js → tooltip-B4hjKtoV.js} +3 -3
- package/dist/{tooltip-yiRJUFjp.js.map → tooltip-B4hjKtoV.js.map} +1 -1
- package/dist/{tree-WnKQzwbq.js → tree-CV11PURP.js} +8 -8
- package/dist/{tree-WnKQzwbq.js.map → tree-CV11PURP.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-CSyJrh28.js +117 -0
- package/dist/typography-CSyJrh28.js.map +1 -0
- package/dist/typography.js +1 -1
- package/dist/{ui-provider-C_U0Xma4.js → ui-provider-CQCuCBcy.js} +3 -3
- package/dist/ui-provider-CQCuCBcy.js.map +1 -0
- package/dist/ui-provider.js +1 -1
- package/dist/{upload-CXyxmQBP.js → upload-C9SA0X-8.js} +11 -11
- package/dist/{upload-CXyxmQBP.js.map → upload-C9SA0X-8.js.map} +1 -1
- package/dist/{upload-queue-Boscubn9.js → upload-queue-DhQJiSRc.js} +9 -9
- package/dist/{upload-queue-Boscubn9.js.map → upload-queue-DhQJiSRc.js.map} +1 -1
- package/dist/{usage-card-BhO5eqkX.js → usage-card-DVTRDmGz.js} +134 -133
- package/dist/usage-card-DVTRDmGz.js.map +1 -0
- package/dist/{utils-BRhFDwuU.js → utils-CF3c95Io.js} +68 -5
- package/dist/utils-CF3c95Io.js.map +1 -0
- package/dist/value-inputs-C0o70p-U.js +980 -0
- package/dist/value-inputs-C0o70p-U.js.map +1 -0
- package/dist/{value-typography-BP8OG6h5.js → value-typography-ClupF0Gz.js} +2 -2
- package/dist/{value-typography-BP8OG6h5.js.map → value-typography-ClupF0Gz.js.map} +1 -1
- package/dist/workspace-9EFVXUyk.js +410 -0
- package/dist/workspace-9EFVXUyk.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +14 -129
- package/docs/consumer-skill/examples/app-layout.tsx +22 -12
- package/docs/consumer-skill/examples/authentication.tsx +77 -0
- package/docs/consumer-skill/examples/edit.tsx +30 -38
- package/docs/consumer-skill/examples/manifest.json +51 -1
- package/docs/consumer-skill/examples/rhf-bindings.tsx +86 -0
- package/docs/consumer-skill/examples/rhf-edit-page.tsx +141 -0
- package/docs/consumer-skill/examples/rhf-overlay-form.tsx +92 -0
- package/docs/consumer-skill/examples/rhf-transport.tsx +28 -0
- package/docs/consumer-skill/references/agents-md.md +17 -7
- package/docs/consumer-skill/references/authentication.md +42 -0
- package/docs/consumer-skill/references/component-contracts.json +319824 -0
- package/docs/consumer-skill/references/composition-mapping.md +92 -0
- package/docs/consumer-skill/references/composition.md +43 -19
- package/docs/consumer-skill/references/design-contract.md +32 -0
- package/docs/consumer-skill/references/discovery.md +84 -7
- package/docs/consumer-skill/references/installation.md +40 -36
- package/docs/consumer-skill/references/integration.md +6 -2
- package/docs/consumer-skill/references/public-api.json +1519 -65
- package/docs/consumer-skill/references/review.md +9 -4
- package/docs/consumer-skill/references/rhf-workflows.md +86 -0
- package/docs/consumer-skill/references/screen-archetypes.md +22 -0
- package/docs/consumer-skill/references/theming.md +8 -9
- package/docs/consumer-skill/references/tokens.json +12 -3
- package/docs/consumer-skill/references/workflows.md +2 -1
- package/docs/consumer-skill/scripts/composition-schema.d.mts +2 -0
- package/docs/consumer-skill/scripts/composition-schema.mjs +32 -0
- package/docs/consumer-skill/scripts/composition.mjs +198 -0
- package/docs/consumer-skill/scripts/discovery.mjs +42 -10
- package/docs/consumer-skill/scripts/inspect-component.mjs +11 -0
- package/docs/consumer-skill/scripts/inspect-tokens.mjs +11 -0
- package/docs/consumer-skill/scripts/inspection.mjs +138 -0
- package/docs/consumer-skill/scripts/map-composition.mjs +12 -0
- package/docs/consumer-skill/scripts/setup-skills.mjs +76 -0
- package/docs/consumer-skills/themelia-components/SKILL.md +30 -0
- package/docs/consumer-skills/themelia-composition/SKILL.md +35 -0
- package/docs/consumer-skills/themelia-forms/SKILL.md +12 -0
- package/docs/consumer-skills/themelia-foundation/SKILL.md +14 -0
- package/docs/consumer-skills/themelia-tokenization/SKILL.md +35 -0
- package/package.json +4 -2
- package/templates/README.md +39 -0
- package/templates/admin-shell-template.tsx +382 -0
- package/templates/analytics-operations-template.tsx +376 -0
- package/templates/customers-template.tsx +509 -0
- package/templates/index.ts +29 -0
- package/templates/orders-template.tsx +1102 -0
- package/templates/products-template.tsx +834 -0
- package/templates/user-permissions-template.tsx +450 -0
- package/dist/action-menu-CllU52Mm.js +0 -280
- package/dist/action-menu-CllU52Mm.js.map +0 -1
- package/dist/affordance-geometry.generated-tF36bREk.js.map +0 -1
- package/dist/ai-artifact-DvTwDVyL.js.map +0 -1
- package/dist/app-shell-C4FhvCqF.js.map +0 -1
- package/dist/cards-BaBZR-AU.js.map +0 -1
- package/dist/checkbox-AWIhNhmo.js.map +0 -1
- package/dist/choice-inputs-CNHvARCJ.js.map +0 -1
- package/dist/comments-DD0DUPwJ.js.map +0 -1
- package/dist/containers-Mu1LMGV1.js +0 -103
- package/dist/containers-Mu1LMGV1.js.map +0 -1
- package/dist/data-display-DT_khPl_.js.map +0 -1
- package/dist/date-picker-B2K3ucWn.js.map +0 -1
- package/dist/date-pickers-Ds8gLaoP.js +0 -175
- package/dist/date-pickers-Ds8gLaoP.js.map +0 -1
- package/dist/form-field-CwH9y77i.js.map +0 -1
- package/dist/forms-B9G_xwzi.js.map +0 -1
- package/dist/forms-numeric-B_jraJaQ.js.map +0 -1
- package/dist/input-DQdEd0YD.js +0 -263
- package/dist/input-DQdEd0YD.js.map +0 -1
- package/dist/item-K5_ghvze.js +0 -275
- package/dist/item-K5_ghvze.js.map +0 -1
- package/dist/metadata-list-8N16ZMW_.js +0 -405
- package/dist/metadata-list-8N16ZMW_.js.map +0 -1
- package/dist/overflow-tab-bar-CWY7Nogn.js.map +0 -1
- package/dist/overlays-tMkF-VAN.js.map +0 -1
- package/dist/page-CL9YeH_V.js +0 -224
- package/dist/page-CL9YeH_V.js.map +0 -1
- package/dist/page-header-commands-DOb6WsfD.js +0 -126
- package/dist/page-header-commands-DOb6WsfD.js.map +0 -1
- package/dist/settings-ybnjVwbd.js +0 -171
- package/dist/settings-ybnjVwbd.js.map +0 -1
- package/dist/smart-card-DiC5aac3.js +0 -604
- package/dist/smart-card-DiC5aac3.js.map +0 -1
- package/dist/text-inputs-f9Ia-aCi.js.map +0 -1
- package/dist/text.styles-g4He6UIW.js.map +0 -1
- package/dist/typography-UTnveOEy.js +0 -117
- package/dist/typography-UTnveOEy.js.map +0 -1
- package/dist/ui-provider-C_U0Xma4.js.map +0 -1
- package/dist/usage-card-BhO5eqkX.js.map +0 -1
- package/dist/utils-BRhFDwuU.js.map +0 -1
- package/dist/value-inputs-TaX4OjNk.js +0 -963
- package/dist/value-inputs-TaX4OjNk.js.map +0 -1
- package/dist/workspace-B-OEm3Kf.js +0 -408
- package/dist/workspace-B-OEm3Kf.js.map +0 -1
package/dist/blocks/commerce.js
CHANGED
|
@@ -1,47 +1,48 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { u as e } from "../ui-provider-
|
|
2
|
+
import { u as e } from "../ui-provider-CQCuCBcy.js";
|
|
3
3
|
import { mergeStrings as t, useStrings as n } from "../lib/strings.js";
|
|
4
|
-
import { t as r } from "../utils-
|
|
5
|
-
import { n as i, t as a } from "../buttons-
|
|
6
|
-
import { c as o, o as s, s as c, t as l } from "../typography-
|
|
7
|
-
import { i as u, r as d, t as f } from "../structure-
|
|
4
|
+
import { t as r } from "../utils-CF3c95Io.js";
|
|
5
|
+
import { n as i, t as a } from "../buttons-BbfzgczK.js";
|
|
6
|
+
import { c as o, o as s, s as c, t as l } from "../typography-CSyJrh28.js";
|
|
7
|
+
import { i as u, r as d, t as f } from "../structure-C0V0_Fyf.js";
|
|
8
8
|
import { i as p } from "../tone-recipes-BPsRAvhu.js";
|
|
9
|
-
import { d as m, h, p as g, t as _ } from "../smart-card-
|
|
10
|
-
import { t as v } from "../progress-
|
|
11
|
-
import { n as y, t as b } from "../
|
|
12
|
-
import { n as x } from "../
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { t as
|
|
21
|
-
import { t as
|
|
22
|
-
import { t as P } from "../
|
|
23
|
-
import { t as
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import { t as
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
9
|
+
import { d as m, h, p as g, t as _ } from "../smart-card-CqkzQsK-.js";
|
|
10
|
+
import { t as v } from "../progress-BvF2oCdV.js";
|
|
11
|
+
import { n as y, t as b } from "../composition.recipes-COdiFhxB.js";
|
|
12
|
+
import { n as x, t as S } from "../action-menu-CHgs8vmj.js";
|
|
13
|
+
import { n as C } from "../cards-4JTWqvVe.js";
|
|
14
|
+
import { t as w } from "../interaction-recipes-XR9ZpVYL.js";
|
|
15
|
+
import { _ as T, c as E, g as D, m as O, o as k, u as ee } from "../primitives-Du64iDbb.js";
|
|
16
|
+
import { t as te } from "../initials-format-CDoQEOd_.js";
|
|
17
|
+
import { n as A, r as j, t as M } from "../number-E_OiIfJz.js";
|
|
18
|
+
import { t as ne } from "../icon-badge-COWbCCWu.js";
|
|
19
|
+
import { i as re, n as ie, s as ae } from "../avatar-DWO_HHhB.js";
|
|
20
|
+
import { t as N } from "../badge-DErMA7ul.js";
|
|
21
|
+
import { t as oe } from "../separator-GNfPG-90.js";
|
|
22
|
+
import { t as P } from "../input-Cdw4k0fb.js";
|
|
23
|
+
import { t as se } from "../copyable-CnGCZdX4.js";
|
|
24
|
+
import { t as F } from "../form-field-CsgRmdit.js";
|
|
25
|
+
import { a as ce, l as le, r as ue } from "../choice-inputs-JLtij2y4.js";
|
|
26
|
+
import { i as de, n as I, o as fe } from "../display-BB4BL_-K.js";
|
|
27
|
+
import { u as pe } from "../value-inputs-C0o70p-U.js";
|
|
28
|
+
import { d as me, n as he } from "../forms-numeric-Cd33AKbD.js";
|
|
29
|
+
import { c as L, i as R, n as z, o as ge, r as B, t as V, u as H } from "../item-BvZ2DR_x.js";
|
|
30
|
+
import { t as _e } from "../metadata-list-qVV7AVxa.js";
|
|
31
|
+
import { i as ve, n as ye, r as be, t as xe } from "../tabs-eqVsJZWO.js";
|
|
32
|
+
import { m as U, s as Se } from "../data-display-D4oujtx0.js";
|
|
33
|
+
import { n as Ce, t as we } from "../receipt-D789Jwyy.js";
|
|
34
|
+
import { s as Te } from "../timelines-DmtztAY_.js";
|
|
35
|
+
import { forwardRef as Ee, useEffect as De, useId as Oe, useMemo as ke, useRef as Ae, useState as je } from "react";
|
|
36
|
+
import { Fragment as Me, jsx as W, jsxs as G } from "react/jsx-runtime";
|
|
37
|
+
import { ArrowRight as Ne, CalendarClock as Pe, Check as K, CheckCircle2 as Fe, ChevronRight as Ie, Circle as Le, CircleAlert as Re, Copy as ze, Edit2 as Be, ExternalLink as Ve, Loader2 as He, Pencil as Ue, Star as We, Trash2 as Ge, TriangleAlert as Ke, X as qe } from "lucide-react";
|
|
37
38
|
//#region src/components/blocks/commerce/upcoming-booking/upcoming-booking.tsx
|
|
38
|
-
function
|
|
39
|
-
return /* @__PURE__ */ W(
|
|
39
|
+
function Je({ bookings: e, className: t, locale: n, dateTone: i = "neutral", dateVariant: a = "default", timePlacement: o = "below" }) {
|
|
40
|
+
return /* @__PURE__ */ W(ge, {
|
|
40
41
|
className: r("upcoming-booking--component w-full", t),
|
|
41
42
|
children: e.map((e, t) => /* @__PURE__ */ G(V, {
|
|
42
43
|
className: "items-center",
|
|
43
44
|
children: [
|
|
44
|
-
/* @__PURE__ */ W(L, { children: /* @__PURE__ */ W(
|
|
45
|
+
/* @__PURE__ */ W(L, { children: /* @__PURE__ */ W(de, {
|
|
45
46
|
date: e.date,
|
|
46
47
|
time: o === "below" ? e.time : void 0,
|
|
47
48
|
tone: i,
|
|
@@ -59,11 +60,11 @@ function qe({ bookings: e, className: t, locale: n, dateTone: i = "neutral", dat
|
|
|
59
60
|
}),
|
|
60
61
|
/* @__PURE__ */ G(z, {
|
|
61
62
|
className: "ml-auto shrink-0 flex-wrap justify-end",
|
|
62
|
-
children: [o === "inline-trailing" && /* @__PURE__ */ W(
|
|
63
|
+
children: [o === "inline-trailing" && /* @__PURE__ */ W(D, {
|
|
63
64
|
size: "xs",
|
|
64
65
|
className: "shrink-0 tabular-nums",
|
|
65
66
|
children: e.time
|
|
66
|
-
}), /* @__PURE__ */ W(
|
|
67
|
+
}), /* @__PURE__ */ W(T, {
|
|
67
68
|
type: "inherit",
|
|
68
69
|
weight: "semibold",
|
|
69
70
|
className: "shrink-0 tabular-nums",
|
|
@@ -74,16 +75,16 @@ function qe({ bookings: e, className: t, locale: n, dateTone: i = "neutral", dat
|
|
|
74
75
|
}, e.id ?? `${e.service}-${e.time}-${t}`))
|
|
75
76
|
});
|
|
76
77
|
}
|
|
77
|
-
|
|
78
|
+
Je.displayName = "UpcomingBookingRow";
|
|
78
79
|
//#endregion
|
|
79
80
|
//#region src/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.tsx
|
|
80
|
-
function
|
|
81
|
-
return typeof e == "string" || typeof e == "number" || typeof e == "bigint" ? /* @__PURE__ */ W(
|
|
81
|
+
function Ye(e) {
|
|
82
|
+
return typeof e == "string" || typeof e == "number" || typeof e == "bigint" ? /* @__PURE__ */ W(T, {
|
|
82
83
|
type: "inherit",
|
|
83
84
|
children: String(e)
|
|
84
85
|
}) : e;
|
|
85
86
|
}
|
|
86
|
-
function
|
|
87
|
+
function Xe({ title: e, description: t, status: n, items: i, actionLabel: a, onAction: o, className: c, contentClassName: l }) {
|
|
87
88
|
return /* @__PURE__ */ G(I, {
|
|
88
89
|
title: e,
|
|
89
90
|
titleSuffix: n,
|
|
@@ -99,12 +100,12 @@ function Ye({ title: e, description: t, status: n, items: i, actionLabel: a, onA
|
|
|
99
100
|
children: /* @__PURE__ */ W(s, { children: e.label })
|
|
100
101
|
}), /* @__PURE__ */ W("dd", {
|
|
101
102
|
className: "min-w-0 leading-normal",
|
|
102
|
-
children:
|
|
103
|
+
children: Ye(e.value)
|
|
103
104
|
})]
|
|
104
105
|
}, e.id))
|
|
105
106
|
}), /* @__PURE__ */ W("div", {
|
|
106
107
|
className: "booking-calendar-event-card--action flex justify-end",
|
|
107
|
-
children: /* @__PURE__ */ W(
|
|
108
|
+
children: /* @__PURE__ */ W(C, {
|
|
108
109
|
fullWidth: !1,
|
|
109
110
|
className: "w-full @md/booking-calendar-event-card:w-auto",
|
|
110
111
|
onClick: o,
|
|
@@ -113,10 +114,10 @@ function Ye({ title: e, description: t, status: n, items: i, actionLabel: a, onA
|
|
|
113
114
|
})]
|
|
114
115
|
});
|
|
115
116
|
}
|
|
116
|
-
|
|
117
|
+
Xe.displayName = "BookingCalendarEventCard";
|
|
117
118
|
//#endregion
|
|
118
119
|
//#region src/components/blocks/commerce/loyalty-points/types.ts
|
|
119
|
-
var
|
|
120
|
+
var Ze = {
|
|
120
121
|
balanceLabel: "Loyalty balance",
|
|
121
122
|
pointsAvailable: "points available",
|
|
122
123
|
redeem: "Redeem points",
|
|
@@ -124,11 +125,11 @@ var Xe = {
|
|
|
124
125
|
};
|
|
125
126
|
//#endregion
|
|
126
127
|
//#region src/components/blocks/commerce/loyalty-points/loyalty-points.tsx
|
|
127
|
-
function
|
|
128
|
-
let p = n(
|
|
128
|
+
function Qe({ balance: e, tier: t, tierTone: a = "neutral", history: s = [], onRedeem: l, className: u, strings: d }) {
|
|
129
|
+
let p = n(Ze, d);
|
|
129
130
|
return /* @__PURE__ */ G(I, {
|
|
130
131
|
title: p.balanceLabel,
|
|
131
|
-
titleSuffix: /* @__PURE__ */ W(
|
|
132
|
+
titleSuffix: /* @__PURE__ */ W(N, {
|
|
132
133
|
tone: a,
|
|
133
134
|
children: t ?? p.tier
|
|
134
135
|
}),
|
|
@@ -141,7 +142,7 @@ function Ze({ balance: e, tier: t, tierTone: a = "neutral", history: s = [], onR
|
|
|
141
142
|
children: [/* @__PURE__ */ W(c, {
|
|
142
143
|
tag: "h3",
|
|
143
144
|
className: "tabular-nums text-inherit",
|
|
144
|
-
children: typeof e == "number" ? /* @__PURE__ */ W(
|
|
145
|
+
children: typeof e == "number" ? /* @__PURE__ */ W(M, {
|
|
145
146
|
type: "inherit",
|
|
146
147
|
value: e,
|
|
147
148
|
align: "left"
|
|
@@ -152,7 +153,7 @@ function Ze({ balance: e, tier: t, tierTone: a = "neutral", history: s = [], onR
|
|
|
152
153
|
children: p.pointsAvailable
|
|
153
154
|
})]
|
|
154
155
|
}),
|
|
155
|
-
s.length > 0 && /* @__PURE__ */ W(
|
|
156
|
+
s.length > 0 && /* @__PURE__ */ W(ge, { children: s.map((e) => /* @__PURE__ */ G(V, {
|
|
156
157
|
size: "sm",
|
|
157
158
|
children: [/* @__PURE__ */ G(B, { children: [/* @__PURE__ */ W(H, {
|
|
158
159
|
bold: !1,
|
|
@@ -175,19 +176,19 @@ function Ze({ balance: e, tier: t, tierTone: a = "neutral", history: s = [], onR
|
|
|
175
176
|
]
|
|
176
177
|
});
|
|
177
178
|
}
|
|
178
|
-
|
|
179
|
-
function
|
|
179
|
+
Qe.displayName = "LoyaltyPoints";
|
|
180
|
+
function $e(e) {
|
|
180
181
|
return e.replace(/^[\s−-]+/, "");
|
|
181
182
|
}
|
|
182
|
-
function
|
|
183
|
-
return e.trim() ? `−${
|
|
183
|
+
function et(e) {
|
|
184
|
+
return e.trim() ? `−${$e(e)}` : e;
|
|
184
185
|
}
|
|
185
186
|
//#endregion
|
|
186
187
|
//#region src/components/blocks/commerce/summary-panel/amount-row.tsx
|
|
187
|
-
function
|
|
188
|
+
function tt(e) {
|
|
188
189
|
return typeof e == "string" || typeof e == "number";
|
|
189
190
|
}
|
|
190
|
-
var
|
|
191
|
+
var q = Ee(function({ label: e, amount: t, note: n, total: i = !1, deduction: a = !1, rollup: s = !1, className: c, ...l }, u) {
|
|
191
192
|
let d = n != null && n !== !1 && n !== "";
|
|
192
193
|
return /* @__PURE__ */ G("div", {
|
|
193
194
|
ref: u,
|
|
@@ -198,7 +199,7 @@ var K = we(function({ label: e, amount: t, note: n, total: i = !1, deduction: a
|
|
|
198
199
|
className: r("amount-row--component flex min-w-0 items-baseline gap-space-md", s && "mt-space-sm border-t border-border pt-space-lg", c),
|
|
199
200
|
...l,
|
|
200
201
|
children: [
|
|
201
|
-
|
|
202
|
+
tt(e) ? /* @__PURE__ */ W(o, {
|
|
202
203
|
tag: "span",
|
|
203
204
|
type: i ? "inherit" : "secondary",
|
|
204
205
|
weight: i ? "semibold" : "regular",
|
|
@@ -209,7 +210,7 @@ var K = we(function({ label: e, amount: t, note: n, total: i = !1, deduction: a
|
|
|
209
210
|
className: "amount-row--label min-w-0 flex-1",
|
|
210
211
|
children: e
|
|
211
212
|
}),
|
|
212
|
-
!!d && (
|
|
213
|
+
!!d && (tt(n) ? /* @__PURE__ */ W(o, {
|
|
213
214
|
tag: "span",
|
|
214
215
|
size: "xs",
|
|
215
216
|
type: "secondary",
|
|
@@ -224,15 +225,15 @@ var K = we(function({ label: e, amount: t, note: n, total: i = !1, deduction: a
|
|
|
224
225
|
type: a ? "success" : "inherit",
|
|
225
226
|
weight: i ? "bold" : "medium",
|
|
226
227
|
className: "amount-row--value shrink-0 text-end tabular-nums",
|
|
227
|
-
children: a ?
|
|
228
|
+
children: a ? et(t) : t
|
|
228
229
|
})
|
|
229
230
|
]
|
|
230
231
|
});
|
|
231
232
|
});
|
|
232
|
-
|
|
233
|
+
q.displayName = "AmountRow";
|
|
233
234
|
//#endregion
|
|
234
235
|
//#region src/components/blocks/commerce/summary-panel/summary-panel.tsx
|
|
235
|
-
var
|
|
236
|
+
var J = Ee(function({ className: e, children: t, ...n }, i) {
|
|
236
237
|
return /* @__PURE__ */ W(f, {
|
|
237
238
|
ref: i,
|
|
238
239
|
gap: "sm",
|
|
@@ -242,25 +243,25 @@ var q = we(function({ className: e, children: t, ...n }, i) {
|
|
|
242
243
|
children: t
|
|
243
244
|
});
|
|
244
245
|
});
|
|
245
|
-
|
|
246
|
+
J.displayName = "SummaryPanel";
|
|
246
247
|
//#endregion
|
|
247
248
|
//#region src/components/blocks/commerce/discount-stack/types.ts
|
|
248
|
-
var
|
|
249
|
+
var nt = {
|
|
249
250
|
title: "Applied discounts",
|
|
250
251
|
totalSavings: "Total savings"
|
|
251
252
|
};
|
|
252
253
|
//#endregion
|
|
253
254
|
//#region src/components/blocks/commerce/discount-stack/discount-stack.tsx
|
|
254
|
-
function
|
|
255
|
+
function rt(e) {
|
|
255
256
|
let t = e.kind ?? e.type;
|
|
256
|
-
if (t != null && t !== "") return e.badge ? /* @__PURE__ */ W(
|
|
257
|
+
if (t != null && t !== "") return e.badge ? /* @__PURE__ */ W(N, {
|
|
257
258
|
tone: e.badge,
|
|
258
259
|
size: "sm",
|
|
259
260
|
children: t
|
|
260
261
|
}) : t;
|
|
261
262
|
}
|
|
262
|
-
function
|
|
263
|
-
let s = n(
|
|
263
|
+
function it({ discounts: e, totalSavings: t, className: i, strings: a, ...o }) {
|
|
264
|
+
let s = n(nt, a);
|
|
264
265
|
return /* @__PURE__ */ W(_, {
|
|
265
266
|
...o,
|
|
266
267
|
surface: "flat",
|
|
@@ -268,15 +269,15 @@ function rt({ discounts: e, totalSavings: t, className: i, strings: a, ...o }) {
|
|
|
268
269
|
title: s.title,
|
|
269
270
|
"data-slot": "discount-stack",
|
|
270
271
|
className: r("discount-stack--component w-full", i),
|
|
271
|
-
children: /* @__PURE__ */ G(
|
|
272
|
+
children: /* @__PURE__ */ G(J, {
|
|
272
273
|
className: "discount-stack--ledger",
|
|
273
|
-
children: [e.map((e, t) => /* @__PURE__ */ W(
|
|
274
|
+
children: [e.map((e, t) => /* @__PURE__ */ W(q, {
|
|
274
275
|
className: "discount-stack--row",
|
|
275
276
|
label: e.label,
|
|
276
|
-
note:
|
|
277
|
+
note: rt(e),
|
|
277
278
|
amount: e.amount,
|
|
278
279
|
deduction: !0
|
|
279
|
-
}, e.id ?? `${e.type ?? ""}-${e.label}-${String(t)}`)), /* @__PURE__ */ W(
|
|
280
|
+
}, e.id ?? `${e.type ?? ""}-${e.label}-${String(t)}`)), /* @__PURE__ */ W(q, {
|
|
280
281
|
className: "discount-stack--total",
|
|
281
282
|
label: s.totalSavings,
|
|
282
283
|
amount: t,
|
|
@@ -287,13 +288,13 @@ function rt({ discounts: e, totalSavings: t, className: i, strings: a, ...o }) {
|
|
|
287
288
|
})
|
|
288
289
|
});
|
|
289
290
|
}
|
|
290
|
-
|
|
291
|
-
var
|
|
291
|
+
it.displayName = "DiscountStackPreview";
|
|
292
|
+
var at = it, ot = {
|
|
292
293
|
pending: "neutral",
|
|
293
294
|
in_transit: "info",
|
|
294
295
|
delivered: "success",
|
|
295
296
|
delayed: "warning"
|
|
296
|
-
},
|
|
297
|
+
}, st = {
|
|
297
298
|
title: "Shipment tracking",
|
|
298
299
|
trackingNumber: "Tracking number",
|
|
299
300
|
carrier: "Carrier",
|
|
@@ -305,12 +306,12 @@ var it = rt, at = {
|
|
|
305
306
|
};
|
|
306
307
|
//#endregion
|
|
307
308
|
//#region src/components/blocks/commerce/shipment-tracking/shipment-tracking.tsx
|
|
308
|
-
function
|
|
309
|
+
function ct(e) {
|
|
309
310
|
for (let t = e.length - 1; t >= 0; --t) if (e[t]?.done) return t;
|
|
310
311
|
return -1;
|
|
311
312
|
}
|
|
312
|
-
function
|
|
313
|
-
let d = n(
|
|
313
|
+
function lt({ trackingNumber: e, carrier: t, status: i, steps: a, details: o = [], onCopyTracking: s, className: c, strings: l, ...u }) {
|
|
314
|
+
let d = n(st, l), p = i === "delivered" ? -1 : ct(a), m = a.map((e, t) => ({
|
|
314
315
|
id: e.id ?? `${e.label}-${String(t)}`,
|
|
315
316
|
title: e.label,
|
|
316
317
|
timestamp: e.timestamp,
|
|
@@ -321,8 +322,8 @@ function ct({ trackingNumber: e, carrier: t, status: i, steps: a, details: o = [
|
|
|
321
322
|
surface: "flat",
|
|
322
323
|
padding: "none",
|
|
323
324
|
title: d.title,
|
|
324
|
-
titleSuffix: /* @__PURE__ */ W(
|
|
325
|
-
tone:
|
|
325
|
+
titleSuffix: /* @__PURE__ */ W(N, {
|
|
326
|
+
tone: ot[i],
|
|
326
327
|
className: "shipment-tracking--status",
|
|
327
328
|
children: d[i]
|
|
328
329
|
}),
|
|
@@ -335,7 +336,7 @@ function ct({ trackingNumber: e, carrier: t, status: i, steps: a, details: o = [
|
|
|
335
336
|
children: [
|
|
336
337
|
/* @__PURE__ */ W(U, {
|
|
337
338
|
label: d.trackingNumber,
|
|
338
|
-
value: /* @__PURE__ */ W(
|
|
339
|
+
value: /* @__PURE__ */ W(se, {
|
|
339
340
|
value: e,
|
|
340
341
|
mono: !0,
|
|
341
342
|
truncate: !0,
|
|
@@ -357,17 +358,17 @@ function ct({ trackingNumber: e, carrier: t, status: i, steps: a, details: o = [
|
|
|
357
358
|
valueClassName: "min-w-0 truncate"
|
|
358
359
|
}, `${e.label}-${String(t)}`))
|
|
359
360
|
]
|
|
360
|
-
}), m.length > 0 && /* @__PURE__ */ W(
|
|
361
|
+
}), m.length > 0 && /* @__PURE__ */ W(Te, {
|
|
361
362
|
items: m,
|
|
362
363
|
dotSize: "sm",
|
|
363
364
|
className: "shipment-tracking--rail"
|
|
364
365
|
})]
|
|
365
366
|
});
|
|
366
367
|
}
|
|
367
|
-
|
|
368
|
+
lt.displayName = "ShipmentTracking";
|
|
368
369
|
//#endregion
|
|
369
370
|
//#region src/components/blocks/commerce/giftcard-card/types.ts
|
|
370
|
-
var
|
|
371
|
+
var Y = {
|
|
371
372
|
status: {
|
|
372
373
|
active: "Active",
|
|
373
374
|
redeemed: "Redeemed",
|
|
@@ -386,29 +387,29 @@ var J = {
|
|
|
386
387
|
copiedCode: "Code copied",
|
|
387
388
|
copyFailed: "Could not copy code. Try again.",
|
|
388
389
|
copyingCode: "Copying code…"
|
|
389
|
-
},
|
|
390
|
+
}, ut = {
|
|
390
391
|
active: "success",
|
|
391
392
|
redeemed: "secondary",
|
|
392
393
|
expired: "destructive",
|
|
393
394
|
disabled: "warning"
|
|
394
|
-
},
|
|
395
|
+
}, dt = "bg-inverse-background from-inverse-background via-inverse-surface to-inverse-background", ft = {
|
|
395
396
|
purple: {
|
|
396
|
-
card:
|
|
397
|
+
card: dt,
|
|
397
398
|
strip: "from-primary via-primary/90 to-info"
|
|
398
399
|
},
|
|
399
400
|
green: {
|
|
400
|
-
card:
|
|
401
|
+
card: dt,
|
|
401
402
|
strip: "from-success via-info to-success"
|
|
402
403
|
},
|
|
403
404
|
warm: {
|
|
404
|
-
card:
|
|
405
|
+
card: dt,
|
|
405
406
|
strip: "from-warning via-warning/90 to-destructive"
|
|
406
407
|
}
|
|
407
|
-
},
|
|
408
|
+
}, pt = {
|
|
408
409
|
purple: "from-primary to-info",
|
|
409
410
|
green: "from-success to-info",
|
|
410
411
|
warm: "from-warning to-destructive"
|
|
411
|
-
},
|
|
412
|
+
}, mt = {
|
|
412
413
|
green: {
|
|
413
414
|
line: p.success.solid,
|
|
414
415
|
iconBg: `${p.success.tint} ${p.success.ink}`
|
|
@@ -421,15 +422,15 @@ var J = {
|
|
|
421
422
|
line: p.warning.solid,
|
|
422
423
|
iconBg: `${p.warning.tint} ${p.warning.ink}`
|
|
423
424
|
}
|
|
424
|
-
},
|
|
425
|
+
}, ht = {
|
|
425
426
|
green: "from-success to-info",
|
|
426
427
|
blue: "from-info to-primary",
|
|
427
428
|
amber: "from-warning to-destructive"
|
|
428
429
|
};
|
|
429
430
|
//#endregion
|
|
430
431
|
//#region src/components/blocks/commerce/giftcard-card/partials/giftcard-compact.tsx
|
|
431
|
-
function
|
|
432
|
-
let u = n(
|
|
432
|
+
function gt({ code: e, amount: t, remainingAmount: i, status: a, recipientName: o, gradient: s = "purple", className: c, strings: l }) {
|
|
433
|
+
let u = n(Y, l).status[a], d = ut[a], p = !!i && i !== t, m = p ? i : t;
|
|
433
434
|
return /* @__PURE__ */ G(V, {
|
|
434
435
|
size: "sm",
|
|
435
436
|
variant: "outline",
|
|
@@ -439,7 +440,7 @@ function ht({ code: e, amount: t, remainingAmount: i, status: a, recipientName:
|
|
|
439
440
|
/* @__PURE__ */ W(L, {
|
|
440
441
|
variant: "image",
|
|
441
442
|
children: /* @__PURE__ */ W("div", {
|
|
442
|
-
className: r("flex size-full items-center justify-center bg-gradient-to-br p-space-2xs",
|
|
443
|
+
className: r("flex size-full items-center justify-center bg-gradient-to-br p-space-2xs", pt[s]),
|
|
443
444
|
children: /* @__PURE__ */ W("span", { className: "size-full rounded-inner bg-inverse-background" })
|
|
444
445
|
})
|
|
445
446
|
}),
|
|
@@ -447,7 +448,7 @@ function ht({ code: e, amount: t, remainingAmount: i, status: a, recipientName:
|
|
|
447
448
|
className: "min-w-0",
|
|
448
449
|
children: [/* @__PURE__ */ W(H, {
|
|
449
450
|
className: "w-full max-w-full truncate whitespace-nowrap",
|
|
450
|
-
children: /* @__PURE__ */ W(
|
|
451
|
+
children: /* @__PURE__ */ W(O, {
|
|
451
452
|
type: "inherit",
|
|
452
453
|
children: e
|
|
453
454
|
})
|
|
@@ -464,17 +465,17 @@ function ht({ code: e, amount: t, remainingAmount: i, status: a, recipientName:
|
|
|
464
465
|
className: "shrink-0",
|
|
465
466
|
children: [/* @__PURE__ */ G("div", {
|
|
466
467
|
className: "flex items-baseline gap-space-xs",
|
|
467
|
-
children: [/* @__PURE__ */ W(
|
|
468
|
+
children: [/* @__PURE__ */ W(T, {
|
|
468
469
|
type: "inherit",
|
|
469
470
|
weight: "bold",
|
|
470
471
|
className: "tabular-nums",
|
|
471
472
|
children: m
|
|
472
|
-
}), !!p && /* @__PURE__ */ W(
|
|
473
|
+
}), !!p && /* @__PURE__ */ W(T, {
|
|
473
474
|
size: "xs",
|
|
474
475
|
className: "line-through tabular-nums text-muted-foreground",
|
|
475
476
|
children: t
|
|
476
477
|
})]
|
|
477
|
-
}), /* @__PURE__ */ W(
|
|
478
|
+
}), /* @__PURE__ */ W(N, {
|
|
478
479
|
tone: d,
|
|
479
480
|
size: "sm",
|
|
480
481
|
children: u
|
|
@@ -484,21 +485,21 @@ function ht({ code: e, amount: t, remainingAmount: i, status: a, recipientName:
|
|
|
484
485
|
]
|
|
485
486
|
});
|
|
486
487
|
}
|
|
487
|
-
|
|
488
|
+
gt.displayName = "GiftcardCompact";
|
|
488
489
|
//#endregion
|
|
489
490
|
//#region src/components/blocks/commerce/giftcard-card/partials/giftcard-copy-button.tsx
|
|
490
|
-
function
|
|
491
|
-
let c = n(
|
|
491
|
+
function _t({ code: e, strings: t, inverse: a = !1, className: s }) {
|
|
492
|
+
let c = n(Y, t), l = Ae(0), [u, d] = je({
|
|
492
493
|
code: e,
|
|
493
494
|
state: "idle"
|
|
494
495
|
}), f = u.code === e ? u.state : "idle";
|
|
495
|
-
|
|
496
|
+
De(() => (l.current++, d((t) => t.code === e ? t : {
|
|
496
497
|
code: e,
|
|
497
498
|
state: "idle"
|
|
498
499
|
}), () => {
|
|
499
500
|
l.current++;
|
|
500
501
|
}), [e]);
|
|
501
|
-
let p = f === "copied" ? c.copiedCode : f === "failed" ? c.copyFailed : f === "pending" ? c.copyingCode : c.copyCode, m = f === "copied" ?
|
|
502
|
+
let p = f === "copied" ? c.copiedCode : f === "failed" ? c.copyFailed : f === "pending" ? c.copyingCode : c.copyCode, m = f === "copied" ? K : f === "failed" ? qe : f === "pending" ? He : ze, h = async () => {
|
|
502
503
|
if (!e || f === "pending") return;
|
|
503
504
|
let t = l.current;
|
|
504
505
|
d({
|
|
@@ -517,7 +518,7 @@ function gt({ code: e, strings: t, inverse: a = !1, className: s }) {
|
|
|
517
518
|
});
|
|
518
519
|
}
|
|
519
520
|
};
|
|
520
|
-
return /* @__PURE__ */ G(
|
|
521
|
+
return /* @__PURE__ */ G(Me, { children: [/* @__PURE__ */ W(i, {
|
|
521
522
|
type: "button",
|
|
522
523
|
tone: "secondary",
|
|
523
524
|
buttonStyle: "ghost",
|
|
@@ -542,8 +543,8 @@ function gt({ code: e, strings: t, inverse: a = !1, className: s }) {
|
|
|
542
543
|
}
|
|
543
544
|
//#endregion
|
|
544
545
|
//#region src/components/blocks/commerce/giftcard-card/partials/giftcard-dark.tsx
|
|
545
|
-
function
|
|
546
|
-
let h = n(
|
|
546
|
+
function vt({ code: e, amount: t, remainingAmount: a, status: s, recipientName: l, expiresAt: u, onView: d, className: p, strings: m }) {
|
|
547
|
+
let h = n(Y, m), g = h.status[s], v = ut[s], y = !!a && a !== t, b = y ? a : t, x = [...l ? [{
|
|
547
548
|
label: h.recipient,
|
|
548
549
|
value: l
|
|
549
550
|
}] : [], ...u ? [{
|
|
@@ -567,7 +568,7 @@ function _t({ code: e, amount: t, remainingAmount: a, status: s, recipientName:
|
|
|
567
568
|
tag: "span",
|
|
568
569
|
className: "text-inverse-muted",
|
|
569
570
|
children: h.giftCard
|
|
570
|
-
}), /* @__PURE__ */ W(
|
|
571
|
+
}), /* @__PURE__ */ W(N, {
|
|
571
572
|
tone: v,
|
|
572
573
|
className: "shrink-0",
|
|
573
574
|
children: g
|
|
@@ -580,7 +581,7 @@ function _t({ code: e, amount: t, remainingAmount: a, status: s, recipientName:
|
|
|
580
581
|
size: "2xl",
|
|
581
582
|
className: "tabular-nums text-inverse-foreground",
|
|
582
583
|
children: b
|
|
583
|
-
}), !!y && /* @__PURE__ */ W(
|
|
584
|
+
}), !!y && /* @__PURE__ */ W(T, {
|
|
584
585
|
className: "line-through tabular-nums text-inverse-disabled",
|
|
585
586
|
children: t
|
|
586
587
|
})]
|
|
@@ -591,17 +592,17 @@ function _t({ code: e, amount: t, remainingAmount: a, status: s, recipientName:
|
|
|
591
592
|
direction: "horizontal",
|
|
592
593
|
align: "center",
|
|
593
594
|
gap: "md",
|
|
594
|
-
children: [/* @__PURE__ */ W(
|
|
595
|
+
children: [/* @__PURE__ */ W(O, {
|
|
595
596
|
className: "flex-1 tracking-[0.15em] text-inverse-foreground",
|
|
596
597
|
children: e
|
|
597
|
-
}), /* @__PURE__ */ W(
|
|
598
|
+
}), /* @__PURE__ */ W(_t, {
|
|
598
599
|
code: e,
|
|
599
600
|
strings: h,
|
|
600
601
|
inverse: !0
|
|
601
602
|
})]
|
|
602
603
|
})
|
|
603
604
|
}),
|
|
604
|
-
/* @__PURE__ */ W(
|
|
605
|
+
/* @__PURE__ */ W(_e, {
|
|
605
606
|
items: x,
|
|
606
607
|
columns: 1,
|
|
607
608
|
className: "[&_.metadata-list--label]:text-inverse-muted [&_.metadata-list--value]:text-inverse-foreground"
|
|
@@ -617,11 +618,11 @@ function _t({ code: e, amount: t, remainingAmount: a, status: s, recipientName:
|
|
|
617
618
|
})
|
|
618
619
|
});
|
|
619
620
|
}
|
|
620
|
-
|
|
621
|
+
vt.displayName = "GiftcardCardDark";
|
|
621
622
|
//#endregion
|
|
622
623
|
//#region src/components/blocks/commerce/giftcard-card/partials/giftcard-full.tsx
|
|
623
|
-
function
|
|
624
|
-
let S = n(
|
|
624
|
+
function yt({ 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 }) {
|
|
625
|
+
let S = n(Y, x), C = S.status[l], w = ut[l], E = !!a && a !== t, D = E ? a : t, k = [
|
|
625
626
|
...u ? [{
|
|
626
627
|
label: S.to,
|
|
627
628
|
value: u
|
|
@@ -638,13 +639,13 @@ function vt({ code: e, amount: t, remainingAmount: a, status: l, recipientName:
|
|
|
638
639
|
return /* @__PURE__ */ G("div", {
|
|
639
640
|
className: r("giftcard-card--component w-full max-w-sm transition-shadow", "hover:shadow-md", b),
|
|
640
641
|
children: [/* @__PURE__ */ G("div", {
|
|
641
|
-
className: r("relative overflow-hidden rounded-t-radius bg-gradient-to-br p-surface",
|
|
642
|
+
className: r("relative overflow-hidden rounded-t-radius bg-gradient-to-br p-surface", ft[v].card),
|
|
642
643
|
children: [
|
|
643
644
|
/* @__PURE__ */ W("div", {
|
|
644
645
|
"aria-hidden": !0,
|
|
645
|
-
className: r("absolute inset-x-0 top-0 z-10 h-1 bg-gradient-to-r",
|
|
646
|
+
className: r("absolute inset-x-0 top-0 z-10 h-1 bg-gradient-to-r", ft[v].strip)
|
|
646
647
|
}),
|
|
647
|
-
y === "circles" && /* @__PURE__ */ G(
|
|
648
|
+
y === "circles" && /* @__PURE__ */ G(Me, { children: [/* @__PURE__ */ W("div", {
|
|
648
649
|
className: "absolute -top-8 -right-8 h-32 w-32 rounded-full bg-inverse-decoration",
|
|
649
650
|
"aria-hidden": "true"
|
|
650
651
|
}), /* @__PURE__ */ W("div", {
|
|
@@ -666,13 +667,13 @@ function vt({ code: e, amount: t, remainingAmount: a, status: l, recipientName:
|
|
|
666
667
|
}),
|
|
667
668
|
/* @__PURE__ */ W("div", {
|
|
668
669
|
className: "absolute top-4 right-4 z-10",
|
|
669
|
-
children: /* @__PURE__ */ W(
|
|
670
|
-
tone:
|
|
670
|
+
children: /* @__PURE__ */ W(N, {
|
|
671
|
+
tone: w,
|
|
671
672
|
inline: !0,
|
|
672
673
|
dot: !0,
|
|
673
674
|
className: "border border-inverse-border bg-inverse-background text-inverse-foreground shadow-sm",
|
|
674
|
-
"data-status":
|
|
675
|
-
children:
|
|
675
|
+
"data-status": w,
|
|
676
|
+
children: C
|
|
676
677
|
})
|
|
677
678
|
}),
|
|
678
679
|
/* @__PURE__ */ G(f, {
|
|
@@ -697,8 +698,8 @@ function vt({ code: e, amount: t, remainingAmount: a, status: l, recipientName:
|
|
|
697
698
|
tag: "h2",
|
|
698
699
|
size: "2xl",
|
|
699
700
|
className: "text-inverse-foreground tabular-nums drop-shadow-sm",
|
|
700
|
-
children:
|
|
701
|
-
}), !!
|
|
701
|
+
children: D
|
|
702
|
+
}), !!E && /* @__PURE__ */ W(T, {
|
|
702
703
|
className: "line-through tabular-nums text-inverse-disabled",
|
|
703
704
|
children: t
|
|
704
705
|
})]
|
|
@@ -710,11 +711,11 @@ function vt({ code: e, amount: t, remainingAmount: a, status: l, recipientName:
|
|
|
710
711
|
direction: "horizontal",
|
|
711
712
|
align: "center",
|
|
712
713
|
gap: "md",
|
|
713
|
-
children: [/* @__PURE__ */ W(
|
|
714
|
+
children: [/* @__PURE__ */ W(O, {
|
|
714
715
|
weight: "semibold",
|
|
715
716
|
className: "flex-1 tracking-[0.2em] text-inverse-foreground",
|
|
716
717
|
children: e
|
|
717
|
-
}), /* @__PURE__ */ W(
|
|
718
|
+
}), /* @__PURE__ */ W(_t, {
|
|
718
719
|
code: e,
|
|
719
720
|
strings: S,
|
|
720
721
|
inverse: !0
|
|
@@ -743,7 +744,8 @@ function vt({ code: e, amount: t, remainingAmount: a, status: l, recipientName:
|
|
|
743
744
|
]
|
|
744
745
|
})]
|
|
745
746
|
}),
|
|
746
|
-
/* @__PURE__ */ W(
|
|
747
|
+
/* @__PURE__ */ W(_e, {
|
|
748
|
+
adaptTo: "container",
|
|
747
749
|
items: k,
|
|
748
750
|
columns: {
|
|
749
751
|
base: 1,
|
|
@@ -762,11 +764,11 @@ function vt({ code: e, amount: t, remainingAmount: a, status: l, recipientName:
|
|
|
762
764
|
})]
|
|
763
765
|
});
|
|
764
766
|
}
|
|
765
|
-
|
|
767
|
+
yt.displayName = "GiftcardFull";
|
|
766
768
|
//#endregion
|
|
767
769
|
//#region src/components/blocks/commerce/giftcard-card/partials/giftcard-illustrated.tsx
|
|
768
|
-
function
|
|
769
|
-
let v = n(
|
|
770
|
+
function bt({ code: e, amount: t, remainingAmount: a, status: l, recipientName: u, expiresAt: d, onView: p, headerColor: m = "green", className: h, strings: g }) {
|
|
771
|
+
let v = n(Y, g), y = v.status[l], b = ut[l], x = !!a && a !== t, S = x ? a : t, C = [...u ? [{
|
|
770
772
|
label: v.recipient,
|
|
771
773
|
value: u
|
|
772
774
|
}] : [], ...d ? [{
|
|
@@ -782,7 +784,7 @@ function yt({ code: e, amount: t, remainingAmount: a, status: l, recipientName:
|
|
|
782
784
|
children: [
|
|
783
785
|
/* @__PURE__ */ W("div", {
|
|
784
786
|
"aria-hidden": !0,
|
|
785
|
-
className: r("absolute inset-x-0 top-0 h-1 bg-gradient-to-r",
|
|
787
|
+
className: r("absolute inset-x-0 top-0 h-1 bg-gradient-to-r", ht[m])
|
|
786
788
|
}),
|
|
787
789
|
/* @__PURE__ */ W("div", {
|
|
788
790
|
className: "absolute inset-0 opacity-80",
|
|
@@ -810,7 +812,7 @@ function yt({ code: e, amount: t, remainingAmount: a, status: l, recipientName:
|
|
|
810
812
|
size: "2xl",
|
|
811
813
|
className: "tabular-nums text-inherit",
|
|
812
814
|
children: S
|
|
813
|
-
}), !!x && /* @__PURE__ */ W(
|
|
815
|
+
}), !!x && /* @__PURE__ */ W(T, {
|
|
814
816
|
className: "line-through tabular-nums text-muted-foreground",
|
|
815
817
|
children: t
|
|
816
818
|
})]
|
|
@@ -819,7 +821,7 @@ function yt({ code: e, amount: t, remainingAmount: a, status: l, recipientName:
|
|
|
819
821
|
type: "secondary",
|
|
820
822
|
children: v.balance
|
|
821
823
|
})]
|
|
822
|
-
}), /* @__PURE__ */ W(
|
|
824
|
+
}), /* @__PURE__ */ W(N, {
|
|
823
825
|
tone: b,
|
|
824
826
|
children: y
|
|
825
827
|
})]
|
|
@@ -830,18 +832,19 @@ function yt({ code: e, amount: t, remainingAmount: a, status: l, recipientName:
|
|
|
830
832
|
direction: "horizontal",
|
|
831
833
|
align: "center",
|
|
832
834
|
gap: "md",
|
|
833
|
-
children: [/* @__PURE__ */ W(
|
|
835
|
+
children: [/* @__PURE__ */ W(O, {
|
|
834
836
|
type: "inherit",
|
|
835
837
|
className: "flex-1 tracking-[0.15em]",
|
|
836
838
|
children: e
|
|
837
|
-
}), /* @__PURE__ */ W(
|
|
839
|
+
}), /* @__PURE__ */ W(_t, {
|
|
838
840
|
code: e,
|
|
839
841
|
strings: v
|
|
840
842
|
})]
|
|
841
843
|
})
|
|
842
844
|
}),
|
|
843
|
-
/* @__PURE__ */ W(
|
|
844
|
-
|
|
845
|
+
/* @__PURE__ */ W(_e, {
|
|
846
|
+
adaptTo: "container",
|
|
847
|
+
items: C,
|
|
845
848
|
columns: 2
|
|
846
849
|
}),
|
|
847
850
|
!!p && /* @__PURE__ */ W(i, {
|
|
@@ -855,11 +858,11 @@ function yt({ code: e, amount: t, remainingAmount: a, status: l, recipientName:
|
|
|
855
858
|
})]
|
|
856
859
|
});
|
|
857
860
|
}
|
|
858
|
-
|
|
861
|
+
bt.displayName = "GiftcardCardIllustrated";
|
|
859
862
|
//#endregion
|
|
860
863
|
//#region src/components/blocks/commerce/giftcard-card/partials/giftcard-minimal.tsx
|
|
861
|
-
function
|
|
862
|
-
let g = n(
|
|
864
|
+
function xt({ code: e, amount: t, remainingAmount: i, status: s, recipientName: l, expiresAt: u, onView: d, color: p = "green", className: m, strings: h }) {
|
|
865
|
+
let g = n(Y, h), v = g.status[s], y = ut[s], b = !!i && i !== t, x = b ? i : t, S = mt[p], C = [...l ? [{
|
|
863
866
|
label: g.recipient,
|
|
864
867
|
value: l
|
|
865
868
|
}] : [], ...u ? [{
|
|
@@ -887,7 +890,7 @@ function bt({ code: e, amount: t, remainingAmount: i, status: s, recipientName:
|
|
|
887
890
|
tag: "span",
|
|
888
891
|
type: "secondary",
|
|
889
892
|
children: g.giftCard
|
|
890
|
-
}), /* @__PURE__ */ W(
|
|
893
|
+
}), /* @__PURE__ */ W(N, {
|
|
891
894
|
tone: y,
|
|
892
895
|
size: "sm",
|
|
893
896
|
className: "shrink-0",
|
|
@@ -901,7 +904,7 @@ function bt({ code: e, amount: t, remainingAmount: i, status: s, recipientName:
|
|
|
901
904
|
size: "2xl",
|
|
902
905
|
className: "tabular-nums text-inherit",
|
|
903
906
|
children: x
|
|
904
|
-
}), !!b && /* @__PURE__ */ W(
|
|
907
|
+
}), !!b && /* @__PURE__ */ W(T, {
|
|
905
908
|
className: "line-through tabular-nums text-muted-foreground",
|
|
906
909
|
children: t
|
|
907
910
|
})]
|
|
@@ -912,19 +915,19 @@ function bt({ code: e, amount: t, remainingAmount: i, status: s, recipientName:
|
|
|
912
915
|
direction: "horizontal",
|
|
913
916
|
align: "center",
|
|
914
917
|
gap: "sm",
|
|
915
|
-
children: [/* @__PURE__ */ W(
|
|
918
|
+
children: [/* @__PURE__ */ W(O, {
|
|
916
919
|
type: "inherit",
|
|
917
920
|
className: "flex-1 tracking-[0.15em]",
|
|
918
921
|
children: e
|
|
919
|
-
}), /* @__PURE__ */ W(
|
|
922
|
+
}), /* @__PURE__ */ W(_t, {
|
|
920
923
|
code: e,
|
|
921
924
|
strings: g,
|
|
922
925
|
className: "shrink-0"
|
|
923
926
|
})]
|
|
924
927
|
})
|
|
925
928
|
}),
|
|
926
|
-
/* @__PURE__ */ W(
|
|
927
|
-
items:
|
|
929
|
+
/* @__PURE__ */ W(_e, {
|
|
930
|
+
items: C,
|
|
928
931
|
columns: 1,
|
|
929
932
|
density: "compact",
|
|
930
933
|
className: "[&_.metadata-list--grid]:gap-space-sm"
|
|
@@ -932,7 +935,7 @@ function bt({ code: e, amount: t, remainingAmount: i, status: s, recipientName:
|
|
|
932
935
|
!!d && /* @__PURE__ */ G(a, {
|
|
933
936
|
onClick: d,
|
|
934
937
|
className: "group/link self-start",
|
|
935
|
-
children: [g.viewDetails, /* @__PURE__ */ W(
|
|
938
|
+
children: [g.viewDetails, /* @__PURE__ */ W(Ne, {
|
|
936
939
|
"aria-hidden": "true",
|
|
937
940
|
className: "ml-1 size-icon-sm transition-transform group-hover/link:translate-x-0.5"
|
|
938
941
|
})]
|
|
@@ -941,77 +944,77 @@ function bt({ code: e, amount: t, remainingAmount: i, status: s, recipientName:
|
|
|
941
944
|
})
|
|
942
945
|
});
|
|
943
946
|
}
|
|
944
|
-
|
|
947
|
+
xt.displayName = "GiftcardCardMinimal";
|
|
945
948
|
//#endregion
|
|
946
949
|
//#region src/components/blocks/commerce/giftcard-card/giftcard-card.tsx
|
|
947
|
-
function
|
|
950
|
+
function St(e) {
|
|
948
951
|
let t = r("giftcard-card--component", e.className);
|
|
949
952
|
switch (e.variant) {
|
|
950
|
-
case "compact": return /* @__PURE__ */ W(
|
|
953
|
+
case "compact": return /* @__PURE__ */ W(gt, {
|
|
951
954
|
...e,
|
|
952
955
|
className: t
|
|
953
956
|
});
|
|
954
|
-
case "minimal": return /* @__PURE__ */ W(
|
|
957
|
+
case "minimal": return /* @__PURE__ */ W(xt, {
|
|
955
958
|
...e,
|
|
956
959
|
className: t
|
|
957
960
|
});
|
|
958
|
-
case "dark": return /* @__PURE__ */ W(
|
|
961
|
+
case "dark": return /* @__PURE__ */ W(vt, {
|
|
959
962
|
...e,
|
|
960
963
|
className: t
|
|
961
964
|
});
|
|
962
|
-
case "illustrated": return /* @__PURE__ */ W(
|
|
965
|
+
case "illustrated": return /* @__PURE__ */ W(bt, {
|
|
963
966
|
...e,
|
|
964
967
|
className: t
|
|
965
968
|
});
|
|
966
|
-
default: return /* @__PURE__ */ W(
|
|
969
|
+
default: return /* @__PURE__ */ W(yt, {
|
|
967
970
|
...e,
|
|
968
971
|
className: t
|
|
969
972
|
});
|
|
970
973
|
}
|
|
971
974
|
}
|
|
972
|
-
|
|
975
|
+
St.displayName = "GiftcardCard";
|
|
973
976
|
//#endregion
|
|
974
977
|
//#region src/components/blocks/commerce/vendor-profile/types.ts
|
|
975
|
-
var
|
|
978
|
+
var Ct = {
|
|
976
979
|
tabOverview: "Overview",
|
|
977
980
|
tabStats: "Stats",
|
|
978
981
|
totalEarnings: "Total earnings",
|
|
979
982
|
message: "Message",
|
|
980
983
|
hire: "Hire vendor",
|
|
981
984
|
verifiedAriaLabel: "Verified"
|
|
982
|
-
},
|
|
985
|
+
}, wt = {
|
|
983
986
|
secondary: "secondary",
|
|
984
987
|
success: "success",
|
|
985
988
|
warning: "warning",
|
|
986
989
|
destructive: "destructive"
|
|
987
990
|
};
|
|
988
|
-
function
|
|
989
|
-
return m(e) ? /* @__PURE__ */ W(
|
|
990
|
-
tone:
|
|
991
|
+
function Tt({ children: e, tone: t }) {
|
|
992
|
+
return m(e) ? /* @__PURE__ */ W(N, {
|
|
993
|
+
tone: wt[t ?? "secondary"],
|
|
991
994
|
className: "vendor-profile--change shrink-0 tabular-nums",
|
|
992
995
|
children: e
|
|
993
996
|
}) : null;
|
|
994
997
|
}
|
|
995
|
-
var
|
|
996
|
-
let k = n(
|
|
997
|
-
(e === "overview" || e === "stats") && P.includes(e) && (
|
|
998
|
-
},
|
|
998
|
+
var Et = Ee(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: x, onMessage: S, onHire: C, surface: w, className: E, strings: D }, O) {
|
|
999
|
+
let k = n(Ct, D), [te, A] = je(y), j = v !== void 0, M = m(l), ne = M || h.length > 0, oe = g.length > 0, P = [...ne ? ["overview"] : [], ...oe ? ["stats"] : []], se = j ? v : te, F = P.includes(se) ? se : P[0] ?? "overview", ce = P.length > 0, le = !!(S || C), ue = (e) => {
|
|
1000
|
+
(e === "overview" || e === "stats") && P.includes(e) && (j || A(e), x?.(e));
|
|
1001
|
+
}, de = /* @__PURE__ */ G(f, {
|
|
999
1002
|
gap: "xl",
|
|
1000
1003
|
className: "vendor-profile--overview",
|
|
1001
|
-
children: [
|
|
1004
|
+
children: [M && /* @__PURE__ */ G(f, {
|
|
1002
1005
|
gap: "normal",
|
|
1003
1006
|
className: "vendor-profile--earnings",
|
|
1004
1007
|
children: [/* @__PURE__ */ W(s, { children: k.totalEarnings }), /* @__PURE__ */ G(f, {
|
|
1005
1008
|
direction: "horizontal",
|
|
1006
1009
|
gap: "sm",
|
|
1007
1010
|
align: "baseline",
|
|
1008
|
-
children: [/* @__PURE__ */ W(
|
|
1011
|
+
children: [/* @__PURE__ */ W(T, {
|
|
1009
1012
|
type: "inherit",
|
|
1010
1013
|
size: "base",
|
|
1011
1014
|
weight: "semibold",
|
|
1012
1015
|
className: "tabular-nums",
|
|
1013
1016
|
children: l
|
|
1014
|
-
}), /* @__PURE__ */ W(
|
|
1017
|
+
}), /* @__PURE__ */ W(Tt, {
|
|
1015
1018
|
tone: p,
|
|
1016
1019
|
children: u
|
|
1017
1020
|
})]
|
|
@@ -1025,7 +1028,7 @@ var Tt = we(function({ name: e, initials: t, avatarUrl: a, role: o, verified: c
|
|
|
1025
1028
|
valueWeight: "medium"
|
|
1026
1029
|
}, e.id ?? t))
|
|
1027
1030
|
})]
|
|
1028
|
-
}),
|
|
1031
|
+
}), I = /* @__PURE__ */ W(d, {
|
|
1029
1032
|
columns: {
|
|
1030
1033
|
base: 1,
|
|
1031
1034
|
sm: 2
|
|
@@ -1042,48 +1045,48 @@ var Tt = we(function({ name: e, initials: t, avatarUrl: a, role: o, verified: c
|
|
|
1042
1045
|
direction: "horizontal",
|
|
1043
1046
|
gap: "sm",
|
|
1044
1047
|
align: "baseline",
|
|
1045
|
-
children: [/* @__PURE__ */ W(
|
|
1048
|
+
children: [/* @__PURE__ */ W(T, {
|
|
1046
1049
|
type: "inherit",
|
|
1047
1050
|
weight: "semibold",
|
|
1048
1051
|
className: "min-w-0 tabular-nums",
|
|
1049
1052
|
children: e.value
|
|
1050
|
-
}), /* @__PURE__ */ W(
|
|
1053
|
+
}), /* @__PURE__ */ W(Tt, {
|
|
1051
1054
|
tone: e.changeTone,
|
|
1052
1055
|
children: e.change
|
|
1053
1056
|
})]
|
|
1054
1057
|
})]
|
|
1055
1058
|
}, e.id ?? t))
|
|
1056
|
-
}),
|
|
1057
|
-
value:
|
|
1058
|
-
onValueChange:
|
|
1059
|
+
}), fe = P.length > 1 ? /* @__PURE__ */ G(xe, {
|
|
1060
|
+
value: F,
|
|
1061
|
+
onValueChange: ue,
|
|
1059
1062
|
className: "vendor-profile--tabs gap-space-lg",
|
|
1060
1063
|
children: [
|
|
1061
|
-
/* @__PURE__ */ G(
|
|
1064
|
+
/* @__PURE__ */ G(be, {
|
|
1062
1065
|
className: "grid h-auto w-full grid-cols-2 rounded-inner p-space-xs",
|
|
1063
|
-
children: [/* @__PURE__ */ W(
|
|
1066
|
+
children: [/* @__PURE__ */ W(ve, {
|
|
1064
1067
|
value: "overview",
|
|
1065
1068
|
className: "h-action-sm rounded-inner px-control-sm text-pxs",
|
|
1066
1069
|
children: k.tabOverview
|
|
1067
|
-
}), /* @__PURE__ */ W(
|
|
1070
|
+
}), /* @__PURE__ */ W(ve, {
|
|
1068
1071
|
value: "stats",
|
|
1069
1072
|
className: "h-action-sm rounded-inner px-control-sm text-pxs",
|
|
1070
1073
|
children: k.tabStats
|
|
1071
1074
|
})]
|
|
1072
1075
|
}),
|
|
1073
|
-
/* @__PURE__ */ W(
|
|
1076
|
+
/* @__PURE__ */ W(ye, {
|
|
1074
1077
|
value: "overview",
|
|
1075
1078
|
className: "mt-0",
|
|
1076
|
-
children:
|
|
1079
|
+
children: de
|
|
1077
1080
|
}),
|
|
1078
|
-
/* @__PURE__ */ W(
|
|
1081
|
+
/* @__PURE__ */ W(ye, {
|
|
1079
1082
|
value: "stats",
|
|
1080
1083
|
className: "mt-0",
|
|
1081
|
-
children:
|
|
1084
|
+
children: I
|
|
1082
1085
|
})
|
|
1083
1086
|
]
|
|
1084
|
-
}) :
|
|
1087
|
+
}) : F === "stats" ? I : de;
|
|
1085
1088
|
return /* @__PURE__ */ W(_, {
|
|
1086
|
-
ref:
|
|
1089
|
+
ref: O,
|
|
1087
1090
|
surface: w,
|
|
1088
1091
|
padding: w === "flat" ? "none" : "md",
|
|
1089
1092
|
gap: "xl",
|
|
@@ -1091,10 +1094,10 @@ var Tt = we(function({ name: e, initials: t, avatarUrl: a, role: o, verified: c
|
|
|
1091
1094
|
className: "vendor-profile--identity flex-nowrap py-0",
|
|
1092
1095
|
children: [/* @__PURE__ */ W(L, {
|
|
1093
1096
|
variant: "avatar",
|
|
1094
|
-
children: /* @__PURE__ */ G(
|
|
1097
|
+
children: /* @__PURE__ */ G(ie, { children: [!!a && /* @__PURE__ */ W(ae, {
|
|
1095
1098
|
src: a,
|
|
1096
1099
|
alt: e
|
|
1097
|
-
}), /* @__PURE__ */ W(
|
|
1100
|
+
}), /* @__PURE__ */ W(re, { children: t ?? /* @__PURE__ */ W(ee, {
|
|
1098
1101
|
value: e,
|
|
1099
1102
|
strategy: "first-words"
|
|
1100
1103
|
}) })] })
|
|
@@ -1106,7 +1109,7 @@ var Tt = we(function({ name: e, initials: t, avatarUrl: a, role: o, verified: c
|
|
|
1106
1109
|
children: [/* @__PURE__ */ W(H, {
|
|
1107
1110
|
className: "min-w-0 truncate",
|
|
1108
1111
|
children: e
|
|
1109
|
-
}), !!c && /* @__PURE__ */ W(
|
|
1112
|
+
}), !!c && /* @__PURE__ */ W(N, {
|
|
1110
1113
|
tone: "success",
|
|
1111
1114
|
className: "shrink-0",
|
|
1112
1115
|
children: k.verifiedAriaLabel
|
|
@@ -1116,35 +1119,35 @@ var Tt = we(function({ name: e, initials: t, avatarUrl: a, role: o, verified: c
|
|
|
1116
1119
|
children: o
|
|
1117
1120
|
})] })]
|
|
1118
1121
|
}),
|
|
1119
|
-
footerSlot:
|
|
1120
|
-
className: "vendor-profile--actions flex flex-wrap
|
|
1121
|
-
children: [!!
|
|
1122
|
+
footerSlot: le ? /* @__PURE__ */ G("div", {
|
|
1123
|
+
className: r("vendor-profile--actions flex flex-wrap", b.commands),
|
|
1124
|
+
children: [!!S && /* @__PURE__ */ W(i, {
|
|
1122
1125
|
type: "button",
|
|
1123
1126
|
tone: "secondary",
|
|
1124
1127
|
buttonStyle: "outline",
|
|
1125
1128
|
className: "min-w-0 flex-1",
|
|
1126
|
-
onClick:
|
|
1129
|
+
onClick: S,
|
|
1127
1130
|
children: k.message
|
|
1128
|
-
}), !!
|
|
1131
|
+
}), !!C && /* @__PURE__ */ G(i, {
|
|
1129
1132
|
type: "button",
|
|
1130
1133
|
tone: "primary",
|
|
1131
1134
|
className: "min-w-0 flex-1",
|
|
1132
|
-
onClick:
|
|
1133
|
-
children: [k.hire, /* @__PURE__ */ W(
|
|
1135
|
+
onClick: C,
|
|
1136
|
+
children: [k.hire, /* @__PURE__ */ W(Ie, {
|
|
1134
1137
|
className: "size-icon-sm",
|
|
1135
1138
|
"aria-hidden": "true"
|
|
1136
1139
|
})]
|
|
1137
1140
|
})]
|
|
1138
1141
|
}) : void 0,
|
|
1139
|
-
contentClassName: r(!
|
|
1140
|
-
className: r("vendor-profile--component",
|
|
1141
|
-
children:
|
|
1142
|
+
contentClassName: r(!ce && "hidden"),
|
|
1143
|
+
className: r("vendor-profile--component", E),
|
|
1144
|
+
children: ce ? fe : null
|
|
1142
1145
|
});
|
|
1143
1146
|
});
|
|
1144
|
-
|
|
1147
|
+
Et.displayName = "VendorProfileCard";
|
|
1145
1148
|
//#endregion
|
|
1146
1149
|
//#region src/components/blocks/commerce/inventory-level/inventory-level.strings.ts
|
|
1147
|
-
var
|
|
1150
|
+
var Dt = {
|
|
1148
1151
|
statusInStock: "In stock",
|
|
1149
1152
|
statusLowStock: "Low stock",
|
|
1150
1153
|
statusCritical: "Critical",
|
|
@@ -1155,8 +1158,8 @@ var Et = {
|
|
|
1155
1158
|
};
|
|
1156
1159
|
//#endregion
|
|
1157
1160
|
//#region src/components/blocks/commerce/inventory-level/inventory-level.tsx
|
|
1158
|
-
function
|
|
1159
|
-
let d = n(
|
|
1161
|
+
function Ot({ productName: e, variant: t, stock: i, reorderLevel: a, maxStock: s, lastRestocked: c, className: l, strings: u }) {
|
|
1162
|
+
let d = n(Dt, u), p = Oe(), m = i <= a, h = i <= a * .5, g = h ? "destructive" : m ? "warning" : "success", _ = h ? d.statusCritical : m ? d.statusLowStock : d.statusInStock;
|
|
1160
1163
|
return /* @__PURE__ */ G(f, {
|
|
1161
1164
|
"data-component": "inventory-level",
|
|
1162
1165
|
"data-slot": "inventory-level",
|
|
@@ -1176,7 +1179,7 @@ function Dt({ productName: e, variant: t, stock: i, reorderLevel: a, maxStock: s
|
|
|
1176
1179
|
weight: "semibold",
|
|
1177
1180
|
className: "min-w-0 truncate",
|
|
1178
1181
|
children: e
|
|
1179
|
-
}), /* @__PURE__ */ W(
|
|
1182
|
+
}), /* @__PURE__ */ W(N, {
|
|
1180
1183
|
tone: g,
|
|
1181
1184
|
className: "shrink-0",
|
|
1182
1185
|
children: _
|
|
@@ -1192,7 +1195,7 @@ function Dt({ productName: e, variant: t, stock: i, reorderLevel: a, maxStock: s
|
|
|
1192
1195
|
id: p,
|
|
1193
1196
|
gap: "dense",
|
|
1194
1197
|
className: "inventory-level--stock",
|
|
1195
|
-
children: [/* @__PURE__ */ W(
|
|
1198
|
+
children: [/* @__PURE__ */ W(M, {
|
|
1196
1199
|
type: "inherit",
|
|
1197
1200
|
value: i,
|
|
1198
1201
|
weight: "semibold",
|
|
@@ -1219,7 +1222,7 @@ function Dt({ productName: e, variant: t, stock: i, reorderLevel: a, maxStock: s
|
|
|
1219
1222
|
children: [
|
|
1220
1223
|
d.reorderAtLabel,
|
|
1221
1224
|
": ",
|
|
1222
|
-
/* @__PURE__ */ W(
|
|
1225
|
+
/* @__PURE__ */ W(M, {
|
|
1223
1226
|
type: "inherit",
|
|
1224
1227
|
value: a,
|
|
1225
1228
|
weight: "medium",
|
|
@@ -1232,7 +1235,7 @@ function Dt({ productName: e, variant: t, stock: i, reorderLevel: a, maxStock: s
|
|
|
1232
1235
|
children: [
|
|
1233
1236
|
d.lastRestockedLabel,
|
|
1234
1237
|
": ",
|
|
1235
|
-
/* @__PURE__ */ W(
|
|
1238
|
+
/* @__PURE__ */ W(D, {
|
|
1236
1239
|
size: "xs",
|
|
1237
1240
|
children: c
|
|
1238
1241
|
})
|
|
@@ -1243,10 +1246,10 @@ function Dt({ productName: e, variant: t, stock: i, reorderLevel: a, maxStock: s
|
|
|
1243
1246
|
]
|
|
1244
1247
|
});
|
|
1245
1248
|
}
|
|
1246
|
-
|
|
1249
|
+
Ot.displayName = "InventoryLevel";
|
|
1247
1250
|
//#endregion
|
|
1248
1251
|
//#region src/components/blocks/commerce/tax-breakdown/types.ts
|
|
1249
|
-
var
|
|
1252
|
+
var kt = {
|
|
1250
1253
|
title: "Tax breakdown",
|
|
1251
1254
|
subtotal: "Subtotal",
|
|
1252
1255
|
totalTax: "Total tax",
|
|
@@ -1254,8 +1257,8 @@ var Ot = {
|
|
|
1254
1257
|
};
|
|
1255
1258
|
//#endregion
|
|
1256
1259
|
//#region src/components/blocks/commerce/tax-breakdown/tax-breakdown.tsx
|
|
1257
|
-
function
|
|
1258
|
-
let l = n(
|
|
1260
|
+
function At({ subtotal: e, taxes: t, totalTax: i, total: a, className: o, strings: s, ...c }) {
|
|
1261
|
+
let l = n(kt, s);
|
|
1259
1262
|
return /* @__PURE__ */ W(_, {
|
|
1260
1263
|
...c,
|
|
1261
1264
|
surface: "flat",
|
|
@@ -1263,24 +1266,24 @@ function kt({ subtotal: e, taxes: t, totalTax: i, total: a, className: o, string
|
|
|
1263
1266
|
title: l.title,
|
|
1264
1267
|
"data-slot": "tax-breakdown",
|
|
1265
1268
|
className: r("tax-breakdown--component w-full", o),
|
|
1266
|
-
children: /* @__PURE__ */ G(
|
|
1269
|
+
children: /* @__PURE__ */ G(J, {
|
|
1267
1270
|
className: "tax-breakdown--ledger",
|
|
1268
1271
|
children: [
|
|
1269
|
-
/* @__PURE__ */ W(
|
|
1272
|
+
/* @__PURE__ */ W(q, {
|
|
1270
1273
|
label: l.subtotal,
|
|
1271
1274
|
amount: e
|
|
1272
1275
|
}),
|
|
1273
|
-
t.map((e, t) => /* @__PURE__ */ W(
|
|
1276
|
+
t.map((e, t) => /* @__PURE__ */ W(q, {
|
|
1274
1277
|
className: "tax-breakdown--line",
|
|
1275
1278
|
label: e.label,
|
|
1276
1279
|
note: e.rate,
|
|
1277
1280
|
amount: e.amount
|
|
1278
1281
|
}, e.id ?? `${e.label}-${t}`)),
|
|
1279
|
-
!!i && t.length > 1 && /* @__PURE__ */ W(
|
|
1282
|
+
!!i && t.length > 1 && /* @__PURE__ */ W(q, {
|
|
1280
1283
|
label: l.totalTax,
|
|
1281
1284
|
amount: i
|
|
1282
1285
|
}),
|
|
1283
|
-
/* @__PURE__ */ W(
|
|
1286
|
+
/* @__PURE__ */ W(q, {
|
|
1284
1287
|
label: l.total,
|
|
1285
1288
|
amount: a,
|
|
1286
1289
|
total: !0,
|
|
@@ -1290,10 +1293,10 @@ function kt({ subtotal: e, taxes: t, totalTax: i, total: a, className: o, string
|
|
|
1290
1293
|
})
|
|
1291
1294
|
});
|
|
1292
1295
|
}
|
|
1293
|
-
|
|
1296
|
+
At.displayName = "TaxBreakdownCard";
|
|
1294
1297
|
//#endregion
|
|
1295
1298
|
//#region src/components/blocks/commerce/subscription-summary/types.ts
|
|
1296
|
-
var
|
|
1299
|
+
var jt = {
|
|
1297
1300
|
title: "Subscription",
|
|
1298
1301
|
plan: "Plan",
|
|
1299
1302
|
nextBilling: "Next billing",
|
|
@@ -1303,11 +1306,11 @@ var At = {
|
|
|
1303
1306
|
};
|
|
1304
1307
|
//#endregion
|
|
1305
1308
|
//#region src/components/blocks/commerce/subscription-summary/subscription-summary.tsx
|
|
1306
|
-
function
|
|
1307
|
-
let _ = n(
|
|
1309
|
+
function Mt({ planName: e, priceLabel: t, cycleLabel: a, nextBillingDate: l, statusLabel: u, perks: d = [], onManage: p, onUpgrade: m, className: h, strings: g }) {
|
|
1310
|
+
let _ = n(jt, g);
|
|
1308
1311
|
return /* @__PURE__ */ G(I, {
|
|
1309
1312
|
title: _.title,
|
|
1310
|
-
titleSuffix: u ? /* @__PURE__ */ W(
|
|
1313
|
+
titleSuffix: u ? /* @__PURE__ */ W(N, {
|
|
1311
1314
|
tone: "success",
|
|
1312
1315
|
children: u
|
|
1313
1316
|
}) : null,
|
|
@@ -1335,7 +1338,7 @@ function jt({ planName: e, priceLabel: t, cycleLabel: a, nextBillingDate: l, sta
|
|
|
1335
1338
|
align: "baseline",
|
|
1336
1339
|
gap: "xs",
|
|
1337
1340
|
className: "shrink-0",
|
|
1338
|
-
children: [/* @__PURE__ */ W(
|
|
1341
|
+
children: [/* @__PURE__ */ W(T, {
|
|
1339
1342
|
type: "inherit",
|
|
1340
1343
|
weight: "bold",
|
|
1341
1344
|
className: "tabular-nums",
|
|
@@ -1355,7 +1358,7 @@ function jt({ planName: e, priceLabel: t, cycleLabel: a, nextBillingDate: l, sta
|
|
|
1355
1358
|
d.length > 0 && /* @__PURE__ */ G(f, {
|
|
1356
1359
|
gap: "md",
|
|
1357
1360
|
className: "subscription-summary--perks",
|
|
1358
|
-
children: [/* @__PURE__ */ W(s, { children: _.perks }), /* @__PURE__ */ W(
|
|
1361
|
+
children: [/* @__PURE__ */ W(s, { children: _.perks }), /* @__PURE__ */ W(ge, { children: d.map((e, t) => {
|
|
1359
1362
|
let n = e.icon;
|
|
1360
1363
|
return /* @__PURE__ */ G(V, {
|
|
1361
1364
|
size: "sm",
|
|
@@ -1382,16 +1385,16 @@ function jt({ planName: e, priceLabel: t, cycleLabel: a, nextBillingDate: l, sta
|
|
|
1382
1385
|
tone: "primary",
|
|
1383
1386
|
onClick: m,
|
|
1384
1387
|
className: "flex-1",
|
|
1385
|
-
children: [_.upgrade, /* @__PURE__ */ W(
|
|
1388
|
+
children: [_.upgrade, /* @__PURE__ */ W(Ie, { className: "ml-1 size-icon-md" })]
|
|
1386
1389
|
})]
|
|
1387
1390
|
})
|
|
1388
1391
|
]
|
|
1389
1392
|
});
|
|
1390
1393
|
}
|
|
1391
|
-
|
|
1394
|
+
Mt.displayName = "SubscriptionSummaryCard";
|
|
1392
1395
|
//#endregion
|
|
1393
1396
|
//#region src/components/blocks/commerce/refund-status/types.ts
|
|
1394
|
-
var
|
|
1397
|
+
var Nt = {
|
|
1395
1398
|
title: "Refund status",
|
|
1396
1399
|
requested: "Requested",
|
|
1397
1400
|
approved: "Approved",
|
|
@@ -1401,17 +1404,17 @@ var Mt = {
|
|
|
1401
1404
|
reason: "Reason",
|
|
1402
1405
|
eta: "Expected by",
|
|
1403
1406
|
method: "Refund to"
|
|
1404
|
-
},
|
|
1407
|
+
}, Pt = [
|
|
1405
1408
|
"requested",
|
|
1406
1409
|
"approved",
|
|
1407
1410
|
"processing",
|
|
1408
1411
|
"completed"
|
|
1409
1412
|
];
|
|
1410
|
-
function
|
|
1413
|
+
function X(e) {
|
|
1411
1414
|
return e != null && e !== !1 && e !== "";
|
|
1412
1415
|
}
|
|
1413
|
-
function
|
|
1414
|
-
let m = n(
|
|
1416
|
+
function Ft({ stage: e, amount: t, reason: i, method: a, eta: s, requestedAt: c, className: l, strings: u, ...d }) {
|
|
1417
|
+
let m = n(Nt, u), h = Pt.indexOf(e), g = X(i) || X(a) || X(s);
|
|
1415
1418
|
return /* @__PURE__ */ G(_, {
|
|
1416
1419
|
...d,
|
|
1417
1420
|
surface: "flat",
|
|
@@ -1423,7 +1426,7 @@ function Pt({ stage: e, amount: t, reason: i, method: a, eta: s, requestedAt: c,
|
|
|
1423
1426
|
children: [
|
|
1424
1427
|
/* @__PURE__ */ G(f, {
|
|
1425
1428
|
gap: "dense",
|
|
1426
|
-
children: [/* @__PURE__ */ W(
|
|
1429
|
+
children: [/* @__PURE__ */ W(q, {
|
|
1427
1430
|
label: m.amount,
|
|
1428
1431
|
amount: t,
|
|
1429
1432
|
total: !0,
|
|
@@ -1434,7 +1437,7 @@ function Pt({ stage: e, amount: t, reason: i, method: a, eta: s, requestedAt: c,
|
|
|
1434
1437
|
children: [
|
|
1435
1438
|
m.requested,
|
|
1436
1439
|
": ",
|
|
1437
|
-
/* @__PURE__ */ W(
|
|
1440
|
+
/* @__PURE__ */ W(D, {
|
|
1438
1441
|
size: "xs",
|
|
1439
1442
|
children: c
|
|
1440
1443
|
})
|
|
@@ -1443,7 +1446,7 @@ function Pt({ stage: e, amount: t, reason: i, method: a, eta: s, requestedAt: c,
|
|
|
1443
1446
|
}),
|
|
1444
1447
|
/* @__PURE__ */ W("ol", {
|
|
1445
1448
|
className: "refund-status--stages m-0 flex list-none items-start p-0",
|
|
1446
|
-
children:
|
|
1449
|
+
children: Pt.map((e, t) => {
|
|
1447
1450
|
let n = t <= h, i = t === h;
|
|
1448
1451
|
return /* @__PURE__ */ G("li", {
|
|
1449
1452
|
"data-reached": n ? "" : void 0,
|
|
@@ -1455,14 +1458,14 @@ function Pt({ stage: e, amount: t, reason: i, method: a, eta: s, requestedAt: c,
|
|
|
1455
1458
|
className: "flex w-full items-center",
|
|
1456
1459
|
children: [/* @__PURE__ */ W("div", {
|
|
1457
1460
|
className: r("relative flex size-icon-lg shrink-0 items-center justify-center rounded-full", n ? "bg-success text-success-foreground" : "border border-border bg-card text-muted-foreground", i && r("ring-4", p.success.halo)),
|
|
1458
|
-
children: n ? /* @__PURE__ */ W(
|
|
1461
|
+
children: n ? /* @__PURE__ */ W(K, { className: "size-icon-sm" }) : /* @__PURE__ */ W(M, {
|
|
1459
1462
|
type: "inherit",
|
|
1460
1463
|
value: t + 1,
|
|
1461
1464
|
size: "xs",
|
|
1462
1465
|
weight: "medium",
|
|
1463
1466
|
align: "center"
|
|
1464
1467
|
})
|
|
1465
|
-
}), t <
|
|
1468
|
+
}), t < Pt.length - 1 && /* @__PURE__ */ W("div", { className: r("h-0.5 flex-1", t < h ? "bg-success" : "bg-border") })]
|
|
1466
1469
|
}), /* @__PURE__ */ W(o, {
|
|
1467
1470
|
size: "xs",
|
|
1468
1471
|
weight: i ? "semibold" : "medium",
|
|
@@ -1478,19 +1481,19 @@ function Pt({ stage: e, amount: t, reason: i, method: a, eta: s, requestedAt: c,
|
|
|
1478
1481
|
gap: "md",
|
|
1479
1482
|
className: "refund-status--facts",
|
|
1480
1483
|
children: [
|
|
1481
|
-
|
|
1484
|
+
X(i) && /* @__PURE__ */ W(U, {
|
|
1482
1485
|
label: m.reason,
|
|
1483
1486
|
value: i,
|
|
1484
1487
|
className: "items-start",
|
|
1485
1488
|
valueWeight: "medium",
|
|
1486
1489
|
valueClassName: "text-end"
|
|
1487
1490
|
}),
|
|
1488
|
-
|
|
1491
|
+
X(a) && /* @__PURE__ */ W(U, {
|
|
1489
1492
|
label: m.method,
|
|
1490
1493
|
value: a,
|
|
1491
1494
|
valueWeight: "medium"
|
|
1492
1495
|
}),
|
|
1493
|
-
|
|
1496
|
+
X(s) && /* @__PURE__ */ W(U, {
|
|
1494
1497
|
label: m.eta,
|
|
1495
1498
|
value: s,
|
|
1496
1499
|
valueWeight: "medium",
|
|
@@ -1501,11 +1504,11 @@ function Pt({ stage: e, amount: t, reason: i, method: a, eta: s, requestedAt: c,
|
|
|
1501
1504
|
]
|
|
1502
1505
|
});
|
|
1503
1506
|
}
|
|
1504
|
-
|
|
1505
|
-
var
|
|
1507
|
+
Ft.displayName = "RefundStatusCard";
|
|
1508
|
+
var It = Ft;
|
|
1506
1509
|
//#endregion
|
|
1507
1510
|
//#region src/components/blocks/commerce/shared/address-lines.tsx
|
|
1508
|
-
function
|
|
1511
|
+
function Lt({ address: e, prominent: t = !1, className: n, ...i }) {
|
|
1509
1512
|
let a = [
|
|
1510
1513
|
e.city,
|
|
1511
1514
|
e.region,
|
|
@@ -1537,7 +1540,7 @@ function It({ address: e, prominent: t = !1, className: n, ...i }) {
|
|
|
1537
1540
|
type: "secondary",
|
|
1538
1541
|
children: e.country
|
|
1539
1542
|
}),
|
|
1540
|
-
!!e.phone && /* @__PURE__ */ W(
|
|
1543
|
+
!!e.phone && /* @__PURE__ */ W(E, {
|
|
1541
1544
|
value: e.phone,
|
|
1542
1545
|
className: "self-start"
|
|
1543
1546
|
})
|
|
@@ -1546,7 +1549,7 @@ function It({ address: e, prominent: t = !1, className: n, ...i }) {
|
|
|
1546
1549
|
}
|
|
1547
1550
|
//#endregion
|
|
1548
1551
|
//#region src/components/blocks/commerce/address-card/types.ts
|
|
1549
|
-
var
|
|
1552
|
+
var Rt = {
|
|
1550
1553
|
defaultBadge: "Default",
|
|
1551
1554
|
edit: "Edit",
|
|
1552
1555
|
remove: "Remove",
|
|
@@ -1557,42 +1560,42 @@ var Lt = {
|
|
|
1557
1560
|
};
|
|
1558
1561
|
//#endregion
|
|
1559
1562
|
//#region src/components/blocks/commerce/address-card/address-card.tsx
|
|
1560
|
-
function
|
|
1561
|
-
let
|
|
1562
|
-
shipping:
|
|
1563
|
-
billing:
|
|
1564
|
-
pickup:
|
|
1563
|
+
function zt({ kind: e = "shipping", name: t, line1: i, line2: a, city: s, region: c, postalCode: l, country: u, phone: d, default: p = !1, onEdit: m, onRemove: h, onMakeDefault: g, surface: v = "flat", padding: y = v === "flat" ? "none" : "md", headerDivider: b, className: x, strings: S, ...C }) {
|
|
1564
|
+
let w = n(Rt, S), T = {
|
|
1565
|
+
shipping: w.shipping,
|
|
1566
|
+
billing: w.billing,
|
|
1567
|
+
pickup: w.pickup
|
|
1565
1568
|
}, D = [];
|
|
1566
1569
|
return m && D.push({
|
|
1567
1570
|
id: "edit",
|
|
1568
|
-
label:
|
|
1569
|
-
icon: /* @__PURE__ */ W(
|
|
1571
|
+
label: w.edit,
|
|
1572
|
+
icon: /* @__PURE__ */ W(Be, { className: "size-icon-md" }),
|
|
1570
1573
|
onClick: m
|
|
1571
1574
|
}), g && !p && D.push({
|
|
1572
1575
|
id: "make-default",
|
|
1573
|
-
label:
|
|
1574
|
-
icon: /* @__PURE__ */ W(
|
|
1576
|
+
label: w.makeDefault,
|
|
1577
|
+
icon: /* @__PURE__ */ W(We, { className: "size-icon-md" }),
|
|
1575
1578
|
onClick: g
|
|
1576
1579
|
}), h && D.push({
|
|
1577
1580
|
id: "remove",
|
|
1578
|
-
label:
|
|
1579
|
-
icon: /* @__PURE__ */ W(
|
|
1581
|
+
label: w.remove,
|
|
1582
|
+
icon: /* @__PURE__ */ W(Ge, { className: "size-icon-md" }),
|
|
1580
1583
|
onClick: h
|
|
1581
1584
|
}), /* @__PURE__ */ W(_, {
|
|
1582
1585
|
...C,
|
|
1583
1586
|
surface: v,
|
|
1584
1587
|
padding: y,
|
|
1585
1588
|
headerDivider: b,
|
|
1586
|
-
title:
|
|
1587
|
-
titleSuffix: p ? /* @__PURE__ */ W(
|
|
1589
|
+
title: T[e],
|
|
1590
|
+
titleSuffix: p ? /* @__PURE__ */ W(N, {
|
|
1588
1591
|
tone: "neutral",
|
|
1589
|
-
children:
|
|
1592
|
+
children: w.defaultBadge
|
|
1590
1593
|
}) : null,
|
|
1591
1594
|
actions: D.length > 0 ? D : void 0,
|
|
1592
1595
|
className: r("address-card--component w-full", x),
|
|
1593
1596
|
children: /* @__PURE__ */ G(f, {
|
|
1594
1597
|
gap: "md",
|
|
1595
|
-
children: [/* @__PURE__ */ W(
|
|
1598
|
+
children: [/* @__PURE__ */ W(Lt, {
|
|
1596
1599
|
address: {
|
|
1597
1600
|
name: t,
|
|
1598
1601
|
line1: i,
|
|
@@ -1603,7 +1606,7 @@ function Rt({ kind: e = "shipping", name: t, line1: i, line2: a, city: s, region
|
|
|
1603
1606
|
country: u
|
|
1604
1607
|
},
|
|
1605
1608
|
prominent: !0
|
|
1606
|
-
}), !!d && /* @__PURE__ */ W(
|
|
1609
|
+
}), !!d && /* @__PURE__ */ W(E, {
|
|
1607
1610
|
value: d,
|
|
1608
1611
|
display: /* @__PURE__ */ W(o, {
|
|
1609
1612
|
type: "inherit",
|
|
@@ -1615,10 +1618,10 @@ function Rt({ kind: e = "shipping", name: t, line1: i, line2: a, city: s, region
|
|
|
1615
1618
|
})
|
|
1616
1619
|
});
|
|
1617
1620
|
}
|
|
1618
|
-
|
|
1621
|
+
zt.displayName = "AddressCard";
|
|
1619
1622
|
//#endregion
|
|
1620
1623
|
//#region src/components/blocks/commerce/voucher-entry/types.ts
|
|
1621
|
-
var
|
|
1624
|
+
var Bt = {
|
|
1622
1625
|
title: "Redeem a gift card",
|
|
1623
1626
|
inputLabel: "Gift card code",
|
|
1624
1627
|
placeholder: "Enter gift card code",
|
|
@@ -1628,9 +1631,9 @@ var zt = {
|
|
|
1628
1631
|
balance: "Available balance",
|
|
1629
1632
|
applied: "Applied",
|
|
1630
1633
|
notFound: "That gift card code is not valid."
|
|
1631
|
-
},
|
|
1632
|
-
function
|
|
1633
|
-
let m = n(
|
|
1634
|
+
}, Vt = (e) => e.toUpperCase();
|
|
1635
|
+
function Ht({ appliedCode: e, balance: t, error: a, loading: o, onCheck: c, onRemove: l, className: u, strings: d }) {
|
|
1636
|
+
let m = n(Bt, d), h = Oe(), [g, _] = je(""), v = g.trim();
|
|
1634
1637
|
return e ? /* @__PURE__ */ W(I, {
|
|
1635
1638
|
title: m.title,
|
|
1636
1639
|
className: r("voucher-entry--component w-full", u),
|
|
@@ -1639,8 +1642,8 @@ function Vt({ appliedCode: e, balance: t, error: a, loading: o, onCheck: c, onRe
|
|
|
1639
1642
|
variant: "muted",
|
|
1640
1643
|
className: r("items-center gap-y-space-sm border", p.success.edge, p.success.wash),
|
|
1641
1644
|
children: [
|
|
1642
|
-
/* @__PURE__ */ W(L, { children: /* @__PURE__ */ W(
|
|
1643
|
-
icon:
|
|
1645
|
+
/* @__PURE__ */ W(L, { children: /* @__PURE__ */ W(ne, {
|
|
1646
|
+
icon: K,
|
|
1644
1647
|
tone: "success",
|
|
1645
1648
|
size: "md"
|
|
1646
1649
|
}) }),
|
|
@@ -1653,7 +1656,7 @@ function Vt({ appliedCode: e, balance: t, error: a, loading: o, onCheck: c, onRe
|
|
|
1653
1656
|
className: "min-w-0",
|
|
1654
1657
|
children: [/* @__PURE__ */ W(H, {
|
|
1655
1658
|
className: "max-w-full",
|
|
1656
|
-
children: /* @__PURE__ */ W(
|
|
1659
|
+
children: /* @__PURE__ */ W(O, {
|
|
1657
1660
|
type: "inherit",
|
|
1658
1661
|
className: "tracking-wider",
|
|
1659
1662
|
children: e
|
|
@@ -1669,7 +1672,7 @@ function Vt({ appliedCode: e, balance: t, error: a, loading: o, onCheck: c, onRe
|
|
|
1669
1672
|
}),
|
|
1670
1673
|
/* @__PURE__ */ G(z, {
|
|
1671
1674
|
className: "ml-auto shrink-0 gap-space-sm",
|
|
1672
|
-
children: [!!t && /* @__PURE__ */ W(
|
|
1675
|
+
children: [!!t && /* @__PURE__ */ W(T, {
|
|
1673
1676
|
type: "inherit",
|
|
1674
1677
|
weight: "semibold",
|
|
1675
1678
|
className: "shrink-0 tabular-nums",
|
|
@@ -1683,7 +1686,7 @@ function Vt({ appliedCode: e, balance: t, error: a, loading: o, onCheck: c, onRe
|
|
|
1683
1686
|
onClick: l,
|
|
1684
1687
|
"aria-label": m.remove,
|
|
1685
1688
|
className: "size-action-xs shrink-0 text-muted-foreground hover:text-destructive",
|
|
1686
|
-
children: /* @__PURE__ */ W(
|
|
1689
|
+
children: /* @__PURE__ */ W(qe, { className: "size-icon-sm" })
|
|
1687
1690
|
})]
|
|
1688
1691
|
})
|
|
1689
1692
|
]
|
|
@@ -1704,10 +1707,10 @@ function Vt({ appliedCode: e, balance: t, error: a, loading: o, onCheck: c, onRe
|
|
|
1704
1707
|
className: "flex flex-wrap gap-space-md",
|
|
1705
1708
|
children: [/* @__PURE__ */ W("div", {
|
|
1706
1709
|
className: "min-w-48 flex-1",
|
|
1707
|
-
children: /* @__PURE__ */ W(
|
|
1710
|
+
children: /* @__PURE__ */ W(P, {
|
|
1708
1711
|
id: h,
|
|
1709
1712
|
value: g,
|
|
1710
|
-
onChange: (e) => _(
|
|
1713
|
+
onChange: (e) => _(Vt(e.target.value)),
|
|
1711
1714
|
placeholder: m.placeholder,
|
|
1712
1715
|
autoCapitalize: "characters",
|
|
1713
1716
|
spellCheck: !1,
|
|
@@ -1727,14 +1730,14 @@ function Vt({ appliedCode: e, balance: t, error: a, loading: o, onCheck: c, onRe
|
|
|
1727
1730
|
})
|
|
1728
1731
|
});
|
|
1729
1732
|
}
|
|
1730
|
-
|
|
1733
|
+
Ht.displayName = "VoucherEntry";
|
|
1731
1734
|
//#endregion
|
|
1732
1735
|
//#region src/components/blocks/commerce/shared/line-thumbnail.tsx
|
|
1733
|
-
function
|
|
1736
|
+
function Ut({ title: e }) {
|
|
1734
1737
|
return /* @__PURE__ */ W("div", {
|
|
1735
1738
|
"aria-hidden": "true",
|
|
1736
1739
|
className: "line-thumbnail--placeholder flex size-full items-center justify-center rounded-[inherit] bg-muted ring-1 ring-border/60",
|
|
1737
|
-
children: /* @__PURE__ */ W(
|
|
1740
|
+
children: /* @__PURE__ */ W(ee, {
|
|
1738
1741
|
value: e,
|
|
1739
1742
|
strategy: "first-words",
|
|
1740
1743
|
fallback: e.trim().slice(0, 2).toUpperCase(),
|
|
@@ -1744,9 +1747,9 @@ function Ht({ title: e }) {
|
|
|
1744
1747
|
})
|
|
1745
1748
|
});
|
|
1746
1749
|
}
|
|
1747
|
-
function
|
|
1748
|
-
let [r, i] =
|
|
1749
|
-
return !a || r === a ? /* @__PURE__ */ W(
|
|
1750
|
+
function Wt({ src: e, alt: t, title: n }) {
|
|
1751
|
+
let [r, i] = je(void 0), a = e?.trim() ? e : void 0;
|
|
1752
|
+
return !a || r === a ? /* @__PURE__ */ W(Ut, { title: n }) : /* @__PURE__ */ W("img", {
|
|
1750
1753
|
src: a,
|
|
1751
1754
|
alt: t ?? n,
|
|
1752
1755
|
className: "line-thumbnail--image",
|
|
@@ -1755,7 +1758,7 @@ function Ut({ src: e, alt: t, title: n }) {
|
|
|
1755
1758
|
}
|
|
1756
1759
|
//#endregion
|
|
1757
1760
|
//#region src/components/blocks/commerce/cart-summary/types.ts
|
|
1758
|
-
var
|
|
1761
|
+
var Gt = {
|
|
1759
1762
|
title: "Cart",
|
|
1760
1763
|
subtotal: "Subtotal",
|
|
1761
1764
|
tax: "Tax",
|
|
@@ -1764,18 +1767,18 @@ var Wt = {
|
|
|
1764
1767
|
total: "Total",
|
|
1765
1768
|
checkout: "Checkout",
|
|
1766
1769
|
formatQuantity: (e) => `×${e}`
|
|
1767
|
-
},
|
|
1770
|
+
}, Kt = (e) => [
|
|
1768
1771
|
e.productTitle,
|
|
1769
1772
|
e.title,
|
|
1770
1773
|
e.name
|
|
1771
|
-
].find((e) => !!e?.trim()) ?? e.id,
|
|
1774
|
+
].find((e) => !!e?.trim()) ?? e.id, qt = (e) => [
|
|
1772
1775
|
e.imageUrl,
|
|
1773
1776
|
e.imageSrc,
|
|
1774
1777
|
e.src,
|
|
1775
1778
|
e.url
|
|
1776
1779
|
].find((e) => !!e?.trim());
|
|
1777
|
-
function
|
|
1778
|
-
let h = n(
|
|
1780
|
+
function Jt({ items: e, subtotal: t, tax: a, shipping: s, discount: c, total: l, onCheckout: u, className: d, strings: p, ...m }) {
|
|
1781
|
+
let h = n(Gt, p), g = !!(t || a || s || c);
|
|
1779
1782
|
return /* @__PURE__ */ G(_, {
|
|
1780
1783
|
...m,
|
|
1781
1784
|
surface: "flat",
|
|
@@ -1785,15 +1788,15 @@ function qt({ items: e, subtotal: t, tax: a, shipping: s, discount: c, total: l,
|
|
|
1785
1788
|
"data-slot": "cart-summary",
|
|
1786
1789
|
className: r("cart-summary--component w-full", d),
|
|
1787
1790
|
children: [
|
|
1788
|
-
/* @__PURE__ */ W(
|
|
1789
|
-
let t =
|
|
1791
|
+
/* @__PURE__ */ W(ge, { children: e.map((e) => {
|
|
1792
|
+
let t = Kt(e), n = qt(e);
|
|
1790
1793
|
return /* @__PURE__ */ G(V, {
|
|
1791
1794
|
className: "cart-summary--item",
|
|
1792
1795
|
children: [
|
|
1793
1796
|
/* @__PURE__ */ W(L, {
|
|
1794
1797
|
variant: "image",
|
|
1795
1798
|
className: "cart-summary--item-media",
|
|
1796
|
-
children: /* @__PURE__ */ W(
|
|
1799
|
+
children: /* @__PURE__ */ W(Wt, {
|
|
1797
1800
|
src: n,
|
|
1798
1801
|
alt: e.imageAlt,
|
|
1799
1802
|
title: t
|
|
@@ -1818,7 +1821,7 @@ function qt({ items: e, subtotal: t, tax: a, shipping: s, discount: c, total: l,
|
|
|
1818
1821
|
type: "secondary",
|
|
1819
1822
|
className: "cart-summary--quantity tabular-nums",
|
|
1820
1823
|
children: h.formatQuantity(e.qty)
|
|
1821
|
-
}), /* @__PURE__ */ W(
|
|
1824
|
+
}), /* @__PURE__ */ W(T, {
|
|
1822
1825
|
type: "inherit",
|
|
1823
1826
|
weight: "semibold",
|
|
1824
1827
|
className: "tabular-nums",
|
|
@@ -1829,27 +1832,27 @@ function qt({ items: e, subtotal: t, tax: a, shipping: s, discount: c, total: l,
|
|
|
1829
1832
|
]
|
|
1830
1833
|
}, e.id);
|
|
1831
1834
|
}) }),
|
|
1832
|
-
/* @__PURE__ */ G(
|
|
1835
|
+
/* @__PURE__ */ G(J, {
|
|
1833
1836
|
className: "cart-summary--totals",
|
|
1834
1837
|
children: [
|
|
1835
|
-
!!t && /* @__PURE__ */ W(
|
|
1838
|
+
!!t && /* @__PURE__ */ W(q, {
|
|
1836
1839
|
label: h.subtotal,
|
|
1837
1840
|
amount: t
|
|
1838
1841
|
}),
|
|
1839
|
-
!!a && /* @__PURE__ */ W(
|
|
1842
|
+
!!a && /* @__PURE__ */ W(q, {
|
|
1840
1843
|
label: h.tax,
|
|
1841
1844
|
amount: a
|
|
1842
1845
|
}),
|
|
1843
|
-
!!s && /* @__PURE__ */ W(
|
|
1846
|
+
!!s && /* @__PURE__ */ W(q, {
|
|
1844
1847
|
label: h.shipping,
|
|
1845
1848
|
amount: s
|
|
1846
1849
|
}),
|
|
1847
|
-
!!c && /* @__PURE__ */ W(
|
|
1850
|
+
!!c && /* @__PURE__ */ W(q, {
|
|
1848
1851
|
label: h.discount,
|
|
1849
1852
|
amount: c,
|
|
1850
1853
|
deduction: !0
|
|
1851
1854
|
}),
|
|
1852
|
-
/* @__PURE__ */ W(
|
|
1855
|
+
/* @__PURE__ */ W(q, {
|
|
1853
1856
|
label: h.total,
|
|
1854
1857
|
amount: l,
|
|
1855
1858
|
total: !0,
|
|
@@ -1866,8 +1869,8 @@ function qt({ items: e, subtotal: t, tax: a, shipping: s, discount: c, total: l,
|
|
|
1866
1869
|
]
|
|
1867
1870
|
});
|
|
1868
1871
|
}
|
|
1869
|
-
|
|
1870
|
-
var
|
|
1872
|
+
Jt.displayName = "CartSummaryCard";
|
|
1873
|
+
var Yt = Jt, Xt = {
|
|
1871
1874
|
title: "Have a code?",
|
|
1872
1875
|
fieldLabel: "Coupon code",
|
|
1873
1876
|
placeholder: "Enter coupon code",
|
|
@@ -1875,9 +1878,9 @@ var Jt = qt, Yt = {
|
|
|
1875
1878
|
remove: "Remove",
|
|
1876
1879
|
applied: "Applied",
|
|
1877
1880
|
invalid: "That code is not valid"
|
|
1878
|
-
},
|
|
1879
|
-
function
|
|
1880
|
-
let h = n(
|
|
1881
|
+
}, Zt = (e) => e.toUpperCase();
|
|
1882
|
+
function Qt({ appliedCode: e, appliedDiscount: t, error: a, onApply: c, onRemove: l, loading: u, className: d, strings: m }) {
|
|
1883
|
+
let h = n(Xt, m), [g, _] = je(""), v = g.trim();
|
|
1881
1884
|
return e ? /* @__PURE__ */ W(I, {
|
|
1882
1885
|
title: h.title,
|
|
1883
1886
|
className: r("coupon-input--component w-full", d),
|
|
@@ -1886,8 +1889,8 @@ function Zt({ appliedCode: e, appliedDiscount: t, error: a, onApply: c, onRemove
|
|
|
1886
1889
|
variant: "muted",
|
|
1887
1890
|
className: r("items-center gap-y-space-sm border", p.success.edge, p.success.wash),
|
|
1888
1891
|
children: [
|
|
1889
|
-
/* @__PURE__ */ W(L, { children: /* @__PURE__ */ W(
|
|
1890
|
-
icon:
|
|
1892
|
+
/* @__PURE__ */ W(L, { children: /* @__PURE__ */ W(ne, {
|
|
1893
|
+
icon: K,
|
|
1891
1894
|
tone: "success",
|
|
1892
1895
|
size: "md"
|
|
1893
1896
|
}) }),
|
|
@@ -1917,7 +1920,7 @@ function Zt({ appliedCode: e, appliedDiscount: t, error: a, onApply: c, onRemove
|
|
|
1917
1920
|
weight: "semibold",
|
|
1918
1921
|
type: "success",
|
|
1919
1922
|
className: "tabular-nums shrink-0",
|
|
1920
|
-
children:
|
|
1923
|
+
children: et(t)
|
|
1921
1924
|
}), !!l && /* @__PURE__ */ W(i, {
|
|
1922
1925
|
type: "button",
|
|
1923
1926
|
tone: "destructive",
|
|
@@ -1927,7 +1930,7 @@ function Zt({ appliedCode: e, appliedDiscount: t, error: a, onApply: c, onRemove
|
|
|
1927
1930
|
onClick: l,
|
|
1928
1931
|
"aria-label": h.remove,
|
|
1929
1932
|
className: "size-action-xs shrink-0 text-muted-foreground hover:text-destructive",
|
|
1930
|
-
children: /* @__PURE__ */ W(
|
|
1933
|
+
children: /* @__PURE__ */ W(qe, { className: "size-icon-sm" })
|
|
1931
1934
|
})]
|
|
1932
1935
|
})
|
|
1933
1936
|
]
|
|
@@ -1941,9 +1944,9 @@ function Zt({ appliedCode: e, appliedDiscount: t, error: a, onApply: c, onRemove
|
|
|
1941
1944
|
className: "flex flex-wrap gap-space-md",
|
|
1942
1945
|
children: [/* @__PURE__ */ W("div", {
|
|
1943
1946
|
className: "min-w-44 flex-1",
|
|
1944
|
-
children: /* @__PURE__ */ W(
|
|
1947
|
+
children: /* @__PURE__ */ W(P, {
|
|
1945
1948
|
value: g,
|
|
1946
|
-
onChange: (e) => _(
|
|
1949
|
+
onChange: (e) => _(Zt(e.target.value)),
|
|
1947
1950
|
"aria-label": h.fieldLabel,
|
|
1948
1951
|
placeholder: h.placeholder,
|
|
1949
1952
|
autoCapitalize: "characters",
|
|
@@ -1968,16 +1971,16 @@ function Zt({ appliedCode: e, appliedDiscount: t, error: a, onApply: c, onRemove
|
|
|
1968
1971
|
})
|
|
1969
1972
|
});
|
|
1970
1973
|
}
|
|
1971
|
-
|
|
1974
|
+
Qt.displayName = "CouponInputCard";
|
|
1972
1975
|
//#endregion
|
|
1973
1976
|
//#region src/components/blocks/commerce/order-status/types.ts
|
|
1974
|
-
var
|
|
1977
|
+
var $t = {
|
|
1975
1978
|
title: "Order status",
|
|
1976
1979
|
statusLabel: "Current status",
|
|
1977
1980
|
eta: "ETA",
|
|
1978
1981
|
latestEvent: "Latest event",
|
|
1979
1982
|
currentStep: "Current step"
|
|
1980
|
-
},
|
|
1983
|
+
}, en = {
|
|
1981
1984
|
pending: "warning",
|
|
1982
1985
|
paid: "info",
|
|
1983
1986
|
fulfilled: "info",
|
|
@@ -1985,11 +1988,11 @@ var Qt = {
|
|
|
1985
1988
|
delivered: "success",
|
|
1986
1989
|
cancelled: "destructive"
|
|
1987
1990
|
};
|
|
1988
|
-
function
|
|
1989
|
-
let u = n(
|
|
1991
|
+
function tn({ orderNumber: e, status: t, statusTone: i, events: a, currentEta: s, className: c, strings: l }) {
|
|
1992
|
+
let u = n($t, l), d = i ?? en[t], f = a.reduce((e, t, n) => t.complete ? n : e, -1), m = a.find((e) => !e.complete);
|
|
1990
1993
|
return /* @__PURE__ */ G(I, {
|
|
1991
1994
|
title: u.title,
|
|
1992
|
-
titleSuffix: /* @__PURE__ */ W(
|
|
1995
|
+
titleSuffix: /* @__PURE__ */ W(N, {
|
|
1993
1996
|
tone: d,
|
|
1994
1997
|
className: "capitalize",
|
|
1995
1998
|
children: t
|
|
@@ -2013,10 +2016,10 @@ function en({ orderNumber: e, status: t, statusTone: i, events: a, currentEta: s
|
|
|
2013
2016
|
className: "flex flex-col items-center",
|
|
2014
2017
|
children: [/* @__PURE__ */ W("span", {
|
|
2015
2018
|
className: r("flex size-6 shrink-0 items-center justify-center rounded-full border", e.complete ? "border-success bg-success text-success-foreground" : "border-border bg-card text-muted-foreground", i && !e.complete && r("border-2 border-primary-accent ring-4", p.primary.tint, p.primary.ink, p.primary.halo)),
|
|
2016
|
-
children: e.complete ? /* @__PURE__ */ W(
|
|
2019
|
+
children: e.complete ? /* @__PURE__ */ W(K, {
|
|
2017
2020
|
className: "size-icon-md",
|
|
2018
2021
|
strokeWidth: 2.5
|
|
2019
|
-
}) : i ? /* @__PURE__ */ W(
|
|
2022
|
+
}) : i ? /* @__PURE__ */ W(Pe, { className: "size-icon-md" }) : /* @__PURE__ */ W(Le, { className: "size-icon-sm" })
|
|
2020
2023
|
}), !n && /* @__PURE__ */ W("span", {
|
|
2021
2024
|
"aria-hidden": "true",
|
|
2022
2025
|
className: r("min-h-6 w-px flex-1", t < f ? "bg-success" : "bg-border")
|
|
@@ -2027,7 +2030,7 @@ function en({ orderNumber: e, status: t, statusTone: i, events: a, currentEta: s
|
|
|
2027
2030
|
weight: e.complete || i ? "semibold" : "medium",
|
|
2028
2031
|
className: r(!e.complete && !i && "text-muted-foreground"),
|
|
2029
2032
|
children: e.label
|
|
2030
|
-
}), !!e.timestamp && /* @__PURE__ */ W(
|
|
2033
|
+
}), !!e.timestamp && /* @__PURE__ */ W(D, {
|
|
2031
2034
|
size: "xs",
|
|
2032
2035
|
className: "tabular-nums",
|
|
2033
2036
|
children: e.timestamp
|
|
@@ -2038,10 +2041,10 @@ function en({ orderNumber: e, status: t, statusTone: i, events: a, currentEta: s
|
|
|
2038
2041
|
})]
|
|
2039
2042
|
});
|
|
2040
2043
|
}
|
|
2041
|
-
|
|
2044
|
+
tn.displayName = "OrderStatusCard";
|
|
2042
2045
|
//#endregion
|
|
2043
2046
|
//#region src/components/blocks/commerce/payment-method/types.ts
|
|
2044
|
-
var
|
|
2047
|
+
var nn = {
|
|
2045
2048
|
title: "Payment method",
|
|
2046
2049
|
default: "Default",
|
|
2047
2050
|
cardHolder: "Card holder",
|
|
@@ -2057,7 +2060,7 @@ var tn = {
|
|
|
2057
2060
|
unknown: "Card"
|
|
2058
2061
|
},
|
|
2059
2062
|
formatCard: (e, t) => `${e} ending ${t}`
|
|
2060
|
-
},
|
|
2063
|
+
}, rn = {
|
|
2061
2064
|
visa: "VISA",
|
|
2062
2065
|
mastercard: "MasterCard",
|
|
2063
2066
|
amex: "AMEX",
|
|
@@ -2065,16 +2068,16 @@ var tn = {
|
|
|
2065
2068
|
applepay: "Apple Pay",
|
|
2066
2069
|
googlepay: "Google Pay",
|
|
2067
2070
|
unknown: "Card"
|
|
2068
|
-
},
|
|
2069
|
-
function
|
|
2070
|
-
let b = n(
|
|
2071
|
+
}, an = "bg-inverse-background from-inverse-background via-inverse-surface-strong to-inverse-background";
|
|
2072
|
+
function on({ brand: e, last4: t, expiry: a, holderName: c, default: l = !1, onChange: u, variant: d = "card", surface: p = "flat", padding: m = p === "flat" ? "none" : "md", headerDivider: h, className: g, strings: v, ...y }) {
|
|
2073
|
+
let b = n(nn, v), x = b.formatCard(b.brands[e], t);
|
|
2071
2074
|
return /* @__PURE__ */ W(_, {
|
|
2072
2075
|
...y,
|
|
2073
2076
|
surface: p,
|
|
2074
2077
|
padding: m,
|
|
2075
2078
|
headerDivider: h,
|
|
2076
2079
|
title: b.title,
|
|
2077
|
-
titleSuffix: l ? /* @__PURE__ */ W(
|
|
2080
|
+
titleSuffix: l ? /* @__PURE__ */ W(N, {
|
|
2078
2081
|
tone: "neutral",
|
|
2079
2082
|
children: b.default
|
|
2080
2083
|
}) : null,
|
|
@@ -2109,7 +2112,7 @@ function an({ brand: e, last4: t, expiry: a, holderName: c, default: l = !1, onC
|
|
|
2109
2112
|
children: [
|
|
2110
2113
|
b.expires,
|
|
2111
2114
|
" ",
|
|
2112
|
-
/* @__PURE__ */ W(
|
|
2115
|
+
/* @__PURE__ */ W(T, {
|
|
2113
2116
|
type: "inherit",
|
|
2114
2117
|
className: "tabular-nums",
|
|
2115
2118
|
children: a
|
|
@@ -2118,9 +2121,9 @@ function an({ brand: e, last4: t, expiry: a, holderName: c, default: l = !1, onC
|
|
|
2118
2121
|
})
|
|
2119
2122
|
]
|
|
2120
2123
|
}) : /* @__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",
|
|
2124
|
+
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", an),
|
|
2122
2125
|
children: [
|
|
2123
|
-
/* @__PURE__ */ W(
|
|
2126
|
+
/* @__PURE__ */ W(fe, { children: x }),
|
|
2124
2127
|
/* @__PURE__ */ G("div", {
|
|
2125
2128
|
"aria-hidden": "true",
|
|
2126
2129
|
className: "relative flex items-start justify-between",
|
|
@@ -2131,7 +2134,7 @@ function an({ brand: e, last4: t, expiry: a, holderName: c, default: l = !1, onC
|
|
|
2131
2134
|
tag: "span",
|
|
2132
2135
|
weight: "bold",
|
|
2133
2136
|
className: "rounded-radius-xs bg-inverse-surface px-space-md py-space-2xs tracking-[0.15em] text-inverse-foreground",
|
|
2134
|
-
children:
|
|
2137
|
+
children: rn[e]
|
|
2135
2138
|
})]
|
|
2136
2139
|
}),
|
|
2137
2140
|
/* @__PURE__ */ W("div", {
|
|
@@ -2153,7 +2156,7 @@ function an({ brand: e, last4: t, expiry: a, holderName: c, default: l = !1, onC
|
|
|
2153
2156
|
className: "relative",
|
|
2154
2157
|
children: [/* @__PURE__ */ W("div", {
|
|
2155
2158
|
className: "min-w-0",
|
|
2156
|
-
children: !!c && /* @__PURE__ */ G(
|
|
2159
|
+
children: !!c && /* @__PURE__ */ G(Me, { children: [/* @__PURE__ */ W(s, {
|
|
2157
2160
|
tone: "inverse",
|
|
2158
2161
|
className: "block",
|
|
2159
2162
|
children: b.cardHolder
|
|
@@ -2168,7 +2171,7 @@ function an({ brand: e, last4: t, expiry: a, holderName: c, default: l = !1, onC
|
|
|
2168
2171
|
tone: "inverse",
|
|
2169
2172
|
className: "block",
|
|
2170
2173
|
children: b.expires
|
|
2171
|
-
}), /* @__PURE__ */ W(
|
|
2174
|
+
}), /* @__PURE__ */ W(T, {
|
|
2172
2175
|
weight: "semibold",
|
|
2173
2176
|
className: "tabular-nums text-inverse-foreground",
|
|
2174
2177
|
children: a
|
|
@@ -2179,49 +2182,49 @@ function an({ brand: e, last4: t, expiry: a, holderName: c, default: l = !1, onC
|
|
|
2179
2182
|
})
|
|
2180
2183
|
});
|
|
2181
2184
|
}
|
|
2182
|
-
|
|
2183
|
-
function
|
|
2184
|
-
return /* @__PURE__ */ W(
|
|
2185
|
+
on.displayName = "PaymentMethod";
|
|
2186
|
+
function sn({ variant: e = "row", ...t }) {
|
|
2187
|
+
return /* @__PURE__ */ W(on, {
|
|
2185
2188
|
variant: e,
|
|
2186
2189
|
...t
|
|
2187
2190
|
});
|
|
2188
2191
|
}
|
|
2189
|
-
|
|
2192
|
+
sn.displayName = "PaymentMethodCard";
|
|
2190
2193
|
//#endregion
|
|
2191
2194
|
//#region src/components/blocks/commerce/seo-listing/seo-listing-score.ts
|
|
2192
|
-
var
|
|
2195
|
+
var cn = {
|
|
2193
2196
|
titleMin: 35,
|
|
2194
2197
|
titleMax: 60,
|
|
2195
2198
|
descriptionMin: 120,
|
|
2196
2199
|
descriptionMax: 160,
|
|
2197
2200
|
permalinkMax: 75
|
|
2198
2201
|
};
|
|
2199
|
-
function
|
|
2202
|
+
function ln(e) {
|
|
2200
2203
|
return {
|
|
2201
|
-
...
|
|
2204
|
+
...cn,
|
|
2202
2205
|
...e
|
|
2203
2206
|
};
|
|
2204
2207
|
}
|
|
2205
|
-
function
|
|
2208
|
+
function un(e) {
|
|
2206
2209
|
return Number.isFinite(e) ? Math.max(0, Math.min(1, e)) : 0;
|
|
2207
2210
|
}
|
|
2208
|
-
function
|
|
2211
|
+
function dn(e, t) {
|
|
2209
2212
|
if (t <= 0) return "missing";
|
|
2210
2213
|
let n = e / t;
|
|
2211
2214
|
return n >= .9 ? "good" : n >= .5 ? "review" : "missing";
|
|
2212
2215
|
}
|
|
2213
|
-
function
|
|
2214
|
-
let a = Math.round(
|
|
2216
|
+
function Z(e, t, n, r, i) {
|
|
2217
|
+
let a = Math.round(un(t) * n);
|
|
2215
2218
|
return {
|
|
2216
2219
|
id: e,
|
|
2217
2220
|
score: a,
|
|
2218
2221
|
maxScore: n,
|
|
2219
2222
|
actual: r,
|
|
2220
|
-
status:
|
|
2223
|
+
status: dn(a, n),
|
|
2221
2224
|
...i
|
|
2222
2225
|
};
|
|
2223
2226
|
}
|
|
2224
|
-
function
|
|
2227
|
+
function fn(e, t, n) {
|
|
2225
2228
|
let r = e.trim().length;
|
|
2226
2229
|
if (r === 0) return 0;
|
|
2227
2230
|
if (r >= t && r <= n) return 1;
|
|
@@ -2230,61 +2233,61 @@ function dn(e, t, n) {
|
|
|
2230
2233
|
let i = r - n;
|
|
2231
2234
|
return Math.max(.55, 1 - i / n);
|
|
2232
2235
|
}
|
|
2233
|
-
function
|
|
2236
|
+
function Q(e) {
|
|
2234
2237
|
let t = e?.trim() ?? "";
|
|
2235
2238
|
return t ? ((t.split("#")[0] ?? "").split("?")[0] ?? "").replace(/^https?:\/\/[^/]+/i, "").replace(/^\/+|\/+$/g, "") : "";
|
|
2236
2239
|
}
|
|
2237
|
-
function
|
|
2238
|
-
return
|
|
2240
|
+
function pn(e) {
|
|
2241
|
+
return Q(e).split("/").filter(Boolean).at(-1) ?? "";
|
|
2239
2242
|
}
|
|
2240
|
-
function
|
|
2241
|
-
let n =
|
|
2243
|
+
function mn(e, t = cn.permalinkMax) {
|
|
2244
|
+
let n = Q(e);
|
|
2242
2245
|
return n ? n.length <= t ? 1 : n.length > t * 2 ? .35 : Math.max(.55, 1 - (n.length - t) / t) : 0;
|
|
2243
2246
|
}
|
|
2244
|
-
function
|
|
2245
|
-
let t =
|
|
2247
|
+
function hn(e) {
|
|
2248
|
+
let t = pn(e);
|
|
2246
2249
|
return t ? /^[\p{L}\p{N}]+(?:-[\p{L}\p{N}]+)*$/u.test(t) && t === t.toLowerCase() ? 1 : !/\s/.test(t) && !/[?#]/.test(t) ? .65 : .25 : 0;
|
|
2247
2250
|
}
|
|
2248
|
-
function
|
|
2251
|
+
function gn(e) {
|
|
2249
2252
|
let t = e?.trim() ?? "";
|
|
2250
2253
|
return t ? /^https:\/\//i.test(t) ? 1 : /^http:\/\//i.test(t) ? .6 : .45 : 0;
|
|
2251
2254
|
}
|
|
2252
|
-
function
|
|
2255
|
+
function _n(e) {
|
|
2253
2256
|
let t = e.keyword?.trim().toLowerCase();
|
|
2254
2257
|
if (!t) return null;
|
|
2255
2258
|
let n = [
|
|
2256
2259
|
e.title,
|
|
2257
2260
|
e.description,
|
|
2258
|
-
|
|
2261
|
+
Q(e.permalink)
|
|
2259
2262
|
].filter(Boolean).join(" ").toLowerCase();
|
|
2260
2263
|
return n ? n.includes(t) ? 1 : .35 : 0;
|
|
2261
2264
|
}
|
|
2262
|
-
function
|
|
2263
|
-
let t =
|
|
2264
|
-
|
|
2265
|
+
function vn(e) {
|
|
2266
|
+
let t = ln(e.limits), n = e.title?.trim() ?? "", r = e.description?.trim() ?? "", i = Q(e.permalink), a = pn(e.permalink), o = [
|
|
2267
|
+
Z("title", fn(n, t.titleMin, t.titleMax), 30, n.length, {
|
|
2265
2268
|
min: t.titleMin,
|
|
2266
2269
|
max: t.titleMax
|
|
2267
2270
|
}),
|
|
2268
|
-
|
|
2271
|
+
Z("description", fn(r, t.descriptionMin, t.descriptionMax), 30, r.length, {
|
|
2269
2272
|
min: t.descriptionMin,
|
|
2270
2273
|
max: t.descriptionMax
|
|
2271
2274
|
}),
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
], s =
|
|
2276
|
-
s !== null && o.push(
|
|
2275
|
+
Z("permalink", mn(e.permalink, t.permalinkMax), 15, i.length, { max: t.permalinkMax }),
|
|
2276
|
+
Z("slug", hn(e.permalink), 10, a.length),
|
|
2277
|
+
Z("url", gn(e.baseUrl), 10, e.baseUrl?.trim().length ?? 0)
|
|
2278
|
+
], s = _n(e);
|
|
2279
|
+
s !== null && o.push(Z("keyword", s, 5, e.keyword?.trim().length ?? 0));
|
|
2277
2280
|
let c = Math.round(o.reduce((e, t) => e + t.score, 0) / o.reduce((e, t) => e + t.maxScore, 0) * 100);
|
|
2278
2281
|
return {
|
|
2279
2282
|
score: c,
|
|
2280
|
-
status:
|
|
2283
|
+
status: dn(c, 100),
|
|
2281
2284
|
checks: o,
|
|
2282
2285
|
limits: t
|
|
2283
2286
|
};
|
|
2284
2287
|
}
|
|
2285
2288
|
//#endregion
|
|
2286
2289
|
//#region src/components/blocks/commerce/seo-listing/types.ts
|
|
2287
|
-
var
|
|
2290
|
+
var yn = {
|
|
2288
2291
|
title: "Search engine listing",
|
|
2289
2292
|
editLabel: "Edit search listing",
|
|
2290
2293
|
scoreLabel: "SEO score",
|
|
@@ -2317,44 +2320,44 @@ var vn = {
|
|
|
2317
2320
|
url: "Prefer a secure canonical URL.",
|
|
2318
2321
|
keyword: "Use the focus keyword in the title, description, or permalink."
|
|
2319
2322
|
}
|
|
2320
|
-
},
|
|
2323
|
+
}, bn = {
|
|
2321
2324
|
good: "success",
|
|
2322
2325
|
review: "warning",
|
|
2323
2326
|
missing: "destructive"
|
|
2324
|
-
},
|
|
2327
|
+
}, xn = {
|
|
2325
2328
|
good: "[&_[data-slot=progress-indicator]]:bg-success",
|
|
2326
2329
|
review: "[&_[data-slot=progress-indicator]]:bg-warning",
|
|
2327
2330
|
missing: "[&_[data-slot=progress-indicator]]:bg-destructive"
|
|
2328
|
-
}, xn = {
|
|
2329
|
-
good: Pe,
|
|
2330
|
-
review: Ge,
|
|
2331
|
-
missing: Le
|
|
2332
2331
|
}, Sn = {
|
|
2332
|
+
good: Fe,
|
|
2333
|
+
review: Ke,
|
|
2334
|
+
missing: Re
|
|
2335
|
+
}, Cn = {
|
|
2333
2336
|
good: "text-success",
|
|
2334
2337
|
review: "text-warning-accent",
|
|
2335
2338
|
missing: "text-destructive"
|
|
2336
2339
|
};
|
|
2337
|
-
function
|
|
2340
|
+
function wn(e) {
|
|
2338
2341
|
return e.replace(/^\/+|\/+$/g, "");
|
|
2339
2342
|
}
|
|
2340
|
-
function
|
|
2341
|
-
let r =
|
|
2343
|
+
function Tn(e, t, n) {
|
|
2344
|
+
let r = Q(n).split("/").filter(Boolean);
|
|
2342
2345
|
return [
|
|
2343
2346
|
e,
|
|
2344
|
-
...t.map(
|
|
2347
|
+
...t.map(wn).filter(Boolean),
|
|
2345
2348
|
...r
|
|
2346
2349
|
].filter(Boolean);
|
|
2347
2350
|
}
|
|
2348
|
-
function
|
|
2351
|
+
function En(e, t, n) {
|
|
2349
2352
|
if (!e.trim()) return;
|
|
2350
|
-
let r = e.replace(/\/+$/g, ""), i = [...t.map(
|
|
2353
|
+
let r = e.replace(/\/+$/g, ""), i = [...t.map(wn).filter(Boolean), ...Q(n).split("/").filter(Boolean)].join("/");
|
|
2351
2354
|
return i ? `${r}/${i}` : r;
|
|
2352
2355
|
}
|
|
2353
|
-
function
|
|
2356
|
+
function Dn(e, t) {
|
|
2354
2357
|
return e.id === "title" || e.id === "description" ? `${e.actual}/${e.max} ${t.characters} · ${t.targetLabel} ${e.min}-${e.max}` : e.id === "permalink" ? `${e.actual}/${e.max} ${t.characters} ${t.maxLabel}` : t.checkHints[e.id];
|
|
2355
2358
|
}
|
|
2356
|
-
function
|
|
2357
|
-
let i =
|
|
2359
|
+
function On({ check: e, detail: t, strings: n }) {
|
|
2360
|
+
let i = Sn[e.status];
|
|
2358
2361
|
return /* @__PURE__ */ W("div", {
|
|
2359
2362
|
className: "seo-listing-card--check min-w-0",
|
|
2360
2363
|
children: /* @__PURE__ */ G(f, {
|
|
@@ -2363,7 +2366,7 @@ function Dn({ check: e, detail: t, strings: n }) {
|
|
|
2363
2366
|
align: "start",
|
|
2364
2367
|
wrap: !1,
|
|
2365
2368
|
children: [/* @__PURE__ */ W(i, {
|
|
2366
|
-
className: r("seo-listing-card--check-icon size-icon shrink-0 translate-y-0.5",
|
|
2369
|
+
className: r("seo-listing-card--check-icon size-icon shrink-0 translate-y-0.5", Cn[e.status]),
|
|
2367
2370
|
"aria-hidden": "true"
|
|
2368
2371
|
}), /* @__PURE__ */ G(f, {
|
|
2369
2372
|
gap: "dense",
|
|
@@ -2379,8 +2382,8 @@ function Dn({ check: e, detail: t, strings: n }) {
|
|
|
2379
2382
|
weight: "medium",
|
|
2380
2383
|
className: "truncate",
|
|
2381
2384
|
children: n.checkLabels[e.id]
|
|
2382
|
-
}), /* @__PURE__ */ W(
|
|
2383
|
-
tone:
|
|
2385
|
+
}), /* @__PURE__ */ W(N, {
|
|
2386
|
+
tone: bn[e.status],
|
|
2384
2387
|
size: "sm",
|
|
2385
2388
|
inline: !0,
|
|
2386
2389
|
className: "shrink-0",
|
|
@@ -2396,32 +2399,32 @@ function Dn({ check: e, detail: t, strings: n }) {
|
|
|
2396
2399
|
})
|
|
2397
2400
|
});
|
|
2398
2401
|
}
|
|
2399
|
-
function
|
|
2400
|
-
let
|
|
2402
|
+
function kn({ siteName: e, baseUrl: t, pathSegments: a = [], permalink: s, title: c, description: u, price: d, keyword: p, score: m, limits: h, showChecks: g = !0, onEdit: y, surface: b = "flat", padding: x = b === "flat" ? "none" : "md", headerDivider: S, className: C, strings: w }) {
|
|
2403
|
+
let E = n(yn, w), O = t?.trim() || E.urlFallback, k = e?.trim() || E.siteFallback, ee = c?.trim() || E.titleFallback, te = u?.trim() || E.descriptionFallback, A = m ?? vn({
|
|
2401
2404
|
title: c,
|
|
2402
2405
|
description: u,
|
|
2403
2406
|
permalink: s,
|
|
2404
2407
|
baseUrl: t,
|
|
2405
2408
|
keyword: p,
|
|
2406
2409
|
limits: h
|
|
2407
|
-
}),
|
|
2410
|
+
}), j = En(O, a, s), ne = Tn(O, a, s), re = bn[A.status];
|
|
2408
2411
|
return /* @__PURE__ */ G(_, {
|
|
2409
2412
|
surface: b,
|
|
2410
2413
|
padding: x,
|
|
2411
2414
|
headerDivider: S,
|
|
2412
|
-
title:
|
|
2413
|
-
titleSuffix: /* @__PURE__ */ G(
|
|
2414
|
-
tone:
|
|
2415
|
+
title: E.title,
|
|
2416
|
+
titleSuffix: /* @__PURE__ */ G(N, {
|
|
2417
|
+
tone: re,
|
|
2415
2418
|
size: "sm",
|
|
2416
2419
|
inline: !0,
|
|
2417
2420
|
className: "shrink-0",
|
|
2418
2421
|
children: [
|
|
2419
|
-
|
|
2422
|
+
A.score,
|
|
2420
2423
|
"/100 ",
|
|
2421
|
-
|
|
2424
|
+
E.status[A.status]
|
|
2422
2425
|
]
|
|
2423
2426
|
}),
|
|
2424
|
-
className: r("seo-listing-card--component @container/seo-listing-card w-full",
|
|
2427
|
+
className: r("seo-listing-card--component @container/seo-listing-card w-full", C),
|
|
2425
2428
|
contentGap: "2xl",
|
|
2426
2429
|
headerAction: y ? /* @__PURE__ */ W(i, {
|
|
2427
2430
|
type: "button",
|
|
@@ -2429,9 +2432,9 @@ function On({ siteName: e, baseUrl: t, pathSegments: a = [], permalink: s, title
|
|
|
2429
2432
|
buttonStyle: "ghost",
|
|
2430
2433
|
size: "sm",
|
|
2431
2434
|
iconOnly: !0,
|
|
2432
|
-
"aria-label":
|
|
2435
|
+
"aria-label": E.editLabel,
|
|
2433
2436
|
onClick: y,
|
|
2434
|
-
children: /* @__PURE__ */ W(
|
|
2437
|
+
children: /* @__PURE__ */ W(Ue, { className: "size-icon-sm" })
|
|
2435
2438
|
}) : void 0,
|
|
2436
2439
|
children: [/* @__PURE__ */ W("div", {
|
|
2437
2440
|
"data-artwork": "serp",
|
|
@@ -2449,14 +2452,14 @@ function On({ siteName: e, baseUrl: t, pathSegments: a = [], permalink: s, title
|
|
|
2449
2452
|
weight: "medium",
|
|
2450
2453
|
className: "truncate",
|
|
2451
2454
|
children: k
|
|
2452
|
-
}), !!
|
|
2455
|
+
}), !!j && /* @__PURE__ */ W(Ve, {
|
|
2453
2456
|
className: "size-icon-sm shrink-0 text-muted-foreground",
|
|
2454
2457
|
"aria-hidden": "true"
|
|
2455
2458
|
})]
|
|
2456
2459
|
}),
|
|
2457
2460
|
/* @__PURE__ */ W("div", {
|
|
2458
2461
|
className: "seo-listing-card--url flex min-w-0 flex-wrap items-center gap-x-space-sm gap-y-space-2xs",
|
|
2459
|
-
children:
|
|
2462
|
+
children: ne.map((e, t) => /* @__PURE__ */ G("span", {
|
|
2460
2463
|
className: "inline-flex min-w-0 items-center gap-space-sm",
|
|
2461
2464
|
children: [/* @__PURE__ */ W(o, {
|
|
2462
2465
|
tag: "span",
|
|
@@ -2464,7 +2467,7 @@ function On({ siteName: e, baseUrl: t, pathSegments: a = [], permalink: s, title
|
|
|
2464
2467
|
type: "secondary",
|
|
2465
2468
|
className: "truncate",
|
|
2466
2469
|
children: e
|
|
2467
|
-
}), t <
|
|
2470
|
+
}), t < ne.length - 1 && /* @__PURE__ */ W(o, {
|
|
2468
2471
|
tag: "span",
|
|
2469
2472
|
size: "xs",
|
|
2470
2473
|
type: "secondary",
|
|
@@ -2473,8 +2476,8 @@ function On({ siteName: e, baseUrl: t, pathSegments: a = [], permalink: s, title
|
|
|
2473
2476
|
})]
|
|
2474
2477
|
}, `${e}-${t}`))
|
|
2475
2478
|
}),
|
|
2476
|
-
|
|
2477
|
-
href:
|
|
2479
|
+
j ? /* @__PURE__ */ W(l, {
|
|
2480
|
+
href: j,
|
|
2478
2481
|
size: "base",
|
|
2479
2482
|
lineHeight: "snug",
|
|
2480
2483
|
underline: !1,
|
|
@@ -2493,7 +2496,7 @@ function On({ siteName: e, baseUrl: t, pathSegments: a = [], permalink: s, title
|
|
|
2493
2496
|
className: "seo-listing-card--description max-w-4xl",
|
|
2494
2497
|
children: te
|
|
2495
2498
|
}),
|
|
2496
|
-
!!d && /* @__PURE__ */ W(
|
|
2499
|
+
!!d && /* @__PURE__ */ W(D, {
|
|
2497
2500
|
size: "xs",
|
|
2498
2501
|
className: "seo-listing-card--price block tabular-nums",
|
|
2499
2502
|
children: d
|
|
@@ -2516,63 +2519,63 @@ function On({ siteName: e, baseUrl: t, pathSegments: a = [], permalink: s, title
|
|
|
2516
2519
|
children: [/* @__PURE__ */ W(o, {
|
|
2517
2520
|
type: "inherit",
|
|
2518
2521
|
weight: "semibold",
|
|
2519
|
-
children:
|
|
2520
|
-
}), /* @__PURE__ */ G(
|
|
2522
|
+
children: E.scoreLabel
|
|
2523
|
+
}), /* @__PURE__ */ G(D, {
|
|
2521
2524
|
size: "xs",
|
|
2522
2525
|
className: "tabular-nums",
|
|
2523
2526
|
children: [
|
|
2524
|
-
/* @__PURE__ */ W(
|
|
2525
|
-
value:
|
|
2527
|
+
/* @__PURE__ */ W(M, {
|
|
2528
|
+
value: A.checks.length,
|
|
2526
2529
|
size: "xs",
|
|
2527
2530
|
type: "secondary",
|
|
2528
2531
|
align: "left"
|
|
2529
2532
|
}),
|
|
2530
2533
|
" ",
|
|
2531
|
-
|
|
2534
|
+
E.checksLabel
|
|
2532
2535
|
]
|
|
2533
2536
|
})]
|
|
2534
|
-
}), /* @__PURE__ */ G(
|
|
2537
|
+
}), /* @__PURE__ */ G(T, {
|
|
2535
2538
|
type: "inherit",
|
|
2536
2539
|
weight: "semibold",
|
|
2537
2540
|
className: "shrink-0 tabular-nums",
|
|
2538
|
-
children: [
|
|
2541
|
+
children: [A.score, "/100"]
|
|
2539
2542
|
})]
|
|
2540
2543
|
}),
|
|
2541
2544
|
/* @__PURE__ */ W(v, {
|
|
2542
|
-
value:
|
|
2543
|
-
"aria-label":
|
|
2544
|
-
className: r("seo-listing-card--score-progress", "[&_[data-slot=progress-track]]:h-space-md",
|
|
2545
|
+
value: A.score,
|
|
2546
|
+
"aria-label": E.scoreLabel,
|
|
2547
|
+
className: r("seo-listing-card--score-progress", "[&_[data-slot=progress-track]]:h-space-md", xn[A.status])
|
|
2545
2548
|
}),
|
|
2546
2549
|
!!g && /* @__PURE__ */ W("div", {
|
|
2547
2550
|
className: "seo-listing-card--checks grid gap-x-space-2xl gap-y-space-lg @xl/seo-listing-card:grid-cols-2",
|
|
2548
|
-
children:
|
|
2551
|
+
children: A.checks.map((e) => /* @__PURE__ */ W(On, {
|
|
2549
2552
|
check: e,
|
|
2550
|
-
detail:
|
|
2551
|
-
strings:
|
|
2553
|
+
detail: Dn(e, E),
|
|
2554
|
+
strings: E
|
|
2552
2555
|
}, e.id))
|
|
2553
2556
|
})
|
|
2554
2557
|
]
|
|
2555
2558
|
})]
|
|
2556
2559
|
});
|
|
2557
2560
|
}
|
|
2558
|
-
|
|
2561
|
+
kn.displayName = "SeoListingCard";
|
|
2559
2562
|
//#endregion
|
|
2560
2563
|
//#region src/components/blocks/commerce/invoice-mini/types.ts
|
|
2561
|
-
var
|
|
2564
|
+
var An = {
|
|
2562
2565
|
paid: "Paid",
|
|
2563
2566
|
pending: "Pending",
|
|
2564
2567
|
overdue: "Overdue",
|
|
2565
2568
|
items: (e) => e === 1 ? "1 line item" : `${e} line items`,
|
|
2566
2569
|
due: "Due"
|
|
2567
|
-
},
|
|
2570
|
+
}, jn = {
|
|
2568
2571
|
paid: "success",
|
|
2569
2572
|
pending: "warning",
|
|
2570
2573
|
overdue: "destructive"
|
|
2571
2574
|
};
|
|
2572
2575
|
//#endregion
|
|
2573
2576
|
//#region src/components/blocks/commerce/invoice-mini/invoice-mini.tsx
|
|
2574
|
-
function
|
|
2575
|
-
let s = t(
|
|
2577
|
+
function Mn({ invoice: e, className: n, strings: i, ...a }) {
|
|
2578
|
+
let s = t(An, i), c = {
|
|
2576
2579
|
paid: s.paid,
|
|
2577
2580
|
pending: s.pending,
|
|
2578
2581
|
overdue: s.overdue
|
|
@@ -2588,12 +2591,12 @@ function jn({ invoice: e, className: n, strings: i, ...a }) {
|
|
|
2588
2591
|
direction: "horizontal",
|
|
2589
2592
|
gap: "sm",
|
|
2590
2593
|
wrap: !1,
|
|
2591
|
-
children: [/* @__PURE__ */ W(
|
|
2594
|
+
children: [/* @__PURE__ */ W(O, {
|
|
2592
2595
|
type: "inherit",
|
|
2593
2596
|
className: "min-w-0 truncate tracking-wide",
|
|
2594
2597
|
children: e.invoiceNumber
|
|
2595
|
-
}), /* @__PURE__ */ W(
|
|
2596
|
-
tone:
|
|
2598
|
+
}), /* @__PURE__ */ W(N, {
|
|
2599
|
+
tone: jn[e.status],
|
|
2597
2600
|
size: "sm",
|
|
2598
2601
|
className: "shrink-0",
|
|
2599
2602
|
children: c[e.status]
|
|
@@ -2617,7 +2620,7 @@ function jn({ invoice: e, className: n, strings: i, ...a }) {
|
|
|
2617
2620
|
size: "xs",
|
|
2618
2621
|
type: "secondary",
|
|
2619
2622
|
children: s.items(e.lineItemsCount)
|
|
2620
|
-
}), /* @__PURE__ */ G(
|
|
2623
|
+
}), /* @__PURE__ */ G(D, {
|
|
2621
2624
|
size: "xs",
|
|
2622
2625
|
className: "whitespace-nowrap tabular-nums",
|
|
2623
2626
|
children: [
|
|
@@ -2626,7 +2629,7 @@ function jn({ invoice: e, className: n, strings: i, ...a }) {
|
|
|
2626
2629
|
e.dueDate
|
|
2627
2630
|
]
|
|
2628
2631
|
})]
|
|
2629
|
-
}), /* @__PURE__ */ W(
|
|
2632
|
+
}), /* @__PURE__ */ W(T, {
|
|
2630
2633
|
type: "inherit",
|
|
2631
2634
|
size: "base",
|
|
2632
2635
|
weight: "bold",
|
|
@@ -2638,10 +2641,10 @@ function jn({ invoice: e, className: n, strings: i, ...a }) {
|
|
|
2638
2641
|
]
|
|
2639
2642
|
});
|
|
2640
2643
|
}
|
|
2641
|
-
|
|
2644
|
+
Mn.displayName = "InvoiceMini";
|
|
2642
2645
|
//#endregion
|
|
2643
2646
|
//#region src/components/blocks/commerce/invoice-header/types.ts
|
|
2644
|
-
var
|
|
2647
|
+
var Nn = {
|
|
2645
2648
|
title: "Invoice",
|
|
2646
2649
|
billFrom: "Bill from",
|
|
2647
2650
|
billTo: "Bill to",
|
|
@@ -2654,7 +2657,7 @@ var Mn = {
|
|
|
2654
2657
|
};
|
|
2655
2658
|
//#endregion
|
|
2656
2659
|
//#region src/components/blocks/commerce/invoice-header/invoice-header.tsx
|
|
2657
|
-
function
|
|
2660
|
+
function Pn({ eyebrow: e, name: t, location: n }) {
|
|
2658
2661
|
return /* @__PURE__ */ G(f, {
|
|
2659
2662
|
gap: "xs",
|
|
2660
2663
|
className: "invoice-header--party",
|
|
@@ -2679,22 +2682,22 @@ function Nn({ eyebrow: e, name: t, location: n }) {
|
|
|
2679
2682
|
]
|
|
2680
2683
|
});
|
|
2681
2684
|
}
|
|
2682
|
-
function
|
|
2683
|
-
let h = n(
|
|
2685
|
+
function Fn({ invoiceNumber: e, status: t, statusTone: i, from: a, to: o, issuedDate: s, dueDate: c, amount: l, className: d, strings: p, ...m }) {
|
|
2686
|
+
let h = n(Nn, p), g = {
|
|
2684
2687
|
paid: h.paid,
|
|
2685
2688
|
pending: h.pending,
|
|
2686
2689
|
overdue: h.overdue
|
|
2687
|
-
}, v = i ??
|
|
2690
|
+
}, v = i ?? jn[t];
|
|
2688
2691
|
return /* @__PURE__ */ G(_, {
|
|
2689
2692
|
...m,
|
|
2690
2693
|
surface: "flat",
|
|
2691
2694
|
padding: "none",
|
|
2692
2695
|
title: h.title,
|
|
2693
|
-
titleSuffix: /* @__PURE__ */ W(
|
|
2696
|
+
titleSuffix: /* @__PURE__ */ W(N, {
|
|
2694
2697
|
tone: v,
|
|
2695
2698
|
children: g[t]
|
|
2696
2699
|
}),
|
|
2697
|
-
description: /* @__PURE__ */ W(
|
|
2700
|
+
description: /* @__PURE__ */ W(O, {
|
|
2698
2701
|
type: "inherit",
|
|
2699
2702
|
className: "invoice-header--number tracking-wide",
|
|
2700
2703
|
children: e
|
|
@@ -2707,11 +2710,11 @@ function Pn({ invoiceNumber: e, status: t, statusTone: i, from: a, to: o, issued
|
|
|
2707
2710
|
minColumnWidth: "sm",
|
|
2708
2711
|
gap: "xl",
|
|
2709
2712
|
className: "invoice-header--parties",
|
|
2710
|
-
children: [/* @__PURE__ */ W(
|
|
2713
|
+
children: [/* @__PURE__ */ W(Pn, {
|
|
2711
2714
|
eyebrow: h.billFrom,
|
|
2712
2715
|
name: a.name,
|
|
2713
2716
|
location: a.location
|
|
2714
|
-
}), /* @__PURE__ */ W(
|
|
2717
|
+
}), /* @__PURE__ */ W(Pn, {
|
|
2715
2718
|
eyebrow: h.billTo,
|
|
2716
2719
|
name: o.name,
|
|
2717
2720
|
location: o.location
|
|
@@ -2732,7 +2735,7 @@ function Pn({ invoiceNumber: e, status: t, statusTone: i, from: a, to: o, issued
|
|
|
2732
2735
|
valueWeight: "medium",
|
|
2733
2736
|
valueClassName: "tabular-nums"
|
|
2734
2737
|
}),
|
|
2735
|
-
/* @__PURE__ */ W(
|
|
2738
|
+
/* @__PURE__ */ W(q, {
|
|
2736
2739
|
label: h.amountDue,
|
|
2737
2740
|
amount: l,
|
|
2738
2741
|
total: !0
|
|
@@ -2741,23 +2744,23 @@ function Pn({ invoiceNumber: e, status: t, statusTone: i, from: a, to: o, issued
|
|
|
2741
2744
|
})]
|
|
2742
2745
|
});
|
|
2743
2746
|
}
|
|
2744
|
-
|
|
2747
|
+
Fn.displayName = "InvoiceHeader";
|
|
2745
2748
|
//#endregion
|
|
2746
2749
|
//#region src/components/blocks/commerce/invoice-line-items/types.ts
|
|
2747
|
-
var
|
|
2750
|
+
var In = {
|
|
2748
2751
|
item: "Item",
|
|
2749
2752
|
quantity: "Qty",
|
|
2750
2753
|
price: "Price",
|
|
2751
2754
|
subtotal: "Subtotal",
|
|
2752
2755
|
tax: "Tax",
|
|
2753
2756
|
total: "Total"
|
|
2754
|
-
},
|
|
2757
|
+
}, Ln = "border border-border shadow-sm", Rn = {
|
|
2755
2758
|
left: "text-left justify-start",
|
|
2756
2759
|
right: "text-right justify-end",
|
|
2757
2760
|
center: "text-center justify-center"
|
|
2758
2761
|
};
|
|
2759
|
-
function
|
|
2760
|
-
return /* @__PURE__ */ W(
|
|
2762
|
+
function zn({ amount: e, currency: t, weight: n = "regular" }) {
|
|
2763
|
+
return /* @__PURE__ */ W(j, {
|
|
2761
2764
|
type: "inherit",
|
|
2762
2765
|
amount: e,
|
|
2763
2766
|
currency: t,
|
|
@@ -2766,7 +2769,7 @@ function Q({ amount: e, currency: t, weight: n = "regular" }) {
|
|
|
2766
2769
|
weight: n
|
|
2767
2770
|
});
|
|
2768
2771
|
}
|
|
2769
|
-
function
|
|
2772
|
+
function Bn(e, t) {
|
|
2770
2773
|
return [
|
|
2771
2774
|
{
|
|
2772
2775
|
id: "description",
|
|
@@ -2783,7 +2786,7 @@ function Rn(e, t) {
|
|
|
2783
2786
|
header: t.quantity,
|
|
2784
2787
|
width: "36px",
|
|
2785
2788
|
align: "center",
|
|
2786
|
-
cell: (e) => /* @__PURE__ */ W(
|
|
2789
|
+
cell: (e) => /* @__PURE__ */ W(M, {
|
|
2787
2790
|
type: "inherit",
|
|
2788
2791
|
value: e.qty,
|
|
2789
2792
|
align: "center"
|
|
@@ -2794,7 +2797,7 @@ function Rn(e, t) {
|
|
|
2794
2797
|
header: t.price,
|
|
2795
2798
|
width: "82px",
|
|
2796
2799
|
align: "right",
|
|
2797
|
-
cell: (t) => /* @__PURE__ */ W(
|
|
2800
|
+
cell: (t) => /* @__PURE__ */ W(zn, {
|
|
2798
2801
|
amount: t.price,
|
|
2799
2802
|
currency: e
|
|
2800
2803
|
})
|
|
@@ -2804,41 +2807,41 @@ function Rn(e, t) {
|
|
|
2804
2807
|
header: t.total,
|
|
2805
2808
|
width: "82px",
|
|
2806
2809
|
align: "right",
|
|
2807
|
-
cell: (t) => /* @__PURE__ */ W(
|
|
2810
|
+
cell: (t) => /* @__PURE__ */ W(zn, {
|
|
2808
2811
|
amount: t.total,
|
|
2809
2812
|
currency: e
|
|
2810
2813
|
})
|
|
2811
2814
|
}
|
|
2812
2815
|
];
|
|
2813
2816
|
}
|
|
2814
|
-
function
|
|
2817
|
+
function Vn(e, t, n, r) {
|
|
2815
2818
|
let i = e.reduce((e, t) => e + t.total, 0), a = Math.round(i * t * 100) / 100, o = i + a;
|
|
2816
2819
|
return [
|
|
2817
2820
|
{
|
|
2818
2821
|
label: r.subtotal,
|
|
2819
|
-
value: /* @__PURE__ */ W(
|
|
2822
|
+
value: /* @__PURE__ */ W(zn, {
|
|
2820
2823
|
amount: i,
|
|
2821
2824
|
currency: n
|
|
2822
2825
|
})
|
|
2823
2826
|
},
|
|
2824
2827
|
{
|
|
2825
|
-
label: /* @__PURE__ */ G(
|
|
2828
|
+
label: /* @__PURE__ */ G(Me, { children: [
|
|
2826
2829
|
r.tax,
|
|
2827
2830
|
" (",
|
|
2828
|
-
/* @__PURE__ */ W(
|
|
2831
|
+
/* @__PURE__ */ W(A, {
|
|
2829
2832
|
type: "inherit",
|
|
2830
2833
|
value: t
|
|
2831
2834
|
}),
|
|
2832
2835
|
")"
|
|
2833
2836
|
] }),
|
|
2834
|
-
value: /* @__PURE__ */ W(
|
|
2837
|
+
value: /* @__PURE__ */ W(zn, {
|
|
2835
2838
|
amount: a,
|
|
2836
2839
|
currency: n
|
|
2837
2840
|
})
|
|
2838
2841
|
},
|
|
2839
2842
|
{
|
|
2840
2843
|
label: r.total,
|
|
2841
|
-
value: /* @__PURE__ */ W(
|
|
2844
|
+
value: /* @__PURE__ */ W(zn, {
|
|
2842
2845
|
amount: o,
|
|
2843
2846
|
currency: n,
|
|
2844
2847
|
weight: "bold"
|
|
@@ -2847,16 +2850,16 @@ function zn(e, t, n, r) {
|
|
|
2847
2850
|
}
|
|
2848
2851
|
];
|
|
2849
2852
|
}
|
|
2850
|
-
function
|
|
2851
|
-
let p = n(
|
|
2853
|
+
function Hn({ items: t, columns: i, footerRows: a, taxRate: c = .2, currency: l, className: u, strings: d }) {
|
|
2854
|
+
let p = n(In, d), { defaultCurrency: m } = e(), h = l ?? m ?? "€", g = i ?? Bn(h, p), _ = a ?? (i ? [] : Vn(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
2855
|
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",
|
|
2856
|
+
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", Ln, u),
|
|
2854
2857
|
children: [
|
|
2855
2858
|
/* @__PURE__ */ W("div", {
|
|
2856
2859
|
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]),
|
|
2857
2860
|
style: { gridTemplateColumns: v },
|
|
2858
2861
|
children: g.map((e) => /* @__PURE__ */ W("div", {
|
|
2859
|
-
className: r("flex min-w-0",
|
|
2862
|
+
className: r("flex min-w-0", Rn[e.align ?? "left"], e.headerClassName),
|
|
2860
2863
|
children: /* @__PURE__ */ W(s, {
|
|
2861
2864
|
className: "min-w-0 truncate",
|
|
2862
2865
|
children: e.header
|
|
@@ -2868,14 +2871,14 @@ function Bn({ items: t, columns: i, footerRows: a, taxRate: c = .2, currency: l,
|
|
|
2868
2871
|
style: { gridTemplateColumns: v },
|
|
2869
2872
|
children: g.map((n) => /* @__PURE__ */ G("div", {
|
|
2870
2873
|
"data-column": n.id,
|
|
2871
|
-
className: r("min-w-0", i ? ["flex items-center",
|
|
2874
|
+
className: r("min-w-0", i ? ["flex items-center", Rn[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
2875
|
children: [!i && n.id !== "description" && /* @__PURE__ */ W(s, {
|
|
2873
2876
|
className: "@lg/invoice-line-items:hidden",
|
|
2874
2877
|
children: n.header
|
|
2875
2878
|
}), n.cell(e, t)]
|
|
2876
2879
|
}, n.id))
|
|
2877
2880
|
}, t)),
|
|
2878
|
-
_.length > 0 && /* @__PURE__ */ G(
|
|
2881
|
+
_.length > 0 && /* @__PURE__ */ G(Me, { children: [/* @__PURE__ */ W(oe, {}), /* @__PURE__ */ W("div", {
|
|
2879
2882
|
className: "invoice-line-items--footer p-surface",
|
|
2880
2883
|
children: /* @__PURE__ */ W(f, {
|
|
2881
2884
|
gap: "sm",
|
|
@@ -2889,7 +2892,7 @@ function Bn({ items: t, columns: i, footerRows: a, taxRate: c = .2, currency: l,
|
|
|
2889
2892
|
type: e.emphasis === "total" ? "inherit" : "secondary",
|
|
2890
2893
|
weight: e.emphasis === "total" ? "bold" : "regular",
|
|
2891
2894
|
children: e.label
|
|
2892
|
-
}),
|
|
2895
|
+
}), Un(e.value) ? /* @__PURE__ */ W(T, {
|
|
2893
2896
|
type: "inherit",
|
|
2894
2897
|
weight: e.emphasis === "total" ? "bold" : "regular",
|
|
2895
2898
|
children: e.value
|
|
@@ -2903,13 +2906,13 @@ function Bn({ items: t, columns: i, footerRows: a, taxRate: c = .2, currency: l,
|
|
|
2903
2906
|
]
|
|
2904
2907
|
});
|
|
2905
2908
|
}
|
|
2906
|
-
|
|
2907
|
-
function
|
|
2909
|
+
Hn.displayName = "InvoiceLineItems";
|
|
2910
|
+
function Un(e) {
|
|
2908
2911
|
return typeof e == "string" || typeof e == "number" || typeof e == "bigint";
|
|
2909
2912
|
}
|
|
2910
2913
|
//#endregion
|
|
2911
2914
|
//#region src/components/blocks/commerce/order-timeline/order-timeline.tsx
|
|
2912
|
-
function
|
|
2915
|
+
function Wn({ title: e, description: t, events: n, footerText: i, className: a }) {
|
|
2913
2916
|
let o = n.map((e) => ({
|
|
2914
2917
|
id: e.id,
|
|
2915
2918
|
title: e.title,
|
|
@@ -2924,20 +2927,20 @@ function Hn({ title: e, description: t, events: n, footerText: i, className: a }
|
|
|
2924
2927
|
description: t,
|
|
2925
2928
|
footerText: i,
|
|
2926
2929
|
className: r("order-timeline--component", a),
|
|
2927
|
-
children: /* @__PURE__ */ W(
|
|
2930
|
+
children: /* @__PURE__ */ W(Te, { items: o })
|
|
2928
2931
|
});
|
|
2929
2932
|
}
|
|
2930
|
-
|
|
2933
|
+
Wn.displayName = "OrderTimeline";
|
|
2931
2934
|
//#endregion
|
|
2932
2935
|
//#region src/components/blocks/commerce/payment-timeline/payment-timeline.tsx
|
|
2933
|
-
function
|
|
2936
|
+
function Gn({ events: e, className: t }) {
|
|
2934
2937
|
let n = e.map((e, t) => ({
|
|
2935
2938
|
id: `${e.label}-${String(t)}`,
|
|
2936
2939
|
title: e.label,
|
|
2937
2940
|
description: e.date,
|
|
2938
2941
|
icon: e.icon,
|
|
2939
2942
|
status: e.done ? "success" : "pending",
|
|
2940
|
-
children: e.amount ? /* @__PURE__ */ W(
|
|
2943
|
+
children: e.amount ? /* @__PURE__ */ W(T, {
|
|
2941
2944
|
type: "inherit",
|
|
2942
2945
|
weight: "medium",
|
|
2943
2946
|
className: "tabular-nums",
|
|
@@ -2948,16 +2951,16 @@ function Un({ events: e, className: t }) {
|
|
|
2948
2951
|
"data-component": "payment-timeline",
|
|
2949
2952
|
"data-slot": "payment-timeline",
|
|
2950
2953
|
className: r("payment-timeline--component min-w-0", t),
|
|
2951
|
-
children: /* @__PURE__ */ W(
|
|
2954
|
+
children: /* @__PURE__ */ W(Te, {
|
|
2952
2955
|
items: n,
|
|
2953
2956
|
dotSize: "lg"
|
|
2954
2957
|
})
|
|
2955
2958
|
});
|
|
2956
2959
|
}
|
|
2957
|
-
|
|
2960
|
+
Gn.displayName = "PaymentTimeline";
|
|
2958
2961
|
//#endregion
|
|
2959
2962
|
//#region src/components/blocks/commerce/inventory-section/types.ts
|
|
2960
|
-
var
|
|
2963
|
+
var Kn = {
|
|
2961
2964
|
title: "Inventory",
|
|
2962
2965
|
description: "Manage stock tracking, availability, fulfillment, and compliance details.",
|
|
2963
2966
|
status: {
|
|
@@ -3048,22 +3051,22 @@ var Wn = {
|
|
|
3048
3051
|
clearAll: "Clear tags",
|
|
3049
3052
|
summary: (e, t) => `${e} / ${t} tags`
|
|
3050
3053
|
}
|
|
3051
|
-
},
|
|
3054
|
+
}, qn = {
|
|
3052
3055
|
in_stock: "success",
|
|
3053
3056
|
low_stock: "warning",
|
|
3054
3057
|
out_of_stock: "destructive",
|
|
3055
3058
|
untracked: "secondary"
|
|
3056
3059
|
};
|
|
3057
|
-
function
|
|
3060
|
+
function Jn(e) {
|
|
3058
3061
|
if (e === void 0 || e.trim() === "") return;
|
|
3059
3062
|
let t = Number(e);
|
|
3060
3063
|
return Number.isFinite(t) ? t : void 0;
|
|
3061
3064
|
}
|
|
3062
|
-
function
|
|
3065
|
+
function Yn(e) {
|
|
3063
3066
|
if (!(e.trackQuantity ?? !0)) return "untracked";
|
|
3064
|
-
let t =
|
|
3067
|
+
let t = Jn(e.available) ?? 0;
|
|
3065
3068
|
if (t <= 0) return "out_of_stock";
|
|
3066
|
-
let n =
|
|
3069
|
+
let n = Jn(e.lowStockThreshold);
|
|
3067
3070
|
return n !== void 0 && t <= n ? "low_stock" : "in_stock";
|
|
3068
3071
|
}
|
|
3069
3072
|
function $({ children: e, className: t }) {
|
|
@@ -3074,7 +3077,7 @@ function $({ children: e, className: t }) {
|
|
|
3074
3077
|
children: e
|
|
3075
3078
|
});
|
|
3076
3079
|
}
|
|
3077
|
-
function
|
|
3080
|
+
function Xn({ metric: e }) {
|
|
3078
3081
|
return /* @__PURE__ */ G("div", {
|
|
3079
3082
|
className: "inventory-section-card--metric min-w-0",
|
|
3080
3083
|
children: [
|
|
@@ -3083,7 +3086,7 @@ function Jn({ metric: e }) {
|
|
|
3083
3086
|
type: "secondary",
|
|
3084
3087
|
children: e.label
|
|
3085
3088
|
}),
|
|
3086
|
-
/* @__PURE__ */ W(
|
|
3089
|
+
/* @__PURE__ */ W(T, {
|
|
3087
3090
|
type: "inherit",
|
|
3088
3091
|
weight: "semibold",
|
|
3089
3092
|
className: "tabular-nums",
|
|
@@ -3098,8 +3101,8 @@ function Jn({ metric: e }) {
|
|
|
3098
3101
|
]
|
|
3099
3102
|
});
|
|
3100
3103
|
}
|
|
3101
|
-
function
|
|
3102
|
-
let x = n(
|
|
3104
|
+
function Zn({ 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 }) {
|
|
3105
|
+
let x = n(Kn, b), S = Yn(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) => {
|
|
3103
3106
|
let i = e[n], a = {
|
|
3104
3107
|
...e,
|
|
3105
3108
|
[n]: r
|
|
@@ -3142,8 +3145,8 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3142
3145
|
gap: "xl",
|
|
3143
3146
|
title: x.title,
|
|
3144
3147
|
description: x.description,
|
|
3145
|
-
titleSuffix: /* @__PURE__ */ W(
|
|
3146
|
-
tone:
|
|
3148
|
+
titleSuffix: /* @__PURE__ */ W(N, {
|
|
3149
|
+
tone: qn[S],
|
|
3147
3150
|
children: x.status[S]
|
|
3148
3151
|
}),
|
|
3149
3152
|
headerAction: /* @__PURE__ */ G(f, {
|
|
@@ -3173,7 +3176,7 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3173
3176
|
children: [
|
|
3174
3177
|
!!D("summary") && /* @__PURE__ */ W("div", {
|
|
3175
3178
|
className: "inventory-section-card--summary grid min-w-0 grid-cols-1 gap-space-xl @md/inventory-section-card:grid-cols-2 @3xl/inventory-section-card:grid-cols-4",
|
|
3176
|
-
children: te.map((e) => /* @__PURE__ */ W(
|
|
3179
|
+
children: te.map((e) => /* @__PURE__ */ W(Xn, { metric: e }, e.id))
|
|
3177
3180
|
}),
|
|
3178
3181
|
!!D("identity") && /* @__PURE__ */ G(f, {
|
|
3179
3182
|
render: /* @__PURE__ */ W("section", {}),
|
|
@@ -3183,7 +3186,7 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3183
3186
|
label: x.fields.sku,
|
|
3184
3187
|
error: a?.sku,
|
|
3185
3188
|
hint: x.hints.sku,
|
|
3186
|
-
children: /* @__PURE__ */ W(
|
|
3189
|
+
children: /* @__PURE__ */ W(P, {
|
|
3187
3190
|
value: e.sku ?? "",
|
|
3188
3191
|
onChange: (e) => k("sku", e.target.value),
|
|
3189
3192
|
placeholder: x.placeholders.sku,
|
|
@@ -3194,7 +3197,7 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3194
3197
|
label: x.fields.barcode,
|
|
3195
3198
|
error: a?.barcode,
|
|
3196
3199
|
hint: x.hints.barcode,
|
|
3197
|
-
children: /* @__PURE__ */ W(
|
|
3200
|
+
children: /* @__PURE__ */ W(P, {
|
|
3198
3201
|
value: e.barcode ?? "",
|
|
3199
3202
|
onChange: (e) => k("barcode", e.target.value),
|
|
3200
3203
|
placeholder: x.placeholders.barcode,
|
|
@@ -3209,7 +3212,7 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3209
3212
|
className: "inventory-section-card--tracking",
|
|
3210
3213
|
children: [
|
|
3211
3214
|
/* @__PURE__ */ W($, { children: x.sections.tracking }),
|
|
3212
|
-
!!O("trackQuantity") && /* @__PURE__ */ W(
|
|
3215
|
+
!!O("trackQuantity") && /* @__PURE__ */ W(ce, {
|
|
3213
3216
|
label: x.fields.trackQuantity,
|
|
3214
3217
|
description: x.hints.available,
|
|
3215
3218
|
value: w,
|
|
@@ -3223,7 +3226,7 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3223
3226
|
label: x.fields.available,
|
|
3224
3227
|
error: a?.available,
|
|
3225
3228
|
hint: x.hints.available,
|
|
3226
|
-
children: /* @__PURE__ */ W(
|
|
3229
|
+
children: /* @__PURE__ */ W(me, {
|
|
3227
3230
|
value: e.available ?? "",
|
|
3228
3231
|
onChange: (e) => k("available", e.target.value),
|
|
3229
3232
|
placeholder: x.placeholders.available,
|
|
@@ -3238,7 +3241,7 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3238
3241
|
label: x.fields.committed,
|
|
3239
3242
|
error: a?.committed,
|
|
3240
3243
|
hint: x.hints.committed,
|
|
3241
|
-
children: /* @__PURE__ */ W(
|
|
3244
|
+
children: /* @__PURE__ */ W(me, {
|
|
3242
3245
|
value: e.committed ?? "",
|
|
3243
3246
|
onChange: (e) => k("committed", e.target.value),
|
|
3244
3247
|
placeholder: x.placeholders.committed,
|
|
@@ -3253,7 +3256,7 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3253
3256
|
label: x.fields.incoming,
|
|
3254
3257
|
error: a?.incoming,
|
|
3255
3258
|
hint: x.hints.incoming,
|
|
3256
|
-
children: /* @__PURE__ */ W(
|
|
3259
|
+
children: /* @__PURE__ */ W(me, {
|
|
3257
3260
|
value: e.incoming ?? "",
|
|
3258
3261
|
onChange: (e) => k("incoming", e.target.value),
|
|
3259
3262
|
placeholder: x.placeholders.incoming,
|
|
@@ -3268,7 +3271,7 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3268
3271
|
label: x.fields.lowStockThreshold,
|
|
3269
3272
|
error: a?.lowStockThreshold,
|
|
3270
3273
|
hint: x.hints.lowStockThreshold,
|
|
3271
|
-
children: /* @__PURE__ */ W(
|
|
3274
|
+
children: /* @__PURE__ */ W(me, {
|
|
3272
3275
|
value: e.lowStockThreshold ?? "",
|
|
3273
3276
|
onChange: (e) => k("lowStockThreshold", e.target.value),
|
|
3274
3277
|
placeholder: x.placeholders.lowStockThreshold,
|
|
@@ -3285,7 +3288,7 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3285
3288
|
label: x.fields.inventoryPolicy,
|
|
3286
3289
|
error: a?.inventoryPolicy,
|
|
3287
3290
|
hint: x.hints.inventoryPolicy,
|
|
3288
|
-
children: /* @__PURE__ */ W(
|
|
3291
|
+
children: /* @__PURE__ */ W(ue, {
|
|
3289
3292
|
columns: 2,
|
|
3290
3293
|
value: e.inventoryPolicy ?? "deny",
|
|
3291
3294
|
onValueChange: (e) => k("inventoryPolicy", e),
|
|
@@ -3312,7 +3315,7 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3312
3315
|
label: x.fields.locationId,
|
|
3313
3316
|
error: a?.locationId,
|
|
3314
3317
|
hint: x.hints.locationId,
|
|
3315
|
-
children: u.length > 0 ? /* @__PURE__ */ W(
|
|
3318
|
+
children: u.length > 0 ? /* @__PURE__ */ W(le, {
|
|
3316
3319
|
value: e.locationId ?? null,
|
|
3317
3320
|
onValueChange: (e) => k("locationId", e),
|
|
3318
3321
|
options: u,
|
|
@@ -3320,7 +3323,7 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3320
3323
|
disabled: C,
|
|
3321
3324
|
invalid: !!a?.locationId,
|
|
3322
3325
|
allowClear: !0
|
|
3323
|
-
}) : /* @__PURE__ */ W(
|
|
3326
|
+
}) : /* @__PURE__ */ W(P, {
|
|
3324
3327
|
value: e.locationId ?? "",
|
|
3325
3328
|
onChange: (e) => k("locationId", e.target.value),
|
|
3326
3329
|
placeholder: x.placeholders.locationId,
|
|
@@ -3331,7 +3334,7 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3331
3334
|
label: x.fields.binLocation,
|
|
3332
3335
|
error: a?.binLocation,
|
|
3333
3336
|
hint: x.hints.binLocation,
|
|
3334
|
-
children: /* @__PURE__ */ W(
|
|
3337
|
+
children: /* @__PURE__ */ W(P, {
|
|
3335
3338
|
value: e.binLocation ?? "",
|
|
3336
3339
|
onChange: (e) => k("binLocation", e.target.value),
|
|
3337
3340
|
placeholder: x.placeholders.binLocation,
|
|
@@ -3346,7 +3349,7 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3346
3349
|
className: "inventory-section-card--shipping",
|
|
3347
3350
|
children: [
|
|
3348
3351
|
/* @__PURE__ */ W($, { children: x.sections.shipping }),
|
|
3349
|
-
!!O("requiresShipping") && /* @__PURE__ */ W(
|
|
3352
|
+
!!O("requiresShipping") && /* @__PURE__ */ W(ce, {
|
|
3350
3353
|
label: x.fields.requiresShipping,
|
|
3351
3354
|
description: x.hints.weight,
|
|
3352
3355
|
value: T,
|
|
@@ -3357,7 +3360,7 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3357
3360
|
label: x.fields.weight,
|
|
3358
3361
|
error: a?.weight ?? a?.weightUnit,
|
|
3359
3362
|
hint: x.hints.weight,
|
|
3360
|
-
children: /* @__PURE__ */ W(
|
|
3363
|
+
children: /* @__PURE__ */ W(he, {
|
|
3361
3364
|
value: e.weight ?? "",
|
|
3362
3365
|
unit: e.weightUnit ?? "kg",
|
|
3363
3366
|
onChange: (e) => k("weight", e.target.value),
|
|
@@ -3378,7 +3381,7 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3378
3381
|
label: x.fields.countryOfOrigin,
|
|
3379
3382
|
error: a?.countryOfOrigin,
|
|
3380
3383
|
hint: x.hints.countryOfOrigin,
|
|
3381
|
-
children: p.length > 0 ? /* @__PURE__ */ W(
|
|
3384
|
+
children: p.length > 0 ? /* @__PURE__ */ W(le, {
|
|
3382
3385
|
value: e.countryOfOrigin ?? null,
|
|
3383
3386
|
onValueChange: (e) => k("countryOfOrigin", e),
|
|
3384
3387
|
options: p,
|
|
@@ -3386,7 +3389,7 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3386
3389
|
disabled: E,
|
|
3387
3390
|
invalid: !!a?.countryOfOrigin,
|
|
3388
3391
|
allowClear: !0
|
|
3389
|
-
}) : /* @__PURE__ */ W(
|
|
3392
|
+
}) : /* @__PURE__ */ W(P, {
|
|
3390
3393
|
value: e.countryOfOrigin ?? "",
|
|
3391
3394
|
onChange: (e) => k("countryOfOrigin", e.target.value),
|
|
3392
3395
|
placeholder: x.placeholders.countryOfOrigin,
|
|
@@ -3397,7 +3400,7 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3397
3400
|
label: x.fields.hsCode,
|
|
3398
3401
|
error: a?.hsCode,
|
|
3399
3402
|
hint: x.hints.hsCode,
|
|
3400
|
-
children: /* @__PURE__ */ W(
|
|
3403
|
+
children: /* @__PURE__ */ W(P, {
|
|
3401
3404
|
value: e.hsCode ?? "",
|
|
3402
3405
|
onChange: (e) => k("hsCode", e.target.value),
|
|
3403
3406
|
placeholder: x.placeholders.hsCode,
|
|
@@ -3414,7 +3417,7 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3414
3417
|
label: x.fields.tags,
|
|
3415
3418
|
error: a?.tags,
|
|
3416
3419
|
hint: x.hints.tags,
|
|
3417
|
-
children: /* @__PURE__ */ W(
|
|
3420
|
+
children: /* @__PURE__ */ W(pe, {
|
|
3418
3421
|
value: e.tags ?? [],
|
|
3419
3422
|
onValueChange: (e) => k("tags", e),
|
|
3420
3423
|
recommendations: m,
|
|
@@ -3429,32 +3432,32 @@ function Yn({ value: e, onValueChange: t, errors: a, disabled: o = !1, readOnly:
|
|
|
3429
3432
|
]
|
|
3430
3433
|
});
|
|
3431
3434
|
}
|
|
3432
|
-
|
|
3435
|
+
Zn.displayName = "InventorySectionCard";
|
|
3433
3436
|
//#endregion
|
|
3434
3437
|
//#region src/components/blocks/commerce/shared/order-status.ts
|
|
3435
|
-
var
|
|
3438
|
+
var Qn = {
|
|
3436
3439
|
unfulfilled: "warning",
|
|
3437
3440
|
partiallyFulfilled: "warning",
|
|
3438
3441
|
fulfilled: "success",
|
|
3439
3442
|
scheduled: "info",
|
|
3440
3443
|
onHold: "neutral",
|
|
3441
3444
|
cancelled: "destructive"
|
|
3442
|
-
},
|
|
3445
|
+
}, $n = {
|
|
3443
3446
|
pending: "warning",
|
|
3444
3447
|
authorized: "info",
|
|
3445
3448
|
paid: "success",
|
|
3446
3449
|
partiallyRefunded: "neutral",
|
|
3447
3450
|
refunded: "neutral",
|
|
3448
3451
|
voided: "neutral"
|
|
3449
|
-
},
|
|
3452
|
+
}, er = {
|
|
3450
3453
|
success: "success",
|
|
3451
3454
|
pending: "warning",
|
|
3452
3455
|
failure: "destructive"
|
|
3453
|
-
},
|
|
3456
|
+
}, tr = /* @__PURE__ */ new Set([
|
|
3454
3457
|
"refund",
|
|
3455
3458
|
"void",
|
|
3456
3459
|
"chargeback"
|
|
3457
|
-
]),
|
|
3460
|
+
]), nr = {
|
|
3458
3461
|
fulfillment: {
|
|
3459
3462
|
unfulfilled: "Unfulfilled",
|
|
3460
3463
|
partiallyFulfilled: "Partially fulfilled",
|
|
@@ -3471,16 +3474,16 @@ var Xn = {
|
|
|
3471
3474
|
refunded: "Refunded",
|
|
3472
3475
|
voided: "Voided"
|
|
3473
3476
|
}
|
|
3474
|
-
},
|
|
3475
|
-
...
|
|
3477
|
+
}, rr = {
|
|
3478
|
+
...nr,
|
|
3476
3479
|
formatOrderNumber: (e) => `#${e}`,
|
|
3477
3480
|
formatOrigin: (e, t) => `${e} from ${t}`,
|
|
3478
3481
|
moreActions: "More actions"
|
|
3479
3482
|
};
|
|
3480
3483
|
//#endregion
|
|
3481
3484
|
//#region src/components/blocks/commerce/order-header/order-header.tsx
|
|
3482
|
-
function
|
|
3483
|
-
let g = n(
|
|
3485
|
+
function ir({ orderNumber: e, fulfillmentStatus: t, paymentStatus: i, placedAt: a, source: s, actions: l, renderLink: u, headingTag: d = "h1", className: p, strings: m, ...h }) {
|
|
3486
|
+
let g = n(rr, m), _ = a && s ? g.formatOrigin(a, s) : a || s || void 0;
|
|
3484
3487
|
return /* @__PURE__ */ G(f, {
|
|
3485
3488
|
...h,
|
|
3486
3489
|
gap: "xs",
|
|
@@ -3505,20 +3508,20 @@ function nr({ orderNumber: e, fulfillmentStatus: t, paymentStatus: i, placedAt:
|
|
|
3505
3508
|
className: "order-header--number text-inherit",
|
|
3506
3509
|
children: g.formatOrderNumber(e)
|
|
3507
3510
|
}),
|
|
3508
|
-
!!i && /* @__PURE__ */ W(
|
|
3509
|
-
tone:
|
|
3511
|
+
!!i && /* @__PURE__ */ W(N, {
|
|
3512
|
+
tone: $n[i],
|
|
3510
3513
|
"data-axis": "payment",
|
|
3511
3514
|
className: "order-header--payment",
|
|
3512
3515
|
children: g.payment[i]
|
|
3513
3516
|
}),
|
|
3514
|
-
!!t && /* @__PURE__ */ W(
|
|
3515
|
-
tone:
|
|
3517
|
+
!!t && /* @__PURE__ */ W(N, {
|
|
3518
|
+
tone: Qn[t],
|
|
3516
3519
|
"data-axis": "fulfillment",
|
|
3517
3520
|
className: "order-header--fulfillment",
|
|
3518
3521
|
children: g.fulfillment[t]
|
|
3519
3522
|
})
|
|
3520
3523
|
]
|
|
3521
|
-
}), !!l?.length && /* @__PURE__ */ W(
|
|
3524
|
+
}), !!l?.length && /* @__PURE__ */ W(x, {
|
|
3522
3525
|
actions: l,
|
|
3523
3526
|
srText: g.moreActions,
|
|
3524
3527
|
renderLink: u
|
|
@@ -3531,14 +3534,14 @@ function nr({ orderNumber: e, fulfillmentStatus: t, paymentStatus: i, placedAt:
|
|
|
3531
3534
|
})]
|
|
3532
3535
|
});
|
|
3533
3536
|
}
|
|
3534
|
-
|
|
3537
|
+
ir.displayName = "OrderHeader";
|
|
3535
3538
|
//#endregion
|
|
3536
3539
|
//#region src/components/blocks/commerce/order-line-item/types.ts
|
|
3537
|
-
var
|
|
3540
|
+
var ar = { formatUnitPrice: (e, t) => `${e} × ${t}` };
|
|
3538
3541
|
//#endregion
|
|
3539
3542
|
//#region src/components/blocks/commerce/order-line-item/order-line-item.tsx
|
|
3540
|
-
function
|
|
3541
|
-
let v = n(
|
|
3543
|
+
function or({ 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, ..._ }) {
|
|
3544
|
+
let v = n(ar, g), y = !!i || !!a;
|
|
3542
3545
|
return /* @__PURE__ */ W("div", {
|
|
3543
3546
|
..._,
|
|
3544
3547
|
"data-slot": "order-line-item",
|
|
@@ -3549,7 +3552,7 @@ function ir({ id: e, title: t, variantTitle: i, sku: a, imageSrc: s, imageAlt: c
|
|
|
3549
3552
|
children: [/* @__PURE__ */ W(L, {
|
|
3550
3553
|
variant: "image",
|
|
3551
3554
|
className: "order-line-item--media",
|
|
3552
|
-
children: /* @__PURE__ */ W(
|
|
3555
|
+
children: /* @__PURE__ */ W(Wt, {
|
|
3553
3556
|
src: s,
|
|
3554
3557
|
alt: c,
|
|
3555
3558
|
title: t
|
|
@@ -3572,17 +3575,17 @@ function ir({ id: e, title: t, variantTitle: i, sku: a, imageSrc: s, imageAlt: c
|
|
|
3572
3575
|
align: "center",
|
|
3573
3576
|
wrap: !0,
|
|
3574
3577
|
className: "order-line-item--meta",
|
|
3575
|
-
children: [!!i && /* @__PURE__ */ W(
|
|
3578
|
+
children: [!!i && /* @__PURE__ */ W(N, {
|
|
3576
3579
|
tone: "neutral",
|
|
3577
3580
|
size: "sm",
|
|
3578
3581
|
children: i
|
|
3579
|
-
}), !!a && /* @__PURE__ */ W(
|
|
3582
|
+
}), !!a && /* @__PURE__ */ W(O, {
|
|
3580
3583
|
size: "xs",
|
|
3581
3584
|
type: "secondary",
|
|
3582
3585
|
children: a
|
|
3583
3586
|
})]
|
|
3584
3587
|
}),
|
|
3585
|
-
!!p?.length && /* @__PURE__ */ W(
|
|
3588
|
+
!!p?.length && /* @__PURE__ */ W(_e, {
|
|
3586
3589
|
layout: "rows",
|
|
3587
3590
|
density: "compact",
|
|
3588
3591
|
className: "order-line-item--properties",
|
|
@@ -3599,7 +3602,7 @@ function ir({ id: e, title: t, variantTitle: i, sku: a, imageSrc: s, imageAlt: c
|
|
|
3599
3602
|
children: [/* @__PURE__ */ G("span", {
|
|
3600
3603
|
className: "order-line-item--price inline-flex items-baseline gap-space-xs @md/order-line-item:justify-end",
|
|
3601
3604
|
children: [
|
|
3602
|
-
/* @__PURE__ */ W(
|
|
3605
|
+
/* @__PURE__ */ W(fe, { children: v.formatUnitPrice(l, u) }),
|
|
3603
3606
|
/* @__PURE__ */ W(o, {
|
|
3604
3607
|
tag: "span",
|
|
3605
3608
|
size: "xs",
|
|
@@ -3637,19 +3640,19 @@ function ir({ id: e, title: t, variantTitle: i, sku: a, imageSrc: s, imageAlt: c
|
|
|
3637
3640
|
})
|
|
3638
3641
|
});
|
|
3639
3642
|
}
|
|
3640
|
-
|
|
3643
|
+
or.displayName = "OrderLineItem";
|
|
3641
3644
|
//#endregion
|
|
3642
3645
|
//#region src/components/blocks/commerce/fulfillment-group/types.ts
|
|
3643
|
-
var
|
|
3644
|
-
...
|
|
3645
|
-
fulfillment:
|
|
3646
|
+
var sr = {
|
|
3647
|
+
...ar,
|
|
3648
|
+
fulfillment: nr.fulfillment,
|
|
3646
3649
|
formatHeading: (e, t) => `${e} (${t})`,
|
|
3647
3650
|
moreActions: "More actions"
|
|
3648
3651
|
};
|
|
3649
3652
|
//#endregion
|
|
3650
3653
|
//#region src/components/blocks/commerce/fulfillment-group/fulfillment-group.tsx
|
|
3651
|
-
function
|
|
3652
|
-
let g = n(
|
|
3654
|
+
function cr({ status: e, location: t, notice: i, noticeIcon: a, items: s, children: c, actions: l, renderLink: u, className: d, strings: p, ...h }) {
|
|
3655
|
+
let g = n(sr, p), v = ke(() => ({ formatUnitPrice: g.formatUnitPrice }), [g.formatUnitPrice]), b = g.fulfillment[e], C = s ? g.formatHeading(b, s.length) : b, [w, ...T] = (l ?? []).filter((e) => e.visible !== !1), E = t != null && t !== "", D = i != null && i !== "";
|
|
3653
3656
|
return /* @__PURE__ */ W(_, {
|
|
3654
3657
|
...h,
|
|
3655
3658
|
surface: "card",
|
|
@@ -3659,20 +3662,20 @@ function or({ status: e, location: t, notice: i, noticeIcon: a, items: s, childr
|
|
|
3659
3662
|
role: "heading",
|
|
3660
3663
|
"aria-level": 2,
|
|
3661
3664
|
className: "fulfillment-group--heading inline-flex max-w-full",
|
|
3662
|
-
children: /* @__PURE__ */ W(
|
|
3663
|
-
tone:
|
|
3664
|
-
children:
|
|
3665
|
+
children: /* @__PURE__ */ W(N, {
|
|
3666
|
+
tone: Qn[e],
|
|
3667
|
+
children: C
|
|
3665
3668
|
})
|
|
3666
3669
|
}),
|
|
3667
|
-
description:
|
|
3670
|
+
description: E || D ? /* @__PURE__ */ G(f, {
|
|
3668
3671
|
gap: "2xs",
|
|
3669
3672
|
className: "fulfillment-group--context",
|
|
3670
|
-
children: [!!
|
|
3673
|
+
children: [!!E && /* @__PURE__ */ W(o, {
|
|
3671
3674
|
tag: "div",
|
|
3672
3675
|
type: "secondary",
|
|
3673
3676
|
className: "fulfillment-group--location",
|
|
3674
3677
|
children: t
|
|
3675
|
-
}), !!
|
|
3678
|
+
}), !!D && /* @__PURE__ */ G(f, {
|
|
3676
3679
|
direction: "horizontal",
|
|
3677
3680
|
gap: "sm",
|
|
3678
3681
|
align: "center",
|
|
@@ -3688,16 +3691,16 @@ function or({ status: e, location: t, notice: i, noticeIcon: a, items: s, childr
|
|
|
3688
3691
|
})]
|
|
3689
3692
|
})]
|
|
3690
3693
|
}) : void 0,
|
|
3691
|
-
footerSlot:
|
|
3694
|
+
footerSlot: w ? /* @__PURE__ */ G(f, {
|
|
3692
3695
|
direction: "horizontal",
|
|
3693
|
-
gap:
|
|
3696
|
+
gap: y.commands,
|
|
3694
3697
|
justify: "end",
|
|
3695
3698
|
className: "fulfillment-group--actions",
|
|
3696
|
-
children: [/* @__PURE__ */ W(
|
|
3697
|
-
actions: [
|
|
3699
|
+
children: [/* @__PURE__ */ W(S, {
|
|
3700
|
+
actions: [w],
|
|
3698
3701
|
renderLink: u
|
|
3699
|
-
}),
|
|
3700
|
-
actions:
|
|
3702
|
+
}), T.length > 0 && /* @__PURE__ */ W(x, {
|
|
3703
|
+
actions: T,
|
|
3701
3704
|
context: "commands",
|
|
3702
3705
|
srText: g.moreActions,
|
|
3703
3706
|
buttonProps: { size: "sm" },
|
|
@@ -3712,7 +3715,7 @@ function or({ status: e, location: t, notice: i, noticeIcon: a, items: s, childr
|
|
|
3712
3715
|
className: "fulfillment-group--items m-0 min-w-0 list-none p-0",
|
|
3713
3716
|
children: (s ?? []).map((e) => /* @__PURE__ */ W("li", {
|
|
3714
3717
|
className: "fulfillment-group--line border-t border-border/60 py-space-lg first:border-t-0 first:pt-0 last:pb-0",
|
|
3715
|
-
children: /* @__PURE__ */ W(
|
|
3718
|
+
children: /* @__PURE__ */ W(or, {
|
|
3716
3719
|
...e,
|
|
3717
3720
|
strings: v
|
|
3718
3721
|
})
|
|
@@ -3720,17 +3723,17 @@ function or({ status: e, location: t, notice: i, noticeIcon: a, items: s, childr
|
|
|
3720
3723
|
})
|
|
3721
3724
|
});
|
|
3722
3725
|
}
|
|
3723
|
-
|
|
3726
|
+
cr.displayName = "FulfillmentGroup";
|
|
3724
3727
|
//#endregion
|
|
3725
3728
|
//#region src/components/blocks/commerce/order-summary/types.ts
|
|
3726
|
-
var
|
|
3729
|
+
var lr = {
|
|
3727
3730
|
title: "Payment",
|
|
3728
|
-
payment:
|
|
3731
|
+
payment: nr.payment
|
|
3729
3732
|
};
|
|
3730
3733
|
//#endregion
|
|
3731
3734
|
//#region src/components/blocks/commerce/order-summary/order-summary.tsx
|
|
3732
|
-
function
|
|
3733
|
-
return /* @__PURE__ */ W(
|
|
3735
|
+
function ur({ line: e, total: t = !1, rollup: n = !1 }) {
|
|
3736
|
+
return /* @__PURE__ */ W(q, {
|
|
3734
3737
|
label: e.label,
|
|
3735
3738
|
note: e.note,
|
|
3736
3739
|
amount: e.amount,
|
|
@@ -3739,16 +3742,16 @@ function cr({ line: e, total: t = !1, rollup: n = !1 }) {
|
|
|
3739
3742
|
rollup: n
|
|
3740
3743
|
});
|
|
3741
3744
|
}
|
|
3742
|
-
function
|
|
3743
|
-
let p = n(
|
|
3745
|
+
function dr({ 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 }) {
|
|
3746
|
+
let p = n(lr, d), m = o != null && o !== !1 && o !== "";
|
|
3744
3747
|
return /* @__PURE__ */ G(_, {
|
|
3745
3748
|
...f,
|
|
3746
3749
|
surface: s,
|
|
3747
3750
|
padding: c,
|
|
3748
3751
|
headerDivider: l,
|
|
3749
3752
|
title: p.title,
|
|
3750
|
-
titleSuffix: a ? /* @__PURE__ */ W(
|
|
3751
|
-
tone:
|
|
3753
|
+
titleSuffix: a ? /* @__PURE__ */ W(N, {
|
|
3754
|
+
tone: $n[a],
|
|
3752
3755
|
className: "order-summary--status",
|
|
3753
3756
|
children: p.payment[a]
|
|
3754
3757
|
}) : void 0,
|
|
@@ -3757,27 +3760,27 @@ function lr({ goods: e, total: t, payments: i, paymentStatus: a, alert: o, surfa
|
|
|
3757
3760
|
tone: "warning",
|
|
3758
3761
|
role: "note",
|
|
3759
3762
|
className: "order-summary--alert",
|
|
3760
|
-
children: [/* @__PURE__ */ W(
|
|
3763
|
+
children: [/* @__PURE__ */ W(Ke, { "aria-hidden": "true" }), /* @__PURE__ */ W(h, { children: o })]
|
|
3761
3764
|
}) : void 0,
|
|
3762
3765
|
"data-slot": "order-summary",
|
|
3763
3766
|
className: r("order-summary--component w-full", u),
|
|
3764
|
-
children: [/* @__PURE__ */ G(
|
|
3767
|
+
children: [/* @__PURE__ */ G(J, {
|
|
3765
3768
|
className: "order-summary--goods",
|
|
3766
|
-
children: [e.map((e, t) => /* @__PURE__ */ W(
|
|
3769
|
+
children: [e.map((e, t) => /* @__PURE__ */ W(ur, { line: e }, e.id ?? String(t))), /* @__PURE__ */ W(ur, {
|
|
3767
3770
|
line: t,
|
|
3768
3771
|
total: !0,
|
|
3769
3772
|
rollup: e.length > 0
|
|
3770
3773
|
})]
|
|
3771
|
-
}), !!i?.length && /* @__PURE__ */ W(
|
|
3774
|
+
}), !!i?.length && /* @__PURE__ */ W(J, {
|
|
3772
3775
|
className: "order-summary--payments",
|
|
3773
|
-
children: i.map((e, t) => /* @__PURE__ */ W(
|
|
3776
|
+
children: i.map((e, t) => /* @__PURE__ */ W(ur, { line: e }, e.id ?? String(t)))
|
|
3774
3777
|
})]
|
|
3775
3778
|
});
|
|
3776
3779
|
}
|
|
3777
|
-
|
|
3780
|
+
dr.displayName = "OrderSummary";
|
|
3778
3781
|
//#endregion
|
|
3779
3782
|
//#region src/components/blocks/commerce/order-transactions/types.ts
|
|
3780
|
-
var
|
|
3783
|
+
var fr = {
|
|
3781
3784
|
title: "Transactions",
|
|
3782
3785
|
kind: {
|
|
3783
3786
|
authorization: "Authorization",
|
|
@@ -3797,8 +3800,8 @@ var ur = {
|
|
|
3797
3800
|
};
|
|
3798
3801
|
//#endregion
|
|
3799
3802
|
//#region src/components/blocks/commerce/order-transactions/order-transactions.tsx
|
|
3800
|
-
function
|
|
3801
|
-
let u = n(
|
|
3803
|
+
function pr({ transactions: e, surface: t = "flat", padding: i = t === "flat" ? "none" : "md", headerDivider: a, className: s, strings: c, ...l }) {
|
|
3804
|
+
let u = n(fr, c);
|
|
3802
3805
|
return /* @__PURE__ */ W(_, {
|
|
3803
3806
|
...l,
|
|
3804
3807
|
surface: t,
|
|
@@ -3807,7 +3810,7 @@ function dr({ transactions: e, surface: t = "flat", padding: i = t === "flat" ?
|
|
|
3807
3810
|
title: u.title,
|
|
3808
3811
|
"data-slot": "order-transactions",
|
|
3809
3812
|
className: r("order-transactions--component w-full", s),
|
|
3810
|
-
children: e.length === 0 ? /* @__PURE__ */ W(
|
|
3813
|
+
children: e.length === 0 ? /* @__PURE__ */ W(Se, {
|
|
3811
3814
|
padding: "sm",
|
|
3812
3815
|
title: u.empty,
|
|
3813
3816
|
description: !1,
|
|
@@ -3816,7 +3819,7 @@ function dr({ transactions: e, surface: t = "flat", padding: i = t === "flat" ?
|
|
|
3816
3819
|
}) : /* @__PURE__ */ W("ol", {
|
|
3817
3820
|
className: "order-transactions--list m-0 list-none p-0",
|
|
3818
3821
|
children: e.map((e) => {
|
|
3819
|
-
let t =
|
|
3822
|
+
let t = tr.has(e.kind), n = e.status === "failure", r = $e(e.amount), i = t && !n ? `−${r}` : r, a = [
|
|
3820
3823
|
e.processedAt,
|
|
3821
3824
|
e.method,
|
|
3822
3825
|
e.gateway
|
|
@@ -3841,8 +3844,8 @@ function dr({ transactions: e, surface: t = "flat", padding: i = t === "flat" ?
|
|
|
3841
3844
|
tag: "span",
|
|
3842
3845
|
weight: "medium",
|
|
3843
3846
|
children: u.kind[e.kind]
|
|
3844
|
-
}), e.status !== "success" && /* @__PURE__ */ W(
|
|
3845
|
-
tone:
|
|
3847
|
+
}), e.status !== "success" && /* @__PURE__ */ W(N, {
|
|
3848
|
+
tone: er[e.status],
|
|
3846
3849
|
size: "sm",
|
|
3847
3850
|
className: "order-transactions--status",
|
|
3848
3851
|
children: u.status[e.status]
|
|
@@ -3866,7 +3869,7 @@ function dr({ transactions: e, surface: t = "flat", padding: i = t === "flat" ?
|
|
|
3866
3869
|
size: "xs",
|
|
3867
3870
|
type: "secondary",
|
|
3868
3871
|
className: "order-transactions--reference min-w-0 break-all",
|
|
3869
|
-
children: [/* @__PURE__ */ W(
|
|
3872
|
+
children: [/* @__PURE__ */ W(fe, { children: `${u.reference}: ` }), /* @__PURE__ */ W(O, {
|
|
3870
3873
|
type: "inherit",
|
|
3871
3874
|
children: e.reference
|
|
3872
3875
|
})]
|
|
@@ -3884,10 +3887,10 @@ function dr({ transactions: e, surface: t = "flat", padding: i = t === "flat" ?
|
|
|
3884
3887
|
})
|
|
3885
3888
|
});
|
|
3886
3889
|
}
|
|
3887
|
-
|
|
3890
|
+
pr.displayName = "OrderTransactions";
|
|
3888
3891
|
//#endregion
|
|
3889
3892
|
//#region src/components/blocks/commerce/order-customer/types.ts
|
|
3890
|
-
var
|
|
3893
|
+
var mr = {
|
|
3891
3894
|
title: "Customer",
|
|
3892
3895
|
shippingAddress: "Shipping address",
|
|
3893
3896
|
billingAddress: "Billing address",
|
|
@@ -3899,7 +3902,7 @@ var fr = {
|
|
|
3899
3902
|
};
|
|
3900
3903
|
//#endregion
|
|
3901
3904
|
//#region src/components/blocks/commerce/order-customer/order-customer.tsx
|
|
3902
|
-
function
|
|
3905
|
+
function hr({ label: e, editLabel: t, address: n, onEdit: a, replacement: c, emptyLabel: l, className: u }) {
|
|
3903
3906
|
return /* @__PURE__ */ G(f, {
|
|
3904
3907
|
gap: "sm",
|
|
3905
3908
|
className: r("order-customer--address min-w-0", u),
|
|
@@ -3922,7 +3925,7 @@ function pr({ label: e, editLabel: t, address: n, onEdit: a, replacement: c, emp
|
|
|
3922
3925
|
"aria-label": t,
|
|
3923
3926
|
onClick: a,
|
|
3924
3927
|
className: "order-customer--edit",
|
|
3925
|
-
children: /* @__PURE__ */ W(
|
|
3928
|
+
children: /* @__PURE__ */ W(Ue, {
|
|
3926
3929
|
"aria-hidden": "true",
|
|
3927
3930
|
className: "size-icon-sm"
|
|
3928
3931
|
})
|
|
@@ -3930,14 +3933,14 @@ function pr({ label: e, editLabel: t, address: n, onEdit: a, replacement: c, emp
|
|
|
3930
3933
|
}), c ? /* @__PURE__ */ W(o, {
|
|
3931
3934
|
type: "secondary",
|
|
3932
3935
|
children: c
|
|
3933
|
-
}) : n ? /* @__PURE__ */ W(
|
|
3936
|
+
}) : n ? /* @__PURE__ */ W(Lt, { address: n }) : /* @__PURE__ */ W(o, {
|
|
3934
3937
|
type: "secondary",
|
|
3935
3938
|
children: l
|
|
3936
3939
|
})]
|
|
3937
3940
|
});
|
|
3938
3941
|
}
|
|
3939
|
-
function
|
|
3940
|
-
let x = n(
|
|
3942
|
+
function gr({ 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 }) {
|
|
3943
|
+
let x = n(mr, y), S = !!t || !!i;
|
|
3941
3944
|
return /* @__PURE__ */ G(_, {
|
|
3942
3945
|
...b,
|
|
3943
3946
|
surface: m,
|
|
@@ -3949,23 +3952,23 @@ function mr({ name: e, email: t, phone: i, orderCount: a, shippingAddress: o, bi
|
|
|
3949
3952
|
className: r("order-customer--component w-full", v),
|
|
3950
3953
|
children: [
|
|
3951
3954
|
/* @__PURE__ */ W(V, {
|
|
3952
|
-
className: r("order-customer--identity flex-nowrap", !!l && r("-mx-row-x w-auto text-start",
|
|
3955
|
+
className: r("order-customer--identity flex-nowrap", !!l && r("-mx-row-x w-auto text-start", w.rowHover)),
|
|
3953
3956
|
padding: l ? "default" : "none",
|
|
3954
3957
|
render: l ? /* @__PURE__ */ W("button", {
|
|
3955
3958
|
type: "button",
|
|
3956
3959
|
onClick: l
|
|
3957
3960
|
}) : void 0,
|
|
3958
|
-
media: /* @__PURE__ */ W(
|
|
3961
|
+
media: /* @__PURE__ */ W(ie, { children: /* @__PURE__ */ W(re, { children: te(e) }) }),
|
|
3959
3962
|
title: e,
|
|
3960
3963
|
description: a === void 0 ? void 0 : x.formatOrderCount(a)
|
|
3961
3964
|
}),
|
|
3962
|
-
!!
|
|
3965
|
+
!!S && /* @__PURE__ */ G(f, {
|
|
3963
3966
|
gap: "xs",
|
|
3964
3967
|
className: "order-customer--contact min-w-0",
|
|
3965
|
-
children: [!!t && /* @__PURE__ */ W(
|
|
3968
|
+
children: [!!t && /* @__PURE__ */ W(k, {
|
|
3966
3969
|
value: t,
|
|
3967
3970
|
className: "self-start"
|
|
3968
|
-
}), !!i && /* @__PURE__ */ W(
|
|
3971
|
+
}), !!i && /* @__PURE__ */ W(E, {
|
|
3969
3972
|
value: i,
|
|
3970
3973
|
className: "self-start"
|
|
3971
3974
|
})]
|
|
@@ -3974,14 +3977,14 @@ function mr({ name: e, email: t, phone: i, orderCount: a, shippingAddress: o, bi
|
|
|
3974
3977
|
minColumnWidth: "sm",
|
|
3975
3978
|
gap: "xl",
|
|
3976
3979
|
className: "order-customer--addresses",
|
|
3977
|
-
children: [/* @__PURE__ */ W(
|
|
3980
|
+
children: [/* @__PURE__ */ W(hr, {
|
|
3978
3981
|
label: x.shippingAddress,
|
|
3979
3982
|
editLabel: x.editShipping,
|
|
3980
3983
|
address: o,
|
|
3981
3984
|
onEdit: d,
|
|
3982
3985
|
emptyLabel: x.noAddress,
|
|
3983
3986
|
className: "order-customer--shipping"
|
|
3984
|
-
}), /* @__PURE__ */ W(
|
|
3987
|
+
}), /* @__PURE__ */ W(hr, {
|
|
3985
3988
|
label: x.billingAddress,
|
|
3986
3989
|
editLabel: x.editBilling,
|
|
3987
3990
|
address: s,
|
|
@@ -3994,8 +3997,8 @@ function mr({ name: e, email: t, phone: i, orderCount: a, shippingAddress: o, bi
|
|
|
3994
3997
|
]
|
|
3995
3998
|
});
|
|
3996
3999
|
}
|
|
3997
|
-
|
|
4000
|
+
gr.displayName = "OrderCustomer";
|
|
3998
4001
|
//#endregion
|
|
3999
|
-
export {
|
|
4002
|
+
export { zt as AddressCard, q as AmountRow, Xe as BookingCalendarEventCard, Yt as CartSummary, Jt as CartSummaryCard, Qt as CouponInputCard, cn as DEFAULT_SEO_LISTING_LIMITS, at as DiscountStack, it as DiscountStackPreview, cr as FulfillmentGroup, St as GiftcardCard, Ot as InventoryLevel, Zn as InventorySectionCard, Fn as InvoiceHeader, Hn as InvoiceLineItems, Mn as InvoiceMini, Qe as LoyaltyPoints, gr as OrderCustomer, ir as OrderHeader, or as OrderLineItem, tn as OrderStatusCard, dr as OrderSummary, Wn as OrderTimeline, pr as OrderTransactions, on as PaymentMethod, sn as PaymentMethodCard, Gn as PaymentTimeline, Ce as Receipt, we as ReceiptItems, It as RefundStatus, Ft as RefundStatusCard, kn as SeoListingCard, lt as ShipmentTracking, Mt as SubscriptionSummaryCard, J as SummaryPanel, At as TaxBreakdownCard, Je as UpcomingBookingRow, Et as VendorProfileCard, Ht as VoucherEntry, vn as calculateSeoListingScore, Rt as defaultAddressCardStrings, Gt as defaultCartSummaryStrings, Xt as defaultCouponInputStrings, nt as defaultDiscountStackStrings, sr as defaultFulfillmentGroupStrings, Dt as defaultInventoryLevelStrings, Kn as defaultInventorySectionStrings, Ze as defaultLoyaltyPointsStrings, mr as defaultOrderCustomerStrings, rr as defaultOrderHeaderStrings, ar as defaultOrderLineItemStrings, $t as defaultOrderStatusStrings, lr as defaultOrderSummaryStrings, fr as defaultOrderTransactionsStrings, nn as defaultPaymentMethodStrings, Nt as defaultRefundStatusStrings, yn as defaultSeoListingCardStrings, st as defaultShipmentTrackingStrings, jt as defaultSubscriptionSummaryStrings, kt as defaultTaxBreakdownStrings, Ct as defaultVendorProfileStrings, Bt as defaultVoucherEntryStrings, Q as getSeoPermalinkPath, pn as getSeoPermalinkSlug };
|
|
4000
4003
|
|
|
4001
4004
|
//# sourceMappingURL=commerce.js.map
|