@alfadocs/ui-kit 0.25.2 → 0.30.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/dist/_chunks/booking-BYuc_8HV.js +2250 -0
- package/dist/_chunks/{calendar-9eOXumpH.js → calendar-WWNx448i.js} +10 -9
- package/dist/_chunks/{contact-card-CeEfEAxh.js → contact-card-DYbp--s-.js} +2 -2
- package/dist/_chunks/{header-B8V_sNPy.js → header-CkMb1TZS.js} +23 -23
- package/dist/_chunks/heart-pulse-CvuyFKHB.js +21 -0
- package/dist/_chunks/{link-DmM5IevO.js → link-DrD_cRUg.js} +50 -45
- package/dist/_chunks/parseISO-Dk4xa7q6.js +120 -0
- package/dist/_chunks/patient-search-BhlxYAI3.js +1102 -0
- package/dist/_chunks/{patient-shell-Bq8CjRYF.js → patient-shell-CAXYzbRw.js} +2 -2
- package/dist/_chunks/public-footer.agent-CA29gxHJ.js +516 -0
- package/dist/_chunks/reviews-panel-CFttsfuC.js +513 -0
- package/dist/_chunks/slot-grid-B2zprPcv.js +387 -0
- package/dist/_chunks/stethoscope-DT5qCW8Y.js +18 -0
- package/dist/agent-catalog.json +117 -22
- package/dist/components/booking/booking-types.d.ts +145 -0
- package/dist/components/booking/booking.agent.d.ts +1 -1
- package/dist/components/booking/booking.d.ts +4 -89
- package/dist/components/booking/cascade.d.ts +96 -0
- package/dist/components/booking/details-form.d.ts +32 -0
- package/dist/components/booking/index.d.ts +2 -1
- package/dist/components/booking/index.js +5 -3
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/checkbox/checkbox.d.ts +6 -2
- package/dist/components/contact-card/index.js +1 -1
- package/dist/components/header/index.js +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/link/index.js +1 -1
- package/dist/components/link/link.d.ts +7 -0
- package/dist/components/patient-search/index.d.ts +4 -0
- package/dist/components/patient-search/index.js +6 -0
- package/dist/components/patient-search/patient-search.agent.d.ts +4 -0
- package/dist/components/patient-search/patient-search.d.ts +103 -0
- package/dist/components/public-footer/index.d.ts +6 -0
- package/dist/components/public-footer/index.js +10 -0
- package/dist/components/public-footer/legal-urls.d.ts +18 -0
- package/dist/components/public-footer/public-footer.agent.d.ts +4 -0
- package/dist/components/public-footer/public-footer.d.ts +51 -0
- package/dist/components/public-footer/socials.d.ts +9 -0
- package/dist/components/reviews-panel/index.d.ts +4 -0
- package/dist/components/reviews-panel/index.js +6 -0
- package/dist/components/reviews-panel/reviews-panel.agent.d.ts +4 -0
- package/dist/components/reviews-panel/reviews-panel.d.ts +76 -0
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/i18n/config.js +3866 -36
- package/dist/i18n/locales/ar.d.ts +214 -0
- package/dist/i18n/locales/de.d.ts +214 -0
- package/dist/i18n/locales/el.d.ts +214 -0
- package/dist/i18n/locales/es.d.ts +214 -0
- package/dist/i18n/locales/fr.d.ts +214 -0
- package/dist/i18n/locales/hi.d.ts +214 -0
- package/dist/i18n/locales/ja.d.ts +214 -0
- package/dist/i18n/locales/nl.d.ts +214 -0
- package/dist/i18n/locales/pl.d.ts +214 -0
- package/dist/i18n/locales/pt.d.ts +214 -0
- package/dist/i18n/locales/ro.d.ts +214 -0
- package/dist/i18n/locales/ru.d.ts +214 -0
- package/dist/i18n/locales/sq.d.ts +214 -0
- package/dist/i18n/locales/sv.d.ts +214 -0
- package/dist/i18n/locales/tr.d.ts +214 -0
- package/dist/i18n/locales/zh.d.ts +214 -0
- package/dist/i18n/resources.d.ts +428 -0
- package/dist/index.js +351 -336
- package/dist/locales/ar.json +215 -1
- package/dist/locales/de.json +215 -1
- package/dist/locales/el.json +215 -1
- package/dist/locales/en.json +215 -1
- package/dist/locales/es.json +215 -1
- package/dist/locales/fr.json +215 -1
- package/dist/locales/hi.json +215 -1
- package/dist/locales/it.json +215 -1
- package/dist/locales/ja.json +215 -1
- package/dist/locales/nl.json +215 -1
- package/dist/locales/pl.json +215 -1
- package/dist/locales/pt.json +215 -1
- package/dist/locales/ro.json +215 -1
- package/dist/locales/ru.json +215 -1
- package/dist/locales/sq.json +215 -1
- package/dist/locales/sv.json +215 -1
- package/dist/locales/tr.json +215 -1
- package/dist/locales/zh.json +215 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +13 -1
- package/dist/_chunks/booking-CXngC-1u.js +0 -1743
- package/dist/_chunks/slot-grid-DoodeQGZ.js +0 -502
- package/dist/_chunks/stethoscope-B8kpbtjh.js +0 -35
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { type LegalUrlOverrides, type ResolvedLegalUrls } from './legal-urls';
|
|
4
|
+
import { type SocialNetwork } from './socials';
|
|
5
|
+
declare const rootVariants: (props?: ({
|
|
6
|
+
variant?: "compact" | "full" | "minimal" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export type PublicFooterVariant = NonNullable<VariantProps<typeof rootVariants>['variant']>;
|
|
9
|
+
export interface PublicFooterLink {
|
|
10
|
+
href: string;
|
|
11
|
+
label: string;
|
|
12
|
+
/** When true, link opens in a new tab with the localised aria-label suffix. */
|
|
13
|
+
external?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface PublicFooterLinkGroup {
|
|
16
|
+
/** Stable key — used to look up the column heading via `t('ui.footer.group.<key>')`. */
|
|
17
|
+
key: 'product' | 'resources' | 'company' | 'legal' | (string & {});
|
|
18
|
+
links: PublicFooterLink[];
|
|
19
|
+
}
|
|
20
|
+
export interface PublicFooterSocial {
|
|
21
|
+
network: SocialNetwork;
|
|
22
|
+
/** Override the kit's default URL. */
|
|
23
|
+
href?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface PublicFooterProps {
|
|
26
|
+
variant: PublicFooterVariant;
|
|
27
|
+
/** Origin for legally-required URLs. Default: 'https://www.alfadocs.com'. */
|
|
28
|
+
marketingBaseUrl?: string;
|
|
29
|
+
/** Override individual legal-link slugs per locale. Rare. */
|
|
30
|
+
legalUrlOverrides?: LegalUrlOverrides;
|
|
31
|
+
/** `full` variant: consumer-supplied link columns. Legal column is always rendered. */
|
|
32
|
+
linkGroups?: PublicFooterLinkGroup[];
|
|
33
|
+
/** `full` variant: subset of social networks. Default: all four. Pass `[]` to hide the row. */
|
|
34
|
+
socials?: PublicFooterSocial[];
|
|
35
|
+
/** `full` variant: custom logo node. Default: kit's wordmark Logo. */
|
|
36
|
+
logoSlot?: ReactNode;
|
|
37
|
+
/** Extra surface-specific links — appended after the standard nav row in compact + full. Ignored by minimal. */
|
|
38
|
+
extraNavSlot?: ReactNode;
|
|
39
|
+
/** Trust badges (HIPAA, ISO). Rendered at the start of `minimal`'s row, or in the bottom strip of `full`. */
|
|
40
|
+
trustBadgesSlot?: ReactNode;
|
|
41
|
+
'aria-label'?: string;
|
|
42
|
+
id?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface PublicFooterHandle {
|
|
45
|
+
getVariant: () => PublicFooterVariant;
|
|
46
|
+
/** Resolved legal URLs for the current locale + marketingBaseUrl + overrides. */
|
|
47
|
+
getLegalUrls: () => ResolvedLegalUrls;
|
|
48
|
+
}
|
|
49
|
+
export declare const PublicFooter: import("react").ForwardRefExoticComponent<PublicFooterProps & import("react").RefAttributes<PublicFooterHandle>>;
|
|
50
|
+
export {};
|
|
51
|
+
//# sourceMappingURL=public-footer.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ComponentType, SVGProps } from 'react';
|
|
2
|
+
export declare const SOCIAL_NETWORKS: readonly ["linkedin", "youtube", "instagram", "facebook"];
|
|
3
|
+
export type SocialNetwork = (typeof SOCIAL_NETWORKS)[number];
|
|
4
|
+
export declare const DEFAULT_SOCIAL_URLS: Record<SocialNetwork, string>;
|
|
5
|
+
type IconProps = SVGProps<SVGSVGElement>;
|
|
6
|
+
type SocialIcon = ComponentType<IconProps>;
|
|
7
|
+
export declare const SOCIAL_ICONS: Record<SocialNetwork, SocialIcon>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=socials.d.ts.map
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
2
|
+
export interface ReviewItem {
|
|
3
|
+
id: string;
|
|
4
|
+
/** When the review was authored (ISO 8601). */
|
|
5
|
+
authoredAt: string;
|
|
6
|
+
/** Anonymised author display ("Marco T.", "Anna_M"). Falls back to a localised "Anonymous". */
|
|
7
|
+
pseudonym?: string;
|
|
8
|
+
/** 0..max — drives the visible star summary on the compact card. */
|
|
9
|
+
overallScore: number;
|
|
10
|
+
/** Short free-text comment shown on the compact card. */
|
|
11
|
+
comment?: string;
|
|
12
|
+
/** Practice reply (revealed in the expanded panel only). */
|
|
13
|
+
reply?: string;
|
|
14
|
+
/** Optional per-axis breakdown — when present, the card grows an
|
|
15
|
+
* "Expand" affordance that reveals these in a DescriptionList. */
|
|
16
|
+
breakdown?: {
|
|
17
|
+
appointmentScore?: number;
|
|
18
|
+
communicationScore?: number;
|
|
19
|
+
staffScore?: number;
|
|
20
|
+
overallScore?: number;
|
|
21
|
+
};
|
|
22
|
+
/** Optional categorical follow-ups, surfaced inside the breakdown. */
|
|
23
|
+
futureVisit?: 'yes' | 'no' | 'unsure';
|
|
24
|
+
recommendation?: 'yes' | 'no' | 'unsure';
|
|
25
|
+
}
|
|
26
|
+
export interface ReviewsAggregate {
|
|
27
|
+
/** Total review count across all star buckets (may exceed the loaded set when paginated). */
|
|
28
|
+
count: number;
|
|
29
|
+
/** Average score across the full population (drives the header `Rating`). */
|
|
30
|
+
averageScore: number;
|
|
31
|
+
/**
|
|
32
|
+
* Optional histogram — per-bucket count keyed by integer star value 1..5.
|
|
33
|
+
* When omitted, the panel derives buckets from the loaded `reviews` array
|
|
34
|
+
* (best-effort: paginated consumers SHOULD provide this explicitly).
|
|
35
|
+
*/
|
|
36
|
+
histogram?: Record<1 | 2 | 3 | 4 | 5, number>;
|
|
37
|
+
}
|
|
38
|
+
export type ReviewFilter = 'all' | 1 | 2 | 3 | 4 | 5;
|
|
39
|
+
export interface ReviewsPanelHandle {
|
|
40
|
+
getFilter: () => ReviewFilter;
|
|
41
|
+
setFilter: (next: ReviewFilter) => void;
|
|
42
|
+
/** Total visible after filter is applied. */
|
|
43
|
+
getVisibleCount: () => number;
|
|
44
|
+
}
|
|
45
|
+
export interface ReviewsPanelProps extends Omit<ComponentPropsWithoutRef<'section'>, 'aria-label' | 'children'> {
|
|
46
|
+
reviews: ReviewItem[];
|
|
47
|
+
aggregate: ReviewsAggregate;
|
|
48
|
+
/**
|
|
49
|
+
* Active star filter. Controlled — consumer owns it for shareability via
|
|
50
|
+
* URL query strings. Omit for uncontrolled (panel-managed) filtering.
|
|
51
|
+
*/
|
|
52
|
+
filter?: ReviewFilter;
|
|
53
|
+
onFilterChange?: (next: ReviewFilter) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Optional intro callout shown above the list (e.g. "Riepilogo delle
|
|
56
|
+
* opinioni — i pazienti raccontano…"). Render-prop slot so the consumer
|
|
57
|
+
* can drop in `<Alert>` / `<Callout>` / plain `<p>`.
|
|
58
|
+
*/
|
|
59
|
+
introSlot?: ReactNode;
|
|
60
|
+
/** Optional header right-end action (e.g. a "Leave a review" button). */
|
|
61
|
+
headerActionSlot?: ReactNode;
|
|
62
|
+
/** Override the default region aria-label. */
|
|
63
|
+
'aria-label'?: string;
|
|
64
|
+
/** Agent-readiness id. */
|
|
65
|
+
id?: string;
|
|
66
|
+
className?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Hide the filter sidebar — useful when the panel mounts under ~640px
|
|
69
|
+
* width or inside a narrow column. Defaults to false.
|
|
70
|
+
*/
|
|
71
|
+
hideFilter?: boolean;
|
|
72
|
+
/** Render skeletons for the header and the list. */
|
|
73
|
+
loading?: boolean;
|
|
74
|
+
}
|
|
75
|
+
export declare const ReviewsPanel: import("react").ForwardRefExoticComponent<ReviewsPanelProps & import("react").RefAttributes<HTMLElement>>;
|
|
76
|
+
//# sourceMappingURL=reviews-panel.d.ts.map
|