@alfadocs/ui-kit 0.42.0 → 0.44.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/{ar-Cn_NxqkN.js → ar-DEz65ZJW.js} +2 -2
- package/dist/_chunks/bmi-calculator-DFPWL2OJ.js +273 -0
- package/dist/_chunks/{booking-4mCw3Mpl.js → booking-CtLwaxkK.js} +4 -4
- package/dist/_chunks/{calculator-dialog-B74fqpFZ.js → calculator-dialog-D-nfvteH.js} +2 -2
- package/dist/_chunks/{chart-Cbt0_sKv.js → chart-Cg3e9EH9.js} +101 -99
- package/dist/_chunks/{cycle-calculator-DsZbyzX6.js → cycle-calculator-ChHBcjet.js} +65 -56
- package/dist/_chunks/{date-picker-CvQfs6Xh.js → date-picker-Bq7xhMA-.js} +109 -108
- package/dist/_chunks/date-picker-variants-DLi1Va_e.js +3238 -0
- package/dist/_chunks/{date-range-picker-U9fn1g9d.js → date-range-picker-DcXuI9y7.js} +20 -19
- package/dist/_chunks/{date-time-picker-Cva0ZCWw.js → date-time-picker-RimumeLR.js} +18 -17
- package/dist/_chunks/{de-BMM2H7Bs.js → de-bTBGdjPS.js} +2 -2
- package/dist/_chunks/dialog-BTpZV6It.js +223 -0
- package/dist/_chunks/{due-date-calculator-s_CBgaFs.js → due-date-calculator-CYXKLoof.js} +65 -45
- package/dist/_chunks/{editable-currency-cell-renderer-BhUkRiPZ.js → editable-currency-cell-renderer-9jqwDv5x.js} +2 -2
- package/dist/_chunks/{el-BYPonAaK.js → el-BWG5RXxa.js} +6 -6
- package/dist/_chunks/{es-CMkVCQ4F.js → es-DfO_G435.js} +2 -2
- package/dist/_chunks/{fr-BcuWxqft.js → fr-BTn24bs8.js} +2 -2
- package/dist/_chunks/{gestation-BXEgDGmP.js → gestation-mWF4AXea.js} +3 -3
- package/dist/_chunks/gestational-age-calculator-sRmoqgVr.js +190 -0
- package/dist/_chunks/{header-CTZWX-tm.js → header-Ce1Br27u.js} +70 -75
- package/dist/_chunks/{hi-wkq_rQAh.js → hi-Dj3oYd84.js} +2 -2
- package/dist/_chunks/insert-result-CoC1oo6R.js +334 -0
- package/dist/_chunks/{isSameWeek-Bim5ftRd.js → isSameWeek-HfxKk6Lz.js} +2 -2
- package/dist/_chunks/{it-GiQrQ9p4.js → it-Y85ofIQQ.js} +7 -7
- package/dist/_chunks/{ja-qfYg3Rua.js → ja-CQ7J6YoA.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-kVAVycz_.js → marketplace-app-shell-Dc5cTIt8.js} +186 -149
- package/dist/_chunks/{nl-xOogO4sZ.js → nl-D9kHCmp3.js} +2 -2
- package/dist/_chunks/{patient-shell-lDX3wwu6.js → patient-shell-CnT4L8gn.js} +2 -2
- package/dist/_chunks/{pl-GnOW6eGK.js → pl-B3Smqpkr.js} +3 -3
- package/dist/_chunks/{pregnancy-weight-gain-B7kBK-ZR.js → pregnancy-weight-gain-C5YhfYnL.js} +60 -50
- package/dist/_chunks/{pt-_bV5b5RW.js → pt-D3J-1c_7.js} +6 -6
- package/dist/_chunks/{ro-BEcyh5Nj.js → ro-BKAbbEA3.js} +2 -2
- package/dist/_chunks/{ru-Bi86hqMf.js → ru-BeG8f0Ep.js} +3 -3
- package/dist/_chunks/{sign-document-QHfcNKFj.js → sign-document-B-3k_0LO.js} +165 -137
- package/dist/_chunks/{sq-BujHSAWu.js → sq-_hRPaeUy.js} +6 -6
- package/dist/_chunks/subDays-Dv7q9S7u.js +8 -0
- package/dist/_chunks/{sv-C8AeDrTA.js → sv-g009fSpe.js} +2 -2
- package/dist/_chunks/{tab-bar-C4II-7ej.js → tab-bar-Xetknddo.js} +53 -34
- package/dist/_chunks/{tr-CMSs_Vgf.js → tr-OKUOuhMW.js} +2 -2
- package/dist/_chunks/{unit-converter-D1UrEUxa.js → unit-converter-Ds9jalbN.js} +78 -67
- package/dist/_chunks/{zh-CN-eXB-PFu4.js → zh-CN-De4zwEhx.js} +3 -3
- package/dist/agent-catalog.json +1 -1
- package/dist/components/_shared/calendar-class-names.d.ts +8 -0
- package/dist/components/_shared/index.d.ts +2 -0
- package/dist/components/_shared/insert-result.d.ts +149 -4
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/bmi-calculator/bmi-calculator.d.ts +6 -0
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/chart/chart.d.ts +10 -0
- package/dist/components/chart/index.js +1 -1
- package/dist/components/cycle-calculator/cycle-calculator.d.ts +6 -0
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/date-picker.d.ts +0 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts +0 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/date-time-picker.d.ts +0 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/dialog/dialog.d.ts +1 -0
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +6 -0
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +6 -0
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/header/header.d.ts +8 -0
- package/dist/components/header/index.js +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +6 -0
- package/dist/components/public-header/public-header.d.ts +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/sign-document/sign-document.d.ts +12 -0
- package/dist/components/stat/stat.d.ts +1 -1
- package/dist/components/tab-bar/index.d.ts +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tab-bar/tab-bar.d.ts +44 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/unit-converter/unit-converter.d.ts +6 -0
- package/dist/index.js +504 -502
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +57 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1411 -2
- package/package.json +1 -1
- package/dist/_chunks/bmi-calculator-D4juUcyF.js +0 -219
- package/dist/_chunks/dialog-Cee13rHU.js +0 -215
- package/dist/_chunks/gestational-age-calculator-CWOG3bkI.js +0 -178
- package/dist/_chunks/insert-result-DtQQeSSf.js +0 -227
- package/dist/_chunks/react-day-picker-CdtIiKjx.js +0 -3174
- package/dist/_chunks/subDays-_T9YeKPX.js +0 -8
|
@@ -36,6 +36,7 @@ export declare const Dialog: {
|
|
|
36
36
|
Header: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
37
37
|
Title: import("react").ForwardRefExoticComponent<Omit<RadixDialog.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
38
38
|
Description: import("react").ForwardRefExoticComponent<Omit<RadixDialog.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
39
|
+
Body: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
39
40
|
Footer: import("react").ForwardRefExoticComponent<DialogFooterProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
40
41
|
Close: import("react").ForwardRefExoticComponent<Omit<RadixDialog.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
41
42
|
};
|
|
@@ -21,6 +21,12 @@ export interface DueDateCalculatorProps extends VariantProps<typeof rootVariants
|
|
|
21
21
|
onCopy?: (mode: InsertMode) => void;
|
|
22
22
|
/** `copy` variant only — fired if the clipboard write can't proceed. */
|
|
23
23
|
onError?: (error: unknown) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Brand wordmark printed in the inserted/copied result-card footer.
|
|
26
|
+
* Omitted → the default `'AlfaDocs'` wordmark; a string overrides it;
|
|
27
|
+
* `false` removes the brand line.
|
|
28
|
+
*/
|
|
29
|
+
insertBrand?: string | false;
|
|
24
30
|
/** Opaque instance id, emitted as `data-component-id`. */
|
|
25
31
|
id?: string;
|
|
26
32
|
/** Extra class names on the wrapper. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as s } from "../../_chunks/due-date-calculator-
|
|
2
|
-
import { D as E, G as o, M as D, T as r, c as T, g as _, t as C } from "../../_chunks/gestation-
|
|
1
|
+
import { D as s } from "../../_chunks/due-date-calculator-CYXKLoof.js";
|
|
2
|
+
import { D as E, G as o, M as D, T as r, c as T, g as _, t as C } from "../../_chunks/gestation-mWF4AXea.js";
|
|
3
3
|
export {
|
|
4
4
|
E as DEFAULT_CYCLE_LENGTH,
|
|
5
5
|
s as DueDateCalculator,
|
|
@@ -27,6 +27,12 @@ export interface GestationalAgeCalculatorProps extends VariantProps<typeof rootV
|
|
|
27
27
|
onCopy?: (mode: InsertMode) => void;
|
|
28
28
|
/** `copy` variant only — fired if the clipboard write can't proceed. */
|
|
29
29
|
onError?: (error: unknown) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Brand wordmark printed in the inserted/copied result-card footer.
|
|
32
|
+
* Omitted → the default `'AlfaDocs'` wordmark; a string overrides it;
|
|
33
|
+
* `false` removes the brand line.
|
|
34
|
+
*/
|
|
35
|
+
insertBrand?: string | false;
|
|
30
36
|
/** Opaque instance id, emitted as `data-component-id`. */
|
|
31
37
|
id?: string;
|
|
32
38
|
/** Extra class names on the wrapper. */
|
|
@@ -21,6 +21,14 @@ export interface HeaderBrandProps extends Omit<AnchorHTMLAttributes<HTMLAnchorEl
|
|
|
21
21
|
children?: ReactNode;
|
|
22
22
|
/** Destination href. Defaults to "/". */
|
|
23
23
|
href?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Render through Radix `Slot` so a consumer's router link (`<Link>`) takes
|
|
26
|
+
* over the brand anchor while keeping the kit's `brandVariants` styling and
|
|
27
|
+
* any forwarded `aria-label`. Pass a single link element as `children` (the
|
|
28
|
+
* logo + wordmark go inside it). With `asChild` off the output is the plain
|
|
29
|
+
* `<a href>` exactly as before.
|
|
30
|
+
*/
|
|
31
|
+
asChild?: boolean;
|
|
24
32
|
}
|
|
25
33
|
export declare const HeaderBrand: import("react").ForwardRefExoticComponent<HeaderBrandProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
26
34
|
export declare function HeaderBrandDivider({ className, ...props }: HTMLAttributes<HTMLSpanElement>): ReactNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as r, a as d, b as H, c as s, d as n, e as t, f as i, g as o } from "../../_chunks/header-
|
|
1
|
+
import { H as r, a as d, b as H, c as s, d as n, e as t, f as i, g as o } from "../../_chunks/header-Ce1Br27u.js";
|
|
2
2
|
export {
|
|
3
3
|
r as Header,
|
|
4
4
|
d as HeaderBrand,
|
|
@@ -39,7 +39,7 @@ export * from './switch';
|
|
|
39
39
|
export * from './text-area';
|
|
40
40
|
export * from './text-input';
|
|
41
41
|
export * from './time-picker';
|
|
42
|
-
export { InsertButton, type InsertButtonProps, type InsertVariant, type InsertPayload, type InsertMode, type InsertCardData, type InsertCardField, } from './_shared/insert-result';
|
|
42
|
+
export { InsertButton, svgCardToPngDataUri, svgCardToPng, type InsertButtonProps, type InsertVariant, type InsertPayload, type InsertPngResult, type InsertMode, type InsertCardData, type InsertCardField, type InsertCardGauge, type SvgCardToPngOptions, } from './_shared/insert-result';
|
|
43
43
|
export * from './accordion';
|
|
44
44
|
export * from './avatar';
|
|
45
45
|
export * from './badge';
|
|
@@ -19,6 +19,12 @@ export interface PregnancyWeightGainProps extends VariantProps<typeof rootVarian
|
|
|
19
19
|
onCopy?: (mode: InsertMode) => void;
|
|
20
20
|
/** `copy` variant only — fired if the clipboard write can't proceed. */
|
|
21
21
|
onError?: (error: unknown) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Brand wordmark printed in the inserted/copied result-card footer.
|
|
24
|
+
* Omitted → the default `'AlfaDocs'` wordmark; a string overrides it;
|
|
25
|
+
* `false` removes the brand line.
|
|
26
|
+
*/
|
|
27
|
+
insertBrand?: string | false;
|
|
22
28
|
/** Opaque instance id, emitted as `data-component-id`. */
|
|
23
29
|
id?: string;
|
|
24
30
|
/** Extra class names on the wrapper. */
|
|
@@ -65,7 +65,7 @@ export interface PublicHeaderDropdownLinkProps extends Omit<AnchorHTMLAttributes
|
|
|
65
65
|
children: ReactNode;
|
|
66
66
|
}
|
|
67
67
|
declare const rootVariants: (props?: ({
|
|
68
|
-
variant?: "dark" | "
|
|
68
|
+
variant?: "dark" | "transparent" | "pill" | null | undefined;
|
|
69
69
|
sticky?: "none" | "top" | "scroll-up" | null | undefined;
|
|
70
70
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
71
71
|
export declare const PublicHeader: import("react").ForwardRefExoticComponent<PublicHeaderProps & import("react").RefAttributes<HTMLElement>> & {
|
|
@@ -23,6 +23,18 @@ export interface SignDocumentProps {
|
|
|
23
23
|
* that surface signed status. `null` / `undefined` → unsigned.
|
|
24
24
|
*/
|
|
25
25
|
signedAt?: string | null;
|
|
26
|
+
/**
|
|
27
|
+
* Optional on-behalf attribution. When both `signer` and `subject` are
|
|
28
|
+
* given, a "Signed by {signer} on behalf of {subject}" note renders both
|
|
29
|
+
* near the signature pad (so the signer sees who they're signing for) AND
|
|
30
|
+
* inside the already-signed read-only banner. Omit (the default) and
|
|
31
|
+
* nothing extra renders — the existing subject-agnostic API is unchanged.
|
|
32
|
+
* Provide both to opt in; a lone `signer` or `subject` renders nothing.
|
|
33
|
+
*/
|
|
34
|
+
signedByNote?: {
|
|
35
|
+
signer: string;
|
|
36
|
+
subject: string;
|
|
37
|
+
};
|
|
26
38
|
/** Disable all controls (document still readable). */
|
|
27
39
|
disabled?: boolean;
|
|
28
40
|
/** Render read-only: the document is shown but the pad is suppressed. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const statVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "compact" | "
|
|
4
|
+
variant?: "default" | "compact" | "outlined" | "elevated" | null | undefined;
|
|
5
5
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
6
6
|
align?: "center" | "end" | "start" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -20,8 +20,16 @@
|
|
|
20
20
|
* otherwise (in-app view switching via `onSelect`). Use it as a header (top,
|
|
21
21
|
* default) for section navigation; `position="bottom"` floats it from the
|
|
22
22
|
* bottom edge for a footer.
|
|
23
|
+
*
|
|
24
|
+
* SPA / consumer-router links: pass `renderLink` and TabBar hands each `href`
|
|
25
|
+
* tab off to your router's `<Link>` instead of rendering its own `<a>` — the
|
|
26
|
+
* embedded MarketplaceAppShell strip uses this so a tab click is a client-side
|
|
27
|
+
* route change, not a full page navigation. The kit forwards the same
|
|
28
|
+
* `className` + `aria-current` so the accent-underline active styling and the
|
|
29
|
+
* `aria-current="page"` marker survive in both modes. With `renderLink`
|
|
30
|
+
* omitted the output is the plain `<a href>` exactly as before.
|
|
23
31
|
*/
|
|
24
|
-
import { type ReactNode } from 'react';
|
|
32
|
+
import { type MouseEvent, type ReactNode } from 'react';
|
|
25
33
|
export interface TabBarItem {
|
|
26
34
|
/** Stable id; also the value handed to `onSelect` for button tabs. */
|
|
27
35
|
id: string;
|
|
@@ -35,6 +43,30 @@ export interface TabBarItem {
|
|
|
35
43
|
isActive?: boolean;
|
|
36
44
|
/** When set, the tab renders as a link to this href; otherwise it's a button. */
|
|
37
45
|
href?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Optional click handler threaded onto the link tab's `<a>` (or, when
|
|
48
|
+
* `renderLink` is supplied, available to the consumer's router element). Use
|
|
49
|
+
* it to intercept a same-origin click and route client-side without a full
|
|
50
|
+
* navigation. Only applies to `href` (link) tabs — button tabs use `onSelect`.
|
|
51
|
+
*/
|
|
52
|
+
onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Props the kit hands to `renderLink` for each `href` tab. The consumer returns
|
|
56
|
+
* their router's `<Link to={href}>` carrying the same `className` (the active
|
|
57
|
+
* accent-underline styling) and `aria-current` (`'page'` on the active tab).
|
|
58
|
+
*/
|
|
59
|
+
export interface TabBarRenderLinkProps {
|
|
60
|
+
/** The tab's destination — feed it to your router's `to` / `href`. */
|
|
61
|
+
href: string;
|
|
62
|
+
/** The kit's tab classes (CVA output) — apply verbatim to the link element. */
|
|
63
|
+
className: string;
|
|
64
|
+
/** Icon + label + badge — render as the link's children. */
|
|
65
|
+
children: ReactNode;
|
|
66
|
+
/** `'page'` on the active tab, otherwise omitted — forward to the link. */
|
|
67
|
+
'aria-current'?: 'page';
|
|
68
|
+
/** Optional per-item click handler (the item's `onClick`), if supplied. */
|
|
69
|
+
onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
|
|
38
70
|
}
|
|
39
71
|
export interface TabBarProps {
|
|
40
72
|
/** The tabs, in order. */
|
|
@@ -43,6 +75,17 @@ export interface TabBarProps {
|
|
|
43
75
|
ariaLabel: string;
|
|
44
76
|
/** Fires with the tab `id` when a button tab (one without `href`) is chosen. */
|
|
45
77
|
onSelect?: (id: string) => void;
|
|
78
|
+
/**
|
|
79
|
+
* Render an `href` tab via the consumer's router instead of the kit's own
|
|
80
|
+
* `<a>`. TabBar calls it for each link tab and renders the returned node; the
|
|
81
|
+
* consumer returns their `<Link to={href}>` carrying the supplied `className`
|
|
82
|
+
* + `aria-current` so the active accent underline and the `aria-current="page"`
|
|
83
|
+
* marker are preserved. Use it for SPA navigation (e.g. the MarketplaceAppShell
|
|
84
|
+
* strip) so a tab click is a client-side route change, not a full page load.
|
|
85
|
+
* Omit it to render the plain `<a href>` exactly as before. Button tabs (no
|
|
86
|
+
* `href`) ignore `renderLink` and continue to use `onSelect`.
|
|
87
|
+
*/
|
|
88
|
+
renderLink?: (props: TabBarRenderLinkProps) => ReactNode;
|
|
46
89
|
/**
|
|
47
90
|
* Equal-width tabs that fill the bar and always stack the label under the
|
|
48
91
|
* icon (for a fixed, always-visible set). Off (default) = content-width tabs
|
|
@@ -21,6 +21,12 @@ export interface UnitConverterProps extends VariantProps<typeof rootVariants> {
|
|
|
21
21
|
onCopy?: (mode: InsertMode) => void;
|
|
22
22
|
/** `copy` variant only — fired if the clipboard write can't proceed. */
|
|
23
23
|
onError?: (error: unknown) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Brand wordmark printed in the inserted/copied result-card footer.
|
|
26
|
+
* Omitted → the default `'AlfaDocs'` wordmark; a string overrides it;
|
|
27
|
+
* `false` removes the brand line.
|
|
28
|
+
*/
|
|
29
|
+
insertBrand?: string | false;
|
|
24
30
|
/** Opaque instance id, emitted as `data-component-id`. */
|
|
25
31
|
id?: string;
|
|
26
32
|
/** Extra class names on the wrapper. */
|