@alfadocs/ui-kit-debug 1.90.0 → 1.90.2

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 (172) hide show
  1. package/dist/_chunks/address-autocomplete-DR4Xn23Z.js +519 -0
  2. package/dist/_chunks/address-autocomplete-DR4Xn23Z.js.map +1 -0
  3. package/dist/_chunks/{address-fields-CfnXK8RT.js → address-fields-qxQkGwPf.js} +5 -5
  4. package/dist/_chunks/{address-fields-CfnXK8RT.js.map → address-fields-qxQkGwPf.js.map} +1 -1
  5. package/dist/_chunks/{ai-permission-notice-CoW22jx1.js → ai-permission-notice-VNh3W57L.js} +2 -2
  6. package/dist/_chunks/{ai-permission-notice-CoW22jx1.js.map → ai-permission-notice-VNh3W57L.js.map} +1 -1
  7. package/dist/_chunks/{anamnesis-summary-rows-DUMERHK3.js → anamnesis-summary-rows-EKPfVCmh.js} +662 -654
  8. package/dist/_chunks/anamnesis-summary-rows-EKPfVCmh.js.map +1 -0
  9. package/dist/_chunks/autocomplete-BXMcNoa3.js +562 -0
  10. package/dist/_chunks/autocomplete-BXMcNoa3.js.map +1 -0
  11. package/dist/_chunks/{balance-badge-cell-C9-hyfxy.js → balance-badge-cell-D9VhFp0L.js} +3 -3
  12. package/dist/_chunks/{balance-badge-cell-C9-hyfxy.js.map → balance-badge-cell-D9VhFp0L.js.map} +1 -1
  13. package/dist/_chunks/{booking-C0FoW8Yx.js → booking-CcE_oviI.js} +1896 -1859
  14. package/dist/_chunks/booking-CcE_oviI.js.map +1 -0
  15. package/dist/_chunks/browser-D5CD3WOj.js +565 -0
  16. package/dist/_chunks/browser-D5CD3WOj.js.map +1 -0
  17. package/dist/_chunks/{calendar-appointment-editor-dialog-D8Wkbm8_.js → calendar-appointment-editor-dialog-CiAGAX2t.js} +7 -7
  18. package/dist/_chunks/{calendar-appointment-editor-dialog-D8Wkbm8_.js.map → calendar-appointment-editor-dialog-CiAGAX2t.js.map} +1 -1
  19. package/dist/_chunks/{checkbox-BjDv-r3o.js → checkbox-a7Sh-dXb.js} +32 -31
  20. package/dist/_chunks/checkbox-a7Sh-dXb.js.map +1 -0
  21. package/dist/_chunks/{checkbox-group-Cw2H5qaq.js → checkbox-group-eGdv9fZc.js} +2 -2
  22. package/dist/_chunks/{checkbox-group-Cw2H5qaq.js.map → checkbox-group-eGdv9fZc.js.map} +1 -1
  23. package/dist/_chunks/{city-input-CJVGswxp.js → city-input-CA59CjnV.js} +2 -2
  24. package/dist/_chunks/{city-input-CJVGswxp.js.map → city-input-CA59CjnV.js.map} +1 -1
  25. package/dist/_chunks/{combobox-CDPm_n0p.js → combobox-D-gpgEDy.js} +314 -294
  26. package/dist/_chunks/combobox-D-gpgEDy.js.map +1 -0
  27. package/dist/_chunks/{country-select-DQ8q7ypA.js → country-select-BfmX9y5i.js} +2 -2
  28. package/dist/_chunks/{country-select-DQ8q7ypA.js.map → country-select-BfmX9y5i.js.map} +1 -1
  29. package/dist/_chunks/{data-table-D7EGpqOn.js → data-table-CqQgoNsU.js} +553 -552
  30. package/dist/_chunks/data-table-CqQgoNsU.js.map +1 -0
  31. package/dist/_chunks/{face-scheme-BgJGFDTa.js → face-scheme-BKSE98bo.js} +2 -2
  32. package/dist/_chunks/{face-scheme-BgJGFDTa.js.map → face-scheme-BKSE98bo.js.map} +1 -1
  33. package/dist/_chunks/{file-manager-DQbWBTfk.js → file-manager-BnI1ZWZu.js} +2 -2
  34. package/dist/_chunks/{file-manager-DQbWBTfk.js.map → file-manager-BnI1ZWZu.js.map} +1 -1
  35. package/dist/_chunks/{header-settings-BVhjndtV.js → header-settings-BeA2fnol.js} +24 -23
  36. package/dist/_chunks/header-settings-BeA2fnol.js.map +1 -0
  37. package/dist/_chunks/{heatmap-BJB6V9yJ.js → heatmap-fCxwNz2o.js} +2 -2
  38. package/dist/_chunks/{heatmap-BJB6V9yJ.js.map → heatmap-fCxwNz2o.js.map} +1 -1
  39. package/dist/_chunks/index-CpVcVNBu.js +2326 -0
  40. package/dist/_chunks/index-CpVcVNBu.js.map +1 -0
  41. package/dist/_chunks/{index.es-Bpb8_NrX.js → index.es-Beo-XicE.js} +2 -2
  42. package/dist/_chunks/{index.es-Bpb8_NrX.js.map → index.es-Beo-XicE.js.map} +1 -1
  43. package/dist/_chunks/jspdf.es.min-BW7y6yhl.js +9674 -0
  44. package/dist/_chunks/jspdf.es.min-BW7y6yhl.js.map +1 -0
  45. package/dist/_chunks/{link-cell-renderer-C0ynDik7.js → link-cell-renderer-CnCgudvq.js} +3 -3
  46. package/dist/_chunks/{link-cell-renderer-C0ynDik7.js.map → link-cell-renderer-CnCgudvq.js.map} +1 -1
  47. package/dist/_chunks/{login-dev-card-DYwbL5sD.js → login-dev-card-BZBR58mu.js} +2 -2
  48. package/dist/_chunks/{login-dev-card-DYwbL5sD.js.map → login-dev-card-BZBR58mu.js.map} +1 -1
  49. package/dist/_chunks/{map-view-Bvi06RVh.js → map-view-UrNgxBy3.js} +260 -237
  50. package/dist/_chunks/map-view-UrNgxBy3.js.map +1 -0
  51. package/dist/_chunks/{index.modern-BeRXQVdc.js → maps-core-gate-DkNqGkm3.js} +360 -319
  52. package/dist/_chunks/maps-core-gate-DkNqGkm3.js.map +1 -0
  53. package/dist/_chunks/{marketplace-app-shell-x_abo_ye.js → marketplace-app-shell-CmZx0Oam.js} +2 -2
  54. package/dist/_chunks/{marketplace-app-shell-x_abo_ye.js.map → marketplace-app-shell-CmZx0Oam.js.map} +1 -1
  55. package/dist/_chunks/{notes-panel-CZO1qsD-.js → notes-panel-Dywo6R55.js} +2 -2
  56. package/dist/_chunks/{notes-panel-CZO1qsD-.js.map → notes-panel-Dywo6R55.js.map} +1 -1
  57. package/dist/_chunks/{patient-details-D0P5eog5.js → patient-details-BUr7Oemx.js} +2 -2
  58. package/dist/_chunks/{patient-details-D0P5eog5.js.map → patient-details-BUr7Oemx.js.map} +1 -1
  59. package/dist/_chunks/{patient-field-row-R73dZJY6.js → patient-field-row-bJk8Q_qr.js} +5 -5
  60. package/dist/_chunks/{patient-field-row-R73dZJY6.js.map → patient-field-row-bJk8Q_qr.js.map} +1 -1
  61. package/dist/_chunks/patient-search-Ca9j5cWb.js +1306 -0
  62. package/dist/_chunks/patient-search-Ca9j5cWb.js.map +1 -0
  63. package/dist/_chunks/{patient-summary-card-6U74-ivO.js → patient-summary-card-CCQZ8X37.js} +2 -2
  64. package/dist/_chunks/{patient-summary-card-6U74-ivO.js.map → patient-summary-card-CCQZ8X37.js.map} +1 -1
  65. package/dist/_chunks/{periodontal-diagnosis-B9YmmVmM.js → periodontal-diagnosis-DD3hrg9X.js} +2 -2
  66. package/dist/_chunks/{periodontal-diagnosis-B9YmmVmM.js.map → periodontal-diagnosis-DD3hrg9X.js.map} +1 -1
  67. package/dist/_chunks/{permission-matrix-BoQjENGV.js → permission-matrix-BJ6sg3Zp.js} +3 -3
  68. package/dist/_chunks/{permission-matrix-BoQjENGV.js.map → permission-matrix-BJ6sg3Zp.js.map} +1 -1
  69. package/dist/_chunks/{practice-results-B61krlwu.js → practice-results-DQuOfqej.js} +2 -2
  70. package/dist/_chunks/{practice-results-B61krlwu.js.map → practice-results-DQuOfqej.js.map} +1 -1
  71. package/dist/_chunks/{province-select-CPdTwEob.js → province-select-D64whw0m.js} +2 -2
  72. package/dist/_chunks/{province-select-CPdTwEob.js.map → province-select-D64whw0m.js.map} +1 -1
  73. package/dist/_chunks/{registration-form-DmP3YUfp.js → registration-form-CRm6DaB9.js} +2 -2
  74. package/dist/_chunks/{registration-form-DmP3YUfp.js.map → registration-form-CRm6DaB9.js.map} +1 -1
  75. package/dist/_chunks/{reviews-panel-UzQQLb-z.js → reviews-panel-B7InBORU.js} +42 -41
  76. package/dist/_chunks/reviews-panel-B7InBORU.js.map +1 -0
  77. package/dist/_chunks/{rich-text-editor-BZTyxQBd.js → rich-text-editor-BfEu57dk.js} +3 -3
  78. package/dist/_chunks/{rich-text-editor-BZTyxQBd.js.map → rich-text-editor-BfEu57dk.js.map} +1 -1
  79. package/dist/_chunks/{slot-grid-Bb13H9Rl.js → slot-grid-DrwynKeN.js} +91 -89
  80. package/dist/_chunks/{slot-grid-Bb13H9Rl.js.map → slot-grid-DrwynKeN.js.map} +1 -1
  81. package/dist/_chunks/{task-editor-BOETWbjU.js → task-editor-CI1SKUNc.js} +2 -2
  82. package/dist/_chunks/{task-editor-BOETWbjU.js.map → task-editor-CI1SKUNc.js.map} +1 -1
  83. package/dist/_chunks/{use-appointment-details-read-CWN-nJCZ.js → use-appointment-details-read-BytPq3Ux.js} +2 -2
  84. package/dist/_chunks/{use-appointment-details-read-CWN-nJCZ.js.map → use-appointment-details-read-BytPq3Ux.js.map} +1 -1
  85. package/dist/_chunks/{voice-control-panel-BziKE-KK.js → voice-control-panel-BP0otrID.js} +2 -2
  86. package/dist/_chunks/{voice-control-panel-BziKE-KK.js.map → voice-control-panel-BP0otrID.js.map} +1 -1
  87. package/dist/_chunks/{workflow-webhook-action-DulCpCRz.js → workflow-webhook-action-B_nBJ_ht.js} +2 -2
  88. package/dist/_chunks/{workflow-webhook-action-DulCpCRz.js.map → workflow-webhook-action-B_nBJ_ht.js.map} +1 -1
  89. package/dist/agent-catalog.json +2 -2
  90. package/dist/agent-i18n/en.json +1 -1
  91. package/dist/components/_shared/maps-core-gate.d.ts +18 -0
  92. package/dist/components/_shared/maps-core-gate.d.ts.map +1 -0
  93. package/dist/components/address-autocomplete/address-autocomplete.d.ts.map +1 -1
  94. package/dist/components/address-autocomplete/index.js +1 -1
  95. package/dist/components/address-fields/index.js +1 -1
  96. package/dist/components/ai-permission-notice/index.js +1 -1
  97. package/dist/components/appointment-details-panel/index.js +1 -1
  98. package/dist/components/autocomplete/autocomplete.agent.d.ts.map +1 -1
  99. package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
  100. package/dist/components/autocomplete/index.js +1 -1
  101. package/dist/components/booking/booking.d.ts.map +1 -1
  102. package/dist/components/booking/details-form.d.ts.map +1 -1
  103. package/dist/components/booking/index.js +1 -1
  104. package/dist/components/checkbox/checkbox.d.ts.map +1 -1
  105. package/dist/components/checkbox/index.js +1 -1
  106. package/dist/components/checkbox-group/index.js +1 -1
  107. package/dist/components/city-input/index.js +1 -1
  108. package/dist/components/combobox/combobox.d.ts.map +1 -1
  109. package/dist/components/combobox/index.js +1 -1
  110. package/dist/components/country-select/index.js +1 -1
  111. package/dist/components/data-table/index.js +2 -2
  112. package/dist/components/data-table/toolbar.d.ts.map +1 -1
  113. package/dist/components/data-table/xlsx-export.d.ts +13 -0
  114. package/dist/components/data-table/xlsx-export.d.ts.map +1 -0
  115. package/dist/components/face-scheme/index.js +1 -1
  116. package/dist/components/file-manager/index.js +1 -1
  117. package/dist/components/header-settings/header-settings.d.ts +2 -1
  118. package/dist/components/header-settings/header-settings.d.ts.map +1 -1
  119. package/dist/components/header-settings/index.js +1 -1
  120. package/dist/components/heatmap/index.js +1 -1
  121. package/dist/components/map-view/index.js +1 -1
  122. package/dist/components/map-view/map-view.d.ts.map +1 -1
  123. package/dist/components/notes-panel/index.js +1 -1
  124. package/dist/components/patient-details/index.js +1 -1
  125. package/dist/components/patient-search/index.js +1 -1
  126. package/dist/components/patient-search/patient-search.d.ts.map +1 -1
  127. package/dist/components/patient-summary-card/index.js +1 -1
  128. package/dist/components/patient-table/index.js +1 -1
  129. package/dist/components/periodontal-diagnosis/index.js +1 -1
  130. package/dist/components/permission-matrix/index.js +1 -1
  131. package/dist/components/practice-results/index.js +1 -1
  132. package/dist/components/province-select/index.js +1 -1
  133. package/dist/components/reviews-panel/index.js +1 -1
  134. package/dist/components/reviews-panel/reviews-panel.d.ts.map +1 -1
  135. package/dist/components/rich-text-editor/index.js +1 -1
  136. package/dist/components/slot-grid/index.js +1 -1
  137. package/dist/components/slot-grid/slot-grid.d.ts.map +1 -1
  138. package/dist/components/task-editor/index.js +1 -1
  139. package/dist/components/voice-control-panel/index.js +1 -1
  140. package/dist/host-compat.css +1 -10
  141. package/dist/index.js +37 -37
  142. package/dist/patterns/anamnesis/anamnesis-export-download.d.ts +1 -1
  143. package/dist/patterns/anamnesis/anamnesis-export-download.d.ts.map +1 -1
  144. package/dist/patterns/anamnesis/anamnesis-export.d.ts +3 -1
  145. package/dist/patterns/anamnesis/anamnesis-export.d.ts.map +1 -1
  146. package/dist/patterns/anamnesis/index.js +1 -1
  147. package/dist/patterns/calendar/index.js +1 -1
  148. package/dist/patterns/login-form/index.js +1 -1
  149. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  150. package/dist/patterns/registration-form/index.js +1 -1
  151. package/dist/patterns/workflow-webhook-action/index.js +1 -1
  152. package/dist/tokens.css +1 -1
  153. package/package.json +4 -8
  154. package/dist/_chunks/address-autocomplete-bPR2mNBt.js +0 -498
  155. package/dist/_chunks/address-autocomplete-bPR2mNBt.js.map +0 -1
  156. package/dist/_chunks/anamnesis-summary-rows-DUMERHK3.js.map +0 -1
  157. package/dist/_chunks/autocomplete-CnB1mHGc.js +0 -539
  158. package/dist/_chunks/autocomplete-CnB1mHGc.js.map +0 -1
  159. package/dist/_chunks/booking-C0FoW8Yx.js.map +0 -1
  160. package/dist/_chunks/checkbox-BjDv-r3o.js.map +0 -1
  161. package/dist/_chunks/combobox-CDPm_n0p.js.map +0 -1
  162. package/dist/_chunks/data-table-D7EGpqOn.js.map +0 -1
  163. package/dist/_chunks/exceljs.min-D2MHbJsF.js +0 -23046
  164. package/dist/_chunks/exceljs.min-D2MHbJsF.js.map +0 -1
  165. package/dist/_chunks/header-settings-BVhjndtV.js.map +0 -1
  166. package/dist/_chunks/index.modern-BeRXQVdc.js.map +0 -1
  167. package/dist/_chunks/jspdf.es.min-Cal6Nuw_.js +0 -10007
  168. package/dist/_chunks/jspdf.es.min-Cal6Nuw_.js.map +0 -1
  169. package/dist/_chunks/map-view-Bvi06RVh.js.map +0 -1
  170. package/dist/_chunks/patient-search-CCOUZABE.js +0 -1196
  171. package/dist/_chunks/patient-search-CCOUZABE.js.map +0 -1
  172. package/dist/_chunks/reviews-panel-UzQQLb-z.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkbox-BjDv-r3o.js","sources":["../../src/components/checkbox/checkbox-group-context.ts","../../src/components/checkbox/checkbox.agent.ts","../../src/components/checkbox/checkbox.tsx"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nexport interface CheckboxGroupContextShape {\n name?: string;\n value: Set<string>;\n toggle: (itemValue: string) => void;\n disabled: boolean;\n}\n\nexport const CheckboxGroupContext =\n createContext<CheckboxGroupContextShape | null>(null);\n\nexport function useCheckboxGroup(): CheckboxGroupContextShape | null {\n return useContext(CheckboxGroupContext);\n}\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — Checkbox. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { CheckboxHandle } from './checkbox';\n\nexport const checkboxAgent: AgentAdapter<CheckboxHandle> = {\n id: 'checkbox',\n // A checkbox is a boolean toggle, not a one-of-N picker — `set_value`,\n // not `select_single` (which is reserved for choosing one item among many).\n capabilities: ['set_value'],\n state: {\n checked: {\n type: 'boolean | \"indeterminate\"',\n descriptionKey: 'ui.agent.checkbox.state.checked',\n description: 'Current checked state.',\n read: (handle) => handle.getChecked(),\n },\n },\n actions: {\n set_checked: {\n safety: 'write',\n argsType: '{ checked: boolean | \"indeterminate\" }',\n argsSchema: {\n type: 'object',\n properties: {\n checked: {\n oneOf: [{ type: 'boolean' }, { const: 'indeterminate' }],\n description:\n 'Target state: true, false, or the tri-state \"indeterminate\".',\n },\n },\n required: ['checked'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.checkbox.actions.setChecked',\n description: 'Set the checked state to a specific value.',\n examples: [{ args: { checked: true }, note: 'Tick the box.' }],\n invoke: (handle, args: { checked: boolean | 'indeterminate' }) => {\n handle.setChecked(args.checked);\n },\n },\n toggle: {\n safety: 'write',\n descriptionKey: 'ui.agent.checkbox.actions.toggle',\n description: 'Flip the checked state between checked and unchecked.',\n invoke: (handle) => {\n handle.toggle();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'checkbox',\n description: 'Marks the Checkbox wrapper.',\n },\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 useId,\n useMemo,\n useRef,\n type ComponentPropsWithoutRef,\n type ReactNode,\n} from 'react';\nimport * as RadixCheckbox from '@radix-ui/react-checkbox';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useControllableState } from '../../hooks/use-controllable-state';\nimport { useCheckboxGroup } from './checkbox-group-context';\nimport { Tooltip } from '../tooltip';\nimport { useAgentRegistration } from '../../agent';\nimport { checkboxAgent } from './checkbox.agent';\n\n/** Agent-readiness curated handle for Checkbox. */\nexport interface CheckboxHandle {\n getChecked: () => boolean | 'indeterminate';\n setChecked: (checked: boolean | 'indeterminate') => void;\n toggle: () => void;\n}\n\nconst drawClasses = [\n 'ds:[stroke-dasharray:1] ds:[stroke-dashoffset:1]',\n 'ds:animate-[checkbox-indicator-draw_var(--animation-duration)_ease-out_forwards]',\n].join(' ');\n\nfunction CheckIcon({ className }: { className?: string }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n data-slot=\"checkbox-check-icon\"\n className={className}\n >\n <path pathLength=\"1\" d=\"M5 12l5 5L20 7\" className={drawClasses} />\n </svg>\n );\n}\n\nfunction IndeterminateIcon({ className }: { className?: string }) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n aria-hidden=\"true\"\n data-slot=\"checkbox-indeterminate-icon\"\n className={className}\n >\n <path pathLength=\"1\" d=\"M5 12h14\" className={drawClasses} />\n </svg>\n );\n}\n\nconst checkboxVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:justify-center ds:shrink-0',\n // The off-state edge is all that marks the box, so `--border` is\n // re-pointed at the 3:1 `--control-border` here. A host still on an\n // older token sheet lacks this class and keeps the soft edge.\n 'ds:[--border:var(--control-border)]',\n 'ds:border ds:border-border ds:rounded-[var(--radius-sm)] ds:bg-background',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:disabled:cursor-not-allowed ds:disabled:opacity-50',\n 'ds:data-[state=checked]:bg-primary ds:data-[state=checked]:border-primary',\n 'ds:data-[state=indeterminate]:bg-primary ds:data-[state=indeterminate]:border-primary',\n 'ds:relative ds:before:absolute ds:before:inset-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[\"\"]',\n ].join(' '),\n {\n variants: {\n // Per-size `mt` centers the box optically on the first line of the\n // label using the type-label line-box height — important when the\n // label wraps, because the wrapper uses `items-start` so children\n // align to the top edge rather than the multi-line block's centre.\n size: {\n sm: 'ds:size-3.5 ds:mt-[calc((var(--type-label-size)*var(--type-label-line-height)-0.875rem)/2)]',\n md: 'ds:size-4 ds:mt-[calc((var(--type-label-size)*var(--type-label-line-height)-1rem)/2)]',\n lg: 'ds:size-5 ds:mt-[calc((var(--type-label-size)*var(--type-label-line-height)-1.25rem)/2)]',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n },\n);\n\ntype RadixRootProps = ComponentPropsWithoutRef<typeof RadixCheckbox.Root>;\n\nexport interface CheckboxProps\n extends\n Omit<RadixRootProps, 'checked' | 'onCheckedChange' | 'children'>,\n VariantProps<typeof checkboxVariants> {\n /**\n * Visible label rendered next to the box. Accepts a string or any React\n * node — useful for consent labels that embed a privacy / T&C link.\n */\n label: ReactNode;\n checked?: boolean | 'indeterminate';\n onCheckedChange?: (checked: boolean | 'indeterminate') => void;\n size?: 'sm' | 'md' | 'lg';\n disabledReason?: string;\n value?: string;\n}\n\nexport const Checkbox = forwardRef<HTMLButtonElement, CheckboxProps>(\n (\n {\n label,\n checked,\n onCheckedChange,\n size = 'md',\n disabled,\n disabledReason,\n name,\n value,\n id,\n className,\n ...props\n },\n ref,\n ) => {\n const generatedId = useId();\n const checkboxId = id ?? generatedId;\n const group = useCheckboxGroup();\n\n const inGroup = group !== null && value !== undefined;\n const [ownCheckedRaw, setOwnChecked] = useControllableState<\n boolean | 'indeterminate'\n >({\n value: checked,\n defaultValue: false,\n onChange: onCheckedChange,\n });\n const ownChecked = ownCheckedRaw ?? false;\n const effectiveChecked = inGroup ? group.value.has(value) : ownChecked;\n const effectiveOnChange = inGroup\n ? () => group.toggle(value)\n : (next: boolean | 'indeterminate') => {\n setOwnChecked(next);\n };\n const effectiveName = group?.name ?? name;\n const effectiveDisabled = group?.disabled || disabled;\n\n const checkedRef = useRef<boolean | 'indeterminate'>(\n effectiveChecked ?? false,\n );\n checkedRef.current = effectiveChecked ?? false;\n\n const agentHandle = useMemo<CheckboxHandle>(\n () => ({\n getChecked: () => checkedRef.current,\n setChecked: (next) => {\n if (inGroup) {\n // Inside a group: toggle implements set via the group context.\n const isOn =\n checkedRef.current === true ||\n checkedRef.current === 'indeterminate';\n const want = next === true || next === 'indeterminate';\n if (isOn !== want) group.toggle(value);\n return;\n }\n setOwnChecked(next);\n },\n toggle: () => {\n if (inGroup) {\n group.toggle(value);\n return;\n }\n const next =\n checkedRef.current === true ||\n checkedRef.current === 'indeterminate'\n ? false\n : true;\n setOwnChecked(next);\n },\n }),\n [inGroup, group, value, setOwnChecked],\n );\n useAgentRegistration(checkboxAgent, agentHandle, id);\n\n // `text-primary-foreground` lives on the SVG (not the <button> Root) so\n // a legacy consumer rule like `button, input, … { color: inherit }`\n // can't intercept it — the unlayered consumer rule would beat any\n // @layer utilities rule on the button itself, leaving the tick paint\n // (currentColor) inheriting the consumer's body text colour. See\n // styles.css for the matching form-element revert inside [data-component].\n const iconSizeClass = [\n 'ds:text-primary-foreground',\n size === 'sm' ? 'ds:size-3' : size === 'lg' ? 'ds:size-4' : 'ds:size-3.5',\n ].join(' ');\n\n const labelClasses = [\n 'type-label ds:text-foreground ds:select-none',\n effectiveDisabled\n ? 'ds:cursor-not-allowed ds:opacity-50'\n : 'ds:cursor-pointer',\n ].join(' ');\n\n const content = (\n <div\n data-component=\"checkbox\"\n data-component-id={id}\n data-option-id={value}\n className=\"ds:inline-flex ds:items-start ds:gap-[var(--spacing-sm)]\"\n >\n <RadixCheckbox.Root\n ref={ref}\n id={checkboxId}\n checked={effectiveChecked}\n onCheckedChange={effectiveOnChange}\n disabled={effectiveDisabled}\n aria-disabled={effectiveDisabled || undefined}\n name={effectiveName}\n value={value}\n className={checkboxVariants({ size, className })}\n {...props}\n >\n <RadixCheckbox.Indicator>\n {effectiveChecked === 'indeterminate' ? (\n <IndeterminateIcon className={iconSizeClass} />\n ) : (\n <CheckIcon className={iconSizeClass} />\n )}\n </RadixCheckbox.Indicator>\n </RadixCheckbox.Root>\n <label htmlFor={checkboxId} className={labelClasses}>\n {label}\n </label>\n </div>\n );\n\n if (effectiveDisabled && disabledReason) {\n return <Tooltip label={disabledReason}>{content}</Tooltip>;\n }\n\n return content;\n },\n);\n\nCheckbox.displayName = 'Checkbox';\n"],"names":["CheckboxGroupContext","createContext","useCheckboxGroup","useContext","checkboxAgent","handle","args","drawClasses","CheckIcon","className","jsx","IndeterminateIcon","checkboxVariants","cva","Checkbox","forwardRef","label","checked","onCheckedChange","size","disabled","disabledReason","name","value","id","props","ref","generatedId","useId","checkboxId","group","inGroup","ownCheckedRaw","setOwnChecked","useControllableState","effectiveChecked","effectiveOnChange","next","effectiveName","effectiveDisabled","checkedRef","useRef","agentHandle","useMemo","useAgentRegistration","iconSizeClass","labelClasses","content","jsxs","RadixCheckbox","Tooltip"],"mappings":";;;;;;;AASO,MAAMA,IACXC,EAAgD,IAAI;AAE/C,SAASC,I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MqB,IAAgB;AAAA,MACpB;AAAA,MACA1B,MAAS,OAAO,cAAcA,MAAS,OAAO,cAAc;AAAA,IAAA,EAC5D,KAAK,GAAG,GAEJ2B,IAAe;AAAA,MACnB;AAAA,MACAP,IACI,wCACA;AAAA,IAAA,EACJ,KAAK,GAAG,GAEJQ,IACJ,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,kBAAe;AAAA,QACf,qBAAmBxB;AAAA,QACnB,kBAAgBD;AAAA,QAChB,WAAU;AAAA,QAEV,UAAA;AAAA,UAAA,gBAAAb;AAAA,YAACuC,EAAc;AAAA,YAAd;AAAA,cACC,KAAAvB;AAAA,cACA,IAAIG;AAAA,cACJ,SAASM;AAAA,cACT,iBAAiBC;AAAA,cACjB,UAAUG;AAAA,cACV,iBAAeA,KAAqB;AAAA,cACpC,MAAMD;AAAA,cACN,OAAAf;AAAA,cACA,WAAWX,EAAiB,EAAE,MAAAO,GAAM,WAAAV,GAAW;AAAA,cAC9C,GAAGgB;AAAA,cAEJ,UAAA,gBAAAf,EAACuC,EAAc,WAAd,EACE,gBAAqB,kBACpB,gBAAAvC,EAACC,GAAA,EAAkB,WAAWkC,GAAe,IAE7C,gBAAAnC,EAACF,GAAA,EAAU,WAAWqC,GAAe,EAAA,CAEzC;AAAA,YAAA;AAAA,UAAA;AAAA,4BAED,SAAA,EAAM,SAAShB,GAAY,WAAWiB,GACpC,UAAA9B,EAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAIJ,WAAIuB,KAAqBlB,IAChB,gBAAAX,EAACwC,GAAA,EAAQ,OAAO7B,GAAiB,UAAA0B,GAAQ,IAG3CA;AAAA,EACT;AACF;AAEAjC,EAAS,cAAc;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"combobox-CDPm_n0p.js","sources":["../../src/components/combobox/combobox.agent.ts","../../src/components/combobox/combobox.tsx"],"sourcesContent":["import type { AgentAdapter } from '../../agent/types';\nimport type { ComboboxHandle } from './combobox';\n\nexport const comboboxAgent: AgentAdapter<ComboboxHandle> = {\n id: 'combobox',\n // Persisted single choice (value state + set_value) → select_single + set_value,\n // plus type-to-filter and open/close of the option list.\n capabilities: ['select_single', 'set_value', 'filter', 'open', 'close'],\n state: {\n value: {\n type: 'string | null',\n descriptionKey: 'ui.agent.combobox.state.value',\n description:\n 'Currently-selected option value, or null when nothing is selected.',\n read: (handle) => handle.getValue(),\n },\n query: {\n type: 'string',\n descriptionKey: 'ui.agent.combobox.state.query',\n description: 'Current filter query in the combobox input.',\n read: (handle) => handle.getQuery(),\n },\n isOpen: {\n type: 'boolean',\n descriptionKey: 'ui.agent.combobox.state.isOpen',\n description: 'True when the option list is visible.',\n read: (handle) => handle.getIsOpen(),\n },\n },\n actions: {\n set_value: {\n // Persists the user's chosen option — reversible via the same UI.\n safety: 'write',\n argsType: '{ value: string | null }',\n argsSchema: {\n type: 'object',\n properties: {\n value: {\n type: ['string', 'null'],\n description: 'Option value to select, or null to clear.',\n },\n },\n required: ['value'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.combobox.actions.setValue',\n description: 'Set the selected value programmatically.',\n examples: [{ args: { value: 'it' }, note: 'Select the \"it\" option.' }],\n invoke: (handle, args: { value: string | null }) => {\n handle.setValue(args.value);\n },\n },\n apply_filter: {\n // Pure ephemeral filter of the visible options — no persisted change.\n safety: 'read',\n argsType: '{ query: string }',\n argsSchema: {\n type: 'object',\n properties: {\n query: { type: 'string', description: 'Filter text for the list.' },\n },\n required: ['query'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.combobox.actions.applyFilter',\n description: 'Set the filter query for the option list.',\n invoke: (handle, args: { query: string }) => {\n handle.setQuery(args.query);\n },\n },\n clear_selection: {\n // Discards the persisted choice — destructive (loses the selection).\n safety: 'destructive',\n idempotent: true,\n descriptionKey: 'ui.agent.combobox.actions.clearSelection',\n description: 'Clear the current selection.',\n invoke: (handle) => {\n handle.clear();\n },\n },\n open: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.combobox.actions.open',\n description: 'Open the option list.',\n invoke: (handle) => {\n handle.open();\n },\n },\n close: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.combobox.actions.close',\n description: 'Close the option list.',\n invoke: (handle) => {\n handle.close();\n },\n },\n },\n domHooks: {\n root: { attr: 'data-component', value: 'combobox' },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n item: {\n attr: 'data-option-id',\n description: 'Each option emits its value as data-option-id.',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n type KeyboardEvent,\n type MouseEvent,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from 'react';\nimport * as Popover from '@radix-ui/react-popover';\nimport { Command, defaultFilter, useCommandState } from 'cmdk';\nimport { cva } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Check, X } from 'lucide-react';\nimport {\n FormFieldContext,\n useFormField,\n useFormFieldControlRef,\n} from '../form-field/form-field-context';\nimport type { OptionShape } from '../_shared/option';\nimport { composeRefs } from '../_shared/compose-refs';\nimport { normalizeDiacritics } from '../_shared/normalize-diacritics';\nimport { groupOptions } from '../_shared/group-options';\nimport { MENU_ROW_HIGHLIGHT } from '../_shared/menu-row';\nimport {\n OPTION_BODY_CLASSES,\n OPTION_END_CLASSES,\n OPTION_LABEL_ROW_CLASSES,\n optionDescriptionVariants,\n optionLabelVariants,\n} from '../_shared/option-row';\nimport { useControllableState } from '../../hooks/use-controllable-state';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport {\n INPUT_SURFACE_CHROME,\n INPUT_SURFACE_HEIGHT,\n INPUT_SURFACE_PADDING_X,\n INPUT_SURFACE_TONE,\n} from '../_shared/input-surface';\nimport { useAgentRegistration } from '../../agent';\nimport { comboboxAgent } from './combobox.agent';\n\nexport type ComboboxOption<T extends string = string> = OptionShape<T>;\n\n// Curated agent-readiness handle — see combobox.agent.ts.\nexport interface ComboboxHandle {\n getValue: () => string | null;\n getQuery: () => string;\n getIsOpen: () => boolean;\n setValue: (value: string | null) => void;\n setQuery: (query: string) => void;\n clear: () => void;\n open: () => void;\n close: () => void;\n}\n\nexport interface ComboboxProps<T extends string = string> {\n options: ComboboxOption<T>[];\n value?: T | '';\n defaultValue?: T;\n onValueChange?: (value: T | '') => void;\n placeholder?: string;\n clearable?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n name?: string;\n id?: string;\n size?: 'sm' | 'md' | 'lg';\n tone?: 'default' | 'error';\n /** Custom score. All three arguments are diacritics-stripped and\n * lower-cased. `label` is the option's label ('' for the create row).\n * The filter is not consulted while the query is still the chosen\n * option's own label: then every option shows. */\n filter?: (value: string, search: string, label: string) => number;\n allowCreate?: boolean;\n onCreate?: (value: string) => void;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Query typed by the user (including IME commits and Clear), or set\n * through the agent handle. Selection and closing do not emit queries.\n * Pair with `filter` for host-provided results and `emptyMessage` for\n * their state. This callback also fires when there are no options. */\n onQueryChange?: (query: string) => void;\n emptyMessage?: ReactNode;\n 'aria-label'?: string;\n /**\n * Invalid-state fallback for use OUTSIDE a `<FormField>` (e.g. an inline\n * editor). Inside a FormField the context wins. Drives the error border and\n * the input's `aria-invalid`.\n */\n 'aria-invalid'?: boolean;\n /**\n * Error-message id fallback for use OUTSIDE a `<FormField>`. Inside a\n * FormField the context's `describedBy` wins.\n */\n 'aria-describedby'?: string;\n /**\n * The input's HTML `autocomplete` token (e.g. `country`,\n * `address-level1`, WCAG 2.1 §1.3.5). With a token, the browser can fill\n * the field from a saved address: text it fills in is matched to an\n * option (see `matchAutofill`) and that option is chosen.\n */\n autoComplete?: string;\n /**\n * Which option the browser's filled-in text means: return its `value`,\n * or `undefined` for none. Used only with `autoComplete`. The default\n * matches an option's value or label, ignoring case and accents.\n */\n matchAutofill?: (text: string) => string | undefined;\n /**\n * Let a long option label wrap onto a second line instead of ending in an\n * ellipsis. Longer still, it is clipped after two lines. Off by default.\n * An option's `description` always sits on its own line under the label.\n */\n wrapOptionLabels?: boolean;\n className?: string;\n}\n\nconst comboboxInputVariants = cva(\n [\n 'ds:peer ds:w-full ds:bg-transparent ds:text-foreground ds:placeholder:text-muted-foreground',\n 'ds:outline-none ds:border-0',\n 'ds:disabled:cursor-not-allowed',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:text-[length:var(--font-size-sm)]',\n md: 'ds:text-[length:var(--font-size-base)]',\n lg: 'ds:text-[length:var(--font-size-lg)]',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n },\n);\n\nconst comboboxWrapperVariants = cva(\n [\n 'ds:group ds:relative ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)] ds:w-full',\n INPUT_SURFACE_CHROME,\n ].join(' '),\n {\n variants: {\n size: {\n sm: `${INPUT_SURFACE_HEIGHT.sm} ${INPUT_SURFACE_PADDING_X.sm}`,\n md: `${INPUT_SURFACE_HEIGHT.md} ${INPUT_SURFACE_PADDING_X.md}`,\n lg: `${INPUT_SURFACE_HEIGHT.lg} ${INPUT_SURFACE_PADDING_X.lg}`,\n },\n tone: INPUT_SURFACE_TONE,\n },\n defaultVariants: {\n size: 'md',\n tone: 'default',\n },\n },\n);\n\nconst comboboxContentVariants = cva(\n [\n 'ds:z-[var(--z-popover)] ds:overflow-hidden ds:w-[var(--radix-popover-trigger-width)]',\n // A guard: the list is as wide as the field, so only a field that is\n // itself wider than the screen could take it past the edge.\n 'ds:max-w-[var(--radix-popover-content-available-width)]',\n 'ds:rounded-[var(--radius-md)] ds:border ds:border-border ds:bg-background ds:text-foreground',\n 'ds:shadow-[var(--shadow-lg)]',\n 'ds:animate-in ds:fade-in ds:zoom-in-95',\n 'ds:data-[state=closed]:animate-out ds:data-[state=closed]:fade-out',\n 'ds:data-[state=closed]:zoom-out-95',\n 'ds:data-[side=bottom]:slide-in-from-top-2',\n 'ds:data-[side=top]:slide-in-from-bottom-2',\n 'ds:motion-reduce:animate-none',\n ].join(' '),\n);\n\nconst comboboxItemVariants = cva(\n [\n 'ds:relative ds:flex ds:cursor-pointer ds:items-center ds:gap-[var(--spacing-sm)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:text-foreground ds:outline-none ds:select-none',\n MENU_ROW_HIGHLIGHT.selected,\n 'ds:aria-disabled:pointer-events-none ds:aria-disabled:opacity-50',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:min-h-8 ds:ps-3 ds:pe-3 ds:text-[length:var(--font-size-sm)]',\n md: 'ds:min-h-[var(--min-target-size)] ds:ps-3 ds:pe-3 ds:text-[length:var(--font-size-base)]',\n lg: 'ds:min-h-12 ds:ps-4 ds:pe-4 ds:text-[length:var(--font-size-lg)]',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n },\n);\n\nconst comboboxGroupHeadingClasses = [\n 'ds:ps-3 ds:pe-3 ds:py-1.5',\n 'type-eyebrow ds:text-muted-foreground',\n].join(' ');\n\nconst comboboxListClasses =\n 'ds:max-h-[18rem] ds:overflow-y-auto ds:p-[var(--spacing-xs)]';\n\nconst comboboxEmptyClasses =\n 'ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground';\n\nconst iconSizeBySize = {\n sm: 'ds:size-3.5',\n md: 'ds:size-4',\n lg: 'ds:size-5',\n} as const;\n\ninterface CreateRowProps {\n search: string;\n label: string;\n iconClass: string;\n size: 'sm' | 'md' | 'lg';\n onSelect: (value: string) => void;\n}\n\nfunction ComboboxCreateRow({\n search,\n label,\n iconClass,\n size,\n onSelect,\n}: CreateRowProps): ReactElement | null {\n // Only surface the create row when no existing item matches the query.\n const filteredCount = useCommandState((state) => state.filtered.count);\n if (filteredCount > 0) return null;\n return (\n <Command.Item\n value={`__combobox-create__${search}`}\n keywords={[]}\n forceMount\n onSelect={() => onSelect(search)}\n className={comboboxItemVariants({ size })}\n >\n <span\n aria-hidden=\"true\"\n className={`ds:inline-flex ds:items-center ds:justify-center ${iconClass}`}\n />\n <span className=\"ds:flex-1 ds:truncate\">{label}</span>\n </Command.Item>\n );\n}\n\nconst ComboboxImpl = forwardRef<HTMLInputElement, ComboboxProps>(\n function Combobox(\n {\n options,\n value,\n defaultValue,\n onValueChange,\n placeholder,\n clearable = false,\n disabled,\n readOnly,\n required,\n name,\n id,\n size = 'md',\n tone = 'default',\n filter: externalFilter,\n allowCreate = false,\n onCreate,\n open: openProp,\n onOpenChange,\n onQueryChange,\n emptyMessage,\n className,\n 'aria-label': ariaLabel,\n 'aria-invalid': ariaInvalid,\n 'aria-describedby': ariaDescribedBy,\n autoComplete,\n matchAutofill,\n wrapOptionLabels = false,\n },\n ref,\n ) {\n const { t } = useTranslation('ui');\n const ctx = useFormField();\n const inFormField = useContext(FormFieldContext) !== null;\n\n const [currentValueRaw, setComboboxValue] = useControllableState<string>({\n value,\n defaultValue: defaultValue ?? '',\n onChange: onValueChange as ((next: string) => void) | undefined,\n });\n const currentValue = currentValueRaw ?? '';\n\n const selectedOption = useMemo(\n () => options.find((o) => o.value === currentValue),\n [options, currentValue],\n );\n const selectedLabel = selectedOption?.label ?? '';\n\n const [search, setSearch] = useState<string>(selectedLabel);\n const [internalOpen, setInternalOpen] = useState(false);\n const isOpenControlled = openProp !== undefined;\n const open = isOpenControlled ? openProp : internalOpen;\n const composingRef = useRef(false);\n /* The query is still the chosen option's own label: nothing typed yet. */\n const untouched = selectedLabel !== '' && search === selectedLabel;\n\n const inputRef = useRef<HTMLInputElement>(null);\n const anchorRef = useRef<HTMLDivElement>(null);\n const listRef = useRef<HTMLDivElement>(null);\n\n /* cmdk writes its own id on the input and focuses it by that id, so\n the field's label follows that id. */\n useFormFieldControlRef(ctx, inputRef);\n\n /* cmdk's relevance sort moves DOM nodes. Remounting the list once the\n query is untouched again puts the options back in source order. */\n const [listEpoch, setListEpoch] = useState(0);\n const listMountedRef = useRef(false);\n useIsomorphicLayoutEffect(() => {\n /* The first render is already in source order. */\n if (!listMountedRef.current) {\n listMountedRef.current = true;\n return;\n }\n if (untouched) setListEpoch((n) => n + 1);\n }, [untouched]);\n\n /* Whether the user has reached a row since the list opened or the\n query changed: arrow keys, Home, End or the pointer. */\n const navigatedRef = useRef(false);\n useEffect(() => {\n navigatedRef.current = false;\n }, [search, open]);\n /* True while the kit itself makes the chosen option the active row. */\n const activatingRef = useRef(false);\n\n /* Opening on an untouched value shows the chosen option mid-list.\n Rect maths rather than scrollIntoView, which would scroll the page. */\n useIsomorphicLayoutEffect(() => {\n if (!open || !untouched || !currentValue) return;\n const list = listRef.current;\n const item = list?.querySelector<HTMLElement>(\n `[data-option-id=\"${CSS.escape(currentValue)}\"]`,\n );\n if (!list || !item) return;\n const listRect = list.getBoundingClientRect();\n const itemRect = item.getBoundingClientRect();\n /* The opening zoom scales both rects; scrollTop is unscaled. */\n const scale =\n list.offsetHeight > 0 ? listRect.height / list.offsetHeight : 1;\n const offset = (itemRect.top - listRect.top) / (scale || 1);\n const itemHeight = itemRect.height / (scale || 1);\n list.scrollTop += offset - (list.clientHeight - itemHeight) / 2;\n /* The chosen option becomes the active row, so the arrow keys move on\n from it. cmdk's pointer path sets the row and the input's\n aria-activedescendant without scrolling. */\n activatingRef.current = true;\n try {\n item.dispatchEvent(new PointerEvent('pointermove', { bubbles: true }));\n } finally {\n activatingRef.current = false;\n }\n /* Only on opening: reading the value later must not scroll. */\n }, [open]);\n\n const autofillToken =\n autoComplete && autoComplete !== 'off' ? autoComplete : undefined;\n useIsomorphicLayoutEffect(() => {\n const input = inputRef.current;\n if (!input) return;\n input.setAttribute('aria-expanded', String(open));\n /* cmdk writes autocomplete=\"off\" over the prop on every render. */\n if (autofillToken) input.setAttribute('autocomplete', autofillToken);\n });\n\n /* Text the browser fills in arrives as an input event that is not\n typing: no input type, or a replacement. The listener sits on the\n input itself, so it runs before React hands the change to cmdk. */\n const autofilledRef = useRef(false);\n useEffect(() => {\n const input = inputRef.current;\n if (!input || !autofillToken) return;\n const onInput = (event: Event) => {\n const inputType = (event as InputEvent).inputType;\n autofilledRef.current =\n !inputType || inputType === 'insertReplacementText';\n };\n input.addEventListener('input', onInput);\n return () => input.removeEventListener('input', onInput);\n }, [autofillToken]);\n\n useEffect(() => {\n if (!open) {\n setSearch(selectedLabel);\n }\n }, [selectedLabel, open]);\n\n const effectiveDisabled =\n (inFormField ? ctx.disabled : false) || Boolean(disabled);\n const effectiveReadOnly = Boolean(readOnly);\n const effectiveRequired =\n (inFormField ? ctx.required : false) || Boolean(required);\n const effectiveInvalid = inFormField ? ctx.invalid : Boolean(ariaInvalid);\n const effectiveTone = effectiveInvalid ? 'error' : tone;\n const describedBy =\n inFormField && ctx.describedBy ? ctx.describedBy : ariaDescribedBy;\n\n const resolvedPlaceholder =\n placeholder ?? t('inputs.combobox.placeholder', 'Search…');\n\n const filterFn = useMemo(\n () => (candidate: string, searchStr: string, keywords?: string[]) => {\n if (composingRef.current) return 1;\n /* Untouched query: every option shows, whatever the filter says. */\n if (selectedLabel !== '' && searchStr === selectedLabel) return 1;\n const normalizedCandidate = normalizeDiacritics(candidate);\n const normalizedSearch = normalizeDiacritics(searchStr);\n const normalizedKeywords = keywords?.map(normalizeDiacritics);\n if (externalFilter) {\n return externalFilter(\n normalizedCandidate,\n normalizedSearch,\n normalizedKeywords?.[0] ?? '',\n );\n }\n return defaultFilter(\n normalizedCandidate,\n normalizedSearch,\n normalizedKeywords,\n );\n },\n [externalFilter, selectedLabel],\n );\n\n const commit = (next: string) => {\n setComboboxValue(next);\n };\n\n const setOpen = (next: boolean) => {\n if (!isOpenControlled) setInternalOpen(next);\n onOpenChange?.(next);\n };\n\n const handleSelect = (optValue: string) => {\n const option = options.find((o) => o.value === optValue);\n commit(optValue);\n setSearch(option?.label ?? '');\n setOpen(false);\n };\n\n const handleCreate = (nextValue: string) => {\n onCreate?.(nextValue);\n setOpen(false);\n };\n\n const optionForAutofill = (text: string) => {\n const wanted = normalizeDiacritics(text.trim());\n if (!wanted) return undefined;\n const match = matchAutofill\n ? matchAutofill(text.trim())\n : options.find(\n (o) =>\n normalizeDiacritics(o.value) === wanted ||\n normalizeDiacritics(o.label) === wanted,\n )?.value;\n return options.find((o) => o.value === match && !o.disabled);\n };\n\n const handleSearchChange = (next: string) => {\n if (effectiveReadOnly) return;\n if (autofilledRef.current) {\n autofilledRef.current = false;\n const option = optionForAutofill(next);\n if (option) {\n commit(option.value);\n setSearch(option.label);\n if (open) setOpen(false);\n return;\n }\n /* Filled from another field and no option means it: the list\n must not open over a field the user is not in. */\n if (document.activeElement !== inputRef.current) {\n setSearch(selectedLabel);\n return;\n }\n }\n setSearch(next);\n if (!composingRef.current) onQueryChange?.(next);\n if (!open && next.length > 0 && !composingRef.current) {\n setOpen(true);\n }\n };\n\n const handleFocus = () => {\n if (!effectiveDisabled && !effectiveReadOnly) setOpen(true);\n };\n\n /* A pick keeps focus in the input, so no focus event follows. A\n click on the focused input reopens the list instead. */\n const handleClick = () => {\n if (!open && !effectiveDisabled && !effectiveReadOnly) setOpen(true);\n };\n\n const handleCompositionStart = () => {\n composingRef.current = true;\n };\n\n const handleCompositionEnd = () => {\n composingRef.current = false;\n if (effectiveReadOnly) return;\n const next = inputRef.current?.value ?? '';\n setSearch(next);\n onQueryChange?.(next);\n if (next.length > 0) setOpen(true);\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.nativeEvent.isComposing) return;\n if (\n (event.key === 'ArrowDown' || event.key === 'ArrowUp') &&\n !open &&\n !effectiveDisabled &&\n !effectiveReadOnly\n ) {\n /* The arrow that opens the list only opens it. The next arrow\n moves on from the chosen option, or from the top. */\n event.preventDefault();\n setOpen(true);\n return;\n }\n if (\n event.key === 'ArrowDown' ||\n event.key === 'ArrowUp' ||\n event.key === 'Home' ||\n event.key === 'End' ||\n /* cmdk's own Ctrl+N, J, P and K move the highlight too. */\n (event.ctrlKey && ['n', 'j', 'p', 'k'].includes(event.key))\n ) {\n navigatedRef.current = true;\n }\n /* Handled before cmdk sees it: Enter commits only a row the user\n reached, never from a closed list. On an untouched open the lit\n row is the chosen option, so keeping the value matches it. */\n if (\n event.key === 'Enter' &&\n (!open || (!navigatedRef.current && (untouched || search === '')))\n ) {\n event.preventDefault();\n if (open) setOpen(false);\n return;\n }\n if (event.key === 'Escape' && open) {\n event.preventDefault();\n setOpen(false);\n setSearch(selectedLabel);\n }\n };\n\n const handleClear = (event: MouseEvent<HTMLButtonElement>) => {\n event.preventDefault();\n event.stopPropagation();\n commit('');\n setSearch('');\n onQueryChange?.('');\n setOpen(true);\n inputRef.current?.focus();\n };\n\n const handleOpenChange = (next: boolean) => {\n if (effectiveReadOnly && next) return;\n setOpen(next);\n if (!next) setSearch(selectedLabel);\n };\n\n // Agent handle — refs mirror state for fresh reads.\n const valueRef = useRef<string>(currentValue);\n useEffect(() => {\n valueRef.current = currentValue;\n }, [currentValue]);\n const searchRef = useRef<string>(search);\n useEffect(() => {\n searchRef.current = search;\n }, [search]);\n const openRef = useRef<boolean>(open);\n useEffect(() => {\n openRef.current = open;\n }, [open]);\n\n const setOpenStable = useCallback(\n (next: boolean) => {\n if (!isOpenControlled) setInternalOpen(next);\n onOpenChange?.(next);\n },\n [isOpenControlled, onOpenChange],\n );\n\n const agentHandle = useMemo<ComboboxHandle>(\n () => ({\n getValue: () => valueRef.current || null,\n getQuery: () => searchRef.current,\n getIsOpen: () => openRef.current,\n setValue: (next) => {\n const v = next ?? '';\n setComboboxValue(v);\n const opt = options.find((o) => o.value === v);\n setSearch(opt?.label ?? '');\n },\n setQuery: (query) => {\n setSearch(query);\n onQueryChange?.(query);\n },\n clear: () => {\n setComboboxValue('');\n setSearch('');\n onQueryChange?.('');\n },\n open: () => setOpenStable(true),\n close: () => setOpenStable(false),\n }),\n [setComboboxValue, options, setOpenStable, onQueryChange],\n );\n useAgentRegistration(comboboxAgent, agentHandle, id);\n\n const showClear =\n clearable &&\n Boolean(currentValue) &&\n !effectiveDisabled &&\n !effectiveReadOnly;\n\n const groups = groupOptions(options);\n const iconClass = iconSizeBySize[size];\n\n return (\n <Popover.Root open={open} onOpenChange={handleOpenChange}>\n <Command\n filter={filterFn}\n shouldFilter\n loop\n // cmdk points the input's `aria-labelledby` at its own hidden\n // `<label cmdk-label>`, whose text is this `label`: it is the\n // input's accessible name. The caller's `aria-label` wins, then\n // the FormField's label. The placeholder is the last resort, so\n // the input is never unnamed.\n label={ariaLabel ?? (ctx.label || resolvedPlaceholder)}\n className=\"ds:w-full\"\n >\n <Popover.Anchor asChild>\n <div\n ref={anchorRef}\n className={comboboxWrapperVariants({\n size,\n tone: effectiveTone,\n className,\n })}\n data-component=\"combobox\"\n data-component-id={id}\n >\n <Command.Input\n ref={composeRefs(ref, inputRef)}\n value={search}\n onValueChange={handleSearchChange}\n // The picked label shows in the field: keep its direction.\n dir={selectedOption?.dir}\n name={name}\n placeholder={resolvedPlaceholder}\n disabled={effectiveDisabled}\n readOnly={effectiveReadOnly}\n required={effectiveRequired}\n autoComplete={autoComplete}\n // cmdk writes `id` and `aria-labelledby` after the props it\n // is given, so neither can be set here: the name goes through\n // the Command root's `label` above.\n aria-describedby={describedBy}\n aria-invalid={effectiveInvalid || undefined}\n onFocus={handleFocus}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n onCompositionStart={handleCompositionStart}\n onCompositionEnd={handleCompositionEnd}\n className={comboboxInputVariants({ size })}\n />\n {showClear ? (\n <button\n type=\"button\"\n aria-label={t('inputs.combobox.clear', 'Clear selection')}\n onClick={handleClear}\n onPointerDown={(event) => event.stopPropagation()}\n className={[\n 'ds:inline-flex ds:items-center ds:justify-center ds:rounded-[var(--radius-sm)]',\n 'ds:text-muted-foreground ds:hover:text-foreground',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:size-4 ds:shrink-0',\n /* A 24px hit area with no visual change. */\n \"ds:relative ds:before:absolute ds:before:inset-[calc(var(--spacing-xs)*-1)] ds:before:content-['']\",\n ].join(' ')}\n >\n <X aria-hidden=\"true\" className=\"ds:size-3.5\" />\n </button>\n ) : null}\n </div>\n </Popover.Anchor>\n <Popover.Portal forceMount>\n <Popover.Content\n // `forceMount` keeps the listbox in the DOM while the popover\n // is closed so the input's cmdk-set `aria-controls` always\n // points at a real id (axe's aria-valid-attr-value rule).\n // The CSS visibility / pointer-events is gated by data-state.\n forceMount\n hidden={!open}\n // Radix Popover.Content carries `role=\"dialog\"`; axe's\n // `aria-dialog-name` rule requires a name. Surface the\n // surrounding combobox label so the popover is named after\n // the field it serves (or fall back to the i18n default).\n aria-label={\n ariaLabel ?? t('inputs.combobox.popupLabel', 'Options')\n }\n onOpenAutoFocus={(event) => event.preventDefault()}\n onCloseAutoFocus={(event) => event.preventDefault()}\n onInteractOutside={(event) => {\n const target = event.target as Node | null;\n if (target && anchorRef.current?.contains(target)) {\n event.preventDefault();\n }\n }}\n sideOffset={4}\n align=\"start\"\n className={comboboxContentVariants()}\n >\n <Command.List\n key={listEpoch}\n ref={listRef}\n // cmdk names the listbox \"Suggestions\" in English otherwise.\n label={ariaLabel ?? (ctx.label || resolvedPlaceholder)}\n className={comboboxListClasses}\n onPointerMove={() => {\n if (!activatingRef.current) navigatedRef.current = true;\n }}\n /* The list is focusable: without this a pointer pick\n moves focus into it, then loses it to the page when\n the list hides. */\n onMouseDown={(event) => event.preventDefault()}\n >\n <Command.Empty className={comboboxEmptyClasses}>\n {/* cmdk owns the presentational wrapper. This unavailable\n option gives an empty list valid semantics without\n registering a selectable cmdk item. */}\n <div role=\"option\" aria-selected={false} aria-disabled=\"true\">\n {emptyMessage ??\n t('inputs.combobox.empty', 'No results found')}\n </div>\n </Command.Empty>\n {groups.map(({ group, items }, groupIndex) => {\n const body = items.map((option) => {\n const isSelected = option.value === currentValue;\n return (\n <Command.Item\n /* The label is in the key because cmdk only reads\n keywords when the value changes. */\n key={`${option.value}\\u0000${option.label}`}\n value={option.value}\n data-option-id={option.value}\n keywords={[option.label]}\n disabled={option.disabled}\n onSelect={handleSelect}\n className={comboboxItemVariants({ size })}\n >\n <span\n aria-hidden=\"true\"\n className={`ds:inline-flex ds:items-center ds:justify-center ${iconClass}`}\n >\n {isSelected ? <Check className={iconClass} /> : null}\n </span>\n {option.startAdornment ? (\n // Decorative by contract — the option's accessible\n // name comes from its label. Hide so a text-bearing\n // adornment can't leak into the computed name.\n <span\n aria-hidden=\"true\"\n className=\"ds:inline-flex ds:items-center ds:shrink-0\"\n >\n {option.startAdornment}\n </span>\n ) : null}\n {option.description || wrapOptionLabels ? (\n // Stacked: the label and its end content on one\n // row, the description on a line of its own\n // under them. In this DOM order the option's\n // name reads label, end content, description.\n <span\n className={`${OPTION_BODY_CLASSES} ds:py-[var(--spacing-xs)]`}\n >\n <span className={OPTION_LABEL_ROW_CLASSES}>\n <span\n dir={option.dir}\n className={optionLabelVariants({\n wrap: wrapOptionLabels,\n className: 'ds:flex-1',\n })}\n >\n {option.label}\n </span>\n {option.endContent ? (\n // Announced, as below.\n <span className={OPTION_END_CLASSES}>\n {option.endContent}\n </span>\n ) : null}\n </span>\n {option.description ? (\n <span\n className={optionDescriptionVariants({\n tone: option.descriptionTone,\n })}\n >\n {option.description}\n </span>\n ) : null}\n </span>\n ) : (\n <>\n <span\n dir={option.dir}\n className=\"ds:flex-1 ds:truncate\"\n >\n {option.label}\n </span>\n {option.endContent ? (\n // Deliberately NOT aria-hidden — unlike\n // `startAdornment`, this slot carries meaning\n // (a price, a count) and must reach the\n // option's accessible name. `ms-auto` pins it\n // to the inline-end and flips under RTL.\n <span className=\"ds:inline-flex ds:items-center ds:ms-auto ds:shrink-0\">\n {option.endContent}\n </span>\n ) : null}\n </>\n )}\n </Command.Item>\n );\n });\n if (!group) {\n return (\n <Command.Group key={`group-${groupIndex}`}>\n {body}\n </Command.Group>\n );\n }\n return (\n <Command.Group\n key={`group-${group}`}\n heading={\n <span className={comboboxGroupHeadingClasses}>\n {group}\n </span>\n }\n >\n {body}\n </Command.Group>\n );\n })}\n {allowCreate && search.length > 0 ? (\n <ComboboxCreateRow\n search={search}\n label={t('inputs.combobox.create', 'Create \"{{value}}\"', {\n value: search,\n })}\n iconClass={iconClass}\n size={size}\n onSelect={handleCreate}\n />\n ) : null}\n </Command.List>\n </Popover.Content>\n </Popover.Portal>\n </Command>\n </Popover.Root>\n );\n },\n);\nComboboxImpl.displayName = 'Combobox';\n\ninterface ComboboxComponent {\n <T extends string = string>(\n props: ComboboxProps<T> & { ref?: Ref<HTMLInputElement> },\n ): ReactElement | null;\n displayName?: string;\n}\n\n// forwardRef erases component-level generics, so we re-widen via a callable\n// interface to preserve the `<T extends string>` signature at the call site.\nexport const Combobox = ComboboxImpl as unknown as ComboboxComponent;\n\nexport {\n comboboxInputVariants,\n comboboxWrapperVariants,\n comboboxContentVariants,\n comboboxItemVariants,\n};\n"],"names":["comboboxAgent","handle","args","comboboxInputVariants","cva","comboboxWrapperVariants","INPUT_SURFACE_CHROME","INPUT_SURFACE_HEIGHT","INPUT_SURFACE_PADDING_X","INPUT_SURFACE_TONE","comboboxContentVariants","comboboxItemVariants","MENU_ROW_HIGHLIGHT","comboboxGroupHeadingClasses","comboboxListClasses","comboboxEmptyClasses","iconSizeBySize","ComboboxCreateRow","search","label","iconClass","size","onSelect","useCommandState","state","jsxs","Command","jsx","ComboboxImpl","forwardRef","options","value","defaultValue","onValueChange","placeholder","clearable","disabled","readOnly","required","name","id","tone","externalFilter","allowCreate","onCreate","openProp","onOpenChange","onQueryChange","emptyMessage","className","ariaLabel","ariaInvalid","ariaDescribedBy","autoComplete","matchAutofill","wrapOptionLabels","ref","t","useTranslation","ctx","useFormField","inFormField","useContext","FormFieldContext","currentValueRaw","setComboboxValue","useControllableState","currentValue","selectedOption","useMemo","o","selectedLabel","setSearch","useState","internalOpen","setInternalOpen","isOpenControlled","open","composingRef","useRef","untouched","inputRef","anchorRef","listRef","useFormFieldControlRef","listEpoch","setListEpoch","listMountedRef","useIsomorphicLayoutEffect","n","navigatedRef","useEffect","activatingRef","list","item","listRect","itemRect","scale","offset","itemHeight","autofillToken","input","autofilledRef","onInput","event","inputType","effectiveDisabled","effectiveReadOnly","effectiveRequired","effectiveInvalid","effectiveTone","describedBy","resolvedPlaceholder","filterFn","candidate","searchStr","keywords","normalizedCandidate","normalizeDiacritics","normalizedSearch","normalizedKeywords","defaultFilter","commit","next","setOpen","handleSelect","optValue","option","handleCreate","nextValue","optionForAutofill","text","wanted","match","_a","handleSearchChange","handleFocus","handleClick","handleCompositionStart","handleCompositionEnd","handleKeyDown","handleClear","handleOpenChange","valueRef","searchRef","openRef","setOpenStable","useCallback","agentHandle","v","opt","query","useAgentRegistration","showClear","groups","groupOptions","Popover","composeRefs","X","target","group","items","groupIndex","body","isSelected","Check","OPTION_BODY_CLASSES","OPTION_LABEL_ROW_CLASSES","optionLabelVariants","OPTION_END_CLASSES","optionDescriptionVariants","Fragment","Combobox"],"mappings":";;;;;;;;;;;;;;;;;;AAGO,MAAMA,KAA8C;AAAA,EACzD,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,iBAAiB,aAAa,UAAU,QAAQ,OAAO;AAAA,EACtE,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,IAEpC,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACA,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,IAEpC,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACA,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,EACrC;AAAA,EAEF,SAAS;AAAA,IACP,WAAW;AAAA;AAAA,MAET,QAAQ;A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