@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,59 @@
|
|
|
1
|
+
import { foldDiacritics } from '@endora-commerce/contracts';
|
|
2
|
+
/**
|
|
3
|
+
* Fold a string so two spellings of the same word compare equal.
|
|
4
|
+
*
|
|
5
|
+
* **This is a general text utility, not palette machinery.** It lived under
|
|
6
|
+
* `lib/admin-actions/` until issue #236, which under-sold it as one consumer's
|
|
7
|
+
* private helper and invited the next author to write their own: by then the
|
|
8
|
+
* page-builder drawer, the combobox and the multi-select had each grown a copy
|
|
9
|
+
* that looked right and was not. The admin has two kinds of caller, and both
|
|
10
|
+
* need the same fold:
|
|
11
|
+
*
|
|
12
|
+
* - **search predicates** — the ⌘K palette, the page-builder drawer, the
|
|
13
|
+
* combobox / multi-select pickers, the category tree filter. Fold both the
|
|
14
|
+
* query and the haystack, then `includes`.
|
|
15
|
+
* - **slug and code generators** — `PageEditor`, `BlockEditor`,
|
|
16
|
+
* `BlogPostEditor`. Fold first, then collapse whatever is left to `-` / `_`.
|
|
17
|
+
*
|
|
18
|
+
* **The fold itself is not written here.** Since issue #240 it is
|
|
19
|
+
* `foldDiacritics` from `@endora-commerce/contracts` — the same implementation the backend
|
|
20
|
+
* writes `organizations.name_search` with. This file had grown its own copy of
|
|
21
|
+
* the map for the same reason the four private copies grew: the shared one was
|
|
22
|
+
* correct but named after a single caller (`normalizeOrganizationName`), so
|
|
23
|
+
* nobody looking for a diacritic fold found it. What is left here is the one
|
|
24
|
+
* thing that is genuinely the admin's policy: the trim.
|
|
25
|
+
*
|
|
26
|
+
* What `foldDiacritics` does, in order: decompose (NFD), strip the combining
|
|
27
|
+
* marks, map the letters NFD leaves standing (`Ł ł Ø ø Đ đ Ð ð Þ þ ß Æ æ Œ œ`),
|
|
28
|
+
* lowercase. Step three is the one the obvious
|
|
29
|
+
* `normalize('NFD').replace(/\p{Diacritic}/gu, '')` one-liner is missing, and
|
|
30
|
+
* without it the fold silently does nothing to every Polish word carrying an
|
|
31
|
+
* `ł` (`płatności`, `Nagłówek`).
|
|
32
|
+
*
|
|
33
|
+
* Then, here: **trim.** Surrounding whitespace is noise in every caller — a
|
|
34
|
+
* search query with a leading space matched nothing at all before this step
|
|
35
|
+
* existed (Postel's Law — accept what was typed), and a slug generator strips
|
|
36
|
+
* its own edge separators anyway. Trimming here means no caller has to
|
|
37
|
+
* remember; four of the six had not. The shared fold deliberately leaves
|
|
38
|
+
* whitespace alone, because what counts as one space differs by caller:
|
|
39
|
+
* `normalizeOrganizationName` also collapses internal runs, since it writes a
|
|
40
|
+
* column a `$like` reads.
|
|
41
|
+
*
|
|
42
|
+
* Edge cases worth knowing:
|
|
43
|
+
* - `ß` folds to `ss` and `æ`/`œ` to `ae`/`oe`. The private copy this file
|
|
44
|
+
* carried until issue #240 left all three standing; adopting the shared map
|
|
45
|
+
* changed 19 code points in total, 15 of them this way. The other four are
|
|
46
|
+
* `Ħ ħ Ŧ ŧ` (Maltese, Northern Sami), which the private map folded to `h`/`t`
|
|
47
|
+
* and the shared one leaves alone. They are **not** silently re-added here:
|
|
48
|
+
* the shared map is the one the backend writes a persisted search column
|
|
49
|
+
* with, so growing it re-folds new rows differently from old ones — a data
|
|
50
|
+
* migration (issue #240's report names it), not a line in this file.
|
|
51
|
+
* - Matching behaves like a case-insensitive substring test, not full Unicode
|
|
52
|
+
* case folding.
|
|
53
|
+
* - A whitespace-only string folds to the empty string, so callers that treat
|
|
54
|
+
* an empty query as "match everything" get that for free.
|
|
55
|
+
*/
|
|
56
|
+
export function normalize(input) {
|
|
57
|
+
return foldDiacritics(input).trim();
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=text-normalization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-normalization.js","sourceRoot":"","sources":["../../src/lib/text-normalization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,MAAM,UAAU,SAAS,CAAC,KAAa;IACrC,OAAO,cAAc,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { PAGE_SIZE_OPTIONS, type PageSizeOption } from './page-size-options.js';
|
|
2
|
+
/**
|
|
3
|
+
* Supported page-size options across paginated admin lists. Kept as a shared
|
|
4
|
+
* constant so the dropdown and the validation match exactly. Phase 1b split the
|
|
5
|
+
* constant out of this module and left the hook behind, *"not published, because
|
|
6
|
+
* it reads the signed-in admin's id"* — which P3 corrects: the id comes from
|
|
7
|
+
* `useAuth`, which is now the kit's too, so the split has nothing left to
|
|
8
|
+
* separate and both halves are one package's. Re-exported here because every
|
|
9
|
+
* existing caller names it at this path.
|
|
10
|
+
*/
|
|
11
|
+
export { PAGE_SIZE_OPTIONS, type PageSizeOption };
|
|
12
|
+
/**
|
|
13
|
+
* Per-user, per-scope page-size preference, persisted in localStorage so
|
|
14
|
+
* each admin's choice survives across reloads in the same browser. The
|
|
15
|
+
* key incorporates the admin user id so two operators sharing a browser
|
|
16
|
+
* profile don't overwrite each other's preference.
|
|
17
|
+
*
|
|
18
|
+
* `scope` identifies the list (e.g. 'catalog-products', 'inventory-levels')
|
|
19
|
+
* so different lists can have different preferences.
|
|
20
|
+
*
|
|
21
|
+
* The hook validates the persisted value against `PAGE_SIZE_OPTIONS` so
|
|
22
|
+
* stale or hand-edited values fall back to the default rather than
|
|
23
|
+
* yielding an option that's not in the dropdown.
|
|
24
|
+
*/
|
|
25
|
+
export declare function usePageSizePreference(scope: string): {
|
|
26
|
+
pageSize: PageSizeOption;
|
|
27
|
+
setPageSize: (next: PageSizeOption) => void;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=use-page-size-preference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-page-size-preference.d.ts","sourceRoot":"","sources":["../../src/lib/use-page-size-preference.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGhF;;;;;;;;GAQG;AACH,OAAO,EAAE,iBAAiB,EAAE,KAAK,cAAc,EAAE,CAAC;AAIlD;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG;IACpD,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;CAC7C,CAiCA"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { useCallback, useState } from 'react';
|
|
2
|
+
import { PAGE_SIZE_OPTIONS } from './page-size-options.js';
|
|
3
|
+
import { useAuth } from './auth.js';
|
|
4
|
+
/**
|
|
5
|
+
* Supported page-size options across paginated admin lists. Kept as a shared
|
|
6
|
+
* constant so the dropdown and the validation match exactly. Phase 1b split the
|
|
7
|
+
* constant out of this module and left the hook behind, *"not published, because
|
|
8
|
+
* it reads the signed-in admin's id"* — which P3 corrects: the id comes from
|
|
9
|
+
* `useAuth`, which is now the kit's too, so the split has nothing left to
|
|
10
|
+
* separate and both halves are one package's. Re-exported here because every
|
|
11
|
+
* existing caller names it at this path.
|
|
12
|
+
*/
|
|
13
|
+
export { PAGE_SIZE_OPTIONS };
|
|
14
|
+
const DEFAULT_PAGE_SIZE = 20;
|
|
15
|
+
/**
|
|
16
|
+
* Per-user, per-scope page-size preference, persisted in localStorage so
|
|
17
|
+
* each admin's choice survives across reloads in the same browser. The
|
|
18
|
+
* key incorporates the admin user id so two operators sharing a browser
|
|
19
|
+
* profile don't overwrite each other's preference.
|
|
20
|
+
*
|
|
21
|
+
* `scope` identifies the list (e.g. 'catalog-products', 'inventory-levels')
|
|
22
|
+
* so different lists can have different preferences.
|
|
23
|
+
*
|
|
24
|
+
* The hook validates the persisted value against `PAGE_SIZE_OPTIONS` so
|
|
25
|
+
* stale or hand-edited values fall back to the default rather than
|
|
26
|
+
* yielding an option that's not in the dropdown.
|
|
27
|
+
*/
|
|
28
|
+
export function usePageSizePreference(scope) {
|
|
29
|
+
const { me } = useAuth();
|
|
30
|
+
const userId = me?.adminUser.id ?? 'anon';
|
|
31
|
+
const storageKey = `b2b-admin.page-size.${scope}.${userId}`;
|
|
32
|
+
const [pageSize, setPageSizeState] = useState(() => {
|
|
33
|
+
if (typeof window === 'undefined')
|
|
34
|
+
return DEFAULT_PAGE_SIZE;
|
|
35
|
+
try {
|
|
36
|
+
const raw = window.localStorage.getItem(storageKey);
|
|
37
|
+
if (!raw)
|
|
38
|
+
return DEFAULT_PAGE_SIZE;
|
|
39
|
+
const parsed = Number.parseInt(raw, 10);
|
|
40
|
+
return PAGE_SIZE_OPTIONS.includes(parsed)
|
|
41
|
+
? parsed
|
|
42
|
+
: DEFAULT_PAGE_SIZE;
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return DEFAULT_PAGE_SIZE;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const setPageSize = useCallback((next) => {
|
|
49
|
+
setPageSizeState(next);
|
|
50
|
+
if (typeof window === 'undefined')
|
|
51
|
+
return;
|
|
52
|
+
try {
|
|
53
|
+
window.localStorage.setItem(storageKey, String(next));
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
/* storage full / disabled — keep the in-memory value */
|
|
57
|
+
}
|
|
58
|
+
}, [storageKey]);
|
|
59
|
+
return { pageSize, setPageSize };
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=use-page-size-preference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-page-size-preference.js","sourceRoot":"","sources":["../../src/lib/use-page-size-preference.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAuB,MAAM,w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I,CAAC,CAAC,CAAC;QACxD,CAAC;QAAC,MAAM,CAAC;YACP,wDAAwD;QAC1D,CAAC;IACH,CAAC,EACD,CAAC,UAAU,CAAC,CACb,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Warn the user before they navigate away from a form that has unsaved edits.
|
|
3
|
+
*
|
|
4
|
+
* The admin mounts a component `<BrowserRouter>` (not a data router), so React
|
|
5
|
+
* Router v7's `useBlocker` is unavailable here. This hook covers the two real
|
|
6
|
+
* "lose my changes" vectors instead:
|
|
7
|
+
*
|
|
8
|
+
* 1. Browser-level unload (reload, tab close, typing a new URL, clicking an
|
|
9
|
+
* external link) via the native `beforeunload` confirmation dialog.
|
|
10
|
+
* 2. In-app SPA navigation via clicks on same-origin `<a>` / `<Link>`
|
|
11
|
+
* elements (e.g. the left nav) — intercepted in the capture phase and
|
|
12
|
+
* confirmed with the user *before* React Router handles the click.
|
|
13
|
+
*
|
|
14
|
+
* Programmatic `navigate()` calls (e.g. right after an explicit Save) are not
|
|
15
|
+
* intercepted; callers should make sure `when` is false by the time they
|
|
16
|
+
* navigate themselves (typically by reloading/snapshotting after a save).
|
|
17
|
+
*
|
|
18
|
+
* @param when Whether the form currently has unsaved changes.
|
|
19
|
+
* @param message Optional override for the confirmation text. Defaults to the
|
|
20
|
+
* shared `core` namespace string.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useUnsavedChangesPrompt(when: boolean, message?: string): void;
|
|
23
|
+
//# sourceMappingURL=use-unsaved-changes-prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-unsaved-changes-prompt.d.ts","sourceRoot":"","sources":["../../src/lib/use-unsaved-changes-prompt.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAgD7E"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import { useTranslation } from '../i18n/useTranslation.js';
|
|
3
|
+
/**
|
|
4
|
+
* Warn the user before they navigate away from a form that has unsaved edits.
|
|
5
|
+
*
|
|
6
|
+
* The admin mounts a component `<BrowserRouter>` (not a data router), so React
|
|
7
|
+
* Router v7's `useBlocker` is unavailable here. This hook covers the two real
|
|
8
|
+
* "lose my changes" vectors instead:
|
|
9
|
+
*
|
|
10
|
+
* 1. Browser-level unload (reload, tab close, typing a new URL, clicking an
|
|
11
|
+
* external link) via the native `beforeunload` confirmation dialog.
|
|
12
|
+
* 2. In-app SPA navigation via clicks on same-origin `<a>` / `<Link>`
|
|
13
|
+
* elements (e.g. the left nav) — intercepted in the capture phase and
|
|
14
|
+
* confirmed with the user *before* React Router handles the click.
|
|
15
|
+
*
|
|
16
|
+
* Programmatic `navigate()` calls (e.g. right after an explicit Save) are not
|
|
17
|
+
* intercepted; callers should make sure `when` is false by the time they
|
|
18
|
+
* navigate themselves (typically by reloading/snapshotting after a save).
|
|
19
|
+
*
|
|
20
|
+
* @param when Whether the form currently has unsaved changes.
|
|
21
|
+
* @param message Optional override for the confirmation text. Defaults to the
|
|
22
|
+
* shared `core` namespace string.
|
|
23
|
+
*/
|
|
24
|
+
export function useUnsavedChangesPrompt(when, message) {
|
|
25
|
+
const t = useTranslation('core');
|
|
26
|
+
const confirmMessage = message ?? t('form.unsavedChanges.confirm');
|
|
27
|
+
// 1. Browser-level unload.
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
if (!when)
|
|
30
|
+
return undefined;
|
|
31
|
+
const onBeforeUnload = (e) => {
|
|
32
|
+
e.preventDefault();
|
|
33
|
+
// Legacy browsers require returnValue to be set to trigger the prompt.
|
|
34
|
+
e.returnValue = '';
|
|
35
|
+
};
|
|
36
|
+
window.addEventListener('beforeunload', onBeforeUnload);
|
|
37
|
+
return () => window.removeEventListener('beforeunload', onBeforeUnload);
|
|
38
|
+
}, [when]);
|
|
39
|
+
// 2. In-app link clicks (capture phase, before React Router).
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
if (!when)
|
|
42
|
+
return undefined;
|
|
43
|
+
const onClickCapture = (e) => {
|
|
44
|
+
// Respect anything already handled, non-primary clicks, and
|
|
45
|
+
// new-tab / modified clicks (those don't discard the current view).
|
|
46
|
+
if (e.defaultPrevented)
|
|
47
|
+
return;
|
|
48
|
+
if (e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey)
|
|
49
|
+
return;
|
|
50
|
+
const anchor = e.target?.closest('a');
|
|
51
|
+
if (!anchor)
|
|
52
|
+
return;
|
|
53
|
+
if (anchor.target === '_blank' || anchor.hasAttribute('download'))
|
|
54
|
+
return;
|
|
55
|
+
const href = anchor.getAttribute('href');
|
|
56
|
+
if (!href)
|
|
57
|
+
return;
|
|
58
|
+
// Absolute / external URLs (scheme: or //) navigate the browser away,
|
|
59
|
+
// which already triggers `beforeunload` — skip to avoid a double prompt.
|
|
60
|
+
if (/^[a-z]+:/i.test(href) || href.startsWith('//'))
|
|
61
|
+
return;
|
|
62
|
+
const url = new URL(href, window.location.origin);
|
|
63
|
+
const current = window.location.pathname + window.location.search;
|
|
64
|
+
if (url.pathname + url.search === current)
|
|
65
|
+
return; // same route / in-page anchor
|
|
66
|
+
if (!window.confirm(confirmMessage)) {
|
|
67
|
+
e.preventDefault();
|
|
68
|
+
e.stopPropagation();
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
document.addEventListener('click', onClickCapture, true);
|
|
72
|
+
return () => document.removeEventListener('click', onClickCapture, true);
|
|
73
|
+
}, [when, confirmMessage]);
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=use-unsaved-changes-prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-unsaved-changes-prompt.js","sourceRoot":"","sources":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|
4
|
+
* developer-friendly `clsx` API (objects, falsy guards, arrays) with
|
|
5
|
+
* `tailwind-merge`'s deduplication so `cn('p-2', 'p-4')` resolves to
|
|
6
|
+
* the later utility instead of stacking both.
|
|
7
|
+
*/
|
|
8
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
9
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C;;;;;GAKG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAElD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
|
+
import { twMerge } from 'tailwind-merge';
|
|
3
|
+
/**
|
|
4
|
+
* Class-name merger used by every shadcn component. Combines the
|
|
5
|
+
* developer-friendly `clsx` API (objects, falsy guards, arrays) with
|
|
6
|
+
* `tailwind-merge`'s deduplication so `cn('p-2', 'p-4')` resolves to
|
|
7
|
+
* the later utility instead of stacking both.
|
|
8
|
+
*/
|
|
9
|
+
export function cn(...inputs) {
|
|
10
|
+
return twMerge(clsx(inputs));
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACxC,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-friendly UUID v4 generator. Uses `crypto.randomUUID` when
|
|
3
|
+
* available (every modern browser + every Node ≥ 19); falls back to a
|
|
4
|
+
* RFC-4122-compliant Math.random implementation otherwise so the admin
|
|
5
|
+
* bundle never depends on the Node `crypto` module.
|
|
6
|
+
*/
|
|
7
|
+
export declare function randomUUID(): string;
|
|
8
|
+
//# sourceMappingURL=uuid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../src/lib/uuid.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,UAAU,IAAI,MAAM,CASnC"}
|
package/dist/lib/uuid.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-friendly UUID v4 generator. Uses `crypto.randomUUID` when
|
|
3
|
+
* available (every modern browser + every Node ≥ 19); falls back to a
|
|
4
|
+
* RFC-4122-compliant Math.random implementation otherwise so the admin
|
|
5
|
+
* bundle never depends on the Node `crypto` module.
|
|
6
|
+
*/
|
|
7
|
+
export function randomUUID() {
|
|
8
|
+
const cryptoApi = globalThis.crypto;
|
|
9
|
+
if (cryptoApi?.randomUUID)
|
|
10
|
+
return cryptoApi.randomUUID();
|
|
11
|
+
// Fallback — RFC 4122 v4 via Math.random.
|
|
12
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (char) => {
|
|
13
|
+
const r = (Math.random() * 16) | 0;
|
|
14
|
+
const v = char === 'x' ? r : (r & 0x3) | 0x8;
|
|
15
|
+
return v.toString(16);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=uuid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../src/lib/uuid.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,UAAU;IACxB,MAAM,SAAS,GAAI,UAAyD,CAAC,MAAM,CAAC;IACpF,IAAI,SAAS,EAAE,UAAU;QAAE,OAAO,SAAS,CAAC,UAAU,EAAE,CAAC;IACzD,0CAA0C;IAC1C,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QACtE,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;QACnC,MAAM,CAAC,GAAG,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;QAC7C,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const alertVariants: (props?: ({
|
|
4
|
+
variant?: "success" | "default" | "destructive" | "warning" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface AlertProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
|
|
7
|
+
}
|
|
8
|
+
export declare const Alert: import("react").ForwardRefExoticComponent<AlertProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export declare const AlertTitle: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
10
|
+
export declare const AlertDescription: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/ui/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,aAAa;;8EAgBlB,CAAC;AAEF,MAAM,WAAW,UACf,SAAQ,cAAc,CAAC,cAAc,CAAC,EACpC,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG;AAEzC,eAAO,MAAM,KAAK,uGAIjB,CAAC;AAGF,eAAO,MAAM,UAAU,mIAItB,CAAC;AAGF,eAAO,MAAM,gBAAgB,uIAI5B,CAAC"}
|
package/dist/ui/alert.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { cn } from '../lib/utils.js';
|
|
5
|
+
const alertVariants = cva('relative w-full rounded-lg border p-4 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7', {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: 'bg-background text-foreground',
|
|
9
|
+
destructive: 'border-destructive/50 bg-destructive/10 text-destructive [&>svg]:text-destructive',
|
|
10
|
+
success: 'border-emerald-500/40 bg-emerald-50 text-emerald-900 [&>svg]:text-emerald-700 dark:bg-emerald-950 dark:text-emerald-100',
|
|
11
|
+
warning: 'border-amber-500/40 bg-amber-50 text-amber-900 [&>svg]:text-amber-700 dark:bg-amber-950 dark:text-amber-100',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: { variant: 'default' },
|
|
15
|
+
});
|
|
16
|
+
export const Alert = forwardRef(({ className, variant, ...props }, ref) => (_jsx("div", { ref: ref, role: "alert", className: cn(alertVariants({ variant }), className), ...props })));
|
|
17
|
+
Alert.displayName = 'Alert';
|
|
18
|
+
export const AlertTitle = forwardRef(({ className, ...props }, ref) => (_jsx("h5", { ref: ref, className: cn('mb-1 font-medium leading-none tracking-tight', className), ...props })));
|
|
19
|
+
AlertTitle.displayName = 'AlertTitle';
|
|
20
|
+
export const AlertDescription = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('text-sm [&_p]:leading-relaxed', className), ...props })));
|
|
21
|
+
AlertDescription.displayName = 'AlertDescription';
|
|
22
|
+
//# sourceMappingURL=alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../src/ui/alert.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAuB,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,aAAa,GAAG,GAAG,CACvB,2JAA2J,EAC3J;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,+BAA+B;YACxC,WAAW,EACT,mFAAmF;YACrF,OAAO,EACL,yHAAyH;YAC3H,OAAO,EACL,6GAA6G;SAChH;KACF;IACD,eAAe,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;CACxC,CACF,CAAC;AAMF,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAC7B,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACzC,cAAK,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,OAAO,EAAC,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAChG,CACF,CAAC;AACF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAE5B,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAClC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,aAAI,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,8CAA8C,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CACtG,CACF,CAAC;AACF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAEtC,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CACxC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CACxF,CACF,CAAC;AACF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "success" | "default" | "destructive" | "outline" | "secondary" | "warning" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
7
|
+
}
|
|
8
|
+
export declare function Badge({ className, variant, ...props }: BadgeProps): React.ReactElement;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,aAAa;;8EAelB,CAAC;AAEF,MAAM,WAAW,UACf,SAAQ,cAAc,CAAC,eAAe,CAAC,EACrC,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG;AAEzC,wBAAgB,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,GAAG,KAAK,CAAC,YAAY,CAEtF"}
|
package/dist/ui/badge.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import {} from 'react';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { cn } from '../lib/utils.js';
|
|
5
|
+
const badgeVariants = cva('inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2', {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: 'border-transparent bg-primary text-primary-foreground',
|
|
9
|
+
secondary: 'border-transparent bg-secondary text-secondary-foreground',
|
|
10
|
+
destructive: 'border-transparent bg-destructive text-destructive-foreground',
|
|
11
|
+
outline: 'text-foreground',
|
|
12
|
+
success: 'border-transparent bg-emerald-100 text-emerald-800 dark:bg-emerald-900 dark:text-emerald-100',
|
|
13
|
+
warning: 'border-transparent bg-amber-100 text-amber-800 dark:bg-amber-900 dark:text-amber-100',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
defaultVariants: { variant: 'default' },
|
|
17
|
+
});
|
|
18
|
+
export function Badge({ className, variant, ...props }) {
|
|
19
|
+
return _jsx("span", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../src/ui/badge.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAuB,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,aAAa,GAAG,GAAG,CACvB,kKAAkK,EAClK;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,uDAAuD;YAChE,SAAS,EAAE,2DAA2D;YACtE,WAAW,EAAE,+DAA+D;YAC5E,OAAO,EAAE,iBAAiB;YAC1B,OAAO,EAAE,8FAA8F;YACvG,OAAO,EAAE,sFAAsF;SAChG;KACF;IACD,eAAe,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;CACxC,CACF,CAAC;AAMF,MAAM,UAAU,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAc;IAChE,OAAO,eAAM,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAAC;AACnF,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { buttonVariants };
|
|
12
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,cAAc;;;8EAqBnB,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC,EAC7C,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,MAAM,2GAOlB,CAAC;AAGF,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { cn } from '../lib/utils.js';
|
|
6
|
+
const buttonVariants = cva('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-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0', {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
10
|
+
destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
|
|
11
|
+
outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
|
|
12
|
+
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
|
13
|
+
ghost: 'hover:bg-accent hover:text-accent-foreground',
|
|
14
|
+
link: 'text-primary underline-offset-4 hover:underline',
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
default: 'h-9 px-4 py-2',
|
|
18
|
+
sm: 'h-8 rounded-md px-3 text-xs',
|
|
19
|
+
lg: 'h-10 rounded-md px-8',
|
|
20
|
+
icon: 'h-9 w-9',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: { variant: 'default', size: 'default' },
|
|
24
|
+
});
|
|
25
|
+
export const Button = forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
26
|
+
const Comp = asChild ? Slot : 'button';
|
|
27
|
+
return (_jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref: ref, ...props }));
|
|
28
|
+
});
|
|
29
|
+
Button.displayName = 'Button';
|
|
30
|
+
export { buttonVariants };
|
|
31
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA6B,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,cAAc,GAAG,GAAG,CACxB,uSAAuS,EACvS;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,wDAAwD;YACjE,WAAW,EAAE,oEAAoE;YACjF,OAAO,EAAE,gFAAgF;YACzF,SAAS,EAAE,8DAA8D;YACzE,KAAK,EAAE,8CAA8C;YACrD,IAAI,EAAE,iDAAiD;SACxD;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,eAAe;YACxB,EAAE,EAAE,6BAA6B;YACjC,EAAE,EAAE,sBAAsB;YAC1B,IAAI,EAAE,SAAS;SAChB;KACF;IACD,eAAe,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;CACzD,CACF,CAAC;AAQF,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAC9B,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC/D,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC;IACvC,OAAO,CACL,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,KAAM,KAAK,GAAI,CAC3F,CAAC;AACJ,CAAC,CACF,CAAC;AACF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;AAE9B,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type HTMLAttributes } from 'react';
|
|
2
|
+
export declare const Card: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare const CardHeader: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export declare const CardTitle: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export declare const CardDescription: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export declare const CardContent: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export declare const CardFooter: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/ui/card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAGxD,eAAO,MAAM,IAAI,2HAQhB,CAAC;AAGF,eAAO,MAAM,UAAU,2HAItB,CAAC;AAGF,eAAO,MAAM,SAAS,2HAQrB,CAAC;AAGF,eAAO,MAAM,eAAe,2HAI3B,CAAC;AAGF,eAAO,MAAM,WAAW,2HAEvB,CAAC;AAGF,eAAO,MAAM,UAAU,2HAItB,CAAC"}
|
package/dist/ui/card.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { cn } from '../lib/utils.js';
|
|
4
|
+
export const Card = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('rounded-lg border bg-card text-card-foreground shadow-sm', className), ...props })));
|
|
5
|
+
Card.displayName = 'Card';
|
|
6
|
+
export const CardHeader = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('flex flex-col space-y-1.5 p-6', className), ...props })));
|
|
7
|
+
CardHeader.displayName = 'CardHeader';
|
|
8
|
+
export const CardTitle = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('text-base font-semibold leading-none tracking-tight', className), ...props })));
|
|
9
|
+
CardTitle.displayName = 'CardTitle';
|
|
10
|
+
export const CardDescription = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('text-sm text-muted-foreground', className), ...props })));
|
|
11
|
+
CardDescription.displayName = 'CardDescription';
|
|
12
|
+
export const CardContent = forwardRef(({ className, ...props }, ref) => _jsx("div", { ref: ref, className: cn('p-6 pt-0', className), ...props }));
|
|
13
|
+
CardContent.displayName = 'CardContent';
|
|
14
|
+
export const CardFooter = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('flex items-center p-6 pt-0', className), ...props })));
|
|
15
|
+
CardFooter.displayName = 'CardFooter';
|
|
16
|
+
//# sourceMappingURL=card.js.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B,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CACxF,CACF,CAAC;AACF,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CACnC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,cAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CACrG,CAAC;AACF,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC;AAExC,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAClC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CACrF,CACF,CAAC;AACF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type InputHTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Styled native checkbox. Keeps the standard form semantics intact (useful
|
|
4
|
+
* for uncontrolled forms + browser autofill) while picking up the
|
|
5
|
+
* shadcn-style border + focus ring.
|
|
6
|
+
*/
|
|
7
|
+
export declare const Checkbox: import("react").ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>>;
|
|
8
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/ui/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAG7D;;;;GAIG;AACH,eAAO,MAAM,QAAQ,oIAepB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { cn } from '../lib/utils.js';
|
|
4
|
+
/**
|
|
5
|
+
* Styled native checkbox. Keeps the standard form semantics intact (useful
|
|
6
|
+
* for uncontrolled forms + browser autofill) while picking up the
|
|
7
|
+
* shadcn-style border + focus ring.
|
|
8
|
+
*/
|
|
9
|
+
export const Checkbox = forwardRef(({ className, ...props }, ref) => (_jsx("input", { type: "checkbox", ref: ref, className: cn('h-4 w-4 shrink-0 rounded-sm border border-input bg-transparent shadow-sm', 'accent-primary', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:cursor-not-allowed disabled:opacity-50', className), ...props })));
|
|
10
|
+
Checkbox.displayName = 'Checkbox';
|
|
11
|
+
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../src/ui/checkbox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA4B,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAChC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,gBACE,IAAI,EAAC,UAAU,EACf,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,0EAA0E,EAC1E,gBAAgB,EAChB,yEAAyE,EACzE,iDAAiD,EACjD,SAAS,CACV,KACG,KAAK,GACT,CACH,CACF,CAAC;AACF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/** A small, neutral default palette used when no `presets` are supplied. */
|
|
3
|
+
export declare const DEFAULT_COLOR_PRESETS: readonly ["#1d4ed8", "#2563eb", "#0ea5e9", "#0d9488", "#16a34a", "#65a30d", "#ca8a04", "#ea580c", "#dc2626", "#db2777", "#9333ea", "#475569", "#111827", "#6b7280", "#fafafa", "#ffffff"];
|
|
4
|
+
/**
|
|
5
|
+
* Core colour picker — a swatch trigger that opens a small popover with a
|
|
6
|
+
* curated preset palette plus a native colour input + hex field for any custom
|
|
7
|
+
* colour. Dependency-free (no popover lib): closes on outside click / Escape,
|
|
8
|
+
* mirroring the Combobox pattern. Fully controlled.
|
|
9
|
+
*
|
|
10
|
+
* Reused across the admin (order-status colours, PWA theme/background colours).
|
|
11
|
+
*/
|
|
12
|
+
export declare function ColorPicker(props: {
|
|
13
|
+
value: string;
|
|
14
|
+
onChange: (hex: string) => void;
|
|
15
|
+
/** Accessible label for the trigger. */
|
|
16
|
+
label: string;
|
|
17
|
+
/** Accessible label for the custom colour input. */
|
|
18
|
+
customLabel: string;
|
|
19
|
+
/** Preset swatches; falls back to {@link DEFAULT_COLOR_PRESETS}. Pass `[]` to hide. */
|
|
20
|
+
presets?: readonly string[];
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
}): ReactNode;
|
|
23
|
+
//# sourceMappingURL=color-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-picker.d.ts","sourceRoot":"","sources":["../../src/ui/color-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMpE,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB,2LAIxB,CAAC;AAaX;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,uFAAuF;IACvF,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,SAAS,CA8GZ"}
|