@alfadocs/ui-kit 0.98.1 → 0.99.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.
Files changed (28) hide show
  1. package/README.md +11 -4
  2. package/dist/_chunks/{address-fields-7k59FnJ6.js → address-fields-pHsfkXGk.js} +2 -2
  3. package/dist/_chunks/{booking-Bhbvef95.js → booking-DSOK-bnR.js} +2 -2
  4. package/dist/_chunks/{country-select-BN9nedAp.js → country-select-UEF9BEeQ.js} +2 -2
  5. package/dist/_chunks/flag-DVBE6DnB.js +576 -0
  6. package/dist/_chunks/flag-view-udarpAot.js +131 -0
  7. package/dist/_chunks/{header-settings-CLwFqMHI.js → header-settings--pjYOe6g.js} +2 -2
  8. package/dist/_chunks/{locale-picker-EyvPrwDc.js → locale-picker-BfBUdT1m.js} +310 -239
  9. package/dist/_chunks/{marketplace-app-shell-Bv1ZO4XO.js → marketplace-app-shell-pCHBp8bo.js} +2 -2
  10. package/dist/_chunks/{patient-details-DrhlTrLf.js → patient-details-UmNcxL0c.js} +3 -3
  11. package/dist/_chunks/{phone-input-D00ZBAm-.js → phone-input-BsZIoE36.js} +2 -2
  12. package/dist/agent-catalog.json +1 -1
  13. package/dist/components/address-fields/index.js +1 -1
  14. package/dist/components/booking/index.js +1 -1
  15. package/dist/components/country-select/index.js +1 -1
  16. package/dist/components/flag/flag-core.d.ts +12 -0
  17. package/dist/components/flag/flag-view.d.ts +38 -0
  18. package/dist/components/flag/flag.d.ts +3 -10
  19. package/dist/components/flag/index.js +1 -1
  20. package/dist/components/header-settings/index.js +1 -1
  21. package/dist/components/locale-picker/index.js +1 -1
  22. package/dist/components/patient-details/index.js +1 -1
  23. package/dist/components/phone-input/index.js +1 -1
  24. package/dist/components/workflow/workflow-types.d.ts +4 -5
  25. package/dist/index.js +7 -7
  26. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  27. package/package.json +1 -1
  28. package/dist/_chunks/flag-Cnmivlrl.js +0 -641
@@ -9,7 +9,7 @@ import { C as w } from "./card-DPmk26CL.js";
9
9
  import { D as m } from "./dropdown-menu-DU-Hrf33.js";
10
10
  import { T as q } from "./tab-bar-Axhk6xzx.js";
11
11
  import { a as A, H as G, g as J, f as z, e as K, c as Q, d as U } from "./header-CjwasYnn.js";
12
- import { H as X } from "./header-settings-CLwFqMHI.js";
12
+ import { H as X } from "./header-settings--pjYOe6g.js";
13
13
  import { S as Y } from "./sign-in-with-alfadocs-button-UlYefZpI.js";
14
14
  import { S as Z, g as _, b as aa, a as ea, j as sa, k as ra, i as ta, h as I } from "./sidebar-C-Gr2LL-.js";
15
15
  import { T as na } from "./theme-root-BOO73p5t.js";
@@ -520,4 +520,4 @@ export {
520
520
  ka as M,
521
521
  g as P
522
522
  };
523
- //# sourceMappingURL=marketplace-app-shell-Bv1ZO4XO.js.map
523
+ //# sourceMappingURL=marketplace-app-shell-pCHBp8bo.js.map
@@ -12,12 +12,12 @@ import { E as ce } from "./email-input-Dpe63k0K.js";
12
12
  import { F as pe } from "./fiscal-code-input-QP9gkyDE.js";
13
13
  import { N as ue } from "./number-input-DjWzmlEY.js";
14
14
  import { P as me } from "./panel-header-D313n_9-.js";
15
- import { P as fe } from "./phone-input-D00ZBAm-.js";
15
+ import { P as fe } from "./phone-input-BsZIoE36.js";
16
16
  import { S as ge } from "./select-BW5ecXlX.js";
17
17
  import { S as ye } from "./switch-OILsBLWo.js";
18
18
  import { T as be } from "./text-area-Bt3p7Pt0.js";
19
19
  import { T as he } from "./text-input-CUvCb6ST.js";
20
- import { C as ve } from "./country-select-BN9nedAp.js";
20
+ import { C as ve } from "./country-select-UEF9BEeQ.js";
21
21
  import { P as xe } from "./province-select-BDywtmL-.js";
22
22
  import { P as Ne } from "./postal-code-input-BznBxVxf.js";
