@endora-commerce/admin-kit 0.0.0-stage → 0.100.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/LICENSE +21 -0
- package/README.md +212 -2
- package/dist/components/FileDropzone.d.ts +13 -0
- package/dist/components/FileDropzone.d.ts.map +1 -0
- package/dist/components/FileDropzone.js +39 -0
- package/dist/components/FileDropzone.js.map +1 -0
- package/dist/components/PaginationFooter.d.ts +25 -0
- package/dist/components/PaginationFooter.d.ts.map +1 -0
- package/dist/components/PaginationFooter.js +33 -0
- package/dist/components/PaginationFooter.js.map +1 -0
- package/dist/components/ResponsiveTable.d.ts +26 -0
- package/dist/components/ResponsiveTable.d.ts.map +1 -0
- package/dist/components/ResponsiveTable.js +34 -0
- package/dist/components/ResponsiveTable.js.map +1 -0
- package/dist/components/RowActionMenu.d.ts +40 -0
- package/dist/components/RowActionMenu.d.ts.map +1 -0
- package/dist/components/RowActionMenu.js +15 -0
- package/dist/components/RowActionMenu.js.map +1 -0
- package/dist/components/StickyFormActions.d.ts +10 -0
- package/dist/components/StickyFormActions.d.ts.map +1 -0
- package/dist/components/StickyFormActions.js +10 -0
- package/dist/components/StickyFormActions.js.map +1 -0
- package/dist/components/TouchReorderButtons.d.ts +13 -0
- package/dist/components/TouchReorderButtons.d.ts.map +1 -0
- package/dist/components/TouchReorderButtons.js +12 -0
- package/dist/components/TouchReorderButtons.js.map +1 -0
- package/dist/components/admin-user-picker/AdminUserPicker.d.ts +14 -0
- package/dist/components/admin-user-picker/AdminUserPicker.d.ts.map +1 -0
- package/dist/components/admin-user-picker/AdminUserPicker.js +68 -0
- package/dist/components/admin-user-picker/AdminUserPicker.js.map +1 -0
- package/dist/components/asset-picker/AssetFieldPicker.d.ts +32 -0
- package/dist/components/asset-picker/AssetFieldPicker.d.ts.map +1 -0
- package/dist/components/asset-picker/AssetFieldPicker.js +42 -0
- package/dist/components/asset-picker/AssetFieldPicker.js.map +1 -0
- package/dist/components/asset-picker/AssetPicker.d.ts +31 -0
- package/dist/components/asset-picker/AssetPicker.d.ts.map +1 -0
- package/dist/components/asset-picker/AssetPicker.js +68 -0
- package/dist/components/asset-picker/AssetPicker.js.map +1 -0
- package/dist/components/asset-picker/AssetUploader.d.ts +15 -0
- package/dist/components/asset-picker/AssetUploader.d.ts.map +1 -0
- package/dist/components/asset-picker/AssetUploader.js +61 -0
- package/dist/components/asset-picker/AssetUploader.js.map +1 -0
- package/dist/components/asset-picker/assets-api.d.ts +49 -0
- package/dist/components/asset-picker/assets-api.d.ts.map +1 -0
- package/dist/components/asset-picker/assets-api.js +67 -0
- package/dist/components/asset-picker/assets-api.js.map +1 -0
- package/dist/components/category-picker/CategorySelect.d.ts +14 -0
- package/dist/components/category-picker/CategorySelect.d.ts.map +1 -0
- package/dist/components/category-picker/CategorySelect.js +41 -0
- package/dist/components/category-picker/CategorySelect.js.map +1 -0
- package/dist/components/category-tree-picker/CategoryTreeNodeRow.d.ts +18 -0
- package/dist/components/category-tree-picker/CategoryTreeNodeRow.d.ts.map +1 -0
- package/dist/components/category-tree-picker/CategoryTreeNodeRow.js +19 -0
- package/dist/components/category-tree-picker/CategoryTreeNodeRow.js.map +1 -0
- package/dist/components/category-tree-picker/CategoryTreePicker.d.ts +23 -0
- package/dist/components/category-tree-picker/CategoryTreePicker.d.ts.map +1 -0
- package/dist/components/category-tree-picker/CategoryTreePicker.js +82 -0
- package/dist/components/category-tree-picker/CategoryTreePicker.js.map +1 -0
- package/dist/components/category-tree-picker/category-tree-utils.d.ts +35 -0
- package/dist/components/category-tree-picker/category-tree-utils.d.ts.map +1 -0
- package/dist/components/category-tree-picker/category-tree-utils.js +140 -0
- package/dist/components/category-tree-picker/category-tree-utils.js.map +1 -0
- package/dist/components/category-tree-picker/index.d.ts +4 -0
- package/dist/components/category-tree-picker/index.d.ts.map +1 -0
- package/dist/components/category-tree-picker/index.js +2 -0
- package/dist/components/category-tree-picker/index.js.map +1 -0
- package/dist/components/charts/echart.d.ts +17 -0
- package/dist/components/charts/echart.d.ts.map +1 -0
- package/dist/components/charts/echart.js +61 -0
- package/dist/components/charts/echart.js.map +1 -0
- package/dist/components/cms-picker/CmsBlockPicker.d.ts +14 -0
- package/dist/components/cms-picker/CmsBlockPicker.d.ts.map +1 -0
- package/dist/components/cms-picker/CmsBlockPicker.js +40 -0
- package/dist/components/cms-picker/CmsBlockPicker.js.map +1 -0
- package/dist/components/cms-picker/CmsPagePicker.d.ts +15 -0
- package/dist/components/cms-picker/CmsPagePicker.d.ts.map +1 -0
- package/dist/components/cms-picker/CmsPagePicker.js +80 -0
- package/dist/components/cms-picker/CmsPagePicker.js.map +1 -0
- package/dist/components/content-language-tabs/ContentLanguageTabs.d.ts +30 -0
- package/dist/components/content-language-tabs/ContentLanguageTabs.d.ts.map +1 -0
- package/dist/components/content-language-tabs/ContentLanguageTabs.js +14 -0
- package/dist/components/content-language-tabs/ContentLanguageTabs.js.map +1 -0
- package/dist/components/country-select/CountrySelect.d.ts +29 -0
- package/dist/components/country-select/CountrySelect.d.ts.map +1 -0
- package/dist/components/country-select/CountrySelect.js +40 -0
- package/dist/components/country-select/CountrySelect.js.map +1 -0
- package/dist/components/country-select/index.d.ts +3 -0
- package/dist/components/country-select/index.d.ts.map +1 -0
- package/dist/components/country-select/index.js +3 -0
- package/dist/components/country-select/index.js.map +1 -0
- package/dist/components/country-select/useCountriesQuery.d.ts +12 -0
- package/dist/components/country-select/useCountriesQuery.d.ts.map +1 -0
- package/dist/components/country-select/useCountriesQuery.js +69 -0
- package/dist/components/country-select/useCountriesQuery.js.map +1 -0
- package/dist/components/custom-field-values/CustomFieldValuesPanel.d.ts +48 -0
- package/dist/components/custom-field-values/CustomFieldValuesPanel.d.ts.map +1 -0
- package/dist/components/custom-field-values/CustomFieldValuesPanel.js +122 -0
- package/dist/components/custom-field-values/CustomFieldValuesPanel.js.map +1 -0
- package/dist/components/customer-group-picker/CustomerGroupPicker.d.ts +14 -0
- package/dist/components/customer-group-picker/CustomerGroupPicker.d.ts.map +1 -0
- package/dist/components/customer-group-picker/CustomerGroupPicker.js +36 -0
- package/dist/components/customer-group-picker/CustomerGroupPicker.js.map +1 -0
- package/dist/components/customer-picker/CustomerPicker.d.ts +18 -0
- package/dist/components/customer-picker/CustomerPicker.d.ts.map +1 -0
- package/dist/components/customer-picker/CustomerPicker.js +85 -0
- package/dist/components/customer-picker/CustomerPicker.js.map +1 -0
- package/dist/components/dictionary-picker/CountryPicker.d.ts +26 -0
- package/dist/components/dictionary-picker/CountryPicker.d.ts.map +1 -0
- package/dist/components/dictionary-picker/CountryPicker.js +29 -0
- package/dist/components/dictionary-picker/CountryPicker.js.map +1 -0
- package/dist/components/dictionary-picker/CurrencyPicker.d.ts +17 -0
- package/dist/components/dictionary-picker/CurrencyPicker.d.ts.map +1 -0
- package/dist/components/dictionary-picker/CurrencyPicker.js +29 -0
- package/dist/components/dictionary-picker/CurrencyPicker.js.map +1 -0
- package/dist/components/dictionary-picker/dictionary-api.d.ts +21 -0
- package/dist/components/dictionary-picker/dictionary-api.d.ts.map +1 -0
- package/dist/components/dictionary-picker/dictionary-api.js +26 -0
- package/dist/components/dictionary-picker/dictionary-api.js.map +1 -0
- package/dist/components/dictionary-picker/index.d.ts +4 -0
- package/dist/components/dictionary-picker/index.d.ts.map +1 -0
- package/dist/components/dictionary-picker/index.js +4 -0
- package/dist/components/dictionary-picker/index.js.map +1 -0
- package/dist/components/fulfilment-strategy-picker/FulfilmentStrategyPicker.d.ts +49 -0
- package/dist/components/fulfilment-strategy-picker/FulfilmentStrategyPicker.d.ts.map +1 -0
- package/dist/components/fulfilment-strategy-picker/FulfilmentStrategyPicker.js +43 -0
- package/dist/components/fulfilment-strategy-picker/FulfilmentStrategyPicker.js.map +1 -0
- package/dist/components/hooks/useFocusTrap.d.ts +6 -0
- package/dist/components/hooks/useFocusTrap.d.ts.map +1 -0
- package/dist/components/hooks/useFocusTrap.js +41 -0
- package/dist/components/hooks/useFocusTrap.js.map +1 -0
- package/dist/components/hooks/useViewportTier.d.ts +7 -0
- package/dist/components/hooks/useViewportTier.d.ts.map +1 -0
- package/dist/components/hooks/useViewportTier.js +23 -0
- package/dist/components/hooks/useViewportTier.js.map +1 -0
- package/dist/components/index.d.ts +101 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +63 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/organization-picker/OrganizationPicker.d.ts +28 -0
- package/dist/components/organization-picker/OrganizationPicker.d.ts.map +1 -0
- package/dist/components/organization-picker/OrganizationPicker.js +35 -0
- package/dist/components/organization-picker/OrganizationPicker.js.map +1 -0
- package/dist/components/organization-picker/OrganizationPickerMulti.d.ts +32 -0
- package/dist/components/organization-picker/OrganizationPickerMulti.d.ts.map +1 -0
- package/dist/components/organization-picker/OrganizationPickerMulti.js +55 -0
- package/dist/components/organization-picker/OrganizationPickerMulti.js.map +1 -0
- package/dist/components/organization-picker/OrganizationStatusBadge.d.ts +7 -0
- package/dist/components/organization-picker/OrganizationStatusBadge.d.ts.map +1 -0
- package/dist/components/organization-picker/OrganizationStatusBadge.js +33 -0
- package/dist/components/organization-picker/OrganizationStatusBadge.js.map +1 -0
- package/dist/components/organization-picker/useOrganizationsQuery.d.ts +33 -0
- package/dist/components/organization-picker/useOrganizationsQuery.d.ts.map +1 -0
- package/dist/components/organization-picker/useOrganizationsQuery.js +92 -0
- package/dist/components/organization-picker/useOrganizationsQuery.js.map +1 -0
- package/dist/components/payment-method-availability/MethodAvailabilityCell.d.ts +38 -0
- package/dist/components/payment-method-availability/MethodAvailabilityCell.d.ts.map +1 -0
- package/dist/components/payment-method-availability/MethodAvailabilityCell.js +50 -0
- package/dist/components/payment-method-availability/MethodAvailabilityCell.js.map +1 -0
- package/dist/components/product-picker/ProductPicker.d.ts +22 -0
- package/dist/components/product-picker/ProductPicker.d.ts.map +1 -0
- package/dist/components/product-picker/ProductPicker.js +143 -0
- package/dist/components/product-picker/ProductPicker.js.map +1 -0
- package/dist/components/reorder/ReorderAnnouncer.d.ts +29 -0
- package/dist/components/reorder/ReorderAnnouncer.d.ts.map +1 -0
- package/dist/components/reorder/ReorderAnnouncer.js +6 -0
- package/dist/components/reorder/ReorderAnnouncer.js.map +1 -0
- package/dist/components/reorder/useReorderList.d.ts +121 -0
- package/dist/components/reorder/useReorderList.d.ts.map +1 -0
- package/dist/components/reorder/useReorderList.js +241 -0
- package/dist/components/reorder/useReorderList.js.map +1 -0
- package/dist/components/rule-builder/RuleBuilder.d.ts +105 -0
- package/dist/components/rule-builder/RuleBuilder.d.ts.map +1 -0
- package/dist/components/rule-builder/RuleBuilder.js +138 -0
- package/dist/components/rule-builder/RuleBuilder.js.map +1 -0
- package/dist/components/sales-channel-picker/SalesChannelPicker.d.ts +15 -0
- package/dist/components/sales-channel-picker/SalesChannelPicker.d.ts.map +1 -0
- package/dist/components/sales-channel-picker/SalesChannelPicker.js +79 -0
- package/dist/components/sales-channel-picker/SalesChannelPicker.js.map +1 -0
- package/dist/components/scope-notice/ScopeNotice.d.ts +33 -0
- package/dist/components/scope-notice/ScopeNotice.d.ts.map +1 -0
- package/dist/components/scope-notice/ScopeNotice.js +11 -0
- package/dist/components/scope-notice/ScopeNotice.js.map +1 -0
- package/dist/components/scope-picker/ScopePicker.d.ts +28 -0
- package/dist/components/scope-picker/ScopePicker.d.ts.map +1 -0
- package/dist/components/scope-picker/ScopePicker.js +114 -0
- package/dist/components/scope-picker/ScopePicker.js.map +1 -0
- package/dist/components/scope-picker/sales-channels-api.d.ts +19 -0
- package/dist/components/scope-picker/sales-channels-api.d.ts.map +1 -0
- package/dist/components/scope-picker/sales-channels-api.js +30 -0
- package/dist/components/scope-picker/sales-channels-api.js.map +1 -0
- package/dist/components/status-transition-graph/StatusTransitionGraph.d.ts +26 -0
- package/dist/components/status-transition-graph/StatusTransitionGraph.d.ts.map +1 -0
- package/dist/components/status-transition-graph/StatusTransitionGraph.js +241 -0
- package/dist/components/status-transition-graph/StatusTransitionGraph.js.map +1 -0
- package/dist/components/status-transition-graph/index.d.ts +3 -0
- package/dist/components/status-transition-graph/index.d.ts.map +1 -0
- package/dist/components/status-transition-graph/index.js +2 -0
- package/dist/components/status-transition-graph/index.js.map +1 -0
- package/dist/contributions/index.d.ts +44 -0
- package/dist/contributions/index.d.ts.map +1 -0
- package/dist/contributions/index.js +42 -0
- package/dist/contributions/index.js.map +1 -0
- package/dist/contributions/zone-component.d.ts +70 -0
- package/dist/contributions/zone-component.d.ts.map +1 -0
- package/dist/contributions/zone-component.js +26 -0
- package/dist/contributions/zone-component.js.map +1 -0
- package/dist/field-protection/FieldProtectionPricePanel.d.ts +26 -0
- package/dist/field-protection/FieldProtectionPricePanel.d.ts.map +1 -0
- package/dist/field-protection/FieldProtectionPricePanel.js +14 -0
- package/dist/field-protection/FieldProtectionPricePanel.js.map +1 -0
- package/dist/field-protection/FieldProtectionSummary.d.ts +18 -0
- package/dist/field-protection/FieldProtectionSummary.d.ts.map +1 -0
- package/dist/field-protection/FieldProtectionSummary.js +18 -0
- package/dist/field-protection/FieldProtectionSummary.js.map +1 -0
- package/dist/field-protection/FieldProtectionToggle.d.ts +36 -0
- package/dist/field-protection/FieldProtectionToggle.d.ts.map +1 -0
- package/dist/field-protection/FieldProtectionToggle.js +30 -0
- package/dist/field-protection/FieldProtectionToggle.js.map +1 -0
- package/dist/field-protection/describe-path.d.ts +27 -0
- package/dist/field-protection/describe-path.d.ts.map +1 -0
- package/dist/field-protection/describe-path.js +28 -0
- package/dist/field-protection/describe-path.js.map +1 -0
- package/dist/field-protection/index.d.ts +46 -0
- package/dist/field-protection/index.d.ts.map +1 -0
- package/dist/field-protection/index.js +41 -0
- package/dist/field-protection/index.js.map +1 -0
- package/dist/field-protection/types.d.ts +93 -0
- package/dist/field-protection/types.d.ts.map +1 -0
- package/dist/field-protection/types.js +2 -0
- package/dist/field-protection/types.js.map +1 -0
- package/dist/field-protection/use-field-protection.d.ts +27 -0
- package/dist/field-protection/use-field-protection.d.ts.map +1 -0
- package/dist/field-protection/use-field-protection.js +149 -0
- package/dist/field-protection/use-field-protection.js.map +1 -0
- package/dist/i18n/TranslationProvider.d.ts +27 -0
- package/dist/i18n/TranslationProvider.d.ts.map +1 -0
- package/dist/i18n/TranslationProvider.js +130 -0
- package/dist/i18n/TranslationProvider.js.map +1 -0
- package/dist/i18n/app-language-context.d.ts +8 -0
- package/dist/i18n/app-language-context.d.ts.map +1 -0
- package/dist/i18n/app-language-context.js +13 -0
- package/dist/i18n/app-language-context.js.map +1 -0
- package/dist/i18n/index.d.ts +29 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +25 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/interpolate.d.ts +2 -0
- package/dist/i18n/interpolate.d.ts.map +1 -0
- package/dist/i18n/interpolate.js +10 -0
- package/dist/i18n/interpolate.js.map +1 -0
- package/dist/i18n/language-storage.d.ts +16 -0
- package/dist/i18n/language-storage.d.ts.map +1 -0
- package/dist/i18n/language-storage.js +26 -0
- package/dist/i18n/language-storage.js.map +1 -0
- package/dist/i18n/resolver.d.ts +19 -0
- package/dist/i18n/resolver.d.ts.map +1 -0
- package/dist/i18n/resolver.js +23 -0
- package/dist/i18n/resolver.js.map +1 -0
- package/dist/i18n/types.d.ts +12 -0
- package/dist/i18n/types.d.ts.map +1 -0
- package/dist/i18n/types.js +7 -0
- package/dist/i18n/types.js.map +1 -0
- package/dist/i18n/useTranslation.d.ts +2 -0
- package/dist/i18n/useTranslation.d.ts.map +1 -0
- package/dist/i18n/useTranslation.js +16 -0
- package/dist/i18n/useTranslation.js.map +1 -0
- package/dist/lib/admin-actions/icon-map.d.ts +3 -0
- package/dist/lib/admin-actions/icon-map.d.ts.map +1 -0
- package/dist/lib/admin-actions/icon-map.js +115 -0
- package/dist/lib/admin-actions/icon-map.js.map +1 -0
- package/dist/lib/api-client.d.ts +55 -0
- package/dist/lib/api-client.d.ts.map +1 -0
- package/dist/lib/api-client.js +89 -0
- package/dist/lib/api-client.js.map +1 -0
- package/dist/lib/asset-url.d.ts +32 -0
- package/dist/lib/asset-url.d.ts.map +1 -0
- package/dist/lib/asset-url.js +42 -0
- package/dist/lib/asset-url.js.map +1 -0
- package/dist/lib/auth.d.ts +92 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +133 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/format.d.ts +2 -0
- package/dist/lib/format.d.ts.map +1 -0
- package/dist/lib/format.js +9 -0
- package/dist/lib/format.js.map +1 -0
- package/dist/lib/index.d.ts +46 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +41 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/invoice-email-outcome.d.ts +53 -0
- package/dist/lib/invoice-email-outcome.d.ts.map +1 -0
- package/dist/lib/invoice-email-outcome.js +43 -0
- package/dist/lib/invoice-email-outcome.js.map +1 -0
- package/dist/lib/module-presence/ModulePresenceProvider.d.ts +49 -0
- package/dist/lib/module-presence/ModulePresenceProvider.d.ts.map +1 -0
- package/dist/lib/module-presence/ModulePresenceProvider.js +73 -0
- package/dist/lib/module-presence/ModulePresenceProvider.js.map +1 -0
- package/dist/lib/module-presence/api.d.ts +15 -0
- package/dist/lib/module-presence/api.d.ts.map +1 -0
- package/dist/lib/module-presence/api.js +25 -0
- package/dist/lib/module-presence/api.js.map +1 -0
- package/dist/lib/module-presence/index.d.ts +3 -0
- package/dist/lib/module-presence/index.d.ts.map +1 -0
- package/dist/lib/module-presence/index.js +3 -0
- package/dist/lib/module-presence/index.js.map +1 -0
- package/dist/lib/money.d.ts +22 -0
- package/dist/lib/money.d.ts.map +1 -0
- package/dist/lib/money.js +51 -0
- package/dist/lib/money.js.map +1 -0
- package/dist/lib/page-size-options.d.ts +15 -0
- package/dist/lib/page-size-options.d.ts.map +1 -0
- package/dist/lib/page-size-options.js +14 -0
- package/dist/lib/page-size-options.js.map +1 -0
- package/dist/lib/status-color.d.ts +32 -0
- package/dist/lib/status-color.d.ts.map +1 -0
- package/dist/lib/status-color.js +24 -0
- package/dist/lib/status-color.js.map +1 -0
- package/dist/lib/surface-visibility.d.ts +70 -0
- package/dist/lib/surface-visibility.d.ts.map +1 -0
- package/dist/lib/surface-visibility.js +37 -0
- package/dist/lib/surface-visibility.js.map +1 -0
- package/dist/lib/text-normalization.d.ts +56 -0
- package/dist/lib/text-normalization.d.ts.map +1 -0
- package/dist/lib/text-normalization.js +59 -0
- package/dist/lib/text-normalization.js.map +1 -0
- package/dist/lib/use-page-size-preference.d.ts +29 -0
- package/dist/lib/use-page-size-preference.d.ts.map +1 -0
- package/dist/lib/use-page-size-preference.js +61 -0
- package/dist/lib/use-page-size-preference.js.map +1 -0
- package/dist/lib/use-unsaved-changes-prompt.d.ts +23 -0
- package/dist/lib/use-unsaved-changes-prompt.d.ts.map +1 -0
- package/dist/lib/use-unsaved-changes-prompt.js +75 -0
- package/dist/lib/use-unsaved-changes-prompt.js.map +1 -0
- package/dist/lib/utils.d.ts +9 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +12 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/uuid.d.ts +8 -0
- package/dist/lib/uuid.d.ts.map +1 -0
- package/dist/lib/uuid.js +18 -0
- package/dist/lib/uuid.js.map +1 -0
- package/dist/ui/alert.d.ts +12 -0
- package/dist/ui/alert.d.ts.map +1 -0
- package/dist/ui/alert.js +22 -0
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/badge.d.ts +10 -0
- package/dist/ui/badge.d.ts.map +1 -0
- package/dist/ui/badge.js +21 -0
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/button.d.ts +12 -0
- package/dist/ui/button.d.ts.map +1 -0
- package/dist/ui/button.js +31 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/card.d.ts +8 -0
- package/dist/ui/card.d.ts.map +1 -0
- package/dist/ui/card.js +16 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/checkbox.d.ts +8 -0
- package/dist/ui/checkbox.d.ts.map +1 -0
- package/dist/ui/checkbox.js +11 -0
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/color-picker.d.ts +23 -0
- package/dist/ui/color-picker.d.ts.map +1 -0
- package/dist/ui/color-picker.js +76 -0
- package/dist/ui/color-picker.js.map +1 -0
- package/dist/ui/combobox.d.ts +68 -0
- package/dist/ui/combobox.d.ts.map +1 -0
- package/dist/ui/combobox.js +182 -0
- package/dist/ui/combobox.js.map +1 -0
- package/dist/ui/dropdown-menu.d.ts +26 -0
- package/dist/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/ui/dropdown-menu.js +38 -0
- package/dist/ui/dropdown-menu.js.map +1 -0
- package/dist/ui/index.d.ts +47 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +38 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/input.d.ts +3 -0
- package/dist/ui/input.d.ts.map +1 -0
- package/dist/ui/input.js +8 -0
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/label.d.ts +4 -0
- package/dist/ui/label.d.ts.map +1 -0
- package/dist/ui/label.js +9 -0
- package/dist/ui/label.js.map +1 -0
- package/dist/ui/multi-select.d.ts +32 -0
- package/dist/ui/multi-select.d.ts.map +1 -0
- package/dist/ui/multi-select.js +63 -0
- package/dist/ui/multi-select.js.map +1 -0
- package/dist/ui/page-header.d.ts +21 -0
- package/dist/ui/page-header.d.ts.map +1 -0
- package/dist/ui/page-header.js +9 -0
- package/dist/ui/page-header.js.map +1 -0
- package/dist/ui/route-tabs.d.ts +58 -0
- package/dist/ui/route-tabs.d.ts.map +1 -0
- package/dist/ui/route-tabs.js +34 -0
- package/dist/ui/route-tabs.js.map +1 -0
- package/dist/ui/save-button-group.d.ts +27 -0
- package/dist/ui/save-button-group.d.ts.map +1 -0
- package/dist/ui/save-button-group.js +44 -0
- package/dist/ui/save-button-group.js.map +1 -0
- package/dist/ui/section.d.ts +20 -0
- package/dist/ui/section.d.ts.map +1 -0
- package/dist/ui/section.js +7 -0
- package/dist/ui/section.js.map +1 -0
- package/dist/ui/select.d.ts +10 -0
- package/dist/ui/select.d.ts.map +1 -0
- package/dist/ui/select.js +15 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/separator.d.ts +3 -0
- package/dist/ui/separator.d.ts.map +1 -0
- package/dist/ui/separator.js +7 -0
- package/dist/ui/separator.js.map +1 -0
- package/dist/ui/table.d.ts +10 -0
- package/dist/ui/table.d.ts.map +1 -0
- package/dist/ui/table.js +20 -0
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/textarea.d.ts +3 -0
- package/dist/ui/textarea.d.ts.map +1 -0
- package/dist/ui/textarea.js +8 -0
- package/dist/ui/textarea.js.map +1 -0
- package/dist/zones/AdminContributionsProvider.d.ts +72 -0
- package/dist/zones/AdminContributionsProvider.d.ts.map +1 -0
- package/dist/zones/AdminContributionsProvider.js +63 -0
- package/dist/zones/AdminContributionsProvider.js.map +1 -0
- package/dist/zones/AdminZone.d.ts +30 -0
- package/dist/zones/AdminZone.d.ts.map +1 -0
- package/dist/zones/AdminZone.js +59 -0
- package/dist/zones/AdminZone.js.map +1 -0
- package/dist/zones/RouteTabsZone.d.ts +62 -0
- package/dist/zones/RouteTabsZone.d.ts.map +1 -0
- package/dist/zones/RouteTabsZone.js +25 -0
- package/dist/zones/RouteTabsZone.js.map +1 -0
- package/dist/zones/ZoneErrorBoundary.d.ts +36 -0
- package/dist/zones/ZoneErrorBoundary.d.ts.map +1 -0
- package/dist/zones/ZoneErrorBoundary.js +44 -0
- package/dist/zones/ZoneErrorBoundary.js.map +1 -0
- package/dist/zones/index.d.ts +31 -0
- package/dist/zones/index.d.ts.map +1 -0
- package/dist/zones/index.js +27 -0
- package/dist/zones/index.js.map +1 -0
- package/dist/zones/use-admin-zone.d.ts +32 -0
- package/dist/zones/use-admin-zone.d.ts.map +1 -0
- package/dist/zones/use-admin-zone.js +96 -0
- package/dist/zones/use-admin-zone.js.map +1 -0
- package/package.json +94 -3
- package/tailwind.css +14 -0
- package/theme.css +2056 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface MultiSelectOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
export interface MultiSelectProps {
|
|
7
|
+
options: MultiSelectOption[];
|
|
8
|
+
selected: string[];
|
|
9
|
+
onChange: (next: string[]) => void;
|
|
10
|
+
/** Text shown on the trigger when nothing is selected. */
|
|
11
|
+
placeholder: string;
|
|
12
|
+
/** aria-label for the trigger button. */
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** Optional leading icon for the trigger (e.g. a Columns glyph). */
|
|
17
|
+
icon?: ReactNode;
|
|
18
|
+
/** Show a search box in the panel to filter options (diacritic-insensitive). */
|
|
19
|
+
searchable?: boolean;
|
|
20
|
+
/** Placeholder for the search box when `searchable`. */
|
|
21
|
+
searchPlaceholder?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Dependency-free multi-select dropdown (no Radix popover), styled to match the
|
|
25
|
+
* shadcn-style admin primitives. Renders a trigger button summarising the
|
|
26
|
+
* selection and a checkbox panel; closes on outside pointer interactions.
|
|
27
|
+
*
|
|
28
|
+
* Reused by the orders list for the status / sales-channel / payment / delivery
|
|
29
|
+
* filters and by the column picker.
|
|
30
|
+
*/
|
|
31
|
+
export declare function MultiSelect({ options, selected, onChange, placeholder, ariaLabel, className, disabled, icon, searchable, searchPlaceholder, }: MultiSelectProps): ReactNode;
|
|
32
|
+
//# sourceMappingURL=multi-select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multi-select.d.ts","sourceRoot":"","sources":["../../src/ui/multi-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAM3E,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACnC,0DAA0D;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oEAAoE;IACpE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,gFAAgF;IAChF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wDAAwD;IACxD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,SAAS,EACT,SAAS,EACT,QAAgB,EAChB,IAAI,EACJ,UAAkB,EAClB,iBAAiB,GAClB,EAAE,gBAAgB,GAAG,SAAS,CAoH9B"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useId, useRef, useState } from 'react';
|
|
3
|
+
import { Check, ChevronDown } from 'lucide-react';
|
|
4
|
+
import { cn } from '../lib/utils.js';
|
|
5
|
+
import { Checkbox } from './checkbox.js';
|
|
6
|
+
import { normalize } from '../lib/text-normalization.js';
|
|
7
|
+
/**
|
|
8
|
+
* Dependency-free multi-select dropdown (no Radix popover), styled to match the
|
|
9
|
+
* shadcn-style admin primitives. Renders a trigger button summarising the
|
|
10
|
+
* selection and a checkbox panel; closes on outside pointer interactions.
|
|
11
|
+
*
|
|
12
|
+
* Reused by the orders list for the status / sales-channel / payment / delivery
|
|
13
|
+
* filters and by the column picker.
|
|
14
|
+
*/
|
|
15
|
+
export function MultiSelect({ options, selected, onChange, placeholder, ariaLabel, className, disabled = false, icon, searchable = false, searchPlaceholder, }) {
|
|
16
|
+
const reactId = useId();
|
|
17
|
+
const [open, setOpen] = useState(false);
|
|
18
|
+
const [query, setQuery] = useState('');
|
|
19
|
+
const containerRef = useRef(null);
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (!open)
|
|
22
|
+
return;
|
|
23
|
+
const handler = (e) => {
|
|
24
|
+
const target = e.target;
|
|
25
|
+
if (!containerRef.current || !target)
|
|
26
|
+
return;
|
|
27
|
+
if (containerRef.current.contains(target))
|
|
28
|
+
return;
|
|
29
|
+
setOpen(false);
|
|
30
|
+
};
|
|
31
|
+
document.addEventListener('pointerdown', handler);
|
|
32
|
+
return () => document.removeEventListener('pointerdown', handler);
|
|
33
|
+
}, [open]);
|
|
34
|
+
// Reset the search box each time the panel closes.
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
if (!open)
|
|
37
|
+
setQuery('');
|
|
38
|
+
}, [open]);
|
|
39
|
+
const needle = normalize(query);
|
|
40
|
+
const visibleOptions = searchable && needle !== ''
|
|
41
|
+
? options.filter((o) => normalize(o.label).includes(needle))
|
|
42
|
+
: options;
|
|
43
|
+
const selectedSet = new Set(selected);
|
|
44
|
+
const summary = selected.length === 0
|
|
45
|
+
? placeholder
|
|
46
|
+
: selected.length === 1
|
|
47
|
+
? (options.find((o) => o.value === selected[0])?.label ?? placeholder)
|
|
48
|
+
: `${placeholder} (${selected.length})`;
|
|
49
|
+
const toggle = (value) => {
|
|
50
|
+
const next = new Set(selectedSet);
|
|
51
|
+
if (next.has(value))
|
|
52
|
+
next.delete(value);
|
|
53
|
+
else
|
|
54
|
+
next.add(value);
|
|
55
|
+
// Preserve the option order rather than selection order.
|
|
56
|
+
onChange(options.filter((o) => next.has(o.value)).map((o) => o.value));
|
|
57
|
+
};
|
|
58
|
+
return (_jsxs("div", { ref: containerRef, className: cn('relative', className), children: [_jsxs("button", { type: "button", "aria-label": ariaLabel ?? placeholder, "aria-haspopup": "listbox", "aria-expanded": open, disabled: disabled, onClick: () => setOpen((v) => !v), className: cn('flex h-9 w-full items-center justify-between gap-2 rounded-md border bg-background px-3 text-sm', 'disabled:cursor-not-allowed disabled:opacity-50', selected.length === 0 && 'text-muted-foreground'), children: [_jsxs("span", { className: "flex items-center gap-2 truncate", children: [icon, _jsx("span", { className: "truncate", children: summary })] }), _jsx(ChevronDown, { className: "size-4 shrink-0 opacity-60" })] }), open ? (_jsxs("div", { role: "listbox", "aria-multiselectable": "true", className: "absolute z-20 mt-1 flex max-h-72 w-max min-w-full flex-col overflow-hidden rounded-md border bg-popover p-1 shadow-md", children: [searchable ? (_jsx("input", { type: "text", autoFocus: true, value: query, onChange: (e) => setQuery(e.target.value), placeholder: searchPlaceholder ?? 'Search…', "aria-label": searchPlaceholder ?? 'Search options', className: cn('mb-1 h-8 w-full rounded-sm border border-input bg-transparent px-2 text-sm', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring') })) : null, _jsx("div", { className: "overflow-auto", children: visibleOptions.length === 0 ? (_jsx("p", { className: "px-2 py-1.5 text-sm text-muted-foreground", children: options.length === 0 ? '—' : 'No matches' })) : (visibleOptions.map((opt) => {
|
|
59
|
+
const checked = selectedSet.has(opt.value);
|
|
60
|
+
return (_jsxs("label", { htmlFor: `${reactId}-${opt.value}`, className: "flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-accent hover:text-accent-foreground", children: [_jsx(Checkbox, { id: `${reactId}-${opt.value}`, checked: checked, onChange: () => toggle(opt.value) }), _jsx("span", { className: "flex-1 truncate", children: opt.label }), checked ? _jsx(Check, { className: "size-3.5 opacity-70" }) : null] }, opt.value));
|
|
61
|
+
})) })] })) : null] }));
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=multi-select.js.map
|
|
@@ -0,0 +1 @@
|
|
|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E,EAAE,CACX,4EAA4E,EAC5E,yEAAyE,CAC1E,GACD,CACH,CAAC,CAAC,CAAC,IAAI,EACR,cAAK,SAAS,EAAC,eAAe,YAC7B,cAAc,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAC7B,YAAG,SAAS,EAAC,2CAA2C,YACrD,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY,GACxC,CACL,CAAC,CAAC,CAAC,CACF,cAAc,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;4BACzB,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;4BAC3C,OAAO,CACL,iBAEE,OAAO,EAAE,GAAG,OAAO,IAAI,GAAG,CAAC,KAAK,EAAE,EAClC,SAAS,EAAC,oHAAoH,aAE9H,KAAC,QAAQ,IACP,EAAE,EAAE,GAAG,OAAO,IAAI,GAAG,CAAC,KAAK,EAAE,EAC7B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,GAAS,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,GACvC,EACF,eAAM,SAAS,EAAC,iBAAiB,YAAE,GAAG,CAAC,KAAK,GAAQ,EACnD,OAAO,CAAC,CAAC,CAAC,KAAC,KAAK,IAAC,SAAS,EAAC,qBAAqB,GAAG,CAAC,CAAC,CAAC,IAAI,KAVtD,GAAG,CAAC,KAAK,CAWR,CACT,CAAC;wBACJ,CAAC,CAAC,CACH,GACK,IACF,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The standard page header: title + optional description on the left,
|
|
4
|
+
* an actions slot on the right. Used across every admin module page.
|
|
5
|
+
*
|
|
6
|
+
* An optional `back` link renders above the title as a small muted
|
|
7
|
+
* affordance (chevron + label), mirroring the detail-view pattern in the
|
|
8
|
+
* Admin UI design reference.
|
|
9
|
+
*/
|
|
10
|
+
export interface PageHeaderProps {
|
|
11
|
+
title: ReactNode;
|
|
12
|
+
description?: ReactNode;
|
|
13
|
+
actions?: ReactNode;
|
|
14
|
+
back?: {
|
|
15
|
+
label: ReactNode;
|
|
16
|
+
to: string;
|
|
17
|
+
};
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function PageHeader({ title, description, actions, back, className, }: PageHeaderProps): ReactNode;
|
|
21
|
+
//# sourceMappingURL=page-header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../src/ui/page-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE;QAAE,KAAK,EAAE,SAAS,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,OAAO,EACP,IAAI,EACJ,SAAS,GACV,EAAE,eAAe,GAAG,SAAS,CAmB7B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import {} from 'react';
|
|
3
|
+
import { Link } from 'react-router-dom';
|
|
4
|
+
import { ChevronLeft } from 'lucide-react';
|
|
5
|
+
import { cn } from '../lib/utils.js';
|
|
6
|
+
export function PageHeader({ title, description, actions, back, className, }) {
|
|
7
|
+
return (_jsxs("header", { className: cn('mb-6 flex flex-wrap items-start justify-between gap-4', className), children: [_jsxs("div", { className: "space-y-1", children: [back ? (_jsxs(Link, { to: back.to, className: "-ml-0.5 inline-flex items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground", children: [_jsx(ChevronLeft, { className: "size-3.5" }), back.label] })) : null, _jsx("h1", { className: "flex items-center gap-2.5 text-2xl font-semibold tracking-tight", children: title }), description ? _jsx("p", { className: "text-sm text-muted-foreground", children: description }) : null] }), actions ? _jsx("div", { className: "flex items-center gap-2", children: actions }) : null] }));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=page-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-header.js","sourceRoot":"","sources":["../../src/ui/page-header.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAkBrC,MAAM,UAAU,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,OAAO,EACP,IAAI,EACJ,SAAS,GACO;IAChB,OAAO,CACL,kBAAQ,SAAS,EAAE,EAAE,CAAC,uDAAuD,EAAE,SAAS,CAAC,aACvF,eAAK,SAAS,EAAC,WAAW,aACvB,IAAI,CAAC,CAAC,CAAC,CACN,MAAC,IAAI,IACH,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,SAAS,EAAC,8GAA8G,aAExH,KAAC,WAAW,IAAC,SAAS,EAAC,UAAU,GAAG,EACnC,IAAI,CAAC,KAAK,IACN,CACR,CAAC,CAAC,CAAC,IAAI,EACR,aAAI,SAAS,EAAC,iEAAiE,YAAE,KAAK,GAAM,EAC3F,WAAW,CAAC,CAAC,CAAC,YAAG,SAAS,EAAC,+BAA+B,YAAE,WAAW,GAAK,CAAC,CAAC,CAAC,IAAI,IAChF,EACL,OAAO,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,yBAAyB,YAAE,OAAO,GAAO,CAAC,CAAC,CAAC,IAAI,IACnE,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A tab strip whose tabs are routes rather than component state.
|
|
4
|
+
*
|
|
5
|
+
* The admin already had in-page tabs (`useState` over a union), but several
|
|
6
|
+
* surfaces are two sibling *pages* an operator switches between — product
|
|
7
|
+
* feeds and their templates, the two order-entry modes, invoices and invoice
|
|
8
|
+
* templates. Each of those used to spend a second sidebar row on the sibling;
|
|
9
|
+
* a tab strip says "same place, other view" and the sidebar keeps one entry.
|
|
10
|
+
*
|
|
11
|
+
* Matching is prefix-based but **longest-wins**: `/product-feeds` is a prefix
|
|
12
|
+
* of `/product-feeds/templates`, so a plain `startsWith` would light both tabs
|
|
13
|
+
* at once. Selecting only the most specific match keeps a feed detail page on
|
|
14
|
+
* *Feeds* and a template editor on *Templates*, which is what an operator
|
|
15
|
+
* navigating deeper expects.
|
|
16
|
+
*/
|
|
17
|
+
export interface RouteTab {
|
|
18
|
+
/** Absolute admin route this tab opens. */
|
|
19
|
+
to: string;
|
|
20
|
+
label: string;
|
|
21
|
+
}
|
|
22
|
+
export interface RouteTabsProps {
|
|
23
|
+
tabs: RouteTab[];
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The tab whose `to` is the longest prefix of `pathname`, or null when the
|
|
28
|
+
* route belongs to none of them.
|
|
29
|
+
*/
|
|
30
|
+
export declare function activeTabPath(tabs: RouteTab[], pathname: string): string | null;
|
|
31
|
+
export declare function RouteTabs({ tabs, className }: RouteTabsProps): ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* One tab of a strip whose tabs are contributed rather than listed.
|
|
34
|
+
*
|
|
35
|
+
* `RouteTabs` above takes the whole set and is the right primitive whenever one
|
|
36
|
+
* component knows every tab. A **zone** strip (`<RouteTabsZone>`, feature 091
|
|
37
|
+
* P4d) never does: each tab arrives as a separate module's contribution, loaded
|
|
38
|
+
* behind its own dynamic import, so no component sees the set and the tab has
|
|
39
|
+
* to decide its own selected state.
|
|
40
|
+
*
|
|
41
|
+
* **What that costs, stated rather than discovered.** `activeTabPath` resolves
|
|
42
|
+
* a prefix collision by *longest wins*, which is why `/product-feeds` and
|
|
43
|
+
* `/product-feeds/templates` do not light up together. A contributed tab cannot
|
|
44
|
+
* do that — it has nothing to be longer *than* — so the rule here is the
|
|
45
|
+
* per-tab half alone: this route, or a route below it. Two contributed tabs
|
|
46
|
+
* whose paths are prefixes of one another would therefore both read as
|
|
47
|
+
* selected. Measured for the one strip that exists: `/orders/new` and
|
|
48
|
+
* `/orders/quick-order` are prefixes of neither, so the rendered result is
|
|
49
|
+
* identical to `RouteTabs`'. A strip whose contributors *do* nest is the case
|
|
50
|
+
* to bring back to this comment.
|
|
51
|
+
*/
|
|
52
|
+
export interface RouteTabLinkProps {
|
|
53
|
+
/** Absolute admin route this tab opens. */
|
|
54
|
+
to: string;
|
|
55
|
+
label: string;
|
|
56
|
+
}
|
|
57
|
+
export declare function RouteTabLink({ to, label }: RouteTabLinkProps): ReactNode;
|
|
58
|
+
//# sourceMappingURL=route-tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-tabs.d.ts","sourceRoot":"","sources":["../../src/ui/route-tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,QAAQ;IACvB,2CAA2C;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM/E;AAED,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,cAAc,GAAG,SAAS,CA2BxE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,iBAAiB;IAChC,2CAA2C;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,iBAAiB,GAAG,SAAS,CAexE"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { NavLink, useLocation } from 'react-router-dom';
|
|
3
|
+
import { cn } from '../lib/utils.js';
|
|
4
|
+
/**
|
|
5
|
+
* The tab whose `to` is the longest prefix of `pathname`, or null when the
|
|
6
|
+
* route belongs to none of them.
|
|
7
|
+
*/
|
|
8
|
+
export function activeTabPath(tabs, pathname) {
|
|
9
|
+
const matches = tabs.filter((tab) => pathname === tab.to || pathname.startsWith(`${tab.to}/`));
|
|
10
|
+
if (matches.length === 0)
|
|
11
|
+
return null;
|
|
12
|
+
return matches.reduce((best, tab) => (tab.to.length > best.to.length ? tab : best)).to;
|
|
13
|
+
}
|
|
14
|
+
export function RouteTabs({ tabs, className }) {
|
|
15
|
+
const { pathname } = useLocation();
|
|
16
|
+
const active = activeTabPath(tabs, pathname);
|
|
17
|
+
return (_jsx("div", { className: cn('b2b-tabs-scroll', className), children: _jsx("div", { className: "b2b-tabs", role: "tablist", children: tabs.map((tab) => {
|
|
18
|
+
const isActive = tab.to === active;
|
|
19
|
+
return (_jsx(NavLink, { to: tab.to, role: "tab", "aria-selected": isActive,
|
|
20
|
+
// `is-active` is the class the design system styles; NavLink's own
|
|
21
|
+
// `isActive` is deliberately ignored because its prefix matching
|
|
22
|
+
// is exactly what would light up two tabs at once.
|
|
23
|
+
className: cn('b2b-tab', isActive && 'is-active'), children: tab.label }, tab.to));
|
|
24
|
+
}) }) }));
|
|
25
|
+
}
|
|
26
|
+
export function RouteTabLink({ to, label }) {
|
|
27
|
+
const { pathname } = useLocation();
|
|
28
|
+
const isActive = pathname === to || pathname.startsWith(`${to}/`);
|
|
29
|
+
return (_jsx(NavLink, { to: to, role: "tab", "aria-selected": isActive,
|
|
30
|
+
// `is-active` is the class the design system styles; NavLink's own
|
|
31
|
+
// `isActive` is deliberately ignored, for `RouteTabs`' reason.
|
|
32
|
+
className: cn('b2b-tab', isActive && 'is-active'), children: label }));
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=route-tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-tabs.js","sourceRoot":"","sources":["../../src/ui/route-tabs.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AA6BrC;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,IAAgB,EAAE,QAAgB;IAC9D,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CACzB,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,KAAK,GAAG,CAAC,EAAE,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,EAAE,GAAG,CAAC,CAClE,CAAC;IACF,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACtC,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAA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AC;AACJ,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface SaveButtonGroupProps {
|
|
3
|
+
/** Primary action — persist and stay on the editor. */
|
|
4
|
+
onSave: () => void | Promise<void>;
|
|
5
|
+
/** Secondary action — persist and navigate back to the list view. */
|
|
6
|
+
onSaveAndExit: () => void | Promise<void>;
|
|
7
|
+
/** True while a save is in flight; disables both buttons and shows `savingLabel`. */
|
|
8
|
+
saving?: boolean;
|
|
9
|
+
/** Extra disable condition independent of `saving`. */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
saveLabel: string;
|
|
12
|
+
savingLabel: string;
|
|
13
|
+
saveAndExitLabel: string;
|
|
14
|
+
/** Button size; matches surrounding header buttons. Defaults to `default`. */
|
|
15
|
+
size?: 'default' | 'sm';
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Split "Save" button used across the Page Builder editors (CMS block /
|
|
20
|
+
* page / template, invoice template, …). The primary button saves and
|
|
21
|
+
* stays put; the attached chevron reveals a "Save and exit" item that
|
|
22
|
+
* saves and then routes back to the list. Dependency-free popover (mirrors
|
|
23
|
+
* the in-house Combobox pattern) so it composes anywhere the shadcn-style
|
|
24
|
+
* components do.
|
|
25
|
+
*/
|
|
26
|
+
export declare function SaveButtonGroup(props: SaveButtonGroupProps): ReactNode;
|
|
27
|
+
//# sourceMappingURL=save-button-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"save-button-group.d.ts","sourceRoot":"","sources":["../../src/ui/save-button-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAKpE,MAAM,WAAW,oBAAoB;IACnC,uDAAuD;IACvD,MAAM,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,qEAAqE;IACrE,aAAa,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,qFAAqF;IACrF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,SAAS,CAmEtE"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { ChevronDown } from 'lucide-react';
|
|
4
|
+
import { Button } from './button.js';
|
|
5
|
+
import { cn } from '../lib/utils.js';
|
|
6
|
+
/**
|
|
7
|
+
* Split "Save" button used across the Page Builder editors (CMS block /
|
|
8
|
+
* page / template, invoice template, …). The primary button saves and
|
|
9
|
+
* stays put; the attached chevron reveals a "Save and exit" item that
|
|
10
|
+
* saves and then routes back to the list. Dependency-free popover (mirrors
|
|
11
|
+
* the in-house Combobox pattern) so it composes anywhere the shadcn-style
|
|
12
|
+
* components do.
|
|
13
|
+
*/
|
|
14
|
+
export function SaveButtonGroup(props) {
|
|
15
|
+
const [open, setOpen] = useState(false);
|
|
16
|
+
const rootRef = useRef(null);
|
|
17
|
+
const busy = props.saving ?? false;
|
|
18
|
+
const disabled = props.disabled ?? false;
|
|
19
|
+
const size = props.size ?? 'default';
|
|
20
|
+
// Close the menu on outside click or Escape.
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (!open)
|
|
23
|
+
return undefined;
|
|
24
|
+
const onPointerDown = (e) => {
|
|
25
|
+
if (rootRef.current && !rootRef.current.contains(e.target))
|
|
26
|
+
setOpen(false);
|
|
27
|
+
};
|
|
28
|
+
const onKey = (e) => {
|
|
29
|
+
if (e.key === 'Escape')
|
|
30
|
+
setOpen(false);
|
|
31
|
+
};
|
|
32
|
+
document.addEventListener('mousedown', onPointerDown);
|
|
33
|
+
document.addEventListener('keydown', onKey);
|
|
34
|
+
return () => {
|
|
35
|
+
document.removeEventListener('mousedown', onPointerDown);
|
|
36
|
+
document.removeEventListener('keydown', onKey);
|
|
37
|
+
};
|
|
38
|
+
}, [open]);
|
|
39
|
+
return (_jsxs("div", { ref: rootRef, className: cn('relative inline-flex', props.className), children: [_jsx(Button, { type: "button", size: size, className: "rounded-r-none", onClick: () => void props.onSave(), disabled: busy || disabled, children: busy ? props.savingLabel : props.saveLabel }), _jsx(Button, { type: "button", size: size, "aria-label": props.saveAndExitLabel, "aria-haspopup": "menu", "aria-expanded": open, className: cn('rounded-l-none border-l border-primary-foreground/25 px-0', size === 'sm' ? 'w-8' : 'w-9'), onClick: () => setOpen((o) => !o), disabled: busy || disabled, children: _jsx(ChevronDown, { className: "h-4 w-4" }) }), open ? (_jsx("div", { role: "menu", className: "absolute right-0 top-full z-50 mt-1 min-w-[180px] overflow-hidden rounded-md border border-input bg-background p-1 text-sm shadow-md", children: _jsx("button", { type: "button", role: "menuitem", className: "flex w-full items-center rounded-sm px-2 py-1.5 text-left hover:bg-accent hover:text-accent-foreground", onClick: () => {
|
|
40
|
+
setOpen(false);
|
|
41
|
+
void props.onSaveAndExit();
|
|
42
|
+
}, children: props.saveAndExitLabel }) })) : null] }));
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=save-button-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"save-button-group.js","sourceRoot":"","sources":["../../src/ui/save-button-group.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,WAAW,E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AAI,IACJ,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A titled content block: a heading, an optional action beside it, and the
|
|
4
|
+
* caller's children. Mirrors the product-editor pattern where each tab panel is
|
|
5
|
+
* a set of plain sections within a single card body (no nested cards).
|
|
6
|
+
*
|
|
7
|
+
* **Published by feature 091, P8.** It sat under `orders`' admin directory and
|
|
8
|
+
* was rendered by `quote_requests`' RFQ detail as well as by three of `orders`'
|
|
9
|
+
* own tabs — fourteen lines of `<section>`, `cn` and an `<h2>`, with nothing of
|
|
10
|
+
* `orders` inside it. It is a layout primitive rather than a composite, so its
|
|
11
|
+
* home is `./ui` and not `./components`.
|
|
12
|
+
*/
|
|
13
|
+
export interface SectionProps {
|
|
14
|
+
title: ReactNode;
|
|
15
|
+
action?: ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare function Section(props: SectionProps): ReactNode;
|
|
20
|
+
//# sourceMappingURL=section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../../src/ui/section.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC;;;;;;;;;;GAUG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,SAAS,CAUtD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import {} from 'react';
|
|
3
|
+
import { cn } from '../lib/utils.js';
|
|
4
|
+
export function Section(props) {
|
|
5
|
+
return (_jsxs("section", { className: cn('space-y-3', props.className), children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("h2", { className: "text-sm font-semibold tracking-tight", children: props.title }), props.action ?? null] }), props.children] }));
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section.js","sourceRoot":"","sources":["../../src/ui/section.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAoBrC,MAAM,UAAU,OAAO,CAAC,KAAmB;IACzC,OAAO,CACL,mBAAS,SAAS,EAAE,EAAE,CAAC,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,aAClD,eAAK,SAAS,EAAC,yCAAyC,aACtD,aAAI,SAAS,EAAC,sCAAsC,YAAE,KAAK,CAAC,KAAK,GAAM,EACtE,KAAK,CAAC,MAAM,IAAI,IAAI,IACjB,EACL,KAAK,CAAC,QAAQ,IACP,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type SelectHTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Native `<select>` styled to match shadcn's input shape. We deliberately
|
|
4
|
+
* stay native here — the admin needs sturdy keyboard / accessibility
|
|
5
|
+
* defaults more than custom popover chrome, and most lists are short
|
|
6
|
+
* enums (status, kind, role). For richer pickers (combo / async-search),
|
|
7
|
+
* swap in a Radix Select wrapper later.
|
|
8
|
+
*/
|
|
9
|
+
export declare const Select: import("react").ForwardRefExoticComponent<SelectHTMLAttributes<HTMLSelectElement> & import("react").RefAttributes<HTMLSelectElement>>;
|
|
10
|
+
//# sourceMappingURL=select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/ui/select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAG9D;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,uIAiBlB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { cn } from '../lib/utils.js';
|
|
4
|
+
/**
|
|
5
|
+
* Native `<select>` styled to match shadcn's input shape. We deliberately
|
|
6
|
+
* stay native here — the admin needs sturdy keyboard / accessibility
|
|
7
|
+
* defaults more than custom popover chrome, and most lists are short
|
|
8
|
+
* enums (status, kind, role). For richer pickers (combo / async-search),
|
|
9
|
+
* swap in a Radix Select wrapper later.
|
|
10
|
+
*/
|
|
11
|
+
export const Select = forwardRef(({ className, children, ...props }, ref) => {
|
|
12
|
+
return (_jsx("select", { ref: ref, className: cn('flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:cursor-not-allowed disabled:opacity-50', className), ...props, children: children }));
|
|
13
|
+
});
|
|
14
|
+
Select.displayName = 'Select';
|
|
15
|
+
//# sourceMappingURL=select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/ui/select.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA6B,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAC9B,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACzC,OAAO,CACL,iBACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,2FAA2F,EAC3F,yEAAyE,EACzE,iDAAiD,EACjD,SAAS,CACV,KACG,KAAK,YAER,QAAQ,GACF,CACV,CAAC;AACJ,CAAC,CACF,CAAC;AACF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
2
|
+
export declare const Separator: import("react").ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
//# sourceMappingURL=separator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../src/ui/separator.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAGhE,eAAO,MAAM,SAAS,2LAepB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
4
|
+
import { cn } from '../lib/utils.js';
|
|
5
|
+
export const Separator = forwardRef(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (_jsx(SeparatorPrimitive.Root, { ref: ref, decorative: decorative, orientation: orientation, className: cn('shrink-0 bg-border', orientation === 'horizontal' ? 'h-px w-full' : 'h-full w-px', className), ...props })));
|
|
6
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
7
|
+
//# sourceMappingURL=separator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.js","sourceRoot":"","sources":["../../src/ui/separator.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAkD,MAAM,OAAO,CAAC;AACnF,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAGjC,CAAC,EAAE,SAAS,EAAE,WAAW,GAAG,YAAY,EAAE,UAAU,GAAG,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACjF,KAAC,kBAAkB,CAAC,IAAI,IACtB,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,EAAE,CACX,oBAAoB,EACpB,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,EAC5D,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC,CAAC;AACH,SAAS,CAAC,WAAW,GAAG,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type HTMLAttributes, type TdHTMLAttributes, type ThHTMLAttributes } from 'react';
|
|
2
|
+
export declare const Table: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableElement> & import("react").RefAttributes<HTMLTableElement>>;
|
|
3
|
+
export declare const TableHeader: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
4
|
+
export declare const TableBody: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
5
|
+
export declare const TableFooter: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
6
|
+
export declare const TableRow: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableRowElement> & import("react").RefAttributes<HTMLTableRowElement>>;
|
|
7
|
+
export declare const TableHead: import("react").ForwardRefExoticComponent<ThHTMLAttributes<HTMLTableCellElement> & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
8
|
+
export declare const TableCell: import("react").ForwardRefExoticComponent<TdHTMLAttributes<HTMLTableCellElement> & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
9
|
+
export declare const TableCaption: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableCaptionElement> & import("react").RefAttributes<HTMLTableCaptionElement>>;
|
|
10
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/ui/table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,OAAO,CAAC;AAGf,eAAO,MAAM,KAAK,+HAMjB,CAAC;AAGF,eAAO,MAAM,WAAW,6IAIvB,CAAC;AAGF,eAAO,MAAM,SAAS,6IAIrB,CAAC;AAGF,eAAO,MAAM,WAAW,6IAWvB,CAAC;AAGF,eAAO,MAAM,QAAQ,qIAQpB,CAAC;AAGF,eAAO,MAAM,SAAS,yIAWrB,CAAC;AAGF,eAAO,MAAM,SAAS,yIAQrB,CAAC;AAGF,eAAO,MAAM,YAAY,6IAIxB,CAAC"}
|
package/dist/ui/table.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, } from 'react';
|
|
3
|
+
import { cn } from '../lib/utils.js';
|
|
4
|
+
export const Table = forwardRef(({ className, ...props }, ref) => (_jsx("div", { className: "relative w-full overflow-auto b2b-table-scroll", children: _jsx("table", { ref: ref, className: cn('w-full caption-bottom text-sm', className), ...props }) })));
|
|
5
|
+
Table.displayName = 'Table';
|
|
6
|
+
export const TableHeader = forwardRef(({ className, ...props }, ref) => (_jsx("thead", { ref: ref, className: cn('[&_tr]:border-b', className), ...props })));
|
|
7
|
+
TableHeader.displayName = 'TableHeader';
|
|
8
|
+
export const TableBody = forwardRef(({ className, ...props }, ref) => (_jsx("tbody", { ref: ref, className: cn('[&_tr:last-child]:border-0', className), ...props })));
|
|
9
|
+
TableBody.displayName = 'TableBody';
|
|
10
|
+
export const TableFooter = forwardRef(({ className, ...props }, ref) => (_jsx("tfoot", { ref: ref, className: cn('border-t bg-muted/50 font-medium [&>tr]:last:border-b-0', className), ...props })));
|
|
11
|
+
TableFooter.displayName = 'TableFooter';
|
|
12
|
+
export const TableRow = forwardRef(({ className, ...props }, ref) => (_jsx("tr", { ref: ref, className: cn('border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted', className), ...props })));
|
|
13
|
+
TableRow.displayName = 'TableRow';
|
|
14
|
+
export const TableHead = forwardRef(({ className, ...props }, ref) => (_jsx("th", { ref: ref, className: cn('h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0', className), ...props })));
|
|
15
|
+
TableHead.displayName = 'TableHead';
|
|
16
|
+
export const TableCell = forwardRef(({ className, ...props }, ref) => (_jsx("td", { ref: ref, className: cn('p-2 align-middle [&:has([role=checkbox])]:pr-0', className), ...props })));
|
|
17
|
+
TableCell.displayName = 'TableCell';
|
|
18
|
+
export const TableCaption = forwardRef(({ className, ...props }, ref) => (_jsx("caption", { ref: ref, className: cn('mt-4 text-sm text-muted-foreground', className), ...props })));
|
|
19
|
+
TableCaption.displayName = 'TableCaption';
|
|
20
|
+
//# sourceMappingURL=table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../src/ui/table.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,GAIX,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAC7B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cAAK,SAAS,EAAC,gDAAgD,YAC7D,gBAAO,GAAG,EAAE,GAAG,EAAE,SAA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AAW,GAAG,UAAU,CAAC;AAElC,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CACjC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,aACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,kGAAkG,EAClG,SAAS,CACV,KACG,KAAK,GACT,CACH,CACF,CAAC;AACF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CACjC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,aACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,gDAAgD,EAAE,SAAS,CAAC,KACtE,KAAK,GACT,CACH,CACF,CAAC;AACF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CACpC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,kBAAS,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,oCAAoC,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CACjG,CACF,CAAC;AACF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../src/ui/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAGhE,eAAO,MAAM,QAAQ,6IAgBpB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { cn } from '../lib/utils.js';
|
|
4
|
+
export const Textarea = forwardRef(({ className, ...props }, ref) => {
|
|
5
|
+
return (_jsx("textarea", { ref: ref, className: cn('flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm', 'placeholder:text-muted-foreground', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:cursor-not-allowed disabled:opacity-50', className), ...props }));
|
|
6
|
+
});
|
|
7
|
+
Textarea.displayName = 'Textarea';
|
|
8
|
+
//# sourceMappingURL=textarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../src/ui/textarea.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA+B,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAChC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC/B,OAAO,CACL,mBACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,oGAAoG,EACpG,mCAAmC,EACnC,yEAAyE,EACzE,iDAAiD,EACjD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AACF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The seam that carries the admin's module registry into the kit (feature 091,
|
|
3
|
+
* P4a; Z6).
|
|
4
|
+
*
|
|
5
|
+
* The renderer is the kit's and not the admin application's, because a **host**
|
|
6
|
+
* screen becomes a package: `catalog` hosts three zones and moves into
|
|
7
|
+
* `packages/modules/catalog`, at which point `admin/src/lib/module-registry` is
|
|
8
|
+
* unreachable to it. Routes and nav have no such problem — their one consumer
|
|
9
|
+
* each is the application itself, for ever — which is why `registryRoutes()`
|
|
10
|
+
* and `registryNavFor()` stay where they are and there is no
|
|
11
|
+
* `registryZonesFor()` beside them.
|
|
12
|
+
*
|
|
13
|
+
* The registry itself stays the application's: it *is* module knowledge, and
|
|
14
|
+
* `admin-kit-surface.md` R6 refuses module knowledge in the kit. So the kit
|
|
15
|
+
* publishes a provider and holds no list — the entries arrive as a prop, from
|
|
16
|
+
* the one place that has them.
|
|
17
|
+
*
|
|
18
|
+
* **Nothing here filters.** An operator's activation flip must take effect
|
|
19
|
+
* without a rebuild (Principle XVII item 5, D-67/D-68 pointed at the frontend),
|
|
20
|
+
* so presence is decided at enumeration in {@link useAdminZone} and never in
|
|
21
|
+
* the registry or in this provider. The provider answers *"what could be
|
|
22
|
+
* here"*.
|
|
23
|
+
*/
|
|
24
|
+
import { type ReactNode } from 'react';
|
|
25
|
+
import type { AdminZoneContribution } from '@endora-commerce/contracts';
|
|
26
|
+
/**
|
|
27
|
+
* One module's zone contributions, keyed by the module that shipped them.
|
|
28
|
+
*
|
|
29
|
+
* The module id is the **entry's key** and never a field of a contribution
|
|
30
|
+
* (D-142): an attribution a module can write is an attribution a module can get
|
|
31
|
+
* wrong, and here getting it wrong would mean contributing under another
|
|
32
|
+
* module's presence.
|
|
33
|
+
*/
|
|
34
|
+
export interface AdminZoneRegistryEntry {
|
|
35
|
+
readonly moduleId: string;
|
|
36
|
+
readonly zones: readonly AdminZoneContribution[];
|
|
37
|
+
}
|
|
38
|
+
/** A contribution with the module that shipped it. */
|
|
39
|
+
export interface OwnedZoneContribution extends AdminZoneContribution {
|
|
40
|
+
readonly module: string;
|
|
41
|
+
}
|
|
42
|
+
/** Raised when a zone is rendered outside {@link AdminContributionsProvider}. */
|
|
43
|
+
export declare class AdminContributionsUnavailableError extends Error {
|
|
44
|
+
readonly name = "AdminContributionsUnavailableError";
|
|
45
|
+
}
|
|
46
|
+
export interface AdminContributionsProviderProps {
|
|
47
|
+
/**
|
|
48
|
+
* The generated registry — `MODULE_ADMIN_CONTRIBUTIONS`, whose entries carry
|
|
49
|
+
* a whole `AdminContributions` each.
|
|
50
|
+
*
|
|
51
|
+
* Typed structurally over the one field this provider reads, so the admin can
|
|
52
|
+
* hand its registry straight in and a test can hand in two lines.
|
|
53
|
+
*/
|
|
54
|
+
readonly entries: readonly {
|
|
55
|
+
readonly moduleId: string;
|
|
56
|
+
readonly contributions: {
|
|
57
|
+
readonly zones?: readonly AdminZoneContribution[];
|
|
58
|
+
};
|
|
59
|
+
}[];
|
|
60
|
+
readonly children: ReactNode;
|
|
61
|
+
}
|
|
62
|
+
/** Mounted once by the admin application, with its generated registry. */
|
|
63
|
+
export declare function AdminContributionsProvider({ entries, children, }: AdminContributionsProviderProps): ReactNode;
|
|
64
|
+
/**
|
|
65
|
+
* Every contribution the provider carries, unfiltered and unordered.
|
|
66
|
+
*
|
|
67
|
+
* Internal to the `./zones` subpath: the filtering and the ordering are
|
|
68
|
+
* {@link useAdminZone}'s, and a second consumer of the raw list is a second
|
|
69
|
+
* place the presence rule could be forgotten.
|
|
70
|
+
*/
|
|
71
|
+
export declare function useAdminContributions(): readonly OwnedZoneContribution[];
|
|
72
|
+
//# sourceMappingURL=AdminContributionsProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdminContributionsProvider.d.ts","sourceRoot":"","sources":["../../src/zones/AdminContributionsProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAExE;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,qBAAqB,EAAE,CAAC;CAClD;AAED,sDAAsD;AACtD,MAAM,WAAW,qBAAsB,SAAQ,qBAAqB;IAClE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAcD,iFAAiF;AACjF,qBAAa,kCAAmC,SAAQ,KAAK;IAC3D,SAAkB,IAAI,wCAAwC;CAC/D;AAED,MAAM,WAAW,+BAA+B;IAC9C;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS;QACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,aAAa,EAAE;YAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,qBAAqB,EAAE,CAAA;SAAE,CAAC;KAC/E,EAAE,CAAC;IACJ,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B;AAED,0EAA0E;AAC1E,wBAAgB,0BAA0B,CAAC,EACzC,OAAO,EACP,QAAQ,GACT,EAAE,+BAA+B,GAAG,SAAS,CAe7C;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,IAAI,SAAS,qBAAqB,EAAE,CAWxE"}
|