@alfadocs/ui-kit-debug 1.76.0 → 1.77.1

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 (197) hide show
  1. package/dist/_chunks/{balance-badge-cell-B49xgL6H.js → balance-badge-cell-Dzd-Z_5W.js} +2 -2
  2. package/dist/_chunks/{balance-badge-cell-B49xgL6H.js.map → balance-badge-cell-Dzd-Z_5W.js.map} +1 -1
  3. package/dist/_chunks/booking-Cz_QjIJe.js +4051 -0
  4. package/dist/_chunks/booking-Cz_QjIJe.js.map +1 -0
  5. package/dist/_chunks/{breadcrumb-Boan-5n8.js → breadcrumb-Bn29NCnf.js} +8 -8
  6. package/dist/_chunks/breadcrumb-Bn29NCnf.js.map +1 -0
  7. package/dist/_chunks/{calendar-appointment-editor-dialog-B4My4eiB.js → calendar-appointment-editor-dialog-cvUpUjj-.js} +4 -4
  8. package/dist/_chunks/{calendar-appointment-editor-dialog-B4My4eiB.js.map → calendar-appointment-editor-dialog-cvUpUjj-.js.map} +1 -1
  9. package/dist/_chunks/{control-room-rail-CKZ2nemY.js → control-room-rail-DcJpHbp4.js} +2 -2
  10. package/dist/_chunks/{control-room-rail-CKZ2nemY.js.map → control-room-rail-DcJpHbp4.js.map} +1 -1
  11. package/dist/_chunks/{data-table-DTKGWUQm.js → data-table-BlONA1rP.js} +2 -2
  12. package/dist/_chunks/{data-table-DTKGWUQm.js.map → data-table-BlONA1rP.js.map} +1 -1
  13. package/dist/_chunks/{file-manager-Ct5QpZZI.js → file-manager-C9iJjDZt.js} +3 -3
  14. package/dist/_chunks/{file-manager-Ct5QpZZI.js.map → file-manager-C9iJjDZt.js.map} +1 -1
  15. package/dist/_chunks/{header-settings-Coh1r41O.js → header-settings-BYpVmLip.js} +2 -2
  16. package/dist/_chunks/{header-settings-Coh1r41O.js.map → header-settings-BYpVmLip.js.map} +1 -1
  17. package/dist/_chunks/{heatmap-Ba9cgfSY.js → heatmap-C2Rg-SV_.js} +2 -2
  18. package/dist/_chunks/{heatmap-Ba9cgfSY.js.map → heatmap-C2Rg-SV_.js.map} +1 -1
  19. package/dist/_chunks/{marketplace-app-shell-Ck5NVJcO.js → marketplace-app-shell-mS7Q2-81.js} +3 -3
  20. package/dist/_chunks/{marketplace-app-shell-Ck5NVJcO.js.map → marketplace-app-shell-mS7Q2-81.js.map} +1 -1
  21. package/dist/_chunks/{notes-panel-CxjMovCh.js → notes-panel-CZO1qsD-.js} +2 -2
  22. package/dist/_chunks/{notes-panel-CxjMovCh.js.map → notes-panel-CZO1qsD-.js.map} +1 -1
  23. package/dist/_chunks/{otp-input-CGMu30_e.js → otp-input-BgEZi0py.js} +54 -53
  24. package/dist/_chunks/otp-input-BgEZi0py.js.map +1 -0
  25. package/dist/_chunks/{practice-results-C5SJTgcd.js → practice-results-BnY2EkzI.js} +708 -689
  26. package/dist/_chunks/practice-results-BnY2EkzI.js.map +1 -0
  27. package/dist/_chunks/{recaptcha-widget-CsvwlYTE.js → recaptcha-widget-iglUBIF3.js} +2 -2
  28. package/dist/_chunks/{recaptcha-widget-CsvwlYTE.js.map → recaptcha-widget-iglUBIF3.js.map} +1 -1
  29. package/dist/_chunks/{registration-form-DeK2QiJu.js → registration-form-xORq2s4p.js} +3 -3
  30. package/dist/_chunks/{registration-form-DeK2QiJu.js.map → registration-form-xORq2s4p.js.map} +1 -1
  31. package/dist/_chunks/signature-request-DjY-X62H.js +2448 -0
  32. package/dist/_chunks/signature-request-DjY-X62H.js.map +1 -0
  33. package/dist/_chunks/{tasks-panel-Cmr0oMvc.js → tasks-panel-BkjtgjQ8.js} +2 -2
  34. package/dist/_chunks/{tasks-panel-Cmr0oMvc.js.map → tasks-panel-BkjtgjQ8.js.map} +1 -1
  35. package/dist/_chunks/{theme-toggle-DTrUzIBG.js → theme-toggle-DKpzb0-M.js} +2 -2
  36. package/dist/_chunks/{theme-toggle-DTrUzIBG.js.map → theme-toggle-DKpzb0-M.js.map} +1 -1
  37. package/dist/_chunks/{tool-rail-C_9lm0TC.js → tool-rail-Kup1b7xI.js} +2 -2
  38. package/dist/_chunks/{tool-rail-C_9lm0TC.js.map → tool-rail-Kup1b7xI.js.map} +1 -1
  39. package/dist/_chunks/use-theme-CYGyzFgZ.js +196 -0
  40. package/dist/_chunks/use-theme-CYGyzFgZ.js.map +1 -0
  41. package/dist/agent-catalog.json +46 -10
  42. package/dist/agent-i18n/en.json +5 -4
  43. package/dist/components/booking/booking-types.d.ts +22 -1
  44. package/dist/components/booking/booking-types.d.ts.map +1 -1
  45. package/dist/components/booking/booking.agent.d.ts.map +1 -1
  46. package/dist/components/booking/booking.d.ts +1 -1
  47. package/dist/components/booking/booking.d.ts.map +1 -1
  48. package/dist/components/booking/code-step.d.ts +6 -0
  49. package/dist/components/booking/code-step.d.ts.map +1 -0
  50. package/dist/components/booking/index.d.ts +1 -1
  51. package/dist/components/booking/index.d.ts.map +1 -1
  52. package/dist/components/booking/index.js +1 -1
  53. package/dist/components/booking/step-focus.d.ts +9 -0
  54. package/dist/components/booking/step-focus.d.ts.map +1 -0
  55. package/dist/components/booking/use-booking-payment.d.ts +6 -3
  56. package/dist/components/booking/use-booking-payment.d.ts.map +1 -1
  57. package/dist/components/breadcrumb/index.js +1 -1
  58. package/dist/components/control-room-rail/index.js +1 -1
  59. package/dist/components/data-table/index.js +1 -1
  60. package/dist/components/file-manager/index.js +1 -1
  61. package/dist/components/header-settings/index.js +1 -1
  62. package/dist/components/heatmap/index.js +1 -1
  63. package/dist/components/index.d.ts +1 -1
  64. package/dist/components/index.d.ts.map +1 -1
  65. package/dist/components/notes-panel/index.js +1 -1
  66. package/dist/components/otp-input/index.js +1 -1
  67. package/dist/components/otp-input/otp-input.d.ts +1 -0
  68. package/dist/components/otp-input/otp-input.d.ts.map +1 -1
  69. package/dist/components/patient-table/index.js +1 -1
  70. package/dist/components/practice-results/index.js +1 -1
  71. package/dist/components/practice-results/practice-results.d.ts +1 -1
  72. package/dist/components/practice-results/practice-results.d.ts.map +1 -1
  73. package/dist/components/recaptcha-widget/index.js +1 -1
  74. package/dist/components/tasks-panel/index.js +1 -1
  75. package/dist/components/theme-toggle/index.js +1 -1
  76. package/dist/components/tool-rail/index.js +1 -1
  77. package/dist/hooks/index.d.ts +1 -1
  78. package/dist/hooks/index.d.ts.map +1 -1
  79. package/dist/hooks/index.js +88 -86
  80. package/dist/hooks/use-theme.d.ts +9 -0
  81. package/dist/hooks/use-theme.d.ts.map +1 -1
  82. package/dist/host-compat.css +4 -1
  83. package/dist/i18n/locales/ar.d.ts +29 -0
  84. package/dist/i18n/locales/ar.d.ts.map +1 -1
  85. package/dist/i18n/locales/ar.js +30 -1
  86. package/dist/i18n/locales/ar.js.map +1 -1
  87. package/dist/i18n/locales/de.d.ts +29 -0
  88. package/dist/i18n/locales/de.d.ts.map +1 -1
  89. package/dist/i18n/locales/de.js +30 -1
  90. package/dist/i18n/locales/de.js.map +1 -1
  91. package/dist/i18n/locales/el.d.ts +29 -0
  92. package/dist/i18n/locales/el.d.ts.map +1 -1
  93. package/dist/i18n/locales/el.js +30 -1
  94. package/dist/i18n/locales/el.js.map +1 -1
  95. package/dist/i18n/locales/en.d.ts +29 -0
  96. package/dist/i18n/locales/en.d.ts.map +1 -1
  97. package/dist/i18n/locales/en.js +30 -1
  98. package/dist/i18n/locales/en.js.map +1 -1
  99. package/dist/i18n/locales/es.d.ts +29 -0
  100. package/dist/i18n/locales/es.d.ts.map +1 -1
  101. package/dist/i18n/locales/es.js +30 -1
  102. package/dist/i18n/locales/es.js.map +1 -1
  103. package/dist/i18n/locales/fr.d.ts +29 -0
  104. package/dist/i18n/locales/fr.d.ts.map +1 -1
  105. package/dist/i18n/locales/fr.js +30 -1
  106. package/dist/i18n/locales/fr.js.map +1 -1
  107. package/dist/i18n/locales/hi.d.ts +29 -0
  108. package/dist/i18n/locales/hi.d.ts.map +1 -1
  109. package/dist/i18n/locales/hi.js +30 -1
  110. package/dist/i18n/locales/hi.js.map +1 -1
  111. package/dist/i18n/locales/it.d.ts +29 -0
  112. package/dist/i18n/locales/it.d.ts.map +1 -1
  113. package/dist/i18n/locales/it.js +30 -1
  114. package/dist/i18n/locales/it.js.map +1 -1
  115. package/dist/i18n/locales/ja.d.ts +29 -0
  116. package/dist/i18n/locales/ja.d.ts.map +1 -1
  117. package/dist/i18n/locales/ja.js +30 -1
  118. package/dist/i18n/locales/ja.js.map +1 -1
  119. package/dist/i18n/locales/nl.d.ts +29 -0
  120. package/dist/i18n/locales/nl.d.ts.map +1 -1
  121. package/dist/i18n/locales/nl.js +30 -1
  122. package/dist/i18n/locales/nl.js.map +1 -1
  123. package/dist/i18n/locales/pl.d.ts +29 -0
  124. package/dist/i18n/locales/pl.d.ts.map +1 -1
  125. package/dist/i18n/locales/pl.js +30 -1
  126. package/dist/i18n/locales/pl.js.map +1 -1
  127. package/dist/i18n/locales/pt.d.ts +29 -0
  128. package/dist/i18n/locales/pt.d.ts.map +1 -1
  129. package/dist/i18n/locales/pt.js +30 -1
  130. package/dist/i18n/locales/pt.js.map +1 -1
  131. package/dist/i18n/locales/ro.d.ts +29 -0
  132. package/dist/i18n/locales/ro.d.ts.map +1 -1
  133. package/dist/i18n/locales/ro.js +30 -1
  134. package/dist/i18n/locales/ro.js.map +1 -1
  135. package/dist/i18n/locales/ru.d.ts +29 -0
  136. package/dist/i18n/locales/ru.d.ts.map +1 -1
  137. package/dist/i18n/locales/ru.js +30 -1
  138. package/dist/i18n/locales/ru.js.map +1 -1
  139. package/dist/i18n/locales/sq.d.ts +29 -0
  140. package/dist/i18n/locales/sq.d.ts.map +1 -1
  141. package/dist/i18n/locales/sq.js +30 -1
  142. package/dist/i18n/locales/sq.js.map +1 -1
  143. package/dist/i18n/locales/sv.d.ts +29 -0
  144. package/dist/i18n/locales/sv.d.ts.map +1 -1
  145. package/dist/i18n/locales/sv.js +30 -1
  146. package/dist/i18n/locales/sv.js.map +1 -1
  147. package/dist/i18n/locales/tr.d.ts +29 -0
  148. package/dist/i18n/locales/tr.d.ts.map +1 -1
  149. package/dist/i18n/locales/tr.js +30 -1
  150. package/dist/i18n/locales/tr.js.map +1 -1
  151. package/dist/i18n/locales/zh.d.ts +29 -0
  152. package/dist/i18n/locales/zh.d.ts.map +1 -1
  153. package/dist/i18n/locales/zh.js +30 -1
  154. package/dist/i18n/locales/zh.js.map +1 -1
  155. package/dist/index.js +1209 -1207
  156. package/dist/locales/ar.json +30 -1
  157. package/dist/locales/de.json +30 -1
  158. package/dist/locales/el.json +30 -1
  159. package/dist/locales/en.json +30 -1
  160. package/dist/locales/es.json +30 -1
  161. package/dist/locales/fr.json +30 -1
  162. package/dist/locales/hi.json +30 -1
  163. package/dist/locales/it.json +30 -1
  164. package/dist/locales/ja.json +30 -1
  165. package/dist/locales/nl.json +30 -1
  166. package/dist/locales/pl.json +30 -1
  167. package/dist/locales/pt.json +30 -1
  168. package/dist/locales/ro.json +30 -1
  169. package/dist/locales/ru.json +30 -1
  170. package/dist/locales/sq.json +30 -1
  171. package/dist/locales/sv.json +30 -1
  172. package/dist/locales/tr.json +30 -1
  173. package/dist/locales/zh.json +30 -1
  174. package/dist/patterns/calendar/index.js +1 -1
  175. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  176. package/dist/patterns/registration-form/index.js +1 -1
  177. package/dist/patterns/signature-request/channel-meta.d.ts +8 -2
  178. package/dist/patterns/signature-request/channel-meta.d.ts.map +1 -1
  179. package/dist/patterns/signature-request/index.js +1 -1
  180. package/dist/patterns/signature-request/minor-patient.d.ts +41 -0
  181. package/dist/patterns/signature-request/minor-patient.d.ts.map +1 -0
  182. package/dist/patterns/signature-request/required-documents.d.ts +4 -3
  183. package/dist/patterns/signature-request/required-documents.d.ts.map +1 -1
  184. package/dist/patterns/signature-request/signature-request.d.ts +62 -12
  185. package/dist/patterns/signature-request/signature-request.d.ts.map +1 -1
  186. package/dist/theme-boot.js +26 -0
  187. package/dist/tokens.css +1 -1
  188. package/package.json +4 -2
  189. package/dist/_chunks/booking-D2r19Lia.js +0 -3901
  190. package/dist/_chunks/booking-D2r19Lia.js.map +0 -1
  191. package/dist/_chunks/breadcrumb-Boan-5n8.js.map +0 -1
  192. package/dist/_chunks/otp-input-CGMu30_e.js.map +0 -1
  193. package/dist/_chunks/practice-results-C5SJTgcd.js.map +0 -1
  194. package/dist/_chunks/signature-request-ldmXj2X6.js +0 -2221
  195. package/dist/_chunks/signature-request-ldmXj2X6.js.map +0 -1
  196. package/dist/_chunks/use-theme-CAuo6EYT.js +0 -159
  197. package/dist/_chunks/use-theme-CAuo6EYT.js.map +0 -1