23
23
  import { C as Ve } from "./city-input-towzBenY.js";
@@ -775,4 +775,4 @@ export {
775
775
  Ae as P,
776
776
  je as p
777
777
  };
778
- //# sourceMappingURL=patient-details-DrhlTrLf.js.map
778
+ //# sourceMappingURL=patient-details-UmNcxL0c.js.map
@@ -10,7 +10,7 @@ import { getCountries as qe, parsePhoneNumberFromString as L, AsYouType as q, ge
10
10
  import { u as He, F as _e } from "./form-field-context-B3APVHKx.js";
11
11
  import { c as Ge } from "./compose-refs-C0k0tdqF.js";
12
12
  import { n as J } from "./normalize-diacritics-BNGbFNlJ.js";
13
- import { a as Q } from "./flag-Cnmivlrl.js";
13
+ import { a as Q } from "./flag-DVBE6DnB.js";
14
14
  import { C as Oe } from "./chevron-down-DWE7GSq9.js";
15
15
  const Ue = {
16
16
  id: "phone-input",
@@ -577,4 +577,4 @@ export {
577
577
  pe as c,
578
578
  We as p
579
579
  };
580
- //# sourceMappingURL=phone-input-D00ZBAm-.js.map
580
+ //# sourceMappingURL=phone-input-BsZIoE36.js.map
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "0.98.1",
3
+ "packageVersion": "0.99.0",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -1,4 +1,4 @@
1
- import { A as e, a } from "../../_chunks/address-fields-7k59FnJ6.js";
1
+ import { A as e, a } from "../../_chunks/address-fields-pHsfkXGk.js";
2
2
  export {
3
3
  e as AddressFields,
4
4
  a as addressFieldsAgent
@@ -1,4 +1,4 @@
1
- import { B as A, C as R, O as a, b as s } from "../../_chunks/booking-Bhbvef95.js";
1
+ import { B as A, C as R, O as a, b as s } from "../../_chunks/booking-DSOK-bnR.js";
2
2
  export {
3
3
  A as Booking,
4
4
  R as CONFIRMATION_CHANNEL_ORDER,
@@ -1,4 +1,4 @@
1
- import { C as o, I as t, a, c as n, r as s } from "../../_chunks/country-select-BN9nedAp.js";
1
+ import { C as o, I as t, a, c as n, r as s } from "../../_chunks/country-select-UEF9BEeQ.js";
2
2
  export {
3
3
  o as CountrySelect,
4
4
  t as ISO_3166_ALPHA2,
@@ -0,0 +1,12 @@
1
+ import type { FlagProps } from './flag';
2
+ /** Country codes bundled with `CoreFlag`. Subset of `FLAG_COUNTRIES`. */
3
+ export declare const CORE_FLAG_COUNTRIES: readonly string[];
4
+ /** Does `CoreFlag` bundle an asset for this country code? Case-insensitive. */
5
+ export declare function hasCoreFlag(country: string): boolean;
6
+ /**
7
+ * `Flag` restricted to the kit's own locale set. Internal — not exported
8
+ * from `index.ts` or the root barrel. Renders `FlagView` with no JSX so
9
+ * this file stays a `.ts` module alongside the glob it owns.
10
+ */
11
+ export declare const CoreFlag: import("react").ForwardRefExoticComponent<FlagProps & import("react").RefAttributes<HTMLElement>>;
12
+ //# sourceMappingURL=flag-core.d.ts.map
@@ -0,0 +1,38 @@
1
+ import { type ImgHTMLAttributes } from 'react';
2
+ /** `CODE → asset URL`, keyed by upper-case ISO code. */
3
+ export type FlagAssetMap = Record<string, string>;
4
+ /**
5
+ * `import.meta.glob` is a Vite build macro: Vite rewrites the *call* into a
6
+ * static asset map, so it must stay a reachable call expression (a `typeof`
7
+ * guard on the bare reference is always false at runtime and skips the flags).
8
+ * Under the esbuild sync pass the macro is absent and the untransformed call
9
+ * throws — callers wrap their glob in this helper so Flag degrades to
10
+ * placeholder boxes instead of crashing.
11
+ */
12
+ export declare function safeFlagGlob(glob: () => Record<string, string>): FlagAssetMap;
13
+ export declare const flagVariants: (props?: ({
14
+ shape?: "square" | "rectangle" | null | undefined;
15
+ size?: "sm" | "md" | "lg" | "xl" | null | undefined;
16
+ rounded?: "full" | "none" | "sm" | "md" | null | undefined;
17
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
18
+ /** Composes the variant classes with a caller-supplied `className`. */
19
+ export declare function flagClasses(variants: Parameters<typeof flagVariants>[0], className?: string): string;
20
+ export type FlagImgAttrs = Omit<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'alt' | 'role' | 'width' | 'height' | 'children'>;
21
+ interface FlagViewProps extends FlagImgAttrs {
22
+ /** Upper-cased ISO code — stamped as `data-country`. */
23
+ code: string;
24
+ /** Resolved asset URL, or `undefined` when the kit ships no such flag. */
25
+ src?: string;
26
+ /** Accessible name; omit for decorative flags. */
27
+ label?: string;
28
+ /** Fully composed class string (see `flagClasses`). */
29
+ className: string;
30
+ }
31
+ /**
32
+ * The one element every Flag binding renders. Kept private to the flag
33
+ * directory — consumers import `Flag` (or the kit's LocalePicker), never
34
+ * this.
35
+ */
36
+ export declare const FlagView: import("react").ForwardRefExoticComponent<FlagViewProps & import("react").RefAttributes<HTMLElement>>;
37
+ export {};
38
+ //# sourceMappingURL=flag-view.d.ts.map
@@ -1,16 +1,10 @@
1
- import { type ImgHTMLAttributes } from 'react';
2
- import { type VariantProps } from 'class-variance-authority';
1
+ import type { VariantProps } from 'class-variance-authority';
2
+ import { flagVariants, type FlagImgAttrs } from './flag-view';
3
3
  /** Country codes for which a flag asset exists (ISO 3166-1 alpha-2 + a few subdivisions). */
4
4
  export declare const FLAG_COUNTRIES: readonly string[];
5
5
  /** Does a flag asset exist for this country code? Case-insensitive. */
6
6
  export declare function hasFlag(country: string): boolean;
7
- declare const flagVariants: (props?: ({
8
- shape?: "square" | "rectangle" | null | undefined;
9
- size?: "sm" | "md" | "lg" | "xl" | null | undefined;
10
- rounded?: "full" | "none" | "sm" | "md" | null | undefined;
11
- } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
- type ImgAttrs = Omit<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'alt' | 'role' | 'width' | 'height' | 'children'>;
13
- export interface FlagProps extends ImgAttrs, VariantProps<typeof flagVariants> {
7
+ export interface FlagProps extends FlagImgAttrs, VariantProps<typeof flagVariants> {
14
8
  /**
15
9
  * ISO 3166-1 alpha-2 country code (e.g. `US`, `GB`, `JP`). A handful of
16
10
  * subdivision codes are also supported (`GB-ENG`, `GB-SCT`, `GB-WLS`,
@@ -25,5 +19,4 @@ export interface FlagProps extends ImgAttrs, VariantProps<typeof flagVariants> {
25
19
  label?: string;
26
20
  }
27
21
  export declare const Flag: import("react").ForwardRefExoticComponent<FlagProps & import("react").RefAttributes<HTMLElement>>;
28
- export {};
29
22
  //# sourceMappingURL=flag.d.ts.map
@@ -1,4 +1,4 @@
1
- import { F, a as g, h } from "../../_chunks/flag-Cnmivlrl.js";
1
+ import { F, a as g, h } from "../../_chunks/flag-DVBE6DnB.js";
2
2
  export {
3
3
  F as FLAG_COUNTRIES,
4
4
  g as Flag,
@@ -1,4 +1,4 @@
1
- import { H as t } from "../../_chunks/header-settings-CLwFqMHI.js";
1
+ import { H as t } from "../../_chunks/header-settings--pjYOe6g.js";
2
2
  export {
3
3
  t as HeaderSettings
4
4
  };
@@ -1,4 +1,4 @@
1
- import { L, a as c, b as r } from "../../_chunks/locale-picker-EyvPrwDc.js";
1
+ import { L, a as c, b as r } from "../../_chunks/locale-picker-BfBUdT1m.js";
2
2
  export {
3
3
  L as LOCALE_STORAGE_KEY,
4
4
  c as LocalePicker,
@@ -1,4 +1,4 @@
1
- import { P as e, p as i } from "../../_chunks/patient-details-DrhlTrLf.js";
1
+ import { P as e, p as i } from "../../_chunks/patient-details-UmNcxL0c.js";
2
2
  export {
3
3
  e as PatientDetails,
4
4
  i as patientDetailsAgent
@@ -1,4 +1,4 @@
1
- import { P as n, c as p, p as t, a as e } from "../../_chunks/phone-input-D00ZBAm-.js";
1
+ import { P as n, c as p, p as t, a as e } from "../../_chunks/phone-input-BsZIoE36.js";
2
2
  export {
3
3
  n as PhoneInput,
4
4
  p as countryTriggerVariants,
@@ -7,8 +7,7 @@
7
7
  * degenerate DAG where every node has exactly one outgoing edge with
8
8
  * a null condition. This means v2 branching (if/else) can ship as an
9
9
  * additive change without breaking v1 consumers.
10
- *
11
- * Authoritative user story: src/user_stories/domain-specific/workflow.mdx
10
+
12
11
  */
13
12
  export type WorkflowActionType = 'add_delay' | 'send_email' | 'send_sms' | 'create_task' | 'send_whatsapp' | 'update_patient_field' | 'webhook';
14
13
  export type WorkflowStatus = 'active' | 'inactive' | 'paused';
@@ -117,9 +116,9 @@ export interface WorkflowActionMeta {
117
116
  * entries only; passing one of these ids is a misconfiguration and
118
117
  * the editor surfaces a warning strip.
119
118
  *
120
- * See `src/user_stories/domain-specific/workflow.mdx` the
121
- * maintainability group pins this down with: "a misconfigured
122
- * workflow can't overwrite a patient's legal name or contact info".
119
+ * The maintainability requirement behind this: a misconfigured
120
+ * workflow must not be able to overwrite a patient's legal name or
121
+ * contact info.
123
122
  */
124
123
  export declare const CORE_PATIENT_FIELDS: ReadonlySet<string>;
125
124
  /** True when the field id targets a core patient column (never allowed). */
package/dist/index.js CHANGED
@@ -13,9 +13,9 @@ import { I as qa } from "./_chunks/icon-button-group-BLHPN6jg.js";
13
13
  import { S as $a } from "./_chunks/sign-in-with-alfadocs-button-UlYefZpI.js";
14
14
  import { SafeHtml as Za, sanitiseHtml as ae } from "./safe-html/index.js";
15
15
  import { A as se, a as re, p as te } from "./_chunks/address-autocomplete-Bq-1n1UX.js";
16
- import { A as ie, a as ne } from "./_chunks/address-fields-7k59FnJ6.js";
16
+ import { A as ie, a as ne } from "./_chunks/address-fields-pHsfkXGk.js";
17
17
  import { C as de, c as me } from "./_chunks/city-input-towzBenY.js";
18
- import { C as ce, I as fe, a as ge, c as Ae, r as ue } from "./_chunks/country-select-BN9nedAp.js";
18
+ import { C as ce, I as fe, a as ge, c as Ae, r as ue } from "./_chunks/country-select-UEF9BEeQ.js";
19
19
  import { P as Ce, p as Se } from "./_chunks/postal-code-input-BznBxVxf.js";
20
20
  import { I as Ie, P as Pe, p as he } from "./_chunks/province-select-BDywtmL-.js";
21
21
  import { A as be, a as Ee, b as Re } from "./_chunks/autocomplete-BrONKN8l.js";
@@ -48,7 +48,7 @@ import { M as xr, m as Cr, a as Sr } from "./_chunks/multi-select-CC52Qws6.js";
48
48
  import { N as Ir, u as Pr } from "./_chunks/number-input-DjWzmlEY.js";
49
49
  import { O as Nr } from "./_chunks/otp-input-DzBQ-CpE.js";
50
50
  import { P as Er, u as Rr } from "./_chunks/use-password-requirements-Bwtqx1qN.js";
51
- import { P as yr, c as vr, p as Dr, a as Fr } from "./_chunks/phone-input-D00ZBAm-.js";
51
+ import { P as yr, c as vr, p as Dr, a as Fr } from "./_chunks/phone-input-BsZIoE36.js";
52
52
  import { R as Lr, r as Or } from "./_chunks/recaptcha-widget-BC-4To9b.js";
53
53
  import { R as Br } from "./_chunks/radio-TWf9Q-mp.js";
54
54
  import { R as Hr } from "./_chunks/radio-group-CI-6SmSw.js";
@@ -83,7 +83,7 @@ import { C as Xo, c as qo } from "./_chunks/clinical-note-card-C7F_24IC.js";
83
83
  import { D as $o } from "./_chunks/description-list-ClNLdRMy.js";
84
84
  import { E as Zo } from "./_chunks/empty-state-CrLsi0XI.js";
85
85
  import { F as ei, f as si } from "./_chunks/file-manager-B9LZzT5E.js";
86
- import { F as ti, a as oi, h as ii } from "./_chunks/flag-Cnmivlrl.js";
86
+ import { F as ti, a as oi, h as ii } from "./_chunks/flag-DVBE6DnB.js";
87
87
  import { K as li, k as di } from "./_chunks/kbd-D855ZXIW.js";
88
88
  import { K as pi, a as ci } from "./_chunks/key-value-pair-LHKfDT_9.js";
89
89
  import { L as n } from "./_chunks/list-DgE1xWBM.js";
@@ -181,14 +181,14 @@ import { T as uc } from "./_chunks/typing-indicator-DHeVN4ob.js";
181
181
  import { A as Cc } from "./_chunks/anamnesis-card-CJ5MNbkc.js";
182
182
  import { D as Tc, F as Ic, a as Pc, M as hc, b as Nc, e as bc, f as Ec, g as Rc, c as _c, m as yc, r as vc, v as Dc } from "./_chunks/muscle-scheme-kgCX5qfO.js";
183
183
  import { A as Mc, a as Lc, b as Oc, c as kc, d as Bc, e as wc, C as Hc, f as Gc, g as Vc, D as Uc, h as Wc, E as zc, L as Kc, O as Yc, P as jc, i as Xc, j as qc, k as Qc, l as $c, R as Jc, S as Zc, m as af, n as ef, o as sf, p as rf, q as tf, r as of, s as nf, t as lf, u as df, v as mf, w as pf, x as cf, y as ff, z as gf, B as Af, F as uf } from "./_chunks/optical-prescription-BEjYQjiO.js";
184
- import { B as Cf, C as Sf, O as Tf, b as If } from "./_chunks/booking-Bhbvef95.js";
184
+ import { B as Cf, C as Sf, O as Tf, b as If } from "./_chunks/booking-DSOK-bnR.js";
185
185
  import { C as hf, c as Nf, r as bf } from "./_chunks/calendar-4dXTvsCz.js";
186
186
  import { C as Rf } from "./_chunks/calendar-event-card-C6qGtywL.js";
187
187
  import { C as yf, c as vf } from "./_chunks/care-plan-card-BrwhyIJI.js";
188
188
  import { C as Ff, c as Mf } from "./_chunks/care-plan-entry-card-DWEdCQM3.js";
189
189
  import { C as Of, c as kf } from "./_chunks/care-plan-header-BXvRpGG8.js";
190
190
  import { O as wf, o as Hf } from "./_chunks/operator-hero-DVy0RGoD.js";
191
- import { P as Vf, p as Uf } from "./_chunks/patient-details-DrhlTrLf.js";
191
+ import { P as Vf, p as Uf } from "./_chunks/patient-details-UmNcxL0c.js";
192
192
  import { P as zf, p as Kf } from "./_chunks/patient-search-vtRTSdf6.js";
193
193
  import { P as jf, p as Xf } from "./_chunks/patient-summary-card-C-iVDo53.js";
194
194
  import { B as Qf, C as $f, N as Jf, P as Zf, a as ag, b as eg, g as sg, u as rg } from "./_chunks/patient-table-QEVsFvwq.js";
@@ -216,7 +216,7 @@ import { T as Gu } from "./_chunks/transaction-chip-DJCstquX.js";
216
216
  import { W as Uu, a as Wu } from "./_chunks/whatsapp-button-BIy6NaJK.js";
217
217
  import { C as Ku, W as Yu, a as ju, b as Xu, c as qu, i as Qu, l as $u, m as Ju, r as Zu, w as ax, d as ex, e as sx, f as rx } from "./_chunks/workflow-map-SIfAhmWz.js";
218
218
  import { A as ox, a as ix, b as nx, c as lx } from "./_chunks/alia-sidebar-DzNz1gDf.js";
219
- import { C as mx, M as px, P as cx } from "./_chunks/marketplace-app-shell-Bv1ZO4XO.js";
219
+ import { C as mx, M as px, P as cx } from "./_chunks/marketplace-app-shell-pCHBp8bo.js";
220
220
  import { S as gx } from "./_chunks/signature-request-BzXTV_RH.js";
221
221
  import { D as ux, d as xx } from "./_chunks/dependent-selector-DyFpdzZV.js";
222
222
  import { D as Sx, d as Tx } from "./_chunks/document-preview-DXsCEj4U.js";
@@ -1,4 +1,4 @@
1
- import { C as l, M as o } from "../../_chunks/marketplace-app-shell-Bv1ZO4XO.js";
1
+ import { C as l, M as o } from "../../_chunks/marketplace-app-shell-pCHBp8bo.js";
2
2
  export {
3
3
  l as ConnectWithAlfadocs,
4
4
  o as MarketplaceAppShell
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit",
3
- "version": "0.98.1",
3
+ "version": "0.99.0",
4
4
  "type": "module",
5
5
  "description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe.",
6
6
  "license": "BUSL-1.1",