@reblu/site-blocks 0.33.0 → 0.34.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 +23 -0
- package/README.md +163 -2
- package/dist/client.cjs +459 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +142 -3
- package/dist/client.d.ts +142 -3
- package/dist/client.js +453 -0
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +611 -483
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +57 -78
- package/dist/index.d.ts +57 -78
- package/dist/index.js +607 -484
- package/dist/index.js.map +1 -1
- package/dist/{full-invoice-fields-DMX0sjPG.d.cts → page-links-C0nXQzAW.d.cts} +105 -2
- package/dist/{full-invoice-fields-DMX0sjPG.d.ts → page-links-C0nXQzAW.d.ts} +105 -2
- package/package.json +3 -3
package/dist/client.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
import { ShopProductListItem, AcademyModulePublic, AcademyLessonPublic, DataRequestType, DataRequestInput, DataRequestSubmission, WithdrawalRequestInput, WithdrawalRequestSubmission, ShopCheckoutCopy, AcademyCourseDetail, AcademyCheckoutRequest, AcademyCheckoutSession, AcademyCheckoutErrorCode } from '@reblu/site-contracts';
|
|
4
|
+
import { ShopProductListItem, AcademyModulePublic, AcademyLessonPublic, DataRequestType, DataRequestInput, DataRequestSubmission, WithdrawalRequestInput, WithdrawalRequestSubmission, ShopCheckoutCopy, AcademyCourseDetail, AcademyCheckoutRequest, AcademyCheckoutSession, AcademyCheckoutErrorCode, Review } from '@reblu/site-contracts';
|
|
5
5
|
export { DATA_REQUEST_TYPES } from '@reblu/site-contracts';
|
|
6
|
-
import { H as HeadingLevel, C as CheckoutTermsCopy, F as FullInvoiceFieldsLabels } from './
|
|
6
|
+
import { H as HeadingLevel, C as CheckoutTermsCopy, F as FullInvoiceFieldsLabels, B as BlockRendererProps, P as PageLinkRef } from './page-links-C0nXQzAW.cjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* `useCollection` — the headless heart of `@reblu/site-blocks`.
|
|
@@ -646,4 +646,143 @@ interface CourseGuestCheckoutFormProps {
|
|
|
646
646
|
}
|
|
647
647
|
declare function CourseGuestCheckoutForm({ course, copy, termsHref, requestForm, issuesInvoices, simplifiedInvoiceCapCents, submit, endpoint, onRedirect, onError, labels, errorMessages, invoiceLabels, invoiceCountries, currencyCode, locale, className, }: CourseGuestCheckoutFormProps): react_jsx_runtime.JSX.Element;
|
|
648
648
|
|
|
649
|
-
|
|
649
|
+
/**
|
|
650
|
+
* `ReviewsCarousel` (REB-1272) — the tenant's published reviews as a carousel:
|
|
651
|
+
* the same cards as `Reviews` (stars, text, author, date, «Ver en <fuente>»),
|
|
652
|
+
* on the package's scroll-snap track (`ProductCarousel`), so there is one
|
|
653
|
+
* carousel behaviour to keep accessible:
|
|
654
|
+
*
|
|
655
|
+
* - the track is a labelled, focusable region (`aria-roledescription`
|
|
656
|
+
* «carrusel»): swipe on touch, arrow keys once focused;
|
|
657
|
+
* - previous/next buttons (from `sm` up) with accessible names scroll one
|
|
658
|
+
* page; the one at the current end is disabled; none when everything fits;
|
|
659
|
+
* - NO autoplay, ever: nothing moves unless the visitor moves it;
|
|
660
|
+
* - instant scrolling under `prefers-reduced-motion: reduce`.
|
|
661
|
+
*
|
|
662
|
+
* Same data rules as `Reviews`: only checkable reviews render, and `null`,
|
|
663
|
+
* `[]` or nothing usable renders NOTHING. `notice` is the tenant's text on how
|
|
664
|
+
* its reviews are checked, shown below the track.
|
|
665
|
+
*
|
|
666
|
+
* A Client Component: import it from `@reblu/site-blocks/client`.
|
|
667
|
+
*/
|
|
668
|
+
interface ReviewsCarouselLabels extends ProductCarouselLabels {
|
|
669
|
+
}
|
|
670
|
+
declare const DEFAULT_REVIEWS_CAROUSEL_LABELS: ReviewsCarouselLabels;
|
|
671
|
+
interface ReviewsCarouselProps {
|
|
672
|
+
/** `client.reviews.list()`'s `data` as served — may be `null` / `undefined`. */
|
|
673
|
+
reviews: readonly Review[] | null | undefined;
|
|
674
|
+
/** Visible heading; it also names the carousel. */
|
|
675
|
+
heading?: string;
|
|
676
|
+
/** @default 2 */
|
|
677
|
+
headingLevel?: HeadingLevel;
|
|
678
|
+
/** The tenant's notice on how the reviews are checked. Omitted: no notice. */
|
|
679
|
+
notice?: ReactNode;
|
|
680
|
+
/** Link text for a review's original. @default (name) => `Ver en ${name}` */
|
|
681
|
+
linkLabel?: (sourceName: string) => string;
|
|
682
|
+
/** Visually hidden text appended to each link. */
|
|
683
|
+
newWindowLabel?: string;
|
|
684
|
+
/** Locale of the review date. @default 'es-ES' */
|
|
685
|
+
locale?: string;
|
|
686
|
+
labels?: Partial<ReviewsCarouselLabels>;
|
|
687
|
+
className?: string;
|
|
688
|
+
/** Classes for the section heading; they REPLACE the default typography (REB-997). */
|
|
689
|
+
headingClassName?: string;
|
|
690
|
+
/** Classes for each slide (`<li>`), e.g. a different card width. */
|
|
691
|
+
itemClassName?: string;
|
|
692
|
+
/** Classes for each card. */
|
|
693
|
+
cardClassName?: string;
|
|
694
|
+
/** Classes for the notice; they REPLACE the default typography. */
|
|
695
|
+
noticeClassName?: string;
|
|
696
|
+
}
|
|
697
|
+
declare function ReviewsCarousel({ reviews, heading, headingLevel, notice, linkLabel, newWindowLabel, locale, labels, className, headingClassName, itemClassName, cardClassName, noticeClassName, }: ReviewsCarouselProps): react_jsx_runtime.JSX.Element | null;
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* `FeaturedReviews` (REB-1272, owner 8-Nov) — the reviews a tenant featured
|
|
701
|
+
* for its home, in the layout it chose in nexus: `grid` renders the `Reviews`
|
|
702
|
+
* grid, `carousel` renders `ReviewsCarousel` (accessible, never autoplays).
|
|
703
|
+
* Feed it `client.reviews.featured()`'s `data` as served. An unknown layout (an
|
|
704
|
+
* API newer than this package) falls back to the grid, never to nothing.
|
|
705
|
+
*
|
|
706
|
+
* A Client Component (the carousel needs the browser): import it from
|
|
707
|
+
* `@reblu/site-blocks/client` and pass it the data from a Server Component.
|
|
708
|
+
*/
|
|
709
|
+
type FeaturedReviewsLayout = 'grid' | 'carousel';
|
|
710
|
+
interface FeaturedReviewsProps {
|
|
711
|
+
reviews: readonly Review[] | null | undefined;
|
|
712
|
+
layout: FeaturedReviewsLayout | null | undefined;
|
|
713
|
+
/** Section title; it also names the carousel. */
|
|
714
|
+
heading?: string;
|
|
715
|
+
/** @default 2 */
|
|
716
|
+
headingLevel?: HeadingLevel;
|
|
717
|
+
/** The tenant's notice on how the reviews are checked. Omitted: no notice. */
|
|
718
|
+
notice?: ReactNode;
|
|
719
|
+
/** Link text for a review's original. @default (name) => `Ver en ${name}` */
|
|
720
|
+
linkLabel?: (sourceName: string) => string;
|
|
721
|
+
/** Locale of the review date. @default 'es-ES' */
|
|
722
|
+
locale?: string;
|
|
723
|
+
/** Carousel labels (region, previous, next). */
|
|
724
|
+
carouselLabels?: Partial<ReviewsCarouselLabels>;
|
|
725
|
+
className?: string;
|
|
726
|
+
/** Classes for each card, in both layouts. */
|
|
727
|
+
cardClassName?: string;
|
|
728
|
+
/** Grid only: REPLACES the default columns. */
|
|
729
|
+
gridClassName?: string;
|
|
730
|
+
/** Carousel only: classes for each slide, e.g. a different card width. */
|
|
731
|
+
itemClassName?: string;
|
|
732
|
+
}
|
|
733
|
+
declare function FeaturedReviews({ reviews, layout, heading, headingLevel, notice, linkLabel, locale, carouselLabels, className, cardClassName, gridClassName, itemClassName, }: FeaturedReviewsProps): react_jsx_runtime.JSX.Element;
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* `ReviewsBlockRenderer` (REB-1272) — the «Reseñas» page block body with the
|
|
737
|
+
* layout the tenant chose: `carousel` renders `ReviewsCarousel`, anything else
|
|
738
|
+
* the `Reviews` grid. Pass it to `PageBlocks` as `components.reviews`; the
|
|
739
|
+
* section wrapper (heading, background, CTA) still comes from `PageBlocks`.
|
|
740
|
+
*
|
|
741
|
+
* Client entry only (`@reblu/site-blocks/client`): the carousel needs the
|
|
742
|
+
* browser, and the RSC-safe `PageBlocks` cannot import it.
|
|
743
|
+
*/
|
|
744
|
+
declare function ReviewsBlockRenderer({ block }: BlockRendererProps<'reviews'>): react_jsx_runtime.JSX.Element;
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* REB-1100 — `TeamDirectory`: the team listing with filter chips, one per page
|
|
748
|
+
* the members link to (their areas, picked in nexus), «Todos» first. Drop it
|
|
749
|
+
* in over `client.pages.list({ type: 'team' })`: each item's `links` feed the
|
|
750
|
+
* chips. Members from an API that predates `links` render as a plain listing
|
|
751
|
+
* with no chips. Client-only (the selected chip).
|
|
752
|
+
*/
|
|
753
|
+
interface TeamDirectoryMember {
|
|
754
|
+
slug: string;
|
|
755
|
+
title: string;
|
|
756
|
+
coverImageUrl?: string | null;
|
|
757
|
+
category?: {
|
|
758
|
+
name: string;
|
|
759
|
+
slug: string;
|
|
760
|
+
} | null;
|
|
761
|
+
professional?: {
|
|
762
|
+
role?: string | null;
|
|
763
|
+
} | null;
|
|
764
|
+
links?: PageLinkRef[] | null;
|
|
765
|
+
}
|
|
766
|
+
interface TeamDirectoryLabels {
|
|
767
|
+
/** The chip that shows every member. */
|
|
768
|
+
all: string;
|
|
769
|
+
/** Accessible name of the chip group. */
|
|
770
|
+
filter: string;
|
|
771
|
+
}
|
|
772
|
+
declare const DEFAULT_TEAM_DIRECTORY_LABELS: TeamDirectoryLabels;
|
|
773
|
+
interface TeamDirectoryProps<T extends TeamDirectoryMember = TeamDirectoryMember> {
|
|
774
|
+
members: T[];
|
|
775
|
+
/** Builds a member's profile href. A function cannot cross from a Server
|
|
776
|
+
* Component to this client one: there, use `memberHrefBase`. */
|
|
777
|
+
memberHref?: (member: T) => string;
|
|
778
|
+
/** `${memberHrefBase}/${slug}`, e.g. `'/equipo'`; `''` gives `/${slug}`.
|
|
779
|
+
* Ignored when `memberHref` is given. Omit both for non-linking cards. */
|
|
780
|
+
memberHrefBase?: string;
|
|
781
|
+
/** Also show each member's links as chips on their card. */
|
|
782
|
+
showLinksOnCards?: boolean;
|
|
783
|
+
labels?: Partial<TeamDirectoryLabels>;
|
|
784
|
+
className?: string;
|
|
785
|
+
}
|
|
786
|
+
declare function TeamDirectory<T extends TeamDirectoryMember>({ members, memberHref, memberHrefBase, showLinksOnCards, labels, className, }: TeamDirectoryProps<T>): react_jsx_runtime.JSX.Element | null;
|
|
787
|
+
|
|
788
|
+
export { AddToCartButton, type AddToCartButtonLabels, type AddToCartButtonProps, type AddToCartButtonStatus, CartIcon, type CartIconLabels, type CartIconProps, Collection, type CollectionFacet, type CollectionFacetOption, type CollectionFilter, type CollectionLabels, type CollectionProps, type CourseGuestCheckoutCopy, CourseGuestCheckoutForm, type CourseGuestCheckoutFormLabels, type CourseGuestCheckoutFormProps, type CourseGuestCheckoutInput, type CourseGuestCheckoutResult, CourseSyllabus, type CourseSyllabusLabels, type CourseSyllabusModule, type CourseSyllabusProps, DATA_REQUEST_FIELD_LIMITS, DEFAULT_COURSE_GUEST_CHECKOUT_ERROR_MESSAGES, DEFAULT_COURSE_GUEST_CHECKOUT_FORM_LABELS, DEFAULT_COURSE_SYLLABUS_LABELS, DEFAULT_DATA_REQUEST_FORM_LABELS, DEFAULT_PRODUCT_CAROUSEL_LABELS, DEFAULT_REVIEWS_CAROUSEL_LABELS, DEFAULT_TEAM_DIRECTORY_LABELS, DEFAULT_WITHDRAWAL_REQUEST_FORM_LABELS, DataRequestForm, type DataRequestFormLabels, type DataRequestFormProps, type DataRequestSubmitResult, FeaturedReviews, type FeaturedReviewsLayout, type FeaturedReviewsProps, ProductCarousel, type ProductCarouselCustomCardProps, type ProductCarouselDefaultCardProps, type ProductCarouselLabels, type ProductCarouselProps, ReviewsBlockRenderer, ReviewsCarousel, type ReviewsCarouselLabels, type ReviewsCarouselProps, ShareButtons, type ShareButtonsLabels, type ShareButtonsProps, TeamDirectory, type TeamDirectoryLabels, type TeamDirectoryMember, type TeamDirectoryProps, type UseCollectionOptions, type UseCollectionResult, WITHDRAWAL_REQUEST_FIELD_LIMITS, WithdrawalRequestForm, type WithdrawalRequestFormLabels, type WithdrawalRequestFormProps, type WithdrawalRequestSubmitResult, useCollection };
|
package/dist/client.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
import { ShopProductListItem, AcademyModulePublic, AcademyLessonPublic, DataRequestType, DataRequestInput, DataRequestSubmission, WithdrawalRequestInput, WithdrawalRequestSubmission, ShopCheckoutCopy, AcademyCourseDetail, AcademyCheckoutRequest, AcademyCheckoutSession, AcademyCheckoutErrorCode } from '@reblu/site-contracts';
|
|
4
|
+
import { ShopProductListItem, AcademyModulePublic, AcademyLessonPublic, DataRequestType, DataRequestInput, DataRequestSubmission, WithdrawalRequestInput, WithdrawalRequestSubmission, ShopCheckoutCopy, AcademyCourseDetail, AcademyCheckoutRequest, AcademyCheckoutSession, AcademyCheckoutErrorCode, Review } from '@reblu/site-contracts';
|
|
5
5
|
export { DATA_REQUEST_TYPES } from '@reblu/site-contracts';
|
|
6
|
-
import { H as HeadingLevel, C as CheckoutTermsCopy, F as FullInvoiceFieldsLabels } from './
|
|
6
|
+
import { H as HeadingLevel, C as CheckoutTermsCopy, F as FullInvoiceFieldsLabels, B as BlockRendererProps, P as PageLinkRef } from './page-links-C0nXQzAW.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* `useCollection` — the headless heart of `@reblu/site-blocks`.
|
|
@@ -646,4 +646,143 @@ interface CourseGuestCheckoutFormProps {
|
|
|
646
646
|
}
|
|
647
647
|
declare function CourseGuestCheckoutForm({ course, copy, termsHref, requestForm, issuesInvoices, simplifiedInvoiceCapCents, submit, endpoint, onRedirect, onError, labels, errorMessages, invoiceLabels, invoiceCountries, currencyCode, locale, className, }: CourseGuestCheckoutFormProps): react_jsx_runtime.JSX.Element;
|
|
648
648
|
|
|
649
|
-
|
|
649
|
+
/**
|
|
650
|
+
* `ReviewsCarousel` (REB-1272) — the tenant's published reviews as a carousel:
|
|
651
|
+
* the same cards as `Reviews` (stars, text, author, date, «Ver en <fuente>»),
|
|
652
|
+
* on the package's scroll-snap track (`ProductCarousel`), so there is one
|
|
653
|
+
* carousel behaviour to keep accessible:
|
|
654
|
+
*
|
|
655
|
+
* - the track is a labelled, focusable region (`aria-roledescription`
|
|
656
|
+
* «carrusel»): swipe on touch, arrow keys once focused;
|
|
657
|
+
* - previous/next buttons (from `sm` up) with accessible names scroll one
|
|
658
|
+
* page; the one at the current end is disabled; none when everything fits;
|
|
659
|
+
* - NO autoplay, ever: nothing moves unless the visitor moves it;
|
|
660
|
+
* - instant scrolling under `prefers-reduced-motion: reduce`.
|
|
661
|
+
*
|
|
662
|
+
* Same data rules as `Reviews`: only checkable reviews render, and `null`,
|
|
663
|
+
* `[]` or nothing usable renders NOTHING. `notice` is the tenant's text on how
|
|
664
|
+
* its reviews are checked, shown below the track.
|
|
665
|
+
*
|
|
666
|
+
* A Client Component: import it from `@reblu/site-blocks/client`.
|
|
667
|
+
*/
|
|
668
|
+
interface ReviewsCarouselLabels extends ProductCarouselLabels {
|
|
669
|
+
}
|
|
670
|
+
declare const DEFAULT_REVIEWS_CAROUSEL_LABELS: ReviewsCarouselLabels;
|
|
671
|
+
interface ReviewsCarouselProps {
|
|
672
|
+
/** `client.reviews.list()`'s `data` as served — may be `null` / `undefined`. */
|
|
673
|
+
reviews: readonly Review[] | null | undefined;
|
|
674
|
+
/** Visible heading; it also names the carousel. */
|
|
675
|
+
heading?: string;
|
|
676
|
+
/** @default 2 */
|
|
677
|
+
headingLevel?: HeadingLevel;
|
|
678
|
+
/** The tenant's notice on how the reviews are checked. Omitted: no notice. */
|
|
679
|
+
notice?: ReactNode;
|
|
680
|
+
/** Link text for a review's original. @default (name) => `Ver en ${name}` */
|
|
681
|
+
linkLabel?: (sourceName: string) => string;
|
|
682
|
+
/** Visually hidden text appended to each link. */
|
|
683
|
+
newWindowLabel?: string;
|
|
684
|
+
/** Locale of the review date. @default 'es-ES' */
|
|
685
|
+
locale?: string;
|
|
686
|
+
labels?: Partial<ReviewsCarouselLabels>;
|
|
687
|
+
className?: string;
|
|
688
|
+
/** Classes for the section heading; they REPLACE the default typography (REB-997). */
|
|
689
|
+
headingClassName?: string;
|
|
690
|
+
/** Classes for each slide (`<li>`), e.g. a different card width. */
|
|
691
|
+
itemClassName?: string;
|
|
692
|
+
/** Classes for each card. */
|
|
693
|
+
cardClassName?: string;
|
|
694
|
+
/** Classes for the notice; they REPLACE the default typography. */
|
|
695
|
+
noticeClassName?: string;
|
|
696
|
+
}
|
|
697
|
+
declare function ReviewsCarousel({ reviews, heading, headingLevel, notice, linkLabel, newWindowLabel, locale, labels, className, headingClassName, itemClassName, cardClassName, noticeClassName, }: ReviewsCarouselProps): react_jsx_runtime.JSX.Element | null;
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* `FeaturedReviews` (REB-1272, owner 8-Nov) — the reviews a tenant featured
|
|
701
|
+
* for its home, in the layout it chose in nexus: `grid` renders the `Reviews`
|
|
702
|
+
* grid, `carousel` renders `ReviewsCarousel` (accessible, never autoplays).
|
|
703
|
+
* Feed it `client.reviews.featured()`'s `data` as served. An unknown layout (an
|
|
704
|
+
* API newer than this package) falls back to the grid, never to nothing.
|
|
705
|
+
*
|
|
706
|
+
* A Client Component (the carousel needs the browser): import it from
|
|
707
|
+
* `@reblu/site-blocks/client` and pass it the data from a Server Component.
|
|
708
|
+
*/
|
|
709
|
+
type FeaturedReviewsLayout = 'grid' | 'carousel';
|
|
710
|
+
interface FeaturedReviewsProps {
|
|
711
|
+
reviews: readonly Review[] | null | undefined;
|
|
712
|
+
layout: FeaturedReviewsLayout | null | undefined;
|
|
713
|
+
/** Section title; it also names the carousel. */
|
|
714
|
+
heading?: string;
|
|
715
|
+
/** @default 2 */
|
|
716
|
+
headingLevel?: HeadingLevel;
|
|
717
|
+
/** The tenant's notice on how the reviews are checked. Omitted: no notice. */
|
|
718
|
+
notice?: ReactNode;
|
|
719
|
+
/** Link text for a review's original. @default (name) => `Ver en ${name}` */
|
|
720
|
+
linkLabel?: (sourceName: string) => string;
|
|
721
|
+
/** Locale of the review date. @default 'es-ES' */
|
|
722
|
+
locale?: string;
|
|
723
|
+
/** Carousel labels (region, previous, next). */
|
|
724
|
+
carouselLabels?: Partial<ReviewsCarouselLabels>;
|
|
725
|
+
className?: string;
|
|
726
|
+
/** Classes for each card, in both layouts. */
|
|
727
|
+
cardClassName?: string;
|
|
728
|
+
/** Grid only: REPLACES the default columns. */
|
|
729
|
+
gridClassName?: string;
|
|
730
|
+
/** Carousel only: classes for each slide, e.g. a different card width. */
|
|
731
|
+
itemClassName?: string;
|
|
732
|
+
}
|
|
733
|
+
declare function FeaturedReviews({ reviews, layout, heading, headingLevel, notice, linkLabel, locale, carouselLabels, className, cardClassName, gridClassName, itemClassName, }: FeaturedReviewsProps): react_jsx_runtime.JSX.Element;
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* `ReviewsBlockRenderer` (REB-1272) — the «Reseñas» page block body with the
|
|
737
|
+
* layout the tenant chose: `carousel` renders `ReviewsCarousel`, anything else
|
|
738
|
+
* the `Reviews` grid. Pass it to `PageBlocks` as `components.reviews`; the
|
|
739
|
+
* section wrapper (heading, background, CTA) still comes from `PageBlocks`.
|
|
740
|
+
*
|
|
741
|
+
* Client entry only (`@reblu/site-blocks/client`): the carousel needs the
|
|
742
|
+
* browser, and the RSC-safe `PageBlocks` cannot import it.
|
|
743
|
+
*/
|
|
744
|
+
declare function ReviewsBlockRenderer({ block }: BlockRendererProps<'reviews'>): react_jsx_runtime.JSX.Element;
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* REB-1100 — `TeamDirectory`: the team listing with filter chips, one per page
|
|
748
|
+
* the members link to (their areas, picked in nexus), «Todos» first. Drop it
|
|
749
|
+
* in over `client.pages.list({ type: 'team' })`: each item's `links` feed the
|
|
750
|
+
* chips. Members from an API that predates `links` render as a plain listing
|
|
751
|
+
* with no chips. Client-only (the selected chip).
|
|
752
|
+
*/
|
|
753
|
+
interface TeamDirectoryMember {
|
|
754
|
+
slug: string;
|
|
755
|
+
title: string;
|
|
756
|
+
coverImageUrl?: string | null;
|
|
757
|
+
category?: {
|
|
758
|
+
name: string;
|
|
759
|
+
slug: string;
|
|
760
|
+
} | null;
|
|
761
|
+
professional?: {
|
|
762
|
+
role?: string | null;
|
|
763
|
+
} | null;
|
|
764
|
+
links?: PageLinkRef[] | null;
|
|
765
|
+
}
|
|
766
|
+
interface TeamDirectoryLabels {
|
|
767
|
+
/** The chip that shows every member. */
|
|
768
|
+
all: string;
|
|
769
|
+
/** Accessible name of the chip group. */
|
|
770
|
+
filter: string;
|
|
771
|
+
}
|
|
772
|
+
declare const DEFAULT_TEAM_DIRECTORY_LABELS: TeamDirectoryLabels;
|
|
773
|
+
interface TeamDirectoryProps<T extends TeamDirectoryMember = TeamDirectoryMember> {
|
|
774
|
+
members: T[];
|
|
775
|
+
/** Builds a member's profile href. A function cannot cross from a Server
|
|
776
|
+
* Component to this client one: there, use `memberHrefBase`. */
|
|
777
|
+
memberHref?: (member: T) => string;
|
|
778
|
+
/** `${memberHrefBase}/${slug}`, e.g. `'/equipo'`; `''` gives `/${slug}`.
|
|
779
|
+
* Ignored when `memberHref` is given. Omit both for non-linking cards. */
|
|
780
|
+
memberHrefBase?: string;
|
|
781
|
+
/** Also show each member's links as chips on their card. */
|
|
782
|
+
showLinksOnCards?: boolean;
|
|
783
|
+
labels?: Partial<TeamDirectoryLabels>;
|
|
784
|
+
className?: string;
|
|
785
|
+
}
|
|
786
|
+
declare function TeamDirectory<T extends TeamDirectoryMember>({ members, memberHref, memberHrefBase, showLinksOnCards, labels, className, }: TeamDirectoryProps<T>): react_jsx_runtime.JSX.Element | null;
|
|
787
|
+
|
|
788
|
+
export { AddToCartButton, type AddToCartButtonLabels, type AddToCartButtonProps, type AddToCartButtonStatus, CartIcon, type CartIconLabels, type CartIconProps, Collection, type CollectionFacet, type CollectionFacetOption, type CollectionFilter, type CollectionLabels, type CollectionProps, type CourseGuestCheckoutCopy, CourseGuestCheckoutForm, type CourseGuestCheckoutFormLabels, type CourseGuestCheckoutFormProps, type CourseGuestCheckoutInput, type CourseGuestCheckoutResult, CourseSyllabus, type CourseSyllabusLabels, type CourseSyllabusModule, type CourseSyllabusProps, DATA_REQUEST_FIELD_LIMITS, DEFAULT_COURSE_GUEST_CHECKOUT_ERROR_MESSAGES, DEFAULT_COURSE_GUEST_CHECKOUT_FORM_LABELS, DEFAULT_COURSE_SYLLABUS_LABELS, DEFAULT_DATA_REQUEST_FORM_LABELS, DEFAULT_PRODUCT_CAROUSEL_LABELS, DEFAULT_REVIEWS_CAROUSEL_LABELS, DEFAULT_TEAM_DIRECTORY_LABELS, DEFAULT_WITHDRAWAL_REQUEST_FORM_LABELS, DataRequestForm, type DataRequestFormLabels, type DataRequestFormProps, type DataRequestSubmitResult, FeaturedReviews, type FeaturedReviewsLayout, type FeaturedReviewsProps, ProductCarousel, type ProductCarouselCustomCardProps, type ProductCarouselDefaultCardProps, type ProductCarouselLabels, type ProductCarouselProps, ReviewsBlockRenderer, ReviewsCarousel, type ReviewsCarouselLabels, type ReviewsCarouselProps, ShareButtons, type ShareButtonsLabels, type ShareButtonsProps, TeamDirectory, type TeamDirectoryLabels, type TeamDirectoryMember, type TeamDirectoryProps, type UseCollectionOptions, type UseCollectionResult, WITHDRAWAL_REQUEST_FIELD_LIMITS, WithdrawalRequestForm, type WithdrawalRequestFormLabels, type WithdrawalRequestFormProps, type WithdrawalRequestSubmitResult, useCollection };
|