themelia-react-ui 1.0.2 → 2.0.0
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 +281 -1
- package/README.md +10 -5
- package/dist/{accordion-BRTcsp8J.js → accordion-CQXVcd7Q.js} +13 -13
- package/dist/accordion-CQXVcd7Q.js.map +1 -0
- package/dist/action-menu-BTpyPWJ2.js +264 -0
- package/dist/action-menu-BTpyPWJ2.js.map +1 -0
- package/dist/{affordance-geometry.generated-CL84ZN9A.js → affordance-geometry.generated-CCIXb2A1.js} +7 -2
- package/dist/affordance-geometry.generated-CCIXb2A1.js.map +1 -0
- package/dist/{ai-artifact-DLVdK0Py.js → ai-artifact-2PQ2fItc.js} +171 -176
- package/dist/ai-artifact-2PQ2fItc.js.map +1 -0
- package/dist/{app-shell-C_fKpljx.js → app-shell-BE_j8-AT.js} +4 -4
- package/dist/{app-shell-C_fKpljx.js.map → app-shell-BE_j8-AT.js.map} +1 -1
- package/dist/{attachment-DbjUWsP0.js → attachment-q69dlt5Y.js} +9 -9
- package/dist/{attachment-DbjUWsP0.js.map → attachment-q69dlt5Y.js.map} +1 -1
- package/dist/{auth-CAQcasMV.js → auth-M3vGMgDR.js} +42 -42
- package/dist/{auth-CAQcasMV.js.map → auth-M3vGMgDR.js.map} +1 -1
- package/dist/{avatar-Bu2HhitA.js → avatar-djdaaQ_s.js} +14 -12
- package/dist/avatar-djdaaQ_s.js.map +1 -0
- package/dist/{badge-CzId1Wlm.js → badge-0tATj-tW.js} +9 -9
- package/dist/badge-0tATj-tW.js.map +1 -0
- package/dist/base/accordion.js +1 -1
- package/dist/base/action-menu.js +1 -1
- package/dist/base/attachment.js +1 -1
- package/dist/base/avatar.js +1 -1
- package/dist/base/badge.js +1 -1
- package/dist/base/buttons.js +2 -2
- package/dist/base/cards.js +2 -2
- package/dist/base/carousel.js +11 -11
- package/dist/base/carousel.js.map +1 -1
- package/dist/base/cascader.js +244 -222
- package/dist/base/cascader.js.map +1 -1
- package/dist/base/chart.js +1 -1
- package/dist/base/choice-inputs.js +2 -2
- package/dist/base/code-block.js +1 -1
- package/dist/base/combobox.js +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 +2 -2
- package/dist/base/inline-edit.js +81 -76
- package/dist/base/inline-edit.js.map +1 -1
- package/dist/base/item.js +1 -1
- package/dist/base/media-gallery.js +1 -1
- package/dist/base/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 +7 -4
- package/dist/base/qr-code.js.map +1 -1
- package/dist/base/repeaters.js +42 -42
- package/dist/base/repeaters.js.map +1 -1
- package/dist/base/sheet.js +1 -1
- package/dist/base/sidebar.js +1 -1
- package/dist/base/signature-pad.js +9 -9
- package/dist/base/signature-pad.js.map +1 -1
- package/dist/base/skeleton.js +1 -1
- package/dist/base/spinner.js +1 -1
- package/dist/base/structure.js +1 -1
- package/dist/base/table.js +1 -1
- package/dist/base/text-inputs.js +2 -2
- package/dist/base/toaster.js +4 -4
- package/dist/base/toaster.js.map +1 -1
- package/dist/base/tree.js +1 -1
- package/dist/base/upload-queue.js +1 -1
- package/dist/base/upload.js +3 -3
- package/dist/base/value-inputs.js +1 -1
- package/dist/blocks/admin.js +229 -220
- package/dist/blocks/admin.js.map +1 -1
- package/dist/blocks/ai.js +147 -180
- package/dist/blocks/ai.js.map +1 -1
- package/dist/blocks/analytics/usage-card.js +1 -1
- package/dist/blocks/analytics.js +530 -523
- 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 +1390 -1516
- package/dist/blocks/commerce.js.map +1 -1
- package/dist/blocks/data-display.js +1 -1
- package/dist/blocks/onboarding.js +5 -5
- package/dist/blocks/planning.js +82 -91
- package/dist/blocks/planning.js.map +1 -1
- package/dist/blocks/timelines.js +1 -1
- package/dist/{breadcrumbs-BuYz5SDU.js → breadcrumbs-BG_FfMK4.js} +5 -5
- package/dist/{breadcrumbs-BuYz5SDU.js.map → breadcrumbs-BG_FfMK4.js.map} +1 -1
- package/dist/{button-BZDasD04.js → button-BS3KDg00.js} +185 -162
- package/dist/button-BS3KDg00.js.map +1 -0
- package/dist/{button-BZyfTvwm.js → button-R9CCoH7A.js} +2 -2
- package/dist/{button-BZyfTvwm.js.map → button-R9CCoH7A.js.map} +1 -1
- package/dist/{buttons-D_6KJvEE.js → buttons-DS0ZIwJ_.js} +11 -11
- package/dist/buttons-DS0ZIwJ_.js.map +1 -0
- package/dist/{cards-qGSErLw_.js → cards-QoJ4syG9.js} +7 -7
- package/dist/{cards-qGSErLw_.js.map → cards-QoJ4syG9.js.map} +1 -1
- package/dist/{chart-Bsc5BICK.js → chart-DwYRKKc-.js} +17 -15
- package/dist/chart-DwYRKKc-.js.map +1 -0
- package/dist/checkbox-B7ygNTYp.js +35 -0
- package/dist/checkbox-B7ygNTYp.js.map +1 -0
- package/dist/choice-inputs-DrJ17tpL.js +752 -0
- package/dist/choice-inputs-DrJ17tpL.js.map +1 -0
- package/dist/{code-block-DzHKRybS.js → code-block-CD0B7M93.js} +19 -19
- package/dist/{code-block-DzHKRybS.js.map → code-block-CD0B7M93.js.map} +1 -1
- package/dist/{collapsible-ClvC7Bj3.js → collapsible-oMUGM4tr.js} +3 -3
- package/dist/{collapsible-ClvC7Bj3.js.map → collapsible-oMUGM4tr.js.map} +1 -1
- package/dist/{collection-content-D6S8cv_n.js → collection-content-Ys-OZOkY.js} +3 -3
- package/dist/{collection-content-D6S8cv_n.js.map → collection-content-Ys-OZOkY.js.map} +1 -1
- package/dist/{combobox-BFnbJJp3.js → combobox-6dvVny2q.js} +96 -97
- package/dist/combobox-6dvVny2q.js.map +1 -0
- package/dist/{combobox-hozNwUcc.js → combobox-CB7039j7.js} +326 -308
- package/dist/combobox-CB7039j7.js.map +1 -0
- package/dist/{command-BnmSchli.js → command-kPMPjIxJ.js} +34 -30
- package/dist/command-kPMPjIxJ.js.map +1 -0
- package/dist/{comments-u5L0OGip.js → comments-You0Bzbr.js} +349 -348
- package/dist/comments-You0Bzbr.js.map +1 -0
- package/dist/components/base/accordion/accordion-variants.d.ts +3 -3
- package/dist/components/base/action-menu/action-menu.d.ts +7 -2
- package/dist/components/base/avatar/stacked-avatars.d.ts +5 -4
- package/dist/components/base/badge/badge.d.ts +1 -1
- package/dist/components/base/badge/badge.recipes.d.ts +4 -4
- package/dist/components/base/buttons/base-button.d.ts +7 -0
- package/dist/components/base/buttons/button-group.recipes.d.ts +2 -2
- package/dist/components/base/buttons/button.variants.d.ts +1 -0
- package/dist/components/base/buttons/loader-button.d.ts +3 -1
- package/dist/components/base/buttons/text-button.d.ts +2 -2
- package/dist/components/base/carousel/carousel.d.ts +3 -1
- package/dist/components/base/chart/chart.d.ts +7 -7
- package/dist/components/base/choice-inputs/checkbox.d.ts +6 -7
- package/dist/components/base/choice-inputs/choice-types.d.ts +10 -1
- package/dist/components/base/choice-inputs/pill-radio-group.d.ts +9 -0
- package/dist/components/base/choice-inputs/select-popup.d.ts +9 -1
- package/dist/components/base/choice-inputs/switch-card.d.ts +1 -1
- package/dist/components/base/date-pickers/date-picker-field.d.ts +23 -0
- package/dist/components/base/date-pickers/datepicker.types.d.ts +13 -3
- package/dist/components/base/display/alert-dialog.d.ts +8 -2
- package/dist/components/base/display/content-block.d.ts +4 -2
- package/dist/components/base/display/date-block.d.ts +1 -1
- package/dist/components/base/display/dialog.d.ts +12 -5
- package/dist/components/base/display/surface-title.d.ts +6 -1
- package/dist/components/base/feedback/alert.d.ts +1 -1
- package/dist/components/base/feedback/state-display.d.ts +5 -4
- package/dist/components/base/forms/form-sizing.d.ts +32 -0
- package/dist/components/base/forms/workflow.d.ts +2 -0
- package/dist/components/base/forms-numeric/coordinates-input.d.ts +3 -0
- package/dist/components/base/forms-numeric/rounding-mode-select.d.ts +4 -1
- package/dist/components/base/navigation/dropdown-menu.d.ts +2 -2
- package/dist/components/base/navigation/language-switcher.d.ts +4 -1
- package/dist/components/base/navigation/overflow-tab-bar.d.ts +7 -0
- package/dist/components/base/navigation/page-header/page-header.d.ts +4 -1
- package/dist/components/base/qr-code/qr-code.d.ts +2 -0
- package/dist/components/base/sheet/index.d.ts +29 -1
- package/dist/components/base/sheet/sheet.d.ts +14 -5
- package/dist/components/base/spinner/spinner.d.ts +3 -2
- package/dist/components/base/structure/structure.types.d.ts +1 -1
- package/dist/components/base/text-inputs/input-group.d.ts +2 -2
- package/dist/components/base/upload/upload.recipes.d.ts +11 -0
- package/dist/components/base/value-inputs/date-time-input.d.ts +4 -2
- package/dist/components/base/value-inputs/tags-input.d.ts +2 -0
- package/dist/components/blocks/admin/api-key-list/api-key-list.types.d.ts +1 -1
- package/dist/components/blocks/analytics/format-metric-value.d.ts +11 -1
- package/dist/components/blocks/analytics/index.d.ts +1 -1
- package/dist/components/blocks/analytics/use-metric-format-options.d.ts +3 -0
- package/dist/components/blocks/commerce/address-card/address-card.d.ts +1 -1
- package/dist/components/blocks/commerce/address-card/types.d.ts +3 -1
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.d.ts +4 -0
- package/dist/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.types.d.ts +2 -2
- package/dist/components/blocks/commerce/discount-stack/types.d.ts +1 -1
- package/dist/components/blocks/commerce/inventory-section/types.d.ts +4 -1
- package/dist/components/blocks/commerce/loyalty-points/types.d.ts +1 -1
- package/dist/components/blocks/commerce/order-status/types.d.ts +4 -0
- package/dist/components/blocks/commerce/payment-method/payment-method.d.ts +1 -1
- package/dist/components/blocks/commerce/payment-method/types.d.ts +3 -1
- package/dist/components/blocks/commerce/seo-listing/seo-listing-card.d.ts +1 -1
- package/dist/components/blocks/commerce/seo-listing/types.d.ts +3 -1
- package/dist/components/blocks/commerce/vendor-profile/types.d.ts +4 -1
- package/dist/components/blocks/data-display/dense-info-card/dense-info.strings.d.ts +4 -1
- package/dist/components/blocks/data-display/inline-stat/inline-stat.d.ts +4 -1
- package/dist/components/features/global-search/partials/global-search-idle-state.d.ts +1 -1
- package/dist/components/features/overlays/alert-dialog.d.ts +1 -1
- package/dist/components/features/overlays/drawer.d.ts +1 -1
- package/dist/components/features/overlays/hooks/use-overlay-actions.d.ts +2 -2
- package/dist/components/features/overlays/hooks/use-overlay-visibility.d.ts +11 -4
- package/dist/components/features/overlays/overlay-tone-icon.d.ts +37 -0
- package/dist/components/features/overlays/overlays.types.d.ts +42 -19
- package/dist/components/features/products/components/product-variants-manager.d.ts +1 -1
- package/dist/components/features/products/partials/index.d.ts +1 -1
- package/dist/components/features/products/partials/product-metric-tile.d.ts +6 -0
- package/dist/components/features/products/partials/product-tone.d.ts +11 -1
- package/dist/components/features/products/products.types.d.ts +2 -1
- package/dist/components/features/table/partials/cell-renderers.d.ts +1 -1
- package/dist/components/layout/page/index.d.ts +1 -1
- package/dist/components/layout/page/page.types.d.ts +53 -3
- package/dist/components/layout/page/partials/page-header-commands.d.ts +13 -0
- package/dist/components/layout/page/partials/page-header.d.ts +1 -1
- package/dist/components/primitives/date.d.ts +16 -3
- package/dist/components/primitives/dimensions.d.ts +6 -0
- package/dist/components/primitives/duration.d.ts +6 -0
- package/dist/components/primitives/file-size.d.ts +6 -0
- package/dist/components/primitives/index.d.ts +1 -1
- package/dist/components/primitives/initials.d.ts +11 -2
- package/dist/components/primitives/link.d.ts +7 -0
- package/dist/components/primitives/money.d.ts +29 -7
- package/dist/components/primitives/number.d.ts +17 -0
- package/dist/components/primitives/value-typography.d.ts +54 -0
- package/dist/components/primitives/value.d.ts +31 -6
- package/dist/components/typography/heading.d.ts +9 -1
- package/dist/components/typography/label.d.ts +3 -0
- package/dist/components/typography/running-text.d.ts +12 -0
- package/dist/components/typography/text-link.d.ts +23 -1
- package/dist/components/typography/text.d.ts +12 -0
- package/dist/components/typography/text.styles.d.ts +35 -13
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/overlay.recipes.d.ts +15 -2
- package/dist/components/ui/select.d.ts +3 -1
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/{containers-DqB-bSYE.js → containers-D_L4mTVb.js} +3 -3
- package/dist/{containers-DqB-bSYE.js.map → containers-D_L4mTVb.js.map} +1 -1
- package/dist/{copyable-BTSByfmq.js → copyable-DDjTeW_j.js} +4 -4
- package/dist/{copyable-BTSByfmq.js.map → copyable-DDjTeW_j.js.map} +1 -1
- package/dist/{data-display-Bihs9Ven.js → data-display-3xWQUnMA.js} +471 -478
- package/dist/data-display-3xWQUnMA.js.map +1 -0
- package/dist/date-picker-DrDFj8Lo.js +1527 -0
- package/dist/date-picker-DrDFj8Lo.js.map +1 -0
- package/dist/date-pickers-CnFCb0n2.js +174 -0
- package/dist/date-pickers-CnFCb0n2.js.map +1 -0
- package/dist/date-uf3z37Nm.js +144 -0
- package/dist/date-uf3z37Nm.js.map +1 -0
- package/dist/{display-CS6Hbk18.js → display-DrdvPwF0.js} +25 -25
- package/dist/display-DrdvPwF0.js.map +1 -0
- package/dist/{dropdown-menu-D-boNgGO.js → dropdown-menu-CURh59jb.js} +22 -15
- package/dist/dropdown-menu-CURh59jb.js.map +1 -0
- package/dist/features/activities.js +38 -35
- package/dist/features/activities.js.map +1 -1
- package/dist/features/ai-chat.js +36 -35
- package/dist/features/ai-chat.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 +325 -326
- package/dist/features/email-composer.js.map +1 -1
- package/dist/features/event-calendar.js +190 -200
- package/dist/features/event-calendar.js.map +1 -1
- package/dist/features/filters.js +1 -1
- package/dist/features/global-search.js +77 -77
- package/dist/features/global-search.js.map +1 -1
- package/dist/features/kanban.js +4 -4
- package/dist/features/map.js +8 -8
- package/dist/features/media-library.js +499 -502
- 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 +1216 -1248
- package/dist/features/products.js.map +1 -1
- package/dist/features/questionnaire.js +46 -44
- package/dist/features/questionnaire.js.map +1 -1
- package/dist/features/resource-assignment.js +96 -88
- package/dist/features/resource-assignment.js.map +1 -1
- package/dist/features/resource.js +11 -11
- package/dist/features/rich-text-editor.js +2 -2
- package/dist/features/schema-form.js +188 -184
- package/dist/features/schema-form.js.map +1 -1
- package/dist/features/suggestions.js +3 -3
- package/dist/features/sync.js +7 -7
- package/dist/features/sync.js.map +1 -1
- package/dist/features/table.js +1 -1
- package/dist/features/theme-tweaker.js +469 -470
- package/dist/features/theme-tweaker.js.map +1 -1
- package/dist/{feedback-CJkUAapr.js → feedback-C7nR0UtT.js} +9 -10
- package/dist/feedback-C7nR0UtT.js.map +1 -0
- package/dist/field-affordance-recipes-CkOCdE2y.js +46 -0
- package/dist/field-affordance-recipes-CkOCdE2y.js.map +1 -0
- package/dist/{field-state-recipes-DQQpiLWC.js → field-state-recipes-C-MFBX_8.js} +3 -3
- package/dist/field-state-recipes-C-MFBX_8.js.map +1 -0
- package/dist/{filters-D6FF8L6s.js → filters-Da-gNPsE.js} +467 -467
- package/dist/filters-Da-gNPsE.js.map +1 -0
- package/dist/{form-field-CZwrkP7m.js → form-field-VZRULhUK.js} +7 -7
- package/dist/{form-field-CZwrkP7m.js.map → form-field-VZRULhUK.js.map} +1 -1
- package/dist/form-sizing-uWP4lzVh.js +126 -0
- package/dist/form-sizing-uWP4lzVh.js.map +1 -0
- package/dist/{forms-B5NCbkSC.js → forms-DDeEnXSY.js} +11 -11
- package/dist/forms-DDeEnXSY.js.map +1 -0
- package/dist/forms-numeric-D3CO60IF.js +905 -0
- package/dist/forms-numeric-D3CO60IF.js.map +1 -0
- package/dist/{header-kxruN3RM.js → header-2ycNqGOR.js} +43 -42
- package/dist/header-2ycNqGOR.js.map +1 -0
- package/dist/{hooks-BrlnCwQd.js → hooks-DQ5SPwZw.js} +2 -2
- package/dist/{hooks-BrlnCwQd.js.map → hooks-DQ5SPwZw.js.map} +1 -1
- package/dist/{icon-badge-Btc6pQrp.js → icon-badge-DKlaKXoo.js} +3 -3
- package/dist/{icon-badge-Btc6pQrp.js.map → icon-badge-DKlaKXoo.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{input-vxcaNCYC.js → input-BoLm9Hks.js} +3 -3
- package/dist/{input-vxcaNCYC.js.map → input-BoLm9Hks.js.map} +1 -1
- package/dist/input-DhQdBnV3.js +255 -0
- package/dist/{input-SX9V0AL3.js.map → input-DhQdBnV3.js.map} +1 -1
- package/dist/item-xzh8Df65.js +264 -0
- package/dist/item-xzh8Df65.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 -1
- package/dist/lib/field-affordance-recipes.d.ts +35 -0
- package/dist/lib/field-state-recipes.d.ts +4 -2
- package/dist/lib/format.d.ts +9 -0
- package/dist/lib/money-format.d.ts +30 -0
- package/dist/lib/overlay-anatomy-recipes.d.ts +1 -1
- package/dist/lib/surface-recipes.d.ts +8 -6
- package/dist/lib/token-merge.generated.d.ts +11 -11
- package/dist/lib/track-recipes.d.ts +1 -1
- package/dist/lib/ui-provider/provider.d.ts +7 -2
- package/dist/lib/ui-provider/store.d.ts +6 -2
- package/dist/lib/ui-provider/types.d.ts +5 -2
- package/dist/lib/utils.js +1 -1
- package/dist/{media-gallery-DLp3HAz0.js → media-gallery-DQUQ0m3O.js} +8 -8
- package/dist/media-gallery-DQUQ0m3O.js.map +1 -0
- package/dist/{mentions-Cl0Kt_Pd.js → mentions-DwnO1hh4.js} +34 -35
- package/dist/{mentions-Cl0Kt_Pd.js.map → mentions-DwnO1hh4.js.map} +1 -1
- package/dist/{message-SZUNB1eX.js → message-YfFmbXNP.js} +5 -5
- package/dist/{message-SZUNB1eX.js.map → message-YfFmbXNP.js.map} +1 -1
- package/dist/{navigation-DyytsLRB.js → navigation-Cbp5V8gG.js} +33 -34
- package/dist/navigation-Cbp5V8gG.js.map +1 -0
- package/dist/{navigation-DnQSNMT0.js → navigation-Cs1npsPm.js} +111 -87
- package/dist/navigation-Cs1npsPm.js.map +1 -0
- package/dist/{navigation-row-recipes-DQEXQcqY.js → navigation-row-recipes-DlU-4QYO.js} +2 -2
- package/dist/{navigation-row-recipes-DQEXQcqY.js.map → navigation-row-recipes-DlU-4QYO.js.map} +1 -1
- package/dist/number-CKRBYmZK.js +352 -0
- package/dist/number-CKRBYmZK.js.map +1 -0
- package/dist/overlay.recipes-CNO2S9V6.js +34 -0
- package/dist/overlay.recipes-CNO2S9V6.js.map +1 -0
- package/dist/overlays-DhZO7N-I.js +994 -0
- package/dist/overlays-DhZO7N-I.js.map +1 -0
- package/dist/page-C6R_8jFt.js +325 -0
- package/dist/page-C6R_8jFt.js.map +1 -0
- package/dist/{page-header-D8nERkn5.js → page-header-hUTzcRZX.js} +9 -9
- package/dist/page-header-hUTzcRZX.js.map +1 -0
- package/dist/{pagination-NLGqRirf.js → pagination-Cm0jqa3I.js} +8 -8
- package/dist/{pagination-NLGqRirf.js.map → pagination-Cm0jqa3I.js.map} +1 -1
- package/dist/{popover-CghIYdQf.js → popover-Dcv_9jxr.js} +6 -6
- package/dist/{popover-CghIYdQf.js.map → popover-Dcv_9jxr.js.map} +1 -1
- package/dist/{popover-menu-B4PoWhRl.js → popover-menu-DnRFKnHP.js} +6 -6
- package/dist/{popover-menu-B4PoWhRl.js.map → popover-menu-DnRFKnHP.js.map} +1 -1
- package/dist/{popover.recipes-QlD4JenO.js → popover.recipes-wmbvL8Ah.js} +2 -2
- package/dist/{popover.recipes-QlD4JenO.js.map → popover.recipes-wmbvL8Ah.js.map} +1 -1
- package/dist/primitives-BHrwQXFC.js +379 -0
- package/dist/primitives-BHrwQXFC.js.map +1 -0
- package/dist/primitives.js +5 -5
- package/dist/{progress-BroqrAyV.js → progress-Br9WTFya.js} +7 -7
- package/dist/progress-Br9WTFya.js.map +1 -0
- package/dist/{receipt-BuJynLgf.js → receipt-CV89q1fs.js} +6 -6
- package/dist/{receipt-BuJynLgf.js.map → receipt-CV89q1fs.js.map} +1 -1
- package/dist/{rich-text-editor-BKyG7rWz.js → rich-text-editor-CF8QYt5p.js} +6 -6
- package/dist/{rich-text-editor-BKyG7rWz.js.map → rich-text-editor-CF8QYt5p.js.map} +1 -1
- package/dist/{rich-text-editor.recipes-B72Nfuze.js → rich-text-editor.recipes-CnrbmTS1.js} +4 -4
- package/dist/{rich-text-editor.recipes-B72Nfuze.js.map → rich-text-editor.recipes-CnrbmTS1.js.map} +1 -1
- package/dist/{rich-text-DlxDOtf4.js → rich-text-j-FGAeZW.js} +4 -4
- package/dist/{rich-text-DlxDOtf4.js.map → rich-text-j-FGAeZW.js.map} +1 -1
- package/dist/{scroll-area-D-pIhEKl.js → scroll-area-DRdr16Pt.js} +3 -3
- package/dist/scroll-area-DRdr16Pt.js.map +1 -0
- package/dist/{separator-BhtFyo4x.js → separator-BMEvwnSX.js} +2 -2
- package/dist/{separator-BhtFyo4x.js.map → separator-BMEvwnSX.js.map} +1 -1
- package/dist/{separator-BNIgG3au.js → separator-Do5GWDYi.js} +4 -4
- package/dist/separator-Do5GWDYi.js.map +1 -0
- package/dist/services/actions/action-adapters.d.ts +4 -0
- package/dist/services/actions.js +8 -3
- package/dist/services/actions.js.map +1 -1
- package/dist/{settings-DOTOzeZ2.js → settings-DHk0L2MF.js} +17 -17
- package/dist/settings-DHk0L2MF.js.map +1 -0
- package/dist/sheet-DRFNY1_D.js +207 -0
- package/dist/sheet-DRFNY1_D.js.map +1 -0
- package/dist/sidebar-Cb8WzOvE.js +511 -0
- package/dist/sidebar-Cb8WzOvE.js.map +1 -0
- package/dist/{sidebar-CyR4XKwR.js → sidebar-Crc9M9JV.js} +18 -18
- package/dist/sidebar-Crc9M9JV.js.map +1 -0
- package/dist/{skeleton-3F0uhYn3.js → skeleton-DVMXr15h.js} +4 -4
- package/dist/{skeleton-3F0uhYn3.js.map → skeleton-DVMXr15h.js.map} +1 -1
- package/dist/{smart-card-DjGVV2xr.js → smart-card-Bek-TwUp.js} +222 -207
- package/dist/smart-card-Bek-TwUp.js.map +1 -0
- package/dist/{spinner-Cpf7oRkF.js → spinner-CmTAbEp0.js} +8 -6
- package/dist/spinner-CmTAbEp0.js.map +1 -0
- package/dist/{structure-CRdqVawd.js → structure-hzCW-XsV.js} +3 -3
- package/dist/{structure-CRdqVawd.js.map → structure-hzCW-XsV.js.map} +1 -1
- package/dist/{structure.recipes-Bqhf9oIh.js → structure.recipes-EPz60cU8.js} +37 -19
- package/dist/structure.recipes-EPz60cU8.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/surface-recipes-DOdoBXGm.js +28 -0
- package/dist/surface-recipes-DOdoBXGm.js.map +1 -0
- package/dist/table-D6zKeYQX.js +162 -0
- package/dist/table-D6zKeYQX.js.map +1 -0
- package/dist/{table-CcRDZiLP.js → table-Dn4XSrSB.js} +348 -348
- package/dist/table-Dn4XSrSB.js.map +1 -0
- package/dist/{tabs-BNgu7g0u.js → tabs-Dk8E_knt.js} +14 -13
- package/dist/tabs-Dk8E_knt.js.map +1 -0
- package/dist/{text-inputs-DsR56TR-.js → text-inputs-BFpku0Qd.js} +150 -149
- package/dist/text-inputs-BFpku0Qd.js.map +1 -0
- package/dist/{text.styles-Q4sGAIgA.js → text.styles-g4He6UIW.js} +17 -14
- package/dist/text.styles-g4He6UIW.js.map +1 -0
- package/dist/theme.css +16 -12
- package/dist/themes/green.css +24 -0
- package/dist/{timelines-D1pkt3se.js → timelines-CxuAFIc2.js} +25 -38
- package/dist/timelines-CxuAFIc2.js.map +1 -0
- package/dist/track-recipes-CDcKmndW.js +10 -0
- package/dist/track-recipes-CDcKmndW.js.map +1 -0
- package/dist/{tree-BtmYyMZV.js → tree-BotPlyiD.js} +13 -13
- package/dist/{tree-BtmYyMZV.js.map → tree-BotPlyiD.js.map} +1 -1
- package/dist/typography/rich-text.js +1 -1
- package/dist/typography-CAr3dQhX.js +116 -0
- package/dist/typography-CAr3dQhX.js.map +1 -0
- package/dist/typography.js +2 -2
- package/dist/{ui-provider-DRPn3qNl.js → ui-provider-D2_TeLqw.js} +20 -21
- package/dist/ui-provider-D2_TeLqw.js.map +1 -0
- package/dist/ui-provider.js +1 -1
- package/dist/{upload-CDbYw1WN.js → upload-B0WHW7ak.js} +221 -220
- package/dist/upload-B0WHW7ak.js.map +1 -0
- package/dist/{upload-queue-CNd_hH_a.js → upload-queue-BHZ_wBfd.js} +59 -62
- package/dist/upload-queue-BHZ_wBfd.js.map +1 -0
- package/dist/{usage-card-VyJLUwRr.js → usage-card-U0YBLTNT.js} +42 -43
- package/dist/{usage-card-VyJLUwRr.js.map → usage-card-U0YBLTNT.js.map} +1 -1
- package/dist/{utils-BvH9PSmq.js → utils-Cospvlj1.js} +221 -51
- package/dist/utils-Cospvlj1.js.map +1 -0
- package/dist/value-inputs-CjfzGMsN.js +854 -0
- package/dist/value-inputs-CjfzGMsN.js.map +1 -0
- package/dist/value-typography-Deb3yQZg.js +116 -0
- package/dist/value-typography-Deb3yQZg.js.map +1 -0
- package/dist/{workspace-CcR8r-Nt.js → workspace-YoFjXi6i.js} +44 -45
- package/dist/workspace-YoFjXi6i.js.map +1 -0
- package/docs/consumer-skill/SKILL.md +51 -38
- package/docs/consumer-skill/examples/app-layout.tsx +2 -4
- package/docs/consumer-skill/examples/detail.tsx +3 -4
- package/docs/consumer-skill/examples/edit.tsx +1 -1
- package/docs/consumer-skill/examples/layout-blocks.tsx +20 -0
- package/docs/consumer-skill/examples/manifest.json +28 -6
- package/docs/consumer-skill/examples/scoped-directory.tsx +2 -2
- package/docs/consumer-skill/references/composition.md +89 -17
- package/docs/consumer-skill/references/discovery.md +4 -0
- package/docs/consumer-skill/references/installation.md +22 -0
- package/docs/consumer-skill/references/integration.md +32 -1
- package/docs/consumer-skill/references/public-api.json +111 -70
- package/docs/consumer-skill/references/review.md +20 -4
- package/docs/consumer-skill/references/theming.md +7 -1
- package/docs/consumer-skill/references/tokens.json +5 -2
- package/docs/consumer-skill/references/workflows.md +4 -2
- package/docs/consumer-skill/scripts/composition-policy.mjs +93 -2
- package/docs/consumer-skill/scripts/discovery.mjs +11 -3
- package/docs/consumer-skill/scripts/pin-button-defaults.mjs +95 -0
- package/package.json +5 -3
- package/dist/accordion-BRTcsp8J.js.map +0 -1
- package/dist/action-menu-Drxw_vJk.js +0 -265
- package/dist/action-menu-Drxw_vJk.js.map +0 -1
- package/dist/affordance-geometry.generated-CL84ZN9A.js.map +0 -1
- package/dist/ai-artifact-DLVdK0Py.js.map +0 -1
- package/dist/avatar-Bu2HhitA.js.map +0 -1
- package/dist/badge-CzId1Wlm.js.map +0 -1
- package/dist/button-BZDasD04.js.map +0 -1
- package/dist/buttons-D_6KJvEE.js.map +0 -1
- package/dist/chart-Bsc5BICK.js.map +0 -1
- package/dist/checkbox-BQNDjUCh.js +0 -34
- package/dist/checkbox-BQNDjUCh.js.map +0 -1
- package/dist/choice-inputs-Mk3iWbhr.js +0 -725
- package/dist/choice-inputs-Mk3iWbhr.js.map +0 -1
- package/dist/combobox-BFnbJJp3.js.map +0 -1
- package/dist/combobox-hozNwUcc.js.map +0 -1
- package/dist/command-BnmSchli.js.map +0 -1
- package/dist/comments-u5L0OGip.js.map +0 -1
- package/dist/data-display-Bihs9Ven.js.map +0 -1
- package/dist/date-DOKhJPu7.js +0 -140
- package/dist/date-DOKhJPu7.js.map +0 -1
- package/dist/date-picker-DzP5HQq7.js +0 -1541
- package/dist/date-picker-DzP5HQq7.js.map +0 -1
- package/dist/date-pickers-BpgGz7S-.js +0 -196
- package/dist/date-pickers-BpgGz7S-.js.map +0 -1
- package/dist/display-CS6Hbk18.js.map +0 -1
- package/dist/dropdown-menu-D-boNgGO.js.map +0 -1
- package/dist/feedback-CJkUAapr.js.map +0 -1
- package/dist/field-affordance-recipes-uKY4MsZ_.js +0 -25
- package/dist/field-affordance-recipes-uKY4MsZ_.js.map +0 -1
- package/dist/field-state-recipes-DQQpiLWC.js.map +0 -1
- package/dist/filters-D6FF8L6s.js.map +0 -1
- package/dist/form-sizing-QP8aIRaW.js +0 -103
- package/dist/form-sizing-QP8aIRaW.js.map +0 -1
- package/dist/format-iamDSqs2.js +0 -110
- package/dist/format-iamDSqs2.js.map +0 -1
- package/dist/forms-B5NCbkSC.js.map +0 -1
- package/dist/forms-numeric-Crrm80Lm.js +0 -867
- package/dist/forms-numeric-Crrm80Lm.js.map +0 -1
- package/dist/header-kxruN3RM.js.map +0 -1
- package/dist/input-SX9V0AL3.js +0 -255
- package/dist/item-DE4YnuJx.js +0 -258
- package/dist/item-DE4YnuJx.js.map +0 -1
- package/dist/media-gallery-DLp3HAz0.js.map +0 -1
- package/dist/navigation-DnQSNMT0.js.map +0 -1
- package/dist/navigation-DyytsLRB.js.map +0 -1
- package/dist/number-DasMFWEG.js +0 -269
- package/dist/number-DasMFWEG.js.map +0 -1
- package/dist/overlay.recipes-BxW5FIfK.js +0 -6
- package/dist/overlay.recipes-BxW5FIfK.js.map +0 -1
- package/dist/overlays-DUbs1KEi.js +0 -1011
- package/dist/overlays-DUbs1KEi.js.map +0 -1
- package/dist/page-hGmT4nWK.js +0 -213
- package/dist/page-hGmT4nWK.js.map +0 -1
- package/dist/page-header-D8nERkn5.js.map +0 -1
- package/dist/primitives-C7ff0QaI.js +0 -337
- package/dist/primitives-C7ff0QaI.js.map +0 -1
- package/dist/progress-BroqrAyV.js.map +0 -1
- package/dist/scroll-area-D-pIhEKl.js.map +0 -1
- package/dist/separator-BNIgG3au.js.map +0 -1
- package/dist/settings-DOTOzeZ2.js.map +0 -1
- package/dist/sheet-BFhrNehm.js +0 -205
- package/dist/sheet-BFhrNehm.js.map +0 -1
- package/dist/sidebar-CyR4XKwR.js.map +0 -1
- package/dist/sidebar-SvGJ0Zwi.js +0 -506
- package/dist/sidebar-SvGJ0Zwi.js.map +0 -1
- package/dist/smart-card-DjGVV2xr.js.map +0 -1
- package/dist/spinner-Cpf7oRkF.js.map +0 -1
- package/dist/structure.recipes-Bqhf9oIh.js.map +0 -1
- package/dist/surface-recipes-Dd__PD-w.js +0 -28
- package/dist/surface-recipes-Dd__PD-w.js.map +0 -1
- package/dist/table-CLtJTxoR.js +0 -147
- package/dist/table-CLtJTxoR.js.map +0 -1
- package/dist/table-CcRDZiLP.js.map +0 -1
- package/dist/tabs-BNgu7g0u.js.map +0 -1
- package/dist/text-inputs-DsR56TR-.js.map +0 -1
- package/dist/text.styles-Q4sGAIgA.js.map +0 -1
- package/dist/timelines-D1pkt3se.js.map +0 -1
- package/dist/track-recipes-LLPNVwFg.js +0 -10
- package/dist/track-recipes-LLPNVwFg.js.map +0 -1
- package/dist/typography-BxQgiZyw.js +0 -96
- package/dist/typography-BxQgiZyw.js.map +0 -1
- package/dist/ui-provider-DRPn3qNl.js.map +0 -1
- package/dist/upload-CDbYw1WN.js.map +0 -1
- package/dist/upload-queue-CNd_hH_a.js.map +0 -1
- package/dist/utils-BvH9PSmq.js.map +0 -1
- package/dist/value-inputs-D0KCrfVC.js +0 -840
- package/dist/value-inputs-D0KCrfVC.js.map +0 -1
- package/dist/workspace-CcR8r-Nt.js.map +0 -1
package/dist/blocks/commerce.js
CHANGED
|
@@ -1,41 +1,42 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { u as e } from "../ui-provider-
|
|
2
|
+
import { u as e } from "../ui-provider-D2_TeLqw.js";
|
|
3
3
|
import { mergeStrings as t, useStrings as n } from "../lib/strings.js";
|
|
4
|
-
import { t as r } from "../utils-
|
|
5
|
-
import {
|
|
6
|
-
import { t as c } from "../
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { t as p } from "../
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { t as C } from "../
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { t as O } from "../
|
|
17
|
-
import { t as k } from "../
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { i as
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
4
|
+
import { t as r } from "../utils-Cospvlj1.js";
|
|
5
|
+
import { t as i } from "../buttons-DS0ZIwJ_.js";
|
|
6
|
+
import { a, o, s, t as c } from "../typography-CAr3dQhX.js";
|
|
7
|
+
import { t as l } from "../button-BS3KDg00.js";
|
|
8
|
+
import { r as u, t as d } from "../structure-hzCW-XsV.js";
|
|
9
|
+
import { d as f, t as p } from "../smart-card-Bek-TwUp.js";
|
|
10
|
+
import { t as m } from "../progress-Br9WTFya.js";
|
|
11
|
+
import { n as h } from "../cards-QoJ4syG9.js";
|
|
12
|
+
import { _ as g, c as _, g as v, m as y, u as b } from "../primitives-BHrwQXFC.js";
|
|
13
|
+
import { n as x, r as S, t as C } from "../number-CKRBYmZK.js";
|
|
14
|
+
import { t as w } from "../icon-badge-DKlaKXoo.js";
|
|
15
|
+
import { i as T, n as E, s as D } from "../avatar-djdaaQ_s.js";
|
|
16
|
+
import { t as O } from "../badge-0tATj-tW.js";
|
|
17
|
+
import { t as k } from "../separator-Do5GWDYi.js";
|
|
18
|
+
import { t as A } from "../input-DhQdBnV3.js";
|
|
19
|
+
import { t as j } from "../form-field-VZRULhUK.js";
|
|
20
|
+
import { a as M, c as N, r as P } from "../choice-inputs-DrJ17tpL.js";
|
|
21
|
+
import { i as F, n as I } from "../display-DrdvPwF0.js";
|
|
22
|
+
import { u as ee } from "../value-inputs-CjfzGMsN.js";
|
|
23
|
+
import { d as L, n as te } from "../forms-numeric-D3CO60IF.js";
|
|
24
|
+
import { c as R, i as z, n as B, o as V, r as H, t as U, u as W } from "../item-xzh8Df65.js";
|
|
25
|
+
import { i as ne, n as re, r as ie, t as ae } from "../tabs-Dk8E_knt.js";
|
|
26
|
+
import { g as G, n as K } from "../data-display-3xWQUnMA.js";
|
|
27
|
+
import { n as oe, t as se } from "../receipt-CV89q1fs.js";
|
|
28
|
+
import { s as ce } from "../timelines-CxuAFIc2.js";
|
|
29
|
+
import { forwardRef as le, useEffect as ue, useId as de, useRef as fe, useState as pe } from "react";
|
|
30
|
+
import { Fragment as me, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
31
|
+
import { ArrowRight as he, CalendarClock as ge, Check as _e, CheckCircle2 as ve, ChevronRight as ye, Circle as be, CircleAlert as xe, Copy as Se, Edit2 as Ce, ExternalLink as we, Loader2 as Te, Pencil as Ee, Star as De, Trash2 as Oe, TriangleAlert as ke, X as Ae } from "lucide-react";
|
|
31
32
|
//#region src/components/blocks/commerce/upcoming-booking/upcoming-booking.tsx
|
|
32
|
-
function
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
className: r("upcoming-booking--component w-full
|
|
35
|
-
children: e.map((e, t) => /* @__PURE__ */
|
|
33
|
+
function je({ bookings: e, className: t, locale: n, dateTone: i = "neutral", dateVariant: a = "default", timePlacement: o = "below" }) {
|
|
34
|
+
return /* @__PURE__ */ q(V, {
|
|
35
|
+
className: r("upcoming-booking--component w-full", t),
|
|
36
|
+
children: e.map((e, t) => /* @__PURE__ */ J(U, {
|
|
36
37
|
className: "items-center",
|
|
37
38
|
children: [
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ q(R, { children: /* @__PURE__ */ q(F, {
|
|
39
40
|
date: e.date,
|
|
40
41
|
time: o === "below" ? e.time : void 0,
|
|
41
42
|
tone: i,
|
|
@@ -44,20 +45,20 @@ function Xe({ bookings: e, className: t, locale: n, dateTone: i = "neutral", dat
|
|
|
44
45
|
timePlacement: "below",
|
|
45
46
|
layout: "stacked"
|
|
46
47
|
}) }),
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ J(H, {
|
|
48
49
|
className: "min-w-0 sm:min-w-48",
|
|
49
|
-
children: [/* @__PURE__ */
|
|
50
|
+
children: [/* @__PURE__ */ q(W, { children: e.service }), /* @__PURE__ */ q(z, {
|
|
50
51
|
clamp: 1,
|
|
51
52
|
children: e.customer
|
|
52
53
|
})]
|
|
53
54
|
}),
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ J(B, {
|
|
55
56
|
className: "ml-auto shrink-0 flex-wrap justify-end",
|
|
56
|
-
children: [o === "inline-trailing" && /* @__PURE__ */
|
|
57
|
+
children: [o === "inline-trailing" && /* @__PURE__ */ q(v, {
|
|
57
58
|
size: "xs",
|
|
58
59
|
className: "shrink-0 tabular-nums",
|
|
59
60
|
children: e.time
|
|
60
|
-
}), /* @__PURE__ */
|
|
61
|
+
}), /* @__PURE__ */ q(g, {
|
|
61
62
|
weight: "semibold",
|
|
62
63
|
className: "shrink-0 tabular-nums",
|
|
63
64
|
children: e.amount
|
|
@@ -67,172 +68,172 @@ function Xe({ bookings: e, className: t, locale: n, dateTone: i = "neutral", dat
|
|
|
67
68
|
}, e.id ?? `${e.service}-${e.time}-${t}`))
|
|
68
69
|
});
|
|
69
70
|
}
|
|
70
|
-
|
|
71
|
+
je.displayName = "UpcomingBookingRow";
|
|
71
72
|
//#endregion
|
|
72
73
|
//#region src/components/blocks/commerce/booking-calendar-event-card/booking-calendar-event-card.tsx
|
|
73
|
-
function
|
|
74
|
-
return typeof e == "string" || typeof e == "number" || typeof e == "bigint" ? /* @__PURE__ */
|
|
74
|
+
function Me(e) {
|
|
75
|
+
return typeof e == "string" || typeof e == "number" || typeof e == "bigint" ? /* @__PURE__ */ q(g, { children: String(e) }) : e;
|
|
75
76
|
}
|
|
76
|
-
function
|
|
77
|
-
return /* @__PURE__ */
|
|
77
|
+
function Ne({ title: e, description: t, status: n, items: i, actionLabel: o, onAction: s, className: c, contentClassName: l }) {
|
|
78
|
+
return /* @__PURE__ */ J(I, {
|
|
78
79
|
title: e,
|
|
80
|
+
titleSuffix: n,
|
|
79
81
|
description: t,
|
|
80
|
-
headerEnd: n,
|
|
81
|
-
headerDivider: !0,
|
|
82
82
|
className: r("booking-calendar-event-card--component @container/booking-calendar-event-card", c),
|
|
83
|
-
contentClassName: r("grid gap-space-
|
|
84
|
-
children: [/* @__PURE__ */
|
|
83
|
+
contentClassName: r("grid gap-space-2xl", l),
|
|
84
|
+
children: [/* @__PURE__ */ q("dl", {
|
|
85
85
|
className: "booking-calendar-event-card--details grid gap-space-lg @md/booking-calendar-event-card:grid-cols-2",
|
|
86
|
-
children: i.map((e) => /* @__PURE__ */
|
|
87
|
-
className: r("grid min-w-0 gap-
|
|
88
|
-
children: [/* @__PURE__ */
|
|
89
|
-
className: "
|
|
90
|
-
children:
|
|
86
|
+
children: i.map((e) => /* @__PURE__ */ J("div", {
|
|
87
|
+
className: r("grid min-w-0 gap-normal", e.fullWidth === !0 && "@md/booking-calendar-event-card:col-span-2"),
|
|
88
|
+
children: [/* @__PURE__ */ q("dt", {
|
|
89
|
+
className: "flex",
|
|
90
|
+
children: /* @__PURE__ */ q(a, { children: e.label })
|
|
91
|
+
}), /* @__PURE__ */ q("dd", {
|
|
92
|
+
className: "min-w-0 leading-normal",
|
|
93
|
+
children: Me(e.value)
|
|
91
94
|
})]
|
|
92
95
|
}, e.id))
|
|
93
|
-
}), /* @__PURE__ */
|
|
94
|
-
className: "booking-calendar-event-card--action flex justify-end
|
|
95
|
-
children: /* @__PURE__ */
|
|
96
|
+
}), /* @__PURE__ */ q("div", {
|
|
97
|
+
className: "booking-calendar-event-card--action flex justify-end",
|
|
98
|
+
children: /* @__PURE__ */ q(h, {
|
|
96
99
|
fullWidth: !1,
|
|
97
100
|
className: "w-full @md/booking-calendar-event-card:w-auto",
|
|
98
101
|
onClick: s,
|
|
99
|
-
children:
|
|
102
|
+
children: o
|
|
100
103
|
})
|
|
101
104
|
})]
|
|
102
105
|
});
|
|
103
106
|
}
|
|
104
|
-
|
|
107
|
+
Ne.displayName = "BookingCalendarEventCard";
|
|
105
108
|
//#endregion
|
|
106
109
|
//#region src/components/blocks/commerce/loyalty-points/types.ts
|
|
107
|
-
var
|
|
108
|
-
balanceLabel: "Loyalty
|
|
110
|
+
var Pe = {
|
|
111
|
+
balanceLabel: "Loyalty balance",
|
|
109
112
|
pointsAvailable: "points available",
|
|
110
|
-
redeem: "Redeem
|
|
111
|
-
tier: "Gold
|
|
113
|
+
redeem: "Redeem points",
|
|
114
|
+
tier: "Gold tier"
|
|
112
115
|
};
|
|
113
116
|
//#endregion
|
|
114
117
|
//#region src/components/blocks/commerce/loyalty-points/loyalty-points.tsx
|
|
115
|
-
function
|
|
116
|
-
let
|
|
117
|
-
return /* @__PURE__ */
|
|
118
|
+
function Fe({ balance: e, tier: t, tierTone: i = "neutral", history: a = [], onRedeem: c, className: u, strings: f }) {
|
|
119
|
+
let p = n(Pe, f);
|
|
120
|
+
return /* @__PURE__ */ J(I, {
|
|
121
|
+
title: p.balanceLabel,
|
|
122
|
+
titleSuffix: /* @__PURE__ */ q(O, {
|
|
123
|
+
tone: i,
|
|
124
|
+
children: t ?? p.tier
|
|
125
|
+
}),
|
|
126
|
+
contentGap: "2xl",
|
|
118
127
|
className: r("loyalty-points--component w-full", u),
|
|
119
128
|
children: [
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
/* @__PURE__ */ G(i, {
|
|
138
|
-
size: "xs",
|
|
139
|
-
type: "secondary",
|
|
140
|
-
children: f.pointsAvailable
|
|
129
|
+
/* @__PURE__ */ J(d, {
|
|
130
|
+
gap: "dense",
|
|
131
|
+
className: "loyalty-points--balance",
|
|
132
|
+
children: [/* @__PURE__ */ q(o, {
|
|
133
|
+
tag: "h3",
|
|
134
|
+
className: "text-base tabular-nums tracking-tight",
|
|
135
|
+
children: typeof e == "number" ? /* @__PURE__ */ q(C, {
|
|
136
|
+
value: e,
|
|
137
|
+
size: "base",
|
|
138
|
+
weight: "bold",
|
|
139
|
+
align: "left"
|
|
140
|
+
}) : e
|
|
141
|
+
}), /* @__PURE__ */ q(s, {
|
|
142
|
+
size: "xs",
|
|
143
|
+
type: "secondary",
|
|
144
|
+
children: p.pointsAvailable
|
|
145
|
+
})]
|
|
141
146
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
/* @__PURE__ */ G(R, { children: s.map((e) => /* @__PURE__ */ K(B, {
|
|
147
|
+
a.length > 0 && /* @__PURE__ */ q(V, { children: a.map((e) => /* @__PURE__ */ J(U, {
|
|
144
148
|
size: "sm",
|
|
145
|
-
children: [/* @__PURE__ */
|
|
149
|
+
children: [/* @__PURE__ */ J(H, { children: [/* @__PURE__ */ q(W, {
|
|
146
150
|
bold: !1,
|
|
147
151
|
children: e.label
|
|
148
|
-
}), /* @__PURE__ */
|
|
152
|
+
}), /* @__PURE__ */ q(z, {
|
|
149
153
|
clamp: 1,
|
|
150
154
|
children: e.date
|
|
151
|
-
})] }), /* @__PURE__ */
|
|
155
|
+
})] }), /* @__PURE__ */ q(B, { children: /* @__PURE__ */ q(s, {
|
|
152
156
|
weight: "semibold",
|
|
153
157
|
className: r("tabular-nums", e.positive ? "text-success" : "text-destructive"),
|
|
154
158
|
children: e.points
|
|
155
159
|
}) })]
|
|
156
160
|
}, e.date + e.label)) }),
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
|
|
161
|
+
!!c && /* @__PURE__ */ q(l, {
|
|
162
|
+
tone: "primary",
|
|
159
163
|
fullWidth: !0,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
children: f.redeem
|
|
164
|
+
onClick: c,
|
|
165
|
+
children: p.redeem
|
|
163
166
|
})
|
|
164
167
|
]
|
|
165
168
|
});
|
|
166
169
|
}
|
|
167
|
-
|
|
168
|
-
function
|
|
170
|
+
Fe.displayName = "LoyaltyPoints";
|
|
171
|
+
function Ie(e) {
|
|
169
172
|
return e.replace(/^[\s−-]+/, "");
|
|
170
173
|
}
|
|
171
|
-
function
|
|
172
|
-
return e.trim() ? `−${
|
|
174
|
+
function Le(e) {
|
|
175
|
+
return e.trim() ? `−${Ie(e)}` : e;
|
|
173
176
|
}
|
|
174
177
|
//#endregion
|
|
175
178
|
//#region src/components/blocks/commerce/discount-stack/types.ts
|
|
176
|
-
var
|
|
177
|
-
title: "Applied
|
|
178
|
-
totalSavings: "Total
|
|
179
|
+
var Re = {
|
|
180
|
+
title: "Applied discounts",
|
|
181
|
+
totalSavings: "Total savings"
|
|
179
182
|
};
|
|
180
183
|
//#endregion
|
|
181
184
|
//#region src/components/blocks/commerce/discount-stack/discount-stack.tsx
|
|
182
|
-
function
|
|
183
|
-
let c = n(
|
|
184
|
-
return /* @__PURE__ */
|
|
185
|
+
function ze({ discounts: e, totalSavings: t, className: i, strings: a }) {
|
|
186
|
+
let c = n(Re, a);
|
|
187
|
+
return /* @__PURE__ */ J(I, {
|
|
185
188
|
title: c.title,
|
|
186
|
-
|
|
189
|
+
contentGap: "xl",
|
|
190
|
+
className: r("discount-stack--component w-full", i),
|
|
187
191
|
children: [
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
-
|
|
190
|
-
children:
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
/* @__PURE__ */ G(O, { className: "my-space-xl" }),
|
|
211
|
-
/* @__PURE__ */ G(H, {
|
|
212
|
-
label: /* @__PURE__ */ G(i, {
|
|
192
|
+
/* @__PURE__ */ q(V, { children: e.map((e, t) => /* @__PURE__ */ J(U, {
|
|
193
|
+
size: "sm",
|
|
194
|
+
children: [
|
|
195
|
+
/* @__PURE__ */ q(R, { children: /* @__PURE__ */ q(O, {
|
|
196
|
+
tone: e.badge,
|
|
197
|
+
className: "w-16 justify-center",
|
|
198
|
+
children: e.type
|
|
199
|
+
}) }),
|
|
200
|
+
/* @__PURE__ */ q(H, { children: /* @__PURE__ */ q(W, {
|
|
201
|
+
bold: !1,
|
|
202
|
+
children: e.label
|
|
203
|
+
}) }),
|
|
204
|
+
/* @__PURE__ */ q(B, { children: /* @__PURE__ */ q(g, {
|
|
205
|
+
weight: "semibold",
|
|
206
|
+
className: "tabular-nums text-success",
|
|
207
|
+
children: Le(e.amount)
|
|
208
|
+
}) })
|
|
209
|
+
]
|
|
210
|
+
}, `${e.type}-${e.label}-${String(t)}`)) }),
|
|
211
|
+
/* @__PURE__ */ q(k, {}),
|
|
212
|
+
/* @__PURE__ */ q(G, {
|
|
213
|
+
label: /* @__PURE__ */ q(s, {
|
|
213
214
|
tag: "span",
|
|
214
215
|
weight: "semibold",
|
|
215
216
|
lineHeight: "tight",
|
|
216
217
|
children: c.totalSavings
|
|
217
218
|
}),
|
|
218
|
-
value: /* @__PURE__ */
|
|
219
|
+
value: /* @__PURE__ */ q(o, {
|
|
219
220
|
tag: "h4",
|
|
220
221
|
className: "text-base tabular-nums tracking-tight text-success border-none pb-0",
|
|
221
|
-
children:
|
|
222
|
+
children: Le(t)
|
|
222
223
|
})
|
|
223
224
|
})
|
|
224
225
|
]
|
|
225
226
|
});
|
|
226
227
|
}
|
|
227
|
-
|
|
228
|
+
ze.displayName = "DiscountStackPreview";
|
|
228
229
|
//#endregion
|
|
229
230
|
//#region src/components/blocks/commerce/shipment-tracking/types.ts
|
|
230
|
-
var
|
|
231
|
+
var Be = {
|
|
231
232
|
pending: "bg-muted-foreground",
|
|
232
233
|
in_transit: "bg-info",
|
|
233
234
|
delivered: "bg-success",
|
|
234
235
|
delayed: "bg-warning"
|
|
235
|
-
},
|
|
236
|
+
}, Ve = {
|
|
236
237
|
title: "Shipment tracking",
|
|
237
238
|
pending: "Pending",
|
|
238
239
|
in_transit: "In transit",
|
|
@@ -241,40 +242,40 @@ var at = {
|
|
|
241
242
|
};
|
|
242
243
|
//#endregion
|
|
243
244
|
//#region src/components/blocks/commerce/shipment-tracking/shipment-tracking.tsx
|
|
244
|
-
function
|
|
245
|
-
let u = n(
|
|
246
|
-
return /* @__PURE__ */
|
|
245
|
+
function He({ trackingNumber: e, carrier: t, status: i, steps: a, details: o = [], className: c, strings: l }) {
|
|
246
|
+
let u = n(Ve, l);
|
|
247
|
+
return /* @__PURE__ */ J(I, {
|
|
247
248
|
"aria-label": u.title,
|
|
248
249
|
className: r("shipment-tracking--component w-full", c),
|
|
249
250
|
children: [
|
|
250
|
-
/* @__PURE__ */
|
|
251
|
-
className: "flex items-center
|
|
252
|
-
children: [/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ J("div", {
|
|
252
|
+
className: "flex items-center gap-space-sm",
|
|
253
|
+
children: [/* @__PURE__ */ q(y, {
|
|
253
254
|
className: "text-muted-foreground tracking-wide",
|
|
254
255
|
children: e
|
|
255
|
-
}), !!t && /* @__PURE__ */
|
|
256
|
-
tone: "
|
|
256
|
+
}), !!t && /* @__PURE__ */ q(O, {
|
|
257
|
+
tone: "neutral",
|
|
257
258
|
children: t
|
|
258
259
|
})]
|
|
259
260
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ J("div", {
|
|
261
262
|
className: "shipment-tracking--status mt-space-xl flex items-center gap-space-sm",
|
|
262
|
-
children: [/* @__PURE__ */
|
|
263
|
+
children: [/* @__PURE__ */ q("span", {
|
|
263
264
|
"aria-hidden": "true",
|
|
264
|
-
className: r("shipment-tracking--status-dot h-2 w-2 rounded-full",
|
|
265
|
-
}), /* @__PURE__ */
|
|
265
|
+
className: r("shipment-tracking--status-dot h-2 w-2 rounded-full", Be[i])
|
|
266
|
+
}), /* @__PURE__ */ q(s, {
|
|
266
267
|
weight: "semibold",
|
|
267
|
-
children: u[
|
|
268
|
+
children: u[i]
|
|
268
269
|
})]
|
|
269
270
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ q("div", {
|
|
271
272
|
className: "mt-space-xl flex items-center justify-between",
|
|
272
|
-
children:
|
|
273
|
+
children: a.map((e, t) => /* @__PURE__ */ J("div", {
|
|
273
274
|
className: "flex flex-1 flex-col items-start gap-space-md",
|
|
274
|
-
children: [/* @__PURE__ */
|
|
275
|
+
children: [/* @__PURE__ */ J("div", {
|
|
275
276
|
className: "flex w-full items-center",
|
|
276
|
-
children: [/* @__PURE__ */
|
|
277
|
-
}), /* @__PURE__ */
|
|
277
|
+
children: [/* @__PURE__ */ q("div", { className: r("size-icon-sm shrink-0 rounded-full", e.done ? "bg-success" : "bg-muted") }), t < a.length - 1 && /* @__PURE__ */ q("div", { className: r("h-0.5 flex-1", e.done ? "bg-success" : "bg-muted") })]
|
|
278
|
+
}), /* @__PURE__ */ q(s, {
|
|
278
279
|
size: "xs",
|
|
279
280
|
type: "secondary",
|
|
280
281
|
className: "text-left leading-tight",
|
|
@@ -282,18 +283,18 @@ function st({ trackingNumber: e, carrier: t, status: a, steps: o, details: s = [
|
|
|
282
283
|
})]
|
|
283
284
|
}, e.label))
|
|
284
285
|
}),
|
|
285
|
-
|
|
286
|
-
className: "space-y-space-md",
|
|
287
|
-
children:
|
|
286
|
+
o.length > 0 && /* @__PURE__ */ q("div", {
|
|
287
|
+
className: "mt-space-2xl space-y-space-md",
|
|
288
|
+
children: o.map((e) => /* @__PURE__ */ q(G, {
|
|
288
289
|
label: e.label,
|
|
289
290
|
value: e.value,
|
|
290
291
|
valueClassName: "font-medium truncate max-w-[180px]"
|
|
291
292
|
}, e.label))
|
|
292
|
-
})
|
|
293
|
+
})
|
|
293
294
|
]
|
|
294
295
|
});
|
|
295
296
|
}
|
|
296
|
-
|
|
297
|
+
He.displayName = "ShipmentTracking";
|
|
297
298
|
//#endregion
|
|
298
299
|
//#region src/components/blocks/commerce/giftcard-card/types.ts
|
|
299
300
|
var Y = {
|
|
@@ -303,41 +304,41 @@ var Y = {
|
|
|
303
304
|
expired: "Expired",
|
|
304
305
|
disabled: "Disabled"
|
|
305
306
|
},
|
|
306
|
-
giftCard: "Gift
|
|
307
|
+
giftCard: "Gift card",
|
|
307
308
|
balance: "Balance",
|
|
308
|
-
personalMessage: "Personal
|
|
309
|
+
personalMessage: "Personal message",
|
|
309
310
|
to: "To",
|
|
310
311
|
from: "From",
|
|
311
312
|
expires: "Expires",
|
|
312
313
|
recipient: "Recipient",
|
|
313
|
-
viewDetails: "View
|
|
314
|
+
viewDetails: "View details",
|
|
314
315
|
copyCode: "Copy code",
|
|
315
316
|
copiedCode: "Code copied",
|
|
316
317
|
copyFailed: "Could not copy code. Try again.",
|
|
317
318
|
copyingCode: "Copying code…"
|
|
318
|
-
},
|
|
319
|
+
}, Ue = {
|
|
319
320
|
active: "success",
|
|
320
321
|
redeemed: "secondary",
|
|
321
322
|
expired: "destructive",
|
|
322
323
|
disabled: "warning"
|
|
323
|
-
},
|
|
324
|
+
}, We = "bg-inverse-background from-inverse-background via-inverse-surface to-inverse-background", Ge = {
|
|
324
325
|
purple: {
|
|
325
|
-
card:
|
|
326
|
+
card: We,
|
|
326
327
|
strip: "from-primary via-primary/90 to-info"
|
|
327
328
|
},
|
|
328
329
|
green: {
|
|
329
|
-
card:
|
|
330
|
+
card: We,
|
|
330
331
|
strip: "from-success via-info to-success"
|
|
331
332
|
},
|
|
332
333
|
warm: {
|
|
333
|
-
card:
|
|
334
|
+
card: We,
|
|
334
335
|
strip: "from-warning via-warning/90 to-destructive"
|
|
335
336
|
}
|
|
336
|
-
},
|
|
337
|
+
}, Ke = {
|
|
337
338
|
purple: "from-primary to-info",
|
|
338
339
|
green: "from-success to-info",
|
|
339
340
|
warm: "from-warning to-destructive"
|
|
340
|
-
},
|
|
341
|
+
}, qe = {
|
|
341
342
|
green: {
|
|
342
343
|
line: "bg-success",
|
|
343
344
|
iconBg: "bg-success/15 text-success"
|
|
@@ -350,102 +351,99 @@ var Y = {
|
|
|
350
351
|
line: "bg-warning",
|
|
351
352
|
iconBg: "bg-warning/15 text-warning-accent"
|
|
352
353
|
}
|
|
353
|
-
},
|
|
354
|
+
}, Je = {
|
|
354
355
|
green: "from-success to-info",
|
|
355
356
|
blue: "from-info to-primary",
|
|
356
357
|
amber: "from-warning to-destructive"
|
|
357
358
|
};
|
|
358
359
|
//#endregion
|
|
359
360
|
//#region src/components/blocks/commerce/giftcard-card/partials/giftcard-compact.tsx
|
|
360
|
-
function
|
|
361
|
-
let
|
|
362
|
-
return /* @__PURE__ */
|
|
361
|
+
function Ye({ code: e, amount: t, remainingAmount: i, status: a, recipientName: o, gradient: s = "purple", className: c, strings: l }) {
|
|
362
|
+
let u = n(Y, l).status[a], f = Ue[a], p = !!i && i !== t, m = p ? i : t;
|
|
363
|
+
return /* @__PURE__ */ J(U, {
|
|
363
364
|
size: "sm",
|
|
364
365
|
variant: "outline",
|
|
365
366
|
padding: "default",
|
|
366
367
|
className: r("giftcard-card--component giftcard-compact--component flex-nowrap shadow-sm transition-colors duration-150 hover:border-border", c),
|
|
367
368
|
children: [
|
|
368
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ q(R, {
|
|
369
370
|
variant: "image",
|
|
370
|
-
children: /* @__PURE__ */
|
|
371
|
-
className: r("flex size-full items-center justify-center bg-gradient-to-br p-space-2xs",
|
|
372
|
-
children: /* @__PURE__ */
|
|
373
|
-
className: "flex size-full items-center justify-center rounded-inner bg-inverse-background",
|
|
374
|
-
children: /* @__PURE__ */ G(J, { className: "h-4 w-4 text-inverse-foreground" })
|
|
375
|
-
})
|
|
371
|
+
children: /* @__PURE__ */ q("div", {
|
|
372
|
+
className: r("flex size-full items-center justify-center bg-gradient-to-br p-space-2xs", Ke[s]),
|
|
373
|
+
children: /* @__PURE__ */ q("span", { className: "size-full rounded-inner bg-inverse-background" })
|
|
376
374
|
})
|
|
377
375
|
}),
|
|
378
|
-
/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ J(H, {
|
|
379
377
|
className: "min-w-0",
|
|
380
|
-
children: [/* @__PURE__ */
|
|
378
|
+
children: [/* @__PURE__ */ q(W, {
|
|
381
379
|
className: "w-full max-w-full truncate whitespace-nowrap",
|
|
382
|
-
children: /* @__PURE__ */
|
|
383
|
-
}), !!o && /* @__PURE__ */
|
|
380
|
+
children: /* @__PURE__ */ q(y, { children: e })
|
|
381
|
+
}), !!o && /* @__PURE__ */ q(z, {
|
|
384
382
|
clamp: 1,
|
|
385
383
|
children: o
|
|
386
384
|
})]
|
|
387
385
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ q(B, {
|
|
389
387
|
className: "shrink-0",
|
|
390
|
-
children: /* @__PURE__ */
|
|
388
|
+
children: /* @__PURE__ */ J(d, {
|
|
391
389
|
gap: "2xs",
|
|
392
390
|
align: "end",
|
|
393
391
|
className: "shrink-0",
|
|
394
|
-
children: [/* @__PURE__ */
|
|
392
|
+
children: [/* @__PURE__ */ J("div", {
|
|
395
393
|
className: "flex items-baseline gap-space-xs",
|
|
396
|
-
children: [/* @__PURE__ */
|
|
394
|
+
children: [/* @__PURE__ */ q(g, {
|
|
397
395
|
weight: "bold",
|
|
398
396
|
className: "tabular-nums",
|
|
399
397
|
children: m
|
|
400
|
-
}), !!p && /* @__PURE__ */
|
|
398
|
+
}), !!p && /* @__PURE__ */ q(g, {
|
|
401
399
|
size: "xs",
|
|
402
400
|
className: "line-through tabular-nums text-muted-foreground",
|
|
403
401
|
children: t
|
|
404
402
|
})]
|
|
405
|
-
}), /* @__PURE__ */
|
|
403
|
+
}), /* @__PURE__ */ q(O, {
|
|
406
404
|
tone: f,
|
|
407
405
|
size: "sm",
|
|
408
|
-
children:
|
|
406
|
+
children: u
|
|
409
407
|
})]
|
|
410
408
|
})
|
|
411
409
|
})
|
|
412
410
|
]
|
|
413
411
|
});
|
|
414
412
|
}
|
|
415
|
-
|
|
413
|
+
Ye.displayName = "GiftcardCompact";
|
|
416
414
|
//#endregion
|
|
417
415
|
//#region src/components/blocks/commerce/giftcard-card/partials/giftcard-copy-button.tsx
|
|
418
|
-
function
|
|
419
|
-
let
|
|
416
|
+
function Xe({ code: e, strings: t, inverse: i = !1, className: a }) {
|
|
417
|
+
let o = n(Y, t), c = fe(0), [u, d] = pe({
|
|
420
418
|
code: e,
|
|
421
419
|
state: "idle"
|
|
422
420
|
}), f = u.code === e ? u.state : "idle";
|
|
423
|
-
|
|
421
|
+
ue(() => (c.current++, d((t) => t.code === e ? t : {
|
|
424
422
|
code: e,
|
|
425
423
|
state: "idle"
|
|
426
424
|
}), () => {
|
|
427
|
-
|
|
425
|
+
c.current++;
|
|
428
426
|
}), [e]);
|
|
429
|
-
let p = f === "copied" ?
|
|
427
|
+
let p = f === "copied" ? o.copiedCode : f === "failed" ? o.copyFailed : f === "pending" ? o.copyingCode : o.copyCode, m = f === "copied" ? _e : f === "failed" ? Ae : f === "pending" ? Te : Se, h = async () => {
|
|
430
428
|
if (!e || f === "pending") return;
|
|
431
|
-
let t =
|
|
429
|
+
let t = c.current;
|
|
432
430
|
d({
|
|
433
431
|
code: e,
|
|
434
432
|
state: "pending"
|
|
435
433
|
});
|
|
436
434
|
try {
|
|
437
|
-
await navigator.clipboard.writeText(e),
|
|
435
|
+
await navigator.clipboard.writeText(e), c.current === t && d({
|
|
438
436
|
code: e,
|
|
439
437
|
state: "copied"
|
|
440
438
|
});
|
|
441
439
|
} catch {
|
|
442
|
-
|
|
440
|
+
c.current === t && d({
|
|
443
441
|
code: e,
|
|
444
442
|
state: "failed"
|
|
445
443
|
});
|
|
446
444
|
}
|
|
447
445
|
};
|
|
448
|
-
return /* @__PURE__ */
|
|
446
|
+
return /* @__PURE__ */ J(me, { children: [/* @__PURE__ */ q(l, {
|
|
449
447
|
type: "button",
|
|
450
448
|
tone: "secondary",
|
|
451
449
|
buttonStyle: "ghost",
|
|
@@ -455,13 +453,13 @@ function ht({ code: e, strings: t, inverse: a = !1, className: o }) {
|
|
|
455
453
|
"aria-busy": f === "pending",
|
|
456
454
|
"aria-label": p,
|
|
457
455
|
withTooltip: p,
|
|
458
|
-
className: r("giftcard-copy--component",
|
|
456
|
+
className: r("giftcard-copy--component", a, i && "text-inverse-foreground [&:hover:not(:active):not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-inverse-surface [&:hover:not(:active):not(:disabled):not([data-disabled]):not([aria-disabled=true])]:text-inverse-foreground [&:active:not(:disabled):not([data-disabled]):not([aria-disabled=true])]:bg-inverse-surface-strong focus-visible:bg-inverse-surface focus-visible:ring-offset-inverse-background"),
|
|
459
457
|
onClick: () => void h(),
|
|
460
|
-
children: /* @__PURE__ */
|
|
458
|
+
children: /* @__PURE__ */ q(m, {
|
|
461
459
|
"aria-hidden": !0,
|
|
462
460
|
className: r("size-icon-sm", f === "pending" && "animate-spin")
|
|
463
461
|
})
|
|
464
|
-
}), (f === "copied" || f === "failed") && /* @__PURE__ */
|
|
462
|
+
}), (f === "copied" || f === "failed") && /* @__PURE__ */ q(s, {
|
|
465
463
|
tag: "span",
|
|
466
464
|
role: "status",
|
|
467
465
|
className: "sr-only",
|
|
@@ -470,98 +468,88 @@ function ht({ code: e, strings: t, inverse: a = !1, className: o }) {
|
|
|
470
468
|
}
|
|
471
469
|
//#endregion
|
|
472
470
|
//#region src/components/blocks/commerce/giftcard-card/partials/giftcard-dark.tsx
|
|
473
|
-
function
|
|
474
|
-
let
|
|
475
|
-
label:
|
|
476
|
-
value:
|
|
477
|
-
}] : [], ...
|
|
478
|
-
label:
|
|
479
|
-
value:
|
|
471
|
+
function Ze({ code: e, amount: t, remainingAmount: i, status: a, recipientName: c, expiresAt: u, onView: f, className: p, strings: m }) {
|
|
472
|
+
let h = n(Y, m), _ = h.status[a], v = Ue[a], b = !!i && i !== t, x = b ? i : t, S = [...c ? [{
|
|
473
|
+
label: h.recipient,
|
|
474
|
+
value: c
|
|
475
|
+
}] : [], ...u ? [{
|
|
476
|
+
label: h.expires,
|
|
477
|
+
value: u
|
|
480
478
|
}] : []];
|
|
481
|
-
return /* @__PURE__ */
|
|
479
|
+
return /* @__PURE__ */ q("div", {
|
|
482
480
|
className: r("giftcard-card--component giftcard-dark--component dark w-full max-w-sm overflow-hidden rounded-radius bg-card text-card-foreground shadow-sm ring-1 ring-border", p),
|
|
483
|
-
children:
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
}) }),
|
|
501
|
-
/* @__PURE__ */ G(L, { children: /* @__PURE__ */ G(D, {
|
|
502
|
-
tone: y,
|
|
481
|
+
children: /* @__PURE__ */ J(d, {
|
|
482
|
+
gap: "lg",
|
|
483
|
+
className: "giftcard-dark--body p-surface",
|
|
484
|
+
children: [
|
|
485
|
+
/* @__PURE__ */ J(d, {
|
|
486
|
+
direction: "horizontal",
|
|
487
|
+
justify: "between",
|
|
488
|
+
align: "center",
|
|
489
|
+
gap: "md",
|
|
490
|
+
wrap: !1,
|
|
491
|
+
children: [/* @__PURE__ */ q(s, {
|
|
492
|
+
tag: "span",
|
|
493
|
+
className: "text-inverse-muted",
|
|
494
|
+
children: h.giftCard
|
|
495
|
+
}), /* @__PURE__ */ q(O, {
|
|
496
|
+
tone: v,
|
|
497
|
+
className: "shrink-0",
|
|
503
498
|
children: _
|
|
504
|
-
})
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
/* @__PURE__ */ G("div", {
|
|
508
|
-
className: "px-surface pb-surface-xs pt-space-sm",
|
|
509
|
-
children: /* @__PURE__ */ K("div", {
|
|
499
|
+
})]
|
|
500
|
+
}),
|
|
501
|
+
/* @__PURE__ */ J("div", {
|
|
510
502
|
className: "flex items-baseline gap-space-md",
|
|
511
|
-
children: [/* @__PURE__ */
|
|
503
|
+
children: [/* @__PURE__ */ q(o, {
|
|
512
504
|
tag: "h2",
|
|
513
505
|
size: "2xl",
|
|
514
506
|
className: "border-none pb-0 tabular-nums text-inverse-foreground",
|
|
515
507
|
children: x
|
|
516
|
-
}), !!b && /* @__PURE__ */
|
|
508
|
+
}), !!b && /* @__PURE__ */ q(g, {
|
|
517
509
|
className: "line-through tabular-nums text-inverse-disabled",
|
|
518
510
|
children: t
|
|
519
511
|
})]
|
|
520
|
-
})
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
})
|
|
536
|
-
})
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
!!f && /* @__PURE__ */ G("div", {
|
|
544
|
-
className: "px-surface pb-surface pt-space-sm",
|
|
545
|
-
children: /* @__PURE__ */ G(c, {
|
|
512
|
+
}),
|
|
513
|
+
/* @__PURE__ */ q("div", {
|
|
514
|
+
className: "giftcard-dark--code rounded-inner border border-inverse-border bg-inverse-surface p-surface-xs",
|
|
515
|
+
children: /* @__PURE__ */ J(d, {
|
|
516
|
+
direction: "horizontal",
|
|
517
|
+
align: "center",
|
|
518
|
+
gap: "md",
|
|
519
|
+
children: [/* @__PURE__ */ q(y, {
|
|
520
|
+
className: "flex-1 tracking-[0.15em] text-inverse-foreground",
|
|
521
|
+
children: e
|
|
522
|
+
}), /* @__PURE__ */ q(Xe, {
|
|
523
|
+
code: e,
|
|
524
|
+
strings: h,
|
|
525
|
+
inverse: !0
|
|
526
|
+
})]
|
|
527
|
+
})
|
|
528
|
+
}),
|
|
529
|
+
/* @__PURE__ */ q(K, {
|
|
530
|
+
items: S,
|
|
531
|
+
columns: 1,
|
|
532
|
+
className: "[&_.metadata-list--label]:text-inverse-muted [&_.metadata-list--value]:text-inverse-foreground"
|
|
533
|
+
}),
|
|
534
|
+
!!f && /* @__PURE__ */ q(l, {
|
|
546
535
|
tone: "neutral",
|
|
547
536
|
buttonStyle: "solid",
|
|
548
|
-
icon: ke,
|
|
549
537
|
fullWidth: !0,
|
|
550
538
|
onClick: f,
|
|
551
|
-
children:
|
|
539
|
+
children: h.viewDetails
|
|
552
540
|
})
|
|
553
|
-
|
|
554
|
-
|
|
541
|
+
]
|
|
542
|
+
})
|
|
555
543
|
});
|
|
556
544
|
}
|
|
557
|
-
|
|
545
|
+
Ze.displayName = "GiftcardCardDark";
|
|
558
546
|
//#endregion
|
|
559
547
|
//#region src/components/blocks/commerce/giftcard-card/partials/giftcard-full.tsx
|
|
560
|
-
function
|
|
561
|
-
let w = n(Y, C), T = w.status[
|
|
562
|
-
...
|
|
548
|
+
function Qe({ code: e, amount: t, remainingAmount: i, status: c, recipientName: u, senderName: f, message: p, expiresAt: m, createdAt: h, template: _, onView: v, gradient: b = "purple", pattern: x = "none", className: S, strings: C }) {
|
|
549
|
+
let w = n(Y, C), T = w.status[c], E = Ue[c], D = !!i && i !== t, k = D ? i : t, A = [
|
|
550
|
+
...u ? [{
|
|
563
551
|
label: w.to,
|
|
564
|
-
value:
|
|
552
|
+
value: u
|
|
565
553
|
}] : [],
|
|
566
554
|
...f ? [{
|
|
567
555
|
label: w.from,
|
|
@@ -572,89 +560,86 @@ function _t({ code: e, amount: t, remainingAmount: s, status: l, recipientName:
|
|
|
572
560
|
value: m
|
|
573
561
|
}] : []
|
|
574
562
|
];
|
|
575
|
-
return /* @__PURE__ */
|
|
563
|
+
return /* @__PURE__ */ J("div", {
|
|
576
564
|
className: r("giftcard-card--component w-full max-w-sm transition-shadow duration-300 ease-out", "hover:shadow-md hover:shadow-foreground/10", S),
|
|
577
|
-
children: [/* @__PURE__ */
|
|
578
|
-
className: r("relative overflow-hidden rounded-t-radius bg-gradient-to-br p-surface",
|
|
565
|
+
children: [/* @__PURE__ */ J("div", {
|
|
566
|
+
className: r("relative overflow-hidden rounded-t-radius bg-gradient-to-br p-surface", Ge[b].card),
|
|
579
567
|
children: [
|
|
580
|
-
/* @__PURE__ */
|
|
568
|
+
/* @__PURE__ */ q("div", {
|
|
581
569
|
"aria-hidden": !0,
|
|
582
|
-
className: r("absolute inset-x-0 top-0 z-10 h-1 bg-gradient-to-r",
|
|
570
|
+
className: r("absolute inset-x-0 top-0 z-10 h-1 bg-gradient-to-r", Ge[b].strip)
|
|
583
571
|
}),
|
|
584
|
-
x === "circles" && /* @__PURE__ */
|
|
572
|
+
x === "circles" && /* @__PURE__ */ J(me, { children: [/* @__PURE__ */ q("div", {
|
|
585
573
|
className: "absolute -top-8 -right-8 h-32 w-32 rounded-full bg-inverse-decoration",
|
|
586
574
|
"aria-hidden": "true"
|
|
587
|
-
}), /* @__PURE__ */
|
|
575
|
+
}), /* @__PURE__ */ q("div", {
|
|
588
576
|
className: "absolute -bottom-4 -left-4 h-20 w-20 rounded-full bg-inverse-decoration",
|
|
589
577
|
"aria-hidden": "true"
|
|
590
578
|
})] }),
|
|
591
|
-
x === "waves" && /* @__PURE__ */
|
|
579
|
+
x === "waves" && /* @__PURE__ */ J("svg", {
|
|
592
580
|
className: "absolute inset-0 h-full w-full opacity-5",
|
|
593
581
|
viewBox: "0 0 400 200",
|
|
594
582
|
preserveAspectRatio: "none",
|
|
595
583
|
"aria-hidden": "true",
|
|
596
|
-
children: [/* @__PURE__ */
|
|
584
|
+
children: [/* @__PURE__ */ q("path", {
|
|
597
585
|
d: "M0 80 C100 20, 200 140, 400 60 L400 200 L0 200 Z",
|
|
598
586
|
className: "fill-inverse-foreground"
|
|
599
|
-
}), /* @__PURE__ */
|
|
587
|
+
}), /* @__PURE__ */ q("path", {
|
|
600
588
|
d: "M0 120 C120 60, 280 180, 400 100 L400 200 L0 200 Z",
|
|
601
589
|
className: "fill-inverse-foreground"
|
|
602
590
|
})]
|
|
603
591
|
}),
|
|
604
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ q("div", {
|
|
605
593
|
className: "absolute top-4 right-4 z-20",
|
|
606
|
-
children: /* @__PURE__ */
|
|
594
|
+
children: /* @__PURE__ */ q(O, {
|
|
607
595
|
tone: E,
|
|
608
596
|
inline: !0,
|
|
609
597
|
dot: !0,
|
|
610
|
-
className: "border border-inverse-border bg-inverse-background text-inverse-foreground shadow-sm
|
|
598
|
+
className: "border border-inverse-border bg-inverse-background text-inverse-foreground shadow-sm",
|
|
611
599
|
"data-status": E,
|
|
612
600
|
children: T
|
|
613
601
|
})
|
|
614
602
|
}),
|
|
615
|
-
/* @__PURE__ */
|
|
603
|
+
/* @__PURE__ */ J(d, {
|
|
616
604
|
gap: "xl",
|
|
617
605
|
className: "relative z-10",
|
|
618
606
|
children: [
|
|
619
|
-
/* @__PURE__ */
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
className: "text-inverse-muted",
|
|
624
|
-
children: w.giftCard
|
|
625
|
-
})]
|
|
607
|
+
/* @__PURE__ */ q(s, {
|
|
608
|
+
weight: "medium",
|
|
609
|
+
className: "text-inverse-muted",
|
|
610
|
+
children: w.giftCard
|
|
626
611
|
}),
|
|
627
|
-
/* @__PURE__ */
|
|
612
|
+
/* @__PURE__ */ J(d, {
|
|
628
613
|
gap: "dense",
|
|
629
|
-
children: [/* @__PURE__ */
|
|
614
|
+
children: [/* @__PURE__ */ q(a, {
|
|
630
615
|
tone: "inverse",
|
|
631
616
|
children: w.balance
|
|
632
|
-
}), /* @__PURE__ */
|
|
617
|
+
}), /* @__PURE__ */ J(d, {
|
|
633
618
|
direction: "horizontal",
|
|
634
619
|
align: "baseline",
|
|
635
620
|
gap: "lg",
|
|
636
|
-
children: [/* @__PURE__ */
|
|
621
|
+
children: [/* @__PURE__ */ q(o, {
|
|
637
622
|
tag: "h2",
|
|
638
623
|
size: "2xl",
|
|
639
624
|
className: "border-none pb-0 text-inverse-foreground tabular-nums drop-shadow-sm",
|
|
640
625
|
children: k
|
|
641
|
-
}), !!
|
|
626
|
+
}), !!D && /* @__PURE__ */ q(g, {
|
|
642
627
|
className: "line-through tabular-nums text-inverse-disabled",
|
|
643
628
|
children: t
|
|
644
629
|
})]
|
|
645
630
|
})]
|
|
646
631
|
}),
|
|
647
|
-
/* @__PURE__ */
|
|
648
|
-
className: r("giftcard-full--code", "rounded-radius p-surface-xs", "bg-inverse-surface
|
|
649
|
-
children: /* @__PURE__ */
|
|
632
|
+
/* @__PURE__ */ q("div", {
|
|
633
|
+
className: r("giftcard-full--code", "rounded-radius p-surface-xs", "bg-inverse-surface", "border border-inverse-border", "shadow-sm"),
|
|
634
|
+
children: /* @__PURE__ */ J(d, {
|
|
650
635
|
direction: "horizontal",
|
|
651
636
|
align: "center",
|
|
652
637
|
gap: "md",
|
|
653
|
-
children: [/* @__PURE__ */
|
|
638
|
+
children: [/* @__PURE__ */ q(y, {
|
|
654
639
|
weight: "semibold",
|
|
655
640
|
className: "flex-1 tracking-[0.2em] text-inverse-foreground",
|
|
656
641
|
children: e
|
|
657
|
-
}), /* @__PURE__ */
|
|
642
|
+
}), /* @__PURE__ */ q(Xe, {
|
|
658
643
|
code: e,
|
|
659
644
|
strings: w,
|
|
660
645
|
inverse: !0
|
|
@@ -664,15 +649,15 @@ function _t({ code: e, amount: t, remainingAmount: s, status: l, recipientName:
|
|
|
664
649
|
]
|
|
665
650
|
})
|
|
666
651
|
]
|
|
667
|
-
}), /* @__PURE__ */
|
|
652
|
+
}), /* @__PURE__ */ q("div", {
|
|
668
653
|
className: "rounded-b-radius bg-card p-surface shadow-sm border border-t-0 border-border/50",
|
|
669
|
-
children: /* @__PURE__ */
|
|
654
|
+
children: /* @__PURE__ */ J(d, {
|
|
670
655
|
gap: "xl",
|
|
671
656
|
children: [
|
|
672
|
-
!!p && /* @__PURE__ */
|
|
657
|
+
!!p && /* @__PURE__ */ J(d, {
|
|
673
658
|
gap: "normal",
|
|
674
|
-
className: "giftcard-full--message
|
|
675
|
-
children: [/* @__PURE__ */
|
|
659
|
+
className: "giftcard-full--message",
|
|
660
|
+
children: [/* @__PURE__ */ q(a, { children: w.personalMessage }), /* @__PURE__ */ J(s, {
|
|
676
661
|
type: "secondary",
|
|
677
662
|
className: "italic leading-relaxed",
|
|
678
663
|
children: [
|
|
@@ -682,19 +667,18 @@ function _t({ code: e, amount: t, remainingAmount: s, status: l, recipientName:
|
|
|
682
667
|
]
|
|
683
668
|
})]
|
|
684
669
|
}),
|
|
685
|
-
/* @__PURE__ */
|
|
670
|
+
/* @__PURE__ */ q(K, {
|
|
686
671
|
items: A,
|
|
687
672
|
columns: {
|
|
688
673
|
base: 1,
|
|
689
674
|
sm: 2
|
|
690
675
|
}
|
|
691
676
|
}),
|
|
692
|
-
!!
|
|
677
|
+
!!v && /* @__PURE__ */ q(l, {
|
|
693
678
|
tone: "secondary",
|
|
694
679
|
buttonStyle: "outline",
|
|
695
|
-
icon: ke,
|
|
696
680
|
fullWidth: !0,
|
|
697
|
-
onClick:
|
|
681
|
+
onClick: v,
|
|
698
682
|
children: w.viewDetails
|
|
699
683
|
})
|
|
700
684
|
]
|
|
@@ -702,409 +686,389 @@ function _t({ code: e, amount: t, remainingAmount: s, status: l, recipientName:
|
|
|
702
686
|
})]
|
|
703
687
|
});
|
|
704
688
|
}
|
|
705
|
-
|
|
689
|
+
Qe.displayName = "GiftcardFull";
|
|
706
690
|
//#endregion
|
|
707
691
|
//#region src/components/blocks/commerce/giftcard-card/partials/giftcard-illustrated.tsx
|
|
708
|
-
function
|
|
709
|
-
let
|
|
710
|
-
label:
|
|
711
|
-
value:
|
|
692
|
+
function $e({ code: e, amount: t, remainingAmount: i, status: c, recipientName: u, expiresAt: f, onView: p, headerColor: m = "green", className: h, strings: _ }) {
|
|
693
|
+
let v = n(Y, _), b = v.status[c], x = Ue[c], S = !!i && i !== t, C = S ? i : t, w = [...u ? [{
|
|
694
|
+
label: v.recipient,
|
|
695
|
+
value: u
|
|
712
696
|
}] : [], ...f ? [{
|
|
713
|
-
label:
|
|
697
|
+
label: v.expires,
|
|
714
698
|
value: f
|
|
715
699
|
}] : []];
|
|
716
|
-
return /* @__PURE__ */
|
|
717
|
-
className: r("giftcard-card--component giftcard-illustrated--component w-full max-w-sm overflow-hidden rounded-radius border border-border bg-card shadow-sm",
|
|
718
|
-
children: [/* @__PURE__ */
|
|
700
|
+
return /* @__PURE__ */ J("div", {
|
|
701
|
+
className: r("giftcard-card--component giftcard-illustrated--component w-full max-w-sm overflow-hidden rounded-radius border border-border bg-card shadow-sm", h),
|
|
702
|
+
children: [/* @__PURE__ */ J("div", {
|
|
719
703
|
className: "relative flex h-16 items-center justify-between overflow-hidden bg-inverse-background bg-gradient-to-br from-inverse-background via-inverse-surface to-inverse-background px-surface",
|
|
720
704
|
children: [
|
|
721
|
-
/* @__PURE__ */
|
|
705
|
+
/* @__PURE__ */ q("div", {
|
|
722
706
|
"aria-hidden": !0,
|
|
723
|
-
className: r("absolute inset-x-0 top-0 h-1 bg-gradient-to-r",
|
|
707
|
+
className: r("absolute inset-x-0 top-0 h-1 bg-gradient-to-r", Je[m])
|
|
724
708
|
}),
|
|
725
|
-
/* @__PURE__ */
|
|
709
|
+
/* @__PURE__ */ q("div", {
|
|
726
710
|
className: "absolute inset-0 opacity-80",
|
|
727
711
|
style: { backgroundImage: "repeating-linear-gradient(45deg, transparent 0 10px, color-mix(in oklch, var(--inverse-foreground) 3%, transparent) 10px 20px)" },
|
|
728
712
|
"aria-hidden": "true"
|
|
729
713
|
}),
|
|
730
|
-
/* @__PURE__ */
|
|
731
|
-
icon: J,
|
|
732
|
-
size: "md",
|
|
733
|
-
shape: "square",
|
|
734
|
-
className: r("relative rounded-inner bg-inverse-surface text-inverse-foreground ring-1 ring-inverse-border")
|
|
735
|
-
}),
|
|
736
|
-
/* @__PURE__ */ G(o, {
|
|
714
|
+
/* @__PURE__ */ q(a, {
|
|
737
715
|
tone: "inverse",
|
|
738
716
|
className: "relative",
|
|
739
|
-
children:
|
|
717
|
+
children: v.giftCard
|
|
740
718
|
})
|
|
741
719
|
]
|
|
742
|
-
}), /* @__PURE__ */
|
|
720
|
+
}), /* @__PURE__ */ q("div", {
|
|
743
721
|
className: "p-surface",
|
|
744
|
-
children: /* @__PURE__ */
|
|
722
|
+
children: /* @__PURE__ */ J(d, {
|
|
745
723
|
gap: "lg",
|
|
746
724
|
children: [
|
|
747
|
-
/* @__PURE__ */
|
|
725
|
+
/* @__PURE__ */ J("div", {
|
|
748
726
|
className: "flex items-start justify-between",
|
|
749
|
-
children: [/* @__PURE__ */
|
|
727
|
+
children: [/* @__PURE__ */ J(d, {
|
|
750
728
|
gap: "dense",
|
|
751
|
-
children: [/* @__PURE__ */
|
|
729
|
+
children: [/* @__PURE__ */ J("div", {
|
|
752
730
|
className: "flex items-baseline gap-space-md",
|
|
753
|
-
children: [/* @__PURE__ */
|
|
731
|
+
children: [/* @__PURE__ */ q(o, {
|
|
754
732
|
tag: "h2",
|
|
755
733
|
size: "2xl",
|
|
756
734
|
className: "border-none pb-0 tabular-nums",
|
|
757
|
-
children:
|
|
758
|
-
}), !!S && /* @__PURE__ */
|
|
735
|
+
children: C
|
|
736
|
+
}), !!S && /* @__PURE__ */ q(g, {
|
|
759
737
|
className: "line-through tabular-nums text-muted-foreground",
|
|
760
738
|
children: t
|
|
761
739
|
})]
|
|
762
|
-
}), /* @__PURE__ */
|
|
740
|
+
}), /* @__PURE__ */ q(s, {
|
|
763
741
|
size: "xs",
|
|
764
742
|
type: "secondary",
|
|
765
|
-
children:
|
|
743
|
+
children: v.balance
|
|
766
744
|
})]
|
|
767
|
-
}), /* @__PURE__ */
|
|
745
|
+
}), /* @__PURE__ */ q(O, {
|
|
768
746
|
tone: x,
|
|
769
747
|
children: b
|
|
770
748
|
})]
|
|
771
749
|
}),
|
|
772
|
-
/* @__PURE__ */
|
|
750
|
+
/* @__PURE__ */ q("div", {
|
|
773
751
|
className: "giftcard-illustrated--code rounded-inner border border-border/50 bg-muted/40 p-surface-xs",
|
|
774
|
-
children: /* @__PURE__ */
|
|
752
|
+
children: /* @__PURE__ */ J(d, {
|
|
775
753
|
direction: "horizontal",
|
|
776
754
|
align: "center",
|
|
777
755
|
gap: "md",
|
|
778
|
-
children: [/* @__PURE__ */
|
|
756
|
+
children: [/* @__PURE__ */ q(y, {
|
|
779
757
|
className: "flex-1 tracking-[0.15em]",
|
|
780
758
|
children: e
|
|
781
|
-
}), /* @__PURE__ */
|
|
759
|
+
}), /* @__PURE__ */ q(Xe, {
|
|
782
760
|
code: e,
|
|
783
|
-
strings:
|
|
761
|
+
strings: v
|
|
784
762
|
})]
|
|
785
763
|
})
|
|
786
764
|
}),
|
|
787
|
-
/* @__PURE__ */
|
|
788
|
-
items:
|
|
765
|
+
/* @__PURE__ */ q(K, {
|
|
766
|
+
items: w,
|
|
789
767
|
columns: 2
|
|
790
768
|
}),
|
|
791
|
-
!!p && /* @__PURE__ */
|
|
769
|
+
!!p && /* @__PURE__ */ q(l, {
|
|
792
770
|
tone: "secondary",
|
|
793
771
|
buttonStyle: "outline",
|
|
794
|
-
icon: ke,
|
|
795
772
|
fullWidth: !0,
|
|
796
773
|
onClick: p,
|
|
797
|
-
children:
|
|
774
|
+
children: v.viewDetails
|
|
798
775
|
})
|
|
799
776
|
]
|
|
800
777
|
})
|
|
801
778
|
})]
|
|
802
779
|
});
|
|
803
780
|
}
|
|
804
|
-
|
|
781
|
+
$e.displayName = "GiftcardCardIllustrated";
|
|
805
782
|
//#endregion
|
|
806
783
|
//#region src/components/blocks/commerce/giftcard-card/partials/giftcard-minimal.tsx
|
|
807
|
-
function
|
|
808
|
-
let _ = n(Y,
|
|
784
|
+
function et({ code: e, amount: t, remainingAmount: a, status: c, recipientName: l, expiresAt: u, onView: f, color: p = "green", className: m, strings: h }) {
|
|
785
|
+
let _ = n(Y, h), v = _.status[c], b = Ue[c], x = !!a && a !== t, S = x ? a : t, C = qe[p], w = [...l ? [{
|
|
809
786
|
label: _.recipient,
|
|
810
787
|
value: l
|
|
811
|
-
}] : [], ...
|
|
788
|
+
}] : [], ...u ? [{
|
|
812
789
|
label: _.expires,
|
|
813
|
-
value:
|
|
790
|
+
value: u
|
|
814
791
|
}] : []];
|
|
815
|
-
return /* @__PURE__ */
|
|
792
|
+
return /* @__PURE__ */ q("div", {
|
|
816
793
|
className: r("giftcard-card--component giftcard-minimal--component w-full max-w-sm overflow-hidden rounded-radius border border-border bg-card shadow-sm", m),
|
|
817
|
-
children:
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
})
|
|
836
|
-
|
|
794
|
+
children: /* @__PURE__ */ J(d, {
|
|
795
|
+
gap: "lg",
|
|
796
|
+
className: "giftcard-minimal--body p-surface",
|
|
797
|
+
children: [
|
|
798
|
+
/* @__PURE__ */ q("div", {
|
|
799
|
+
"aria-hidden": "true",
|
|
800
|
+
className: r("h-1 w-12 rounded-radius-sm", C.line)
|
|
801
|
+
}),
|
|
802
|
+
/* @__PURE__ */ J(d, {
|
|
803
|
+
direction: "horizontal",
|
|
804
|
+
justify: "between",
|
|
805
|
+
align: "center",
|
|
806
|
+
gap: "md",
|
|
807
|
+
wrap: !1,
|
|
808
|
+
children: [/* @__PURE__ */ q(s, {
|
|
809
|
+
tag: "span",
|
|
810
|
+
type: "secondary",
|
|
811
|
+
children: _.giftCard
|
|
812
|
+
}), /* @__PURE__ */ q(O, {
|
|
813
|
+
tone: b,
|
|
814
|
+
size: "sm",
|
|
837
815
|
className: "shrink-0",
|
|
838
|
-
children:
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
})
|
|
843
|
-
})
|
|
844
|
-
]
|
|
845
|
-
}),
|
|
846
|
-
/* @__PURE__ */ G("div", {
|
|
847
|
-
className: "px-surface pb-surface-xs pt-0",
|
|
848
|
-
children: /* @__PURE__ */ K("div", {
|
|
816
|
+
children: v
|
|
817
|
+
})]
|
|
818
|
+
}),
|
|
819
|
+
/* @__PURE__ */ J("div", {
|
|
849
820
|
className: "flex items-baseline gap-space-md",
|
|
850
|
-
children: [/* @__PURE__ */
|
|
821
|
+
children: [/* @__PURE__ */ q(o, {
|
|
851
822
|
tag: "h2",
|
|
852
823
|
size: "2xl",
|
|
853
824
|
className: "border-none pb-0 tabular-nums",
|
|
854
825
|
children: S
|
|
855
|
-
}), !!x && /* @__PURE__ */
|
|
826
|
+
}), !!x && /* @__PURE__ */ q(g, {
|
|
856
827
|
className: "line-through tabular-nums text-muted-foreground",
|
|
857
828
|
children: t
|
|
858
829
|
})]
|
|
859
|
-
})
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
})
|
|
875
|
-
})
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
!!f && /* @__PURE__ */ G("div", {
|
|
884
|
-
className: "mt-1 border-t border-border/30 p-surface-xs",
|
|
885
|
-
children: /* @__PURE__ */ K(c, {
|
|
886
|
-
tone: "secondary",
|
|
887
|
-
buttonStyle: "ghost",
|
|
830
|
+
}),
|
|
831
|
+
/* @__PURE__ */ q("div", {
|
|
832
|
+
className: "giftcard-minimal--code rounded-inner border border-border/30 bg-muted/50 p-surface-xs",
|
|
833
|
+
children: /* @__PURE__ */ J(d, {
|
|
834
|
+
direction: "horizontal",
|
|
835
|
+
align: "center",
|
|
836
|
+
gap: "sm",
|
|
837
|
+
children: [/* @__PURE__ */ q(y, {
|
|
838
|
+
className: "flex-1 tracking-[0.15em]",
|
|
839
|
+
children: e
|
|
840
|
+
}), /* @__PURE__ */ q(Xe, {
|
|
841
|
+
code: e,
|
|
842
|
+
strings: _,
|
|
843
|
+
className: "shrink-0"
|
|
844
|
+
})]
|
|
845
|
+
})
|
|
846
|
+
}),
|
|
847
|
+
/* @__PURE__ */ q(K, {
|
|
848
|
+
items: w,
|
|
849
|
+
columns: 1,
|
|
850
|
+
density: "compact",
|
|
851
|
+
className: "[&_.metadata-list--grid]:gap-space-sm"
|
|
852
|
+
}),
|
|
853
|
+
!!f && /* @__PURE__ */ J(i, {
|
|
888
854
|
onClick: f,
|
|
889
|
-
className: "group/link",
|
|
890
|
-
children: [_.viewDetails, /* @__PURE__ */
|
|
855
|
+
className: "group/link self-start",
|
|
856
|
+
children: [_.viewDetails, /* @__PURE__ */ q(he, {
|
|
857
|
+
"aria-hidden": "true",
|
|
858
|
+
className: "ml-1 size-icon-sm transition-transform group-hover/link:translate-x-0.5"
|
|
859
|
+
})]
|
|
891
860
|
})
|
|
892
|
-
|
|
893
|
-
|
|
861
|
+
]
|
|
862
|
+
})
|
|
894
863
|
});
|
|
895
864
|
}
|
|
896
|
-
|
|
865
|
+
et.displayName = "GiftcardCardMinimal";
|
|
897
866
|
//#endregion
|
|
898
867
|
//#region src/components/blocks/commerce/giftcard-card/giftcard-card.tsx
|
|
899
|
-
function
|
|
868
|
+
function tt(e) {
|
|
900
869
|
let t = r("giftcard-card--component", e.className);
|
|
901
870
|
switch (e.variant) {
|
|
902
|
-
case "compact": return /* @__PURE__ */
|
|
871
|
+
case "compact": return /* @__PURE__ */ q(Ye, {
|
|
903
872
|
...e,
|
|
904
873
|
className: t
|
|
905
874
|
});
|
|
906
|
-
case "minimal": return /* @__PURE__ */
|
|
875
|
+
case "minimal": return /* @__PURE__ */ q(et, {
|
|
907
876
|
...e,
|
|
908
877
|
className: t
|
|
909
878
|
});
|
|
910
|
-
case "dark": return /* @__PURE__ */
|
|
879
|
+
case "dark": return /* @__PURE__ */ q(Ze, {
|
|
911
880
|
...e,
|
|
912
881
|
className: t
|
|
913
882
|
});
|
|
914
|
-
case "illustrated": return /* @__PURE__ */
|
|
883
|
+
case "illustrated": return /* @__PURE__ */ q($e, {
|
|
915
884
|
...e,
|
|
916
885
|
className: t
|
|
917
886
|
});
|
|
918
|
-
default: return /* @__PURE__ */
|
|
887
|
+
default: return /* @__PURE__ */ q(Qe, {
|
|
919
888
|
...e,
|
|
920
889
|
className: t
|
|
921
890
|
});
|
|
922
891
|
}
|
|
923
892
|
}
|
|
924
|
-
|
|
893
|
+
tt.displayName = "GiftcardCard";
|
|
925
894
|
//#endregion
|
|
926
895
|
//#region src/components/blocks/commerce/vendor-profile/types.ts
|
|
927
|
-
var
|
|
896
|
+
var nt = {
|
|
928
897
|
tabOverview: "Overview",
|
|
929
898
|
tabStats: "Stats",
|
|
930
899
|
totalEarnings: "Total earnings",
|
|
931
900
|
message: "Message",
|
|
932
901
|
hire: "Hire vendor",
|
|
933
902
|
verifiedAriaLabel: "Verified"
|
|
934
|
-
},
|
|
903
|
+
}, rt = {
|
|
935
904
|
secondary: "secondary",
|
|
936
905
|
success: "success",
|
|
937
906
|
warning: "warning",
|
|
938
907
|
destructive: "destructive"
|
|
939
908
|
};
|
|
940
|
-
function
|
|
941
|
-
return
|
|
942
|
-
tone:
|
|
909
|
+
function it({ children: e, tone: t }) {
|
|
910
|
+
return f(e) ? /* @__PURE__ */ q(O, {
|
|
911
|
+
tone: rt[t ?? "secondary"],
|
|
943
912
|
className: "vendor-profile--change shrink-0 tabular-nums",
|
|
944
913
|
children: e
|
|
945
914
|
}) : null;
|
|
946
915
|
}
|
|
947
|
-
var
|
|
948
|
-
let
|
|
949
|
-
(e === "overview" || e === "stats") &&
|
|
950
|
-
},
|
|
951
|
-
gap: "
|
|
916
|
+
var at = le(function({ name: e, initials: t, avatarUrl: i, role: o, verified: s = !1, earnings: c, earningsChange: m, earningsChangeTone: h, metrics: _ = [], stats: v = [], view: y, defaultView: x = "overview", onViewChange: S, onMessage: C, onHire: w, surface: k, className: A, strings: j }, M) {
|
|
917
|
+
let N = n(nt, j), [P, F] = pe(x), I = y !== void 0, ee = f(c), L = ee || _.length > 0, te = v.length > 0, B = [...L ? ["overview"] : [], ...te ? ["stats"] : []], V = I ? y : P, K = B.includes(V) ? V : B[0] ?? "overview", oe = B.length > 0, se = !!(C || w), ce = (e) => {
|
|
918
|
+
(e === "overview" || e === "stats") && B.includes(e) && (I || F(e), S?.(e));
|
|
919
|
+
}, le = /* @__PURE__ */ J(d, {
|
|
920
|
+
gap: "xl",
|
|
952
921
|
className: "vendor-profile--overview",
|
|
953
|
-
children: [
|
|
954
|
-
|
|
955
|
-
|
|
922
|
+
children: [ee && /* @__PURE__ */ J(d, {
|
|
923
|
+
gap: "normal",
|
|
924
|
+
className: "vendor-profile--earnings",
|
|
925
|
+
children: [/* @__PURE__ */ q(a, { children: N.totalEarnings }), /* @__PURE__ */ J(d, {
|
|
956
926
|
direction: "horizontal",
|
|
957
|
-
gap: "
|
|
927
|
+
gap: "sm",
|
|
958
928
|
align: "baseline",
|
|
959
|
-
|
|
960
|
-
className: "mt-space-sm",
|
|
961
|
-
children: [/* @__PURE__ */ G(h, {
|
|
929
|
+
children: [/* @__PURE__ */ q(g, {
|
|
962
930
|
size: "base",
|
|
963
931
|
weight: "semibold",
|
|
964
932
|
className: "tabular-nums tracking-tight",
|
|
965
|
-
children:
|
|
966
|
-
}), /* @__PURE__ */
|
|
967
|
-
tone:
|
|
933
|
+
children: c
|
|
934
|
+
}), /* @__PURE__ */ q(it, {
|
|
935
|
+
tone: h,
|
|
968
936
|
children: m
|
|
969
937
|
})]
|
|
970
938
|
})]
|
|
971
|
-
}), _.length > 0 && /* @__PURE__ */
|
|
939
|
+
}), _.length > 0 && /* @__PURE__ */ q("div", {
|
|
972
940
|
className: "vendor-profile--metrics divide-y divide-border/60",
|
|
973
|
-
children: _.map((e, t) => /* @__PURE__ */ G
|
|
941
|
+
children: _.map((e, t) => /* @__PURE__ */ q(G, {
|
|
974
942
|
className: "py-row-y first:pt-0 last:pb-0",
|
|
975
943
|
label: e.label,
|
|
976
944
|
value: e.value,
|
|
977
945
|
valueClassName: "font-medium"
|
|
978
946
|
}, e.id ?? t))
|
|
979
947
|
})]
|
|
980
|
-
}),
|
|
948
|
+
}), ue = /* @__PURE__ */ q(u, {
|
|
981
949
|
columns: {
|
|
982
950
|
base: 1,
|
|
983
951
|
sm: 2
|
|
984
952
|
},
|
|
985
|
-
gap: "
|
|
953
|
+
gap: "xl",
|
|
986
954
|
className: "vendor-profile--stats",
|
|
987
|
-
children: v.map((e, t) => /* @__PURE__ */
|
|
988
|
-
|
|
989
|
-
|
|
955
|
+
children: v.map((e, t) => /* @__PURE__ */ J(d, {
|
|
956
|
+
gap: "normal",
|
|
957
|
+
className: "vendor-profile--stat",
|
|
958
|
+
children: [/* @__PURE__ */ q(a, {
|
|
959
|
+
className: "truncate",
|
|
960
|
+
children: e.label
|
|
961
|
+
}), /* @__PURE__ */ J(d, {
|
|
962
|
+
direction: "horizontal",
|
|
990
963
|
gap: "sm",
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
children: [/* @__PURE__ */ G(h, {
|
|
1000
|
-
weight: "semibold",
|
|
1001
|
-
className: "min-w-0 tabular-nums",
|
|
1002
|
-
children: e.value
|
|
1003
|
-
}), /* @__PURE__ */ G(Ct, {
|
|
1004
|
-
tone: e.changeTone,
|
|
1005
|
-
children: e.change
|
|
1006
|
-
})]
|
|
964
|
+
align: "baseline",
|
|
965
|
+
children: [/* @__PURE__ */ q(g, {
|
|
966
|
+
weight: "semibold",
|
|
967
|
+
className: "min-w-0 tabular-nums",
|
|
968
|
+
children: e.value
|
|
969
|
+
}), /* @__PURE__ */ q(it, {
|
|
970
|
+
tone: e.changeTone,
|
|
971
|
+
children: e.change
|
|
1007
972
|
})]
|
|
1008
|
-
})
|
|
973
|
+
})]
|
|
1009
974
|
}, e.id ?? t))
|
|
1010
|
-
}),
|
|
1011
|
-
value:
|
|
1012
|
-
onValueChange:
|
|
975
|
+
}), de = B.length > 1 ? /* @__PURE__ */ J(ae, {
|
|
976
|
+
value: K,
|
|
977
|
+
onValueChange: ce,
|
|
1013
978
|
className: "vendor-profile--tabs gap-space-lg",
|
|
1014
979
|
children: [
|
|
1015
|
-
/* @__PURE__ */
|
|
980
|
+
/* @__PURE__ */ J(ie, {
|
|
1016
981
|
className: "grid h-auto w-full grid-cols-2 rounded-inner p-space-xs",
|
|
1017
|
-
children: [/* @__PURE__ */
|
|
982
|
+
children: [/* @__PURE__ */ q(ne, {
|
|
1018
983
|
value: "overview",
|
|
1019
984
|
className: "h-action-sm rounded-inner px-control-sm text-pxs",
|
|
1020
|
-
children:
|
|
1021
|
-
}), /* @__PURE__ */
|
|
985
|
+
children: N.tabOverview
|
|
986
|
+
}), /* @__PURE__ */ q(ne, {
|
|
1022
987
|
value: "stats",
|
|
1023
988
|
className: "h-action-sm rounded-inner px-control-sm text-pxs",
|
|
1024
|
-
children:
|
|
989
|
+
children: N.tabStats
|
|
1025
990
|
})]
|
|
1026
991
|
}),
|
|
1027
|
-
/* @__PURE__ */
|
|
992
|
+
/* @__PURE__ */ q(re, {
|
|
1028
993
|
value: "overview",
|
|
1029
994
|
className: "mt-0",
|
|
1030
|
-
children:
|
|
995
|
+
children: le
|
|
1031
996
|
}),
|
|
1032
|
-
/* @__PURE__ */
|
|
997
|
+
/* @__PURE__ */ q(re, {
|
|
1033
998
|
value: "stats",
|
|
1034
999
|
className: "mt-0",
|
|
1035
|
-
children:
|
|
1000
|
+
children: ue
|
|
1036
1001
|
})
|
|
1037
1002
|
]
|
|
1038
|
-
}) :
|
|
1039
|
-
return /* @__PURE__ */
|
|
1040
|
-
ref:
|
|
1003
|
+
}) : K === "stats" ? ue : le;
|
|
1004
|
+
return /* @__PURE__ */ q(p, {
|
|
1005
|
+
ref: M,
|
|
1041
1006
|
surface: k,
|
|
1042
|
-
|
|
1007
|
+
padding: k === "flat" ? "none" : "md",
|
|
1008
|
+
gap: "xl",
|
|
1009
|
+
headerStart: /* @__PURE__ */ J(U, {
|
|
1043
1010
|
className: "vendor-profile--identity flex-nowrap py-0",
|
|
1044
|
-
children: [
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1011
|
+
children: [/* @__PURE__ */ q(R, {
|
|
1012
|
+
variant: "avatar",
|
|
1013
|
+
children: /* @__PURE__ */ J(E, { children: [!!i && /* @__PURE__ */ q(D, {
|
|
1014
|
+
src: i,
|
|
1015
|
+
alt: e
|
|
1016
|
+
}), /* @__PURE__ */ q(T, {
|
|
1017
|
+
className: "bg-primary/12 text-primary-accent",
|
|
1018
|
+
children: t ?? /* @__PURE__ */ q(b, {
|
|
1019
|
+
value: e,
|
|
1020
|
+
strategy: "first-words"
|
|
1021
|
+
})
|
|
1022
|
+
})] })
|
|
1023
|
+
}), /* @__PURE__ */ J(H, { children: [/* @__PURE__ */ J(d, {
|
|
1024
|
+
direction: "horizontal",
|
|
1025
|
+
gap: "sm",
|
|
1026
|
+
wrap: !1,
|
|
1027
|
+
className: "min-w-0",
|
|
1028
|
+
children: [/* @__PURE__ */ q(W, {
|
|
1029
|
+
className: "min-w-0 truncate",
|
|
1030
|
+
children: e
|
|
1031
|
+
}), !!s && /* @__PURE__ */ q(O, {
|
|
1063
1032
|
tone: "success",
|
|
1064
|
-
"
|
|
1065
|
-
children:
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
]
|
|
1033
|
+
className: "shrink-0",
|
|
1034
|
+
children: N.verifiedAriaLabel
|
|
1035
|
+
})]
|
|
1036
|
+
}), !!o && /* @__PURE__ */ q(z, {
|
|
1037
|
+
clamp: 2,
|
|
1038
|
+
children: o
|
|
1039
|
+
})] })]
|
|
1071
1040
|
}),
|
|
1072
|
-
|
|
1073
|
-
footerDivider: de,
|
|
1074
|
-
footerSlot: de ? /* @__PURE__ */ K("div", {
|
|
1041
|
+
footerSlot: se ? /* @__PURE__ */ J("div", {
|
|
1075
1042
|
className: "vendor-profile--actions flex flex-wrap gap-space-sm",
|
|
1076
|
-
children: [!!C && /* @__PURE__ */
|
|
1043
|
+
children: [!!C && /* @__PURE__ */ q(l, {
|
|
1077
1044
|
type: "button",
|
|
1078
1045
|
tone: "secondary",
|
|
1079
1046
|
buttonStyle: "outline",
|
|
1080
1047
|
className: "min-w-0 flex-1",
|
|
1081
1048
|
onClick: C,
|
|
1082
|
-
children:
|
|
1083
|
-
|
|
1084
|
-
"aria-hidden": "true"
|
|
1085
|
-
}), j.message]
|
|
1086
|
-
}), !!O && /* @__PURE__ */ K(c, {
|
|
1049
|
+
children: N.message
|
|
1050
|
+
}), !!w && /* @__PURE__ */ J(l, {
|
|
1087
1051
|
type: "button",
|
|
1088
1052
|
tone: "primary",
|
|
1089
1053
|
className: "min-w-0 flex-1",
|
|
1090
|
-
onClick:
|
|
1091
|
-
children: [
|
|
1054
|
+
onClick: w,
|
|
1055
|
+
children: [N.hire, /* @__PURE__ */ q(ye, {
|
|
1092
1056
|
className: "size-icon-sm",
|
|
1093
1057
|
"aria-hidden": "true"
|
|
1094
1058
|
})]
|
|
1095
1059
|
})]
|
|
1096
1060
|
}) : void 0,
|
|
1097
|
-
contentClassName: r(!
|
|
1061
|
+
contentClassName: r(!oe && "hidden"),
|
|
1098
1062
|
className: r("vendor-profile--component", A),
|
|
1099
|
-
children:
|
|
1063
|
+
children: oe ? de : null
|
|
1100
1064
|
});
|
|
1101
1065
|
});
|
|
1102
|
-
|
|
1066
|
+
at.displayName = "VendorProfileCard";
|
|
1103
1067
|
//#endregion
|
|
1104
1068
|
//#region src/components/blocks/commerce/inventory-level/inventory-level.strings.ts
|
|
1105
|
-
var
|
|
1106
|
-
statusInStock: "In
|
|
1107
|
-
statusLowStock: "Low
|
|
1069
|
+
var ot = {
|
|
1070
|
+
statusInStock: "In stock",
|
|
1071
|
+
statusLowStock: "Low stock",
|
|
1108
1072
|
statusCritical: "Critical",
|
|
1109
1073
|
variantLabel: "Variant",
|
|
1110
1074
|
unitsAvailable: "units available",
|
|
@@ -1113,66 +1077,82 @@ var Tt = {
|
|
|
1113
1077
|
};
|
|
1114
1078
|
//#endregion
|
|
1115
1079
|
//#region src/components/blocks/commerce/inventory-level/inventory-level.tsx
|
|
1116
|
-
function
|
|
1117
|
-
let f = n(
|
|
1118
|
-
return /* @__PURE__ */
|
|
1080
|
+
function st({ productName: e, variant: t, stock: i, reorderLevel: a, maxStock: o, lastRestocked: c, className: l, strings: u }) {
|
|
1081
|
+
let f = n(ot, u), p = Math.round(i / o * 100), m = i <= a, h = i <= a * .5, g = h ? "destructive" : m ? "warning" : "success", _ = h ? f.statusCritical : m ? f.statusLowStock : f.statusInStock;
|
|
1082
|
+
return /* @__PURE__ */ J(d, {
|
|
1119
1083
|
"data-component": "inventory-level",
|
|
1120
1084
|
"data-slot": "inventory-level",
|
|
1121
|
-
gap: "
|
|
1085
|
+
gap: "xl",
|
|
1122
1086
|
className: r("inventory-level--component", l),
|
|
1123
1087
|
children: [
|
|
1124
|
-
/* @__PURE__ */
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1088
|
+
/* @__PURE__ */ J(d, {
|
|
1089
|
+
gap: "dense",
|
|
1090
|
+
className: "inventory-level--product",
|
|
1091
|
+
children: [/* @__PURE__ */ J(d, {
|
|
1092
|
+
direction: "horizontal",
|
|
1093
|
+
gap: "sm",
|
|
1094
|
+
wrap: !1,
|
|
1095
|
+
className: "min-w-0",
|
|
1096
|
+
children: [/* @__PURE__ */ q(s, {
|
|
1097
|
+
weight: "semibold",
|
|
1098
|
+
className: "min-w-0 truncate",
|
|
1099
|
+
children: e
|
|
1100
|
+
}), /* @__PURE__ */ q(O, {
|
|
1101
|
+
tone: g,
|
|
1102
|
+
className: "shrink-0",
|
|
1103
|
+
children: _
|
|
1104
|
+
})]
|
|
1105
|
+
}), !!t && /* @__PURE__ */ q(s, {
|
|
1106
|
+
size: "xs",
|
|
1107
|
+
type: "secondary",
|
|
1108
|
+
className: "truncate",
|
|
1109
|
+
children: `${f.variantLabel}: ${t}`
|
|
1110
|
+
})]
|
|
1139
1111
|
}),
|
|
1140
|
-
/* @__PURE__ */
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
children:
|
|
1112
|
+
/* @__PURE__ */ J(d, {
|
|
1113
|
+
gap: "dense",
|
|
1114
|
+
className: "inventory-level--stock",
|
|
1115
|
+
children: [/* @__PURE__ */ q(C, {
|
|
1116
|
+
value: i,
|
|
1117
|
+
weight: "semibold",
|
|
1118
|
+
align: "left",
|
|
1119
|
+
className: "tracking-tight"
|
|
1120
|
+
}), /* @__PURE__ */ q(s, {
|
|
1121
|
+
size: "xs",
|
|
1122
|
+
type: "secondary",
|
|
1123
|
+
children: f.unitsAvailable
|
|
1124
|
+
})]
|
|
1144
1125
|
}),
|
|
1145
|
-
/* @__PURE__ */
|
|
1126
|
+
/* @__PURE__ */ J(d, {
|
|
1146
1127
|
gap: "md",
|
|
1147
|
-
className: "
|
|
1148
|
-
children: [/* @__PURE__ */
|
|
1128
|
+
className: "inventory-level--gauge",
|
|
1129
|
+
children: [/* @__PURE__ */ q("div", {
|
|
1149
1130
|
className: "h-1.5 overflow-hidden rounded-full bg-muted",
|
|
1150
|
-
children: /* @__PURE__ */
|
|
1131
|
+
children: /* @__PURE__ */ q("div", {
|
|
1151
1132
|
className: r("h-full rounded-full transition-all", h ? "bg-destructive" : m ? "bg-warning" : "bg-success"),
|
|
1152
1133
|
style: { width: `${p}%` }
|
|
1153
1134
|
})
|
|
1154
|
-
}), /* @__PURE__ */
|
|
1135
|
+
}), /* @__PURE__ */ J("div", {
|
|
1155
1136
|
className: "flex items-center justify-between",
|
|
1156
|
-
children: [/* @__PURE__ */
|
|
1137
|
+
children: [/* @__PURE__ */ J(s, {
|
|
1157
1138
|
size: "xs",
|
|
1158
1139
|
type: "secondary",
|
|
1159
1140
|
children: [
|
|
1160
1141
|
f.reorderAtLabel,
|
|
1161
1142
|
": ",
|
|
1162
|
-
/* @__PURE__ */
|
|
1163
|
-
value:
|
|
1164
|
-
size: "xs",
|
|
1143
|
+
/* @__PURE__ */ q(C, {
|
|
1144
|
+
value: a,
|
|
1165
1145
|
weight: "medium",
|
|
1166
1146
|
align: "left"
|
|
1167
1147
|
})
|
|
1168
1148
|
]
|
|
1169
|
-
}), !!c && /* @__PURE__ */
|
|
1149
|
+
}), !!c && /* @__PURE__ */ J(s, {
|
|
1170
1150
|
size: "xs",
|
|
1171
1151
|
type: "secondary",
|
|
1172
1152
|
children: [
|
|
1173
1153
|
f.lastRestockedLabel,
|
|
1174
1154
|
": ",
|
|
1175
|
-
/* @__PURE__ */
|
|
1155
|
+
/* @__PURE__ */ q(v, {
|
|
1176
1156
|
size: "xs",
|
|
1177
1157
|
children: c
|
|
1178
1158
|
})
|
|
@@ -1183,87 +1163,82 @@ function Et({ productName: e, variant: t, stock: a, reorderLevel: o, maxStock: s
|
|
|
1183
1163
|
]
|
|
1184
1164
|
});
|
|
1185
1165
|
}
|
|
1186
|
-
|
|
1166
|
+
st.displayName = "InventoryLevel";
|
|
1187
1167
|
//#endregion
|
|
1188
1168
|
//#region src/components/blocks/commerce/tax-breakdown/types.ts
|
|
1189
|
-
var
|
|
1190
|
-
title: "Tax
|
|
1169
|
+
var ct = {
|
|
1170
|
+
title: "Tax breakdown",
|
|
1191
1171
|
subtotal: "Subtotal",
|
|
1192
|
-
totalTax: "Total
|
|
1172
|
+
totalTax: "Total tax",
|
|
1193
1173
|
total: "Total"
|
|
1194
1174
|
};
|
|
1195
1175
|
//#endregion
|
|
1196
1176
|
//#region src/components/blocks/commerce/tax-breakdown/tax-breakdown.tsx
|
|
1197
|
-
function
|
|
1198
|
-
let l = n(
|
|
1199
|
-
return /* @__PURE__ */
|
|
1200
|
-
icon: /* @__PURE__ */ G(Le, { className: "size-icon" }),
|
|
1177
|
+
function lt({ subtotal: e, taxes: t, totalTax: i, total: a, className: o, strings: c }) {
|
|
1178
|
+
let l = n(ct, c);
|
|
1179
|
+
return /* @__PURE__ */ J(I, {
|
|
1201
1180
|
title: l.title,
|
|
1202
|
-
|
|
1181
|
+
contentGap: "lg",
|
|
1182
|
+
className: r("tax-breakdown--component w-full", o),
|
|
1203
1183
|
children: [
|
|
1204
|
-
/* @__PURE__ */ G
|
|
1184
|
+
/* @__PURE__ */ q(G, {
|
|
1205
1185
|
label: l.subtotal,
|
|
1206
1186
|
value: e,
|
|
1207
|
-
|
|
1208
|
-
valueClassName: "text-sm font-medium"
|
|
1187
|
+
valueClassName: "text-sm font-medium tabular-nums"
|
|
1209
1188
|
}),
|
|
1210
|
-
/* @__PURE__ */
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1189
|
+
/* @__PURE__ */ q(d, {
|
|
1190
|
+
gap: "sm",
|
|
1191
|
+
className: "tax-breakdown--lines",
|
|
1192
|
+
children: t.map((e, t) => /* @__PURE__ */ J(d, {
|
|
1193
|
+
direction: "horizontal",
|
|
1194
|
+
align: "baseline",
|
|
1195
|
+
justify: "between",
|
|
1196
|
+
gap: "lg",
|
|
1197
|
+
children: [/* @__PURE__ */ J(d, {
|
|
1215
1198
|
direction: "horizontal",
|
|
1216
1199
|
align: "baseline",
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
children: [/* @__PURE__ */
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
tag: "span",
|
|
1229
|
-
size: "xs",
|
|
1230
|
-
type: "discrete",
|
|
1231
|
-
className: "shrink-0",
|
|
1232
|
-
children: e.rate
|
|
1233
|
-
})]
|
|
1234
|
-
}), /* @__PURE__ */ G(h, {
|
|
1235
|
-
weight: "medium",
|
|
1236
|
-
className: "shrink-0 tabular-nums",
|
|
1237
|
-
children: e.amount
|
|
1200
|
+
gap: "sm",
|
|
1201
|
+
className: "min-w-0",
|
|
1202
|
+
children: [/* @__PURE__ */ q(s, {
|
|
1203
|
+
className: "truncate",
|
|
1204
|
+
children: e.label
|
|
1205
|
+
}), !!e.rate && /* @__PURE__ */ q(s, {
|
|
1206
|
+
tag: "span",
|
|
1207
|
+
size: "xs",
|
|
1208
|
+
type: "discrete",
|
|
1209
|
+
className: "shrink-0",
|
|
1210
|
+
children: e.rate
|
|
1238
1211
|
})]
|
|
1239
|
-
}
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
className: "border-t border-border/50 pt-space-sm mt-space-2xs",
|
|
1244
|
-
valueClassName: "text-sm font-semibold"
|
|
1212
|
+
}), /* @__PURE__ */ q(g, {
|
|
1213
|
+
weight: "medium",
|
|
1214
|
+
className: "shrink-0 tabular-nums",
|
|
1215
|
+
children: e.amount
|
|
1245
1216
|
})]
|
|
1246
|
-
})
|
|
1217
|
+
}, e.id ?? `${e.label}-${t}`))
|
|
1247
1218
|
}),
|
|
1248
|
-
/* @__PURE__ */ G
|
|
1249
|
-
|
|
1250
|
-
|
|
1219
|
+
!!i && t.length > 1 && /* @__PURE__ */ q(G, {
|
|
1220
|
+
label: l.totalTax,
|
|
1221
|
+
value: i,
|
|
1222
|
+
valueClassName: "text-sm font-semibold tabular-nums"
|
|
1223
|
+
}),
|
|
1224
|
+
/* @__PURE__ */ q(k, {}),
|
|
1225
|
+
/* @__PURE__ */ q(G, {
|
|
1226
|
+
label: /* @__PURE__ */ q(s, {
|
|
1251
1227
|
tag: "span",
|
|
1252
1228
|
weight: "semibold",
|
|
1253
1229
|
lineHeight: "tight",
|
|
1254
1230
|
children: l.total
|
|
1255
1231
|
}),
|
|
1256
|
-
value:
|
|
1257
|
-
|
|
1258
|
-
valueClassName: "text-base font-bold"
|
|
1232
|
+
value: a,
|
|
1233
|
+
valueClassName: "text-base font-bold tabular-nums"
|
|
1259
1234
|
})
|
|
1260
1235
|
]
|
|
1261
1236
|
});
|
|
1262
1237
|
}
|
|
1263
|
-
|
|
1238
|
+
lt.displayName = "TaxBreakdownCard";
|
|
1264
1239
|
//#endregion
|
|
1265
1240
|
//#region src/components/blocks/commerce/subscription-summary/types.ts
|
|
1266
|
-
var
|
|
1241
|
+
var ut = {
|
|
1267
1242
|
title: "Subscription",
|
|
1268
1243
|
plan: "Plan",
|
|
1269
1244
|
nextBilling: "Next billing",
|
|
@@ -1273,104 +1248,94 @@ var kt = {
|
|
|
1273
1248
|
};
|
|
1274
1249
|
//#endregion
|
|
1275
1250
|
//#region src/components/blocks/commerce/subscription-summary/subscription-summary.tsx
|
|
1276
|
-
function
|
|
1277
|
-
let v = n(
|
|
1278
|
-
return /* @__PURE__ */
|
|
1279
|
-
icon: /* @__PURE__ */ G(ze, { className: "size-icon" }),
|
|
1251
|
+
function dt({ planName: e, priceLabel: t, cycleLabel: i, nextBillingDate: c, statusLabel: u, perks: f = [], onManage: p, onUpgrade: m, className: h, strings: _ }) {
|
|
1252
|
+
let v = n(ut, _);
|
|
1253
|
+
return /* @__PURE__ */ J(I, {
|
|
1280
1254
|
title: v.title,
|
|
1281
|
-
|
|
1255
|
+
titleSuffix: u ? /* @__PURE__ */ q(O, {
|
|
1282
1256
|
tone: "success",
|
|
1283
|
-
children:
|
|
1257
|
+
children: u
|
|
1284
1258
|
}) : null,
|
|
1285
|
-
|
|
1259
|
+
contentGap: "2xl",
|
|
1260
|
+
className: r("subscription-summary--component w-full", h),
|
|
1286
1261
|
children: [
|
|
1287
|
-
/* @__PURE__ */
|
|
1288
|
-
|
|
1289
|
-
|
|
1262
|
+
/* @__PURE__ */ J(d, {
|
|
1263
|
+
gap: "lg",
|
|
1264
|
+
className: "subscription-summary--plan",
|
|
1265
|
+
children: [/* @__PURE__ */ J(d, {
|
|
1290
1266
|
direction: "horizontal",
|
|
1291
1267
|
justify: "between",
|
|
1292
|
-
align: "
|
|
1268
|
+
align: "end",
|
|
1293
1269
|
gap: "lg",
|
|
1294
|
-
children: [/* @__PURE__ */
|
|
1270
|
+
children: [/* @__PURE__ */ J(d, {
|
|
1295
1271
|
gap: "dense",
|
|
1296
1272
|
className: "min-w-0",
|
|
1297
|
-
children: [/* @__PURE__ */
|
|
1273
|
+
children: [/* @__PURE__ */ q(a, { children: v.plan }), /* @__PURE__ */ q(o, {
|
|
1298
1274
|
tag: "h3",
|
|
1299
1275
|
className: "text-base font-semibold tracking-tight border-none pb-0",
|
|
1300
1276
|
children: e
|
|
1301
1277
|
})]
|
|
1302
|
-
}), /* @__PURE__ */
|
|
1278
|
+
}), /* @__PURE__ */ J(d, {
|
|
1303
1279
|
direction: "horizontal",
|
|
1304
1280
|
align: "baseline",
|
|
1305
1281
|
gap: "xs",
|
|
1306
1282
|
className: "shrink-0",
|
|
1307
|
-
children: [/* @__PURE__ */
|
|
1283
|
+
children: [/* @__PURE__ */ q(g, {
|
|
1308
1284
|
weight: "bold",
|
|
1309
1285
|
className: "tabular-nums",
|
|
1310
1286
|
children: t
|
|
1311
|
-
}), /* @__PURE__ */
|
|
1287
|
+
}), /* @__PURE__ */ q(s, {
|
|
1312
1288
|
type: "secondary",
|
|
1313
|
-
children:
|
|
1289
|
+
children: i
|
|
1314
1290
|
})]
|
|
1315
1291
|
})]
|
|
1316
|
-
})
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
children: [/* @__PURE__ */ K("div", {
|
|
1321
|
-
className: "flex items-center gap-space-md",
|
|
1322
|
-
children: [/* @__PURE__ */ G(ye, { className: "size-icon-md text-muted-foreground" }), /* @__PURE__ */ G(i, {
|
|
1323
|
-
size: "xs",
|
|
1324
|
-
type: "secondary",
|
|
1325
|
-
children: v.nextBilling
|
|
1326
|
-
})]
|
|
1327
|
-
}), /* @__PURE__ */ G(h, {
|
|
1328
|
-
weight: "semibold",
|
|
1329
|
-
className: "tabular-nums",
|
|
1330
|
-
children: l
|
|
1292
|
+
}), /* @__PURE__ */ q(G, {
|
|
1293
|
+
label: v.nextBilling,
|
|
1294
|
+
value: c,
|
|
1295
|
+
valueClassName: "font-semibold tabular-nums"
|
|
1331
1296
|
})]
|
|
1332
1297
|
}),
|
|
1333
|
-
f.length > 0 && /* @__PURE__ */
|
|
1298
|
+
f.length > 0 && /* @__PURE__ */ J(d, {
|
|
1334
1299
|
gap: "md",
|
|
1335
|
-
className: "
|
|
1336
|
-
children: [/* @__PURE__ */
|
|
1337
|
-
let n = e.icon
|
|
1338
|
-
return /* @__PURE__ */
|
|
1300
|
+
className: "subscription-summary--perks",
|
|
1301
|
+
children: [/* @__PURE__ */ q(a, { children: v.perks }), /* @__PURE__ */ q(V, { children: f.map((e, t) => {
|
|
1302
|
+
let n = e.icon;
|
|
1303
|
+
return /* @__PURE__ */ J(U, {
|
|
1339
1304
|
size: "sm",
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
}) }), /* @__PURE__ */
|
|
1305
|
+
density: "compact",
|
|
1306
|
+
children: [!!n && /* @__PURE__ */ q(R, { children: /* @__PURE__ */ q(n, {
|
|
1307
|
+
"aria-hidden": "true",
|
|
1308
|
+
className: "size-icon text-muted-foreground"
|
|
1309
|
+
}) }), /* @__PURE__ */ q(H, { children: /* @__PURE__ */ q(W, {
|
|
1345
1310
|
bold: !1,
|
|
1346
1311
|
children: e.label
|
|
1347
1312
|
}) })]
|
|
1348
1313
|
}, `${e.label}-${t}`);
|
|
1349
1314
|
}) })]
|
|
1350
1315
|
}),
|
|
1351
|
-
(p || m) && /* @__PURE__ */
|
|
1352
|
-
className: "
|
|
1353
|
-
children: [!!p && /* @__PURE__ */
|
|
1316
|
+
(p || m) && /* @__PURE__ */ J("div", {
|
|
1317
|
+
className: "flex items-center gap-space-md",
|
|
1318
|
+
children: [!!p && /* @__PURE__ */ q(l, {
|
|
1354
1319
|
tone: "secondary",
|
|
1355
1320
|
buttonStyle: "outline",
|
|
1356
1321
|
onClick: p,
|
|
1357
1322
|
className: "flex-1",
|
|
1358
1323
|
children: v.manage
|
|
1359
|
-
}), !!m && /* @__PURE__ */
|
|
1324
|
+
}), !!m && /* @__PURE__ */ J(l, {
|
|
1360
1325
|
tone: "primary",
|
|
1361
1326
|
onClick: m,
|
|
1362
1327
|
className: "flex-1",
|
|
1363
|
-
children: [v.upgrade, /* @__PURE__ */
|
|
1328
|
+
children: [v.upgrade, /* @__PURE__ */ q(ye, { className: "ml-1 size-icon-md" })]
|
|
1364
1329
|
})]
|
|
1365
1330
|
})
|
|
1366
1331
|
]
|
|
1367
1332
|
});
|
|
1368
1333
|
}
|
|
1369
|
-
|
|
1334
|
+
dt.displayName = "SubscriptionSummaryCard";
|
|
1370
1335
|
//#endregion
|
|
1371
1336
|
//#region src/components/blocks/commerce/refund-status/types.ts
|
|
1372
|
-
var
|
|
1373
|
-
title: "Refund
|
|
1337
|
+
var ft = {
|
|
1338
|
+
title: "Refund status",
|
|
1374
1339
|
requested: "Requested",
|
|
1375
1340
|
approved: "Approved",
|
|
1376
1341
|
processing: "Processing",
|
|
@@ -1379,66 +1344,65 @@ var jt = {
|
|
|
1379
1344
|
reason: "Reason",
|
|
1380
1345
|
eta: "Expected by",
|
|
1381
1346
|
method: "Refund to"
|
|
1382
|
-
},
|
|
1347
|
+
}, pt = [
|
|
1383
1348
|
"requested",
|
|
1384
1349
|
"approved",
|
|
1385
1350
|
"processing",
|
|
1386
1351
|
"completed"
|
|
1387
1352
|
];
|
|
1388
|
-
function
|
|
1389
|
-
let p = n(
|
|
1390
|
-
return /* @__PURE__ */
|
|
1391
|
-
icon: /* @__PURE__ */ G(Be, { className: "size-icon" }),
|
|
1353
|
+
function mt({ stage: e, amount: t, reason: i, method: o, eta: c, requestedAt: l, className: u, strings: f }) {
|
|
1354
|
+
let p = n(ft, f), m = pt.indexOf(e);
|
|
1355
|
+
return /* @__PURE__ */ J(I, {
|
|
1392
1356
|
title: p.title,
|
|
1393
|
-
|
|
1357
|
+
contentGap: "2xl",
|
|
1358
|
+
className: r("refund-status--component w-full", u),
|
|
1394
1359
|
children: [
|
|
1395
|
-
/* @__PURE__ */
|
|
1360
|
+
/* @__PURE__ */ J(d, {
|
|
1396
1361
|
gap: "dense",
|
|
1397
|
-
|
|
1398
|
-
children: [/* @__PURE__ */ K(u, {
|
|
1362
|
+
children: [/* @__PURE__ */ J(d, {
|
|
1399
1363
|
direction: "horizontal",
|
|
1400
1364
|
justify: "between",
|
|
1401
1365
|
align: "baseline",
|
|
1402
1366
|
gap: "lg",
|
|
1403
|
-
children: [/* @__PURE__ */
|
|
1367
|
+
children: [/* @__PURE__ */ q(a, { children: p.amount }), /* @__PURE__ */ q(g, {
|
|
1404
1368
|
size: "base",
|
|
1405
1369
|
weight: "bold",
|
|
1406
1370
|
className: "tabular-nums tracking-tight",
|
|
1407
1371
|
children: t
|
|
1408
1372
|
})]
|
|
1409
|
-
}), !!l && /* @__PURE__ */
|
|
1373
|
+
}), !!l && /* @__PURE__ */ J(s, {
|
|
1410
1374
|
size: "xs",
|
|
1411
1375
|
type: "secondary",
|
|
1412
1376
|
children: [
|
|
1413
1377
|
p.requested,
|
|
1414
1378
|
": ",
|
|
1415
|
-
/* @__PURE__ */
|
|
1379
|
+
/* @__PURE__ */ q(v, {
|
|
1416
1380
|
size: "xs",
|
|
1417
1381
|
children: l
|
|
1418
1382
|
})
|
|
1419
1383
|
]
|
|
1420
1384
|
})]
|
|
1421
1385
|
}),
|
|
1422
|
-
/* @__PURE__ */
|
|
1423
|
-
className: "
|
|
1424
|
-
children:
|
|
1425
|
-
let n = t <= m,
|
|
1426
|
-
return /* @__PURE__ */
|
|
1386
|
+
/* @__PURE__ */ q("div", {
|
|
1387
|
+
className: "flex items-center justify-between",
|
|
1388
|
+
children: pt.map((e, t) => {
|
|
1389
|
+
let n = t <= m, i = t === m;
|
|
1390
|
+
return /* @__PURE__ */ J("div", {
|
|
1427
1391
|
className: "flex flex-1 flex-col items-start gap-space-sm",
|
|
1428
|
-
children: [/* @__PURE__ */
|
|
1392
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1429
1393
|
className: "flex w-full items-center",
|
|
1430
|
-
children: [/* @__PURE__ */
|
|
1431
|
-
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",
|
|
1432
|
-
children: n ? /* @__PURE__ */
|
|
1394
|
+
children: [/* @__PURE__ */ q("div", {
|
|
1395
|
+
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 && "ring-2 ring-success/30 ring-offset-2 ring-offset-background"),
|
|
1396
|
+
children: n ? /* @__PURE__ */ q(_e, { className: "size-icon-sm" }) : /* @__PURE__ */ q(C, {
|
|
1433
1397
|
value: t + 1,
|
|
1434
1398
|
size: "xs",
|
|
1435
1399
|
weight: "medium",
|
|
1436
1400
|
align: "center"
|
|
1437
1401
|
})
|
|
1438
|
-
}), t <
|
|
1439
|
-
}), /* @__PURE__ */
|
|
1402
|
+
}), t < pt.length - 1 && /* @__PURE__ */ q("div", { className: r("h-0.5 flex-1", t < m ? "bg-success" : "bg-border") })]
|
|
1403
|
+
}), /* @__PURE__ */ q(s, {
|
|
1440
1404
|
size: "xs",
|
|
1441
|
-
weight:
|
|
1405
|
+
weight: i ? "semibold" : "medium",
|
|
1442
1406
|
type: n ? "main" : "secondary",
|
|
1443
1407
|
className: "text-left leading-tight",
|
|
1444
1408
|
children: p[e]
|
|
@@ -1446,35 +1410,34 @@ function Nt({ stage: e, amount: t, reason: a, method: s, eta: c, requestedAt: l,
|
|
|
1446
1410
|
}, e);
|
|
1447
1411
|
})
|
|
1448
1412
|
}),
|
|
1449
|
-
(
|
|
1450
|
-
|
|
1413
|
+
(i || o || c) && /* @__PURE__ */ J(d, {
|
|
1414
|
+
gap: "md",
|
|
1451
1415
|
children: [
|
|
1452
|
-
!!
|
|
1416
|
+
!!i && /* @__PURE__ */ q(G, {
|
|
1453
1417
|
label: p.reason,
|
|
1454
|
-
value:
|
|
1418
|
+
value: i,
|
|
1455
1419
|
className: "items-start",
|
|
1456
1420
|
valueClassName: "text-sm font-medium text-right"
|
|
1457
1421
|
}),
|
|
1458
|
-
!!
|
|
1422
|
+
!!o && /* @__PURE__ */ q(G, {
|
|
1459
1423
|
label: p.method,
|
|
1460
|
-
value:
|
|
1424
|
+
value: o,
|
|
1461
1425
|
valueClassName: "text-sm font-medium"
|
|
1462
1426
|
}),
|
|
1463
|
-
!!c && /* @__PURE__ */ G
|
|
1427
|
+
!!c && /* @__PURE__ */ q(G, {
|
|
1464
1428
|
label: p.eta,
|
|
1465
1429
|
value: c,
|
|
1466
|
-
|
|
1467
|
-
valueClassName: "text-sm font-medium"
|
|
1430
|
+
valueClassName: "text-sm font-medium tabular-nums"
|
|
1468
1431
|
})
|
|
1469
1432
|
]
|
|
1470
|
-
})
|
|
1433
|
+
})
|
|
1471
1434
|
]
|
|
1472
1435
|
});
|
|
1473
1436
|
}
|
|
1474
|
-
|
|
1437
|
+
mt.displayName = "RefundStatusCard";
|
|
1475
1438
|
//#endregion
|
|
1476
1439
|
//#region src/components/blocks/commerce/address-card/types.ts
|
|
1477
|
-
var
|
|
1440
|
+
var ht = {
|
|
1478
1441
|
defaultBadge: "Default",
|
|
1479
1442
|
edit: "Edit",
|
|
1480
1443
|
remove: "Remove",
|
|
@@ -1485,71 +1448,74 @@ var Pt = {
|
|
|
1485
1448
|
};
|
|
1486
1449
|
//#endregion
|
|
1487
1450
|
//#region src/components/blocks/commerce/address-card/address-card.tsx
|
|
1488
|
-
function
|
|
1489
|
-
let
|
|
1490
|
-
shipping:
|
|
1491
|
-
billing:
|
|
1492
|
-
pickup:
|
|
1493
|
-
},
|
|
1494
|
-
|
|
1451
|
+
function gt({ kind: e = "shipping", name: t, line1: i, line2: a, city: o, region: c, postalCode: l, country: u, phone: f, default: m = !1, onEdit: h, onRemove: g, onMakeDefault: v, surface: y = "flat", padding: b = y === "flat" ? "none" : "md", headerDivider: x = y !== "flat" && void 0, className: S, strings: C }) {
|
|
1452
|
+
let w = n(ht, C), T = {
|
|
1453
|
+
shipping: w.shipping,
|
|
1454
|
+
billing: w.billing,
|
|
1455
|
+
pickup: w.pickup
|
|
1456
|
+
}, E = [
|
|
1457
|
+
o,
|
|
1495
1458
|
c,
|
|
1496
1459
|
l
|
|
1497
|
-
].filter(Boolean).join(", "),
|
|
1498
|
-
return
|
|
1460
|
+
].filter(Boolean).join(", "), D = [];
|
|
1461
|
+
return h && D.push({
|
|
1499
1462
|
id: "edit",
|
|
1500
|
-
label:
|
|
1501
|
-
icon: /* @__PURE__ */
|
|
1502
|
-
onClick:
|
|
1503
|
-
}),
|
|
1463
|
+
label: w.edit,
|
|
1464
|
+
icon: /* @__PURE__ */ q(Ce, { className: "size-icon-md" }),
|
|
1465
|
+
onClick: h
|
|
1466
|
+
}), v && !m && D.push({
|
|
1504
1467
|
id: "make-default",
|
|
1505
|
-
label:
|
|
1506
|
-
icon: /* @__PURE__ */
|
|
1507
|
-
onClick:
|
|
1508
|
-
}),
|
|
1468
|
+
label: w.makeDefault,
|
|
1469
|
+
icon: /* @__PURE__ */ q(De, { className: "size-icon-md" }),
|
|
1470
|
+
onClick: v
|
|
1471
|
+
}), g && D.push({
|
|
1509
1472
|
id: "remove",
|
|
1510
|
-
label:
|
|
1511
|
-
icon: /* @__PURE__ */
|
|
1512
|
-
onClick:
|
|
1513
|
-
}), /* @__PURE__ */
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1473
|
+
label: w.remove,
|
|
1474
|
+
icon: /* @__PURE__ */ q(Oe, { className: "size-icon-md" }),
|
|
1475
|
+
onClick: g
|
|
1476
|
+
}), /* @__PURE__ */ q(p, {
|
|
1477
|
+
surface: y,
|
|
1478
|
+
padding: b,
|
|
1479
|
+
headerDivider: x,
|
|
1480
|
+
title: T[e],
|
|
1481
|
+
titleSuffix: m ? /* @__PURE__ */ q(O, {
|
|
1482
|
+
tone: "neutral",
|
|
1483
|
+
children: w.defaultBadge
|
|
1519
1484
|
}) : null,
|
|
1520
|
-
actions:
|
|
1521
|
-
className: r("address-card--component w-full",
|
|
1522
|
-
children: /* @__PURE__ */
|
|
1523
|
-
gap: "
|
|
1524
|
-
children: [
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
!!o && /* @__PURE__ */ G(i, { children: o }),
|
|
1531
|
-
!!S && /* @__PURE__ */ G(i, { children: S }),
|
|
1532
|
-
/* @__PURE__ */ G(i, {
|
|
1533
|
-
type: "secondary",
|
|
1534
|
-
children: d
|
|
1535
|
-
}),
|
|
1536
|
-
!!f && /* @__PURE__ */ G(g, {
|
|
1537
|
-
value: f,
|
|
1538
|
-
display: /* @__PURE__ */ G(i, {
|
|
1539
|
-
tag: "span",
|
|
1540
|
-
size: "xs",
|
|
1541
|
-
children: f
|
|
1485
|
+
actions: D.length > 0 ? D : void 0,
|
|
1486
|
+
className: r("address-card--component w-full", S),
|
|
1487
|
+
children: /* @__PURE__ */ J(d, {
|
|
1488
|
+
gap: "md",
|
|
1489
|
+
children: [/* @__PURE__ */ J(d, {
|
|
1490
|
+
gap: "2xs",
|
|
1491
|
+
children: [
|
|
1492
|
+
/* @__PURE__ */ q(s, {
|
|
1493
|
+
weight: "semibold",
|
|
1494
|
+
children: t
|
|
1542
1495
|
}),
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1496
|
+
/* @__PURE__ */ q(s, { children: i }),
|
|
1497
|
+
!!a && /* @__PURE__ */ q(s, { children: a }),
|
|
1498
|
+
!!E && /* @__PURE__ */ q(s, { children: E }),
|
|
1499
|
+
/* @__PURE__ */ q(s, {
|
|
1500
|
+
type: "secondary",
|
|
1501
|
+
children: u
|
|
1502
|
+
})
|
|
1503
|
+
]
|
|
1504
|
+
}), !!f && /* @__PURE__ */ q(_, {
|
|
1505
|
+
value: f,
|
|
1506
|
+
display: /* @__PURE__ */ q(s, {
|
|
1507
|
+
tag: "span",
|
|
1508
|
+
children: f
|
|
1509
|
+
}),
|
|
1510
|
+
className: "self-start"
|
|
1511
|
+
})]
|
|
1546
1512
|
})
|
|
1547
1513
|
});
|
|
1548
1514
|
}
|
|
1549
|
-
|
|
1515
|
+
gt.displayName = "AddressCard";
|
|
1550
1516
|
//#endregion
|
|
1551
1517
|
//#region src/components/blocks/commerce/voucher-entry/types.ts
|
|
1552
|
-
var
|
|
1518
|
+
var _t = {
|
|
1553
1519
|
title: "Redeem a gift card",
|
|
1554
1520
|
inputLabel: "Gift card code",
|
|
1555
1521
|
placeholder: "Enter gift card code",
|
|
@@ -1559,114 +1525,108 @@ var It = {
|
|
|
1559
1525
|
balance: "Available balance",
|
|
1560
1526
|
applied: "Applied",
|
|
1561
1527
|
notFound: "That gift card code is not valid."
|
|
1562
|
-
},
|
|
1563
|
-
function
|
|
1564
|
-
let
|
|
1565
|
-
return e ? /* @__PURE__ */
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
children: /* @__PURE__ */ K(B, {
|
|
1528
|
+
}, vt = (e) => e.toUpperCase();
|
|
1529
|
+
function yt({ appliedCode: e, balance: t, error: i, loading: o, onCheck: s, onRemove: c, className: u, strings: f }) {
|
|
1530
|
+
let p = n(_t, f), m = de(), [h, _] = pe(""), v = h.trim();
|
|
1531
|
+
return e ? /* @__PURE__ */ q(I, {
|
|
1532
|
+
title: p.title,
|
|
1533
|
+
className: r("voucher-entry--component w-full", u),
|
|
1534
|
+
children: /* @__PURE__ */ J(U, {
|
|
1570
1535
|
size: "sm",
|
|
1571
|
-
variant: "
|
|
1572
|
-
className: "items-center gap-y-space-sm border-success/30 bg-success/
|
|
1536
|
+
variant: "muted",
|
|
1537
|
+
className: "items-center gap-y-space-sm border border-success/30 bg-success/8",
|
|
1573
1538
|
children: [
|
|
1574
|
-
/* @__PURE__ */
|
|
1575
|
-
icon:
|
|
1539
|
+
/* @__PURE__ */ q(R, { children: /* @__PURE__ */ q(w, {
|
|
1540
|
+
icon: _e,
|
|
1576
1541
|
tone: "success",
|
|
1577
1542
|
size: "md",
|
|
1578
1543
|
className: "ring-1 ring-success/20"
|
|
1579
1544
|
}) }),
|
|
1580
|
-
/* @__PURE__ */
|
|
1581
|
-
className: "min-w-0",
|
|
1582
|
-
children: [/* @__PURE__ */
|
|
1545
|
+
/* @__PURE__ */ J(H, {
|
|
1546
|
+
className: "min-w-0 basis-48",
|
|
1547
|
+
children: [/* @__PURE__ */ J(d, {
|
|
1583
1548
|
direction: "horizontal",
|
|
1584
|
-
wrap: !0,
|
|
1585
1549
|
align: "center",
|
|
1586
1550
|
gap: "sm",
|
|
1587
|
-
|
|
1551
|
+
className: "min-w-0",
|
|
1552
|
+
children: [/* @__PURE__ */ q(W, {
|
|
1588
1553
|
className: "max-w-full",
|
|
1589
|
-
children: /* @__PURE__ */
|
|
1554
|
+
children: /* @__PURE__ */ q(y, {
|
|
1590
1555
|
className: "tracking-wider",
|
|
1591
1556
|
children: e
|
|
1592
1557
|
})
|
|
1593
|
-
}), /* @__PURE__ */
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
children: f.applied
|
|
1558
|
+
}), /* @__PURE__ */ q(a, {
|
|
1559
|
+
className: "shrink-0",
|
|
1560
|
+
children: p.applied
|
|
1597
1561
|
})]
|
|
1598
|
-
}), /* @__PURE__ */
|
|
1562
|
+
}), !!t && /* @__PURE__ */ q(z, {
|
|
1599
1563
|
clamp: 1,
|
|
1600
|
-
children:
|
|
1564
|
+
children: p.balance
|
|
1601
1565
|
})]
|
|
1602
1566
|
}),
|
|
1603
|
-
/* @__PURE__ */
|
|
1604
|
-
className: "
|
|
1605
|
-
children: [
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
className: "size-action-xs shrink-0 text-muted-foreground hover:text-destructive",
|
|
1620
|
-
children: /* @__PURE__ */ G(Ye, { className: "size-icon-sm" })
|
|
1621
|
-
})]
|
|
1567
|
+
/* @__PURE__ */ J(B, {
|
|
1568
|
+
className: "ml-auto shrink-0 gap-space-sm",
|
|
1569
|
+
children: [!!t && /* @__PURE__ */ q(g, {
|
|
1570
|
+
weight: "semibold",
|
|
1571
|
+
className: "shrink-0 tabular-nums",
|
|
1572
|
+
children: t
|
|
1573
|
+
}), !!c && /* @__PURE__ */ q(l, {
|
|
1574
|
+
type: "button",
|
|
1575
|
+
tone: "destructive",
|
|
1576
|
+
buttonStyle: "ghost",
|
|
1577
|
+
size: "sm",
|
|
1578
|
+
iconOnly: !0,
|
|
1579
|
+
onClick: c,
|
|
1580
|
+
"aria-label": p.remove,
|
|
1581
|
+
className: "size-action-xs shrink-0 text-muted-foreground hover:text-destructive",
|
|
1582
|
+
children: /* @__PURE__ */ q(Ae, { className: "size-icon-sm" })
|
|
1622
1583
|
})]
|
|
1623
1584
|
})
|
|
1624
1585
|
]
|
|
1625
1586
|
})
|
|
1626
|
-
}) : /* @__PURE__ */
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
children: /* @__PURE__ */ G("form", {
|
|
1587
|
+
}) : /* @__PURE__ */ q(I, {
|
|
1588
|
+
title: p.title,
|
|
1589
|
+
className: r("voucher-entry--component w-full", u),
|
|
1590
|
+
children: /* @__PURE__ */ q("form", {
|
|
1631
1591
|
onSubmit: (e) => {
|
|
1632
|
-
e.preventDefault(),
|
|
1592
|
+
e.preventDefault(), v && s?.(v);
|
|
1633
1593
|
},
|
|
1634
|
-
children: /* @__PURE__ */
|
|
1635
|
-
label:
|
|
1636
|
-
htmlFor:
|
|
1594
|
+
children: /* @__PURE__ */ q(j, {
|
|
1595
|
+
label: p.inputLabel,
|
|
1596
|
+
htmlFor: m,
|
|
1637
1597
|
error: i,
|
|
1638
|
-
hint: i ? void 0 :
|
|
1639
|
-
children: /* @__PURE__ */
|
|
1598
|
+
hint: i ? void 0 : p.helperText,
|
|
1599
|
+
children: /* @__PURE__ */ J("div", {
|
|
1640
1600
|
className: "flex flex-wrap gap-space-md",
|
|
1641
|
-
children: [/* @__PURE__ */
|
|
1601
|
+
children: [/* @__PURE__ */ q("div", {
|
|
1642
1602
|
className: "min-w-48 flex-1",
|
|
1643
|
-
children: /* @__PURE__ */
|
|
1644
|
-
id:
|
|
1645
|
-
value:
|
|
1646
|
-
onChange: (e) =>
|
|
1647
|
-
placeholder:
|
|
1648
|
-
startIcon: J,
|
|
1603
|
+
children: /* @__PURE__ */ q(A, {
|
|
1604
|
+
id: m,
|
|
1605
|
+
value: h,
|
|
1606
|
+
onChange: (e) => _(vt(e.target.value)),
|
|
1607
|
+
placeholder: p.placeholder,
|
|
1649
1608
|
autoCapitalize: "characters",
|
|
1650
1609
|
spellCheck: !1,
|
|
1651
1610
|
className: "font-mono",
|
|
1652
1611
|
invalid: !!i
|
|
1653
1612
|
})
|
|
1654
|
-
}), /* @__PURE__ */
|
|
1613
|
+
}), /* @__PURE__ */ q(l, {
|
|
1614
|
+
tone: "primary",
|
|
1655
1615
|
type: "submit",
|
|
1656
|
-
loading:
|
|
1657
|
-
disabled: !
|
|
1616
|
+
loading: o,
|
|
1617
|
+
disabled: !v,
|
|
1658
1618
|
className: "shrink-0",
|
|
1659
|
-
children:
|
|
1619
|
+
children: p.check
|
|
1660
1620
|
})]
|
|
1661
1621
|
})
|
|
1662
1622
|
})
|
|
1663
1623
|
})
|
|
1664
1624
|
});
|
|
1665
1625
|
}
|
|
1666
|
-
|
|
1626
|
+
yt.displayName = "VoucherEntry";
|
|
1667
1627
|
//#endregion
|
|
1668
1628
|
//#region src/components/blocks/commerce/cart-summary/types.ts
|
|
1669
|
-
var
|
|
1629
|
+
var bt = {
|
|
1670
1630
|
title: "Cart",
|
|
1671
1631
|
subtotal: "Subtotal",
|
|
1672
1632
|
tax: "Tax",
|
|
@@ -1674,21 +1634,21 @@ var zt = {
|
|
|
1674
1634
|
discount: "Discount",
|
|
1675
1635
|
total: "Total",
|
|
1676
1636
|
checkout: "Checkout"
|
|
1677
|
-
},
|
|
1637
|
+
}, xt = (e) => [
|
|
1678
1638
|
e.productTitle,
|
|
1679
1639
|
e.title,
|
|
1680
1640
|
e.name
|
|
1681
|
-
].find((e) => !!e?.trim()) ?? e.id,
|
|
1641
|
+
].find((e) => !!e?.trim()) ?? e.id, St = (e) => [
|
|
1682
1642
|
e.imageUrl,
|
|
1683
1643
|
e.imageSrc,
|
|
1684
1644
|
e.src,
|
|
1685
1645
|
e.url
|
|
1686
1646
|
].find((e) => !!e?.trim());
|
|
1687
|
-
function
|
|
1688
|
-
return /* @__PURE__ */
|
|
1647
|
+
function Ct({ title: e }) {
|
|
1648
|
+
return /* @__PURE__ */ q("div", {
|
|
1689
1649
|
"aria-hidden": "true",
|
|
1690
1650
|
className: "flex size-full items-center justify-center rounded-[inherit] bg-muted ring-1 ring-border/60",
|
|
1691
|
-
children: /* @__PURE__ */
|
|
1651
|
+
children: /* @__PURE__ */ q(b, {
|
|
1692
1652
|
value: e,
|
|
1693
1653
|
strategy: "first-words",
|
|
1694
1654
|
fallback: e.trim().slice(0, 2).toUpperCase(),
|
|
@@ -1698,50 +1658,50 @@ function Ht({ title: e }) {
|
|
|
1698
1658
|
})
|
|
1699
1659
|
});
|
|
1700
1660
|
}
|
|
1701
|
-
function
|
|
1702
|
-
let m = n(
|
|
1703
|
-
return /* @__PURE__ */
|
|
1704
|
-
icon: /* @__PURE__ */ G(He, { className: "size-icon" }),
|
|
1661
|
+
function wt({ items: e, subtotal: t, tax: i, shipping: a, discount: o, total: c, onCheckout: u, className: f, strings: p }) {
|
|
1662
|
+
let m = n(bt, p), h = !!(t || i || a || o);
|
|
1663
|
+
return /* @__PURE__ */ J(I, {
|
|
1705
1664
|
title: m.title,
|
|
1665
|
+
contentGap: "2xl",
|
|
1706
1666
|
className: r("cart-summary--component w-full", f),
|
|
1707
1667
|
children: [
|
|
1708
|
-
/* @__PURE__ */
|
|
1709
|
-
let t =
|
|
1710
|
-
return /* @__PURE__ */
|
|
1668
|
+
/* @__PURE__ */ q(V, { children: e.map((e) => {
|
|
1669
|
+
let t = xt(e), n = St(e);
|
|
1670
|
+
return /* @__PURE__ */ J(U, {
|
|
1711
1671
|
className: "cart-summary--item",
|
|
1712
1672
|
children: [
|
|
1713
|
-
/* @__PURE__ */
|
|
1673
|
+
/* @__PURE__ */ q(R, {
|
|
1714
1674
|
variant: "image",
|
|
1715
1675
|
className: "cart-summary--item-media",
|
|
1716
|
-
children: n ? /* @__PURE__ */
|
|
1676
|
+
children: n ? /* @__PURE__ */ q("img", {
|
|
1717
1677
|
src: n,
|
|
1718
1678
|
alt: e.imageAlt ?? t
|
|
1719
|
-
}) : /* @__PURE__ */
|
|
1679
|
+
}) : /* @__PURE__ */ q(Ct, { title: t })
|
|
1720
1680
|
}),
|
|
1721
|
-
/* @__PURE__ */
|
|
1681
|
+
/* @__PURE__ */ J(H, {
|
|
1722
1682
|
className: "cart-summary--item-content",
|
|
1723
|
-
children: [/* @__PURE__ */
|
|
1683
|
+
children: [/* @__PURE__ */ q(W, { children: t }), !!e.variantTitle && /* @__PURE__ */ q(z, {
|
|
1724
1684
|
clamp: 1,
|
|
1725
1685
|
children: e.variantTitle
|
|
1726
1686
|
})]
|
|
1727
1687
|
}),
|
|
1728
|
-
/* @__PURE__ */
|
|
1688
|
+
/* @__PURE__ */ q(B, {
|
|
1729
1689
|
className: "cart-summary--item-actions",
|
|
1730
|
-
children: /* @__PURE__ */
|
|
1690
|
+
children: /* @__PURE__ */ J(d, {
|
|
1731
1691
|
gap: "2xs",
|
|
1732
1692
|
align: "end",
|
|
1733
1693
|
className: "shrink-0",
|
|
1734
|
-
children: [/* @__PURE__ */
|
|
1694
|
+
children: [/* @__PURE__ */ J(s, {
|
|
1735
1695
|
tag: "span",
|
|
1736
1696
|
size: "xs",
|
|
1737
1697
|
type: "secondary",
|
|
1738
|
-
children: ["x", /* @__PURE__ */
|
|
1698
|
+
children: ["x", /* @__PURE__ */ q(C, {
|
|
1739
1699
|
value: e.qty,
|
|
1740
1700
|
size: "xs",
|
|
1741
1701
|
type: "secondary",
|
|
1742
1702
|
align: "left"
|
|
1743
1703
|
})]
|
|
1744
|
-
}), /* @__PURE__ */
|
|
1704
|
+
}), /* @__PURE__ */ q(g, {
|
|
1745
1705
|
weight: "semibold",
|
|
1746
1706
|
className: "tabular-nums",
|
|
1747
1707
|
children: e.price
|
|
@@ -1751,63 +1711,62 @@ function Ut({ items: e, subtotal: t, tax: a, shipping: o, discount: s, total: l,
|
|
|
1751
1711
|
]
|
|
1752
1712
|
}, e.id);
|
|
1753
1713
|
}) }),
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1714
|
+
/* @__PURE__ */ J(d, {
|
|
1715
|
+
gap: "lg",
|
|
1716
|
+
className: "cart-summary--totals",
|
|
1717
|
+
children: [
|
|
1718
|
+
!!h && /* @__PURE__ */ J(d, {
|
|
1719
|
+
gap: "sm",
|
|
1720
|
+
className: "cart-summary--breakdown",
|
|
1721
|
+
children: [
|
|
1722
|
+
!!t && /* @__PURE__ */ q(G, {
|
|
1723
|
+
label: m.subtotal,
|
|
1724
|
+
value: t,
|
|
1725
|
+
valueClassName: "font-medium tabular-nums"
|
|
1726
|
+
}),
|
|
1727
|
+
!!i && /* @__PURE__ */ q(G, {
|
|
1728
|
+
label: m.tax,
|
|
1729
|
+
value: i,
|
|
1730
|
+
valueClassName: "font-medium tabular-nums"
|
|
1731
|
+
}),
|
|
1732
|
+
!!a && /* @__PURE__ */ q(G, {
|
|
1733
|
+
label: m.shipping,
|
|
1734
|
+
value: a,
|
|
1735
|
+
valueClassName: "font-medium tabular-nums"
|
|
1736
|
+
}),
|
|
1737
|
+
!!o && /* @__PURE__ */ q(G, {
|
|
1738
|
+
label: m.discount,
|
|
1739
|
+
value: Le(o),
|
|
1740
|
+
valueClassName: "font-semibold tabular-nums text-success"
|
|
1741
|
+
})
|
|
1742
|
+
]
|
|
1743
|
+
}),
|
|
1744
|
+
/* @__PURE__ */ q(k, {}),
|
|
1745
|
+
/* @__PURE__ */ q(G, {
|
|
1746
|
+
label: /* @__PURE__ */ q(s, {
|
|
1747
|
+
tag: "span",
|
|
1748
|
+
weight: "semibold",
|
|
1749
|
+
lineHeight: "tight",
|
|
1750
|
+
children: m.total
|
|
1776
1751
|
}),
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
valueClassName: "font-semibold text-success"
|
|
1782
|
-
})
|
|
1783
|
-
]
|
|
1784
|
-
})
|
|
1785
|
-
}),
|
|
1786
|
-
/* @__PURE__ */ G(O, { className: "my-space-lg" }),
|
|
1787
|
-
/* @__PURE__ */ G(H, {
|
|
1788
|
-
label: /* @__PURE__ */ G(i, {
|
|
1789
|
-
tag: "span",
|
|
1790
|
-
weight: "semibold",
|
|
1791
|
-
lineHeight: "tight",
|
|
1792
|
-
children: m.total
|
|
1793
|
-
}),
|
|
1794
|
-
value: l,
|
|
1795
|
-
mono: !0,
|
|
1796
|
-
valueClassName: "text-base font-bold"
|
|
1752
|
+
value: c,
|
|
1753
|
+
valueClassName: "text-base font-bold tabular-nums"
|
|
1754
|
+
})
|
|
1755
|
+
]
|
|
1797
1756
|
}),
|
|
1798
|
-
!!
|
|
1799
|
-
|
|
1757
|
+
!!u && /* @__PURE__ */ q(l, {
|
|
1758
|
+
tone: "primary",
|
|
1759
|
+
onClick: u,
|
|
1800
1760
|
fullWidth: !0,
|
|
1801
|
-
className: "mt-space-xl",
|
|
1802
1761
|
children: m.checkout
|
|
1803
1762
|
})
|
|
1804
1763
|
]
|
|
1805
1764
|
});
|
|
1806
1765
|
}
|
|
1807
|
-
|
|
1766
|
+
wt.displayName = "CartSummaryCard";
|
|
1808
1767
|
//#endregion
|
|
1809
1768
|
//#region src/components/blocks/commerce/coupon-input/types.ts
|
|
1810
|
-
var
|
|
1769
|
+
var Tt = {
|
|
1811
1770
|
title: "Have a code?",
|
|
1812
1771
|
fieldLabel: "Coupon code",
|
|
1813
1772
|
placeholder: "Enter coupon code",
|
|
@@ -1815,188 +1774,160 @@ var Wt = {
|
|
|
1815
1774
|
remove: "Remove",
|
|
1816
1775
|
applied: "Applied",
|
|
1817
1776
|
invalid: "That code is not valid"
|
|
1818
|
-
},
|
|
1819
|
-
function
|
|
1820
|
-
let m = n(
|
|
1821
|
-
return e ? /* @__PURE__ */
|
|
1822
|
-
icon: /* @__PURE__ */ G(Ge, { className: "size-icon" }),
|
|
1777
|
+
}, Et = (e) => e.toUpperCase();
|
|
1778
|
+
function Dt({ appliedCode: e, appliedDiscount: t, error: i, onApply: o, onRemove: c, loading: u, className: f, strings: p }) {
|
|
1779
|
+
let m = n(Tt, p), [h, g] = pe(""), _ = h.trim();
|
|
1780
|
+
return e ? /* @__PURE__ */ q(I, {
|
|
1823
1781
|
title: m.title,
|
|
1824
1782
|
className: r("coupon-input--component w-full", f),
|
|
1825
|
-
children: /* @__PURE__ */
|
|
1783
|
+
children: /* @__PURE__ */ J(U, {
|
|
1826
1784
|
size: "sm",
|
|
1827
1785
|
variant: "muted",
|
|
1828
1786
|
className: "items-center gap-y-space-sm border border-success/30 bg-success/8",
|
|
1829
1787
|
children: [
|
|
1830
|
-
/* @__PURE__ */
|
|
1831
|
-
icon:
|
|
1788
|
+
/* @__PURE__ */ q(R, { children: /* @__PURE__ */ q(w, {
|
|
1789
|
+
icon: _e,
|
|
1832
1790
|
tone: "success",
|
|
1833
1791
|
size: "md",
|
|
1834
1792
|
className: "ring-1 ring-success/20"
|
|
1835
1793
|
}) }),
|
|
1836
|
-
/* @__PURE__ */
|
|
1794
|
+
/* @__PURE__ */ q(H, {
|
|
1837
1795
|
className: "min-w-0",
|
|
1838
|
-
children: /* @__PURE__ */
|
|
1796
|
+
children: /* @__PURE__ */ J(d, {
|
|
1839
1797
|
direction: "horizontal",
|
|
1840
1798
|
align: "center",
|
|
1841
1799
|
gap: "sm",
|
|
1842
1800
|
wrap: !1,
|
|
1843
1801
|
className: "min-w-0",
|
|
1844
|
-
children: [/* @__PURE__ */
|
|
1802
|
+
children: [/* @__PURE__ */ q(W, {
|
|
1845
1803
|
className: "min-w-0 truncate font-mono tracking-wider",
|
|
1846
1804
|
children: e
|
|
1847
|
-
}), /* @__PURE__ */
|
|
1805
|
+
}), /* @__PURE__ */ q(a, {
|
|
1848
1806
|
className: "shrink-0",
|
|
1849
1807
|
children: m.applied
|
|
1850
1808
|
})]
|
|
1851
1809
|
})
|
|
1852
1810
|
}),
|
|
1853
|
-
/* @__PURE__ */
|
|
1811
|
+
/* @__PURE__ */ J(B, {
|
|
1854
1812
|
className: "ml-auto shrink-0 gap-space-sm",
|
|
1855
|
-
children: [!!t && /* @__PURE__ */
|
|
1813
|
+
children: [!!t && /* @__PURE__ */ q(s, {
|
|
1856
1814
|
tag: "span",
|
|
1857
1815
|
size: "xs",
|
|
1858
1816
|
weight: "semibold",
|
|
1859
1817
|
type: "success",
|
|
1860
1818
|
className: "tabular-nums shrink-0",
|
|
1861
|
-
children:
|
|
1862
|
-
}), !!
|
|
1819
|
+
children: Le(t)
|
|
1820
|
+
}), !!c && /* @__PURE__ */ q(l, {
|
|
1863
1821
|
type: "button",
|
|
1864
1822
|
tone: "destructive",
|
|
1865
1823
|
buttonStyle: "ghost",
|
|
1866
1824
|
size: "sm",
|
|
1867
1825
|
iconOnly: !0,
|
|
1868
|
-
onClick:
|
|
1826
|
+
onClick: c,
|
|
1869
1827
|
"aria-label": m.remove,
|
|
1870
1828
|
className: "size-action-xs shrink-0 text-muted-foreground hover:text-destructive",
|
|
1871
|
-
children: /* @__PURE__ */
|
|
1829
|
+
children: /* @__PURE__ */ q(Ae, { className: "size-icon-sm" })
|
|
1872
1830
|
})]
|
|
1873
1831
|
})
|
|
1874
1832
|
]
|
|
1875
1833
|
})
|
|
1876
|
-
}) : /* @__PURE__ */
|
|
1877
|
-
icon: /* @__PURE__ */ G(Ge, { className: "size-icon" }),
|
|
1834
|
+
}) : /* @__PURE__ */ q(I, {
|
|
1878
1835
|
title: m.title,
|
|
1879
1836
|
className: r("coupon-input--component w-full", f),
|
|
1880
|
-
children: /* @__PURE__ */
|
|
1837
|
+
children: /* @__PURE__ */ J(d, {
|
|
1881
1838
|
gap: "md",
|
|
1882
|
-
children: [/* @__PURE__ */
|
|
1839
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1883
1840
|
className: "flex flex-wrap gap-space-md",
|
|
1884
|
-
children: [/* @__PURE__ */
|
|
1841
|
+
children: [/* @__PURE__ */ q("div", {
|
|
1885
1842
|
className: "min-w-44 flex-1",
|
|
1886
|
-
children: /* @__PURE__ */
|
|
1843
|
+
children: /* @__PURE__ */ q(A, {
|
|
1887
1844
|
value: h,
|
|
1888
|
-
onChange: (e) => g(
|
|
1845
|
+
onChange: (e) => g(Et(e.target.value)),
|
|
1889
1846
|
"aria-label": m.fieldLabel,
|
|
1890
1847
|
placeholder: m.placeholder,
|
|
1891
|
-
startIcon: Ue,
|
|
1892
1848
|
autoCapitalize: "characters",
|
|
1893
1849
|
spellCheck: !1,
|
|
1894
1850
|
className: "font-mono",
|
|
1895
|
-
invalid: !!
|
|
1851
|
+
invalid: !!i
|
|
1896
1852
|
})
|
|
1897
|
-
}), /* @__PURE__ */
|
|
1853
|
+
}), /* @__PURE__ */ q(l, {
|
|
1854
|
+
tone: "primary",
|
|
1898
1855
|
size: "md",
|
|
1899
|
-
onClick: () =>
|
|
1900
|
-
loading:
|
|
1856
|
+
onClick: () => o?.(_),
|
|
1857
|
+
loading: u,
|
|
1901
1858
|
disabled: !_,
|
|
1902
1859
|
className: "shrink-0",
|
|
1903
1860
|
children: m.apply
|
|
1904
1861
|
})]
|
|
1905
|
-
}), !!
|
|
1862
|
+
}), !!i && /* @__PURE__ */ q(s, {
|
|
1906
1863
|
size: "xs",
|
|
1907
1864
|
type: "error",
|
|
1908
|
-
children:
|
|
1865
|
+
children: i || m.invalid
|
|
1909
1866
|
})]
|
|
1910
1867
|
})
|
|
1911
1868
|
});
|
|
1912
1869
|
}
|
|
1913
|
-
|
|
1870
|
+
Dt.displayName = "CouponInputCard";
|
|
1914
1871
|
//#endregion
|
|
1915
1872
|
//#region src/components/blocks/commerce/order-status/types.ts
|
|
1916
|
-
var
|
|
1873
|
+
var Ot = {
|
|
1917
1874
|
title: "Order status",
|
|
1918
1875
|
statusLabel: "Current status",
|
|
1919
1876
|
eta: "ETA",
|
|
1920
1877
|
latestEvent: "Latest event",
|
|
1921
1878
|
currentStep: "Current step"
|
|
1922
|
-
},
|
|
1879
|
+
}, kt = {
|
|
1923
1880
|
pending: "warning",
|
|
1924
1881
|
paid: "info",
|
|
1925
1882
|
fulfilled: "info",
|
|
1926
|
-
shipped: "
|
|
1883
|
+
shipped: "info",
|
|
1927
1884
|
delivered: "success",
|
|
1928
1885
|
cancelled: "destructive"
|
|
1929
1886
|
};
|
|
1930
|
-
function
|
|
1931
|
-
let
|
|
1932
|
-
return /* @__PURE__ */
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
tone: m,
|
|
1887
|
+
function At({ orderNumber: e, status: t, statusTone: i, events: a, currentEta: o, className: c, strings: l }) {
|
|
1888
|
+
let u = n(Ot, l), d = i ?? kt[t], f = a.reduce((e, t, n) => t.complete ? n : e, -1), p = a.find((e) => !e.complete);
|
|
1889
|
+
return /* @__PURE__ */ J(I, {
|
|
1890
|
+
title: u.title,
|
|
1891
|
+
titleSuffix: /* @__PURE__ */ q(O, {
|
|
1892
|
+
tone: d,
|
|
1937
1893
|
className: "capitalize",
|
|
1938
1894
|
children: t
|
|
1939
1895
|
}),
|
|
1940
1896
|
description: `#${e}`,
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
children: [/* @__PURE__ */ G(o, { children: p.statusLabel }), /* @__PURE__ */ G(i, {
|
|
1954
|
-
weight: "semibold",
|
|
1955
|
-
className: "capitalize",
|
|
1956
|
-
children: t
|
|
1957
|
-
})]
|
|
1958
|
-
}),
|
|
1959
|
-
!!v && /* @__PURE__ */ K(u, {
|
|
1960
|
-
gap: "dense",
|
|
1961
|
-
children: [/* @__PURE__ */ G(o, { children: v.complete ? p.latestEvent : p.currentStep }), /* @__PURE__ */ G(i, {
|
|
1962
|
-
weight: "semibold",
|
|
1963
|
-
children: v.label
|
|
1964
|
-
})]
|
|
1965
|
-
}),
|
|
1966
|
-
!!c && /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ G(o, { children: p.eta }), /* @__PURE__ */ G(h, {
|
|
1967
|
-
weight: "semibold",
|
|
1968
|
-
className: "mt-0.5 block tabular-nums",
|
|
1969
|
-
children: c
|
|
1970
|
-
})] })
|
|
1971
|
-
]
|
|
1972
|
-
})
|
|
1973
|
-
}), s.length > 0 && /* @__PURE__ */ G("ol", {
|
|
1974
|
-
className: "m-0 p-0 list-none mt-space-xl",
|
|
1975
|
-
children: s.map((e, t) => {
|
|
1976
|
-
let n = t === s.length - 1, a = y ? e === y : t === g;
|
|
1977
|
-
return /* @__PURE__ */ K("li", {
|
|
1897
|
+
contentGap: "xl",
|
|
1898
|
+
className: r("order-status--component w-full", c),
|
|
1899
|
+
children: [!!o && /* @__PURE__ */ q(G, {
|
|
1900
|
+
label: u.eta,
|
|
1901
|
+
value: o,
|
|
1902
|
+
className: "order-status--eta",
|
|
1903
|
+
valueClassName: "font-medium tabular-nums"
|
|
1904
|
+
}), a.length > 0 && /* @__PURE__ */ q("ol", {
|
|
1905
|
+
className: "m-0 p-0 list-none",
|
|
1906
|
+
children: a.map((e, t) => {
|
|
1907
|
+
let n = t === a.length - 1, i = p ? e === p : t === f;
|
|
1908
|
+
return /* @__PURE__ */ J("li", {
|
|
1978
1909
|
className: "relative flex gap-space-lg",
|
|
1979
|
-
children: [/* @__PURE__ */
|
|
1910
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1980
1911
|
className: "flex flex-col items-center",
|
|
1981
|
-
children: [/* @__PURE__ */
|
|
1982
|
-
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",
|
|
1983
|
-
children: e.complete ? /* @__PURE__ */
|
|
1912
|
+
children: [/* @__PURE__ */ q("span", {
|
|
1913
|
+
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 && "border-2 border-primary-accent bg-primary/10 text-primary-accent ring-4 ring-primary/30"),
|
|
1914
|
+
children: e.complete ? /* @__PURE__ */ q(_e, {
|
|
1984
1915
|
className: "size-icon-md",
|
|
1985
1916
|
strokeWidth: 2.5
|
|
1986
|
-
}) :
|
|
1987
|
-
}), !n && /* @__PURE__ */
|
|
1917
|
+
}) : i ? /* @__PURE__ */ q(ge, { className: "size-icon-md" }) : /* @__PURE__ */ q(be, { className: "size-icon-sm" })
|
|
1918
|
+
}), !n && /* @__PURE__ */ q("span", {
|
|
1988
1919
|
"aria-hidden": "true",
|
|
1989
|
-
className: r("min-h-6 w-px flex-1", t <
|
|
1920
|
+
className: r("min-h-6 w-px flex-1", t < f ? "bg-success" : "bg-border")
|
|
1990
1921
|
})]
|
|
1991
|
-
}), /* @__PURE__ */
|
|
1922
|
+
}), /* @__PURE__ */ J("div", {
|
|
1992
1923
|
className: r("min-w-0 flex-1 pb-space-xl", n && "pb-0"),
|
|
1993
|
-
children: [/* @__PURE__ */
|
|
1994
|
-
weight: e.complete ||
|
|
1995
|
-
className: r(!e.complete && !
|
|
1924
|
+
children: [/* @__PURE__ */ q(s, {
|
|
1925
|
+
weight: e.complete || i ? "semibold" : "medium",
|
|
1926
|
+
className: r(!e.complete && !i && "text-muted-foreground"),
|
|
1996
1927
|
children: e.label
|
|
1997
|
-
}), !!e.timestamp && /* @__PURE__ */
|
|
1928
|
+
}), !!e.timestamp && /* @__PURE__ */ q(v, {
|
|
1998
1929
|
size: "xs",
|
|
1999
|
-
className: "
|
|
1930
|
+
className: "tabular-nums",
|
|
2000
1931
|
children: e.timestamp
|
|
2001
1932
|
})]
|
|
2002
1933
|
})]
|
|
@@ -2005,16 +1936,16 @@ function Yt({ orderNumber: e, status: t, statusTone: a, events: s, currentEta: c
|
|
|
2005
1936
|
})]
|
|
2006
1937
|
});
|
|
2007
1938
|
}
|
|
2008
|
-
|
|
1939
|
+
At.displayName = "OrderStatusCard";
|
|
2009
1940
|
//#endregion
|
|
2010
1941
|
//#region src/components/blocks/commerce/payment-method/types.ts
|
|
2011
|
-
var
|
|
1942
|
+
var jt = {
|
|
2012
1943
|
title: "Payment method",
|
|
2013
1944
|
default: "Default",
|
|
2014
1945
|
cardHolder: "Card holder",
|
|
2015
1946
|
expires: "Expires",
|
|
2016
1947
|
change: "Change"
|
|
2017
|
-
},
|
|
1948
|
+
}, Mt = {
|
|
2018
1949
|
visa: "VISA",
|
|
2019
1950
|
mastercard: "MasterCard",
|
|
2020
1951
|
amex: "AMEX",
|
|
@@ -2022,7 +1953,7 @@ var Xt = {
|
|
|
2022
1953
|
applepay: "Apple Pay",
|
|
2023
1954
|
googlepay: "Google Pay",
|
|
2024
1955
|
unknown: "Card"
|
|
2025
|
-
}, X = "bg-inverse-background from-inverse-background via-inverse-surface-strong to-inverse-background",
|
|
1956
|
+
}, X = "bg-inverse-background from-inverse-background via-inverse-surface-strong to-inverse-background", Nt = {
|
|
2026
1957
|
visa: X,
|
|
2027
1958
|
mastercard: X,
|
|
2028
1959
|
amex: X,
|
|
@@ -2031,74 +1962,76 @@ var Xt = {
|
|
|
2031
1962
|
googlepay: X,
|
|
2032
1963
|
unknown: X
|
|
2033
1964
|
};
|
|
2034
|
-
function
|
|
2035
|
-
let
|
|
2036
|
-
return /* @__PURE__ */
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
1965
|
+
function Pt({ brand: e, last4: t, expiry: i, holderName: o, default: c = !1, onChange: u, surface: f = "flat", padding: m = f === "flat" ? "none" : "md", headerDivider: h = f !== "flat" && void 0, className: _, strings: v }) {
|
|
1966
|
+
let y = n(jt, v), b = Mt[e], x = Nt[e];
|
|
1967
|
+
return /* @__PURE__ */ q(p, {
|
|
1968
|
+
surface: f,
|
|
1969
|
+
padding: m,
|
|
1970
|
+
headerDivider: h,
|
|
1971
|
+
title: y.title,
|
|
1972
|
+
titleSuffix: c ? /* @__PURE__ */ q(O, {
|
|
1973
|
+
tone: "neutral",
|
|
1974
|
+
children: y.default
|
|
2042
1975
|
}) : null,
|
|
2043
|
-
headerAction:
|
|
1976
|
+
headerAction: u ? /* @__PURE__ */ q(l, {
|
|
2044
1977
|
buttonStyle: "ghost",
|
|
2045
1978
|
tone: "secondary",
|
|
2046
|
-
onClick:
|
|
2047
|
-
children:
|
|
1979
|
+
onClick: u,
|
|
1980
|
+
children: y.change
|
|
2048
1981
|
}) : void 0,
|
|
2049
|
-
className: r("payment-method--component w-full",
|
|
2050
|
-
children: /* @__PURE__ */
|
|
2051
|
-
className: r("relative
|
|
1982
|
+
className: r("payment-method--component w-full", _),
|
|
1983
|
+
children: /* @__PURE__ */ J("div", {
|
|
1984
|
+
className: r("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", x),
|
|
2052
1985
|
children: [
|
|
2053
|
-
/* @__PURE__ */
|
|
1986
|
+
/* @__PURE__ */ J("div", {
|
|
2054
1987
|
className: "relative flex items-start justify-between",
|
|
2055
|
-
children: [/* @__PURE__ */
|
|
1988
|
+
children: [/* @__PURE__ */ q("div", {
|
|
2056
1989
|
className: "flex size-7 items-center justify-center rounded-radius-md bg-gradient-to-br from-muted to-muted-foreground/60 shadow-sm",
|
|
2057
|
-
children: /* @__PURE__ */
|
|
2058
|
-
}), /* @__PURE__ */
|
|
1990
|
+
children: /* @__PURE__ */ q("div", { className: "size-icon rounded-radius-sm border border-warning-foreground/25 bg-warning-foreground/15" })
|
|
1991
|
+
}), /* @__PURE__ */ q(s, {
|
|
2059
1992
|
tag: "span",
|
|
2060
1993
|
weight: "bold",
|
|
2061
|
-
className: "rounded bg-inverse-surface px-space-md py-space-2xs tracking-[0.15em] text-inverse-foreground
|
|
2062
|
-
children:
|
|
1994
|
+
className: "rounded bg-inverse-surface px-space-md py-space-2xs tracking-[0.15em] text-inverse-foreground",
|
|
1995
|
+
children: b
|
|
2063
1996
|
})]
|
|
2064
1997
|
}),
|
|
2065
|
-
/* @__PURE__ */
|
|
1998
|
+
/* @__PURE__ */ q("div", {
|
|
2066
1999
|
className: "relative",
|
|
2067
|
-
children: /* @__PURE__ */
|
|
2000
|
+
children: /* @__PURE__ */ J(s, {
|
|
2068
2001
|
tag: "span",
|
|
2069
|
-
size: "
|
|
2002
|
+
size: "sm",
|
|
2070
2003
|
weight: "semibold",
|
|
2071
|
-
className: "block font-mono tracking-
|
|
2004
|
+
className: "payment-method--number block whitespace-nowrap font-mono tracking-widest text-inverse-foreground",
|
|
2072
2005
|
children: ["•••• •••• •••• ", t]
|
|
2073
2006
|
})
|
|
2074
2007
|
}),
|
|
2075
|
-
/* @__PURE__ */
|
|
2008
|
+
/* @__PURE__ */ J(d, {
|
|
2076
2009
|
direction: "horizontal",
|
|
2077
2010
|
align: "end",
|
|
2078
2011
|
justify: "between",
|
|
2079
2012
|
gap: "lg",
|
|
2080
2013
|
className: "relative",
|
|
2081
|
-
children: [/* @__PURE__ */
|
|
2014
|
+
children: [/* @__PURE__ */ q("div", {
|
|
2082
2015
|
className: "min-w-0",
|
|
2083
|
-
children: !!
|
|
2016
|
+
children: !!o && /* @__PURE__ */ J(me, { children: [/* @__PURE__ */ q(a, {
|
|
2084
2017
|
tone: "inverse",
|
|
2085
2018
|
className: "block",
|
|
2086
|
-
children:
|
|
2087
|
-
}), /* @__PURE__ */
|
|
2019
|
+
children: y.cardHolder
|
|
2020
|
+
}), /* @__PURE__ */ q(s, {
|
|
2088
2021
|
weight: "semibold",
|
|
2089
2022
|
className: "truncate text-inverse-foreground",
|
|
2090
|
-
children:
|
|
2023
|
+
children: o
|
|
2091
2024
|
})] })
|
|
2092
|
-
}), !!
|
|
2025
|
+
}), !!i && /* @__PURE__ */ J("div", {
|
|
2093
2026
|
className: "text-right shrink-0",
|
|
2094
|
-
children: [/* @__PURE__ */
|
|
2027
|
+
children: [/* @__PURE__ */ q(a, {
|
|
2095
2028
|
tone: "inverse",
|
|
2096
2029
|
className: "block",
|
|
2097
|
-
children:
|
|
2098
|
-
}), /* @__PURE__ */
|
|
2030
|
+
children: y.expires
|
|
2031
|
+
}), /* @__PURE__ */ q(g, {
|
|
2099
2032
|
weight: "semibold",
|
|
2100
2033
|
className: "tabular-nums text-inverse-foreground",
|
|
2101
|
-
children:
|
|
2034
|
+
children: i
|
|
2102
2035
|
})]
|
|
2103
2036
|
})]
|
|
2104
2037
|
})
|
|
@@ -2106,42 +2039,42 @@ function $t({ brand: e, last4: t, expiry: a, holderName: s, default: l = !1, onC
|
|
|
2106
2039
|
})
|
|
2107
2040
|
});
|
|
2108
2041
|
}
|
|
2109
|
-
|
|
2042
|
+
Pt.displayName = "PaymentMethod";
|
|
2110
2043
|
//#endregion
|
|
2111
2044
|
//#region src/components/blocks/commerce/seo-listing/seo-listing-score.ts
|
|
2112
|
-
var
|
|
2045
|
+
var Ft = {
|
|
2113
2046
|
titleMin: 35,
|
|
2114
2047
|
titleMax: 60,
|
|
2115
2048
|
descriptionMin: 120,
|
|
2116
2049
|
descriptionMax: 160,
|
|
2117
2050
|
permalinkMax: 75
|
|
2118
2051
|
};
|
|
2119
|
-
function
|
|
2052
|
+
function It(e) {
|
|
2120
2053
|
return {
|
|
2121
|
-
...
|
|
2054
|
+
...Ft,
|
|
2122
2055
|
...e
|
|
2123
2056
|
};
|
|
2124
2057
|
}
|
|
2125
|
-
function
|
|
2058
|
+
function Lt(e) {
|
|
2126
2059
|
return Number.isFinite(e) ? Math.max(0, Math.min(1, e)) : 0;
|
|
2127
2060
|
}
|
|
2128
|
-
function
|
|
2061
|
+
function Rt(e, t) {
|
|
2129
2062
|
if (t <= 0) return "missing";
|
|
2130
2063
|
let n = e / t;
|
|
2131
2064
|
return n >= .9 ? "good" : n >= .5 ? "review" : "missing";
|
|
2132
2065
|
}
|
|
2133
2066
|
function Z(e, t, n, r, i) {
|
|
2134
|
-
let a = Math.round(
|
|
2067
|
+
let a = Math.round(Lt(t) * n);
|
|
2135
2068
|
return {
|
|
2136
2069
|
id: e,
|
|
2137
2070
|
score: a,
|
|
2138
2071
|
maxScore: n,
|
|
2139
2072
|
actual: r,
|
|
2140
|
-
status:
|
|
2073
|
+
status: Rt(a, n),
|
|
2141
2074
|
...i
|
|
2142
2075
|
};
|
|
2143
2076
|
}
|
|
2144
|
-
function
|
|
2077
|
+
function zt(e, t, n) {
|
|
2145
2078
|
let r = e.trim().length;
|
|
2146
2079
|
if (r === 0) return 0;
|
|
2147
2080
|
if (r >= t && r <= n) return 1;
|
|
@@ -2154,22 +2087,22 @@ function Q(e) {
|
|
|
2154
2087
|
let t = e?.trim() ?? "";
|
|
2155
2088
|
return t ? ((t.split("#")[0] ?? "").split("?")[0] ?? "").replace(/^https?:\/\/[^/]+/i, "").replace(/^\/+|\/+$/g, "") : "";
|
|
2156
2089
|
}
|
|
2157
|
-
function
|
|
2090
|
+
function Bt(e) {
|
|
2158
2091
|
return Q(e).split("/").filter(Boolean).at(-1) ?? "";
|
|
2159
2092
|
}
|
|
2160
|
-
function
|
|
2093
|
+
function Vt(e, t = Ft.permalinkMax) {
|
|
2161
2094
|
let n = Q(e);
|
|
2162
2095
|
return n ? n.length <= t ? 1 : n.length > t * 2 ? .35 : Math.max(.55, 1 - (n.length - t) / t) : 0;
|
|
2163
2096
|
}
|
|
2164
|
-
function
|
|
2165
|
-
let t =
|
|
2097
|
+
function Ht(e) {
|
|
2098
|
+
let t = Bt(e);
|
|
2166
2099
|
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;
|
|
2167
2100
|
}
|
|
2168
|
-
function
|
|
2101
|
+
function Ut(e) {
|
|
2169
2102
|
let t = e?.trim() ?? "";
|
|
2170
2103
|
return t ? /^https:\/\//i.test(t) ? 1 : /^http:\/\//i.test(t) ? .6 : .45 : 0;
|
|
2171
2104
|
}
|
|
2172
|
-
function
|
|
2105
|
+
function Wt(e) {
|
|
2173
2106
|
let t = e.keyword?.trim().toLowerCase();
|
|
2174
2107
|
if (!t) return null;
|
|
2175
2108
|
let n = [
|
|
@@ -2179,32 +2112,32 @@ function un(e) {
|
|
|
2179
2112
|
].filter(Boolean).join(" ").toLowerCase();
|
|
2180
2113
|
return n ? n.includes(t) ? 1 : .35 : 0;
|
|
2181
2114
|
}
|
|
2182
|
-
function
|
|
2183
|
-
let t =
|
|
2184
|
-
Z("title",
|
|
2115
|
+
function Gt(e) {
|
|
2116
|
+
let t = It(e.limits), n = e.title?.trim() ?? "", r = e.description?.trim() ?? "", i = Q(e.permalink), a = Bt(e.permalink), o = [
|
|
2117
|
+
Z("title", zt(n, t.titleMin, t.titleMax), 30, n.length, {
|
|
2185
2118
|
min: t.titleMin,
|
|
2186
2119
|
max: t.titleMax
|
|
2187
2120
|
}),
|
|
2188
|
-
Z("description",
|
|
2121
|
+
Z("description", zt(r, t.descriptionMin, t.descriptionMax), 30, r.length, {
|
|
2189
2122
|
min: t.descriptionMin,
|
|
2190
2123
|
max: t.descriptionMax
|
|
2191
2124
|
}),
|
|
2192
|
-
Z("permalink",
|
|
2193
|
-
Z("slug",
|
|
2194
|
-
Z("url",
|
|
2195
|
-
], s =
|
|
2125
|
+
Z("permalink", Vt(e.permalink, t.permalinkMax), 15, i.length, { max: t.permalinkMax }),
|
|
2126
|
+
Z("slug", Ht(e.permalink), 10, a.length),
|
|
2127
|
+
Z("url", Ut(e.baseUrl), 10, e.baseUrl?.trim().length ?? 0)
|
|
2128
|
+
], s = Wt(e);
|
|
2196
2129
|
s !== null && o.push(Z("keyword", s, 5, e.keyword?.trim().length ?? 0));
|
|
2197
2130
|
let c = Math.round(o.reduce((e, t) => e + t.score, 0) / o.reduce((e, t) => e + t.maxScore, 0) * 100);
|
|
2198
2131
|
return {
|
|
2199
2132
|
score: c,
|
|
2200
|
-
status:
|
|
2133
|
+
status: Rt(c, 100),
|
|
2201
2134
|
checks: o,
|
|
2202
2135
|
limits: t
|
|
2203
2136
|
};
|
|
2204
2137
|
}
|
|
2205
2138
|
//#endregion
|
|
2206
2139
|
//#region src/components/blocks/commerce/seo-listing/types.ts
|
|
2207
|
-
var
|
|
2140
|
+
var Kt = {
|
|
2208
2141
|
title: "Search engine listing",
|
|
2209
2142
|
editLabel: "Edit search listing",
|
|
2210
2143
|
scoreLabel: "SEO score",
|
|
@@ -2237,90 +2170,75 @@ var fn = {
|
|
|
2237
2170
|
url: "Prefer a secure canonical URL.",
|
|
2238
2171
|
keyword: "Use the focus keyword in the title, description, or permalink."
|
|
2239
2172
|
}
|
|
2240
|
-
},
|
|
2173
|
+
}, qt = {
|
|
2241
2174
|
good: "success",
|
|
2242
2175
|
review: "warning",
|
|
2243
2176
|
missing: "destructive"
|
|
2244
|
-
},
|
|
2177
|
+
}, Jt = {
|
|
2245
2178
|
good: "[&_[data-slot=progress-indicator]]:bg-success",
|
|
2246
2179
|
review: "[&_[data-slot=progress-indicator]]:bg-warning",
|
|
2247
2180
|
missing: "[&_[data-slot=progress-indicator]]:bg-destructive"
|
|
2248
|
-
},
|
|
2249
|
-
good:
|
|
2250
|
-
review:
|
|
2251
|
-
missing:
|
|
2252
|
-
},
|
|
2253
|
-
good: "
|
|
2254
|
-
review: "
|
|
2255
|
-
missing: "
|
|
2256
|
-
}, _n = {
|
|
2257
|
-
good: xe,
|
|
2258
|
-
review: qe,
|
|
2259
|
-
missing: we
|
|
2260
|
-
}, vn = {
|
|
2261
|
-
good: "bg-success/10 text-success",
|
|
2262
|
-
review: "bg-warning/10 text-warning-accent",
|
|
2263
|
-
missing: "bg-destructive/10 text-destructive"
|
|
2264
|
-
}, yn = {
|
|
2265
|
-
good: "border-success/25 bg-success/5",
|
|
2266
|
-
review: "border-warning/30 bg-warning/10",
|
|
2267
|
-
missing: "border-destructive/20 bg-destructive/5"
|
|
2181
|
+
}, Yt = {
|
|
2182
|
+
good: ve,
|
|
2183
|
+
review: ke,
|
|
2184
|
+
missing: xe
|
|
2185
|
+
}, Xt = {
|
|
2186
|
+
good: "text-success",
|
|
2187
|
+
review: "text-warning-accent",
|
|
2188
|
+
missing: "text-destructive"
|
|
2268
2189
|
};
|
|
2269
|
-
function
|
|
2190
|
+
function Zt(e) {
|
|
2270
2191
|
return e.replace(/^\/+|\/+$/g, "");
|
|
2271
2192
|
}
|
|
2272
|
-
function
|
|
2193
|
+
function Qt(e, t, n) {
|
|
2273
2194
|
let r = Q(n).split("/").filter(Boolean);
|
|
2274
2195
|
return [
|
|
2275
2196
|
e,
|
|
2276
|
-
...t.map(
|
|
2197
|
+
...t.map(Zt).filter(Boolean),
|
|
2277
2198
|
...r
|
|
2278
2199
|
].filter(Boolean);
|
|
2279
2200
|
}
|
|
2280
|
-
function
|
|
2201
|
+
function $t(e, t, n) {
|
|
2281
2202
|
if (!e.trim()) return;
|
|
2282
|
-
let r = e.replace(/\/+$/g, ""), i = [...t.map(
|
|
2203
|
+
let r = e.replace(/\/+$/g, ""), i = [...t.map(Zt).filter(Boolean), ...Q(n).split("/").filter(Boolean)].join("/");
|
|
2283
2204
|
return i ? `${r}/${i}` : r;
|
|
2284
2205
|
}
|
|
2285
|
-
function
|
|
2206
|
+
function en(e, t) {
|
|
2286
2207
|
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];
|
|
2287
2208
|
}
|
|
2288
|
-
function
|
|
2289
|
-
let
|
|
2290
|
-
return /* @__PURE__ */
|
|
2291
|
-
className:
|
|
2292
|
-
children: /* @__PURE__ */
|
|
2209
|
+
function tn({ check: e, detail: t, strings: n }) {
|
|
2210
|
+
let i = Yt[e.status];
|
|
2211
|
+
return /* @__PURE__ */ q("div", {
|
|
2212
|
+
className: "seo-listing-card--check min-w-0",
|
|
2213
|
+
children: /* @__PURE__ */ J(d, {
|
|
2293
2214
|
direction: "horizontal",
|
|
2294
|
-
gap: "
|
|
2215
|
+
gap: "md",
|
|
2295
2216
|
align: "start",
|
|
2296
2217
|
wrap: !1,
|
|
2297
|
-
children: [/* @__PURE__ */
|
|
2298
|
-
className: r("seo-listing-card--check-icon
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
"aria-hidden": "true"
|
|
2302
|
-
})
|
|
2303
|
-
}), /* @__PURE__ */ K(u, {
|
|
2218
|
+
children: [/* @__PURE__ */ q(i, {
|
|
2219
|
+
className: r("seo-listing-card--check-icon size-icon shrink-0 translate-y-0.5", Xt[e.status]),
|
|
2220
|
+
"aria-hidden": "true"
|
|
2221
|
+
}), /* @__PURE__ */ J(d, {
|
|
2304
2222
|
gap: "dense",
|
|
2305
2223
|
className: "min-w-0 flex-1",
|
|
2306
|
-
children: [/* @__PURE__ */
|
|
2224
|
+
children: [/* @__PURE__ */ J(d, {
|
|
2307
2225
|
direction: "horizontal",
|
|
2308
2226
|
gap: "sm",
|
|
2309
2227
|
justify: "between",
|
|
2310
2228
|
wrap: !1,
|
|
2311
|
-
children: [/* @__PURE__ */
|
|
2229
|
+
children: [/* @__PURE__ */ q(s, {
|
|
2312
2230
|
tag: "span",
|
|
2313
2231
|
weight: "medium",
|
|
2314
2232
|
className: "truncate",
|
|
2315
2233
|
children: n.checkLabels[e.id]
|
|
2316
|
-
}), /* @__PURE__ */
|
|
2317
|
-
tone:
|
|
2234
|
+
}), /* @__PURE__ */ q(O, {
|
|
2235
|
+
tone: qt[e.status],
|
|
2318
2236
|
size: "sm",
|
|
2319
2237
|
inline: !0,
|
|
2320
2238
|
className: "shrink-0",
|
|
2321
2239
|
children: n.status[e.status]
|
|
2322
2240
|
})]
|
|
2323
|
-
}), /* @__PURE__ */
|
|
2241
|
+
}), /* @__PURE__ */ q(s, {
|
|
2324
2242
|
size: "xs",
|
|
2325
2243
|
type: "secondary",
|
|
2326
2244
|
lineHeight: "snug",
|
|
@@ -2330,72 +2248,74 @@ function wn({ check: e, detail: t, strings: n }) {
|
|
|
2330
2248
|
})
|
|
2331
2249
|
});
|
|
2332
2250
|
}
|
|
2333
|
-
function
|
|
2334
|
-
let
|
|
2335
|
-
title:
|
|
2336
|
-
description:
|
|
2337
|
-
permalink:
|
|
2251
|
+
function nn({ siteName: e, baseUrl: t, pathSegments: i = [], permalink: a, title: o, description: u, price: f, keyword: h, score: _, limits: y, showChecks: b = !0, onEdit: x, surface: S = "flat", padding: w = S === "flat" ? "none" : "md", headerDivider: T = S !== "flat" && void 0, className: E, strings: D }) {
|
|
2252
|
+
let k = n(Kt, D), A = t?.trim() || k.urlFallback, j = e?.trim() || k.siteFallback, M = o?.trim() || k.titleFallback, N = u?.trim() || k.descriptionFallback, P = _ ?? Gt({
|
|
2253
|
+
title: o,
|
|
2254
|
+
description: u,
|
|
2255
|
+
permalink: a,
|
|
2338
2256
|
baseUrl: t,
|
|
2339
|
-
keyword:
|
|
2340
|
-
limits:
|
|
2341
|
-
}),
|
|
2342
|
-
return /* @__PURE__ */
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2257
|
+
keyword: h,
|
|
2258
|
+
limits: y
|
|
2259
|
+
}), F = $t(A, i, a), I = Qt(A, i, a), ee = qt[P.status];
|
|
2260
|
+
return /* @__PURE__ */ J(p, {
|
|
2261
|
+
surface: S,
|
|
2262
|
+
padding: w,
|
|
2263
|
+
headerDivider: T,
|
|
2264
|
+
title: k.title,
|
|
2265
|
+
titleSuffix: /* @__PURE__ */ J(O, {
|
|
2266
|
+
tone: ee,
|
|
2347
2267
|
size: "sm",
|
|
2348
2268
|
inline: !0,
|
|
2349
2269
|
className: "shrink-0",
|
|
2350
2270
|
children: [
|
|
2351
|
-
|
|
2271
|
+
P.score,
|
|
2352
2272
|
"/100 ",
|
|
2353
|
-
|
|
2273
|
+
k.status[P.status]
|
|
2354
2274
|
]
|
|
2355
2275
|
}),
|
|
2356
|
-
className: r("seo-listing-card--component @container/seo-listing-card w-full",
|
|
2357
|
-
contentGap: "
|
|
2358
|
-
headerAction:
|
|
2276
|
+
className: r("seo-listing-card--component @container/seo-listing-card w-full", E),
|
|
2277
|
+
contentGap: "2xl",
|
|
2278
|
+
headerAction: x ? /* @__PURE__ */ q(l, {
|
|
2359
2279
|
type: "button",
|
|
2360
2280
|
tone: "secondary",
|
|
2361
2281
|
buttonStyle: "ghost",
|
|
2362
2282
|
size: "sm",
|
|
2363
2283
|
iconOnly: !0,
|
|
2364
|
-
"aria-label":
|
|
2365
|
-
onClick:
|
|
2366
|
-
children: /* @__PURE__ */
|
|
2284
|
+
"aria-label": k.editLabel,
|
|
2285
|
+
onClick: x,
|
|
2286
|
+
children: /* @__PURE__ */ q(Ee, { className: "size-icon-sm" })
|
|
2367
2287
|
}) : void 0,
|
|
2368
|
-
children: [/* @__PURE__ */
|
|
2288
|
+
children: [/* @__PURE__ */ q("div", {
|
|
2369
2289
|
"data-artwork": "serp",
|
|
2370
2290
|
className: "seo-listing-card--preview min-w-0 rounded-radius border border-border/60 bg-background p-surface shadow-xs",
|
|
2371
|
-
children: /* @__PURE__ */
|
|
2291
|
+
children: /* @__PURE__ */ J(d, {
|
|
2372
2292
|
gap: "sm",
|
|
2373
2293
|
className: "min-w-0",
|
|
2374
2294
|
children: [
|
|
2375
|
-
/* @__PURE__ */
|
|
2295
|
+
/* @__PURE__ */ J(d, {
|
|
2376
2296
|
direction: "horizontal",
|
|
2377
2297
|
gap: "sm",
|
|
2378
2298
|
wrap: !1,
|
|
2379
|
-
children: [/* @__PURE__ */
|
|
2299
|
+
children: [/* @__PURE__ */ q(s, {
|
|
2380
2300
|
weight: "medium",
|
|
2381
2301
|
className: "truncate",
|
|
2382
|
-
children:
|
|
2383
|
-
}), !!
|
|
2302
|
+
children: j
|
|
2303
|
+
}), !!F && /* @__PURE__ */ q(we, {
|
|
2384
2304
|
className: "size-icon-sm shrink-0 text-muted-foreground",
|
|
2385
2305
|
"aria-hidden": "true"
|
|
2386
2306
|
})]
|
|
2387
2307
|
}),
|
|
2388
|
-
/* @__PURE__ */
|
|
2308
|
+
/* @__PURE__ */ q("div", {
|
|
2389
2309
|
className: "seo-listing-card--url flex min-w-0 flex-wrap items-center gap-x-space-sm gap-y-space-2xs",
|
|
2390
|
-
children:
|
|
2310
|
+
children: I.map((e, t) => /* @__PURE__ */ J("span", {
|
|
2391
2311
|
className: "inline-flex min-w-0 items-center gap-space-sm",
|
|
2392
|
-
children: [/* @__PURE__ */
|
|
2312
|
+
children: [/* @__PURE__ */ q(s, {
|
|
2393
2313
|
tag: "span",
|
|
2394
2314
|
size: "xs",
|
|
2395
2315
|
type: "secondary",
|
|
2396
2316
|
className: "truncate",
|
|
2397
2317
|
children: e
|
|
2398
|
-
}), t <
|
|
2318
|
+
}), t < I.length - 1 && /* @__PURE__ */ q(s, {
|
|
2399
2319
|
tag: "span",
|
|
2400
2320
|
size: "xs",
|
|
2401
2321
|
type: "secondary",
|
|
@@ -2404,177 +2324,155 @@ function Tn({ siteName: e, baseUrl: t, pathSegments: a = [], permalink: o, title
|
|
|
2404
2324
|
})]
|
|
2405
2325
|
}, `${e}-${t}`))
|
|
2406
2326
|
}),
|
|
2407
|
-
|
|
2408
|
-
href:
|
|
2327
|
+
F ? /* @__PURE__ */ q(c, {
|
|
2328
|
+
href: F,
|
|
2409
2329
|
size: "base",
|
|
2410
2330
|
lineHeight: "snug",
|
|
2411
2331
|
underline: !1,
|
|
2412
2332
|
className: "seo-listing-card--snippet-title block text-[#1a0dab] dark:text-[#8ab4f8]",
|
|
2413
|
-
children:
|
|
2414
|
-
}) : /* @__PURE__ */
|
|
2333
|
+
children: M
|
|
2334
|
+
}) : /* @__PURE__ */ q(s, {
|
|
2415
2335
|
size: "base",
|
|
2416
2336
|
lineHeight: "snug",
|
|
2417
2337
|
className: "seo-listing-card--snippet-title text-[#1a0dab] dark:text-[#8ab4f8]",
|
|
2418
|
-
children:
|
|
2338
|
+
children: M
|
|
2419
2339
|
}),
|
|
2420
|
-
/* @__PURE__ */
|
|
2340
|
+
/* @__PURE__ */ q(s, {
|
|
2421
2341
|
type: "secondary",
|
|
2422
2342
|
lineHeight: "relaxed",
|
|
2423
2343
|
className: "seo-listing-card--description max-w-4xl",
|
|
2424
|
-
children:
|
|
2344
|
+
children: N
|
|
2425
2345
|
}),
|
|
2426
|
-
!!f && /* @__PURE__ */
|
|
2346
|
+
!!f && /* @__PURE__ */ q(v, {
|
|
2427
2347
|
size: "xs",
|
|
2428
2348
|
className: "seo-listing-card--price block tabular-nums",
|
|
2429
2349
|
children: f
|
|
2430
2350
|
})
|
|
2431
2351
|
]
|
|
2432
2352
|
})
|
|
2433
|
-
}), /* @__PURE__ */
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
justify: "between",
|
|
2439
|
-
wrap: !1,
|
|
2440
|
-
className: "border-b border-border/60 p-surface-xs",
|
|
2441
|
-
children: [/* @__PURE__ */ K(u, {
|
|
2353
|
+
}), /* @__PURE__ */ J(d, {
|
|
2354
|
+
gap: "lg",
|
|
2355
|
+
className: "seo-listing-card--score",
|
|
2356
|
+
children: [
|
|
2357
|
+
/* @__PURE__ */ J(d, {
|
|
2442
2358
|
direction: "horizontal",
|
|
2443
|
-
gap: "
|
|
2359
|
+
gap: "lg",
|
|
2360
|
+
justify: "between",
|
|
2361
|
+
align: "start",
|
|
2444
2362
|
wrap: !1,
|
|
2445
|
-
children: [/* @__PURE__ */
|
|
2446
|
-
|
|
2447
|
-
children: /* @__PURE__ */ G(Ae, {
|
|
2448
|
-
className: "size-icon-sm",
|
|
2449
|
-
"aria-hidden": "true"
|
|
2450
|
-
})
|
|
2451
|
-
}), /* @__PURE__ */ K("div", {
|
|
2363
|
+
children: [/* @__PURE__ */ J(d, {
|
|
2364
|
+
gap: "dense",
|
|
2452
2365
|
className: "min-w-0",
|
|
2453
|
-
children: [/* @__PURE__ */
|
|
2366
|
+
children: [/* @__PURE__ */ q(s, {
|
|
2454
2367
|
weight: "semibold",
|
|
2455
|
-
children:
|
|
2456
|
-
}), /* @__PURE__ */
|
|
2368
|
+
children: k.scoreLabel
|
|
2369
|
+
}), /* @__PURE__ */ J(v, {
|
|
2457
2370
|
size: "xs",
|
|
2458
2371
|
className: "tabular-nums",
|
|
2459
2372
|
children: [
|
|
2460
|
-
/* @__PURE__ */
|
|
2461
|
-
value:
|
|
2373
|
+
/* @__PURE__ */ q(C, {
|
|
2374
|
+
value: P.checks.length,
|
|
2462
2375
|
size: "xs",
|
|
2463
2376
|
type: "secondary",
|
|
2464
2377
|
align: "left"
|
|
2465
2378
|
}),
|
|
2466
2379
|
" ",
|
|
2467
|
-
|
|
2380
|
+
k.checksLabel
|
|
2468
2381
|
]
|
|
2469
2382
|
})]
|
|
2470
|
-
})
|
|
2471
|
-
}), /* @__PURE__ */ K(u, {
|
|
2472
|
-
direction: "horizontal",
|
|
2473
|
-
gap: "sm",
|
|
2474
|
-
wrap: !1,
|
|
2475
|
-
className: "shrink-0",
|
|
2476
|
-
children: [/* @__PURE__ */ K(h, {
|
|
2383
|
+
}), /* @__PURE__ */ J(g, {
|
|
2477
2384
|
weight: "semibold",
|
|
2478
|
-
className: "tabular-nums",
|
|
2479
|
-
children: [
|
|
2480
|
-
}), /* @__PURE__ */ G(D, {
|
|
2481
|
-
tone: j,
|
|
2482
|
-
size: "sm",
|
|
2483
|
-
inline: !0,
|
|
2484
|
-
children: w.status[A.status]
|
|
2385
|
+
className: "shrink-0 tabular-nums",
|
|
2386
|
+
children: [P.score, "/100"]
|
|
2485
2387
|
})]
|
|
2486
|
-
})
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
className:
|
|
2494
|
-
|
|
2495
|
-
className: "seo-listing-card--checks grid gap-x-space-lg gap-y-space-lg @xl/seo-listing-card:grid-cols-2",
|
|
2496
|
-
children: A.checks.map((e) => /* @__PURE__ */ G(wn, {
|
|
2388
|
+
}),
|
|
2389
|
+
/* @__PURE__ */ q(m, {
|
|
2390
|
+
value: P.score,
|
|
2391
|
+
"aria-label": k.scoreLabel,
|
|
2392
|
+
className: r("seo-listing-card--score-progress", "[&_[data-slot=progress-track]]:h-space-md", Jt[P.status])
|
|
2393
|
+
}),
|
|
2394
|
+
!!b && /* @__PURE__ */ q("div", {
|
|
2395
|
+
className: "seo-listing-card--checks grid gap-x-space-2xl gap-y-space-lg @xl/seo-listing-card:grid-cols-2",
|
|
2396
|
+
children: P.checks.map((e) => /* @__PURE__ */ q(tn, {
|
|
2497
2397
|
check: e,
|
|
2498
|
-
detail:
|
|
2499
|
-
strings:
|
|
2398
|
+
detail: en(e, k),
|
|
2399
|
+
strings: k
|
|
2500
2400
|
}, e.id))
|
|
2501
|
-
})
|
|
2502
|
-
|
|
2401
|
+
})
|
|
2402
|
+
]
|
|
2503
2403
|
})]
|
|
2504
2404
|
});
|
|
2505
2405
|
}
|
|
2506
|
-
|
|
2406
|
+
nn.displayName = "SeoListingCard";
|
|
2507
2407
|
//#endregion
|
|
2508
2408
|
//#region src/components/blocks/commerce/invoice-mini/types.ts
|
|
2509
|
-
var
|
|
2409
|
+
var rn = {
|
|
2510
2410
|
paid: "Paid",
|
|
2511
2411
|
pending: "Pending",
|
|
2512
2412
|
overdue: "Overdue",
|
|
2513
2413
|
items: (e) => e === 1 ? "1 line item" : `${e} line items`,
|
|
2514
2414
|
due: "Due"
|
|
2515
|
-
},
|
|
2415
|
+
}, an = {
|
|
2516
2416
|
paid: "success",
|
|
2517
2417
|
pending: "warning",
|
|
2518
2418
|
overdue: "destructive"
|
|
2519
2419
|
};
|
|
2520
2420
|
//#endregion
|
|
2521
2421
|
//#region src/components/blocks/commerce/invoice-mini/invoice-mini.tsx
|
|
2522
|
-
function
|
|
2523
|
-
let
|
|
2524
|
-
paid:
|
|
2525
|
-
pending:
|
|
2526
|
-
overdue:
|
|
2422
|
+
function on({ invoice: e, className: n, strings: i }) {
|
|
2423
|
+
let a = t(rn, i), o = {
|
|
2424
|
+
paid: a.paid,
|
|
2425
|
+
pending: a.pending,
|
|
2426
|
+
overdue: a.overdue
|
|
2527
2427
|
};
|
|
2528
|
-
return /* @__PURE__ */
|
|
2428
|
+
return /* @__PURE__ */ J(d, {
|
|
2529
2429
|
gap: "md",
|
|
2530
2430
|
"data-component": "invoice-mini",
|
|
2531
2431
|
"data-slot": "invoice-mini",
|
|
2532
2432
|
className: r("invoice-mini--component", n),
|
|
2533
2433
|
children: [
|
|
2534
|
-
/* @__PURE__ */
|
|
2434
|
+
/* @__PURE__ */ J(d, {
|
|
2535
2435
|
direction: "horizontal",
|
|
2536
|
-
gap: "
|
|
2537
|
-
justify: "between",
|
|
2436
|
+
gap: "sm",
|
|
2538
2437
|
wrap: !1,
|
|
2539
|
-
children: [/* @__PURE__ */
|
|
2540
|
-
className: "min-w-0
|
|
2438
|
+
children: [/* @__PURE__ */ q(y, {
|
|
2439
|
+
className: "min-w-0 truncate tracking-wide",
|
|
2541
2440
|
children: e.invoiceNumber
|
|
2542
|
-
}), /* @__PURE__ */
|
|
2543
|
-
tone:
|
|
2441
|
+
}), /* @__PURE__ */ q(O, {
|
|
2442
|
+
tone: an[e.status],
|
|
2544
2443
|
size: "sm",
|
|
2545
|
-
dot: !0,
|
|
2546
2444
|
className: "shrink-0",
|
|
2547
|
-
children:
|
|
2445
|
+
children: o[e.status]
|
|
2548
2446
|
})]
|
|
2549
2447
|
}),
|
|
2550
|
-
/* @__PURE__ */
|
|
2448
|
+
/* @__PURE__ */ q(s, {
|
|
2551
2449
|
type: "secondary",
|
|
2552
2450
|
className: "truncate",
|
|
2553
2451
|
children: e.customerName
|
|
2554
2452
|
}),
|
|
2555
|
-
/* @__PURE__ */
|
|
2453
|
+
/* @__PURE__ */ J(d, {
|
|
2556
2454
|
direction: "horizontal",
|
|
2557
2455
|
gap: "lg",
|
|
2558
2456
|
align: "end",
|
|
2559
2457
|
justify: "between",
|
|
2560
2458
|
className: "pt-space-xs",
|
|
2561
|
-
children: [/* @__PURE__ */
|
|
2459
|
+
children: [/* @__PURE__ */ J(d, {
|
|
2562
2460
|
gap: "2xs",
|
|
2563
2461
|
className: "min-w-0",
|
|
2564
|
-
children: [/* @__PURE__ */
|
|
2462
|
+
children: [/* @__PURE__ */ q(s, {
|
|
2565
2463
|
size: "xs",
|
|
2566
2464
|
type: "secondary",
|
|
2567
|
-
children:
|
|
2568
|
-
}), /* @__PURE__ */
|
|
2465
|
+
children: a.items(e.lineItemsCount)
|
|
2466
|
+
}), /* @__PURE__ */ J(v, {
|
|
2569
2467
|
size: "xs",
|
|
2570
2468
|
className: "whitespace-nowrap tabular-nums",
|
|
2571
2469
|
children: [
|
|
2572
|
-
|
|
2470
|
+
a.due,
|
|
2573
2471
|
" ",
|
|
2574
2472
|
e.dueDate
|
|
2575
2473
|
]
|
|
2576
2474
|
})]
|
|
2577
|
-
}), /* @__PURE__ */
|
|
2475
|
+
}), /* @__PURE__ */ q(g, {
|
|
2578
2476
|
size: "base",
|
|
2579
2477
|
weight: "bold",
|
|
2580
2478
|
className: r("ml-auto shrink-0 tabular-nums leading-none"),
|
|
@@ -2584,34 +2482,34 @@ function On({ invoice: e, className: n, strings: a }) {
|
|
|
2584
2482
|
]
|
|
2585
2483
|
});
|
|
2586
2484
|
}
|
|
2587
|
-
|
|
2485
|
+
on.displayName = "InvoiceMini";
|
|
2588
2486
|
//#endregion
|
|
2589
2487
|
//#region src/components/blocks/commerce/invoice-header/types.ts
|
|
2590
|
-
var
|
|
2488
|
+
var sn = {
|
|
2591
2489
|
title: "Invoice",
|
|
2592
|
-
billFrom: "Bill
|
|
2593
|
-
billTo: "Bill
|
|
2490
|
+
billFrom: "Bill from",
|
|
2491
|
+
billTo: "Bill to",
|
|
2594
2492
|
issued: "Issued",
|
|
2595
2493
|
due: "Due",
|
|
2596
|
-
amountDue: "Amount
|
|
2494
|
+
amountDue: "Amount due",
|
|
2597
2495
|
paid: "Paid",
|
|
2598
2496
|
pending: "Pending",
|
|
2599
2497
|
overdue: "Overdue"
|
|
2600
2498
|
};
|
|
2601
2499
|
//#endregion
|
|
2602
2500
|
//#region src/components/blocks/commerce/invoice-header/invoice-header.tsx
|
|
2603
|
-
function
|
|
2604
|
-
return /* @__PURE__ */
|
|
2501
|
+
function cn({ eyebrow: e, name: t, location: n }) {
|
|
2502
|
+
return /* @__PURE__ */ J(d, {
|
|
2605
2503
|
gap: "xs",
|
|
2606
2504
|
className: "invoice-header--party",
|
|
2607
2505
|
children: [
|
|
2608
|
-
/* @__PURE__ */
|
|
2609
|
-
/* @__PURE__ */
|
|
2506
|
+
/* @__PURE__ */ q(a, { children: e }),
|
|
2507
|
+
/* @__PURE__ */ q(s, {
|
|
2610
2508
|
weight: "semibold",
|
|
2611
2509
|
className: "leading-snug",
|
|
2612
2510
|
children: t
|
|
2613
2511
|
}),
|
|
2614
|
-
!!n && /* @__PURE__ */
|
|
2512
|
+
!!n && /* @__PURE__ */ q(s, {
|
|
2615
2513
|
size: "xs",
|
|
2616
2514
|
type: "secondary",
|
|
2617
2515
|
className: "leading-snug",
|
|
@@ -2620,34 +2518,33 @@ function An({ eyebrow: e, name: t, location: n }) {
|
|
|
2620
2518
|
]
|
|
2621
2519
|
});
|
|
2622
2520
|
}
|
|
2623
|
-
function
|
|
2624
|
-
let _ = n(
|
|
2521
|
+
function ln({ invoiceNumber: e, status: t, statusTone: i, from: c, to: l, issuedDate: f, dueDate: p, amount: m, className: h, strings: g }) {
|
|
2522
|
+
let _ = n(sn, g), v = {
|
|
2625
2523
|
paid: _.paid,
|
|
2626
2524
|
pending: _.pending,
|
|
2627
2525
|
overdue: _.overdue
|
|
2628
|
-
}, y =
|
|
2629
|
-
return /* @__PURE__ */
|
|
2526
|
+
}, y = i ?? an[t];
|
|
2527
|
+
return /* @__PURE__ */ J(d, {
|
|
2630
2528
|
gap: "2xl",
|
|
2631
2529
|
"data-component": "invoice-header",
|
|
2632
2530
|
"data-slot": "invoice-header",
|
|
2633
2531
|
className: r("invoice-header--component min-w-0", h),
|
|
2634
2532
|
"aria-label": _.title,
|
|
2635
2533
|
children: [
|
|
2636
|
-
/* @__PURE__ */
|
|
2534
|
+
/* @__PURE__ */ J(d, {
|
|
2637
2535
|
direction: "horizontal",
|
|
2638
2536
|
align: "center",
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
children: [/* @__PURE__ */ G(i, {
|
|
2537
|
+
gap: "sm",
|
|
2538
|
+
children: [/* @__PURE__ */ q(s, {
|
|
2642
2539
|
weight: "bold",
|
|
2643
2540
|
className: "font-mono tracking-wide",
|
|
2644
2541
|
children: e
|
|
2645
|
-
}), /* @__PURE__ */
|
|
2542
|
+
}), /* @__PURE__ */ q(O, {
|
|
2646
2543
|
tone: y,
|
|
2647
2544
|
children: v[t]
|
|
2648
2545
|
})]
|
|
2649
2546
|
}),
|
|
2650
|
-
/* @__PURE__ */
|
|
2547
|
+
/* @__PURE__ */ J(u, {
|
|
2651
2548
|
columns: {
|
|
2652
2549
|
base: 1,
|
|
2653
2550
|
sm: 2
|
|
@@ -2656,41 +2553,38 @@ function jn({ invoiceNumber: e, status: t, statusTone: s, from: c, to: d, issued
|
|
|
2656
2553
|
base: "xl",
|
|
2657
2554
|
sm: "2xl"
|
|
2658
2555
|
},
|
|
2659
|
-
children: [/* @__PURE__ */
|
|
2556
|
+
children: [/* @__PURE__ */ q(cn, {
|
|
2660
2557
|
eyebrow: _.billFrom,
|
|
2661
2558
|
name: c.name,
|
|
2662
2559
|
location: c.location
|
|
2663
|
-
}), /* @__PURE__ */
|
|
2560
|
+
}), /* @__PURE__ */ q(cn, {
|
|
2664
2561
|
eyebrow: _.billTo,
|
|
2665
|
-
name:
|
|
2666
|
-
location:
|
|
2562
|
+
name: l.name,
|
|
2563
|
+
location: l.location
|
|
2667
2564
|
})]
|
|
2668
2565
|
}),
|
|
2669
|
-
/* @__PURE__ */
|
|
2670
|
-
/* @__PURE__ */ K(u, {
|
|
2566
|
+
/* @__PURE__ */ J(d, {
|
|
2671
2567
|
direction: "horizontal",
|
|
2672
2568
|
gap: "xl",
|
|
2673
2569
|
align: "end",
|
|
2674
2570
|
justify: "between",
|
|
2675
|
-
children: [/* @__PURE__ */
|
|
2571
|
+
children: [/* @__PURE__ */ J(d, {
|
|
2676
2572
|
gap: "xs",
|
|
2677
|
-
children: [!!f && /* @__PURE__ */ G
|
|
2573
|
+
children: [!!f && /* @__PURE__ */ q(G, {
|
|
2678
2574
|
layout: "inline",
|
|
2679
2575
|
label: _.issued,
|
|
2680
2576
|
value: f,
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
}), !!p && /* @__PURE__ */ G(H, {
|
|
2577
|
+
valueClassName: "font-medium tabular-nums"
|
|
2578
|
+
}), !!p && /* @__PURE__ */ q(G, {
|
|
2684
2579
|
layout: "inline",
|
|
2685
2580
|
label: _.due,
|
|
2686
2581
|
value: p,
|
|
2687
|
-
|
|
2688
|
-
valueClassName: "font-medium"
|
|
2582
|
+
valueClassName: "font-medium tabular-nums"
|
|
2689
2583
|
})]
|
|
2690
|
-
}), /* @__PURE__ */
|
|
2584
|
+
}), /* @__PURE__ */ J(d, {
|
|
2691
2585
|
gap: "dense",
|
|
2692
2586
|
className: "text-right",
|
|
2693
|
-
children: [/* @__PURE__ */
|
|
2587
|
+
children: [/* @__PURE__ */ q(a, { children: _.amountDue }), /* @__PURE__ */ q(o, {
|
|
2694
2588
|
tag: "h3",
|
|
2695
2589
|
className: r("text-base tabular-nums leading-none tracking-tight border-none pb-0"),
|
|
2696
2590
|
children: m
|
|
@@ -2700,23 +2594,23 @@ function jn({ invoiceNumber: e, status: t, statusTone: s, from: c, to: d, issued
|
|
|
2700
2594
|
]
|
|
2701
2595
|
});
|
|
2702
2596
|
}
|
|
2703
|
-
|
|
2597
|
+
ln.displayName = "InvoiceHeader";
|
|
2704
2598
|
//#endregion
|
|
2705
2599
|
//#region src/components/blocks/commerce/invoice-line-items/types.ts
|
|
2706
|
-
var
|
|
2600
|
+
var un = {
|
|
2707
2601
|
item: "Item",
|
|
2708
2602
|
quantity: "Qty",
|
|
2709
2603
|
price: "Price",
|
|
2710
2604
|
subtotal: "Subtotal",
|
|
2711
2605
|
tax: "Tax",
|
|
2712
2606
|
total: "Total"
|
|
2713
|
-
},
|
|
2607
|
+
}, dn = "border border-border shadow-sm", fn = {
|
|
2714
2608
|
left: "text-left justify-start",
|
|
2715
2609
|
right: "text-right justify-end",
|
|
2716
2610
|
center: "text-center justify-center"
|
|
2717
2611
|
};
|
|
2718
|
-
function
|
|
2719
|
-
return /* @__PURE__ */
|
|
2612
|
+
function pn({ amount: e, currency: t, weight: n = "regular" }) {
|
|
2613
|
+
return /* @__PURE__ */ q(S, {
|
|
2720
2614
|
amount: e,
|
|
2721
2615
|
currency: t,
|
|
2722
2616
|
minimumFractionDigits: 2,
|
|
@@ -2724,13 +2618,13 @@ function Fn({ amount: e, currency: t, weight: n = "regular" }) {
|
|
|
2724
2618
|
weight: n
|
|
2725
2619
|
});
|
|
2726
2620
|
}
|
|
2727
|
-
function
|
|
2621
|
+
function mn(e, t) {
|
|
2728
2622
|
return [
|
|
2729
2623
|
{
|
|
2730
2624
|
id: "description",
|
|
2731
2625
|
header: t.item,
|
|
2732
2626
|
width: "minmax(0,1fr)",
|
|
2733
|
-
cell: (e) => /* @__PURE__ */
|
|
2627
|
+
cell: (e) => /* @__PURE__ */ q(s, {
|
|
2734
2628
|
className: "break-words",
|
|
2735
2629
|
children: e.description
|
|
2736
2630
|
})
|
|
@@ -2740,7 +2634,7 @@ function In(e, t) {
|
|
|
2740
2634
|
header: t.quantity,
|
|
2741
2635
|
width: "36px",
|
|
2742
2636
|
align: "center",
|
|
2743
|
-
cell: (e) => /* @__PURE__ */
|
|
2637
|
+
cell: (e) => /* @__PURE__ */ q(C, {
|
|
2744
2638
|
value: e.qty,
|
|
2745
2639
|
align: "center"
|
|
2746
2640
|
})
|
|
@@ -2750,7 +2644,7 @@ function In(e, t) {
|
|
|
2750
2644
|
header: t.price,
|
|
2751
2645
|
width: "82px",
|
|
2752
2646
|
align: "right",
|
|
2753
|
-
cell: (t) => /* @__PURE__ */
|
|
2647
|
+
cell: (t) => /* @__PURE__ */ q(pn, {
|
|
2754
2648
|
amount: t.price,
|
|
2755
2649
|
currency: e
|
|
2756
2650
|
})
|
|
@@ -2760,38 +2654,38 @@ function In(e, t) {
|
|
|
2760
2654
|
header: t.total,
|
|
2761
2655
|
width: "82px",
|
|
2762
2656
|
align: "right",
|
|
2763
|
-
cell: (t) => /* @__PURE__ */
|
|
2657
|
+
cell: (t) => /* @__PURE__ */ q(pn, {
|
|
2764
2658
|
amount: t.total,
|
|
2765
2659
|
currency: e
|
|
2766
2660
|
})
|
|
2767
2661
|
}
|
|
2768
2662
|
];
|
|
2769
2663
|
}
|
|
2770
|
-
function
|
|
2664
|
+
function hn(e, t, n, r) {
|
|
2771
2665
|
let i = e.reduce((e, t) => e + t.total, 0), a = Math.round(i * t * 100) / 100, o = i + a;
|
|
2772
2666
|
return [
|
|
2773
2667
|
{
|
|
2774
2668
|
label: r.subtotal,
|
|
2775
|
-
value: /* @__PURE__ */
|
|
2669
|
+
value: /* @__PURE__ */ q(pn, {
|
|
2776
2670
|
amount: i,
|
|
2777
2671
|
currency: n
|
|
2778
2672
|
})
|
|
2779
2673
|
},
|
|
2780
2674
|
{
|
|
2781
|
-
label: /* @__PURE__ */
|
|
2675
|
+
label: /* @__PURE__ */ J(me, { children: [
|
|
2782
2676
|
r.tax,
|
|
2783
2677
|
" (",
|
|
2784
|
-
/* @__PURE__ */
|
|
2678
|
+
/* @__PURE__ */ q(x, { value: t }),
|
|
2785
2679
|
")"
|
|
2786
2680
|
] }),
|
|
2787
|
-
value: /* @__PURE__ */
|
|
2681
|
+
value: /* @__PURE__ */ q(pn, {
|
|
2788
2682
|
amount: a,
|
|
2789
2683
|
currency: n
|
|
2790
2684
|
})
|
|
2791
2685
|
},
|
|
2792
2686
|
{
|
|
2793
2687
|
label: r.total,
|
|
2794
|
-
value: /* @__PURE__ */
|
|
2688
|
+
value: /* @__PURE__ */ q(pn, {
|
|
2795
2689
|
amount: o,
|
|
2796
2690
|
currency: n,
|
|
2797
2691
|
weight: "bold"
|
|
@@ -2800,52 +2694,52 @@ function Ln(e, t, n, r) {
|
|
|
2800
2694
|
}
|
|
2801
2695
|
];
|
|
2802
2696
|
}
|
|
2803
|
-
function
|
|
2804
|
-
let p = n(
|
|
2805
|
-
return /* @__PURE__ */
|
|
2806
|
-
className: r("invoice-line-items--component", "@container/invoice-line-items w-full min-w-0 max-w-full overflow-hidden rounded-radius bg-card",
|
|
2697
|
+
function gn({ items: t, columns: i, footerRows: o, taxRate: c = .2, currency: l, className: u, strings: f }) {
|
|
2698
|
+
let p = n(un, f), { defaultCurrency: m } = e(), h = l ?? m ?? "€", _ = i ?? mn(h, p), v = o ?? (i ? [] : hn(t, c, h, p)), y = i ? _.map((e) => e.width ?? "1fr").join(" ") : void 0, b = "grid-cols-3 @lg/invoice-line-items:grid-cols-[minmax(0,1fr)_36px_82px_82px]";
|
|
2699
|
+
return /* @__PURE__ */ J("div", {
|
|
2700
|
+
className: r("invoice-line-items--component", "@container/invoice-line-items w-full min-w-0 max-w-full overflow-hidden rounded-radius bg-card", dn, u),
|
|
2807
2701
|
children: [
|
|
2808
|
-
/* @__PURE__ */
|
|
2809
|
-
className: r("invoice-line-items--header min-w-0 gap-space-md bg-muted/40 px-row-x py-row-y",
|
|
2702
|
+
/* @__PURE__ */ q("div", {
|
|
2703
|
+
className: r("invoice-line-items--header min-w-0 gap-space-md bg-muted/40 px-row-x py-row-y", i ? "grid" : ["hidden @lg/invoice-line-items:grid", b]),
|
|
2810
2704
|
style: { gridTemplateColumns: y },
|
|
2811
|
-
children: _.map((e) => /* @__PURE__ */
|
|
2812
|
-
className: r("flex min-w-0",
|
|
2813
|
-
children: /* @__PURE__ */
|
|
2705
|
+
children: _.map((e) => /* @__PURE__ */ q("div", {
|
|
2706
|
+
className: r("flex min-w-0", fn[e.align ?? "left"], e.headerClassName),
|
|
2707
|
+
children: /* @__PURE__ */ q(a, {
|
|
2814
2708
|
className: "min-w-0 truncate",
|
|
2815
2709
|
children: e.header
|
|
2816
2710
|
})
|
|
2817
2711
|
}, e.id))
|
|
2818
2712
|
}),
|
|
2819
|
-
t.map((e, t) => /* @__PURE__ */
|
|
2820
|
-
className: r("invoice-line-items--row grid min-w-0 gap-space-md px-row-x py-row-y", !
|
|
2713
|
+
t.map((e, t) => /* @__PURE__ */ q("div", {
|
|
2714
|
+
className: r("invoice-line-items--row grid min-w-0 gap-space-md px-row-x py-row-y", !i && b, t % 2 == 1 && "bg-muted/20"),
|
|
2821
2715
|
style: { gridTemplateColumns: y },
|
|
2822
|
-
children: _.map((n) => /* @__PURE__ */
|
|
2716
|
+
children: _.map((n) => /* @__PURE__ */ J("div", {
|
|
2823
2717
|
"data-column": n.id,
|
|
2824
|
-
className: r("min-w-0",
|
|
2825
|
-
children: [!
|
|
2718
|
+
className: r("min-w-0", i ? ["flex items-center", fn[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),
|
|
2719
|
+
children: [!i && n.id !== "description" && /* @__PURE__ */ q(a, {
|
|
2826
2720
|
className: "@lg/invoice-line-items:hidden",
|
|
2827
2721
|
children: n.header
|
|
2828
2722
|
}), n.cell(e, t)]
|
|
2829
2723
|
}, n.id))
|
|
2830
2724
|
}, t)),
|
|
2831
|
-
v.length > 0 && /* @__PURE__ */
|
|
2725
|
+
v.length > 0 && /* @__PURE__ */ J(me, { children: [/* @__PURE__ */ q(k, {}), /* @__PURE__ */ q("div", {
|
|
2832
2726
|
className: "invoice-line-items--footer p-surface",
|
|
2833
|
-
children: /* @__PURE__ */
|
|
2727
|
+
children: /* @__PURE__ */ q(d, {
|
|
2834
2728
|
gap: "sm",
|
|
2835
|
-
children: v.map((e, t) => /* @__PURE__ */
|
|
2729
|
+
children: v.map((e, t) => /* @__PURE__ */ J(d, {
|
|
2836
2730
|
direction: "horizontal",
|
|
2837
2731
|
gap: "sm",
|
|
2838
2732
|
justify: "between",
|
|
2839
2733
|
align: "baseline",
|
|
2840
2734
|
className: r(e.emphasis === "total" && "pt-space-md"),
|
|
2841
|
-
children: [/* @__PURE__ */
|
|
2735
|
+
children: [/* @__PURE__ */ q(s, {
|
|
2842
2736
|
type: e.emphasis === "total" ? void 0 : "secondary",
|
|
2843
2737
|
weight: e.emphasis === "total" ? "bold" : "regular",
|
|
2844
2738
|
children: e.label
|
|
2845
|
-
}),
|
|
2739
|
+
}), _n(e.value) ? /* @__PURE__ */ q(g, {
|
|
2846
2740
|
weight: e.emphasis === "total" ? "bold" : "regular",
|
|
2847
2741
|
children: e.value
|
|
2848
|
-
}) : /* @__PURE__ */
|
|
2742
|
+
}) : /* @__PURE__ */ q("div", {
|
|
2849
2743
|
className: "invoice-line-items--footer-value shrink-0",
|
|
2850
2744
|
children: e.value
|
|
2851
2745
|
})]
|
|
@@ -2855,13 +2749,13 @@ function Rn({ items: t, columns: a, footerRows: s, taxRate: c = .2, currency: l,
|
|
|
2855
2749
|
]
|
|
2856
2750
|
});
|
|
2857
2751
|
}
|
|
2858
|
-
|
|
2859
|
-
function
|
|
2752
|
+
gn.displayName = "InvoiceLineItems";
|
|
2753
|
+
function _n(e) {
|
|
2860
2754
|
return typeof e == "string" || typeof e == "number" || typeof e == "bigint";
|
|
2861
2755
|
}
|
|
2862
2756
|
//#endregion
|
|
2863
2757
|
//#region src/components/blocks/commerce/order-timeline/order-timeline.tsx
|
|
2864
|
-
function
|
|
2758
|
+
function vn({ title: e, description: t, events: n, footerText: i, className: a }) {
|
|
2865
2759
|
let o = n.map((e) => ({
|
|
2866
2760
|
id: e.id,
|
|
2867
2761
|
title: e.title,
|
|
@@ -2869,46 +2763,46 @@ function Bn({ title: e, description: t, events: n, footerText: i, className: a }
|
|
|
2869
2763
|
timestamp: e.timestamp,
|
|
2870
2764
|
status: e.status
|
|
2871
2765
|
}));
|
|
2872
|
-
return /* @__PURE__ */
|
|
2766
|
+
return /* @__PURE__ */ q(I, {
|
|
2873
2767
|
"data-component": "order-timeline",
|
|
2874
2768
|
"data-slot": "order-timeline",
|
|
2875
2769
|
title: e,
|
|
2876
2770
|
description: t,
|
|
2877
2771
|
footerText: i,
|
|
2878
2772
|
className: r("order-timeline--component", a),
|
|
2879
|
-
children: /* @__PURE__ */
|
|
2773
|
+
children: /* @__PURE__ */ q(ce, { items: o })
|
|
2880
2774
|
});
|
|
2881
2775
|
}
|
|
2882
|
-
|
|
2776
|
+
vn.displayName = "OrderTimeline";
|
|
2883
2777
|
//#endregion
|
|
2884
2778
|
//#region src/components/blocks/commerce/payment-timeline/payment-timeline.tsx
|
|
2885
|
-
function
|
|
2779
|
+
function yn({ events: e, className: t }) {
|
|
2886
2780
|
let n = e.map((e, t) => ({
|
|
2887
2781
|
id: `${e.label}-${String(t)}`,
|
|
2888
2782
|
title: e.label,
|
|
2889
2783
|
description: e.date,
|
|
2890
2784
|
icon: e.icon,
|
|
2891
2785
|
status: e.done ? "success" : "pending",
|
|
2892
|
-
children: e.amount ? /* @__PURE__ */
|
|
2786
|
+
children: e.amount ? /* @__PURE__ */ q(g, {
|
|
2893
2787
|
weight: "medium",
|
|
2894
|
-
className: "tabular-nums
|
|
2788
|
+
className: "tabular-nums",
|
|
2895
2789
|
children: e.amount
|
|
2896
2790
|
}) : void 0
|
|
2897
2791
|
}));
|
|
2898
|
-
return /* @__PURE__ */
|
|
2792
|
+
return /* @__PURE__ */ q("div", {
|
|
2899
2793
|
"data-component": "payment-timeline",
|
|
2900
2794
|
"data-slot": "payment-timeline",
|
|
2901
2795
|
className: r("payment-timeline--component min-w-0", t),
|
|
2902
|
-
children: /* @__PURE__ */
|
|
2796
|
+
children: /* @__PURE__ */ q(ce, {
|
|
2903
2797
|
items: n,
|
|
2904
2798
|
dotSize: "lg"
|
|
2905
2799
|
})
|
|
2906
2800
|
});
|
|
2907
2801
|
}
|
|
2908
|
-
|
|
2802
|
+
yn.displayName = "PaymentTimeline";
|
|
2909
2803
|
//#endregion
|
|
2910
2804
|
//#region src/components/blocks/commerce/inventory-section/types.ts
|
|
2911
|
-
var
|
|
2805
|
+
var bn = {
|
|
2912
2806
|
title: "Inventory",
|
|
2913
2807
|
description: "Manage stock tracking, availability, fulfillment, and compliance details.",
|
|
2914
2808
|
status: {
|
|
@@ -2999,55 +2893,46 @@ var Hn = {
|
|
|
2999
2893
|
clearAll: "Clear tags",
|
|
3000
2894
|
summary: (e, t) => `${e} / ${t} tags`
|
|
3001
2895
|
}
|
|
3002
|
-
},
|
|
2896
|
+
}, xn = {
|
|
3003
2897
|
in_stock: "success",
|
|
3004
2898
|
low_stock: "warning",
|
|
3005
2899
|
out_of_stock: "destructive",
|
|
3006
2900
|
untracked: "secondary"
|
|
3007
|
-
}, Wn = {
|
|
3008
|
-
default: "border-border/60 bg-muted/20",
|
|
3009
|
-
success: "border-success/20 bg-success/5",
|
|
3010
|
-
warning: "border-warning/30 bg-warning/10",
|
|
3011
|
-
error: "border-destructive/20 bg-destructive/5",
|
|
3012
|
-
info: "border-info/20 bg-info/5"
|
|
3013
2901
|
};
|
|
3014
|
-
function
|
|
2902
|
+
function Sn(e) {
|
|
3015
2903
|
if (e === void 0 || e.trim() === "") return;
|
|
3016
2904
|
let t = Number(e);
|
|
3017
2905
|
return Number.isFinite(t) ? t : void 0;
|
|
3018
2906
|
}
|
|
3019
|
-
function
|
|
2907
|
+
function Cn(e) {
|
|
3020
2908
|
if (!(e.trackQuantity ?? !0)) return "untracked";
|
|
3021
|
-
let t =
|
|
2909
|
+
let t = Sn(e.available) ?? 0;
|
|
3022
2910
|
if (t <= 0) return "out_of_stock";
|
|
3023
|
-
let n =
|
|
2911
|
+
let n = Sn(e.lowStockThreshold);
|
|
3024
2912
|
return n !== void 0 && t <= n ? "low_stock" : "in_stock";
|
|
3025
2913
|
}
|
|
3026
|
-
function qn(e, t) {
|
|
3027
|
-
return e === "available" ? t === "in_stock" ? "success" : t === "low_stock" ? "warning" : t === "out_of_stock" ? "error" : "default" : "default";
|
|
3028
|
-
}
|
|
3029
2914
|
function $({ children: e, className: t }) {
|
|
3030
|
-
return /* @__PURE__ */
|
|
2915
|
+
return /* @__PURE__ */ q(s, {
|
|
3031
2916
|
weight: "semibold",
|
|
3032
2917
|
className: r("inventory-section-card--section-title", t),
|
|
3033
2918
|
children: e
|
|
3034
2919
|
});
|
|
3035
2920
|
}
|
|
3036
|
-
function
|
|
3037
|
-
return /* @__PURE__ */
|
|
3038
|
-
className:
|
|
2921
|
+
function wn({ metric: e }) {
|
|
2922
|
+
return /* @__PURE__ */ J("div", {
|
|
2923
|
+
className: "inventory-section-card--metric min-w-0",
|
|
3039
2924
|
children: [
|
|
3040
|
-
/* @__PURE__ */
|
|
2925
|
+
/* @__PURE__ */ q(s, {
|
|
3041
2926
|
size: "xs",
|
|
3042
2927
|
type: "secondary",
|
|
3043
2928
|
children: e.label
|
|
3044
2929
|
}),
|
|
3045
|
-
/* @__PURE__ */
|
|
2930
|
+
/* @__PURE__ */ q(g, {
|
|
3046
2931
|
weight: "semibold",
|
|
3047
2932
|
className: "tabular-nums",
|
|
3048
2933
|
children: e.value
|
|
3049
2934
|
}),
|
|
3050
|
-
!!e.description && /* @__PURE__ */
|
|
2935
|
+
!!e.description && /* @__PURE__ */ q(s, {
|
|
3051
2936
|
size: "xs",
|
|
3052
2937
|
type: "secondary",
|
|
3053
2938
|
lineHeight: "snug",
|
|
@@ -3056,8 +2941,8 @@ function Jn({ metric: e }) {
|
|
|
3056
2941
|
]
|
|
3057
2942
|
});
|
|
3058
2943
|
}
|
|
3059
|
-
function
|
|
3060
|
-
let
|
|
2944
|
+
function Tn({ value: e, onValueChange: t, errors: i, disabled: a = !1, readOnly: o = !1, visibleSections: s, visibleFields: c, locationOptions: f = [], countryOptions: m = [], tagRecommendations: h, maxTags: g, onGenerateSku: _, onRestock: v, className: y, strings: b }) {
|
|
2945
|
+
let x = n(bn, b), S = Cn(e), C = a || o, w = e.trackQuantity ?? !0, T = e.requiresShipping ?? !0, E = C || !T, D = (e) => s?.[e] !== !1, k = (e) => c?.[e] !== !1, F = (n, r) => {
|
|
3061
2946
|
let i = e[n], a = {
|
|
3062
2947
|
...e,
|
|
3063
2948
|
[n]: r
|
|
@@ -3067,271 +2952,260 @@ function Yn({ value: e, onValueChange: t, errors: i, disabled: a = !1, readOnly:
|
|
|
3067
2952
|
value: r,
|
|
3068
2953
|
previousValue: i
|
|
3069
2954
|
});
|
|
3070
|
-
},
|
|
3071
|
-
if (!
|
|
3072
|
-
let t =
|
|
3073
|
-
typeof t == "string" &&
|
|
3074
|
-
},
|
|
2955
|
+
}, I = () => {
|
|
2956
|
+
if (!_ || C) return;
|
|
2957
|
+
let t = _(e);
|
|
2958
|
+
typeof t == "string" && F("sku", t);
|
|
2959
|
+
}, R = [
|
|
3075
2960
|
{
|
|
3076
2961
|
id: "available",
|
|
3077
|
-
label:
|
|
3078
|
-
value:
|
|
3079
|
-
description:
|
|
3080
|
-
tone: qn("available", x)
|
|
2962
|
+
label: x.summary.available,
|
|
2963
|
+
value: w ? e.available || "0" : "—",
|
|
2964
|
+
description: w ? void 0 : x.summary.untracked
|
|
3081
2965
|
},
|
|
3082
2966
|
{
|
|
3083
2967
|
id: "committed",
|
|
3084
|
-
label:
|
|
3085
|
-
value: e.committed || "0"
|
|
3086
|
-
tone: qn("committed", x)
|
|
2968
|
+
label: x.summary.committed,
|
|
2969
|
+
value: e.committed || "0"
|
|
3087
2970
|
},
|
|
3088
2971
|
{
|
|
3089
2972
|
id: "incoming",
|
|
3090
|
-
label:
|
|
3091
|
-
value: e.incoming || "0"
|
|
3092
|
-
tone: qn("incoming", x)
|
|
2973
|
+
label: x.summary.incoming,
|
|
2974
|
+
value: e.incoming || "0"
|
|
3093
2975
|
},
|
|
3094
2976
|
{
|
|
3095
2977
|
id: "threshold",
|
|
3096
|
-
label:
|
|
3097
|
-
value: e.lowStockThreshold || "-"
|
|
3098
|
-
tone: qn("threshold", x)
|
|
2978
|
+
label: x.summary.threshold,
|
|
2979
|
+
value: e.lowStockThreshold || "-"
|
|
3099
2980
|
}
|
|
3100
2981
|
];
|
|
3101
|
-
return /* @__PURE__ */
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
2982
|
+
return /* @__PURE__ */ J(p, {
|
|
2983
|
+
surface: "flat",
|
|
2984
|
+
padding: "none",
|
|
2985
|
+
gap: "xl",
|
|
2986
|
+
title: x.title,
|
|
2987
|
+
description: x.description,
|
|
2988
|
+
titleSuffix: /* @__PURE__ */ q(O, {
|
|
2989
|
+
tone: xn[S],
|
|
2990
|
+
children: x.status[S]
|
|
3108
2991
|
}),
|
|
3109
|
-
headerAction: /* @__PURE__ */
|
|
2992
|
+
headerAction: /* @__PURE__ */ J(d, {
|
|
3110
2993
|
direction: "horizontal",
|
|
3111
2994
|
gap: "sm",
|
|
3112
2995
|
className: "w-full @md/inventory-section-card:w-auto @md/inventory-section-card:justify-end",
|
|
3113
|
-
children: [!!
|
|
2996
|
+
children: [!!_ && /* @__PURE__ */ q(l, {
|
|
3114
2997
|
type: "button",
|
|
3115
2998
|
tone: "secondary",
|
|
3116
2999
|
buttonStyle: "outline",
|
|
3117
3000
|
size: "sm",
|
|
3118
|
-
onClick:
|
|
3119
|
-
disabled:
|
|
3120
|
-
children:
|
|
3121
|
-
|
|
3122
|
-
"aria-hidden": "true"
|
|
3123
|
-
}), b.actions.generateSku]
|
|
3124
|
-
}), !!_ && /* @__PURE__ */ K(c, {
|
|
3001
|
+
onClick: I,
|
|
3002
|
+
disabled: C,
|
|
3003
|
+
children: x.actions.generateSku
|
|
3004
|
+
}), !!v && /* @__PURE__ */ q(l, {
|
|
3125
3005
|
type: "button",
|
|
3126
3006
|
tone: "secondary",
|
|
3127
3007
|
buttonStyle: "ghost",
|
|
3128
3008
|
size: "sm",
|
|
3129
|
-
onClick: () =>
|
|
3130
|
-
disabled:
|
|
3131
|
-
children:
|
|
3132
|
-
className: "size-icon-sm",
|
|
3133
|
-
"aria-hidden": "true"
|
|
3134
|
-
}), b.actions.restock]
|
|
3009
|
+
onClick: () => v(e),
|
|
3010
|
+
disabled: C,
|
|
3011
|
+
children: x.actions.restock
|
|
3135
3012
|
})]
|
|
3136
3013
|
}),
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
contentGap: "xl",
|
|
3014
|
+
className: r("inventory-section-card--component @container/inventory-section-card w-full", y),
|
|
3015
|
+
contentGap: "2xl",
|
|
3140
3016
|
children: [
|
|
3141
|
-
!!
|
|
3142
|
-
className: "inventory-section-card--summary grid min-w-0 grid-cols-1 gap-space-
|
|
3143
|
-
children:
|
|
3017
|
+
!!D("summary") && /* @__PURE__ */ q("div", {
|
|
3018
|
+
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",
|
|
3019
|
+
children: R.map((e) => /* @__PURE__ */ q(wn, { metric: e }, e.id))
|
|
3144
3020
|
}),
|
|
3145
|
-
!!
|
|
3146
|
-
render: /* @__PURE__ */
|
|
3021
|
+
!!D("identity") && /* @__PURE__ */ J(d, {
|
|
3022
|
+
render: /* @__PURE__ */ q("section", {}),
|
|
3147
3023
|
gap: "md",
|
|
3148
3024
|
className: "inventory-section-card--identity",
|
|
3149
|
-
children: [/* @__PURE__ */
|
|
3150
|
-
label:
|
|
3025
|
+
children: [/* @__PURE__ */ q($, { children: x.sections.identity }), /* @__PURE__ */ J(u, { children: [!!k("sku") && /* @__PURE__ */ q(j, {
|
|
3026
|
+
label: x.fields.sku,
|
|
3151
3027
|
error: i?.sku,
|
|
3152
|
-
hint:
|
|
3153
|
-
children: /* @__PURE__ */
|
|
3028
|
+
hint: x.hints.sku,
|
|
3029
|
+
children: /* @__PURE__ */ q(A, {
|
|
3154
3030
|
value: e.sku ?? "",
|
|
3155
|
-
onChange: (e) =>
|
|
3156
|
-
placeholder:
|
|
3157
|
-
|
|
3158
|
-
disabled: S,
|
|
3031
|
+
onChange: (e) => F("sku", e.target.value),
|
|
3032
|
+
placeholder: x.placeholders.sku,
|
|
3033
|
+
disabled: C,
|
|
3159
3034
|
invalid: !!i?.sku
|
|
3160
3035
|
})
|
|
3161
|
-
}), !!
|
|
3162
|
-
label:
|
|
3036
|
+
}), !!k("barcode") && /* @__PURE__ */ q(j, {
|
|
3037
|
+
label: x.fields.barcode,
|
|
3163
3038
|
error: i?.barcode,
|
|
3164
|
-
hint:
|
|
3165
|
-
children: /* @__PURE__ */
|
|
3039
|
+
hint: x.hints.barcode,
|
|
3040
|
+
children: /* @__PURE__ */ q(A, {
|
|
3166
3041
|
value: e.barcode ?? "",
|
|
3167
|
-
onChange: (e) =>
|
|
3168
|
-
placeholder:
|
|
3169
|
-
|
|
3170
|
-
disabled: S,
|
|
3042
|
+
onChange: (e) => F("barcode", e.target.value),
|
|
3043
|
+
placeholder: x.placeholders.barcode,
|
|
3044
|
+
disabled: C,
|
|
3171
3045
|
invalid: !!i?.barcode
|
|
3172
3046
|
})
|
|
3173
3047
|
})] })]
|
|
3174
3048
|
}),
|
|
3175
|
-
!!
|
|
3176
|
-
render: /* @__PURE__ */
|
|
3049
|
+
!!D("tracking") && /* @__PURE__ */ J(d, {
|
|
3050
|
+
render: /* @__PURE__ */ q("section", {}),
|
|
3177
3051
|
gap: "md",
|
|
3178
|
-
className: "inventory-section-card--tracking
|
|
3052
|
+
className: "inventory-section-card--tracking",
|
|
3179
3053
|
children: [
|
|
3180
|
-
/* @__PURE__ */
|
|
3181
|
-
!!
|
|
3182
|
-
label:
|
|
3183
|
-
description:
|
|
3184
|
-
value:
|
|
3185
|
-
onValueChange: (e) =>
|
|
3186
|
-
disabled:
|
|
3054
|
+
/* @__PURE__ */ q($, { children: x.sections.tracking }),
|
|
3055
|
+
!!k("trackQuantity") && /* @__PURE__ */ q(M, {
|
|
3056
|
+
label: x.fields.trackQuantity,
|
|
3057
|
+
description: x.hints.available,
|
|
3058
|
+
value: w,
|
|
3059
|
+
onValueChange: (e) => F("trackQuantity", e),
|
|
3060
|
+
disabled: C
|
|
3187
3061
|
}),
|
|
3188
|
-
/* @__PURE__ */
|
|
3062
|
+
/* @__PURE__ */ J("div", {
|
|
3189
3063
|
className: "inventory-section-card--tracking-grid grid min-w-0 grid-cols-1 gap-space-xl @md/inventory-section-card:grid-cols-2 @3xl/inventory-section-card:grid-cols-4",
|
|
3190
3064
|
children: [
|
|
3191
|
-
!!
|
|
3192
|
-
label:
|
|
3065
|
+
!!k("available") && /* @__PURE__ */ q(j, {
|
|
3066
|
+
label: x.fields.available,
|
|
3193
3067
|
error: i?.available,
|
|
3194
|
-
hint:
|
|
3195
|
-
children: /* @__PURE__ */
|
|
3068
|
+
hint: x.hints.available,
|
|
3069
|
+
children: /* @__PURE__ */ q(L, {
|
|
3196
3070
|
value: e.available ?? "",
|
|
3197
|
-
onChange: (e) =>
|
|
3198
|
-
placeholder:
|
|
3071
|
+
onChange: (e) => F("available", e.target.value),
|
|
3072
|
+
placeholder: x.placeholders.available,
|
|
3199
3073
|
min: 0,
|
|
3200
3074
|
decimalPlaces: 0,
|
|
3201
3075
|
step: 1,
|
|
3202
|
-
disabled:
|
|
3076
|
+
disabled: C || !w,
|
|
3203
3077
|
invalid: !!i?.available
|
|
3204
3078
|
})
|
|
3205
3079
|
}),
|
|
3206
|
-
!!
|
|
3207
|
-
label:
|
|
3080
|
+
!!k("committed") && /* @__PURE__ */ q(j, {
|
|
3081
|
+
label: x.fields.committed,
|
|
3208
3082
|
error: i?.committed,
|
|
3209
|
-
hint:
|
|
3210
|
-
children: /* @__PURE__ */
|
|
3083
|
+
hint: x.hints.committed,
|
|
3084
|
+
children: /* @__PURE__ */ q(L, {
|
|
3211
3085
|
value: e.committed ?? "",
|
|
3212
|
-
onChange: (e) =>
|
|
3213
|
-
placeholder:
|
|
3086
|
+
onChange: (e) => F("committed", e.target.value),
|
|
3087
|
+
placeholder: x.placeholders.committed,
|
|
3214
3088
|
min: 0,
|
|
3215
3089
|
decimalPlaces: 0,
|
|
3216
3090
|
step: 1,
|
|
3217
|
-
disabled:
|
|
3091
|
+
disabled: C || !w,
|
|
3218
3092
|
invalid: !!i?.committed
|
|
3219
3093
|
})
|
|
3220
3094
|
}),
|
|
3221
|
-
!!
|
|
3222
|
-
label:
|
|
3095
|
+
!!k("incoming") && /* @__PURE__ */ q(j, {
|
|
3096
|
+
label: x.fields.incoming,
|
|
3223
3097
|
error: i?.incoming,
|
|
3224
|
-
hint:
|
|
3225
|
-
children: /* @__PURE__ */
|
|
3098
|
+
hint: x.hints.incoming,
|
|
3099
|
+
children: /* @__PURE__ */ q(L, {
|
|
3226
3100
|
value: e.incoming ?? "",
|
|
3227
|
-
onChange: (e) =>
|
|
3228
|
-
placeholder:
|
|
3101
|
+
onChange: (e) => F("incoming", e.target.value),
|
|
3102
|
+
placeholder: x.placeholders.incoming,
|
|
3229
3103
|
min: 0,
|
|
3230
3104
|
decimalPlaces: 0,
|
|
3231
3105
|
step: 1,
|
|
3232
|
-
disabled:
|
|
3106
|
+
disabled: C || !w,
|
|
3233
3107
|
invalid: !!i?.incoming
|
|
3234
3108
|
})
|
|
3235
3109
|
}),
|
|
3236
|
-
!!
|
|
3237
|
-
label:
|
|
3110
|
+
!!k("lowStockThreshold") && /* @__PURE__ */ q(j, {
|
|
3111
|
+
label: x.fields.lowStockThreshold,
|
|
3238
3112
|
error: i?.lowStockThreshold,
|
|
3239
|
-
hint:
|
|
3240
|
-
children: /* @__PURE__ */
|
|
3113
|
+
hint: x.hints.lowStockThreshold,
|
|
3114
|
+
children: /* @__PURE__ */ q(L, {
|
|
3241
3115
|
value: e.lowStockThreshold ?? "",
|
|
3242
|
-
onChange: (e) =>
|
|
3243
|
-
placeholder:
|
|
3116
|
+
onChange: (e) => F("lowStockThreshold", e.target.value),
|
|
3117
|
+
placeholder: x.placeholders.lowStockThreshold,
|
|
3244
3118
|
min: 0,
|
|
3245
3119
|
decimalPlaces: 0,
|
|
3246
3120
|
step: 1,
|
|
3247
|
-
disabled:
|
|
3121
|
+
disabled: C || !w,
|
|
3248
3122
|
invalid: !!i?.lowStockThreshold
|
|
3249
3123
|
})
|
|
3250
3124
|
})
|
|
3251
3125
|
]
|
|
3252
3126
|
}),
|
|
3253
|
-
!!
|
|
3254
|
-
label:
|
|
3127
|
+
!!k("inventoryPolicy") && /* @__PURE__ */ q(j, {
|
|
3128
|
+
label: x.fields.inventoryPolicy,
|
|
3255
3129
|
error: i?.inventoryPolicy,
|
|
3256
|
-
hint:
|
|
3257
|
-
children: /* @__PURE__ */
|
|
3130
|
+
hint: x.hints.inventoryPolicy,
|
|
3131
|
+
children: /* @__PURE__ */ q(P, {
|
|
3258
3132
|
columns: 2,
|
|
3259
3133
|
value: e.inventoryPolicy ?? "deny",
|
|
3260
|
-
onValueChange: (e) =>
|
|
3261
|
-
disabled:
|
|
3134
|
+
onValueChange: (e) => F("inventoryPolicy", e),
|
|
3135
|
+
disabled: C || !w,
|
|
3262
3136
|
invalid: !!i?.inventoryPolicy,
|
|
3263
3137
|
options: [{
|
|
3264
3138
|
value: "deny",
|
|
3265
|
-
label:
|
|
3266
|
-
description:
|
|
3139
|
+
label: x.policyOptions.deny.label,
|
|
3140
|
+
description: x.policyOptions.deny.description
|
|
3267
3141
|
}, {
|
|
3268
3142
|
value: "continue",
|
|
3269
|
-
label:
|
|
3270
|
-
description:
|
|
3143
|
+
label: x.policyOptions.continue.label,
|
|
3144
|
+
description: x.policyOptions.continue.description
|
|
3271
3145
|
}]
|
|
3272
3146
|
})
|
|
3273
3147
|
})
|
|
3274
3148
|
]
|
|
3275
3149
|
}),
|
|
3276
|
-
!!
|
|
3277
|
-
render: /* @__PURE__ */
|
|
3150
|
+
!!D("location") && /* @__PURE__ */ J(d, {
|
|
3151
|
+
render: /* @__PURE__ */ q("section", {}),
|
|
3278
3152
|
gap: "md",
|
|
3279
|
-
className: "inventory-section-card--location
|
|
3280
|
-
children: [/* @__PURE__ */
|
|
3281
|
-
label:
|
|
3153
|
+
className: "inventory-section-card--location",
|
|
3154
|
+
children: [/* @__PURE__ */ q($, { children: x.sections.location }), /* @__PURE__ */ J(u, { children: [!!k("locationId") && /* @__PURE__ */ q(j, {
|
|
3155
|
+
label: x.fields.locationId,
|
|
3282
3156
|
error: i?.locationId,
|
|
3283
|
-
hint:
|
|
3284
|
-
children: f.length > 0 ? /* @__PURE__ */
|
|
3157
|
+
hint: x.hints.locationId,
|
|
3158
|
+
children: f.length > 0 ? /* @__PURE__ */ q(N, {
|
|
3285
3159
|
value: e.locationId ?? null,
|
|
3286
|
-
onValueChange: (e) =>
|
|
3160
|
+
onValueChange: (e) => F("locationId", e),
|
|
3287
3161
|
options: f,
|
|
3288
|
-
placeholder:
|
|
3289
|
-
disabled:
|
|
3162
|
+
placeholder: x.placeholders.locationId,
|
|
3163
|
+
disabled: C,
|
|
3290
3164
|
invalid: !!i?.locationId,
|
|
3291
3165
|
allowClear: !0
|
|
3292
|
-
}) : /* @__PURE__ */
|
|
3166
|
+
}) : /* @__PURE__ */ q(A, {
|
|
3293
3167
|
value: e.locationId ?? "",
|
|
3294
|
-
onChange: (e) =>
|
|
3295
|
-
placeholder:
|
|
3296
|
-
disabled:
|
|
3168
|
+
onChange: (e) => F("locationId", e.target.value),
|
|
3169
|
+
placeholder: x.placeholders.locationId,
|
|
3170
|
+
disabled: C,
|
|
3297
3171
|
invalid: !!i?.locationId
|
|
3298
3172
|
})
|
|
3299
|
-
}), !!
|
|
3300
|
-
label:
|
|
3173
|
+
}), !!k("binLocation") && /* @__PURE__ */ q(j, {
|
|
3174
|
+
label: x.fields.binLocation,
|
|
3301
3175
|
error: i?.binLocation,
|
|
3302
|
-
hint:
|
|
3303
|
-
children: /* @__PURE__ */
|
|
3176
|
+
hint: x.hints.binLocation,
|
|
3177
|
+
children: /* @__PURE__ */ q(A, {
|
|
3304
3178
|
value: e.binLocation ?? "",
|
|
3305
|
-
onChange: (e) =>
|
|
3306
|
-
placeholder:
|
|
3307
|
-
disabled:
|
|
3179
|
+
onChange: (e) => F("binLocation", e.target.value),
|
|
3180
|
+
placeholder: x.placeholders.binLocation,
|
|
3181
|
+
disabled: C,
|
|
3308
3182
|
invalid: !!i?.binLocation
|
|
3309
3183
|
})
|
|
3310
3184
|
})] })]
|
|
3311
3185
|
}),
|
|
3312
|
-
!!
|
|
3313
|
-
render: /* @__PURE__ */
|
|
3186
|
+
!!D("shipping") && /* @__PURE__ */ J(d, {
|
|
3187
|
+
render: /* @__PURE__ */ q("section", {}),
|
|
3314
3188
|
gap: "md",
|
|
3315
|
-
className: "inventory-section-card--shipping
|
|
3189
|
+
className: "inventory-section-card--shipping",
|
|
3316
3190
|
children: [
|
|
3317
|
-
/* @__PURE__ */
|
|
3318
|
-
!!
|
|
3319
|
-
label:
|
|
3320
|
-
description:
|
|
3321
|
-
value:
|
|
3322
|
-
onValueChange: (e) =>
|
|
3323
|
-
disabled:
|
|
3191
|
+
/* @__PURE__ */ q($, { children: x.sections.shipping }),
|
|
3192
|
+
!!k("requiresShipping") && /* @__PURE__ */ q(M, {
|
|
3193
|
+
label: x.fields.requiresShipping,
|
|
3194
|
+
description: x.hints.weight,
|
|
3195
|
+
value: T,
|
|
3196
|
+
onValueChange: (e) => F("requiresShipping", e),
|
|
3197
|
+
disabled: C
|
|
3324
3198
|
}),
|
|
3325
|
-
!!
|
|
3326
|
-
label:
|
|
3199
|
+
!!k("weight") && /* @__PURE__ */ q(j, {
|
|
3200
|
+
label: x.fields.weight,
|
|
3327
3201
|
error: i?.weight ?? i?.weightUnit,
|
|
3328
|
-
hint:
|
|
3329
|
-
children: /* @__PURE__ */
|
|
3202
|
+
hint: x.hints.weight,
|
|
3203
|
+
children: /* @__PURE__ */ q(te, {
|
|
3330
3204
|
value: e.weight ?? "",
|
|
3331
3205
|
unit: e.weightUnit ?? "kg",
|
|
3332
|
-
onChange: (e) =>
|
|
3333
|
-
onUnitChange: (e) =>
|
|
3334
|
-
disabled:
|
|
3206
|
+
onChange: (e) => F("weight", e.target.value),
|
|
3207
|
+
onUnitChange: (e) => F("weightUnit", e),
|
|
3208
|
+
disabled: E,
|
|
3335
3209
|
invalid: !!i?.weight || !!i?.weightUnit,
|
|
3336
3210
|
decimalPlaces: 2,
|
|
3337
3211
|
min: 0
|
|
@@ -3339,67 +3213,67 @@ function Yn({ value: e, onValueChange: t, errors: i, disabled: a = !1, readOnly:
|
|
|
3339
3213
|
})
|
|
3340
3214
|
]
|
|
3341
3215
|
}),
|
|
3342
|
-
!!
|
|
3343
|
-
render: /* @__PURE__ */
|
|
3216
|
+
!!D("customs") && /* @__PURE__ */ J(d, {
|
|
3217
|
+
render: /* @__PURE__ */ q("section", {}),
|
|
3344
3218
|
gap: "md",
|
|
3345
|
-
className: "inventory-section-card--customs
|
|
3346
|
-
children: [/* @__PURE__ */
|
|
3347
|
-
label:
|
|
3219
|
+
className: "inventory-section-card--customs",
|
|
3220
|
+
children: [/* @__PURE__ */ q($, { children: x.sections.customs }), /* @__PURE__ */ J(u, { children: [!!k("countryOfOrigin") && /* @__PURE__ */ q(j, {
|
|
3221
|
+
label: x.fields.countryOfOrigin,
|
|
3348
3222
|
error: i?.countryOfOrigin,
|
|
3349
|
-
hint:
|
|
3350
|
-
children:
|
|
3223
|
+
hint: x.hints.countryOfOrigin,
|
|
3224
|
+
children: m.length > 0 ? /* @__PURE__ */ q(N, {
|
|
3351
3225
|
value: e.countryOfOrigin ?? null,
|
|
3352
|
-
onValueChange: (e) =>
|
|
3353
|
-
options:
|
|
3354
|
-
placeholder:
|
|
3355
|
-
disabled:
|
|
3226
|
+
onValueChange: (e) => F("countryOfOrigin", e),
|
|
3227
|
+
options: m,
|
|
3228
|
+
placeholder: x.placeholders.countryOfOrigin,
|
|
3229
|
+
disabled: E,
|
|
3356
3230
|
invalid: !!i?.countryOfOrigin,
|
|
3357
3231
|
allowClear: !0
|
|
3358
|
-
}) : /* @__PURE__ */
|
|
3232
|
+
}) : /* @__PURE__ */ q(A, {
|
|
3359
3233
|
value: e.countryOfOrigin ?? "",
|
|
3360
|
-
onChange: (e) =>
|
|
3361
|
-
placeholder:
|
|
3362
|
-
disabled:
|
|
3234
|
+
onChange: (e) => F("countryOfOrigin", e.target.value),
|
|
3235
|
+
placeholder: x.placeholders.countryOfOrigin,
|
|
3236
|
+
disabled: E,
|
|
3363
3237
|
invalid: !!i?.countryOfOrigin
|
|
3364
3238
|
})
|
|
3365
|
-
}), !!
|
|
3366
|
-
label:
|
|
3239
|
+
}), !!k("hsCode") && /* @__PURE__ */ q(j, {
|
|
3240
|
+
label: x.fields.hsCode,
|
|
3367
3241
|
error: i?.hsCode,
|
|
3368
|
-
hint:
|
|
3369
|
-
children: /* @__PURE__ */
|
|
3242
|
+
hint: x.hints.hsCode,
|
|
3243
|
+
children: /* @__PURE__ */ q(A, {
|
|
3370
3244
|
value: e.hsCode ?? "",
|
|
3371
|
-
onChange: (e) =>
|
|
3372
|
-
placeholder:
|
|
3373
|
-
disabled:
|
|
3245
|
+
onChange: (e) => F("hsCode", e.target.value),
|
|
3246
|
+
placeholder: x.placeholders.hsCode,
|
|
3247
|
+
disabled: E,
|
|
3374
3248
|
invalid: !!i?.hsCode
|
|
3375
3249
|
})
|
|
3376
3250
|
})] })]
|
|
3377
3251
|
}),
|
|
3378
|
-
!!
|
|
3379
|
-
render: /* @__PURE__ */
|
|
3252
|
+
!!D("tags") && !!k("tags") && /* @__PURE__ */ J(d, {
|
|
3253
|
+
render: /* @__PURE__ */ q("section", {}),
|
|
3380
3254
|
gap: "md",
|
|
3381
|
-
className: "inventory-section-card--tags
|
|
3382
|
-
children: [/* @__PURE__ */
|
|
3383
|
-
label:
|
|
3255
|
+
className: "inventory-section-card--tags",
|
|
3256
|
+
children: [/* @__PURE__ */ q($, { children: x.sections.tags }), /* @__PURE__ */ q(j, {
|
|
3257
|
+
label: x.fields.tags,
|
|
3384
3258
|
error: i?.tags,
|
|
3385
|
-
hint:
|
|
3386
|
-
children: /* @__PURE__ */
|
|
3259
|
+
hint: x.hints.tags,
|
|
3260
|
+
children: /* @__PURE__ */ q(ee, {
|
|
3387
3261
|
value: e.tags ?? [],
|
|
3388
|
-
onValueChange: (e) =>
|
|
3389
|
-
recommendations:
|
|
3390
|
-
maxTags:
|
|
3391
|
-
showMaxTags:
|
|
3392
|
-
disabled:
|
|
3262
|
+
onValueChange: (e) => F("tags", e),
|
|
3263
|
+
recommendations: h,
|
|
3264
|
+
maxTags: g,
|
|
3265
|
+
showMaxTags: g !== void 0,
|
|
3266
|
+
disabled: C,
|
|
3393
3267
|
invalid: !!i?.tags,
|
|
3394
|
-
strings:
|
|
3268
|
+
strings: x.tagInput
|
|
3395
3269
|
})
|
|
3396
3270
|
})]
|
|
3397
3271
|
})
|
|
3398
3272
|
]
|
|
3399
3273
|
});
|
|
3400
3274
|
}
|
|
3401
|
-
|
|
3275
|
+
Tn.displayName = "InventorySectionCard";
|
|
3402
3276
|
//#endregion
|
|
3403
|
-
export {
|
|
3277
|
+
export { gt as AddressCard, Ne as BookingCalendarEventCard, wt as CartSummaryCard, Dt as CouponInputCard, Ft as DEFAULT_SEO_LISTING_LIMITS, ze as DiscountStackPreview, tt as GiftcardCard, st as InventoryLevel, Tn as InventorySectionCard, ln as InvoiceHeader, gn as InvoiceLineItems, on as InvoiceMini, Fe as LoyaltyPoints, At as OrderStatusCard, vn as OrderTimeline, Pt as PaymentMethod, yn as PaymentTimeline, oe as Receipt, se as ReceiptItems, mt as RefundStatusCard, nn as SeoListingCard, He as ShipmentTracking, dt as SubscriptionSummaryCard, lt as TaxBreakdownCard, je as UpcomingBookingRow, at as VendorProfileCard, yt as VoucherEntry, Gt as calculateSeoListingScore, ht as defaultAddressCardStrings, bt as defaultCartSummaryStrings, Tt as defaultCouponInputStrings, Re as defaultDiscountStackStrings, ot as defaultInventoryLevelStrings, bn as defaultInventorySectionStrings, Pe as defaultLoyaltyPointsStrings, Ot as defaultOrderStatusStrings, jt as defaultPaymentMethodStrings, ft as defaultRefundStatusStrings, Kt as defaultSeoListingCardStrings, Ve as defaultShipmentTrackingStrings, ut as defaultSubscriptionSummaryStrings, ct as defaultTaxBreakdownStrings, nt as defaultVendorProfileStrings, _t as defaultVoucherEntryStrings, Q as getSeoPermalinkPath, Bt as getSeoPermalinkSlug };
|
|
3404
3278
|
|
|
3405
3279
|
//# sourceMappingURL=commerce.js.map
|