@vendure/dashboard 3.3.6-master-202507020959 → 3.3.6-master-202507030234
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/README.md +41 -4
- package/dist/plugin/vite-plugin-config.js +5 -7
- package/package.json +4 -4
- package/src/app/app-providers.tsx +6 -6
- package/src/app/common/delete-bulk-action.tsx +4 -4
- package/src/app/common/duplicate-bulk-action.tsx +5 -5
- package/src/app/main.tsx +9 -9
- package/src/app/routes/__root.tsx +1 -2
- package/src/app/routes/_authenticated/_administrators/administrators.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_administrators/administrators.tsx +8 -8
- package/src/app/routes/_authenticated/_administrators/administrators_.$id.tsx +11 -11
- package/src/app/routes/_authenticated/_administrators/components/administrator-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_administrators/components/role-permissions-display.tsx +16 -16
- package/src/app/routes/_authenticated/_assets/assets.graphql.ts +2 -2
- package/src/app/routes/_authenticated/_assets/assets.tsx +12 -8
- package/src/app/routes/_authenticated/_assets/assets_.$id.tsx +14 -14
- package/src/app/routes/_authenticated/_assets/components/asset-bulk-actions.tsx +5 -5
- package/src/app/routes/_authenticated/_channels/channels.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_channels/channels.tsx +10 -10
- package/src/app/routes/_authenticated/_channels/channels_.$id.tsx +16 -16
- package/src/app/routes/_authenticated/_channels/components/channel-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_collections/collections.graphql.ts +3 -3
- package/src/app/routes/_authenticated/_collections/collections.tsx +7 -7
- package/src/app/routes/_authenticated/_collections/collections_.$id.tsx +15 -15
- package/src/app/routes/_authenticated/_collections/components/collection-bulk-actions.tsx +4 -5
- package/src/app/routes/_authenticated/_collections/components/collection-contents-preview-table.tsx +7 -8
- package/src/app/routes/_authenticated/_collections/components/collection-contents-sheet.tsx +9 -5
- package/src/app/routes/_authenticated/_collections/components/collection-contents-table.tsx +10 -9
- package/src/app/routes/_authenticated/_collections/components/collection-filters-selector.tsx +7 -7
- package/src/app/routes/_authenticated/_countries/components/country-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_countries/countries.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_countries/countries.tsx +6 -6
- package/src/app/routes/_authenticated/_countries/countries_.$id.tsx +12 -12
- package/src/app/routes/_authenticated/_customer-groups/components/customer-group-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_customer-groups/components/customer-group-members-sheet.tsx +12 -5
- package/src/app/routes/_authenticated/_customer-groups/components/customer-group-members-table.tsx +22 -17
- package/src/app/routes/_authenticated/_customer-groups/customer-groups.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_customer-groups/customer-groups.tsx +6 -6
- package/src/app/routes/_authenticated/_customer-groups/customer-groups_.$id.tsx +10 -10
- package/src/app/routes/_authenticated/_customers/components/customer-address-card.tsx +19 -19
- package/src/app/routes/_authenticated/_customers/components/customer-address-form.tsx +10 -10
- package/src/app/routes/_authenticated/_customers/components/customer-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_customers/components/customer-history/customer-history-container.tsx +5 -5
- package/src/app/routes/_authenticated/_customers/components/customer-history/customer-history.tsx +11 -7
- package/src/app/routes/_authenticated/_customers/components/customer-history/use-customer-history.ts +4 -4
- package/src/app/routes/_authenticated/_customers/components/customer-order-table.tsx +75 -73
- package/src/app/routes/_authenticated/_customers/components/customer-status-badge.tsx +4 -4
- package/src/app/routes/_authenticated/_customers/customers.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_customers/customers.tsx +6 -6
- package/src/app/routes/_authenticated/_customers/customers_.$id.tsx +14 -14
- package/src/app/routes/_authenticated/_facets/components/edit-facet-value.tsx +9 -9
- package/src/app/routes/_authenticated/_facets/components/facet-bulk-actions.tsx +6 -7
- package/src/app/routes/_authenticated/_facets/components/facet-values-sheet.tsx +4 -4
- package/src/app/routes/_authenticated/_facets/components/facet-values-table.tsx +15 -11
- package/src/app/routes/_authenticated/_facets/facets.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_facets/facets.tsx +7 -7
- package/src/app/routes/_authenticated/_facets/facets_.$id.tsx +12 -12
- package/src/app/routes/_authenticated/_global-settings/global-settings.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_global-settings/global-settings.tsx +12 -12
- package/src/app/routes/_authenticated/_orders/components/customer-address-selector.tsx +11 -14
- package/src/app/routes/_authenticated/_orders/components/edit-order-table.tsx +92 -54
- package/src/app/routes/_authenticated/_orders/components/money-gross-net.tsx +11 -9
- package/src/app/routes/_authenticated/_orders/components/order-address.tsx +3 -4
- package/src/app/routes/_authenticated/_orders/components/order-history/order-history-container.tsx +67 -62
- package/src/app/routes/_authenticated/_orders/components/order-history/order-history.tsx +11 -6
- package/src/app/routes/_authenticated/_orders/components/order-history/use-order-history.ts +4 -4
- package/src/app/routes/_authenticated/_orders/components/order-line-custom-fields-form.tsx +11 -7
- package/src/app/routes/_authenticated/_orders/components/order-table-totals.tsx +39 -19
- package/src/app/routes/_authenticated/_orders/components/order-table.tsx +4 -4
- package/src/app/routes/_authenticated/_orders/components/order-tax-summary.tsx +38 -36
- package/src/app/routes/_authenticated/_orders/components/payment-details.tsx +4 -4
- package/src/app/routes/_authenticated/_orders/components/shipping-method-selector.tsx +43 -44
- package/src/app/routes/_authenticated/_orders/orders.graphql.ts +2 -2
- package/src/app/routes/_authenticated/_orders/orders.tsx +21 -20
- package/src/app/routes/_authenticated/_orders/orders_.$id.tsx +9 -9
- package/src/app/routes/_authenticated/_orders/orders_.draft.$id.tsx +188 -90
- package/src/app/routes/_authenticated/_payment-methods/components/payment-eligibility-checker-selector.tsx +10 -7
- package/src/app/routes/_authenticated/_payment-methods/components/payment-handler-selector.tsx +11 -11
- package/src/app/routes/_authenticated/_payment-methods/components/payment-method-bulk-actions.tsx +4 -5
- package/src/app/routes/_authenticated/_payment-methods/payment-methods.graphql.ts +2 -2
- package/src/app/routes/_authenticated/_payment-methods/payment-methods.tsx +7 -7
- package/src/app/routes/_authenticated/_payment-methods/payment-methods_.$id.tsx +13 -13
- package/src/app/routes/_authenticated/_product-variants/components/product-variant-bulk-actions.tsx +7 -8
- package/src/app/routes/_authenticated/_product-variants/components/variant-price-detail.tsx +7 -6
- package/src/app/routes/_authenticated/_product-variants/product-variants.graphql.ts +2 -2
- package/src/app/routes/_authenticated/_product-variants/product-variants.tsx +6 -6
- package/src/app/routes/_authenticated/_product-variants/product-variants_.$id.tsx +19 -19
- package/src/app/routes/_authenticated/_products/components/add-product-variant-dialog.tsx +10 -10
- package/src/app/routes/_authenticated/_products/components/assign-facet-values-dialog.tsx +7 -7
- package/src/app/routes/_authenticated/_products/components/create-product-options-dialog.tsx +57 -41
- package/src/app/routes/_authenticated/_products/components/create-product-variants-dialog.tsx +11 -11
- package/src/app/routes/_authenticated/_products/components/create-product-variants.tsx +18 -14
- package/src/app/routes/_authenticated/_products/components/option-value-input.tsx +21 -15
- package/src/app/routes/_authenticated/_products/components/product-bulk-actions.tsx +7 -8
- package/src/app/routes/_authenticated/_products/components/product-option-select.tsx +28 -34
- package/src/app/routes/_authenticated/_products/components/product-variants-table.tsx +6 -6
- package/src/app/routes/_authenticated/_products/products.graphql.ts +2 -2
- package/src/app/routes/_authenticated/_products/products.tsx +6 -6
- package/src/app/routes/_authenticated/_products/products_.$id.tsx +16 -16
- package/src/app/routes/_authenticated/_profile/profile.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_profile/profile.tsx +8 -8
- package/src/app/routes/_authenticated/_promotions/components/promotion-actions-selector.tsx +14 -11
- package/src/app/routes/_authenticated/_promotions/components/promotion-bulk-actions.tsx +4 -5
- package/src/app/routes/_authenticated/_promotions/components/promotion-conditions-selector.tsx +14 -11
- package/src/app/routes/_authenticated/_promotions/promotions.graphql.ts +2 -2
- package/src/app/routes/_authenticated/_promotions/promotions.tsx +7 -7
- package/src/app/routes/_authenticated/_promotions/promotions_.$id.tsx +14 -14
- package/src/app/routes/_authenticated/_roles/components/expandable-permissions.tsx +5 -5
- package/src/app/routes/_authenticated/_roles/components/permissions-grid.tsx +21 -17
- package/src/app/routes/_authenticated/_roles/components/role-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_roles/roles.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_roles/roles.tsx +10 -10
- package/src/app/routes/_authenticated/_roles/roles_.$id.tsx +11 -11
- package/src/app/routes/_authenticated/_sellers/components/seller-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_sellers/sellers.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_sellers/sellers.tsx +7 -7
- package/src/app/routes/_authenticated/_sellers/sellers_.$id.tsx +10 -10
- package/src/app/routes/_authenticated/_shipping-methods/components/fulfillment-handler-selector.tsx +6 -6
- package/src/app/routes/_authenticated/_shipping-methods/components/shipping-calculator-selector.tsx +23 -21
- package/src/app/routes/_authenticated/_shipping-methods/components/shipping-eligibility-checker-selector.tsx +25 -21
- package/src/app/routes/_authenticated/_shipping-methods/components/shipping-method-bulk-actions.tsx +4 -5
- package/src/app/routes/_authenticated/_shipping-methods/components/test-shipping-method-dialog.tsx +3 -3
- package/src/app/routes/_authenticated/_shipping-methods/shipping-methods.graphql.ts +2 -2
- package/src/app/routes/_authenticated/_shipping-methods/shipping-methods.tsx +6 -6
- package/src/app/routes/_authenticated/_shipping-methods/shipping-methods_.$id.tsx +12 -12
- package/src/app/routes/_authenticated/_stock-locations/components/stock-location-bulk-actions.tsx +4 -5
- package/src/app/routes/_authenticated/_stock-locations/stock-locations.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_stock-locations/stock-locations.tsx +6 -6
- package/src/app/routes/_authenticated/_stock-locations/stock-locations_.$id.tsx +11 -11
- package/src/app/routes/_authenticated/_system/components/payload-dialog.tsx +4 -4
- package/src/app/routes/_authenticated/_system/healthchecks.tsx +4 -4
- package/src/app/routes/_authenticated/_system/job-queue.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_system/job-queue.tsx +10 -6
- package/src/app/routes/_authenticated/_system/scheduled-tasks.tsx +34 -28
- package/src/app/routes/_authenticated/_tax-categories/components/tax-category-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_tax-categories/tax-categories.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_tax-categories/tax-categories.tsx +7 -7
- package/src/app/routes/_authenticated/_tax-categories/tax-categories_.$id.tsx +11 -11
- package/src/app/routes/_authenticated/_tax-rates/components/tax-rate-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_tax-rates/tax-rates.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_tax-rates/tax-rates.tsx +8 -8
- package/src/app/routes/_authenticated/_tax-rates/tax-rates_.$id.tsx +14 -14
- package/src/app/routes/_authenticated/_zones/components/zone-bulk-actions.tsx +1 -1
- package/src/app/routes/_authenticated/_zones/components/zone-countries-sheet.tsx +4 -4
- package/src/app/routes/_authenticated/_zones/components/zone-countries-table.tsx +12 -8
- package/src/app/routes/_authenticated/_zones/zones.graphql.ts +1 -1
- package/src/app/routes/_authenticated/_zones/zones.tsx +6 -6
- package/src/app/routes/_authenticated/_zones/zones_.$id.tsx +10 -10
- package/src/app/routes/_authenticated/index.tsx +4 -4
- package/src/app/routes/_authenticated.tsx +3 -3
- package/src/app/routes/login.tsx +2 -2
- package/src/lib/components/data-display/boolean.tsx +1 -1
- package/src/lib/components/data-display/date-time.tsx +2 -2
- package/src/lib/components/data-display/json.tsx +1 -1
- package/src/lib/components/data-display/money.tsx +2 -3
- package/src/lib/components/data-input/affixed-input.tsx +3 -8
- package/src/lib/components/data-input/customer-group-input.tsx +2 -2
- package/src/lib/components/data-input/datetime-input.tsx +129 -146
- package/src/lib/components/data-input/facet-value-input.tsx +30 -22
- package/src/lib/components/data-input/money-input.tsx +3 -3
- package/src/lib/components/data-input/richt-text-input.tsx +1 -1
- package/src/lib/components/data-table/add-filter-menu.tsx +9 -18
- package/src/lib/components/data-table/data-table-bulk-action-item.tsx +3 -3
- package/src/lib/components/data-table/data-table-bulk-actions.tsx +7 -7
- package/src/lib/components/data-table/data-table-column-header.tsx +4 -22
- package/src/lib/components/data-table/data-table-faceted-filter.tsx +8 -8
- package/src/lib/components/data-table/data-table-filter-badge.tsx +1 -1
- package/src/lib/components/data-table/data-table-filter-dialog.tsx +4 -4
- package/src/lib/components/data-table/data-table-pagination.tsx +2 -2
- package/src/lib/components/data-table/data-table-view-options.tsx +25 -21
- package/src/lib/components/data-table/data-table.tsx +8 -8
- package/src/lib/components/data-table/filters/data-table-boolean-filter.tsx +11 -8
- package/src/lib/components/data-table/filters/data-table-datetime-filter.tsx +14 -23
- package/src/lib/components/data-table/filters/data-table-id-filter.tsx +15 -10
- package/src/lib/components/data-table/filters/data-table-number-filter.tsx +18 -17
- package/src/lib/components/data-table/filters/data-table-string-filter.tsx +29 -12
- package/src/lib/components/data-table/human-readable-operator.tsx +1 -1
- package/src/lib/components/data-table/refresh-button.tsx +5 -2
- package/src/lib/components/layout/app-layout.tsx +8 -8
- package/src/lib/components/layout/app-sidebar.tsx +5 -5
- package/src/lib/components/layout/channel-switcher.tsx +8 -8
- package/src/lib/components/layout/content-language-selector.tsx +16 -10
- package/src/lib/components/layout/generated-breadcrumbs.tsx +1 -1
- package/src/lib/components/layout/language-dialog.tsx +5 -11
- package/src/lib/components/layout/nav-main.tsx +4 -4
- package/src/lib/components/layout/nav-projects.tsx +2 -2
- package/src/lib/components/layout/nav-user.tsx +7 -7
- package/src/lib/components/layout/prerelease-popup.tsx +1 -1
- package/src/lib/components/login/login-form.tsx +5 -5
- package/src/lib/components/shared/alerts.tsx +3 -3
- package/src/lib/components/shared/animated-number.tsx +2 -2
- package/src/lib/components/shared/asset/asset-bulk-actions.tsx +12 -8
- package/src/lib/components/shared/asset/asset-focal-point-editor.tsx +29 -19
- package/src/lib/components/shared/asset/asset-gallery.tsx +12 -12
- package/src/lib/components/shared/asset/asset-picker-dialog.tsx +63 -66
- package/src/lib/components/shared/asset/asset-preview-dialog.tsx +3 -7
- package/src/lib/components/shared/asset/asset-preview-selector.tsx +4 -6
- package/src/lib/components/shared/asset/asset-preview.tsx +7 -15
- package/src/lib/components/shared/asset/asset-properties.tsx +7 -9
- package/src/lib/components/shared/asset/focal-point-control.tsx +5 -13
- package/src/lib/components/shared/assign-to-channel-bulk-action.tsx +4 -4
- package/src/lib/components/shared/assign-to-channel-dialog.tsx +8 -8
- package/src/lib/components/shared/channel-code-label.tsx +3 -4
- package/src/lib/components/shared/channel-selector.tsx +6 -6
- package/src/lib/components/shared/configurable-operation-arg-input.tsx +2 -2
- package/src/lib/components/shared/configurable-operation-input.tsx +15 -16
- package/src/lib/components/shared/confirmation-dialog.tsx +2 -2
- package/src/lib/components/shared/copyable-text.tsx +2 -3
- package/src/lib/components/shared/country-selector.tsx +21 -18
- package/src/lib/components/shared/currency-selector.tsx +5 -5
- package/src/lib/components/shared/custom-fields-form.tsx +9 -9
- package/src/lib/components/shared/customer-address-form.tsx +3 -3
- package/src/lib/components/shared/customer-group-selector.tsx +6 -6
- package/src/lib/components/shared/customer-selector.tsx +24 -18
- package/src/lib/components/shared/entity-assets.tsx +33 -34
- package/src/lib/components/shared/error-page.tsx +6 -6
- package/src/lib/components/shared/facet-value-chip.tsx +12 -5
- package/src/lib/components/shared/facet-value-selector.tsx +64 -63
- package/src/lib/components/shared/history-timeline/history-entry.tsx +12 -6
- package/src/lib/components/shared/history-timeline/history-note-checkbox.tsx +3 -3
- package/src/lib/components/shared/history-timeline/history-note-editor.tsx +4 -4
- package/src/lib/components/shared/history-timeline/history-note-input.tsx +3 -3
- package/src/lib/components/shared/history-timeline/history-timeline.tsx +15 -8
- package/src/lib/components/shared/language-selector.tsx +5 -5
- package/src/lib/components/shared/multi-select.tsx +5 -5
- package/src/lib/components/shared/navigation-confirmation.tsx +24 -9
- package/src/lib/components/shared/option-value-input.tsx +17 -15
- package/src/lib/components/shared/paginated-list-data-table.tsx +12 -12
- package/src/lib/components/shared/permission-guard.tsx +4 -4
- package/src/lib/components/shared/product-variant-selector.tsx +32 -31
- package/src/lib/components/shared/remove-from-channel-bulk-action.tsx +4 -4
- package/src/lib/components/shared/role-code-label.tsx +10 -6
- package/src/lib/components/shared/role-selector.tsx +4 -4
- package/src/lib/components/shared/seller-selector.tsx +21 -17
- package/src/lib/components/shared/stock-level-label.tsx +5 -5
- package/src/lib/components/shared/tax-category-selector.tsx +5 -5
- package/src/lib/components/shared/translatable-form-field.tsx +1 -1
- package/src/lib/components/shared/vendure-image.tsx +1 -1
- package/src/lib/components/shared/zone-selector.tsx +5 -6
- package/src/lib/components/ui/accordion.tsx +3 -3
- package/src/lib/components/ui/alert-dialog.tsx +10 -10
- package/src/lib/components/ui/alert.tsx +3 -3
- package/src/lib/components/ui/badge.tsx +2 -2
- package/src/lib/components/ui/breadcrumb.tsx +4 -4
- package/src/lib/components/ui/button.tsx +10 -3
- package/src/lib/components/ui/calendar.tsx +392 -459
- package/src/lib/components/ui/card.tsx +2 -2
- package/src/lib/components/ui/checkbox.tsx +2 -2
- package/src/lib/components/ui/command.tsx +12 -6
- package/src/lib/components/ui/dialog.tsx +2 -2
- package/src/lib/components/ui/dropdown-menu.tsx +7 -7
- package/src/lib/components/ui/form.tsx +4 -4
- package/src/lib/components/ui/hover-card.tsx +3 -3
- package/src/lib/components/ui/input.tsx +1 -1
- package/src/lib/components/ui/label.tsx +2 -2
- package/src/lib/components/ui/pagination.tsx +87 -108
- package/src/lib/components/ui/popover.tsx +3 -3
- package/src/lib/components/ui/scroll-area.tsx +2 -2
- package/src/lib/components/ui/select.tsx +2 -2
- package/src/lib/components/ui/separator.tsx +2 -2
- package/src/lib/components/ui/sheet.tsx +5 -5
- package/src/lib/components/ui/sidebar.tsx +10 -10
- package/src/lib/components/ui/skeleton.tsx +1 -1
- package/src/lib/components/ui/switch.tsx +2 -2
- package/src/lib/components/ui/table.tsx +2 -2
- package/src/lib/components/ui/tabs.tsx +3 -3
- package/src/lib/components/ui/textarea.tsx +1 -1
- package/src/lib/components/ui/tooltip.tsx +3 -3
- package/src/lib/framework/alert/alert-extensions.tsx +2 -3
- package/src/lib/framework/alert/alert-item.tsx +5 -3
- package/src/lib/framework/dashboard-widget/base-widget.tsx +5 -13
- package/src/lib/framework/dashboard-widget/latest-orders-widget/index.tsx +7 -8
- package/src/lib/framework/dashboard-widget/latest-orders-widget/latest-orders-widget.graphql.ts +1 -1
- package/src/lib/framework/dashboard-widget/metrics-widget/index.tsx +6 -7
- package/src/lib/framework/dashboard-widget/metrics-widget/metrics-widget.graphql.ts +1 -1
- package/src/lib/framework/dashboard-widget/orders-summary/index.tsx +6 -6
- package/src/lib/framework/dashboard-widget/orders-summary/order-summary-widget.graphql.ts +1 -1
- package/src/lib/framework/dashboard-widget/widget-extensions.tsx +1 -1
- package/src/lib/framework/data-table/data-table-extensions.ts +1 -1
- package/src/lib/framework/defaults.ts +1 -1
- package/src/lib/framework/document-extension/extend-detail-form-query.ts +2 -2
- package/src/lib/framework/document-extension/extend-document.spec.ts +1 -1
- package/src/lib/framework/document-extension/extend-document.ts +1 -1
- package/src/lib/framework/document-introspection/add-custom-fields.ts +2 -2
- package/src/lib/framework/document-introspection/hooks.ts +4 -1
- package/src/lib/framework/extension-api/display-component-extensions.tsx +4 -4
- package/src/lib/framework/extension-api/extension-api-types.ts +0 -3
- package/src/lib/framework/extension-api/input-component-extensions.tsx +5 -5
- package/src/lib/framework/extension-api/logic/detail-forms.ts +1 -1
- package/src/lib/framework/extension-api/types/data-table.ts +25 -2
- package/src/lib/framework/extension-api/types/detail-forms.ts +1 -1
- package/src/lib/framework/extension-api/types/widgets.ts +7 -4
- package/src/lib/framework/form-engine/form-schema-tools.ts +1 -1
- package/src/lib/framework/layout-engine/location-wrapper.tsx +11 -8
- package/src/lib/framework/layout-engine/page-block-provider.tsx +1 -1
- package/src/lib/framework/layout-engine/page-layout.tsx +26 -19
- package/src/lib/framework/page/detail-page-route-loader.tsx +3 -3
- package/src/lib/framework/page/detail-page.tsx +9 -9
- package/src/lib/framework/page/list-page.tsx +3 -3
- package/src/lib/framework/page/use-detail-page.ts +1 -1
- package/src/lib/framework/registry/registry-types.ts +7 -7
- package/src/lib/hooks/use-auth.tsx +1 -1
- package/src/lib/hooks/use-channel.ts +1 -2
- package/src/lib/hooks/use-extended-detail-query.ts +2 -3
- package/src/lib/hooks/use-extended-list-query.ts +3 -4
- package/src/lib/hooks/use-grouped-permissions.ts +1 -2
- package/src/lib/hooks/use-page-block.tsx +1 -1
- package/src/lib/hooks/use-page.tsx +1 -1
- package/src/lib/hooks/use-server-config.ts +1 -2
- package/src/lib/hooks/use-theme.ts +1 -2
- package/src/lib/hooks/use-user-settings.tsx +1 -1
- package/src/lib/index.ts +26 -6
- package/src/lib/lib/trans.tsx +3 -3
- package/src/lib/providers/auth.tsx +4 -4
- package/src/lib/providers/channel-provider.tsx +4 -4
- package/src/lib/providers/server-config.tsx +13 -11
- package/src/lib/providers/theme-provider.tsx +2 -3
- package/vite/vite-plugin-config.ts +5 -7
- package/src/lib/framework/alert/types.ts +0 -13
- package/src/lib/framework/dashboard-widget/types.ts +0 -22
- package/src/lib/framework/data-table/data-table-types.ts +0 -25
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { usePermissions } from
|
|
2
|
-
import { Permission } from
|
|
1
|
+
import { usePermissions } from '@/vdb/hooks/use-permissions.js';
|
|
2
|
+
import { Permission } from '@vendure/common/lib/generated-types';
|
|
3
3
|
|
|
4
4
|
export interface PermissionGuardProps {
|
|
5
5
|
requires: Permission | string | string[] | Permission[];
|
|
@@ -11,11 +11,11 @@ export interface PermissionGuardProps {
|
|
|
11
11
|
* This component is used to protect a route from unauthorized access.
|
|
12
12
|
* It will render the children if the user has the required permissions.
|
|
13
13
|
*/
|
|
14
|
-
export function PermissionGuard({ requires, children }: PermissionGuardProps
|
|
14
|
+
export function PermissionGuard({ requires, children }: Readonly<PermissionGuardProps>) {
|
|
15
15
|
const { hasPermissions } = usePermissions();
|
|
16
16
|
const permissions = Array.isArray(requires) ? requires : [requires];
|
|
17
17
|
if (!hasPermissions(permissions)) {
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
20
|
return children;
|
|
21
|
-
}
|
|
21
|
+
}
|
|
@@ -1,41 +1,46 @@
|
|
|
1
|
-
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from '@/components/ui/command.js';
|
|
2
1
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
Command,
|
|
3
|
+
CommandEmpty,
|
|
4
|
+
CommandGroup,
|
|
5
|
+
CommandInput,
|
|
6
|
+
CommandItem,
|
|
7
|
+
CommandList,
|
|
8
|
+
} from '@/vdb/components/ui/command.js';
|
|
9
|
+
import { Popover, PopoverContent, PopoverTrigger } from '@/vdb/components/ui/popover.js';
|
|
10
|
+
import { api } from '@/vdb/graphql/api.js';
|
|
11
|
+
import { assetFragment } from '@/vdb/graphql/fragments.js';
|
|
12
|
+
import { graphql } from '@/vdb/graphql/graphql.js';
|
|
10
13
|
import { useQuery } from '@tanstack/react-query';
|
|
11
14
|
import { useDebounce } from '@uidotdev/usehooks';
|
|
12
|
-
import {
|
|
15
|
+
import { Plus } from 'lucide-react';
|
|
13
16
|
import { useState } from 'react';
|
|
14
17
|
import { Button } from '../ui/button.js';
|
|
15
|
-
import { assetFragment } from '@/graphql/fragments.js';
|
|
16
18
|
import { VendureImage } from './vendure-image.js';
|
|
17
19
|
|
|
18
|
-
const productVariantListDocument = graphql(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
const productVariantListDocument = graphql(
|
|
21
|
+
`
|
|
22
|
+
query ProductVariantList($options: ProductVariantListOptions) {
|
|
23
|
+
productVariants(options: $options) {
|
|
24
|
+
items {
|
|
25
|
+
id
|
|
26
|
+
name
|
|
27
|
+
sku
|
|
28
|
+
featuredAsset {
|
|
29
|
+
...Asset
|
|
30
|
+
}
|
|
27
31
|
}
|
|
32
|
+
totalItems
|
|
28
33
|
}
|
|
29
|
-
totalItems
|
|
30
34
|
}
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
`,
|
|
36
|
+
[assetFragment],
|
|
37
|
+
);
|
|
33
38
|
|
|
34
39
|
export interface ProductVariantSelectorProps {
|
|
35
40
|
onProductVariantIdChange: (productVariantId: string) => void;
|
|
36
41
|
}
|
|
37
42
|
|
|
38
|
-
export function ProductVariantSelector({ onProductVariantIdChange }: ProductVariantSelectorProps) {
|
|
43
|
+
export function ProductVariantSelector({ onProductVariantIdChange }: Readonly<ProductVariantSelectorProps>) {
|
|
39
44
|
const [search, setSearch] = useState('');
|
|
40
45
|
const [open, setOpen] = useState(false);
|
|
41
46
|
const debouncedSearch = useDebounce(search, 500);
|
|
@@ -60,11 +65,7 @@ export function ProductVariantSelector({ onProductVariantIdChange }: ProductVari
|
|
|
60
65
|
return (
|
|
61
66
|
<Popover open={open} onOpenChange={setOpen}>
|
|
62
67
|
<PopoverTrigger asChild>
|
|
63
|
-
<Button
|
|
64
|
-
variant="outline"
|
|
65
|
-
role="combobox"
|
|
66
|
-
className="w-full"
|
|
67
|
-
>
|
|
68
|
+
<Button variant="outline" role="combobox" className="w-full">
|
|
68
69
|
Add item to order
|
|
69
70
|
<Plus className="opacity-50" />
|
|
70
71
|
</Button>
|
|
@@ -74,12 +75,12 @@ export function ProductVariantSelector({ onProductVariantIdChange }: ProductVari
|
|
|
74
75
|
<CommandInput
|
|
75
76
|
placeholder="Add item to order..."
|
|
76
77
|
className="h-9"
|
|
77
|
-
|
|
78
|
+
onValueChange={value => setSearch(value)}
|
|
78
79
|
/>
|
|
79
80
|
<CommandList>
|
|
80
81
|
<CommandEmpty>No products found.</CommandEmpty>
|
|
81
82
|
<CommandGroup>
|
|
82
|
-
{data?.productVariants.items.map(
|
|
83
|
+
{data?.productVariants.items.map(variant => (
|
|
83
84
|
<CommandItem
|
|
84
85
|
key={variant.id}
|
|
85
86
|
value={variant.id}
|
|
@@ -108,4 +109,4 @@ export function ProductVariantSelector({ onProductVariantIdChange }: ProductVari
|
|
|
108
109
|
</PopoverContent>
|
|
109
110
|
</Popover>
|
|
110
111
|
);
|
|
111
|
-
}
|
|
112
|
+
}
|
|
@@ -2,10 +2,10 @@ import { useMutation } from '@tanstack/react-query';
|
|
|
2
2
|
import { LayersIcon } from 'lucide-react';
|
|
3
3
|
import { toast } from 'sonner';
|
|
4
4
|
|
|
5
|
-
import { DataTableBulkActionItem } from '@/components/data-table/data-table-bulk-action-item.js';
|
|
6
|
-
import { ResultOf } from '@/graphql/graphql.js';
|
|
7
|
-
import { useChannel, usePaginatedList } from '@/index.js';
|
|
8
|
-
import { Trans, useLingui } from '@/lib/trans.js';
|
|
5
|
+
import { DataTableBulkActionItem } from '@/vdb/components/data-table/data-table-bulk-action-item.js';
|
|
6
|
+
import { ResultOf } from '@/vdb/graphql/graphql.js';
|
|
7
|
+
import { useChannel, usePaginatedList } from '@/vdb/index.js';
|
|
8
|
+
import { Trans, useLingui } from '@/vdb/lib/trans.js';
|
|
9
9
|
|
|
10
10
|
interface RemoveFromChannelBulkActionProps {
|
|
11
11
|
selection: any[];
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { CUSTOMER_ROLE_CODE, SUPER_ADMIN_ROLE_CODE } from '@/constants.js';
|
|
2
|
-
import { Trans } from '@/lib/trans.js';
|
|
1
|
+
import { CUSTOMER_ROLE_CODE, SUPER_ADMIN_ROLE_CODE } from '@/vdb/constants.js';
|
|
2
|
+
import { Trans } from '@/vdb/lib/trans.js';
|
|
3
3
|
|
|
4
|
-
export function RoleCodeLabel({ code }: { code: string } | { code: undefined }) {
|
|
5
|
-
return code === SUPER_ADMIN_ROLE_CODE ?
|
|
6
|
-
|
|
4
|
+
export function RoleCodeLabel({ code }: Readonly<{ code: string }> | Readonly<{ code: undefined }>) {
|
|
5
|
+
return code === SUPER_ADMIN_ROLE_CODE ? (
|
|
6
|
+
<Trans>Super Admin</Trans>
|
|
7
|
+
) : code === CUSTOMER_ROLE_CODE ? (
|
|
8
|
+
<Trans>Customer</Trans>
|
|
9
|
+
) : (
|
|
10
|
+
code
|
|
11
|
+
);
|
|
7
12
|
}
|
|
8
|
-
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { api } from '@/graphql/api.js';
|
|
2
|
-
import { graphql } from '@/graphql/graphql.js';
|
|
1
|
+
import { api } from '@/vdb/graphql/api.js';
|
|
2
|
+
import { graphql } from '@/vdb/graphql/graphql.js';
|
|
3
|
+
import { useLingui } from '@/vdb/lib/trans.js';
|
|
3
4
|
import { useQuery } from '@tanstack/react-query';
|
|
4
5
|
import { MultiSelect } from './multi-select.js';
|
|
5
|
-
import { useLingui } from '@/lib/trans.js';
|
|
6
6
|
|
|
7
7
|
const rolesDocument = graphql(`
|
|
8
8
|
query Roles($options: RoleListOptions) {
|
|
@@ -40,7 +40,7 @@ export function RoleSelector<T extends boolean>(props: RoleSelectorProps<T>) {
|
|
|
40
40
|
const items = (data ?? []).map(role => ({
|
|
41
41
|
value: role.id,
|
|
42
42
|
label: role.code,
|
|
43
|
-
display: role.description ? role.description : role.code
|
|
43
|
+
display: role.description ? role.description : role.code,
|
|
44
44
|
}));
|
|
45
45
|
|
|
46
46
|
return (
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import { Button } from '@/components/ui/button.js';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { Button } from '@/vdb/components/ui/button.js';
|
|
2
|
+
import {
|
|
3
|
+
Command,
|
|
4
|
+
CommandEmpty,
|
|
5
|
+
CommandInput,
|
|
6
|
+
CommandItem,
|
|
7
|
+
CommandList,
|
|
8
|
+
} from '@/vdb/components/ui/command.js';
|
|
9
|
+
import { Popover, PopoverContent, PopoverTrigger } from '@/vdb/components/ui/popover.js';
|
|
10
|
+
import { api } from '@/vdb/graphql/api.js';
|
|
11
|
+
import { graphql } from '@/vdb/graphql/graphql.js';
|
|
12
|
+
import { Trans } from '@/vdb/lib/trans.js';
|
|
7
13
|
import { useQuery } from '@tanstack/react-query';
|
|
8
|
-
import { Plus
|
|
14
|
+
import { Plus } from 'lucide-react';
|
|
9
15
|
import { useState } from 'react';
|
|
10
16
|
|
|
11
17
|
const sellerListDocument = graphql(`
|
|
@@ -42,9 +48,11 @@ export function SellerSelector(props: SellerSelectorProps) {
|
|
|
42
48
|
api.query(sellerListDocument, {
|
|
43
49
|
options: {
|
|
44
50
|
sort: { name: 'ASC' },
|
|
45
|
-
filter: searchTerm
|
|
46
|
-
|
|
47
|
-
|
|
51
|
+
filter: searchTerm
|
|
52
|
+
? {
|
|
53
|
+
name: { contains: searchTerm },
|
|
54
|
+
}
|
|
55
|
+
: undefined,
|
|
48
56
|
},
|
|
49
57
|
}),
|
|
50
58
|
staleTime: 1000 * 60, // 1 minute
|
|
@@ -73,19 +81,15 @@ export function SellerSelector(props: SellerSelectorProps) {
|
|
|
73
81
|
<PopoverContent className="p-0 w-[350px]" align="start">
|
|
74
82
|
<Command shouldFilter={false}>
|
|
75
83
|
<div className="flex items-center border-b px-3">
|
|
76
|
-
<CommandInput
|
|
77
|
-
placeholder="Search sellers..."
|
|
84
|
+
<CommandInput
|
|
85
|
+
placeholder="Search sellers..."
|
|
78
86
|
onValueChange={handleSearch}
|
|
79
87
|
className="h-10 flex-1 bg-transparent outline-none placeholder:text-muted-foreground"
|
|
80
88
|
/>
|
|
81
89
|
</div>
|
|
82
90
|
<CommandList>
|
|
83
91
|
<CommandEmpty>
|
|
84
|
-
{isLoading ?
|
|
85
|
-
<Trans>Loading...</Trans>
|
|
86
|
-
) : (
|
|
87
|
-
<Trans>No sellers found</Trans>
|
|
88
|
-
)}
|
|
92
|
+
{isLoading ? <Trans>Loading...</Trans> : <Trans>No sellers found</Trans>}
|
|
89
93
|
</CommandEmpty>
|
|
90
94
|
{data?.sellers.items.map(seller => (
|
|
91
95
|
<CommandItem
|
|
@@ -5,20 +5,20 @@ export type StockLevel = {
|
|
|
5
5
|
stockAllocated: number;
|
|
6
6
|
};
|
|
7
7
|
|
|
8
|
-
export function StockLevelLabel({ stockLevels }: { stockLevels: StockLevel[] }) {
|
|
8
|
+
export function StockLevelLabel({ stockLevels }: Readonly<{ stockLevels: StockLevel[] }>) {
|
|
9
9
|
const { i18n } = useLingui();
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
if (!Array.isArray(stockLevels)) {
|
|
12
12
|
return null;
|
|
13
13
|
}
|
|
14
14
|
const totalOnHand = stockLevels.reduce((acc, curr) => acc + curr.stockOnHand, 0);
|
|
15
15
|
const totalAllocated = stockLevels.reduce((acc, curr) => acc + curr.stockAllocated, 0);
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
return (
|
|
18
|
-
<span
|
|
18
|
+
<span
|
|
19
19
|
title={`${i18n.t('Stock on hand')}: ${totalOnHand}, ${i18n.t('Stock allocated')}: ${totalAllocated}`}
|
|
20
20
|
>
|
|
21
21
|
{totalOnHand} <span className="text-muted-foreground">/ {totalAllocated}</span>
|
|
22
22
|
</span>
|
|
23
23
|
);
|
|
24
|
-
}
|
|
24
|
+
}
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
SelectItem,
|
|
6
6
|
SelectTrigger,
|
|
7
7
|
SelectValue,
|
|
8
|
-
} from '@/components/ui/select.js';
|
|
9
|
-
import { api } from '@/graphql/api.js';
|
|
10
|
-
import { graphql } from '@/graphql/graphql.js';
|
|
11
|
-
import { Trans } from '@/lib/trans.js';
|
|
8
|
+
} from '@/vdb/components/ui/select.js';
|
|
9
|
+
import { api } from '@/vdb/graphql/api.js';
|
|
10
|
+
import { graphql } from '@/vdb/graphql/graphql.js';
|
|
11
|
+
import { Trans } from '@/vdb/lib/trans.js';
|
|
12
12
|
import { useQuery } from '@tanstack/react-query';
|
|
13
13
|
import { Skeleton } from '../ui/skeleton.js';
|
|
14
14
|
|
|
@@ -29,7 +29,7 @@ export interface TaxCategorySelectorProps {
|
|
|
29
29
|
onChange: (value: string) => void;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
export function TaxCategorySelector({ value, onChange }: TaxCategorySelectorProps) {
|
|
32
|
+
export function TaxCategorySelector({ value, onChange }: Readonly<TaxCategorySelectorProps>) {
|
|
33
33
|
const { data, isLoading, isPending, status } = useQuery({
|
|
34
34
|
queryKey: ['taxCategories'],
|
|
35
35
|
staleTime: 1000 * 60 * 5,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useUserSettings } from '@/hooks/use-user-settings.js';
|
|
1
|
+
import { useUserSettings } from '@/vdb/hooks/use-user-settings.js';
|
|
2
2
|
import { Controller, ControllerProps, FieldPath, FieldValues } from 'react-hook-form';
|
|
3
3
|
import { FormControl, FormDescription, FormItem, FormLabel, FormMessage } from '../ui/form.js';
|
|
4
4
|
import { FormFieldWrapper } from './form-field-wrapper.js';
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
SelectItem,
|
|
6
6
|
SelectTrigger,
|
|
7
7
|
SelectValue,
|
|
8
|
-
} from '@/components/ui/select.js';
|
|
9
|
-
import { api } from '@/graphql/api.js';
|
|
10
|
-
import { graphql } from '@/graphql/graphql.js';
|
|
11
|
-
import { Trans } from '@/lib/trans.js';
|
|
8
|
+
} from '@/vdb/components/ui/select.js';
|
|
9
|
+
import { api } from '@/vdb/graphql/api.js';
|
|
10
|
+
import { graphql } from '@/vdb/graphql/graphql.js';
|
|
11
|
+
import { Trans } from '@/vdb/lib/trans.js';
|
|
12
12
|
import { useQuery } from '@tanstack/react-query';
|
|
13
13
|
import { Skeleton } from '../ui/skeleton.js';
|
|
14
14
|
|
|
@@ -28,7 +28,7 @@ export interface ZoneSelectorProps {
|
|
|
28
28
|
onChange: (value: string) => void;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
export function ZoneSelector({ value, onChange }: ZoneSelectorProps) {
|
|
31
|
+
export function ZoneSelector({ value, onChange }: Readonly<ZoneSelectorProps>) {
|
|
32
32
|
const { data, isLoading, isPending } = useQuery({
|
|
33
33
|
queryKey: ['zones'],
|
|
34
34
|
staleTime: 1000 * 60 * 5,
|
|
@@ -63,4 +63,3 @@ export function ZoneSelector({ value, onChange }: ZoneSelectorProps) {
|
|
|
63
63
|
</Select>
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
|
-
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
3
2
|
import { ChevronDownIcon } from 'lucide-react';
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
|
|
5
|
-
import { cn } from '@/lib/utils.js';
|
|
5
|
+
import { cn } from '@/vdb/lib/utils.js';
|
|
6
6
|
|
|
7
7
|
function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>) {
|
|
8
8
|
return <AccordionPrimitive.Root data-slot="accordion" {...props} />;
|
|
@@ -56,4 +56,4 @@ function AccordionContent({
|
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
export { Accordion, AccordionItem, AccordionTrigger
|
|
59
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { buttonVariants } from '@/vdb/components/ui/button.js';
|
|
5
|
+
import { cn } from '@/vdb/lib/utils.js';
|
|
6
6
|
|
|
7
7
|
function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
|
|
8
8
|
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />;
|
|
@@ -115,14 +115,14 @@ function AlertDialogCancel({
|
|
|
115
115
|
|
|
116
116
|
export {
|
|
117
117
|
AlertDialog,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
AlertDialogTrigger,
|
|
118
|
+
AlertDialogAction,
|
|
119
|
+
AlertDialogCancel,
|
|
121
120
|
AlertDialogContent,
|
|
122
|
-
|
|
121
|
+
AlertDialogDescription,
|
|
123
122
|
AlertDialogFooter,
|
|
123
|
+
AlertDialogHeader,
|
|
124
|
+
AlertDialogOverlay,
|
|
125
|
+
AlertDialogPortal,
|
|
124
126
|
AlertDialogTitle,
|
|
125
|
-
|
|
126
|
-
AlertDialogAction,
|
|
127
|
-
AlertDialogCancel,
|
|
127
|
+
AlertDialogTrigger,
|
|
128
128
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
|
|
4
|
-
import { cn } from '@/lib/utils.js';
|
|
4
|
+
import { cn } from '@/vdb/lib/utils.js';
|
|
5
5
|
|
|
6
6
|
const alertVariants = cva(
|
|
7
7
|
'relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',
|
|
@@ -57,4 +57,4 @@ function AlertDescription({ className, ...props }: React.ComponentProps<'div'>)
|
|
|
57
57
|
);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
export { Alert,
|
|
60
|
+
export { Alert, AlertDescription, AlertTitle };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { Slot } from '@radix-ui/react-slot';
|
|
3
2
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
|
|
5
|
-
import { cn } from '@/lib/utils.js';
|
|
5
|
+
import { cn } from '@/vdb/lib/utils.js';
|
|
6
6
|
|
|
7
7
|
const badgeVariants = cva(
|
|
8
8
|
'inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-auto',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { Slot } from '@radix-ui/react-slot';
|
|
3
2
|
import { ChevronRight, MoreHorizontal } from 'lucide-react';
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
|
|
5
|
-
import { cn } from '@/lib/utils.js';
|
|
5
|
+
import { cn } from '@/vdb/lib/utils.js';
|
|
6
6
|
|
|
7
7
|
function Breadcrumb({ ...props }: React.ComponentProps<'nav'>) {
|
|
8
8
|
return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />;
|
|
@@ -93,10 +93,10 @@ function BreadcrumbEllipsis({ className, ...props }: React.ComponentProps<'span'
|
|
|
93
93
|
|
|
94
94
|
export {
|
|
95
95
|
Breadcrumb,
|
|
96
|
-
|
|
96
|
+
BreadcrumbEllipsis,
|
|
97
97
|
BreadcrumbItem,
|
|
98
98
|
BreadcrumbLink,
|
|
99
|
+
BreadcrumbList,
|
|
99
100
|
BreadcrumbPage,
|
|
100
101
|
BreadcrumbSeparator,
|
|
101
|
-
BreadcrumbEllipsis,
|
|
102
102
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { Slot } from '@radix-ui/react-slot';
|
|
3
2
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as React from 'react';
|
|
4
4
|
|
|
5
|
-
import { cn } from '@/lib/utils.js';
|
|
5
|
+
import { cn } from '@/vdb/lib/utils.js';
|
|
6
6
|
|
|
7
7
|
const buttonVariants = cva(
|
|
8
8
|
'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
|
|
@@ -43,7 +43,14 @@ export interface ButtonProps
|
|
|
43
43
|
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
44
44
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
45
45
|
const Comp = asChild ? Slot : 'button';
|
|
46
|
-
return
|
|
46
|
+
return (
|
|
47
|
+
<Comp
|
|
48
|
+
className={cn(buttonVariants({ variant, size, className }))}
|
|
49
|
+
type={props.type ?? 'button'}
|
|
50
|
+
ref={ref}
|
|
51
|
+
{...props}
|
|
52
|
+
/>
|
|
53
|
+
);
|
|
47
54
|
},
|
|
48
55
|
);
|
|
49
56
|
Button.displayName = 'Button';
|