@wow-two-beta/ui-vue 0.0.4 → 0.0.5
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/{BackToTopButton.vue_vue_type_script_setup_true_lang-CkxLllEO.js → BackToTopButton.vue_vue_type_script_setup_true_lang-iLYlhK05.js} +11 -5
- package/dist/chunks/BackToTopButton.vue_vue_type_script_setup_true_lang-iLYlhK05.js.map +1 -0
- package/dist/chunks/{Backdrop.vue_vue_type_script_setup_true_lang-DZUhGY9p.js → Backdrop.vue_vue_type_script_setup_true_lang-CKG--_g8.js} +2 -2
- package/dist/chunks/{Backdrop.vue_vue_type_script_setup_true_lang-DZUhGY9p.js.map → Backdrop.vue_vue_type_script_setup_true_lang-CKG--_g8.js.map} +1 -1
- package/dist/chunks/{BottomSheet.vue_vue_type_script_setup_true_lang-CmNoI4BE.js → BottomSheet.vue_vue_type_script_setup_true_lang-CmNaGird.js} +8 -8
- package/dist/chunks/{BottomSheet.vue_vue_type_script_setup_true_lang-CmNoI4BE.js.map → BottomSheet.vue_vue_type_script_setup_true_lang-CmNaGird.js.map} +1 -1
- package/dist/chunks/{ChatComposer.vue_vue_type_script_setup_true_lang-lNcRhKIv.js → ChatComposer.vue_vue_type_script_setup_true_lang-DfeVsj9h.js} +1024 -579
- package/dist/chunks/ChatComposer.vue_vue_type_script_setup_true_lang-DfeVsj9h.js.map +1 -0
- package/dist/chunks/{DateExtensions-QahSUlRy.js → DateExtensions-C6a-h8ji.js} +12 -22
- package/dist/chunks/{DateExtensions-QahSUlRy.js.map → DateExtensions-C6a-h8ji.js.map} +1 -1
- package/dist/chunks/{DismissableLayer.vue_vue_type_script_setup_true_lang-6nRnzsJW.js → DismissableLayer.vue_vue_type_script_setup_true_lang-ptH1ttBL.js} +3 -3
- package/dist/chunks/DismissableLayer.vue_vue_type_script_setup_true_lang-ptH1ttBL.js.map +1 -0
- package/dist/chunks/{DrawerContent.vue_vue_type_script_setup_true_lang-DvvrJdF0.js → DrawerContent.vue_vue_type_script_setup_true_lang-4n5w3lg2.js} +5 -5
- package/dist/chunks/{DrawerContent.vue_vue_type_script_setup_true_lang-DvvrJdF0.js.map → DrawerContent.vue_vue_type_script_setup_true_lang-4n5w3lg2.js.map} +1 -1
- package/dist/chunks/{ModalContent.vue_vue_type_script_setup_true_lang-CLACSqKg.js → ModalContent.vue_vue_type_script_setup_true_lang-Co5jaeXk.js} +5 -5
- package/dist/chunks/{ModalContent.vue_vue_type_script_setup_true_lang-CLACSqKg.js.map → ModalContent.vue_vue_type_script_setup_true_lang-Co5jaeXk.js.map} +1 -1
- package/dist/chunks/{Navbar.vue_vue_type_script_setup_true_lang-Cl2ejukE.js → Navbar.vue_vue_type_script_setup_true_lang-Cy0zvm5d.js} +7 -7
- package/dist/chunks/Navbar.vue_vue_type_script_setup_true_lang-Cy0zvm5d.js.map +1 -0
- package/dist/chunks/{NotificationItem.vue_vue_type_script_setup_true_lang-KC5Iusce.js → NotificationItem.vue_vue_type_script_setup_true_lang-DySfo3fD.js} +5 -5
- package/dist/chunks/{NotificationItem.vue_vue_type_script_setup_true_lang-KC5Iusce.js.map → NotificationItem.vue_vue_type_script_setup_true_lang-DySfo3fD.js.map} +1 -1
- package/dist/chunks/{OptionTileGroup.vue_vue_type_script_setup_true_lang-BGSmXM_u.js → OptionTileGroup.vue_vue_type_script_setup_true_lang-CKSVGCby.js} +51 -30
- package/dist/chunks/OptionTileGroup.vue_vue_type_script_setup_true_lang-CKSVGCby.js.map +1 -0
- package/dist/chunks/{PopoverContent.vue_vue_type_script_setup_true_lang-D-OiGICS.js → PopoverContent.vue_vue_type_script_setup_true_lang-DYd617X5.js} +4 -4
- package/dist/chunks/{PopoverContent.vue_vue_type_script_setup_true_lang-D-OiGICS.js.map → PopoverContent.vue_vue_type_script_setup_true_lang-DYd617X5.js.map} +1 -1
- package/dist/chunks/{Presence-C7IJvh_P.js → Presence-DE4MlrJz.js} +45 -27
- package/dist/chunks/Presence-DE4MlrJz.js.map +1 -0
- package/dist/chunks/{SortableHandle.vue_vue_type_script_setup_true_lang-CWCXGjZG.js → SortableHandle.vue_vue_type_script_setup_true_lang-8WPwGZ5e.js} +141 -130
- package/dist/chunks/SortableHandle.vue_vue_type_script_setup_true_lang-8WPwGZ5e.js.map +1 -0
- package/dist/chunks/{SurfaceStyles-ChdpGRBO.js → SurfaceStyles-B6W7zdMi.js} +2 -2
- package/dist/chunks/{SurfaceStyles-ChdpGRBO.js.map → SurfaceStyles-B6W7zdMi.js.map} +1 -1
- package/dist/chunks/{TableOfContents.vue_vue_type_script_setup_true_lang-HVL4lg_f.js → TableOfContents.vue_vue_type_script_setup_true_lang-C9eM0AoG.js} +18 -20
- package/dist/chunks/TableOfContents.vue_vue_type_script_setup_true_lang-C9eM0AoG.js.map +1 -0
- package/dist/chunks/{Tones-CI65uuq9.js → Tones-WKBNZ_u2.js} +39 -17
- package/dist/chunks/Tones-WKBNZ_u2.js.map +1 -0
- package/dist/chunks/{index-BD7H9CkO.js → index-CEoYQiWL.js} +3 -3
- package/dist/chunks/{index-BD7H9CkO.js.map → index-CEoYQiWL.js.map} +1 -1
- package/dist/chunks/{index-Cbydgcdk.js → index-op-kbVUk.js} +3 -3
- package/dist/chunks/{index-Cbydgcdk.js.map → index-op-kbVUk.js.map} +1 -1
- package/dist/foundation/primitives/index.js +3 -3
- package/dist/foundation/primitives/presence/Presence.d.ts +4 -0
- package/dist/foundation/utils/index.js +3 -3
- package/dist/index.js +111 -109
- package/dist/presentation/actions/index.js +2 -2
- package/dist/presentation/actions/speedDial/SpeedDialAction.vue.d.ts +6 -5
- package/dist/presentation/actions/speedDial/index.d.ts +3 -5
- package/dist/presentation/display/audioWaveform/AudioWaveform.vue.d.ts +1 -0
- package/dist/presentation/display/diffViewer/DiffViewer.vue.d.ts +2 -0
- package/dist/presentation/display/eventCalendar/EventCalendar.vue.d.ts +1 -0
- package/dist/presentation/display/frameGlyph/FrameGlyph.vue.d.ts +2 -0
- package/dist/presentation/display/gantt/Gantt.vue.d.ts +1 -0
- package/dist/presentation/display/heatmapCalendar/HeatmapCalendar.vue.d.ts +1 -0
- package/dist/presentation/display/index.js +98 -96
- package/dist/presentation/display/list/ListContext.d.ts +16 -0
- package/dist/presentation/display/list/ListItem.vue.d.ts +7 -1
- package/dist/presentation/display/list/index.d.ts +1 -0
- package/dist/presentation/display/metricChip/MetricChip.vue.d.ts +1 -1
- package/dist/presentation/display/moduleGlyphs/CellsGlyph.vue.d.ts +1 -0
- package/dist/presentation/display/radiusGlyph/RadiusGlyph.vue.d.ts +1 -0
- package/dist/presentation/display/reactionBar/ReactionBar.vue.d.ts +1 -0
- package/dist/presentation/feedback/index.js +1 -1
- package/dist/presentation/feedback/tour/Tour.vue.d.ts +1 -0
- package/dist/presentation/forms/TimeColumns.vue.d.ts +22 -0
- package/dist/presentation/forms/dateField/DateField.vue.d.ts +12 -0
- package/dist/presentation/forms/dateTimeField/DateTimeField.vue.d.ts +17 -0
- package/dist/presentation/forms/index.js +2 -2
- package/dist/presentation/forms/multiSelect/MultiSelect.vue.d.ts +8 -0
- package/dist/presentation/forms/multiSelect/MultiSelectContext.d.ts +9 -0
- package/dist/presentation/forms/multiSelect/MultiSelectTags.vue.d.ts +10 -0
- package/dist/presentation/forms/multiSelect/MultiSelectTrigger.vue.d.ts +5 -0
- package/dist/presentation/forms/timeField/TimeField.vue.d.ts +20 -5
- package/dist/presentation/forms/timePicker/TimePicker.vue.d.ts +5 -5
- package/dist/presentation/layout/index.js +1 -1
- package/dist/presentation/nav/index.js +1 -1
- package/dist/presentation/overlays/index.js +5 -5
- package/package.json +3 -2
- package/dist/chunks/BackToTopButton.vue_vue_type_script_setup_true_lang-CkxLllEO.js.map +0 -1
- package/dist/chunks/ChatComposer.vue_vue_type_script_setup_true_lang-lNcRhKIv.js.map +0 -1
- package/dist/chunks/DismissableLayer.vue_vue_type_script_setup_true_lang-6nRnzsJW.js.map +0 -1
- package/dist/chunks/Navbar.vue_vue_type_script_setup_true_lang-Cl2ejukE.js.map +0 -1
- package/dist/chunks/OptionTileGroup.vue_vue_type_script_setup_true_lang-BGSmXM_u.js.map +0 -1
- package/dist/chunks/Presence-C7IJvh_P.js.map +0 -1
- package/dist/chunks/SortableHandle.vue_vue_type_script_setup_true_lang-CWCXGjZG.js.map +0 -1
- package/dist/chunks/TableOfContents.vue_vue_type_script_setup_true_lang-HVL4lg_f.js.map +0 -1
- package/dist/chunks/Tones-CI65uuq9.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatComposer.vue_vue_type_script_setup_true_lang-DfeVsj9h.js","sources":["../../src/presentation/forms/label/Label.vue","../../src/presentation/forms/formHelperText/FormHelperText.vue","../../src/presentation/forms/formErrorMessage/FormErrorMessage.vue","../../src/presentation/forms/legend/Legend.vue","../../src/presentation/forms/InputStyles.ts","../../src/presentation/forms/textInput/TextInput.vue","../../src/presentation/forms/emailInput/EmailInput.vue","../../src/presentation/forms/telInput/TelInput.vue","../../src/presentation/forms/urlInput/UrlInput.vue","../../src/presentation/forms/numberInput/NumberInput.vue","../../src/presentation/forms/passwordInput/PasswordInput.vue","../../src/presentation/forms/searchInput/SearchInput.vue","../../src/presentation/forms/textAreaInput/TextAreaInput.vue","../../src/presentation/forms/checkbox/Checkbox.variants.ts","../../src/presentation/forms/checkbox/Checkbox.vue","../../src/presentation/forms/radio/Radio.vue","../../src/presentation/forms/switch/Switch.vue","../../src/presentation/forms/slider/Slider.vue","../../src/presentation/forms/field/Field.vue","../../src/presentation/forms/checkboxGroup/CheckboxGroupContext.ts","../../src/presentation/forms/checkboxField/CheckboxField.vue","../../src/presentation/forms/radioGroup/RadioGroupContext.ts","../../src/presentation/forms/radioField/RadioField.vue","../../src/presentation/forms/switchField/SwitchField.vue","../../src/presentation/forms/checkboxGroup/CheckboxGroup.vue","../../src/presentation/forms/radioGroup/RadioGroup.vue","../../src/presentation/forms/pinInput/PinInput.vue","../../src/presentation/forms/maskedInput/MaskedInput.vue","../../src/presentation/forms/currencyInput/CurrencyInput.vue","../../src/presentation/forms/percentInput/PercentInput.vue","../../src/presentation/forms/characterCount/CharacterCount.vue","../../src/presentation/forms/inputAddon/InputAddon.vue","../../src/presentation/forms/inputGroup/InputGroup.vue","../../src/presentation/forms/labeledInput/LabeledInput.vue","../../src/presentation/forms/choiceCard/ChoiceCard.vue","../../src/presentation/forms/passwordStrength/PasswordStrength.vue","../../src/presentation/forms/filePicker/FilePicker.vue","../../src/presentation/forms/listbox/ListboxContext.ts","../../src/presentation/forms/listbox/Listbox.vue","../../src/presentation/forms/listbox/ListboxItem.vue","../../src/presentation/forms/listbox/ListboxGroup.vue","../../src/presentation/forms/listbox/ListboxSeparator.vue","../../src/presentation/forms/listbox/ListboxEmpty.vue","../../src/presentation/forms/select/SelectContext.ts","../../src/presentation/forms/select/Select.vue","../../src/presentation/forms/select/Select.variants.ts","../../src/presentation/forms/select/SelectValue.vue","../../src/presentation/forms/select/SelectTrigger.vue","../../src/presentation/forms/select/SelectContent.vue","../../src/presentation/forms/select/SelectItem.vue","../../src/presentation/forms/multiSelect/MultiSelectContext.ts","../../src/presentation/forms/multiSelect/MultiSelect.vue","../../src/presentation/forms/multiSelect/MultiSelectTags.vue","../../src/presentation/forms/multiSelect/MultiSelectTrigger.vue","../../src/presentation/forms/multiSelect/MultiSelectContent.vue","../../src/presentation/forms/multiSelect/MultiSelectItem.vue","../../src/presentation/forms/combobox/ComboboxContext.ts","../../src/presentation/forms/combobox/Combobox.vue","../../src/presentation/forms/combobox/ComboboxInput.vue","../../src/presentation/forms/combobox/ComboboxContent.vue","../../src/presentation/forms/combobox/ComboboxItem.vue","../../src/presentation/forms/combobox/ComboboxGroup.vue","../../src/presentation/forms/combobox/ComboboxSeparator.vue","../../src/presentation/forms/combobox/ComboboxEmpty.vue","../../src/presentation/forms/MonthGrid.vue","../../src/presentation/forms/calendar/Calendar.vue","../../src/presentation/forms/dateField/DateField.vue","../../src/presentation/forms/TimeColumns.vue","../../src/presentation/forms/dateTimeField/DateTimeField.vue","../../src/presentation/forms/timeField/TimeField.vue","../../src/presentation/forms/rangeCalendar/RangeCalendar.vue","../../src/presentation/forms/datePicker/DatePicker.vue","../../src/presentation/forms/timePicker/TimePicker.vue","../../src/presentation/forms/dateRangePicker/DateRangePicker.vue","../../src/presentation/forms/colorSwatch/ColorSwatch.variants.ts","../../src/presentation/forms/colorSwatch/ColorSwatch.vue","../../src/presentation/forms/ColorExtensions.ts","../../src/presentation/forms/colorField/ColorField.vue","../../src/presentation/forms/colorSlider/ColorSlider.vue","../../src/presentation/forms/colorArea/ColorArea.vue","../../src/presentation/forms/colorWheel/ColorWheel.vue","../../src/presentation/forms/colorSwatchPicker/ColorSwatchItem.vue","../../src/presentation/forms/colorSwatchPicker/ColorSwatchPicker.vue","../../src/presentation/forms/colorPicker/ColorPicker.vue","../../src/presentation/forms/stepper/StepperContext.ts","../../src/presentation/forms/stepper/Stepper.vue","../../src/presentation/forms/stepper/StepperList.vue","../../src/presentation/forms/stepper/StepperStep.vue","../../src/presentation/forms/stepper/StepperPanel.vue","../../src/presentation/forms/tagsInput/TagsInput.vue","../../src/presentation/forms/fileUpload/FileUpload.vue","../../src/presentation/forms/editable/EditableContext.ts","../../src/presentation/forms/editable/Editable.vue","../../src/presentation/forms/editable/EditableCancel.vue","../../src/presentation/forms/editable/EditableInput.vue","../../src/presentation/forms/editable/EditablePreview.vue","../../src/presentation/forms/editable/EditableSubmit.vue","../../src/presentation/forms/wizard/WizardContext.ts","../../src/presentation/forms/wizard/Wizard.vue","../../src/presentation/forms/wizard/WizardFooter.vue","../../src/presentation/forms/wizard/WizardStep.vue","../../src/presentation/forms/wizard/WizardSteps.vue","../../src/presentation/forms/codeEditor/CodeEditor.vue","../../src/presentation/forms/markdownEditor/MarkdownEditor.vue","../../src/presentation/forms/jsonEditor/JSONEditorContext.ts","../../src/presentation/forms/jsonEditor/JSONEditorHelpers.ts","../../src/presentation/forms/jsonEditor/JSONEditorTreeNode.vue","../../src/presentation/forms/jsonEditor/JSONEditorTreeView.vue","../../src/presentation/forms/jsonEditor/JSONEditorTextView.vue","../../src/presentation/forms/jsonEditor/JSONEditor.vue","../../src/presentation/forms/recurrenceEditor/RecurrenceEditor.vue","../../src/presentation/forms/knob/Knob.vue","../../src/presentation/forms/keyboardShortcutPicker/KeyboardShortcutPicker.vue","../../src/presentation/forms/iconPicker/IconPicker.vue","../../src/presentation/forms/fontPicker/FontPicker.vue","../../src/presentation/forms/cronInput/CronInput.vue","../../src/presentation/forms/gradientPicker/GradientPicker.vue","../../src/presentation/forms/addressForm/AddressForm.vue","../../src/presentation/forms/phoneInput/PhoneInput.vue","../../src/presentation/forms/emojiPicker/EmojiPicker.variants.ts","../../src/presentation/forms/emojiPicker/CategoryNav.vue","../../src/presentation/forms/emojiPicker/EmojiTile.vue","../../src/presentation/forms/emojiPicker/EmojiGrid.vue","../../src/presentation/forms/emojiPicker/useEmojiPicker.ts","../../src/presentation/forms/emojiPicker/EmojiPicker.vue","../../src/presentation/forms/emojiPicker/EmojiPickerPopover.vue","../../src/presentation/forms/emojiSizeControl/EmojiSizeControl.variants.ts","../../src/presentation/forms/emojiSizeControl/EmojiSizeControl.vue","../../src/presentation/forms/reactionPicker/ReactionPicker.vue","../../src/presentation/forms/chatComposer/ChatComposer.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { Size } from '../../../foundation/utils';\n\nexport interface LabelProps {\n /** The required state, showing a `*` indicator. Auto-derived from `FormControl.isRequired` when present. */\n isRequired?: boolean;\n\n /** The visual size. Default `md`. */\n size?: Size;\n\n /**\n * The id of the labelled control — React's `htmlFor`. Auto-filled from\n * `FormControl` context when omitted.\n */\n htmlFor?: string;\n\n /** The DOM spelling of {@link LabelProps.htmlFor}, which wins when both are set. */\n for?: string;\n\n /**\n * The label's own id. An explicit id detaches the node from the context's\n * `labelId`, so the label stops registering as the context's naming chrome.\n */\n id?: string;\n}\n\n/* Sizes not listed fall back to the `md` row at the call site. */\nconst SIZE: Partial<Record<Size, string>> = {\n xs: 'text-xs',\n sm: 'text-sm',\n md: 'text-sm',\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Size as SizeValue } from '../../../foundation/utils';\nimport { useFormControl, useFormControlChrome } from '../../../foundation/primitives';\n\n/**\n * `<label>` wired to `FormControl` context — when wrapped in a `FormControl`\n * it auto-fills `htmlFor` and `id`. Standalone use: pass `htmlFor` directly.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'Label', inheritAttrs: false });\n\n/* `children` has no prop counterpart — the label copy is the default slot. */\nconst props = withDefaults(defineProps<LabelProps>(), {\n size: SizeValue.Md,\n /* `isRequired` must stay `undefined` when absent: the value falls back to the form\n control's own `isRequired`, and Vue's Boolean casting would turn an absent prop into\n an explicit `false` that shadows the context. */\n isRequired: undefined,\n});\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\n/* Registration flips the context's `labelledBy` on — widgets that name themselves via\n `aria-labelledby` reference the label only while it exists. An explicit `id` prop\n detaches the node from the context's labelId. Passed as a getter to stay reactive. */\nuseFormControlChrome('label', () => props.id == null);\n\nconst isRequired = computed(() => props.isRequired ?? ctx?.isRequired ?? false);\nconst labelFor = computed(() => props.for ?? props.htmlFor ?? ctx?.id);\nconst labelId = computed(() => props.id ?? ctx?.labelId);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n SIZE[props.size] ?? SIZE.md,\n 'font-medium text-foreground',\n ctx?.isDisabled && 'opacity-60',\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLLabelElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <label\n ref=\"root\"\n :for=\"labelFor\"\n :id=\"labelId\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n >\n <slot />\n <span v-if=\"isRequired\" class=\"ml-0.5 text-destructive\" aria-hidden=\"true\">*</span>\n </label>\n</template>\n","<script lang=\"ts\">\nexport interface FormHelperTextProps {\n /**\n * The node's own id. An explicit id detaches it from the context's `helperId`,\n * so the control's `aria-describedby` stops referencing it.\n */\n id?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useFormControl, useFormControlChrome } from '../../../foundation/primitives';\n\n/**\n * Helper / hint text below a form control. Takes `helperId` from `FormControl`\n * and registers itself with the context, so the control's `aria-describedby`\n * references the id only while this node actually renders.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'FormHelperText', inheritAttrs: false });\n\n/* React took the copy as `children`; here it is the default slot. */\nconst props = defineProps<FormHelperTextProps>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\n/* An explicit `id` prop detaches the node from the context's helperId — don't register.\n Passed as a getter so the registration re-runs if the prop changes. */\nuseFormControlChrome('helper', () => props.id == null);\n\nconst helperId = computed(() => props.id ?? ctx?.helperId);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn('text-sm text-muted-foreground', attrs.class as ClassValue),\n);\n\nconst root = useTemplateRef<HTMLParagraphElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <p ref=\"root\" :id=\"helperId\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <slot />\n </p>\n</template>\n","<script lang=\"ts\">\nexport interface FormErrorMessageProps {\n /**\n * The node's own id. An explicit id detaches it from the context's `errorId`,\n * so the control's `aria-describedby` stops referencing it.\n */\n id?: string;\n\n /**\n * The single hand-written message — the scalar half of React's `children`.\n * Set it (or fill the default slot) to override the context's `errors`.\n */\n message?: string | number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useFormControl, useFormControlChrome } from '../../../foundation/primitives';\n\n/**\n * Error copy under a form control. Renders only when the surrounding\n * `FormControl` is `isInvalid` AND there is something to show. `id={errorId}`\n * for `aria-describedby` wiring — the node registers itself with the context,\n * so controls reference the id only while the message actually renders.\n *\n * Without an override it renders the context's `errors` (fed by the forms-engine\n * `Field` glue) — ALL of them, client + server merged. Pass `message`, or fill\n * the default slot, to override with a single hand-written message.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'FormErrorMessage', inheritAttrs: false });\n\nconst props = defineProps<FormErrorMessageProps>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\n/* React tested `children != null && children !== false && children !== ''` because\n `{cond && 'msg'}` renders nothing; the Vue counterpart is an empty `message` or an\n absent slot, both of which must fall through to the context's errors. */\nconst hasChildren = computed(\n () => (props.message != null && props.message !== '') || Boolean(slots.default),\n);\n\nconst messages = computed<readonly string[]>(() => (hasChildren.value ? [] : (ctx?.errors ?? [])));\n\nconst isShown = computed(\n () => (hasChildren.value || messages.value.length > 0) && (ctx ? ctx.isInvalid : true),\n);\n\n/* Register only while rendering under the context id — an explicit `id` prop\n means the context's errorId is NOT in the DOM and must stay unreferenced. */\nuseFormControlChrome('error', () => isShown.value && props.id == null);\n\nconst errorId = computed(() => props.id ?? ctx?.errorId);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() => cn('text-sm text-destructive', attrs.class as ClassValue));\n\nconst root = useTemplateRef<HTMLParagraphElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <p\n v-if=\"isShown\"\n ref=\"root\"\n :id=\"errorId\"\n role=\"alert\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n >\n <template v-if=\"hasChildren\">\n <slot>{{ message }}</slot>\n </template>\n <template v-else-if=\"messages.length === 1\">{{ messages[0] }}</template>\n <template v-else>\n <span v-for=\"(entry, index) in messages\" :key=\"index\" class=\"block\">{{ entry }}</span>\n </template>\n </p>\n</template>\n","<script lang=\"ts\">\n/**\n * Defines props for a `Legend`.\n *\n * React's `HTMLAttributes<HTMLLegendElement>` has no Vue counterpart — every\n * native attribute is a fallthrough attr and lands on the `<legend>` unchanged.\n * The name is kept so consumers importing `LegendProps` still resolve.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface LegendProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * `<legend>` styled to match `Label`. Pair with `Fieldset`.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'Legend', inheritAttrs: false });\n\nconst attrs = useAttrs();\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn('mb-2 text-sm font-medium text-foreground', attrs.class as ClassValue),\n);\n\nconst root = useTemplateRef<HTMLLegendElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <legend ref=\"root\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <slot />\n </legend>\n</template>\n","// Shared visual primitives for form atoms. Co-located in `forms/` so imports\n// stay within-domain (ESLint boundaries allow same-domain imports).\n\nimport { tv, type VariantProps } from '../../foundation/utils';\n\nexport const inputBaseVariants = tv({\n base: 'flex w-full rounded-md bg-popover text-foreground placeholder:text-subtle-foreground transition-colors focus-visible:outline-none focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-60 read-only:bg-muted',\n variants: {\n size: {\n xs: 'h-7 px-2 text-xs',\n sm: 'h-8 px-2.5 text-sm',\n md: 'h-10 px-3 text-sm',\n lg: 'h-12 px-4 text-base',\n },\n state: {\n default: 'border-input hover:border-border-strong',\n invalid: 'border-destructive focus-visible:ring-destructive',\n },\n /* Border weight — scale like `size`/`radius`; default `sm` (1px). Set a literal via `className=\"border-[1.5px]\"`. */\n border: {\n none: 'border-0',\n xs: 'border-[0.5px]',\n sm: 'border',\n md: 'border-2',\n lg: 'border-4',\n xl: 'border-8',\n },\n /* Focus-ring weight — default `md` (2px). The ring being wider than the border read as \"thick\"; use `sm` for a hairline focus. */\n ring: {\n none: 'focus-visible:ring-0',\n sm: 'focus-visible:ring-1',\n md: 'focus-visible:ring-2',\n lg: 'focus-visible:ring-4',\n },\n },\n defaultVariants: {\n size: 'md',\n state: 'default',\n border: 'sm',\n ring: 'md',\n },\n});\n\nexport type InputBaseVariants = VariantProps<typeof inputBaseVariants>;\n\n/** Defines the size step of a form input control. */\nexport const InputSize = {\n /** Refers to the extra-small step (h-7). */\n Xs: 'xs',\n /** Refers to the small step (h-8). */\n Sm: 'sm',\n /** Refers to the medium (default) step (h-10). */\n Md: 'md',\n /** Refers to the large step (h-12). */\n Lg: 'lg',\n} as const;\n\nexport type InputSize = (typeof InputSize)[keyof typeof InputSize];\n\n/** Defines the validity surface of a form input control. */\nexport const InputState = {\n /** Refers to the default (valid / untouched) surface. */\n Default: 'default',\n /** Refers to the invalid surface (destructive border + ring). */\n Invalid: 'invalid',\n} as const;\n\nexport type InputState = (typeof InputState)[keyof typeof InputState];\n\n/** Defines the border-weight step of a form input control. */\nexport const InputBorder = {\n /** Refers to no border. */\n None: 'none',\n /** Refers to a 0.5px hairline border. */\n Xs: 'xs',\n /** Refers to a 1px border (default). */\n Sm: 'sm',\n /** Refers to a 2px border. */\n Md: 'md',\n /** Refers to a 4px border. */\n Lg: 'lg',\n /** Refers to an 8px border. */\n Xl: 'xl',\n} as const;\n\nexport type InputBorder = (typeof InputBorder)[keyof typeof InputBorder];\n\n/** Defines the focus-ring-weight step of a form input control. */\nexport const InputRing = {\n /** Refers to no focus ring. */\n None: 'none',\n /** Refers to a 1px focus ring. */\n Sm: 'sm',\n /** Refers to a 2px focus ring (default). */\n Md: 'md',\n /** Refers to a 4px focus ring. */\n Lg: 'lg',\n} as const;\n\nexport type InputRing = (typeof InputRing)[keyof typeof InputRing];\n\n/* Compile-time lock: enum values ≡ tv axis keys (drift = type error). */\ntype AssertExact<A, B> = [A] extends [B] ? ([B] extends [A] ? true : never) : never;\nconst _assertInputSize: AssertExact<\n InputSize, NonNullable<VariantProps<typeof inputBaseVariants>['size']>\n> = true;\nconst _assertInputState: AssertExact<\n InputState, NonNullable<VariantProps<typeof inputBaseVariants>['state']>\n> = true;\nconst _assertInputBorder: AssertExact<\n InputBorder, NonNullable<VariantProps<typeof inputBaseVariants>['border']>\n> = true;\nconst _assertInputRing: AssertExact<\n InputRing, NonNullable<VariantProps<typeof inputBaseVariants>['ring']>\n> = true;\nvoid _assertInputSize;\nvoid _assertInputState;\nvoid _assertInputBorder;\nvoid _assertInputRing;\n","<script lang=\"ts\">\nimport type { InputSize, InputState, InputBorder, InputRing } from '../InputStyles';\n\nexport interface TextInputProps {\n /** The control size. */\n size?: InputSize;\n /** The validity surface. */\n state?: InputState;\n /** The border weight. */\n border?: InputBorder;\n /** The focus-ring weight. */\n ring?: InputRing;\n\n /** The value, controlled. The `v-model` binding target. */\n modelValue?: string | number;\n\n /** The value, controlled — React's spelling of `modelValue`, which wins when both are set. */\n value?: string | number;\n\n /** The initial value when uncontrolled. */\n defaultValue?: string | number;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n\n /** The read-only state — React's spelling. Falls back to the form control's `isReadOnly`. */\n readOnly?: boolean;\n\n /** The DOM spelling of {@link TextInputProps.readOnly}, which wins when both are set. */\n readonly?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { inputBaseVariants, InputState as InputStateValue } from '../InputStyles';\n\n/**\n * Single-line text input. For email/tel/url/number/password/search variants\n * use the dedicated input component (each carries only the props/buttons it\n * actually needs).\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'TextInput', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<TextInputProps>(), {\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form\n control context, and Vue casts an absent `boolean` prop to `false` — which would\n shadow the context with a hard \"not disabled / not required / not read-only\". */\n disabled: undefined,\n required: undefined,\n readOnly: undefined,\n readonly: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string];\n /** Replaces React's `onValueChange`. Native `input` / `change` stay fallthrough listeners. */\n 'value-change': [value: string];\n}>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\nconst controlled = useControlled<string | number>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? '',\n onChange: (next) => {\n emit('update:modelValue', String(next));\n emit('value-change', String(next));\n },\n});\n\nconst currentValue = controlled.value;\n\nfunction onInput(event: Event): void {\n controlled.setValue((event.target as HTMLInputElement).value);\n}\n\nconst finalState = computed(\n () => props.state ?? (ctx?.isInvalid ? InputStateValue.Invalid : InputStateValue.Default),\n);\n\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst isReadOnly = computed(() => props.readonly ?? props.readOnly ?? ctx?.isReadOnly);\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\nconst describedBy = computed(() => ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n inputBaseVariants({\n size: props.size,\n state: finalState.value,\n border: props.border,\n ring: props.ring,\n }),\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLInputElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <input\n ref=\"root\"\n type=\"text\"\n :id=\"inputId\"\n :value=\"currentValue\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :readonly=\"isReadOnly\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onInput\"\n />\n</template>\n","<script lang=\"ts\">\nimport type { InputSize, InputState, InputBorder, InputRing } from '../InputStyles';\n\nexport interface EmailInputProps {\n /** The control size. */\n size?: InputSize;\n /** The validity surface. */\n state?: InputState;\n /** The border weight. */\n border?: InputBorder;\n /** The focus-ring weight. */\n ring?: InputRing;\n\n /** The value, controlled. The `v-model` binding target. */\n modelValue?: string | number;\n\n /** The value, controlled — React's spelling of `modelValue`, which wins when both are set. */\n value?: string | number;\n\n /** The initial value when uncontrolled. */\n defaultValue?: string | number;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n\n /** The read-only state — React's spelling. Falls back to the form control's `isReadOnly`. */\n readOnly?: boolean;\n\n /** The DOM spelling of {@link EmailInputProps.readOnly}, which wins when both are set. */\n readonly?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { inputBaseVariants, InputState as InputStateValue } from '../InputStyles';\n\n/** `<input type=\"email\">` with sensible defaults (autocomplete, inputmode). */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'EmailInput', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<EmailInputProps>(), {\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form\n control context, and Vue casts an absent `boolean` prop to `false` — which would\n shadow the context with a hard \"not disabled / not required / not read-only\". */\n disabled: undefined,\n required: undefined,\n readOnly: undefined,\n readonly: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string];\n /** Replaces React's `onValueChange`. Native `input` / `change` stay fallthrough listeners. */\n 'value-change': [value: string];\n}>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\nconst controlled = useControlled<string | number>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? '',\n onChange: (next) => {\n emit('update:modelValue', String(next));\n emit('value-change', String(next));\n },\n});\n\nconst currentValue = controlled.value;\n\nfunction onInput(event: Event): void {\n controlled.setValue((event.target as HTMLInputElement).value);\n}\n\nconst finalState = computed(\n () => props.state ?? (ctx?.isInvalid ? InputStateValue.Invalid : InputStateValue.Default),\n);\n\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst isReadOnly = computed(() => props.readonly ?? props.readOnly ?? ctx?.isReadOnly);\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\nconst describedBy = computed(() => ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n inputBaseVariants({\n size: props.size,\n state: finalState.value,\n border: props.border,\n ring: props.ring,\n }),\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLInputElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <input\n ref=\"root\"\n type=\"email\"\n autocomplete=\"email\"\n inputmode=\"email\"\n :spellcheck=\"false\"\n :id=\"inputId\"\n :value=\"currentValue\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :readonly=\"isReadOnly\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onInput\"\n />\n</template>\n","<script lang=\"ts\">\nimport type { InputSize, InputState, InputBorder, InputRing } from '../InputStyles';\n\nexport interface TelInputProps {\n /** The control size. */\n size?: InputSize;\n /** The validity surface. */\n state?: InputState;\n /** The border weight. */\n border?: InputBorder;\n /** The focus-ring weight. */\n ring?: InputRing;\n\n /** The value, controlled. The `v-model` binding target. */\n modelValue?: string | number;\n\n /** The value, controlled — React's spelling of `modelValue`, which wins when both are set. */\n value?: string | number;\n\n /** The initial value when uncontrolled. */\n defaultValue?: string | number;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n\n /** The read-only state — React's spelling. Falls back to the form control's `isReadOnly`. */\n readOnly?: boolean;\n\n /** The DOM spelling of {@link TelInputProps.readOnly}, which wins when both are set. */\n readonly?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { inputBaseVariants, InputState as InputStateValue } from '../InputStyles';\n\n/** `<input type=\"tel\">` with `inputmode=\"tel\"` and `autocomplete=\"tel\"`. */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'TelInput', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<TelInputProps>(), {\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form\n control context, and Vue casts an absent `boolean` prop to `false` — which would\n shadow the context with a hard \"not disabled / not required / not read-only\". */\n disabled: undefined,\n required: undefined,\n readOnly: undefined,\n readonly: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string];\n /** Replaces React's `onValueChange`. Native `input` / `change` stay fallthrough listeners. */\n 'value-change': [value: string];\n}>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\nconst controlled = useControlled<string | number>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? '',\n onChange: (next) => {\n emit('update:modelValue', String(next));\n emit('value-change', String(next));\n },\n});\n\nconst currentValue = controlled.value;\n\nfunction onInput(event: Event): void {\n controlled.setValue((event.target as HTMLInputElement).value);\n}\n\nconst finalState = computed(\n () => props.state ?? (ctx?.isInvalid ? InputStateValue.Invalid : InputStateValue.Default),\n);\n\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst isReadOnly = computed(() => props.readonly ?? props.readOnly ?? ctx?.isReadOnly);\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\nconst describedBy = computed(() => ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n inputBaseVariants({\n size: props.size,\n state: finalState.value,\n border: props.border,\n ring: props.ring,\n }),\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLInputElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <input\n ref=\"root\"\n type=\"tel\"\n autocomplete=\"tel\"\n inputmode=\"tel\"\n :id=\"inputId\"\n :value=\"currentValue\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :readonly=\"isReadOnly\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onInput\"\n />\n</template>\n","<script lang=\"ts\">\nimport type { InputSize, InputState, InputBorder, InputRing } from '../InputStyles';\n\nexport interface UrlInputProps {\n /** The control size. */\n size?: InputSize;\n /** The validity surface. */\n state?: InputState;\n /** The border weight. */\n border?: InputBorder;\n /** The focus-ring weight. */\n ring?: InputRing;\n\n /** The value, controlled. The `v-model` binding target. */\n modelValue?: string | number;\n\n /** The value, controlled — React's spelling of `modelValue`, which wins when both are set. */\n value?: string | number;\n\n /** The initial value when uncontrolled. */\n defaultValue?: string | number;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n\n /** The read-only state — React's spelling. Falls back to the form control's `isReadOnly`. */\n readOnly?: boolean;\n\n /** The DOM spelling of {@link UrlInputProps.readOnly}, which wins when both are set. */\n readonly?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { inputBaseVariants, InputState as InputStateValue } from '../InputStyles';\n\n/** `<input type=\"url\">` with `inputmode=\"url\"` and `autocomplete=\"url\"`. */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'UrlInput', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<UrlInputProps>(), {\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form\n control context, and Vue casts an absent `boolean` prop to `false` — which would\n shadow the context with a hard \"not disabled / not required / not read-only\". */\n disabled: undefined,\n required: undefined,\n readOnly: undefined,\n readonly: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string];\n /** Replaces React's `onValueChange`. Native `input` / `change` stay fallthrough listeners. */\n 'value-change': [value: string];\n}>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\nconst controlled = useControlled<string | number>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? '',\n onChange: (next) => {\n emit('update:modelValue', String(next));\n emit('value-change', String(next));\n },\n});\n\nconst currentValue = controlled.value;\n\nfunction onInput(event: Event): void {\n controlled.setValue((event.target as HTMLInputElement).value);\n}\n\nconst finalState = computed(\n () => props.state ?? (ctx?.isInvalid ? InputStateValue.Invalid : InputStateValue.Default),\n);\n\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst isReadOnly = computed(() => props.readonly ?? props.readOnly ?? ctx?.isReadOnly);\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\nconst describedBy = computed(() => ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n inputBaseVariants({\n size: props.size,\n state: finalState.value,\n border: props.border,\n ring: props.ring,\n }),\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLInputElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <input\n ref=\"root\"\n type=\"url\"\n autocomplete=\"url\"\n inputmode=\"url\"\n :spellcheck=\"false\"\n :id=\"inputId\"\n :value=\"currentValue\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :readonly=\"isReadOnly\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onInput\"\n />\n</template>\n","<script lang=\"ts\">\nimport type { InputSize, InputState, InputBorder, InputRing } from '../InputStyles';\n\nexport interface NumberInputProps {\n /** The control size. */\n size?: InputSize;\n /** The validity surface. */\n state?: InputState;\n /** The border weight. */\n border?: InputBorder;\n /** The focus-ring weight. */\n ring?: InputRing;\n\n /** The increment granularity of the stepper buttons and arrow keys. Default 1. */\n step?: number;\n\n /**\n * The value, controlled. The `v-model` binding target.\n *\n * Emitted back as the input's raw string, matching Vue's own `v-model` on a\n * native `<input type=\"number\">`; add `.number` at the call site for a number.\n */\n modelValue?: string | number;\n\n /** The value, controlled — React's spelling of `modelValue`, which wins when both are set. */\n value?: string | number;\n\n /** The initial value when uncontrolled. */\n defaultValue?: string | number;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n\n /** The read-only state — React's spelling. Falls back to the form control's `isReadOnly`. */\n readOnly?: boolean;\n\n /** The DOM spelling of {@link NumberInputProps.readOnly}, which wins when both are set. */\n readonly?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Minus, Plus } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { Icon } from '../../../foundation/icons';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { inputBaseVariants, InputState as InputStateValue } from '../InputStyles';\n\nconst MinusIcon = Minus;\nconst PlusIcon = Plus;\n\n/**\n * Numeric input with stepper buttons. Steppers are raw `<button>` elements\n * to keep the strict atom rule (NumberInput is L3; importing Button would\n * make this an atom-on-atom composition).\n */\n/* `inheritAttrs: false` so `class` folds into the wrapper's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. Everything else is forwarded\n onto the inner `<input>` by hand, matching React's `{...props}` placement. */\ndefineOptions({ name: 'NumberInput', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<NumberInputProps>(), {\n step: 1,\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form\n control context, and Vue casts an absent `boolean` prop to `false` — which would\n shadow the context with a hard \"not disabled / not required / not read-only\". */\n disabled: undefined,\n required: undefined,\n readOnly: undefined,\n readonly: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string];\n /** Replaces React's `onValueChange`. Native `input` / `change` stay fallthrough listeners. */\n 'value-change': [value: string];\n}>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\nconst controlled = useControlled<string | number>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? '',\n onChange: (next) => {\n emit('update:modelValue', String(next));\n emit('value-change', String(next));\n },\n});\n\nconst currentValue = controlled.value;\n\nconst root = useTemplateRef<HTMLInputElement>('root');\n\nfunction onInput(event: Event): void {\n controlled.setValue((event.target as HTMLInputElement).value);\n}\n\nfunction adjust(direction: 1 | -1): void {\n const el = root.value;\n if (!el || typeof el.stepUp !== 'function') return;\n /* No argument — stepUp(n) steps n × the `step` attribute (already set on the input), not by n. */\n if (direction === 1) el.stepUp();\n else el.stepDown();\n /* The dispatched events drive this component's own `@input` (which re-reads `el.value`\n and fires the emits) and any fallthrough `input` / `change` listener the consumer bound. */\n el.dispatchEvent(new Event('input', { bubbles: true }));\n el.dispatchEvent(new Event('change', { bubbles: true }));\n}\n\nconst finalState = computed(\n () => props.state ?? (ctx?.isInvalid ? InputStateValue.Invalid : InputStateValue.Default),\n);\n\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled ?? false);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst isReadOnly = computed(() => props.readonly ?? props.readOnly ?? ctx?.isReadOnly);\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\nconst describedBy = computed(() => ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst wrapperClass = computed(() => cn('relative', attrs.class as ClassValue));\n\nconst inputClass = computed(() =>\n cn(\n inputBaseVariants({\n size: props.size,\n state: finalState.value,\n border: props.border,\n ring: props.ring,\n }),\n 'pr-12 [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none',\n ),\n);\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div :class=\"wrapperClass\">\n <input\n ref=\"root\"\n type=\"number\"\n inputmode=\"decimal\"\n :step=\"step\"\n :id=\"inputId\"\n :value=\"currentValue\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :readonly=\"isReadOnly\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :class=\"inputClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onInput\"\n />\n <div class=\"absolute right-1 top-1/2 flex -translate-y-1/2 items-center\">\n <button\n type=\"button\"\n :disabled=\"isDisabled\"\n aria-label=\"Decrement\"\n class=\"grid h-7 w-6 place-items-center rounded text-muted-foreground hover:bg-muted disabled:opacity-50\"\n @click=\"adjust(-1)\"\n >\n <Icon :icon=\"MinusIcon\" :size=\"14\" />\n </button>\n <button\n type=\"button\"\n :disabled=\"isDisabled\"\n aria-label=\"Increment\"\n class=\"grid h-7 w-6 place-items-center rounded text-muted-foreground hover:bg-muted disabled:opacity-50\"\n @click=\"adjust(1)\"\n >\n <Icon :icon=\"PlusIcon\" :size=\"14\" />\n </button>\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { InputSize, InputState } from '../InputStyles';\n\nexport interface PasswordInputProps {\n /** The control size. */\n size?: InputSize;\n /** The validity surface. */\n state?: InputState;\n /** The visibility-toggle button's presence. Default true. */\n hasToggle?: boolean;\n\n /** The value, controlled — React's spelling, which wins when both are set. */\n value?: string | number;\n\n /** The value, controlled. The `v-model` binding target. */\n modelValue?: string | number;\n\n /** The initial value when uncontrolled. */\n defaultValue?: string | number;\n\n /** The autofill hint. React defaulted this to `current-password`; so does the port. */\n autocomplete?: string;\n\n /** React's spelling of {@link PasswordInputProps.autocomplete}; the DOM spelling wins. */\n autoComplete?: string;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n\n /** The read-only state — React's spelling. Falls back to the form control's `isReadOnly`. */\n readOnly?: boolean;\n\n /** The DOM spelling of {@link PasswordInputProps.readOnly}, which wins when both are set. */\n readonly?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Eye, EyeOff } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { Icon } from '../../../foundation/icons';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { inputBaseVariants, InputState as InputStateValue } from '../InputStyles';\n\n/**\n * Password input with optional visibility toggle. Toggle is a raw `<button>`\n * to keep the strict atom rule.\n */\n/* `inheritAttrs: false` so `class` folds into the wrapper's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'PasswordInput', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<PasswordInputProps>(), {\n hasToggle: true,\n autocomplete: undefined,\n autoComplete: undefined,\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form control\n context, and Vue casts an absent `boolean` prop to `false` — which would shadow it. */\n disabled: undefined,\n required: undefined,\n readOnly: undefined,\n readonly: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string];\n /** Replaces React's `onValueChange`. Native `input` / `change` stay fallthrough listeners. */\n 'value-change': [value: string];\n}>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\nconst controlled = useControlled<string | number>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? '',\n onChange: (next) => {\n emit('update:modelValue', String(next));\n emit('value-change', String(next));\n },\n});\n\nconst currentValue = controlled.value;\n\nfunction onInput(event: Event): void {\n controlled.setValue((event.target as HTMLInputElement).value);\n}\n\nconst visible = ref(false);\n\nfunction toggle(): void {\n visible.value = !visible.value;\n}\n\nconst inputType = computed(() => (visible.value ? 'text' : 'password'));\nconst toggleLabel = computed(() => (visible.value ? 'Hide password' : 'Show password'));\nconst toggleIcon = computed(() => (visible.value ? EyeOff : Eye));\n\nconst autocompleteValue = computed(\n () => props.autocomplete ?? props.autoComplete ?? 'current-password',\n);\n\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled ?? false);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst isReadOnly = computed(() => props.readonly ?? props.readOnly ?? ctx?.isReadOnly);\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\nconst describedBy = computed(() => ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst wrapperClass = computed(() => cn('relative', attrs.class as ClassValue));\n\nconst inputClass = computed(() =>\n cn(\n inputBaseVariants({\n size: props.size,\n state:\n props.state ?? (ctx?.isInvalid ? InputStateValue.Invalid : InputStateValue.Default),\n }),\n props.hasToggle && 'pr-10',\n ),\n);\n\nconst input = useTemplateRef<HTMLInputElement>('input');\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: input });\n</script>\n\n<template>\n <div :class=\"wrapperClass\">\n <input\n ref=\"input\"\n :type=\"inputType\"\n :autocomplete=\"autocompleteValue\"\n :spellcheck=\"false\"\n :id=\"inputId\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :readonly=\"isReadOnly\"\n :value=\"currentValue\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :class=\"inputClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onInput\"\n />\n <button\n v-if=\"hasToggle\"\n type=\"button\"\n :disabled=\"isDisabled\"\n :aria-label=\"toggleLabel\"\n :aria-pressed=\"visible\"\n class=\"absolute right-1 top-1/2 grid h-8 w-8 -translate-y-1/2 place-items-center rounded text-muted-foreground hover:bg-muted disabled:opacity-50\"\n @click=\"toggle\"\n >\n <Icon :icon=\"toggleIcon\" :size=\"16\" />\n </button>\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { InputSize, InputState, InputBorder, InputRing } from '../InputStyles';\n\nexport interface SearchInputProps {\n /** The control size. */\n size?: InputSize;\n /** The validity surface. */\n state?: InputState;\n /** The border weight. */\n border?: InputBorder;\n /** The focus-ring weight. */\n ring?: InputRing;\n\n /** The clearable state, showing a clear (×) button when the input has a value. Default true. */\n isClearable?: boolean;\n\n /** The value, controlled. The `v-model` binding target. */\n modelValue?: string | number;\n\n /** The value, controlled — React's spelling of `modelValue`, which wins when both are set. */\n value?: string | number;\n\n /** The initial value when uncontrolled. */\n defaultValue?: string | number;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n\n /** The read-only state — React's spelling. Falls back to the form control's `isReadOnly`. */\n readOnly?: boolean;\n\n /** The DOM spelling of {@link SearchInputProps.readOnly}, which wins when both are set. */\n readonly?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Search, X } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { Icon } from '../../../foundation/icons';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { inputBaseVariants, InputState as InputStateValue } from '../InputStyles';\n\nconst SearchIcon = Search;\nconst ClearIcon = X;\n\n/**\n * Search input with leading search icon and optional clear button.\n * Buttons are raw `<button>` elements to keep the strict atom rule.\n */\n/* `inheritAttrs: false` so `class` folds into the wrapper's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. Everything else is forwarded\n onto the inner `<input>` by hand, matching React's `{...props}` placement. */\ndefineOptions({ name: 'SearchInput', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<SearchInputProps>(), {\n isClearable: true,\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form\n control context, and Vue casts an absent `boolean` prop to `false` — which would\n shadow the context with a hard \"not disabled / not required / not read-only\". */\n disabled: undefined,\n required: undefined,\n readOnly: undefined,\n readonly: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string];\n /** Replaces React's `onValueChange`. Native `input` / `change` stay fallthrough listeners. */\n 'value-change': [value: string];\n /** Replaces React's `onClear`. Fires after the value has been reset to empty. */\n clear: [];\n}>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\nconst controlled = useControlled<string | number>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? '',\n onChange: (next) => {\n emit('update:modelValue', String(next));\n emit('value-change', String(next));\n },\n});\n\nconst currentValue = controlled.value;\n\nconst root = useTemplateRef<HTMLInputElement>('root');\n\nfunction onInput(event: Event): void {\n controlled.setValue((event.target as HTMLInputElement).value);\n}\n\nconst showClear = computed(\n () => props.isClearable && String(currentValue.value ?? '').length > 0,\n);\n\nfunction handleClear(): void {\n const el = root.value;\n if (el) {\n /* React needed the native value-setter to defeat its own value tracker; Vue reads the\n value straight off the element, so a plain assignment plus a bubbling `input` drives\n both this component's handler and any fallthrough `input` listener. */\n el.value = '';\n el.dispatchEvent(new Event('input', { bubbles: true }));\n el.focus();\n } else {\n controlled.setValue('');\n }\n emit('clear');\n}\n\nconst finalState = computed(\n () => props.state ?? (ctx?.isInvalid ? InputStateValue.Invalid : InputStateValue.Default),\n);\n\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled ?? false);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst isReadOnly = computed(() => props.readonly ?? props.readOnly ?? ctx?.isReadOnly);\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\nconst describedBy = computed(() => ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst wrapperClass = computed(() => cn('relative', attrs.class as ClassValue));\n\nconst inputClass = computed(() =>\n cn(\n inputBaseVariants({\n size: props.size,\n state: finalState.value,\n border: props.border,\n ring: props.ring,\n }),\n 'pl-9',\n showClear.value && 'pr-9',\n '[&::-webkit-search-cancel-button]:appearance-none',\n ),\n);\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div :class=\"wrapperClass\">\n <Icon\n :icon=\"SearchIcon\"\n :size=\"16\"\n class=\"absolute left-3 top-1/2 -translate-y-1/2 text-subtle-foreground\"\n />\n <input\n ref=\"root\"\n type=\"search\"\n :id=\"inputId\"\n :value=\"currentValue\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :readonly=\"isReadOnly\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :class=\"inputClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onInput\"\n />\n <button\n v-if=\"showClear\"\n type=\"button\"\n :disabled=\"isDisabled\"\n aria-label=\"Clear search\"\n class=\"absolute right-1 top-1/2 grid h-8 w-8 -translate-y-1/2 place-items-center rounded text-subtle-foreground hover:bg-muted hover:text-muted-foreground\"\n @click=\"handleClear\"\n >\n <Icon :icon=\"ClearIcon\" :size=\"14\" />\n </button>\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { InputSize, InputState, InputBorder, InputRing } from '../InputStyles';\n\nexport interface TextAreaInputProps {\n /** The control size. */\n size?: InputSize;\n /** The validity surface. */\n state?: InputState;\n /** The border weight. */\n border?: InputBorder;\n /** The focus-ring weight. */\n ring?: InputRing;\n\n /** The visible row count. Default 3. */\n rows?: number;\n\n /** The value, controlled. The `v-model` binding target. */\n modelValue?: string | number;\n\n /** The value, controlled — React's spelling of `modelValue`, which wins when both are set. */\n value?: string | number;\n\n /** The initial value when uncontrolled. */\n defaultValue?: string | number;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n\n /** The read-only state — React's spelling. Falls back to the form control's `isReadOnly`. */\n readOnly?: boolean;\n\n /** The DOM spelling of {@link TextAreaInputProps.readOnly}, which wins when both are set. */\n readonly?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { inputBaseVariants, InputState as InputStateValue } from '../InputStyles';\n\n/**\n * Multi-line text input. Inherits the input visual base. For autosize, pair\n * with a sibling-domain hook in v1 — kept simple at L3.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'TextAreaInput', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<TextAreaInputProps>(), {\n rows: 3,\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form\n control context, and Vue casts an absent `boolean` prop to `false` — which would\n shadow the context with a hard \"not disabled / not required / not read-only\". */\n disabled: undefined,\n required: undefined,\n readOnly: undefined,\n readonly: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string];\n /** Replaces React's `onValueChange`. Native `input` / `change` stay fallthrough listeners. */\n 'value-change': [value: string];\n}>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\nconst controlled = useControlled<string | number>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? '',\n onChange: (next) => {\n emit('update:modelValue', String(next));\n emit('value-change', String(next));\n },\n});\n\nconst currentValue = controlled.value;\n\nfunction onInput(event: Event): void {\n controlled.setValue((event.target as HTMLTextAreaElement).value);\n}\n\nconst finalState = computed(\n () => props.state ?? (ctx?.isInvalid ? InputStateValue.Invalid : InputStateValue.Default),\n);\n\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst isReadOnly = computed(() => props.readonly ?? props.readOnly ?? ctx?.isReadOnly);\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\nconst describedBy = computed(() => ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n inputBaseVariants({\n size: props.size,\n state: finalState.value,\n border: props.border,\n ring: props.ring,\n }),\n 'h-auto resize-y py-2',\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLTextAreaElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <textarea\n ref=\"root\"\n :rows=\"rows\"\n :id=\"inputId\"\n :value=\"currentValue\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :readonly=\"isReadOnly\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onInput\"\n />\n</template>\n","import { tv, type VariantProps, ColorTone } from '../../../foundation/utils';\n\n/** Defines the checkbox visual surface style. */\nexport const CheckboxVariant = {\n /** Refers to an opaque, filled surface. */\n Solid: 'solid',\n /** Refers to a soft tinted surface. */\n Soft: 'soft',\n /** Refers to a bordered, transparent surface. */\n Outline: 'outline',\n /** Refers to a borderless, transparent surface. */\n Ghost: 'ghost',\n /** Refers to a glass surface. */\n Glass: 'glass',\n /** Refers to a glass surface with a hairline border. */\n GlassSurface: 'glass-surface',\n} as const;\n\nexport type CheckboxVariant = (typeof CheckboxVariant)[keyof typeof CheckboxVariant];\n\nexport const checkboxVariants = tv({\n base: 'pointer-events-none grid h-full w-full place-items-center rounded-sm border transition-colors peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-1 peer-disabled:opacity-50',\n variants: {\n variant: {\n solid: 'border-input bg-background',\n soft: 'border-transparent',\n outline: 'bg-transparent',\n ghost: 'border-transparent bg-transparent',\n glass: 'border-white/40 bg-black/40 backdrop-blur-sm',\n 'glass-surface': 'border-white/60 bg-black/40 backdrop-blur-sm',\n },\n tone: {\n primary: '',\n neutral: '',\n danger: '',\n success: '',\n warning: '',\n },\n },\n compoundVariants: [\n // === SOLID × tone — bg-background unchecked → tone fill checked ===\n { variant: 'solid', tone: 'primary', class: 'text-primary-foreground peer-checked:border-primary peer-checked:bg-primary' },\n { variant: 'solid', tone: 'neutral', class: 'text-background peer-checked:border-foreground peer-checked:bg-foreground' },\n { variant: 'solid', tone: 'danger', class: 'text-destructive-foreground peer-checked:border-destructive peer-checked:bg-destructive' },\n { variant: 'solid', tone: 'success', class: 'text-success-foreground peer-checked:border-success peer-checked:bg-success' },\n { variant: 'solid', tone: 'warning', class: 'text-warning-foreground peer-checked:border-warning peer-checked:bg-warning' },\n\n // === SOFT × tone — soft bg unchecked → strong tone fill checked ===\n { variant: 'soft', tone: 'primary', class: 'bg-primary-soft text-primary-soft-foreground peer-checked:bg-primary peer-checked:text-primary-foreground' },\n { variant: 'soft', tone: 'neutral', class: 'bg-muted text-foreground peer-checked:bg-foreground peer-checked:text-background' },\n { variant: 'soft', tone: 'danger', class: 'bg-destructive-soft text-destructive-soft-foreground peer-checked:bg-destructive peer-checked:text-destructive-foreground' },\n { variant: 'soft', tone: 'success', class: 'bg-success-soft text-success-soft-foreground peer-checked:bg-success peer-checked:text-success-foreground' },\n { variant: 'soft', tone: 'warning', class: 'bg-warning-soft text-warning-soft-foreground peer-checked:bg-warning peer-checked:text-warning-foreground' },\n\n // === OUTLINE × tone — tone border unchecked → tone fill checked ===\n { variant: 'outline', tone: 'primary', class: 'border-primary text-primary peer-checked:bg-primary peer-checked:text-primary-foreground' },\n { variant: 'outline', tone: 'neutral', class: 'border-border-strong text-foreground peer-checked:bg-foreground peer-checked:text-background' },\n { variant: 'outline', tone: 'danger', class: 'border-destructive text-destructive peer-checked:bg-destructive peer-checked:text-destructive-foreground' },\n { variant: 'outline', tone: 'success', class: 'border-success text-success peer-checked:bg-success peer-checked:text-success-foreground' },\n { variant: 'outline', tone: 'warning', class: 'border-warning text-warning peer-checked:bg-warning peer-checked:text-warning-foreground' },\n\n // === GHOST × tone — no border/bg unchecked → tone-tinted bg + tone check checked ===\n { variant: 'ghost', tone: 'primary', class: 'text-primary peer-checked:bg-primary/10' },\n { variant: 'ghost', tone: 'neutral', class: 'text-foreground peer-checked:bg-muted' },\n { variant: 'ghost', tone: 'danger', class: 'text-destructive peer-checked:bg-destructive/10' },\n { variant: 'ghost', tone: 'success', class: 'text-success peer-checked:bg-success/10' },\n { variant: 'ghost', tone: 'warning', class: 'text-warning peer-checked:bg-warning/10' },\n\n // === GLASS × tone — dark glass stays on check; only the white check icon appears (peer-checked:opacity-100 on Check). Tone is preserved as text-white throughout — bg doesn't swap, matching the photo-overlay aesthetic. ===\n { variant: 'glass', tone: 'primary', class: 'text-white' },\n { variant: 'glass', tone: 'neutral', class: 'text-white' },\n { variant: 'glass', tone: 'danger', class: 'text-white' },\n { variant: 'glass', tone: 'success', class: 'text-white' },\n { variant: 'glass', tone: 'warning', class: 'text-white' },\n\n // === GLASS-SURFACE × tone — same: dark glass + white check on check. Border emphasis (white/80) optional on check for stronger affordance. ===\n { variant: 'glass-surface', tone: 'primary', class: 'text-white peer-checked:border-white/80' },\n { variant: 'glass-surface', tone: 'neutral', class: 'text-white peer-checked:border-white/80' },\n { variant: 'glass-surface', tone: 'danger', class: 'text-white peer-checked:border-white/80' },\n { variant: 'glass-surface', tone: 'success', class: 'text-white peer-checked:border-white/80' },\n { variant: 'glass-surface', tone: 'warning', class: 'text-white peer-checked:border-white/80' },\n ],\n defaultVariants: {\n variant: 'solid',\n tone: 'primary',\n },\n});\n\nexport type CheckboxVariants = VariantProps<typeof checkboxVariants>;\n\n/* Compile-time lock: enum values ≡ tv axis keys (drift = type error). */\ntype AssertExact<A, B> = [A] extends [B] ? ([B] extends [A] ? true : never) : never;\nconst _assertCheckboxVariant: AssertExact<\n CheckboxVariant, NonNullable<VariantProps<typeof checkboxVariants>['variant']>\n> = true;\nconst _assertCheckboxTone: AssertExact<\n ColorTone, NonNullable<VariantProps<typeof checkboxVariants>['tone']>\n> = true;\nvoid _assertCheckboxVariant;\nvoid _assertCheckboxTone;\n","<script lang=\"ts\">\nimport type { ColorProp, ColorTone, SizePreset, SizeUnion } from '../../../foundation/utils';\nimport type { CheckboxVariant, CheckboxVariants } from './Checkbox.variants';\n\n/* Checkbox supports the 5-preset core (skips `2xl` — outsized for a form control). */\nexport type CheckboxSizePreset = Extract<SizePreset, 'xs' | 'sm' | 'md' | 'lg' | 'xl'>;\n\nexport interface CheckboxProps {\n /** The size — preset (`xs|sm|md|lg|xl`) → box + icon scale · raw number/string → square inline · object → explicit dims. See `SizeUnion`. */\n size?: SizeUnion<CheckboxSizePreset>;\n\n /** The visual surface style. */\n variant?: CheckboxVariant;\n\n /** The semantic tone palette. */\n tone?: ColorTone;\n\n /** The tristate visual state — input stays unchecked but renders as a dash with the same checked-state styling. */\n isIndeterminate?: boolean;\n\n /** The per-instance color override (string seed or slot object) — overrides the active `tone`'s theme tokens locally. */\n color?: ColorProp;\n\n /** The checked state, controlled — React's spelling, which wins when both are set. */\n checked?: boolean;\n\n /** The checked state, controlled. The `v-model` binding target. */\n modelValue?: boolean;\n\n /** The initial checked state when uncontrolled. */\n defaultChecked?: boolean;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n}\n\nconst COMPONENT_NAME = 'Checkbox';\n\n/* Outer wrapper box dim per preset. */\nconst BOX_SIZE_CLASS: Record<CheckboxSizePreset, string> = {\n xs: 'h-3.5 w-3.5', // 14px — dense / mobile-tight (consumer must ensure ≥24px hit target via wrapping label)\n sm: 'h-4 w-4', // 16px\n md: 'h-5 w-5', // 20px (default)\n lg: 'h-6 w-6', // 24px (WCAG-compliant standalone)\n xl: 'h-7 w-7', // 28px (emphasis / a11y-first)\n};\n\n/* Inner icon dim per preset — scales proportionally to box. */\nconst ICON_SIZE_CLASS: Record<CheckboxSizePreset, string> = {\n xs: 'h-2.5 w-2.5',\n sm: 'h-3 w-3',\n md: 'h-3.5 w-3.5',\n lg: 'h-4 w-4',\n xl: 'h-5 w-5',\n};\n\n/* Fallback icon dim when raw/object size used — middle of scale. */\nconst DEFAULT_ICON_CLASS = 'h-3 w-3';\n\n/* When indeterminate=true, apply the compound's checked classes regardless of peer-checked state. */\nconst INDETERMINATE_CHECKED_CLASS: Record<\n NonNullable<CheckboxVariants['variant']>,\n Record<NonNullable<CheckboxVariants['tone']>, string>\n> = {\n solid: {\n primary: 'bg-primary border-primary text-primary-foreground',\n neutral: 'bg-foreground border-foreground text-background',\n danger: 'bg-destructive border-destructive text-destructive-foreground',\n success: 'bg-success border-success text-success-foreground',\n warning: 'bg-warning border-warning text-warning-foreground',\n },\n soft: {\n primary: 'bg-primary text-primary-foreground',\n neutral: 'bg-foreground text-background',\n danger: 'bg-destructive text-destructive-foreground',\n success: 'bg-success text-success-foreground',\n warning: 'bg-warning text-warning-foreground',\n },\n outline: {\n primary: 'bg-primary text-primary-foreground',\n neutral: 'bg-foreground text-background',\n danger: 'bg-destructive text-destructive-foreground',\n success: 'bg-success text-success-foreground',\n warning: 'bg-warning text-warning-foreground',\n },\n ghost: {\n primary: 'bg-primary/10 text-primary',\n neutral: 'bg-muted text-foreground',\n danger: 'bg-destructive/10 text-destructive',\n success: 'bg-success/10 text-success',\n warning: 'bg-warning/10 text-warning',\n },\n /* Glass family keeps dark glass bg in indeterminate state (matches checked behavior). The Minus icon renders unconditionally; text-white from variant base makes it visible. */\n glass: {\n primary: 'text-white',\n neutral: 'text-white',\n danger: 'text-white',\n success: 'text-white',\n warning: 'text-white',\n },\n 'glass-surface': {\n primary: 'text-white border-white/80',\n neutral: 'text-white border-white/80',\n danger: 'text-white border-white/80',\n success: 'text-white border-white/80',\n warning: 'text-white border-white/80',\n },\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef, watch, type StyleValue } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Check, Minus } from 'lucide-vue-next';\nimport {\n cn,\n ColorExtensions,\n CssExtensions,\n ColorTone as ColorToneValue,\n} from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { checkboxVariants, CheckboxVariant as CheckboxVariantValue } from './Checkbox.variants';\n\n/* Native checkbox with custom visual. Renders the input visually hidden but accessible — wrap in a `<label>` (or pair with `Label` via `FormControl`). Supports 6 variants × 5 tones matrix + indeterminate. */\n/* `inheritAttrs: false` so `class` folds into the wrapper's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: COMPONENT_NAME, inheritAttrs: false });\n\nconst props = withDefaults(defineProps<CheckboxProps>(), {\n size: 'md',\n variant: CheckboxVariantValue.Solid,\n tone: ColorToneValue.Primary,\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form control\n context or to a meaningful tri-state, and Vue casts an absent `boolean` prop to `false`. */\n isIndeterminate: undefined,\n checked: undefined,\n modelValue: undefined,\n defaultChecked: undefined,\n disabled: undefined,\n required: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [checked: boolean];\n /** Replaces React's `onCheckedChange`. Native `change` / `input` stay fallthrough. */\n 'value-change': [checked: boolean];\n}>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\nconst controlled = useControlled<boolean>({\n controlled: () => (props.checked !== undefined ? props.checked : props.modelValue),\n default: () => props.defaultChecked ?? false,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst isChecked = controlled.value;\n\nfunction onChange(event: Event): void {\n controlled.setValue((event.target as HTMLInputElement).checked);\n}\n\nconst input = useTemplateRef<HTMLInputElement>('input');\n\n/*\n * Syncs the native `indeterminate` property — it has no attribute, so it is only reachable\n * imperatively. `flush: 'post'` runs after the DOM patch; `immediate` is safe here ONLY\n * because the body touches the template ref rather than a browser global, and the ref is\n * `null` on the server, where the guard below short-circuits.\n */\nwatch(\n [input, () => props.isIndeterminate],\n ([node, indeterminate]) => {\n if (node) node.indeterminate = Boolean(indeterminate);\n },\n { immediate: true, flush: 'post' },\n);\n\n/* Parse union-typed `size` — preset routes to box+icon class lookup, raw/object routes to inline dims. */\nconst CHECKBOX_SIZE_PRESETS: ReadonlySet<string> = new Set<CheckboxSizePreset>([\n 'xs',\n 'sm',\n 'md',\n 'lg',\n 'xl',\n]);\n\nconst parsedSize = computed(() =>\n CssExtensions.parseSizeUnion<CheckboxSizePreset>(props.size, CHECKBOX_SIZE_PRESETS),\n);\n\nconst boxClass = computed(() =>\n parsedSize.value.preset ? BOX_SIZE_CLASS[parsedSize.value.preset] : undefined,\n);\nconst iconClass = computed(() =>\n parsedSize.value.preset ? ICON_SIZE_CLASS[parsedSize.value.preset] : DEFAULT_ICON_CLASS,\n);\n\n/* Per-instance color override → sets CSS vars on wrapper; the visual span inherits via cascade. */\nconst composedStyle = computed<StyleValue | undefined>(() => {\n const boxStyle = parsedSize.value.box\n ? CssExtensions.resolveBoxSize(parsedSize.value.box)\n : undefined;\n const colorStyle = ColorExtensions.toneColorOverride(props.color, props.tone);\n return colorStyle || boxStyle ? { ...colorStyle, ...boxStyle } : undefined;\n});\n\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst ariaChecked = computed(() => (props.isIndeterminate ? 'mixed' : undefined));\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\nconst describedBy = computed(() => ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst wrapperClass = computed(() =>\n cn('relative inline-flex shrink-0', boxClass.value, attrs.class as ClassValue),\n);\n\nconst visualClass = computed(() =>\n cn(\n checkboxVariants({ variant: props.variant, tone: props.tone }),\n props.isIndeterminate\n ? INDETERMINATE_CHECKED_CLASS[props.variant][props.tone]\n : /* Opacity gate lives on this span (a peer sibling of the input) — child-selector targets the SVG. peer-checked: cannot reach descendants directly. */\n '[&>svg]:opacity-0 peer-checked:[&>svg]:opacity-100',\n ),\n);\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: input });\n</script>\n\n<template>\n <span :class=\"wrapperClass\" :style=\"composedStyle\">\n <input\n ref=\"input\"\n type=\"checkbox\"\n :id=\"inputId\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :checked=\"isChecked\"\n :aria-checked=\"ariaChecked\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n class=\"peer absolute inset-0 m-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed\"\n v-bind=\"passthroughAttrs\"\n @change=\"onChange\"\n />\n <span aria-hidden=\"true\" :class=\"visualClass\">\n <Minus v-if=\"isIndeterminate\" :class=\"iconClass\" />\n <Check v-else :class=\"iconClass\" />\n </span>\n </span>\n</template>\n","<script lang=\"ts\">\nimport type { Size } from '../../../foundation/utils';\n\nexport interface RadioProps {\n /** The control size. */\n size?: Size;\n\n /** The checked state, controlled — React's spelling, which wins when both are set. */\n checked?: boolean;\n\n /** The checked state, controlled. The `v-model` binding target. */\n modelValue?: boolean;\n\n /** The initial checked state when uncontrolled. */\n defaultChecked?: boolean;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n}\n\n/* Sizes not listed fall back to the `md` row at the call site. */\nconst SIZE_CLASS: Partial<Record<Size, string>> = {\n sm: 'h-4 w-4',\n md: 'h-5 w-5',\n lg: 'h-6 w-6',\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Size as SizeValue } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\n\n/**\n * Native radio button with custom visual. Use multiple with the same `name`\n * to form a mutually exclusive group; for arrow-key nav, wrap in\n * `RadioGroup` (L4).\n */\n/* `inheritAttrs: false` so `class` folds into the wrapper's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'Radio', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<RadioProps>(), {\n size: SizeValue.Md,\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form control\n context, and Vue casts an absent `boolean` prop to `false` — which would shadow it. */\n checked: undefined,\n modelValue: undefined,\n defaultChecked: undefined,\n disabled: undefined,\n required: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [checked: boolean];\n /** Replaces React's `onCheckedChange`. Native `change` / `input` stay fallthrough. */\n 'value-change': [checked: boolean];\n}>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\nconst controlled = useControlled<boolean>({\n controlled: () => (props.checked !== undefined ? props.checked : props.modelValue),\n default: () => props.defaultChecked ?? false,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst isChecked = controlled.value;\n\nfunction onChange(event: Event): void {\n controlled.setValue((event.target as HTMLInputElement).checked);\n}\n\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst wrapperClass = computed(() =>\n cn(\n 'relative inline-flex shrink-0',\n SIZE_CLASS[props.size] ?? SIZE_CLASS.md,\n attrs.class as ClassValue,\n ),\n);\n\nconst visualClass = cn(\n 'pointer-events-none grid h-full w-full place-items-center rounded-full border border-input bg-background transition-colors',\n 'peer-checked:border-primary',\n /* Dot opacity gate lives on this span (a peer sibling of the input) — child-selector targets the dot. peer-checked: cannot reach descendants directly. */\n '[&>span]:opacity-0 peer-checked:[&>span]:opacity-100',\n 'peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-1',\n 'peer-disabled:opacity-50',\n);\n\nconst input = useTemplateRef<HTMLInputElement>('input');\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: input });\n</script>\n\n<template>\n <span :class=\"wrapperClass\">\n <input\n ref=\"input\"\n type=\"radio\"\n :id=\"inputId\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :checked=\"isChecked\"\n :aria-invalid=\"isInvalid\"\n class=\"peer absolute inset-0 m-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed\"\n v-bind=\"passthroughAttrs\"\n @change=\"onChange\"\n />\n <span aria-hidden=\"true\" :class=\"visualClass\">\n <span class=\"h-2 w-2 rounded-full bg-primary\" />\n </span>\n </span>\n</template>\n","<script lang=\"ts\">\nimport type { Size } from '../../../foundation/utils';\n\nexport interface SwitchProps {\n /** The control size. */\n size?: Size;\n\n /** The checked state, controlled — React's spelling, which wins when both are set. */\n checked?: boolean;\n\n /** The checked state, controlled. The `v-model` binding target. */\n modelValue?: boolean;\n\n /** The initial checked state when uncontrolled. */\n defaultChecked?: boolean;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n}\n\n/* Sizes not listed fall back to the `md` row at the call site. */\nconst TRACK_CLASS: Partial<Record<Size, string>> = {\n sm: 'h-4 w-7',\n md: 'h-5 w-9',\n lg: 'h-6 w-11',\n};\nconst THUMB_CLASS: Partial<Record<Size, string>> = {\n sm: 'h-3 w-3',\n md: 'h-4 w-4',\n lg: 'h-5 w-5',\n};\n/* Thumb slide lives on the track (a peer sibling of the input) — child-selector targets the thumb. peer-checked: cannot reach descendants directly. */\nconst TRACK_CHECKED_CLASS: Partial<Record<Size, string>> = {\n sm: 'peer-checked:[&>span]:translate-x-3',\n md: 'peer-checked:[&>span]:translate-x-4',\n lg: 'peer-checked:[&>span]:translate-x-5',\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Size as SizeValue } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\n\n/**\n * Toggle switch — native checkbox styled as an iOS-style track + thumb.\n * Strict atom: no built-in label; pair via `FormControl` or wrap manually.\n */\n/* `inheritAttrs: false` so `class` folds into the wrapper's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'Switch', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<SwitchProps>(), {\n size: SizeValue.Md,\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form control\n context, and Vue casts an absent `boolean` prop to `false` — which would shadow it. */\n checked: undefined,\n modelValue: undefined,\n defaultChecked: undefined,\n disabled: undefined,\n required: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [checked: boolean];\n /** Replaces React's `onCheckedChange`. Native `change` / `input` stay fallthrough. */\n 'value-change': [checked: boolean];\n}>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\nconst controlled = useControlled<boolean>({\n controlled: () => (props.checked !== undefined ? props.checked : props.modelValue),\n default: () => props.defaultChecked ?? false,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst isChecked = controlled.value;\n\nfunction onChange(event: Event): void {\n controlled.setValue((event.target as HTMLInputElement).checked);\n}\n\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst wrapperClass = computed(() =>\n cn(\n 'relative inline-flex shrink-0',\n TRACK_CLASS[props.size] ?? TRACK_CLASS.md,\n attrs.class as ClassValue,\n ),\n);\n\nconst trackClass = computed(() =>\n cn(\n 'pointer-events-none flex h-full w-full items-center rounded-full bg-input px-0.5 transition-colors',\n 'peer-checked:bg-primary',\n TRACK_CHECKED_CLASS[props.size] ?? TRACK_CHECKED_CLASS.md,\n 'peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-1',\n 'peer-disabled:opacity-50',\n ),\n);\n\nconst thumbClass = computed(() =>\n cn(\n 'rounded-full bg-background shadow-sm transition-transform duration-150',\n THUMB_CLASS[props.size] ?? THUMB_CLASS.md,\n ),\n);\n\nconst input = useTemplateRef<HTMLInputElement>('input');\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: input });\n</script>\n\n<template>\n <span :class=\"wrapperClass\">\n <input\n ref=\"input\"\n type=\"checkbox\"\n role=\"switch\"\n :id=\"inputId\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :checked=\"isChecked\"\n :aria-invalid=\"isInvalid\"\n class=\"peer absolute inset-0 m-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed\"\n v-bind=\"passthroughAttrs\"\n @change=\"onChange\"\n />\n <span aria-hidden=\"true\" :class=\"trackClass\">\n <span :class=\"thumbClass\" />\n </span>\n </span>\n</template>\n","<script lang=\"ts\">\nimport type { Size } from '../../../foundation/utils';\n\nexport interface SliderProps {\n /** The control size. */\n size?: Size;\n\n /** The value, controlled — React's spelling, which wins when both are set. */\n value?: string | number;\n\n /** The value, controlled. The `v-model` binding target. */\n modelValue?: string | number;\n\n /** The initial value when uncontrolled. */\n defaultValue?: string | number;\n\n /** The lower bound. Default 0. */\n min?: string | number;\n\n /** The upper bound. Default 100. */\n max?: string | number;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n}\n\n/* Complete literal class strings — interpolating into the arbitrary variant would hide them from Tailwind's scanner.\n Sizes not listed fall back to the `md` row at the call site. */\nconst TRACK_CLASS: Partial<Record<Size, string>> = {\n sm: '[&::-webkit-slider-runnable-track]:h-1 [&::-moz-range-track]:h-1',\n md: '[&::-webkit-slider-runnable-track]:h-1.5 [&::-moz-range-track]:h-1.5',\n lg: '[&::-webkit-slider-runnable-track]:h-2 [&::-moz-range-track]:h-2',\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Size as SizeValue } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\n\n/**\n * Single-value range slider — native `<input type=\"range\">` styled across\n * browsers. Multi-thumb / range slider lives at L5.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'Slider', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<SliderProps>(), {\n size: SizeValue.Md,\n min: 0,\n max: 100,\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form control\n context, and Vue casts an absent `boolean` prop to `false` — which would shadow it. */\n disabled: undefined,\n required: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string];\n /** Replaces React's `onValueChange`. Native `input` / `change` stay fallthrough listeners. */\n 'value-change': [value: string];\n}>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\nconst controlled = useControlled<string | number>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? props.min,\n onChange: (next) => {\n emit('update:modelValue', String(next));\n emit('value-change', String(next));\n },\n});\n\nconst currentValue = controlled.value;\n\nfunction onInput(event: Event): void {\n controlled.setValue((event.target as HTMLInputElement).value);\n}\n\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\nconst describedBy = computed(() => ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'w-full appearance-none bg-transparent disabled:cursor-not-allowed disabled:opacity-50',\n TRACK_CLASS[props.size] ?? TRACK_CLASS.md,\n // WebKit\n '[&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-muted',\n '[&::-webkit-slider-thumb]:mt-[-6px] [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-primary [&::-webkit-slider-thumb]:bg-background',\n // Firefox\n '[&::-moz-range-track]:rounded-full [&::-moz-range-track]:bg-muted',\n '[&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-primary [&::-moz-range-thumb]:bg-background',\n 'focus-visible:outline-none focus-visible:[&::-webkit-slider-thumb]:ring-2 focus-visible:[&::-webkit-slider-thumb]:ring-ring',\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLInputElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <input\n ref=\"root\"\n type=\"range\"\n :id=\"inputId\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :min=\"min\"\n :max=\"max\"\n :value=\"currentValue\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onInput\"\n />\n</template>\n","<script lang=\"ts\">\nexport interface FieldProps {\n /** The label text. Fill the `label` slot instead for richer content (e.g. label + tooltip). */\n label?: string | number;\n\n /** The helper / hint shown beneath the control. Hidden while errors show. */\n helper?: string | number;\n\n /**\n * The error text — renders only when truthy. Sets `isInvalid` on the form context.\n * Inside a forms-engine `Field` this is an OVERRIDE: leave it unset and the\n * field's own errors (client + server, all of them) render automatically.\n */\n error?: string | number;\n\n /** The required state (also exposes `isRequired` to the control via context). */\n isRequired?: boolean;\n\n /** The disabled state (also exposes `isDisabled` to the control). */\n isDisabled?: boolean;\n\n /** The read-only state (also exposes `isReadOnly` to the control). */\n isReadOnly?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { FormControlProvider, useFormControl } from '../../../foundation/primitives';\nimport Label from '../label/Label.vue';\nimport FormHelperText from '../formHelperText/FormHelperText.vue';\nimport FormErrorMessage from '../formErrorMessage/FormErrorMessage.vue';\n\n/**\n * One-stop label + control + helper + error wrapper. Wraps the default slot in a\n * `FormControlProvider` so the inner control auto-wires `id`, `aria-describedby`,\n * `aria-invalid`, `disabled`, `required`, `readOnly`.\n *\n * Form-aware: composed inside a forms-engine `Field` it ADOPTS the glue's context\n * instead of shadowing it — same ids, inherited `isInvalid`/flags, and the field's\n * errors render without hand-wiring (`error` stays as an override). Standalone (no\n * surrounding provider) it behaves exactly as before.\n *\n * Each of React's three `ReactNode` props keeps its scalar form and gains a\n * same-named slot for richer content; the prop stays the discriminator.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'Field', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<FieldProps>(), {\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the PARENT\n context's value, and Vue's Boolean casting would turn an absent prop into an explicit\n `false` that shadows the parent instead of deferring to it. */\n isRequired: undefined,\n isDisabled: undefined,\n isReadOnly: undefined,\n});\n\n/** The single form control (TextInput, Select, …) — receives wired id/aria via context. */\ndefineSlots<{\n default(): unknown;\n label?(): unknown;\n helper?(): unknown;\n error?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\n\n/* `parent` is a live-getter object — read fields off it, never destructure. */\nconst parent = useFormControl();\n\nconst hasLabel = computed(() => Boolean(props.label) || Boolean(slots.label));\nconst hasHelper = computed(() => Boolean(props.helper) || Boolean(slots.helper));\nconst hasOwnError = computed(() => Boolean(props.error) || Boolean(slots.error));\n\n/* Mirrors FormErrorMessage's visibility so the helper never hides behind an error\n that won't render. */\nconst showError = computed(\n () =>\n hasOwnError.value ||\n ((parent?.errors?.length ?? 0) > 0 && (parent?.isInvalid ?? false)),\n);\n\nconst parentId = computed(() => parent?.id);\nconst parentErrors = computed(() => parent?.errors);\nconst isInvalid = computed(() => hasOwnError.value || (parent?.isInvalid ?? false));\nconst isRequired = computed(() => props.isRequired ?? parent?.isRequired);\nconst isDisabled = computed(() => props.isDisabled ?? parent?.isDisabled);\nconst isReadOnly = computed(() => props.isReadOnly ?? parent?.isReadOnly);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() => cn('flex flex-col gap-1.5', attrs.class as ClassValue));\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <FormControlProvider\n :id=\"parentId\"\n :errors=\"parentErrors\"\n :is-invalid=\"isInvalid\"\n :is-required=\"isRequired\"\n :is-disabled=\"isDisabled\"\n :is-read-only=\"isReadOnly\"\n >\n <div ref=\"root\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <Label v-if=\"hasLabel\">\n <slot name=\"label\">{{ label }}</slot>\n </Label>\n\n <slot />\n\n <FormErrorMessage v-if=\"showError\" :message=\"hasOwnError ? error : undefined\">\n <!-- Passed only when this Field owns the error: an always-present default slot\n would read as an override and suppress the context's own `errors`. -->\n <template v-if=\"hasOwnError && $slots.error\" #default>\n <slot name=\"error\" />\n </template>\n </FormErrorMessage>\n <FormHelperText v-else-if=\"hasHelper\">\n <slot name=\"helper\">{{ helper }}</slot>\n </FormHelperText>\n </div>\n </FormControlProvider>\n</template>\n","/**\n * The group ↔ item channel for `CheckboxGroup`.\n *\n * React injected `checked` / `onChange` into each child with `Children.map` +\n * `cloneElement`. Vue cannot rewrite a slot child's props, so the group PROVIDES this\n * context and `CheckboxField` INJECTS it — the item reads its own selected state and\n * reports toggles back. The item's `value` prop is what keys it, exactly as React's\n * `ChildLike.value` did.\n *\n * `isDisabled` / `isInvalid` ride along so the flags still cascade, and `severFormControl`\n * reproduces React's fresh per-item `FormControlProvider`: without it every item would\n * adopt the surrounding `Field`'s id (duplicate DOM ids) and its `describedBy`.\n */\nimport { inject, type InjectionKey } from 'vue';\n\nexport interface CheckboxGroupContextValue {\n /** Whether `value` is currently selected. */\n readonly isSelected: (value: string | undefined) => boolean;\n /** Toggles `value` in or out of the selection. */\n readonly toggle: (value: string | undefined) => void;\n /** The group-level disabled flag, cascaded to every item. */\n readonly isDisabled: () => boolean | undefined;\n /** The group-level invalid flag, cascaded to every item. */\n readonly isInvalid: () => boolean;\n}\n\nexport const CheckboxGroupKey: InjectionKey<CheckboxGroupContextValue> =\n Symbol('wow-two.checkboxGroup');\n\n/** Reads the surrounding `CheckboxGroup`, or `null` when the item stands alone. */\nexport function useCheckboxGroup(): CheckboxGroupContextValue | null {\n return inject(CheckboxGroupKey, null);\n}\n","<script lang=\"ts\">\nimport type { CheckboxProps } from '../checkbox';\n\nexport interface CheckboxFieldProps extends CheckboxProps {\n /** The right-side label. Fill the `label` slot instead for richer content. */\n label?: string | number;\n\n /** The smaller helper / description below. Fill the `description` slot for richer content. */\n description?: string | number;\n\n /**\n * The wrap-element class (the `<label>`).\n *\n * React put `className` on the inner `Checkbox` and `wrapperClassName` on the `<label>`;\n * that split is preserved, so Vue's `class` fallthrough attr reaches the CHECKBOX, not\n * the root. Style the wrapper through this prop.\n */\n wrapperClassName?: string;\n\n /**\n * The key this item contributes to a surrounding `CheckboxGroup`'s selection.\n *\n * React read it off the cloned child (`ChildLike.value`); here the group provides a\n * context and this prop is what the item registers under. Ignored outside a group.\n */\n value?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useId } from '../../../foundation/hooks';\nimport { FormControlProvider, useFormControl } from '../../../foundation/primitives';\nimport { useCheckboxGroup } from '../checkboxGroup/CheckboxGroupContext';\nimport Checkbox from '../checkbox/Checkbox.vue';\n\n/**\n * Checkbox + right-side label + optional description, wrapped in a single\n * `<label>` so clicking text toggles the box.\n */\n/* `inheritAttrs: false` so `class` reaches the inner Checkbox (React's `className`) rather\n than landing on the `<label>`. */\ndefineOptions({ name: 'CheckboxField', inheritAttrs: false });\n\nconst props = defineProps<CheckboxFieldProps>();\n\ndefineSlots<{\n label?(): unknown;\n description?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\n\nconst generated = useId();\n/* Context id wins over the generated fallback — inside a `Field`/`form.Field` the\n surrounding Label's `htmlFor` targets `ctx.id`, so the box must carry it. Inside a\n `CheckboxGroup` the group already claimed that id, so siblings fall back to their own. */\nconst ctx = useFormControl();\nconst group = useCheckboxGroup();\nconst inputId = computed(() => props.id ?? (group ? generated : (ctx?.id ?? generated)));\n\nconst isInGroup = computed(() => group !== null);\nconst groupChecked = computed(() => group?.isSelected(props.value) ?? false);\nconst groupDisabled = computed(() => props.disabled ?? group?.isDisabled());\nconst groupInvalid = computed(() => group?.isInvalid() ?? false);\n\nfunction onGroupChange(): void {\n group?.toggle(props.value);\n}\n\nconst hasDescription = computed(\n () => Boolean(props.description) || Boolean(slots.description),\n);\n\n/*\n * No `defineEmits` on purpose: `update:modelValue` / `value-change` are NOT re-declared, so a\n * consumer's listeners stay in `useAttrs()` and reach `Checkbox` through the passthrough —\n * declaring them here would strip the listeners and silently break `v-model`.\n */\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\n/** This component's own props must not reach the inner `Checkbox`. */\nconst checkboxProps = computed(() => {\n const {\n label: _label,\n description: _description,\n wrapperClassName: _wrapperClassName,\n value: _value,\n ...rest\n } = props;\n return rest;\n});\n\nconst wrapperClass = computed(() =>\n cn('flex items-start gap-2.5 cursor-pointer', props.wrapperClassName),\n);\n\nconst checkboxClass = computed(() => attrs.class as ClassValue);\n\nconst inner = useTemplateRef<{ el: HTMLInputElement | null }>('inner');\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: computed(() => inner.value?.el ?? null) });\n</script>\n\n<template>\n <label :for=\"inputId\" :class=\"wrapperClass\">\n <!-- Inside a group the item gets a FRESH provider — React wrapped each cloned child in\n one so siblings never adopt the surrounding Field's id or `describedBy`, while the\n group's disabled/invalid flags still cascade. -->\n <FormControlProvider\n v-if=\"isInGroup\"\n :is-disabled=\"groupDisabled\"\n :is-invalid=\"groupInvalid\"\n >\n <Checkbox\n ref=\"inner\"\n v-bind=\"{ ...checkboxProps, ...passthroughAttrs }\"\n :id=\"inputId\"\n :checked=\"groupChecked\"\n :class=\"checkboxClass\"\n @change=\"onGroupChange\"\n />\n </FormControlProvider>\n <Checkbox\n v-else\n ref=\"inner\"\n v-bind=\"{ ...checkboxProps, ...passthroughAttrs }\"\n :id=\"inputId\"\n :class=\"checkboxClass\"\n />\n <span class=\"flex flex-col gap-0.5 text-sm\">\n <span class=\"font-medium text-foreground\">\n <slot name=\"label\">{{ label }}</slot>\n </span>\n <span v-if=\"hasDescription\" class=\"text-muted-foreground\">\n <slot name=\"description\">{{ description }}</slot>\n </span>\n </span>\n </label>\n</template>\n","/**\n * The group ↔ item channel for `RadioGroup`.\n *\n * React injected `name` / `checked` / `onChange` into each child with `Children.map` +\n * `cloneElement`. Vue cannot rewrite a slot child's props, so the group PROVIDES this\n * context and `RadioField` / `ChoiceCard` INJECT it — the item reads its own selected\n * state and reports selection back. The item's `value` prop is what keys it, exactly as\n * React's `ChildLike.value` did.\n *\n * `name` is the shared radio name that powers native arrow-key roving; `isDisabled` /\n * `isInvalid` cascade the group flags, and the item severs the surrounding `Field`'s id\n * and `describedBy` the way React's fresh per-item `FormControlProvider` did.\n */\nimport { inject, type InjectionKey } from 'vue';\n\nexport interface RadioGroupContextValue {\n /** The shared `name` every item's radio carries. */\n readonly name: () => string;\n /** Whether `value` is the current selection. */\n readonly isSelected: (value: string | undefined) => boolean;\n /** Makes `value` the selection. */\n readonly select: (value: string | undefined) => void;\n /** The group-level disabled flag, cascaded to every item. */\n readonly isDisabled: () => boolean | undefined;\n /** The group-level invalid flag, cascaded to every item. */\n readonly isInvalid: () => boolean;\n}\n\nexport const RadioGroupKey: InjectionKey<RadioGroupContextValue> = Symbol('wow-two.radioGroup');\n\n/** Reads the surrounding `RadioGroup`, or `null` when the item stands alone. */\nexport function useRadioGroup(): RadioGroupContextValue | null {\n return inject(RadioGroupKey, null);\n}\n","<script lang=\"ts\">\nimport type { RadioProps } from '../radio';\n\nexport interface RadioFieldProps extends RadioProps {\n /** The right-side label. Fill the `label` slot instead for richer content. */\n label?: string | number;\n\n /** The smaller helper / description below. Fill the `description` slot for richer content. */\n description?: string | number;\n\n /**\n * The wrap-element class (the `<label>`).\n *\n * React put `className` on the inner `Radio` and `wrapperClassName` on the `<label>`;\n * that split is preserved, so Vue's `class` fallthrough attr reaches the RADIO, not the\n * root. Style the wrapper through this prop.\n */\n wrapperClassName?: string;\n\n /**\n * The key this item contributes to a surrounding `RadioGroup`'s selection.\n *\n * React read it off the cloned child (`ChildLike.value`); here the group provides a\n * context and this prop is what the item registers under. Ignored outside a group.\n */\n value?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useId } from '../../../foundation/hooks';\nimport { FormControlProvider, useFormControl } from '../../../foundation/primitives';\nimport { useRadioGroup } from '../radioGroup/RadioGroupContext';\nimport Radio from '../radio/Radio.vue';\n\n/**\n * Radio + right-side label + optional description, wrapped in a `<label>`.\n */\n/* `inheritAttrs: false` so `class` reaches the inner Radio (React's `className`) rather\n than landing on the `<label>`. */\ndefineOptions({ name: 'RadioField', inheritAttrs: false });\n\nconst props = defineProps<RadioFieldProps>();\n\ndefineSlots<{\n label?(): unknown;\n description?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\n\nconst generated = useId();\n/* Context id wins over the generated fallback (see CheckboxField). */\nconst ctx = useFormControl();\nconst group = useRadioGroup();\n/* Inside a `RadioGroup` the group already claimed the Field's id, so siblings fall back\n to their own generated one — React's fresh per-item provider did the same. */\nconst inputId = computed(() => props.id ?? (group ? generated : (ctx?.id ?? generated)));\n\nconst isInGroup = computed(() => group !== null);\nconst groupName = computed(() => group?.name());\nconst groupChecked = computed(() => group?.isSelected(props.value) ?? false);\nconst groupDisabled = computed(() => props.disabled ?? group?.isDisabled());\nconst groupInvalid = computed(() => group?.isInvalid() ?? false);\n\nfunction onGroupChange(): void {\n group?.select(props.value);\n}\n\nconst hasDescription = computed(\n () => Boolean(props.description) || Boolean(slots.description),\n);\n\n/* No `defineEmits`: the consumer's `v-model` listeners must stay in `useAttrs()` to reach\n the inner `Radio` — see the CheckboxField note. */\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\n/** This component's own props must not reach the inner `Radio`. */\nconst radioProps = computed(() => {\n const {\n label: _label,\n description: _description,\n wrapperClassName: _wrapperClassName,\n value: _value,\n ...rest\n } = props;\n return rest;\n});\n\nconst wrapperClass = computed(() =>\n cn('flex items-start gap-2.5 cursor-pointer', props.wrapperClassName),\n);\n\nconst radioClass = computed(() => attrs.class as ClassValue);\n\nconst inner = useTemplateRef<{ el: HTMLInputElement | null }>('inner');\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: computed(() => inner.value?.el ?? null) });\n</script>\n\n<template>\n <label :for=\"inputId\" :class=\"wrapperClass\">\n <!-- Inside a group the item gets a FRESH provider — React wrapped each cloned child in\n one so siblings never adopt the surrounding Field's id or `describedBy`, while the\n group's disabled/invalid flags still cascade. -->\n <FormControlProvider\n v-if=\"isInGroup\"\n :is-disabled=\"groupDisabled\"\n :is-invalid=\"groupInvalid\"\n >\n <Radio\n ref=\"inner\"\n v-bind=\"{ ...radioProps, ...passthroughAttrs }\"\n :id=\"inputId\"\n :name=\"groupName\"\n :checked=\"groupChecked\"\n :class=\"radioClass\"\n @change=\"onGroupChange\"\n />\n </FormControlProvider>\n <Radio\n v-else\n ref=\"inner\"\n v-bind=\"{ ...radioProps, ...passthroughAttrs }\"\n :id=\"inputId\"\n :class=\"radioClass\"\n />\n <span class=\"flex flex-col gap-0.5 text-sm\">\n <span class=\"font-medium text-foreground\">\n <slot name=\"label\">{{ label }}</slot>\n </span>\n <span v-if=\"hasDescription\" class=\"text-muted-foreground\">\n <slot name=\"description\">{{ description }}</slot>\n </span>\n </span>\n </label>\n</template>\n","<script lang=\"ts\">\nimport type { Side } from '../../../foundation/utils';\nimport type { SwitchProps } from '../switch';\n\nexport interface SwitchFieldProps extends SwitchProps {\n /** The label. Fill the `label` slot instead for richer content. */\n label?: string | number;\n\n /** The smaller helper / description below. Fill the `description` slot for richer content. */\n description?: string | number;\n\n /** The switch placement — on the left (default) or right of the label. */\n side?: Side;\n\n /**\n * The wrap-element class (the `<label>`).\n *\n * React put `className` on the inner `Switch` and `wrapperClassName` on the `<label>`;\n * that split is preserved, so Vue's `class` fallthrough attr reaches the SWITCH, not the\n * root. Style the wrapper through this prop.\n */\n wrapperClassName?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Side as SideValue } from '../../../foundation/utils';\nimport { useId } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport Switch from '../switch/Switch.vue';\n\n/**\n * Switch + label + optional description in a single clickable `<label>`.\n * `side=\"right\"` is the common settings-row pattern (label left, switch right).\n */\n/* `inheritAttrs: false` so `class` reaches the inner Switch (React's `className`) rather\n than landing on the `<label>`. */\ndefineOptions({ name: 'SwitchField', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<SwitchFieldProps>(), { side: SideValue.Left });\n\ndefineSlots<{\n label?(): unknown;\n description?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\n\nconst generated = useId();\n/* Context id wins over the generated fallback (see CheckboxField). */\nconst ctx = useFormControl();\nconst inputId = computed(() => props.id ?? ctx?.id ?? generated);\n\nconst hasDescription = computed(\n () => Boolean(props.description) || Boolean(slots.description),\n);\n\n/* No `defineEmits`: the consumer's `v-model` listeners must stay in `useAttrs()` to reach\n the inner `Switch` — see the CheckboxField note. */\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\n/** This component's own props must not reach the inner `Switch`. */\nconst switchProps = computed(() => {\n const {\n label: _label,\n description: _description,\n side: _side,\n wrapperClassName: _wrapperClassName,\n ...rest\n } = props;\n return rest;\n});\n\nconst wrapperClass = computed(() =>\n cn(\n 'flex cursor-pointer items-start gap-3',\n props.side === SideValue.Right && 'flex-row-reverse justify-between',\n props.wrapperClassName,\n ),\n);\n\nconst switchClass = computed(() => attrs.class as ClassValue);\n\nconst inner = useTemplateRef<{ el: HTMLInputElement | null }>('inner');\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: computed(() => inner.value?.el ?? null) });\n</script>\n\n<template>\n <label :for=\"inputId\" :class=\"wrapperClass\">\n <Switch\n ref=\"inner\"\n v-bind=\"{ ...switchProps, ...passthroughAttrs }\"\n :id=\"inputId\"\n :class=\"switchClass\"\n />\n <span class=\"flex flex-col gap-0.5 text-sm\">\n <span class=\"font-medium text-foreground\">\n <slot name=\"label\">{{ label }}</slot>\n </span>\n <span v-if=\"hasDescription\" class=\"text-muted-foreground\">\n <slot name=\"description\">{{ description }}</slot>\n </span>\n </span>\n </label>\n</template>\n","<script lang=\"ts\">\nimport type { Orientation } from '../../../foundation/utils';\n\nexport interface CheckboxGroupProps {\n /** The group legend (label-equivalent for fieldset). Fill the `legend` slot for richer content. */\n legend?: string | number;\n\n /** The selected values, controlled — React's spelling, which wins when both are set. */\n value?: ReadonlyArray<string>;\n\n /** The selected values, controlled. The `v-model` binding target. */\n modelValue?: ReadonlyArray<string>;\n\n /** The initial values (uncontrolled). */\n defaultValue?: ReadonlyArray<string>;\n\n /** The disabled state for the whole group. */\n isDisabled?: boolean;\n\n /** The layout direction. Default `vertical`. */\n orientation?: Orientation;\n\n /** The group's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Orientation as OrientationValue } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport Fieldset from '../fieldset/Fieldset.vue';\nimport Legend from '../legend/Legend.vue';\nimport { CheckboxGroupKey, type CheckboxGroupContextValue } from './CheckboxGroupContext';\n\n/**\n * Multi-select group of `CheckboxField` children. Each child must declare a\n * `value` prop the group uses to track selection.\n *\n * Form-aware at GROUP level: inside a `Field`/`form.Field` the fieldset takes the\n * context id (so the `Field` label's `htmlFor` resolves) plus `aria-labelledby`/\n * `aria-describedby`/`aria-invalid`, and the flags cascade to every item — the\n * items themselves sever the group context's id so they keep unique ids.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'CheckboxGroup', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<CheckboxGroupProps>(), {\n orientation: OrientationValue.Vertical,\n /* Explicit `undefined` default: the flag falls back to the form control context, and Vue\n casts an absent `boolean` prop to `false` — which would shadow it. */\n isDisabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: ReadonlyArray<string>];\n /** Replaces React's `onValueChange`. */\n 'value-change': [value: ReadonlyArray<string>];\n}>();\n\n/** The `<CheckboxField>` children with `value=\"…\"` attached — React's `children`. */\ndefineSlots<{\n default(): unknown;\n legend?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\nconst isGroupDisabled = computed(() => props.isDisabled ?? ctx?.isDisabled);\nconst isGroupInvalid = computed(() => ctx?.isInvalid ?? false);\n\nconst controlled = useControlled<ReadonlyArray<string>>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? [],\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst selected = controlled.value;\n\nconst context: CheckboxGroupContextValue = {\n isSelected: (value) => value !== undefined && selected.value.includes(value),\n toggle: (value) => {\n if (value === undefined) return;\n controlled.setValue(\n selected.value.includes(value)\n ? selected.value.filter((x) => x !== value)\n : [...selected.value, value],\n );\n },\n isDisabled: () => isGroupDisabled.value,\n isInvalid: () => isGroupInvalid.value,\n};\n\nprovide(CheckboxGroupKey, context);\n\nconst hasLegend = computed(() => Boolean(props.legend) || Boolean(slots.legend));\n\nconst groupId = computed(() => props.id ?? ctx?.id);\nconst labelledBy = computed(() => ctx?.labelledBy);\nconst describedBy = computed(() => ctx?.describedBy);\nconst ariaInvalid = computed(() => isGroupInvalid.value || undefined);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() => cn(attrs.class as ClassValue));\n\nconst listClass = computed(() =>\n cn(\n 'flex gap-3',\n props.orientation === OrientationValue.Vertical ? 'flex-col' : 'flex-row flex-wrap',\n ),\n);\n\nconst root = useTemplateRef<{ el: HTMLFieldSetElement | null }>('root');\n\n/** The rendered `<fieldset>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: computed(() => root.value?.el ?? null) });\n</script>\n\n<template>\n <Fieldset\n ref=\"root\"\n :id=\"groupId\"\n :disabled=\"isGroupDisabled\"\n :aria-labelledby=\"labelledBy\"\n :aria-describedby=\"describedBy\"\n :aria-invalid=\"ariaInvalid\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n >\n <Legend v-if=\"hasLegend\">\n <slot name=\"legend\">{{ legend }}</slot>\n </Legend>\n <div :class=\"listClass\">\n <slot />\n </div>\n </Fieldset>\n</template>\n","<script lang=\"ts\">\nimport type { Orientation } from '../../../foundation/utils';\n\nexport interface RadioGroupProps {\n /** The group legend (label-equivalent for fieldset). Fill the `legend` slot for richer content. */\n legend?: string | number;\n\n /** The shared `name` (required for native radio behavior). Auto-generated if omitted. */\n name?: string;\n\n /** The selected value, controlled — React's spelling, which wins when both are set. */\n value?: string | null;\n\n /** The selected value, controlled. The `v-model` binding target. */\n modelValue?: string | null;\n\n /** The initial value (uncontrolled). */\n defaultValue?: string | null;\n\n /** The disabled state for the whole group. */\n isDisabled?: boolean;\n\n /** The layout direction. Default `vertical`. */\n orientation?: Orientation;\n\n /** The group's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Orientation as OrientationValue } from '../../../foundation/utils';\nimport { useControlled, useId } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport Fieldset from '../fieldset/Fieldset.vue';\nimport Legend from '../legend/Legend.vue';\nimport { RadioGroupKey, type RadioGroupContextValue } from './RadioGroupContext';\n\n/**\n * Mutex group of `RadioField` children. Single-value selection; auto-generates\n * a shared `name` if not provided (the shared name is what powers the native\n * arrow-key roving between radios — always preserved).\n *\n * Form-aware at GROUP level: inside a `Field`/`form.Field` the fieldset (explicit\n * `radiogroup` role) takes the context id (so the `Field` label's `htmlFor`\n * resolves) plus `aria-labelledby`/`aria-describedby`/`aria-invalid`, and the\n * flags cascade to every item — the items themselves sever the group context's id\n * so they keep unique ids.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'RadioGroup', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<RadioGroupProps>(), {\n orientation: OrientationValue.Vertical,\n /* Explicit `undefined` default: the flag falls back to the form control context, and Vue\n casts an absent `boolean` prop to `false` — which would shadow it. */\n isDisabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string | null];\n /** Replaces React's `onValueChange`. */\n 'value-change': [value: string | null];\n}>();\n\n/** The `<RadioField>` / `<ChoiceCard>` children with `value=\"…\"` attached — React's `children`. */\ndefineSlots<{\n default(): unknown;\n legend?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\nconst isGroupDisabled = computed(() => props.isDisabled ?? ctx?.isDisabled);\nconst isGroupInvalid = computed(() => ctx?.isInvalid ?? false);\n\nconst generatedName = useId();\nconst groupName = computed(() => props.name ?? generatedName);\n\nconst controlled = useControlled<string | null>({\n /* `??` is wrong here — `null` is a MEANINGFUL selection (\"nothing selected\"), and `??`\n would fall through it to `modelValue`. Only `undefined` means \"not controlled\". */\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? null,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst selected = controlled.value;\n\nconst context: RadioGroupContextValue = {\n name: () => groupName.value,\n isSelected: (value) => value !== undefined && selected.value === value,\n select: (value) => controlled.setValue(value ?? null),\n isDisabled: () => isGroupDisabled.value,\n isInvalid: () => isGroupInvalid.value,\n};\n\nprovide(RadioGroupKey, context);\n\nconst hasLegend = computed(() => Boolean(props.legend) || Boolean(slots.legend));\n\nconst groupId = computed(() => props.id ?? ctx?.id);\nconst labelledBy = computed(() => ctx?.labelledBy);\nconst describedBy = computed(() => ctx?.describedBy);\nconst ariaInvalid = computed(() => isGroupInvalid.value || undefined);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() => cn(attrs.class as ClassValue));\n\nconst listClass = computed(() =>\n cn(\n 'flex gap-3',\n props.orientation === OrientationValue.Vertical ? 'flex-col' : 'flex-row flex-wrap',\n ),\n);\n\nconst root = useTemplateRef<{ el: HTMLFieldSetElement | null }>('root');\n\n/** The rendered `<fieldset>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: computed(() => root.value?.el ?? null) });\n</script>\n\n<template>\n <Fieldset\n ref=\"root\"\n role=\"radiogroup\"\n :id=\"groupId\"\n :disabled=\"isGroupDisabled\"\n :aria-labelledby=\"labelledBy\"\n :aria-describedby=\"describedBy\"\n :aria-invalid=\"ariaInvalid\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n >\n <Legend v-if=\"hasLegend\">\n <slot name=\"legend\">{{ legend }}</slot>\n </Legend>\n <div :class=\"listClass\">\n <slot />\n </div>\n </Fieldset>\n</template>\n","<script lang=\"ts\">\nimport type { Size } from '../../../foundation/utils';\n\n/** Defines the character set a pin-input cell accepts. */\nexport const PinInputType = {\n /** Refers to digits only (`0-9`). */\n Numeric: 'numeric',\n /** Refers to any single alphanumeric character. */\n Alphanumeric: 'alphanumeric',\n} as const;\n\nexport type PinInputType = (typeof PinInputType)[keyof typeof PinInputType];\n\nexport interface PinInputProps {\n /** The number of digit cells. Default 6. */\n length?: number;\n\n /** The value, controlled (full string) — React's spelling, which wins when both are set. */\n value?: string;\n\n /** The value, controlled (full string). The `v-model` binding target. */\n modelValue?: string;\n\n /** The uncontrolled initial value. */\n defaultValue?: string;\n\n /** The allowed characters — digits (`numeric`) or any single char (`alphanumeric`). Default `numeric`. */\n type?: PinInputType;\n\n /** The cell visual size. Default `md`. */\n size?: Size;\n\n /** The masked mode — renders each cell as `*` (good for verification codes). */\n isMasked?: boolean;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n isDisabled?: boolean;\n}\n\n/* Sizes not listed fall back to the `md` row at the call site. */\nconst SIZE: Partial<Record<Size, string>> = {\n sm: 'h-9 w-9 text-base',\n md: 'h-11 w-11 text-lg',\n lg: 'h-14 w-14 text-xl',\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Size as SizeValue } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { inputBaseVariants, InputState } from '../InputStyles';\n\n/**\n * One-time-code / PIN input — N single-character cells with auto-advance,\n * paste-spread, and backspace-to-previous behavior.\n */\n/* `inheritAttrs: false` so `class` folds into the wrapper's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'PinInput', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<PinInputProps>(), {\n length: 6,\n type: PinInputType.Numeric,\n size: SizeValue.Md,\n /* Explicit `undefined` defaults are load-bearing: `isDisabled` falls back to the form\n control context, and Vue casts an absent `boolean` prop to `false`. */\n isMasked: undefined,\n isDisabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string];\n /** Emits the value whenever it changes. Replaces React's `onValueChange`. */\n 'value-change': [value: string];\n /** Emits the value when the user fills the final cell. Replaces React's `onComplete`. */\n complete: [value: string];\n}>();\n\nconst attrs = useAttrs();\n\n/* Per-cell array state — a joined string compacts empties, remapping cell i to char 0. */\nfunction toCells(s: string): ReadonlyArray<string> {\n return Array.from({ length: props.length }, (_, i) => s[i] ?? '');\n}\n\nconst controlled = useControlled<ReadonlyArray<string>>({\n controlled: () => {\n const external = props.value !== undefined ? props.value : props.modelValue;\n return external === undefined ? undefined : toCells(external);\n },\n default: () => toCells(props.defaultValue ?? ''),\n onChange: (next) => {\n emit('update:modelValue', next.join(''));\n emit('value-change', next.join(''));\n },\n});\n\nconst cells = controlled.value;\n\n/* Plain array of element refs, filled by the function ref below — the Vue counterpart of\n React's `useRef<Array<HTMLInputElement | null>>`. */\nconst inputs: Array<HTMLInputElement | null> = [];\n\nfunction setCellRef(el: unknown, index: number): void {\n inputs[index] = el instanceof HTMLInputElement ? el : null;\n}\n\n/* FormControlContext adoption — flags cascade onto every cell; the id/describedby\n land on the FIRST cell (the composite's primary input), so `Field`-rendered\n labels/helper reach the control. A user `id` prop stays on the wrapper div. */\nconst ctx = useFormControl();\nconst isDisabled = computed(() => props.isDisabled ?? ctx?.isDisabled);\nconst isInvalid = computed(() => ctx?.isInvalid ?? false);\nconst isReadOnly = computed(() => ctx?.isReadOnly || undefined);\n\nfunction isAllowed(ch: string): boolean {\n return props.type === PinInputType.Numeric ? /^[0-9]$/.test(ch) : /^[A-Za-z0-9]$/.test(ch);\n}\n\nfunction update(next: ReadonlyArray<string>): void {\n controlled.setValue(next);\n if (next.every(Boolean)) emit('complete', next.join(''));\n}\n\nfunction onCellInput(index: number, event: Event): void {\n const ch = (event.target as HTMLInputElement).value.slice(-1);\n if (ch && !isAllowed(ch)) return;\n const arr = cells.value.slice();\n arr[index] = ch;\n update(arr);\n if (ch && index < props.length - 1) inputs[index + 1]?.focus();\n}\n\nfunction onCellKeydown(index: number, event: KeyboardEvent): void {\n if (event.defaultPrevented) return;\n if (event.key === 'Backspace' && !cells.value[index] && index > 0) {\n inputs[index - 1]?.focus();\n } else if (event.key === 'ArrowLeft' && index > 0) {\n event.preventDefault();\n inputs[index - 1]?.focus();\n } else if (event.key === 'ArrowRight' && index < props.length - 1) {\n event.preventDefault();\n inputs[index + 1]?.focus();\n }\n}\n\nfunction onPaste(event: ClipboardEvent): void {\n const pasted = event.clipboardData?.getData('text').replace(/\\s+/g, '') ?? '';\n const filtered = pasted.split('').filter(isAllowed).join('');\n if (filtered) {\n event.preventDefault();\n update(toCells(filtered));\n const focusIdx = Math.min(filtered.length, props.length - 1);\n inputs[focusIdx]?.focus();\n }\n}\n\nconst cellType = computed(() => (props.isMasked ? 'password' : 'text'));\nconst inputMode = computed(() => (props.type === PinInputType.Numeric ? 'numeric' : 'text'));\n\n/* Cells are internal — consumers can't label them individually, so each carries a built-in\n name (the aria-label wins over a `Field` label's htmlFor, keeping per-digit announcements). */\nfunction cellLabel(index: number): string {\n const noun = props.type === PinInputType.Numeric ? 'Digit' : 'Character';\n return `${noun} ${index + 1} of ${props.length}`;\n}\n\nconst firstCellId = computed(() => ctx?.id);\nconst firstCellDescribedBy = computed(() => ctx?.describedBy);\nconst firstCellRequired = computed(() => ctx?.isRequired || undefined);\n\nconst cellClass = computed(() =>\n cn(\n inputBaseVariants({ state: isInvalid.value ? InputState.Invalid : InputState.Default }),\n 'text-center font-medium',\n SIZE[props.size] ?? SIZE.md,\n ),\n);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() => cn('inline-flex gap-2', attrs.class as ClassValue));\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/** The rendered wrapper — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div ref=\"root\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <input\n v-for=\"(ch, i) in cells\"\n :key=\"i\"\n :ref=\"(el) => setCellRef(el, i)\"\n :type=\"cellType\"\n :inputmode=\"inputMode\"\n :aria-label=\"cellLabel(i)\"\n :id=\"i === 0 ? firstCellId : undefined\"\n :aria-describedby=\"i === 0 ? firstCellDescribedBy : undefined\"\n :aria-required=\"i === 0 ? firstCellRequired : undefined\"\n :aria-invalid=\"isInvalid || undefined\"\n autocomplete=\"one-time-code\"\n :maxlength=\"1\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :value=\"ch\"\n :class=\"cellClass\"\n @input=\"onCellInput(i, $event)\"\n @keydown=\"onCellKeydown(i, $event)\"\n @paste=\"onPaste\"\n />\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { InputSize, InputState } from '../InputStyles';\n\nexport interface MaskedInputProps {\n /** The control size. */\n size?: InputSize;\n /** The validity surface. */\n state?: InputState;\n /** The mask pattern. `#` = digit, `A` = alpha, `*` = alphanumeric, anything else = literal. */\n mask: string;\n\n /** The value, controlled — React's spelling, which wins when both are set. */\n value?: string;\n\n /** The value, controlled. The `v-model` binding target. */\n modelValue?: string;\n\n /** The initial value when uncontrolled. */\n defaultValue?: string;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n\n /** The read-only state — React's spelling. Falls back to the form control's `isReadOnly`. */\n readOnly?: boolean;\n\n /** The DOM spelling of {@link MaskedInputProps.readOnly}, which wins when both are set. */\n readonly?: boolean;\n}\n\nexport function applyMask(raw: string, mask: string): string {\n /* Hardening past the React original, which read `mask.length` unguarded: `mask` is a\n required prop, but Vue only WARNS on a missing required prop and then renders, so an\n omitted mask turned every keystroke into a TypeError instead of a console warning.\n Passing the raw value through keeps the control usable while the warning still fires. */\n if (!mask) return raw;\n let out = '';\n let r = 0;\n for (let m = 0; m < mask.length && r < raw.length; m++) {\n const tok = mask[m];\n const ch = raw[r];\n if (!tok || !ch) break;\n if (tok === '#') {\n if (/[0-9]/.test(ch)) {\n out += ch;\n r++;\n } else {\n r++;\n m--;\n }\n } else if (tok === 'A') {\n if (/[A-Za-z]/.test(ch)) {\n out += ch;\n r++;\n } else {\n r++;\n m--;\n }\n } else if (tok === '*') {\n if (/[A-Za-z0-9]/.test(ch)) {\n out += ch;\n r++;\n } else {\n r++;\n m--;\n }\n } else {\n // literal\n out += tok;\n if (ch === tok) r++;\n }\n }\n return out;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { inputBaseVariants, InputState as InputStateValue } from '../InputStyles';\n\n/**\n * Text input with a simple character-class mask. Tokens: `#` digit, `A`\n * letter, `*` alphanumeric. Anything else is a literal that's auto-inserted.\n *\n * Examples: `\"###-###-####\"` (US phone), `\"##/##/####\"` (date), `\"AAA-####\"`.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'MaskedInput', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<MaskedInputProps>(), {\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form control\n context, and Vue casts an absent `boolean` prop to `false` — which would shadow it. */\n disabled: undefined,\n required: undefined,\n readOnly: undefined,\n readonly: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string];\n /** Replaces React's `onValueChange`. Native `input` / `change` stay fallthrough listeners. */\n 'value-change': [value: string];\n}>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\nconst controlled = useControlled<string>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? '',\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst currentValue = controlled.value;\n\nfunction onInput(event: Event): void {\n controlled.setValue(applyMask((event.target as HTMLInputElement).value, props.mask));\n}\n\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst isReadOnly = computed(() => props.readonly ?? props.readOnly ?? ctx?.isReadOnly);\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\nconst describedBy = computed(() => ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n inputBaseVariants({\n size: props.size,\n state:\n props.state ?? (ctx?.isInvalid ? InputStateValue.Invalid : InputStateValue.Default),\n }),\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLInputElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <input\n ref=\"root\"\n type=\"text\"\n :value=\"currentValue\"\n :id=\"inputId\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :readonly=\"isReadOnly\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onInput\"\n />\n</template>\n","<script lang=\"ts\">\nimport type { NumberInputProps } from '../numberInput';\n\n/* React spelled this `Omit<NumberInputProps, 'children'>`; `children` is a slot here, so the\n whole `NumberInput` surface carries over unchanged. */\nexport interface CurrencyInputProps extends NumberInputProps {\n /** The currency symbol or 3-letter code displayed as a prefix. Default `\"$\"`. */\n symbol?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport NumberInput from '../numberInput/NumberInput.vue';\n\n/**\n * `NumberInput` with a leading currency symbol. Symbol shown as a non-input\n * decoration (input value is the bare number).\n */\n/* `inheritAttrs: false` so `class` folds into the wrapper's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'CurrencyInput', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<CurrencyInputProps>(), { symbol: '$' });\n\nconst attrs = useAttrs();\n\n/*\n * No `defineEmits` on purpose: `update:modelValue` / `value-change` are NOT re-declared, so a\n * consumer's listeners stay in `useAttrs()` and reach `NumberInput` through the passthrough\n * below — declaring them here would strip the listeners and silently break `v-model`.\n */\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\n/** `symbol` is this component's own — it must not reach the inner `NumberInput`. */\nconst numberProps = computed(() => {\n const { symbol: _symbol, ...rest } = props;\n return rest;\n});\n\nconst wrapperClass = computed(() => cn('relative', attrs.class as ClassValue));\n\nconst inner = useTemplateRef<{ el: HTMLInputElement | null }>('inner');\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: computed(() => inner.value?.el ?? null) });\n</script>\n\n<template>\n <div :class=\"wrapperClass\">\n <span\n class=\"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground\"\n >\n {{ symbol }}\n </span>\n <NumberInput ref=\"inner\" v-bind=\"{ ...numberProps, ...passthroughAttrs }\" class=\"pl-7\" />\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { NumberInputProps } from '../numberInput';\n\n/* React spelled this `Omit<NumberInputProps, 'children'>`; `children` is a slot here, so the\n whole `NumberInput` surface carries over unchanged. Kept an interface, not a type alias:\n the SFC prop resolver reads a declared interface, and the name has to stay importable. */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface PercentInputProps extends NumberInputProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport NumberInput from '../numberInput/NumberInput.vue';\n\n/**\n * `NumberInput` with a trailing `%` decoration. Input value remains the\n * bare number (interpret as 0–100 in your form).\n */\n/* `inheritAttrs: false` so `class` folds into the wrapper's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'PercentInput', inheritAttrs: false });\n\nconst props = defineProps<PercentInputProps>();\n\nconst attrs = useAttrs();\n\n/*\n * No `defineEmits` on purpose: `update:modelValue` / `value-change` are NOT re-declared, so a\n * consumer's listeners stay in `useAttrs()` and reach `NumberInput` through the passthrough\n * below — declaring them here would strip the listeners and silently break `v-model`.\n */\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst wrapperClass = computed(() => cn('relative', attrs.class as ClassValue));\n\nconst inner = useTemplateRef<{ el: HTMLInputElement | null }>('inner');\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: computed(() => inner.value?.el ?? null) });\n</script>\n\n<template>\n <div :class=\"wrapperClass\">\n <NumberInput ref=\"inner\" v-bind=\"{ ...props, ...passthroughAttrs }\" class=\"pr-16\" />\n <span\n class=\"pointer-events-none absolute right-12 top-1/2 -translate-y-1/2 text-sm text-muted-foreground\"\n >\n %\n </span>\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface CharacterCountProps {\n /** The current length. */\n value: number;\n\n /** The maximum allowed length (also flips text to destructive when exceeded). */\n max: number;\n\n /** The display mode — `current / max` (default) or just `current`. */\n isMaxShown?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Counter for character-limited fields. Drop in below a TextAreaInput / Input.\n * Goes destructive once `value > max`.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'CharacterCount', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<CharacterCountProps>(), { isMaxShown: true });\n\nconst attrs = useAttrs();\n\nconst isOver = computed(() => props.value > props.max);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'text-right text-xs',\n isOver.value ? 'text-destructive' : 'text-muted-foreground',\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div ref=\"root\" aria-live=\"polite\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n {{ value }}{{ isMaxShown ? ` / ${max}` : '' }}\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface InputAddonProps {\n /** The text rendered to the left of the input (e.g. \"https://\"). Fill the `leading` slot for richer content. */\n leading?: string | number;\n\n /** The text rendered to the right of the input (e.g. \".com\"). Fill the `trailing` slot for richer content. */\n trailing?: string | number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Wrap any input with leading and/or trailing addon slots — visually\n * connected to the input border. Common for protocol prefixes, units,\n * suffixes (\"https://\", \".com\", \"kg\").\n *\n * Each of React's two `ReactNode` props keeps its scalar form and gains a\n * same-named slot for richer content; the prop stays the discriminator.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'InputAddon', inheritAttrs: false });\n\nconst props = defineProps<InputAddonProps>();\n\n/** The input element (TextInput, EmailInput, …) — React's `children`. */\ndefineSlots<{\n default(): unknown;\n leading?(): unknown;\n trailing?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\n\nconst hasLeading = computed(() => Boolean(props.leading) || Boolean(slots.leading));\nconst hasTrailing = computed(() => Boolean(props.trailing) || Boolean(slots.trailing));\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'inline-flex w-full items-stretch rounded-md [&>*]:rounded-none',\n '[&>*:first-child]:rounded-l-md [&>*:last-child]:rounded-r-md',\n '[&>*:not(:first-child)]:-ml-px',\n /* The group is the control, so the focus ring belongs to the group. Past the React\n original, where the ring landed on the input segment alone and the addons read as\n separate boxes hanging off a highlighted middle. The segment's own ring is\n suppressed; it is raised instead so its border paints over its neighbours'. */\n '[&:has(>*:focus-visible)]:ring-2 [&:has(>*:focus-visible)]:ring-ring',\n '[&>*:focus-visible]:z-10 [&>*:focus-visible]:relative [&>*:focus-visible]:ring-0',\n attrs.class as ClassValue,\n ),\n);\n\nconst ADDON_CLASS =\n 'inline-flex shrink-0 items-center border border-input bg-muted px-3 text-sm text-muted-foreground';\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div ref=\"root\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <span v-if=\"hasLeading\" :class=\"ADDON_CLASS\">\n <slot name=\"leading\">{{ leading }}</slot>\n </span>\n <slot />\n <span v-if=\"hasTrailing\" :class=\"ADDON_CLASS\">\n <slot name=\"trailing\">{{ trailing }}</slot>\n </span>\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { Orientation } from '../../../foundation/utils';\n\nexport interface InputGroupProps {\n /** The layout axis. Default `horizontal`. */\n orientation?: Orientation;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Orientation as OrientationValue } from '../../../foundation/utils';\n\n/**\n * Visually joins a row/column of inputs (TextInput, NumberInput, etc.)\n * — collapses inner radii so they read as one connected control. Mirror\n * of `actions/ButtonGroup`.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'InputGroup', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<InputGroupProps>(), {\n orientation: OrientationValue.Horizontal,\n});\n\n/** The joined controls — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\n\nconst isHorizontal = computed(() => props.orientation === OrientationValue.Horizontal);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'inline-flex w-full rounded-md',\n isHorizontal.value ? 'flex-row' : 'flex-col',\n /* Same contract as `InputAddon`: the joined row is one control, so the ring goes round\n the whole group and the focused segment only rises above its neighbours' borders. */\n '[&:has(>*:focus-visible)]:ring-2 [&:has(>*:focus-visible)]:ring-ring',\n '[&>*:focus-visible]:z-10 [&>*:focus-visible]:relative [&>*:focus-visible]:ring-0',\n isHorizontal.value\n ? '[&>*]:rounded-none [&>*:first-child]:rounded-l-md [&>*:last-child]:rounded-r-md [&>*:not(:first-child)]:-ml-px'\n : '[&>*]:rounded-none [&>*:first-child]:rounded-t-md [&>*:last-child]:rounded-b-md [&>*:not(:first-child)]:-mt-px',\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div ref=\"root\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <slot />\n </div>\n</template>\n","<script lang=\"ts\">\n/** @deprecated Prefer `Field` (was `FormField`) or compose `Label` + a control directly. */\nexport interface LabeledInputProps {\n /** The label text. Fill the `label` slot instead for richer content. */\n label?: string | number;\n\n /** The optional inline-end label (e.g. \"Optional\"). Fill the `trailing` slot for richer content. */\n trailing?: string | number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useId } from '../../../foundation/hooks';\nimport Label from '../label/Label.vue';\n\n/**\n * Lighter alternative to `Field` — just `Label` + control, no helper / error /\n * context wiring. Good for compact inline forms.\n *\n * @deprecated Prefer `Field` (was `FormField`) for label + control + helper/error,\n * or compose `Label` + a control directly. Kept for one release.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'LabeledInput', inheritAttrs: false });\n\nconst props = defineProps<LabeledInputProps>();\n\n/*\n * React reached into `children.props.id` and re-cloned the element with a generated id.\n * Vue has no vnode-prop read at that point, so the default slot is SCOPED instead: the\n * generated id is handed to the consumer, who binds it on their control.\n */\ndefineSlots<{\n default(props: { id: string }): unknown;\n label?(): unknown;\n trailing?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\n\nconst generatedId = useId();\n\nconst hasTrailing = computed(() => Boolean(props.trailing) || Boolean(slots.trailing));\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() => cn('flex flex-col gap-1.5', attrs.class as ClassValue));\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div ref=\"root\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <div class=\"flex items-center justify-between\">\n <Label :for=\"generatedId\">\n <slot name=\"label\">{{ label }}</slot>\n </Label>\n <span v-if=\"hasTrailing\" class=\"text-xs text-muted-foreground\">\n <slot name=\"trailing\">{{ trailing }}</slot>\n </span>\n </div>\n <slot :id=\"generatedId\" />\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { Size } from '../../../foundation/utils';\nimport type { RadioProps } from '../radio';\n\nexport interface ChoiceCardProps extends Omit<RadioProps, 'size'> {\n /** The card title. Fill the `label` slot instead for richer content. */\n label?: string | number;\n\n /** The description under the title. Fill the `description` slot for richer content. */\n description?: string | number;\n\n /** The optional icon rendered beside the label. Fill the `icon` slot with the icon element. */\n icon?: string | number;\n\n /** The card size. Default `md`. */\n size?: Size;\n\n /**\n * The key this item contributes to a surrounding `RadioGroup`'s selection.\n *\n * React read it off the cloned child (`ChildLike.value`); here the group provides a\n * context and this prop is what the item registers under. Ignored outside a group.\n */\n value?: string;\n}\n\n/* Sizes not listed fall back to the `md` row at the call site. */\nconst SIZE: Partial<Record<Size, string>> = {\n sm: 'p-3 text-xs',\n md: 'p-4 text-sm',\n lg: 'p-5 text-base',\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Size as SizeValue } from '../../../foundation/utils';\nimport { useId } from '../../../foundation/hooks';\nimport { FormControlProvider, useFormControl } from '../../../foundation/primitives';\nimport { useRadioGroup } from '../radioGroup/RadioGroupContext';\nimport Radio from '../radio/Radio.vue';\n\n/**\n * Radio styled as a clickable card with title + description + optional\n * icon. Common for plan/option pickers. Compose inside `RadioGroup` for\n * mutex selection.\n */\n/* `inheritAttrs: false` so `class` folds into the card's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'ChoiceCard', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ChoiceCardProps>(), { size: SizeValue.Md });\n\ndefineSlots<{\n label?(): unknown;\n description?(): unknown;\n icon?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\n\nconst generated = useId();\n/* Context id wins over the generated fallback (see CheckboxField) — inside a\n `Field`/`form.Field` the surrounding Label's `htmlFor` targets `ctx.id`, so the card's\n radio must carry it. Inside a `RadioGroup` the per-item context supplies a unique id. */\nconst ctx = useFormControl();\nconst group = useRadioGroup();\n/* Inside a `RadioGroup` the group already claimed the Field's id, so siblings fall back\n to their own generated one — React's fresh per-item provider did the same. */\nconst inputId = computed(() => props.id ?? (group ? generated : (ctx?.id ?? generated)));\n\nconst isInGroup = computed(() => group !== null);\nconst groupName = computed(() => group?.name());\nconst groupChecked = computed(() => group?.isSelected(props.value) ?? false);\nconst groupDisabled = computed(() => props.disabled ?? group?.isDisabled());\nconst groupInvalid = computed(() => group?.isInvalid() ?? false);\n\nfunction onGroupChange(): void {\n group?.select(props.value);\n}\n\nconst hasIcon = computed(() => Boolean(props.icon) || Boolean(slots.icon));\nconst hasDescription = computed(\n () => Boolean(props.description) || Boolean(slots.description),\n);\n\n/* No `defineEmits`: the consumer's `v-model` listeners must stay in `useAttrs()` to reach\n the inner `Radio` — see the CheckboxField note. */\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\n/** This component's own props must not reach the inner `Radio`. */\nconst radioProps = computed(() => {\n const {\n label: _label,\n description: _description,\n icon: _icon,\n size: _size,\n value: _value,\n ...rest\n } = props;\n return rest;\n});\n\nconst rootClass = computed(() =>\n cn(\n 'group relative block cursor-pointer rounded-lg border border-input bg-card text-card-foreground transition-colors',\n 'hover:border-border-strong has-[:checked]:border-primary has-[:checked]:bg-primary-soft/30',\n 'has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-ring',\n SIZE[props.size] ?? SIZE.md,\n attrs.class as ClassValue,\n ),\n);\n\nconst inner = useTemplateRef<{ el: HTMLInputElement | null }>('inner');\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: computed(() => inner.value?.el ?? null) });\n</script>\n\n<template>\n <label :for=\"inputId\" :class=\"rootClass\">\n <!-- Inside a group the item gets a FRESH provider — React wrapped each cloned child in\n one so siblings never adopt the surrounding Field's id or `describedBy`, while the\n group's disabled/invalid flags still cascade. -->\n <FormControlProvider\n v-if=\"isInGroup\"\n :is-disabled=\"groupDisabled\"\n :is-invalid=\"groupInvalid\"\n >\n <Radio\n ref=\"inner\"\n v-bind=\"{ ...radioProps, ...passthroughAttrs }\"\n :id=\"inputId\"\n :name=\"groupName\"\n :checked=\"groupChecked\"\n class=\"absolute right-3 top-3\"\n @change=\"onGroupChange\"\n />\n </FormControlProvider>\n <Radio\n v-else\n ref=\"inner\"\n v-bind=\"{ ...radioProps, ...passthroughAttrs }\"\n :id=\"inputId\"\n class=\"absolute right-3 top-3\"\n />\n <div class=\"flex items-start gap-3 pr-7\">\n <span v-if=\"hasIcon\" class=\"text-muted-foreground\">\n <slot name=\"icon\">{{ icon }}</slot>\n </span>\n <div class=\"min-w-0 flex-1\">\n <div class=\"font-medium text-foreground\">\n <slot name=\"label\">{{ label }}</slot>\n </div>\n <div v-if=\"hasDescription\" class=\"mt-0.5 text-muted-foreground\">\n <slot name=\"description\">{{ description }}</slot>\n </div>\n </div>\n </div>\n </label>\n</template>\n","<script lang=\"ts\">\nexport interface PasswordStrengthProps {\n /** The password to measure. */\n value: string;\n\n /** The override score (0–4). When set, internal scoring is bypassed. */\n score?: 0 | 1 | 2 | 3 | 4;\n\n /** The hidden state for the textual label under the bar. */\n isLabelHidden?: boolean;\n}\n\nconst LABELS = ['Too weak', 'Weak', 'Fair', 'Strong', 'Excellent'];\nconst TONE = ['bg-destructive', 'bg-destructive', 'bg-warning', 'bg-success', 'bg-success'];\n\nfunction scorePassword(pw: string): 0 | 1 | 2 | 3 | 4 {\n let score = 0;\n if (pw.length >= 8) score++;\n if (pw.length >= 12) score++;\n if (/[a-z]/.test(pw) && /[A-Z]/.test(pw)) score++;\n if (/\\d/.test(pw)) score++;\n if (/[^A-Za-z0-9]/.test(pw)) score++;\n return Math.min(4, score) as 0 | 1 | 2 | 3 | 4;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Strength meter for password fields. Naive rule-based scoring 0–4. Pass\n * `score` to override (e.g. drive from `zxcvbn`).\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'PasswordStrength', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<PasswordStrengthProps>(), {\n score: undefined,\n /* Explicit `undefined` default: Vue casts an absent `boolean` prop to `false`, which is the\n same rendering here, but the prop stays a genuine tri-state for consumers reading it. */\n isLabelHidden: undefined,\n});\n\nconst attrs = useAttrs();\n\nconst resolvedScore = computed<0 | 1 | 2 | 3 | 4>(\n () => props.score ?? (props.value.length === 0 ? 0 : scorePassword(props.value)),\n);\n\nconst label = computed(() => LABELS[resolvedScore.value] ?? '');\nconst tone = computed(() => TONE[resolvedScore.value] ?? 'bg-destructive');\n\nfunction barClass(index: number): string {\n return cn('h-1 flex-1 rounded-full bg-muted transition-colors', index < resolvedScore.value && tone.value);\n}\n\nconst isLabelShown = computed(() => !props.isLabelHidden && Boolean(props.value));\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() => cn('flex flex-col gap-1', attrs.class as ClassValue));\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div ref=\"root\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <div class=\"flex gap-1\" aria-hidden=\"true\">\n <div v-for=\"i in 4\" :key=\"i\" :class=\"barClass(i - 1)\" />\n </div>\n <div v-if=\"isLabelShown\" class=\"text-xs text-muted-foreground\">{{ label }}</div>\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { Size } from '../../../foundation/utils';\n\nexport interface FilePickerProps {\n /** The button label. Default `\"Choose file\"`. Fill the `label` slot for richer content. */\n label?: string | number;\n\n /** The filename(s) preview rendered next to the button. Fill the `preview` slot for richer content. */\n preview?: string | number;\n\n /** The visual size of the button. Default `md`. */\n size?: Size;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n}\n\n/* Sizes not listed fall back to the `md` row at the call site. */\nconst SIZE: Partial<Record<Size, string>> = {\n sm: 'h-8 px-3 text-sm',\n md: 'h-10 px-4 text-sm',\n lg: 'h-12 px-6 text-base',\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Upload } from 'lucide-vue-next';\nimport { cn, Size as SizeValue } from '../../../foundation/utils';\nimport { Icon } from '../../../foundation/icons';\nimport { useFormControl } from '../../../foundation/primitives';\n\n/**\n * Basic file picker — styled trigger button + visually-hidden native\n * `<input type=\"file\">`. For drag-drop / preview / progress, use the L5\n * `Dropzone` organism (planned).\n */\n/* `inheritAttrs: false` so `class` folds into the wrapper's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'FilePicker', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<FilePickerProps>(), {\n label: 'Choose file',\n size: SizeValue.Md,\n /* Explicit `undefined` default: the flag falls back to the form control context, and Vue\n casts an absent `boolean` prop to `false` — which would shadow it. */\n disabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** Emits the chosen FileList when files are picked. Replaces React's `onFilesChange`. */\n 'files-change': [files: FileList | null];\n}>();\n\ndefineSlots<{\n label?(): unknown;\n preview?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\n\n/* FormControlContext adoption — the HIDDEN native input carries the context id, so\n `Field`-rendered labels/describedby reference it (label click opens the picker).\n The trigger button mirrors describedby for keyboard users. */\nconst ctx = useFormControl();\n\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst describedBy = computed(() => ctx?.describedBy);\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\n/* aria- (not native) required — the change handler resets `value` after handing the files\n out, so a native `required` would block every submit. */\nconst isRequired = computed(() => ctx?.isRequired || undefined);\n\nconst hasPreview = computed(() => Boolean(props.preview) || Boolean(slots.preview));\n\nconst input = useTemplateRef<HTMLInputElement>('input');\n\nfunction openPicker(): void {\n input.value?.click();\n}\n\nfunction onChange(event: Event): void {\n const target = event.target as HTMLInputElement;\n emit('files-change', target.files);\n // Reset so re-picking the same file fires change again.\n target.value = '';\n}\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst wrapperClass = computed(() =>\n cn('inline-flex items-center gap-3', attrs.class as ClassValue),\n);\n\nconst buttonClass = computed(() =>\n cn(\n 'inline-flex items-center gap-2 rounded-md border border-input bg-background font-medium text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50',\n SIZE[props.size] ?? SIZE.md,\n ),\n);\n\nconst UploadIcon = Upload;\n\n/** The rendered `<input type=\"file\">` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: input });\n</script>\n\n<template>\n <div :class=\"wrapperClass\">\n <button\n type=\"button\"\n :disabled=\"isDisabled\"\n :aria-describedby=\"describedBy\"\n :class=\"buttonClass\"\n @click=\"openPicker\"\n >\n <Icon :icon=\"UploadIcon\" :size=\"16\" />\n <slot name=\"label\">{{ label }}</slot>\n </button>\n <input\n ref=\"input\"\n type=\"file\"\n :id=\"inputId\"\n :disabled=\"isDisabled\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :aria-required=\"isRequired\"\n class=\"sr-only\"\n v-bind=\"passthroughAttrs\"\n @change=\"onChange\"\n />\n <span v-if=\"hasPreview\" class=\"truncate text-sm text-muted-foreground\">\n <slot name=\"preview\">{{ preview }}</slot>\n </span>\n </div>\n</template>\n","import { inject, type InjectionKey } from 'vue';\n\n/** Represents a function that matches items against the current selection. */\nexport type EqualityFn<T> = (a: T, b: T) => boolean;\n\n/** Provides the default equality (Object.is) — primitives + reference equality. */\nexport const defaultEquals: EqualityFn<unknown> = (a, b) => Object.is(a, b);\n\n/** Defines the selection-indicator style applied to every item under this listbox. */\nexport const ListboxIndicator = {\n /** Refers to a trailing check icon on the selected item. */\n Check: 'check',\n /** Refers to a leading checkbox box per item. */\n Checkbox: 'checkbox',\n /** Refers to a leading radio dot per item. */\n Radio: 'radio',\n /** Refers to a leading filled dot per item. */\n Dot: 'dot',\n /** Refers to no indicator. */\n None: 'none',\n} as const;\n\nexport type ListboxIndicator = (typeof ListboxIndicator)[keyof typeof ListboxIndicator];\n\n/** Represents the per-item registry entry maintained by the listbox. */\nexport interface ItemEntry {\n id: string;\n value: unknown;\n isDisabled: boolean;\n}\n\n/**\n * Represents the shape of the listbox context shared with descendants.\n *\n * Every reactive field is a live getter, so `ctx.activeId` re-reads on each\n * access — the Vue counterpart of React's context object being rebuilt each\n * render. Destructuring takes a one-time snapshot; bind to the object instead.\n */\nexport interface ListboxContextValue {\n readonly isMultiple: boolean;\n readonly values: ReadonlyArray<unknown>;\n readonly isEqual: EqualityFn<unknown>;\n readonly activeId: string | null;\n readonly indicator: ListboxIndicator;\n readonly isDisabled: boolean;\n onItemSelect: (value: unknown) => void;\n registerItem: (entry: ItemEntry) => void;\n unregisterItem: (id: string) => void;\n setActiveId: (id: string | null) => void;\n}\n\nexport const listboxContextKey: InjectionKey<ListboxContextValue> = Symbol('wow-two.listbox');\n\n/** Reads the surrounding listbox context; throws when used outside a `<Listbox>`. */\nexport function useListboxContext(): ListboxContextValue {\n const ctx = inject(listboxContextKey, null);\n if (!ctx) throw new Error('Listbox.Item / Group / Separator must be used inside <Listbox>');\n return ctx;\n}\n","<script lang=\"ts\">\nimport type {\n SurfaceElevation,\n SurfacePadding,\n SurfaceRadius,\n SurfaceTone,\n SurfaceVariant,\n} from '../../../foundation/utils';\nimport type { EqualityFn, ListboxIndicator } from './ListboxContext';\n\n/**\n * Represents the prop surface of the `Listbox` root.\n *\n * React modelled single- vs multi-select as a discriminated union\n * (`SingleProps<T> | MultiProps<T>`) over a generic `T`. Vue's `defineProps`\n * resolves one flat runtime shape, and a `generic=\"T\"` SFC cannot host the\n * exported interface in the plain `<script>` block — so the union is flattened\n * and `T` is fixed to `unknown`. `isMultiple` still discriminates at runtime:\n * the value is an array in multi mode and a scalar in single mode.\n *\n * The five surface axes are spelled out rather than inherited from\n * `SurfaceVariants`: that alias is `VariantProps<typeof surfaceVariants>`, which\n * the SFC compiler cannot follow as a heritage clause — it throws `Failed to\n * resolve extends base type` at build time while `vue-tsc` stays green. Named\n * types resolve fine, and the props have to be generated (not treated as\n * fallthrough attrs) because `rootClass` reads them.\n */\nexport interface ListboxProps {\n /** The surface style. */\n variant?: SurfaceVariant;\n\n /** The surface tone. */\n tone?: SurfaceTone;\n\n /** The corner radius. */\n radius?: SurfaceRadius;\n\n /** The inner padding. Default `xs` (p-1), for items breathing room. */\n padding?: SurfacePadding;\n\n /** The elevation / shadow step. */\n elevation?: SurfaceElevation;\n\n /** The multi-select state — the value becomes an array and items toggle. */\n isMultiple?: boolean;\n\n /** The selection, controlled. The `v-model` binding target. Array in multi mode. */\n modelValue?: unknown;\n\n /** The selection, controlled — React's spelling of `modelValue`, which wins when both are set. */\n value?: unknown;\n\n /** The initial selection when uncontrolled. Defaults to `[]` in multi mode. */\n defaultValue?: unknown;\n\n /** Disables all items when true. */\n isDisabled?: boolean;\n\n /** Compares item values for equality; defaults to `Object.is`. */\n isEqual?: EqualityFn<unknown>;\n\n /** Sets the selection-indicator style; default `check` (single) or `checkbox` (multi). */\n indicator?: ListboxIndicator;\n\n /** The tab index of the list container. Defaults to `0`, or `-1` while disabled. */\n tabindex?: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, provide, ref, useAttrs, useTemplateRef, watch } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, surfaceVariants } from '../../../foundation/utils';\nimport { useControlled, useTypeahead } from '../../../foundation/hooks';\nimport { listboxVariants } from './Listbox.variants';\nimport {\n defaultEquals,\n listboxContextKey,\n ListboxIndicator as ListboxIndicatorValue,\n type ItemEntry,\n type ListboxContextValue,\n} from './ListboxContext';\n\n/**\n * Roving-`aria-activedescendant` listbox with type-to-select, single or multi\n * selection, and pluggable selection indicators. Items register themselves, so\n * arbitrary `children` work without threading a label prop.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'Listbox', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ListboxProps>(), {\n /* Explicit `undefined` defaults: Vue casts an absent `boolean` prop to `false`, which would\n make `isDisabled` read as an explicit \"enabled\" and, for `isMultiple`, is simply the real\n default — but `isDisabled` must stay tri-state for the `aria-disabled` / tabindex branches. */\n isMultiple: false,\n isDisabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: unknown];\n /** Replaces React's `onValueChange`. */\n 'value-change': [value: unknown];\n /**\n * Replaces React's `onActiveChange`. Fires after commit whenever the active\n * (`aria-activedescendant`) option id changes — including the initial auto-active\n * on mount. Lets a hosting combobox mirror the id without scraping the DOM.\n */\n 'active-change': [id: string | null];\n}>();\n\nconst attrs = useAttrs();\n\n/* `EqualityFn` is already imported by the plain `<script>` block above — both blocks share one\n module scope, so re-importing it here would be a duplicate declaration. */\nconst equals = computed<EqualityFn<unknown>>(() => props.isEqual ?? defaultEquals);\n\nconst resolvedIndicator = computed(\n () =>\n props.indicator ??\n (props.isMultiple ? ListboxIndicatorValue.Checkbox : ListboxIndicatorValue.Check),\n);\n\nconst controlled = useControlled<unknown>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? (props.isMultiple ? [] : undefined),\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst values = computed<ReadonlyArray<unknown>>(() => {\n const current = controlled.value.value;\n if (Array.isArray(current)) return current as unknown[];\n return current === undefined ? [] : [current];\n});\n\n/* A plain array, not a ref: React held this in a `useRef` precisely so registration churn\n never drove a render, and the reads below all happen inside event handlers. `activeId` is\n the reactive half, and it is what descendants actually re-render on. */\nconst items: ItemEntry[] = [];\nconst activeId = ref<string | null>(null);\n\nfunction registerItem(entry: ItemEntry): void {\n const idx = items.findIndex((i) => i.id === entry.id);\n if (idx >= 0) items[idx] = entry;\n else items.push(entry);\n}\n\nfunction unregisterItem(id: string): void {\n const idx = items.findIndex((i) => i.id === id);\n if (idx >= 0) items.splice(idx, 1);\n}\n\nfunction setActiveId(id: string | null): void {\n activeId.value = id;\n}\n\nfunction onItemSelect(next: unknown): void {\n if (props.isMultiple) {\n const current = controlled.value.value;\n const list = (Array.isArray(current) ? current : []) as unknown[];\n const has = list.some((v) => equals.value(v, next));\n controlled.setValue(has ? list.filter((v) => !equals.value(v, next)) : [...list, next]);\n } else {\n controlled.setValue(next);\n }\n}\n\n/* The initial auto-active: first selected enabled option, else the first enabled one.\n `onMounted` is the Vue equivalent of React's mount-only effect — children have registered\n by then, and it never runs on the server. */\nonMounted(() => {\n if (activeId.value) return;\n const firstSelected = items.find(\n (i) => !i.isDisabled && values.value.some((v) => equals.value(v, i.value)),\n );\n const firstEnabled = items.find((i) => !i.isDisabled);\n activeId.value = (firstSelected ?? firstEnabled)?.id ?? null;\n});\n\n/* Mirrors the active id to a hosting combobox after commit, including the initial auto-active. */\nwatch(activeId, (id) => emit('active-change', id), { flush: 'post' });\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/** Activates an option by id and keeps it visible (lists are `max-h-72 overflow-y-auto`). */\nfunction activateById(id: string): void {\n activeId.value = id;\n /* Event-driven only, so `document` is always defined here — but the guard keeps the\n function safe if it is ever reached from a render-time path under SSR. */\n if (typeof document === 'undefined') return;\n document.getElementById(id)?.scrollIntoView({ block: 'nearest' });\n}\n\nfunction moveActive(direction: 1 | -1, jump = 1): void {\n const list = items.filter((i) => !i.isDisabled);\n if (list.length === 0) return;\n const currentIdx = list.findIndex((i) => i.id === activeId.value);\n let nextIdx = currentIdx + direction * jump;\n if (currentIdx === -1) nextIdx = direction === 1 ? 0 : list.length - 1;\n if (nextIdx < 0) nextIdx = 0;\n if (nextIdx >= list.length) nextIdx = list.length - 1;\n const nextEntry = list[nextIdx];\n if (nextEntry) activateById(nextEntry.id);\n}\n\n/* Type-to-select over the registered options. Labels are read from the live DOM text of each\n option (`document.getElementById` inside the user-event path → SSR-safe), so arbitrary\n children work without threading a label prop. Disabled options are skipped by the matcher. */\nconst typeahead = useTypeahead<ItemEntry>({\n items: () => items,\n getLabel: (entry) =>\n typeof document === 'undefined' ? '' : (document.getElementById(entry.id)?.textContent ?? ''),\n isDisabled: (entry) => entry.isDisabled,\n getActiveIndex: () => items.findIndex((i) => i.id === activeId.value),\n onMatch: (entry) => activateById(entry.id),\n});\n\nfunction handleKeyDown(event: KeyboardEvent): void {\n /* React called the consumer's `onKeyDown` first and then honoured `defaultPrevented`.\n A fallthrough listener would be merged AFTER this handler and lose that ordering, so the\n consumer's handler is pulled off `attrs` and invoked by hand (and excluded from the\n passthrough below so it cannot fire twice). */\n (attrs.onKeydown as ((e: KeyboardEvent) => void) | undefined)?.(event);\n if (event.defaultPrevented || props.isDisabled) return;\n /* Type-to-select first: a printable char (incl. Space while a buffer is active) is consumed\n here and must not fall through to Enter/Space selection or anything else. */\n if (typeahead.onKeyDown(event)) {\n event.preventDefault();\n return;\n }\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n moveActive(1);\n break;\n case 'ArrowUp':\n event.preventDefault();\n moveActive(-1);\n break;\n case 'Home':\n event.preventDefault();\n moveActive(-1, items.length);\n break;\n case 'End':\n event.preventDefault();\n moveActive(1, items.length);\n break;\n case 'PageDown':\n event.preventDefault();\n moveActive(1, 10);\n break;\n case 'PageUp':\n event.preventDefault();\n moveActive(-1, 10);\n break;\n case 'Enter':\n case ' ': {\n if (!activeId.value) return;\n const entry = items.find((i) => i.id === activeId.value);\n if (!entry || entry.isDisabled) return;\n event.preventDefault();\n onItemSelect(entry.value);\n break;\n }\n }\n}\n\nconst context: ListboxContextValue = {\n get isMultiple() {\n return props.isMultiple;\n },\n get values() {\n return values.value;\n },\n get isEqual() {\n return equals.value;\n },\n get activeId() {\n return activeId.value;\n },\n get indicator() {\n return resolvedIndicator.value;\n },\n get isDisabled() {\n return props.isDisabled ?? false;\n },\n onItemSelect,\n registerItem,\n unregisterItem,\n setActiveId,\n};\n\nprovide(listboxContextKey, context);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class', 'onKeydown']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst listTabIndex = computed(() => (props.isDisabled ? -1 : (props.tabindex ?? 0)));\n\nconst rootClass = computed(() =>\n cn(\n surfaceVariants({\n variant: props.variant,\n tone: props.tone,\n radius: props.radius,\n /* Default padding is `xs` (p-1) for items breathing room — overridable. */\n padding: props.padding ?? 'xs',\n elevation: props.elevation,\n }),\n listboxVariants(),\n attrs.class as ClassValue,\n ),\n);\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div\n ref=\"root\"\n role=\"listbox\"\n :tabindex=\"listTabIndex\"\n :aria-multiselectable=\"isMultiple || undefined\"\n :aria-activedescendant=\"activeId ?? undefined\"\n :aria-disabled=\"isDisabled || undefined\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @keydown=\"handleKeyDown\"\n >\n <slot />\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { ListboxIndicator } from './ListboxContext';\n\n/** Represents the prop surface of `Listbox.Item`. */\nexport interface ListboxItemProps {\n /** The item value; compared via the parent listbox's `isEqual`. */\n value: unknown;\n\n /** The disabled state for this item. */\n isDisabled?: boolean;\n\n /** The per-item indicator, overriding the listbox-level indicator. */\n indicator?: ListboxIndicator;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, useAttrs, useTemplateRef, watch } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Check } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { useId } from '../../../foundation/hooks';\nimport { listboxItemVariants, ListboxItemState } from './Listbox.variants';\nimport { useListboxContext, ListboxIndicator as ListboxIndicatorValue } from './ListboxContext';\n\nconst CheckIcon = Check;\n\n/**\n * A single selectable option. Registers itself with the surrounding `Listbox`\n * on mount so keyboard navigation, typeahead, and value lookup can see it.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'ListboxItem', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ListboxItemProps>(), {\n isDisabled: false,\n});\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useListboxContext();\n\nconst id = useId();\n\n/* React registered in an effect keyed on `[id, value, isDisabled]`; the Vue counterpart is a\n watcher with `immediate` so the entry exists before the parent's mount-time auto-active runs. */\nwatch(\n () => ({ value: props.value, isDisabled: props.isDisabled }),\n ({ value, isDisabled }) => ctx.registerItem({ id, value, isDisabled }),\n { immediate: true },\n);\nonBeforeUnmount(() => ctx.unregisterItem(id));\n\nconst indicator = computed(() => props.indicator ?? ctx.indicator);\nconst isSelected = computed(() => ctx.values.some((v) => ctx.isEqual(v, props.value)));\nconst isActive = computed(() => ctx.activeId === id);\n\nconst state = computed<ListboxItemState>(() => {\n if (props.isDisabled) return ListboxItemState.Disabled;\n if (isSelected.value) return ListboxItemState.Selected;\n if (isActive.value) return ListboxItemState.Active;\n return ListboxItemState.Default;\n});\n\nfunction onClick(event: MouseEvent): void {\n /* `ctx.isDisabled` = listbox-level disabled — keyboard is blocked in the root's key handler;\n mirror it for mouse. */\n if (event.defaultPrevented || props.isDisabled || ctx.isDisabled) return;\n ctx.onItemSelect(props.value);\n}\n\nfunction onPointerEnter(): void {\n if (!props.isDisabled) ctx.setActiveId(id);\n}\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(listboxItemVariants({ state: state.value }), attrs.class as ClassValue),\n);\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div\n ref=\"root\"\n :id=\"id\"\n role=\"option\"\n :aria-selected=\"isSelected\"\n :aria-disabled=\"isDisabled || undefined\"\n :data-active=\"isActive ? '' : undefined\"\n :data-selected=\"isSelected ? '' : undefined\"\n :data-disabled=\"isDisabled ? '' : undefined\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @click=\"onClick\"\n @pointerenter=\"onPointerEnter\"\n >\n <!-- Leading indicator: checkbox · radio · dot. -->\n <span\n v-if=\"indicator === ListboxIndicatorValue.Checkbox\"\n aria-hidden=\"true\"\n :class=\"\n cn(\n 'flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border',\n isSelected ? 'border-primary bg-primary text-primary-foreground' : 'border-border',\n )\n \"\n >\n <CheckIcon v-if=\"isSelected\" class=\"h-3 w-3\" />\n </span>\n <span\n v-else-if=\"indicator === ListboxIndicatorValue.Radio\"\n aria-hidden=\"true\"\n :class=\"\n cn(\n 'flex h-4 w-4 shrink-0 items-center justify-center rounded-full border',\n isSelected ? 'border-primary' : 'border-border',\n )\n \"\n >\n <span v-if=\"isSelected\" class=\"h-2 w-2 rounded-full bg-primary\" />\n </span>\n <span\n v-else-if=\"indicator === ListboxIndicatorValue.Dot\"\n aria-hidden=\"true\"\n :class=\"cn('h-1.5 w-1.5 shrink-0 rounded-full', isSelected ? 'bg-primary' : 'bg-transparent')\"\n />\n\n <!--\n `data-listbox-item-content` is a stable hook for hosts that need to target the option's\n content wrapper (e.g. Select's `matchWidth` truncation) without a brittle structural selector.\n -->\n <span data-listbox-item-content class=\"flex min-w-0 flex-1 items-center gap-2\">\n <slot />\n </span>\n\n <!-- Trailing indicator: check icon. -->\n <CheckIcon\n v-if=\"indicator === ListboxIndicatorValue.Check && isSelected\"\n :class=\"cn('h-4 w-4 shrink-0', !ctx.isMultiple && 'opacity-80')\"\n />\n </div>\n</template>\n","<script lang=\"ts\">\n/** Represents the prop surface of `Listbox.Group`. */\nexport interface ListboxGroupProps {\n /**\n * The optional group heading rendered above the contained items. Fill the\n * `label` slot instead for richer content; the prop stays the discriminator.\n */\n label?: string | number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useSlots } from 'vue';\nimport { useId } from '../../../foundation/hooks';\nimport { listboxGroupLabelVariants } from './Listbox.variants';\n\n/** Provides a labelled group wrapping a subset of items. */\n/* `inheritAttrs` stays ON: React put `className` straight onto the group div with no `cn()`\n merge of its own, so plain fallthrough reproduces it exactly. */\ndefineOptions({ name: 'ListboxGroup' });\n\nconst props = defineProps<ListboxGroupProps>();\n\nconst slots = useSlots();\nconst labelId = useId();\n\nconst hasLabel = computed(() => Boolean(props.label) || Boolean(slots.label));\n</script>\n\n<template>\n <div role=\"group\" :aria-labelledby=\"hasLabel ? labelId : undefined\">\n <div v-if=\"hasLabel\" :id=\"labelId\" :class=\"listboxGroupLabelVariants()\">\n <slot name=\"label\">{{ label }}</slot>\n </div>\n <slot />\n </div>\n</template>\n","<script lang=\"ts\">\n/* No props: React typed this as bare `HTMLAttributes<HTMLDivElement>`, every member of which is\n a Vue fallthrough attr. The block exists because a `<script setup>`-only SFC loses\n `ignoreRestSiblings` in `vue-eslint-parser` and trips `no-unused-vars` on the house\n `const { class: _class, ...others }` idiom. */\n</script>\n\n<script setup lang=\"ts\">\nimport { listboxSeparatorVariants } from './Listbox.variants';\n\n/**\n * Provides a thin horizontal rule between groups of items. Decorative only —\n * `separator` is not an allowed child role of `listbox` (option/group only),\n * so the rule is hidden from the accessibility tree entirely.\n */\n/* `inheritAttrs` stays ON: React put `className` straight onto the div with no `cn()` merge\n of its own, so plain fallthrough reproduces it exactly. */\ndefineOptions({ name: 'ListboxSeparator' });\n</script>\n\n<template>\n <div aria-hidden=\"true\" :class=\"listboxSeparatorVariants()\" />\n</template>\n","<script lang=\"ts\">\n/* No props: React typed this as bare `HTMLAttributes<HTMLDivElement>`, every member of which is\n a Vue fallthrough attr, and the message itself is the default slot. The block exists because\n a `<script setup>`-only SFC loses `ignoreRestSiblings` in `vue-eslint-parser` and trips\n `no-unused-vars` on the house `const { class: _class, ...others }` idiom. */\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { listboxEmptyVariants } from './Listbox.variants';\n\n/**\n * Provides the message shown when no items match (e.g., after search filter).\n * Rendered as a disabled option, not `presentation`: a `listbox` must own at\n * least one `option`/`group` (axe aria-required-children), and this keeps the\n * message perceivable to AT. Never registered, so keyboard nav skips it.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'ListboxEmpty', inheritAttrs: false });\n\nconst attrs = useAttrs();\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() => cn(listboxEmptyVariants(), attrs.class as ClassValue));\n</script>\n\n<template>\n <div\n role=\"option\"\n aria-disabled=\"true\"\n :aria-selected=\"false\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n >\n <slot />\n </div>\n</template>\n","import { inject, type InjectionKey, type ShallowRef } from 'vue';\nimport type { EqualityComparer } from '../../../foundation/utils';\n\n/**\n * Represents a single dropdown option as `{ itemKey, value, label }` — V defaults to K.\n *\n * React typed `label` as `ReactNode`. It is `string | number` here: `options` is\n * plain data, and the label doubles as the substring-search text, which a slot\n * cannot supply. Rich per-row rendering stays available through `<SelectItem>`'s\n * default slot.\n */\nexport interface SelectOption<K, V = K> {\n itemKey: K;\n value: V;\n label: string | number;\n isDisabled?: boolean;\n}\n\n/** Represents an internal item-registry entry — option + plain-text for substring search. */\nexport interface ItemRegistryEntry {\n itemKey: unknown;\n value: unknown;\n label: string | number;\n text: string;\n /** Mirrors the item's disabled state so closed-trigger typeahead can skip it (the list skips via Listbox). */\n isDisabled: boolean;\n}\n\n/** Provides a plain-text representation of a label for substring search. */\nexport function extractText(label: string | number | null | undefined): string {\n return label == null ? '' : String(label);\n}\n\n/**\n * Represents the shape of the select context shared with descendants.\n *\n * Every reactive field is a live getter, so `ctx.open` re-reads on each access —\n * the Vue counterpart of React's context object being rebuilt each render.\n * Destructuring takes a one-time snapshot; bind to the object instead.\n */\nexport interface SelectContextValue {\n readonly open: boolean;\n setOpen: (open: boolean) => void;\n readonly selectedKey: unknown;\n readonly hasSelection: boolean;\n /** Holds the label captured at selection time — keeps the trigger labelled while the popover is closed. */\n readonly selectedLabel: string | number | null;\n onSelect: (entry: ItemRegistryEntry) => void;\n onClear: () => void;\n readonly keyEquals: EqualityComparer<unknown>;\n readonly items: ReadonlyArray<ItemRegistryEntry>;\n registerItem: (entry: ItemRegistryEntry) => void;\n unregisterItem: (itemKey: unknown) => void;\n /** Resolves a label last seen for a key from the persistent cache (survives unmount). */\n getCachedLabel: (key: unknown) => string | number | undefined;\n readonly query: string;\n setQuery: (query: string) => void;\n readonly isDisabled: boolean;\n readonly isLoading: boolean;\n readonly loadingLabel: string;\n readonly isClearable: boolean;\n readonly clearLabel: string;\n serializeKey: (key: unknown) => string;\n getOptionLabel: (key: unknown) => string | number | null;\n readonly name?: string;\n readonly isInvalid: boolean;\n /** Stable id of the inner Listbox — wired to the trigger's `aria-controls`. */\n readonly listboxId: string;\n\n /** Reflects the listbox's active option id for `aria-activedescendant`. */\n readonly activeDescendant: string | null;\n setActiveDescendant: (id: string | null) => void;\n /** Holds the DOM node of the inner Listbox — the keyboard bridge re-dispatches onto it. */\n listboxEl: ShallowRef<HTMLElement | null>;\n\n /** Form-control wiring inherited from a surrounding `<Field>` (undefined when standalone).\n * `labelId`/`describedBy` carry only ids of chrome that is actually rendered. */\n readonly fieldId?: string;\n readonly labelId?: string;\n readonly describedBy?: string;\n}\n\nexport const selectContextKey: InjectionKey<SelectContextValue> = Symbol('wow-two.select');\n\n/** Reads the surrounding select context; throws when used outside a `<Select>`. */\nexport function useSelectContext(): SelectContextValue {\n const ctx = inject(selectContextKey, null);\n if (!ctx) throw new Error('Select.* must be used inside <Select>');\n return ctx;\n}\n","<script lang=\"ts\">\nimport type { Placement } from '@floating-ui/vue';\nimport type { EqualityComparer } from '../../../foundation/utils';\nimport type { SelectOption } from './SelectContext';\n\n/** Represents the prop surface of the `Select` root. */\nexport interface SelectProps<K, V = K> {\n /** The selected key, controlled. The `v-model` binding target. `null` = explicit clear, `undefined` = uncontrolled. */\n modelValue?: K | null;\n\n /** The selected key, controlled — React's spelling of `modelValue`, which wins when both are set. */\n value?: K | null;\n\n /** The initial selected key for uncontrolled use. */\n defaultValue?: K | null;\n\n /** The equality comparer for keys; defaults to `Equality.strictEquals`. */\n keyEquals?: EqualityComparer<K>;\n\n /** The disabled state, blocking interaction when true. */\n isDisabled?: boolean;\n\n /** The loading state, showing a spinner in the trigger and blocking interaction. */\n isLoading?: boolean;\n\n /** The label for the loading state on the polite live region + in-list row; defaults to `'Loading options…'`. */\n loadingLabel?: string;\n\n /** The clearable state, rendering a clear (×) button in the trigger when a value is set. */\n isClearable?: boolean;\n\n /** The label for the clear (×) button for assistive tech; defaults to `'Clear selection'`. */\n clearLabel?: string;\n\n /** The name of the hidden form input that ships the serialized key. */\n name?: string;\n\n /** The key serializer for the hidden form input; defaults to `String(key)`. */\n serializeKey?: (key: K) => string;\n\n /** The label resolver for a `value`/`defaultValue` before items register\n * (the trigger otherwise shows the raw serialized key until the first open). */\n getOptionLabel?: (key: K) => string | number | null;\n\n /** The option set seeded eagerly into the item registry + label cache on mount — before the\n * popover ever opens. Lets `SelectValue` resolve the selected label and closed-trigger\n * typeahead work without a first open, so `getOptionLabel` is unnecessary. Compound\n * `<SelectItem>` children still render the list and remain fully supported; `options` is an\n * alternative/supplement. When both supply the same key, the mounted child wins (deduped via\n * `keyEquals`). Each entry mirrors what a `SelectItem` registers. */\n options?: ReadonlyArray<SelectOption<K, V>>;\n\n /** The invalid state, styling the trigger as invalid (red border, error ring). */\n isInvalid?: boolean;\n\n /** The initial open state of the dropdown when uncontrolled. */\n defaultOpen?: boolean;\n\n /** The dropdown open state, controlled. The `v-model:open` binding target. */\n open?: boolean;\n\n /** The dropdown open state, controlled — the house boolean spelling of `open`; `open` wins when both are set. */\n isOpen?: boolean;\n\n /** The floating placement of the dropdown. */\n placement?: Placement;\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"K, V = K\">\nimport { computed, provide, ref, shallowRef, watch } from 'vue';\nimport { Equality } from '../../../foundation/utils';\nimport { useControlled, useId } from '../../../foundation/hooks';\nimport { Popover } from '../../overlays';\nimport {\n extractText,\n selectContextKey,\n type ItemRegistryEntry,\n type SelectContextValue,\n} from './SelectContext';\nimport { useFormControl } from '../../../foundation/primitives';\n\n/**\n * State + a11y-id owner for a Select tree. Renders the `Popover` that hosts the\n * trigger and the panel, plus the hidden form input carrying the serialized key.\n *\n * Inherits id/disabled/required/invalid/describedby from a surrounding `<Field>`;\n * standalone props win when provided, context fills the gaps.\n */\ndefineOptions({ name: 'Select', inheritAttrs: false });\n\n/** The Select tree — `SelectTrigger` and `SelectContent`. React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<SelectProps<K, V>>(), {\n isLoading: false,\n loadingLabel: 'Loading options…',\n isClearable: false,\n clearLabel: 'Clear selection',\n defaultOpen: false,\n placement: 'bottom',\n /* Explicit `undefined` defaults are load-bearing: `useControlled` keys on `=== undefined`,\n and Vue casts an absent `boolean` prop to `false`. Without these, `open`/`isOpen` would\n read as \"controlled, and closed\" — pinning the dropdown shut and making `defaultOpen`\n dead — and `isDisabled`/`isInvalid` would shadow the surrounding `<Field>` context. */\n open: undefined,\n isOpen: undefined,\n isDisabled: undefined,\n isInvalid: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half — carries the selected KEY, `null` on clear. */\n 'update:modelValue': [key: K | null];\n /** Replaces React's `onValueChange`. Carries the full option, `null` on clear. */\n 'value-change': [option: SelectOption<K, V> | null];\n /** The `v-model:open` half. */\n 'update:open': [open: boolean];\n /** Replaces React's `onOpenChange`. */\n 'open-change': [open: boolean];\n}>();\n\n/* `field` is a live-getter object — read fields off it, never destructure. */\nconst field = useFormControl();\n\nconst finalDisabled = computed(() => props.isDisabled ?? field?.isDisabled ?? false);\nconst finalInvalid = computed(() => props.isInvalid ?? field?.isInvalid ?? false);\n\nconst openCtl = useControlled<boolean>({\n controlled: () => (props.open !== undefined ? props.open : props.isOpen),\n default: () => props.defaultOpen,\n onChange: (value) => {\n emit('update:open', value);\n emit('open-change', value);\n },\n});\n\nconst keyCtl = useControlled<K | null>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? null,\n onChange: (value) => emit('update:modelValue', value),\n});\n\n/* Reactive, unlike Listbox's plain array: `SelectValue` resolves its label from this set and\n `SelectContent` counts visible rows off it, both at render time. */\nconst items = ref<ItemRegistryEntry[]>([]);\n\n/* Persistent key→label cache (keyed by serialized key), never evicted on unmount: backstops\n label resolution for a closed trigger after items unmount, separate from the live `items` set.\n Deliberately a plain Map, matching React's ref — every read of it is reached through a chain\n that already depends on `items`, which is what changes when an option unmounts. */\nconst labelCache = new Map<string, string | number>();\n\nconst query = ref('');\nconst activeDescendant = ref<string | null>(null);\nconst listboxId = useId('select-listbox');\nconst listboxEl = shallowRef<HTMLElement | null>(null);\n\n/* Captures `{ itemKey, label }` at selection time — items unmount on popover close, so the\n registry alone can't label the trigger before the first open. */\nconst selectedEntry = shallowRef<{ itemKey: unknown; label: string | number } | null>(null);\n\nconst keyEqualsFn = computed<EqualityComparer<unknown>>(\n () => (props.keyEquals as EqualityComparer<unknown> | undefined) ?? Equality.strictEquals,\n);\n\nconst serializeKeyFn = computed<(key: unknown) => string>(\n () => (props.serializeKey as ((key: unknown) => string) | undefined) ?? ((key) => String(key)),\n);\n\nfunction getOptionLabelFn(key: unknown): string | number | null {\n const fn = props.getOptionLabel as ((key: unknown) => string | number | null) | undefined;\n return fn ? fn(key) : null;\n}\n\nfunction registerItem(entry: ItemRegistryEntry): void {\n /* Persist the label so a closed trigger can still resolve it after this item unmounts. */\n labelCache.set(serializeKeyFn.value(entry.itemKey), entry.label);\n const list = items.value;\n const idx = list.findIndex((i) => Object.is(i.itemKey, entry.itemKey));\n if (idx >= 0) {\n const existing = list[idx];\n if (\n existing &&\n existing.label === entry.label &&\n existing.text === entry.text &&\n existing.isDisabled === entry.isDisabled &&\n Object.is(existing.value, entry.value)\n ) {\n return;\n }\n const next = list.slice();\n next[idx] = entry;\n items.value = next;\n return;\n }\n items.value = [...list, entry];\n}\n\n/* Drops the item from the live mounted set on unmount so a removed option (popover close OR\n option-set change) no longer satisfies search / typeahead / value resolution. The label\n stays in `labelCache`, so the trigger keeps its label after close. */\nfunction unregisterItem(itemKey: unknown): void {\n const idx = items.value.findIndex((i) => Object.is(i.itemKey, itemKey));\n if (idx === -1) return;\n const next = items.value.slice();\n next.splice(idx, 1);\n items.value = next;\n}\n\nfunction getCachedLabel(key: unknown): string | number | undefined {\n return labelCache.get(serializeKeyFn.value(key));\n}\n\n/* Maps the eager `options` prop to registry entries, mirroring what a `SelectItem` registers.\n Seeding these lets `SelectValue` + closed-trigger typeahead resolve before the popover's\n first open, so `getOptionLabel` is unnecessary when `options` is supplied. */\nconst seedItems = computed<ItemRegistryEntry[]>(() => {\n if (!props.options) return [];\n return props.options.map((option) => ({\n itemKey: option.itemKey,\n value: (option.value ?? option.itemKey) as unknown,\n label: option.label,\n text: extractText(option.label),\n isDisabled: option.isDisabled ?? false,\n }));\n});\n\n/* Merges seeded options with the live (compound-child) registrations, deduped by `keyEquals`.\n A mounted `<SelectItem>` wins on key collision — its value/label/text supersede the seed —\n while compound-only items append. Seed order is preserved so closed-trigger typeahead follows\n `options`. When no options are given this is exactly the live `items` set (no behavior change). */\nconst mergedItems = computed<ItemRegistryEntry[]>(() => {\n const seeds = seedItems.value;\n const live = items.value;\n if (seeds.length === 0) return live;\n if (live.length === 0) return seeds;\n const equals = keyEqualsFn.value;\n const merged = seeds.map((s) => live.find((i) => equals(i.itemKey, s.itemKey)) ?? s);\n const extras = live.filter((i) => !seeds.some((s) => equals(s.itemKey, i.itemKey)));\n return extras.length > 0 ? [...merged, ...extras] : merged;\n});\n\n/* Seeds the persistent label cache from `options` so a controlled value resolves its label\n before any item mounts. Only fills gaps — a mounted `SelectItem` (via `registerItem`) writes\n the cache unconditionally and therefore always wins. */\nwatch(\n seedItems,\n (seeds) => {\n if (seeds.length === 0) return;\n for (const seed of seeds) {\n const serialized = serializeKeyFn.value(seed.itemKey);\n if (!labelCache.has(serialized)) labelCache.set(serialized, seed.label);\n }\n },\n { immediate: true },\n);\n\nconst hasSelection = computed(() => keyCtl.value.value !== null && keyCtl.value.value !== undefined);\n\n/* Drops the captured label when the key changed externally (controlled updates). */\nconst selectedLabel = computed<string | number | null>(() => {\n const captured = selectedEntry.value;\n if (!captured || !hasSelection.value) return null;\n return keyEqualsFn.value(captured.itemKey, keyCtl.value.value) ? captured.label : null;\n});\n\nfunction onSelect(entry: ItemRegistryEntry): void {\n keyCtl.setValue(entry.itemKey as K | null);\n selectedEntry.value = { itemKey: entry.itemKey, label: entry.label };\n openCtl.setValue(false);\n query.value = '';\n emit('value-change', {\n itemKey: entry.itemKey as K,\n value: entry.value as V,\n label: entry.label,\n });\n}\n\nfunction onClear(): void {\n keyCtl.setValue(null);\n selectedEntry.value = null;\n emit('value-change', null);\n}\n\nfunction onPopoverOpenChange(next: boolean): void {\n openCtl.setValue(next);\n if (!next) {\n query.value = '';\n activeDescendant.value = null;\n }\n}\n\nconst context: SelectContextValue = {\n get open() {\n return openCtl.value.value;\n },\n setOpen: (next) => openCtl.setValue(next),\n get selectedKey() {\n return keyCtl.value.value;\n },\n get hasSelection() {\n return hasSelection.value;\n },\n get selectedLabel() {\n return selectedLabel.value;\n },\n onSelect,\n onClear,\n get keyEquals() {\n return keyEqualsFn.value;\n },\n get items() {\n return mergedItems.value;\n },\n registerItem,\n unregisterItem,\n getCachedLabel,\n get query() {\n return query.value;\n },\n setQuery: (next) => {\n query.value = next;\n },\n get isDisabled() {\n return finalDisabled.value;\n },\n get isLoading() {\n return props.isLoading;\n },\n get loadingLabel() {\n return props.loadingLabel;\n },\n get isClearable() {\n return props.isClearable;\n },\n get clearLabel() {\n return props.clearLabel;\n },\n get serializeKey() {\n return serializeKeyFn.value;\n },\n getOptionLabel: getOptionLabelFn,\n get name() {\n return props.name;\n },\n get isInvalid() {\n return finalInvalid.value;\n },\n get listboxId() {\n return listboxId;\n },\n get activeDescendant() {\n return activeDescendant.value;\n },\n setActiveDescendant: (id) => {\n activeDescendant.value = id;\n },\n listboxEl,\n get fieldId() {\n return field?.id;\n },\n get labelId() {\n return field?.labelledBy;\n },\n get describedBy() {\n return field?.describedBy;\n },\n};\n\nprovide(selectContextKey, context);\n\nconst isOpenNow = computed(() => openCtl.value.value);\nconst serializedKey = computed(() => serializeKeyFn.value(keyCtl.value.value));\n</script>\n\n<template>\n <Popover\n :open=\"isOpenNow\"\n :placement=\"placement\"\n :offset=\"4\"\n @open-change=\"onPopoverOpenChange\"\n >\n <slot />\n <!-- Always-rendered — inside PopoverContent it would vanish from form submission when closed. -->\n <input v-if=\"name && hasSelection\" type=\"hidden\" :name=\"name\" :value=\"serializedKey\" />\n </Popover>\n</template>\n","import { tv, type VariantProps } from '../../../foundation/utils';\nimport { inputBaseVariants } from '../InputStyles';\n\n/** Defines the size step of a select trigger. */\nexport const SelectSize = {\n /** Refers to the extra-small step. */\n Xs: 'xs',\n /** Refers to the small step. */\n Sm: 'sm',\n /** Refers to the medium (default) step. */\n Md: 'md',\n /** Refers to the large step. */\n Lg: 'lg',\n} as const;\n\nexport type SelectSize = (typeof SelectSize)[keyof typeof SelectSize];\n\n/**\n * Extends the shared `inputBaseVariants` so the trigger's height, border,\n * focus-ring, disabled, and per-size paddings stay in lockstep with `TextInput`.\n * Only trigger-specific extras are added here:\n * - `justify-between` + `gap-2` to push the chevron/clear cluster to the end,\n * - `data-[state=open]:border-border-strong` to mirror the hover border while open.\n */\nexport const selectTriggerVariants = tv({\n extend: inputBaseVariants,\n base: 'items-center justify-between gap-2 data-[state=open]:border-border-strong',\n variants: {\n size: {\n xs: 'gap-1.5',\n sm: '',\n md: '',\n lg: '',\n },\n },\n});\n\nexport type SelectTriggerVariants = VariantProps<typeof selectTriggerVariants>;\n\n/* Compile-time lock: enum values ≡ tv axis keys (drift = type error). */\ntype AssertExact<A, B> = [A] extends [B] ? ([B] extends [A] ? true : never) : never;\nconst _assertSelectSize: AssertExact<\n SelectSize, NonNullable<VariantProps<typeof selectTriggerVariants>['size']>\n> = true;\nvoid _assertSelectSize;\n","<script lang=\"ts\">\n/** Represents the prop surface of the `SelectValue`. */\nexport interface SelectValueProps {\n /** The content shown when no item is selected. Fill the `placeholder` slot for richer content. */\n placeholder?: string | number;\n\n /**\n * The override for the auto-resolved label, rendered as-is with no item lookup —\n * React's `children`. The default slot does the same for richer content.\n */\n label?: string | number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useSlots } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useSelectContext } from './SelectContext';\n\n/** Provides the label shown inside the trigger for the currently selected item. */\ndefineOptions({ name: 'SelectValue' });\n\nconst props = defineProps<SelectValueProps>();\n\nconst slots = useSlots();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useSelectContext();\n\nconst hasOverride = computed(() => Boolean(props.label) || Boolean(slots.default));\n\n/* Resolution order: live registry → label captured at selection → persistent cache (labels a\n closed trigger post-unmount) → `getOptionLabel` (human label before first open) → serialized key. */\nconst resolvedLabel = computed<string | number | null>(() => {\n if (!ctx.hasSelection) return null;\n const match = ctx.items.find((i) => ctx.keyEquals(i.itemKey, ctx.selectedKey));\n return (\n match?.label ??\n ctx.selectedLabel ??\n ctx.getCachedLabel(ctx.selectedKey) ??\n ctx.getOptionLabel(ctx.selectedKey) ??\n ctx.serializeKey(ctx.selectedKey)\n );\n});\n\n/* `muted-foreground` (not `subtle-foreground`): the trigger surface is muted, where subtle is\n only 4.2:1 (see index.css). */\nconst valueClass = computed(() => cn('truncate text-left', !resolvedLabel.value && 'text-muted-foreground'));\n</script>\n\n<template>\n <span v-if=\"hasOverride\" class=\"truncate\">\n <slot>{{ label }}</slot>\n </span>\n <span v-else :class=\"valueClass\">\n <template v-if=\"resolvedLabel !== null\">{{ resolvedLabel }}</template>\n <slot v-else name=\"placeholder\">{{ placeholder }}</slot>\n </span>\n</template>\n","<script lang=\"ts\">\nimport type { InputState } from '../InputStyles';\nimport type { SelectSize } from './Select.variants';\n\n/** Represents the prop surface of the `SelectTrigger`. */\nexport interface SelectTriggerProps {\n /** The trigger size. */\n size?: SelectSize;\n\n /** The validity surface. */\n state?: InputState;\n}\n\n/** Contains the icon Tailwind classes per trigger size. */\nconst TRIGGER_ICON_CLASSES = {\n xs: 'h-3 w-3',\n sm: 'h-3.5 w-3.5',\n md: 'h-4 w-4',\n lg: 'h-5 w-5',\n} as const;\n\n/** Contains the clear-button hit-box Tailwind classes per trigger size.\n * The visual glyph stays small; the hit target is floored at 24×24 (WCAG 2.2 SC 2.5.8). */\nconst TRIGGER_CLEAR_BOX_CLASSES = {\n xs: 'h-4 w-4',\n sm: 'h-5 w-5',\n md: 'h-5 w-5',\n lg: 'h-6 w-6',\n} as const;\n\n/** Contains the vertical-divider height Tailwind classes per trigger size. */\nconst TRIGGER_DIVIDER_CLASSES = {\n xs: 'h-3',\n sm: 'h-3.5',\n md: 'h-4',\n lg: 'h-5',\n} as const;\n\n/** Contains the right-offset classes aligning the overlaid clear button with its reserved slot\n * (trigger `px` + chevron width + `gap-1.5` + 1px divider + `gap-1.5`). */\nconst TRIGGER_CLEAR_OFFSET_CLASSES = {\n xs: 'right-[35px]',\n sm: 'right-[37px]',\n md: 'right-[41px]',\n lg: 'right-[49px]',\n} as const;\n\n/** Resolves the trigger's `data-state` — open wins, then loading/disabled/invalid. */\nfunction triggerDataState(\n open: boolean,\n isLoading: boolean,\n isDisabled: boolean,\n isInvalid: boolean,\n): string | undefined {\n if (open) return 'open';\n if (isLoading) return 'loading';\n if (isDisabled) return 'disabled';\n if (isInvalid) return 'invalid';\n return undefined;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { ChevronDown, Loader2, X } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { useTypeahead } from '../../../foundation/hooks';\nimport { Announce } from '../../../foundation/primitives';\nimport { PopoverTrigger } from '../../overlays';\nimport { InputState as InputStateValue } from '../InputStyles';\nimport { selectTriggerVariants } from './Select.variants';\nimport { useSelectContext, type ItemRegistryEntry } from './SelectContext';\nimport SelectValue from './SelectValue.vue';\n\nconst ChevronDownIcon = ChevronDown;\nconst LoaderIcon = Loader2;\nconst ClearIcon = X;\n\n/**\n * The button that opens the dropdown and displays the current selection.\n *\n * The clear control is a real sibling button overlaying a reserved slot —\n * nesting an interactive role inside the trigger button is invalid ARIA and\n * keyboard-unreachable.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call, and so the rest\n of the attrs land on the inner `<button>` rather than the positioning wrapper. */\ndefineOptions({ name: 'SelectTrigger', inheritAttrs: false });\n\n/** The trigger content — defaults to `<SelectValue />`. React's `children`. */\ndefineSlots<{ default?(): unknown }>();\n\nconst props = defineProps<SelectTriggerProps>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useSelectContext();\n\n/* `aria-label` is read off `attrs`, never declared: a declared `'aria-label'` prop arrives as\n `props.ariaLabel`, so `props['aria-label']` is always undefined and no accessible name\n renders. Left in the fallthrough set, it also still lands on the button. */\nconst ariaLabel = computed(() => attrs['aria-label'] as string | undefined);\n\nconst triggerState = computed(\n () => props.state ?? (ctx.isInvalid ? InputStateValue.Invalid : InputStateValue.Default),\n);\n\n/* Closed-only type-to-select (native `<select>`): typing picks the matching option without\n opening; while OPEN the inner Listbox owns typeahead. Matches each item's `entry.text`,\n anchored at the current selection so repeats cycle from there. */\nconst triggerTypeahead = useTypeahead<ItemRegistryEntry>({\n items: () => ctx.items,\n getLabel: (entry) => entry.text,\n isDisabled: (entry) => entry.isDisabled,\n getActiveIndex: () =>\n ctx.hasSelection ? ctx.items.findIndex((i) => ctx.keyEquals(i.itemKey, ctx.selectedKey)) : -1,\n onMatch: (entry) => ctx.onSelect(entry),\n enabled: () => !ctx.open && !ctx.isDisabled && !ctx.isLoading,\n});\n\nfunction handleTriggerKeyDown(event: KeyboardEvent): void {\n /* React called the consumer's `onKeyDown` first and then honoured `defaultPrevented`; a\n fallthrough listener would merge AFTER this handler and lose that ordering, so it is pulled\n off `attrs` and invoked by hand (and excluded from the passthrough so it cannot fire twice). */\n (attrs.onKeydown as ((e: KeyboardEvent) => void) | undefined)?.(event);\n if (event.defaultPrevented) return;\n /* Only intercept when closed — open delegates to the Listbox. A consumed char (incl. Space\n while a buffer is active) must not also toggle the popover open via the button. */\n if (!ctx.open && triggerTypeahead.onKeyDown(event)) {\n event.preventDefault();\n }\n}\n\nconst showClear = computed(\n () => ctx.isClearable && ctx.hasSelection && !ctx.isLoading && !ctx.isDisabled,\n);\n\nconst sizeKey = computed<SelectSize>(() => props.size ?? 'md');\nconst iconClass = computed(() => TRIGGER_ICON_CLASSES[sizeKey.value]);\nconst clearBoxClass = computed(() => TRIGGER_CLEAR_BOX_CLASSES[sizeKey.value]);\nconst dividerClass = computed(() => TRIGGER_DIVIDER_CLASSES[sizeKey.value]);\nconst clearOffsetClass = computed(() => TRIGGER_CLEAR_OFFSET_CLASSES[sizeKey.value]);\n\n/* Names the trigger from the Field label when present; an explicit aria-label always wins. */\nconst labelledBy = computed(() => (!ariaLabel.value ? ctx.labelId : undefined));\n\nconst dataState = computed(() =>\n triggerDataState(ctx.open, ctx.isLoading, ctx.isDisabled, ctx.isInvalid),\n);\n\nconst chevronClass = computed(() =>\n cn(iconClass.value, 'text-muted-foreground transition-transform', ctx.open && 'rotate-180'),\n);\n\nconst spinnerClass = computed(() =>\n cn(iconClass.value, 'animate-spin text-subtle-foreground'),\n);\n\nconst clearButtonClass = computed(() =>\n cn(\n /* `min-h/min-w` floor the hit target at 24px (WCAG 2.2 SC 2.5.8) while the glyph box\n (`clearBoxClass`) stays visually small. */\n 'absolute top-1/2 grid min-h-6 min-w-6 -translate-y-1/2 place-items-center rounded-full text-subtle-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n clearBoxClass.value,\n clearOffsetClass.value,\n ),\n);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class', 'onKeydown']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst buttonClass = computed(() =>\n cn(\n selectTriggerVariants({ size: props.size, state: triggerState.value }),\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLButtonElement>('root');\n\n/** The rendered `<button>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <span class=\"relative inline-flex w-full\">\n <!--\n Always-mounted polite live region — swapping content (empty ↔ label) makes SRs announce\n the loading transition. `aria-busy` on the button alone isn't announced.\n -->\n <Announce>{{ ctx.isLoading ? ctx.loadingLabel : '' }}</Announce>\n <PopoverTrigger as-child>\n <button\n ref=\"root\"\n type=\"button\"\n :id=\"ctx.fieldId\"\n :disabled=\"ctx.isDisabled || ctx.isLoading\"\n :aria-busy=\"ctx.isLoading || undefined\"\n aria-haspopup=\"listbox\"\n :aria-controls=\"ctx.listboxId\"\n :aria-activedescendant=\"ctx.open ? (ctx.activeDescendant ?? undefined) : undefined\"\n :aria-invalid=\"triggerState === 'invalid' || undefined\"\n :aria-labelledby=\"labelledBy\"\n :aria-describedby=\"ctx.describedBy\"\n :data-state=\"dataState\"\n :class=\"buttonClass\"\n v-bind=\"passthroughAttrs\"\n @keydown=\"handleTriggerKeyDown\"\n >\n <slot><SelectValue /></slot>\n <span class=\"ml-auto flex shrink-0 items-center gap-1.5\">\n <template v-if=\"showClear\">\n <!-- Reserves the slot the overlaid clear button sits on. -->\n <span aria-hidden=\"true\" :class=\"clearBoxClass\" />\n <!-- Separates the clear button from the chevron — `foreground/20` always contrasts. -->\n <span aria-hidden=\"true\" :class=\"cn('w-px bg-foreground/20', dividerClass)\" />\n </template>\n <LoaderIcon v-if=\"ctx.isLoading\" :class=\"spinnerClass\" />\n <ChevronDownIcon v-else :class=\"chevronClass\" />\n </span>\n </button>\n </PopoverTrigger>\n <button\n v-if=\"showClear\"\n type=\"button\"\n :aria-label=\"ctx.clearLabel\"\n :class=\"clearButtonClass\"\n @click=\"ctx.onClear()\"\n >\n <ClearIcon :class=\"iconClass\" />\n </button>\n </span>\n</template>\n","<script lang=\"ts\">\nimport type {\n SurfaceElevation,\n SurfacePadding,\n SurfaceRadius,\n SurfaceTone,\n SurfaceVariant,\n} from '../../../foundation/utils';\n\n/**\n * Represents the prop surface of the `SelectContent`.\n *\n * React declared the surface axes by `extends SurfaceVariants`; they are spelled\n * out here because the SFC compiler's type resolver cannot follow a\n * `VariantProps<typeof …>` base and fails the build on it while `vue-tsc` stays\n * green. The aliases below are the canonical ones from `foundation/utils`.\n */\nexport interface SelectContentProps {\n /** The visual recipe. */\n variant?: SurfaceVariant;\n\n /** The color tone the recipe is tinted with. */\n tone?: SurfaceTone;\n\n /** The corner rounding. */\n radius?: SurfaceRadius;\n\n /** The inner spacing step. Defaults to `none`. */\n padding?: SurfacePadding;\n\n /** The shadow depth. */\n elevation?: SurfaceElevation;\n\n /** The searchable state, rendering a search input above the items and filtering by label substring. */\n isSearchable?: boolean;\n\n /** The placeholder of the search input. */\n searchPlaceholder?: string;\n\n /** The label rendered when the search yields no matches. */\n noResultsLabel?: string | number;\n\n /** The match-width behavior, locking the surface width to the trigger's and truncating long items. */\n matchWidth?: boolean;\n}\n\n/** The navigation keys the search input forwards to the Listbox keyboard handler. */\nconst FORWARDED_NAV_KEYS = new Set([\n 'ArrowDown',\n 'ArrowUp',\n 'Home',\n 'End',\n 'PageDown',\n 'PageUp',\n 'Enter',\n]);\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useTemplateRef, watch, type ComponentPublicInstance } from 'vue';\nimport { Loader2 } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { PopoverContent } from '../../overlays';\nimport Listbox from '../listbox/Listbox.vue';\nimport ListboxEmpty from '../listbox/ListboxEmpty.vue';\nimport SearchInput from '../searchInput/SearchInput.vue';\nimport { useSelectContext } from './SelectContext';\n\nconst LoaderIcon = Loader2;\n\n/** Provides the floating panel that hosts the items below the trigger. */\ndefineOptions({ name: 'SelectContent', inheritAttrs: false });\n\n/** The item list — `SelectItem`, `ListboxGroup`, `ListboxSeparator`. React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<SelectContentProps>(), {\n isSearchable: false,\n searchPlaceholder: 'Search…',\n noResultsLabel: 'No results',\n matchWidth: false,\n});\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useSelectContext();\n\nconst hasItems = computed(() => ctx.items.length > 0);\n\nconst visibleCount = computed(() =>\n ctx.query\n ? ctx.items.filter((i) => i.text.toLowerCase().includes(ctx.query.toLowerCase())).length\n : ctx.items.length,\n);\n\nconst showEmpty = computed(() => hasItems.value && visibleCount.value === 0);\n\nconst listbox = useTemplateRef<ComponentPublicInstance & { el?: HTMLElement | null }>('listbox');\n\n/* Publishes the Listbox's DOM node onto the context so the search input's keyboard bridge can\n re-dispatch nav keys onto it. React passed `ctx.listboxRef` straight in as a ref. */\nwatch(\n listbox,\n (instance) => {\n const node = (instance?.el ?? instance?.$el ?? null) as HTMLElement | null;\n ctx.listboxEl.value = node;\n },\n { immediate: true, flush: 'post' },\n);\n\n/* Bridges nav keys from the search input to the Listbox by re-dispatching a bubbling\n KeyboardEvent onto the listbox node; printable chars stay in the input for filtering. The\n active-id change is mirrored back via the Listbox's `active-change` after commit. */\nfunction handleSearchKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n /* Let the popover's DismissableLayer close + restore focus to the trigger. */\n return;\n }\n if (!FORWARDED_NAV_KEYS.has(event.key)) return;\n const node = ctx.listboxEl.value;\n if (!node) return;\n event.preventDefault();\n node.dispatchEvent(\n new KeyboardEvent('keydown', { key: event.key, bubbles: true, cancelable: true }),\n );\n}\n\nfunction onListboxValueChange(next: unknown): void {\n if (next === null || next === undefined) return;\n const entry = ctx.items.find((i) => ctx.keyEquals(i.itemKey, next));\n if (entry) ctx.onSelect(entry);\n}\n\nconst contentClass = computed(() =>\n cn(\n 'overflow-hidden',\n /* Truncate the option's first content child (the label) so trailing meta stays visible.\n Targets ListboxItem's stable `data-listbox-item-content` wrapper rather than a deep\n `[role=option]>span.flex-1>:first-child` chain that breaks if the markup shifts. */\n props.matchWidth\n ? 'w-(--anchor-width) [&_[data-listbox-item-content]>:first-child]:truncate'\n : 'w-auto min-w-(--anchor-width)',\n ),\n);\n\nconst selectedForListbox = computed(() => ctx.selectedKey ?? undefined);\n</script>\n\n<template>\n <PopoverContent\n :variant=\"variant\"\n :tone=\"tone\"\n :radius=\"radius\"\n :padding=\"padding ?? 'none'\"\n :elevation=\"elevation\"\n :class=\"contentClass\"\n >\n <div v-if=\"isSearchable\" class=\"border-b border-border p-1\">\n <SearchInput\n size=\"sm\"\n autofocus\n role=\"combobox\"\n aria-expanded=\"true\"\n :aria-controls=\"ctx.listboxId\"\n :aria-activedescendant=\"ctx.activeDescendant ?? undefined\"\n aria-autocomplete=\"list\"\n :model-value=\"ctx.query\"\n :placeholder=\"searchPlaceholder\"\n is-clearable\n class=\"rounded-sm\"\n @update:model-value=\"ctx.setQuery($event)\"\n @keydown=\"handleSearchKeyDown\"\n @clear=\"ctx.setQuery('')\"\n />\n </div>\n <Listbox\n ref=\"listbox\"\n :id=\"ctx.listboxId\"\n :model-value=\"selectedForListbox\"\n :is-equal=\"ctx.keyEquals\"\n variant=\"flat\"\n radius=\"none\"\n :tabindex=\"isSearchable ? -1 : 0\"\n @value-change=\"onListboxValueChange\"\n @active-change=\"ctx.setActiveDescendant($event)\"\n >\n <!--\n In-list loading affordance — visible when options resolve asynchronously while the panel\n is open (e.g. a dependent re-fetch). Suppresses the no-results message so a mid-load\n empty set doesn't read as \"no results\".\n -->\n <div\n v-if=\"ctx.isLoading\"\n role=\"status\"\n class=\"flex items-center gap-2 px-2 py-2 text-sm text-subtle-foreground\"\n >\n <LoaderIcon class=\"h-4 w-4 animate-spin\" />\n <span>{{ ctx.loadingLabel }}</span>\n </div>\n <slot />\n <ListboxEmpty v-if=\"!ctx.isLoading && showEmpty\">{{ noResultsLabel }}</ListboxEmpty>\n </Listbox>\n </PopoverContent>\n</template>\n","<script lang=\"ts\">\n/**\n * Represents the prop surface of the `SelectItem`.\n *\n * React's `<K, V = K>` generics are dropped: the exported interface has to live\n * in this plain `<script>` block (a `<script setup>`-only SFC trips\n * `no-unused-vars` on the house attrs idiom), and a block-level interface cannot\n * see a `generic=\"…\"` parameter. The root `Select` stays generic, so the\n * consumer-facing `value` / `@value-change` types are unaffected.\n */\nexport interface SelectItemProps {\n /** The item key; drives equality, ARIA, and search. */\n itemKey: unknown;\n\n /** The rich payload returned via `@value-change`; defaults to `itemKey`. */\n value?: unknown;\n\n /** The label shown in the trigger when this item is selected, and the default search text. */\n label: string | number;\n\n /** The searchable-text override; defaults to `label`. */\n text?: string;\n\n /** The disabled state for this item. */\n isDisabled?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, watch } from 'vue';\nimport ListboxItem from '../listbox/ListboxItem.vue';\nimport { extractText, useSelectContext } from './SelectContext';\n\n/**\n * A single option row. Registers with the root on mount and unregisters on unmount,\n * so a removed option leaves the live set used by search / typeahead / value lookup.\n * The label persists in the root's cache, so the trigger stays labelled after the\n * popover closes and items unmount.\n *\n * The in-list rendering override is the default slot (React's `children`); it falls\n * back to `label`. Unlike React, slot content cannot be text-scraped for search — set\n * `text` explicitly when the slot carries the searchable words and `label` does not.\n */\ndefineOptions({ name: 'SelectItem', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<SelectItemProps>(), {\n isDisabled: false,\n});\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useSelectContext();\n\nconst resolvedValue = computed(() => (props.value === undefined ? props.itemKey : props.value));\n\n/* Explicit `text` wins; otherwise the label's plain text. */\nconst itemText = computed(() => (props.text !== undefined ? props.text : extractText(props.label)));\n\nwatch(\n () => ({\n itemKey: props.itemKey,\n value: resolvedValue.value,\n label: props.label,\n text: itemText.value,\n isDisabled: props.isDisabled,\n }),\n (entry) => ctx.registerItem(entry),\n { immediate: true },\n);\nonBeforeUnmount(() => ctx.unregisterItem(props.itemKey));\n\nconst matchesQuery = computed(\n () => !ctx.query || itemText.value.toLowerCase().includes(ctx.query.toLowerCase()),\n);\n</script>\n\n<template>\n <!-- ListboxItem compares via the wired keyEquals — same equality math as Select. -->\n <ListboxItem v-if=\"matchesQuery\" :value=\"itemKey\" :is-disabled=\"isDisabled\">\n <slot>{{ label }}</slot>\n </ListboxItem>\n</template>\n","import { inject, type InjectionKey } from 'vue';\n\n/**\n * The seam between `MultiSelect` and its `Trigger` / `Tags` / `Content` / `Item` children.\n *\n * React attached those as `MultiSelect.Trigger` / `.Tags` / … statics over a `createContext`.\n * An SFC's generated default export cannot carry statics cleanly, so they ship as sibling\n * components and share state through provide/inject instead.\n *\n * Every field but the setters is a live getter — read them off the object, don't destructure.\n */\nexport interface MultiSelectContextValue {\n readonly open: boolean;\n setOpen: (open: boolean) => void;\n readonly values: ReadonlyArray<string>;\n setValues: (values: ReadonlyArray<string>) => void;\n\n /**\n * The chip text per selected value.\n *\n * React registered each item's `children` (a `ReactNode`) here. It is `string | number`\n * in this port for the same reason `SelectOption.label` is: a slot cannot be captured into\n * a plain registry, and the tag also feeds the remove button's accessible name. Rich rows\n * stay available through `<MultiSelectItem>`'s default slot.\n */\n readonly labels: Record<string, string | number>;\n registerLabel: (value: string, label: string | number) => void;\n unregisterLabel: (value: string) => void;\n\n /**\n * Resolves a chip label for a value the registry has never seen — `null` when it cannot.\n *\n * Rows only register while the panel is mounted, so a preselected value has no registered\n * label until the dropdown has been opened once and the trigger shows the raw key. Same\n * gap `Select` closes with `getOptionLabel`; this is that escape hatch, and the registry\n * still wins where it has an entry.\n */\n getOptionLabel: (value: string) => string | number | null;\n\n readonly isDisabled: boolean;\n readonly name?: string;\n readonly isInvalid?: boolean;\n\n /** Form-control wiring inherited from a surrounding `<Field>` (undefined when standalone).\n * `labelId`/`describedBy` carry only ids of chrome that is actually rendered. */\n readonly fieldId?: string;\n readonly labelId?: string;\n readonly describedBy?: string;\n}\n\nexport const multiSelectContextKey: InjectionKey<MultiSelectContextValue> =\n Symbol('wow-two.multiSelect');\n\n/** Reads the surrounding multi-select context; throws when used outside a `<MultiSelect>`. */\nexport function useMultiSelectContext(): MultiSelectContextValue {\n const ctx = inject(multiSelectContextKey, null);\n if (!ctx) throw new Error('MultiSelect.* must be used inside <MultiSelect>');\n return ctx;\n}\n","<script lang=\"ts\">\nimport type { Placement } from '@floating-ui/vue';\n\nexport interface MultiSelectProps {\n /** The selected values, controlled — React's spelling, which wins when both are set. */\n value?: ReadonlyArray<string>;\n\n /** The selected values, controlled. The `v-model` binding target. */\n modelValue?: ReadonlyArray<string>;\n\n /** The initial selected values when uncontrolled. */\n defaultValue?: ReadonlyArray<string>;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n isDisabled?: boolean;\n\n /** The hidden-input name; one hidden input is rendered per selected value. */\n name?: string;\n\n /** The invalid surface override. Falls back to the surrounding form control's `isInvalid`. */\n isInvalid?: boolean;\n\n /** The initial open state of the dropdown when uncontrolled. */\n defaultOpen?: boolean;\n\n /** The dropdown open state, controlled. The `v-model:open` binding target. */\n open?: boolean;\n\n /** The dropdown open state, controlled — the house boolean spelling of `open`; `open` wins when both are set. */\n isOpen?: boolean;\n\n /** The floating placement of the dropdown. */\n placement?: Placement;\n\n /**\n * Resolves a chip label for a value whose row has not mounted yet — `null` when unknown.\n *\n * `MultiSelectItem` registers its label only while the panel is open, so a preselected\n * value renders as its raw key until the first open. Supply this (or open the panel) to\n * label a closed trigger. The mirror of `Select`'s prop of the same name.\n */\n getOptionLabel?: (value: string) => string | number | null;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, ref } from 'vue';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { Popover } from '../../overlays';\nimport { multiSelectContextKey, type MultiSelectContextValue } from './MultiSelectContext';\n\n/**\n * State owner for a MultiSelect tree. Renders the `Popover` that hosts the trigger and the\n * panel, plus one hidden input per selected value.\n *\n * Inherits id/disabled/invalid/labelledby/describedby from a surrounding `<Field>`;\n * standalone props win when provided, context fills the gaps (Select parity).\n */\ndefineOptions({ name: 'MultiSelect', inheritAttrs: false });\n\n/** The MultiSelect tree — trigger and content. React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<MultiSelectProps>(), {\n defaultOpen: false,\n placement: 'bottom',\n /* Explicit `undefined` defaults are load-bearing: `useControlled` keys on `=== undefined`,\n and Vue casts an absent `boolean` prop to `false`. Without these, `open`/`isOpen` would\n read as \"controlled, and closed\" — pinning the dropdown shut and making `defaultOpen`\n dead — and `isDisabled`/`isInvalid` would shadow the surrounding `<Field>` context. */\n value: undefined,\n modelValue: undefined,\n open: undefined,\n isOpen: undefined,\n isDisabled: undefined,\n isInvalid: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [values: ReadonlyArray<string>];\n /** Replaces React's `onValueChange`. */\n 'value-change': [values: ReadonlyArray<string>];\n /** The `v-model:open` half. */\n 'update:open': [open: boolean];\n /** Replaces React's `onOpenChange`. */\n 'open-change': [open: boolean];\n}>();\n\n/* `field` is a live-getter object — read fields off it, never destructure. */\nconst field = useFormControl();\n\nconst finalDisabled = computed(() => props.isDisabled ?? field?.isDisabled ?? false);\nconst finalInvalid = computed(() => props.isInvalid ?? field?.isInvalid);\n\nconst openCtl = useControlled<boolean>({\n controlled: () => (props.open !== undefined ? props.open : props.isOpen),\n default: () => props.defaultOpen,\n onChange: (next) => {\n emit('update:open', next);\n emit('open-change', next);\n },\n});\n\nconst valuesCtl = useControlled<ReadonlyArray<string>>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? [],\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst labels = ref<Record<string, string | number>>({});\n\nfunction registerLabel(value: string, label: string | number): void {\n if (labels.value[value] === label) return;\n labels.value = { ...labels.value, [value]: label };\n}\n\nfunction unregisterLabel(value: string): void {\n if (!(value in labels.value)) return;\n const next = { ...labels.value };\n delete next[value];\n labels.value = next;\n}\n\n/* Wrapped rather than passed through: the context field is non-optional, so consumers read\n one shape whether or not the prop was supplied. The `Fn` suffix is not cosmetic — a local\n named exactly like a declared prop trips `vue/no-dupe-keys`, which is why `Select` spells\n its own the same way. */\nfunction getOptionLabelFn(value: string): string | number | null {\n return props.getOptionLabel?.(value) ?? null;\n}\n\nprovide<MultiSelectContextValue>(multiSelectContextKey, {\n get open() {\n return openCtl.value.value;\n },\n setOpen: openCtl.setValue,\n get values() {\n return valuesCtl.value.value;\n },\n setValues: valuesCtl.setValue,\n get labels() {\n return labels.value;\n },\n registerLabel,\n unregisterLabel,\n getOptionLabel: getOptionLabelFn,\n get isDisabled() {\n return finalDisabled.value;\n },\n get name() {\n return props.name;\n },\n get isInvalid() {\n return finalInvalid.value;\n },\n get fieldId() {\n return field?.id;\n },\n get labelId() {\n return field?.labelledBy;\n },\n get describedBy() {\n return field?.describedBy;\n },\n});\n\nconst isOpenNow = computed(() => openCtl.value.value);\nconst selected = computed(() => valuesCtl.value.value);\n</script>\n\n<template>\n <Popover\n :open=\"isOpenNow\"\n :placement=\"placement\"\n :offset=\"6\"\n @open-change=\"openCtl.setValue\"\n >\n <slot />\n <!-- Always-rendered — inside PopoverContent they would vanish from form submission when closed. -->\n <template v-if=\"name\">\n <input v-for=\"v in selected\" :key=\"v\" type=\"hidden\" :name=\"name\" :value=\"v\" />\n </template>\n </Popover>\n</template>\n","<script lang=\"ts\">\nexport interface MultiSelectTagsProps {\n /** The content shown when no values are selected. Fill the `placeholder` slot for richer content. */\n placeholder?: string | number;\n\n /**\n * The number of chips rendered before the rest collapse into a `+N` block. Omit to render\n * every selection (the React original's only behaviour).\n *\n * A declarative budget rather than a measured fit: the trigger wraps by default, so a\n * measured overflow would never trigger, and measuring would put the chip strip behind a\n * `ResizeObserver` frame — invisible until the browser paints. Capping is deterministic,\n * renders identically on the server, and is the axis a caller actually wants to control.\n */\n maxVisible?: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { X } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { useMultiSelectContext } from './MultiSelectContext';\n\n/** The chip strip rendered inside the trigger. */\ndefineOptions({ name: 'MultiSelectTags' });\n\nconst props = defineProps<MultiSelectTagsProps>();\n\ndefineSlots<{ placeholder?(): unknown }>();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useMultiSelectContext();\n\nconst isCapped = computed(\n () => props.maxVisible !== undefined && ctx.values.length > props.maxVisible,\n);\n\nconst visibleValues = computed(() =>\n isCapped.value ? ctx.values.slice(0, props.maxVisible) : ctx.values,\n);\n\nconst overflowCount = computed(() => ctx.values.length - visibleValues.value.length);\n\n/* Capped: one line that clips, so the `+N` stays pinned at the end. Uncapped: the historical\n wrap, which grows the trigger (`h-auto min-h-10` there) instead of hiding anything. */\nconst stripClass = computed(() =>\n cn(\n 'flex min-w-0 flex-1 items-center gap-1',\n isCapped.value ? 'flex-nowrap overflow-hidden' : 'flex-wrap',\n ),\n);\n\n/* Registry (rows currently mounted) → `getOptionLabel` (a value whose row has never mounted,\n which is every preselected one before the first open) → the raw value. */\nfunction tagLabel(value: string): string | number {\n return ctx.labels[value] ?? ctx.getOptionLabel(value) ?? value;\n}\n\n/* Matches React exactly: a non-string label (a numeric one) falls back to the raw value\n rather than being interpolated into the accessible name. */\nfunction removeLabel(value: string): string {\n const label = tagLabel(value);\n return `Remove ${typeof label === 'string' ? label : value}`;\n}\n\nfunction remove(value: string, event: MouseEvent): void {\n event.stopPropagation();\n ctx.setValues(ctx.values.filter((x) => x !== value));\n}\n\nconst CloseIcon = X;\n</script>\n\n<template>\n <!-- `muted-foreground` (not `subtle-foreground`): the trigger surface is muted, where\n subtle is only 4.2:1 (see index.css). -->\n <span v-if=\"ctx.values.length === 0\" class=\"text-muted-foreground\">\n <slot name=\"placeholder\">{{ placeholder }}</slot>\n </span>\n <span v-else :class=\"stripClass\">\n <!-- `border-border` is load-bearing, not decoration: `bg-muted` resolves to the same\n color as the trigger's `bg-popover` in several shipped themes (smart-qr among\n them), and a chip with no edge reads as a bare trigger. -->\n <span\n v-for=\"v in visibleValues\"\n :key=\"v\"\n class=\"inline-flex max-w-full shrink-0 items-center gap-1 truncate rounded-sm border border-border bg-muted px-1.5 py-0.5 text-xs\"\n >\n {{ tagLabel(v) }}\n <span\n v-if=\"!ctx.isDisabled\"\n role=\"button\"\n :tabindex=\"-1\"\n :aria-label=\"removeLabel(v)\"\n class=\"cursor-pointer rounded-sm p-0.5 hover:bg-border\"\n @click=\"remove(v, $event)\"\n @pointerdown.stop\n >\n <CloseIcon class=\"h-3 w-3\" />\n </span>\n </span>\n\n <!-- Deliberately NOT chip-shaped: no radius, no fill, no remove control. A `+N` that\n borrows the chip's surface reads as one more removable selection; the rule and the\n bare count read as the summary it is. -->\n <span v-if=\"overflowCount > 0\" class=\"ml-0.5 flex shrink-0 items-center gap-1.5\">\n <span aria-hidden=\"true\" class=\"h-4 w-px shrink-0 bg-border\" />\n <span class=\"text-xs font-medium tabular-nums text-muted-foreground\">\n +{{ overflowCount }}\n </span>\n </span>\n </span>\n</template>\n","<script lang=\"ts\">\nimport type { InputState } from '../InputStyles';\nimport type { SelectSize } from '../select/Select.variants';\n\nexport interface MultiSelectTriggerProps {\n /** The trigger size. */\n size?: SelectSize;\n\n /** The validity surface. */\n state?: InputState;\n\n /**\n * The chip budget handed to the default `<MultiSelectTags />` — past it the rest collapse\n * into a `+N` block. Ignored when the trigger's default slot is filled.\n */\n maxVisibleTags?: number;\n}\n/* React also inherited `Omit<SelectTriggerVariants, 'size' | 'state'>` — the `border` / `ring`\n axes — but never forwarded them to `selectTriggerVariants`, so they were dead props that\n landed on the DOM as unknown attributes. Only the two axes the original consumed are here. */\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { ChevronDown } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { PopoverTrigger } from '../../overlays';\nimport { InputState as InputStateValue } from '../InputStyles';\nimport { selectTriggerVariants } from '../select/Select.variants';\nimport { useMultiSelectContext } from './MultiSelectContext';\nimport MultiSelectTags from './MultiSelectTags.vue';\n\n/** The button that opens the dropdown and displays the selected chips. */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call, and so the rest\n of the attrs land on the inner `<button>`. */\ndefineOptions({ name: 'MultiSelectTrigger', inheritAttrs: false });\n\n/** The trigger content — defaults to `<MultiSelectTags />`. React's `children`. */\ndefineSlots<{ default?(): unknown }>();\n\nconst props = defineProps<MultiSelectTriggerProps>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst root = useTemplateRef<HTMLButtonElement>('root');\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useMultiSelectContext();\n\n/* `aria-label` is read off `attrs`, never declared: a declared `'aria-label'` prop arrives as\n `props.ariaLabel`, so `props['aria-label']` is always undefined and no accessible name\n renders. Left in the fallthrough set, it also still lands on the button. */\nconst ariaLabel = computed(() => attrs['aria-label'] as string | undefined);\n\nconst triggerState = computed(\n () => props.state ?? (ctx.isInvalid ? InputStateValue.Invalid : InputStateValue.Default),\n);\n\n/* Names the trigger from the Field label when present; an explicit aria-label always wins. */\nconst labelledBy = computed(() => (!ariaLabel.value ? ctx.labelId : undefined));\n\nfunction onKeydown(event: KeyboardEvent): void {\n /* Runs after any caller-supplied `@keydown` (declared after `v-bind`), exactly as React's\n `onKeyDown?.(e)` ran before this body. */\n if (event.defaultPrevented) return;\n if (event.key === 'Backspace' && ctx.values.length > 0) {\n ctx.setValues(ctx.values.slice(0, -1));\n }\n}\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst buttonClass = computed(() =>\n cn(\n selectTriggerVariants({ size: props.size, state: triggerState.value }),\n 'h-auto min-h-10 flex-wrap py-1.5',\n attrs.class as ClassValue,\n ),\n);\n\n/* Chevron rotate kept; gated motion-safe so reduced-motion users get an instant flip, not a\n tween. Panel pop-in/out is owned by PopoverContent (Presence + --animate-pop-*). */\nconst chevronClass = computed(() =>\n cn(\n 'h-4 w-4 shrink-0 self-center text-muted-foreground motion-safe:transition-transform',\n ctx.open && 'rotate-180',\n ),\n);\n\nconst hasContent = computed(() => Boolean(slots.default));\n\nconst ChevronDownIcon = ChevronDown;\n\n/** The rendered `<button>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <PopoverTrigger as-child>\n <button\n ref=\"root\"\n type=\"button\"\n :id=\"ctx.fieldId\"\n :disabled=\"ctx.isDisabled\"\n :aria-invalid=\"triggerState === 'invalid' || undefined\"\n :aria-labelledby=\"labelledBy\"\n :aria-describedby=\"ctx.describedBy\"\n :class=\"buttonClass\"\n v-bind=\"passthroughAttrs\"\n @keydown=\"onKeydown\"\n >\n <slot v-if=\"hasContent\" />\n <MultiSelectTags v-else :max-visible=\"maxVisibleTags\" />\n <ChevronDownIcon :class=\"chevronClass\" />\n </button>\n </PopoverTrigger>\n</template>\n","<script lang=\"ts\">\nimport type {\n SurfaceElevation,\n SurfacePadding,\n SurfaceRadius,\n SurfaceTone,\n SurfaceVariant,\n} from '../../../foundation/utils';\n\n/**\n * Represents the prop surface of `MultiSelectContent`.\n *\n * React declared the surface axes by `extends SurfaceVariants`; they are spelled out here\n * because the SFC compiler's type resolver cannot follow a `VariantProps<typeof …>` base and\n * fails the build on it. The aliases below are the canonical ones from `foundation/utils`,\n * already locked against the `surfaceVariants` config there, so the two cannot drift.\n */\nexport interface MultiSelectContentProps {\n /** The visual recipe. */\n variant?: SurfaceVariant;\n\n /** The color tone the recipe is tinted with. */\n tone?: SurfaceTone;\n\n /** The corner rounding. */\n radius?: SurfaceRadius;\n\n /** The inner spacing step. Defaults to `none`. */\n padding?: SurfacePadding;\n\n /** The shadow depth. */\n elevation?: SurfaceElevation;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { PopoverContent } from '../../overlays';\nimport { Listbox } from '../listbox';\nimport { useMultiSelectContext } from './MultiSelectContext';\n\n/** The anchored panel hosting the multi-select `Listbox`. */\ndefineOptions({ name: 'MultiSelectContent', inheritAttrs: false });\n\n/** The `MultiSelectItem` rows — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = defineProps<MultiSelectContentProps>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useMultiSelectContext();\n\nconst resolvedPadding = computed(() => props.padding ?? 'none');\n\nconst panelClass = computed(() =>\n cn('w-auto min-w-[var(--anchor-width)] overflow-hidden', attrs.class as ClassValue),\n);\n\nconst selected = computed(() => ctx.values);\n\nfunction onValueChange(next: unknown): void {\n ctx.setValues(next as ReadonlyArray<string>);\n}\n</script>\n\n<template>\n <PopoverContent\n :variant=\"variant\"\n :tone=\"tone\"\n :radius=\"radius\"\n :padding=\"resolvedPadding\"\n :elevation=\"elevation\"\n :class=\"panelClass\"\n >\n <Listbox\n is-multiple\n :value=\"selected\"\n variant=\"flat\"\n radius=\"none\"\n @value-change=\"onValueChange\"\n >\n <slot />\n </Listbox>\n </PopoverContent>\n</template>\n","<script lang=\"ts\">\nexport interface MultiSelectItemProps {\n /** The value this row contributes to the selection. */\n value: string;\n\n /** The disabled state for this row. */\n isDisabled?: boolean;\n\n /**\n * The chip text registered for the trigger. Defaults to `value`.\n *\n * React registered the row's `children` (a `ReactNode`); a slot cannot be captured into\n * the label registry, so the scalar lives here and the default slot renders the row.\n */\n label?: string | number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useTemplateRef, watch } from 'vue';\nimport { ListboxItem } from '../listbox';\nimport { useMultiSelectContext } from './MultiSelectContext';\n\n/** One selectable row. Registers its chip text with the surrounding `MultiSelect`. */\ndefineOptions({ name: 'MultiSelectItem', inheritAttrs: false });\n\n/** The row content — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<MultiSelectItemProps>(), { isDisabled: false });\n\nconst el = useTemplateRef<InstanceType<typeof ListboxItem>>('el');\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useMultiSelectContext();\n\nconst registeredLabel = computed<string | number>(() => props.label ?? props.value);\n\n/* Registers only — never unregisters; items unmount on popover close and the tags still\n need the labels. `immediate` because the first registration has to happen on mount, and\n nothing in this watcher touches the DOM. */\nwatch(\n [() => props.value, registeredLabel],\n ([value, label]) => ctx.registerLabel(value, label),\n { immediate: true },\n);\n</script>\n\n<template>\n <ListboxItem ref=\"el\" :value=\"value\" :is-disabled=\"isDisabled\">\n <slot />\n </ListboxItem>\n</template>\n","import { inject, type InjectionKey, type ShallowRef } from 'vue';\n\n/** Represents one registered option in the combobox list. */\nexport interface ComboboxItemEntry {\n id: string;\n value: string;\n isDisabled: boolean;\n /**\n * The plain-text label.\n *\n * React registered the item's `children` (a `ReactNode`) and narrowed it with a\n * `typeof === 'string'` check before filling the input. A slot cannot be captured into a\n * registry, so this is `string | number` — the same call `SelectOption.label` makes. Rich\n * rows stay available through `<ComboboxItem>`'s default slot.\n */\n label: string | number;\n}\n\n/**\n * The seam between `Combobox` and its `Input` / `Content` / `Item` children.\n *\n * React attached those as `Combobox.Input` / `.Content` / … statics over a `createContext`.\n * An SFC's generated default export cannot carry statics cleanly, so they ship as sibling\n * components and share state through provide/inject instead.\n *\n * Every field but the functions and the element refs is a live getter — read them off the\n * object, don't destructure.\n */\nexport interface ComboboxContextValue {\n readonly open: boolean;\n setOpen: (open: boolean) => void;\n readonly value: string;\n setValue: (value: string) => void;\n readonly inputValue: string;\n setInputValue: (input: string) => void;\n readonly activeId: string | null;\n setActiveId: (id: string | null) => void;\n registerItem: (entry: ComboboxItemEntry) => void;\n unregisterItem: (id: string) => void;\n /** The registered options in mount order. Reactive, unlike React's `useRef` array. */\n readonly items: ReadonlyArray<ComboboxItemEntry>;\n /** Holds the DOM node of the text input — the panel anchors and sizes off it. */\n inputEl: ShallowRef<HTMLInputElement | null>;\n /** Holds the DOM node of the panel — the input's blur check tests containment against it. */\n contentEl: ShallowRef<HTMLElement | null>;\n readonly listboxId: string;\n readonly isDisabled: boolean;\n readonly isInvalid?: boolean;\n selectItem: (entry: ComboboxItemEntry, options?: { close?: boolean }) => void;\n}\n\nexport const comboboxContextKey: InjectionKey<ComboboxContextValue> = Symbol('wow-two.combobox');\n\n/** Reads the surrounding combobox context; throws when used outside a `<Combobox>`. */\nexport function useComboboxContext(): ComboboxContextValue {\n const ctx = inject(comboboxContextKey, null);\n if (!ctx) throw new Error('Combobox.* must be used inside <Combobox>');\n return ctx;\n}\n","<script lang=\"ts\">\nexport interface ComboboxProps {\n /** The selected value, controlled — React's spelling, which wins when both are set. */\n value?: string;\n\n /** The selected value, controlled. The `v-model` binding target. */\n modelValue?: string;\n\n /** The initial selected value when uncontrolled. */\n defaultValue?: string;\n\n /** The typed text, controlled. The `v-model:input-value` binding target. */\n inputValue?: string;\n\n /** The initial typed text when uncontrolled. */\n defaultInputValue?: string;\n\n /** The disabled state. Default `false`. */\n isDisabled?: boolean;\n\n /** The invalid surface flag handed to `ComboboxInput`. */\n isInvalid?: boolean;\n\n /** The hidden input name; the hidden input emits the selected value. */\n name?: string;\n\n /** The initial open state of the panel when uncontrolled. */\n defaultOpen?: boolean;\n\n /** The panel open state, controlled. The `v-model:open` binding target. */\n open?: boolean;\n\n /** The panel open state, controlled — the house boolean spelling of `open`; `open` wins when both are set. */\n isOpen?: boolean;\n\n /** The fill-on-select behavior — when the user picks an item, set the input value to its label. Default true. */\n fillInputOnSelect?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, ref, shallowRef } from 'vue';\nimport { useControlled, useId } from '../../../foundation/hooks';\nimport {\n comboboxContextKey,\n type ComboboxContextValue,\n type ComboboxItemEntry,\n} from './ComboboxContext';\n\n/**\n * State + a11y-id owner for a Combobox tree. Renders its children plus the hidden form input\n * carrying the selected value; the panel itself is portalled by `ComboboxContent`.\n */\ndefineOptions({ name: 'Combobox', inheritAttrs: false });\n\n/** The Combobox tree — `ComboboxInput` and `ComboboxContent`. React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<ComboboxProps>(), {\n isDisabled: false,\n defaultOpen: false,\n fillInputOnSelect: true,\n /* Explicit `undefined` defaults are load-bearing: `useControlled` keys on `=== undefined`,\n and Vue casts an absent `boolean` prop to `false` — without these, `open`/`isOpen` would\n read as \"controlled, and closed\", pinning the panel shut and making `defaultOpen` dead. */\n value: undefined,\n modelValue: undefined,\n inputValue: undefined,\n open: undefined,\n isOpen: undefined,\n isInvalid: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string];\n /** Replaces React's `onValueChange`. */\n 'value-change': [value: string];\n /** The `v-model:input-value` half. */\n 'update:inputValue': [input: string];\n /** Replaces React's `onInputChange`. */\n 'input-change': [input: string];\n /** The `v-model:open` half. */\n 'update:open': [open: boolean];\n /** Replaces React's `onOpenChange`. */\n 'open-change': [open: boolean];\n}>();\n\nconst openCtl = useControlled<boolean>({\n controlled: () => (props.open !== undefined ? props.open : props.isOpen),\n default: () => props.defaultOpen,\n onChange: (next) => {\n emit('update:open', next);\n emit('open-change', next);\n },\n});\n\nconst valueCtl = useControlled<string>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? '',\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst inputCtl = useControlled<string>({\n controlled: () => props.inputValue,\n default: () => props.defaultInputValue ?? '',\n onChange: (next) => {\n emit('update:inputValue', next);\n emit('input-change', next);\n },\n});\n\n/* Reactive, unlike React's `useRef` array: `ComboboxContent` re-clamps the active id off this\n set whenever an item registers or unregisters (filtering), which a plain ref never triggered. */\nconst items = ref<Array<ComboboxItemEntry>>([]);\nconst activeId = ref<string | null>(null);\nconst inputEl = shallowRef<HTMLInputElement | null>(null);\nconst contentEl = shallowRef<HTMLElement | null>(null);\nconst listboxId = useId('combobox-listbox');\n\nfunction registerItem(entry: ComboboxItemEntry): void {\n const idx = items.value.findIndex((i) => i.id === entry.id);\n if (idx >= 0) {\n const existing = items.value[idx];\n if (\n existing &&\n existing.value === entry.value &&\n existing.label === entry.label &&\n existing.isDisabled === entry.isDisabled\n ) {\n return;\n }\n const next = items.value.slice();\n next[idx] = entry;\n items.value = next;\n return;\n }\n items.value = [...items.value, entry];\n}\n\nfunction unregisterItem(id: string): void {\n const idx = items.value.findIndex((i) => i.id === id);\n if (idx === -1) return;\n const next = items.value.slice();\n next.splice(idx, 1);\n items.value = next;\n}\n\nfunction selectItem(entry: ComboboxItemEntry, options?: { close?: boolean }): void {\n valueCtl.setValue(entry.value);\n if (props.fillInputOnSelect) {\n const text = typeof entry.label === 'string' ? entry.label : entry.value;\n inputCtl.setValue(text);\n }\n if (options?.close ?? true) openCtl.setValue(false);\n}\n\nprovide<ComboboxContextValue>(comboboxContextKey, {\n get open() {\n return openCtl.value.value;\n },\n setOpen: openCtl.setValue,\n get value() {\n return valueCtl.value.value;\n },\n setValue: valueCtl.setValue,\n get inputValue() {\n return inputCtl.value.value;\n },\n setInputValue: inputCtl.setValue,\n get activeId() {\n return activeId.value;\n },\n setActiveId: (id) => {\n activeId.value = id;\n },\n registerItem,\n unregisterItem,\n get items() {\n return items.value;\n },\n inputEl,\n contentEl,\n get listboxId() {\n return listboxId;\n },\n get isDisabled() {\n return props.isDisabled;\n },\n get isInvalid() {\n return props.isInvalid;\n },\n selectItem,\n});\n\nconst selected = computed(() => valueCtl.value.value);\n</script>\n\n<template>\n <slot />\n <input v-if=\"name\" type=\"hidden\" :name=\"name\" :value=\"selected\" />\n</template>\n","<script lang=\"ts\">\nimport type { InputSize, InputState } from '../InputStyles';\n\nexport interface ComboboxInputProps {\n /** The control size. */\n size?: InputSize;\n\n /** The validity surface. */\n state?: InputState;\n}\n/* React also inherited `Omit<InputBaseVariants, 'size' | 'state'>` — the `border` / `ring`\n axes — but never forwarded them to `inputBaseVariants`, so they were dead props that landed\n on the DOM as unknown attributes. Only the two axes the original consumed are declared here. */\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { inputBaseVariants, InputState as InputStateValue } from '../InputStyles';\nimport { useComboboxContext } from './ComboboxContext';\n\n/** The text field that drives the combobox: filters, opens the panel, and owns keyboard nav. */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call. */\ndefineOptions({ name: 'ComboboxInput', inheritAttrs: false });\n\nconst props = defineProps<ComboboxInputProps>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useComboboxContext();\n\nconst inputState = computed(\n () => props.state ?? (ctx.isInvalid ? InputStateValue.Invalid : InputStateValue.Default),\n);\n\nfunction setRef(node: unknown): void {\n ctx.inputEl.value = (node ?? null) as HTMLInputElement | null;\n}\n\n/* `document` is reached only from a keydown handler, which cannot fire during SSR. */\nfunction setActiveAndScroll(id: string): void {\n ctx.setActiveId(id);\n document.getElementById(id)?.scrollIntoView({ block: 'nearest' });\n}\n\nfunction moveActive(direction: 1 | -1): void {\n const list = ctx.items.filter((i) => !i.isDisabled);\n if (list.length === 0) return;\n const idx = list.findIndex((i) => i.id === ctx.activeId);\n let nextIdx = idx + direction;\n if (idx === -1) nextIdx = direction === 1 ? 0 : list.length - 1;\n if (nextIdx < 0) nextIdx = list.length - 1;\n if (nextIdx >= list.length) nextIdx = 0;\n const next = list[nextIdx];\n if (next) setActiveAndScroll(next.id);\n}\n\n/* Runs after any caller-supplied `@keydown` (declared after `v-bind`), exactly as React's\n `onKeyDown?.(e)` ran before this body. */\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented || ctx.isDisabled) return;\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n if (!ctx.open) ctx.setOpen(true);\n else moveActive(1);\n break;\n case 'ArrowUp':\n event.preventDefault();\n if (!ctx.open) ctx.setOpen(true);\n else moveActive(-1);\n break;\n case 'Home':\n if (ctx.open) {\n event.preventDefault();\n const first = ctx.items.find((i) => !i.isDisabled);\n if (first) setActiveAndScroll(first.id);\n }\n break;\n case 'End':\n if (ctx.open) {\n event.preventDefault();\n const list = ctx.items.filter((i) => !i.isDisabled);\n const last = list[list.length - 1];\n if (last) setActiveAndScroll(last.id);\n }\n break;\n case 'Tab':\n /* Lets focus move on — DismissableLayer only closes on pointer/Escape. */\n if (ctx.open) ctx.setOpen(false);\n break;\n case 'Enter': {\n if (!ctx.open || !ctx.activeId) return;\n const entry = ctx.items.find((i) => i.id === ctx.activeId);\n if (!entry || entry.isDisabled) return;\n event.preventDefault();\n ctx.selectItem(entry);\n break;\n }\n case 'Escape':\n if (ctx.open) {\n event.preventDefault();\n ctx.setOpen(false);\n } else if (ctx.inputValue) {\n event.preventDefault();\n ctx.setInputValue('');\n ctx.setValue('');\n }\n break;\n }\n}\n\nfunction onInput(event: Event): void {\n ctx.setInputValue((event.target as HTMLInputElement).value);\n if (!ctx.open) ctx.setOpen(true);\n // Clear active when input changes — re-seeded by ComboboxContent's clamp.\n ctx.setActiveId(null);\n}\n\nfunction onFocus(): void {\n if (!ctx.open) ctx.setOpen(true);\n}\n\nfunction onBlur(event: FocusEvent): void {\n /* `relatedTarget === null` = pointer interaction — DismissableLayer owns that path. */\n const next = event.relatedTarget as Node | null;\n if (!next || !ctx.open) return;\n if (ctx.inputEl.value?.contains(next)) return;\n if (ctx.contentEl.value?.contains(next)) return;\n ctx.setOpen(false);\n}\n\n/* Only while open — options unmount on close but `activeId` state survives, and a dangling id\n is an axe aria-valid-attr-value hit. */\nconst activeDescendant = computed(() => (ctx.open ? (ctx.activeId ?? undefined) : undefined));\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst inputClass = computed(() =>\n cn(\n inputBaseVariants({ size: props.size, state: inputState.value }),\n attrs.class as ClassValue,\n ),\n);\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: ctx.inputEl });\n</script>\n\n<template>\n <input\n :ref=\"setRef\"\n type=\"text\"\n role=\"combobox\"\n :aria-expanded=\"ctx.open\"\n :aria-controls=\"ctx.listboxId\"\n :aria-activedescendant=\"activeDescendant\"\n aria-autocomplete=\"list\"\n :aria-disabled=\"ctx.isDisabled || undefined\"\n :disabled=\"ctx.isDisabled\"\n :value=\"ctx.inputValue\"\n :class=\"inputClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onInput\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n @keydown=\"onKeydown\"\n />\n</template>\n","<script lang=\"ts\">\nimport type { Placement } from '@floating-ui/vue';\nimport type {\n SurfaceElevation,\n SurfacePadding,\n SurfaceRadius,\n SurfaceTone,\n SurfaceVariant,\n} from '../../../foundation/utils';\n\n/**\n * Represents the prop surface of `ComboboxContent`.\n *\n * React declared the surface axes by `extends SurfaceVariants`; they are spelled out here\n * because the SFC compiler's type resolver cannot follow a `VariantProps<typeof …>` base and\n * fails the build on it. The aliases below are the canonical ones from `foundation/utils`,\n * already locked against the `surfaceVariants` config there, so the two cannot drift.\n */\nexport interface ComboboxContentProps {\n /** The floating placement of the panel. */\n placement?: Placement;\n\n /** The gap between the input and the panel, in px. */\n offset?: number;\n\n /** The visual recipe. */\n variant?: SurfaceVariant;\n\n /** The color tone the recipe is tinted with. */\n tone?: SurfaceTone;\n\n /** The corner rounding. */\n radius?: SurfaceRadius;\n\n /** The inner spacing step. Defaults to `xs` (p-1), so items breathe — same as Listbox. */\n padding?: SurfacePadding;\n\n /** The shadow depth. */\n elevation?: SurfaceElevation;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, watch } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, surfaceVariants } from '../../../foundation/utils';\nimport {\n AnchoredPositioner,\n DismissableLayer,\n Portal,\n Presence,\n} from '../../../foundation/primitives';\nimport { listboxVariants } from '../listbox/Listbox.variants';\nimport { useComboboxContext } from './ComboboxContext';\n\n/** The anchored, dismissable option panel. */\ndefineOptions({ name: 'ComboboxContent', inheritAttrs: false });\n\n/** The `ComboboxItem` rows — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<ComboboxContentProps>(), {\n placement: 'bottom',\n offset: 6,\n});\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useComboboxContext();\n\n/**\n * Keeps `activeId` pointing at a visible, enabled option.\n *\n * React split this across two effects — this one clamped a stale id after filtering, and every\n * `ComboboxItem` seeded the first option when the id was null. Both collapse here: the item\n * registry is reactive, so one watcher on it covers register, unregister and the null case,\n * instead of N duplicate per-item watchers.\n */\nwatch(\n [() => ctx.open, () => ctx.items, () => ctx.activeId],\n ([open, items, activeId]) => {\n if (!open) return;\n const list = items.filter((i) => !i.isDisabled);\n if (!activeId) {\n if (list[0]) ctx.setActiveId(list[0].id);\n return;\n }\n if (!list.some((i) => i.id === activeId)) ctx.setActiveId(list[0]?.id ?? null);\n },\n { flush: 'post' },\n);\n\nfunction setRef(node: unknown): void {\n ctx.contentEl.value = ((node as { $el?: HTMLElement } | null)?.$el ??\n node ??\n null) as HTMLElement | null;\n}\n\n/**\n * The panel's min-width, matched to the input.\n *\n * React read `offsetWidth` inline during render. It is captured in a NON-immediate post-flush\n * watcher here: an immediate one would run during SSR, where there is no element to measure.\n */\nconst minWidth = ref<number | undefined>(undefined);\nwatch(\n () => ctx.open,\n (open) => {\n minWidth.value = open ? ctx.inputEl.value?.offsetWidth : undefined;\n },\n { flush: 'post' },\n);\n\nconst isOpen = computed(() => ctx.open);\nconst anchor = computed(() => ctx.inputEl.value);\nconst panelStyle = computed(() =>\n minWidth.value != null ? { minWidth: `${minWidth.value}px` } : undefined,\n);\n\n/* Default to `xs` (p-1) so items breathe — same as Listbox. */\nconst resolvedPadding = computed(() => props.padding ?? 'xs');\n\nfunction onEscape(): void {\n ctx.setOpen(false);\n}\n\nfunction onOutsidePointerDown(event: PointerEvent): void {\n if (ctx.inputEl.value?.contains(event.target as Node)) return;\n ctx.setOpen(false);\n}\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst panelClass = computed(() =>\n cn(\n /* pop (fade+scale) gated on the portal-root data-state + motion-safe\n so reduced-motion users get no movement. */\n 'motion-safe:group-data-[state=open]:animate-(--animate-pop-in)',\n 'motion-safe:group-data-[state=closed]:animate-(--animate-pop-out) motion-reduce:animate-none',\n surfaceVariants({\n variant: props.variant,\n tone: props.tone,\n radius: props.radius,\n padding: resolvedPadding.value,\n elevation: props.elevation,\n }),\n listboxVariants(),\n attrs.class as ClassValue,\n ),\n);\n</script>\n\n<template>\n <!--\n React portalled from *inside* the Presence-cloned root; Vue resolves a cloned `ref` through\n `$el` and a Teleport has no element, so `Portal` is hoisted and the `contents` root stays\n the Presence node — which is what carries `data-state` for the panel's `group-data-[state=*]`\n pop. Same shape as `PopoverContent`.\n -->\n <Portal>\n <Presence :is-present=\"isOpen\">\n <div class=\"group contents\">\n <AnchoredPositioner\n :anchor=\"anchor\"\n :placement=\"placement\"\n :offset=\"offset\"\n class=\"z-dropdown\"\n >\n <DismissableLayer\n :ref=\"setRef\"\n :on-escape=\"onEscape\"\n :on-outside-pointer-down=\"onOutsidePointerDown\"\n :id=\"ctx.listboxId\"\n role=\"listbox\"\n :style=\"panelStyle\"\n v-bind=\"passthroughAttrs\"\n :class=\"panelClass\"\n >\n <slot />\n </DismissableLayer>\n </AnchoredPositioner>\n </div>\n </Presence>\n </Portal>\n</template>\n","<script lang=\"ts\">\nexport interface ComboboxItemProps {\n /** The value this option selects. */\n value: string;\n\n /** The disabled state for this option. Default `false`. */\n isDisabled?: boolean;\n\n /**\n * The plain-text label registered for the input's fill-on-select. Defaults to `value`.\n *\n * React registered the row's `children` (a `ReactNode`) and narrowed it with a\n * `typeof === 'string'` check; a slot cannot be captured into the registry, so the scalar\n * lives here and the default slot renders the row.\n */\n label?: string | number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, useAttrs, useTemplateRef, watch } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Check } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { useId } from '../../../foundation/hooks';\nimport { listboxItemVariants, ListboxItemState } from '../listbox/Listbox.variants';\nimport { useComboboxContext, type ComboboxItemEntry } from './ComboboxContext';\n\n/** A single selectable option. Registers itself so keyboard nav and selection can see it. */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call. */\ndefineOptions({ name: 'ComboboxItem', inheritAttrs: false });\n\n/** The row content — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<ComboboxItemProps>(), { isDisabled: false });\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useComboboxContext();\n\nconst id = useId('combobox-item');\n\nconst entry = computed<ComboboxItemEntry>(() => ({\n id,\n value: props.value,\n isDisabled: props.isDisabled,\n label: props.label ?? props.value,\n}));\n\n/* `immediate` so the option is in the registry from mount — nothing here touches the DOM, so\n it is safe during SSR. Seeding the first active id lives in `ComboboxContent`, which watches\n the registry once instead of every item doing it. */\nwatch(entry, (next) => ctx.registerItem(next), { immediate: true });\nonBeforeUnmount(() => ctx.unregisterItem(id));\n\nconst isSelected = computed(() => ctx.value === props.value);\nconst isActive = computed(() => ctx.activeId === id);\n\nconst state = computed(() => {\n if (props.isDisabled) return ListboxItemState.Disabled;\n if (isSelected.value) return ListboxItemState.Selected;\n return isActive.value ? ListboxItemState.Active : ListboxItemState.Default;\n});\n\n/* Runs after any caller-supplied `@click` (declared after `v-bind`), exactly as React's\n `onClick?.(e)` ran before this body. */\nfunction onClick(event: MouseEvent): void {\n if (event.defaultPrevented || props.isDisabled) return;\n ctx.selectItem(entry.value);\n}\n\nfunction onPointerenter(): void {\n if (!props.isDisabled) ctx.setActiveId(id);\n}\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rowClass = computed(() =>\n cn(listboxItemVariants({ state: state.value }), attrs.class as ClassValue),\n);\n\nconst CheckIcon = Check;\n\n/** The rendered row `<div>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n ref=\"el\"\n :id=\"id\"\n role=\"option\"\n :aria-selected=\"isSelected\"\n :aria-disabled=\"isDisabled || undefined\"\n :data-active=\"isActive ? '' : undefined\"\n :data-selected=\"isSelected ? '' : undefined\"\n :class=\"rowClass\"\n v-bind=\"passthroughAttrs\"\n @click=\"onClick\"\n @pointerenter=\"onPointerenter\"\n >\n <span class=\"flex-1\"><slot /></span>\n <CheckIcon v-if=\"isSelected\" class=\"h-4 w-4 opacity-80\" />\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface ComboboxGroupProps {\n /**\n * The optional group heading rendered above the contained items. Fill the\n * `label` slot instead for richer content; the prop stays the discriminator.\n */\n label?: string | number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useSlots } from 'vue';\nimport { useId } from '../../../foundation/hooks';\nimport { listboxGroupLabelVariants } from '../listbox/Listbox.variants';\n\n/** Provides a labelled group wrapping a subset of options. */\n/* `inheritAttrs` stays ON: React put `className` straight onto the group div with no `cn()`\n merge of its own, so plain fallthrough reproduces it exactly. */\ndefineOptions({ name: 'ComboboxGroup' });\n\nconst props = defineProps<ComboboxGroupProps>();\n\nconst slots = useSlots();\nconst labelId = useId();\n\nconst hasLabel = computed(() => Boolean(props.label) || Boolean(slots.label));\n</script>\n\n<template>\n <div role=\"group\" :aria-labelledby=\"hasLabel ? labelId : undefined\">\n <div v-if=\"hasLabel\" :id=\"labelId\" :class=\"listboxGroupLabelVariants()\">\n <slot name=\"label\">{{ label }}</slot>\n </div>\n <slot />\n </div>\n</template>\n","<script lang=\"ts\">\n/* No props: React typed this as bare `HTMLAttributes<HTMLDivElement>`, every member of which is\n a Vue fallthrough attr. The block exists because a `<script setup>`-only SFC loses\n `ignoreRestSiblings` in `vue-eslint-parser` and trips `no-unused-vars` on the house\n `const { class: _class, ...others }` idiom. */\n</script>\n\n<script setup lang=\"ts\">\nimport { listboxSeparatorVariants } from '../listbox/Listbox.variants';\n\n/**\n * Provides a thin horizontal rule between groups of options. Decorative only —\n * `separator` is not an allowed child role of `listbox` (grid/option/group only),\n * so the rule is hidden from the accessibility tree entirely.\n */\n/* `inheritAttrs` stays ON: React put `className` straight onto the div with no `cn()` merge\n of its own, so plain fallthrough reproduces it exactly. */\ndefineOptions({ name: 'ComboboxSeparator' });\n</script>\n\n<template>\n <div aria-hidden=\"true\" :class=\"listboxSeparatorVariants()\" />\n</template>\n","<script lang=\"ts\">\n/* No props: React typed this as bare `HTMLAttributes<HTMLDivElement>`, every member of which is\n a Vue fallthrough attr, and the message itself is the default slot. The block exists because\n a `<script setup>`-only SFC loses `ignoreRestSiblings` in `vue-eslint-parser` and trips\n `no-unused-vars` on the house `const { class: _class, ...others }` idiom. */\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { listboxEmptyVariants } from '../listbox/Listbox.variants';\n\n/**\n * Provides the message shown when no options match. Rendered as a disabled option, not\n * `presentation`: a `listbox` must own at least one `option`/`group` (axe\n * aria-required-children), and this keeps the message perceivable to AT. Never registered,\n * so keyboard nav / aria-activedescendant skip it.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'ComboboxEmpty', inheritAttrs: false });\n\nconst attrs = useAttrs();\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() => cn(listboxEmptyVariants(), attrs.class as ClassValue));\n</script>\n\n<template>\n <div\n role=\"option\"\n aria-disabled=\"true\"\n :aria-selected=\"false\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n >\n <slot />\n </div>\n</template>\n","<script lang=\"ts\">\n// Shared month-grid renderer for Calendar and RangeCalendar. Co-located in\n// `forms/` as a domain-internal helper. Owns:\n// - the 42-cell visual layout (header + weekday row + 6×7 grid)\n// - keyboard navigation (arrows / Home/End / PgUp/PgDn / Shift+PgUp/PgDn)\n// - focused-cell management (autofocus on focusedDate change)\n// - month nav buttons\n//\n// Consumers (Calendar, RangeCalendar) provide:\n// - their own selection state via `dayProps(date)` returning extra attrs\n// - `onDayActivate(date)` callback for click/Enter/Space\n//\n// Not exported from `forms/index.ts` — internal only.\n\nimport type { Temporal } from 'temporal-polyfill';\n\nexport interface MonthGridDayProps {\n class?: string;\n 'aria-selected'?: boolean;\n onPointerenter?: (event: PointerEvent) => void;\n onPointerleave?: (event: PointerEvent) => void;\n /** The extra `data-*` attributes (data-selected, data-range-start, etc.). */\n [key: `data-${string}`]: string | boolean | undefined;\n}\n\n/**\n * Every callback here stays a PROP rather than an emit: each is invoked as a plain\n * function during render or navigation (and `dayProps` / `isDayDisabled` RETURN a value,\n * which an emit cannot do). `MonthGrid` is folder-internal, so the prop shape never\n * reaches a consumer.\n */\nexport interface MonthGridProps {\n /** The first day of the visible month (use `startOfMonth(date)`). */\n viewMonth: Temporal.PlainDate;\n\n /** Emits the new visible month when prev/next steps it. */\n onViewMonthChange: (date: Temporal.PlainDate) => void;\n\n /** The currently focused day (cell tabindex=0). */\n focusedDate: Temporal.PlainDate;\n\n /** Emits the newly focused day from keyboard navigation. */\n onFocusedDateChange: (date: Temporal.PlainDate) => void;\n\n /** The predicate marking a day as disabled. */\n isDayDisabled?: (date: Temporal.PlainDate) => boolean;\n\n /** Emits the activated day on click / Enter / Space. */\n onDayActivate?: (date: Temporal.PlainDate, meta: { outOfMonth: boolean }) => void;\n\n /** The extra per-day attributes for selection styling and hover handlers. */\n dayProps?: (\n date: Temporal.PlainDate,\n meta: { outOfMonth: boolean },\n ) => MonthGridDayProps | undefined;\n}\n\n// Upper bound when scanning past disabled days — covers a Shift+PageUp/PageDown\n// year jump (≤366 days) with margin.\nconst MAX_DISABLED_SKIP = 400;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, useAttrs, useTemplateRef, watch } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { ChevronLeft, ChevronRight } from 'lucide-vue-next';\nimport { cn } from '../../foundation/utils';\nimport {\n MONTHS_LONG,\n WEEKDAYS_SHORT,\n addDays,\n addMonths,\n buildMonthGrid,\n isSameDay,\n isToday,\n startOfMonth,\n sundayIndex,\n} from './DateExtensions';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'MonthGrid', inheritAttrs: false });\n\nconst props = defineProps<MonthGridProps>();\n\nconst attrs = useAttrs();\n\nconst root = useTemplateRef<HTMLDivElement>('root');\nconst grid = useTemplateRef<HTMLDivElement>('grid');\n\n/* Tracks keyboard/click interaction so the focus watcher below never steals page focus\n when a standalone Calendar mounts. */\nlet interacted = false;\n\n/*\n * Re-focus the active day cell when `focusedDate` changes (keyboard nav).\n *\n * NOT `immediate` — an immediate watcher runs during setup, which happens on the SERVER\n * too, and `querySelector` on a null ref would be the least of it. The React original's\n * mount run was a no-op behind the `interacted` guard anyway.\n */\nwatch(\n () => props.focusedDate,\n (next) => {\n if (!interacted) return;\n const cell = grid.value?.querySelector<HTMLButtonElement>(\n `[data-date=\"${next.toString()}\"]`,\n );\n cell?.focus();\n },\n { flush: 'post' },\n);\n\n/*\n * When the grid mounts inside an open popover (DatePicker), the focus trap lands on the\n * first tabbable (prev-month button); adopt it onto the active day cell. Standalone mounts\n * (activeElement outside the root) are left alone.\n *\n * `onMounted` — never runs on the server, so `document` / `requestAnimationFrame` are safe\n * here without a `typeof` guard.\n */\nlet raf = 0;\nonMounted(() => {\n raf = requestAnimationFrame(() => {\n if (!root.value?.contains(document.activeElement)) return;\n grid.value?.querySelector<HTMLButtonElement>('button[tabindex=\"0\"]')?.focus();\n });\n});\nonBeforeUnmount(() => {\n if (raf) cancelAnimationFrame(raf);\n});\n\nfunction moveFocus(next: Temporal.PlainDate, dir: 1 | -1): void {\n let target = next;\n if (props.isDayDisabled) {\n // Skip disabled days in the movement direction…\n let steps = 0;\n while (props.isDayDisabled(target) && steps < MAX_DISABLED_SKIP) {\n target = addDays(target, dir);\n steps += 1;\n }\n // …and clamp back toward the origin when none exist (min/max edges).\n if (props.isDayDisabled(target)) {\n target = next;\n steps = 0;\n while (props.isDayDisabled(target) && steps < MAX_DISABLED_SKIP) {\n target = addDays(target, -dir);\n steps += 1;\n }\n }\n if (props.isDayDisabled(target)) return; // nothing focusable in reach — stay put\n }\n interacted = true;\n if (target.month !== props.viewMonth.month || target.year !== props.viewMonth.year) {\n props.onViewMonthChange(startOfMonth(target));\n }\n props.onFocusedDateChange(target);\n}\n\nfunction onCellKeydown(\n event: KeyboardEvent,\n date: Temporal.PlainDate,\n outOfMonth: boolean,\n): void {\n switch (event.key) {\n case 'ArrowRight':\n event.preventDefault();\n moveFocus(addDays(date, 1), 1);\n break;\n case 'ArrowLeft':\n event.preventDefault();\n moveFocus(addDays(date, -1), -1);\n break;\n case 'ArrowDown':\n event.preventDefault();\n moveFocus(addDays(date, 7), 1);\n break;\n case 'ArrowUp':\n event.preventDefault();\n moveFocus(addDays(date, -7), -1);\n break;\n case 'Home':\n // Scan toward the origin so a disabled week start clamps to the\n // first enabled day of the week instead of leaving it.\n event.preventDefault();\n moveFocus(addDays(date, -sundayIndex(date)), 1);\n break;\n case 'End':\n event.preventDefault();\n moveFocus(addDays(date, 6 - sundayIndex(date)), -1);\n break;\n case 'PageDown':\n event.preventDefault();\n moveFocus(addMonths(date, event.shiftKey ? 12 : 1), 1);\n break;\n case 'PageUp':\n event.preventDefault();\n moveFocus(addMonths(date, event.shiftKey ? -12 : -1), -1);\n break;\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (!props.isDayDisabled?.(date)) props.onDayActivate?.(date, { outOfMonth });\n break;\n }\n}\n\nfunction dayDisabled(date: Temporal.PlainDate): boolean {\n return props.isDayDisabled?.(date) ?? false;\n}\n\nconst cells = computed(() => buildMonthGrid(props.viewMonth.year, props.viewMonth.month));\n\nconst weeks = computed(() =>\n Array.from({ length: 6 }, (_, w) => cells.value.slice(w * 7, w * 7 + 7)),\n);\n\n/* Roving tab stop — the focused date unless it's disabled (e.g. today before `min`); then\n the first enabled cell so the grid stays Tab-reachable. */\nconst tabStopDate = computed(() => {\n if (!dayDisabled(props.focusedDate)) return props.focusedDate;\n const fallback =\n cells.value.find((c) => !c.outOfMonth && !dayDisabled(c.date)) ??\n cells.value.find((c) => !dayDisabled(c.date));\n return fallback ? fallback.date : props.focusedDate;\n});\n\nfunction onCellClick(date: Temporal.PlainDate, outOfMonth: boolean): void {\n if (dayDisabled(date)) return;\n interacted = true;\n props.onDayActivate?.(date, { outOfMonth });\n props.onFocusedDateChange(date);\n if (outOfMonth) props.onViewMonthChange(startOfMonth(date));\n}\n\n/** The consumer's per-day attrs minus `class`, which is folded into the cell's own `cn()`. */\nfunction cellAttrs(date: Temporal.PlainDate, outOfMonth: boolean): Record<string, unknown> {\n const consumer = props.dayProps?.(date, { outOfMonth }) ?? {};\n const { class: _class, ...rest } = consumer as Record<string, unknown>;\n return rest;\n}\n\n/*\n * `bg-primary/10` — the ghost/outline hover the rest of the package uses (see\n * `Button.variants`) — NOT `bg-muted`: the grid paints on `bg-popover`, and in most themes\n * `muted` and `popover` are within a point of each other, so a muted hover is invisible.\n * A tint of the selection colour reads on every surface, light and dark.\n *\n * Both halves are also what a consumer's `dayProps` OVERRIDES for its selected cells, and\n * tailwind-merge can only drop a class it recognises as conflicting — same utility group AND\n * same variant. So a consumer that wants a different selected-hover has to spell both\n * `hover:bg-*` and `hover:text-*`; a bare `text-primary-foreground` does not displace\n * `hover:text-foreground` here and the day number flips to near-black on hover.\n */\nfunction cellClass(date: Temporal.PlainDate, outOfMonth: boolean): string {\n const consumer = props.dayProps?.(date, { outOfMonth });\n return cn(\n 'grid h-9 w-9 place-items-center text-sm transition-colors',\n 'hover:bg-primary/10 hover:text-foreground',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n outOfMonth && 'text-muted-foreground/60',\n dayDisabled(date) && 'pointer-events-none opacity-40',\n consumer?.class,\n );\n}\n\n/* Never a declared prop — a declared `'aria-label'` would arrive as `props.ariaLabel` and\n stop reaching the DOM. It is read off the attrs so it can be relocated onto the grid. */\nconst ariaLabel = computed(() => (attrs['aria-label'] as string | undefined) ?? 'Calendar');\n\nconst monthLabel = computed(\n () => `${MONTHS_LONG[props.viewMonth.month - 1]} ${props.viewMonth.year}`,\n);\n\nconst rootClass = computed(() =>\n cn(\n 'inline-flex flex-col gap-2 rounded-md border border-border bg-popover p-3 text-popover-foreground',\n attrs.class as ClassValue,\n ),\n);\n\nconst WEEKDAYS = WEEKDAYS_SHORT;\nconst ChevronLeftIcon = ChevronLeft;\nconst ChevronRightIcon = ChevronRight;\n\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div ref=\"root\" :class=\"rootClass\">\n <!-- Header -->\n <div class=\"flex items-center justify-between gap-2 px-1\">\n <button\n type=\"button\"\n aria-label=\"Previous month\"\n class=\"grid h-7 w-7 place-items-center rounded-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n @click=\"props.onViewMonthChange(addMonths(viewMonth, -1))\"\n >\n <ChevronLeftIcon class=\"h-4 w-4\" />\n </button>\n <div class=\"text-sm font-medium\" aria-live=\"polite\">{{ monthLabel }}</div>\n <button\n type=\"button\"\n aria-label=\"Next month\"\n class=\"grid h-7 w-7 place-items-center rounded-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n @click=\"props.onViewMonthChange(addMonths(viewMonth, 1))\"\n >\n <ChevronRightIcon class=\"h-4 w-4\" />\n </button>\n </div>\n\n <!-- Weekday row -->\n <div class=\"grid grid-cols-7 gap-0 px-1\">\n <div\n v-for=\"w in WEEKDAYS\"\n :key=\"w\"\n class=\"grid h-7 w-9 place-items-center text-xs font-medium text-muted-foreground\"\n >\n {{ w }}\n </div>\n </div>\n\n <!-- Day grid -->\n <div ref=\"grid\" role=\"grid\" :aria-label=\"ariaLabel\" class=\"px-1\">\n <div\n v-for=\"(week, weekIndex) in weeks\"\n :key=\"weekIndex\"\n role=\"row\"\n class=\"grid grid-cols-7 gap-0\"\n >\n <button\n v-for=\"cell in week\"\n :key=\"cell.date.toString()\"\n type=\"button\"\n role=\"gridcell\"\n :data-date=\"cell.date.toString()\"\n :aria-disabled=\"dayDisabled(cell.date) || undefined\"\n :data-today=\"isToday(cell.date) ? '' : undefined\"\n :data-out-of-month=\"cell.outOfMonth ? '' : undefined\"\n :data-disabled=\"dayDisabled(cell.date) ? '' : undefined\"\n :tabindex=\"isSameDay(tabStopDate, cell.date) ? 0 : -1\"\n v-bind=\"cellAttrs(cell.date, cell.outOfMonth)\"\n :class=\"cellClass(cell.date, cell.outOfMonth)\"\n @click=\"onCellClick(cell.date, cell.outOfMonth)\"\n @keydown=\"onCellKeydown($event, cell.date, cell.outOfMonth)\"\n >\n {{ cell.date.day }}\n </button>\n </div>\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { Temporal } from 'temporal-polyfill';\n\nexport interface CalendarProps {\n /** The selected date, controlled — React's spelling, which wins when both are set. */\n value?: Temporal.PlainDate | null;\n\n /** The selected date, controlled. The `v-model` binding target. */\n modelValue?: Temporal.PlainDate | null;\n\n /** The uncontrolled initial selection. */\n defaultValue?: Temporal.PlainDate | null;\n\n /** The initial visible month (uncontrolled). */\n defaultMonth?: Temporal.PlainDate;\n\n /** The minimum selectable date. */\n min?: Temporal.PlainDate | null;\n\n /** The maximum selectable date. */\n max?: Temporal.PlainDate | null;\n\n /**\n * The custom disable predicate.\n *\n * Kept a PROP, not an emit: it RETURNS a value the grid reads on every cell, which is\n * not what an emit models.\n */\n isDisabled?: (date: Temporal.PlainDate) => boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { isDateDisabled, isSameDay, isToday, startOfMonth, today } from '../DateExtensions';\nimport MonthGrid from '../MonthGrid.vue';\nimport type { MonthGridDayProps } from '../MonthGrid.vue';\n\n/** Single-date calendar grid. */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'Calendar', inheritAttrs: false });\n\nconst props = defineProps<CalendarProps>();\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [date: Temporal.PlainDate | null];\n /** Replaces React's `onValueChange`. */\n 'value-change': [date: Temporal.PlainDate | null];\n}>();\n\nconst attrs = useAttrs();\n\nconst controlled = useControlled<Temporal.PlainDate | null>({\n /* `??` is wrong here — `null` is a MEANINGFUL selection (\"nothing selected\"), and `??`\n would fall through it to `modelValue`. Only `undefined` means \"not controlled\". */\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? null,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst selected = controlled.value;\n\n/* `today()` reads the host time zone through `Temporal.Now` — universal, not a browser\n global, so both seeds are safe on the server. */\nconst viewMonth = ref<Temporal.PlainDate>(\n startOfMonth(props.defaultMonth ?? selected.value ?? today()),\n);\nconst focusedDate = ref<Temporal.PlainDate>(selected.value ?? today());\n\nfunction setViewMonth(next: Temporal.PlainDate): void {\n viewMonth.value = next;\n}\n\nfunction setFocusedDate(next: Temporal.PlainDate): void {\n focusedDate.value = next;\n}\n\nfunction isDayDisabled(d: Temporal.PlainDate): boolean {\n return isDateDisabled(d, { min: props.min, max: props.max, isDisabled: props.isDisabled });\n}\n\nfunction onDayActivate(d: Temporal.PlainDate): void {\n controlled.setValue(d);\n}\n\n/*\n * `hover:text-primary-foreground` is load-bearing, not decoration: `MonthGrid`'s base carries\n * `hover:text-foreground`, and tailwind-merge only drops a class from the same utility group\n * AND the same variant — a plain `text-primary-foreground` does not displace a `hover:text-*`.\n * Without it the selected day's number flipped to near-black on `bg-primary` while hovered.\n *\n * `hover:bg-primary/90` (the package's solid-surface hover, see `Button.variants`) rather than\n * a flat `hover:bg-primary`, so hovering the selected day still reads as a hover.\n */\nfunction dayProps(date: Temporal.PlainDate): MonthGridDayProps {\n const isSelectedCell = isSameDay(selected.value, date);\n return {\n 'aria-selected': isSelectedCell,\n 'data-selected': isSelectedCell ? '' : undefined,\n class: cn(\n 'rounded-sm',\n isToday(date) && !isSelectedCell && 'border border-border',\n isSelectedCell &&\n 'bg-primary text-primary-foreground hover:bg-primary/90 hover:text-primary-foreground',\n ),\n };\n}\n\n/* Never a declared prop — a declared `'aria-label'` would arrive as `props.ariaLabel`. It is\n read off the attrs so it can be relocated onto the inner grid, as React did. */\nconst ariaLabel = computed(() => (attrs['aria-label'] as string | undefined) ?? 'Calendar');\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class', 'aria-label']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() => cn(attrs.class as ClassValue));\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div ref=\"root\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <MonthGrid\n :view-month=\"viewMonth\"\n :on-view-month-change=\"setViewMonth\"\n :focused-date=\"focusedDate\"\n :on-focused-date-change=\"setFocusedDate\"\n :is-day-disabled=\"isDayDisabled\"\n :on-day-activate=\"onDayActivate\"\n :day-props=\"dayProps\"\n :aria-label=\"ariaLabel\"\n />\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { Temporal } from 'temporal-polyfill';\nimport type { InputSize, InputState, InputBorder, InputRing } from '../InputStyles';\n\nexport interface DateFieldProps {\n /** The control size. */\n size?: InputSize;\n /** The validity surface. */\n state?: InputState;\n /** The border weight. */\n border?: InputBorder;\n /** The focus-ring weight. */\n ring?: InputRing;\n\n /** The value, controlled. The `v-model` binding target. `null` is the cleared state. */\n modelValue?: Temporal.PlainDate | null;\n\n /** The value, controlled — React's spelling of `modelValue`, which wins when both are set. */\n value?: Temporal.PlainDate | null;\n\n /** The initial value when uncontrolled. */\n defaultValue?: Temporal.PlainDate | null;\n\n /** The earliest selectable date. */\n min?: Temporal.PlainDate | null;\n\n /** The latest selectable date. */\n max?: Temporal.PlainDate | null;\n\n /**\n * Renders a bare `<input type=\"date\">` and drops the popover.\n *\n * Opt-in only. The browser owns that control's picker panel — it cannot be themed, so it\n * lands a system-chrome popup in the middle of a design-system form. Reach for it when the\n * platform picker is the point (a mobile-first form wanting the OS wheels, for instance).\n */\n native?: boolean;\n\n /** The empty-state text. Ignored when `native` — that control renders its own mask. */\n placeholder?: string;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useTemplateRef, watch } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Calendar as CalendarIcon } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { Popover, PopoverContent, PopoverTrigger } from '../../overlays';\nimport { inputBaseVariants, InputState as InputStateValue } from '../InputStyles';\nimport { formatISODate, parseISODate, today } from '../DateExtensions';\nimport Calendar from '../calendar/Calendar.vue';\n\n/**\n * Atomic date input — a typed `YYYY-MM-DD` field with a design-system `Calendar` popover on\n * the trailing button. Accepts and emits `Temporal.PlainDate`.\n *\n * The popover is ours, not the browser's: an `<input type=\"date\">` opens an unstylable system\n * panel, which is what `native` is for. `DatePicker` is the trigger-shaped peer — reach for\n * this one when the form wants a text field the user can type into.\n */\n/* `inheritAttrs: false` so `class` folds into the wrapper's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'DateField', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<DateFieldProps>(), {\n native: false,\n placeholder: 'YYYY-MM-DD',\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form\n control context, and Vue casts an absent `boolean` prop to `false` — which would\n shadow the context with a hard \"not disabled / not required\". */\n disabled: undefined,\n required: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: Temporal.PlainDate | null];\n /** Replaces React's `onValueChange`. Native `input` / `change` stay fallthrough listeners. */\n 'value-change': [value: Temporal.PlainDate | null];\n}>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\nconst controlled = useControlled<Temporal.PlainDate | null>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? null,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst committed = controlled.value;\n\nconst open = ref(false);\n\n/** The ISO form the native control, the typed field and form submission all speak. */\nconst displayValue = computed(() => formatISODate(committed.value));\n\n/** The in-flight text — free-form while typing, reconciled with `committed` on commit. */\nconst draft = ref<string>(displayValue.value);\n\n/* Syncs the draft when the committed value changes from the outside (or from the popover). */\nwatch(displayValue, (next) => {\n draft.value = next;\n});\n\n/** Commits the draft; an unparseable draft reverts to the committed value (ColorField parity). */\nfunction commit(): void {\n if (!draft.value.trim()) {\n controlled.setValue(null);\n draft.value = '';\n return;\n }\n const next = parseISODate(draft.value.trim());\n if (next) {\n controlled.setValue(next);\n draft.value = formatISODate(next);\n } else {\n draft.value = displayValue.value;\n }\n}\n\nfunction onDraftInput(event: Event): void {\n draft.value = (event.target as HTMLInputElement).value;\n}\n\n/* Runs after any caller-supplied `@blur` — declared after `v-bind`, so Vue chains theirs first. */\nfunction onBlur(): void {\n commit();\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented) return;\n if (event.key === 'Enter') {\n event.preventDefault();\n commit();\n }\n}\n\n/** The `native` path keeps the original ISO-string round trip. */\nfunction onNativeInput(event: Event): void {\n controlled.setValue(parseISODate((event.target as HTMLInputElement).value));\n}\n\n/* A day is the whole value here, so the pick closes the panel — `DatePicker` parity, and\n unlike `DateTimeField`, where the time half still has to be chosen. */\nfunction onCalendarChange(next: Temporal.PlainDate | null): void {\n controlled.setValue(next);\n open.value = false;\n}\n\nconst calendarMonth = computed(() => committed.value ?? today());\nconst minValue = computed(() => formatISODate(props.min));\nconst maxValue = computed(() => formatISODate(props.max));\n\nconst finalState = computed(\n () => props.state ?? (ctx?.isInvalid ? InputStateValue.Invalid : InputStateValue.Default),\n);\n\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\nconst describedBy = computed(() => ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\n/* The caller's `class` sizes the field and the input keeps `w-full` from the variants —\n the adorned-input idiom already used by `PasswordInput` / `SearchInput`. */\nconst wrapperClass = computed(() => cn('relative', attrs.class as ClassValue));\n\nconst inputClass = computed(() =>\n cn(\n inputBaseVariants({\n size: props.size,\n state: finalState.value,\n border: props.border,\n ring: props.ring,\n }),\n !props.native && 'pr-10',\n ),\n);\n\nconst root = useTemplateRef<HTMLInputElement>('root');\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div :class=\"wrapperClass\">\n <!-- The unstylable-system-panel path, kept for callers that want the platform picker. -->\n <input\n v-if=\"native\"\n ref=\"root\"\n type=\"date\"\n :id=\"inputId\"\n :value=\"displayValue\"\n :min=\"minValue\"\n :max=\"maxValue\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :class=\"inputClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onNativeInput\"\n />\n\n <Popover v-else v-model:open=\"open\" placement=\"bottom-start\" :offset=\"6\">\n <input\n ref=\"root\"\n type=\"text\"\n autocomplete=\"off\"\n :spellcheck=\"false\"\n :id=\"inputId\"\n :value=\"draft\"\n :placeholder=\"placeholder\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :class=\"inputClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onDraftInput\"\n @blur=\"onBlur\"\n @keydown=\"onKeydown\"\n />\n <PopoverTrigger\n aria-label=\"Choose date\"\n :disabled=\"isDisabled\"\n class=\"absolute right-1 top-1/2 grid h-8 w-8 -translate-y-1/2 place-items-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50\"\n >\n <CalendarIcon class=\"h-4 w-4\" />\n </PopoverTrigger>\n <PopoverContent is-bare>\n <Calendar\n :value=\"committed\"\n :default-month=\"calendarMonth\"\n :min=\"min\"\n :max=\"max\"\n @value-change=\"onCalendarChange\"\n />\n </PopoverContent>\n </Popover>\n </div>\n</template>\n","<script lang=\"ts\">\n// Shared hour/minute column pair for TimePicker, TimeField and DateTimeField.\n// Co-located in `forms/` as a domain-internal helper, exactly like `MonthGrid.vue`.\n// Owns:\n// - the two scrollable listboxes (24 hours × `minuteStep` minutes)\n// - the selected-cell styling and its hover ladder\n// - scrolling the selected cells into view on mount (i.e. each time a popover opens)\n//\n// Consumers provide the current `value` and an `onTimeChange` callback; the merge of the\n// untouched column with the picked one happens here, so every consumer gets it identically.\n//\n// Not exported from `forms/index.ts` — internal only.\n\nimport type { Temporal } from 'temporal-polyfill';\n\nexport interface TimeColumnsProps {\n /** The selected time. `null` renders both columns with nothing selected. */\n value: Temporal.PlainTime | null;\n\n /** The minute interval between rows. Default 5. */\n minuteStep?: number;\n\n /**\n * Emits the time rebuilt from the column the user picked.\n *\n * Kept a PROP rather than an emit, like every `MonthGrid` callback: this component is\n * folder-internal, so the prop shape never reaches a consumer, and each callback is\n * invoked as a plain function.\n */\n onTimeChange: (time: Temporal.PlainTime) => void;\n}\n\nconst HOURS = Array.from({ length: 24 }, (_, i) => i);\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Temporal as TemporalValue } from 'temporal-polyfill';\nimport { cn } from '../../foundation/utils';\n\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'TimeColumns', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<TimeColumnsProps>(), { minuteStep: 5 });\n\nconst attrs = useAttrs();\n\nconst hoursEl = useTemplateRef<HTMLDivElement>('hoursEl');\nconst minutesEl = useTemplateRef<HTMLDivElement>('minutesEl');\n\nconst minuteList = computed(() => {\n const list: Array<number> = [];\n for (let m = 0; m < 60; m += props.minuteStep) list.push(m);\n return list;\n});\n\n/*\n * Scroll the selected hour/minute into view. `onMounted` — never runs on the server, so\n * `requestAnimationFrame` is safe here without a `typeof` guard. Mount is the right hook\n * because an overlay unmounts its panel on close, so this runs on every open.\n */\nlet raf = 0;\nonMounted(() => {\n raf = requestAnimationFrame(() => {\n hoursEl.value?.querySelector<HTMLButtonElement>('[data-selected]')?.scrollIntoView({\n block: 'center',\n });\n minutesEl.value?.querySelector<HTMLButtonElement>('[data-selected]')?.scrollIntoView({\n block: 'center',\n });\n });\n});\nonBeforeUnmount(() => {\n if (raf) cancelAnimationFrame(raf);\n});\n\nfunction update(next: { hour?: number; minute?: number }): void {\n props.onTimeChange(\n TemporalValue.PlainTime.from({\n hour: next.hour ?? props.value?.hour ?? 0,\n minute: next.minute ?? props.value?.minute ?? 0,\n }),\n );\n}\n\n/*\n * Hover ladder, shared with `MonthGrid`:\n * unselected → `bg-primary/10`, the package's ghost/outline hover (see `Button.variants`)\n * selected → `bg-primary/90`, the package's solid-surface hover\n * A flat `hover:bg-primary` left the selected cell with no hover feedback at all, and\n * `hover:bg-muted` is indistinguishable from the popover surface in most themes.\n */\nfunction cellClass(isSelected: boolean): string {\n return cn(\n 'grid h-8 w-12 place-items-center rounded-sm text-sm transition-colors hover:bg-primary/10',\n isSelected && 'bg-primary text-primary-foreground hover:bg-primary/90',\n );\n}\n\nfunction pad(n: number): string {\n return String(n).padStart(2, '0');\n}\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'flex gap-1 rounded-md border border-border bg-popover p-2 text-popover-foreground shadow-md',\n attrs.class as ClassValue,\n ),\n);\n\nconst HOUR_LIST = HOURS;\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div ref=\"root\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <div\n ref=\"hoursEl\"\n role=\"listbox\"\n aria-label=\"Hours\"\n class=\"flex max-h-56 flex-col gap-0.5 overflow-y-auto pr-1\"\n >\n <button\n v-for=\"h in HOUR_LIST\"\n :key=\"h\"\n type=\"button\"\n role=\"option\"\n :aria-selected=\"props.value?.hour === h\"\n :data-selected=\"props.value?.hour === h ? '' : undefined\"\n :class=\"cellClass(props.value?.hour === h)\"\n @click=\"update({ hour: h })\"\n >\n {{ pad(h) }}\n </button>\n </div>\n <div class=\"w-px self-stretch bg-border\" />\n <div\n ref=\"minutesEl\"\n role=\"listbox\"\n aria-label=\"Minutes\"\n class=\"flex max-h-56 flex-col gap-0.5 overflow-y-auto pl-1\"\n >\n <button\n v-for=\"m in minuteList\"\n :key=\"m\"\n type=\"button\"\n role=\"option\"\n :aria-selected=\"props.value?.minute === m\"\n :data-selected=\"props.value?.minute === m ? '' : undefined\"\n :class=\"cellClass(props.value?.minute === m)\"\n @click=\"update({ minute: m })\"\n >\n {{ pad(m) }}\n </button>\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { Temporal } from 'temporal-polyfill';\nimport type { InputSize, InputState, InputBorder, InputRing } from '../InputStyles';\n\nexport interface DateTimeFieldProps {\n /** The control size. */\n size?: InputSize;\n /** The validity surface. */\n state?: InputState;\n /** The border weight. */\n border?: InputBorder;\n /** The focus-ring weight. */\n ring?: InputRing;\n\n /** The value, controlled. The `v-model` binding target. `null` is the cleared state. */\n modelValue?: Temporal.PlainDateTime | null;\n\n /** The value, controlled — React's spelling of `modelValue`, which wins when both are set. */\n value?: Temporal.PlainDateTime | null;\n\n /** The initial value when uncontrolled. */\n defaultValue?: Temporal.PlainDateTime | null;\n\n /** The earliest selectable wall-clock instant. */\n min?: Temporal.PlainDateTime | null;\n\n /** The latest selectable wall-clock instant. */\n max?: Temporal.PlainDateTime | null;\n\n /**\n * Renders a bare `<input type=\"datetime-local\">` and drops the popover.\n *\n * Opt-in only. The browser owns that control's picker panel — it cannot be themed, so it\n * lands a system-chrome popup in the middle of a design-system form. Reach for it when the\n * platform picker is the point (a mobile-first form wanting the OS wheels, for instance).\n */\n native?: boolean;\n\n /** The minute interval offered in the popover. Default 5. Ignored when `native`. */\n minuteStep?: number;\n\n /** The empty-state text. Ignored when `native` — that control renders its own mask. */\n placeholder?: string;\n\n /** The hidden input name; when set, a hidden input ships the ISO value with form submission. */\n name?: string;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useTemplateRef, watch } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { CalendarClock } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { Popover, PopoverContent, PopoverTrigger } from '../../overlays';\nimport { inputBaseVariants, InputState as InputStateValue } from '../InputStyles';\nimport { formatISODateTime, parseISODate, parseISODateTime, today } from '../DateExtensions';\nimport Calendar from '../calendar/Calendar.vue';\nimport TimeColumns from '../TimeColumns.vue';\n\n/**\n * Atomic datetime input — a typed `YYYY-MM-DD HH:MM` field with a design-system popover\n * (`Calendar` + hour/minute columns) on the trailing button. Accepts and emits\n * `Temporal.PlainDateTime` (calendar wall-clock, no zone).\n *\n * The popover is ours, not the browser's: an `<input type=\"datetime-local\">` opens an\n * unstylable system panel, which is what `native` is for.\n */\n/* `inheritAttrs: false` so `class` folds into the wrapper's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'DateTimeField', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<DateTimeFieldProps>(), {\n native: false,\n minuteStep: 5,\n placeholder: 'YYYY-MM-DD HH:MM',\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form\n control context, and Vue casts an absent `boolean` prop to `false` — which would\n shadow the context with a hard \"not disabled / not required\". */\n disabled: undefined,\n required: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: Temporal.PlainDateTime | null];\n /** Replaces React's `onValueChange`. Native `input` / `change` stay fallthrough listeners. */\n 'value-change': [value: Temporal.PlainDateTime | null];\n}>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\nconst controlled = useControlled<Temporal.PlainDateTime | null>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? null,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst committed = controlled.value;\n\nconst open = ref(false);\n\n/** The ISO form the native control and form submission both speak. */\nconst isoValue = computed(() => formatISODateTime(committed.value));\n\n/** The typed form — the same ISO with the `T` softened to a space. */\nconst displayText = computed(() => isoValue.value.replace('T', ' '));\n\n/** The in-flight text — free-form while typing, reconciled with `committed` on commit. */\nconst draft = ref<string>(displayText.value);\n\n/* Syncs the draft when the committed value changes from the outside (or from the popover). */\nwatch(displayText, (next) => {\n draft.value = next;\n});\n\n/** Accepts `YYYY-MM-DD HH:MM`, its `T` spelling, and a bare `YYYY-MM-DD` (→ midnight). */\nfunction parseDateTimeText(text: string): Temporal.PlainDateTime | null {\n const normalised = text.trim().replace(/\\s+/, 'T');\n const full = parseISODateTime(normalised);\n if (full) return full;\n const dateOnly = parseISODate(normalised);\n return dateOnly ? dateOnly.toPlainDateTime() : null;\n}\n\n/** Commits the draft; an unparseable draft reverts to the committed value (ColorField parity). */\nfunction commit(): void {\n if (!draft.value.trim()) {\n controlled.setValue(null);\n draft.value = '';\n return;\n }\n const next = parseDateTimeText(draft.value);\n if (next) {\n controlled.setValue(next);\n draft.value = formatISODateTime(next).replace('T', ' ');\n } else {\n draft.value = displayText.value;\n }\n}\n\nfunction onDraftInput(event: Event): void {\n draft.value = (event.target as HTMLInputElement).value;\n}\n\n/* Runs after any caller-supplied `@blur` — declared after `v-bind`, so Vue chains theirs first. */\nfunction onBlur(): void {\n commit();\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented) return;\n if (event.key === 'Enter') {\n event.preventDefault();\n commit();\n }\n}\n\n/** The `native` path keeps the original ISO-string round trip. */\nfunction onNativeInput(event: Event): void {\n controlled.setValue(parseISODateTime((event.target as HTMLInputElement).value));\n}\n\n/* A date pick keeps the time that was already set; a time pick keeps the date. Neither\n closes the popover — the other half still has to be chosen. */\nfunction onCalendarChange(date: Temporal.PlainDate | null): void {\n if (!date) {\n controlled.setValue(null);\n return;\n }\n controlled.setValue(date.toPlainDateTime(committed.value?.toPlainTime()));\n}\n\nfunction onColumnsChange(time: Temporal.PlainTime): void {\n const date = committed.value?.toPlainDate() ?? today();\n controlled.setValue(date.toPlainDateTime(time));\n}\n\nconst calendarValue = computed(() => committed.value?.toPlainDate() ?? null);\nconst calendarMonth = computed(() => calendarValue.value ?? today());\nconst timeValue = computed(() => committed.value?.toPlainTime() ?? null);\n\n/* The day bounds the calendar can express — the hour half of `min`/`max` stays the typed\n field's business, exactly as it was under the native control. */\nconst minDate = computed(() => props.min?.toPlainDate() ?? null);\nconst maxDate = computed(() => props.max?.toPlainDate() ?? null);\nconst minValue = computed(() => formatISODateTime(props.min));\nconst maxValue = computed(() => formatISODateTime(props.max));\n\nconst finalState = computed(\n () => props.state ?? (ctx?.isInvalid ? InputStateValue.Invalid : InputStateValue.Default),\n);\n\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\nconst describedBy = computed(() => ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\n/* The caller's `class` sizes the field and the input keeps `w-full` from the variants —\n the adorned-input idiom already used by `PasswordInput` / `SearchInput`. */\nconst wrapperClass = computed(() => cn('relative', attrs.class as ClassValue));\n\nconst inputClass = computed(() =>\n cn(\n inputBaseVariants({\n size: props.size,\n state: finalState.value,\n border: props.border,\n ring: props.ring,\n }),\n !props.native && 'pr-10',\n ),\n);\n\nconst root = useTemplateRef<HTMLInputElement>('root');\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div :class=\"wrapperClass\">\n <!-- The unstylable-system-panel path, kept for callers that want the platform picker. -->\n <input\n v-if=\"native\"\n ref=\"root\"\n type=\"datetime-local\"\n :id=\"inputId\"\n :value=\"isoValue\"\n :min=\"minValue\"\n :max=\"maxValue\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :class=\"inputClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onNativeInput\"\n />\n\n <Popover v-else v-model:open=\"open\" placement=\"bottom-start\" :offset=\"6\">\n <input\n ref=\"root\"\n type=\"text\"\n autocomplete=\"off\"\n :spellcheck=\"false\"\n :id=\"inputId\"\n :value=\"draft\"\n :placeholder=\"placeholder\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :class=\"inputClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onDraftInput\"\n @blur=\"onBlur\"\n @keydown=\"onKeydown\"\n />\n <PopoverTrigger\n aria-label=\"Choose date and time\"\n :disabled=\"isDisabled\"\n class=\"absolute right-1 top-1/2 grid h-8 w-8 -translate-y-1/2 place-items-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50\"\n >\n <CalendarClock class=\"h-4 w-4\" />\n </PopoverTrigger>\n <PopoverContent is-bare>\n <div class=\"flex items-start gap-2\">\n <Calendar\n :value=\"calendarValue\"\n :default-month=\"calendarMonth\"\n :min=\"minDate\"\n :max=\"maxDate\"\n @value-change=\"onCalendarChange\"\n />\n <TimeColumns\n :value=\"timeValue\"\n :minute-step=\"minuteStep\"\n :on-time-change=\"onColumnsChange\"\n />\n </div>\n </PopoverContent>\n </Popover>\n\n <input v-if=\"name\" type=\"hidden\" :name=\"name\" :value=\"isoValue\" />\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { Temporal } from 'temporal-polyfill';\nimport type { InputSize, InputState, InputBorder, InputRing } from '../InputStyles';\n\nexport interface TimeFieldProps {\n /** The control size. */\n size?: InputSize;\n /** The validity surface. */\n state?: InputState;\n /** The border weight. */\n border?: InputBorder;\n /** The focus-ring weight. */\n ring?: InputRing;\n\n /** The value, controlled. The `v-model` binding target. `null` is the cleared state. */\n modelValue?: Temporal.PlainTime | null;\n\n /** The value, controlled — React's spelling of `modelValue`, which wins when both are set. */\n value?: Temporal.PlainTime | null;\n\n /** The initial value when uncontrolled. */\n defaultValue?: Temporal.PlainTime | null;\n\n /**\n * Renders a bare `<input type=\"time\">` and drops the popover.\n *\n * Opt-in only. The browser owns that control's picker panel — it cannot be themed, so it\n * lands a system-chrome popup in the middle of a design-system form. Reach for it when the\n * platform picker is the point (a mobile-first form wanting the OS wheel, for instance).\n */\n native?: boolean;\n\n /** The minute interval offered in the popover. Default 5. Ignored when `native`. */\n minuteStep?: number;\n\n /** The empty-state text. Ignored when `native` — that control renders its own mask. */\n placeholder?: string;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n}\n\n/** Accepts `9`, `09`, `930`, `9:30`, `09:30` — hour alone, or hour + 2-digit minute. */\nconst TIME_TEXT = /^(\\d{1,2})(?::?(\\d{2}))?$/;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useTemplateRef, watch } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Temporal as TemporalValue } from 'temporal-polyfill';\nimport { Clock } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { Popover, PopoverContent, PopoverTrigger } from '../../overlays';\nimport { inputBaseVariants, InputState as InputStateValue } from '../InputStyles';\nimport { formatISOTime } from '../DateExtensions';\nimport TimeColumns from '../TimeColumns.vue';\n\n/**\n * Atomic time input — a typed `HH:MM` field with a design-system popover on the trailing\n * clock button. Accepts and emits `Temporal.PlainTime`.\n *\n * The popover is ours (`TimeColumns` inside `overlays/popover`), not the browser's: an\n * `<input type=\"time\">` opens an unstylable system panel, which is what `native` is for.\n */\n/* `inheritAttrs: false` so `class` folds into the wrapper's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'TimeField', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<TimeFieldProps>(), {\n native: false,\n minuteStep: 5,\n placeholder: '--:--',\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form\n control context, and Vue casts an absent `boolean` prop to `false` — which would\n shadow the context with a hard \"not disabled / not required\". */\n disabled: undefined,\n required: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: Temporal.PlainTime | null];\n /** Replaces React's `onValueChange`. Native `input` / `change` stay fallthrough listeners. */\n 'value-change': [value: Temporal.PlainTime | null];\n}>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\nconst controlled = useControlled<Temporal.PlainTime | null>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? null,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst committed = controlled.value;\n\nconst open = ref(false);\n\n/** The in-flight text — free-form while typing, reconciled with `committed` on commit. */\nconst draft = ref<string>(formatISOTime(committed.value));\n\n/* Syncs the draft when the committed value changes from the outside (or from the popover). */\nwatch(committed, (next) => {\n draft.value = formatISOTime(next);\n});\n\nfunction parseTimeText(text: string): Temporal.PlainTime | null {\n const match = TIME_TEXT.exec(text.trim());\n if (!match) return null;\n const hour = Number(match[1]);\n const minute = match[2] === undefined ? 0 : Number(match[2]);\n if (hour > 23 || minute > 59) return null;\n return new TemporalValue.PlainTime(hour, minute);\n}\n\n/** Commits the draft; an unparseable draft reverts to the committed value (ColorField parity). */\nfunction commit(): void {\n if (!draft.value.trim()) {\n controlled.setValue(null);\n draft.value = '';\n return;\n }\n const next = parseTimeText(draft.value);\n if (next) {\n controlled.setValue(next);\n draft.value = formatISOTime(next);\n } else {\n draft.value = formatISOTime(committed.value);\n }\n}\n\nfunction onDraftInput(event: Event): void {\n draft.value = (event.target as HTMLInputElement).value;\n}\n\n/* Runs after any caller-supplied `@blur` — declared after `v-bind`, so Vue chains theirs first. */\nfunction onBlur(): void {\n commit();\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented) return;\n if (event.key === 'Enter') {\n event.preventDefault();\n commit();\n }\n}\n\n/** The `native` path keeps the original `HH:MM`-string round trip. */\nfunction onNativeInput(event: Event): void {\n const raw = (event.target as HTMLInputElement).value;\n controlled.setValue(raw ? parseTimeText(raw) : null);\n}\n\nfunction onColumnsChange(next: Temporal.PlainTime): void {\n controlled.setValue(next);\n}\n\nconst displayValue = computed(() => formatISOTime(committed.value));\n\nconst finalState = computed(\n () => props.state ?? (ctx?.isInvalid ? InputStateValue.Invalid : InputStateValue.Default),\n);\n\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\nconst describedBy = computed(() => ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\n/* The caller's `class` sizes the field and the input keeps `w-full` from the variants —\n the adorned-input idiom already used by `PasswordInput` / `SearchInput`. */\nconst wrapperClass = computed(() => cn('relative', attrs.class as ClassValue));\n\nconst inputClass = computed(() =>\n cn(\n inputBaseVariants({\n size: props.size,\n state: finalState.value,\n border: props.border,\n ring: props.ring,\n }),\n !props.native && 'pr-10',\n ),\n);\n\nconst root = useTemplateRef<HTMLInputElement>('root');\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div :class=\"wrapperClass\">\n <!-- The unstylable-system-panel path, kept for callers that want the platform picker. -->\n <input\n v-if=\"native\"\n ref=\"root\"\n type=\"time\"\n :id=\"inputId\"\n :value=\"displayValue\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :class=\"inputClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onNativeInput\"\n />\n\n <Popover v-else v-model:open=\"open\" placement=\"bottom-start\" :offset=\"6\">\n <input\n ref=\"root\"\n type=\"text\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n :spellcheck=\"false\"\n :id=\"inputId\"\n :value=\"draft\"\n :placeholder=\"placeholder\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :class=\"inputClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onDraftInput\"\n @blur=\"onBlur\"\n @keydown=\"onKeydown\"\n />\n <PopoverTrigger\n aria-label=\"Choose time\"\n :disabled=\"isDisabled\"\n class=\"absolute right-1 top-1/2 grid h-8 w-8 -translate-y-1/2 place-items-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50\"\n >\n <Clock class=\"h-4 w-4\" />\n </PopoverTrigger>\n <PopoverContent is-bare>\n <TimeColumns\n :value=\"committed\"\n :minute-step=\"minuteStep\"\n :on-time-change=\"onColumnsChange\"\n />\n </PopoverContent>\n </Popover>\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { Temporal } from 'temporal-polyfill';\n\n/** A completed date range. Both ends are set; the in-progress state is internal. */\nexport interface DateRange {\n start: Temporal.PlainDate;\n end: Temporal.PlainDate;\n}\n\nexport interface RangeCalendarProps {\n /** The selected range, controlled — React's spelling, which wins when both are set. */\n value?: DateRange | null;\n\n /** The selected range, controlled. The `v-model` binding target. */\n modelValue?: DateRange | null;\n\n /** The uncontrolled initial selection. */\n defaultValue?: DateRange | null;\n\n /** The initial visible month (uncontrolled). */\n defaultMonth?: Temporal.PlainDate;\n\n /** The minimum selectable date. */\n min?: Temporal.PlainDate | null;\n\n /** The maximum selectable date. */\n max?: Temporal.PlainDate | null;\n\n /**\n * The custom disable predicate.\n *\n * Kept a PROP, not an emit: it RETURNS a value the grid reads on every cell.\n */\n isDisabled?: (date: Temporal.PlainDate) => boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Temporal as TemporalValue } from 'temporal-polyfill';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport {\n isDateDisabled,\n isInRange,\n isSameDay,\n isToday,\n startOfMonth,\n today,\n} from '../DateExtensions';\nimport MonthGrid from '../MonthGrid.vue';\nimport type { MonthGridDayProps } from '../MonthGrid.vue';\n\n/** Two-ended date-range calendar grid with hover preview. */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'RangeCalendar', inheritAttrs: false });\n\nconst props = defineProps<RangeCalendarProps>();\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [range: DateRange | null];\n /** Replaces React's `onValueChange`. */\n 'value-change': [range: DateRange | null];\n}>();\n\nconst attrs = useAttrs();\n\nconst controlled = useControlled<DateRange | null>({\n /* `??` is wrong here — `null` is a MEANINGFUL selection (\"nothing selected\"), and `??`\n would fall through it to `modelValue`. Only `undefined` means \"not controlled\". */\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? null,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst range = controlled.value;\n\n/* `today()` reads the host time zone through `Temporal.Now` — universal, not a browser\n global, so both seeds are safe on the server. */\nconst viewMonth = ref<Temporal.PlainDate>(\n startOfMonth(props.defaultMonth ?? range.value?.start ?? today()),\n);\nconst focusedDate = ref<Temporal.PlainDate>(range.value?.start ?? today());\nconst hoveredDate = ref<Temporal.PlainDate | null>(null);\nconst pendingStart = ref<Temporal.PlainDate | null>(null);\n\nfunction setViewMonth(next: Temporal.PlainDate): void {\n viewMonth.value = next;\n}\n\nfunction setFocusedDate(next: Temporal.PlainDate): void {\n focusedDate.value = next;\n}\n\nfunction isDayDisabled(d: Temporal.PlainDate): boolean {\n return isDateDisabled(d, { min: props.min, max: props.max, isDisabled: props.isDisabled });\n}\n\nfunction onDayActivate(date: Temporal.PlainDate): void {\n if (!pendingStart.value) {\n /* First click opens a pending range; the public value clears until both ends are set\n (a `DateRange` always carries a real start and end). */\n pendingStart.value = date;\n controlled.setValue(null);\n return;\n }\n const forward = TemporalValue.PlainDate.compare(pendingStart.value, date) <= 0;\n const finalStart = forward ? pendingStart.value : date;\n const finalEnd = forward ? date : pendingStart.value;\n controlled.setValue({ start: finalStart, end: finalEnd });\n pendingStart.value = null;\n}\n\nconst previewEnd = computed(() =>\n pendingStart.value ? hoveredDate.value : (range.value?.end ?? null),\n);\n\nfunction isStart(d: Temporal.PlainDate): boolean {\n return isSameDay(d, range.value?.start ?? null) || isSameDay(d, pendingStart.value);\n}\n\nfunction isEnd(d: Temporal.PlainDate): boolean {\n return isSameDay(d, range.value?.end ?? null);\n}\n\nfunction inRange(d: Temporal.PlainDate): boolean {\n return isInRange(d, pendingStart.value ?? range.value?.start, previewEnd.value);\n}\n\nfunction dayProps(date: Temporal.PlainDate): MonthGridDayProps {\n const startCell = isStart(date);\n const endCell = isEnd(date);\n const rangeCell = inRange(date) && !startCell && !endCell;\n const selected = startCell || endCell;\n return {\n 'aria-selected': selected,\n 'data-range-start': startCell ? '' : undefined,\n 'data-range-end': endCell ? '' : undefined,\n 'data-in-range': rangeCell ? '' : undefined,\n onPointerenter: () => {\n hoveredDate.value = date;\n },\n onPointerleave: () => {\n if (isSameDay(hoveredDate.value, date)) hoveredDate.value = null;\n },\n /*\n * Every painted cell has to restate BOTH `hover:bg-*` and `hover:text-*`. `MonthGrid`'s\n * base hover is `hover:bg-primary/10 hover:text-foreground`, and a `:hover` rule outranks\n * the unqualified `bg-primary` / `bg-primary-soft` here on specificity — so without an\n * explicit hover the selected ends and the in-range run lost their fill the moment the\n * pointer touched them. tailwind-merge only resolves same-group + same-variant pairs.\n *\n * The ladder: `/90` on the solid ends (the package's solid-surface hover), `/25` on the\n * in-range run — a step deeper than its `primary-soft` fill, so the hover reads against\n * the range without competing with the ends.\n */\n class: cn(\n isToday(date) && !startCell && !endCell && 'border border-border rounded-sm',\n rangeCell &&\n 'bg-primary-soft text-primary-soft-foreground hover:bg-primary/25 hover:text-primary-soft-foreground',\n startCell &&\n 'bg-primary text-primary-foreground rounded-l-sm hover:bg-primary/90 hover:text-primary-foreground',\n endCell &&\n 'bg-primary text-primary-foreground rounded-r-sm hover:bg-primary/90 hover:text-primary-foreground',\n !startCell && !endCell && !rangeCell && 'rounded-sm',\n ),\n };\n}\n\n/* Never a declared prop — a declared `'aria-label'` would arrive as `props.ariaLabel`. It is\n read off the attrs so it can be relocated onto the inner grid, as React did. */\nconst ariaLabel = computed(\n () => (attrs['aria-label'] as string | undefined) ?? 'Date range',\n);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class', 'aria-label']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() => cn(attrs.class as ClassValue));\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div ref=\"root\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <MonthGrid\n :view-month=\"viewMonth\"\n :on-view-month-change=\"setViewMonth\"\n :focused-date=\"focusedDate\"\n :on-focused-date-change=\"setFocusedDate\"\n :is-day-disabled=\"isDayDisabled\"\n :on-day-activate=\"onDayActivate\"\n :day-props=\"dayProps\"\n :aria-label=\"ariaLabel\"\n />\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { Temporal } from 'temporal-polyfill';\nimport type { SelectSize } from '../select';\nimport type { InputState } from '../InputStyles';\n\nexport interface DatePickerProps {\n /** The selected date, controlled — React's spelling, which wins when both are set. */\n value?: Temporal.PlainDate | null;\n\n /** The selected date, controlled. The `v-model` binding target. */\n modelValue?: Temporal.PlainDate | null;\n\n /** The uncontrolled initial selection. */\n defaultValue?: Temporal.PlainDate | null;\n\n /** The empty-state text on the trigger. */\n placeholder?: string;\n\n /**\n * The trigger's date formatter.\n *\n * Kept a PROP, not an emit: it RETURNS the rendered string, which an emit cannot do.\n */\n format?: (date: Temporal.PlainDate) => string;\n\n /** The minimum selectable date. */\n min?: Temporal.PlainDate | null;\n\n /** The maximum selectable date. */\n max?: Temporal.PlainDate | null;\n\n /** The custom per-day disable predicate. Also a returning prop. */\n isDisabled?: (date: Temporal.PlainDate) => boolean;\n\n /** The invalid surface override. Falls back to the surrounding form control's `isInvalid`. */\n isInvalid?: boolean;\n\n /** The hidden input name; when set, a hidden input ships the ISO value with form submission. */\n name?: string;\n\n /** The trigger size. */\n size?: SelectSize;\n\n /** The validity surface. */\n state?: InputState;\n\n /** The trigger's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Calendar as CalendarIcon } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { Popover, PopoverContent, PopoverTrigger } from '../../overlays';\nimport { selectTriggerVariants } from '../select/Select.variants';\nimport { InputState as InputStateValue } from '../InputStyles';\nimport { formatISODate, today } from '../DateExtensions';\nimport Calendar from '../calendar/Calendar.vue';\n\n/** Trigger button + popover `Calendar`. */\n/* `inheritAttrs: false` so `class` folds into the trigger's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'DatePicker', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<DatePickerProps>(), {\n placeholder: 'Pick a date',\n format: (d: Temporal.PlainDate) =>\n d.toLocaleString(undefined, { year: 'numeric', month: 'short', day: 'numeric' }),\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form control\n context, and Vue casts an absent `boolean` prop to `false` — which would shadow it. */\n isInvalid: undefined,\n disabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [date: Temporal.PlainDate | null];\n /** Replaces React's `onValueChange`. */\n 'value-change': [date: Temporal.PlainDate | null];\n}>();\n\nconst attrs = useAttrs();\n\n/* Inherits id/disabled/invalid/labelledby/describedby from a surrounding <Field>;\n standalone props win when provided, context fills the gaps (Select parity). */\nconst field = useFormControl();\n\nconst finalDisabled = computed(() => props.disabled ?? field?.isDisabled);\nconst finalInvalid = computed(() => props.isInvalid ?? field?.isInvalid);\n\nconst controlled = useControlled<Temporal.PlainDate | null>({\n /* `??` is wrong here — `null` is a MEANINGFUL selection, and `??` would fall through it\n to `modelValue`. Only `undefined` means \"not controlled\". */\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? null,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst date = controlled.value;\n\nconst open = ref(false);\n\nfunction onCalendarChange(next: Temporal.PlainDate | null): void {\n controlled.setValue(next);\n open.value = false;\n}\n\nconst triggerState = computed(\n () =>\n props.state ??\n (finalInvalid.value ? InputStateValue.Invalid : InputStateValue.Default),\n);\n\nconst displayText = computed(() =>\n date.value ? props.format(date.value) : props.placeholder,\n);\n\n/* Never a declared prop — a declared `'aria-label'` would arrive as `props.ariaLabel`. */\nconst ariaLabel = computed(() => attrs['aria-label'] as string | undefined);\n\nconst triggerId = computed(() => props.id ?? field?.id);\n/* Names the trigger from the Field label when present; an explicit aria-label always wins. */\nconst labelledBy = computed(() => (ariaLabel.value ? undefined : field?.labelledBy));\nconst describedBy = computed(() => field?.describedBy);\nconst ariaInvalid = computed(\n () => triggerState.value === InputStateValue.Invalid || undefined,\n);\n\nconst defaultMonth = computed(() => date.value ?? today());\nconst hiddenValue = computed(() => formatISODate(date.value));\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class', 'aria-label']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst triggerClass = computed(() =>\n cn(\n selectTriggerVariants({ size: props.size, state: triggerState.value }),\n attrs.class as ClassValue,\n ),\n);\n\nconst labelClass = computed(() => cn('truncate', !date.value && 'text-muted-foreground'));\n\nconst trigger = useTemplateRef<{ el: HTMLElement | null }>('trigger');\n\n/** The rendered trigger — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: computed(() => trigger.value?.el ?? null) });\n</script>\n\n<template>\n <Popover v-model:open=\"open\" placement=\"bottom-start\" :offset=\"6\">\n <PopoverTrigger\n ref=\"trigger\"\n :id=\"triggerId\"\n :disabled=\"finalDisabled\"\n :aria-invalid=\"ariaInvalid\"\n :aria-label=\"ariaLabel\"\n :aria-labelledby=\"labelledBy\"\n :aria-describedby=\"describedBy\"\n :class=\"triggerClass\"\n v-bind=\"passthroughAttrs\"\n >\n <!-- `muted-foreground` (not `subtle-foreground`): the trigger surface is muted, where\n subtle is only 4.2:1 (see index.css). -->\n <span :class=\"labelClass\">{{ displayText }}</span>\n <CalendarIcon class=\"h-4 w-4 shrink-0 text-muted-foreground\" />\n </PopoverTrigger>\n <PopoverContent is-bare>\n <Calendar\n :value=\"date\"\n :default-month=\"defaultMonth\"\n :min=\"min\"\n :max=\"max\"\n :is-disabled=\"isDisabled\"\n @value-change=\"onCalendarChange\"\n />\n </PopoverContent>\n <input v-if=\"name\" type=\"hidden\" :name=\"name\" :value=\"hiddenValue\" />\n </Popover>\n</template>\n","<script lang=\"ts\">\nimport type { Temporal } from 'temporal-polyfill';\nimport type { SelectSize } from '../select';\nimport type { InputState } from '../InputStyles';\n\nexport interface TimePickerProps {\n /** The selected time, controlled — React's spelling, which wins when both are set. */\n value?: Temporal.PlainTime | null;\n\n /** The selected time, controlled. The `v-model` binding target. */\n modelValue?: Temporal.PlainTime | null;\n\n /** The uncontrolled initial selection. */\n defaultValue?: Temporal.PlainTime | null;\n\n /** The minute interval. Default 5. */\n minuteStep?: number;\n\n /** The empty-state text on the trigger. */\n placeholder?: string;\n\n /**\n * The trigger's time formatter.\n *\n * Kept a PROP, not an emit: it RETURNS the rendered string, which an emit cannot do.\n */\n format?: (time: Temporal.PlainTime) => string;\n\n /** The invalid surface override. Falls back to the surrounding form control's `isInvalid`. */\n isInvalid?: boolean;\n\n /** The hidden input name; when set, a hidden input ships the value with form submission. */\n name?: string;\n\n /** The trigger size. */\n size?: SelectSize;\n\n /** The validity surface. */\n state?: InputState;\n\n /** The trigger's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Clock } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { Popover, PopoverContent, PopoverTrigger } from '../../overlays';\nimport { selectTriggerVariants } from '../select/Select.variants';\nimport { InputState as InputStateValue } from '../InputStyles';\nimport TimeColumns from '../TimeColumns.vue';\n\n/** Trigger button + popover hour/minute columns. */\n/* `inheritAttrs: false` so `class` folds into the trigger's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'TimePicker', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<TimePickerProps>(), {\n minuteStep: 5,\n placeholder: 'Pick a time',\n format: (t: Temporal.PlainTime) => t.toString({ smallestUnit: 'minute' }),\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form control\n context, and Vue casts an absent `boolean` prop to `false` — which would shadow it. */\n isInvalid: undefined,\n disabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [time: Temporal.PlainTime | null];\n /** Replaces React's `onValueChange`. */\n 'value-change': [time: Temporal.PlainTime | null];\n}>();\n\nconst attrs = useAttrs();\n\n/* Inherits id/disabled/invalid/labelledby/describedby from a surrounding <Field>;\n standalone props win when provided, context fills the gaps (Select parity). */\nconst field = useFormControl();\n\nconst finalDisabled = computed(() => props.disabled ?? field?.isDisabled);\nconst finalInvalid = computed(() => props.isInvalid ?? field?.isInvalid);\n\nconst controlled = useControlled<Temporal.PlainTime | null>({\n /* `??` is wrong here — `null` is a MEANINGFUL selection, and `??` would fall through it\n to `modelValue`. Only `undefined` means \"not controlled\". */\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? null,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst time = controlled.value;\n\nconst open = ref(false);\n\nconst triggerState = computed(\n () =>\n props.state ??\n (finalInvalid.value ? InputStateValue.Invalid : InputStateValue.Default),\n);\n\n/* The columns live in the shared `TimeColumns` — the same panel `TimeField` and\n `DateTimeField` open, so the three cannot drift. */\nfunction onColumnsChange(next: Temporal.PlainTime): void {\n controlled.setValue(next);\n}\n\nconst displayText = computed(() =>\n time.value ? props.format(time.value) : props.placeholder,\n);\n\n/* Never a declared prop — a declared `'aria-label'` would arrive as `props.ariaLabel`. */\nconst ariaLabel = computed(() => attrs['aria-label'] as string | undefined);\n\nconst triggerId = computed(() => props.id ?? field?.id);\n/* Names the trigger from the Field label when present; an explicit aria-label always wins. */\nconst labelledBy = computed(() => (ariaLabel.value ? undefined : field?.labelledBy));\nconst describedBy = computed(() => field?.describedBy);\nconst ariaInvalid = computed(\n () => triggerState.value === InputStateValue.Invalid || undefined,\n);\n\nconst hiddenValue = computed(() => time.value?.toString({ smallestUnit: 'minute' }) ?? '');\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class', 'aria-label']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst triggerClass = computed(() =>\n cn(\n selectTriggerVariants({ size: props.size, state: triggerState.value }),\n attrs.class as ClassValue,\n ),\n);\n\nconst labelClass = computed(() => cn('truncate', !time.value && 'text-muted-foreground'));\n\nconst trigger = useTemplateRef<{ el: HTMLElement | null }>('trigger');\n\n/** The rendered trigger — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: computed(() => trigger.value?.el ?? null) });\n</script>\n\n<template>\n <Popover v-model:open=\"open\" placement=\"bottom-start\" :offset=\"6\">\n <PopoverTrigger\n ref=\"trigger\"\n :id=\"triggerId\"\n :disabled=\"finalDisabled\"\n :aria-invalid=\"ariaInvalid\"\n :aria-label=\"ariaLabel\"\n :aria-labelledby=\"labelledBy\"\n :aria-describedby=\"describedBy\"\n :class=\"triggerClass\"\n v-bind=\"passthroughAttrs\"\n >\n <!-- `muted-foreground` (not `subtle-foreground`): the trigger surface is muted, where\n subtle is only 4.2:1 (see index.css). -->\n <span :class=\"labelClass\">{{ displayText }}</span>\n <Clock class=\"h-4 w-4 shrink-0 text-muted-foreground\" />\n </PopoverTrigger>\n <PopoverContent is-bare>\n <TimeColumns :value=\"time\" :minute-step=\"minuteStep\" :on-time-change=\"onColumnsChange\" />\n </PopoverContent>\n <input v-if=\"name && time\" type=\"hidden\" :name=\"name\" :value=\"hiddenValue\" />\n </Popover>\n</template>\n","<script lang=\"ts\">\nimport type { Temporal } from 'temporal-polyfill';\nimport type { SelectSize } from '../select';\nimport type { InputState } from '../InputStyles';\nimport type { DateRange } from '../rangeCalendar';\n\nexport interface DateRangePickerProps {\n /** The selected range, controlled — React's spelling, which wins when both are set. */\n value?: DateRange | null;\n\n /** The selected range, controlled. The `v-model` binding target. */\n modelValue?: DateRange | null;\n\n /** The uncontrolled initial selection. */\n defaultValue?: DateRange | null;\n\n /** The empty-state text on the trigger. */\n placeholder?: string;\n\n /**\n * The trigger's date formatter.\n *\n * Kept a PROP, not an emit: it RETURNS the rendered string, which an emit cannot do.\n */\n format?: (date: Temporal.PlainDate) => string;\n\n /** The minimum selectable date. */\n min?: Temporal.PlainDate | null;\n\n /** The maximum selectable date. */\n max?: Temporal.PlainDate | null;\n\n /** The custom per-day disable predicate. Also a returning prop. */\n isDisabled?: (date: Temporal.PlainDate) => boolean;\n\n /** The invalid surface override. Falls back to the surrounding form control's `isInvalid`. */\n isInvalid?: boolean;\n\n /** The hidden input name; when set, two hidden inputs (`{name}_start`, `{name}_end`) ship the ISO values. */\n name?: string;\n\n /** The trigger size. */\n size?: SelectSize;\n\n /** The validity surface. */\n state?: InputState;\n\n /** The trigger's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useTemplateRef, watch } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Calendar as CalendarIcon } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { Popover, PopoverContent, PopoverTrigger } from '../../overlays';\nimport { selectTriggerVariants } from '../select/Select.variants';\nimport { InputState as InputStateValue } from '../InputStyles';\nimport { formatISODate, today } from '../DateExtensions';\nimport RangeCalendar from '../rangeCalendar/RangeCalendar.vue';\n\n/** Trigger button + popover `RangeCalendar`, auto-closing once both ends are picked. */\n/* `inheritAttrs: false` so `class` folds into the trigger's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'DateRangePicker', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<DateRangePickerProps>(), {\n placeholder: 'Pick a range',\n format: (d: Temporal.PlainDate) =>\n d.toLocaleString(undefined, { year: 'numeric', month: 'short', day: 'numeric' }),\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form control\n context, and Vue casts an absent `boolean` prop to `false` — which would shadow it. */\n isInvalid: undefined,\n disabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [range: DateRange | null];\n /** Replaces React's `onValueChange`. */\n 'value-change': [range: DateRange | null];\n}>();\n\nconst attrs = useAttrs();\n\n/* Inherits id/disabled/invalid/labelledby/describedby from a surrounding <Field>;\n standalone props win when provided, context fills the gaps (Select parity). */\nconst field = useFormControl();\n\nconst finalDisabled = computed(() => props.disabled ?? field?.isDisabled);\nconst finalInvalid = computed(() => props.isInvalid ?? field?.isInvalid);\n\nconst controlled = useControlled<DateRange | null>({\n /* `??` is wrong here — `null` is a MEANINGFUL selection, and `??` would fall through it\n to `modelValue`. Only `undefined` means \"not controlled\". */\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? null,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst range = controlled.value;\n\nconst open = ref(false);\n\n/*\n * Auto-close when both ends are picked. NOT `immediate` — an immediate watcher runs during\n * setup, on the server too, and the React original's effect only mattered after a change.\n */\nlet wasComplete = false;\nwatch([range, open], ([nextRange, isOpen]) => {\n const complete = Boolean(nextRange?.start && nextRange?.end);\n if (complete && !wasComplete && isOpen) open.value = false;\n wasComplete = complete;\n});\n\nfunction onCalendarChange(next: DateRange | null): void {\n controlled.setValue(next);\n}\n\nconst triggerState = computed(\n () =>\n props.state ??\n (finalInvalid.value ? InputStateValue.Invalid : InputStateValue.Default),\n);\n\nconst display = computed(() => {\n const current = range.value;\n if (!current?.start) return null;\n return current.end\n ? `${props.format(current.start)} → ${props.format(current.end)}`\n : `${props.format(current.start)} → …`;\n});\n\nconst displayText = computed(() => display.value ?? props.placeholder);\n\n/* Never a declared prop — a declared `'aria-label'` would arrive as `props.ariaLabel`. */\nconst ariaLabel = computed(() => attrs['aria-label'] as string | undefined);\n\nconst triggerId = computed(() => props.id ?? field?.id);\n/* Names the trigger from the Field label when present; an explicit aria-label always wins. */\nconst labelledBy = computed(() => (ariaLabel.value ? undefined : field?.labelledBy));\nconst describedBy = computed(() => field?.describedBy);\nconst ariaInvalid = computed(\n () => triggerState.value === InputStateValue.Invalid || undefined,\n);\n\nconst defaultMonth = computed(() => range.value?.start ?? today());\nconst hiddenStart = computed(() => formatISODate(range.value?.start));\nconst hiddenEnd = computed(() => formatISODate(range.value?.end));\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class', 'aria-label']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst triggerClass = computed(() =>\n cn(\n selectTriggerVariants({ size: props.size, state: triggerState.value }),\n attrs.class as ClassValue,\n ),\n);\n\nconst labelClass = computed(() => cn('truncate', !display.value && 'text-muted-foreground'));\n\nconst trigger = useTemplateRef<{ el: HTMLElement | null }>('trigger');\n\n/** The rendered trigger — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: computed(() => trigger.value?.el ?? null) });\n</script>\n\n<template>\n <Popover v-model:open=\"open\" placement=\"bottom-start\" :offset=\"6\">\n <PopoverTrigger\n ref=\"trigger\"\n :id=\"triggerId\"\n :disabled=\"finalDisabled\"\n :aria-invalid=\"ariaInvalid\"\n :aria-label=\"ariaLabel\"\n :aria-labelledby=\"labelledBy\"\n :aria-describedby=\"describedBy\"\n :class=\"triggerClass\"\n v-bind=\"passthroughAttrs\"\n >\n <!-- `muted-foreground` (not `subtle-foreground`): the trigger surface is muted, where\n subtle is only 4.2:1 (see index.css). -->\n <span :class=\"labelClass\">{{ displayText }}</span>\n <CalendarIcon class=\"h-4 w-4 shrink-0 text-muted-foreground\" />\n </PopoverTrigger>\n <PopoverContent is-bare>\n <RangeCalendar\n :value=\"range\"\n :default-month=\"defaultMonth\"\n :min=\"min\"\n :max=\"max\"\n :is-disabled=\"isDisabled\"\n @value-change=\"onCalendarChange\"\n />\n </PopoverContent>\n <template v-if=\"name\">\n <input type=\"hidden\" :name=\"`${name}_start`\" :value=\"hiddenStart\" />\n <input type=\"hidden\" :name=\"`${name}_end`\" :value=\"hiddenEnd\" />\n </template>\n </Popover>\n</template>\n","import { tv, type VariantProps } from '../../../foundation/utils';\n\n/** Defines the outline shape of a color swatch. */\nexport const SwatchShape = {\n /** Refers to a rounded-square swatch. */\n Square: 'square',\n /** Refers to a circular swatch. */\n Circle: 'circle',\n} as const;\n\nexport type SwatchShape = (typeof SwatchShape)[keyof typeof SwatchShape];\n\n/** Defines the size step of a color swatch. */\nexport const ColorSwatchSize = {\n /** Refers to the extra-small step (h-4). */\n Xs: 'xs',\n /** Refers to the small step (h-5). */\n Sm: 'sm',\n /** Refers to the medium (default) step (h-6). */\n Md: 'md',\n /** Refers to the large step (h-9). */\n Lg: 'lg',\n} as const;\n\nexport type ColorSwatchSize = (typeof ColorSwatchSize)[keyof typeof ColorSwatchSize];\n\nexport const colorSwatchVariants = tv({\n base: 'inline-block shrink-0 border border-border bg-[image:linear-gradient(45deg,_#ddd_25%,_transparent_25%),_linear-gradient(-45deg,_#ddd_25%,_transparent_25%),_linear-gradient(45deg,_transparent_75%,_#ddd_75%),_linear-gradient(-45deg,_transparent_75%,_#ddd_75%)] bg-[length:8px_8px] bg-[position:0_0,_0_4px,_4px_-4px,_-4px_0px]',\n variants: {\n size: {\n xs: 'h-4 w-4',\n sm: 'h-5 w-5',\n md: 'h-6 w-6',\n lg: 'h-9 w-9',\n },\n shape: {\n square: 'rounded-sm',\n circle: 'rounded-full',\n },\n interactive: {\n true: 'cursor-pointer transition-shadow focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 hover:shadow-sm',\n false: '',\n },\n isSelected: {\n true: 'ring-2 ring-ring ring-offset-1',\n false: '',\n },\n isDisabled: {\n true: 'cursor-not-allowed opacity-50',\n false: '',\n },\n },\n defaultVariants: {\n size: 'md',\n shape: 'square',\n interactive: false,\n isSelected: false,\n isDisabled: false,\n },\n});\n\nexport type ColorSwatchVariants = VariantProps<typeof colorSwatchVariants>;\n\n/* Compile-time lock: enum values ≡ tv axis keys (drift = type error). */\ntype AssertExact<A, B> = [A] extends [B] ? ([B] extends [A] ? true : never) : never;\nconst _assertColorSwatchSize: AssertExact<\n ColorSwatchSize, NonNullable<VariantProps<typeof colorSwatchVariants>['size']>\n> = true;\nconst _assertSwatchShape: AssertExact<\n SwatchShape, NonNullable<VariantProps<typeof colorSwatchVariants>['shape']>\n> = true;\nvoid _assertColorSwatchSize;\nvoid _assertSwatchShape;\n","<script lang=\"ts\">\nimport type { ColorSwatchSize, SwatchShape } from './ColorSwatch.variants';\n\n/**\n * Defines props for a `ColorSwatch`.\n *\n * React declared a discriminated union — `onClick` present selected the\n * `<button>` half and its `ButtonHTMLAttributes`, absent selected the `<div>`\n * half. The union collapses here: every native attribute is a fallthrough attr\n * and lands on whichever element renders, so only the styling axes remain\n * declared.\n *\n * `onClick` is deliberately NOT declared — see the note in `<script setup>`.\n */\nexport interface ColorSwatchProps {\n /** Any CSS color string. Default `#000000`. */\n color?: string;\n /** The swatch size step. */\n size?: ColorSwatchSize;\n /** The swatch outline shape. */\n shape?: SwatchShape;\n /** The selected state — draws the selection ring. */\n isSelected?: boolean;\n /** The disabled state. Also sets `disabled` on the interactive (`<button>`) form. */\n isDisabled?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef, type StyleValue } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { colorSwatchVariants } from './ColorSwatch.variants';\n\n/**\n * Color preview chip. Renders as a `<button>` if a click listener is provided,\n * otherwise a non-interactive `<div>`. The transparent checkerboard backdrop\n * ensures partial-alpha colors render correctly.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'ColorSwatch', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ColorSwatchProps>(), {\n color: '#000000',\n /* Explicit `undefined` defaults: Vue casts an absent `boolean` prop to `false`, which would\n pin the tv axis to its explicit-false branch instead of letting `defaultVariants` apply. */\n isSelected: undefined,\n isDisabled: undefined,\n});\n\nconst attrs = useAttrs();\n\n/*\n * React switched the rendered element on `onClick`'s presence. `onClick` stays a FALLTHROUGH\n * ATTR here rather than a declared prop or an emit:\n * - an emit would be stripped out of `useAttrs()`, erasing the discriminator entirely;\n * - a declared prop would receive the merge ARRAY that `Primitive`'s `asChild` builds when\n * `ColorPicker` chains the popover's toggle onto this swatch, and an array is not callable.\n * As an attr it stays detectable AND Vue invokes the whole chained array natively.\n */\nconst isInteractive = computed(() => Boolean(attrs.onClick));\n\n/* `style` is owned so the inset box-shadow can be layered after the caller's declarations,\n the order React's `{ ...style, boxShadow }` spread gave it. */\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class', 'style']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n colorSwatchVariants({\n size: props.size,\n shape: props.shape,\n interactive: isInteractive.value,\n isSelected: props.isSelected,\n isDisabled: props.isDisabled,\n }),\n attrs.class as ClassValue,\n ),\n);\n\n/* Layers the color on top of the checkerboard via an inset box-shadow — keeps the variant\n class's `bg-[image:…]` checkerboard visible behind a partial-alpha color. */\nconst rootStyle = computed<StyleValue>(() => [\n attrs.style as StyleValue,\n { boxShadow: `inset 0 0 0 100px ${props.color}` },\n]);\n\nconst root = useTemplateRef<HTMLElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <button\n v-if=\"isInteractive\"\n ref=\"root\"\n type=\"button\"\n :disabled=\"isDisabled\"\n :class=\"rootClass\"\n :style=\"rootStyle\"\n v-bind=\"passthroughAttrs\"\n />\n <div v-else ref=\"root\" :class=\"rootClass\" :style=\"rootStyle\" v-bind=\"passthroughAttrs\" />\n</template>\n","// Color parsing + conversion helpers for ColorPicker, ColorArea, ColorWheel,\n// ColorSlider, ColorSwatch, ColorField. Co-located in `forms/` so imports\n// stay within-domain.\n//\n// Canonical representation: HSV (hue 0–360, saturation 0–1, value 0–1) plus\n// alpha 0–1. HSV picks the cleanest geometry for picker UIs (saturation/value\n// square, hue ring). External interface is hex strings (#RRGGBB or #RRGGBBAA).\n\nexport interface RGB {\n r: number; // 0–255\n g: number; // 0–255\n b: number; // 0–255\n a?: number; // 0–1 (default 1)\n}\n\nexport interface HSV {\n h: number; // 0–360\n s: number; // 0–1\n v: number; // 0–1\n a?: number; // 0–1\n}\n\nexport interface HSL {\n h: number; // 0–360\n s: number; // 0–1\n l: number; // 0–1\n a?: number; // 0–1\n}\n\nexport function clamp01(n: number): number {\n return Math.max(0, Math.min(1, n));\n}\n\nexport function clampHue(h: number): number {\n let v = h % 360;\n if (v < 0) v += 360;\n return v;\n}\n\nexport function clampByte(n: number): number {\n return Math.max(0, Math.min(255, Math.round(n)));\n}\n\n// ───────── hex ↔ rgb ─────────\n\n/** Parse \"#RGB\", \"#RGBA\", \"#RRGGBB\", or \"#RRGGBBAA\". Returns null on invalid. */\nexport function parseHex(input: string | null | undefined): RGB | null {\n if (!input) return null;\n const s = input.trim().replace(/^#/, '');\n let m: string | null = null;\n if (/^[0-9a-fA-F]{3}$/.test(s)) {\n m = s\n .split('')\n .map((c) => c + c)\n .join('');\n } else if (/^[0-9a-fA-F]{4}$/.test(s)) {\n m = s\n .split('')\n .map((c) => c + c)\n .join('');\n } else if (/^[0-9a-fA-F]{6}$/.test(s) || /^[0-9a-fA-F]{8}$/.test(s)) {\n m = s;\n }\n if (!m) return null;\n const r = parseInt(m.slice(0, 2), 16);\n const g = parseInt(m.slice(2, 4), 16);\n const b = parseInt(m.slice(4, 6), 16);\n const a = m.length === 8 ? parseInt(m.slice(6, 8), 16) / 255 : 1;\n return { r, g, b, a };\n}\n\n/** Format RGB → \"#RRGGBB\" (or \"#RRGGBBAA\" if alpha < 1). */\nexport function formatHex(rgb: RGB | null | undefined, options?: { withAlpha?: boolean }): string {\n if (!rgb) return '';\n const r = clampByte(rgb.r).toString(16).padStart(2, '0');\n const g = clampByte(rgb.g).toString(16).padStart(2, '0');\n const b = clampByte(rgb.b).toString(16).padStart(2, '0');\n const includeAlpha = options?.withAlpha ?? (rgb.a !== undefined && rgb.a < 1);\n if (includeAlpha) {\n const a = clampByte((rgb.a ?? 1) * 255)\n .toString(16)\n .padStart(2, '0');\n return `#${r}${g}${b}${a}`;\n }\n return `#${r}${g}${b}`;\n}\n\n// ───────── rgb ↔ hsv ─────────\n\nexport function rgbToHsv({ r, g, b, a = 1 }: RGB): HSV {\n const rn = r / 255;\n const gn = g / 255;\n const bn = b / 255;\n const max = Math.max(rn, gn, bn);\n const min = Math.min(rn, gn, bn);\n const d = max - min;\n let h = 0;\n if (d !== 0) {\n if (max === rn) h = ((gn - bn) / d) % 6;\n else if (max === gn) h = (bn - rn) / d + 2;\n else h = (rn - gn) / d + 4;\n h *= 60;\n if (h < 0) h += 360;\n }\n const s = max === 0 ? 0 : d / max;\n const v = max;\n return { h, s, v, a };\n}\n\nexport function hsvToRgb({ h, s, v, a = 1 }: HSV): RGB {\n const c = v * s;\n const hh = clampHue(h) / 60;\n const x = c * (1 - Math.abs((hh % 2) - 1));\n let r1 = 0;\n let g1 = 0;\n let b1 = 0;\n if (hh >= 0 && hh < 1) [r1, g1, b1] = [c, x, 0];\n else if (hh < 2) [r1, g1, b1] = [x, c, 0];\n else if (hh < 3) [r1, g1, b1] = [0, c, x];\n else if (hh < 4) [r1, g1, b1] = [0, x, c];\n else if (hh < 5) [r1, g1, b1] = [x, 0, c];\n else [r1, g1, b1] = [c, 0, x];\n const m = v - c;\n return {\n r: Math.round((r1 + m) * 255),\n g: Math.round((g1 + m) * 255),\n b: Math.round((b1 + m) * 255),\n a,\n };\n}\n\n// ───────── rgb ↔ hsl ─────────\n\nexport function rgbToHsl({ r, g, b, a = 1 }: RGB): HSL {\n const rn = r / 255;\n const gn = g / 255;\n const bn = b / 255;\n const max = Math.max(rn, gn, bn);\n const min = Math.min(rn, gn, bn);\n const d = max - min;\n let h = 0;\n let s = 0;\n const l = (max + min) / 2;\n if (d !== 0) {\n s = d / (1 - Math.abs(2 * l - 1));\n if (max === rn) h = ((gn - bn) / d) % 6;\n else if (max === gn) h = (bn - rn) / d + 2;\n else h = (rn - gn) / d + 4;\n h *= 60;\n if (h < 0) h += 360;\n }\n return { h, s, l, a };\n}\n\nexport function hslToRgb({ h, s, l, a = 1 }: HSL): RGB {\n const c = (1 - Math.abs(2 * l - 1)) * s;\n const hh = clampHue(h) / 60;\n const x = c * (1 - Math.abs((hh % 2) - 1));\n let r1 = 0;\n let g1 = 0;\n let b1 = 0;\n if (hh >= 0 && hh < 1) [r1, g1, b1] = [c, x, 0];\n else if (hh < 2) [r1, g1, b1] = [x, c, 0];\n else if (hh < 3) [r1, g1, b1] = [0, c, x];\n else if (hh < 4) [r1, g1, b1] = [0, x, c];\n else if (hh < 5) [r1, g1, b1] = [x, 0, c];\n else [r1, g1, b1] = [c, 0, x];\n const m = l - c / 2;\n return {\n r: Math.round((r1 + m) * 255),\n g: Math.round((g1 + m) * 255),\n b: Math.round((b1 + m) * 255),\n a,\n };\n}\n\n// ───────── hex ↔ hsv (most-used composite) ─────────\n\nexport function parseColorToHsv(input: string | null | undefined): HSV | null {\n const rgb = parseHex(input);\n if (!rgb) return null;\n return rgbToHsv(rgb);\n}\n\nexport function hsvToHex(hsv: HSV, options?: { withAlpha?: boolean }): string {\n return formatHex(hsvToRgb(hsv), options);\n}\n\n// ───────── format helpers ─────────\n\nexport function formatRgbString({ r, g, b, a = 1 }: RGB): string {\n if (a < 1) return `rgba(${clampByte(r)}, ${clampByte(g)}, ${clampByte(b)}, ${a.toFixed(2)})`;\n return `rgb(${clampByte(r)}, ${clampByte(g)}, ${clampByte(b)})`;\n}\n\nexport function formatHslString({ h, s, l, a = 1 }: HSL): string {\n const hh = Math.round(clampHue(h));\n const ss = Math.round(s * 100);\n const ll = Math.round(l * 100);\n if (a < 1) return `hsla(${hh}, ${ss}%, ${ll}%, ${a.toFixed(2)})`;\n return `hsl(${hh}, ${ss}%, ${ll}%)`;\n}\n","<script lang=\"ts\">\nimport type { InputSize, InputState, InputBorder, InputRing } from '../InputStyles';\nimport type { SwatchShape } from '../colorSwatch';\n\nexport interface ColorFieldProps {\n /** The control size. */\n size?: InputSize;\n /** The validity surface. */\n state?: InputState;\n /** The border weight. */\n border?: InputBorder;\n /** The focus-ring weight. */\n ring?: InputRing;\n\n /** The committed hex, controlled — React's spelling, which wins when both are set. */\n value?: string | null;\n\n /** The committed hex, controlled. The `v-model` binding target. */\n modelValue?: string | null;\n\n /** The initial hex when uncontrolled. */\n defaultValue?: string | null;\n\n /** The swatch outline shape shown inside the field. */\n swatchShape?: SwatchShape;\n\n /** Whether a committed hex keeps its alpha channel (`#RRGGBBAA`). */\n hasAlpha?: boolean;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useTemplateRef, watch } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { inputBaseVariants, InputState as InputStateValue } from '../InputStyles';\nimport { formatHex, parseHex } from '../ColorExtensions';\nimport ColorSwatch from '../colorSwatch/ColorSwatch.vue';\nimport { SwatchShape as SwatchShapeValue } from '../colorSwatch';\n\n/**\n * Hex text field with a live swatch adornment. The draft text is free-form while\n * typing and only commits on blur / Enter — an unparseable draft reverts.\n */\n/* `inheritAttrs: false` so `class` folds into the input's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'ColorField', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ColorFieldProps>(), {\n swatchShape: SwatchShapeValue.Square,\n hasAlpha: false,\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form control\n context, and Vue casts an absent `boolean` prop to `false` — which would shadow the\n context with a hard \"not disabled / not required\". */\n disabled: undefined,\n required: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string | null];\n /** Replaces React's `onValueChange`. Native `input` / `change` / `blur` / `keydown` stay fallthrough. */\n 'value-change': [value: string | null];\n}>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useFormControl();\n\nconst controlled = useControlled<string | null>({\n /* `??` is wrong here — `null` is a MEANINGFUL committed value (\"no color\"), and `??` would\n fall through it to `modelValue`. Only `undefined` means \"not controlled\". */\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? null,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst committed = controlled.value;\n\n/** The in-flight text — free-form while typing, reconciled with `committed` on commit. */\nconst draft = ref<string>(committed.value ?? '');\n\n/* Syncs the draft when the committed value changes from the outside. */\nwatch(committed, (next) => {\n draft.value = next ?? '';\n});\n\nfunction commitHex(text: string, hasAlpha: boolean): string | null {\n const normalised = text.startsWith('#') ? text : `#${text}`;\n const rgb = parseHex(normalised);\n if (!rgb) return null;\n return formatHex(rgb, { withAlpha: hasAlpha });\n}\n\nfunction commit(): void {\n if (!draft.value) {\n controlled.setValue(null);\n return;\n }\n const next = commitHex(draft.value, props.hasAlpha);\n if (next) {\n controlled.setValue(next);\n draft.value = next;\n } else {\n /* Invalid — revert. */\n draft.value = committed.value ?? '';\n }\n}\n\nfunction onInput(event: Event): void {\n draft.value = (event.target as HTMLInputElement).value;\n}\n\n/* Runs after any caller-supplied `@blur` (declared after `v-bind`), exactly as React's\n `onBlur?.(e)` ran before `commit()`. React did not gate this one on `defaultPrevented`. */\nfunction onBlur(): void {\n commit();\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented) return;\n if (event.key === 'Enter') {\n event.preventDefault();\n commit();\n }\n}\n\nconst swatchColor = computed(() => committed.value ?? '#00000000');\n\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\nconst describedBy = computed(() => ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst inputClass = computed(() =>\n cn(\n inputBaseVariants({\n size: props.size,\n state:\n props.state ?? (ctx?.isInvalid ? InputStateValue.Invalid : InputStateValue.Default),\n border: props.border,\n ring: props.ring,\n }),\n 'pl-9 font-mono uppercase',\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLInputElement>('root');\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div class=\"relative inline-flex w-full items-stretch\">\n <span class=\"pointer-events-none absolute inset-y-0 left-2 flex items-center\">\n <ColorSwatch :color=\"swatchColor\" size=\"sm\" :shape=\"swatchShape\" />\n </span>\n <input\n ref=\"root\"\n type=\"text\"\n :id=\"inputId\"\n :disabled=\"isDisabled\"\n :required=\"isRequired\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :spellcheck=\"false\"\n autocapitalize=\"none\"\n autocorrect=\"off\"\n :value=\"draft\"\n :class=\"inputClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onInput\"\n @blur=\"onBlur\"\n @keydown=\"onKeydown\"\n />\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { CSSProperties } from 'vue';\nimport type { HSV } from '../ColorExtensions';\n\n/** Defines which HSV/alpha channel a color slider drives. */\nexport const ColorChannel = {\n /** Refers to the hue channel (0–360°). */\n Hue: 'hue',\n /** Refers to the saturation channel (0–1). */\n Saturation: 'saturation',\n /** Refers to the value/brightness channel (0–1). */\n Value: 'value',\n /** Refers to the alpha/opacity channel (0–1). */\n Alpha: 'alpha',\n} as const;\n\nexport type ColorChannel = (typeof ColorChannel)[keyof typeof ColorChannel];\n\nexport interface ColorSliderProps {\n /** The channel the track drives. */\n channel?: ColorChannel;\n\n /** The channel value, controlled — React's spelling, which wins when both are set. */\n value?: number;\n\n /** The channel value, controlled. The `v-model` binding target. */\n modelValue?: number;\n\n /** The initial value when uncontrolled. */\n defaultValue?: number;\n\n /** The surrounding color the non-hue gradients are built from. */\n color?: HSV;\n\n /** The arrow-key increment. Defaults to `1` for hue, `0.01` otherwise. */\n step?: number;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n isDisabled?: boolean;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n}\n\nexport function channelMax(channel: ColorChannel): number {\n return channel === ColorChannel.Hue ? 360 : 1;\n}\n\nexport function defaultStep(channel: ColorChannel): number {\n return channel === ColorChannel.Hue ? 1 : 0.01;\n}\n\nconst CHECKERBOARD: CSSProperties = {\n backgroundImage:\n 'linear-gradient(45deg, #ddd 25%, transparent 25%), linear-gradient(-45deg, #ddd 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ddd 75%), linear-gradient(-45deg, transparent 75%, #ddd 75%)',\n backgroundSize: '8px 8px',\n backgroundPosition: '0 0, 0 4px, 4px -4px, -4px 0px',\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef, type StyleValue } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { clamp01, clampHue, hsvToHex } from '../ColorExtensions';\n\n/**\n * Single-channel color track (hue / saturation / value / alpha). Pointer-draggable\n * and fully keyboard operable as an ARIA `slider`.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'ColorSlider', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ColorSliderProps>(), {\n channel: ColorChannel.Hue,\n /* Explicit `undefined` default: the flag falls back to the form control context, and Vue\n casts an absent `boolean` prop to `false` — which would shadow the context. */\n isDisabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: number];\n /** Replaces React's `onValueChange`. Native `keydown` / pointer events stay fallthrough. */\n 'value-change': [value: number];\n}>();\n\nconst attrs = useAttrs();\n\nconst max = computed(() => channelMax(props.channel));\nconst stepValue = computed(() => props.step ?? defaultStep(props.channel));\n\nconst controlled = useControlled<number>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? 0,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst val = controlled.value;\n\n/* Inherits id/disabled/invalid/labelling from a surrounding <Field>; explicit props win. */\nconst ctx = useFormControl();\nconst disabled = computed(() => props.isDisabled ?? ctx?.isDisabled ?? false);\n\n/* Never a declared prop — a declared `'aria-label'` would arrive as `props.ariaLabel` and\n stop reaching the DOM. It is read off the attrs so it can be relocated onto the track. */\nconst ariaLabel = computed(() => attrs['aria-label'] as string | undefined);\n\n/* Names the track from the Field label when present; an explicit aria-label always wins. */\nconst labelledBy = computed(() => (!ariaLabel.value ? ctx?.labelledBy : undefined));\n\nconst track = useTemplateRef<HTMLDivElement>('track');\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/* `getBoundingClientRect` is safe unguarded — pointer handlers never run on the server. */\nfunction updateFromClientX(clientX: number): void {\n const node = track.value;\n if (!node) return;\n const rect = node.getBoundingClientRect();\n const ratio = clamp01((clientX - rect.left) / rect.width);\n const next = ratio * max.value;\n /* next is already within [0, max] — clampHue would wrap a full-right drag (360) back to 0. */\n controlled.setValue(props.channel === ColorChannel.Hue ? next : clamp01(next));\n}\n\nfunction onPointerdown(event: PointerEvent): void {\n if (event.defaultPrevented) return;\n if (disabled.value) return;\n event.preventDefault();\n (event.target as Element).setPointerCapture?.(event.pointerId);\n updateFromClientX(event.clientX);\n}\n\nfunction onPointermove(event: PointerEvent): void {\n if (event.defaultPrevented) return;\n if (disabled.value) return;\n if (event.buttons !== 1) return;\n updateFromClientX(event.clientX);\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented) return;\n if (disabled.value) return;\n let next = val.value;\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowUp':\n next = val.value + stepValue.value;\n break;\n case 'ArrowLeft':\n case 'ArrowDown':\n next = val.value - stepValue.value;\n break;\n case 'PageUp':\n next = val.value + stepValue.value * 10;\n break;\n case 'PageDown':\n next = val.value - stepValue.value * 10;\n break;\n case 'Home':\n case 'End':\n /* Commit the extreme directly — clampHue(360) wraps to 0, which would make End act like Home. */\n event.preventDefault();\n controlled.setValue(event.key === 'Home' ? 0 : max.value);\n return;\n default:\n return;\n }\n event.preventDefault();\n controlled.setValue(props.channel === ColorChannel.Hue ? clampHue(next) : clamp01(next));\n}\n\nfunction buildGradient(channel: ColorChannel, color: HSV | undefined): string {\n if (channel === ColorChannel.Hue) {\n return 'linear-gradient(to right, hsl(0,100%,50%), hsl(60,100%,50%), hsl(120,100%,50%), hsl(180,100%,50%), hsl(240,100%,50%), hsl(300,100%,50%), hsl(360,100%,50%))';\n }\n const base: HSV = color ?? { h: 0, s: 1, v: 1 };\n if (channel === ColorChannel.Saturation) {\n const start = hsvToHex({ h: base.h, s: 0, v: base.v });\n const end = hsvToHex({ h: base.h, s: 1, v: base.v });\n return `linear-gradient(to right, ${start}, ${end})`;\n }\n if (channel === ColorChannel.Value) {\n const end = hsvToHex({ h: base.h, s: base.s, v: 1 });\n return `linear-gradient(to right, #000000, ${end})`;\n }\n // alpha\n const opaque = hsvToHex({ h: base.h, s: base.s, v: base.v });\n return `linear-gradient(to right, transparent, ${opaque})`;\n}\n\nconst isAlpha = computed(() => props.channel === ColorChannel.Alpha);\n\n/* val >= 360 pins the thumb to the right edge — clampHue would wrap the committed max back to 0. */\nconst ratio = computed(() =>\n props.channel === ColorChannel.Hue\n ? val.value >= 360\n ? 1\n : clampHue(val.value) / 360\n : clamp01(val.value),\n);\n\nconst trackStyle = computed<StyleValue>(() => ({\n backgroundImage: buildGradient(props.channel, props.color),\n ...(isAlpha.value ? { backgroundColor: 'transparent' } : null),\n}));\n\nconst thumbStyle = computed<StyleValue>(() => ({ left: `${ratio.value * 100}%` }));\n\nconst checkerboardStyle = CHECKERBOARD as StyleValue;\n\nconst controlId = computed(() => props.id ?? ctx?.id);\nconst finalAriaLabel = computed(\n () => ariaLabel.value ?? (labelledBy.value ? undefined : `${props.channel} slider`),\n);\nconst valueNow = computed(() => Math.round(val.value * 100) / 100);\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\nconst describedBy = computed(() => ctx?.describedBy);\n\n/* `id` and `aria-label` belong on the inner track (the ARIA slider), not the wrapper — the\n React original placed them there too, so both are kept off the passthrough set. */\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class', 'aria-label']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn('relative inline-flex w-full select-none items-center', attrs.class as ClassValue),\n);\n\nconst innerClass = computed(() =>\n cn(\n 'relative h-3 w-full rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',\n disabled.value && 'pointer-events-none opacity-50',\n ),\n);\n\n/** The rendered wrapper — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div ref=\"root\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <div v-if=\"isAlpha\" aria-hidden=\"true\" class=\"absolute inset-0 rounded-full\" :style=\"checkerboardStyle\" />\n <div\n ref=\"track\"\n role=\"slider\"\n :id=\"controlId\"\n :tabindex=\"disabled ? -1 : 0\"\n :aria-label=\"finalAriaLabel\"\n :aria-labelledby=\"labelledBy\"\n :aria-valuemin=\"0\"\n :aria-valuemax=\"max\"\n :aria-valuenow=\"valueNow\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :aria-disabled=\"disabled || undefined\"\n aria-orientation=\"horizontal\"\n :data-disabled=\"disabled ? '' : undefined\"\n :style=\"trackStyle\"\n :class=\"innerClass\"\n @pointerdown=\"onPointerdown\"\n @pointermove=\"onPointermove\"\n @keydown=\"onKeydown\"\n >\n <div\n aria-hidden=\"true\"\n class=\"absolute top-1/2 h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white bg-transparent shadow-md ring-1 ring-black/20\"\n :style=\"thumbStyle\"\n />\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\n/** The saturation / value pair a `ColorArea` commits. */\nexport interface ColorAreaChange {\n saturation: number;\n value: number;\n}\n\nexport interface ColorAreaProps {\n /** The hue the square is tinted with (0–360). */\n hue?: number;\n\n /** The saturation, controlled (0–1). The `v-model:saturation` binding target. */\n saturation?: number;\n\n /** The initial saturation when uncontrolled. */\n defaultSaturation?: number;\n\n /** The brightness/value, controlled (0–1). The `v-model:value` binding target. */\n value?: number;\n\n /** The initial value when uncontrolled. */\n defaultValue?: number;\n\n /** The arrow-key increment. `PageUp`/`PageDown` move ten steps. */\n step?: number;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n isDisabled?: boolean;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef, type StyleValue } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { clamp01, hsvToHex } from '../ColorExtensions';\n\n/**\n * Two-axis saturation / value square. Pointer-draggable and fully keyboard\n * operable as an ARIA `slider`.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'ColorArea', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ColorAreaProps>(), {\n hue: 0,\n step: 0.01,\n /* Explicit `undefined` default: the flag falls back to the form control context, and Vue\n casts an absent `boolean` prop to `false` — which would shadow the context. */\n isDisabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model:saturation` half. */\n 'update:saturation': [value: number];\n /** The `v-model:value` half. */\n 'update:value': [value: number];\n /**\n * Replaces React's `onValueChange`. Carries BOTH axes in one payload, as the React\n * original did — the two `update:*` emits above are the Vue `v-model` idiom beside it.\n */\n 'value-change': [next: ColorAreaChange];\n}>();\n\nconst attrs = useAttrs();\n\nconst saturationControlled = useControlled<number>({\n controlled: () => props.saturation,\n default: () => props.defaultSaturation ?? 1,\n});\nconst valueControlled = useControlled<number>({\n controlled: () => props.value,\n default: () => props.defaultValue ?? 1,\n});\n\nconst s = saturationControlled.value;\nconst v = valueControlled.value;\n\n/* Inherits id/disabled/invalid/labelling from a surrounding <Field>; explicit props win. */\nconst ctx = useFormControl();\nconst disabled = computed(() => props.isDisabled ?? ctx?.isDisabled ?? false);\n\n/* Never a declared prop — a declared `'aria-label'` would arrive as `props.ariaLabel` and\n stop reaching the DOM. It is read off the attrs so it can be relocated onto the track. */\nconst ariaLabel = computed(() => attrs['aria-label'] as string | undefined);\n\n/* Names the area from the Field label when present; an explicit aria-label always wins. */\nconst labelledBy = computed(() => (!ariaLabel.value ? ctx?.labelledBy : undefined));\n\nconst track = useTemplateRef<HTMLDivElement>('track');\n\nfunction commit(nextS: number, nextV: number): void {\n const cs = clamp01(nextS);\n const cv = clamp01(nextV);\n saturationControlled.setValue(cs);\n valueControlled.setValue(cv);\n emit('update:saturation', cs);\n emit('update:value', cv);\n emit('value-change', { saturation: cs, value: cv });\n}\n\n/* `getBoundingClientRect` is safe unguarded — pointer handlers never run on the server. */\nfunction updateFromClient(clientX: number, clientY: number): void {\n const node = track.value;\n if (!node) return;\n const rect = node.getBoundingClientRect();\n const xRatio = clamp01((clientX - rect.left) / rect.width);\n const yRatio = clamp01((clientY - rect.top) / rect.height);\n commit(xRatio, 1 - yRatio);\n}\n\nfunction onPointerdown(event: PointerEvent): void {\n if (event.defaultPrevented) return;\n if (disabled.value) return;\n event.preventDefault();\n (event.target as Element).setPointerCapture?.(event.pointerId);\n updateFromClient(event.clientX, event.clientY);\n}\n\nfunction onPointermove(event: PointerEvent): void {\n if (event.defaultPrevented) return;\n if (disabled.value || event.buttons !== 1) return;\n updateFromClient(event.clientX, event.clientY);\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented) return;\n if (disabled.value) return;\n const big = props.step * 10;\n let nextS = s.value;\n let nextV = v.value;\n switch (event.key) {\n case 'ArrowRight':\n nextS = s.value + props.step;\n break;\n case 'ArrowLeft':\n nextS = s.value - props.step;\n break;\n case 'ArrowUp':\n nextV = v.value + props.step;\n break;\n case 'ArrowDown':\n nextV = v.value - props.step;\n break;\n case 'PageUp':\n nextV = v.value + big;\n break;\n case 'PageDown':\n nextV = v.value - big;\n break;\n case 'Home':\n nextS = 0;\n nextV = 1;\n break;\n case 'End':\n nextS = 1;\n nextV = 0;\n break;\n default:\n return;\n }\n event.preventDefault();\n commit(nextS, nextV);\n}\n\nconst trackStyle = computed<StyleValue>(() => [\n attrs.style as StyleValue,\n {\n backgroundImage:\n 'linear-gradient(to bottom, transparent, #000), linear-gradient(to right, #fff, transparent)',\n backgroundColor: `hsl(${props.hue}, 100%, 50%)`,\n },\n]);\n\nconst thumbStyle = computed<StyleValue>(() => ({\n left: `${s.value * 100}%`,\n top: `${(1 - v.value) * 100}%`,\n backgroundColor: hsvToHex({ h: props.hue, s: s.value, v: v.value }),\n}));\n\nconst controlId = computed(() => props.id ?? ctx?.id);\nconst finalAriaLabel = computed(\n () => ariaLabel.value ?? (labelledBy.value ? undefined : 'Saturation and value'),\n);\nconst valueText = computed(\n () => `saturation ${(s.value * 100).toFixed(0)}%, value ${(v.value * 100).toFixed(0)}%`,\n);\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\nconst describedBy = computed(() => ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class', 'style', 'aria-label']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'relative aspect-square w-full select-none rounded-md border border-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',\n disabled.value && 'pointer-events-none opacity-50',\n attrs.class as ClassValue,\n ),\n);\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: track });\n</script>\n\n<template>\n <div\n ref=\"track\"\n role=\"slider\"\n :id=\"controlId\"\n :tabindex=\"disabled ? -1 : 0\"\n :aria-label=\"finalAriaLabel\"\n :aria-labelledby=\"labelledBy\"\n :aria-valuetext=\"valueText\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :aria-disabled=\"disabled || undefined\"\n :data-disabled=\"disabled ? '' : undefined\"\n :style=\"trackStyle\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @pointerdown=\"onPointerdown\"\n @pointermove=\"onPointermove\"\n @keydown=\"onKeydown\"\n >\n <div\n aria-hidden=\"true\"\n :style=\"thumbStyle\"\n class=\"absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-md ring-1 ring-black/20\"\n />\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface ColorWheelProps {\n /** The hue, controlled — React's spelling, which wins when both are set. */\n value?: number;\n\n /** The hue, controlled. The `v-model` binding target. */\n modelValue?: number;\n\n /** The initial hue when uncontrolled. */\n defaultValue?: number;\n\n /** The outer diameter in pixels. Default 200. */\n size?: number;\n\n /** The ring thickness in pixels. Default 30. */\n thickness?: number;\n\n /** The arrow-key increment. */\n step?: number;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n isDisabled?: boolean;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n}\n\nfunction angleFromCenter(clientX: number, clientY: number, rect: DOMRect): number {\n const cx = rect.left + rect.width / 2;\n const cy = rect.top + rect.height / 2;\n const dx = clientX - cx;\n const dy = clientY - cy;\n const angle = (Math.atan2(dx, -dy) * 180) / Math.PI;\n return (angle + 360) % 360;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef, type StyleValue } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { clampHue } from '../ColorExtensions';\n\n/** Circular hue ring. Pointer-draggable and fully keyboard operable as an ARIA `slider`. */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'ColorWheel', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ColorWheelProps>(), {\n size: 200,\n thickness: 30,\n step: 1,\n /* Explicit `undefined` default: the flag falls back to the form control context, and Vue\n casts an absent `boolean` prop to `false` — which would shadow it. */\n isDisabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [hue: number];\n /** Replaces React's `onValueChange`. */\n 'value-change': [hue: number];\n}>();\n\nconst attrs = useAttrs();\n\nconst controlled = useControlled<number>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? 0,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst hue = controlled.value;\n\n/* Inherits id/disabled/invalid/labelling from a surrounding <Field>; explicit props win. */\nconst ctx = useFormControl();\nconst disabled = computed(() => props.isDisabled ?? ctx?.isDisabled ?? false);\n\n/* Never a declared prop — a declared `'aria-label'` would arrive as `props.ariaLabel` and\n stop reaching the DOM. It is read off the attrs so it can be relocated onto the wheel. */\nconst ariaLabel = computed(() => attrs['aria-label'] as string | undefined);\n\n/* Names the wheel from the Field label when present; an explicit aria-label always wins. */\nconst labelledBy = computed(() => (!ariaLabel.value ? ctx?.labelledBy : undefined));\n\nconst track = useTemplateRef<HTMLDivElement>('track');\n\n/* `getBoundingClientRect` is safe unguarded — pointer handlers never run on the server. */\nfunction updateFromClient(clientX: number, clientY: number): void {\n const node = track.value;\n if (!node) return;\n controlled.setValue(clampHue(angleFromCenter(clientX, clientY, node.getBoundingClientRect())));\n}\n\nfunction onPointerdown(event: PointerEvent): void {\n if (event.defaultPrevented) return;\n if (disabled.value) return;\n event.preventDefault();\n (event.target as Element).setPointerCapture?.(event.pointerId);\n updateFromClient(event.clientX, event.clientY);\n}\n\nfunction onPointermove(event: PointerEvent): void {\n if (event.defaultPrevented) return;\n if (disabled.value || event.buttons !== 1) return;\n updateFromClient(event.clientX, event.clientY);\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented) return;\n if (disabled.value) return;\n let next = hue.value;\n switch (event.key) {\n case 'ArrowRight':\n case 'ArrowDown':\n next = hue.value + props.step;\n break;\n case 'ArrowLeft':\n case 'ArrowUp':\n next = hue.value - props.step;\n break;\n case 'PageUp':\n next = hue.value + props.step * 10;\n break;\n case 'PageDown':\n next = hue.value - props.step * 10;\n break;\n case 'Home':\n next = 0;\n break;\n case 'End':\n next = 359;\n break;\n default:\n return;\n }\n event.preventDefault();\n controlled.setValue(clampHue(next));\n}\n\nconst radius = computed(() => (props.size - props.thickness) / 2);\n\n/* Numeric CSS lengths are spelled with their unit — React's style object auto-appended `px`,\n Vue's does not, so a bare `200` would be dropped as an invalid declaration. */\nconst wheelStyle = computed<StyleValue>(() => {\n const inner = radius.value - props.thickness / 2;\n const outer = radius.value + props.thickness / 2;\n const mask = `radial-gradient(circle, transparent ${inner}px, black ${inner + 1}px, black ${outer}px, transparent ${outer + 1}px)`;\n return {\n width: `${props.size}px`,\n height: `${props.size}px`,\n background:\n 'conic-gradient(from 0deg, hsl(0,100%,50%), hsl(60,100%,50%), hsl(120,100%,50%), hsl(180,100%,50%), hsl(240,100%,50%), hsl(300,100%,50%), hsl(360,100%,50%))',\n WebkitMaskImage: mask,\n maskImage: mask,\n };\n});\n\nconst thumbStyle = computed<StyleValue>(() => {\n const angleRad = (hue.value * Math.PI) / 180;\n return {\n left: `${props.size / 2 + radius.value * Math.sin(angleRad)}px`,\n top: `${props.size / 2 - radius.value * Math.cos(angleRad)}px`,\n backgroundColor: `hsl(${hue.value}, 100%, 50%)`,\n };\n});\n\nconst controlId = computed(() => props.id ?? ctx?.id);\nconst finalAriaLabel = computed(\n () => ariaLabel.value ?? (labelledBy.value ? undefined : 'Hue'),\n);\nconst valueNow = computed(() => Math.round(hue.value));\nconst isInvalid = computed(() => ctx?.isInvalid || undefined);\nconst describedBy = computed(() => ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class', 'style', 'aria-label']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'relative inline-block select-none rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n disabled.value && 'pointer-events-none opacity-50',\n attrs.class as ClassValue,\n ),\n);\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: track });\n</script>\n\n<template>\n <div\n ref=\"track\"\n role=\"slider\"\n :id=\"controlId\"\n :tabindex=\"disabled ? -1 : 0\"\n :aria-label=\"finalAriaLabel\"\n :aria-labelledby=\"labelledBy\"\n :aria-valuemin=\"0\"\n :aria-valuemax=\"360\"\n :aria-valuenow=\"valueNow\"\n :aria-invalid=\"isInvalid\"\n :aria-describedby=\"describedBy\"\n :aria-disabled=\"disabled || undefined\"\n :data-disabled=\"disabled ? '' : undefined\"\n :style=\"wheelStyle\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @pointerdown=\"onPointerdown\"\n @pointermove=\"onPointermove\"\n @keydown=\"onKeydown\"\n >\n <div\n aria-hidden=\"true\"\n :style=\"thumbStyle\"\n class=\"pointer-events-none absolute h-5 w-5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-md ring-1 ring-black/30\"\n />\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { ColorSwatchSize, SwatchShape } from '../colorSwatch';\n\n/**\n * Defines props for the internal `ColorSwatchItem`.\n *\n * `size` / `shape` are the NAMED axis types, not `ColorSwatchVariants['size']` as the React\n * original spelled them — the SFC prop resolver cannot follow an indexed access into an\n * imported interface, and the build fails on it while `vue-tsc` stays green.\n */\nexport interface ColorSwatchItemProps {\n /** The swatch color. */\n color: string;\n /** The selected state. */\n isSelected: boolean;\n /** The disabled state. */\n isDisabled: boolean;\n /** The swatch size step. */\n size?: ColorSwatchSize;\n /** The swatch outline shape. */\n shape?: SwatchShape;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useRovingFocusItem } from '../../../foundation/primitives';\nimport ColorSwatch from '../colorSwatch/ColorSwatch.vue';\n\n/* One roving-focus stop in a `ColorSwatchPicker`. Internal — never exported from the folder. */\ndefineOptions({ name: 'ColorSwatchItem' });\n\nconst props = defineProps<ColorSwatchItemProps>();\n\nconst emit = defineEmits<{\n /** Fires when the swatch is clicked or activated with Enter / Space. */\n select: [color: string];\n}>();\n\n/* Reactive object — `tabindex` tracks the group's tab stop, so read through it rather than\n destructuring. The function `ref` registers this item's node with the group. */\nconst roving = useRovingFocusItem();\n\n/* Roving navigation runs first and may `preventDefault()` an arrow key; Enter / Space only\n select when it did not — the React original's exact order. */\nfunction handleKeydown(event: KeyboardEvent): void {\n roving.onKeydown(event);\n if (event.defaultPrevented) return;\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n emit('select', props.color);\n }\n}\n</script>\n\n<template>\n <ColorSwatch\n :ref=\"roving.ref\"\n :color=\"color\"\n :size=\"size\"\n :shape=\"shape\"\n :is-selected=\"isSelected\"\n :is-disabled=\"isDisabled\"\n :tabindex=\"roving.tabindex\"\n :data-roving-focus-item=\"roving['data-roving-focus-item']\"\n :aria-label=\"color\"\n @click=\"emit('select', color)\"\n @focus=\"roving.onFocus()\"\n @keydown=\"handleKeydown\"\n />\n</template>\n","<script lang=\"ts\">\nimport type { ColorSwatchSize, SwatchShape } from '../colorSwatch';\n\n/**\n * Defines props for a `ColorSwatchPicker`.\n *\n * `swatchSize` / `swatchShape` are the NAMED axis types, not `ColorSwatchVariants['size']`\n * as the React original spelled them — the SFC prop resolver cannot follow an indexed access\n * into an imported interface, and the build fails on it while `vue-tsc` stays green.\n */\nexport interface ColorSwatchPickerProps {\n /** The palette rendered as swatches. */\n colors: ReadonlyArray<string>;\n\n /** The selected hex, controlled — React's spelling, which wins when both are set. */\n value?: string | null;\n\n /** The selected hex, controlled. The `v-model` binding target. */\n modelValue?: string | null;\n\n /** The initial selection when uncontrolled. */\n defaultValue?: string | null;\n\n /** The size step every swatch renders at. */\n swatchSize?: ColorSwatchSize;\n\n /** The outline shape every swatch renders with. */\n swatchShape?: SwatchShape;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n isDisabled?: boolean;\n\n /** The group's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport {\n Orientation,\n RovingFocusGroup,\n useFormControl,\n} from '../../../foundation/primitives';\nimport ColorSwatchItem from './ColorSwatchItem.vue';\n\n/**\n * Inline palette of selectable swatches, arrow-key navigable in both axes.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'ColorSwatchPicker', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ColorSwatchPickerProps>(), {\n swatchSize: 'md',\n swatchShape: 'square',\n /* Explicit `undefined` default: the flag falls back to the form control context, and Vue\n casts an absent `boolean` prop to `false` — which would shadow the context. */\n isDisabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string | null];\n /** Replaces React's `onValueChange`. */\n 'value-change': [value: string | null];\n}>();\n\nconst attrs = useAttrs();\n\n/*\n * Inline swatch group (no popover trigger) — the `role=\"group\"` node is the control:\n * it takes the context id (so a Field label's `htmlFor` resolves), is named via\n * `aria-labelledby`, and described via `aria-describedby`. `aria-invalid` is not valid\n * on `group`; invalid state surfaces through the describedby swap to the error chrome.\n * Disabled flows to every swatch button.\n */\nconst field = useFormControl();\nconst finalDisabled = computed(() => props.isDisabled ?? field?.isDisabled ?? false);\n\nconst controlled = useControlled<string | null>({\n /* `??` is wrong here — `null` is a MEANINGFUL selection (\"nothing selected\"), and `??`\n would fall through it to `modelValue`. Only `undefined` means \"not controlled\". */\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? null,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst selected = controlled.value;\n\nfunction onSelect(color: string): void {\n controlled.setValue(color);\n}\n\n/* Never a declared prop — a declared `'aria-label'` would arrive as `props.ariaLabel` and\n stop reaching the DOM. It is read off the attrs so `aria-labelledby` can defer to it. */\nconst ariaLabel = computed(() => attrs['aria-label'] as string | undefined);\n\nconst groupId = computed(() => props.id ?? field?.id);\n/* Names the group from the Field label when present; an explicit aria-label always wins. */\nconst labelledBy = computed(() => (ariaLabel.value ? undefined : field?.labelledBy));\nconst describedBy = computed(() => field?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() => cn('flex flex-wrap gap-1.5', attrs.class as ClassValue));\n\nconst root = useTemplateRef<InstanceType<typeof RovingFocusGroup>>('root');\n\n/** The rendered group element. */\ndefineExpose({ el: computed(() => root.value?.el ?? null) });\n</script>\n\n<template>\n <RovingFocusGroup\n ref=\"root\"\n :orientation=\"Orientation.Both\"\n can-loop\n :id=\"groupId\"\n :aria-labelledby=\"labelledBy\"\n :aria-describedby=\"describedBy\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n >\n <ColorSwatchItem\n v-for=\"c in colors\"\n :key=\"c\"\n :color=\"c\"\n :is-selected=\"selected === c\"\n :is-disabled=\"finalDisabled\"\n :size=\"swatchSize\"\n :shape=\"swatchShape\"\n @select=\"onSelect\"\n />\n </RovingFocusGroup>\n</template>\n","<script lang=\"ts\">\nimport type { HSV } from '../ColorExtensions';\nimport type { ColorSwatchSize } from '../colorSwatch';\n\n/** Defines which built-in trigger a color picker renders. */\nexport const ColorPickerTriggerVariant = {\n /** Refers to a swatch plus hex-value text in a framed button. */\n Full: 'full',\n /** Refers to a bare interactive swatch, no text. */\n Swatch: 'swatch',\n /** Refers to hex-value text only, no swatch. */\n Value: 'value',\n} as const;\n\nexport type ColorPickerTriggerVariant =\n (typeof ColorPickerTriggerVariant)[keyof typeof ColorPickerTriggerVariant];\n\nexport interface ColorPickerProps {\n /** The selected hex, controlled — React's spelling, which wins when both are set. */\n value?: string | null;\n\n /** The selected hex, controlled. The `v-model` binding target. */\n modelValue?: string | null;\n\n /** The initial hex when uncontrolled. Default `#3b82f6`. */\n defaultValue?: string | null;\n\n /** Whether the committed hex keeps its alpha channel, and the alpha slider renders. */\n hasAlpha?: boolean;\n\n /** The preset palette rendered under the panel; omitted or empty hides the row. */\n presets?: ReadonlyArray<string>;\n\n /** The size step the built-in trigger's swatch renders at. */\n triggerSize?: ColorSwatchSize;\n\n /**\n * The built-in trigger to render (ignored when the `trigger` slot is filled):\n * - `full` *(default)* — swatch + hex-value text, framed button.\n * - `swatch` — a bare interactive swatch, no text (compact toolbars, tiles).\n * - `value` — hex-value text only, no swatch (dense / code contexts).\n */\n triggerVariant?: ColorPickerTriggerVariant;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n isDisabled?: boolean;\n\n /** The hidden input's name — renders a form-submittable mirror of the hex. */\n name?: string;\n\n /** The trigger id; falls back to a surrounding `<Field>`'s control id. */\n id?: string;\n}\n\n/** The panel's fallback geometry when no parseable color is committed. */\nconst FALLBACK_HSV: HSV = { h: 217, s: 0.91, v: 0.96, a: 1 };\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, shallowRef, useAttrs, useTemplateRef, watch } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { FormControlProvider, useFormControl } from '../../../foundation/primitives';\nimport { Popover, PopoverContent, PopoverTrigger } from '../../overlays';\nimport { hsvToHex, parseColorToHsv } from '../ColorExtensions';\nimport { ColorSwatchSize as ColorSwatchSizeValue } from '../colorSwatch';\nimport ColorSwatch from '../colorSwatch/ColorSwatch.vue';\nimport ColorArea from '../colorArea/ColorArea.vue';\nimport ColorSlider, { ColorChannel } from '../colorSlider/ColorSlider.vue';\nimport ColorField from '../colorField/ColorField.vue';\nimport ColorSwatchPicker from '../colorSwatchPicker/ColorSwatchPicker.vue';\n\n/**\n * Full color picker — a trigger that opens a panel with a saturation/value area,\n * a hue slider, an optional alpha slider, a hex field and an optional preset row.\n */\n/* `inheritAttrs: false` so `class` folds into the trigger's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'ColorPicker', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ColorPickerProps>(), {\n defaultValue: '#3b82f6',\n hasAlpha: false,\n triggerSize: ColorSwatchSizeValue.Md,\n triggerVariant: ColorPickerTriggerVariant.Full,\n /* Explicit `undefined` default: the flag falls back to the form control context, and Vue\n casts an absent `boolean` prop to `false` — which would shadow the context. */\n isDisabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string | null];\n /** Replaces React's `onValueChange`. */\n 'value-change': [value: string | null];\n}>();\n\n/**\n * The custom trigger — React's `trigger?: ReactNode`. Structural content, so a slot\n * rather than a scalar prop. Must hold a single focusable element (it becomes the\n * popover trigger via `as-child`). Form-control context wiring (id/aria) is the\n * consumer's responsibility for a custom trigger, exactly as in React.\n */\nconst slots = defineSlots<{ trigger?(): unknown }>();\n\nconst attrs = useAttrs();\n\n/* Inherits id/disabled/invalid/labelledby/describedby from a surrounding <Field>;\n standalone props win when provided, context fills the gaps (Select parity). */\nconst field = useFormControl();\n\nconst finalDisabled = computed(() => props.isDisabled ?? field?.isDisabled ?? false);\nconst triggerId = computed(() => props.id ?? field?.id);\n\n/* Never a declared prop — a declared `'aria-label'` would arrive as `props.ariaLabel` and\n stop reaching the DOM. It is read off the attrs so it can be relocated onto the trigger. */\nconst ariaLabel = computed(() => attrs['aria-label'] as string | undefined);\n\n/* Names the trigger from the Field label when present; an explicit aria-label always\n wins, and the default label only applies when nothing else names the trigger. */\nconst labelledBy = computed(() => (ariaLabel.value ? undefined : field?.labelledBy));\nconst finalAriaLabel = computed(\n () => ariaLabel.value ?? (labelledBy.value ? undefined : 'Pick a color'),\n);\nconst describedBy = computed(() => field?.describedBy);\nconst isInvalid = computed(() => field?.isInvalid || undefined);\n\nconst controlled = useControlled<string | null>({\n /* `??` is wrong here — `null` is a MEANINGFUL committed value (\"no color\"), and `??` would\n fall through it to `modelValue`. Only `undefined` means \"not controlled\". */\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? null,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst hex = controlled.value;\n\n/* Internal HSV state (kept in sync with hex). HSV preserves picker geometry when the user\n moves to a fully-desaturated value (otherwise hue collapses). */\nconst hsv = shallowRef<HSV>(parseColorToHsv(hex.value) ?? FALLBACK_HSV);\n\n/* React's `useEffect([hex, hasAlpha])`. No `immediate` — the initial state above already\n seeds from `hex`, and an immediate watcher would re-run it before mount. */\nwatch([hex, () => props.hasAlpha], () => {\n if (!hex.value) return;\n const parsed = parseColorToHsv(hex.value);\n if (!parsed) return;\n /* Only update internal HSV if the *committed* hex differs from what our HSV currently\n produces — avoids hue collapsing when SV passes through 0. */\n const currentHex = hsvToHex(hsv.value, { withAlpha: props.hasAlpha });\n if (currentHex.toLowerCase() !== hex.value.toLowerCase()) {\n hsv.value = { ...parsed, a: hsv.value.a };\n }\n});\n\nfunction updateHsv(next: HSV): void {\n hsv.value = next;\n controlled.setValue(hsvToHex(next, { withAlpha: props.hasAlpha }));\n}\n\nfunction onAreaChange(next: { saturation: number; value: number }): void {\n updateHsv({ ...hsv.value, s: next.saturation, v: next.value });\n}\n\nfunction onHueChange(h: number): void {\n updateHsv({ ...hsv.value, h });\n}\n\nfunction onAlphaChange(a: number): void {\n updateHsv({ ...hsv.value, a });\n}\n\nfunction onHexChange(next: string | null): void {\n controlled.setValue(next);\n}\n\nfunction onPresetChange(next: string | null): void {\n controlled.setValue(next);\n}\n\n/*\n * The swatch trigger's real open handler is composed on by `PopoverTrigger`'s `as-child`\n * merge; `ColorSwatch` only needs a truthy click listener to render as a <button>.\n */\nfunction noop(): void {}\n\nconst hasCustomTrigger = computed(() => Boolean(slots.trigger));\nconst isSwatchTrigger = computed(\n () => props.triggerVariant === ColorPickerTriggerVariant.Swatch,\n);\nconst isFullTrigger = computed(() => props.triggerVariant === ColorPickerTriggerVariant.Full);\n\nconst swatchColor = computed(() => hex.value ?? '#00000000');\nconst hexText = computed(() => hex.value ?? '—');\nconst hiddenValue = computed(() => hex.value ?? '');\nconst alphaValue = computed(() => hsv.value.a ?? 1);\nconst hasPresets = computed(() => Boolean(props.presets && props.presets.length > 0));\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class', 'aria-label']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst framedTriggerClass = computed(() =>\n cn(\n 'inline-flex items-center gap-2 rounded-md border border-border bg-background px-2 py-1 text-sm transition-colors hover:border-border-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-60',\n attrs.class as ClassValue,\n ),\n);\n\nconst swatchTriggerClass = computed(() => attrs.class as ClassValue);\n\nconst trigger = useTemplateRef<{ el: HTMLElement | null }>('trigger');\n\n/** The rendered trigger element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: computed(() => trigger.value?.el ?? null) });\n</script>\n\n<template>\n <Popover>\n <!-- Custom trigger: no id/aria wiring, per the React original's contract. -->\n <PopoverTrigger v-if=\"hasCustomTrigger\" ref=\"trigger\" as-child>\n <slot name=\"trigger\" />\n </PopoverTrigger>\n\n <!-- Bare interactive swatch — ColorSwatch is a real <button> here (given a click\n listener), so it becomes the popover trigger with no wrapper chrome. -->\n <PopoverTrigger\n v-else-if=\"isSwatchTrigger\"\n ref=\"trigger\"\n as-child\n :id=\"triggerId\"\n :aria-label=\"finalAriaLabel\"\n :aria-labelledby=\"labelledBy\"\n :aria-describedby=\"describedBy\"\n :aria-invalid=\"isInvalid\"\n v-bind=\"passthroughAttrs\"\n >\n <ColorSwatch\n :color=\"swatchColor\"\n :size=\"triggerSize\"\n :is-disabled=\"finalDisabled\"\n :class=\"swatchTriggerClass\"\n @click=\"noop\"\n />\n </PopoverTrigger>\n\n <PopoverTrigger\n v-else\n ref=\"trigger\"\n :id=\"triggerId\"\n :aria-label=\"finalAriaLabel\"\n :aria-labelledby=\"labelledBy\"\n :aria-describedby=\"describedBy\"\n :aria-invalid=\"isInvalid\"\n :disabled=\"finalDisabled\"\n :class=\"framedTriggerClass\"\n v-bind=\"passthroughAttrs\"\n >\n <ColorSwatch v-if=\"isFullTrigger\" :color=\"swatchColor\" :size=\"triggerSize\" />\n <span class=\"font-mono uppercase\">{{ hexText }}</span>\n </PopoverTrigger>\n\n <PopoverContent aria-label=\"Color picker\" class=\"flex w-64 flex-col gap-3\">\n <!-- The panel widgets are sub-controls of the picker, not the field's control — each\n gets its OWN bare FormControlProvider so none of them adopts the surrounding\n Field's id (which now names the trigger; adoption would duplicate it) or its\n label/describedby/invalid chrome. One provider per widget: they all read\n `id ?? ctx.id`, so a single shared provider would duplicate ids among them. -->\n <FormControlProvider>\n <ColorArea\n :hue=\"hsv.h\"\n :saturation=\"hsv.s\"\n :value=\"hsv.v\"\n @value-change=\"onAreaChange\"\n />\n </FormControlProvider>\n <FormControlProvider>\n <ColorSlider\n :channel=\"ColorChannel.Hue\"\n :value=\"hsv.h\"\n aria-label=\"Hue\"\n @value-change=\"onHueChange\"\n />\n </FormControlProvider>\n <FormControlProvider v-if=\"hasAlpha\">\n <ColorSlider\n :channel=\"ColorChannel.Alpha\"\n :value=\"alphaValue\"\n :color=\"hsv\"\n aria-label=\"Alpha\"\n @value-change=\"onAlphaChange\"\n />\n </FormControlProvider>\n <FormControlProvider>\n <ColorField\n aria-label=\"Hex color\"\n :value=\"hex\"\n :has-alpha=\"hasAlpha\"\n @value-change=\"onHexChange\"\n />\n </FormControlProvider>\n <FormControlProvider v-if=\"hasPresets\">\n <ColorSwatchPicker\n :colors=\"presets ?? []\"\n :value=\"hex\"\n swatch-size=\"sm\"\n @value-change=\"onPresetChange\"\n />\n </FormControlProvider>\n </PopoverContent>\n\n <input v-if=\"name\" type=\"hidden\" :name=\"name\" :value=\"hiddenValue\" />\n </Popover>\n</template>\n","import { inject, type InjectionKey } from 'vue';\nimport type { Orientation } from '../../../foundation/utils';\n\n/** Defines a step's position relative to the active step. */\nexport const StepStatus = {\n /** Refers to a step ahead of the active one (not yet reached). */\n Pending: 'pending',\n /** Refers to the currently active step. */\n Active: 'active',\n /** Refers to a step behind the active one (already passed). */\n Complete: 'complete',\n} as const;\n\nexport type StepStatus = (typeof StepStatus)[keyof typeof StepStatus];\n\n/**\n * The seam between `Stepper` and its `StepperList` / `StepperStep` / `StepperPanel` children.\n *\n * React attached those as `Stepper.List` / `.Step` / `.Panel` statics over a `createContext`.\n * An SFC's generated default export cannot carry statics cleanly, so they ship as sibling\n * components and share state through provide/inject instead.\n *\n * Every field but the setters is a live getter — read them off the object, don't destructure.\n */\nexport interface StepperContextValue {\n /** The active step value. */\n readonly value: string;\n /** Selects a step. */\n setValue: (value: string) => void;\n /** The layout axis. */\n readonly orientation: Orientation;\n /** The id prefix shared by every step / panel pair. */\n readonly baseId: string;\n /**\n * The registered step values in mount order.\n *\n * React kept this in a `useRef` array, which never re-rendered a step when a sibling\n * registered — the very first step could render its connector against a stale length.\n * A reactive array here closes that, and matches how `Select` registers its items.\n */\n readonly steps: ReadonlyArray<string>;\n registerStep: (value: string) => void;\n unregisterStep: (value: string) => void;\n}\n\nexport const StepperKey: InjectionKey<StepperContextValue> = Symbol('wow-two.stepper');\n\n/** Reads the surrounding stepper context; throws when used outside a `<Stepper>`. */\nexport function useStepperContext(): StepperContextValue {\n const context = inject(StepperKey, null);\n if (!context) throw new Error('Stepper.* must be used inside <Stepper>');\n return context;\n}\n","<script lang=\"ts\">\nimport type { Orientation } from '../../../foundation/utils';\n\nexport interface StepperProps {\n /** The active step value, controlled — React's spelling, which wins when both are set. */\n value?: string;\n\n /** The active step value, controlled. The `v-model` binding target. */\n modelValue?: string;\n\n /** The initial active step value when uncontrolled. */\n defaultValue?: string;\n\n /** The layout axis. Default `horizontal`. */\n orientation?: Orientation;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, ref, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Orientation as OrientationValue } from '../../../foundation/utils';\nimport { useControlled, useId } from '../../../foundation/hooks';\nimport { StepperKey, type StepperContextValue } from './StepperContext';\n\n/**\n * Stepper root. Owns the active value and publishes it to `StepperList` /\n * `StepperStep` / `StepperPanel` through injection — React attached those as\n * `Stepper.List` / `.Step` / `.Panel` statics, which an SFC's default export\n * cannot carry.\n */\n/* `inheritAttrs: false` so `class` folds into the root's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'Stepper', inheritAttrs: false });\n\n/** The step list and panels — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<StepperProps>(), {\n orientation: OrientationValue.Horizontal,\n /* Explicit `undefined` defaults: `useControlled` keys on `=== undefined`. */\n value: undefined,\n modelValue: undefined,\n defaultValue: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string];\n /** Replaces React's `onValueChange`. */\n 'value-change': [value: string];\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst controlled = useControlled<string>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? '',\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst active = controlled.value;\nconst baseId = useId();\n\n/* Reactive, unlike React's `useRef` array: `StepperStep` derives its status and its connector\n visibility from this list at render time, so a sibling registering has to re-render it. */\nconst steps = ref<Array<string>>([]);\n\nfunction registerStep(value: string): void {\n if (!steps.value.includes(value)) steps.value = [...steps.value, value];\n}\n\nfunction unregisterStep(value: string): void {\n steps.value = steps.value.filter((x) => x !== value);\n}\n\n/* Live getters, not a snapshot — an orientation change on the root has to reach every\n already-mounted step. */\nprovide<StepperContextValue>(StepperKey, {\n get value() {\n return active.value;\n },\n setValue: controlled.setValue,\n get orientation() {\n return props.orientation;\n },\n baseId,\n get steps() {\n return steps.value;\n },\n registerStep,\n unregisterStep,\n});\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n props.orientation === OrientationValue.Vertical ? 'flex gap-4' : 'flex flex-col gap-4',\n attrs.class as ClassValue,\n ),\n);\n\n/** The rendered root `<div>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" :data-orientation=\"orientation\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <slot />\n </div>\n</template>\n","<script lang=\"ts\">\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type -- kept as an\n exported name: React declared `StepperListProps` and consumers import it. Its only\n member was `children`, which is the default slot here; every attribute falls through. */\nexport interface StepperListProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn, Orientation } from '../../../foundation/utils';\nimport { RovingFocusGroup } from '../../../foundation/primitives';\nimport { useStepperContext } from './StepperContext';\n\n/** The step strip. Arrow-key navigation comes from `RovingFocusGroup`. */\ndefineOptions({ name: 'StepperList', inheritAttrs: false });\n\n/** The `StepperStep` children — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<InstanceType<typeof RovingFocusGroup>>('el');\nconst stepper = useStepperContext();\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst listClass = computed(() =>\n cn(\n 'flex',\n stepper.orientation === Orientation.Vertical\n ? 'flex-col gap-4'\n : 'flex-row items-center gap-2',\n attrs.class as ClassValue,\n ),\n);\n\ndefineExpose({ el });\n</script>\n\n<template>\n <RovingFocusGroup\n ref=\"el\"\n :orientation=\"stepper.orientation\"\n role=\"tablist\"\n :aria-orientation=\"stepper.orientation\"\n :data-orientation=\"stepper.orientation\"\n :class=\"listClass\"\n v-bind=\"passthroughAttrs\"\n >\n <slot />\n </RovingFocusGroup>\n</template>\n","<script lang=\"ts\">\nexport interface StepperStepProps {\n /** The value this step selects — pairs it with the `StepperPanel` of the same value. */\n value: string;\n\n /** The sub-label under the step title. Fill the `description` slot for richer content. */\n description?: string | number;\n\n /** The disabled state. Default `false`. */\n isDisabled?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, mergeProps, onBeforeUnmount, onMounted, shallowRef, useAttrs, useSlots } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Check } from 'lucide-vue-next';\nimport { cn, dataAttr, Orientation } from '../../../foundation/utils';\nimport { useRovingFocusItem } from '../../../foundation/primitives';\nimport { StepStatus, useStepperContext } from './StepperContext';\n\n/** A single step button plus its trailing connector. */\ndefineOptions({ name: 'StepperStep', inheritAttrs: false });\n\n/** The step title — React's required `children`. */\ndefineSlots<{\n default(): unknown;\n description?(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<StepperStepProps>(), { isDisabled: false });\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst stepper = useStepperContext();\n\n/* Reactive object: bound with `v-bind`, never destructured. React called this with no\n options, so the roving tab stop is the first enabled step rather than the active one. */\nconst item = useRovingFocusItem();\n\n/* Registration order follows mount order, which is DOM order — the same ordering React got\n from its mount effect. */\nonMounted(() => stepper.registerStep(props.value));\nonBeforeUnmount(() => stepper.unregisterStep(props.value));\n\n/* One element, two consumers of `ref` — the roving group needs the node and `defineExpose`\n publishes it. React composed them with a callback ref; this is the same composition. */\nconst el = shallowRef<HTMLButtonElement | null>(null);\nfunction setRef(node: unknown): void {\n el.value = (node ?? null) as HTMLButtonElement | null;\n item.ref(node);\n}\n\nconst index = computed(() => stepper.steps.indexOf(props.value));\nconst activeIndex = computed(() => stepper.steps.indexOf(stepper.value));\n\nconst status = computed<StepStatus>(() => {\n if (index.value < activeIndex.value) return StepStatus.Complete;\n return index.value === activeIndex.value ? StepStatus.Active : StepStatus.Pending;\n});\n\nconst stepId = computed(() => `${stepper.baseId}-step-${props.value}`);\nconst panelId = computed(() => `${stepper.baseId}-panel-${props.value}`);\nconst stepNumber = computed(() => index.value + 1);\n\nconst hasDescription = computed(() => Boolean(props.description) || Boolean(slots.description));\n\nconst showConnector = computed(\n () =>\n stepper.orientation === Orientation.Horizontal &&\n index.value < stepper.steps.length - 1,\n);\n\nfunction onClick(event: MouseEvent): void {\n if (event.defaultPrevented || props.isDisabled) return;\n stepper.setValue(props.value);\n}\n\nconst buttonClass = computed(() =>\n cn(\n 'group flex items-center gap-2 text-left text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm',\n props.isDisabled && 'pointer-events-none opacity-50',\n attrs.class as ClassValue,\n ),\n);\n\nconst markerClass = computed(() =>\n cn(\n 'grid h-7 w-7 shrink-0 place-items-center rounded-full border-2 text-xs font-semibold transition-colors',\n status.value === StepStatus.Pending && 'border-border text-muted-foreground',\n status.value === StepStatus.Active && 'border-primary bg-primary text-primary-foreground',\n status.value === StepStatus.Complete && 'border-primary bg-primary text-primary-foreground',\n ),\n);\n\nconst titleClass = computed(() =>\n cn(\n 'font-medium',\n status.value === StepStatus.Pending ? 'text-muted-foreground' : 'text-foreground',\n ),\n);\n\nconst connectorClass = computed(() =>\n cn(\n 'h-px flex-1 transition-colors',\n status.value === StepStatus.Pending ? 'bg-border' : 'bg-primary',\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\n/**\n * The fallthrough attrs merged with the roving-focus item's bindings.\n *\n * `mergeProps` rather than an object spread: both sides can carry `onFocus`, and a spread\n * would drop the consumer's. Reading `item`'s members inside a computed keeps them tracked,\n * so `tabindex` still follows the group's tab stop.\n */\nconst bindings = computed(() =>\n mergeProps(rest.value, item as unknown as Record<string, unknown>),\n);\n\nconst CheckIcon = Check;\n\n/** The rendered `<button>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el });\n</script>\n\n<template>\n <div class=\"flex flex-1 items-center gap-2\">\n <!-- Own attrs, then `bindings` (fallthrough attrs + the roving item), then own handlers\n last — a consumer's `click` handler therefore runs before ours, the order React got\n from calling `onClick?.(e)` ahead of its own logic. -->\n <button\n :id=\"stepId\"\n type=\"button\"\n role=\"tab\"\n :aria-selected=\"status === 'active'\"\n :aria-controls=\"panelId\"\n :aria-current=\"status === 'active' ? 'step' : undefined\"\n :data-status=\"status\"\n :data-disabled=\"dataAttr(isDisabled)\"\n :disabled=\"isDisabled\"\n v-bind=\"bindings\"\n :ref=\"setRef\"\n :class=\"buttonClass\"\n @click=\"onClick\"\n >\n <span aria-hidden=\"true\" :class=\"markerClass\">\n <CheckIcon v-if=\"status === 'complete'\" class=\"h-4 w-4\" />\n <template v-else>{{ stepNumber }}</template>\n </span>\n <span class=\"flex flex-col\">\n <span :class=\"titleClass\"><slot /></span>\n <span v-if=\"hasDescription\" class=\"text-xs text-muted-foreground\">\n <slot name=\"description\">{{ description }}</slot>\n </span>\n </span>\n </button>\n <span v-if=\"showConnector\" aria-hidden=\"true\" :class=\"connectorClass\" />\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface StepperPanelProps {\n /** The value this panel belongs to — pairs it with the `StepperStep` of the same value. */\n value: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useStepperContext } from './StepperContext';\n\n/** The panel for one step. Only the active panel is mounted. */\ndefineOptions({ name: 'StepperPanel', inheritAttrs: false });\n\n/** The panel content — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = defineProps<StepperPanelProps>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\nconst stepper = useStepperContext();\n\nconst isActive = computed(() => stepper.value === props.value);\n\nconst stepId = computed(() => `${stepper.baseId}-step-${props.value}`);\nconst panelId = computed(() => `${stepper.baseId}-panel-${props.value}`);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst panelClass = computed(() => cn('flex-1 outline-none', attrs.class as ClassValue));\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n v-if=\"isActive\"\n ref=\"el\"\n :id=\"panelId\"\n role=\"tabpanel\"\n :aria-labelledby=\"stepId\"\n :tabindex=\"0\"\n :class=\"panelClass\"\n v-bind=\"passthroughAttrs\"\n >\n <slot />\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { TagVariant } from '../../display/tag';\nimport type { InputSize, InputState } from '../InputStyles';\n\nexport interface TagsInputProps {\n /** The control size. */\n size?: InputSize;\n\n /** The validity surface. */\n state?: InputState;\n\n /** The committed tags, controlled — React's spelling, which wins when both are set. */\n value?: ReadonlyArray<string>;\n\n /** The committed tags, controlled. The `v-model` binding target. */\n modelValue?: ReadonlyArray<string>;\n\n /** The initial tags when uncontrolled. */\n defaultValue?: ReadonlyArray<string>;\n\n /** The in-flight text, controlled. The `v-model:input-value` binding target. */\n inputValue?: string;\n\n /** The empty-state placeholder. */\n placeholder?: string;\n\n /** The characters that commit the current input. Enter and Tab always do. */\n delimiters?: ReadonlyArray<string>;\n\n /**\n * The predicate gating committed tags. Default: non-empty after trim.\n *\n * Kept a PROP, not an emit: it RETURNS a verdict, which an emit cannot do.\n */\n validate?: (tag: string) => boolean;\n\n /** Whether the same tag may be committed twice. */\n allowsDuplicates?: boolean;\n\n /** The cap on committed tags. */\n max?: number;\n\n /** The invalid surface override. Falls back to the surrounding form control's `isInvalid`. */\n isInvalid?: boolean;\n\n /** The hidden input name; the hidden input emits the comma-joined value. */\n name?: string;\n\n /**\n * The chip variant.\n *\n * The NAMED type, not `TagVariants['variant']` as React spelled it — the SFC prop\n * resolver cannot follow an indexed access into an imported interface, and the build\n * fails on it while `vue-tsc` stays green.\n */\n tagVariant?: TagVariant;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The read-only state — React's spelling. Falls back to the form control's `isReadOnly`. */\n readOnly?: boolean;\n\n /** The DOM spelling of {@link TagsInputProps.readOnly}, which wins when both are set. */\n readonly?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport Tag from '../../display/tag/Tag.vue';\nimport { inputBaseVariants, InputState as InputStateValue } from '../InputStyles';\n\n/**\n * Free-form tag entry. Type → Enter/comma/Tab commits. Backspace at empty\n * input removes the last tag. Renders chips via `display/Tag`.\n */\n/* `inheritAttrs: false` so `class` folds into the container's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'TagsInput', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<TagsInputProps>(), {\n placeholder: 'Add tag…',\n delimiters: () => [','],\n validate: (t: string) => t.trim().length > 0,\n allowsDuplicates: false,\n tagVariant: 'neutral',\n /* Explicit `undefined` defaults are load-bearing: each flag falls back to the form control\n context, and Vue casts an absent `boolean` prop to `false` — which would shadow it. */\n isInvalid: undefined,\n disabled: undefined,\n readOnly: undefined,\n readonly: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [tags: ReadonlyArray<string>];\n /** Replaces React's `onValueChange`. */\n 'value-change': [tags: ReadonlyArray<string>];\n /** The `v-model:input-value` half. */\n 'update:inputValue': [input: string];\n /** Replaces React's `onInputChange`. */\n 'input-change': [input: string];\n}>();\n\nconst attrs = useAttrs();\n\nconst tagsControlled = useControlled<ReadonlyArray<string>>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? [],\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst textControlled = useControlled<string>({\n controlled: () => props.inputValue,\n default: () => '',\n onChange: (next) => {\n emit('update:inputValue', next);\n emit('input-change', next);\n },\n});\n\nconst tags = tagsControlled.value;\nconst text = textControlled.value;\n\nconst input = useTemplateRef<HTMLInputElement>('input');\nconst pendingDelete = ref(false);\n\n/* FormControlContext adoption — explicit props stay as overrides. */\nconst ctx = useFormControl();\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst isReadOnly = computed(() => props.readonly ?? props.readOnly ?? ctx?.isReadOnly);\nconst invalid = computed(() => props.isInvalid ?? ctx?.isInvalid);\nconst finalState = computed(\n () =>\n props.state ?? (invalid.value ? InputStateValue.Invalid : InputStateValue.Default),\n);\n\nfunction commit(raw: string): void {\n const trimmed = raw.trim();\n if (!trimmed || !props.validate(trimmed)) return;\n if (!props.allowsDuplicates && tags.value.includes(trimmed)) return;\n if (props.max != null && tags.value.length >= props.max) return;\n tagsControlled.setValue([...tags.value, trimmed]);\n textControlled.setValue('');\n}\n\nfunction removeAt(index: number): void {\n tagsControlled.setValue(tags.value.filter((_, i) => i !== index));\n}\n\nfunction onInput(event: Event): void {\n textControlled.setValue((event.target as HTMLInputElement).value);\n}\n\n/* Runs after any caller-supplied `@keydown` (declared after `v-bind`), exactly as React's\n `onKeyDown?.(e)` ran before this body. */\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented || isDisabled.value || isReadOnly.value) return;\n if (event.key === 'Enter' || (event.key === 'Tab' && text.value)) {\n if (text.value) {\n event.preventDefault();\n commit(text.value);\n pendingDelete.value = false;\n }\n return;\n }\n if (props.delimiters.includes(event.key)) {\n event.preventDefault();\n commit(text.value);\n pendingDelete.value = false;\n return;\n }\n if (event.key === 'Backspace' && !text.value && tags.value.length > 0) {\n if (pendingDelete.value) {\n event.preventDefault();\n removeAt(tags.value.length - 1);\n pendingDelete.value = false;\n } else {\n pendingDelete.value = true;\n }\n return;\n }\n pendingDelete.value = false;\n}\n\n/* React did not gate blur on `defaultPrevented`; neither does this. */\nfunction onBlur(): void {\n if (text.value) commit(text.value);\n pendingDelete.value = false;\n}\n\nfunction onContainerClick(event: MouseEvent): void {\n if (event.target === event.currentTarget) input.value?.focus();\n}\n\nfunction isPendingDelete(index: number): boolean {\n return pendingDelete.value && index === tags.value.length - 1;\n}\n\n/**\n * The Vue `Tag` renders its close button only when the consumer bound `@close` — the same\n * `onClose && <button/>` guard React had. A listener cannot be conditionally omitted with\n * `@close`, so it is bound through `v-on` with an object that is empty when closing is off.\n */\nfunction tagListeners(index: number): Record<string, () => void> {\n if (isDisabled.value || isReadOnly.value) return {};\n return { close: () => removeAt(index) };\n}\n\nfunction tagClass(index: number): string {\n return cn(isPendingDelete(index) && 'ring-1 ring-ring');\n}\n\n/* Never declared props — a declared `'aria-describedby'` would arrive as\n `props.ariaDescribedby` and stop reaching the DOM. Both are read off the attrs so the\n consumer's value can override the context's. */\nconst ariaDescribedBy = computed(() => attrs['aria-describedby'] as string | undefined);\nconst ariaRequired = computed(() => attrs['aria-required'] as 'true' | 'false' | boolean | undefined);\n\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst describedBy = computed(() => ariaDescribedBy.value ?? ctx?.describedBy);\n/* aria- (not native) required — the tag list is the value; a native `required` on the empty\n inner input would block submits even with tags committed. */\nconst requiredAttr = computed(() => ariaRequired.value ?? (ctx?.isRequired || undefined));\nconst inputPlaceholder = computed(() =>\n tags.value.length === 0 ? props.placeholder : undefined,\n);\nconst hiddenValue = computed(() => tags.value.join(','));\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set([\n 'class',\n 'aria-describedby',\n 'aria-required',\n]);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n inputBaseVariants({ size: props.size, state: finalState.value }),\n 'h-auto min-h-10 flex-wrap items-center gap-1.5 py-1.5',\n isDisabled.value && 'cursor-not-allowed opacity-60',\n attrs.class as ClassValue,\n ),\n);\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: input });\n</script>\n\n<template>\n <div\n role=\"group\"\n :data-disabled=\"isDisabled || undefined\"\n :data-readonly=\"isReadOnly || undefined\"\n :data-invalid=\"invalid || undefined\"\n :class=\"rootClass\"\n @click=\"onContainerClick\"\n >\n <Tag\n v-for=\"(t, i) in tags\"\n :key=\"`${t}-${i}`\"\n :variant=\"tagVariant\"\n :data-pending-delete=\"isPendingDelete(i) ? '' : undefined\"\n :class=\"tagClass(i)\"\n v-on=\"tagListeners(i)\"\n >\n {{ t }}\n </Tag>\n <input\n ref=\"input\"\n type=\"text\"\n :id=\"inputId\"\n :value=\"text\"\n :placeholder=\"inputPlaceholder\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :aria-invalid=\"invalid || undefined\"\n :aria-describedby=\"describedBy\"\n :aria-required=\"requiredAttr\"\n class=\"min-w-[6rem] flex-1 border-0 bg-transparent p-0 text-sm outline-none placeholder:text-subtle-foreground disabled:cursor-not-allowed\"\n v-bind=\"passthroughAttrs\"\n @input=\"onInput\"\n @keydown=\"onKeydown\"\n @blur=\"onBlur\"\n />\n <input v-if=\"name\" type=\"hidden\" :name=\"name\" :value=\"hiddenValue\" />\n </div>\n</template>\n","<script lang=\"ts\">\n/** Defines why a picked file was rejected by the uploader. */\nexport const FileRejectionReason = {\n /** Refers to a file whose MIME type / extension is not accepted. */\n Type: 'type',\n /** Refers to a file exceeding the max size. */\n Size: 'size',\n /** Refers to a file beyond the max file count. */\n Count: 'count',\n} as const;\n\nexport type FileRejectionReason =\n (typeof FileRejectionReason)[keyof typeof FileRejectionReason];\n\nexport interface FileRejection {\n file: File;\n reason: FileRejectionReason;\n}\n\n/** Reflects the drop zone's live drag state; surfaced as `data-drag-state`. */\ntype DragState = 'idle' | 'over' | 'reject';\n\nexport interface FileUploadProps {\n /** The `accept` token list handed to the native input and used for validation. */\n accept?: string;\n\n /** Whether more than one file may be picked. Default `false`. */\n multiple?: boolean;\n\n /** The per-file byte cap. Files exceeding this drop into `rejected`. */\n maxSize?: number;\n\n /** The cap on total accepted files (multiple mode). Excess go to `rejected`. */\n maxFiles?: number;\n\n /** The invalid surface override. Falls back to the surrounding form control's `isInvalid`. */\n isInvalid?: boolean;\n\n /** The zone's headline. Fill the `label` slot for richer content. */\n label?: string | number;\n\n /** The zone's sub-line. Fill the `hint` slot for richer content. */\n hint?: string | number;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The native input name. */\n name?: string;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { UploadCloud } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { matchesAccept, matchesAcceptType } from '../../../foundation/files';\nimport { Icon } from '../../../foundation/icons';\nimport { useFormControl } from '../../../foundation/primitives';\n\n/**\n * Drag-drop file zone with click-to-pick fallback. Validates against\n * `accept`, `maxSize`, and `maxFiles`. Emits accepted + rejected lists via\n * `files-change`. The zone itself is a `role=\"button\"` — Enter/Space opens\n * the native file picker.\n */\n/* `inheritAttrs: false` so `class` folds into the wrapper's own `cn()` call, and so the rest\n of the attrs land on the hidden native `<input>` rather than the wrapper. */\ndefineOptions({ name: 'FileUpload', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<FileUploadProps>(), {\n multiple: false,\n label: 'Drop files here, or click to browse',\n /* Explicit `undefined` defaults: each flag falls back to the form control context, and Vue\n casts an absent `boolean` prop to `false` — which would shadow it. */\n isInvalid: undefined,\n disabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** Emits the partitioned pick. Replaces React's `onFilesChange`. */\n 'files-change': [accepted: ReadonlyArray<File>, rejected: ReadonlyArray<FileRejection>];\n}>();\n\ndefineSlots<{\n /** The content rendered under the drop zone — React's `children`. */\n default?(): unknown;\n label?(): unknown;\n hint?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\n\nconst input = useTemplateRef<HTMLInputElement>('input');\nconst dragCounter = ref(0);\nconst dragState = ref<DragState>('idle');\n\n/* FormControlContext adoption — explicit props stay as overrides. The HIDDEN native\n input carries the context id, so `Field`-rendered labels/describedby reference it\n (label click opens the picker). The dropzone mirrors describedby for keyboard users. */\nconst ctx = useFormControl();\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst invalid = computed(() => props.isInvalid ?? ctx?.isInvalid);\n\nfunction partition(files: FileList | ReadonlyArray<File>): [File[], ReadonlyArray<FileRejection>] {\n const accepted: Array<File> = [];\n const rejected: Array<FileRejection> = [];\n const arr = Array.from(files);\n for (const f of arr) {\n if (!matchesAccept(f, props.accept)) {\n rejected.push({ file: f, reason: FileRejectionReason.Type });\n continue;\n }\n if (props.maxSize != null && f.size > props.maxSize) {\n rejected.push({ file: f, reason: FileRejectionReason.Size });\n continue;\n }\n accepted.push(f);\n }\n if (props.maxFiles != null && accepted.length > props.maxFiles) {\n const overflow = accepted.splice(props.maxFiles);\n for (const f of overflow) rejected.push({ file: f, reason: FileRejectionReason.Count });\n }\n return [accepted, rejected];\n}\n\nfunction openPicker(): void {\n if (!isDisabled.value) input.value?.click();\n}\n\nfunction onDragEnter(event: DragEvent): void {\n if (isDisabled.value) return;\n event.preventDefault();\n dragCounter.value += 1;\n const items = event.dataTransfer?.items;\n let reject = false;\n /* Only the MIME type is exposed pre-drop — size is unavailable and extension tokens are\n unverifiable, so this check is advisory and stays optimistic (`extensionTokens: 'allow'`).\n `onDrop` re-checks authoritatively with `matchesAccept`. */\n if (items && props.accept) {\n for (let i = 0; i < items.length; i++) {\n const it = items[i];\n if (!it || it.kind !== 'file') continue;\n if (!matchesAcceptType(it.type, props.accept)) {\n reject = true;\n break;\n }\n }\n }\n dragState.value = reject ? 'reject' : 'over';\n}\n\nfunction onDragOver(event: DragEvent): void {\n if (isDisabled.value) return;\n event.preventDefault();\n if (event.dataTransfer) event.dataTransfer.dropEffect = 'copy';\n}\n\nfunction onDragLeave(event: DragEvent): void {\n if (isDisabled.value) return;\n event.preventDefault();\n dragCounter.value -= 1;\n if (dragCounter.value <= 0) {\n dragCounter.value = 0;\n dragState.value = 'idle';\n }\n}\n\nfunction onDrop(event: DragEvent): void {\n if (isDisabled.value) return;\n event.preventDefault();\n dragCounter.value = 0;\n dragState.value = 'idle';\n const files = event.dataTransfer?.files;\n if (!files || files.length === 0) return;\n const [accepted, rejected] = partition(files);\n emit('files-change', accepted, rejected);\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (isDisabled.value) return;\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n openPicker();\n }\n}\n\nfunction onChange(event: Event): void {\n const target = event.target as HTMLInputElement;\n const files = target.files;\n if (!files || files.length === 0) return;\n const [accepted, rejected] = partition(files);\n emit('files-change', accepted, rejected);\n // reset so picking the same file again still fires\n target.value = '';\n}\n\nconst showError = computed(() => invalid.value || dragState.value === 'reject');\n\nconst hasHint = computed(() => Boolean(props.hint) || Boolean(slots.hint));\n\nconst inputId = computed(() => props.id ?? ctx?.id);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst wrapperClass = computed(() => cn('flex flex-col gap-3', attrs.class as ClassValue));\n\nconst zoneClass = computed(() =>\n cn(\n 'flex flex-col items-center justify-center gap-2 rounded-md border-2 border-dashed border-input bg-background px-6 py-10 text-center text-sm text-muted-foreground transition-colors',\n 'hover:border-border-strong hover:bg-muted/40',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n dragState.value === 'over' && 'border-primary bg-primary-soft/30 text-foreground',\n showError.value && 'border-destructive bg-destructive-soft/30 text-destructive',\n isDisabled.value && 'cursor-not-allowed opacity-60 hover:border-input hover:bg-background',\n ),\n);\n\nconst iconClass = computed(() =>\n cn(\n 'text-muted-foreground',\n dragState.value === 'over' && 'text-primary',\n showError.value && 'text-destructive',\n ),\n);\n\nconst UploadIcon = UploadCloud;\n\n/** The rendered `<input type=\"file\">` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: input });\n</script>\n\n<template>\n <div :class=\"wrapperClass\">\n <div\n role=\"button\"\n :tabindex=\"isDisabled ? -1 : 0\"\n :aria-disabled=\"isDisabled || undefined\"\n :aria-describedby=\"ctx?.describedBy\"\n :data-drag-state=\"dragState\"\n :data-invalid=\"showError || undefined\"\n :class=\"zoneClass\"\n @click=\"openPicker\"\n @keydown=\"onKeydown\"\n @dragenter=\"onDragEnter\"\n @dragover=\"onDragOver\"\n @dragleave=\"onDragLeave\"\n @drop=\"onDrop\"\n >\n <Icon :icon=\"UploadIcon\" :size=\"28\" :class=\"iconClass\" />\n <div class=\"font-medium text-foreground\"><slot name=\"label\">{{ label }}</slot></div>\n <div v-if=\"hasHint\" class=\"text-xs\"><slot name=\"hint\">{{ hint }}</slot></div>\n <input\n ref=\"input\"\n type=\"file\"\n :id=\"inputId\"\n :accept=\"accept\"\n :multiple=\"multiple\"\n :disabled=\"isDisabled\"\n :aria-invalid=\"invalid || undefined\"\n :aria-describedby=\"ctx?.describedBy\"\n :aria-required=\"ctx?.isRequired || undefined\"\n :name=\"name\"\n class=\"sr-only\"\n v-bind=\"passthroughAttrs\"\n @change=\"onChange\"\n />\n </div>\n <slot />\n </div>\n</template>\n","import { inject, type InjectionKey, type ShallowRef } from 'vue';\n\n/**\n * The seam between `Editable` and its `EditablePreview` / `EditableInput` /\n * `EditableSubmit` / `EditableCancel` children.\n *\n * React attached those as `Editable.Preview` / `.Input` / `.Submit` / `.Cancel` statics over a\n * `createContext`. An SFC's generated default export cannot carry statics cleanly, so they ship\n * as sibling components and share state through provide/inject instead.\n *\n * Every field but the setters is a live getter — read them off the object, don't destructure.\n */\nexport interface EditableContextValue {\n /** The committed value. */\n readonly value: string;\n /** The in-flight edit buffer. */\n readonly draft: string;\n setDraft: (value: string) => void;\n /** Whether the input is showing instead of the preview. */\n readonly isEditing: boolean;\n setEditing: (editing: boolean) => void;\n /** Commits the draft and leaves edit mode. */\n submit: () => void;\n /** Discards the draft and leaves edit mode. */\n cancel: () => void;\n /** The preview text shown when the value is empty. */\n readonly placeholder: string;\n readonly isDisabled: boolean;\n readonly isReadOnly: boolean;\n readonly canSubmitOnBlur: boolean;\n readonly canSubmitOnEnter: boolean;\n readonly canCancelOnEscape: boolean;\n /** Holds the DOM node of the inner input — the focus/caret effect reads it. */\n inputEl: ShallowRef<HTMLInputElement | null>;\n}\n\nexport const EditableKey: InjectionKey<EditableContextValue> = Symbol('wow-two.editable');\n\n/** Reads the surrounding editable context; throws when used outside an `<Editable>`. */\nexport function useEditableContext(): EditableContextValue {\n const context = inject(EditableKey, null);\n if (!context) throw new Error('Editable.* must be used inside <Editable>');\n return context;\n}\n","<script lang=\"ts\">\nexport interface EditableProps {\n /** The committed value, controlled — React's spelling, which wins when both are set. */\n value?: string;\n\n /** The committed value, controlled. The `v-model` binding target. */\n modelValue?: string;\n\n /** The initial committed value when uncontrolled. */\n defaultValue?: string;\n\n /** The edit-mode state, controlled — the house boolean spelling, which wins when both are set. */\n isEditing?: boolean;\n\n /** The edit-mode state, controlled. The `v-model:editing` binding target. */\n editing?: boolean;\n\n /** The initial edit-mode state when uncontrolled. Default `false`. */\n defaultEditing?: boolean;\n\n /** The preview text shown when the value is empty. */\n placeholder?: string;\n\n /** Whether blurring the input commits the draft. Default `true`. */\n canSubmitOnBlur?: boolean;\n\n /** Whether Enter commits the draft. Default `true`. */\n canSubmitOnEnter?: boolean;\n\n /** Whether Escape discards the draft. Default `true`. */\n canCancelOnEscape?: boolean;\n\n /** The disabled state. Default `false`. */\n isDisabled?: boolean;\n\n /** The read-only state. Default `false`. */\n isReadOnly?: boolean;\n\n /** The hidden input name; the hidden input emits the committed value. */\n name?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, ref, shallowRef, useAttrs, watch } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { EditableKey, type EditableContextValue } from './EditableContext';\n\n/**\n * Editable root. Owns the committed value, the draft and edit mode, and publishes them to\n * `EditablePreview` / `EditableInput` / `EditableSubmit` / `EditableCancel` through injection —\n * React attached those as `Editable.Preview` / `.Input` / … statics, which an SFC's default\n * export cannot carry.\n */\n/* `inheritAttrs: false` so `class` folds into the root's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'Editable', inheritAttrs: false });\n\n/** The Editable tree — preview, input and the submit/cancel buttons. React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<EditableProps>(), {\n defaultEditing: false,\n placeholder: 'Click to edit',\n canSubmitOnBlur: true,\n canSubmitOnEnter: true,\n canCancelOnEscape: true,\n isDisabled: false,\n isReadOnly: false,\n /* Explicit `undefined` defaults are load-bearing: `useControlled` keys on `=== undefined`,\n and Vue casts an absent `boolean` prop to `false` — without these, `isEditing`/`editing`\n would read as \"controlled, and closed\", pinning the control out of edit mode and making\n `defaultEditing` dead. */\n value: undefined,\n modelValue: undefined,\n isEditing: undefined,\n editing: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string];\n /** Replaces React's `onValueChange`. */\n 'value-change': [value: string];\n /** The `v-model:editing` half. */\n 'update:editing': [editing: boolean];\n /** Replaces React's `onEditingChange`. */\n 'editing-change': [editing: boolean];\n}>();\n\nconst attrs = useAttrs();\n\nconst valueCtl = useControlled<string>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? '',\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst editingCtl = useControlled<boolean>({\n controlled: () => (props.isEditing !== undefined ? props.isEditing : props.editing),\n default: () => props.defaultEditing,\n onChange: (next) => {\n emit('update:editing', next);\n emit('editing-change', next);\n },\n});\n\n/* Named `committed` / `editMode`, not `value` / `editing`: a setup const sharing a prop's\n name collides with it in the template scope (`vue/no-dupe-keys`). */\nconst committed = valueCtl.value;\nconst editMode = editingCtl.value;\n\nconst draft = ref(committed.value);\nconst inputEl = shallowRef<HTMLInputElement | null>(null);\n\n/* Syncs the draft when entering edit mode or when the committed value changes externally.\n Not `immediate` — `draft` is already seeded from `value` above, and nothing here touches\n the DOM, so there is no first-run work to do. */\nwatch([editMode, committed], ([isEditing, next]) => {\n if (isEditing) draft.value = next;\n});\n\nfunction submit(): void {\n valueCtl.setValue(draft.value);\n editingCtl.setValue(false);\n}\n\nfunction cancel(): void {\n draft.value = committed.value;\n editingCtl.setValue(false);\n}\n\n/* Live getters, not a snapshot — every flag on the root has to reach already-mounted parts. */\nprovide<EditableContextValue>(EditableKey, {\n get value() {\n return committed.value;\n },\n get draft() {\n return draft.value;\n },\n setDraft: (next) => {\n draft.value = next;\n },\n get isEditing() {\n return editMode.value;\n },\n setEditing: editingCtl.setValue,\n submit,\n cancel,\n get placeholder() {\n return props.placeholder;\n },\n get isDisabled() {\n return props.isDisabled;\n },\n get isReadOnly() {\n return props.isReadOnly;\n },\n get canSubmitOnBlur() {\n return props.canSubmitOnBlur;\n },\n get canSubmitOnEnter() {\n return props.canSubmitOnEnter;\n },\n get canCancelOnEscape() {\n return props.canCancelOnEscape;\n },\n inputEl,\n});\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn('inline-flex items-center gap-1.5', attrs.class as ClassValue),\n);\n</script>\n\n<template>\n <div :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <slot />\n <input v-if=\"name\" type=\"hidden\" :name=\"name\" :value=\"committed\" />\n </div>\n</template>\n","<script lang=\"ts\">\n/* No own props: React typed this `EditableButtonProps`, an alias of\n `ButtonHTMLAttributes<HTMLButtonElement>`, every member of which is a fallthrough attr here.\n The exported name lives on `EditableSubmit.vue`, which the folder's `index.ts` re-exports. */\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { X } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { Icon } from '../../../foundation/icons';\nimport { useEditableContext } from './EditableContext';\n\n/** The discard button. Rendered only while editing. */\ndefineOptions({ name: 'EditableCancel', inheritAttrs: false });\n\n/** The button content — defaults to a cross icon. React's `children`. */\ndefineSlots<{ default?(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLButtonElement>('el');\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useEditableContext();\n\n/* `mousedown` is prevented so this fires before the input's blur handler closes edit mode. */\nfunction onMousedown(event: MouseEvent): void {\n event.preventDefault();\n}\n\n/* Runs after any caller-supplied `@click` (declared after `v-bind`), exactly as React's\n `onClick?.(e)` ran before this body. */\nfunction onClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n ctx.cancel();\n}\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst buttonClass = computed(() =>\n cn(\n 'inline-flex h-8 w-8 items-center justify-center rounded-md text-destructive transition-colors hover:bg-destructive-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n attrs.class as ClassValue,\n ),\n);\n\nconst CloseIcon = X;\n\n/** The rendered `<button>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el });\n</script>\n\n<template>\n <button\n v-if=\"ctx.isEditing\"\n ref=\"el\"\n type=\"button\"\n aria-label=\"Cancel\"\n :class=\"buttonClass\"\n v-bind=\"passthroughAttrs\"\n @mousedown=\"onMousedown\"\n @click=\"onClick\"\n >\n <slot><Icon :icon=\"CloseIcon\" :size=\"14\" /></slot>\n </button>\n</template>\n","<script lang=\"ts\">\nimport type { InputSize, InputState } from '../InputStyles';\n\nexport interface EditableInputProps {\n /** The control size. */\n size?: InputSize;\n\n /** The validity surface. */\n state?: InputState;\n}\n/* React also inherited `Omit<InputBaseVariants, 'size' | 'state'>` — the `border` / `ring`\n axes — but never forwarded them to `inputBaseVariants`, so they were dead props that landed\n on the DOM as unknown attributes. They are not re-declared here; the two axes the original\n actually consumed are. */\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, useAttrs, watch } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { inputBaseVariants } from '../InputStyles';\nimport { useEditableContext } from './EditableContext';\n\n/** The edit-mode input. Rendered only while editing; focused and caret-to-end on entry. */\ndefineOptions({ name: 'EditableInput', inheritAttrs: false });\n\nconst props = defineProps<EditableInputProps>();\n\nconst attrs = useAttrs();\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useEditableContext();\n\n/* Focus + caret-to-end on entering edit mode. Reached only from `onMounted` (React's effect\n also ran on mount, which is what focuses an `defaultEditing` control) and from a NON-immediate\n post-flush watcher — an `immediate: true, flush: 'post'` watcher would run during SSR and\n throw on the element access. */\nfunction focusEnd(): void {\n const input = ctx.inputEl.value;\n if (!ctx.isEditing || !input) return;\n input.focus();\n const end = input.value.length;\n input.setSelectionRange(end, end);\n}\n\nonMounted(focusEnd);\nwatch(() => ctx.isEditing, focusEnd, { flush: 'post' });\n\nfunction setRef(node: unknown): void {\n ctx.inputEl.value = (node ?? null) as HTMLInputElement | null;\n}\n\nfunction onInput(event: Event): void {\n ctx.setDraft((event.target as HTMLInputElement).value);\n}\n\n/* Runs after any caller-supplied `@keydown` (declared after `v-bind`), exactly as React's\n `onKeyDown?.(e)` ran before this body. */\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented) return;\n if (ctx.canSubmitOnEnter && event.key === 'Enter') {\n event.preventDefault();\n ctx.submit();\n } else if (ctx.canCancelOnEscape && event.key === 'Escape') {\n event.preventDefault();\n ctx.cancel();\n }\n}\n\nfunction onBlur(event: FocusEvent): void {\n if (event.defaultPrevented) return;\n if (ctx.canSubmitOnBlur) ctx.submit();\n}\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst inputClass = computed(() =>\n cn(\n inputBaseVariants({ size: props.size, state: props.state }),\n attrs.class as ClassValue,\n ),\n);\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: ctx.inputEl });\n</script>\n\n<template>\n <input\n v-if=\"ctx.isEditing\"\n :ref=\"setRef\"\n type=\"text\"\n :value=\"ctx.draft\"\n :disabled=\"ctx.isDisabled\"\n :readonly=\"ctx.isReadOnly\"\n :class=\"inputClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onInput\"\n @keydown=\"onKeydown\"\n @blur=\"onBlur\"\n />\n</template>\n","<script lang=\"ts\">\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type -- kept as an\n exported name: React declared `EditablePreviewProps` (an alias of\n `HTMLAttributes<HTMLSpanElement>`) and consumers import it. Every attribute falls through. */\nexport interface EditablePreviewProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useEditableContext } from './EditableContext';\n\n/** The read-mode surface. Clicking (or Enter/Space) enters edit mode. */\ndefineOptions({ name: 'EditablePreview', inheritAttrs: false });\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLSpanElement>('el');\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useEditableContext();\n\nconst interactive = computed(() => !ctx.isDisabled && !ctx.isReadOnly);\nconst isEmpty = computed(() => !ctx.value);\n\n/* Runs after any caller-supplied `@click` (declared after `v-bind`), exactly as React's\n `onClick?.(e)` ran before this body. */\nfunction onClick(event: MouseEvent): void {\n if (event.defaultPrevented || !interactive.value) return;\n ctx.setEditing(true);\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented || !interactive.value) return;\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n ctx.setEditing(true);\n }\n}\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst previewClass = computed(() =>\n cn(\n 'cursor-text rounded-sm px-1 py-0.5 text-sm text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n isEmpty.value && 'italic text-subtle-foreground',\n !interactive.value && 'cursor-default hover:bg-transparent',\n attrs.class as ClassValue,\n ),\n);\n\n/** The rendered `<span>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el });\n</script>\n\n<template>\n <span\n v-if=\"!ctx.isEditing\"\n ref=\"el\"\n :role=\"interactive ? 'button' : undefined\"\n :tabindex=\"interactive ? 0 : -1\"\n :aria-disabled=\"!interactive || undefined\"\n :class=\"previewClass\"\n v-bind=\"passthroughAttrs\"\n @click=\"onClick\"\n @keydown=\"onKeydown\"\n >\n {{ ctx.value || ctx.placeholder }}\n </span>\n</template>\n","<script lang=\"ts\">\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type -- kept as an\n exported name: React declared `EditableButtonProps` (an alias of\n `ButtonHTMLAttributes<HTMLButtonElement>`) and consumers import it, and both\n `EditableSubmit` and `EditableCancel` are typed by it. Every attribute falls through. */\nexport interface EditableButtonProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Check } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { Icon } from '../../../foundation/icons';\nimport { useEditableContext } from './EditableContext';\n\n/** The commit button. Rendered only while editing. */\ndefineOptions({ name: 'EditableSubmit', inheritAttrs: false });\n\n/** The button content — defaults to a check icon. React's `children`. */\ndefineSlots<{ default?(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLButtonElement>('el');\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useEditableContext();\n\n/* `mousedown` is prevented so this fires before the input's blur handler closes edit mode. */\nfunction onMousedown(event: MouseEvent): void {\n event.preventDefault();\n}\n\n/* Runs after any caller-supplied `@click` (declared after `v-bind`), exactly as React's\n `onClick?.(e)` ran before this body. */\nfunction onClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n ctx.submit();\n}\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst buttonClass = computed(() =>\n cn(\n 'inline-flex h-8 w-8 items-center justify-center rounded-md text-success transition-colors hover:bg-success-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n attrs.class as ClassValue,\n ),\n);\n\nconst CheckIcon = Check;\n\n/** The rendered `<button>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el });\n</script>\n\n<template>\n <button\n v-if=\"ctx.isEditing\"\n ref=\"el\"\n type=\"button\"\n aria-label=\"Submit\"\n :class=\"buttonClass\"\n v-bind=\"passthroughAttrs\"\n @mousedown=\"onMousedown\"\n @click=\"onClick\"\n >\n <slot><Icon :icon=\"CheckIcon\" :size=\"14\" /></slot>\n </button>\n</template>\n","import { inject, type InjectionKey } from 'vue';\n\n/** Describes one registered wizard step. */\nexport interface StepInfo {\n id: string;\n /** React typed this `ReactNode`; it is scalar here because `WizardSteps` renders it as\n * the tab's text. A rich step tab is not part of the original's contract either. */\n label?: string | number;\n isOptional?: boolean;\n isFinal?: boolean;\n}\n\n/**\n * The seam between `Wizard` and its `Steps` / `Step` / `Footer` children.\n *\n * React attached those as `Wizard.Steps` / `.Step` / `.Footer` statics over a `createContext`,\n * and pre-walked `Children.toArray` to discover step ids before mount. An SFC's default export\n * cannot carry statics and Vue has no children-walk, so the parts ship as siblings and register\n * themselves through provide/inject — the same conversion `checkboxGroup` / `radioGroup` made.\n *\n * Every field but the functions is a live getter — read them off the object, don't destructure.\n */\nexport interface WizardContextValue {\n readonly steps: ReadonlyArray<StepInfo>;\n readonly currentIndex: number;\n readonly currentStep: StepInfo | undefined;\n goTo: (idOrIndex: string | number) => void;\n next: () => Promise<void>;\n back: () => void;\n readonly canGoBack: boolean;\n readonly visited: ReadonlySet<string>;\n registerStep: (info: StepInfo) => void;\n unregisterStep: (id: string) => void;\n registerValidator: (id: string, validator: () => boolean | Promise<boolean>) => void;\n unregisterValidator: (id: string) => void;\n readonly isPending: boolean;\n}\n\nexport const wizardContextKey: InjectionKey<WizardContextValue> = Symbol('wow-two.wizard');\n\n/** Reads the surrounding wizard context; throws when used outside a `<Wizard>`. */\nexport function useWizard(): WizardContextValue {\n const ctx = inject(wizardContextKey, null);\n if (!ctx) throw new Error('useWizard must be used inside <Wizard>');\n return ctx;\n}\n","<script lang=\"ts\">\nexport interface WizardProps {\n /** The active step id, controlled. The `v-model:current-step` binding target. */\n currentStep?: string;\n\n /** The initial active step id when uncontrolled. Defaults to the first registered step. */\n defaultCurrentStep?: string;\n\n /**\n * The completion handler, awaited on the final step's Next.\n *\n * Kept a PROP, not an emit: the root AWAITS its result to hold `isPending`, and an emit\n * returns nothing to await.\n */\n onComplete?: () => void | Promise<void>;\n\n /** Whether the Back control and step back-jumps are available. Default `true`. */\n canGoBack?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, ref, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { wizardContextKey, type StepInfo, type WizardContextValue } from './WizardContext';\n\n/**\n * Wizard root. Owns the step registry, the active step, and the pending flag, and publishes\n * them to `WizardSteps` / `WizardStep` / `WizardFooter` through injection.\n */\n/* `inheritAttrs: false` so `class` folds into the root's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'Wizard', inheritAttrs: false });\n\n/** The wizard tree — the step strip, the steps, and the footer. React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<WizardProps>(), {\n canGoBack: true,\n /* Explicit `undefined` default: `useControlled` keys on `=== undefined`. */\n currentStep: undefined,\n defaultCurrentStep: undefined,\n onComplete: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model:current-step` half. */\n 'update:currentStep': [step: string];\n /** Replaces React's `onStepChange`. */\n 'step-change': [step: string];\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst steps = ref<Array<StepInfo>>([]);\n/* A plain Map, matching React's: it is only ever read inside `next()`, never rendered. */\nconst validators = new Map<string, () => boolean | Promise<boolean>>();\n\nconst stepCtl = useControlled<string>({\n controlled: () => props.currentStep,\n default: () => props.defaultCurrentStep ?? '',\n onChange: (next) => {\n emit('update:currentStep', next);\n emit('step-change', next);\n },\n});\n\n/**\n * The active step id.\n *\n * React pre-walked its children to seed the first step id before anything mounted. Vue steps\n * register on mount instead, so the first registered id is the fallback — resolved here rather\n * than written through `setValue`, which would fire a spurious `step-change` on mount.\n */\nconst activeStepId = computed(() => stepCtl.value.value || (steps.value[0]?.id ?? ''));\n\nconst visitedSet = ref<ReadonlySet<string>>(new Set<string>());\n/* The first step counts as visited without an explicit `goTo`, exactly as React seeded it. */\nconst visited = computed<ReadonlySet<string>>(() => {\n const first = steps.value[0]?.id;\n if (!first) return visitedSet.value;\n return new Set([...visitedSet.value, first]);\n});\n\nconst isPending = ref(false);\n\nconst currentIndex = computed(() => steps.value.findIndex((s) => s.id === activeStepId.value));\nconst currentStepInfo = computed<StepInfo | undefined>(() => steps.value[currentIndex.value]);\n\nfunction registerStep(info: StepInfo): void {\n const idx = steps.value.findIndex((s) => s.id === info.id);\n if (idx >= 0) {\n const next = steps.value.slice();\n next[idx] = info;\n steps.value = next;\n return;\n }\n steps.value = [...steps.value, info];\n}\n\nfunction unregisterStep(id: string): void {\n steps.value = steps.value.filter((s) => s.id !== id);\n}\n\nfunction registerValidator(id: string, validator: () => boolean | Promise<boolean>): void {\n validators.set(id, validator);\n}\n\nfunction unregisterValidator(id: string): void {\n validators.delete(id);\n}\n\nfunction goTo(idOrIndex: string | number): void {\n const target = typeof idOrIndex === 'number' ? steps.value[idOrIndex]?.id : idOrIndex;\n if (!target) return;\n stepCtl.setValue(target);\n visitedSet.value = new Set([...visitedSet.value, target]);\n}\n\nasync function next(): Promise<void> {\n const step = currentStepInfo.value;\n if (!step || isPending.value) return;\n const validator = validators.get(step.id);\n if (validator) {\n isPending.value = true;\n try {\n const ok = await validator();\n if (!ok) return;\n } finally {\n isPending.value = false;\n }\n }\n if (step.isFinal) {\n isPending.value = true;\n try {\n await props.onComplete?.();\n } finally {\n isPending.value = false;\n }\n return;\n }\n const nextStep = steps.value[currentIndex.value + 1];\n if (nextStep) goTo(nextStep.id);\n}\n\nfunction back(): void {\n if (!props.canGoBack) return;\n const prev = steps.value[currentIndex.value - 1];\n if (prev) goTo(prev.id);\n}\n\n/* Live getters, not a snapshot — every part re-reads the registry as it changes. */\nprovide<WizardContextValue>(wizardContextKey, {\n get steps() {\n return steps.value;\n },\n get currentIndex() {\n return currentIndex.value;\n },\n get currentStep() {\n return currentStepInfo.value;\n },\n goTo,\n next,\n back,\n get canGoBack() {\n return props.canGoBack;\n },\n get visited() {\n return visited.value;\n },\n registerStep,\n unregisterStep,\n registerValidator,\n unregisterValidator,\n get isPending() {\n return isPending.value;\n },\n});\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() => cn('flex flex-col gap-4', attrs.class as ClassValue));\n\n/** The rendered root `<div>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" :class=\"rootClass\" v-bind=\"passthroughAttrs\"><slot /></div>\n</template>\n","<script lang=\"ts\">\nexport interface WizardFooterProps {\n /** The Back button's text. Fill the `prevLabel` slot for richer content. */\n prevLabel?: string | number;\n\n /** The Next button's text. Fill the `nextLabel` slot for richer content. */\n nextLabel?: string | number;\n\n /** The final step's confirm text. Fill the `submitLabel` slot for richer content. */\n submitLabel?: string | number;\n\n /** The visibility of the Prev button when not on first step. Default true. */\n hasPrev?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useWizard } from './WizardContext';\n\n/** The Back / Next (or Finish) control row. */\ndefineOptions({ name: 'WizardFooter', inheritAttrs: false });\n\ndefineSlots<{\n prevLabel?(): unknown;\n nextLabel?(): unknown;\n submitLabel?(): unknown;\n}>();\n\nwithDefaults(defineProps<WizardFooterProps>(), {\n prevLabel: 'Back',\n nextLabel: 'Next',\n submitLabel: 'Finish',\n hasPrev: true,\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useWizard();\n\nconst isFirst = computed(() => ctx.currentIndex === 0);\nconst isFinal = computed(() => ctx.currentStep?.isFinal ?? false);\nconst showPrevButton = computed(() => ctx.canGoBack && !isFirst.value);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rowClass = computed(() =>\n cn('mt-2 flex items-center justify-between gap-3', attrs.class as ClassValue),\n);\n\nfunction onNext(): void {\n void ctx.next();\n}\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" :class=\"rowClass\" v-bind=\"passthroughAttrs\">\n <button\n v-if=\"hasPrev && showPrevButton\"\n type=\"button\"\n :disabled=\"ctx.isPending\"\n class=\"inline-flex h-9 items-center rounded-md border border-border bg-background px-4 text-sm font-medium hover:bg-muted disabled:opacity-50\"\n @click=\"ctx.back()\"\n >\n <slot name=\"prevLabel\">{{ prevLabel }}</slot>\n </button>\n <span v-else />\n <button\n type=\"button\"\n :disabled=\"ctx.isPending\"\n class=\"inline-flex h-9 items-center rounded-md bg-primary px-4 text-sm font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50\"\n @click=\"onNext\"\n >\n <template v-if=\"ctx.isPending\">…</template>\n <slot v-else-if=\"isFinal\" name=\"submitLabel\">{{ submitLabel }}</slot>\n <slot v-else name=\"nextLabel\">{{ nextLabel }}</slot>\n </button>\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface WizardStepProps {\n /** The step id — the value `currentStep` takes when this step is active. */\n id: string;\n\n /** The step-strip label. Defaults to the id. */\n label?: string | number;\n\n /**\n * The gate run before advancing off this step. Resolving `false` blocks the move.\n *\n * Kept a PROP, not an emit: it RETURNS a verdict (possibly a promise), which an emit\n * cannot do.\n */\n validate?: () => boolean | Promise<boolean>;\n\n /** Whether the step strip marks this step `(optional)`. */\n isOptional?: boolean;\n\n /** Whether this is the last step — Next becomes the submit action. */\n isFinal?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, useAttrs, useTemplateRef, watch } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useWizard } from './WizardContext';\n\n/** One wizard panel. Registers its metadata and validator; renders only while active. */\ndefineOptions({ name: 'WizardStep', inheritAttrs: false });\n\n/** The panel content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = defineProps<WizardStepProps>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useWizard();\n\nconst isCurrent = computed(() => ctx.currentStep?.id === props.id);\n\n/* Register / refresh step metadata. `immediate` so the step is in the registry from mount —\n nothing here touches the DOM, so it is safe during SSR. */\nwatch(\n () => ({\n id: props.id,\n label: props.label,\n isOptional: props.isOptional,\n isFinal: props.isFinal,\n }),\n (info) => ctx.registerStep(info),\n { immediate: true, deep: true },\n);\n\nwatch(\n [() => props.id, () => props.validate],\n ([id, validate]) => {\n if (validate) ctx.registerValidator(id, validate);\n else ctx.unregisterValidator(id);\n },\n { immediate: true },\n);\n\nonBeforeUnmount(() => {\n ctx.unregisterStep(props.id);\n ctx.unregisterValidator(props.id);\n});\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst panelClass = computed(() => cn('flex flex-col gap-3', attrs.class as ClassValue));\n\nconst labelledBy = computed(() => `wizard-step-${props.id}`);\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n v-if=\"isCurrent\"\n ref=\"el\"\n role=\"tabpanel\"\n :aria-labelledby=\"labelledBy\"\n :class=\"panelClass\"\n v-bind=\"passthroughAttrs\"\n >\n <slot />\n </div>\n</template>\n","<script lang=\"ts\">\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type -- kept as an\n exported name: React declared `WizardStepsProps` (an alias of `HTMLAttributes<HTMLDivElement>`)\n and consumers import it. Every attribute falls through. */\nexport interface WizardStepsProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useWizard, type StepInfo } from './WizardContext';\n\n/** The clickable step strip. Visited steps are re-selectable while `canGoBack`. */\ndefineOptions({ name: 'WizardSteps', inheritAttrs: false });\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\n/* `ctx` is a live-getter object — read fields off it, never destructure. */\nconst ctx = useWizard();\n\nfunction canJump(step: StepInfo): boolean {\n return ctx.canGoBack && ctx.visited.has(step.id);\n}\n\nfunction onStepClick(step: StepInfo): void {\n if (canJump(step)) ctx.goTo(step.id);\n}\n\nfunction tabClass(step: StepInfo, index: number): string {\n const isCurrent = ctx.currentIndex === index;\n const wasVisited = ctx.visited.has(step.id);\n return cn(\n 'flex items-center gap-2 rounded-md px-3 py-1.5 text-xs font-medium transition-colors',\n isCurrent\n ? 'bg-primary text-primary-foreground'\n : wasVisited\n ? 'bg-muted text-foreground hover:bg-muted/70'\n : 'text-muted-foreground',\n !canJump(step) && 'cursor-default',\n );\n}\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst stripClass = computed(() =>\n cn('flex items-center gap-2 overflow-x-auto', attrs.class as ClassValue),\n);\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n ref=\"el\"\n role=\"tablist\"\n aria-label=\"Wizard steps\"\n :class=\"stripClass\"\n v-bind=\"passthroughAttrs\"\n >\n <button\n v-for=\"(step, i) in ctx.steps\"\n :key=\"step.id\"\n type=\"button\"\n role=\"tab\"\n :aria-selected=\"ctx.currentIndex === i\"\n :aria-disabled=\"!canJump(step) || undefined\"\n :class=\"tabClass(step, i)\"\n @click=\"onStepClick(step)\"\n >\n <span class=\"grid h-5 w-5 place-items-center rounded-full bg-background/20 text-[10px]\">\n {{ i + 1 }}\n </span>\n {{ step.label ?? step.id }}\n <span v-if=\"step.isOptional\" class=\"ml-1 text-[10px] opacity-70\">(optional)</span>\n </button>\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface CodeEditorProps {\n /** The source text, controlled — React's spelling, which wins when both are set. */\n value?: string;\n\n /** The source text, controlled. The `v-model` binding target. */\n modelValue?: string;\n\n /** The initial source text when uncontrolled. */\n defaultValue?: string;\n\n /** The forward-compat hint; unused by this first-gen component. */\n language?: string;\n\n /** The number of spaces one indent step inserts. Default `2`. */\n tabSize?: number;\n\n /** Whether indenting inserts a tab character instead of `tabSize` spaces. Default `false`. */\n isTabIndented?: boolean;\n\n /** The invalid surface override. Falls back to the surrounding form control's `isInvalid`. */\n isInvalid?: boolean;\n\n /** The CSS minHeight on the surface (default `12rem`). */\n minHeight?: string;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The read-only state — React's spelling. Falls back to the form control's `isReadOnly`. */\n readOnly?: boolean;\n\n /** The DOM spelling of {@link CodeEditorProps.readOnly}, which wins when both are set. */\n readonly?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, ref, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\n\n/**\n * First-generation code editor — styled `<textarea>` + line-number gutter +\n * Tab/Shift-Tab indent handling. **No syntax highlighting** (deferred to a\n * follow-up wrapping Monaco / CodeMirror inside this contract).\n */\n/* `inheritAttrs: false` so `class` folds into the surface's own `cn()` call, and so the rest\n of the attrs land on the inner `<textarea>` rather than the surface. */\ndefineOptions({ name: 'CodeEditor', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<CodeEditorProps>(), {\n tabSize: 2,\n isTabIndented: false,\n minHeight: '12rem',\n /* Explicit `undefined` defaults: `useControlled` keys on `=== undefined`, and Vue casts an\n absent `boolean` prop to `false` — which would shadow the form control context. */\n value: undefined,\n modelValue: undefined,\n isInvalid: undefined,\n disabled: undefined,\n readOnly: undefined,\n readonly: undefined,\n required: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string];\n /** Replaces React's `onValueChange`. */\n 'value-change': [value: string];\n}>();\n\nconst attrs = useAttrs();\n\nconst controlled = useControlled<string>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? '',\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst source = controlled.value;\n\n/* Inherits id/flags/describedby from a surrounding <Field>; explicit props win. */\nconst ctx = useFormControl();\nconst finalDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst finalReadOnly = computed(() => props.readonly ?? props.readOnly ?? ctx?.isReadOnly);\nconst finalInvalid = computed(() => props.isInvalid ?? ctx?.isInvalid);\n\nconst textarea = useTemplateRef<HTMLTextAreaElement>('textarea');\nconst scrollTop = ref(0);\n\nconst lineCount = computed(() => source.value.split('\\n').length);\nconst indentChar = computed(() => (props.isTabIndented ? '\\t' : ' '.repeat(props.tabSize)));\n\n// Generate line-number string once per line count.\nconst gutterText = computed(() =>\n Array.from({ length: lineCount.value }, (_, i) => String(i + 1)).join('\\n'),\n);\n\nfunction insertAtSelection(insert: string, selStart: number, selEnd: number): number {\n const next = source.value.slice(0, selStart) + insert + source.value.slice(selEnd);\n controlled.setValue(next);\n return selStart + insert.length;\n}\n\n/**\n * Restores the caret after a programmatic edit.\n *\n * React reached for `requestAnimationFrame` to wait out its re-render; `nextTick` is the exact\n * Vue equivalent — it resolves after the reactive update has been flushed to the DOM — and it\n * keeps a browser global out of this file entirely (`requestAnimationFrame` is undefined during\n * SSR, and this handler is only unreachable there by accident of it being a DOM event).\n */\nfunction restoreSelection(start: number, end: number): void {\n void nextTick(() => {\n const ta = textarea.value;\n if (!ta) return;\n ta.selectionStart = start;\n ta.selectionEnd = end;\n });\n}\n\n/* Runs after any caller-supplied `@keydown` (declared after `v-bind`), exactly as React's\n `onKeyDown?.(e)` ran before this body. */\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented || finalDisabled.value || finalReadOnly.value) return;\n if (event.key !== 'Tab') return;\n\n const ta = event.currentTarget as HTMLTextAreaElement;\n const start = ta.selectionStart;\n const end = ta.selectionEnd;\n const text = source.value;\n\n event.preventDefault();\n\n if (start === end) {\n if (event.shiftKey) {\n // Outdent at cursor's line.\n const lineStart = text.lastIndexOf('\\n', start - 1) + 1;\n const lineSlice = text.slice(lineStart, start);\n const match = props.isTabIndented ? /^\\t/ : new RegExp(`^ {1,${props.tabSize}}`);\n const m = match.exec(lineSlice);\n if (m) {\n const next = text.slice(0, lineStart) + lineSlice.slice(m[0].length) + text.slice(start);\n controlled.setValue(next);\n const newPos = start - m[0].length;\n restoreSelection(newPos, newPos);\n }\n } else {\n const newPos = insertAtSelection(indentChar.value, start, end);\n restoreSelection(newPos, newPos);\n }\n return;\n }\n\n // Multi-line indent / outdent.\n const before = text.slice(0, start);\n const between = text.slice(start, end);\n const after = text.slice(end);\n const lineStartOffset = before.lastIndexOf('\\n') + 1;\n const blockStart = before.slice(0, lineStartOffset);\n const block = before.slice(lineStartOffset) + between;\n let newStart: number;\n let newEnd: number;\n if (event.shiftKey) {\n const re = props.isTabIndented ? /^\\t/gm : new RegExp(`^ {1,${props.tabSize}}`, 'gm');\n let removedTotal = 0;\n let removedFirst = 0;\n const outdented = block.replace(re, (m, offset: number) => {\n removedTotal += m.length;\n if (offset === 0) removedFirst = m.length;\n return '';\n });\n controlled.setValue(blockStart + outdented + after);\n newStart = Math.max(lineStartOffset, start - removedFirst);\n newEnd = Math.max(newStart, end - removedTotal);\n } else {\n const relEnd = end - lineStartOffset;\n let inserted = 0;\n const indented = block.replace(/^/gm, (_m, offset: number) => {\n if (offset < relEnd) inserted++;\n return indentChar.value;\n });\n controlled.setValue(blockStart + indented + after);\n newStart = start + indentChar.value.length;\n newEnd = end + indentChar.value.length * inserted;\n }\n restoreSelection(newStart, newEnd);\n}\n\nfunction onInput(event: Event): void {\n controlled.setValue((event.target as HTMLTextAreaElement).value);\n}\n\nfunction onScroll(event: Event): void {\n scrollTop.value = (event.currentTarget as HTMLTextAreaElement).scrollTop;\n}\n\nconst state = computed(() => (finalInvalid.value ? 'invalid' : 'default'));\n\n/* Never a declared prop — a declared `'aria-describedby'` would arrive as\n `props.ariaDescribedby` and stop reaching the DOM. */\nconst ariaDescribedBy = computed(() => attrs['aria-describedby'] as string | undefined);\n\nconst textareaId = computed(() => props.id ?? ctx?.id);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst describedBy = computed(() => ariaDescribedBy.value ?? ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class', 'aria-describedby']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst surfaceClass = computed(() =>\n cn(\n 'relative flex overflow-hidden rounded-md border border-input bg-card text-card-foreground font-mono text-sm shadow-sm',\n 'focus-within:border-ring focus-within:ring-2 focus-within:ring-ring/40',\n state.value === 'invalid' &&\n 'border-destructive focus-within:border-destructive focus-within:ring-destructive/40',\n finalDisabled.value && 'cursor-not-allowed opacity-60',\n attrs.class as ClassValue,\n ),\n);\n\nconst gutterStyle = computed(() => ({ transform: `translateY(${-scrollTop.value}px)` }));\n\n/** The rendered `<textarea>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: textarea });\n</script>\n\n<template>\n <div\n :data-state=\"state\"\n :data-language=\"language || undefined\"\n :data-disabled=\"finalDisabled || undefined\"\n :data-readonly=\"finalReadOnly || undefined\"\n :class=\"surfaceClass\"\n :style=\"{ minHeight }\"\n >\n <!-- React held a ref on this gutter that it never read; dropped rather than kept dead. -->\n <div\n aria-hidden=\"true\"\n class=\"select-none overflow-hidden border-r border-border bg-muted/40 text-right text-muted-foreground tabular-nums\"\n >\n <div class=\"whitespace-pre px-3 py-2\" :style=\"gutterStyle\">{{ gutterText }}</div>\n </div>\n <textarea\n ref=\"textarea\"\n :value=\"source\"\n :id=\"textareaId\"\n :disabled=\"finalDisabled\"\n :readonly=\"finalReadOnly\"\n :required=\"isRequired\"\n :spellcheck=\"false\"\n :aria-invalid=\"finalInvalid || undefined\"\n :aria-describedby=\"describedBy\"\n class=\"block flex-1 resize-none whitespace-pre overflow-auto bg-transparent px-3 py-2 outline-none placeholder:text-subtle-foreground disabled:cursor-not-allowed\"\n v-bind=\"passthroughAttrs\"\n @input=\"onInput\"\n @keydown=\"onKeydown\"\n @scroll=\"onScroll\"\n />\n </div>\n</template>\n","<script lang=\"ts\">\nimport { Marked } from 'marked';\nimport { Bold, Code, Heading1, Heading2, Italic, Link2, List, Quote } from 'lucide-vue-next';\nimport type { IconAdapter } from '../../../foundation/icons';\n\n/** Defines the pane layout of a markdown editor. */\nexport const MarkdownEditorView = {\n /** Refers to editor + preview shown side by side. */\n Split: 'split',\n /** Refers to the editor pane only. */\n Edit: 'edit',\n /** Refers to the rendered-preview pane only. */\n Preview: 'preview',\n} as const;\n\nexport type MarkdownEditorView = (typeof MarkdownEditorView)[keyof typeof MarkdownEditorView];\n\nexport interface MarkdownEditorProps {\n /** The markdown source, controlled — React's spelling, which wins when both are set. */\n value?: string;\n\n /** The markdown source, controlled. The `v-model` binding target. */\n modelValue?: string;\n\n /** The initial markdown source when uncontrolled. */\n defaultValue?: string;\n\n /** The pane layout, controlled. The `v-model:view` binding target. */\n view?: MarkdownEditorView;\n\n /** The initial pane layout when uncontrolled. Default `split`. */\n defaultView?: MarkdownEditorView;\n\n /** The invalid surface override. Falls back to the surrounding form control's `isInvalid`. */\n isInvalid?: boolean;\n\n /** The CSS minHeight on the surface (default `18rem`). */\n minHeight?: string;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The read-only state — React's spelling. Falls back to the form control's `isReadOnly`. */\n readOnly?: boolean;\n\n /** The DOM spelling of {@link MarkdownEditorProps.readOnly}, which wins when both are set. */\n readonly?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n}\n\n/** Describes the selection a toolbar action operates on. */\ninterface ToolbarSelection {\n value: string;\n start: number;\n end: number;\n}\n\n/** Describes the edit a toolbar action produces. */\ninterface ToolbarEdit {\n value: string;\n selStart: number;\n selEnd: number;\n}\n\ninterface ToolbarAction {\n key: string;\n label: string;\n /* React held a rendered `ReactNode` here; an SFC's plain script block cannot carry JSX, so\n the icon COMPONENT is stored and `<Icon>` renders it in the template. */\n icon: IconAdapter;\n apply: (sel: ToolbarSelection) => ToolbarEdit;\n}\n\nconst wrap =\n (before: string, after: string) =>\n ({ value, start, end }: ToolbarSelection): ToolbarEdit => {\n const sel = value.slice(start, end);\n const next = value.slice(0, start) + before + sel + after + value.slice(end);\n const selStart = start + before.length;\n return { value: next, selStart, selEnd: selStart + sel.length };\n };\n\nconst linePrefix =\n (prefix: string) =>\n ({ value, start, end }: ToolbarSelection): ToolbarEdit => {\n const lineStart = value.lastIndexOf('\\n', start - 1) + 1;\n const trailing = value.slice(end).indexOf('\\n');\n const lineEnd = trailing === -1 ? value.length : end + trailing;\n const block = value.slice(lineStart, lineEnd);\n const updated = block\n .split('\\n')\n .map((l) => prefix + l)\n .join('\\n');\n const next = value.slice(0, lineStart) + updated + value.slice(lineEnd);\n return { value: next, selStart: lineStart + prefix.length, selEnd: lineStart + updated.length };\n };\n\nconst escapeHtml = (html: string) =>\n html\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n\n// Only protocols a markdown link/image may navigate to from the preview;\n// anything else (javascript:, data:, vbscript:, …) is dropped.\nconst SAFE_URL = /^(?:https?:|mailto:|tel:|[^a-z0-9.+-]|[a-z0-9.+-]*$)/i;\n\nconst safeUrl = (href: string) => (SAFE_URL.test(href.trim()) ? href : null);\n\n// Local marked instance whose raw-HTML tokens render as escaped text, so\n// embedded HTML (e.g. `<img onerror=…>`) is inert in the default preview,\n// and whose link/image URLs are protocol-filtered (no `javascript:` links).\n// Markdown formatting is unaffected. Consumers needing real HTML fill the\n// `preview` slot and sanitize themselves.\nconst previewMarked = new Marked({\n renderer: {\n html({ text }) {\n return escapeHtml(text);\n },\n link({ href, title, tokens }) {\n const url = safeUrl(href);\n const text = this.parser.parseInline(tokens);\n if (url === null) return text;\n const titleAttr = title ? ` title=\"${escapeHtml(title)}\"` : '';\n return `<a href=\"${escapeHtml(url)}\"${titleAttr}>${text}</a>`;\n },\n image({ href, title, text }) {\n const url = safeUrl(href);\n if (url === null) return escapeHtml(text);\n const titleAttr = title ? ` title=\"${escapeHtml(title)}\"` : '';\n return `<img src=\"${escapeHtml(url)}\" alt=\"${escapeHtml(text)}\"${titleAttr}>`;\n },\n },\n});\n\nconst ACTIONS: ReadonlyArray<ToolbarAction> = [\n { key: 'h1', label: 'Heading 1', icon: Heading1, apply: linePrefix('# ') },\n { key: 'h2', label: 'Heading 2', icon: Heading2, apply: linePrefix('## ') },\n { key: 'bold', label: 'Bold', icon: Bold, apply: wrap('**', '**') },\n { key: 'italic', label: 'Italic', icon: Italic, apply: wrap('*', '*') },\n { key: 'code', label: 'Inline code', icon: Code, apply: wrap('`', '`') },\n { key: 'link', label: 'Link', icon: Link2, apply: wrap('[', '](https://)') },\n { key: 'list', label: 'List', icon: List, apply: linePrefix('- ') },\n { key: 'quote', label: 'Blockquote', icon: Quote, apply: linePrefix('> ') },\n];\n\n/* Hoisted out of the template — the runtime template compiler resolves plain identifiers,\n not array literals built from an imported enum. */\nconst VIEW_ORDER: ReadonlyArray<MarkdownEditorView> = [\n MarkdownEditorView.Edit,\n MarkdownEditorView.Split,\n MarkdownEditorView.Preview,\n];\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled, useId } from '../../../foundation/hooks';\nimport { Icon } from '../../../foundation/icons';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { InputState } from '../InputStyles';\n\n/**\n * Markdown input + live preview. Toolbar wraps selection with syntax;\n * preview pane renders via `marked` with raw HTML escaped to inert text\n * (XSS-safe by default). Fill the `preview` slot to opt out — the consumer\n * is then responsible for sanitizing. Three view modes: `split` / `edit` /\n * `preview`.\n */\n/* `inheritAttrs: false` so `class` folds into the surface's own `cn()` call, and so the rest\n of the attrs land on the inner `<textarea>` rather than the surface. */\ndefineOptions({ name: 'MarkdownEditor', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<MarkdownEditorProps>(), {\n minHeight: '18rem',\n /* Explicit `undefined` defaults: `useControlled` keys on `=== undefined`, and Vue casts an\n absent `boolean` prop to `false` — which would shadow the form control context. */\n value: undefined,\n modelValue: undefined,\n view: undefined,\n defaultView: undefined,\n isInvalid: undefined,\n disabled: undefined,\n readOnly: undefined,\n readonly: undefined,\n required: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string];\n /** Replaces React's `onValueChange`. */\n 'value-change': [value: string];\n /** The `v-model:view` half. */\n 'update:view': [view: MarkdownEditorView];\n /** Replaces React's `onViewChange`. */\n 'view-change': [view: MarkdownEditorView];\n}>();\n\ndefineSlots<{\n /** Replaces the rendered preview pane — React's `renderPreview`. Filling it opts out of\n * the built-in `marked` render, and the consumer owns sanitizing. */\n preview?(props: { markdown: string }): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\n\nconst valueCtl = useControlled<string>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? '',\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst viewCtl = useControlled<MarkdownEditorView>({\n controlled: () => props.view,\n default: () => props.defaultView ?? MarkdownEditorView.Split,\n onChange: (next) => {\n emit('update:view', next);\n emit('view-change', next);\n },\n});\n\n/* Named `markdown` / `mode`, not `value` / `view`: a setup const sharing a prop's name\n collides with it in the template scope (`vue/no-dupe-keys`). */\nconst markdown = valueCtl.value;\nconst mode = viewCtl.value;\n\nconst textarea = useTemplateRef<HTMLTextAreaElement>('textarea');\nconst generatedId = useId('markdown-editor');\n\n/* Inherits id/flags/describedby from a surrounding <Field>; explicit props win.\n The context wires the EDITING surface (textarea) only — the preview pane is\n read-only chrome, not the control. */\nconst ctx = useFormControl();\nconst finalDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst finalReadOnly = computed(() => props.readonly ?? props.readOnly ?? ctx?.isReadOnly);\nconst finalInvalid = computed(() => props.isInvalid ?? ctx?.isInvalid);\n\nconst hasPreviewSlot = computed(() => Boolean(slots.preview));\n\nconst previewHtml = computed(() => {\n if (hasPreviewSlot.value) return null;\n try {\n return previewMarked.parse(markdown.value, { async: false }) as string;\n } catch {\n return '<p>Failed to render preview.</p>';\n }\n});\n\nfunction applyAction(action: ToolbarAction): void {\n const ta = textarea.value;\n if (!ta) return;\n const next = action.apply({\n value: markdown.value,\n start: ta.selectionStart ?? markdown.value.length,\n end: ta.selectionEnd ?? markdown.value.length,\n });\n valueCtl.setValue(next.value);\n /* React reached for `requestAnimationFrame` to wait out its re-render; `nextTick` resolves\n after the reactive update has been flushed to the DOM, and keeps a browser global out of\n this file. */\n void nextTick(() => {\n ta.focus();\n ta.selectionStart = next.selStart;\n ta.selectionEnd = next.selEnd;\n });\n}\n\nfunction onInput(event: Event): void {\n valueCtl.setValue((event.target as HTMLTextAreaElement).value);\n}\n\nconst showEdit = computed(\n () => mode.value === MarkdownEditorView.Split || mode.value === MarkdownEditorView.Edit,\n);\nconst showPreview = computed(\n () => mode.value === MarkdownEditorView.Split || mode.value === MarkdownEditorView.Preview,\n);\n\nconst state = computed(() => (finalInvalid.value ? InputState.Invalid : InputState.Default));\n\n/* Never a declared prop — a declared `'aria-describedby'` would arrive as\n `props.ariaDescribedby` and stop reaching the DOM. */\nconst ariaDescribedBy = computed(() => attrs['aria-describedby'] as string | undefined);\n\nconst textareaId = computed(() => props.id ?? ctx?.id ?? generatedId);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst describedBy = computed(() => ariaDescribedBy.value ?? ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class', 'aria-describedby']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst surfaceClass = computed(() =>\n cn(\n 'flex flex-col overflow-hidden rounded-md border border-input bg-card text-card-foreground shadow-sm',\n state.value === InputState.Invalid && 'border-destructive',\n finalDisabled.value && 'opacity-60',\n attrs.class as ClassValue,\n ),\n);\n\nconst textareaClass = computed(() =>\n cn(\n 'flex-1 resize-none whitespace-pre-wrap break-words bg-transparent p-3 font-mono text-sm outline-none placeholder:text-subtle-foreground disabled:cursor-not-allowed',\n showPreview.value && 'border-r-0',\n ),\n);\n\nfunction viewButtonClass(v: MarkdownEditorView): string {\n return cn(\n 'inline-flex h-6 items-center rounded px-2 text-xs font-medium transition-colors',\n mode.value === v\n ? 'bg-primary text-primary-foreground'\n : 'text-muted-foreground hover:text-foreground',\n );\n}\n\n/** The rendered `<textarea>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: textarea });\n</script>\n\n<template>\n <div :data-state=\"state\" :class=\"surfaceClass\" :style=\"{ minHeight }\">\n <div class=\"flex items-center gap-1 border-b border-border bg-muted/40 px-2 py-1\">\n <div role=\"toolbar\" aria-label=\"Markdown formatting\" class=\"flex items-center gap-0.5\">\n <button\n v-for=\"a in ACTIONS\"\n :key=\"a.key\"\n type=\"button\"\n :aria-label=\"a.label\"\n :disabled=\"finalDisabled || finalReadOnly\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50\"\n @click=\"applyAction(a)\"\n >\n <Icon :icon=\"a.icon\" :size=\"14\" />\n </button>\n </div>\n <div\n role=\"radiogroup\"\n aria-label=\"View mode\"\n class=\"ml-auto flex items-center gap-0.5 rounded-md bg-card p-0.5 ring-1 ring-border\"\n >\n <button\n v-for=\"v in VIEW_ORDER\"\n :key=\"v\"\n type=\"button\"\n role=\"radio\"\n :aria-checked=\"mode === v\"\n :class=\"viewButtonClass(v)\"\n @click=\"viewCtl.setValue(v)\"\n >\n {{ v }}\n </button>\n </div>\n </div>\n <div class=\"flex flex-1 divide-x divide-border\" :style=\"{ minHeight: 0 }\">\n <textarea\n v-if=\"showEdit\"\n ref=\"textarea\"\n :id=\"textareaId\"\n :value=\"markdown\"\n :disabled=\"finalDisabled\"\n :readonly=\"finalReadOnly\"\n :required=\"isRequired\"\n :spellcheck=\"false\"\n :aria-invalid=\"finalInvalid || undefined\"\n :aria-describedby=\"describedBy\"\n :class=\"textareaClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onInput\"\n />\n <!--\n `group` role: aria-label is prohibited on a bare (generic) div —\n axe aria-prohibited-attr. Non-landmark grouping keeps the pane\n named for AT without polluting the page's region list.\n -->\n <div\n v-if=\"showPreview\"\n role=\"group\"\n aria-live=\"polite\"\n aria-label=\"Preview\"\n class=\"prose prose-sm flex-1 overflow-auto bg-background p-3 text-sm text-foreground\"\n >\n <slot v-if=\"hasPreviewSlot\" name=\"preview\" :markdown=\"markdown\" />\n <!-- eslint-disable-next-line vue/no-v-html -- `previewMarked` escapes raw HTML tokens\n and protocol-filters link/image URLs; the consumer opts out via the `preview` slot. -->\n <div v-else v-html=\"previewHtml ?? ''\" />\n </div>\n </div>\n </div>\n</template>\n","import { inject, type InjectionKey } from 'vue';\nimport type { JsonPath } from './JSONEditorHelpers';\n\n/** Defines how a JSON editor renders its document. */\nexport const JSONEditorMode = {\n /** Refers to the collapsible tree/structured view. */\n Tree: 'tree',\n /** Refers to the raw-text view. */\n Text: 'text',\n} as const;\n\nexport type JSONEditorMode = (typeof JSONEditorMode)[keyof typeof JSONEditorMode];\n\n/**\n * The seam between `JSONEditor` and its private tree/text subviews.\n *\n * React drilled `updateAt` + the three flags through every `TreeNode` recursion level.\n * Injection carries them instead — the tree is arbitrarily deep, and re-emitting an\n * `update-at` event at each level would be the only alternative under the emits rule.\n * Every field but `updateAt` is a live getter — read them off the object, don't destructure.\n */\nexport interface JSONEditorContextValue {\n /** Writes `next` at `path` and publishes the new document. */\n updateAt: (path: JsonPath, next: unknown) => void;\n readonly isDisabled: boolean;\n readonly isReadOnly: boolean;\n readonly isInvalid: boolean;\n}\n\nexport const JSONEditorKey: InjectionKey<JSONEditorContextValue> = Symbol('wow-two.jsonEditor');\n\n/** Reads the surrounding JSON-editor context; throws when used outside a `<JSONEditor>`. */\nexport function useJSONEditorContext(): JSONEditorContextValue {\n const context = inject(JSONEditorKey, null);\n if (!context) throw new Error('JSONEditor.* must be used inside <JSONEditor>');\n return context;\n}\n","/* Internal helpers for the JSON editor subviews — not exported from the folder barrel,\n exactly as they were module-private functions inside React's single `JSONEditor.tsx`. */\n\n/** Addresses a node inside the edited document. */\nexport type JsonPath = Array<string | number>;\n\nexport function describeType(v: unknown): string {\n if (v === null) return 'null';\n if (Array.isArray(v)) return 'array';\n return typeof v;\n}\n\nexport function pathToString(path: JsonPath): string {\n return path.map((p, i) => (typeof p === 'number' ? `[${p}]` : i === 0 ? p : `.${p}`)).join('');\n}\n\nexport function setAtPath(root: unknown, path: JsonPath, next: unknown): unknown {\n if (path.length === 0) return next;\n const [head, ...rest] = path;\n if (Array.isArray(root)) {\n const idx = head as number;\n const copy = root.slice();\n copy[idx] = setAtPath(root[idx], rest, next);\n return copy;\n }\n if (root && typeof root === 'object') {\n const key = head as string;\n return {\n ...(root as Record<string, unknown>),\n [key]: setAtPath((root as Record<string, unknown>)[key], rest, next),\n };\n }\n return root;\n}\n\nexport function safeStringify(value: unknown, indent: number): string {\n try {\n return JSON.stringify(value, null, indent);\n } catch {\n return '';\n }\n}\n","<script lang=\"ts\">\nimport type { JsonPath } from './JSONEditorHelpers';\n\n/** Internal — one row of `JSONEditor`'s tree pane. Not exported from the folder barrel. */\nexport interface JSONEditorTreeNodeProps {\n /** The key this node sits under; `null` at the document root. */\n keyName: string | number | null;\n\n /** The node's value. */\n value: unknown;\n\n /** The node's address inside the document. */\n path: JsonPath;\n\n /** The nesting depth — drives indentation and the initial open state. */\n depth: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from 'vue';\nimport { ChevronRight, Copy } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { Icon } from '../../../foundation/icons';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { useJSONEditorContext } from './JSONEditorContext';\nimport { describeType, pathToString } from './JSONEditorHelpers';\n\ndefineOptions({ name: 'JSONEditorTreeNode' });\n\nconst props = defineProps<JSONEditorTreeNodeProps>();\n\n/* The transient leaf editor is a real editing surface — the Field's helper/error\n description follows it (the input keeps its own action name). */\nconst ctx = useFormControl();\nconst editor = useJSONEditorContext();\n\nconst type = computed(() => describeType(props.value));\nconst isObject = computed(() => type.value === 'object' || type.value === 'array');\n\nconst open = ref(props.depth < 2);\nconst editing = ref(false);\nconst draft = ref('');\n\nfunction startEdit(): void {\n if (editor.isDisabled || editor.isReadOnly || isObject.value) return;\n editing.value = true;\n draft.value = typeof props.value === 'string' ? props.value : String(props.value);\n}\n\nfunction commitEdit(): void {\n editing.value = false;\n if (typeof props.value === 'number') {\n const n = Number(draft.value);\n if (!Number.isNaN(n)) editor.updateAt(props.path, n);\n } else if (typeof props.value === 'boolean') {\n if (draft.value === 'true' || draft.value === 'false') {\n editor.updateAt(props.path, draft.value === 'true');\n }\n } else if (props.value === null) {\n if (draft.value === 'null') editor.updateAt(props.path, null);\n } else {\n editor.updateAt(props.path, draft.value);\n }\n}\n\nfunction onDraftInput(event: Event): void {\n draft.value = (event.target as HTMLInputElement).value;\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter') commitEdit();\n if (event.key === 'Escape') editing.value = false;\n}\n\n/* Guarded on `typeof navigator` exactly as React was; the handler is click-driven, so it is\n unreachable during SSR either way. */\nfunction copyPath(): void {\n const text = pathToString(props.path);\n if (typeof navigator !== 'undefined' && navigator.clipboard) {\n navigator.clipboard.writeText(text).catch(() => {});\n }\n}\n\nconst entries = computed<ReadonlyArray<readonly [string | number, unknown]>>(() => {\n if (!isObject.value) return [];\n if (Array.isArray(props.value)) {\n return (props.value as unknown[]).map((v, i) => [i, v] as const);\n }\n return Object.entries(props.value as Record<string, unknown>);\n});\n\nconst keyLabel = computed(() =>\n typeof props.keyName === 'string' ? `\"${props.keyName}\"` : props.keyName,\n);\n\nconst summary = computed(() =>\n Array.isArray(props.value)\n ? `Array(${entries.value.length})`\n : `Object(${entries.value.length})`,\n);\n\nconst leafLabel = computed(() =>\n type.value === 'string' ? `\"${props.value as string}\"` : String(props.value),\n);\n\nconst copyLabel = computed(() => `Copy path ${pathToString(props.path) || 'root'}`);\n\nconst rowStyle = computed(() => ({ paddingLeft: `${props.depth * 16}px` }));\n\nconst chevronClass = computed(() => cn('transition-transform', open.value && 'rotate-90'));\n\nconst leafClass = computed(() =>\n cn(\n 'cursor-text rounded-sm px-1 text-left transition-colors',\n !editor.isDisabled && !editor.isReadOnly && 'hover:bg-muted',\n type.value === 'string' && 'text-info',\n type.value === 'number' && 'text-warning',\n type.value === 'boolean' && 'text-success',\n type.value === 'null' && 'text-muted-foreground italic',\n ),\n);\n\nconst ChevronIcon = ChevronRight;\nconst CopyIcon = Copy;\n</script>\n\n<template>\n <li role=\"treeitem\" :aria-expanded=\"isObject ? open : undefined\" class=\"px-1\">\n <div class=\"group flex items-start gap-1 py-0.5\" :style=\"rowStyle\">\n <button\n v-if=\"isObject\"\n type=\"button\"\n :aria-label=\"open ? 'Collapse' : 'Expand'\"\n class=\"inline-flex h-5 w-5 items-center justify-center text-muted-foreground hover:text-foreground\"\n @click=\"open = !open\"\n >\n <Icon :icon=\"ChevronIcon\" :size=\"12\" :class=\"chevronClass\" />\n </button>\n <span v-else class=\"inline-block h-5 w-5\" />\n <span v-if=\"keyName !== null\" class=\"text-foreground\">\n {{ keyLabel }}<span class=\"text-muted-foreground\">: </span>\n </span>\n <span v-if=\"isObject\" class=\"text-muted-foreground\">{{ summary }}</span>\n <input\n v-else-if=\"editing\"\n autofocus\n aria-label=\"Edit value\"\n :aria-invalid=\"editor.isInvalid || undefined\"\n :aria-describedby=\"ctx?.describedBy\"\n :value=\"draft\"\n class=\"h-5 rounded-sm bg-background px-1 text-sm font-mono outline-none ring-2 ring-ring\"\n @input=\"onDraftInput\"\n @keydown=\"onKeydown\"\n @blur=\"commitEdit\"\n />\n <button v-else type=\"button\" :class=\"leafClass\" @click=\"startEdit\">{{ leafLabel }}</button>\n <button\n type=\"button\"\n :aria-label=\"copyLabel\"\n class=\"ml-auto opacity-0 transition-opacity group-hover:opacity-100 inline-flex h-5 w-5 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground\"\n @click=\"copyPath\"\n >\n <Icon :icon=\"CopyIcon\" :size=\"11\" />\n </button>\n </div>\n <!-- Recursion by implicit self-reference: an SFC may name itself by its filename. -->\n <ul v-if=\"isObject && open\" role=\"group\">\n <JSONEditorTreeNode\n v-for=\"[k, v] in entries\"\n :key=\"String(k)\"\n :key-name=\"k\"\n :value=\"v\"\n :path=\"[...path, k]\"\n :depth=\"depth + 1\"\n />\n </ul>\n </li>\n</template>\n","<script lang=\"ts\">\n/** Internal — the tree pane of `JSONEditor`. Not exported from the folder barrel. */\nexport interface JSONEditorTreeViewProps {\n /** The document rendered as a tree. */\n value: unknown;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useFormControl } from '../../../foundation/primitives';\nimport { useJSONEditorContext } from './JSONEditorContext';\nimport JSONEditorTreeNode from './JSONEditorTreeNode.vue';\n\ndefineOptions({ name: 'JSONEditorTreeView' });\n\ndefineProps<JSONEditorTreeViewProps>();\n\n/* In tree mode the tree IS the editing surface — it carries the context id\n (label anchor) and is named/described by the Field chrome. */\nconst ctx = useFormControl();\nconst editor = useJSONEditorContext();\n</script>\n\n<template>\n <ul\n role=\"tree\"\n :id=\"ctx?.id\"\n :aria-labelledby=\"ctx?.labelledBy\"\n :aria-describedby=\"ctx?.describedBy\"\n :aria-invalid=\"editor.isInvalid || undefined\"\n class=\"font-mono text-sm\"\n >\n <JSONEditorTreeNode :key-name=\"null\" :value=\"value\" :path=\"[]\" :depth=\"0\" />\n </ul>\n</template>\n","<script lang=\"ts\">\n/** Internal — the raw-text pane of `JSONEditor`. Not exported from the folder barrel. */\nexport interface JSONEditorTextViewProps {\n /** The document rendered as pretty-printed JSON. */\n value: unknown;\n\n /** The `JSON.stringify` indent. */\n indent: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { useJSONEditorContext } from './JSONEditorContext';\nimport { safeStringify } from './JSONEditorHelpers';\n\ndefineOptions({ name: 'JSONEditorTextView' });\n\nconst props = defineProps<JSONEditorTextViewProps>();\n\nconst emit = defineEmits<{\n /** Fires with the parsed document when the draft commits. */\n commit: [value: unknown];\n}>();\n\n/* In text mode the raw textarea is the editing surface — it takes the context id\n (Label `for` target) and the Field label overrides the generic fallback name. */\nconst ctx = useFormControl();\nconst editor = useJSONEditorContext();\n\nconst initial = computed(() => safeStringify(props.value, props.indent));\n\nconst draft = ref(initial.value);\nconst error = ref<string | null>(null);\nconst dirty = ref(false);\n\n// Re-sync when external value changes (when not actively editing).\nwatch(initial, (next) => {\n if (!dirty.value) draft.value = next;\n});\n\nfunction commit(): void {\n try {\n const parsed: unknown = JSON.parse(draft.value);\n error.value = null;\n emit('commit', parsed);\n dirty.value = false;\n } catch (err) {\n error.value = err instanceof Error ? err.message : 'Invalid JSON';\n }\n}\n\nfunction onInput(event: Event): void {\n dirty.value = true;\n draft.value = (event.target as HTMLTextAreaElement).value;\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n draft.value = initial.value;\n error.value = null;\n dirty.value = false;\n }\n}\n\nconst textareaClass = computed(() =>\n cn(\n 'flex-1 resize-none whitespace-pre bg-transparent p-3 font-mono text-sm outline-none placeholder:text-subtle-foreground disabled:cursor-not-allowed',\n error.value && 'text-foreground',\n ),\n);\n</script>\n\n<template>\n <div class=\"flex h-full flex-col\">\n <textarea\n :id=\"ctx?.id\"\n aria-label=\"JSON source\"\n :aria-labelledby=\"ctx?.labelledBy\"\n :aria-invalid=\"editor.isInvalid || undefined\"\n :aria-describedby=\"ctx?.describedBy\"\n :value=\"draft\"\n :disabled=\"editor.isDisabled\"\n :readonly=\"editor.isReadOnly\"\n :spellcheck=\"false\"\n :class=\"textareaClass\"\n @input=\"onInput\"\n @blur=\"commit\"\n @keydown=\"onKeydown\"\n />\n <div\n v-if=\"error\"\n role=\"alert\"\n class=\"border-t border-destructive bg-destructive-soft px-3 py-2 text-xs text-destructive\"\n >\n {{ error }}\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { JSONEditorMode } from './JSONEditorContext';\n\nexport interface JSONEditorProps {\n /** The document, controlled — React's spelling, which wins when both are set. */\n value?: unknown;\n\n /** The document, controlled. The `v-model` binding target. */\n modelValue?: unknown;\n\n /** The initial document when uncontrolled. Defaults to `{}`. */\n defaultValue?: unknown;\n\n /** The render mode, controlled. The `v-model:mode` binding target. */\n mode?: JSONEditorMode;\n\n /** The initial render mode when uncontrolled. Default `tree`. */\n defaultMode?: JSONEditorMode;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n isDisabled?: boolean;\n\n /** The read-only state. Falls back to the surrounding form control's `isReadOnly`. */\n isReadOnly?: boolean;\n\n /** The invalid surface override. Falls back to the surrounding form control's `isInvalid`. */\n isInvalid?: boolean;\n\n /** The `JSON.stringify` indent used by text mode. Default `2`. */\n indent?: number;\n\n /** The CSS minHeight on the surface (default `14rem`). */\n minHeight?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport {\n JSONEditorKey,\n JSONEditorMode as JSONEditorModeValue,\n type JSONEditorContextValue,\n} from './JSONEditorContext';\nimport { setAtPath, type JsonPath } from './JSONEditorHelpers';\nimport JSONEditorTreeView from './JSONEditorTreeView.vue';\nimport JSONEditorTextView from './JSONEditorTextView.vue';\n\n/**\n * JSON editor with tree-view and raw-text modes. Tree mode supports inline\n * edit of primitive leaves + per-node copy-path. Text mode parses on commit;\n * invalid JSON shows inline error.\n */\n/* `inheritAttrs: false` so `class` folds into the surface's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'JSONEditor', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<JSONEditorProps>(), {\n indent: 2,\n minHeight: '14rem',\n /* Explicit `undefined` defaults: `useControlled` keys on `=== undefined`, and Vue casts an\n absent `boolean` prop to `false` — which would shadow the form control context. */\n value: undefined,\n modelValue: undefined,\n defaultValue: undefined,\n mode: undefined,\n defaultMode: undefined,\n isDisabled: undefined,\n isReadOnly: undefined,\n isInvalid: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: unknown];\n /** Replaces React's `onValueChange`. */\n 'value-change': [value: unknown];\n /** The `v-model:mode` half. */\n 'update:mode': [mode: JSONEditorMode];\n /** Replaces React's `onModeChange`. */\n 'mode-change': [mode: JSONEditorMode];\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst valueCtl = useControlled<unknown>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? {},\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst modeCtl = useControlled<JSONEditorMode>({\n controlled: () => props.mode,\n default: () => props.defaultMode ?? JSONEditorModeValue.Tree,\n onChange: (next) => {\n emit('update:mode', next);\n emit('mode-change', next);\n },\n});\n\n/* Named `document` / `renderMode`, not `value` / `mode`: a setup const sharing a prop's\n name collides with it in the template scope (`vue/no-dupe-keys`). */\nconst document = valueCtl.value;\nconst renderMode = modeCtl.value;\n\n/* Inherits flags from a surrounding <Field>; explicit props win. The context id /\n labelling / describedby land on the active editing surface (text-mode textarea or\n tree-mode tree) — the subviews read the context themselves. */\nconst ctx = useFormControl();\nconst finalDisabled = computed(() => props.isDisabled ?? ctx?.isDisabled ?? false);\nconst finalReadOnly = computed(() => props.isReadOnly ?? ctx?.isReadOnly ?? false);\nconst finalInvalid = computed(() => props.isInvalid ?? ctx?.isInvalid ?? false);\n\nfunction updateAt(path: JsonPath, next: unknown): void {\n valueCtl.setValue(setAtPath(document.value, path, next));\n}\n\n/* Live getters, not a snapshot — a flag change on the root has to reach every tree node. */\nprovide<JSONEditorContextValue>(JSONEditorKey, {\n updateAt,\n get isDisabled() {\n return finalDisabled.value;\n },\n get isReadOnly() {\n return finalReadOnly.value;\n },\n get isInvalid() {\n return finalInvalid.value;\n },\n});\n\n/* `Object.values` hoisted out of the template — the runtime template compiler resolves plain\n identifiers, not arbitrary global calls. */\nconst modes = Object.values(JSONEditorModeValue);\n\nfunction modeButtonClass(m: JSONEditorMode): string {\n return cn(\n 'inline-flex h-6 items-center rounded px-2 text-xs font-medium transition-colors',\n renderMode.value === m\n ? 'bg-primary text-primary-foreground'\n : 'text-muted-foreground hover:text-foreground',\n );\n}\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst surfaceClass = computed(() =>\n cn(\n 'flex flex-col overflow-hidden rounded-md border border-input bg-card text-card-foreground shadow-sm',\n finalInvalid.value && 'border-destructive',\n finalDisabled.value && 'opacity-60',\n attrs.class as ClassValue,\n ),\n);\n\n/** The rendered root `<div>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n ref=\"el\"\n :data-state=\"finalInvalid ? 'invalid' : 'default'\"\n :class=\"surfaceClass\"\n :style=\"{ minHeight }\"\n v-bind=\"passthroughAttrs\"\n >\n <div class=\"flex items-center gap-1 border-b border-border bg-muted/40 px-2 py-1\">\n <div\n role=\"radiogroup\"\n aria-label=\"JSON mode\"\n class=\"flex items-center gap-0.5 rounded-md bg-card p-0.5 ring-1 ring-border\"\n >\n <button\n v-for=\"m in modes\"\n :key=\"m\"\n type=\"button\"\n role=\"radio\"\n :aria-checked=\"renderMode === m\"\n :class=\"modeButtonClass(m)\"\n @click=\"modeCtl.setValue(m)\"\n >\n {{ m }}\n </button>\n </div>\n </div>\n <div class=\"flex-1 overflow-auto\" :style=\"{ minHeight: 0 }\">\n <JSONEditorTreeView v-if=\"renderMode === 'tree'\" :value=\"document\" />\n <JSONEditorTextView v-else :value=\"document\" :indent=\"indent\" @commit=\"valueCtl.setValue\" />\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\nimport { Temporal } from 'temporal-polyfill';\nimport { addDays, addMonths, daysInMonth, formatISODate, sundayIndex } from '../DateExtensions';\n\n/** Defines an RFC-5545 recurrence frequency (the `FREQ=` value). */\nexport const RecurrenceFreq = {\n /** Refers to a daily recurrence. */\n Daily: 'DAILY',\n /** Refers to a weekly recurrence. */\n Weekly: 'WEEKLY',\n /** Refers to a monthly recurrence. */\n Monthly: 'MONTHLY',\n /** Refers to a yearly recurrence. */\n Yearly: 'YEARLY',\n} as const;\n\nexport type RecurrenceFreq = (typeof RecurrenceFreq)[keyof typeof RecurrenceFreq];\n\n/** Defines an RFC-5545 weekday token (the `BYDAY=` value). */\nexport const RecurrenceWeekday = {\n /** Refers to Monday. */\n Monday: 'MO',\n /** Refers to Tuesday. */\n Tuesday: 'TU',\n /** Refers to Wednesday. */\n Wednesday: 'WE',\n /** Refers to Thursday. */\n Thursday: 'TH',\n /** Refers to Friday. */\n Friday: 'FR',\n /** Refers to Saturday. */\n Saturday: 'SA',\n /** Refers to Sunday. */\n Sunday: 'SU',\n} as const;\n\nexport type RecurrenceWeekday = (typeof RecurrenceWeekday)[keyof typeof RecurrenceWeekday];\n\n/** Defines how a recurrence terminates. */\nexport const RecurrenceEndMode = {\n /** Refers to an open-ended recurrence (no end). */\n Never: 'never',\n /** Refers to ending after a fixed occurrence count. */\n Count: 'count',\n /** Refers to ending on a fixed until-date. */\n Until: 'until',\n} as const;\n\nexport type RecurrenceEndMode = (typeof RecurrenceEndMode)[keyof typeof RecurrenceEndMode];\n\nexport interface RecurrenceRule {\n freq: RecurrenceFreq;\n interval: number;\n byDay?: ReadonlyArray<RecurrenceWeekday>;\n byMonthDay?: number;\n count?: number;\n until?: Temporal.PlainDate | null;\n}\n\nexport interface RecurrenceEditorProps {\n /** The rule, controlled — React's spelling, which wins when both are set. */\n value?: RecurrenceRule;\n\n /** The rule, controlled. The `v-model` binding target. */\n modelValue?: RecurrenceRule;\n\n /** The initial rule when uncontrolled. */\n defaultValue?: RecurrenceRule;\n\n /** The anchor date the preview counts forward from. Defaults to today. */\n from?: Temporal.PlainDate;\n\n /** How many occurrences the preview lists. Default `5`. */\n previewCount?: number;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n isDisabled?: boolean;\n\n /** The read-only state. Falls back to the surrounding form control's `isReadOnly`. */\n isReadOnly?: boolean;\n\n /** The hidden input name; when set, emits a hidden input with the serialized `RRULE:` string. */\n name?: string;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n}\n\nconst ALL_WEEKDAYS: ReadonlyArray<RecurrenceWeekday> = [\n RecurrenceWeekday.Sunday,\n RecurrenceWeekday.Monday,\n RecurrenceWeekday.Tuesday,\n RecurrenceWeekday.Wednesday,\n RecurrenceWeekday.Thursday,\n RecurrenceWeekday.Friday,\n RecurrenceWeekday.Saturday,\n];\nconst WEEKDAY_LABEL: Record<RecurrenceWeekday, string> = {\n [RecurrenceWeekday.Sunday]: 'Su',\n [RecurrenceWeekday.Monday]: 'Mo',\n [RecurrenceWeekday.Tuesday]: 'Tu',\n [RecurrenceWeekday.Wednesday]: 'We',\n [RecurrenceWeekday.Thursday]: 'Th',\n [RecurrenceWeekday.Friday]: 'Fr',\n [RecurrenceWeekday.Saturday]: 'Sa',\n};\n/* Maps a Sunday-indexed JS weekday (0=Sun … 6=Sat) to its RRULE token. */\nconst JS_TO_RRULE: ReadonlyArray<RecurrenceWeekday> = [\n RecurrenceWeekday.Sunday,\n RecurrenceWeekday.Monday,\n RecurrenceWeekday.Tuesday,\n RecurrenceWeekday.Wednesday,\n RecurrenceWeekday.Thursday,\n RecurrenceWeekday.Friday,\n RecurrenceWeekday.Saturday,\n];\n\nfunction serializeRule(r: RecurrenceRule): string {\n const parts: Array<string> = [`FREQ=${r.freq}`];\n if (r.interval > 1) parts.push(`INTERVAL=${r.interval}`);\n if (r.byDay && r.byDay.length > 0) parts.push(`BYDAY=${r.byDay.join(',')}`);\n if (r.byMonthDay) parts.push(`BYMONTHDAY=${r.byMonthDay}`);\n if (r.count) parts.push(`COUNT=${r.count}`);\n if (r.until) parts.push(`UNTIL=${formatISODate(r.until).replace(/-/g, '')}`);\n return `RRULE:${parts.join(';')}`;\n}\n\nfunction nextOccurrence(\n rule: RecurrenceRule,\n prev: Temporal.PlainDate,\n): Temporal.PlainDate | null {\n switch (rule.freq) {\n case RecurrenceFreq.Daily:\n return addDays(prev, rule.interval);\n case RecurrenceFreq.Weekly: {\n if (!rule.byDay || rule.byDay.length === 0) return addDays(prev, 7 * rule.interval);\n // Find the next allowed weekday in `prev`'s week (weeks start Sunday);\n // exhausted → jump to the week `interval` weeks later and scan it.\n const allowed = new Set(rule.byDay);\n let cursor = addDays(prev, 1);\n while (sundayIndex(cursor) !== 0) {\n if (allowed.has(JS_TO_RRULE[sundayIndex(cursor)]!)) return cursor;\n cursor = addDays(cursor, 1);\n }\n // `cursor` is the Sunday opening the following week; skip interval-1 more weeks.\n cursor = addDays(cursor, 7 * (rule.interval - 1));\n for (let i = 0; i < 7; i++) {\n if (allowed.has(JS_TO_RRULE[sundayIndex(cursor)]!)) return cursor;\n cursor = addDays(cursor, 1);\n }\n return null;\n }\n case RecurrenceFreq.Monthly: {\n const next = addMonths(prev, rule.interval);\n if (rule.byMonthDay) {\n // Clamp to the month's length so day 31 in a 30-day month lands on the last day.\n const day = Math.min(rule.byMonthDay, daysInMonth(next.year, next.month));\n return next.with({ day });\n }\n return next;\n }\n case RecurrenceFreq.Yearly:\n return prev.add({ years: rule.interval });\n }\n}\n\nfunction buildPreview(\n rule: RecurrenceRule,\n from: Temporal.PlainDate,\n count: number,\n): ReadonlyArray<Temporal.PlainDate> {\n const out: Array<Temporal.PlainDate> = [];\n let cursor = from;\n // Include `from` if it satisfies the rule (simplification: always include for visual hint).\n out.push(cursor);\n for (let i = 0; i < count - 1; i++) {\n const next = nextOccurrence(rule, cursor);\n if (!next) break;\n if (rule.until && Temporal.PlainDate.compare(next, rule.until) > 0) break;\n if (rule.count && out.length >= rule.count) break;\n out.push(next);\n cursor = next;\n }\n return out;\n}\n\nconst DEFAULT_RULE: RecurrenceRule = {\n freq: RecurrenceFreq.Weekly,\n interval: 1,\n byDay: [RecurrenceWeekday.Monday],\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled, useId } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { today } from '../DateExtensions';\nimport { inputBaseVariants, InputSize } from '../InputStyles';\nimport Radio from '../radio/Radio.vue';\nimport DatePicker from '../datePicker/DatePicker.vue';\n\n/**\n * Visual RRULE editor. Output is a JS `RecurrenceRule` object via `update:modelValue` /\n * `value-change`; if `name` is set, also emits a hidden `RRULE:FREQ=…` string for forms.\n *\n * Form-aware at GROUP level: inside a `Field`/`form.Field` the root (`role=\"group\"`)\n * takes the context id + `aria-labelledby`/`aria-describedby`/`aria-invalid`, and\n * the disabled/read-only flags cascade to every inner control.\n */\n/* `inheritAttrs: false` so `class` folds into the root's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'RecurrenceEditor', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<RecurrenceEditorProps>(), {\n from: () => today(),\n previewCount: 5,\n /* Explicit `undefined` defaults: `useControlled` keys on `=== undefined`, and Vue casts an\n absent `boolean` prop to `false` — which would shadow the form control context. */\n value: undefined,\n modelValue: undefined,\n defaultValue: undefined,\n isDisabled: undefined,\n isReadOnly: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [rule: RecurrenceRule];\n /** Replaces React's `onValueChange`. */\n 'value-change': [rule: RecurrenceRule];\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst ctx = useFormControl();\nconst isDisabled = computed(() => props.isDisabled ?? ctx?.isDisabled);\nconst isReadOnly = computed(() => props.isReadOnly ?? ctx?.isReadOnly);\n\nconst controlled = useControlled<RecurrenceRule>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? DEFAULT_RULE,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst rule = controlled.value;\nconst uid = useId('recurrence');\n\nconst preview = computed(() => buildPreview(rule.value, props.from, props.previewCount));\n\nfunction update(patch: Partial<RecurrenceRule>): void {\n const next = { ...rule.value, ...patch };\n // Reset incompatible fields when freq changes.\n if (patch.freq && patch.freq !== rule.value.freq) {\n if (patch.freq !== RecurrenceFreq.Weekly) next.byDay = undefined;\n if (patch.freq !== RecurrenceFreq.Monthly) next.byMonthDay = undefined;\n }\n controlled.setValue(next);\n}\n\nconst endMode = computed<RecurrenceEndMode>(() =>\n rule.value.count\n ? RecurrenceEndMode.Count\n : rule.value.until\n ? RecurrenceEndMode.Until\n : RecurrenceEndMode.Never,\n);\n\nfunction onIntervalInput(event: Event): void {\n const raw = Number((event.target as HTMLInputElement).value) || 1;\n update({ interval: Math.max(1, raw) });\n}\n\nfunction onFreqChange(event: Event): void {\n update({ freq: (event.target as HTMLSelectElement).value as RecurrenceFreq });\n}\n\nfunction isWeekdayChecked(wd: RecurrenceWeekday): boolean {\n return rule.value.byDay?.includes(wd) ?? false;\n}\n\nfunction toggleWeekday(wd: RecurrenceWeekday): void {\n const set = new Set(rule.value.byDay ?? []);\n if (set.has(wd)) set.delete(wd);\n else set.add(wd);\n update({ byDay: Array.from(set) });\n}\n\nfunction onMonthDayInput(event: Event): void {\n const raw = Number((event.target as HTMLInputElement).value) || 1;\n update({ byMonthDay: Math.min(31, Math.max(1, raw)) });\n}\n\nfunction onCountInput(event: Event): void {\n const raw = Number((event.target as HTMLInputElement).value) || 1;\n update({ count: Math.max(1, raw), until: null });\n}\n\nfunction onUntilPick(next: Temporal.PlainDate | null): void {\n update({ until: next, count: undefined });\n}\n\nfunction weekdayClass(wd: RecurrenceWeekday): string {\n return cn(\n 'inline-flex h-7 w-9 items-center justify-center rounded-md border text-xs font-medium transition-colors',\n isWeekdayChecked(wd)\n ? 'border-primary bg-primary text-primary-foreground'\n : 'border-input bg-background text-muted-foreground hover:bg-muted',\n );\n}\n\nfunction weekdayLabel(wd: RecurrenceWeekday): string {\n return WEEKDAY_LABEL[wd];\n}\n\nconst rootId = computed(() => props.id ?? ctx?.id);\nconst endRadioName = computed(() => `${props.name ?? 'rule'}-end`);\nconst serialized = computed(() => serializeRule(rule.value));\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'flex flex-col gap-3 rounded-md border border-border bg-card p-4 text-card-foreground shadow-sm',\n isDisabled.value && 'opacity-60',\n attrs.class as ClassValue,\n ),\n);\n\nconst intervalClass = cn(inputBaseVariants({ size: InputSize.Sm }), 'w-16');\nconst freqClass = cn(inputBaseVariants({ size: InputSize.Sm }), 'w-32');\nconst monthDayClass = cn(inputBaseVariants({ size: InputSize.Sm }), 'w-20');\nconst countClass = cn(inputBaseVariants({ size: InputSize.Sm }), 'w-20');\n\n/** The rendered root `<div>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n ref=\"el\"\n role=\"group\"\n :id=\"rootId\"\n :aria-labelledby=\"ctx?.labelledBy\"\n :aria-describedby=\"ctx?.describedBy\"\n :aria-invalid=\"ctx?.isInvalid || undefined\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n >\n <div class=\"flex flex-wrap items-center gap-2 text-sm\">\n <label :for=\"`${uid}-interval`\" class=\"text-muted-foreground\">Every</label>\n <input\n :id=\"`${uid}-interval`\"\n type=\"number\"\n :min=\"1\"\n :max=\"999\"\n :value=\"rule.interval\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :class=\"intervalClass\"\n @input=\"onIntervalInput\"\n />\n <select\n aria-label=\"Frequency\"\n :value=\"rule.freq\"\n :disabled=\"isDisabled\"\n :class=\"freqClass\"\n @change=\"onFreqChange\"\n >\n <option value=\"DAILY\">{{ rule.interval > 1 ? 'days' : 'day' }}</option>\n <option value=\"WEEKLY\">{{ rule.interval > 1 ? 'weeks' : 'week' }}</option>\n <option value=\"MONTHLY\">{{ rule.interval > 1 ? 'months' : 'month' }}</option>\n <option value=\"YEARLY\">{{ rule.interval > 1 ? 'years' : 'year' }}</option>\n </select>\n </div>\n\n <div v-if=\"rule.freq === 'WEEKLY'\" class=\"flex items-center gap-2 text-sm\">\n <span class=\"text-muted-foreground\">On</span>\n <div role=\"group\" aria-label=\"Days of week\" class=\"flex flex-wrap gap-1\">\n <button\n v-for=\"wd in ALL_WEEKDAYS\"\n :key=\"wd\"\n type=\"button\"\n role=\"checkbox\"\n :aria-checked=\"isWeekdayChecked(wd)\"\n :disabled=\"isDisabled || isReadOnly\"\n :class=\"weekdayClass(wd)\"\n @click=\"toggleWeekday(wd)\"\n >\n {{ weekdayLabel(wd) }}\n </button>\n </div>\n </div>\n\n <div v-if=\"rule.freq === 'MONTHLY'\" class=\"flex items-center gap-2 text-sm\">\n <label :for=\"`${uid}-month-day`\" class=\"text-muted-foreground\">On day</label>\n <input\n :id=\"`${uid}-month-day`\"\n type=\"number\"\n :min=\"1\"\n :max=\"31\"\n :value=\"rule.byMonthDay ?? from.day\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :class=\"monthDayClass\"\n @input=\"onMonthDayInput\"\n />\n <span class=\"text-muted-foreground\">of the month</span>\n </div>\n\n <!-- The design-system `Radio`, not a bare `<input type=\"radio\">`: the native control\n renders platform chrome that matches nothing else in the package. Each one carries an\n explicit `id` — `Radio` otherwise adopts the surrounding `Field`'s id and all three\n would collide on it. -->\n <div role=\"radiogroup\" aria-label=\"End mode\" class=\"flex flex-col gap-2 text-sm\">\n <label :for=\"`${uid}-end-never`\" class=\"flex items-center gap-2\">\n <Radio\n :id=\"`${uid}-end-never`\"\n size=\"sm\"\n :name=\"endRadioName\"\n :checked=\"endMode === 'never'\"\n :disabled=\"isDisabled || isReadOnly\"\n @value-change=\"update({ count: undefined, until: null })\"\n />\n Never\n </label>\n <label :for=\"`${uid}-end-count`\" class=\"flex items-center gap-2\">\n <Radio\n :id=\"`${uid}-end-count`\"\n size=\"sm\"\n :name=\"endRadioName\"\n :checked=\"endMode === 'count'\"\n :disabled=\"isDisabled || isReadOnly\"\n @value-change=\"update({ count: rule.count ?? 10, until: null })\"\n />\n After\n <input\n type=\"number\"\n aria-label=\"Occurrence count\"\n :min=\"1\"\n :value=\"rule.count ?? ''\"\n :disabled=\"isDisabled || isReadOnly || endMode !== 'count'\"\n :class=\"countClass\"\n @input=\"onCountInput\"\n />\n occurrences\n </label>\n <!-- The end date sits BESIDE the label, not inside it: `DatePicker` is a button, and a\n button inside a `<label>` forwards its click to the labelled radio. -->\n <div class=\"flex items-center gap-2\">\n <label :for=\"`${uid}-end-until`\" class=\"flex items-center gap-2\">\n <Radio\n :id=\"`${uid}-end-until`\"\n size=\"sm\"\n :name=\"endRadioName\"\n :checked=\"endMode === 'until'\"\n :disabled=\"isDisabled || isReadOnly\"\n @value-change=\"update({ until: addMonths(from, 6), count: undefined })\"\n />\n On\n </label>\n <DatePicker\n :id=\"`${uid}-end-date`\"\n size=\"sm\"\n aria-label=\"End date\"\n class=\"w-44\"\n placeholder=\"Pick a date\"\n :value=\"rule.until ?? null\"\n :disabled=\"isDisabled || isReadOnly || endMode !== 'until'\"\n @value-change=\"onUntilPick\"\n />\n </div>\n </div>\n\n <div class=\"rounded-md bg-muted/40 p-3 text-xs\">\n <div class=\"mb-1 font-medium text-muted-foreground\">Next occurrences</div>\n <ul aria-live=\"polite\" class=\"grid grid-cols-2 gap-x-4 gap-y-0.5 sm:grid-cols-3\">\n <li v-for=\"(d, i) in preview\" :key=\"i\" class=\"text-foreground tabular-nums\">\n {{ formatISODate(d) }}\n </li>\n </ul>\n </div>\n <input v-if=\"name\" type=\"hidden\" :name=\"name\" :value=\"serialized\" />\n </div>\n</template>\n","<script lang=\"ts\">\n/** Defines the accent palette of a knob's value arc. */\nexport const KnobTone = {\n /** Refers to the primary brand accent. */\n Brand: 'brand',\n /** Refers to the positive/confirmation accent. */\n Success: 'success',\n /** Refers to the caution accent. */\n Warning: 'warning',\n /** Refers to the destructive/error accent. */\n Danger: 'danger',\n /** Refers to the muted/neutral accent. */\n Muted: 'muted',\n} as const;\n\nexport type KnobTone = (typeof KnobTone)[keyof typeof KnobTone];\n\nconst TONE_CLASS: Record<KnobTone, string> = {\n brand: 'text-primary',\n success: 'text-success',\n warning: 'text-warning',\n danger: 'text-destructive',\n muted: 'text-muted-foreground',\n};\n\nexport interface KnobProps {\n /** The value, controlled — React's spelling, which wins when both are set. */\n value?: number;\n\n /** The value, controlled. The `v-model` binding target. */\n modelValue?: number;\n\n /** The initial value when uncontrolled. Defaults to `min`. */\n defaultValue?: number;\n\n /** The lower bound. Default `0`. */\n min?: number;\n\n /** The upper bound. Default `1`. */\n max?: number;\n\n /** The arrow-key / wheel step. Default `0.01`. */\n step?: number;\n\n /** The Shift+arrow step. Default `0.1`. */\n largeStep?: number;\n\n /** The knob's pixel diameter. Default `64`. */\n size?: number;\n\n /** The sweep of the value arc in degrees. Default `270`. */\n arcDegrees?: number;\n\n /** The accent palette. Default `brand`. */\n tone?: KnobTone;\n\n /**\n * The readout formatter. Default `(v) => v.toFixed(2)`.\n *\n * Kept a PROP, not an emit: it RETURNS the rendered text, which an emit cannot do.\n */\n format?: (value: number) => string | number;\n\n /** Whether the formatted readout renders in the centre. Default `true`. */\n isValueShown?: boolean;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n isDisabled?: boolean;\n\n /** The hidden input name; the hidden input emits the numeric value. */\n name?: string;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n}\n\nfunction clamp(v: number, min: number, max: number): number {\n return Math.max(min, Math.min(max, v));\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled, useEventListener } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\n\n/**\n * Rotational dial input. Pointer drag rotates over `arcDegrees` (default 270°\n * from -135° to +135°). Wheel + arrow keys step; Home/End → min/max.\n */\n/* `inheritAttrs: false` so `class` folds into the root's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'Knob', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<KnobProps>(), {\n min: 0,\n max: 1,\n step: 0.01,\n largeStep: 0.1,\n size: 64,\n arcDegrees: 270,\n tone: 'brand',\n format: (v: number) => v.toFixed(2),\n isValueShown: true,\n /* Explicit `undefined` defaults: `useControlled` keys on `=== undefined`, and Vue casts an\n absent `boolean` prop to `false` — which would shadow the form control context. */\n value: undefined,\n modelValue: undefined,\n defaultValue: undefined,\n isDisabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: number];\n /** Replaces React's `onValueChange`. */\n 'value-change': [value: number];\n}>();\n\nconst attrs = useAttrs();\n\nconst controlled = useControlled<number>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? props.min,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst current = controlled.value;\n\n/* Inherits id/disabled/invalid/labelling from a surrounding <Field>; explicit props win. */\nconst ctx = useFormControl();\nconst disabled = computed(() => props.isDisabled ?? ctx?.isDisabled ?? false);\n\n/* Never a declared prop — a declared `'aria-label'` would arrive as `props.ariaLabel`, so\n `props['aria-label']` is always undefined and no accessible name renders. */\nconst ariaLabel = computed(() => attrs['aria-label'] as string | undefined);\n/* Names the knob from the Field label when present; an explicit aria-label always wins. */\nconst labelledBy = computed(() => (!ariaLabel.value ? ctx?.labelledBy : undefined));\n\nconst container = useTemplateRef<HTMLDivElement>('container');\nconst dragState = ref<{ startY: number; startValue: number } | null>(null);\n\nconst fraction = computed(\n () => (clamp(current.value, props.min, props.max) - props.min) / (props.max - props.min),\n);\nconst halfArc = computed(() => props.arcDegrees / 2);\nconst startAngle = computed(() => -halfArc.value - 90); // -90 puts 0° at top\nconst endAngle = computed(() => halfArc.value - 90);\nconst angle = computed(() => startAngle.value + fraction.value * props.arcDegrees);\n\nfunction setClamped(v: number): void {\n controlled.setValue(clamp(v, props.min, props.max));\n}\n\nfunction onPointerDown(event: PointerEvent): void {\n if (disabled.value || event.button !== 0) return;\n dragState.value = { startY: event.clientY, startValue: current.value };\n (event.currentTarget as HTMLElement).setPointerCapture(event.pointerId);\n}\n\nfunction onPointerMove(event: PointerEvent): void {\n const drag = dragState.value;\n if (disabled.value || !drag) return;\n const dy = drag.startY - event.clientY; // up = increase\n const range = props.max - props.min;\n const sensitivity = range / 200; // 200px drag = full range\n setClamped(drag.startValue + dy * sensitivity);\n}\n\nfunction onPointerUp(event: PointerEvent): void {\n if (!dragState.value) return;\n dragState.value = null;\n (event.currentTarget as HTMLElement).releasePointerCapture?.(event.pointerId);\n}\n\n/* Wheel through a non-passive listener attached to the element — Vue's `@wheel` lands as a\n passive listener on some engines, and `preventDefault` inside it cannot stop the page scroll.\n `useEventListener` is post-flush and re-attaches when the ref resolves, so nothing here runs\n during SSR; the handler reads state live rather than capturing it. */\nuseEventListener(\n 'wheel',\n (event) => {\n if (disabled.value) return;\n event.preventDefault();\n const delta = (event as WheelEvent).deltaY < 0 ? props.step : -props.step;\n setClamped(current.value + delta);\n },\n container,\n { passive: false },\n);\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (disabled.value) return;\n const s = event.shiftKey ? props.largeStep : props.step;\n switch (event.key) {\n case 'ArrowUp':\n case 'ArrowRight':\n event.preventDefault();\n setClamped(current.value + s);\n break;\n case 'ArrowDown':\n case 'ArrowLeft':\n event.preventDefault();\n setClamped(current.value - s);\n break;\n case 'Home':\n event.preventDefault();\n setClamped(props.min);\n break;\n case 'End':\n event.preventDefault();\n setClamped(props.max);\n break;\n }\n}\n\n// SVG arc path math.\nconst radius = computed(() => props.size / 2 - 4);\nconst center = computed(() => props.size / 2);\n\nfunction polar(deg: number, r: number): readonly [number, number] {\n const rad = (deg * Math.PI) / 180;\n return [center.value + r * Math.cos(rad), center.value + r * Math.sin(rad)] as const;\n}\n\nconst trackStart = computed(() => polar(startAngle.value, radius.value));\nconst trackEnd = computed(() => polar(endAngle.value, radius.value));\nconst largeArc = computed(() => (props.arcDegrees > 180 ? 1 : 0));\n\nconst trackPath = computed(\n () =>\n `M ${trackStart.value[0]} ${trackStart.value[1]} A ${radius.value} ${radius.value} 0 ${largeArc.value} 1 ${trackEnd.value[0]} ${trackEnd.value[1]}`,\n);\n\nconst valueEnd = computed(() => polar(angle.value, radius.value));\nconst valueLargeArc = computed(() => (fraction.value * props.arcDegrees > 180 ? 1 : 0));\n\nconst valuePath = computed(\n () =>\n `M ${trackStart.value[0]} ${trackStart.value[1]} A ${radius.value} ${radius.value} 0 ${valueLargeArc.value} 1 ${valueEnd.value[0]} ${valueEnd.value[1]}`,\n);\n\nconst pointerInner = computed(() => polar(angle.value, radius.value * 0.45));\nconst pointerOuter = computed(() => polar(angle.value, radius.value * 0.85));\n\nconst knobId = computed(() => props.id ?? ctx?.id);\nconst readout = computed(() => props.format(current.value));\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootStyle = computed(() => ({\n width: `${props.size}px`,\n height: `${props.size}px`,\n touchAction: 'none',\n}));\n\nconst rootClass = computed(() =>\n cn(\n 'relative inline-flex select-none items-center justify-center rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n TONE_CLASS[props.tone],\n disabled.value ? 'cursor-not-allowed opacity-50' : 'cursor-grab active:cursor-grabbing',\n attrs.class as ClassValue,\n ),\n);\n\n/** The rendered root `<div>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: container });\n</script>\n\n<template>\n <div\n ref=\"container\"\n role=\"slider\"\n :id=\"knobId\"\n :aria-label=\"ariaLabel ?? (labelledBy ? undefined : 'Knob')\"\n :aria-labelledby=\"labelledBy\"\n :aria-valuenow=\"current\"\n :aria-valuemin=\"min\"\n :aria-valuemax=\"max\"\n aria-orientation=\"vertical\"\n :aria-invalid=\"ctx?.isInvalid || undefined\"\n :aria-describedby=\"ctx?.describedBy\"\n :aria-disabled=\"disabled || undefined\"\n :tabindex=\"disabled ? -1 : 0\"\n :style=\"rootStyle\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n @pointerdown=\"onPointerDown\"\n @pointermove=\"onPointerMove\"\n @pointerup=\"onPointerUp\"\n @pointercancel=\"onPointerUp\"\n @keydown=\"onKeydown\"\n >\n <svg :width=\"size\" :height=\"size\" class=\"overflow-visible\">\n <path\n :d=\"trackPath\"\n fill=\"none\"\n stroke=\"currentColor\"\n :stroke-width=\"4\"\n stroke-linecap=\"round\"\n class=\"opacity-20\"\n />\n <path\n :d=\"valuePath\"\n fill=\"none\"\n stroke=\"currentColor\"\n :stroke-width=\"4\"\n stroke-linecap=\"round\"\n />\n <line\n :x1=\"pointerInner[0]\"\n :y1=\"pointerInner[1]\"\n :x2=\"pointerOuter[0]\"\n :y2=\"pointerOuter[1]\"\n stroke=\"currentColor\"\n :stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n />\n </svg>\n <span\n v-if=\"isValueShown\"\n aria-hidden=\"true\"\n class=\"absolute inset-0 grid place-items-center text-[10px] font-medium tabular-nums text-foreground\"\n >\n {{ readout }}\n </span>\n <input v-if=\"name\" type=\"hidden\" :name=\"name\" :value=\"current\" />\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface KeyboardShortcutPickerProps {\n /** The captured chord, controlled — React's spelling, which wins when both are set. */\n value?: ReadonlyArray<string>;\n\n /** The captured chord, controlled. The `v-model` binding target. */\n modelValue?: ReadonlyArray<string>;\n\n /** The initial chord when uncontrolled. */\n defaultValue?: ReadonlyArray<string>;\n\n /** The idle label. Fill the `placeholder` slot for richer content. */\n placeholder?: string | number;\n\n /** The listening label. Fill the `recordLabel` slot for richer content. */\n recordLabel?: string | number;\n\n /** The hidden input name; the hidden input emits the `+`-joined chord. */\n name?: string;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n}\n\n// SSR-safe: `navigator` is undefined in Node < 21.\nconst IS_MAC =\n typeof navigator !== 'undefined' && navigator.platform?.toLowerCase().includes('mac');\n\nconst MODIFIER_NAMES: Record<string, string> = {\n Control: 'Ctrl',\n Meta: IS_MAC ? '⌘' : 'Meta',\n Alt: 'Alt',\n Shift: 'Shift',\n};\n\nfunction isModifier(key: string): boolean {\n return ['Control', 'Meta', 'Alt', 'Shift'].includes(key);\n}\n\nfunction normalizeKey(key: string): string {\n if (key === ' ') return 'Space';\n if (key.length === 1) return key.toUpperCase();\n return key;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled, useEventListener } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport Kbd from '../../display/kbd/Kbd.vue';\n\n/**\n * Capture a key chord. Click record → press keys → captured. Escape cancels;\n * Backspace during listening clears. Output is a normalized name array\n * (e.g. `['Meta', 'Shift', 'K']`).\n */\n/* `inheritAttrs: false` so `class` folds into the button's own `cn()` call, and so the rest of\n the attrs land on the button rather than being dropped by the multi-root template. */\ndefineOptions({ name: 'KeyboardShortcutPicker', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<KeyboardShortcutPickerProps>(), {\n placeholder: 'Click to record',\n recordLabel: 'Press keys…',\n /* Explicit `undefined` defaults: `useControlled` keys on `=== undefined`, and Vue casts an\n absent `boolean` prop to `false` — which would shadow the form control context. */\n value: undefined,\n modelValue: undefined,\n disabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [keys: ReadonlyArray<string>];\n /** Replaces React's `onValueChange`. */\n 'value-change': [keys: ReadonlyArray<string>];\n}>();\n\ndefineSlots<{\n placeholder?(): unknown;\n recordLabel?(): unknown;\n}>();\n\nconst attrs = useAttrs();\n\n/* Inherits id/disabled/invalid/labelledby/describedby from a surrounding <Field>;\n standalone props win when provided, context fills the gaps (Select parity). */\nconst field = useFormControl();\nconst finalDisabled = computed(() => props.disabled ?? field?.isDisabled);\n\nconst controlled = useControlled<ReadonlyArray<string>>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? [],\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst keys = controlled.value;\nconst recording = ref(false);\nconst button = useTemplateRef<HTMLButtonElement>('button');\n\n/* Never declared props — a declared `'aria-label'` would arrive as `props.ariaLabel` and stop\n reaching the DOM. Read off the attrs so the consumer's value can override the context's. */\nconst ariaLabel = computed(() => attrs['aria-label'] as string | undefined);\nconst ariaLabelledBy = computed(() => attrs['aria-labelledby'] as string | undefined);\nconst ariaDescribedBy = computed(() => attrs['aria-describedby'] as string | undefined);\n\n/* The document listeners are attached only while recording: the target getter returns `null`\n otherwise, which is what detaches them. `useEventListener` is post-flush and guards\n `typeof document`, so nothing here reaches the DOM during SSR. */\nconst listenerTarget = computed<Document | null>(() => {\n if (!recording.value) return null;\n return typeof document === 'undefined' ? null : document;\n});\n\nuseEventListener(\n 'keydown',\n (event) => {\n const e = event as KeyboardEvent;\n e.preventDefault();\n e.stopPropagation();\n if (e.key === 'Escape') {\n recording.value = false;\n return;\n }\n if (e.key === 'Backspace') {\n controlled.setValue([]);\n recording.value = false;\n return;\n }\n if (isModifier(e.key)) return;\n const captured: Array<string> = [];\n if (e.metaKey) captured.push('Meta');\n if (e.ctrlKey) captured.push('Control');\n if (e.altKey) captured.push('Alt');\n if (e.shiftKey) captured.push('Shift');\n captured.push(normalizeKey(e.key));\n controlled.setValue(captured);\n recording.value = false;\n },\n listenerTarget,\n true,\n);\n\nuseEventListener(\n 'pointerdown',\n (event) => {\n const target = (event as MouseEvent).target as Node | null;\n if (button.value && target && !button.value.contains(target)) recording.value = false;\n },\n listenerTarget,\n);\n\nfunction startRecord(): void {\n if (finalDisabled.value) return;\n recording.value = true;\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented) return;\n if (recording.value) return;\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n startRecord();\n }\n}\n\nfunction modifierLabel(key: string): string {\n return MODIFIER_NAMES[key] ?? key;\n}\n\nconst buttonId = computed(() => props.id ?? field?.id);\n/* Names the trigger from the Field label when present; an explicit aria-label always wins. */\nconst labelledBy = computed(\n () => ariaLabelledBy.value ?? (ariaLabel.value ? undefined : field?.labelledBy),\n);\nconst describedBy = computed(() => ariaDescribedBy.value ?? field?.describedBy);\nconst hiddenValue = computed(() => keys.value.join('+'));\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set([\n 'class',\n 'aria-labelledby',\n 'aria-describedby',\n]);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst buttonClass = computed(() =>\n cn(\n 'inline-flex h-9 items-center gap-2 rounded-md border border-input bg-background px-3 text-sm transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-60',\n recording.value && 'border-primary bg-primary-soft text-primary-soft-foreground',\n attrs.class as ClassValue,\n ),\n);\n\n/** The rendered `<button>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: button });\n</script>\n\n<template>\n <button\n ref=\"button\"\n type=\"button\"\n :id=\"buttonId\"\n :aria-pressed=\"recording\"\n :aria-invalid=\"field?.isInvalid || undefined\"\n :aria-labelledby=\"labelledBy\"\n :aria-describedby=\"describedBy\"\n :disabled=\"finalDisabled\"\n :class=\"buttonClass\"\n v-bind=\"passthroughAttrs\"\n @click=\"startRecord\"\n @keydown=\"onKeydown\"\n >\n <span v-if=\"recording\" class=\"text-xs text-muted-foreground\">\n <slot name=\"recordLabel\">{{ recordLabel }}</slot>\n </span>\n <span v-else-if=\"keys.length === 0\" class=\"text-xs text-muted-foreground\">\n <slot name=\"placeholder\">{{ placeholder }}</slot>\n </span>\n <span v-else class=\"inline-flex items-center gap-1 text-muted-foreground\">\n <template v-for=\"(k, i) in keys\" :key=\"i\">\n <span v-if=\"i > 0\" aria-hidden=\"true\">+</span>\n <Kbd>{{ modifierLabel(k) }}</Kbd>\n </template>\n </span>\n </button>\n <input v-if=\"name\" type=\"hidden\" :name=\"name\" :value=\"hiddenValue\" />\n</template>\n","<script lang=\"ts\">\nimport type { IconAdapter } from '../../../foundation/icons';\nimport {\n Bell,\n Bookmark,\n Calendar,\n Camera,\n Check,\n ChevronDown,\n Clock,\n Cloud,\n Code,\n Coffee,\n Compass,\n Download,\n Edit,\n ExternalLink,\n Eye,\n File,\n Folder,\n Globe,\n Heart,\n Home,\n Image,\n Inbox,\n Info,\n Layers,\n Lightbulb,\n Link2,\n Lock,\n Mail,\n Map,\n MessageCircle,\n Mic,\n Moon,\n Music,\n Paperclip,\n Pencil,\n Phone,\n Pin,\n Play,\n Plus,\n Search,\n Send,\n Settings,\n Share2,\n ShoppingCart,\n Star,\n Sun,\n Tag,\n Trash,\n Upload,\n User,\n Video,\n Wallet,\n Zap,\n} from 'lucide-vue-next';\n\n/* Module-private in React too — the built-in set is not part of the public surface. */\nconst BUILT_IN_ICONS: Record<string, IconAdapter> = {\n bell: Bell,\n bookmark: Bookmark,\n calendar: Calendar,\n camera: Camera,\n check: Check,\n 'chevron-down': ChevronDown,\n clock: Clock,\n cloud: Cloud,\n code: Code,\n coffee: Coffee,\n compass: Compass,\n download: Download,\n edit: Edit,\n 'external-link': ExternalLink,\n eye: Eye,\n file: File,\n folder: Folder,\n globe: Globe,\n heart: Heart,\n home: Home,\n image: Image,\n inbox: Inbox,\n info: Info,\n layers: Layers,\n lightbulb: Lightbulb,\n link: Link2,\n lock: Lock,\n mail: Mail,\n map: Map,\n message: MessageCircle,\n mic: Mic,\n moon: Moon,\n music: Music,\n paperclip: Paperclip,\n pencil: Pencil,\n phone: Phone,\n pin: Pin,\n play: Play,\n plus: Plus,\n search: Search,\n send: Send,\n settings: Settings,\n share: Share2,\n cart: ShoppingCart,\n star: Star,\n sun: Sun,\n tag: Tag,\n trash: Trash,\n upload: Upload,\n user: User,\n video: Video,\n wallet: Wallet,\n zap: Zap,\n};\n\nexport interface IconPickerProps {\n /** The selected icon key, controlled — React's spelling, which wins when both are set. */\n value?: string;\n\n /** The selected icon key, controlled. The `v-model` binding target. */\n modelValue?: string;\n\n /** The initial icon key when uncontrolled. */\n defaultValue?: string;\n\n /** The icon set, keyed by the name the picker emits. Defaults to the built-in lucide subset. */\n icons?: Record<string, IconAdapter>;\n\n /** The number of grid columns. Default `8`. */\n columns?: number;\n\n /** The glyph pixel size. Default `20`. */\n size?: number;\n\n /** The pixel size of each icon button. Default `36`. */\n iconButtonSize?: number;\n\n /** The search-field placeholder. */\n placeholder?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n isDisabled?: boolean;\n\n /** The hidden input name; the hidden input emits the selected icon key. */\n name?: string;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { Icon } from '../../../foundation/icons';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { inputBaseVariants, InputSize } from '../InputStyles';\n\n/**\n * Searchable icon-picker grid. Built-in 50+ icon subset from `lucide-vue-next`;\n * pass your own `icons` map to override.\n */\n/* `inheritAttrs: false` so `class` folds into the panel's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'IconPicker', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<IconPickerProps>(), {\n icons: () => BUILT_IN_ICONS,\n columns: 8,\n size: 20,\n iconButtonSize: 36,\n placeholder: 'Search icons…',\n /* Explicit `undefined` defaults: `useControlled` keys on `=== undefined`, and Vue casts an\n absent `boolean` prop to `false` — which would shadow the form control context. */\n value: undefined,\n modelValue: undefined,\n isDisabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half — carries the icon key. */\n 'update:modelValue': [name: string];\n /** Replaces React's `onValueChange`. */\n 'value-change': [name: string];\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\n/* Inline panel (no popover trigger) — the `role=\"group\"` grid is the control:\n it takes the context id (so a Field label's `for` resolves), is named via\n `aria-labelledby`, and described via `aria-describedby`. `aria-invalid` is not\n valid on `group`; invalid state surfaces through the describedby swap to the\n error chrome. Disabled flows to the search input + icon buttons. */\nconst field = useFormControl();\nconst finalDisabled = computed(() => props.isDisabled ?? field?.isDisabled);\nconst labelledBy = computed(() => field?.labelledBy);\n\nconst controlled = useControlled<string>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? '',\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst selected = controlled.value;\nconst query = ref('');\n\nconst filtered = computed(() => {\n const entries = Object.entries(props.icons);\n if (!query.value) return entries;\n const q = query.value.toLowerCase();\n return entries.filter(([key]) => key.toLowerCase().includes(q));\n});\n\nfunction onQueryInput(event: Event): void {\n query.value = (event.target as HTMLInputElement).value;\n}\n\nfunction buttonClass(key: string): string {\n return cn(\n 'inline-flex items-center justify-center rounded-md border text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n selected.value === key\n ? 'border-primary bg-primary text-primary-foreground hover:bg-primary'\n : 'border-transparent',\n );\n}\n\nconst gridStyle = computed(() => ({\n gridTemplateColumns: `repeat(${props.columns}, ${props.iconButtonSize}px)`,\n maxHeight: '240px',\n}));\n\nconst buttonStyle = computed(() => ({\n width: `${props.iconButtonSize}px`,\n height: `${props.iconButtonSize}px`,\n}));\n\nconst gridId = computed(() => props.id ?? field?.id);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst panelClass = computed(() =>\n cn(\n 'flex flex-col gap-2 rounded-md border border-border bg-card p-3 text-card-foreground shadow-sm',\n attrs.class as ClassValue,\n ),\n);\n\nconst searchClass = cn(inputBaseVariants({ size: InputSize.Sm }));\n\n/** The rendered root `<div>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" :class=\"panelClass\" v-bind=\"passthroughAttrs\">\n <input\n type=\"search\"\n :value=\"query\"\n :placeholder=\"placeholder\"\n :disabled=\"finalDisabled\"\n :class=\"searchClass\"\n @input=\"onQueryInput\"\n />\n <!--\n Flat button collection, no 2D keyboard nav — ARIA grid (grid > row > gridcell)\n would be a lie; group + labeled buttons is honest.\n -->\n <div\n role=\"group\"\n :id=\"gridId\"\n :aria-label=\"labelledBy ? undefined : 'Icons'\"\n :aria-labelledby=\"labelledBy\"\n :aria-describedby=\"field?.describedBy\"\n class=\"grid gap-1 overflow-y-auto\"\n :style=\"gridStyle\"\n >\n <div v-for=\"[key, iconComp] in filtered\" :key=\"key\">\n <button\n type=\"button\"\n :aria-pressed=\"selected === key\"\n :aria-label=\"key\"\n :disabled=\"finalDisabled\"\n :style=\"buttonStyle\"\n :class=\"buttonClass(key)\"\n @click=\"controlled.setValue(key)\"\n >\n <Icon :icon=\"iconComp\" :size=\"size\" />\n </button>\n </div>\n <div\n v-if=\"filtered.length === 0\"\n class=\"col-span-full px-2 py-6 text-center text-xs text-muted-foreground\"\n >\n No icons match.\n </div>\n </div>\n <input v-if=\"name\" type=\"hidden\" :name=\"name\" :value=\"selected\" />\n </div>\n</template>\n","<script lang=\"ts\">\n/** Represents a single selectable font face. */\nexport interface FontOption {\n name: string;\n family: string;\n sample?: string;\n}\n\nexport const BUILT_IN_FONTS: ReadonlyArray<FontOption> = [\n { name: 'System Sans', family: 'system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif' },\n { name: 'System Serif', family: 'ui-serif, Cambria, Georgia, \"Times New Roman\", serif' },\n { name: 'System Mono', family: 'ui-monospace, SFMono-Regular, Menlo, Consolas, monospace' },\n { name: 'Helvetica', family: 'Helvetica, Arial, sans-serif' },\n { name: 'Times', family: '\"Times New Roman\", Times, serif' },\n { name: 'Courier', family: '\"Courier New\", Courier, monospace' },\n { name: 'Georgia', family: 'Georgia, \"Times New Roman\", serif' },\n { name: 'Verdana', family: 'Verdana, Geneva, Tahoma, sans-serif' },\n { name: 'Tahoma', family: 'Tahoma, Geneva, Verdana, sans-serif' },\n { name: 'Trebuchet', family: '\"Trebuchet MS\", Helvetica, sans-serif' },\n { name: 'Garamond', family: 'Garamond, \"Times New Roman\", serif' },\n { name: 'Comic Sans', family: '\"Comic Sans MS\", \"Comic Sans\", cursive' },\n { name: 'Impact', family: 'Impact, \"Arial Narrow\", sans-serif' },\n];\n\nexport interface FontPickerProps {\n /** The selected font family, controlled — React's spelling, which wins when both are set. */\n value?: string;\n\n /** The selected font family, controlled. The `v-model` binding target. */\n modelValue?: string;\n\n /** The initial font family when uncontrolled. Defaults to the first entry in `fonts`. */\n defaultValue?: string;\n\n /** The selectable font set. Defaults to {@link BUILT_IN_FONTS}. */\n fonts?: ReadonlyArray<FontOption>;\n\n /** The trigger text shown when the value matches no known font. */\n placeholder?: string;\n\n /** The sample string rendered in each row's own face, unless the option carries its own `sample`. */\n previewText?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n isDisabled?: boolean;\n\n /** The hidden form input name; the hidden input emits the selected family. */\n name?: string;\n\n /** The control's id — it lands on the trigger button. Auto-filled from `FormControl` context. */\n id?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { ChevronDown } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { Icon } from '../../../foundation/icons';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { Popover, PopoverContent, PopoverTrigger } from '../../overlays';\n\n/**\n * Font-family picker with live preview. Each option row renders in its own\n * font face. Wraps `overlays/Popover` for the dropdown.\n */\n/* `inheritAttrs: false` so `class` folds into the wrapper's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'FontPicker', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<FontPickerProps>(), {\n fonts: () => BUILT_IN_FONTS,\n placeholder: 'Select font…',\n previewText: 'The quick brown fox',\n /* Explicit `undefined` defaults: `useControlled` keys on `=== undefined`, and Vue casts an\n absent `boolean` prop to `false` — which would shadow the form control context. */\n value: undefined,\n modelValue: undefined,\n isDisabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [family: string];\n /** Replaces React's `onValueChange`. */\n 'value-change': [family: string];\n}>();\n\nconst attrs = useAttrs();\n\n/* Inherits id/disabled/invalid/labelledby/describedby from a surrounding <Field>;\n standalone props win when provided, context fills the gaps (Select parity).\n The `id` lands on the trigger button (the control), not the wrapper div. */\nconst field = useFormControl();\nconst finalDisabled = computed(() => props.isDisabled ?? field?.isDisabled);\n\nconst controlled = useControlled<string>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? props.fonts[0]?.family ?? '',\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst family = controlled.value;\n\n/* React kept the popover state internal and exposed no `open` prop; so does this port. */\nconst open = ref(false);\nconst query = ref('');\n\nconst filtered = computed(() => {\n if (!query.value) return props.fonts;\n const q = query.value.toLowerCase();\n return props.fonts.filter((f) => f.name.toLowerCase().includes(q));\n});\n\nconst current = computed(() => props.fonts.find((f) => f.family === family.value));\n\nfunction onOpenChange(next: boolean): void {\n open.value = next;\n}\n\nfunction onQueryInput(event: Event): void {\n query.value = (event.target as HTMLInputElement).value;\n}\n\nfunction select(option: FontOption): void {\n controlled.setValue(option.family);\n open.value = false;\n}\n\nfunction optionClass(option: FontOption): string {\n return cn(\n 'flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-left text-sm transition-colors hover:bg-muted',\n option.family === family.value && 'bg-primary-soft text-primary-soft-foreground',\n );\n}\n\nconst triggerId = computed(() => props.id ?? field?.id);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst wrapperClass = computed(() => cn('inline-block', attrs.class as ClassValue));\n\nconst ChevronDownIcon = ChevronDown;\n</script>\n\n<template>\n <div :class=\"wrapperClass\" v-bind=\"passthroughAttrs\">\n <Popover :open=\"open\" @open-change=\"onOpenChange\">\n <PopoverTrigger as-child>\n <button\n type=\"button\"\n :id=\"triggerId\"\n :disabled=\"finalDisabled\"\n :aria-invalid=\"field?.isInvalid || undefined\"\n :aria-labelledby=\"field?.labelledBy\"\n :aria-describedby=\"field?.describedBy\"\n aria-haspopup=\"listbox\"\n :aria-expanded=\"open\"\n class=\"inline-flex h-10 min-w-[14rem] items-center justify-between gap-2 rounded-md border border-input bg-background px-3 text-sm transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-60\"\n >\n <span :style=\"{ fontFamily: family }\" class=\"truncate text-foreground\">\n {{ current?.name ?? placeholder }}\n </span>\n <Icon :icon=\"ChevronDownIcon\" :size=\"14\" class=\"text-muted-foreground\" />\n </button>\n </PopoverTrigger>\n <!-- NOT `is-bare` (which the React original passed): bare strips the whole surface\n recipe — background, border, shadow — leaving a transparent panel with the page\n showing through the font list. The explicit `w-`/`p-` classes already override the\n chrome defaults (`w-72`, `padding: lg`) through `cn`, which is all `is-bare` was\n being used for. -->\n <PopoverContent class=\"w-[20rem] p-2\">\n <input\n type=\"search\"\n autofocus\n :value=\"query\"\n placeholder=\"Search fonts…\"\n class=\"mb-2 h-8 w-full rounded-md border border-input bg-background px-2 text-sm outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n @input=\"onQueryInput\"\n />\n <div role=\"listbox\" aria-label=\"Fonts\" class=\"max-h-72 overflow-y-auto\">\n <button\n v-for=\"f in filtered\"\n :key=\"f.name\"\n type=\"button\"\n role=\"option\"\n :aria-selected=\"f.family === family\"\n :class=\"optionClass(f)\"\n @click=\"select(f)\"\n >\n <span class=\"font-medium\">{{ f.name }}</span>\n <span\n :style=\"{ fontFamily: f.family }\"\n class=\"ml-3 truncate text-xs text-muted-foreground\"\n >\n {{ f.sample ?? previewText }}\n </span>\n </button>\n <div\n v-if=\"filtered.length === 0\"\n class=\"px-2 py-6 text-center text-xs text-muted-foreground\"\n >\n No fonts match.\n </div>\n </div>\n </PopoverContent>\n </Popover>\n <input v-if=\"name\" type=\"hidden\" :name=\"name\" :value=\"family\" />\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { InputSize, InputState } from '../InputStyles';\n\nexport interface CronInputProps {\n /** The control size. */\n size?: InputSize;\n\n /** The validity surface. */\n state?: InputState;\n\n /** The cron string, controlled — React's spelling, which wins when both are set. */\n value?: string;\n\n /** The cron string, controlled. The `v-model` binding target. */\n modelValue?: string;\n\n /** The initial cron string when uncontrolled. Defaults to the every-5-minutes expression. */\n defaultValue?: string;\n\n /** The empty-state placeholder. */\n placeholder?: string;\n\n /** The invalid surface override. Falls back to the surrounding form control's `isInvalid`. */\n isInvalid?: boolean;\n\n /** Whether the human-readable readout renders under the input. Default `true`. */\n hasPreview?: boolean;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n disabled?: boolean;\n\n /** The read-only state — React's spelling. Falls back to the form control's `isReadOnly`. */\n readOnly?: boolean;\n\n /** The DOM spelling of {@link CronInputProps.readOnly}, which wins when both are set. */\n readonly?: boolean;\n\n /** The required state. Falls back to the surrounding form control's `isRequired`. */\n required?: boolean;\n\n /** The hidden input name; the hidden input emits the cron string. */\n name?: string;\n}\n/* React also inherited `Omit<InputBaseVariants, 'size' | 'state'>` — the `border` / `ring`\n axes — but never forwarded them to `inputBaseVariants`, so they were dead props that landed\n on the DOM as unknown attributes. Only the two axes the original consumed are declared here. */\n\nconst WEEKDAY_NAMES = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\nconst MONTH_NAMES = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n];\n\n/** Defines the parsed form of a single cron field (one of the five positions). */\nexport const CronFieldKind = {\n /** Refers to `*` — every value. */\n Every: 'every',\n /** Refers to a single specific value (`N`). */\n Specific: 'specific',\n /** Refers to an inclusive range (`N-M`). */\n Range: 'range',\n /** Refers to a comma list (`N,M,O`). */\n List: 'list',\n /** Refers to a step expression such as `* / N`. */\n Step: 'step',\n /** Refers to an unparseable / out-of-bounds field. */\n Invalid: 'invalid',\n} as const;\n\nexport type CronFieldKind = (typeof CronFieldKind)[keyof typeof CronFieldKind];\n\ninterface CronField {\n raw: string;\n kind: CronFieldKind;\n value?: number | ReadonlyArray<number>;\n step?: number;\n range?: [number, number];\n}\n\nfunction parseField(raw: string, min: number, max: number): CronField {\n if (raw === '*') return { raw, kind: CronFieldKind.Every };\n // Step: \"*/N\" or \"from-to/N\" — only support \"*/N\" first-gen.\n if (/^\\*\\/(\\d+)$/.test(raw)) {\n const step = Number(raw.slice(2));\n if (step < 1 || step > max) return { raw, kind: CronFieldKind.Invalid };\n return { raw, kind: CronFieldKind.Step, step };\n }\n // Range: \"N-M\".\n if (/^(\\d+)-(\\d+)$/.test(raw)) {\n const [a, b] = raw.split('-').map(Number);\n if (a == null || b == null || a < min || b > max || a > b)\n return { raw, kind: CronFieldKind.Invalid };\n return { raw, kind: CronFieldKind.Range, range: [a, b] };\n }\n // List: \"N,M,O\".\n if (/^\\d+(,\\d+)+$/.test(raw)) {\n const parts = raw.split(',').map(Number);\n if (parts.some((p) => p < min || p > max)) return { raw, kind: CronFieldKind.Invalid };\n return { raw, kind: CronFieldKind.List, value: parts };\n }\n // Specific number.\n if (/^\\d+$/.test(raw)) {\n const n = Number(raw);\n if (n < min || n > max) return { raw, kind: CronFieldKind.Invalid };\n return { raw, kind: CronFieldKind.Specific, value: n };\n }\n return { raw, kind: CronFieldKind.Invalid };\n}\n\nfunction describeField(\n field: CronField,\n names?: ReadonlyArray<string>,\n unit = '',\n plural = '',\n): string {\n if (field.kind === CronFieldKind.Every) return '*';\n if (field.kind === CronFieldKind.Invalid) return '?';\n if (field.kind === CronFieldKind.Step && field.step != null)\n return `every ${field.step} ${plural || unit + 's'}`;\n if (field.kind === CronFieldKind.Range && field.range) {\n const [a, b] = field.range;\n const aLabel = names?.[a] ?? a;\n const bLabel = names?.[b] ?? b;\n return `${aLabel} through ${bLabel}`;\n }\n if (field.kind === CronFieldKind.List && Array.isArray(field.value)) {\n return field.value.map((v: number) => names?.[v] ?? v).join(', ');\n }\n if (field.kind === CronFieldKind.Specific && typeof field.value === 'number') {\n return String(names?.[field.value] ?? field.value);\n }\n return field.raw;\n}\n\nfunction parseCron(value: string): string {\n const parts = value.trim().split(/\\s+/);\n if (parts.length !== 5) return 'Cron expressions must have 5 fields (min hour dom month dow).';\n const [minRaw, hourRaw, domRaw, monRaw, dowRaw] = parts as [string, string, string, string, string];\n const minute = parseField(minRaw, 0, 59);\n const hour = parseField(hourRaw, 0, 23);\n const dom = parseField(domRaw, 1, 31);\n const month = parseField(monRaw, 1, 12);\n const dow = parseField(dowRaw, 0, 6);\n\n if ([minute, hour, dom, month, dow].some((f) => f.kind === CronFieldKind.Invalid)) {\n return 'Invalid cron expression.';\n }\n\n // Common-case readouts.\n if (\n minute.kind === CronFieldKind.Step &&\n hour.kind === CronFieldKind.Every &&\n dom.kind === CronFieldKind.Every &&\n month.kind === CronFieldKind.Every &&\n dow.kind === CronFieldKind.Every\n ) {\n return `Every ${minute.step} minutes`;\n }\n if (\n minute.kind === CronFieldKind.Every &&\n hour.kind === CronFieldKind.Step &&\n dom.kind === CronFieldKind.Every &&\n month.kind === CronFieldKind.Every &&\n dow.kind === CronFieldKind.Every\n ) {\n return `Every ${hour.step} hours`;\n }\n if (\n minute.kind === CronFieldKind.Specific &&\n hour.kind === CronFieldKind.Specific &&\n dom.kind === CronFieldKind.Every &&\n month.kind === CronFieldKind.Every &&\n dow.kind === CronFieldKind.Every\n ) {\n return `Every day at ${String(hour.value).padStart(2, '0')}:${String(minute.value).padStart(2, '0')}`;\n }\n if (\n minute.kind === CronFieldKind.Specific &&\n hour.kind === CronFieldKind.Specific &&\n dom.kind === CronFieldKind.Every &&\n month.kind === CronFieldKind.Every &&\n (dow.kind === CronFieldKind.List || dow.kind === CronFieldKind.Specific)\n ) {\n return `At ${String(hour.value).padStart(2, '0')}:${String(minute.value).padStart(2, '0')} on ${describeField(dow, WEEKDAY_NAMES)}`;\n }\n if (\n minute.kind === CronFieldKind.Every &&\n hour.kind === CronFieldKind.Every &&\n dom.kind === CronFieldKind.Every &&\n month.kind === CronFieldKind.Every &&\n dow.kind === CronFieldKind.Every\n ) {\n return 'Every minute';\n }\n // Fallback — describe each field.\n const parts2 = [];\n if (minute.kind !== CronFieldKind.Every)\n parts2.push(`minute: ${describeField(minute, undefined, 'minute')}`);\n if (hour.kind !== CronFieldKind.Every)\n parts2.push(`hour: ${describeField(hour, undefined, 'hour')}`);\n if (dom.kind !== CronFieldKind.Every) parts2.push(`day: ${describeField(dom)}`);\n if (month.kind !== CronFieldKind.Every)\n parts2.push(`month: ${describeField(month, ['', ...MONTH_NAMES])}`);\n if (dow.kind !== CronFieldKind.Every)\n parts2.push(`weekday: ${describeField(dow, WEEKDAY_NAMES)}`);\n return parts2.length === 0 ? 'Every minute' : parts2.join(' · ');\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { inputBaseVariants, InputState as InputStateValue } from '../InputStyles';\n\n/**\n * Cron-string input with human-readable preview. Supports asterisk, N,\n * step (asterisk-slash-N), N-M, N,M,O per field. Quartz extensions\n * (?, L, W, #) deferred.\n *\n * Form-aware: inside a `Field`/`form.Field` the inner input takes the context\n * id (a label's `for` focuses it directly) + `aria-describedby`, the\n * disabled/read-only/required flags, and `aria-invalid`/invalid surface.\n */\n/* `inheritAttrs: false` so `class` folds into the wrapper's own `cn()` call, and so the rest\n of the attrs land on the inner `<input>` rather than the wrapper. */\ndefineOptions({ name: 'CronInput', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<CronInputProps>(), {\n placeholder: '* * * * *',\n hasPreview: true,\n /* Explicit `undefined` defaults: `useControlled` keys on `=== undefined`, and Vue casts an\n absent `boolean` prop to `false` — which would shadow the form control context. */\n value: undefined,\n modelValue: undefined,\n isInvalid: undefined,\n disabled: undefined,\n readOnly: undefined,\n readonly: undefined,\n required: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string];\n /** Replaces React's `onValueChange`. */\n 'value-change': [value: string];\n}>();\n\nconst attrs = useAttrs();\nconst input = useTemplateRef<HTMLInputElement>('input');\n\nconst ctx = useFormControl();\n\nconst controlled = useControlled<string>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? '*/5 * * * *',\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst cron = controlled.value;\n\nconst preview = computed(() => parseCron(cron.value));\n\nconst isError = computed(\n () =>\n (props.isInvalid ?? ctx?.isInvalid) ||\n preview.value.startsWith('Invalid') ||\n preview.value.startsWith('Cron'),\n);\n\nconst inputState = computed(() =>\n isError.value ? InputStateValue.Invalid : (props.state ?? InputStateValue.Default),\n);\n\nfunction onInput(event: Event): void {\n controlled.setValue((event.target as HTMLInputElement).value);\n}\n\n/* Never a declared prop — a declared `'aria-describedby'` would arrive as\n `props.ariaDescribedby` and stop reaching the DOM. */\nconst ariaDescribedBy = computed(() => attrs['aria-describedby'] as string | undefined);\n\nconst inputId = computed(() => props.id ?? ctx?.id);\nconst isDisabled = computed(() => props.disabled ?? ctx?.isDisabled);\nconst isReadOnly = computed(() => props.readonly ?? props.readOnly ?? ctx?.isReadOnly);\nconst isRequired = computed(() => props.required ?? ctx?.isRequired);\nconst describedBy = computed(() => ariaDescribedBy.value ?? ctx?.describedBy);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class', 'aria-describedby']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst wrapperClass = computed(() =>\n cn('flex flex-col gap-1', attrs.class as ClassValue),\n);\n\nconst inputClass = computed(() =>\n cn(inputBaseVariants({ size: props.size, state: inputState.value }), 'font-mono'),\n);\n\nconst previewClass = computed(() =>\n cn('px-1 text-xs', isError.value ? 'text-destructive' : 'text-muted-foreground'),\n);\n\n/** The rendered `<input>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: input });\n</script>\n\n<template>\n <div :class=\"wrapperClass\">\n <input\n ref=\"input\"\n type=\"text\"\n :id=\"inputId\"\n :value=\"cron\"\n :placeholder=\"placeholder\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :required=\"isRequired\"\n :aria-invalid=\"isError || undefined\"\n :aria-describedby=\"describedBy\"\n :spellcheck=\"false\"\n :class=\"inputClass\"\n v-bind=\"passthroughAttrs\"\n @input=\"onInput\"\n />\n <div v-if=\"hasPreview\" aria-live=\"polite\" :class=\"previewClass\">{{ preview }}</div>\n <input v-if=\"name\" type=\"hidden\" :name=\"name\" :value=\"cron\" />\n </div>\n</template>\n","<script lang=\"ts\">\n/** Defines the geometry of a CSS gradient. */\nexport const GradientKind = {\n /** Refers to a linear gradient. */\n Linear: 'linear',\n /** Refers to a radial gradient. */\n Radial: 'radial',\n /** Refers to a conic gradient. */\n Conic: 'conic',\n} as const;\n\nexport type GradientKind = (typeof GradientKind)[keyof typeof GradientKind];\n\nexport interface GradientStop {\n color: string;\n position: number;\n}\n\nexport interface Gradient {\n kind: GradientKind;\n angle: number;\n stops: ReadonlyArray<GradientStop>;\n}\n\nexport interface GradientPickerProps {\n /** The gradient, controlled — React's spelling, which wins when both are set. */\n value?: Gradient;\n\n /** The gradient, controlled. The `v-model` binding target. */\n modelValue?: Gradient;\n\n /** The initial gradient when uncontrolled. */\n defaultValue?: Gradient;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n isDisabled?: boolean;\n\n /** The hidden input name; the hidden input emits the CSS string. */\n name?: string;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n}\n\nconst DEFAULT_GRADIENT: Gradient = {\n kind: GradientKind.Linear,\n angle: 90,\n stops: [\n { color: '#3b82f6', position: 0 },\n { color: '#a855f7', position: 100 },\n ],\n};\n\nexport function gradientToCss(g: Gradient): string {\n const stops = [...g.stops].sort((a, b) => a.position - b.position);\n const stopsStr = stops.map((s) => `${s.color} ${s.position}%`).join(', ');\n if (g.kind === GradientKind.Linear) return `linear-gradient(${g.angle}deg, ${stopsStr})`;\n if (g.kind === GradientKind.Radial) return `radial-gradient(circle, ${stopsStr})`;\n return `conic-gradient(from ${g.angle}deg, ${stopsStr})`;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Plus, Trash } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { Icon } from '../../../foundation/icons';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { inputBaseVariants, InputSize } from '../InputStyles';\n\n/**\n * Visual gradient editor — kind / angle / stops. Output `Gradient` object via\n * `update:modelValue` / `value-change`; `name` emits the CSS string for forms.\n *\n * Form-aware at GROUP level: inside a `Field`/`form.Field` the root (`role=\"group\"`)\n * takes the context id + `aria-labelledby`/`aria-describedby`/`aria-invalid`, and\n * the disabled flag cascades to every inner control.\n */\n/* `inheritAttrs: false` so `class` folds into the root's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'GradientPicker', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<GradientPickerProps>(), {\n /* Explicit `undefined` defaults: `useControlled` keys on `=== undefined`, and Vue casts an\n absent `boolean` prop to `false` — which would shadow the form control context. */\n value: undefined,\n modelValue: undefined,\n defaultValue: undefined,\n isDisabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: Gradient];\n /** Replaces React's `onValueChange`. */\n 'value-change': [value: Gradient];\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst ctx = useFormControl();\nconst isDisabled = computed(() => props.isDisabled ?? ctx?.isDisabled);\n\nconst controlled = useControlled<Gradient>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? DEFAULT_GRADIENT,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst gradient = controlled.value;\n\nconst css = computed(() => gradientToCss(gradient.value));\n\n/* `Object.values` hoisted out of the template — the runtime template compiler resolves plain\n identifiers, not arbitrary global calls. */\nconst kinds = Object.values(GradientKind);\n\nfunction update(patch: Partial<Gradient>): void {\n controlled.setValue({ ...gradient.value, ...patch });\n}\n\nfunction updateStop(index: number, patch: Partial<GradientStop>): void {\n controlled.setValue({\n ...gradient.value,\n stops: gradient.value.stops.map((s, i) => (i === index ? { ...s, ...patch } : s)),\n });\n}\n\nfunction addStop(): void {\n const last = gradient.value.stops[gradient.value.stops.length - 1];\n const newPos = last ? Math.min(100, last.position + 25) : 50;\n controlled.setValue({\n ...gradient.value,\n stops: [...gradient.value.stops, { color: '#ffffff', position: newPos }],\n });\n}\n\nfunction removeStop(index: number): void {\n if (gradient.value.stops.length <= 2) return;\n controlled.setValue({\n ...gradient.value,\n stops: gradient.value.stops.filter((_, i) => i !== index),\n });\n}\n\nfunction onAngleInput(event: Event): void {\n const raw = Number((event.target as HTMLInputElement).value) || 0;\n update({ angle: Math.max(0, Math.min(360, raw)) });\n}\n\nfunction onStopColorInput(index: number, event: Event): void {\n updateStop(index, { color: (event.target as HTMLInputElement).value });\n}\n\nfunction onStopPositionInput(index: number, event: Event): void {\n const raw = Number((event.target as HTMLInputElement).value) || 0;\n updateStop(index, { position: Math.max(0, Math.min(100, raw)) });\n}\n\nfunction kindClass(kind: GradientKind): string {\n return cn(\n 'inline-flex h-6 items-center rounded px-2 text-xs font-medium transition-colors',\n gradient.value.kind === kind\n ? 'bg-primary text-primary-foreground'\n : 'text-muted-foreground hover:text-foreground',\n );\n}\n\nconst rootId = computed(() => props.id ?? ctx?.id);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'flex flex-col gap-3 rounded-md border border-border bg-card p-3 text-card-foreground shadow-sm',\n isDisabled.value && 'opacity-60',\n attrs.class as ClassValue,\n ),\n);\n\nconst angleInputClass = cn(inputBaseVariants({ size: InputSize.Sm }), 'w-20');\nconst hexInputClass = cn(inputBaseVariants({ size: InputSize.Sm }), 'flex-1 font-mono');\nconst positionInputClass = cn(inputBaseVariants({ size: InputSize.Sm }), 'w-16');\n\nconst PlusIcon = Plus;\nconst TrashIcon = Trash;\n\n/** The rendered root `<div>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n ref=\"el\"\n role=\"group\"\n :id=\"rootId\"\n :aria-labelledby=\"ctx?.labelledBy\"\n :aria-describedby=\"ctx?.describedBy\"\n :aria-invalid=\"ctx?.isInvalid || undefined\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n >\n <!-- Kind + angle -->\n <div class=\"flex items-center gap-2 text-sm\">\n <div\n role=\"radiogroup\"\n aria-label=\"Gradient kind\"\n class=\"flex items-center gap-0.5 rounded-md bg-muted/40 p-0.5 ring-1 ring-border\"\n >\n <button\n v-for=\"k in kinds\"\n :key=\"k\"\n type=\"button\"\n role=\"radio\"\n :aria-checked=\"gradient.kind === k\"\n :disabled=\"isDisabled\"\n :class=\"kindClass(k)\"\n @click=\"update({ kind: k })\"\n >\n {{ k }}\n </button>\n </div>\n <label\n v-if=\"gradient.kind !== 'radial'\"\n class=\"ml-auto flex items-center gap-2 text-xs text-muted-foreground\"\n >\n Angle\n <input\n type=\"number\"\n :min=\"0\"\n :max=\"360\"\n :value=\"gradient.angle\"\n :disabled=\"isDisabled\"\n :class=\"angleInputClass\"\n @input=\"onAngleInput\"\n />\n °\n </label>\n </div>\n\n <!-- Preview bar -->\n <div\n aria-hidden=\"true\"\n class=\"h-12 rounded-md border border-border\"\n :style=\"{ background: css }\"\n />\n\n <!-- Stops -->\n <ul class=\"flex flex-col gap-2\">\n <li v-for=\"(stop, i) in gradient.stops\" :key=\"i\" class=\"flex items-center gap-2\">\n <input\n type=\"color\"\n aria-label=\"Stop color\"\n :value=\"stop.color\"\n :disabled=\"isDisabled\"\n class=\"h-7 w-10 cursor-pointer rounded-sm border border-input bg-background\"\n @input=\"onStopColorInput(i, $event)\"\n />\n <input\n type=\"text\"\n aria-label=\"Stop color hex\"\n :value=\"stop.color\"\n :disabled=\"isDisabled\"\n :class=\"hexInputClass\"\n @input=\"onStopColorInput(i, $event)\"\n />\n <input\n type=\"number\"\n aria-label=\"Stop position\"\n :min=\"0\"\n :max=\"100\"\n :value=\"stop.position\"\n :disabled=\"isDisabled\"\n :class=\"positionInputClass\"\n @input=\"onStopPositionInput(i, $event)\"\n />\n <span class=\"text-xs text-muted-foreground\">%</span>\n <button\n type=\"button\"\n aria-label=\"Remove stop\"\n :disabled=\"isDisabled || gradient.stops.length <= 2\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded text-destructive hover:bg-destructive-soft disabled:pointer-events-none disabled:opacity-40\"\n @click=\"removeStop(i)\"\n >\n <Icon :icon=\"TrashIcon\" :size=\"12\" />\n </button>\n </li>\n </ul>\n\n <button\n type=\"button\"\n :disabled=\"isDisabled\"\n class=\"inline-flex h-8 w-full items-center justify-center gap-1 rounded-md border border-dashed border-border text-xs text-muted-foreground hover:bg-muted hover:text-foreground\"\n @click=\"addStop\"\n >\n <Icon :icon=\"PlusIcon\" :size=\"12\" /> Add stop\n </button>\n\n <!-- CSS output -->\n <code\n class=\"block break-all rounded-md bg-muted/40 px-2 py-1.5 text-[10px] text-muted-foreground\"\n >\n {{ css }}\n </code>\n <input v-if=\"name\" type=\"hidden\" :name=\"name\" :value=\"css\" />\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface Address {\n country: string;\n line1: string;\n line2?: string;\n city: string;\n region: string;\n postalCode: string;\n}\n\ninterface CountryConfig {\n iso: string;\n name: string;\n regionLabel: string;\n postalLabel: string;\n regionOptions?: Array<{ value: string; label: string }>;\n}\n\nconst COUNTRIES: ReadonlyArray<CountryConfig> = [\n {\n iso: 'US',\n name: 'United States',\n regionLabel: 'State',\n postalLabel: 'ZIP code',\n regionOptions: [\n 'AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'FL', 'GA', 'HI', 'ID', 'IL', 'IN', 'IA',\n 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ',\n 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT',\n 'VA', 'WA', 'WV', 'WI', 'WY',\n ].map((s) => ({ value: s, label: s })),\n },\n {\n iso: 'CA',\n name: 'Canada',\n regionLabel: 'Province',\n postalLabel: 'Postal code',\n regionOptions: ['AB', 'BC', 'MB', 'NB', 'NL', 'NS', 'NT', 'NU', 'ON', 'PE', 'QC', 'SK', 'YT'].map(\n (s) => ({ value: s, label: s }),\n ),\n },\n { iso: 'GB', name: 'United Kingdom', regionLabel: 'County', postalLabel: 'Postcode' },\n { iso: 'DE', name: 'Germany', regionLabel: 'Bundesland', postalLabel: 'PLZ' },\n { iso: 'FR', name: 'France', regionLabel: 'Région', postalLabel: 'Code postal' },\n { iso: 'AU', name: 'Australia', regionLabel: 'State', postalLabel: 'Postcode' },\n { iso: 'JP', name: 'Japan', regionLabel: 'Prefecture', postalLabel: '〒' },\n];\n\nconst FALLBACK: CountryConfig = {\n iso: 'XX',\n name: 'Other',\n regionLabel: 'Region',\n postalLabel: 'Postal code',\n};\n\nfunction configFor(iso: string): CountryConfig {\n return COUNTRIES.find((c) => c.iso === iso) ?? FALLBACK;\n}\n\nexport interface AddressFormProps {\n /** The address, controlled — React's spelling, which wins when both are set. */\n value?: Address;\n\n /** The address, controlled. The `v-model` binding target. */\n modelValue?: Address;\n\n /** The initial address when uncontrolled. */\n defaultValue?: Address;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n isDisabled?: boolean;\n\n /** The read-only state. Falls back to the surrounding form control's `isReadOnly`. */\n isReadOnly?: boolean;\n\n /** Whether city / region / postal stack in one column instead of three. */\n isCompact?: boolean;\n\n /** The prefix for hidden inputs (`{name}.line1`, etc.). */\n name?: string;\n\n /** The control's id. Auto-filled from `FormControl` context when omitted. */\n id?: string;\n}\n\n/** The free-text address fields, i.e. every field but `country`. */\ntype AddressTextField = 'line1' | 'line2' | 'city' | 'region' | 'postalCode';\n\nconst EMPTY: Address = { country: 'US', line1: '', city: '', region: '', postalCode: '' };\n\nexport const ADDRESS_COUNTRIES = COUNTRIES;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled, useId } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { inputBaseVariants, InputSize } from '../InputStyles';\n\n/**\n * Country-aware address form. Country select drives the region label/options\n * and postal-code label. Built-in config for US/CA/GB/DE/FR/AU/JP; generic\n * fallback for the rest.\n *\n * Form-aware at GROUP level: inside a `Field`/`form.Field` the root (`role=\"group\"`)\n * takes the context id + `aria-labelledby`/`aria-describedby`/`aria-invalid`, and\n * the disabled/read-only flags cascade to every sub-field (each keeps its own\n * self-contained label/id pair).\n */\n/* `inheritAttrs: false` so `class` folds into the root's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'AddressForm', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<AddressFormProps>(), {\n /* Explicit `undefined` defaults: `useControlled` keys on `=== undefined`, and Vue casts an\n absent `boolean` prop to `false` — which would shadow the form control context. */\n value: undefined,\n modelValue: undefined,\n defaultValue: undefined,\n isDisabled: undefined,\n isReadOnly: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [address: Address];\n /** Replaces React's `onValueChange`. */\n 'value-change': [address: Address];\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst ctx = useFormControl();\nconst isDisabled = computed(() => props.isDisabled ?? ctx?.isDisabled);\nconst isReadOnly = computed(() => props.isReadOnly ?? ctx?.isReadOnly);\n\nconst controlled = useControlled<Address>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? EMPTY,\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst address = controlled.value;\n\nconst config = computed(() => configFor(address.value.country));\n\nconst ids = {\n country: useId('country'),\n line1: useId('line1'),\n line2: useId('line2'),\n city: useId('city'),\n region: useId('region'),\n postal: useId('postal'),\n};\n\nfunction update(patch: Partial<Address>): void {\n controlled.setValue({ ...address.value, ...patch });\n}\n\nfunction onCountryChange(event: Event): void {\n update({ country: (event.target as HTMLSelectElement).value, region: '' });\n}\n\n/* Written through a typed local rather than a computed-key object literal: a union-keyed\n `{ [key]: value }` widens to an index signature and stops matching `Partial<Address>`. */\nfunction onFieldInput(key: AddressTextField, event: Event): void {\n const patch: Partial<Address> = {};\n patch[key] = (event.target as HTMLInputElement).value;\n update(patch);\n}\n\nfunction onRegionSelect(event: Event): void {\n update({ region: (event.target as HTMLSelectElement).value });\n}\n\nconst rootId = computed(() => props.id ?? ctx?.id);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() => cn('flex flex-col gap-3', attrs.class as ClassValue));\n\nconst gridClass = computed(() =>\n cn('grid gap-3', props.isCompact ? 'grid-cols-1' : 'grid-cols-3'),\n);\n\nconst controlClass = cn(inputBaseVariants({ size: InputSize.Md }));\n\n/** The rendered root `<div>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n ref=\"el\"\n role=\"group\"\n :id=\"rootId\"\n :aria-labelledby=\"ctx?.labelledBy\"\n :aria-describedby=\"ctx?.describedBy\"\n :aria-invalid=\"ctx?.isInvalid || undefined\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n >\n <!-- Country -->\n <div class=\"flex flex-col gap-1\">\n <label :for=\"ids.country\" class=\"text-xs font-medium text-foreground\">Country</label>\n <select\n :id=\"ids.country\"\n :value=\"address.country\"\n :disabled=\"isDisabled || isReadOnly\"\n :class=\"controlClass\"\n @change=\"onCountryChange\"\n >\n <option v-for=\"c in ADDRESS_COUNTRIES\" :key=\"c.iso\" :value=\"c.iso\">{{ c.name }}</option>\n <option value=\"XX\">Other</option>\n </select>\n </div>\n <!-- Line 1 -->\n <div class=\"flex flex-col gap-1\">\n <label :for=\"ids.line1\" class=\"text-xs font-medium text-foreground\">Address line 1</label>\n <input\n :id=\"ids.line1\"\n type=\"text\"\n autocomplete=\"address-line1\"\n :value=\"address.line1\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :class=\"controlClass\"\n @input=\"onFieldInput('line1', $event)\"\n />\n </div>\n <!-- Line 2 -->\n <div class=\"flex flex-col gap-1\">\n <label :for=\"ids.line2\" class=\"text-xs font-medium text-muted-foreground\">\n Address line 2 <span class=\"text-[10px]\">(optional)</span>\n </label>\n <input\n :id=\"ids.line2\"\n type=\"text\"\n autocomplete=\"address-line2\"\n :value=\"address.line2 ?? ''\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :class=\"controlClass\"\n @input=\"onFieldInput('line2', $event)\"\n />\n </div>\n <!-- City + Region + Postal -->\n <div :class=\"gridClass\">\n <div class=\"flex flex-col gap-1\">\n <label :for=\"ids.city\" class=\"text-xs font-medium text-foreground\">City</label>\n <input\n :id=\"ids.city\"\n type=\"text\"\n autocomplete=\"address-level2\"\n :value=\"address.city\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :class=\"controlClass\"\n @input=\"onFieldInput('city', $event)\"\n />\n </div>\n <div class=\"flex flex-col gap-1\">\n <label :for=\"ids.region\" class=\"text-xs font-medium text-foreground\">\n {{ config.regionLabel }}\n </label>\n <select\n v-if=\"config.regionOptions\"\n :id=\"ids.region\"\n :value=\"address.region\"\n :disabled=\"isDisabled || isReadOnly\"\n :class=\"controlClass\"\n @change=\"onRegionSelect\"\n >\n <option value=\"\">—</option>\n <option v-for=\"o in config.regionOptions\" :key=\"o.value\" :value=\"o.value\">\n {{ o.label }}\n </option>\n </select>\n <input\n v-else\n :id=\"ids.region\"\n type=\"text\"\n autocomplete=\"address-level1\"\n :value=\"address.region\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :class=\"controlClass\"\n @input=\"onFieldInput('region', $event)\"\n />\n </div>\n <div class=\"flex flex-col gap-1\">\n <label :for=\"ids.postal\" class=\"text-xs font-medium text-foreground\">\n {{ config.postalLabel }}\n </label>\n <input\n :id=\"ids.postal\"\n type=\"text\"\n autocomplete=\"postal-code\"\n :value=\"address.postalCode\"\n :disabled=\"isDisabled\"\n :readonly=\"isReadOnly\"\n :class=\"controlClass\"\n @input=\"onFieldInput('postalCode', $event)\"\n />\n </div>\n </div>\n <template v-if=\"name\">\n <input type=\"hidden\" :name=\"`${name}.country`\" :value=\"address.country\" />\n <input type=\"hidden\" :name=\"`${name}.line1`\" :value=\"address.line1\" />\n <input type=\"hidden\" :name=\"`${name}.line2`\" :value=\"address.line2 ?? ''\" />\n <input type=\"hidden\" :name=\"`${name}.city`\" :value=\"address.city\" />\n <input type=\"hidden\" :name=\"`${name}.region`\" :value=\"address.region\" />\n <input type=\"hidden\" :name=\"`${name}.postalCode`\" :value=\"address.postalCode\" />\n </template>\n </div>\n</template>\n","<script lang=\"ts\">\n/** Represents one selectable dialling country. */\nexport interface PhoneCountry {\n iso: string;\n name: string;\n dial: string; // includes leading +\n flag: string; // emoji\n}\n\nexport const PHONE_COUNTRIES: ReadonlyArray<PhoneCountry> = [\n { iso: 'US', name: 'United States', dial: '+1', flag: '🇺🇸' },\n { iso: 'CA', name: 'Canada', dial: '+1', flag: '🇨🇦' },\n { iso: 'GB', name: 'United Kingdom', dial: '+44', flag: '🇬🇧' },\n { iso: 'AU', name: 'Australia', dial: '+61', flag: '🇦🇺' },\n { iso: 'DE', name: 'Germany', dial: '+49', flag: '🇩🇪' },\n { iso: 'FR', name: 'France', dial: '+33', flag: '🇫🇷' },\n { iso: 'ES', name: 'Spain', dial: '+34', flag: '🇪🇸' },\n { iso: 'IT', name: 'Italy', dial: '+39', flag: '🇮🇹' },\n { iso: 'NL', name: 'Netherlands', dial: '+31', flag: '🇳🇱' },\n { iso: 'BE', name: 'Belgium', dial: '+32', flag: '🇧🇪' },\n { iso: 'CH', name: 'Switzerland', dial: '+41', flag: '🇨🇭' },\n { iso: 'AT', name: 'Austria', dial: '+43', flag: '🇦🇹' },\n { iso: 'SE', name: 'Sweden', dial: '+46', flag: '🇸🇪' },\n { iso: 'NO', name: 'Norway', dial: '+47', flag: '🇳🇴' },\n { iso: 'DK', name: 'Denmark', dial: '+45', flag: '🇩🇰' },\n { iso: 'FI', name: 'Finland', dial: '+358', flag: '🇫🇮' },\n { iso: 'IE', name: 'Ireland', dial: '+353', flag: '🇮🇪' },\n { iso: 'PT', name: 'Portugal', dial: '+351', flag: '🇵🇹' },\n { iso: 'PL', name: 'Poland', dial: '+48', flag: '🇵🇱' },\n { iso: 'CZ', name: 'Czechia', dial: '+420', flag: '🇨🇿' },\n { iso: 'GR', name: 'Greece', dial: '+30', flag: '🇬🇷' },\n { iso: 'TR', name: 'Türkiye', dial: '+90', flag: '🇹🇷' },\n { iso: 'RU', name: 'Russia', dial: '+7', flag: '🇷🇺' },\n { iso: 'UA', name: 'Ukraine', dial: '+380', flag: '🇺🇦' },\n { iso: 'IL', name: 'Israel', dial: '+972', flag: '🇮🇱' },\n { iso: 'AE', name: 'UAE', dial: '+971', flag: '🇦🇪' },\n { iso: 'SA', name: 'Saudi Arabia', dial: '+966', flag: '🇸🇦' },\n { iso: 'EG', name: 'Egypt', dial: '+20', flag: '🇪🇬' },\n { iso: 'ZA', name: 'South Africa', dial: '+27', flag: '🇿🇦' },\n { iso: 'NG', name: 'Nigeria', dial: '+234', flag: '🇳🇬' },\n { iso: 'KE', name: 'Kenya', dial: '+254', flag: '🇰🇪' },\n { iso: 'IN', name: 'India', dial: '+91', flag: '🇮🇳' },\n { iso: 'PK', name: 'Pakistan', dial: '+92', flag: '🇵🇰' },\n { iso: 'BD', name: 'Bangladesh', dial: '+880', flag: '🇧🇩' },\n { iso: 'SG', name: 'Singapore', dial: '+65', flag: '🇸🇬' },\n { iso: 'MY', name: 'Malaysia', dial: '+60', flag: '🇲🇾' },\n { iso: 'TH', name: 'Thailand', dial: '+66', flag: '🇹🇭' },\n { iso: 'VN', name: 'Vietnam', dial: '+84', flag: '🇻🇳' },\n { iso: 'PH', name: 'Philippines', dial: '+63', flag: '🇵🇭' },\n { iso: 'ID', name: 'Indonesia', dial: '+62', flag: '🇮🇩' },\n { iso: 'JP', name: 'Japan', dial: '+81', flag: '🇯🇵' },\n { iso: 'KR', name: 'South Korea', dial: '+82', flag: '🇰🇷' },\n { iso: 'CN', name: 'China', dial: '+86', flag: '🇨🇳' },\n { iso: 'HK', name: 'Hong Kong', dial: '+852', flag: '🇭🇰' },\n { iso: 'TW', name: 'Taiwan', dial: '+886', flag: '🇹🇼' },\n { iso: 'NZ', name: 'New Zealand', dial: '+64', flag: '🇳🇿' },\n { iso: 'BR', name: 'Brazil', dial: '+55', flag: '🇧🇷' },\n { iso: 'AR', name: 'Argentina', dial: '+54', flag: '🇦🇷' },\n { iso: 'CL', name: 'Chile', dial: '+56', flag: '🇨🇱' },\n { iso: 'CO', name: 'Colombia', dial: '+57', flag: '🇨🇴' },\n { iso: 'MX', name: 'Mexico', dial: '+52', flag: '🇲🇽' },\n];\n\nexport interface PhoneInputProps {\n /** The E.164 value, controlled — React's spelling, which wins when both are set. */\n value?: string;\n\n /** The E.164 value, controlled. The `v-model` binding target. */\n modelValue?: string;\n\n /** The initial E.164 value when uncontrolled. */\n defaultValue?: string;\n\n /** The ISO code selected before the value carries a recognisable dial prefix. Default `US`. */\n defaultCountry?: string;\n\n /** The disabled state. Falls back to the surrounding form control's `isDisabled`. */\n isDisabled?: boolean;\n\n /** The read-only state. Falls back to the surrounding form control's `isReadOnly`. */\n isReadOnly?: boolean;\n\n /** The invalid surface override. Falls back to the surrounding form control's `isInvalid`. */\n isInvalid?: boolean;\n\n /** The national-number placeholder. */\n placeholder?: string;\n\n /** The hidden input name; the hidden input emits the full E.164 value. */\n name?: string;\n}\n\nfunction splitE164(value: string, defaultIso: string): { iso: string; national: string } {\n if (!value) return { iso: defaultIso, national: '' };\n // Match the longest dial code prefix.\n const sorted = [...PHONE_COUNTRIES].sort((a, b) => b.dial.length - a.dial.length);\n for (const c of sorted) {\n if (value.startsWith(c.dial)) {\n return { iso: c.iso, national: value.slice(c.dial.length).replace(/\\D/g, '') };\n }\n }\n return { iso: defaultIso, national: value.replace(/\\D/g, '') };\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { useFormControl } from '../../../foundation/primitives';\nimport { inputBaseVariants, InputSize } from '../InputStyles';\n\n/**\n * International phone input — country dial-code select + national-number\n * input. Output is E.164 (`+<country><number>`). First-gen list; full\n * `libphonenumber` validation/format deferred.\n */\n/* `inheritAttrs: false` so `class` folds into the root's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'PhoneInput', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<PhoneInputProps>(), {\n defaultCountry: 'US',\n placeholder: '(555) 555-5555',\n /* Explicit `undefined` defaults: `useControlled` keys on `=== undefined`, and Vue casts an\n absent `boolean` prop to `false` — which would shadow the form control context. */\n value: undefined,\n modelValue: undefined,\n isDisabled: undefined,\n isReadOnly: undefined,\n isInvalid: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half — carries the full E.164 string. */\n 'update:modelValue': [e164: string];\n /** Replaces React's `onValueChange`. */\n 'value-change': [e164: string];\n}>();\n\nconst attrs = useAttrs();\n\nconst controlled = useControlled<string>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? '',\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst e164 = controlled.value;\n\n/* FormControlContext adoption — explicit props stay as overrides. The national-number\n input is the composite's primary control (carries the context id + describedby);\n a user `id` attr stays on the root div. */\nconst ctx = useFormControl();\nconst disabled = computed(() => props.isDisabled ?? ctx?.isDisabled);\nconst readOnly = computed(() => props.isReadOnly ?? ctx?.isReadOnly);\nconst invalid = computed(() => props.isInvalid ?? ctx?.isInvalid);\n\n/* Selected ISO is state — shared dial codes (+1 US/CA) make it unrecoverable from the value\n alone. Re-derive only when the value's dial prefix becomes incompatible with the selection. */\nconst selectedIso = ref(props.defaultCountry);\n\nconst split = computed(() => {\n const selected = PHONE_COUNTRIES.find((c) => c.iso === selectedIso.value);\n if (selected && (!e164.value || e164.value.startsWith(selected.dial))) {\n return {\n iso: selected.iso,\n national: e164.value.slice(selected.dial.length).replace(/\\D/g, ''),\n };\n }\n return splitE164(e164.value, props.defaultCountry);\n});\n\nconst iso = computed(() => split.value.iso);\nconst national = computed(() => split.value.national);\nconst country = computed(\n () => PHONE_COUNTRIES.find((c) => c.iso === iso.value) ?? PHONE_COUNTRIES[0]!,\n);\n\nfunction setCountry(event: Event): void {\n const nextIso = (event.target as HTMLSelectElement).value;\n const next = PHONE_COUNTRIES.find((c) => c.iso === nextIso) ?? country.value;\n selectedIso.value = next.iso;\n controlled.setValue(`${next.dial}${national.value}`);\n}\n\nfunction setNational(event: Event): void {\n const digits = (event.target as HTMLInputElement).value.replace(/\\D/g, '');\n controlled.setValue(`${country.value.dial}${digits}`);\n}\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'inline-flex items-stretch overflow-hidden rounded-md border bg-background',\n invalid.value ? 'border-destructive' : 'border-input',\n disabled.value && 'opacity-60',\n attrs.class as ClassValue,\n ),\n);\n\nconst selectClass = cn(\n 'h-10 cursor-pointer border-r border-input bg-card pl-2 pr-1 text-sm outline-none focus-visible:ring-2 focus-visible:ring-ring',\n);\n\nconst inputClass = cn(\n inputBaseVariants({ size: InputSize.Md }),\n 'rounded-none border-0 focus-visible:ring-0',\n);\n</script>\n\n<template>\n <div :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <select\n aria-label=\"Country\"\n :value=\"iso\"\n :disabled=\"disabled || readOnly\"\n :class=\"selectClass\"\n :style=\"{ minWidth: '90px' }\"\n @change=\"setCountry\"\n >\n <option v-for=\"c in PHONE_COUNTRIES\" :key=\"c.iso\" :value=\"c.iso\">\n {{ c.flag }} {{ c.dial }}\n </option>\n </select>\n <input\n type=\"tel\"\n inputmode=\"tel\"\n autocomplete=\"tel-national\"\n :id=\"ctx?.id\"\n :value=\"national\"\n :placeholder=\"placeholder\"\n :disabled=\"disabled\"\n :readonly=\"readOnly\"\n :aria-invalid=\"invalid || undefined\"\n :aria-describedby=\"ctx?.describedBy\"\n :aria-required=\"ctx?.isRequired || undefined\"\n :class=\"inputClass\"\n @input=\"setNational\"\n />\n <input v-if=\"name\" type=\"hidden\" :name=\"name\" :value=\"e164\" />\n </div>\n</template>\n","import { Bike, Car, Clock, Flag, Hash, Lightbulb, PawPrint, Smile, Utensils } from 'lucide-vue-next';\n\nimport { SizePreset } from '../../../foundation/utils';\nimport { type IconAdapter } from '../../../foundation/icons';\nimport { EmojiCategory } from '../../../domain/emoji';\n\n/** A uniform t-shirt scale, applied per picker element (search, category nav, tiles). */\nexport type EmojiPickerSize = Extract<SizePreset, 'sm' | 'md' | 'lg'>;\n\n/** The picker's element scale applied wherever no per-element size is given. */\nexport const DefaultPickerSize: EmojiPickerSize = SizePreset.Md;\n\n/** Defines a picker element that can carry its own scale — the search box, the category nav, or the tiles. */\nexport const PickerElement = {\n /** Refers to the search input. */\n Search: 'search',\n /** Refers to the category nav. */\n Nav: 'nav',\n /** Refers to the emoji tiles. */\n Tile: 'tile',\n} as const;\n\nexport type PickerElement = (typeof PickerElement)[keyof typeof PickerElement];\n\n/** A single scale for the whole picker, or a per-element override map — `search`/`nav`/`tile` as t-shirt scales plus `icon` as the strip icon size in px (a single dimension, so px rather than a scale). */\nexport type EmojiPickerSizeInput =\n | EmojiPickerSize\n | (Partial<Record<PickerElement, EmojiPickerSize>> & { icon?: number });\n\n/** Resolves the scale for one picker element — a uniform size applies to every element; a map falls back to `fallback` per element. Expandable to any element in `PickerElement`. */\nexport function resolveElementSize(\n size: EmojiPickerSizeInput | undefined,\n element: PickerElement,\n fallback: EmojiPickerSize,\n): EmojiPickerSize {\n return typeof size === 'string' ? size : size?.[element] ?? fallback;\n}\n\n/** Defines which category-navigation affordance the picker renders. */\nexport const CategoryNavVariant = {\n /** Refers to the segmented icon-strip layout. */\n Strip: 'strip',\n /** Refers to the labelled pill-row layout. */\n Pills: 'pills',\n} as const;\n\nexport type CategoryNavVariant = (typeof CategoryNavVariant)[keyof typeof CategoryNavVariant];\n\n/** Defines how each emoji tile is framed — a rounded-rect chip or a circle. */\nexport const EmojiTileShape = {\n /** Refers to a rounded-rect chip frame. */\n Rounded: 'rounded',\n /** Refers to a circular frame. */\n Circle: 'circle',\n} as const;\n\nexport type EmojiTileShape = (typeof EmojiTileShape)[keyof typeof EmojiTileShape];\n\n/** The default `StorageBroker` key the picker persists its most-recently-used emoji under. */\nexport const EmojiRecentsKey = 'wow-two-beta.emoji.recents';\n\n/** Defines the pixel geometry an `EmojiPickerSize` maps to for the rolled tile + nav elements. */\nexport interface EmojiPickerSizeTokens {\n /** The emoji tile's min edge, in px; the grid auto-fills columns at this width. */\n readonly tile: number;\n\n /** The emoji glyph's font size, in px. */\n readonly glyph: number;\n\n /** The category-nav control's edge, in px. */\n readonly nav: number;\n\n /** The inter-tile gap, in px. */\n readonly gap: number;\n}\n\n/** Maps each `EmojiPickerSize` to its tile / glyph / nav / gap pixel geometry. */\nexport const EmojiPickerSizes: Record<EmojiPickerSize, EmojiPickerSizeTokens> = {\n sm: { tile: 32, glyph: 18, nav: 26, gap: 4 },\n md: { tile: 40, glyph: 22, nav: 30, gap: 6 },\n lg: { tile: 48, glyph: 26, nav: 34, gap: 8 },\n};\n\n/** The synthetic \"recently used\" bucket — nav index 0, backed by the MRU list rather than the catalog. */\nexport const RecentCategory = 'recent';\n\n/** A navigable picker section: the synthetic recents bucket or one real catalog category. */\nexport type CategoryKey = typeof RecentCategory | EmojiCategory;\n\n/** Defines a category's nav presentation — its accessible label and glyph. */\ninterface CategoryDisplay {\n label: string;\n Icon: IconAdapter;\n}\n\n/** The nav categories in display order — recents first, then the catalog's Telegram-order groups. */\nexport const CategoryOrder: readonly CategoryKey[] = [\n RecentCategory,\n EmojiCategory.SmileysPeople,\n EmojiCategory.AnimalsNature,\n EmojiCategory.FoodDrink,\n EmojiCategory.Activity,\n EmojiCategory.TravelPlaces,\n EmojiCategory.Objects,\n EmojiCategory.Symbols,\n EmojiCategory.Flags,\n];\n\n/** Maps each nav category to its label + icon. */\nexport const CategoryDisplays: Record<CategoryKey, CategoryDisplay> = {\n [RecentCategory]: { label: 'Recent', Icon: Clock },\n [EmojiCategory.SmileysPeople]: { label: 'Smileys & people', Icon: Smile },\n [EmojiCategory.AnimalsNature]: { label: 'Animals & nature', Icon: PawPrint },\n [EmojiCategory.FoodDrink]: { label: 'Food & drink', Icon: Utensils },\n [EmojiCategory.Activity]: { label: 'Activity', Icon: Bike },\n [EmojiCategory.TravelPlaces]: { label: 'Travel & places', Icon: Car },\n [EmojiCategory.Objects]: { label: 'Objects', Icon: Lightbulb },\n [EmojiCategory.Symbols]: { label: 'Symbols', Icon: Hash },\n [EmojiCategory.Flags]: { label: 'Flags', Icon: Flag },\n};\n\n/** The muted hints shown when a picker surface has no emoji to render. */\nexport const EmojiEmptyLabels = {\n /** Refers to the empty search-results hint. */\n search: 'No matches.',\n /** Refers to the empty recents hint. */\n recents: 'Your picks show up here.',\n /** Refers to the empty category hint. */\n category: 'No emoji here yet.',\n} as const;\n","<script lang=\"ts\">\nimport type { CategoryKey, CategoryNavVariant, EmojiPickerSize } from './EmojiPicker.variants';\n\n/** Defines props for the horizontal category nav. */\nexport interface CategoryNavProps {\n /** The category-nav layout — segmented icon strip or labelled pills. */\n readonly variant: CategoryNavVariant;\n\n /** The active category. */\n readonly active: CategoryKey;\n\n /** The nav scale. */\n readonly size: EmojiPickerSize;\n\n /** The strip icon size in px. Default `round(nav * 0.8)` derived from the scale. */\n readonly iconSize?: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, type CSSProperties } from 'vue';\nimport {\n ToggleButton,\n ToggleButtonGroup,\n ToggleButtonGroupVariant,\n ToggleButtonVariant,\n ToggleMode,\n} from '../../actions';\nimport {\n CategoryDisplays,\n CategoryNavVariant as CategoryNavVariantValue,\n CategoryOrder,\n EmojiPickerSizes,\n} from './EmojiPicker.variants';\n\n/** Renders the category picker as a single-select `ToggleButtonGroup` — a segmented icon strip or a labelled pill row. */\ndefineOptions({ name: 'CategoryNav' });\n\nconst props = defineProps<CategoryNavProps>();\n\nconst emit = defineEmits<{\n /** Replaces React's `onSelect`. Carries the chosen category. */\n select: [category: CategoryKey];\n}>();\n\nconst isPills = computed(() => props.variant === CategoryNavVariantValue.Pills);\nconst navSize = computed(() => EmojiPickerSizes[props.size].nav);\n/* 0.55, not the React original's 0.8. `EmojiPickerSizes` already fixes the house glyph-in-box\n ratio at 0.55 (md: glyph 22 in tile 40); 0.8 left a 24px icon in a 30px segment, filling the\n strip edge-to-edge. Matching the tile ratio puts the nav back in scale with the picker. */\nconst stripIconSize = computed(() => props.iconSize ?? Math.round(navSize.value * 0.55));\nconst stripItemStyle = computed<CSSProperties>(() => ({ height: `${navSize.value}px` }));\n\nconst categories = computed(() =>\n CategoryOrder.map((key) => ({ key, label: CategoryDisplays[key].label, icon: CategoryDisplays[key].Icon })),\n);\n\n/* A category is always selected: the group emits `null` when the active button is re-clicked —\n ignore it. */\nfunction selectCategory(key: CategoryKey | null | ReadonlyArray<string>): void {\n if (typeof key === 'string') emit('select', key as CategoryKey);\n}\n</script>\n\n<template>\n <ToggleButtonGroup\n v-if=\"isPills\"\n :type=\"ToggleMode.Single\"\n :is-attached=\"false\"\n :value=\"active\"\n aria-label=\"Emoji categories\"\n class=\"flex-wrap\"\n @value-change=\"selectCategory\"\n >\n <ToggleButton\n v-for=\"category in categories\"\n :key=\"category.key\"\n :value=\"category.key\"\n :variant=\"ToggleButtonVariant.Outline\"\n :size=\"size\"\n >\n {{ category.label }}\n </ToggleButton>\n </ToggleButtonGroup>\n\n <ToggleButtonGroup\n v-else\n :type=\"ToggleMode.Single\"\n :variant=\"ToggleButtonGroupVariant.Segmented\"\n :value=\"active\"\n aria-label=\"Emoji categories\"\n class=\"w-full\"\n @value-change=\"selectCategory\"\n >\n <ToggleButton\n v-for=\"category in categories\"\n :key=\"category.key\"\n :value=\"category.key\"\n :title=\"category.label\"\n :aria-label=\"category.label\"\n class=\"flex-1\"\n :style=\"stripItemStyle\"\n >\n <component :is=\"category.icon\" :size=\"stripIconSize\" class=\"shrink-0\" aria-hidden=\"true\" />\n </ToggleButton>\n </ToggleButtonGroup>\n</template>\n","<script lang=\"ts\">\nimport type { EmojiCatalogEntry } from '../../../domain/emoji';\nimport { EmojiTileShape, type EmojiPickerSize } from './EmojiPicker.variants';\n\n/** Maps each tile shape to its frame classes (border + corner); the selection + hover wash layers on top. */\nconst TileFrames: Record<EmojiTileShape, string> = {\n [EmojiTileShape.Rounded]: 'rounded-md border',\n [EmojiTileShape.Circle]: 'rounded-full border',\n};\n\n/** Defines props for a single selectable emoji tile. */\nexport interface EmojiTileProps {\n /** The catalog emoji this tile renders. */\n readonly entry: EmojiCatalogEntry;\n\n /** Whether this tile is the active selection. */\n readonly selected: boolean;\n\n /** The tile scale. */\n readonly size: EmojiPickerSize;\n\n /** The tile frame — rounded chip or circle. */\n readonly shape: EmojiTileShape;\n\n /** Whether this tile holds the grid's single roving tab stop. */\n readonly isActive: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, type CSSProperties } from 'vue';\nimport { EmojiPickerSizes, EmojiTileShape as EmojiTileShapeValue } from './EmojiPicker.variants';\n\n/** Renders one selectable emoji tile as a listbox option — its glyph sized by the picker scale, framed by the tile shape. */\ndefineOptions({ name: 'EmojiTile' });\n\nconst props = defineProps<EmojiTileProps>();\n\nconst emit = defineEmits<{\n /** Replaces React's `onSelect`. Carries this tile's catalog entry. */\n select: [entry: EmojiCatalogEntry];\n}>();\n\nconst tokens = computed(() => EmojiPickerSizes[props.size]);\nconst isCircle = computed(() => props.shape === EmojiTileShapeValue.Circle);\n\nconst stateClass = computed(() =>\n props.selected ? 'border-primary bg-primary/10' : 'border-transparent hover:bg-muted',\n);\n\nconst tileClass = computed(\n () =>\n `flex items-center justify-center leading-none transition-colors ${TileFrames[props.shape]} ${stateClass.value} ${\n isCircle.value ? 'place-self-center' : ''\n }`,\n);\n\n/* A circle must read as round: pin it to a `tile`×`tile` square (so `rounded-full` is a circle,\n not a pill) and center it in its grid cell. A rounded chip stretches to fill the column, so\n only its height is fixed. */\nconst tileStyle = computed<CSSProperties>(() =>\n isCircle.value\n ? {\n height: `${tokens.value.tile}px`,\n width: `${tokens.value.tile}px`,\n fontSize: `${tokens.value.glyph}px`,\n }\n : { height: `${tokens.value.tile}px`, fontSize: `${tokens.value.glyph}px` },\n);\n</script>\n\n<template>\n <button\n type=\"button\"\n role=\"option\"\n :title=\"entry.label\"\n :aria-label=\"entry.label\"\n :aria-selected=\"selected\"\n :tabindex=\"isActive ? 0 : -1\"\n :class=\"tileClass\"\n :style=\"tileStyle\"\n @click=\"emit('select', entry)\"\n >\n {{ entry.glyph }}\n </button>\n</template>\n","<script lang=\"ts\">\nimport type { EmojiCatalogEntry } from '../../../domain/emoji';\nimport type { EmojiPickerSize, EmojiTileShape } from './EmojiPicker.variants';\n\n/** Defines props for the emoji tile grid. */\nexport interface EmojiGridProps {\n /** The emoji to lay out, in order. */\n readonly emojis: readonly EmojiCatalogEntry[];\n\n /** The selected emoji's glyph, or `null`. */\n readonly selectedGlyph: string | null;\n\n /** The tile scale. */\n readonly size: EmojiPickerSize;\n\n /** The tile frame — rounded chip or circle. */\n readonly shape: EmojiTileShape;\n\n /** The muted hint shown when `emojis` is empty. */\n readonly emptyLabel?: string;\n\n /** The fixed viewport height, in tile rows; when set, the grid scrolls inside a constant-height box. */\n readonly viewportRows?: number;\n\n /** The scrollbar thumb color — any CSS color. Default `var(--color-border-strong)`. */\n readonly scrollThumbColor?: string;\n}\n\n/** Reads the grid's live column count from its resolved `grid-template-columns` — the step size for a vertical arrow move. */\nfunction columnCount(grid: HTMLElement): number {\n const template = getComputedStyle(grid).gridTemplateColumns;\n return template ? template.split(' ').length : 1;\n}\n\n/* WebKit/Blink: slim scrollbar via the shadow-DOM pseudo-elements (not inline-styleable),\n expressed as Tailwind arbitrary variants — ~8px, transparent track, rounded thumb on the\n resolved color. */\nconst SCROLLBAR_CLASS =\n '[&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-track]:bg-transparent ' +\n '[&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-[var(--emoji-scroll-thumb)]';\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useTemplateRef, watch, type CSSProperties } from 'vue';\nimport { Key } from '../../../foundation/utils';\nimport { EmojiEmptyLabels, EmojiPickerSizes } from './EmojiPicker.variants';\nimport EmojiTile from './EmojiTile.vue';\n\n/**\n * Renders emoji as an auto-filling `listbox`, or a muted hint when the set is empty. A single roving `tabindex`\n * keeps the ~1870-tile grid to one tab stop; arrow keys (plus Home / End) move focus between options.\n */\ndefineOptions({ name: 'EmojiGrid' });\n\nconst props = defineProps<EmojiGridProps>();\n\nconst emit = defineEmits<{\n /** Replaces React's `onSelect`. Carries the picked catalog entry. */\n select: [entry: EmojiCatalogEntry];\n}>();\n\nconst grid = useTemplateRef<HTMLDivElement>('grid');\nconst activeIndex = ref(0);\n\nconst tokens = computed(() => EmojiPickerSizes[props.size]);\n\n/* Return the roving stop to the first tile whenever the visible set changes (category switch,\n search) — the tab stop moves back to tile 0 without stealing focus. */\nwatch(\n () => props.emojis,\n () => {\n activeIndex.value = 0;\n },\n);\n\n/* Clamp the roving stop for the transient render before the reset watcher runs, so no\n out-of-range tile is active. */\nconst activeStop = computed(() => Math.min(activeIndex.value, props.emojis.length - 1));\n\nfunction moveFocus(event: KeyboardEvent): void {\n const node = grid.value;\n if (node === null || props.emojis.length === 0) return;\n\n const columns = columnCount(node);\n let next: number;\n switch (event.key) {\n case Key.ArrowRight:\n next = activeIndex.value + 1;\n break;\n case Key.ArrowLeft:\n next = activeIndex.value - 1;\n break;\n case Key.ArrowDown:\n next = activeIndex.value + columns;\n break;\n case Key.ArrowUp:\n next = activeIndex.value - columns;\n break;\n case Key.Home:\n next = 0;\n break;\n case Key.End:\n next = props.emojis.length - 1;\n break;\n default:\n return;\n }\n\n next = Math.max(0, Math.min(next, props.emojis.length - 1));\n event.preventDefault();\n if (next === activeIndex.value) return;\n\n activeIndex.value = next;\n node.querySelectorAll<HTMLElement>('[role=\"option\"]')[next]?.focus();\n}\n\nconst gridStyle = computed<CSSProperties>(() => ({\n display: 'grid',\n gridTemplateColumns: `repeat(auto-fill, minmax(${tokens.value.tile}px, 1fr))`,\n gap: `${tokens.value.gap}px`,\n}));\n\n/* Default to a slightly darker neutral than the hairline border so the bar reads clearly; any\n CSS color plugs in. Falls back to `--color-border` for themes that don't define the stronger\n token — never worse than the old bar. */\nconst thumbColor = computed(\n () => props.scrollThumbColor ?? 'var(--color-border-strong, var(--color-border))',\n);\n\nconst viewportStyle = computed<CSSProperties>(() => ({\n height: `${(props.viewportRows ?? 0) * (tokens.value.tile + tokens.value.gap)}px`,\n overflowY: 'auto',\n scrollbarGutter: 'stable',\n /* Firefox: a slim bar with the resolved thumb color over a transparent track. */\n scrollbarWidth: 'thin',\n scrollbarColor: `${thumbColor.value} transparent`,\n /* Drives the WebKit thumb below — arbitrary-variant classes can't read a prop, so route it\n through a CSS var. */\n '--emoji-scroll-thumb': thumbColor.value,\n}));\n</script>\n\n<template>\n <p v-if=\"emojis.length === 0\" class=\"py-6 text-center text-xs text-muted-foreground\">\n {{ emptyLabel ?? EmojiEmptyLabels.category }}\n </p>\n\n <!--\n Two branches rather than one always-present wrapper: React returned the bare grid when\n `viewportRows` is undefined, and an unconditional extra block would become a stray flex\n item in the picker's `Stack`.\n -->\n <div\n v-else-if=\"viewportRows !== undefined\"\n :class=\"SCROLLBAR_CLASS\"\n :style=\"viewportStyle\"\n >\n <div ref=\"grid\" role=\"listbox\" aria-label=\"Emoji\" :style=\"gridStyle\" @keydown=\"moveFocus\">\n <EmojiTile\n v-for=\"(entry, index) in emojis\"\n :key=\"entry.glyph\"\n :entry=\"entry\"\n :selected=\"entry.glyph === selectedGlyph\"\n :size=\"size\"\n :shape=\"shape\"\n :is-active=\"index === activeStop\"\n @select=\"emit('select', $event)\"\n />\n </div>\n </div>\n\n <div v-else ref=\"grid\" role=\"listbox\" aria-label=\"Emoji\" :style=\"gridStyle\" @keydown=\"moveFocus\">\n <EmojiTile\n v-for=\"(entry, index) in emojis\"\n :key=\"entry.glyph\"\n :entry=\"entry\"\n :selected=\"entry.glyph === selectedGlyph\"\n :size=\"size\"\n :shape=\"shape\"\n :is-active=\"index === activeStop\"\n @select=\"emit('select', $event)\"\n />\n </div>\n</template>\n","import { computed, ref, toValue, type ComputedRef, type MaybeRefOrGetter, type Ref } from 'vue';\n\nimport { EmojiCatalog, EmojiCategory, type EmojiCatalogEntry } from '../../../domain/emoji';\nimport { useRecentItems } from '../../../foundation/hooks';\nimport { type StorageBroker } from '../../../foundation/storage';\n\nimport { type CategoryKey, EmojiRecentsKey, RecentCategory } from './EmojiPicker.variants';\n\n/** Identifies a recent emoji by its glyph. */\nconst emojiGlyphIdentity = (entry: EmojiCatalogEntry): string => entry.glyph;\n\n/** Defines the inputs the picker view-model binds to the live selection value. */\nexport interface UseEmojiPickerOptions {\n /** The current emoji entry, or `null` for none. Pass a getter to keep it reactive. */\n readonly value: MaybeRefOrGetter<EmojiCatalogEntry | null>;\n\n /** Emits the next emoji entry, or `null` to clear it. */\n readonly onChange: (entry: EmojiCatalogEntry | null) => void;\n\n /** The persistence contract backing recents — injected so the picker stays storage-agnostic (localStorage, Redux, …). */\n readonly storage: StorageBroker;\n\n /** When `true` and recents is empty at mount, the initial category is the first real category, not the recents bucket. Default `false`. */\n readonly showFirstCategoryWhenRecentsEmpty?: MaybeRefOrGetter<boolean>;\n}\n\n/**\n * Represents the headless picker state — layout-agnostic, shared by every nav variant.\n *\n * React exposed `setSearchKeyword` / `setActiveCategory` alongside the values; here\n * both are writable refs, which already are their own setters, so the paired setters\n * are gone.\n */\nexport interface EmojiPickerModel {\n /** The current search keyword. Writable. */\n readonly searchKeyword: Ref<string>;\n\n /** The active category (or the synthetic recents bucket). Writable. */\n readonly activeCategory: Ref<CategoryKey>;\n\n /** Whether a non-empty keyword is driving the visible list, bypassing categories. */\n readonly showSearch: ComputedRef<boolean>;\n\n /** The emoji to render right now — search results, recents, or the active category. */\n readonly visibleEmojis: ComputedRef<readonly EmojiCatalogEntry[]>;\n\n /** The most-recently-used emoji, most-recent-first. */\n readonly recents: ComputedRef<ReadonlyArray<EmojiCatalogEntry>>;\n\n /** The selected emoji entry, or `null` for none. */\n readonly selected: ComputedRef<EmojiCatalogEntry | null>;\n\n /** Picks an emoji — sets the selection to that entry and records it as recent. */\n readonly selectEmoji: (entry: EmojiCatalogEntry) => void;\n\n /** Clears the selected emoji. */\n readonly clearSelection: () => void;\n}\n\n/**\n * Manages the emoji picker independent of layout: owns the keyword, the active category, the derived\n * visible list, and the recents MRU — and folds a pick back into the selection entry + the recents list.\n */\nexport function useEmojiPicker({\n value,\n onChange,\n storage,\n showFirstCategoryWhenRecentsEmpty = false,\n}: UseEmojiPickerOptions): EmojiPickerModel {\n const { recents, push } = useRecentItems<EmojiCatalogEntry>(EmojiRecentsKey, {\n identify: emojiGlyphIdentity,\n broker: storage,\n });\n\n const searchKeyword = ref('');\n /* Default to the recents bucket; when asked and there are no recents yet, open on the first\n real category instead. Read once, at setup — the React original seeded `useState` the same\n way, so a later arrival of recents must not yank the user's category out from under them. */\n const activeCategory = ref<CategoryKey>(\n toValue(showFirstCategoryWhenRecentsEmpty) && recents.value.length === 0\n ? EmojiCategory.SmileysPeople\n : RecentCategory,\n );\n\n const trimmedKeyword = computed(() => searchKeyword.value.trim());\n const showSearch = computed(() => trimmedKeyword.value.length > 0);\n\n const visibleEmojis = computed<readonly EmojiCatalogEntry[]>(() => {\n if (showSearch.value) return EmojiCatalog.search(trimmedKeyword.value);\n if (activeCategory.value === RecentCategory) return recents.value;\n return EmojiCatalog.byCategory(activeCategory.value);\n });\n\n const selected = computed<EmojiCatalogEntry | null>(() => toValue(value));\n\n function selectEmoji(entry: EmojiCatalogEntry): void {\n onChange(entry);\n push(entry);\n }\n\n function clearSelection(): void {\n onChange(null);\n }\n\n return {\n searchKeyword,\n activeCategory,\n showSearch,\n visibleEmojis,\n recents,\n selected,\n selectEmoji,\n clearSelection,\n };\n}\n","<script lang=\"ts\">\nimport type { EmojiCatalogEntry } from '../../../domain/emoji';\nimport type { StorageBroker } from '../../../foundation/storage';\nimport type {\n CategoryNavVariant,\n EmojiPickerSizeInput,\n EmojiTileShape,\n} from './EmojiPicker.variants';\n\n/** Defines props for the emoji picker. */\nexport interface EmojiPickerProps {\n /** The current emoji catalog entry, or `null` for none. The `v-model` binding target. */\n readonly modelValue?: EmojiCatalogEntry | null;\n\n /** The current emoji catalog entry — React's spelling of `modelValue`, which wins when both are set. */\n readonly value?: EmojiCatalogEntry | null;\n\n /**\n * The persistence contract backing the \"recently used\" list — required, so the picker stays pure and\n * storage-agnostic. Plug `localStorageStorageBroker` for browser persistence, `memoryStorageBroker()` for a\n * throwaway in-memory store, or a custom `StorageBroker` (Redux, IndexedDB, …).\n */\n readonly storage: StorageBroker;\n\n /** The category-navigation affordance. Default `strip`. */\n readonly categoryNavVariant?: CategoryNavVariant;\n\n /** The element scale — one value for every element, or a per-element `{ search, nav, tile }`. Default `md`. */\n readonly size?: EmojiPickerSizeInput;\n\n /** The emoji-tile frame — rounded chip or circle. Default `rounded`. */\n readonly tileShape?: EmojiTileShape;\n\n /** The scrollable tile viewport's height, in tile rows. Default `6`. */\n readonly rowsCount?: number;\n\n /** The heading rendered above the picker. Default `Emoji`. */\n readonly label?: string;\n\n /** When `true` and no emoji has been used yet, opens on the first real category instead of the empty recents bucket. Default `false`. */\n readonly showFirstCategoryWhenRecentsEmpty?: boolean;\n\n /** The scrollbar thumb color for the tile viewport — any CSS color. Default `var(--color-border-strong)`. */\n readonly scrollThumbColor?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { ColorTone, SizePreset } from '../../../foundation/utils';\nimport { Button, ButtonVariant } from '../../actions';\nimport { Stack } from '../../layout';\nimport SearchInput from '../searchInput/SearchInput.vue';\n\nimport CategoryNav from './CategoryNav.vue';\nimport EmojiGrid from './EmojiGrid.vue';\nimport { useEmojiPicker } from './useEmojiPicker';\nimport {\n CategoryNavVariant as CategoryNavVariantValue,\n DefaultPickerSize,\n EmojiEmptyLabels,\n EmojiTileShape as EmojiTileShapeValue,\n PickerElement,\n RecentCategory,\n resolveElementSize,\n} from './EmojiPicker.variants';\n\n/**\n * Emoji picker — search + recents + a swappable category nav over the full bundled emoji catalog.\n * `value = null` means no emoji. Fully controlled: it emits the picked `EmojiCatalogEntry` (or `null`) via\n * `@value-change` / `v-model` — consumers read whatever field they need (`entry.glyph`, `entry.label`, …) —\n * and reads its recents through the injected `storage` broker. Size is a separate concern — compose\n * `EmojiSizeControl` (passing `entry.glyph`) when a host needs a per-emoji scale.\n */\ndefineOptions({ name: 'EmojiPicker' });\n\nconst props = withDefaults(defineProps<EmojiPickerProps>(), {\n categoryNavVariant: CategoryNavVariantValue.Strip,\n tileShape: EmojiTileShapeValue.Rounded,\n rowsCount: 6,\n label: 'Emoji',\n showFirstCategoryWhenRecentsEmpty: false,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [entry: EmojiCatalogEntry | null];\n /** Replaces React's `onChange`. Carries the picked entry, or `null` on clear. */\n 'value-change': [entry: EmojiCatalogEntry | null];\n}>();\n\nconst currentValue = computed(() =>\n props.value !== undefined ? props.value : (props.modelValue ?? null),\n);\n\nfunction onChange(entry: EmojiCatalogEntry | null): void {\n emit('update:modelValue', entry);\n emit('value-change', entry);\n}\n\nconst picker = useEmojiPicker({\n value: () => currentValue.value,\n onChange,\n storage: props.storage,\n showFirstCategoryWhenRecentsEmpty: () => props.showFirstCategoryWhenRecentsEmpty,\n});\n\nconst searchSize = computed(() =>\n resolveElementSize(props.size, PickerElement.Search, DefaultPickerSize),\n);\nconst navSize = computed(() => resolveElementSize(props.size, PickerElement.Nav, DefaultPickerSize));\nconst tileSize = computed(() =>\n resolveElementSize(props.size, PickerElement.Tile, DefaultPickerSize),\n);\n/* The strip icon is a single dimension → px straight off the size object (undefined for a\n uniform scale → CategoryNav's nav-derived default). */\nconst iconSize = computed(() => (typeof props.size === 'object' ? props.size.icon : undefined));\n\nconst selectedGlyph = computed(() => picker.selected.value?.glyph ?? null);\nconst isNoneSelected = computed(() => currentValue.value === null);\n\nconst emptyLabel = computed(() => {\n if (picker.showSearch.value) return EmojiEmptyLabels.search;\n return picker.activeCategory.value === RecentCategory\n ? EmojiEmptyLabels.recents\n : EmojiEmptyLabels.category;\n});\n</script>\n\n<template>\n <Stack gap=\"3\">\n <div class=\"flex items-center justify-between\">\n <span class=\"text-sm font-medium\">{{ label }}</span>\n <Button\n :variant=\"isNoneSelected ? undefined : ButtonVariant.Outline\"\n :tone=\"isNoneSelected ? ColorTone.Primary : ColorTone.Neutral\"\n :size=\"SizePreset.Sm\"\n :aria-pressed=\"isNoneSelected\"\n @click=\"picker.clearSelection()\"\n >\n None\n </Button>\n </div>\n\n <SearchInput\n :size=\"searchSize\"\n placeholder=\"Search emoji…\"\n :model-value=\"picker.searchKeyword.value\"\n @update:model-value=\"picker.searchKeyword.value = $event\"\n @clear=\"picker.searchKeyword.value = ''\"\n />\n\n <Stack gap=\"2\">\n <CategoryNav\n v-if=\"!picker.showSearch.value\"\n :variant=\"categoryNavVariant\"\n :active=\"picker.activeCategory.value\"\n :size=\"navSize\"\n :icon-size=\"iconSize\"\n @select=\"picker.activeCategory.value = $event\"\n />\n <EmojiGrid\n :emojis=\"picker.visibleEmojis.value\"\n :selected-glyph=\"selectedGlyph\"\n :size=\"tileSize\"\n :shape=\"tileShape\"\n :viewport-rows=\"rowsCount\"\n :scroll-thumb-color=\"scrollThumbColor\"\n :empty-label=\"emptyLabel\"\n @select=\"picker.selectEmoji($event)\"\n />\n </Stack>\n </Stack>\n</template>\n","<script lang=\"ts\">\nimport type { Placement } from '@floating-ui/vue';\nimport type { EmojiCatalogEntry } from '../../../domain/emoji';\nimport type { StorageBroker } from '../../../foundation/storage';\nimport type {\n CategoryNavVariant,\n EmojiPickerSizeInput,\n EmojiTileShape,\n} from './EmojiPicker.variants';\n\n/**\n * Defines props for the popover-hosted emoji picker.\n *\n * React wrote this as `extends Omit<EmojiPickerProps, 'value' | 'onChange'>`. The\n * forwarded picker props are spelled out instead: the SFC compiler has to generate\n * them as real props (they are forwarded by hand, not fallthrough attrs), and an\n * `Omit<…>` heritage over an imported interface is exactly what its type resolver\n * cannot follow.\n */\nexport interface EmojiPickerPopoverProps {\n /** The current emoji catalog entry, or `null` for none. The `v-model` binding target. */\n readonly modelValue?: EmojiCatalogEntry | null;\n\n /** The current emoji catalog entry — React's spelling of `modelValue`, which wins when both are set. */\n readonly value?: EmojiCatalogEntry | null;\n\n /** The persistence contract backing the \"recently used\" list. */\n readonly storage: StorageBroker;\n\n /** The category-navigation affordance. Default `strip`. */\n readonly categoryNavVariant?: CategoryNavVariant;\n\n /** The element scale — one value for every element, or a per-element `{ search, nav, tile }`. Default `md`. */\n readonly size?: EmojiPickerSizeInput;\n\n /** The emoji-tile frame — rounded chip or circle. Default `rounded`. */\n readonly tileShape?: EmojiTileShape;\n\n /** The scrollable tile viewport's height, in tile rows. Default `6`. */\n readonly rowsCount?: number;\n\n /** The heading rendered above the picker. Default `Emoji`. */\n readonly label?: string;\n\n /** When `true` and no emoji has been used yet, opens on the first real category. Default `false`. */\n readonly showFirstCategoryWhenRecentsEmpty?: boolean;\n\n /** The scrollbar thumb color for the tile viewport — any CSS color. */\n readonly scrollThumbColor?: string;\n\n /** The popover placement relative to the trigger. Default `bottom`. */\n readonly placement?: Placement;\n\n /** The open state, controlled. The `v-model:open` binding target. */\n readonly open?: boolean;\n\n /** The open state, controlled — the house boolean spelling of `open`; `open` wins when both are set. */\n readonly isOpen?: boolean;\n\n /** The initial open state when uncontrolled. Default `false`. */\n readonly defaultOpen?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { ColorTone, SizePreset } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { FormControlProvider, useFormControl } from '../../../foundation/primitives';\nimport { Button, ButtonShape, ButtonVariant } from '../../actions';\nimport { Popover, PopoverContent, PopoverTrigger } from '../../overlays';\nimport EmojiPicker from './EmojiPicker.vue';\n\n/**\n * Popover-hosted `EmojiPicker` — a chat/toolbar-friendly variant. A trigger opens a `Popover` holding the\n * full `EmojiPicker`; picking an entry emits it via `@value-change` / `v-model` (consumers read\n * `entry.glyph`) and closes the popover. Size is out of scope here — compose `EmojiSizeControl`\n * separately when a host needs a per-emoji scale.\n */\ndefineOptions({ name: 'EmojiPickerPopover' });\n\n/** React's `trigger` / `children` props are one `trigger` slot — a custom trigger replacing the default emoji-icon `Button`. */\ndefineSlots<{ trigger?(): unknown }>();\n\nconst props = withDefaults(defineProps<EmojiPickerPopoverProps>(), {\n placement: 'bottom',\n defaultOpen: false,\n /* `useControlled` keys on `=== undefined`, and Vue casts an absent `boolean` prop to `false`:\n without these the popover would read as \"controlled, and closed\" and never open. */\n open: undefined,\n isOpen: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [entry: EmojiCatalogEntry | null];\n /** Replaces React's `onChange`. Carries the picked entry, or `null` on clear. */\n 'value-change': [entry: EmojiCatalogEntry | null];\n /** The `v-model:open` half. */\n 'update:open': [open: boolean];\n /** Replaces React's `onOpenChange`. */\n 'open-change': [open: boolean];\n}>();\n\nconst openCtl = useControlled<boolean>({\n controlled: () => (props.open !== undefined ? props.open : props.isOpen),\n default: () => props.defaultOpen,\n onChange: (next) => {\n emit('update:open', next);\n emit('open-change', next);\n },\n});\n\nconst isOpenNow = computed(() => openCtl.value.value);\nconst currentValue = computed(() =>\n props.value !== undefined ? props.value : (props.modelValue ?? null),\n);\n\n/* Inherits id/invalid/labelledby/describedby from a surrounding <Field> for the DEFAULT trigger\n (`Button` already inherits `isDisabled` from the context itself). A custom trigger slot owns\n its own form-control wiring. `aria-labelledby` wins the accessible-name computation, so\n \"Choose emoji\" stays the fallback when there is no Field label. */\nconst field = useFormControl();\n\nconst fieldId = computed(() => field?.id);\nconst fieldLabelledBy = computed(() => field?.labelledBy);\nconst fieldDescribedBy = computed(() => field?.describedBy);\nconst fieldInvalid = computed(() => field?.isInvalid || undefined);\n\nconst triggerGlyph = computed(() => currentValue.value?.glyph ?? '🙂');\n\nfunction onPick(entry: EmojiCatalogEntry | null): void {\n emit('update:modelValue', entry);\n emit('value-change', entry);\n if (entry !== null) openCtl.setValue(false);\n}\n</script>\n\n<template>\n <Popover :open=\"isOpenNow\" :placement=\"placement\" @open-change=\"openCtl.setValue($event)\">\n <PopoverTrigger as-child>\n <slot name=\"trigger\">\n <Button\n :variant=\"ButtonVariant.Ghost\"\n :tone=\"ColorTone.Neutral\"\n :size=\"SizePreset.Sm\"\n :shape=\"ButtonShape.Square\"\n :id=\"fieldId\"\n aria-label=\"Choose emoji\"\n :aria-labelledby=\"fieldLabelledBy\"\n :aria-describedby=\"fieldDescribedBy\"\n :aria-invalid=\"fieldInvalid\"\n >\n {{ triggerGlyph }}\n </Button>\n </slot>\n </PopoverTrigger>\n <PopoverContent class=\"w-80\" padding=\"sm\">\n <!--\n The panel's SearchInput is a sub-control of the picker, not the field's control — a bare\n FormControlProvider keeps it from adopting the surrounding Field's id (which now names\n the trigger; adoption would duplicate it) or its chrome.\n -->\n <FormControlProvider>\n <EmojiPicker\n :model-value=\"currentValue\"\n :storage=\"storage\"\n :category-nav-variant=\"categoryNavVariant\"\n :size=\"size\"\n :tile-shape=\"tileShape\"\n :rows-count=\"rowsCount\"\n :label=\"label\"\n :show-first-category-when-recents-empty=\"showFirstCategoryWhenRecentsEmpty\"\n :scroll-thumb-color=\"scrollThumbColor\"\n @value-change=\"onPick\"\n />\n </FormControlProvider>\n </PopoverContent>\n </Popover>\n</template>\n","/** Defines a discrete emoji size preset — the ratio it applies to the host width, plus its preview glyph. */\nexport const CenterEmojiSize = {\n /** Refers to the small emoji size. */\n Small: 'small',\n /** Refers to the medium emoji size. */\n Medium: 'medium',\n /** Refers to the large emoji size. */\n Large: 'large',\n} as const;\n\nexport type CenterEmojiSize = (typeof CenterEmojiSize)[keyof typeof CenterEmojiSize];\n\n/** Defines the display for an emoji size option. */\ninterface CenterEmojiSizeDisplay {\n label: string;\n ratio: number;\n glyph: number;\n}\n\n/** Maps each emoji size to its label, host-width ratio, and preview glyph size (each glyph ≤ the control's preview cap). */\nexport const CenterEmojiSizeDisplays: Record<CenterEmojiSize, CenterEmojiSizeDisplay> = {\n [CenterEmojiSize.Small]: { label: 'Small', ratio: 0.18, glyph: 16 },\n [CenterEmojiSize.Medium]: { label: 'Medium', ratio: 0.25, glyph: 22 },\n [CenterEmojiSize.Large]: { label: 'Large', ratio: 0.32, glyph: 24 },\n};\n\n/** The emoji size (fraction of the host surface's width) applied as the sensible default when none is set. */\nexport const DefaultEmojiSize = 0.25;\n\n/** The default preview-glyph cap, in px — caps each tile's glyph so it never clips the `OptionTile` frame. */\nexport const DefaultMaxPreviewGlyph = 24;\n","<script lang=\"ts\">\n/* Deep import, not `from '../../actions'`: `ButtonSize` is declared in `Button.vue` and the\n `actions` barrel does not re-export it. The landed `OptionTile.vue` reaches for it the same\n way. Re-exporting it from `actions/button/index.ts` would be the tidier fix, but that file\n belongs to another lane. */\nimport type { ButtonSize } from '../../actions/button/Button.vue';\n\n/** Defines props for the emoji size control. */\nexport interface EmojiSizeControlProps {\n /** The emoji rendered inside each tile, so the choice previews the real glyph at that size. */\n readonly glyph: string;\n\n /** The current size ratio, controlled. The `v-model` binding target. */\n readonly modelValue?: number;\n\n /** The current size ratio — React's spelling of `modelValue`, which wins when both are set. */\n readonly sizeRatio?: number;\n\n /**\n * The preset-tile scale, forwarded to each `OptionTile`. Default `sm`.\n *\n * React wrote this as `OptionTileProps['size']`. An indexed access into an\n * imported interface is opaque to the SFC compiler's type resolver — it fails\n * the build while `vue-tsc` stays green — so the named alias the tile itself\n * uses is spelled out instead.\n */\n readonly size?: ButtonSize;\n\n /** The largest preview glyph, in px — caps each tile's glyph so it never clips the `OptionTile` frame. Default `24`. */\n readonly maxPreviewGlyph?: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { OptionTile, OptionTileGroup } from '../../actions';\nimport { ControlGroup } from '../../layout';\nimport {\n CenterEmojiSize,\n CenterEmojiSizeDisplays,\n DefaultEmojiSize,\n DefaultMaxPreviewGlyph,\n} from './EmojiSizeControl.variants';\n\n/** Renders the emoji size as a small tile set — each tile previews the given glyph at that preset size, no numbers. */\ndefineOptions({ name: 'EmojiSizeControl' });\n\nconst props = withDefaults(defineProps<EmojiSizeControlProps>(), {\n maxPreviewGlyph: DefaultMaxPreviewGlyph,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [ratio: number];\n /** Replaces React's `onChange`, which emitted the next size ratio. */\n 'value-change': [ratio: number];\n}>();\n\n/* Controlled-only, exactly as React had it — the component owns no state, the host does. */\nconst currentRatio = computed(() =>\n props.sizeRatio !== undefined ? props.sizeRatio : (props.modelValue ?? DefaultEmojiSize),\n);\n\nconst presets = computed(() =>\n Object.values(CenterEmojiSize).map((preset) => {\n const display = CenterEmojiSizeDisplays[preset];\n return {\n preset,\n label: `Size: ${display.label}`,\n ratio: display.ratio,\n glyphStyle: {\n fontSize: `${Math.min(display.glyph, props.maxPreviewGlyph)}px`,\n lineHeight: 1,\n },\n /* Float compare: the ratios are literals like 0.18/0.25/0.32, so an exact `===` against a\n value that round-tripped through a host would miss. */\n selected: Math.abs(currentRatio.value - display.ratio) < 0.001,\n };\n }),\n);\n\nfunction onSelect(ratio: number): void {\n emit('update:modelValue', ratio);\n emit('value-change', ratio);\n}\n</script>\n\n<template>\n <ControlGroup label=\"Size\" orientation=\"vertical\" :divided=\"false\">\n <OptionTileGroup label=\"Emoji size\">\n <OptionTile\n v-for=\"entry in presets\"\n :key=\"entry.preset\"\n :size=\"size\"\n :selected=\"entry.selected\"\n :label=\"entry.label\"\n @select=\"() => onSelect(entry.ratio)\"\n >\n <span class=\"flex h-full w-full items-center justify-center\" :style=\"entry.glyphStyle\">\n {{ glyph }}\n </span>\n </OptionTile>\n </OptionTileGroup>\n </ControlGroup>\n</template>\n","<script lang=\"ts\">\nimport type { Size } from '../../../foundation/utils';\n\nexport interface ReactionPickerProps {\n /** The list of emoji shortcuts shown as quick-pick buttons. */\n emojis?: ReadonlyArray<string>;\n\n /** The currently active emoji keys (highlighted). */\n selected?: ReadonlyArray<string>;\n\n /**\n * Fires when the trailing \"more\" button is clicked (open full picker).\n *\n * Kept a PROP, not an emit: its presence is what renders the button at all, and Vue\n * strips a declared emit's listener out of `useAttrs()` — an emit could never be\n * detected, so the button would either always or never render.\n */\n onMore?: () => void;\n\n /** The hidden state for the trailing \"more\" button. */\n isMoreHidden?: boolean;\n\n /** The compact button size. */\n size?: Size;\n}\n\nconst DEFAULT_REACTIONS = ['👍', '❤️', '😂', '🎉', '😮', '😢', '🚀'];\n\n/* Sizes not listed fall back to the `md` row at the call site. */\nconst SIZE: Partial<Record<Size, string>> = {\n sm: 'h-7 w-7 text-base',\n md: 'h-8 w-8 text-lg',\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Plus } from 'lucide-vue-next';\nimport { cn, Size as SizeValue } from '../../../foundation/utils';\n\n/**\n * Quick-pick row of common emoji reactions. Pair with `overlays/Popover`\n * to surface as a hover/long-press affordance on a `ChatBubble`. Click\n * `+` to fall through to a fuller `forms/EmojiPicker`.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'ReactionPicker', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ReactionPickerProps>(), {\n emojis: () => DEFAULT_REACTIONS,\n size: SizeValue.Md,\n /* Explicit `undefined` default: Vue casts an absent `boolean` prop to `false`, keeping the\n prop a genuine tri-state for consumers reading it. */\n isMoreHidden: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when an emoji is picked. Replaces React's `onSelect`. */\n select: [emoji: string];\n}>();\n\nconst attrs = useAttrs();\n\nfunction isActive(emoji: string): boolean {\n return props.selected?.includes(emoji) ?? false;\n}\n\nfunction emojiClass(emoji: string): string {\n return cn(\n 'inline-flex items-center justify-center rounded-full leading-none transition-transform',\n 'hover:scale-125 hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n isActive(emoji) && 'bg-primary-soft',\n SIZE[props.size] ?? SIZE.md,\n );\n}\n\nconst moreClass = computed(() =>\n cn(\n 'inline-flex items-center justify-center rounded-full text-muted-foreground transition-colors',\n 'hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n SIZE[props.size],\n ),\n);\n\nconst isMoreShown = computed(() => !props.isMoreHidden && Boolean(props.onMore));\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'inline-flex items-center gap-1 rounded-full border border-border bg-popover p-1 shadow-sm',\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div\n ref=\"root\"\n role=\"toolbar\"\n aria-label=\"Reaction picker\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n >\n <button\n v-for=\"emoji in emojis\"\n :key=\"emoji\"\n type=\"button\"\n :data-active=\"isActive(emoji) ? '' : undefined\"\n :aria-pressed=\"isActive(emoji)\"\n :aria-label=\"`React with ${emoji}`\"\n :class=\"emojiClass(emoji)\"\n @click=\"emit('select', emoji)\"\n >\n <span aria-hidden=\"true\">{{ emoji }}</span>\n </button>\n <button\n v-if=\"isMoreShown\"\n type=\"button\"\n aria-label=\"More reactions\"\n :class=\"moreClass\"\n @click=\"props.onMore?.()\"\n >\n <Plus class=\"h-4 w-4\" />\n </button>\n </div>\n</template>\n","<script lang=\"ts\">\n/** Defines which keypress submits a chat composer. */\nexport const SubmitTrigger = {\n /** Refers to plain Enter (Shift+Enter inserts a newline). */\n Enter: 'enter',\n /** Refers to Cmd/Ctrl+Enter (plain Enter inserts a newline). */\n ModEnter: 'mod-enter',\n} as const;\n\nexport type SubmitTrigger = (typeof SubmitTrigger)[keyof typeof SubmitTrigger];\n\nexport interface ChatComposerProps {\n /** The text value, controlled — React's spelling, which wins when both are set. */\n value?: string;\n\n /** The text value, controlled. The `v-model` binding target. */\n modelValue?: string;\n\n /** The initial text when uncontrolled. */\n defaultValue?: string;\n\n /** The placeholder text. */\n placeholder?: string;\n\n /** The disabled state for the input + send button. */\n isDisabled?: boolean;\n\n /** The content rendered on the leading edge of the toolbar (e.g. attach button).\n * Fill the `leading` slot for richer content. */\n leading?: string | number;\n\n /** The content rendered between the leading slot and the send button.\n * Fill the `trailing` slot for richer content. */\n trailing?: string | number;\n\n /** The custom send button, replacing the default. Fill the `sendButton` slot for richer content. */\n sendButton?: string | number;\n\n /** The hidden state for the send button (e.g. when consumer renders a custom CTA). */\n isSendButtonHidden?: boolean;\n\n /** The submit trigger for the textarea. `enter` = Enter alone (default).\n * `mod-enter` = Cmd/Ctrl+Enter (Enter inserts a newline). */\n submitOn?: SubmitTrigger;\n\n /** The maximum textarea pixel height before scroll kicks in. Default `200`. */\n maxHeight?: number;\n\n /**\n * The pass-through textarea attributes (`rows` is overridden).\n *\n * React typed this `Omit<TextareaHTMLAttributes, 'value' | 'defaultValue' | 'onChange'>`;\n * it is a loose attribute bag here because the SFC prop resolver has to resolve the\n * declared type at build time and cannot follow Vue's `TextareaHTMLAttributes` through a\n * mapped `Omit`. Listener keys use Vue's spelling — `onKeydown`, not `onKeyDown`.\n */\n textareaProps?: Record<string, unknown>;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, useAttrs, useSlots, useTemplateRef, watch } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Send } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\n\n/**\n * Chat input row with auto-resizing textarea and send button. Enter sends\n * by default (Shift+Enter inserts a newline); set `submitOn=\"mod-enter\"` to\n * flip the convention. Use `leading` / `trailing` slots for attach / emoji\n * pickers.\n */\n/* `inheritAttrs: false` so `class` folds into the form's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'ChatComposer', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ChatComposerProps>(), {\n placeholder: 'Write a message…',\n submitOn: 'enter',\n maxHeight: 200,\n isSendButtonHidden: false,\n /* Explicit `undefined` default: `useControlled` keys on `=== undefined`, so an absent\n `value`/`modelValue` must stay undefined rather than be read as a controlled empty string. */\n value: undefined,\n modelValue: undefined,\n isDisabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model` half. */\n 'update:modelValue': [value: string];\n /** Replaces React's `onValueChange`. */\n 'value-change': [value: string];\n /** Emits the trimmed text on send (Enter / Mod+Enter / button click). Replaces React's `onSubmit`. */\n submit: [value: string];\n}>();\n\ndefineSlots<{\n leading?(): unknown;\n trailing?(): unknown;\n sendButton?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\n\nconst controlled = useControlled<string>({\n controlled: () => (props.value !== undefined ? props.value : props.modelValue),\n default: () => props.defaultValue ?? '',\n onChange: (next) => {\n emit('update:modelValue', next);\n emit('value-change', next);\n },\n});\n\nconst text = controlled.value;\n\nconst textarea = useTemplateRef<HTMLTextAreaElement>('textarea');\n\n/* Reads + writes layout, so it must never run during SSR: it is reached only from `onMounted`\n and from a NON-immediate watcher, both client-only. An `immediate: true, flush: 'post'`\n watcher would run on the server and throw on the element access. */\nfunction resize(): void {\n const ta = textarea.value;\n if (!ta) return;\n ta.style.height = 'auto';\n const next = Math.min(ta.scrollHeight, props.maxHeight);\n ta.style.height = `${next}px`;\n ta.style.overflowY = ta.scrollHeight > props.maxHeight ? 'auto' : 'hidden';\n}\n\nonMounted(resize);\n\n/* React re-ran the resize effect on `value` and on `maxHeight` (a `resize` callback dep). */\nwatch([text, () => props.maxHeight], () => void nextTick(resize));\n\nconst isControlled = computed(\n () => (props.value !== undefined ? props.value : props.modelValue) !== undefined,\n);\nconst isEmpty = computed(() => text.value.trim().length === 0);\n\nfunction submit(event?: Event): void {\n event?.preventDefault();\n const trimmed = text.value.trim();\n if (!trimmed || props.isDisabled) return;\n emit('submit', trimmed);\n if (!isControlled.value) controlled.setValue('');\n}\n\nfunction onInput(event: Event): void {\n controlled.setValue((event.target as HTMLTextAreaElement).value);\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n /* React invoked `textareaProps.onKeyDown` first and then honoured `defaultPrevented`; the\n handler is pulled off the bag by hand to keep that ordering (and excluded from the bound\n passthrough below so it cannot fire twice). */\n (props.textareaProps?.onKeydown as ((e: KeyboardEvent) => void) | undefined)?.(event);\n if (event.defaultPrevented) return;\n const isEnter = event.key === 'Enter' && !event.shiftKey && !event.isComposing;\n const wantsMod = props.submitOn === 'mod-enter';\n const modPressed = event.metaKey || event.ctrlKey;\n if (isEnter && (wantsMod ? modPressed : !modPressed)) {\n event.preventDefault();\n submit();\n }\n}\n\nconst hasLeading = computed(() => Boolean(props.leading) || Boolean(slots.leading));\nconst hasTrailing = computed(() => Boolean(props.trailing) || Boolean(slots.trailing));\nconst hasSendButton = computed(() => Boolean(props.sendButton) || Boolean(slots.sendButton));\n\n/* `class` + the textarea's own class are owned; `onKeydown` is invoked by hand above. */\nconst TEXTAREA_OWNED: ReadonlySet<string> = new Set(['class', 'onKeydown', 'rows']);\nconst textareaPassthrough = computed(() =>\n Object.fromEntries(\n Object.entries(props.textareaProps ?? {}).filter(([key]) => !TEXTAREA_OWNED.has(key)),\n ),\n);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\n/* Fallthrough attrs land on the `<form>`, matching React's trailing `{...props}` spread. */\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst formClass = computed(() =>\n cn(\n 'flex w-full items-end gap-2 rounded-2xl border border-input bg-background px-3 py-2',\n 'focus-within:ring-2 focus-within:ring-ring',\n props.isDisabled && 'cursor-not-allowed opacity-60',\n attrs.class as ClassValue,\n ),\n);\n\nconst textareaClass = computed(() =>\n cn(\n 'flex-1 resize-none bg-transparent py-1 text-sm leading-relaxed text-foreground placeholder:text-muted-foreground focus:outline-none',\n props.textareaProps?.class as ClassValue,\n ),\n);\n\nconst sendButtonClass = computed(() =>\n cn(\n 'inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full self-end',\n isEmpty.value\n ? 'bg-muted text-muted-foreground'\n : 'bg-primary text-primary-foreground hover:bg-primary/90',\n 'disabled:cursor-not-allowed',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n ),\n);\n\nconst SendIcon = Send;\n\n/** The rendered `<textarea>` — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: textarea });\n</script>\n\n<template>\n <form :class=\"formClass\" v-bind=\"passthroughAttrs\" @submit=\"submit\">\n <div v-if=\"hasLeading\" class=\"flex shrink-0 items-center gap-1 self-end pb-1\">\n <slot name=\"leading\">{{ leading }}</slot>\n </div>\n <textarea\n ref=\"textarea\"\n v-bind=\"textareaPassthrough\"\n :value=\"text\"\n :rows=\"1\"\n :placeholder=\"placeholder\"\n :disabled=\"isDisabled\"\n :class=\"textareaClass\"\n @input=\"onInput\"\n @keydown=\"onKeydown\"\n />\n <div v-if=\"hasTrailing\" class=\"flex shrink-0 items-center gap-1 self-end pb-1\">\n <slot name=\"trailing\">{{ trailing }}</slot>\n </div>\n <template v-if=\"!isSendButtonHidden\">\n <slot v-if=\"hasSendButton\" name=\"sendButton\">{{ sendButton }}</slot>\n <button\n v-else\n type=\"submit\"\n :disabled=\"isDisabled || isEmpty\"\n aria-label=\"Send message\"\n :class=\"sendButtonClass\"\n >\n <SendIcon class=\"h-4 w-4\" />\n </button>\n </template>\n </form>\n</template>\n"],"names":["SIZE","_openBlock","_createElementBlock","_mergeProps","_renderSlot","_hoisted_2","_Fragment","_renderList","InputStateValue","_unref","_hoisted_1","_createElementVNode","_createVNode","Icon","_createBlock","TRACK_CLASS","FormControlProvider","Label","FormErrorMessage","$slots","FormHelperText","Checkbox","_hoisted_3","_hoisted_4","Radio","SideValue","Switch","OrientationValue","Fieldset","Legend","_toDisplayString","NumberInput","_hoisted_5","_hoisted_6","_normalizeClass","ListboxIndicatorValue","Popover","Announce","_createTextVNode","PopoverTrigger","SelectValue","PopoverContent","SearchInput","Listbox","ListboxEmpty","ListboxItem","MultiSelectTags","Portal","AnchoredPositioner","MonthGrid","CalendarIcon","Calendar","TemporalValue","TimeColumns","RangeCalendar","ColorSwatch","ratio","Orientation","ColorSwatchItem","_useSlots","ColorArea","ColorSlider","ColorField","ColorSwatchPicker","Tag","_toHandlers","next","_hoisted_7","_hoisted_8","_hoisted_9","JSONEditorTreeNode","JSONEditorModeValue","document","JSONEditorTreeView","JSONEditorTextView","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_16","_hoisted_20","DatePicker","_hoisted_22","_hoisted_23","Kbd","Map","_normalizeStyle","CategoryNavVariantValue","ToggleButtonGroup","ToggleButton","_resolveDynamicComponent","EmojiTileShapeValue","EmojiTile","Stack","Button","CategoryNav","EmojiGrid","EmojiPicker","ControlGroup","OptionTileGroup","OptionTile"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAMA,SAAsC;AAAA,EAC1C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;;;;;;;;;;;;AAkBA,UAAM,QAAQ;AAQd,UAAM,QAAQ,SAAA;AAGd,UAAM,MAAM,eAAA;AAKZ,yBAAqB,SAAS,MAAM,MAAM,MAAM,IAAI;AAEpD,UAAM,aAAa,SAAS,MAAM,MAAM,cAAc,KAAK,cAAc,KAAK;AAC9E,UAAM,WAAW,SAAS,MAAM,MAAM,OAAO,MAAM,WAAW,KAAK,EAAE;AACrE,UAAM,UAAU,SAAS,MAAM,MAAM,MAAM,KAAK,OAAO;AAEvD,UAAM,cAAmC,oBAAI,IAAI,CAAC,OAAO,CAAC;AAC1D,UAAM,mBAAmB;AAAA,MAAS,MAChC,OAAO,YAAY,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,CAAC,YAAY,IAAI,GAAG,CAAC,CAAC;AAAA,IAAA;AAGnF,UAAM,YAAY;AAAA,MAAS,MACzB;AAAA,QACEA,OAAK,MAAM,IAAI,KAAKA,OAAK;AAAA,QACzB;AAAA,QACA,KAAK,cAAc;AAAA,QACnB,MAAM;AAAA,MAAA;AAAA,IACR;AAGF,UAAM,OAAO,eAAiC,MAAM;AAGpD,aAAa,EAAE,IAAI,MAAM;;AAIvB,aAAAC,UAAA,GAAAC,mBASQ,SATRC,WASQ;AAAA,iBARF;AAAA,QAAJ,KAAI;AAAA,QACH,KAAK,SAAA;AAAA,QACL,IAAI,QAAA;AAAA,QACJ,OAAO,UA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