@alfadocs/ui-kit-debug 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 (47) 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/{address-fields-7k59FnJ6.js.map → address-fields-pHsfkXGk.js.map} +1 -1
  4. package/dist/_chunks/{booking-Bhbvef95.js → booking-DSOK-bnR.js} +2 -2
  5. package/dist/_chunks/{booking-Bhbvef95.js.map → booking-DSOK-bnR.js.map} +1 -1
  6. package/dist/_chunks/{country-select-BN9nedAp.js → country-select-UEF9BEeQ.js} +2 -2
  7. package/dist/_chunks/{country-select-BN9nedAp.js.map → country-select-UEF9BEeQ.js.map} +1 -1
  8. package/dist/_chunks/flag-DVBE6DnB.js +576 -0
  9. package/dist/_chunks/flag-DVBE6DnB.js.map +1 -0
  10. package/dist/_chunks/flag-view-udarpAot.js +131 -0
  11. package/dist/_chunks/flag-view-udarpAot.js.map +1 -0
  12. package/dist/_chunks/{header-settings-CLwFqMHI.js → header-settings--pjYOe6g.js} +2 -2
  13. package/dist/_chunks/{header-settings-CLwFqMHI.js.map → header-settings--pjYOe6g.js.map} +1 -1
  14. package/dist/_chunks/{locale-picker-EyvPrwDc.js → locale-picker-BfBUdT1m.js} +310 -239
  15. package/dist/_chunks/locale-picker-BfBUdT1m.js.map +1 -0
  16. package/dist/_chunks/{marketplace-app-shell-Bv1ZO4XO.js → marketplace-app-shell-pCHBp8bo.js} +2 -2
  17. package/dist/_chunks/{marketplace-app-shell-Bv1ZO4XO.js.map → marketplace-app-shell-pCHBp8bo.js.map} +1 -1
  18. package/dist/_chunks/{patient-details-DrhlTrLf.js → patient-details-UmNcxL0c.js} +3 -3
  19. package/dist/_chunks/{patient-details-DrhlTrLf.js.map → patient-details-UmNcxL0c.js.map} +1 -1
  20. package/dist/_chunks/{phone-input-D00ZBAm-.js → phone-input-BsZIoE36.js} +2 -2
  21. package/dist/_chunks/{phone-input-D00ZBAm-.js.map → phone-input-BsZIoE36.js.map} +1 -1
  22. package/dist/_chunks/use-theme-CAuo6EYT.js.map +1 -1
  23. package/dist/_chunks/workflow-map-SIfAhmWz.js.map +1 -1
  24. package/dist/agent-catalog.json +1 -1
  25. package/dist/components/address-fields/index.js +1 -1
  26. package/dist/components/booking/index.js +1 -1
  27. package/dist/components/country-select/index.js +1 -1
  28. package/dist/components/flag/flag-core.d.ts +12 -0
  29. package/dist/components/flag/flag-core.d.ts.map +1 -0
  30. package/dist/components/flag/flag-view.d.ts +38 -0
  31. package/dist/components/flag/flag-view.d.ts.map +1 -0
  32. package/dist/components/flag/flag.d.ts +3 -10
  33. package/dist/components/flag/flag.d.ts.map +1 -1
  34. package/dist/components/flag/index.js +1 -1
  35. package/dist/components/header-settings/index.js +1 -1
  36. package/dist/components/locale-picker/index.js +1 -1
  37. package/dist/components/patient-details/index.js +1 -1
  38. package/dist/components/phone-input/index.js +1 -1
  39. package/dist/components/workflow/workflow-types.d.ts +4 -5
  40. package/dist/components/workflow/workflow-types.d.ts.map +1 -1
  41. package/dist/hooks/use-theme.d.ts.map +1 -1
  42. package/dist/index.js +7 -7
  43. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  44. package/package.json +1 -1
  45. package/dist/_chunks/flag-Cnmivlrl.js +0 -641
  46. package/dist/_chunks/flag-Cnmivlrl.js.map +0 -1
  47. package/dist/_chunks/locale-picker-EyvPrwDc.js.map +0 -1
package/README.md CHANGED
@@ -15,21 +15,28 @@ Requires React 18+ and Node ≥ 22.6.
15
15
  ### Source maps (optional)
16
16
 
17
17
  The default `@alfadocs/ui-kit` tarball ships without `.map` files to keep
