{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"accordion","type":"registry:ui","title":"Accordion","description":"A stack of headed sections where one or several open at a time, with a collapse that animates without measuring, arrow-key navigation between headers and labelled regions for assistive tech.","author":"fancy-ui <https://fancy-ui.rama.app>","categories":["navigation"],"registryDependencies":["https://fancy-ui.rama.app/r/collapsible.json","https://fancy-ui.rama.app/r/internals.json","https://fancy-ui.rama.app/r/internals-dom.json","https://fancy-ui.rama.app/r/utils.json"],"files":[{"path":"react/src/components/accordion/Accordion.tsx","content":"\"use client\";\n\nimport { forwardRef, useRef, useState } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\nimport { cn } from \"../../utils\";\nimport { useComposedRefs } from \"../../internals/dom/use-composed-refs\";\nimport { useFancyId } from \"../../internals/use-id\";\nimport {\n\tcanClose,\n\tnavigationTarget,\n\topenValues,\n\ttargetIndex,\n\ttoggleItem,\n\tvalueFor,\n} from \"./accordion-core\";\nimport type { AccordionOrientation, AccordionType, AccordionValue } from \"./accordion-core\";\nimport { ACCORDION_KEY } from \"./types\";\nimport type { AccordionContext } from \"./types\";\n\ninterface AccordionOwnProps {\n\t/** `\"single\"` keeps one item open at a time, `\"multiple\"` lets any number be. Defaults to `\"single\"`. */\n\ttype?: AccordionType;\n\t/**\n\t * The open item. A string for `type=\"single\"` (`\"\"` when none is open), a\n\t * string array for `type=\"multiple\"`. Passing it makes the accordion\n\t * controlled, the React counterpart of the Svelte source's `$bindable`; omit\n\t * it to let the root own its value and report every change through\n\t * `onValueChange`.\n\t */\n\tvalue?: AccordionValue;\n\t/** The value an uncontrolled accordion starts with. */\n\tdefaultValue?: AccordionValue;\n\t/** Called with the new value each time an item toggles. A string for `\"single\"`, an array for `\"multiple\"`. */\n\tonValueChange?: (value: AccordionValue) => void;\n\t/** With `type=\"single\"`, lets the open item be closed again. Without it one item stays open once opened. Ignored for `\"multiple\"`. */\n\tcollapsible?: boolean;\n\t/** Disables every item. */\n\tdisabled?: boolean;\n\t/** The axis the items stack on, and which arrow-key pair moves focus. Defaults to `\"vertical\"`. */\n\torientation?: AccordionOrientation;\n\t/** The `AccordionItem`s. */\n\tchildren?: ReactNode;\n\t/** Additional CSS classes. */\n\tclassName?: string;\n}\n\n/** Native `<div>` attributes and listeners are forwarded to the root. */\nexport interface AccordionProps\n\textends Omit<ComponentPropsWithoutRef<\"div\">, keyof AccordionOwnProps>, AccordionOwnProps {}\n\n/**\n * The root of the accordion compound: it owns which items are open and the id\n * pair every trigger/region couple is wired up with. The element arrives\n * through the ref channel rather than a `ref` prop, per PORTING.md.\n */\nexport const Accordion = forwardRef<HTMLDivElement, AccordionProps>(\n\t(\n\t\t{\n\t\t\ttype = \"single\",\n\t\t\tvalue: valueProp,\n\t\t\tdefaultValue,\n\t\t\tonValueChange,\n\t\t\tcollapsible = false,\n\t\t\tdisabled = false,\n\t\t\torientation = \"vertical\",\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\t...rest\n\t\t},\n\t\tforwardedRef\n\t) => {\n\t\t// The root queries its own subtree when a navigation key is pressed.\n\t\tconst rootRef = useRef<HTMLDivElement | null>(null);\n\t\tconst setRootRef = useComposedRefs(forwardedRef, rootRef);\n\n\t\t// SSR-stable, like every compound here: trigger and region ids must agree\n\t\t// on the first server-rendered paint so `aria-controls` and\n\t\t// `aria-labelledby` are right before hydration.\n\t\tconst uid = useFancyId();\n\n\t\t// Controlled when `value` is passed, with a local copy as the fallback;\n\t\t// `onValueChange` fires either way.\n\t\tconst [uncontrolledValue, setUncontrolledValue] = useState<AccordionValue | undefined>(\n\t\t\tdefaultValue\n\t\t);\n\t\tconst isControlled = valueProp !== undefined;\n\t\tconst value = isControlled ? valueProp : uncontrolledValue;\n\t\tconst open = openValues(type, value);\n\n\t\t/** The enabled triggers of THIS accordion in screen order, read fresh on every key. */\n\t\tfunction enabledTriggers(): HTMLButtonElement[] {\n\t\t\tconst root = rootRef.current;\n\t\t\tif (!root) return [];\n\t\t\treturn Array.from(\n\t\t\t\troot.querySelectorAll<HTMLButtonElement>(\"[data-ft-accordion-trigger]:not(:disabled)\")\n\t\t\t).filter((button) => button.closest(\"[data-ft-accordion]\") === root);\n\t\t}\n\n\t\tconst context: AccordionContext = {\n\t\t\ttype,\n\t\t\torientation,\n\t\t\tdisabled,\n\t\t\tisOpen: (itemValue) => open.includes(itemValue),\n\t\t\tisLocked: (itemValue) => open.includes(itemValue) && !canClose(type, collapsible),\n\t\t\t// The only place the value changes.\n\t\t\ttoggle(itemValue) {\n\t\t\t\tconst next = toggleItem(type, collapsible, open, itemValue);\n\t\t\t\tif (next === null) return;\n\t\t\t\tconst emitted = valueFor(type, next);\n\t\t\t\tif (!isControlled) setUncontrolledValue(emitted);\n\t\t\t\tonValueChange?.(emitted);\n\t\t\t},\n\t\t\ttriggerId: (itemValue) => `${uid}-trigger-${itemValue}`,\n\t\t\tcontentId: (itemValue) => `${uid}-content-${itemValue}`,\n\t\t\tnavigate(origin, key) {\n\t\t\t\tconst target = navigationTarget(orientation, key);\n\t\t\t\tif (!target) return false;\n\t\t\t\tconst buttons = enabledTriggers();\n\t\t\t\tconst index = targetIndex(\n\t\t\t\t\tbuttons.length,\n\t\t\t\t\tbuttons.indexOf(origin as HTMLButtonElement),\n\t\t\t\t\ttarget\n\t\t\t\t);\n\t\t\t\tif (index < 0) return false;\n\t\t\t\tbuttons[index]?.focus();\n\t\t\t\treturn true;\n\t\t\t},\n\t\t};\n\n\t\treturn (\n\t\t\t<ACCORDION_KEY.Provider value={context}>\n\t\t\t\t<div\n\t\t\t\t\t{...rest}\n\t\t\t\t\tref={setRootRef}\n\t\t\t\t\tclassName={cn(\"ft-accordion w-full\", className)}\n\t\t\t\t\tdata-ft-accordion=\"\"\n\t\t\t\t\tdata-orientation={orientation}\n\t\t\t\t\tdata-disabled={disabled ? \"\" : undefined}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</ACCORDION_KEY.Provider>\n\t\t);\n\t}\n);\nAccordion.displayName = \"Accordion\";\n","type":"registry:ui","target":"@ui/fancy/components/accordion/Accordion.tsx"},{"path":"react/src/components/accordion/AccordionContent.tsx","content":"\"use client\";\n\nimport { forwardRef, useContext } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\nimport { cn } from \"../../utils\";\nimport { CollapsibleContent } from \"../collapsible/CollapsibleContent\";\nimport { COLLAPSIBLE_KEY } from \"../collapsible/types\";\n\ninterface AccordionContentOwnProps {\n\t/**\n\t * Keeps the children mounted while the item is closed. On by default; pass\n\t * `false` to unmount them once the collapse has finished and mount them\n\t * again on open. Defaults to `true`, as on `CollapsibleContent`: the trigger's `aria-controls` always points at an element that exists, the closed markup is server-rendered, and nothing has to be measured.\n\t * See `CollapsibleContent`.\n\t */\n\tforceMount?: boolean;\n\t/** The item's content. */\n\tchildren?: ReactNode;\n\t/** Additional CSS classes, merged onto the inner body so padding collapses with the panel. */\n\tclassName?: string;\n}\n\n/**\n * Native `<div>` attributes and listeners are forwarded to the region; `id`,\n * `role`, `aria-labelledby` and `data-state` stay the component's.\n */\nexport interface AccordionContentProps\n\textends\n\t\tOmit<ComponentPropsWithoutRef<\"div\">, keyof AccordionContentOwnProps>,\n\t\tAccordionContentOwnProps {}\n\n/**\n * The labelled region of an `AccordionItem`. The element arrives through the\n * ref channel rather than a `ref` prop, per PORTING.md.\n */\nexport const AccordionContent = forwardRef<HTMLDivElement, AccordionContentProps>(\n\t({ forceMount, children, className, ...rest }, forwardedRef) => {\n\t\t// The item's collapsible context names the trigger that labels this region.\n\t\tconst context = useContext(COLLAPSIBLE_KEY);\n\n\t\treturn (\n\t\t\t<CollapsibleContent\n\t\t\t\t{...rest}\n\t\t\t\tref={forwardedRef}\n\t\t\t\tforceMount={forceMount}\n\t\t\t\tclassName={cn(\"ft-accordion-content text-muted-foreground pb-4 text-sm\", className)}\n\t\t\t\trole=\"region\"\n\t\t\t\taria-labelledby={context?.triggerId}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</CollapsibleContent>\n\t\t);\n\t}\n);\nAccordionContent.displayName = \"AccordionContent\";\n","type":"registry:ui","target":"@ui/fancy/components/accordion/AccordionContent.tsx"},{"path":"react/src/components/accordion/AccordionItem.tsx","content":"\"use client\";\n\nimport { forwardRef, useContext } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\nimport { cn } from \"../../utils\";\nimport { COLLAPSIBLE_KEY } from \"../collapsible/types\";\nimport type { CollapsibleContext } from \"../collapsible/types\";\nimport { ACCORDION_ITEM_KEY, ACCORDION_KEY } from \"./types\";\nimport type { AccordionItemContext } from \"./types\";\n\ninterface AccordionItemOwnProps {\n\t/** This item's value: what `Accordion`'s `value` holds while it is open. */\n\tvalue: string;\n\t/** Disables just this item. Its trigger is skipped by the arrow keys. */\n\tdisabled?: boolean;\n\t/** An `AccordionTrigger` and an `AccordionContent`. */\n\tchildren?: ReactNode;\n\t/** Additional CSS classes. */\n\tclassName?: string;\n}\n\n/** Native `<div>` attributes and listeners are forwarded to the item. */\nexport interface AccordionItemProps\n\textends\n\t\tOmit<ComponentPropsWithoutRef<\"div\">, keyof AccordionItemOwnProps>,\n\t\tAccordionItemOwnProps {}\n\n/**\n * One item of an `Accordion`. It is a collapsible whose open state belongs to\n * the accordion: the trigger and the region below it read the context it\n * publishes exactly as they would a `Collapsible` root's. The element arrives\n * through the ref channel rather than a `ref` prop, per PORTING.md.\n */\nexport const AccordionItem = forwardRef<HTMLDivElement, AccordionItemProps>(\n\t({ value, disabled = false, children, className, ...rest }, forwardedRef) => {\n\t\t// Undefined outside an Accordion: the item then behaves as a closed,\n\t\t// standalone collapsible instead of throwing.\n\t\tconst root = useContext(ACCORDION_KEY);\n\n\t\tconst isOpen = root?.isOpen(value) ?? false;\n\t\tconst isDisabled = (root?.disabled ?? false) || disabled;\n\n\t\tconst itemContext: AccordionItemContext = { value, disabled: isDisabled };\n\n\t\tconst collapsible: CollapsibleContext = {\n\t\t\topen: isOpen,\n\t\t\tdisabled: isDisabled,\n\t\t\ttoggle() {\n\t\t\t\tif (isDisabled) return;\n\t\t\t\troot?.toggle(value);\n\t\t\t},\n\t\t\ttriggerId: root?.triggerId(value) ?? `ft-accordion-trigger-${value}`,\n\t\t\tcontentId: root?.contentId(value) ?? `ft-accordion-content-${value}`,\n\t\t};\n\n\t\treturn (\n\t\t\t<ACCORDION_ITEM_KEY.Provider value={itemContext}>\n\t\t\t\t<COLLAPSIBLE_KEY.Provider value={collapsible}>\n\t\t\t\t\t<div\n\t\t\t\t\t\t{...rest}\n\t\t\t\t\t\tref={forwardedRef}\n\t\t\t\t\t\tclassName={cn(\"ft-accordion-item border-border border-b\", className)}\n\t\t\t\t\t\tdata-state={isOpen ? \"open\" : \"closed\"}\n\t\t\t\t\t\tdata-orientation={root?.orientation ?? \"vertical\"}\n\t\t\t\t\t\tdata-disabled={isDisabled ? \"\" : undefined}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</div>\n\t\t\t\t</COLLAPSIBLE_KEY.Provider>\n\t\t\t</ACCORDION_ITEM_KEY.Provider>\n\t\t);\n\t}\n);\nAccordionItem.displayName = \"AccordionItem\";\n","type":"registry:ui","target":"@ui/fancy/components/accordion/AccordionItem.tsx"},{"path":"react/src/components/accordion/AccordionTrigger.tsx","content":"\"use client\";\n\nimport { forwardRef, useContext } from \"react\";\nimport type { ComponentPropsWithoutRef, KeyboardEvent, ReactNode } from \"react\";\nimport { cn } from \"../../utils\";\nimport { CollapsibleTrigger } from \"../collapsible/CollapsibleTrigger\";\nimport { ACCORDION_ITEM_KEY, ACCORDION_KEY } from \"./types\";\n\ninterface AccordionTriggerOwnProps {\n\t/** The level of the heading that wraps the button, 1 to 6. Defaults to 3. */\n\theadingLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n\t/** Disables this trigger on top of its item's and the accordion's `disabled`. */\n\tdisabled?: boolean;\n\t/** The trigger's label. */\n\tchildren?: ReactNode;\n\t/** Additional CSS classes, merged onto the button. */\n\tclassName?: string;\n}\n\n/**\n * Native `<button>` attributes and listeners are forwarded to the button; `id`,\n * `type`, `aria-expanded`, `aria-controls` and `data-state` stay the component's.\n */\nexport interface AccordionTriggerProps\n\textends\n\t\tOmit<ComponentPropsWithoutRef<\"button\">, keyof AccordionTriggerOwnProps>,\n\t\tAccordionTriggerOwnProps {}\n\n/**\n * The button that opens an `AccordionItem`, inside a heading. Arrow keys,\n * Home and End move focus between the accordion's triggers. The element\n * arrives through the ref channel rather than a `ref` prop, per PORTING.md.\n */\nexport const AccordionTrigger = forwardRef<HTMLButtonElement, AccordionTriggerProps>(\n\t(\n\t\t{ headingLevel = 3, disabled = false, children, className, onKeyDown, ...rest },\n\t\tforwardedRef\n\t) => {\n\t\tconst root = useContext(ACCORDION_KEY);\n\t\tconst item = useContext(ACCORDION_ITEM_KEY);\n\n\t\t// A single accordion that may not collapse keeps its open item open. The\n\t\t// button stays focusable (so it is not `disabled`) and says so to assistive\n\t\t// technology instead.\n\t\tconst locked = item && root ? root.isLocked(item.value) : false;\n\n\t\t// Runs the navigation first, then hands the SAME event to the consumer. A\n\t\t// disabled trigger gets no key events from a real browser; the guard\n\t\t// covers a synthetic one, and keeps it away from the consumer too.\n\t\tfunction handleKeyDown(event: KeyboardEvent<HTMLButtonElement>) {\n\t\t\tif (item?.disabled || disabled) return;\n\t\t\tif (root?.navigate(event.currentTarget, event.key)) event.preventDefault();\n\t\t\tonKeyDown?.(event);\n\t\t}\n\n\t\treturn (\n\t\t\t<div role=\"heading\" aria-level={headingLevel} className=\"ft-accordion-header m-0 flex\">\n\t\t\t\t<CollapsibleTrigger\n\t\t\t\t\t{...rest}\n\t\t\t\t\tref={forwardedRef}\n\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"ft-accordion-trigger flex flex-1 items-center justify-between gap-4 py-4 text-left text-sm font-medium\",\n\t\t\t\t\t\t\"hover:underline\",\n\t\t\t\t\t\t\"[&[data-state=open]>svg]:rotate-180\",\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\tdata-ft-accordion-trigger=\"\"\n\t\t\t\t\taria-disabled={locked ? \"true\" : rest[\"aria-disabled\"]}\n\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t\t<svg\n\t\t\t\t\t\tclassName=\"ft-accordion-chevron text-muted-foreground size-4 shrink-0 transition-transform duration-200 motion-reduce:transition-none\"\n\t\t\t\t\t\tviewBox=\"0 0 16 16\"\n\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstrokeWidth=\"1.5\"\n\t\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tfocusable=\"false\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<path d=\"m4 6 4 4 4-4\" />\n\t\t\t\t\t</svg>\n\t\t\t\t</CollapsibleTrigger>\n\t\t\t</div>\n\t\t);\n\t}\n);\nAccordionTrigger.displayName = \"AccordionTrigger\";\n","type":"registry:ui","target":"@ui/fancy/components/accordion/AccordionTrigger.tsx"},{"path":"react/src/components/accordion/accordion-core.ts","content":"\"use client\";\n\n/**\n * The framework-free rules of the accordion, shared byte for byte by the\n * Svelte, React and Vue packages: which values are open after a toggle, and\n * where arrow keys send focus.\n */\n\n/** How many items may be open at once. */\nexport type AccordionType = \"single\" | \"multiple\";\n\n/** The stacking axis; it picks the arrow-key pair that moves focus. */\nexport type AccordionOrientation = \"horizontal\" | \"vertical\";\n\n/** What the accordion's `value` carries: one value (`\"\"` for none) or a list. */\nexport type AccordionValue = string | string[];\n\n/** `value` read as the list of open item values, whatever the type. */\nexport function openValues(type: AccordionType, value: AccordionValue | undefined): string[] {\n\tif (type === \"multiple\") return Array.isArray(value) ? value : value ? [value] : [];\n\tif (Array.isArray(value)) {\n\t\tconst [first] = value;\n\t\treturn first ? [first] : [];\n\t}\n\treturn value ? [value] : [];\n}\n\n/** The `value` an accordion of this type emits for a list of open item values. */\nexport function valueFor(type: AccordionType, open: string[]): AccordionValue {\n\treturn type === \"multiple\" ? open : (open[0] ?? \"\");\n}\n\n/**\n * Whether an item that is open may be closed. A single accordion that is not\n * `collapsible` keeps exactly one item open once one has been opened.\n */\nexport function canClose(type: AccordionType, collapsible: boolean): boolean {\n\treturn type === \"multiple\" || collapsible;\n}\n\n/**\n * The open values after toggling `item`, or `null` when nothing changes (the\n * open item of a single accordion that is not `collapsible`).\n */\nexport function toggleItem(\n\ttype: AccordionType,\n\tcollapsible: boolean,\n\topen: string[],\n\titem: string\n): string[] | null {\n\tif (open.includes(item)) {\n\t\tif (!canClose(type, collapsible)) return null;\n\t\treturn open.filter((value) => value !== item);\n\t}\n\treturn type === \"multiple\" ? [...open, item] : [item];\n}\n\n/** A step along the list (wrapping) or a jump to one of its ends. */\nexport type NavigationTarget = { step: 1 | -1 } | { edge: \"first\" | \"last\" };\n\n/** What `key` does to focus on this axis, or `null` when it is not a navigation key. */\nexport function navigationTarget(\n\torientation: AccordionOrientation,\n\tkey: string\n): NavigationTarget | null {\n\tconst next = orientation === \"vertical\" ? \"ArrowDown\" : \"ArrowRight\";\n\tconst previous = orientation === \"vertical\" ? \"ArrowUp\" : \"ArrowLeft\";\n\tif (key === next) return { step: 1 };\n\tif (key === previous) return { step: -1 };\n\tif (key === \"Home\") return { edge: \"first\" };\n\tif (key === \"End\") return { edge: \"last\" };\n\treturn null;\n}\n\n/** The index focus lands on, wrapping at both ends; `-1` when there is nothing to focus. */\nexport function targetIndex(count: number, from: number, target: NavigationTarget): number {\n\tif (count <= 0) return -1;\n\tif (\"edge\" in target) return target.edge === \"first\" ? 0 : count - 1;\n\tconst base = from < 0 ? 0 : from;\n\treturn (((base + target.step) % count) + count) % count;\n}\n","type":"registry:ui","target":"@ui/fancy/components/accordion/accordion-core.ts"},{"path":"react/src/components/accordion/index.ts","content":"\"use client\";\n\nexport { Accordion } from \"./Accordion\";\nexport type { AccordionProps } from \"./Accordion\";\nexport { AccordionItem } from \"./AccordionItem\";\nexport type { AccordionItemProps } from \"./AccordionItem\";\nexport { AccordionTrigger } from \"./AccordionTrigger\";\nexport type { AccordionTriggerProps } from \"./AccordionTrigger\";\nexport { AccordionContent } from \"./AccordionContent\";\nexport type { AccordionContentProps } from \"./AccordionContent\";\nexport type { AccordionOrientation, AccordionType, AccordionValue } from \"./accordion-core\";\nexport { ACCORDION_KEY, ACCORDION_ITEM_KEY } from \"./types\";\nexport type { AccordionContext, AccordionItemContext } from \"./types\";\n","type":"registry:ui","target":"@ui/fancy/components/accordion/index.ts"},{"path":"react/src/components/accordion/types.ts","content":"\"use client\";\n\nimport { createContext } from \"react\";\nimport type { AccordionOrientation, AccordionType } from \"./accordion-core\";\n\n/**\n * The contracts between an accordion root, its items and their triggers.\n *\n * `Accordion` owns which values are open; `AccordionItem` narrows that to its\n * own value and republishes it as a collapsible context (see\n * `../collapsible/types.ts`), so an item's trigger and region are a\n * collapsible's. Arrow-key navigation never reads a registry: the root asks\n * the live DOM for its triggers when a key is pressed, so triggers that mount\n * late or get reordered still step through in the order on screen.\n */\n\n/** What the root publishes. Items and triggers read it; only the root writes it. */\nexport interface AccordionContext {\n\t/** How many items may be open at once. */\n\treadonly type: AccordionType;\n\t/** The axis, and so which arrow-key pair moves focus. */\n\treadonly orientation: AccordionOrientation;\n\t/** Whether every item is disabled. */\n\treadonly disabled: boolean;\n\t/** Whether `value` is open. */\n\tisOpen(value: string): boolean;\n\t/** Whether `value` is the open item of a single accordion that may not collapse. */\n\tisLocked(value: string): boolean;\n\t/** Toggles `value` and reports the new accordion value. A no-op when nothing would change. */\n\ttoggle(value: string): void;\n\t/** The id of the trigger for `value`. */\n\ttriggerId(value: string): string;\n\t/** The id of the region for `value`. */\n\tcontentId(value: string): string;\n\t/**\n\t * Moves focus for a navigation key pressed on `origin`, skipping disabled\n\t * triggers and wrapping at both ends. Returns whether the key was handled.\n\t */\n\tnavigate(origin: HTMLElement, key: string): boolean;\n}\n\n/** What an item publishes to its trigger and region. */\nexport interface AccordionItemContext {\n\t/** The item's value. */\n\treadonly value: string;\n\t/** Whether this item, or the whole accordion, is disabled. */\n\treadonly disabled: boolean;\n}\n\n/**\n * React's context objects play the role of the Svelte source's `Symbol` keys,\n * so the exported names are kept and the values are `React.Context`s. Read them\n * as optional: a piece rendered outside its root gets `undefined`.\n */\nexport const ACCORDION_KEY = createContext<AccordionContext | undefined>(undefined);\nACCORDION_KEY.displayName = \"AccordionContext\";\n\nexport const ACCORDION_ITEM_KEY = createContext<AccordionItemContext | undefined>(undefined);\nACCORDION_ITEM_KEY.displayName = \"AccordionItemContext\";\n","type":"registry:ui","target":"@ui/fancy/components/accordion/types.ts"}],"meta":{"license":"MIT","package":"fancy-ui-react","version":"0.7.0","source":"https://fancy-ui.rama.app/docs/components/accordion?framework=react"}}