@@ -8,7 +8,7 @@ import { D as n } from "./dropdown-menu-D1we7oAY.js";
8
8
  import { u as me, p as ge, c as w, a as Z } from "./locale-picker-DzdGDSBI.js";
9
9
  import { u as he } from "./use-media-query-CcAx5SMM.js";
10
10
  import { u as fe } from "./use-locale-BExNy9Dl.js";
11
- import { u as ye } from "./use-theme-CAuo6EYT.js";
11
+ import { u as ye } from "./use-theme-CYGyzFgZ.js";
12
12
  import { a as be } from "./use-direction-Dp8h70PP.js";
13
13
  import { u as ve } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
14
14
  import { u as we } from "./registry-DvAUVLHh.js";
@@ -507,4 +507,4 @@ Ke.displayName = "HeaderSettings";
507
507
  export {
508
508
  Ke as H
509
509
  };
510
- //# sourceMappingURL=header-settings-Coh1r41O.js.map
510
+ //# sourceMappingURL=header-settings-BYpVmLip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"header-settings-Coh1r41O.js","sources":["../../src/components/header-settings/header-settings.agent.ts","../../src/components/header-settings/header-settings.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — HeaderSettings. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { HeaderSettingsHandle } from './header-settings';\n\nexport const headerSettingsAgent: AgentAdapter<HeaderSettingsHandle> = {\n id: 'header-settings',\n // Each setter persists a single preference value (locale / theme /\n // accessibility) — `set_value` semantics, not an ephemeral view switch.\n capabilities: ['set_value'],\n // Read-back for all three setters. None of these preferences is\n // recoverable from the DOM — `useTheme` resolves preference + OS into\n // a single applied class, so `theme: 'system'` and `theme: 'light'`\n // both paint `.theme-light` — and `set_locale` swallows unknown tags.\n // Without these slots an agent cannot distinguish \"switched to\n // Italian\" from \"the tag was dropped on the floor\". All four are UI\n // preferences: no PHI, no patient-identifiable data (§7).\n state: {\n locale: {\n type: 'string',\n descriptionKey: 'ui.agent.headerSettings.state.locale',\n description:\n '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.',\n read: (handle) => handle.getLocale(),\n },\n theme: {\n type: \"'light' | 'dark' | 'system'\",\n descriptionKey: 'ui.agent.headerSettings.state.theme',\n description:\n \"Stored base-theme preference. `'system'` means no override is set and the OS decides — read `resolvedTheme` for what is actually painted.\",\n read: (handle) => handle.getTheme(),\n },\n accessibility: {\n type: \"'default' | 'accessible' | 'system'\",\n descriptionKey: 'ui.agent.headerSettings.state.accessibility',\n description:\n \"Stored AAA-contrast preference. `'system'` means no override is set and `prefers-contrast` decides.\",\n read: (handle) => handle.getAccessibility(),\n },\n resolvedTheme: {\n type: \"'light' | 'dark' | 'light-accessible' | 'dark-accessible'\",\n descriptionKey: 'ui.agent.headerSettings.state.resolvedTheme',\n description:\n '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.',\n read: (handle) => handle.getResolvedTheme(),\n },\n },\n actions: {\n set_locale: {\n safety: 'write',\n argsType: '{ locale: string }',\n argsSchema: {\n type: 'object',\n properties: {\n locale: {\n type: 'string',\n description:\n 'IETF language tag (e.g. \"en\", \"it\", \"ar\"). Unknown tags are silently dropped.',\n },\n },\n required: ['locale'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.headerSettings.actions.setLocale',\n description:\n 'Switch the active locale to the given IETF tag. Unknown tags are silently dropped — read the `locale` state slot afterwards to confirm.',\n errors: [\n 'Silently ignored when the tag names a locale the kit ships no bundle for — `locale` is unchanged.',\n ],\n examples: [{ args: { locale: 'it' }, note: 'Switch to Italian.' }],\n invoke: (handle, args: { locale: string }) => {\n // Validation happens inside the handle so the agent surface\n // accepts arbitrary tags and silently drops unknown ones.\n handle.setLocale(args.locale);\n },\n },\n set_theme: {\n safety: 'write',\n argsType: '{ theme: \"light\" | \"dark\" | \"system\" }',\n argsSchema: {\n type: 'object',\n properties: { theme: { enum: ['light', 'dark', 'system'] } },\n required: ['theme'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.headerSettings.actions.setTheme',\n description:\n 'Switch the theme preference. Verify with the `theme` slot (the stored preference) and `resolvedTheme` (what is actually painted).',\n examples: [\n { args: { theme: 'dark' }, note: 'Switch to the dark theme.' },\n ],\n invoke: (handle, args: { theme: 'light' | 'dark' | 'system' }) => {\n handle.setTheme(args.theme);\n },\n },\n set_accessibility: {\n safety: 'write',\n argsType: '{ accessibility: \"default\" | \"accessible\" | \"system\" }',\n argsSchema: {\n type: 'object',\n properties: {\n accessibility: {\n enum: ['default', 'accessible', 'system'],\n description:\n \"`'system'` clears the override and follows `prefers-contrast`.\",\n },\n },\n required: ['accessibility'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.headerSettings.actions.setAccessibility',\n description:\n 'Switch the accessibility preference. Verify with the `accessibility` slot (the stored preference) and `resolvedTheme` (what is actually painted).',\n examples: [\n {\n args: { accessibility: 'accessible' },\n note: 'Enable the AAA-accessible profile.',\n },\n ],\n invoke: (\n handle,\n args: { accessibility: 'default' | 'accessible' | 'system' },\n ) => {\n handle.setAccessibility(args.accessibility);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'header-settings',\n description: 'Marks the HeaderSettings wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop (forwarded via HTMLAttributes).',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type FocusEvent,\n type HTMLAttributes,\n type KeyboardEvent,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { ArrowLeft, ChevronRight, Settings } from 'lucide-react';\nimport { Button } from '../button/button';\nimport { IconButton } from '../button/icon-button';\nimport { DropdownMenu } from '../dropdown-menu/dropdown-menu';\nimport {\n LocalePicker,\n persistLocalePreference,\n useInitialLocale,\n} from '../locale-picker/locale-picker';\nimport {\n useTheme,\n type AccessibilityPreference,\n type ResolvedTheme,\n type ThemePreference,\n} from '../../hooks';\nimport { useLocale } from '../../hooks/use-locale';\nimport { useMediaQuery } from '../../hooks/use-media-query';\nimport { useDocumentDirection } from '../../hooks/use-direction';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { LOCALE_META, type Locale } from '../../i18n/locale-meta';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { headerSettingsAgent } from './header-settings.agent';\nimport { useLengthTokenPx } from '../_shared/length-token';\n\nfunction applyDocumentAttrs(locale: Locale): void {\n if (typeof document === 'undefined') return;\n const root = document.documentElement;\n root.lang = locale;\n root.dir = LOCALE_META[locale].dir;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst wrapperVariants = cva('ds:inline-flex ds:items-center', {\n variants: {\n align: {\n start: '',\n end: '',\n },\n },\n defaultVariants: { align: 'end' },\n});\n\n// The language flyout hosts the searchable locale list, so it takes a\n// popover width rather than the menu's minimum.\nconst languageFlyoutClasses = 'ds:w-[var(--popover-size-md)]';\n\nconst panelVariants = cva('', {\n variants: {\n language: {\n true: 'ds:[inline-size:var(--popover-size-md)] ds:[min-inline-size:0] ds:[max-inline-size:calc(100vw_-_2_*_var(--spacing-lg))] ds:[&_input]:min-w-0',\n false: '',\n },\n },\n});\n\ntype PhoneView = 'main' | 'language' | 'appearance';\n\nconst phoneRowClasses = cva(\n 'ds:flex ds:flex-1 ds:min-w-0 ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]',\n);\n\nfunction SettingRowLabel({\n label,\n value,\n lang,\n}: {\n label: string;\n value: string;\n lang?: string;\n}) {\n return (\n <span className={phoneRowClasses()}>\n <span className=\"ds:truncate\">{label}</span>\n <span\n lang={lang}\n className=\"ds:shrink-0 ds:text-muted-foreground ds:[[data-highlighted]_&]:text-current\"\n >\n {value}\n </span>\n </span>\n );\n}\n\nfunction isLocale(tag: string): tag is Locale {\n return Object.prototype.hasOwnProperty.call(LOCALE_META, tag);\n}\n\n/* ------------------------------------------------------------------ */\n/* LanguageSub */\n/* */\n/* One menu row naming the setting and showing the current language */\n/* (\"Language · English ›\"), laid out like DropdownMenu.ChoiceSub. It */\n/* opens a flyout beside the menu holding LocalePicker.SearchList, so */\n/* the 18 locales stay searchable. The flyout is a dialog, not a menu: */\n/* it holds a search combobox and a listbox, which a menu may not own. */\n/* ------------------------------------------------------------------ */\n\nfunction LanguageSub({ locale }: { locale: string }) {\n const { t } = useTranslation('ui');\n const current = LOCALE_META[isLocale(locale) ? locale : 'en'];\n\n // Radix focuses the flyout itself when a keyboard user opens it. Hand\n // that focus on to the search field so typing filters at once.\n const handleFocus = (event: FocusEvent<HTMLDivElement>) => {\n if (event.target !== event.currentTarget) return;\n event.currentTarget\n .querySelector<HTMLInputElement>('input')\n ?.focus({ preventScroll: true });\n };\n\n // The flyout closes on the \"back\" arrow (ArrowLeft, or ArrowRight in\n // RTL). Inside the search field that key moves the caret instead,\n // unless the caret is already at the start of the field. Capture\n // phase, so Radix's own handler on the flyout never sees the key.\n const handleKeyDownCapture = (event: KeyboardEvent<HTMLDivElement>) => {\n const target = event.target;\n if (!(target instanceof HTMLInputElement)) return;\n // Keys pressed while an IME is composing (Japanese, Chinese) belong to\n // the composition, never to the menu.\n if (event.nativeEvent.isComposing) {\n event.stopPropagation();\n return;\n }\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return;\n if (target.selectionStart !== 0 || target.selectionEnd !== 0) {\n event.stopPropagation();\n }\n };\n\n return (\n <DropdownMenu.Sub>\n <DropdownMenu.SubTrigger aria-haspopup=\"dialog\" data-value={current.code}>\n <span className=\"ds:flex ds:min-w-0 ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]\">\n <span className=\"ds:truncate\">\n {t('navigation.headerSettings.language.label')}\n </span>\n <span\n lang={current.code}\n className=\"ds:shrink-0 ds:text-[color:var(--muted-foreground)] ds:[[data-highlighted]_&]:text-current\"\n >\n {current.nativeName}\n </span>\n </span>\n </DropdownMenu.SubTrigger>\n {/* Radix renders a `menu`; override to `dialog` and drop the\n menu-only `aria-orientation`, which a dialog may not carry. */}\n <DropdownMenu.SubContent\n role=\"dialog\"\n aria-orientation={undefined}\n className={languageFlyoutClasses}\n onFocus={handleFocus}\n onKeyDownCapture={handleKeyDownCapture}\n // Escape that cancels an IME conversion must not close the menu.\n onEscapeKeyDown={(escapeEvent) => {\n if (escapeEvent.isComposing) escapeEvent.preventDefault();\n }}\n >\n <LocalePicker.SearchList />\n </DropdownMenu.SubContent>\n </DropdownMenu.Sub>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport interface HeaderSettingsProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>,\n VariantProps<typeof wrapperVariants> {\n /** Anchor side for the dropdown. Defaults to `end` (matches LTR + RTL). */\n align?: 'start' | 'end';\n /**\n * Size of the cog trigger only. Forwards to the underlying\n * `IconButton`. Defaults to `md` to preserve the existing visual.\n * Use `sm` when composing alongside other `<Button size=\"sm\">`\n * actions in a header row — keeps the visual rhythm consistent.\n *\n * The menu itself (language, appearance and accessible-mode rows)\n * stays at kit defaults regardless — this prop only sizes the\n * trigger.\n */\n size?: 'sm' | 'md' | 'lg';\n /** Disable the trigger entirely. */\n disabled?: boolean;\n /**\n * With no saved choice, start from the page's HTML lang before falling back\n * to the browser. Defaults to false. The first locale surface's mount effect\n * decides for the app lifecycle; pass the same option to LocalePicker.\n */\n initialLocaleFromHtmlLang?: boolean;\n}\n\nexport interface HeaderSettingsHandle {\n /**\n * Switch the active locale. Widened to `string` (vs. `Locale`) so\n * agent surfaces with untyped inputs can call through without\n * extra casting — invalid tags no-op silently.\n */\n setLocale: (next: string) => void;\n setTheme: (next: ThemePreference) => void;\n setAccessibility: (next: AccessibilityPreference) => void;\n /* ---- read-back for the three setters above -------------------- */\n /** Active IETF language tag, as i18next resolved it. */\n getLocale: () => string;\n /** Stored base-theme preference (`'system'` when no override is set). */\n getTheme: () => ThemePreference;\n /** Stored AAA-contrast preference (`'system'` when no override is set). */\n getAccessibility: () => AccessibilityPreference;\n /**\n * The theme actually painted once preference + OS signals resolve.\n * `theme: 'system'` and `theme: 'light'` both render `.theme-light`,\n * so this is what makes a `setTheme('system')` write verifiable.\n */\n getResolvedTheme: () => ResolvedTheme;\n}\n\n/* ------------------------------------------------------------------ */\n/* HeaderSettings */\n/* */\n/* Single button → single DropdownMenu surface, laid out as a View */\n/* menu: Language, Appearance (light / dark / system) and an Accessible */\n/* mode SwitchItem. On phones the lists replace the panel with a Back */\n/* row; on larger screens they open beside it. Every row uses the hooks */\n/* (`useLocale`, `useTheme`) as the standalone components, so there is */\n/* no state duplication. */\n/* ------------------------------------------------------------------ */\n\nexport const HeaderSettings = forwardRef<HTMLDivElement, HeaderSettingsProps>(\n (props, ref) => {\n const {\n align = 'end',\n size = 'md',\n disabled = false,\n initialLocaleFromHtmlLang = false,\n className,\n id,\n ...rest\n } = props as HeaderSettingsProps & { id?: string };\n\n const { t } = useTranslation('ui');\n const theme = useTheme();\n const { locale, setLocale: setLocaleI18n } = useLocale();\n // The language search only mounts with its flyout, so apply the saved\n // (or HTML/browser) language here, on mount.\n useInitialLocale(initialLocaleFromHtmlLang);\n\n const forwardedRef = useRef<HTMLDivElement | null>(null);\n useImperativeHandle(ref, () => forwardedRef.current as HTMLDivElement, []);\n\n // PublicHeader uses ds:md:hidden / ds:hidden ds:md:flex for its phone\n // sheet and inline actions. Match that same Tailwind md boundary (768px).\n const isPhone = useMediaQuery('(width < 48rem)');\n const direction = useDocumentDirection();\n const [phoneView, setPhoneView] = useState<PhoneView>('main');\n const view = isPhone ? phoneView : 'main';\n const panelRef = useRef<HTMLDivElement>(null);\n const languageRowRef = useRef<HTMLDivElement>(null);\n const appearanceRowRef = useRef<HTMLDivElement>(null);\n const returnFocusRef = useRef<Exclude<PhoneView, 'main'> | null>(null);\n const activationRef = useRef('keyboard');\n\n useIsomorphicLayoutEffect(() => {\n if (!isPhone && phoneView !== 'main') {\n returnFocusRef.current = phoneView;\n setPhoneView('main');\n }\n if (view === 'language') {\n panelRef.current\n ?.querySelector<HTMLElement>(\n activationRef.current === 'keyboard' ? 'input' : 'button',\n )\n ?.focus({ preventScroll: true });\n } else if (view === 'appearance') {\n panelRef.current\n ?.querySelector<HTMLElement>('[role=\"menuitem\"]')\n ?.focus({ preventScroll: true });\n } else if (returnFocusRef.current) {\n const section = returnFocusRef.current;\n // Desktop renders SubTrigger/ChoiceSub in place of the phone rows.\n const row = isPhone\n ? (section === 'language' ? languageRowRef : appearanceRowRef).current\n : panelRef.current?.querySelector<HTMLElement>(\n `[role=\"menuitem\"][aria-haspopup=\"${section === 'language' ? 'dialog' : 'menu'}\"]`,\n );\n row?.focus({ preventScroll: true });\n returnFocusRef.current = null;\n }\n }, [isPhone, phoneView, view]);\n\n const handlePhoneRowKeyDown = (\n event: KeyboardEvent<HTMLDivElement>,\n section: Exclude<PhoneView, 'main'>,\n ) => {\n if (event.nativeEvent.isComposing) return;\n const forwardKey = direction === 'rtl' ? 'ArrowLeft' : 'ArrowRight';\n if (\n event.key === 'Enter' ||\n event.key === ' ' ||\n event.key === forwardKey\n )\n activationRef.current = 'keyboard';\n if (event.key === forwardKey) {\n event.preventDefault();\n setPhoneView(section);\n }\n };\n\n const goBack = () => {\n if (view === 'main') return;\n returnFocusRef.current = view;\n setPhoneView('main');\n };\n\n const handlePhoneKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (view === 'main') return;\n if (event.nativeEvent.isComposing) {\n event.stopPropagation();\n return;\n }\n if (event.key !== (direction === 'rtl' ? 'ArrowRight' : 'ArrowLeft'))\n return;\n const target = event.target;\n // As in LanguageSub, leave the caret alone until it reaches the start.\n if (\n target instanceof HTMLInputElement &&\n (target.selectionStart !== 0 || target.selectionEnd !== 0)\n )\n return;\n event.preventDefault();\n event.stopPropagation();\n goBack();\n };\n\n // Same side-effect chain as LocalePicker's internal helper:\n // i18next.changeLanguage → document.dir/lang → persist.\n // Share persistence and session preference with every locale picker.\n const setLocaleWithPersistence = useCallback(\n (next: Locale) => {\n void setLocaleI18n(next);\n applyDocumentAttrs(next);\n persistLocalePreference(next);\n },\n [setLocaleI18n],\n );\n const setLocaleRef = useRef(setLocaleWithPersistence);\n setLocaleRef.current = setLocaleWithPersistence;\n // Assigned during render (not in an effect) so an agent reading the\n // slot immediately after `set_locale` sees the settled value rather\n // than the pre-commit one.\n const localeRef = useRef(locale);\n localeRef.current = locale;\n\n const themeRef = useRef(theme);\n themeRef.current = theme;\n const agentHandle = useMemo<HeaderSettingsHandle>(\n () => ({\n setLocale: (next: string) => {\n // Mirrors LocalePicker's gating — silently drop unknown tags\n // rather than crash mid-cascade. `LOCALES_WITH_BUNDLES` is\n // re-imported via the LOCALE_META keys so this file doesn't\n // need the resources module on the build-agent-catalog path.\n if (Object.prototype.hasOwnProperty.call(LOCALE_META, next)) {\n setLocaleRef.current(next as Locale);\n }\n },\n setTheme: (next) => themeRef.current.setTheme(next),\n setAccessibility: (next) => themeRef.current.setAccessibility(next),\n // Read-back. None of the three preferences is recoverable from\n // the DOM: `useTheme` resolves preference + OS into one applied\n // class, so `theme: 'system'` and `theme: 'light'` both paint\n // `.theme-light`. Without these an agent cannot tell a switch\n // that landed from one that was dropped.\n getLocale: () => localeRef.current,\n getTheme: () => themeRef.current.theme,\n getAccessibility: () => themeRef.current.accessibility,\n getResolvedTheme: () => themeRef.current.resolvedTheme,\n }),\n [],\n );\n useAgentRegistration(headerSettingsAgent, agentHandle, id);\n\n const accessibleChecked = theme.accessibility === 'accessible';\n // Keep the panel clear of the screen edge by the phone menu's own\n // side margin. In the PublicHeader sheet the gear is\n // 24px from the edge and an end-aligned 224px panel would otherwise be\n // pushed flush against it. On desktop it never reaches the edge.\n const edgeMargin = useLengthTokenPx('--spacing-lg', forwardedRef, 24);\n const languageLabel = t('navigation.headerSettings.language.label');\n const appearanceLabel = t('navigation.headerSettings.appearance.label');\n const currentLocale = LOCALE_META[isLocale(locale) ? locale : 'en'];\n const appearanceOptions = [\n {\n value: 'light',\n label: t('navigation.headerSettings.appearance.light'),\n },\n { value: 'dark', label: t('navigation.headerSettings.appearance.dark') },\n {\n value: 'system',\n label: t('navigation.headerSettings.appearance.system'),\n },\n ] as const;\n const backLabel = t('navigation.headerSettings.back');\n\n return (\n <div\n ref={forwardedRef}\n data-component=\"header-settings\"\n data-component-id={id}\n className={wrapperVariants({ align, className })}\n {...rest}\n >\n <DropdownMenu.Root\n onOpenChange={(open) => {\n if (!open) {\n returnFocusRef.current = null;\n setPhoneView('main');\n }\n }}\n >\n <DropdownMenu.Trigger asChild>\n <IconButton\n size={size}\n disabled={disabled}\n icon={<Settings aria-hidden />}\n aria-label={t('navigation.headerSettings.trigger')}\n />\n </DropdownMenu.Trigger>\n <DropdownMenu.Content\n ref={panelRef}\n align={align}\n collisionPadding={edgeMargin}\n className={panelVariants({ language: view === 'language' })}\n {...(view === 'language'\n ? {\n role: 'dialog',\n 'aria-orientation': undefined,\n 'aria-label': languageLabel,\n 'aria-labelledby': undefined,\n }\n : {})}\n onKeyDownCapture={handlePhoneKeyDown}\n onEscapeKeyDown={(event) => {\n if (event.isComposing) event.preventDefault();\n }}\n >\n {view === 'language' ? (\n <div\n role=\"presentation\"\n onKeyDown={(event) => {\n // The dialog owns typing and Tab, not Radix's menu\n // typeahead. Its two tab stops are Back and search.\n if (\n event.key === 'Tab' &&\n !event.altKey &&\n !event.ctrlKey &&\n !event.metaKey\n ) {\n event.preventDefault();\n event.currentTarget\n .querySelector<HTMLElement>(\n event.target instanceof HTMLInputElement\n ? 'button'\n : 'input',\n )\n ?.focus();\n }\n event.stopPropagation();\n }}\n >\n <Button\n intent=\"ghost\"\n size=\"sm\"\n className=\"ds:w-full ds:justify-start ds:text-start ds:font-normal ds:min-h-[var(--min-target-size)] ds:sm:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:gap-[var(--spacing-sm)] ds:[&>span:last-child]:flex-1\"\n startIcon={<ArrowLeft aria-hidden className=\"ds:size-4\" />}\n flipIconInRtl\n onClick={goBack}\n >\n <SettingRowLabel label={backLabel} value={languageLabel} />\n </Button>\n <DropdownMenu.Separator />\n <LocalePicker.SearchList />\n </div>\n ) : view === 'appearance' ? (\n <>\n <DropdownMenu.Item\n startIcon={\n <ArrowLeft\n aria-hidden\n className=\"ds:size-4 ds:rtl:-scale-x-100\"\n />\n }\n onSelect={(event) => {\n event.preventDefault();\n goBack();\n }}\n >\n <SettingRowLabel label={backLabel} value={appearanceLabel} />\n </DropdownMenu.Item>\n <DropdownMenu.Separator />\n <DropdownMenu.RadioGroup\n aria-label={appearanceLabel}\n value={theme.theme}\n onValueChange={(next) =>\n theme.setTheme(next as ThemePreference)\n }\n >\n {appearanceOptions.map((option) => (\n <DropdownMenu.RadioItem\n key={option.value}\n value={option.value}\n onSelect={(event) => event.preventDefault()}\n >\n {option.label}\n </DropdownMenu.RadioItem>\n ))}\n </DropdownMenu.RadioGroup>\n </>\n ) : (\n <>\n {isPhone ? (\n <DropdownMenu.Item\n ref={languageRowRef}\n aria-haspopup=\"dialog\"\n data-value={currentLocale.code}\n endIcon={\n <ChevronRight\n aria-hidden\n className=\"ds:size-4 ds:rtl:-scale-x-100\"\n />\n }\n onPointerDown={(event) => {\n activationRef.current = event.pointerType;\n }}\n onKeyDown={(event) =>\n handlePhoneRowKeyDown(event, 'language')\n }\n onSelect={(event) => {\n event.preventDefault();\n setPhoneView('language');\n }}\n >\n <SettingRowLabel\n label={languageLabel}\n value={currentLocale.nativeName}\n lang={currentLocale.code}\n />\n </DropdownMenu.Item>\n ) : (\n <LanguageSub locale={locale} />\n )}\n <DropdownMenu.Separator />\n {isPhone ? (\n <DropdownMenu.Item\n ref={appearanceRowRef}\n aria-haspopup=\"menu\"\n data-value={theme.theme}\n endIcon={\n <ChevronRight\n aria-hidden\n className=\"ds:size-4 ds:rtl:-scale-x-100\"\n />\n }\n onPointerDown={(event) => {\n activationRef.current = event.pointerType;\n }}\n onKeyDown={(event) =>\n handlePhoneRowKeyDown(event, 'appearance')\n }\n onSelect={(event) => {\n event.preventDefault();\n setPhoneView('appearance');\n }}\n >\n <SettingRowLabel\n label={appearanceLabel}\n value={\n appearanceOptions.find(\n (option) => option.value === theme.theme,\n )?.label ?? ''\n }\n />\n </DropdownMenu.Item>\n ) : (\n <DropdownMenu.ChoiceSub\n label={appearanceLabel}\n value={theme.theme}\n onValueChange={theme.setTheme}\n options={appearanceOptions}\n />\n )}\n {/* Writes through useTheme, so the document gets the\n `theme-accessible` class at once (including the Lexend\n swap for Latin scripts, see src/tokens/index.css). */}\n <DropdownMenu.SwitchItem\n checked={accessibleChecked}\n onCheckedChange={(next) =>\n theme.setAccessibility(next ? 'accessible' : 'default')\n }\n >\n {t('navigation.headerSettings.appearance.accessible')}\n </DropdownMenu.SwitchItem>\n </>\n )}\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n </div>\n );\n },\n);\n\nHeaderSettings.displayName = 'HeaderSettings';\n"],"names":["headerSettingsAgent","handle","args","applyDocumentAttrs","locale","root","LOCALE_META","wrapperVariants","cva","languageFlyoutClasses","panelVariants","phoneRowClasses","SettingRowLabel","label","value","lang","jsxs","jsx","isLocale","tag","LanguageSub","t","useTranslation","current","handleFocus","event","_a","handleKeyDownCapture","target","DropdownMenu","escapeEvent","LocalePicker","HeaderSettings","forwardRef","props","ref","align","size","disabled","initialLocaleFromHtmlLang","className","id","rest","theme","useTheme","setLocaleI18n","useLocale","useInitialLocale","forwardedRef","useRef","useImperativeHandle","isPhone","useMediaQuery","direction","useDocumentDirection","phoneView","setPhoneView","useState","view","panelRef","languageRowRef","appearanceRowRef","returnFocusRef","activationRef","useIsomorphicLayoutEffect","_b","_d","_c","section","row","_e","handlePhoneRowKeyDown","forwardKey","goBack","handlePhoneKeyDown","setLocaleWithPersistence","useCallback","next","persistLocalePreference","setLocaleRef","localeRef","themeRef","agentHandle","useMemo","useAgentRegistration","accessibleChecked","edgeMargin","useLengthTokenPx","languageLabel","appearanceLabel","currentLocale","appearanceOptions","backLabel","open","IconButton","Settings","Button","ArrowLeft","Fragment","option","ChevronRight"],"mappings":";;;;;;;;;;;;;;;;;;AAOO,MAAMA,KAA0D;AAAA,EACrE,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ1B,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,IAErC,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,IAEpC,eAAe;AAAA,MACb,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,iBAAA;AAAA,IAAiB;AAAA,IAE5C,eAAe;AAAA,MACb,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,iBAAA;AAAA,IAAiB;AAAA,EAC5C;AAAA,EAEF,SAAS;AAAA,IACP,YAAY;AAAA,MACV,QAAQ;AAAA,MACR,UAA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
1
+ {"version":3,"file":"header-settings-BYpVmLip.js","sources":["../../src/components/header-settings/header-settings.agent.ts","../../src/components/header-settings/header-settings.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — HeaderSettings. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { HeaderSettingsHandle } from './header-settings';\n\nexport const headerSettingsAgent: AgentAdapter<HeaderSettingsHandle> = {\n id: 'header-settings',\n // Each setter persists a single preference value (locale / theme /\n // accessibility) — `set_value` semantics, not an ephemeral view switch.\n capabilities: ['set_value'],\n // Read-back for all three setters. None of these preferences is\n // recoverable from the DOM — `useTheme` resolves preference + OS into\n // a single applied class, so `theme: 'system'` and `theme: 'light'`\n // both paint `.theme-light` — and `set_locale` swallows unknown tags.\n // Without these slots an agent cannot distinguish \"switched to\n // Italian\" from \"the tag was dropped on the floor\". All four are UI\n // preferences: no PHI, no patient-identifiable data (§7).\n state: {\n locale: {\n type: 'string',\n descriptionKey: 'ui.agent.headerSettings.state.locale',\n description:\n '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.',\n read: (handle) => handle.getLocale(),\n },\n theme: {\n type: \"'light' | 'dark' | 'system'\",\n descriptionKey: 'ui.agent.headerSettings.state.theme',\n description:\n \"Stored base-theme preference. `'system'` means no override is set and the OS decides — read `resolvedTheme` for what is actually painted.\",\n read: (handle) => handle.getTheme(),\n },\n accessibility: {\n type: \"'default' | 'accessible' | 'system'\",\n descriptionKey: 'ui.agent.headerSettings.state.accessibility',\n description:\n \"Stored AAA-contrast preference. `'system'` means no override is set and `prefers-contrast` decides.\",\n read: (handle) => handle.getAccessibility(),\n },\n resolvedTheme: {\n type: \"'light' | 'dark' | 'light-accessible' | 'dark-accessible'\",\n descriptionKey: 'ui.agent.headerSettings.state.resolvedTheme',\n description:\n '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.',\n read: (handle) => handle.getResolvedTheme(),\n },\n },\n actions: {\n set_locale: {\n safety: 'write',\n argsType: '{ locale: string }',\n argsSchema: {\n type: 'object',\n properties: {\n locale: {\n type: 'string',\n description:\n 'IETF language tag (e.g. \"en\", \"it\", \"ar\"). Unknown tags are silently dropped.',\n },\n },\n required: ['locale'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.headerSettings.actions.setLocale',\n description:\n 'Switch the active locale to the given IETF tag. Unknown tags are silently dropped — read the `locale` state slot afterwards to confirm.',\n errors: [\n 'Silently ignored when the tag names a locale the kit ships no bundle for — `locale` is unchanged.',\n ],\n examples: [{ args: { locale: 'it' }, note: 'Switch to Italian.' }],\n invoke: (handle, args: { locale: string }) => {\n // Validation happens inside the handle so the agent surface\n // accepts arbitrary tags and silently drops unknown ones.\n handle.setLocale(args.locale);\n },\n },\n set_theme: {\n safety: 'write',\n argsType: '{ theme: \"light\" | \"dark\" | \"system\" }',\n argsSchema: {\n type: 'object',\n properties: { theme: { enum: ['light', 'dark', 'system'] } },\n required: ['theme'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.headerSettings.actions.setTheme',\n description:\n 'Switch the theme preference. Verify with the `theme` slot (the stored preference) and `resolvedTheme` (what is actually painted).',\n examples: [\n { args: { theme: 'dark' }, note: 'Switch to the dark theme.' },\n ],\n invoke: (handle, args: { theme: 'light' | 'dark' | 'system' }) => {\n handle.setTheme(args.theme);\n },\n },\n set_accessibility: {\n safety: 'write',\n argsType: '{ accessibility: \"default\" | \"accessible\" | \"system\" }',\n argsSchema: {\n type: 'object',\n properties: {\n accessibility: {\n enum: ['default', 'accessible', 'system'],\n description:\n \"`'system'` clears the override and follows `prefers-contrast`.\",\n },\n },\n required: ['accessibility'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.headerSettings.actions.setAccessibility',\n description:\n 'Switch the accessibility preference. Verify with the `accessibility` slot (the stored preference) and `resolvedTheme` (what is actually painted).',\n examples: [\n {\n args: { accessibility: 'accessible' },\n note: 'Enable the AAA-accessible profile.',\n },\n ],\n invoke: (\n handle,\n args: { accessibility: 'default' | 'accessible' | 'system' },\n ) => {\n handle.setAccessibility(args.accessibility);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'header-settings',\n description: 'Marks the HeaderSettings wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop (forwarded via HTMLAttributes).',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type FocusEvent,\n type HTMLAttributes,\n type KeyboardEvent,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { ArrowLeft, ChevronRight, Settings } from 'lucide-react';\nimport { Button } from '../button/button';\nimport { IconButton } from '../button/icon-button';\nimport { DropdownMenu } from '../dropdown-menu/dropdown-menu';\nimport {\n LocalePicker,\n persistLocalePreference,\n useInitialLocale,\n} from '../locale-picker/locale-picker';\nimport {\n useTheme,\n type AccessibilityPreference,\n type ResolvedTheme,\n type ThemePreference,\n} from '../../hooks';\nimport { useLocale } from '../../hooks/use-locale';\nimport { useMediaQuery } from '../../hooks/use-media-query';\nimport { useDocumentDirection } from '../../hooks/use-direction';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { LOCALE_META, type Locale } from '../../i18n/locale-meta';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { headerSettingsAgent } from './header-settings.agent';\nimport { useLengthTokenPx } from '../_shared/length-token';\n\nfunction applyDocumentAttrs(locale: Locale): void {\n if (typeof document === 'undefined') return;\n const root = document.documentElement;\n root.lang = locale;\n root.dir = LOCALE_META[locale].dir;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst wrapperVariants = cva('ds:inline-flex ds:items-center', {\n variants: {\n align: {\n start: '',\n end: '',\n },\n },\n defaultVariants: { align: 'end' },\n});\n\n// The language flyout hosts the searchable locale list, so it takes a\n// popover width rather than the menu's minimum.\nconst languageFlyoutClasses = 'ds:w-[var(--popover-size-md)]';\n\nconst panelVariants = cva('', {\n variants: {\n language: {\n true: 'ds:[inline-size:var(--popover-size-md)] ds:[min-inline-size:0] ds:[max-inline-size:calc(100vw_-_2_*_var(--spacing-lg))] ds:[&_input]:min-w-0',\n false: '',\n },\n },\n});\n\ntype PhoneView = 'main' | 'language' | 'appearance';\n\nconst phoneRowClasses = cva(\n 'ds:flex ds:flex-1 ds:min-w-0 ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]',\n);\n\nfunction SettingRowLabel({\n label,\n value,\n lang,\n}: {\n label: string;\n value: string;\n lang?: string;\n}) {\n return (\n <span className={phoneRowClasses()}>\n <span className=\"ds:truncate\">{label}</span>\n <span\n lang={lang}\n className=\"ds:shrink-0 ds:text-muted-foreground ds:[[data-highlighted]_&]:text-current\"\n >\n {value}\n </span>\n </span>\n );\n}\n\nfunction isLocale(tag: string): tag is Locale {\n return Object.prototype.hasOwnProperty.call(LOCALE_META, tag);\n}\n\n/* ------------------------------------------------------------------ */\n/* LanguageSub */\n/* */\n/* One menu row naming the setting and showing the current language */\n/* (\"Language · English ›\"), laid out like DropdownMenu.ChoiceSub. It */\n/* opens a flyout beside the menu holding LocalePicker.SearchList, so */\n/* the 18 locales stay searchable. The flyout is a dialog, not a menu: */\n/* it holds a search combobox and a listbox, which a menu may not own. */\n/* ------------------------------------------------------------------ */\n\nfunction LanguageSub({ locale }: { locale: string }) {\n const { t } = useTranslation('ui');\n const current = LOCALE_META[isLocale(locale) ? locale : 'en'];\n\n // Radix focuses the flyout itself when a keyboard user opens it. Hand\n // that focus on to the search field so typing filters at once.\n const handleFocus = (event: FocusEvent<HTMLDivElement>) => {\n if (event.target !== event.currentTarget) return;\n event.currentTarget\n .querySelector<HTMLInputElement>('input')\n ?.focus({ preventScroll: true });\n };\n\n // The flyout closes on the \"back\" arrow (ArrowLeft, or ArrowRight in\n // RTL). Inside the search field that key moves the caret instead,\n // unless the caret is already at the start of the field. Capture\n // phase, so Radix's own handler on the flyout never sees the key.\n const handleKeyDownCapture = (event: KeyboardEvent<HTMLDivElement>) => {\n const target = event.target;\n if (!(target instanceof HTMLInputElement)) return;\n // Keys pressed while an IME is composing (Japanese, Chinese) belong to\n // the composition, never to the menu.\n if (event.nativeEvent.isComposing) {\n event.stopPropagation();\n return;\n }\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return;\n if (target.selectionStart !== 0 || target.selectionEnd !== 0) {\n event.stopPropagation();\n }\n };\n\n return (\n <DropdownMenu.Sub>\n <DropdownMenu.SubTrigger aria-haspopup=\"dialog\" data-value={current.code}>\n <span className=\"ds:flex ds:min-w-0 ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]\">\n <span className=\"ds:truncate\">\n {t('navigation.headerSettings.language.label')}\n </span>\n <span\n lang={current.code}\n className=\"ds:shrink-0 ds:text-[color:var(--muted-foreground)] ds:[[data-highlighted]_&]:text-current\"\n >\n {current.nativeName}\n </span>\n </span>\n </DropdownMenu.SubTrigger>\n {/* Radix renders a `menu`; override to `dialog` and drop the\n menu-only `aria-orientation`, which a dialog may not carry. */}\n <DropdownMenu.SubContent\n role=\"dialog\"\n aria-orientation={undefined}\n className={languageFlyoutClasses}\n onFocus={handleFocus}\n onKeyDownCapture={handleKeyDownCapture}\n // Escape that cancels an IME conversion must not close the menu.\n onEscapeKeyDown={(escapeEvent) => {\n if (escapeEvent.isComposing) escapeEvent.preventDefault();\n }}\n >\n <LocalePicker.SearchList />\n </DropdownMenu.SubContent>\n </DropdownMenu.Sub>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport interface HeaderSettingsProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>,\n VariantProps<typeof wrapperVariants> {\n /** Anchor side for the dropdown. Defaults to `end` (matches LTR + RTL). */\n align?: 'start' | 'end';\n /**\n * Size of the cog trigger only. Forwards to the underlying\n * `IconButton`. Defaults to `md` to preserve the existing visual.\n * Use `sm` when composing alongside other `<Button size=\"sm\">`\n * actions in a header row — keeps the visual rhythm consistent.\n *\n * The menu itself (language, appearance and accessible-mode rows)\n * stays at kit defaults regardless — this prop only sizes the\n * trigger.\n */\n size?: 'sm' | 'md' | 'lg';\n /** Disable the trigger entirely. */\n disabled?: boolean;\n /**\n * With no saved choice, start from the page's HTML lang before falling back\n * to the browser. Defaults to false. The first locale surface's mount effect\n * decides for the app lifecycle; pass the same option to LocalePicker.\n */\n initialLocaleFromHtmlLang?: boolean;\n}\n\nexport interface HeaderSettingsHandle {\n /**\n * Switch the active locale. Widened to `string` (vs. `Locale`) so\n * agent surfaces with untyped inputs can call through without\n * extra casting — invalid tags no-op silently.\n */\n setLocale: (next: string) => void;\n setTheme: (next: ThemePreference) => void;\n setAccessibility: (next: AccessibilityPreference) => void;\n /* ---- read-back for the three setters above -------------------- */\n /** Active IETF language tag, as i18next resolved it. */\n getLocale: () => string;\n /** Stored base-theme preference (`'system'` when no override is set). */\n getTheme: () => ThemePreference;\n /** Stored AAA-contrast preference (`'system'` when no override is set). */\n getAccessibility: () => AccessibilityPreference;\n /**\n * The theme actually painted once preference + OS signals resolve.\n * `theme: 'system'` and `theme: 'light'` both render `.theme-light`,\n * so this is what makes a `setTheme('system')` write verifiable.\n */\n getResolvedTheme: () => ResolvedTheme;\n}\n\n/* ------------------------------------------------------------------ */\n/* HeaderSettings */\n/* */\n/* Single button → single DropdownMenu surface, laid out as a View */\n/* menu: Language, Appearance (light / dark / system) and an Accessible */\n/* mode SwitchItem. On phones the lists replace the panel with a Back */\n/* row; on larger screens they open beside it. Every row uses the hooks */\n/* (`useLocale`, `useTheme`) as the standalone components, so there is */\n/* no state duplication. */\n/* ------------------------------------------------------------------ */\n\nexport const HeaderSettings = forwardRef<HTMLDivElement, HeaderSettingsProps>(\n (props, ref) => {\n const {\n align = 'end',\n size = 'md',\n disabled = false,\n initialLocaleFromHtmlLang = false,\n className,\n id,\n ...rest\n } = props as HeaderSettingsProps & { id?: string };\n\n const { t } = useTranslation('ui');\n const theme = useTheme();\n const { locale, setLocale: setLocaleI18n } = useLocale();\n // The language search only mounts with its flyout, so apply the saved\n // (or HTML/browser) language here, on mount.\n useInitialLocale(initialLocaleFromHtmlLang);\n\n const forwardedRef = useRef<HTMLDivElement | null>(null);\n useImperativeHandle(ref, () => forwardedRef.current as HTMLDivElement, []);\n\n // PublicHeader uses ds:md:hidden / ds:hidden ds:md:flex for its phone\n // sheet and inline actions. Match that same Tailwind md boundary (768px).\n const isPhone = useMediaQuery('(width < 48rem)');\n const direction = useDocumentDirection();\n const [phoneView, setPhoneView] = useState<PhoneView>('main');\n const view = isPhone ? phoneView : 'main';\n const panelRef = useRef<HTMLDivElement>(null);\n const languageRowRef = useRef<HTMLDivElement>(null);\n const appearanceRowRef = useRef<HTMLDivElement>(null);\n const returnFocusRef = useRef<Exclude<PhoneView, 'main'> | null>(null);\n const activationRef = useRef('keyboard');\n\n useIsomorphicLayoutEffect(() => {\n if (!isPhone && phoneView !== 'main') {\n returnFocusRef.current = phoneView;\n setPhoneView('main');\n }\n if (view === 'language') {\n panelRef.current\n ?.querySelector<HTMLElement>(\n activationRef.current === 'keyboard' ? 'input' : 'button',\n )\n ?.focus({ preventScroll: true });\n } else if (view === 'appearance') {\n panelRef.current\n ?.querySelector<HTMLElement>('[role=\"menuitem\"]')\n ?.focus({ preventScroll: true });\n } else if (returnFocusRef.current) {\n const section = returnFocusRef.current;\n // Desktop renders SubTrigger/ChoiceSub in place of the phone rows.\n const row = isPhone\n ? (section === 'language' ? languageRowRef : appearanceRowRef).current\n : panelRef.current?.querySelector<HTMLElement>(\n `[role=\"menuitem\"][aria-haspopup=\"${section === 'language' ? 'dialog' : 'menu'}\"]`,\n );\n row?.focus({ preventScroll: true });\n returnFocusRef.current = null;\n }\n }, [isPhone, phoneView, view]);\n\n const handlePhoneRowKeyDown = (\n event: KeyboardEvent<HTMLDivElement>,\n section: Exclude<PhoneView, 'main'>,\n ) => {\n if (event.nativeEvent.isComposing) return;\n const forwardKey = direction === 'rtl' ? 'ArrowLeft' : 'ArrowRight';\n if (\n event.key === 'Enter' ||\n event.key === ' ' ||\n event.key === forwardKey\n )\n activationRef.current = 'keyboard';\n if (event.key === forwardKey) {\n event.preventDefault();\n setPhoneView(section);\n }\n };\n\n const goBack = () => {\n if (view === 'main') return;\n returnFocusRef.current = view;\n setPhoneView('main');\n };\n\n const handlePhoneKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (view === 'main') return;\n if (event.nativeEvent.isComposing) {\n event.stopPropagation();\n return;\n }\n if (event.key !== (direction === 'rtl' ? 'ArrowRight' : 'ArrowLeft'))\n return;\n const target = event.target;\n // As in LanguageSub, leave the caret alone until it reaches the start.\n if (\n target instanceof HTMLInputElement &&\n (target.selectionStart !== 0 || target.selectionEnd !== 0)\n )\n return;\n event.preventDefault();\n event.stopPropagation();\n goBack();\n };\n\n // Same side-effect chain as LocalePicker's internal helper:\n // i18next.changeLanguage → document.dir/lang → persist.\n // Share persistence and session preference with every locale picker.\n const setLocaleWithPersistence = useCallback(\n (next: Locale) => {\n void setLocaleI18n(next);\n applyDocumentAttrs(next);\n persistLocalePreference(next);\n },\n [setLocaleI18n],\n );\n const setLocaleRef = useRef(setLocaleWithPersistence);\n setLocaleRef.current = setLocaleWithPersistence;\n // Assigned during render (not in an effect) so an agent reading the\n // slot immediately after `set_locale` sees the settled value rather\n // than the pre-commit one.\n const localeRef = useRef(locale);\n localeRef.current = locale;\n\n const themeRef = useRef(theme);\n themeRef.current = theme;\n const agentHandle = useMemo<HeaderSettingsHandle>(\n () => ({\n setLocale: (next: string) => {\n // Mirrors LocalePicker's gating — silently drop unknown tags\n // rather than crash mid-cascade. `LOCALES_WITH_BUNDLES` is\n // re-imported via the LOCALE_META keys so this file doesn't\n // need the resources module on the build-agent-catalog path.\n if (Object.prototype.hasOwnProperty.call(LOCALE_META, next)) {\n setLocaleRef.current(next as Locale);\n }\n },\n setTheme: (next) => themeRef.current.setTheme(next),\n setAccessibility: (next) => themeRef.current.setAccessibility(next),\n // Read-back. None of the three preferences is recoverable from\n // the DOM: `useTheme` resolves preference + OS into one applied\n // class, so `theme: 'system'` and `theme: 'light'` both paint\n // `.theme-light`. Without these an agent cannot tell a switch\n // that landed from one that was dropped.\n getLocale: () => localeRef.current,\n getTheme: () => themeRef.current.theme,\n getAccessibility: () => themeRef.current.accessibility,\n getResolvedTheme: () => themeRef.current.resolvedTheme,\n }),\n [],\n );\n useAgentRegistration(headerSettingsAgent, agentHandle, id);\n\n const accessibleChecked = theme.accessibility === 'accessible';\n // Keep the panel clear of the screen edge by the phone menu's own\n // side margin. In the PublicHeader sheet the gear is\n // 24px from the edge and an end-aligned 224px panel would otherwise be\n // pushed flush against it. On desktop it never reaches the edge.\n const edgeMargin = useLengthTokenPx('--spacing-lg', forwardedRef, 24);\n const languageLabel = t('navigation.headerSettings.language.label');\n const appearanceLabel = t('navigation.headerSettings.appearance.label');\n const currentLocale = LOCALE_META[isLocale(locale) ? locale : 'en'];\n const appearanceOptions = [\n {\n value: 'light',\n label: t('navigation.headerSettings.appearance.light'),\n },\n { value: 'dark', label: t('navigation.headerSettings.appearance.dark') },\n {\n value: 'system',\n label: t('navigation.headerSettings.appearance.system'),\n },\n ] as const;\n const backLabel = t('navigation.headerSettings.back');\n\n return (\n <div\n ref={forwardedRef}\n data-component=\"header-settings\"\n data-component-id={id}\n className={wrapperVariants({ align, className })}\n {...rest}\n >\n <DropdownMenu.Root\n onOpenChange={(open) => {\n if (!open) {\n returnFocusRef.current = null;\n setPhoneView('main');\n }\n }}\n >\n <DropdownMenu.Trigger asChild>\n <IconButton\n size={size}\n disabled={disabled}\n icon={<Settings aria-hidden />}\n aria-label={t('navigation.headerSettings.trigger')}\n />\n </DropdownMenu.Trigger>\n <DropdownMenu.Content\n ref={panelRef}\n align={align}\n collisionPadding={edgeMargin}\n className={panelVariants({ language: view === 'language' })}\n {...(view === 'language'\n ? {\n role: 'dialog',\n 'aria-orientation': undefined,\n 'aria-label': languageLabel,\n 'aria-labelledby': undefined,\n }\n : {})}\n onKeyDownCapture={handlePhoneKeyDown}\n onEscapeKeyDown={(event) => {\n if (event.isComposing) event.preventDefault();\n }}\n >\n {view === 'language' ? (\n <div\n role=\"presentation\"\n onKeyDown={(event) => {\n // The dialog owns typing and Tab, not Radix's menu\n // typeahead. Its two tab stops are Back and search.\n if (\n event.key === 'Tab' &&\n !event.altKey &&\n !event.ctrlKey &&\n !event.metaKey\n ) {\n event.preventDefault();\n event.currentTarget\n .querySelector<HTMLElement>(\n event.target instanceof HTMLInputElement\n ? 'button'\n : 'input',\n )\n ?.focus();\n }\n event.stopPropagation();\n }}\n >\n <Button\n intent=\"ghost\"\n size=\"sm\"\n className=\"ds:w-full ds:justify-start ds:text-start ds:font-normal ds:min-h-[var(--min-target-size)] ds:sm:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:gap-[var(--spacing-sm)] ds:[&>span:last-child]:flex-1\"\n startIcon={<ArrowLeft aria-hidden className=\"ds:size-4\" />}\n flipIconInRtl\n onClick={goBack}\n >\n <SettingRowLabel label={backLabel} value={languageLabel} />\n </Button>\n <DropdownMenu.Separator />\n <LocalePicker.SearchList />\n </div>\n ) : view === 'appearance' ? (\n <>\n <DropdownMenu.Item\n startIcon={\n <ArrowLeft\n aria-hidden\n className=\"ds:size-4 ds:rtl:-scale-x-100\"\n />\n }\n onSelect={(event) => {\n event.preventDefault();\n goBack();\n }}\n >\n <SettingRowLabel label={backLabel} value={appearanceLabel} />\n </DropdownMenu.Item>\n <DropdownMenu.Separator />\n <DropdownMenu.RadioGroup\n aria-label={appearanceLabel}\n value={theme.theme}\n onValueChange={(next) =>\n theme.setTheme(next as ThemePreference)\n }\n >\n {appearanceOptions.map((option) => (\n <DropdownMenu.RadioItem\n key={option.value}\n value={option.value}\n onSelect={(event) => event.preventDefault()}\n >\n {option.label}\n </DropdownMenu.RadioItem>\n ))}\n </DropdownMenu.RadioGroup>\n </>\n ) : (\n <>\n {isPhone ? (\n <DropdownMenu.Item\n ref={languageRowRef}\n aria-haspopup=\"dialog\"\n data-value={currentLocale.code}\n endIcon={\n <ChevronRight\n aria-hidden\n className=\"ds:size-4 ds:rtl:-scale-x-100\"\n />\n }\n onPointerDown={(event) => {\n activationRef.current = event.pointerType;\n }}\n onKeyDown={(event) =>\n handlePhoneRowKeyDown(event, 'language')\n }\n onSelect={(event) => {\n event.preventDefault();\n setPhoneView('language');\n }}\n >\n <SettingRowLabel\n label={languageLabel}\n value={currentLocale.nativeName}\n lang={currentLocale.code}\n />\n </DropdownMenu.Item>\n ) : (\n <LanguageSub locale={locale} />\n )}\n <DropdownMenu.Separator />\n {isPhone ? (\n <DropdownMenu.Item\n ref={appearanceRowRef}\n aria-haspopup=\"menu\"\n data-value={theme.theme}\n endIcon={\n <ChevronRight\n aria-hidden\n className=\"ds:size-4 ds:rtl:-scale-x-100\"\n />\n }\n onPointerDown={(event) => {\n activationRef.current = event.pointerType;\n }}\n onKeyDown={(event) =>\n handlePhoneRowKeyDown(event, 'appearance')\n }\n onSelect={(event) => {\n event.preventDefault();\n setPhoneView('appearance');\n }}\n >\n <SettingRowLabel\n label={appearanceLabel}\n value={\n appearanceOptions.find(\n (option) => option.value === theme.theme,\n )?.label ?? ''\n }\n />\n </DropdownMenu.Item>\n ) : (\n <DropdownMenu.ChoiceSub\n label={appearanceLabel}\n value={theme.theme}\n onValueChange={theme.setTheme}\n options={appearanceOptions}\n />\n )}\n {/* Writes through useTheme, so the document gets the\n `theme-accessible` class at once (including the Lexend\n swap for Latin scripts, see src/tokens/index.css). */}\n <DropdownMenu.SwitchItem\n checked={accessibleChecked}\n onCheckedChange={(next) =>\n theme.setAccessibility(next ? 'accessible' : 'default')\n }\n >\n {t('navigation.headerSettings.appearance.accessible')}\n </DropdownMenu.SwitchItem>\n </>\n )}\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n </div>\n );\n },\n);\n\nHeaderSettings.displayName = 'HeaderSettings';\n"],"names":["headerSettingsAgent","handle","args","applyDocumentAttrs","locale","root","LOCALE_META","wrapperVariants","cva","languageFlyoutClasses","panelVariants","phoneRowClasses","SettingRowLabel","label","value","lang","jsxs","jsx","isLocale","tag","LanguageSub","t","useTranslation","current","handleFocus","event","_a","handleKeyDownCapture","target","DropdownMenu","escapeEvent","LocalePicker","HeaderSettings","forwardRef","props","ref","align","size","disabled","initialLocaleFromHtmlLang","className","id","rest","theme","useTheme","setLocaleI18n","useLocale","useInitialLocale","forwardedRef","useRef","useImperativeHandle","isPhone","useMediaQuery","direction","useDocumentDirection","phoneView","setPhoneView","useState","view","panelRef","languageRowRef","appearanceRowRef","returnFocusRef","activationRef","useIsomorphicLayoutEffect","_b","_d","_c","section","row","_e","handlePhoneRowKeyDown","forwardKey","goBack","handlePhoneKeyDown","setLocaleWithPersistence","useCallback","next","persistLocalePreference","setLocaleRef","localeRef","themeRef","agentHandle","useMemo","useAgentRegistration","accessibleChecked","edgeMargin","useLengthTokenPx","languageLabel","appearanceLabel","currentLocale","appearanceOptions","backLabel","open","IconButton","Settings","Button","ArrowLeft","Fragment","option","ChevronRight"],"mappings":";;;;;;;;;;;;;;;;;;AAOO,MAAMA,KAA0D;AAAA,EACrE,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ1B,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,IAErC,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO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,oBAAA;AAAA,oBAMb,gBAAA1E;AAAA,sBAACY,EAAa;AAAA,sBAAb;AAAA,wBACC,SAASwD;AAAA,wBACT,iBAAiB,CAACR,MAChBlC,EAAM,iBAAiBkC,IAAO,eAAe,SAAS;AAAA,wBAGvD,YAAE,iDAAiD;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBACtD,EAAA,CACF;AAAA,gBAAA;AAAA,cAAA;AAAA,YAEJ;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAGN;AACF;AAEA7C,GAAe,cAAc;"}
@@ -2823,7 +2823,7 @@ const an = Mn(
2823
2823
  }
2824
2824
  );
2825
2825
  an.displayName = "HeatmapLegend";
2826
- const rn = () => import("./data-table-DTKGWUQm.js").then((e) => e.h).then((e) => ({
2826
+ const rn = () => import("./data-table-BlONA1rP.js").then((e) => e.h).then((e) => ({
2827
2827
  default: e.DataTable
2828
2828
  })), sa = Sn(rn);
2829
2829
  function xn() {
@@ -3647,4 +3647,4 @@ export {
3647
3647
  Dn as b,
3648
3648
  so as h
3649
3649
  };
3650
- //# sourceMappingURL=heatmap-Ba9cgfSY.js.map
3650
+ //# sourceMappingURL=heatmap-C2Rg-SV_.js.map