18
- installs small (~680 KB tarball). Browsers only request source maps on
19
- demand when devtools is open, so end-users don't pay this cost regardless.
18
+ installs small (4.6 MB tarball / 17.3 MB unpacked, against 9.5 MB / 36.8 MB
19
+ for the debug build). Browsers only request source maps on demand when
20
+ devtools is open, so end-users don't pay this cost regardless.
20
21
 
21
22
  If you need symbolicated stack traces (Sentry / Rollbar uploads, in-browser
22
23
  debugging of kit internals), install the `-debug` sibling instead. Both
23
24
  packages are runtime-identical and version-locked:
24
25
 
25
26
  ```jsonc
26
- // package.json — alias-install so imports still resolve as @alfadocs/ui-kit
27
- "@alfadocs/ui-kit": "npm:@alfadocs/ui-kit-debug@^0.1.8"
27
+ // package.json — alias-install so imports still resolve as @alfadocs/ui-kit.
28
+ // Pin the exact version you already have installed, not a range: maps from a
29
+ // different release point at lines that have moved.
30
+ "@alfadocs/ui-kit": "npm:@alfadocs/ui-kit-debug@0.98.1"
28
31
  ```
29
32
 
30
33
  Or as a separate dev-only dep if your error reporter accepts maps from a
31
34
  sibling package.
32
35
 
36
+ Never commit the alias — it rewrites the lockfile, so `npm ci` would pull the
37
+ debug build into production images. See Storybook → "30. Debugging — Source
38
+ Maps and the Debug Package" for the full guide.
39
+
33
40
  ## Troubleshooting
34
41
 
35
42
  ### `npm install` fails with `ETARGET No matching version found for @alfadocs/ui-kit@<x.y.z>` — even though the version exists on npmjs.org
@@ -2,7 +2,7 @@ import { jsx as s } from "react/jsx-runtime";
2
2
  import { forwardRef as _, useRef as j, useEffect as k, useCallback as E, useMemo as x } from "react";
3
3
  import { c as L } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as N } from "react-i18next";
5
- import { C as O } from "./country-select-BN9nedAp.js";
5
+ import { C as O } from "./country-select-UEF9BEeQ.js";
6
6
  import { P as B } from "./province-select-BDywtmL-.js";
7
7
  import { P as q } from "./postal-code-input-BznBxVxf.js";
8
8
  import { C as H } from "./city-input-towzBenY.js";
@@ -243,4 +243,4 @@ export {
243
243
  Z as A,
244
244
  Y as a
245
245
  };
