@alfadocs/ui-kit-debug 1.93.1 → 1.95.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{ai-prompt-input-DH_rnV-F.js → ai-prompt-input-CG9BEggs.js} +2 -2
- package/dist/_chunks/{ai-prompt-input-DH_rnV-F.js.map → ai-prompt-input-CG9BEggs.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-EKPfVCmh.js → anamnesis-summary-rows-DTZ3per6.js} +4 -4
- package/dist/_chunks/{anamnesis-summary-rows-EKPfVCmh.js.map → anamnesis-summary-rows-DTZ3per6.js.map} +1 -1
- package/dist/_chunks/{audio-recorder-m7Jqvvcl.js → audio-recorder-BOm2FgEu.js} +2 -2
- package/dist/_chunks/{audio-recorder-m7Jqvvcl.js.map → audio-recorder-BOm2FgEu.js.map} +1 -1
- package/dist/_chunks/{balance-badge-cell-BtJvre1-.js → balance-badge-cell-vZxbOFgP.js} +4 -4
- package/dist/_chunks/{balance-badge-cell-BtJvre1-.js.map → balance-badge-cell-vZxbOFgP.js.map} +1 -1
- package/dist/_chunks/{bishop-score-C5di6oAV.js → bishop-score-BBYuyk2k.js} +2 -2
- package/dist/_chunks/{bishop-score-C5di6oAV.js.map → bishop-score-BBYuyk2k.js.map} +1 -1
- package/dist/_chunks/{calendar-appointment-editor-dialog-sJKLoVJ2.js → calendar-appointment-editor-dialog-WDKc3jMA.js} +6 -6
- package/dist/_chunks/{calendar-appointment-editor-dialog-sJKLoVJ2.js.map → calendar-appointment-editor-dialog-WDKc3jMA.js.map} +1 -1
- package/dist/_chunks/chart-pMkQN-qy.js +1550 -0
- package/dist/_chunks/chart-pMkQN-qy.js.map +1 -0
- package/dist/_chunks/{data-table-CqQgoNsU.js → data-table-C_nnpJ-Q.js} +2 -2
- package/dist/_chunks/{data-table-CqQgoNsU.js.map → data-table-C_nnpJ-Q.js.map} +1 -1
- package/dist/_chunks/{date-time-picker-n-yrlMJq.js → date-time-picker-cwsWiB4q.js} +2 -2
- package/dist/_chunks/{date-time-picker-n-yrlMJq.js.map → date-time-picker-cwsWiB4q.js.map} +1 -1
- package/dist/_chunks/{document-preview-QEbr7jp1.js → document-preview-ytR1FcWA.js} +2 -2
- package/dist/_chunks/{document-preview-QEbr7jp1.js.map → document-preview-ytR1FcWA.js.map} +1 -1
- package/dist/_chunks/{file-manager-BnI1ZWZu.js → file-manager-CAIbuaSs.js} +2 -2
- package/dist/_chunks/{file-manager-BnI1ZWZu.js.map → file-manager-CAIbuaSs.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-Dr9hdDta.js → gestational-age-calculator-Dn8IOXHB.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-Dr9hdDta.js.map → gestational-age-calculator-Dn8IOXHB.js.map} +1 -1
- package/dist/_chunks/group-options-BvKhQ3xb.js.map +1 -1
- package/dist/_chunks/{hcg-doubling-K41Wy7LB.js → hcg-doubling-DQe1ptNB.js} +2 -2
- package/dist/_chunks/{hcg-doubling-K41Wy7LB.js.map → hcg-doubling-DQe1ptNB.js.map} +1 -1
- package/dist/_chunks/{heatmap-fCxwNz2o.js → heatmap-DdF8qTTV.js} +2 -2
- package/dist/_chunks/{heatmap-fCxwNz2o.js.map → heatmap-DdF8qTTV.js.map} +1 -1
- package/dist/_chunks/{kit-extensions-a0G4COFH.js → kit-extensions-44gudqqq.js} +3 -3
- package/dist/_chunks/{kit-extensions-a0G4COFH.js.map → kit-extensions-44gudqqq.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-BS3V4LA6.js → link-cell-renderer-OmvrkUeN.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-BS3V4LA6.js.map → link-cell-renderer-OmvrkUeN.js.map} +1 -1
- package/dist/_chunks/{muscle-scheme-C66WlCxG.js → muscle-scheme-B7qMW0ho.js} +2 -2
- package/dist/_chunks/{muscle-scheme-C66WlCxG.js.map → muscle-scheme-B7qMW0ho.js.map} +1 -1
- package/dist/_chunks/{operator-hero-C_5B-8Qp.js → operator-hero-D_0KoEuJ.js} +31 -31
- package/dist/_chunks/operator-hero-D_0KoEuJ.js.map +1 -0
- package/dist/_chunks/{optical-prescription-CMM1Y6Xg.js → optical-prescription-BGVeDVSP.js} +2 -2
- package/dist/_chunks/{optical-prescription-CMM1Y6Xg.js.map → optical-prescription-BGVeDVSP.js.map} +1 -1
- package/dist/_chunks/{patient-details-BjcUpD9S.js → patient-details-DTlpBYHJ.js} +2 -2
- package/dist/_chunks/{patient-details-BjcUpD9S.js.map → patient-details-DTlpBYHJ.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-B0tdiaWi.js → patient-field-row-DWTKV1hF.js} +2 -2
- package/dist/_chunks/{patient-field-row-B0tdiaWi.js.map → patient-field-row-DWTKV1hF.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-Cvv6_Ugk.js → patient-summary-card-C61AR4Tn.js} +2 -2
- package/dist/_chunks/{patient-summary-card-Cvv6_Ugk.js.map → patient-summary-card-C61AR4Tn.js.map} +1 -1
- package/dist/_chunks/{pregnancy-dating-BHvfDxz4.js → pregnancy-dating-CuVj9KGR.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-BHvfDxz4.js.map → pregnancy-dating-CuVj9KGR.js.map} +1 -1
- package/dist/_chunks/{registration-form-CRm6DaB9.js → registration-form-BygI73vG.js} +2 -2
- package/dist/_chunks/{registration-form-CRm6DaB9.js.map → registration-form-BygI73vG.js.map} +1 -1
- package/dist/_chunks/{reserved.agent-DnPwaa4u.js → reserved.agent-BvwjDyne.js} +3 -3
- package/dist/_chunks/{reserved.agent-DnPwaa4u.js.map → reserved.agent-BvwjDyne.js.map} +1 -1
- package/dist/_chunks/{select-4S-eYZUf.js → select-BBDRYxJl.js} +247 -241
- package/dist/_chunks/select-BBDRYxJl.js.map +1 -0
- package/dist/_chunks/signature-request-BVGeF0qB.js +2774 -0
- package/dist/_chunks/signature-request-BVGeF0qB.js.map +1 -0
- package/dist/_chunks/{slot-grid-B-IAFX3C.js → slot-grid-BhjaLJ0o.js} +229 -214
- package/dist/_chunks/{slot-grid-B-IAFX3C.js.map → slot-grid-BhjaLJ0o.js.map} +1 -1
- package/dist/_chunks/{tabs-BTj-2qMZ.js → tabs-BmxQu-TJ.js} +2 -2
- package/dist/_chunks/{tabs-BTj-2qMZ.js.map → tabs-BmxQu-TJ.js.map} +1 -1
- package/dist/_chunks/{task-editor-CI1SKUNc.js → task-editor-Cv7xSakv.js} +3 -3
- package/dist/_chunks/{task-editor-CI1SKUNc.js.map → task-editor-Cv7xSakv.js.map} +1 -1
- package/dist/_chunks/{tasks-panel-BkjtgjQ8.js → tasks-panel-BTCYGLGA.js} +2 -2
- package/dist/_chunks/{tasks-panel-BkjtgjQ8.js.map → tasks-panel-BTCYGLGA.js.map} +1 -1
- package/dist/_chunks/time-picker-DSt-ns5F.js +914 -0
- package/dist/_chunks/time-picker-DSt-ns5F.js.map +1 -0
- package/dist/_chunks/{unit-converter-BH5ueIhT.js → unit-converter-C95sa5y8.js} +2 -2
- package/dist/_chunks/{unit-converter-BH5ueIhT.js.map → unit-converter-C95sa5y8.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-D8vDg0sg.js → use-appointment-details-read-B6uhmNdV.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-D8vDg0sg.js.map → use-appointment-details-read-B6uhmNdV.js.map} +1 -1
- package/dist/_chunks/{voice-control-panel-BP0otrID.js → voice-control-panel-BGJjUwnY.js} +2 -2
- package/dist/_chunks/{voice-control-panel-BP0otrID.js.map → voice-control-panel-BGJjUwnY.js.map} +1 -1
- package/dist/agent-catalog.json +20 -8
- package/dist/agent-i18n/en.json +6 -6
- package/dist/apexcharts.css +4 -1
- package/dist/components/_shared/group-options.d.ts +2 -2
- package/dist/components/_shared/group-options.d.ts.map +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/chart/chart-axis-scale.d.ts +21 -0
- package/dist/components/chart/chart-axis-scale.d.ts.map +1 -0
- package/dist/components/chart/chart.agent.d.ts.map +1 -1
- package/dist/components/chart/chart.d.ts +55 -0
- package/dist/components/chart/chart.d.ts.map +1 -1
- package/dist/components/chart/index.d.ts +1 -1
- package/dist/components/chart/index.d.ts.map +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/muscle-scheme/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/operator-hero/operator-hero.d.ts +3 -2
- package/dist/components/operator-hero/operator-hero.d.ts.map +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/select.d.ts +13 -1
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/skeleton-scheme/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/slot-grid/slot-grid.d.ts.map +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/time-picker/index.js +1 -1
- package/dist/components/time-picker/time-picker.d.ts +15 -8
- package/dist/components/time-picker/time-picker.d.ts.map +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/voice-control-panel/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/i18n/locales/ar.d.ts +8 -1
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +10 -3
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +9 -2
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +11 -4
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +9 -2
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +11 -4
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +9 -2
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +10 -3
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +9 -2
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +11 -4
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +8 -1
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +10 -3
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +9 -2
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +11 -4
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +9 -2
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +11 -4
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +9 -2
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +11 -4
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +9 -2
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +11 -4
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +9 -2
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +11 -4
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +8 -1
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +10 -3
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +9 -2
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +11 -4
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +9 -2
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +11 -4
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +9 -2
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +11 -4
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +9 -2
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +11 -4
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +9 -2
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +11 -4
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +9 -2
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +11 -4
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +34 -34
- package/dist/locales/ar.json +10 -3
- package/dist/locales/de.json +11 -4
- package/dist/locales/el.json +11 -4
- package/dist/locales/en.json +10 -3
- package/dist/locales/es.json +11 -4
- package/dist/locales/fr.json +10 -3
- package/dist/locales/hi.json +11 -4
- package/dist/locales/it.json +11 -4
- package/dist/locales/ja.json +11 -4
- package/dist/locales/nl.json +11 -4
- package/dist/locales/pl.json +11 -4
- package/dist/locales/pt.json +10 -3
- package/dist/locales/ro.json +11 -4
- package/dist/locales/ru.json +11 -4
- package/dist/locales/sq.json +11 -4
- package/dist/locales/sv.json +11 -4
- package/dist/locales/tr.json +11 -4
- package/dist/locales/zh.json +11 -4
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/patterns/signature-request/required-documents.d.ts +2 -1
- package/dist/patterns/signature-request/required-documents.d.ts.map +1 -1
- package/dist/patterns/signature-request/signature-request.d.ts +61 -0
- package/dist/patterns/signature-request/signature-request.d.ts.map +1 -1
- package/dist/tokens.css +4 -1
- package/package.json +1 -1
- package/dist/_chunks/chart-D4huJSru.js +0 -1340
- package/dist/_chunks/chart-D4huJSru.js.map +0 -1
- package/dist/_chunks/operator-hero-C_5B-8Qp.js.map +0 -1
- package/dist/_chunks/select-4S-eYZUf.js.map +0 -1
- package/dist/_chunks/signature-request-DvhyrRpn.js +0 -2448
- package/dist/_chunks/signature-request-DvhyrRpn.js.map +0 -1
- package/dist/_chunks/time-picker-DVfyAR81.js +0 -871
- package/dist/_chunks/time-picker-DVfyAR81.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-BBDRYxJl.js","sources":["../../src/components/select/select.agent.ts","../../src/components/select/select.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — Select. */\n/* */\n/* See `src/docs/26-agent-readiness.mdx` for the contract. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { SelectHandle } from './select';\n\nexport const selectAgent: AgentAdapter<SelectHandle> = {\n id: 'select',\n // Persisted single choice (value state + set_value) → select_single + set_value,\n // plus open/close of the option list.\n capabilities: ['select_single', 'set_value', 'open', 'close'],\n state: {\n value: {\n type: 'string',\n descriptionKey: 'ui.agent.select.state.value',\n description:\n 'Currently selected option value, or empty string when none.',\n read: (handle) => handle.getValue(),\n },\n isOpen: {\n type: 'boolean',\n descriptionKey: 'ui.agent.select.state.isOpen',\n description: 'Whether the option list is open.',\n read: (handle) => handle.isOpen(),\n },\n },\n actions: {\n set_value: {\n // Persists the chosen option — reversible by selecting another value.\n safety: 'write',\n argsType: '{ value: string }',\n argsSchema: {\n type: 'object',\n properties: {\n value: { type: 'string', description: 'Option value to select.' },\n },\n required: ['value'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.select.actions.setValue',\n description:\n 'Select the option with the given value. A value that is not among the options, belongs to a disabled option, or is an action option (such as New signatory), is ignored and the selection stays as it was.',\n examples: [{ args: { value: 'it' }, note: 'Select the \"it\" option.' }],\n invoke: (handle, args: { value: string }) => {\n handle.setValue(args.value);\n },\n },\n clear: {\n // Discards the persisted choice — destructive (loses the selection).\n safety: 'destructive',\n idempotent: true,\n descriptionKey: 'ui.agent.select.actions.clear',\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.select.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.select.actions.close',\n description: 'Close the option list.',\n invoke: (handle) => {\n handle.close();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'select',\n description: 'Marks the Select trigger.',\n },\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:\n 'Stable opaque option value emitted on each rendered option.',\n },\n },\n};\n","import {\n createContext,\n forwardRef,\n Fragment,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type AriaAttributes,\n type ComponentPropsWithoutRef,\n type ElementRef,\n type MutableRefObject,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from 'react';\nimport { useAgentRegistration } from '../../agent';\nimport { selectAgent } from './select.agent';\n\n/** Agent-readiness curated handle for Select. */\nexport interface SelectHandle {\n getValue: () => string;\n setValue: (value: string) => void;\n clear: () => void;\n open: () => void;\n close: () => void;\n isOpen: () => boolean;\n}\nimport * as RadixSelect from '@radix-ui/react-select';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Check, ChevronDown, ChevronUp, X } from 'lucide-react';\nimport {\n FormFieldContext,\n useFormField,\n useFormFieldControlId,\n} from '../form-field/form-field-context';\nimport type { OptionShape } from '../_shared/option';\nimport { groupOptions } from '../_shared/group-options';\nimport { useDirection } from '../_shared/use-direction';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { useControllableState } from '../../hooks/use-controllable-state';\nimport { MENU_ROW_HIGHLIGHT } from '../_shared/menu-row';\nimport { PopupRegion } from '../_shared/popup-region';\nimport {\n OPTION_END_CLASSES,\n optionDescriptionVariants,\n optionLabelRowVariants,\n optionLabelVariants,\n type OptionDescriptionTone,\n} from '../_shared/option-row';\n\nconst selectTriggerVariants = cva(\n [\n 'ds:group ds:inline-flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:w-full',\n 'ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--control-border)] ds:bg-input',\n 'ds:shadow-[var(--shadow-input)]',\n 'ds:text-foreground ds:placeholder:text-muted-foreground',\n 'ds:data-[placeholder]:text-muted-foreground',\n 'ds:transition-[colors,box-shadow] 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:forced-colors:focus-visible:outline-[CanvasText]',\n 'ds:disabled:cursor-not-allowed ds:disabled:opacity-50',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:h-8 ds:ps-3 ds:pe-3 ds:text-[length:var(--font-size-sm)]',\n md: 'ds:h-[var(--min-target-size)] ds:ps-3 ds:pe-3 ds:text-[length:var(--font-size-base)]',\n lg: 'ds:h-12 ds:ps-4 ds:pe-4 ds:text-[length:var(--font-size-lg)]',\n },\n tone: {\n default: '',\n error: 'ds:border-destructive ds:focus-visible:outline-destructive',\n },\n },\n defaultVariants: {\n size: 'md',\n tone: 'default',\n },\n },\n);\n\nconst selectContentVariants = cva(\n [\n 'ds:z-[var(--z-dropdown)] ds:overflow-hidden',\n // Never wider than the screen allows: a long option wraps or ends in an\n // ellipsis instead of running past the edge, where it would be clipped.\n 'ds:max-w-[var(--radix-select-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 selectItemVariants = cva(\n [\n 'ds:relative ds:flex ds:cursor-pointer ds:items-center',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:text-foreground ds:outline-none ds:select-none',\n MENU_ROW_HIGHLIGHT.highlighted,\n 'ds:data-[disabled]:pointer-events-none ds:data-[disabled]:opacity-50',\n ].join(' '),\n {\n variants: {\n size: {\n sm: 'ds:min-h-8 ds:ps-8 ds:pe-3 ds:text-[length:var(--font-size-sm)]',\n md: 'ds:min-h-[var(--min-target-size)] ds:ps-8 ds:pe-3 ds:text-[length:var(--font-size-base)]',\n lg: 'ds:min-h-12 ds:ps-10 ds:pe-4 ds:text-[length:var(--font-size-lg)]',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n },\n);\n\nconst selectLabelClasses = [\n 'ds:ps-8 ds:pe-3 ds:py-1.5',\n 'type-eyebrow ds:text-muted-foreground',\n 'ds:sticky ds:top-0 ds:bg-background',\n].join(' ');\n\nconst iconSizeByItemSize = {\n sm: 'ds:size-3.5',\n md: 'ds:size-4',\n lg: 'ds:size-5',\n} as const;\n\nconst itemIndicatorStartByItemSize = {\n sm: 'ds:start-2',\n md: 'ds:start-2',\n lg: 'ds:start-3',\n} as const;\n\nfunction composeRefs<T>(\n ...refs: Array<Ref<T> | undefined | null>\n): (node: T | null) => void {\n return (node: T | null) => {\n for (const r of refs) {\n if (!r) continue;\n if (typeof r === 'function') {\n r(node);\n } else {\n (r as MutableRefObject<T | null>).current = node;\n }\n }\n };\n}\n\n// ---------------------------------------------------------------------------\n// Compound sub-components — thin `forwardRef` wrappers over Radix parts.\n// ---------------------------------------------------------------------------\n\ntype SelectRootProps = ComponentPropsWithoutRef<typeof RadixSelect.Root>;\n\n// Whether the list is open, so SelectContent mounts its landmark wrapper only\n// while it is: a closed Select leaves nothing at the end of <body>.\nconst SelectOpenContext = createContext<boolean | undefined>(undefined);\n\nconst SelectRoot = ({\n open: openProp,\n defaultOpen,\n onOpenChange,\n ...props\n}: SelectRootProps) => {\n const [open, setOpen] = useControllableState<boolean>({\n value: openProp,\n defaultValue: defaultOpen ?? false,\n onChange: onOpenChange,\n });\n return (\n <SelectOpenContext.Provider value={open ?? false}>\n <RadixSelect.Root\n open={open ?? false}\n onOpenChange={setOpen}\n {...props}\n />\n </SelectOpenContext.Provider>\n );\n};\nSelectRoot.displayName = 'Select.Root';\n\ntype SelectTriggerElement = ElementRef<typeof RadixSelect.Trigger>;\ntype SelectTriggerProps = ComponentPropsWithoutRef<typeof RadixSelect.Trigger> &\n VariantProps<typeof selectTriggerVariants>;\n\nconst SelectTrigger = forwardRef<SelectTriggerElement, SelectTriggerProps>(\n ({ size, tone, className, children, ...props }, ref) => (\n <RadixSelect.Trigger\n ref={ref}\n className={selectTriggerVariants({ size, tone, className })}\n {...props}\n >\n {children}\n </RadixSelect.Trigger>\n ),\n);\nSelectTrigger.displayName = 'Select.Trigger';\n\ntype SelectValueProps = ComponentPropsWithoutRef<typeof RadixSelect.Value>;\n\n/* Marks the trigger's value, where Radix mirrors the chosen item's text, so\n an item can lay its label out differently there (one line, always). */\nconst SELECT_VALUE_MARKER = { 'data-select-value': '' } as const;\n\n/* A wrapping label, mirrored into the trigger, goes back to one line with an\n ellipsis: the trigger keeps its height whatever the option. */\nconst WRAPPED_LABEL_IN_TRIGGER = [\n 'ds:[[data-select-value]_&]:block',\n 'ds:[[data-select-value]_&]:truncate',\n].join(' ');\n\nconst SelectValue = forwardRef<\n ElementRef<typeof RadixSelect.Value>,\n SelectValueProps\n>((props, ref) => (\n <RadixSelect.Value ref={ref} {...SELECT_VALUE_MARKER} {...props} />\n));\nSelectValue.displayName = 'Select.Value';\n\ntype SelectContentProps = ComponentPropsWithoutRef<\n typeof RadixSelect.Content\n> & {\n container?: HTMLElement | null;\n};\n\nconst SelectContent = forwardRef<\n ElementRef<typeof RadixSelect.Content>,\n SelectContentProps\n>(\n (\n {\n className,\n children,\n position = 'popper',\n sideOffset = 4,\n container,\n ...props\n },\n ref,\n ) => {\n const open = useContext(SelectOpenContext);\n return (\n <RadixSelect.Portal container={container ?? undefined}>\n {/* A region named after the field, so axe `region` passes while open. */}\n <PopupRegion popupRef={ref} open={open}>\n {(popupRef) => (\n <RadixSelect.Content\n ref={popupRef}\n position={position}\n sideOffset={sideOffset}\n data-component=\"select-content\"\n className={selectContentVariants({ className })}\n {...props}\n >\n <RadixSelect.ScrollUpButton className=\"ds:flex ds:items-center ds:justify-center ds:h-6 ds:bg-background ds:cursor-default\">\n <ChevronUp aria-hidden=\"true\" className=\"ds:size-4\" />\n </RadixSelect.ScrollUpButton>\n {children}\n <RadixSelect.ScrollDownButton className=\"ds:flex ds:items-center ds:justify-center ds:h-6 ds:bg-background ds:cursor-default\">\n <ChevronDown aria-hidden=\"true\" className=\"ds:size-4\" />\n </RadixSelect.ScrollDownButton>\n </RadixSelect.Content>\n )}\n </PopupRegion>\n </RadixSelect.Portal>\n );\n },\n);\nSelectContent.displayName = 'Select.Content';\n\ntype SelectViewportProps = ComponentPropsWithoutRef<\n typeof RadixSelect.Viewport\n>;\n\nconst SelectViewport = forwardRef<\n ElementRef<typeof RadixSelect.Viewport>,\n SelectViewportProps\n>(({ className, ...props }, ref) => (\n <RadixSelect.Viewport\n ref={ref}\n className={['ds:p-1', className].filter(Boolean).join(' ')}\n {...props}\n />\n));\nSelectViewport.displayName = 'Select.Viewport';\n\ntype SelectItemProps = ComponentPropsWithoutRef<typeof RadixSelect.Item> &\n VariantProps<typeof selectItemVariants> & {\n /** Optional leading visual rendered before the item text (e.g. a Flag). */\n startAdornment?: ReactNode;\n /**\n * Trailing content pinned to the inline-end of the item (e.g. a\n * price Badge). Unlike `startAdornment` this is NOT `aria-hidden`,\n * because it carries meaning rather than decoration.\n *\n * It renders INSIDE `RadixSelect.ItemText`, because Radix builds the\n * item's accessible name from that element alone — content placed\n * outside it is shown but never announced. A consequence worth\n * knowing: Radix mirrors `ItemText` into the closed trigger, so the\n * selected item's trailing content appears there too.\n */\n endContent?: ReactNode;\n /**\n * A second line under the label, e.g. why an option is disabled. It is\n * the option's accessible description, outside `ItemText`, so it is\n * neither part of the name nor mirrored into the trigger. It does not\n * fade with a disabled option, so the reason stays readable.\n */\n description?: ReactNode;\n /** How `description` reads: muted meta text, or the error text colour\n * for a line that warns. */\n descriptionTone?: OptionDescriptionTone;\n /**\n * Read `description` as part of the item's accessible name, after the\n * label and `endContent`, instead of as its description. For a second\n * line that is part of what the option is (a payment the patient\n * commits to), not a side note (why it is disabled).\n */\n descriptionInName?: boolean;\n /** Let the label wrap onto a second line; it is clipped after two. In\n * the trigger it stays on one line. */\n wrapLabel?: boolean;\n /** Writing direction of the label (`OptionShape.dir`). Set on the\n * element that clips, so a long label keeps its start in view. */\n labelDir?: OptionShape['dir'];\n };\n\nconst SelectItem = forwardRef<\n ElementRef<typeof RadixSelect.Item>,\n SelectItemProps\n>(\n (\n {\n size = 'md',\n className,\n children,\n startAdornment,\n endContent,\n description,\n descriptionTone,\n descriptionInName = false,\n wrapLabel = false,\n labelDir,\n ...props\n },\n ref,\n ) => {\n const indicatorStart = itemIndicatorStartByItemSize[size ?? 'md'];\n const iconSize = iconSizeByItemSize[size ?? 'md'];\n const descriptionId = useId();\n const textId = useId();\n const hasDescription =\n description !== undefined && description !== null && description !== '';\n // Radix names an item from its ItemText alone (`aria-labelledby`). To\n // read the description in the name too, the item points at both, by\n // ids of our own: ItemText takes the id given to it over Radix's.\n // Spread, never passed as undefined: Radix spreads our props over its\n // own, so an undefined id or aria-labelledby would erase them.\n const nameWithDescription = hasDescription && descriptionInName;\n const itemTextIdProps = nameWithDescription ? { id: textId } : {};\n const itemNameProps = nameWithDescription\n ? { 'aria-labelledby': `${textId} ${descriptionId}` }\n : {};\n const wrappedLabel = wrapLabel\n ? optionLabelVariants({\n wrap: true,\n className: WRAPPED_LABEL_IN_TRIGGER,\n })\n : '';\n // With a description, a disabled option fades its label, not the whole\n // row, so the reason under it stays at full contrast.\n const fade = hasDescription\n ? 'ds:group-data-[disabled]/select-item:opacity-50'\n : '';\n const itemText = endContent ? (\n // Radix points the item's `aria-labelledby` at `ItemText`, so\n // anything rendered outside it is dropped from the accessible\n // name — a price there would be visible but never announced.\n // It therefore goes INSIDE `ItemText`, wrapped in a flex row so\n // `ms-auto` still pins it to the inline-end (and flips in RTL).\n //\n // The trade-off is deliberate: Radix mirrors `ItemText` into the\n // closed trigger, so the selected item's trailing content shows\n // there too. For the case this exists for — a price — that reads\n // as a feature, not a leak. The wrapper is rendered ONLY when\n // `endContent` is supplied, so every existing item keeps its\n // previous DOM exactly.\n //\n // `asChild` is required, not stylistic. `SelectItemText`\n // destructures `className` and `style` off its props and never\n // applies them, so styling it directly is silently discarded.\n // It must also GROW: as a plain flex item of the row it sizes to\n // its content, leaving `ms-auto` no free space to absorb, and the\n // chip would sit against the label instead of the row's end —\n // the ragged column this change exists to remove. `asChild` makes\n // our own span become the ItemText element, so `flex-1` lands.\n //\n // A wrapping label keeps the end content on its first line.\n <RadixSelect.ItemText asChild {...itemTextIdProps}>\n <span\n className={optionLabelRowVariants({\n wrap: wrapLabel,\n className: fade,\n })}\n >\n <span\n dir={labelDir}\n className={wrappedLabel || optionLabelVariants()}\n >\n {children}\n </span>\n <span className={OPTION_END_CLASSES}>{endContent}</span>\n </span>\n </RadixSelect.ItemText>\n ) : hasDescription || wrapLabel ? (\n <RadixSelect.ItemText asChild {...itemTextIdProps}>\n <span\n dir={labelDir}\n className={[wrappedLabel, fade].filter(Boolean).join(' ')}\n >\n {children}\n </span>\n </RadixSelect.ItemText>\n ) : labelDir ? (\n // Our own element, so the direction sits on the box that clips, in\n // the list and in the trigger (Radix mirrors this span there).\n <RadixSelect.ItemText asChild>\n <span\n dir={labelDir}\n className={optionLabelVariants({\n className: WRAPPED_LABEL_IN_TRIGGER,\n })}\n >\n {children}\n </span>\n </RadixSelect.ItemText>\n ) : (\n <RadixSelect.ItemText>{children}</RadixSelect.ItemText>\n );\n return (\n <RadixSelect.Item\n ref={ref}\n {...itemNameProps}\n aria-describedby={\n hasDescription && !nameWithDescription ? descriptionId : undefined\n }\n className={selectItemVariants({\n size,\n className: hasDescription\n ? [\n 'ds:group/select-item ds:data-[disabled]:!opacity-100',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n : className,\n })}\n {...props}\n >\n <span\n className={`ds:absolute ${indicatorStart} ds:inline-flex ds:items-center ds:justify-center ${fade}`}\n aria-hidden=\"true\"\n >\n <RadixSelect.ItemIndicator>\n <Check className={iconSize} />\n </RadixSelect.ItemIndicator>\n </span>\n {startAdornment ? (\n // Decorative by contract — accessible name comes from the item text.\n <span\n aria-hidden=\"true\"\n className={`ds:inline-flex ds:items-center ds:shrink-0 ds:me-[var(--spacing-xs)] ${fade}`}\n >\n {startAdornment}\n </span>\n ) : null}\n {/* A wrapping label takes the same padded column as a description,\n so two-line rows keep space between them. */}\n {hasDescription || wrapLabel ? (\n <span className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:py-[var(--spacing-xs)]\">\n {itemText}\n {hasDescription ? (\n <span\n id={descriptionId}\n className={optionDescriptionVariants({\n tone: descriptionTone,\n })}\n >\n {description}\n </span>\n ) : null}\n </span>\n ) : (\n itemText\n )}\n </RadixSelect.Item>\n );\n },\n);\nSelectItem.displayName = 'Select.Item';\n\ntype SelectItemTextProps = ComponentPropsWithoutRef<\n typeof RadixSelect.ItemText\n>;\n\nconst SelectItemText = forwardRef<\n ElementRef<typeof RadixSelect.ItemText>,\n SelectItemTextProps\n>((props, ref) => <RadixSelect.ItemText ref={ref} {...props} />);\nSelectItemText.displayName = 'Select.ItemText';\n\ntype SelectGroupProps = ComponentPropsWithoutRef<typeof RadixSelect.Group>;\n\nconst SelectGroup = forwardRef<\n ElementRef<typeof RadixSelect.Group>,\n SelectGroupProps\n>((props, ref) => <RadixSelect.Group ref={ref} {...props} />);\nSelectGroup.displayName = 'Select.Group';\n\ntype SelectLabelProps = ComponentPropsWithoutRef<typeof RadixSelect.Label>;\n\nconst SelectLabel = forwardRef<\n ElementRef<typeof RadixSelect.Label>,\n SelectLabelProps\n>(({ className, ...props }, ref) => (\n <RadixSelect.Label\n ref={ref}\n className={[selectLabelClasses, className].filter(Boolean).join(' ')}\n {...props}\n />\n));\nSelectLabel.displayName = 'Select.Label';\n\ntype SelectSeparatorProps = ComponentPropsWithoutRef<\n typeof RadixSelect.Separator\n>;\n\nconst SelectSeparator = forwardRef<\n ElementRef<typeof RadixSelect.Separator>,\n SelectSeparatorProps\n>(({ className, ...props }, ref) => (\n <RadixSelect.Separator\n ref={ref}\n className={['ds:my-1 ds:h-px ds:bg-border', className]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n));\nSelectSeparator.displayName = 'Select.Separator';\n\n// ---------------------------------------------------------------------------\n// Convenience form — `<Select options={[{value, label, group?}]} />`.\n// ---------------------------------------------------------------------------\n\nexport type SelectOption<T extends string = string> = OptionShape<T> & {\n /**\n * Draws a line above this option, e.g. to set an action at the end of\n * the list apart from the values. Select only.\n */\n separatorBefore?: boolean;\n /**\n * `'action'`: the label in the link colour, for an option that does\n * something (such as opening a page) rather than pick a value. The host\n * handles it in `onValueChange` and keeps its own value. Select only.\n */\n intent?: 'action';\n};\n\n/* An action option's label: the link colour, readable in every theme as\n Link's. A highlighted row's own colours still win. */\nconst ACTION_OPTION_CLASSES =\n 'ds:[--primary:var(--primary-readable)] ds:text-primary';\n\n/* No element has this id, so a field given it as `form` belongs to no form. */\nconst DETACHED_FORM_ID = 'ds-select-detached';\n\n/* The bounding marker, and the state Radix writes on the trigger. */\nconst OWNED_TRIGGER_ATTRIBUTES = new Set([\n 'data-component',\n 'data-component-id',\n 'data-state',\n 'data-placeholder',\n 'data-disabled',\n 'aria-expanded',\n 'aria-controls',\n]);\n\n/* The `data-*` and `aria-*` props a caller set, for the trigger. */\nfunction triggerAttributes(props: object): Record<string, unknown> {\n const picked: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(props)) {\n if (value === undefined || OWNED_TRIGGER_ATTRIBUTES.has(key)) continue;\n if (key.startsWith('data-') || key.startsWith('aria-')) picked[key] = value;\n }\n return picked;\n}\n\n/**\n * `data-*` attributes (test ids, error anchors) and other `aria-*`\n * attributes reach the trigger, and win over the ones the Select sets.\n */\nexport interface SelectProps<T extends string = string> extends Omit<\n AriaAttributes,\n 'aria-label' | 'aria-describedby'\n> {\n options: SelectOption<T>[];\n value?: T | '';\n defaultValue?: T;\n onValueChange?: (value: T | '') => void;\n placeholder?: string;\n clearable?: boolean;\n disabled?: boolean;\n required?: boolean;\n name?: string;\n id?: string;\n size?: 'sm' | 'md' | 'lg';\n tone?: 'default' | 'error';\n 'aria-label'?: string;\n /**\n * Extra ids describing the trigger, e.g. a visually hidden reason why an\n * option is disabled (a disabled option cannot take focus, so its own\n * description is never announced). Joined after any FormField ids.\n */\n 'aria-describedby'?: string;\n /**\n * Show the selected option's `startAdornment` in the trigger, before its\n * label, e.g. a channel icon. Off by default. Decorative, like the\n * adornment in the list.\n */\n adornmentInTrigger?: boolean;\n /**\n * Render each option's `description` as a second line under its label,\n * wired as the option's accessible description. Off by default: without\n * it `description` is ignored, as in 1.30.0, so existing lists keep\n * their layout.\n */\n showDescriptions?: boolean;\n /**\n * With `showDescriptions`, read each description as part of its option's\n * accessible name (after the label and `endContent`) rather than as its\n * description, as Combobox and MultiSelect do. For a second line that is\n * part of what the option is, such as a payment the patient commits to.\n * Off by default.\n */\n descriptionInName?: boolean;\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. The trigger\n * still shows the chosen label on one line. Off by default.\n */\n wrapOptionLabels?: boolean;\n className?: string;\n /**\n * Portal target for the listbox. Defaults to `document.body`, which is\n * almost always correct.\n *\n * You do not need this to fix stacking. `--z-dropdown` and `--z-popover`\n * are one layer, so a Select nested inside a Popover already paints over it\n * by portal order (the listbox mounts last). Only pass a container when the\n * listbox must live inside a specific subtree — e.g. a shadow root, or a\n * scroll container that would otherwise clip it.\n */\n container?: HTMLElement | null;\n}\n\nconst SelectImpl = forwardRef<HTMLButtonElement, SelectProps>(function Select(\n {\n options,\n value,\n defaultValue,\n onValueChange,\n placeholder,\n clearable = false,\n disabled,\n required,\n name,\n id,\n size = 'md',\n tone = 'default',\n className,\n container,\n 'aria-label': ariaLabel,\n 'aria-describedby': ariaDescribedBy,\n adornmentInTrigger = false,\n showDescriptions = false,\n descriptionInName = false,\n wrapOptionLabels = false,\n ...rest\n },\n ref,\n) {\n const { t } = useTranslation('ui');\n const ctx = useFormField();\n const inFormField = useContext(FormFieldContext) !== null;\n\n const [internalValue, setInternalValue] = useState<string>(\n value ?? defaultValue ?? '',\n );\n const isControlled = value !== undefined;\n const currentValue = isControlled ? value : internalValue;\n\n const [openState, setOpenState] = useState<boolean>(false);\n const currentValueRef = useRef<string>(currentValue);\n currentValueRef.current = currentValue;\n\n const controlId = useFormFieldControlId(ctx, id);\n const triggerId = id ?? (inFormField ? controlId : undefined);\n const effectiveDisabled =\n (inFormField ? ctx.disabled : false) || Boolean(disabled);\n const effectiveRequired =\n (inFormField ? ctx.required : false) || Boolean(required);\n const effectiveInvalid = inFormField ? ctx.invalid : false;\n const effectiveTone = effectiveInvalid ? 'error' : tone;\n const describedBy =\n [inFormField ? ctx.describedBy : undefined, ariaDescribedBy]\n .filter(Boolean)\n .join(' ') || undefined;\n const triggerAdornment = adornmentInTrigger\n ? options.find((option) => option.value === currentValue)?.startAdornment\n : undefined;\n\n const triggerRef = useRef<HTMLButtonElement>(null);\n const composedTriggerRef = composeRefs(ref, triggerRef);\n const dir = useDirection(triggerRef);\n\n /* Radix is always given the value, '' for none, so it never swaps\n between its own state and ours. Its hidden form select has no empty\n option though, and would post the first option for ''. So while the\n value is empty that select is cut from the form and the one rendered\n below stands in: it posts `name=` and holds `required`, as before. */\n const [inForm, setInForm] = useState(true);\n useIsomorphicLayoutEffect(() => {\n if (currentValue !== '') return;\n setInForm(Boolean(triggerRef.current?.closest('form')));\n });\n const standsIn = currentValue === '' && inForm;\n\n /* On a clear the stand-in takes over the name, so form listeners hear\n the change from it. */\n const standInRef = useRef<HTMLSelectElement>(null);\n const hadValueRef = useRef(currentValue !== '');\n useEffect(() => {\n if (currentValue !== '') {\n hadValueRef.current = true;\n return;\n }\n if (!hadValueRef.current) return;\n hadValueRef.current = false;\n standInRef.current?.dispatchEvent(new Event('change', { bubbles: true }));\n }, [currentValue]);\n\n const emitValue = onValueChange as ((value: string) => void) | undefined;\n\n const handleValueChange = (next: string) => {\n // An action option runs its action; it never becomes the value.\n const isAction = options.some(\n (option) => option.value === next && option.intent === 'action',\n );\n // Typeahead on the closed trigger must not run an action (platform\n // navigates away): an action runs only from the open list.\n if (isAction && !openState) return;\n if (!isControlled && !isAction) setInternalValue(next);\n emitValue?.(next);\n };\n\n const handleClear: React.MouseEventHandler<HTMLButtonElement> = (event) => {\n event.preventDefault();\n event.stopPropagation();\n if (!isControlled) setInternalValue('');\n emitValue?.('');\n triggerRef.current?.focus();\n };\n\n const resolvedPlaceholder =\n placeholder ?? t('inputs.select.placeholder', 'Select…');\n\n const showClear = clearable && !!currentValue && !effectiveDisabled;\n\n const nameFromPlaceholder = ariaLabel === undefined && !inFormField;\n const triggerLabel = nameFromPlaceholder ? resolvedPlaceholder : ariaLabel;\n const triggerLabelledBy =\n !ariaLabel && inFormField ? `${ctx.id}-label` : undefined;\n\n const groups = groupOptions(options);\n\n const agentHandle = useMemo<SelectHandle>(\n () => ({\n getValue: () => currentValueRef.current,\n setValue: (next) => {\n // Only what a user could pick: a listed option that is not disabled.\n const picked = options.find((option) => option.value === next);\n if (!picked || picked.disabled || picked.intent === 'action') return;\n if (!isControlled) setInternalValue(next);\n emitValue?.(next);\n },\n clear: () => {\n if (!isControlled) setInternalValue('');\n emitValue?.('');\n },\n open: () => setOpenState(true),\n close: () => setOpenState(false),\n isOpen: () => openState,\n }),\n [emitValue, isControlled, openState, options],\n );\n useAgentRegistration(selectAgent, agentHandle, id);\n\n return (\n <RadixSelect.Root\n value={currentValue}\n onValueChange={handleValueChange}\n open={openState}\n onOpenChange={setOpenState}\n disabled={effectiveDisabled}\n required={effectiveRequired}\n name={standsIn ? undefined : name}\n form={standsIn ? DETACHED_FORM_ID : undefined}\n dir={dir}\n >\n <RadixSelect.Trigger\n ref={composedTriggerRef}\n id={triggerId}\n aria-label={triggerLabel}\n aria-labelledby={triggerLabelledBy}\n // The open list's landmark must not be named \"Select…\".\n data-name-from-placeholder={nameFromPlaceholder || undefined}\n aria-describedby={describedBy}\n aria-invalid={effectiveInvalid || undefined}\n {...triggerAttributes(rest)}\n data-component=\"select\"\n data-component-id={id}\n className={selectTriggerVariants({\n size,\n tone: effectiveTone,\n className,\n })}\n >\n {/* min-w-0 lets the flex child shrink; truncate clips long values\n to one line with an ellipsis instead of wrapping the trigger. */}\n {triggerAdornment ? (\n <span className=\"ds:flex ds:min-w-0 ds:items-center ds:gap-[var(--spacing-sm)]\">\n {/* Decorative, as in the list: the name is the label. */}\n <span\n aria-hidden=\"true\"\n data-select-trigger-adornment=\"\"\n className=\"ds:inline-flex ds:shrink-0 ds:items-center\"\n >\n {triggerAdornment}\n </span>\n <span className=\"ds:min-w-0 ds:truncate ds:text-start\">\n <RadixSelect.Value\n {...SELECT_VALUE_MARKER}\n placeholder={resolvedPlaceholder}\n />\n </span>\n </span>\n ) : (\n <span className=\"ds:min-w-0 ds:truncate ds:text-start\">\n <RadixSelect.Value\n {...SELECT_VALUE_MARKER}\n placeholder={resolvedPlaceholder}\n />\n </span>\n )}\n <span className=\"ds:ms-auto ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n {showClear ? (\n <button\n type=\"button\"\n aria-label={t('inputs.select.clear', 'Clear selection')}\n onClick={handleClear}\n onPointerDown={(event) => event.stopPropagation()}\n onKeyDown={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.stopPropagation();\n }\n }}\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',\n ].join(' ')}\n >\n <X aria-hidden=\"true\" className=\"ds:size-3.5\" />\n </button>\n ) : null}\n <RadixSelect.Icon asChild>\n <ChevronDown\n aria-hidden=\"true\"\n className={[\n 'ds:size-4 ds:shrink-0 ds:text-muted-foreground',\n 'ds:transition-transform ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:group-data-[state=open]:rotate-180',\n ].join(' ')}\n />\n </RadixSelect.Icon>\n </span>\n </RadixSelect.Trigger>\n {standsIn && (name !== undefined || effectiveRequired) ? (\n <select\n ref={standInRef}\n // Its own marker: it sits beside the trigger, not inside it.\n data-component=\"select-field\"\n aria-hidden\n tabIndex={-1}\n // A failed native submit puts focus here: it then needs a name.\n aria-label={triggerLabel}\n aria-labelledby={triggerLabelledBy}\n name={name}\n required={effectiveRequired}\n disabled={effectiveDisabled}\n value=\"\"\n onChange={(event) => {\n if (event.target.value === '') return;\n /* A pick unmounts this field: focus moves to the trigger first,\n not to the page. */\n if (document.activeElement === event.target) {\n triggerRef.current?.focus();\n }\n handleValueChange(event.target.value);\n }}\n className=\"ds:sr-only\"\n >\n <option value=\"\" />\n {options.map((option) => (\n <option\n key={option.value}\n value={option.value}\n disabled={option.disabled}\n dir={option.dir}\n >\n {option.label}\n </option>\n ))}\n </select>\n ) : null}\n <SelectOpenContext.Provider value={openState}>\n <SelectContent container={container}>\n <SelectViewport>\n {options.length === 0 ? (\n <div className=\"ds:ps-8 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground\">\n {t('inputs.select.noOptions', 'No options')}\n </div>\n ) : (\n groups.map(({ group, items }, groupIndex) => {\n const body = items.map((option) => (\n <Fragment key={option.value}>\n {option.separatorBefore ? <SelectSeparator /> : null}\n <SelectItem\n value={option.value}\n className={\n option.intent === 'action'\n ? ACTION_OPTION_CLASSES\n : undefined\n }\n disabled={option.disabled}\n size={size}\n data-option-id={option.value}\n startAdornment={option.startAdornment}\n endContent={option.endContent}\n description={\n showDescriptions ? option.description : undefined\n }\n descriptionTone={option.descriptionTone}\n descriptionInName={descriptionInName}\n wrapLabel={wrapOptionLabels}\n labelDir={option.dir}\n >\n {option.label}\n </SelectItem>\n </Fragment>\n ));\n if (!group) {\n return (\n <RadixSelect.Group key={`group-${groupIndex}`}>\n {body}\n </RadixSelect.Group>\n );\n }\n return (\n <RadixSelect.Group key={`group-${group}`}>\n <SelectLabel>{group}</SelectLabel>\n {body}\n </RadixSelect.Group>\n );\n })\n )}\n </SelectViewport>\n </SelectContent>\n </SelectOpenContext.Provider>\n </RadixSelect.Root>\n );\n});\nSelectImpl.displayName = 'Select';\n\ninterface SelectComponent {\n <T extends string = string>(\n props: SelectProps<T> & { ref?: Ref<HTMLButtonElement> },\n ): ReactElement | null;\n displayName?: string;\n Root: typeof SelectRoot;\n Trigger: typeof SelectTrigger;\n Value: typeof SelectValue;\n Content: typeof SelectContent;\n Viewport: typeof SelectViewport;\n Item: typeof SelectItem;\n ItemText: typeof SelectItemText;\n Group: typeof SelectGroup;\n Label: typeof SelectLabel;\n Separator: typeof SelectSeparator;\n}\n\nconst SelectWithStatics = Object.assign(SelectImpl, {\n Root: SelectRoot,\n Trigger: SelectTrigger,\n Value: SelectValue,\n Content: SelectContent,\n Viewport: SelectViewport,\n Item: SelectItem,\n ItemText: SelectItemText,\n Group: SelectGroup,\n Label: SelectLabel,\n Separator: SelectSeparator,\n}) as unknown as SelectComponent;\n\nexport const Select = SelectWithStatics;\n\nexport {\n SelectRoot,\n SelectTrigger,\n SelectValue,\n SelectContent,\n SelectViewport,\n SelectItem,\n SelectItemText,\n SelectGroup,\n SelectLabel,\n SelectSeparator,\n};\n\nexport { selectTriggerVariants, selectContentVariants, selectItemVariants };\n\nexport type {\n SelectTriggerProps,\n SelectContentProps,\n SelectItemProps,\n SelectLabelProps,\n SelectRootProps,\n};\n\nexport type { ReactNode };\n"],"names":["selectAgent","handle","args","selectTriggerVariants","cva","selectContentVariants","selectItemVariants","MENU_ROW_HIGHLIGHT","selectLabelClasses","iconSizeByItemSize","itemIndicatorStartByItemSize","composeRefs","refs","node","r","SelectOpenContext","createContext","SelectRoot","openProp","defaultOpen","onOpenChange","props","open","setOpen","useControllableState","jsx","RadixSelect","SelectTrigger","forwardRef","size","tone","className","children","ref","SELECT_VALUE_MARKER","WRAPPED_LABEL_IN_TRIGGER","SelectValue","SelectContent","position","sideOffset","container","useContext","PopupRegion","popupRef","jsxs","ChevronUp","ChevronDown","SelectViewport","SelectItem","startAdornment","endContent","description","descriptionTone","descriptionInName","wrapLabel","labelDir","indicatorStart","iconSize","descriptionId","useId","textId","hasDescription","nameWithDescription","itemTextIdProps","itemNameProps","wrappedLabel","optionLabelVariants","fade","itemText","optionLabelRowVariants","OPTION_END_CLASSES","Check","optionDescriptionVariants","SelectItemText","SelectGroup","SelectLabel","SelectSeparator","ACTION_OPTION_CLASSES","DETACHED_FORM_ID","OWNED_TRIGGER_ATTRIBUTES","triggerAttributes","picked","key","value","SelectImpl","options","defaultValue","onValueChange","placeholder","clearable","disabled","required","name","id","ariaLabel","ariaDescribedBy","adornmentInTrigger","showDescriptions","wrapOptionLabels","rest","t","useTranslation","ctx","useFormField","inFormField","FormFieldContext","internalValue","setInternalValue","useState","isControlled","currentValue","openState","setOpenState","currentValueRef","useRef","controlId","useFormFieldControlId","triggerId","effectiveDisabled","effectiveRequired","effectiveInvalid","effectiveTone","describedBy","triggerAdornment","_a","option","triggerRef","composedTriggerRef","dir","useDirection","inForm","setInForm","useIsomorphicLayoutEffect","standsIn","standInRef","hadValueRef","useEffect","emitValue","handleValueChange","next","isAction","handleClear","event","resolvedPlaceholder","showClear","nameFromPlaceholder","triggerLabel","triggerLabelledBy","groups","groupOptions","agentHandle","useMemo","useAgentRegistration","X","group","items","groupIndex","body","Fragment","SelectWithStatics","Select"],"mappings":";;;;;;;;;;;;;;;;;;AASO,MAAMA,KAA0C;AAAA,EACrD,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,iBAAiB,aAAa,QAAQ,OAAO;AAAA,EAC5D,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,IAEpC,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,MAAM,CAACA,MAAWA,EAAO,OAAA;AAAA,IAAO;AAAA,EAClC;AAAA,EAEF,SAAS;AAAA,IACP,WAAW;AAAA;AAAA,MAET,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY;AAAA,UACV,OAAO,EAAE,MAA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