@alfadocs/ui-kit 1.74.0 → 1.75.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-ojunD_Y_.js +3901 -0
- package/dist/_chunks/{header-settings-DBlTL6Qj.js → header-settings-Coh1r41O.js} +148 -154
- package/dist/_chunks/{locale-picker-KT-Vz3bx.js → locale-picker-DzdGDSBI.js} +311 -282
- package/dist/_chunks/{marketplace-app-shell-B0ix9yNI.js → marketplace-app-shell-Ck5NVJcO.js} +2 -2
- package/dist/agent-catalog.json +4 -4
- package/dist/agent-i18n/en.json +2 -2
- package/dist/components/booking/booking-types.d.ts +9 -1
- package/dist/components/booking/details-form.d.ts +2 -0
- package/dist/components/booking/index.js +1 -1
- package/dist/components/header-settings/header-settings.d.ts +6 -0
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/locale-picker/locale-picker.d.ts +16 -4
- package/dist/index.js +2 -2
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/package.json +1 -1
- package/dist/_chunks/booking-sq9sa29d.js +0 -3889
package/dist/_chunks/{marketplace-app-shell-B0ix9yNI.js → marketplace-app-shell-Ck5NVJcO.js}
RENAMED
|
@@ -9,7 +9,7 @@ import { C as U } from "./card-BA4Ig_kn.js";
|
|
|
9
9
|
import { D as u } from "./dropdown-menu-D1we7oAY.js";
|
|
10
10
|
import { T as ke } from "./tab-bar-BEODTG6k.js";
|
|
11
11
|
import { a as Y, H as we, g as Ne, f as G, e as ye, c as Se, d as Ce } from "./header-l_B8MV0g.js";
|
|
12
|
-
import { H as Ae } from "./header-settings-
|
|
12
|
+
import { H as Ae } from "./header-settings-Coh1r41O.js";
|
|
13
13
|
import { S as Te } from "./sign-in-with-alfadocs-button-DzrNgbWv.js";
|
|
14
14
|
import { S as Ee, a as ee, v as ze, h as Ie, c as Me, r as Le, b as He, l as Ve, m as Be, k as Re, j as J } from "./sidebar-BS24EnYd.js";
|
|
15
15
|
import { N as De } from "./navigation-dismiss-B1mcW1CT.js";
|
|
@@ -656,4 +656,4 @@ export {
|
|
|
656
656
|
na as M,
|
|
657
657
|
y as P
|
|
658
658
|
};
|
|
659
|
-
//# sourceMappingURL=marketplace-app-shell-
|
|
659
|
+
//# sourceMappingURL=marketplace-app-shell-Ck5NVJcO.js.map
|
package/dist/agent-catalog.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"packageVersion": "1.
|
|
3
|
+
"packageVersion": "1.75.0",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"kind": "component",
|
|
@@ -1511,7 +1511,7 @@
|
|
|
1511
1511
|
"root": {
|
|
1512
1512
|
"attr": "data-component",
|
|
1513
1513
|
"value": "booking",
|
|
1514
|
-
"description": "Marks the Booking root region."
|
|
1514
|
+
"description": "Marks the Booking root region. The host prop hideEmail (boolean, default false) hides the email field, skips its validation and omits email from submission. Pair with confirmationChannels [\"sms\"] for SMS-only confirmation with no channel picker. Patient contact details are never exposed through this adapter."
|
|
1515
1515
|
},
|
|
1516
1516
|
"instanceId": {
|
|
1517
1517
|
"attr": "data-component-id",
|
|
@@ -6497,7 +6497,7 @@
|
|
|
6497
6497
|
{
|
|
6498
6498
|
"name": "locale",
|
|
6499
6499
|
"type": "string",
|
|
6500
|
-
"description": "Active IETF language tag (e.g. \"en\", \"it\", \"ar\"). Read after
|
|
6500
|
+
"description": "Active IETF language tag (e.g. \"en\", \"it\", \"ar\"). Initially uses storage, then HTML lang when initialLocaleFromHtmlLang is enabled, then the browser. Read after set_locale to confirm the switch; unknown tags leave it unchanged.",
|
|
6501
6501
|
"descriptionKey": "ui.agent.headerSettings.state.locale"
|
|
6502
6502
|
},
|
|
6503
6503
|
{
|
|
@@ -7551,7 +7551,7 @@
|
|
|
7551
7551
|
{
|
|
7552
7552
|
"name": "isSystemDefault",
|
|
7553
7553
|
"type": "boolean",
|
|
7554
|
-
"description": "True when
|
|
7554
|
+
"description": "True when following navigator.language. False for a saved or explicit choice, or when initialLocaleFromHtmlLang used the page language. Read alongside locale to distinguish browser detection from a concrete language selection.",
|
|
7555
7555
|
"descriptionKey": "ui.agent.localePicker.state.isSystemDefault"
|
|
7556
7556
|
}
|
|
7557
7557
|
],
|
package/dist/agent-i18n/en.json
CHANGED
|
@@ -675,7 +675,7 @@
|
|
|
675
675
|
},
|
|
676
676
|
"headerSettings": {
|
|
677
677
|
"state": {
|
|
678
|
-
"locale": "Active IETF language tag (e.g. \"en\", \"it\", \"ar\"). Read after
|
|
678
|
+
"locale": "Active IETF language tag (e.g. \"en\", \"it\", \"ar\"). Initially uses storage, then HTML lang when initialLocaleFromHtmlLang is enabled, then the browser. Read after set_locale to confirm the switch; unknown tags leave it unchanged.",
|
|
679
679
|
"theme": "Stored base-theme preference. `'system'` means no override is set and the OS decides — read `resolvedTheme` for what is actually painted.",
|
|
680
680
|
"accessibility": "Stored AAA-contrast preference. `'system'` means no override is set and `prefers-contrast` decides.",
|
|
681
681
|
"resolvedTheme": "The theme actually applied to the document once preference and OS signals resolve. This is what makes a `set_theme(\"system\")` or `set_accessibility(\"system\")` write verifiable."
|
|
@@ -773,7 +773,7 @@
|
|
|
773
773
|
"localePicker": {
|
|
774
774
|
"state": {
|
|
775
775
|
"locale": "Resolved IETF tag of the locale currently applied to the page. Read this after `set_locale` — the setter silently drops tags the kit ships no bundle for, so this is the only confirmation the switch landed.",
|
|
776
|
-
"isSystemDefault": "True when
|
|
776
|
+
"isSystemDefault": "True when following navigator.language. False for a saved or explicit choice, or when initialLocaleFromHtmlLang used the page language. Read alongside locale to distinguish browser detection from a concrete language selection."
|
|
777
777
|
},
|
|
778
778
|
"actions": {
|
|
779
779
|
"setLocale": "Switch the active locale to the given IETF tag. Unsupported tags are a silent no-op — read the `locale` state slot afterwards to confirm the switch landed."
|
|
@@ -170,7 +170,8 @@ export interface BookingBillingDetails {
|
|
|
170
170
|
export interface BookingDetails {
|
|
171
171
|
firstName: string;
|
|
172
172
|
lastName: string;
|
|
173
|
-
|
|
173
|
+
/** Required by default; omitted from submission when `hideEmail` is true. */
|
|
174
|
+
email?: string;
|
|
174
175
|
mobilePhone: string;
|
|
175
176
|
privacyConsent: boolean;
|
|
176
177
|
termsConsent: boolean;
|
|
@@ -296,6 +297,13 @@ export interface BookingProps extends Omit<ComponentPropsWithoutRef<'div'>, 'ari
|
|
|
296
297
|
availableSlots: Record<string, BookingSlot[]>;
|
|
297
298
|
/** Server-side hint of the next free date when the current window is empty. */
|
|
298
299
|
nextAvailableDate?: string;
|
|
300
|
+
/**
|
|
301
|
+
* Hide the email field and skip its validation. Default: false.
|
|
302
|
+
* Submission omits email, including any email in the controlled value.
|
|
303
|
+
* Pair with `confirmationChannels={['sms']}` for SMS-only confirmation.
|
|
304
|
+
* This prop does not change the enabled confirmation channels.
|
|
305
|
+
*/
|
|
306
|
+
hideEmail?: boolean;
|
|
299
307
|
requireCodiceFiscale?: boolean;
|
|
300
308
|
requireDateOfBirth?: boolean;
|
|
301
309
|
requireInsuranceNumber?: boolean;
|
|
@@ -4,6 +4,8 @@ export interface BookingDetailsFormProps {
|
|
|
4
4
|
value: Partial<BookingDetails>;
|
|
5
5
|
onChange: (next: Partial<BookingDetails>) => void;
|
|
6
6
|
onSubmit: (details: BookingDetails) => void | Promise<void>;
|
|
7
|
+
/** Hide email, skip its validation and omit it from submission. Default: false. */
|
|
8
|
+
hideEmail?: boolean;
|
|
7
9
|
requireCodiceFiscale?: boolean;
|
|
8
10
|
requireDateOfBirth?: boolean;
|
|
9
11
|
/** When `true` AND `insuranceType === 'public'`, render the Versichertennummer field. */
|
|
@@ -20,6 +20,12 @@ export interface HeaderSettingsProps extends Omit<HTMLAttributes<HTMLDivElement>
|
|
|
20
20
|
size?: 'sm' | 'md' | 'lg';
|
|
21
21
|
/** Disable the trigger entirely. */
|
|
22
22
|
disabled?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* With no saved choice, start from the page's HTML lang before falling back
|
|
25
|
+
* to the browser. Defaults to false. The first locale surface's mount effect
|
|
26
|
+
* decides for the app lifecycle; pass the same option to LocalePicker.
|
|
27
|
+
*/
|
|
28
|
+
initialLocaleFromHtmlLang?: boolean;
|
|
23
29
|
}
|
|
24
30
|
export interface HeaderSettingsHandle {
|
|
25
31
|
/**
|
|
@@ -6,17 +6,23 @@ export declare const LOCALE_STORAGE_KEY = "alfadocs-ui.locale";
|
|
|
6
6
|
* Sentinel value (and Combobox-row key) for "follow the browser /
|
|
7
7
|
* OS locale". Mirrors the ThemeToggle's `'system'` preference: the
|
|
8
8
|
* picker doesn't store a concrete locale code; the runtime resolves
|
|
9
|
-
* to `navigator.language`
|
|
9
|
+
* to `navigator.language` once per app lifecycle, or when selected.
|
|
10
10
|
*/
|
|
11
11
|
export declare const LOCALE_SYSTEM_DEFAULT: "system";
|
|
12
12
|
export type LocalePreference = Locale | typeof LOCALE_SYSTEM_DEFAULT;
|
|
13
|
+
/** @internal Simulate a fresh app lifecycle after test components unmount. */
|
|
14
|
+
export declare function __resetLocalePreferenceForTests(): void;
|
|
15
|
+
/** Shared persistence for picker selections and HeaderSettings agent actions. */
|
|
16
|
+
export declare function persistLocalePreference(next: LocalePreference): void;
|
|
13
17
|
/**
|
|
14
|
-
* Applies
|
|
18
|
+
* Applies storage, optionally HTML lang, then the browser, once per app lifecycle.
|
|
15
19
|
* Every locale surface calls it on mount (the picker, and HeaderSettings,
|
|
16
20
|
* whose search list only mounts when its flyout opens), so the page starts
|
|
17
21
|
* in the right language and direction whichever one the host renders.
|
|
22
|
+
* The first caller whose mount effect runs decides the option for all surfaces.
|
|
23
|
+
* Pass the same option everywhere; later mounts or prop changes do not re-detect.
|
|
18
24
|
*/
|
|
19
|
-
export declare function useInitialLocale(): void;
|
|
25
|
+
export declare function useInitialLocale(initialLocaleFromHtmlLang?: boolean): void;
|
|
20
26
|
declare const wrapperVariants: (props?: ({
|
|
21
27
|
variant?: "icon" | "compact" | null | undefined;
|
|
22
28
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -34,6 +40,12 @@ export interface LocalePickerProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
34
40
|
disabled?: boolean;
|
|
35
41
|
/** Mark as busy (kept open / focusable but read-only). */
|
|
36
42
|
loading?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* With no saved choice, start from the page's HTML lang before falling back
|
|
45
|
+
* to the browser. Defaults to false. The first locale surface's mount effect
|
|
46
|
+
* decides for the app lifecycle; pass the same option to HeaderSettings.
|
|
47
|
+
*/
|
|
48
|
+
initialLocaleFromHtmlLang?: boolean;
|
|
37
49
|
/**
|
|
38
50
|
* Side the search popover opens onto, relative to the trigger.
|
|
39
51
|
* Defaults to `bottom` (standard dropdown). Use `end` (inline-end —
|
|
@@ -57,7 +69,7 @@ export interface LocalePickerHandle {
|
|
|
57
69
|
getLocale: () => string;
|
|
58
70
|
/**
|
|
59
71
|
* True when the resolved locale came from `navigator.language` rather
|
|
60
|
-
* than an explicit user choice. Read-back for `set_locale`: the
|
|
72
|
+
* than HTML or an explicit user choice. Read-back for `set_locale`: the
|
|
61
73
|
* resolved tag alone cannot tell "the user chose English" from
|
|
62
74
|
* "we are following the browser, which happens to be English".
|
|
63
75
|
*/
|
package/dist/index.js
CHANGED
|
@@ -217,7 +217,7 @@ import { V as rf, v as of } from "./_chunks/voice-control-panel-DQJwe6_Q.js";
|
|
|
217
217
|
import { A as nf } from "./_chunks/anamnesis-card-BcadMmEM.js";
|
|
218
218
|
import { D as mf, F as lf, a as df, M as Af, b as ff, e as cf, f as Sf, g as gf, c as Cf, m as xf, r as Tf, v as uf } from "./_chunks/muscle-scheme-C66WlCxG.js";
|
|
219
219
|
import { A as Ef, a as If, b as Rf, c as _f, d as Nf, e as bf, C as Df, f as Of, g as Ff, D as Lf, h as hf, E as Mf, L as yf, O as kf, P as Bf, i as Gf, j as vf, k as Hf, l as Wf, R as wf, S as Uf, m as Vf, n as Kf, o as Yf, p as Xf, q as qf, r as zf, s as jf, t as Qf, u as Zf, v as Jf, w as $f, x as ac, y as ec, z as sc, B as rc, F as oc } from "./_chunks/optical-prescription-CMM1Y6Xg.js";
|
|
220
|
-
import { B as nc, C as ic, O as pc, b as mc } from "./_chunks/booking-
|
|
220
|
+
import { B as nc, C as ic, O as pc, b as mc } from "./_chunks/booking-ojunD_Y_.js";
|
|
221
221
|
import { C as dc, c as Ac, r as fc } from "./_chunks/calendar-ClB-jWH1.js";
|
|
222
222
|
import { C as Sc } from "./_chunks/calendar-event-card-DXAYWH6k.js";
|
|
223
223
|
import { R as Cc, a as xc } from "./_chunks/resource-chip-DB5jDwUO.js";
|
|
@@ -268,7 +268,7 @@ import { E as tu } from "./_chunks/error-page-illustration-BdJLuMdV.js";
|
|
|
268
268
|
import { F as iu, a as pu } from "./_chunks/forgot-password-form-BSOZVrZG.js";
|
|
269
269
|
import { A as lu, a as du, H as Au, b as fu, u as cu } from "./_chunks/help-me-write-templates-Ds1FY-WY.js";
|
|
270
270
|
import { L as gu, a as Cu, b as xu } from "./_chunks/login-dev-card-DRxTPkE9.js";
|
|
271
|
-
import { C as uu, M as Pu, P as Eu } from "./_chunks/marketplace-app-shell-
|
|
271
|
+
import { C as uu, M as Pu, P as Eu } from "./_chunks/marketplace-app-shell-Ck5NVJcO.js";
|
|
272
272
|
import { P as Ru } from "./_chunks/payment-automation-upsell-AQpHOS1X.js";
|
|
273
273
|
import { R as Nu, a as bu } from "./_chunks/registration-form-B6qqeXP1.js";
|
|
274
274
|
import { S as Ou, a as Fu } from "./_chunks/send-registration-link-form-pO2bGjGa.js";
|
package/package.json
CHANGED