246
- //# sourceMappingURL=address-fields-7k59FnJ6.js.map
246
+ //# sourceMappingURL=address-fields-pHsfkXGk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"address-fields-7k59FnJ6.js","sources":["../../src/components/address-fields/address-fields.agent.ts","../../src/components/address-fields/address-fields.tsx"],"sourcesContent":["import type { AgentAdapter } from '../../agent/types';\nimport type { StructuredAddress } from '../address-autocomplete';\n\nexport interface AddressFieldsHandle {\n getValue: () => StructuredAddress;\n setValue: (value: StructuredAddress) => void;\n setField: (field: keyof StructuredAddress, value: string) => void;\n}\n\nconst ADDRESS_PROPERTIES = {\n street: { type: 'string' },\n city: { type: 'string' },\n postcode: { type: 'string' },\n province: { type: 'string', description: 'UPPERCASED province code.' },\n country: { type: 'string', description: 'ISO alpha-2, lowercased.' },\n formatted: { type: 'string' },\n} as const;\n\nexport const addressFieldsAgent: AgentAdapter<AddressFieldsHandle> = {\n id: 'address-fields',\n // `set_value` only — a structured address form sets discrete fields; it does\n // no granular in-place rich-text editing, so `edit_inline` does not apply.\n capabilities: ['set_value'],\n state: {\n value: {\n type: 'object',\n descriptionKey: 'ui.agent.addressFields.state.value',\n description:\n 'The current structured address: { street, city, postcode, province, country, formatted }.',\n read: (handle) => handle.getValue(),\n },\n },\n actions: {\n set_value: {\n safety: 'write',\n argsType: '{ value: StructuredAddress }',\n argsSchema: {\n type: 'object',\n properties: {\n value: { type: 'object', properties: ADDRESS_PROPERTIES },\n },\n required: ['value'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.addressFields.actions.setValue',\n description: 'Replace the entire address.',\n invoke: (handle, args: { value: StructuredAddress }) => {\n handle.setValue(args.value);\n },\n },\n set_field: {\n // Contact-data write (street/city/postcode/etc.), not clinical PHI —\n // consistent with PhoneInput / EmailInput / FiscalCodeInput, which all\n // treat identifying contact data as `write`.\n safety: 'write',\n argsType:\n \"{ field: 'street' | 'city' | 'postcode' | 'province' | 'country'; value: string }\",\n argsSchema: {\n type: 'object',\n properties: {\n field: {\n type: 'string',\n enum: ['street', 'city', 'postcode', 'province', 'country'],\n },\n value: { type: 'string' },\n },\n required: ['field', 'value'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.addressFields.actions.setField',\n description:\n 'Set a single address field. Setting `country` also clears the now-stale province.',\n examples: [\n {\n args: { field: 'country', value: 'it' },\n note: 'Set the country to Italy.',\n },\n ],\n invoke: (\n handle,\n args: { field: keyof StructuredAddress; value: string },\n ) => {\n handle.setField(args.field, args.value);\n },\n },\n },\n domHooks: {\n root: { attr: 'data-component', value: 'address-fields' },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n type ChangeEvent,\n type ReactNode,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { CountrySelect } from '../country-select/country-select';\nimport { ProvinceSelect } from '../province-select/province-select';\nimport { PostalCodeInput } from '../postal-code-input/postal-code-input';\nimport { CityInput, type CityLoaderContext } from '../city-input/city-input';\nimport { TextInput } from '../text-input';\nimport { FormField } from '../form-field/form-field';\nimport {\n AddressAutocomplete,\n type GetSuggestions,\n type StructuredAddress,\n} from '../address-autocomplete';\nimport type { OptionShape } from '../_shared/option';\nimport { useAgentRegistration } from '../../agent';\nimport {\n addressFieldsAgent,\n type AddressFieldsHandle,\n} from './address-fields.agent';\n\n/* ------------------------------------------------------------------ */\n/* Public API */\n/* */\n/* A shippable composite that wires the address fields together and */\n/* emits a single StructuredAddress. Country drives the rest: it re-keys */\n/* the province dataset, swaps the postcode rule, and re-orders the */\n/* fields. An optional \"find address\" bar fans an AddressAutocomplete */\n/* selection out into the individual fields. */\n/* ------------------------------------------------------------------ */\n\nexport type AddressFieldKey = 'street' | 'city' | 'postcode' | 'province';\n\nconst EMPTY_ADDRESS: StructuredAddress = {\n street: '',\n city: '',\n postcode: '',\n province: '',\n country: '',\n formatted: '',\n};\n\n// Minimal country-keyed field-order map — NOT a libaddressinput port.\n// Extend with another entry when a country needs a different order.\nconst FIELD_ORDER: Record<string, AddressFieldKey[]> = {\n it: ['street', 'postcode', 'city', 'province'],\n};\nconst DEFAULT_ORDER: AddressFieldKey[] = [\n 'street',\n 'city',\n 'postcode',\n 'province',\n];\n\n// Fields that span the full width in the grid layout.\nconst WIDE_CELLS = new Set<string>(['findbar', 'country', 'street']);\n\nconst layoutVariants = cva('', {\n variants: {\n layout: {\n stacked: 'ds:flex ds:flex-col ds:gap-[var(--spacing-md)]',\n grid: 'ds:grid ds:grid-cols-2 ds:gap-[var(--spacing-md)]',\n },\n },\n defaultVariants: { layout: 'stacked' },\n});\n\nexport interface AddressFieldsProps {\n /** The controlled address value. */\n value?: StructuredAddress;\n /** Fires with the next full address on any field change. */\n onChange?: (next: StructuredAddress) => void;\n /**\n * Which address-line fields to render, in order. The country picker\n * always renders first. Default resolves from the selected country.\n */\n fields?: AddressFieldKey[];\n /** Async city suggestion loader, forwarded to CityInput. */\n loadCities?: (\n query: string,\n ctx: CityLoaderContext,\n ) => Promise<OptionShape[]>;\n /** Float these countries to the top of the country picker. */\n popularCountries?: string[];\n /** Enable the \"find address\" bar — provide a Places API key… */\n apiKey?: string;\n /** …or a mock/real suggestion injector (wins over apiKey, like AddressAutocomplete). */\n getSuggestions?: GetSuggestions;\n layout?: 'stacked' | 'grid';\n disabled?: boolean;\n id?: string;\n className?: string;\n}\n\nexport const AddressFields = forwardRef<HTMLDivElement, AddressFieldsProps>(\n function AddressFields(\n {\n value,\n onChange,\n fields,\n loadCities,\n popularCountries,\n apiKey,\n getSuggestions,\n layout = 'stacked',\n disabled,\n id,\n className,\n },\n ref,\n ) {\n const { t } = useTranslation();\n const address = value ?? EMPTY_ADDRESS;\n const country = address.country;\n\n const valueRef = useRef(address);\n useEffect(() => {\n valueRef.current = address;\n }, [address]);\n\n const update = useCallback(\n (patch: Partial<StructuredAddress>) => {\n onChange?.({ ...valueRef.current, ...patch });\n },\n [onChange],\n );\n\n // Find-bar selection fans the looked-up address out into every field.\n const handleFind = useCallback(\n (found: StructuredAddress) =>\n onChange?.({ ...valueRef.current, ...found }),\n [onChange],\n );\n\n const agentHandle = useMemo<AddressFieldsHandle>(\n () => ({\n getValue: () => valueRef.current,\n setValue: (next) => onChange?.(next),\n setField: (field, fieldValue) => {\n const patch: Partial<StructuredAddress> = { [field]: fieldValue };\n // Mirror the UI path: changing country re-keys the stale province.\n if (field === 'country') patch.province = '';\n onChange?.({ ...valueRef.current, ...patch });\n },\n }),\n [onChange],\n );\n useAgentRegistration(addressFieldsAgent, agentHandle, id);\n\n const order =\n fields ?? FIELD_ORDER[country?.toLowerCase() ?? ''] ?? DEFAULT_ORDER;\n\n const showFindBar = Boolean(apiKey || getSuggestions);\n\n // The composite's own adapter (`address-fields`) is the agent-addressable\n // surface; the child inputs below are deliberately rendered without an\n // `id`, so they register un-scoped rather than competing for handles.\n const fieldNode = (key: AddressFieldKey | 'country'): ReactNode => {\n switch (key) {\n case 'country':\n return (\n <FormField label={t('inputs.addressFields.country', 'Country')}>\n <CountrySelect\n value={country}\n // Country drives the rest — re-key province on change.\n onValueChange={(next) =>\n update({ country: next, province: '' })\n }\n popularCountries={popularCountries}\n disabled={disabled}\n />\n </FormField>\n );\n case 'street':\n return (\n <FormField label={t('inputs.addressFields.street', 'Street')}>\n <TextInput\n value={address.street}\n onChange={(event: ChangeEvent<HTMLInputElement>) =>\n update({ street: event.target.value })\n }\n autoComplete=\"address-line1\"\n disabled={disabled}\n />\n </FormField>\n );\n case 'city':\n return (\n <FormField label={t('inputs.addressFields.city', 'City')}>\n <CityInput\n value={address.city}\n onValueChange={(next) => update({ city: next })}\n loadCities={loadCities}\n country={country}\n province={address.province}\n disabled={disabled}\n />\n </FormField>\n );\n case 'postcode':\n return (\n <FormField label={t('inputs.addressFields.postcode', 'Postcode')}>\n <PostalCodeInput\n value={address.postcode}\n onValueChange={(next) => update({ postcode: next })}\n country={country}\n disabled={disabled}\n />\n </FormField>\n );\n case 'province':\n return (\n <FormField label={t('inputs.addressFields.province', 'Province')}>\n <ProvinceSelect\n value={address.province}\n onValueChange={(next) => update({ province: next })}\n country={country}\n disabled={disabled}\n />\n </FormField>\n );\n }\n };\n\n const cell = (key: string, node: ReactNode): ReactNode =>\n layout === 'grid' ? (\n <div\n key={key}\n className={WIDE_CELLS.has(key) ? 'ds:col-span-2' : undefined}\n >\n {node}\n </div>\n ) : (\n <div key={key}>{node}</div>\n );\n\n const children: ReactNode[] = [];\n if (showFindBar) {\n children.push(\n cell(\n 'findbar',\n <FormField label={t('inputs.addressFields.find', 'Find address')}>\n <AddressAutocomplete\n apiKey={apiKey}\n getSuggestions={getSuggestions}\n regionCodes={country ? [country] : undefined}\n disabled={disabled}\n onSelect={handleFind}\n />\n </FormField>,\n ),\n );\n }\n children.push(cell('country', fieldNode('country')));\n for (const key of order) children.push(cell(key, fieldNode(key)));\n\n return (\n <div\n ref={ref}\n data-component=\"address-fields\"\n data-component-id={id}\n className={[layoutVariants({ layout }), className]\n .filter(Boolean)\n .join(' ')}\n >\n {children}\n </div>\n );\n },\n);\n\nAddressFields.displayName = 'AddressFields';\n"],"names":["ADDRESS_PROPERTIES","addressFieldsAgent","handle","args","EMPTY_ADDRESS","FIELD_ORDER","DEFAULT_ORDER","WIDE_CELLS","layoutVariants","cva","AddressFields","forwardRef","value","onChange","fields","loadCities","popularCountries","apiKey","getSuggestions","layout","disabled","id","className","ref","t","useTranslation","address","country","valueRef","useRef","useEffect","update","useCallback","patch","handleFind","found","agentHandle","useMemo","next","field","fieldValue","useAgentRegistration","order","showFindBar","fieldNode","key","FormField","jsx","CountrySelect","TextInput","event","CityInput","PostalCodeInput","ProvinceSelect","cell","node","children","AddressAutocomplete"],"mappings":";;;;;;;;;;;;AASA,MAAMA,IAAqB;AAAA,EACzB,QAAQ,EAAE,MAAM,SAAA;AAAA,EAChB,MAAM,EAAE,MAAM,SAAA;AAAA,EACd,UAAU,EAAE,MAAM,SAAA;AAAA,EAClB,UAAU,EAAE,MAAM,UAAU,aAAa,4BAAA;AAAA,EACzC,SAAS,EAAE,MAAM,UAAU,aAAa,2BAAA;AAAA,EACxC,WAAW,EAAE,MAAM,SAAA;AACrB,GAEaC,IA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AAS;AAAA,MACPF;AAAA,QACE;AAAA,0BACCR,GAAA,EAAU,OAAOtB,EAAE,6BAA6B,cAAc,GAC7D,UAAA,gBAAAuB;AAAA,UAACU;AAAA,UAAA;AAAA,YACC,QAAAxC;AAAA,YACA,gBAAAC;AAAA,YACA,aAAaS,IAAU,CAACA,CAAO,IAAI;AAAA,YACnC,UAAAP;AAAA,YACA,UAAUc;AAAA,UAAA;AAAA,QAAA,EACZ,CACF;AAAA,MAAA;AAAA,IACF,GAGJsB,EAAS,KAAKF,EAAK,WAAWV,EAAU,SAAS,CAAC,CAAC;AACnD,eAAWC,KAAOH,EAAO,CAAAc,EAAS,KAAKF,EAAKT,GAAKD,EAAUC,CAAG,CAAC,CAAC;AAEhE,WACE,gBAAAE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAxB;AAAA,QACA,kBAAe;AAAA,QACf,qBAAmBF;AAAA,QACnB,WAAW,CAACb,EAAe,EAAE,QAAAW,GAAQ,GAAGG,CAAS,EAC9C,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,QAEV,UAAAkC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA9C,EAAc,cAAc;"}
1
+ {"version":3,"file":"address-fields-pHsfkXGk.js","sources":["../../src/components/address-fields/address-fields.agent.ts","../../src/components/address-fields/address-fields.tsx"],"sourcesContent":["import type { AgentAdapter } from '../../agent/types';\nimport type { StructuredAddress } from '../address-autocomplete';\n\nexport interface AddressFieldsHandle {\n getValue: () => StructuredAddress;\n setValue: (value: StructuredAddress) => void;\n setField: (field: keyof StructuredAddress, value: string) => void;\n}\n\nconst ADDRESS_PROPERTIES = {\n street: { type: 'string' },\n city: { type: 'string' },\n postcode: { type: 'string' },\n province: { type: 'string', description: 'UPPERCASED province code.' },\n country: { type: 'string', description: 'ISO alpha-2, lowercased.' },\n formatted: { type: 'string' },\n} as const;\n\nexport const addressFieldsAgent: AgentAdapter<AddressFieldsHandle> = {\n id: 'address-fields',\n // `set_value` only — a structured address form sets discrete fields; it does\n // no granular in-place rich-text editing, so `edit_inline` does not apply.\n capabilities: ['set_value'],\n state: {\n value: {\n type: 'object',\n descriptionKey: 'ui.agent.addressFields.state.value',\n description:\n 'The current structured address: { street, city, postcode, province, country, formatted }.',\n read: (handle) => handle.getValue(),\n },\n },\n actions: {\n set_value: {\n safety: 'write',\n argsType: '{ value: StructuredAddress }',\n argsSchema: {\n type: 'object',\n properties: {\n value: { type: 'object', properties: ADDRESS_PROPERTIES },\n },\n required: ['value'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.addressFields.actions.setValue',\n description: 'Replace the entire address.',\n invoke: (handle, args: { value: StructuredAddress }) => {\n handle.setValue(args.value);\n },\n },\n set_field: {\n // Contact-data write (street/city/postcode/etc.), not clinical PHI —\n // consistent with PhoneInput / EmailInput / FiscalCodeInput, which all\n // treat identifying contact data as `write`.\n safety: 'write',\n argsType:\n \"{ field: 'street' | 'city' | 'postcode' | 'province' | 'country'; value: string }\",\n argsSchema: {\n type: 'object',\n properties: {\n field: {\n type: 'string',\n enum: ['street', 'city', 'postcode', 'province', 'country'],\n },\n value: { type: 'string' },\n },\n required: ['field', 'value'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.addressFields.actions.setField',\n description:\n 'Set a single address field. Setting `country` also clears the now-stale province.',\n examples: [\n {\n args: { field: 'country', value: 'it' },\n note: 'Set the country to Italy.',\n },\n ],\n invoke: (\n handle,\n args: { field: keyof StructuredAddress; value: string },\n ) => {\n handle.setField(args.field, args.value);\n },\n },\n },\n domHooks: {\n root: { attr: 'data-component', value: 'address-fields' },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n type ChangeEvent,\n type ReactNode,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { CountrySelect } from '../country-select/country-select';\nimport { ProvinceSelect } from '../province-select/province-select';\nimport { PostalCodeInput } from '../postal-code-input/postal-code-input';\nimport { CityInput, type CityLoaderContext } from '../city-input/city-input';\nimport { TextInput } from '../text-input';\nimport { FormField } from '../form-field/form-field';\nimport {\n AddressAutocomplete,\n type GetSuggestions,\n type StructuredAddress,\n} from '../address-autocomplete';\nimport type { OptionShape } from '../_shared/option';\nimport { useAgentRegistration } from '../../agent';\nimport {\n addressFieldsAgent,\n type AddressFieldsHandle,\n} from './address-fields.agent';\n\n/* ------------------------------------------------------------------ */\n/* Public API */\n/* */\n/* A shippable composite that wires the address fields together and */\n/* emits a single StructuredAddress. Country drives the rest: it re-keys */\n/* the province dataset, swaps the postcode rule, and re-orders the */\n/* fields. An optional \"find address\" bar fans an AddressAutocomplete */\n/* selection out into the individual fields. */\n/* ------------------------------------------------------------------ */\n\nexport type AddressFieldKey = 'street' | 'city' | 'postcode' | 'province';\n\nconst EMPTY_ADDRESS: StructuredAddress = {\n street: '',\n city: '',\n postcode: '',\n province: '',\n country: '',\n formatted: '',\n};\n\n// Minimal country-keyed field-order map — NOT a libaddressinput port.\n// Extend with another entry when a country needs a different order.\nconst FIELD_ORDER: Record<string, AddressFieldKey[]> = {\n it: ['street', 'postcode', 'city', 'province'],\n};\nconst DEFAULT_ORDER: AddressFieldKey[] = [\n 'street',\n 'city',\n 'postcode',\n 'province',\n];\n\n// Fields that span the full width in the grid layout.\nconst WIDE_CELLS = new Set<string>(['findbar', 'country', 'street']);\n\nconst layoutVariants = cva('', {\n variants: {\n layout: {\n stacked: 'ds:flex ds:flex-col ds:gap-[var(--spacing-md)]',\n grid: 'ds:grid ds:grid-cols-2 ds:gap-[var(--spacing-md)]',\n },\n },\n defaultVariants: { layout: 'stacked' },\n});\n\nexport interface AddressFieldsProps {\n /** The controlled address value. */\n value?: StructuredAddress;\n /** Fires with the next full address on any field change. */\n onChange?: (next: StructuredAddress) => void;\n /**\n * Which address-line fields to render, in order. The country picker\n * always renders first. Default resolves from the selected country.\n */\n fields?: AddressFieldKey[];\n /** Async city suggestion loader, forwarded to CityInput. */\n loadCities?: (\n query: string,\n ctx: CityLoaderContext,\n ) => Promise<OptionShape[]>;\n /** Float these countries to the top of the country picker. */\n popularCountries?: string[];\n /** Enable the \"find address\" bar — provide a Places API key… */\n apiKey?: string;\n /** …or a mock/real suggestion injector (wins over apiKey, like AddressAutocomplete). */\n getSuggestions?: GetSuggestions;\n layout?: 'stacked' | 'grid';\n disabled?: boolean;\n id?: string;\n className?: string;\n}\n\nexport const AddressFields = forwardRef<HTMLDivElement, AddressFieldsProps>(\n function AddressFields(\n {\n value,\n onChange,\n fields,\n loadCities,\n popularCountries,\n apiKey,\n getSuggestions,\n layout = 'stacked',\n disabled,\n id,\n className,\n },\n ref,\n ) {\n const { t } = useTranslation();\n const address = value ?? EMPTY_ADDRESS;\n const country = address.country;\n\n const valueRef = useRef(address);\n useEffect(() => {\n valueRef.current = address;\n }, [address]);\n\n const update = useCallback(\n (patch: Partial<StructuredAddress>) => {\n onChange?.({ ...valueRef.current, ...patch });\n },\n [onChange],\n );\n\n // Find-bar selection fans the looked-up address out into every field.\n const handleFind = useCallback(\n (found: StructuredAddress) =>\n onChange?.({ ...valueRef.current, ...found }),\n [onChange],\n );\n\n const agentHandle = useMemo<AddressFieldsHandle>(\n () => ({\n getValue: () => valueRef.current,\n setValue: (next) => onChange?.(next),\n setField: (field, fieldValue) => {\n const patch: Partial<StructuredAddress> = { [field]: fieldValue };\n // Mirror the UI path: changing country re-keys the stale province.\n if (field === 'country') patch.province = '';\n onChange?.({ ...valueRef.current, ...patch });\n },\n }),\n [onChange],\n );\n useAgentRegistration(addressFieldsAgent, agentHandle, id);\n\n const order =\n fields ?? FIELD_ORDER[country?.toLowerCase() ?? ''] ?? DEFAULT_ORDER;\n\n const showFindBar = Boolean(apiKey || getSuggestions);\n\n // The composite's own adapter (`address-fields`) is the agent-addressable\n // surface; the child inputs below are deliberately rendered without an\n // `id`, so they register un-scoped rather than competing for handles.\n const fieldNode = (key: AddressFieldKey | 'country'): ReactNode => {\n switch (key) {\n case 'country':\n return (\n <FormField label={t('inputs.addressFields.country', 'Country')}>\n <CountrySelect\n value={country}\n // Country drives the rest — re-key province on change.\n onValueChange={(next) =>\n update({ country: next, province: '' })\n }\n popularCountries={popularCountries}\n disabled={disabled}\n />\n </FormField>\n );\n case 'street':\n return (\n <FormField label={t('inputs.addressFields.street', 'Street')}>\n <TextInput\n value={address.street}\n onChange={(event: ChangeEvent<HTMLInputElement>) =>\n update({ street: event.target.value })\n }\n autoComplete=\"address-line1\"\n disabled={disabled}\n />\n </FormField>\n );\n case 'city':\n return (\n <FormField label={t('inputs.addressFields.city', 'City')}>\n <CityInput\n value={address.city}\n onValueChange={(next) => update({ city: next })}\n loadCities={loadCities}\n country={country}\n province={address.province}\n disabled={disabled}\n />\n </FormField>\n );\n case 'postcode':\n return (\n <FormField label={t('inputs.addressFields.postcode', 'Postcode')}>\n <PostalCodeInput\n value={address.postcode}\n onValueChange={(next) => update({ postcode: next })}\n country={country}\n disabled={disabled}\n />\n </FormField>\n );\n case 'province':\n return (\n <FormField label={t('inputs.addressFields.province', 'Province')}>\n <ProvinceSelect\n value={address.province}\n onValueChange={(next) => update({ province: next })}\n country={country}\n disabled={disabled}\n />\n </FormField>\n );\n }\n };\n\n const cell = (key: string, node: ReactNode): ReactNode =>\n layout === 'grid' ? (\n <div\n key={key}\n className={WIDE_CELLS.has(key) ? 'ds:col-span-2' : undefined}\n >\n {node}\n </div>\n ) : (\n <div key={key}>{node}</div>\n );\n\n const children: ReactNode[] = [];\n if (showFindBar) {\n children.push(\n cell(\n 'findbar',\n <FormField label={t('inputs.addressFields.find', 'Find address')}>\n <AddressAutocomplete\n apiKey={apiKey}\n getSuggestions={getSuggestions}\n regionCodes={country ? [country] : undefined}\n disabled={disabled}\n onSelect={handleFind}\n />\n </FormField>,\n ),\n );\n }\n children.push(cell('country', fieldNode('country')));\n for (const key of order) children.push(cell(key, fieldNode(key)));\n\n return (\n <div\n ref={ref}\n data-component=\"address-fields\"\n data-component-id={id}\n className={[layoutVariants({ layout }), className]\n .filter(Boolean)\n .join(' ')}\n >\n {children}\n </div>\n );\n },\n);\n\nAddressFields.displayName = 'AddressFields';\n"],"names":["ADDRESS_PROPERTIES","addressFieldsAgent","handle","args","EMPTY_ADDRESS","FIELD_ORDER","DEFAULT_ORDER","WIDE_CELLS","layoutVariants","cva","AddressFields","forwardRef","value","onChange","fields","loadCities","popularCountries","apiKey","getSuggestions","layout","disabled","id","className","ref","t","useTranslation","address","country","valueRef","useRef","useEffect","update","useCallback","patch","handleFind","found","agentHandle","useMemo","next","field","fieldValue","useAgentRegistration","order","showFindBar","fieldNode","key","FormField","jsx","CountrySelect","TextInput","event","CityInput","PostalCodeInput","ProvinceSelect","cell","node","children","AddressAutocomplete"],"mappings":";;;;;;;;;;;;AASA,MAAMA,IAAqB;AAAA,EACzB,QAAQ,EAAE,MAAM,SAAA;AAAA,EAChB,MAAM,EAAE,MAAM,SAAA;AAAA,EACd,UAAU,EAAE,MAAM,SAAA;AAAA,EAClB,UAAU,EAAE,MAAM,UAAU,aAAa,4BAAA;AAAA,EACzC,SAAS,EAAE,MAAM,UAAU,aAAa,2BAAA;AAAA,EACxC,WAAW,EAAE,MAAM,SAAA;AACrB,GAEaC,IAAwD;AAAA,EACnE,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,WAAW;AAAA,EAC1B,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,EACpC;AAAA,EAEF,SAAS;AAAA,IACP,WAAW;AAAA,MACT,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY;AAAA,UACV,OAAO,EAAE,MAAM,UAAU,YAAYF,EAAA;AAAA,QAAmB;AAAA,QAE1D,UAAU,CAAC,OAAO;AAAA,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AC,CAAC;AAEhE,WACE,gBAAAE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAxB;AAAA,QACA,kBAAe;AAAA,QACf,qBAAmBF;AAAA,QACnB,WAAW,CAACb,EAAe,EAAE,QAAAW,GAAQ,GAAGG,CAAS,EAC9C,OAAO,OAAO,EACd,KAAK,GAAG;AAAA,QAEV,UAAAkC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACF;AAEA9C,EAAc,cAAc;"}
@@ -10,7 +10,7 @@ import { C as Bt } from "./checkbox-group-CfqMv57d.js";
10
10
  import { D as Et } from "./date-picker-BP_W6VtE.js";
11
11
  import { E as Rt } from "./email-input-Dpe63k0K.js";
12
12
  import { F as Z } from "./form-field-M5UpX65Z.js";
13
- import { P as Vt } from "./phone-input-D00ZBAm-.js";
13
+ import { P as Vt } from "./phone-input-BsZIoE36.js";
14
14
  import { T as Lt } from "./text-area-Bt3p7Pt0.js";
15
15
  import { T as Ce } from "./text-input-CUvCb6ST.js";
16
16
  import { S as Ft } from "./spinner-hbwuKwMf.js";
@@ -2692,4 +2692,4 @@ export {
2692
2692
  X as O,
2693
2693
  Cs as b
2694
2694
  };
2695
- //# sourceMappingURL=booking-Bhbvef95.js.map
2695
+ //# sourceMappingURL=booking-DSOK-bnR.js.map