@reblu/site-blocks 0.26.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/README.md +58 -4
- package/dist/index.cjs +361 -274
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +62 -8
- package/dist/index.d.ts +62 -8
- package/dist/index.js +364 -278
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -322,8 +322,12 @@ declare function CourseDescription({ description, heading, headingLevel, heading
|
|
|
322
322
|
type Guarantee = NonNullable<AcademyCourseDetail['refundGuarantee']>;
|
|
323
323
|
/** Texts of {@link CoursePurchaseTerms}; replace any of them in the SITE's language. */
|
|
324
324
|
interface CoursePurchaseTermsLabels {
|
|
325
|
-
/** Shown when checkout asks for the withdrawal waiver. */
|
|
325
|
+
/** Shown when checkout asks for the digital-content withdrawal waiver. */
|
|
326
326
|
withdrawalWaiver: ReactNode;
|
|
327
|
+
/** REB-1240: shown when checkout asks for the express request to start a training service. */
|
|
328
|
+
serviceStartRequest: ReactNode;
|
|
329
|
+
/** REB-1240: the tenant's exact box text, after the line of its kind. */
|
|
330
|
+
consentText: (text: string) => ReactNode;
|
|
327
331
|
/** Months of access after enrolment. */
|
|
328
332
|
accessDuration: (months: number) => ReactNode;
|
|
329
333
|
/** The refund guarantee terms. */
|
|
@@ -332,8 +336,10 @@ interface CoursePurchaseTermsLabels {
|
|
|
332
336
|
declare const DEFAULT_COURSE_PURCHASE_TERMS_LABELS: CoursePurchaseTermsLabels;
|
|
333
337
|
/**
|
|
334
338
|
* `CoursePurchaseTerms` — the drop-in for what a buyer must see before paying
|
|
335
|
-
* for a course (`client.academy.bySlug()`), REB-1199:
|
|
336
|
-
* `
|
|
339
|
+
* for a course (`client.academy.bySlug()`), REB-1199/REB-1240:
|
|
340
|
+
* `withdrawalConsent` (the box the course's modality calls for, with the
|
|
341
|
+
* tenant's text; `withdrawalWaiverRequired` against an API that predates it),
|
|
342
|
+
* `accessDurationMonths` and `refundGuarantee`.
|
|
337
343
|
*
|
|
338
344
|
* Server Component, RSC-safe: no hooks, no state, no `'use client'`.
|
|
339
345
|
*
|
|
@@ -343,7 +349,7 @@ declare const DEFAULT_COURSE_PURCHASE_TERMS_LABELS: CoursePurchaseTermsLabels;
|
|
|
343
349
|
*/
|
|
344
350
|
interface CoursePurchaseTermsProps {
|
|
345
351
|
/** The fields of `AcademyCourseDetail` this block reads (all optional). */
|
|
346
|
-
course: Partial<Pick<AcademyCourseDetail, 'withdrawalWaiverRequired' | 'accessDurationMonths' | 'refundGuarantee'>>;
|
|
352
|
+
course: Partial<Pick<AcademyCourseDetail, 'withdrawalWaiverRequired' | 'withdrawalConsent' | 'accessDurationMonths' | 'refundGuarantee'>>;
|
|
347
353
|
/** Optional section heading, e.g. «Antes de comprar». */
|
|
348
354
|
heading?: ReactNode;
|
|
349
355
|
/** Level of `heading`. Defaults to `2`. */
|
|
@@ -663,7 +669,8 @@ declare function FaqAccordion({ items, heading, headingLevel, questionHeadingLev
|
|
|
663
669
|
* - Badges are grouped by type (in {@link DEFAULT_TRUST_BADGE_TYPE_ORDER}, or
|
|
664
670
|
* the `types` prop), each group under an overridable heading, and ordered by
|
|
665
671
|
* `sortOrder` inside it.
|
|
666
|
-
* - A logo is an `<img>` whose `alt` is the badge name
|
|
672
|
+
* - A logo is an `<img>` whose `alt` is the badge name (plus its adhesion
|
|
673
|
+
* number when it has one, REB-1201), rendered only when its
|
|
667
674
|
* URL is http(s) or root-relative (REB-1002); a badge without a usable logo
|
|
668
675
|
* shows its name as text.
|
|
669
676
|
* - `heading` (optional) wraps everything in a `<section>` labelled by it
|
|
@@ -676,14 +683,22 @@ declare function FaqAccordion({ items, heading, headingLevel, questionHeadingLev
|
|
|
676
683
|
*/
|
|
677
684
|
/** Default group heading per badge type. Override any of them with `headings`. */
|
|
678
685
|
declare const DEFAULT_TRUST_BADGE_HEADINGS: Readonly<Record<TrustBadgeType, string>>;
|
|
679
|
-
/**
|
|
686
|
+
/**
|
|
687
|
+
* Default order of the groups. CONSUMER_ARBITRATION is deliberately absent
|
|
688
|
+
* (REB-1201): it has its own footer drop-in, `ArbitrationBadge`, so a footer
|
|
689
|
+
* rendering both never shows it twice. Opt in with `types` to group it here.
|
|
690
|
+
*/
|
|
680
691
|
declare const DEFAULT_TRUST_BADGE_TYPE_ORDER: readonly TrustBadgeType[];
|
|
681
692
|
interface TrustBadgesProps {
|
|
682
693
|
/** `client.trustBadges.list()`'s `data` as served — may be `null` / `undefined`. */
|
|
683
694
|
badges: readonly TrustBadge[] | null | undefined;
|
|
684
695
|
/** Per-type heading overrides; `null` renders that group without a heading. */
|
|
685
696
|
headings?: Partial<Record<TrustBadgeType, string | null>>;
|
|
686
|
-
/**
|
|
697
|
+
/**
|
|
698
|
+
* Which groups to render, in this order. Defaults to
|
|
699
|
+
* {@link DEFAULT_TRUST_BADGE_TYPE_ORDER} (every type except
|
|
700
|
+
* `CONSUMER_ARBITRATION`, which `ArbitrationBadge` renders).
|
|
701
|
+
*/
|
|
687
702
|
types?: readonly TrustBadgeType[];
|
|
688
703
|
/**
|
|
689
704
|
* Optional section title, e.g. «Nos avalan». When given, the root is a
|
|
@@ -721,6 +736,45 @@ interface TrustBadgesProps {
|
|
|
721
736
|
}
|
|
722
737
|
declare function TrustBadges({ badges, headings, types, heading, headingId, headingLevel, newWindowLabel, className, groupClassName, headingClassName, sectionHeadingClassName, listClassName, logoClassName, }: TrustBadgesProps): react_jsx_runtime.JSX.Element | null;
|
|
723
738
|
|
|
739
|
+
/**
|
|
740
|
+
* `ArbitrationBadge` — the tenant's consumer-arbitration distinctive (trust
|
|
741
|
+
* badge of type `CONSUMER_ARBITRATION`, set up in nexus › Trust badges with
|
|
742
|
+
* its logo, adhesion number and optional link) for the SITE footer (REB-1201).
|
|
743
|
+
* Pass `client.trustBadges.list()`'s `data` as is — every other type is
|
|
744
|
+
* ignored, so the same list can feed `TrustBadges` next to it.
|
|
745
|
+
*
|
|
746
|
+
* Server Component, RSC-safe: no hooks, no state, no `'use client'`.
|
|
747
|
+
*
|
|
748
|
+
* Visible and accessible:
|
|
749
|
+
* - The logo is an `<img>` at `h-16` by default (not a tiny icon) whose `alt`
|
|
750
|
+
* is the badge name plus the adhesion number («… N.º de adhesión CA00000»).
|
|
751
|
+
* - The number is also shown as visible text under the logo, `aria-hidden`
|
|
752
|
+
* there because the `alt` already says it. Without a usable logo the name
|
|
753
|
+
* and the number are plain readable text. `showNumber={false}` drops the
|
|
754
|
+
* visible caption (the `alt` keeps the number).
|
|
755
|
+
* - `url` links only when it is http(s), in a new window with
|
|
756
|
+
* `rel="noopener noreferrer"` and a visually hidden new-window hint.
|
|
757
|
+
* - `null`, `undefined`, a non-array, or a list without a named
|
|
758
|
+
* consumer-arbitration badge render NOTHING.
|
|
759
|
+
*/
|
|
760
|
+
interface ArbitrationBadgeProps {
|
|
761
|
+
/** `client.trustBadges.list()`'s `data` as served — may be `null` / `undefined`. */
|
|
762
|
+
badges: readonly TrustBadge[] | null | undefined;
|
|
763
|
+
/** Wording before the number, in the alt text and the caption. @default 'N.º de adhesión' */
|
|
764
|
+
numberLabel?: string;
|
|
765
|
+
/** Show the number as visible text under the logo. @default true */
|
|
766
|
+
showNumber?: boolean;
|
|
767
|
+
/** Visually hidden text appended to a linked badge. */
|
|
768
|
+
newWindowLabel?: string;
|
|
769
|
+
/** Classes for the root `<ul>`. */
|
|
770
|
+
className?: string;
|
|
771
|
+
/** Classes added to the logo `<img>` (default `h-16 w-auto object-contain`). */
|
|
772
|
+
logoClassName?: string;
|
|
773
|
+
/** Classes for the number caption. */
|
|
774
|
+
numberClassName?: string;
|
|
775
|
+
}
|
|
776
|
+
declare function ArbitrationBadge({ badges, numberLabel, showNumber, newWindowLabel, className, logoClassName, numberClassName, }: ArbitrationBadgeProps): react_jsx_runtime.JSX.Element | null;
|
|
777
|
+
|
|
724
778
|
/**
|
|
725
779
|
* REB-850 — `PageBlocks`: the shared renderer for a page's registry blocks
|
|
726
780
|
* (`PageDetail.blocks`, REB-75), so a SITE stops hand-writing its own.
|
|
@@ -1542,4 +1596,4 @@ interface OrderInvoiceLinkProps {
|
|
|
1542
1596
|
}
|
|
1543
1597
|
declare function OrderInvoiceLink({ invoice, labels, className }: OrderInvoiceLinkProps): react_jsx_runtime.JSX.Element | null;
|
|
1544
1598
|
|
|
1545
|
-
export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, type BlockRendererProps, type CanonicalBlockType, type CartAdjustmentLine, CartAdjustmentsNotice, type CartAdjustmentsNoticeLabels, type CartAdjustmentsNoticeProps, type CartLineItemView, CartLineList, type CartLineListLabels, type CartLineListProps, CartSummary, type CartSummaryLabels, type CartSummaryProps, type CheckoutAppliedDiscount, type CheckoutContactErrors, type CheckoutContactValues, CheckoutForm, type CheckoutFormLabels, type CheckoutFormProps, CheckoutLoginPrompt, type CheckoutLoginPromptLabels, type CheckoutLoginPromptProps, type ContactInterest, ContactInterestField, type ContactInterestFieldProps, CourseCatalogFilters, type CourseCatalogFiltersActive, type CourseCatalogFiltersHrefs, type CourseCatalogFiltersLabels, type CourseCatalogFiltersProps, type CourseCatalogPriceBand, CourseDescription, type CourseDescriptionProps, CoursePurchaseTerms, type CoursePurchaseTermsLabels, type CoursePurchaseTermsProps, DEFAULT_COURSE_CATALOG_FILTERS_LABELS, DEFAULT_COURSE_PRICE_BANDS, DEFAULT_COURSE_PURCHASE_TERMS_LABELS, DEFAULT_INVOICE_COUNTRIES, DEFAULT_LESSON_PREVIEW_LABELS, DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE, DEFAULT_SHOP_ERROR_MESSAGES, DEFAULT_SHOP_PRICE_BANDS, DEFAULT_TRUST_BADGE_HEADINGS, DEFAULT_TRUST_BADGE_TYPE_ORDER, DEFAULT_TRUST_ICONS, EMPTY_FULL_INVOICE_VALUE, FaqAccordion, type FaqAccordionProps, FaqItem, type FullInvoiceErrors, FullInvoiceFields, type FullInvoiceFieldsLabels, type FullInvoiceFieldsProps, type FullInvoiceIdType, type FullInvoiceValue, HeadingLevel, LegalDocument, type LegalDocumentProps, LessonPreview, type LessonPreviewLabels, type LessonPreviewProps, type MarkdownImageOptions, MarkdownRenderer, type MarkdownRendererProps, OrderConfirmation, type OrderConfirmationLabels, type OrderConfirmationOrder, type OrderConfirmationProps, type OrderConfirmationStatus, OrderInvoiceLink, type OrderInvoiceLinkLabels, type OrderInvoiceLinkProps, PageBlocks, type PageBlocksComponents, type PageBlocksProps, PageCardGrid, type PageCardGridProps, ParentPage, type ParentPageProps, ProductCard, type ProductCardProps, ProductTrustItems, type ProductTrustItemsProps, ProfessionalFields, type ProfessionalFieldsProps, ProfileCard, type ProfileCardProps, type RenderableBlock, SafeHtml, type SafeHtmlProps, type ShareUrls, type ShopFilterPriceBand, ShopFilters, type ShopFiltersActive, type ShopFiltersHrefs, type ShopFiltersLabels, type ShopFiltersProps, Specialty, type SpecialtyProps, Treatment, type TreatmentProps, TrustBadges, type TrustBadgesProps, type TrustIconComponent, type TrustIconProps, buildShareUrls, formatPrice, getShopErrorMessage, isAllowedYouTubeHost, isOverSimplifiedInvoiceCap, markdownToSafeHtml, readingTime, sanitizeHtml, shopIssuesInvoices, shouldRenderShopFilters, toCheckoutInvoiceFields };
|
|
1599
|
+
export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, ArbitrationBadge, type ArbitrationBadgeProps, type BlockRendererProps, type CanonicalBlockType, type CartAdjustmentLine, CartAdjustmentsNotice, type CartAdjustmentsNoticeLabels, type CartAdjustmentsNoticeProps, type CartLineItemView, CartLineList, type CartLineListLabels, type CartLineListProps, CartSummary, type CartSummaryLabels, type CartSummaryProps, type CheckoutAppliedDiscount, type CheckoutContactErrors, type CheckoutContactValues, CheckoutForm, type CheckoutFormLabels, type CheckoutFormProps, CheckoutLoginPrompt, type CheckoutLoginPromptLabels, type CheckoutLoginPromptProps, type ContactInterest, ContactInterestField, type ContactInterestFieldProps, CourseCatalogFilters, type CourseCatalogFiltersActive, type CourseCatalogFiltersHrefs, type CourseCatalogFiltersLabels, type CourseCatalogFiltersProps, type CourseCatalogPriceBand, CourseDescription, type CourseDescriptionProps, CoursePurchaseTerms, type CoursePurchaseTermsLabels, type CoursePurchaseTermsProps, DEFAULT_COURSE_CATALOG_FILTERS_LABELS, DEFAULT_COURSE_PRICE_BANDS, DEFAULT_COURSE_PURCHASE_TERMS_LABELS, DEFAULT_INVOICE_COUNTRIES, DEFAULT_LESSON_PREVIEW_LABELS, DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE, DEFAULT_SHOP_ERROR_MESSAGES, DEFAULT_SHOP_PRICE_BANDS, DEFAULT_TRUST_BADGE_HEADINGS, DEFAULT_TRUST_BADGE_TYPE_ORDER, DEFAULT_TRUST_ICONS, EMPTY_FULL_INVOICE_VALUE, FaqAccordion, type FaqAccordionProps, FaqItem, type FullInvoiceErrors, FullInvoiceFields, type FullInvoiceFieldsLabels, type FullInvoiceFieldsProps, type FullInvoiceIdType, type FullInvoiceValue, HeadingLevel, LegalDocument, type LegalDocumentProps, LessonPreview, type LessonPreviewLabels, type LessonPreviewProps, type MarkdownImageOptions, MarkdownRenderer, type MarkdownRendererProps, OrderConfirmation, type OrderConfirmationLabels, type OrderConfirmationOrder, type OrderConfirmationProps, type OrderConfirmationStatus, OrderInvoiceLink, type OrderInvoiceLinkLabels, type OrderInvoiceLinkProps, PageBlocks, type PageBlocksComponents, type PageBlocksProps, PageCardGrid, type PageCardGridProps, ParentPage, type ParentPageProps, ProductCard, type ProductCardProps, ProductTrustItems, type ProductTrustItemsProps, ProfessionalFields, type ProfessionalFieldsProps, ProfileCard, type ProfileCardProps, type RenderableBlock, SafeHtml, type SafeHtmlProps, type ShareUrls, type ShopFilterPriceBand, ShopFilters, type ShopFiltersActive, type ShopFiltersHrefs, type ShopFiltersLabels, type ShopFiltersProps, Specialty, type SpecialtyProps, Treatment, type TreatmentProps, TrustBadges, type TrustBadgesProps, type TrustIconComponent, type TrustIconProps, buildShareUrls, formatPrice, getShopErrorMessage, isAllowedYouTubeHost, isOverSimplifiedInvoiceCap, markdownToSafeHtml, readingTime, sanitizeHtml, shopIssuesInvoices, shouldRenderShopFilters, toCheckoutInvoiceFields };
|
package/dist/index.d.ts
CHANGED
|
@@ -322,8 +322,12 @@ declare function CourseDescription({ description, heading, headingLevel, heading
|
|
|
322
322
|
type Guarantee = NonNullable<AcademyCourseDetail['refundGuarantee']>;
|
|
323
323
|
/** Texts of {@link CoursePurchaseTerms}; replace any of them in the SITE's language. */
|
|
324
324
|
interface CoursePurchaseTermsLabels {
|
|
325
|
-
/** Shown when checkout asks for the withdrawal waiver. */
|
|
325
|
+
/** Shown when checkout asks for the digital-content withdrawal waiver. */
|
|
326
326
|
withdrawalWaiver: ReactNode;
|
|
327
|
+
/** REB-1240: shown when checkout asks for the express request to start a training service. */
|
|
328
|
+
serviceStartRequest: ReactNode;
|
|
329
|
+
/** REB-1240: the tenant's exact box text, after the line of its kind. */
|
|
330
|
+
consentText: (text: string) => ReactNode;
|
|
327
331
|
/** Months of access after enrolment. */
|
|
328
332
|
accessDuration: (months: number) => ReactNode;
|
|
329
333
|
/** The refund guarantee terms. */
|
|
@@ -332,8 +336,10 @@ interface CoursePurchaseTermsLabels {
|
|
|
332
336
|
declare const DEFAULT_COURSE_PURCHASE_TERMS_LABELS: CoursePurchaseTermsLabels;
|
|
333
337
|
/**
|
|
334
338
|
* `CoursePurchaseTerms` — the drop-in for what a buyer must see before paying
|
|
335
|
-
* for a course (`client.academy.bySlug()`), REB-1199:
|
|
336
|
-
* `
|
|
339
|
+
* for a course (`client.academy.bySlug()`), REB-1199/REB-1240:
|
|
340
|
+
* `withdrawalConsent` (the box the course's modality calls for, with the
|
|
341
|
+
* tenant's text; `withdrawalWaiverRequired` against an API that predates it),
|
|
342
|
+
* `accessDurationMonths` and `refundGuarantee`.
|
|
337
343
|
*
|
|
338
344
|
* Server Component, RSC-safe: no hooks, no state, no `'use client'`.
|
|
339
345
|
*
|
|
@@ -343,7 +349,7 @@ declare const DEFAULT_COURSE_PURCHASE_TERMS_LABELS: CoursePurchaseTermsLabels;
|
|
|
343
349
|
*/
|
|
344
350
|
interface CoursePurchaseTermsProps {
|
|
345
351
|
/** The fields of `AcademyCourseDetail` this block reads (all optional). */
|
|
346
|
-
course: Partial<Pick<AcademyCourseDetail, 'withdrawalWaiverRequired' | 'accessDurationMonths' | 'refundGuarantee'>>;
|
|
352
|
+
course: Partial<Pick<AcademyCourseDetail, 'withdrawalWaiverRequired' | 'withdrawalConsent' | 'accessDurationMonths' | 'refundGuarantee'>>;
|
|
347
353
|
/** Optional section heading, e.g. «Antes de comprar». */
|
|
348
354
|
heading?: ReactNode;
|
|
349
355
|
/** Level of `heading`. Defaults to `2`. */
|
|
@@ -663,7 +669,8 @@ declare function FaqAccordion({ items, heading, headingLevel, questionHeadingLev
|
|
|
663
669
|
* - Badges are grouped by type (in {@link DEFAULT_TRUST_BADGE_TYPE_ORDER}, or
|
|
664
670
|
* the `types` prop), each group under an overridable heading, and ordered by
|
|
665
671
|
* `sortOrder` inside it.
|
|
666
|
-
* - A logo is an `<img>` whose `alt` is the badge name
|
|
672
|
+
* - A logo is an `<img>` whose `alt` is the badge name (plus its adhesion
|
|
673
|
+
* number when it has one, REB-1201), rendered only when its
|
|
667
674
|
* URL is http(s) or root-relative (REB-1002); a badge without a usable logo
|
|
668
675
|
* shows its name as text.
|
|
669
676
|
* - `heading` (optional) wraps everything in a `<section>` labelled by it
|
|
@@ -676,14 +683,22 @@ declare function FaqAccordion({ items, heading, headingLevel, questionHeadingLev
|
|
|
676
683
|
*/
|
|
677
684
|
/** Default group heading per badge type. Override any of them with `headings`. */
|
|
678
685
|
declare const DEFAULT_TRUST_BADGE_HEADINGS: Readonly<Record<TrustBadgeType, string>>;
|
|
679
|
-
/**
|
|
686
|
+
/**
|
|
687
|
+
* Default order of the groups. CONSUMER_ARBITRATION is deliberately absent
|
|
688
|
+
* (REB-1201): it has its own footer drop-in, `ArbitrationBadge`, so a footer
|
|
689
|
+
* rendering both never shows it twice. Opt in with `types` to group it here.
|
|
690
|
+
*/
|
|
680
691
|
declare const DEFAULT_TRUST_BADGE_TYPE_ORDER: readonly TrustBadgeType[];
|
|
681
692
|
interface TrustBadgesProps {
|
|
682
693
|
/** `client.trustBadges.list()`'s `data` as served — may be `null` / `undefined`. */
|
|
683
694
|
badges: readonly TrustBadge[] | null | undefined;
|
|
684
695
|
/** Per-type heading overrides; `null` renders that group without a heading. */
|
|
685
696
|
headings?: Partial<Record<TrustBadgeType, string | null>>;
|
|
686
|
-
/**
|
|
697
|
+
/**
|
|
698
|
+
* Which groups to render, in this order. Defaults to
|
|
699
|
+
* {@link DEFAULT_TRUST_BADGE_TYPE_ORDER} (every type except
|
|
700
|
+
* `CONSUMER_ARBITRATION`, which `ArbitrationBadge` renders).
|
|
701
|
+
*/
|
|
687
702
|
types?: readonly TrustBadgeType[];
|
|
688
703
|
/**
|
|
689
704
|
* Optional section title, e.g. «Nos avalan». When given, the root is a
|
|
@@ -721,6 +736,45 @@ interface TrustBadgesProps {
|
|
|
721
736
|
}
|
|
722
737
|
declare function TrustBadges({ badges, headings, types, heading, headingId, headingLevel, newWindowLabel, className, groupClassName, headingClassName, sectionHeadingClassName, listClassName, logoClassName, }: TrustBadgesProps): react_jsx_runtime.JSX.Element | null;
|
|
723
738
|
|
|
739
|
+
/**
|
|
740
|
+
* `ArbitrationBadge` — the tenant's consumer-arbitration distinctive (trust
|
|
741
|
+
* badge of type `CONSUMER_ARBITRATION`, set up in nexus › Trust badges with
|
|
742
|
+
* its logo, adhesion number and optional link) for the SITE footer (REB-1201).
|
|
743
|
+
* Pass `client.trustBadges.list()`'s `data` as is — every other type is
|
|
744
|
+
* ignored, so the same list can feed `TrustBadges` next to it.
|
|
745
|
+
*
|
|
746
|
+
* Server Component, RSC-safe: no hooks, no state, no `'use client'`.
|
|
747
|
+
*
|
|
748
|
+
* Visible and accessible:
|
|
749
|
+
* - The logo is an `<img>` at `h-16` by default (not a tiny icon) whose `alt`
|
|
750
|
+
* is the badge name plus the adhesion number («… N.º de adhesión CA00000»).
|
|
751
|
+
* - The number is also shown as visible text under the logo, `aria-hidden`
|
|
752
|
+
* there because the `alt` already says it. Without a usable logo the name
|
|
753
|
+
* and the number are plain readable text. `showNumber={false}` drops the
|
|
754
|
+
* visible caption (the `alt` keeps the number).
|
|
755
|
+
* - `url` links only when it is http(s), in a new window with
|
|
756
|
+
* `rel="noopener noreferrer"` and a visually hidden new-window hint.
|
|
757
|
+
* - `null`, `undefined`, a non-array, or a list without a named
|
|
758
|
+
* consumer-arbitration badge render NOTHING.
|
|
759
|
+
*/
|
|
760
|
+
interface ArbitrationBadgeProps {
|
|
761
|
+
/** `client.trustBadges.list()`'s `data` as served — may be `null` / `undefined`. */
|
|
762
|
+
badges: readonly TrustBadge[] | null | undefined;
|
|
763
|
+
/** Wording before the number, in the alt text and the caption. @default 'N.º de adhesión' */
|
|
764
|
+
numberLabel?: string;
|
|
765
|
+
/** Show the number as visible text under the logo. @default true */
|
|
766
|
+
showNumber?: boolean;
|
|
767
|
+
/** Visually hidden text appended to a linked badge. */
|
|
768
|
+
newWindowLabel?: string;
|
|
769
|
+
/** Classes for the root `<ul>`. */
|
|
770
|
+
className?: string;
|
|
771
|
+
/** Classes added to the logo `<img>` (default `h-16 w-auto object-contain`). */
|
|
772
|
+
logoClassName?: string;
|
|
773
|
+
/** Classes for the number caption. */
|
|
774
|
+
numberClassName?: string;
|
|
775
|
+
}
|
|
776
|
+
declare function ArbitrationBadge({ badges, numberLabel, showNumber, newWindowLabel, className, logoClassName, numberClassName, }: ArbitrationBadgeProps): react_jsx_runtime.JSX.Element | null;
|
|
777
|
+
|
|
724
778
|
/**
|
|
725
779
|
* REB-850 — `PageBlocks`: the shared renderer for a page's registry blocks
|
|
726
780
|
* (`PageDetail.blocks`, REB-75), so a SITE stops hand-writing its own.
|
|
@@ -1542,4 +1596,4 @@ interface OrderInvoiceLinkProps {
|
|
|
1542
1596
|
}
|
|
1543
1597
|
declare function OrderInvoiceLink({ invoice, labels, className }: OrderInvoiceLinkProps): react_jsx_runtime.JSX.Element | null;
|
|
1544
1598
|
|
|
1545
|
-
export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, type BlockRendererProps, type CanonicalBlockType, type CartAdjustmentLine, CartAdjustmentsNotice, type CartAdjustmentsNoticeLabels, type CartAdjustmentsNoticeProps, type CartLineItemView, CartLineList, type CartLineListLabels, type CartLineListProps, CartSummary, type CartSummaryLabels, type CartSummaryProps, type CheckoutAppliedDiscount, type CheckoutContactErrors, type CheckoutContactValues, CheckoutForm, type CheckoutFormLabels, type CheckoutFormProps, CheckoutLoginPrompt, type CheckoutLoginPromptLabels, type CheckoutLoginPromptProps, type ContactInterest, ContactInterestField, type ContactInterestFieldProps, CourseCatalogFilters, type CourseCatalogFiltersActive, type CourseCatalogFiltersHrefs, type CourseCatalogFiltersLabels, type CourseCatalogFiltersProps, type CourseCatalogPriceBand, CourseDescription, type CourseDescriptionProps, CoursePurchaseTerms, type CoursePurchaseTermsLabels, type CoursePurchaseTermsProps, DEFAULT_COURSE_CATALOG_FILTERS_LABELS, DEFAULT_COURSE_PRICE_BANDS, DEFAULT_COURSE_PURCHASE_TERMS_LABELS, DEFAULT_INVOICE_COUNTRIES, DEFAULT_LESSON_PREVIEW_LABELS, DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE, DEFAULT_SHOP_ERROR_MESSAGES, DEFAULT_SHOP_PRICE_BANDS, DEFAULT_TRUST_BADGE_HEADINGS, DEFAULT_TRUST_BADGE_TYPE_ORDER, DEFAULT_TRUST_ICONS, EMPTY_FULL_INVOICE_VALUE, FaqAccordion, type FaqAccordionProps, FaqItem, type FullInvoiceErrors, FullInvoiceFields, type FullInvoiceFieldsLabels, type FullInvoiceFieldsProps, type FullInvoiceIdType, type FullInvoiceValue, HeadingLevel, LegalDocument, type LegalDocumentProps, LessonPreview, type LessonPreviewLabels, type LessonPreviewProps, type MarkdownImageOptions, MarkdownRenderer, type MarkdownRendererProps, OrderConfirmation, type OrderConfirmationLabels, type OrderConfirmationOrder, type OrderConfirmationProps, type OrderConfirmationStatus, OrderInvoiceLink, type OrderInvoiceLinkLabels, type OrderInvoiceLinkProps, PageBlocks, type PageBlocksComponents, type PageBlocksProps, PageCardGrid, type PageCardGridProps, ParentPage, type ParentPageProps, ProductCard, type ProductCardProps, ProductTrustItems, type ProductTrustItemsProps, ProfessionalFields, type ProfessionalFieldsProps, ProfileCard, type ProfileCardProps, type RenderableBlock, SafeHtml, type SafeHtmlProps, type ShareUrls, type ShopFilterPriceBand, ShopFilters, type ShopFiltersActive, type ShopFiltersHrefs, type ShopFiltersLabels, type ShopFiltersProps, Specialty, type SpecialtyProps, Treatment, type TreatmentProps, TrustBadges, type TrustBadgesProps, type TrustIconComponent, type TrustIconProps, buildShareUrls, formatPrice, getShopErrorMessage, isAllowedYouTubeHost, isOverSimplifiedInvoiceCap, markdownToSafeHtml, readingTime, sanitizeHtml, shopIssuesInvoices, shouldRenderShopFilters, toCheckoutInvoiceFields };
|
|
1599
|
+
export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, ArbitrationBadge, type ArbitrationBadgeProps, type BlockRendererProps, type CanonicalBlockType, type CartAdjustmentLine, CartAdjustmentsNotice, type CartAdjustmentsNoticeLabels, type CartAdjustmentsNoticeProps, type CartLineItemView, CartLineList, type CartLineListLabels, type CartLineListProps, CartSummary, type CartSummaryLabels, type CartSummaryProps, type CheckoutAppliedDiscount, type CheckoutContactErrors, type CheckoutContactValues, CheckoutForm, type CheckoutFormLabels, type CheckoutFormProps, CheckoutLoginPrompt, type CheckoutLoginPromptLabels, type CheckoutLoginPromptProps, type ContactInterest, ContactInterestField, type ContactInterestFieldProps, CourseCatalogFilters, type CourseCatalogFiltersActive, type CourseCatalogFiltersHrefs, type CourseCatalogFiltersLabels, type CourseCatalogFiltersProps, type CourseCatalogPriceBand, CourseDescription, type CourseDescriptionProps, CoursePurchaseTerms, type CoursePurchaseTermsLabels, type CoursePurchaseTermsProps, DEFAULT_COURSE_CATALOG_FILTERS_LABELS, DEFAULT_COURSE_PRICE_BANDS, DEFAULT_COURSE_PURCHASE_TERMS_LABELS, DEFAULT_INVOICE_COUNTRIES, DEFAULT_LESSON_PREVIEW_LABELS, DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE, DEFAULT_SHOP_ERROR_MESSAGES, DEFAULT_SHOP_PRICE_BANDS, DEFAULT_TRUST_BADGE_HEADINGS, DEFAULT_TRUST_BADGE_TYPE_ORDER, DEFAULT_TRUST_ICONS, EMPTY_FULL_INVOICE_VALUE, FaqAccordion, type FaqAccordionProps, FaqItem, type FullInvoiceErrors, FullInvoiceFields, type FullInvoiceFieldsLabels, type FullInvoiceFieldsProps, type FullInvoiceIdType, type FullInvoiceValue, HeadingLevel, LegalDocument, type LegalDocumentProps, LessonPreview, type LessonPreviewLabels, type LessonPreviewProps, type MarkdownImageOptions, MarkdownRenderer, type MarkdownRendererProps, OrderConfirmation, type OrderConfirmationLabels, type OrderConfirmationOrder, type OrderConfirmationProps, type OrderConfirmationStatus, OrderInvoiceLink, type OrderInvoiceLinkLabels, type OrderInvoiceLinkProps, PageBlocks, type PageBlocksComponents, type PageBlocksProps, PageCardGrid, type PageCardGridProps, ParentPage, type ParentPageProps, ProductCard, type ProductCardProps, ProductTrustItems, type ProductTrustItemsProps, ProfessionalFields, type ProfessionalFieldsProps, ProfileCard, type ProfileCardProps, type RenderableBlock, SafeHtml, type SafeHtmlProps, type ShareUrls, type ShopFilterPriceBand, ShopFilters, type ShopFiltersActive, type ShopFiltersHrefs, type ShopFiltersLabels, type ShopFiltersProps, Specialty, type SpecialtyProps, Treatment, type TreatmentProps, TrustBadges, type TrustBadgesProps, type TrustIconComponent, type TrustIconProps, buildShareUrls, formatPrice, getShopErrorMessage, isAllowedYouTubeHost, isOverSimplifiedInvoiceCap, markdownToSafeHtml, readingTime, sanitizeHtml, shopIssuesInvoices, shouldRenderShopFilters, toCheckoutInvoiceFields };
|