{"version":3,"names":["dynamic","createSignal","omit","createControlledState","readOption","mergeRootProps","resolveClassStyle","createTabs","TabsRootContext","findTabElements","map","oldValue","newValue","oldTab","newTab","tabElement","tabMetadata","entries","tabValue","value","index","directionFromValues","orientation","atLeastOneFound","comparable","after","directionFromRects","oldRect","newRect","left","top","TabsRoot","props","resolvedValue","setUncontrolledValue","controlled","default","defaultValue","fallback","name","state","c","tabMap","setTabMap","Map","ownedWrite","tabActivationDirection","setTabActivationDirection","computeActivationDirection","Boolean","getBoundingClientRect","onValueChange","eventDetails","currentValue","direction","activationDirection","isCanceled","mountedPanels","panelTick","setPanelTick","bumpPanels","t","registerMountedTabPanel","panelValue","panelId","get","set","unregisterMountedTabPanel","delete","getTabPanelIdByValue","getTabIdByPanelValue","metadata","values","id","undefined","getTabElementBySelectedValue","selectedValue","contextValue","present","userClassStyle","userHtmlProps","internalProps","data-orientation","data-activation-direction","merged","Tag","as","children"],"sources":["tabs-root.tsx"],"sourcesContent":["import type { JSX, ValidComponent } from \"@solidjs/web\";\nimport { dynamic } from \"@solidjs/web\";\nimport { createSignal, omit } from \"solid-js\";\nimport type { CompositeMetadata } from \"../../internals/composite/composite-context.ts\";\nimport { createControlledState } from \"../../internals/create-controlled-state\";\nimport { type MaybeAccessor, readOption } from \"../../internals/maybe-accessor\";\nimport { mergeRootProps } from \"../../internals/merge-root-props\";\nimport { resolveClassStyle } from \"../../internals/resolve-class-style\";\nimport type { BaseUIComponentProps, Orientation } from \"../../internals/types\";\nimport { createTabs } from \"../create-tabs.tsx\";\nimport {\n\ttype TabsRootChangeEventDetails,\n\ttype TabsRootChangeEventReason,\n\tTabsRootContext,\n\ttype TabsRootContextValue,\n\ttype TabsRootState,\n\ttype TabsTabActivationDirection,\n\ttype TabsTabMetadata,\n\ttype TabsTabValue,\n} from \"../tabs-root-context.ts\";\n\nexport type {\n\tTabsRootChangeEventDetails,\n\tTabsRootChangeEventReason,\n\tTabsRootState,\n\tTabsTabActivationDirection,\n\tTabsTabMetadata,\n\tTabsTabValue,\n};\n\nexport type TabsRootOrientation = Orientation;\n\n// Locate the DOM elements backing the previous and next selected values in\n// the tab map. Returns `null` slots when a value isn't registered yet (e.g. a\n// tab added + selected in the same update).\nfunction findTabElements(\n\tmap: Map<Element, CompositeMetadata<TabsTabMetadata> | null>,\n\toldValue: TabsTabValue,\n\tnewValue: TabsTabValue,\n): { oldTab: HTMLElement | null; newTab: HTMLElement | null } {\n\tlet oldTab: HTMLElement | null = null;\n\tlet newTab: HTMLElement | null = null;\n\tfor (const [tabElement, tabMetadata] of map.entries()) {\n\t\tif (tabMetadata == null) continue;\n\t\tconst tabValue = tabMetadata.value ?? tabMetadata.index;\n\t\tif (oldValue === tabValue) oldTab = tabElement as HTMLElement;\n\t\tif (newValue === tabValue) newTab = tabElement as HTMLElement;\n\t\tif (oldTab && newTab) break;\n\t}\n\treturn { oldTab, newTab };\n}\n\n// Dynamic-tabs fallback: when an element isn't registered yet, infer\n// direction from the ordering of comparable values. Matches React's\n// value-based fallback.\nfunction directionFromValues(\n\toldValue: TabsTabValue,\n\tnewValue: TabsTabValue,\n\torientation: Orientation,\n\tatLeastOneFound: boolean,\n): TabsTabActivationDirection {\n\tconst comparable =\n\t\tatLeastOneFound &&\n\t\t(typeof oldValue === \"number\" || typeof oldValue === \"string\") &&\n\t\ttypeof oldValue === typeof newValue;\n\tif (!comparable) return \"none\";\n\t// `comparable` guarantees old/new are the same primitive type; the cast\n\t// just re-states that for the comparison operator.\n\tconst after = (newValue as number | string) > (oldValue as number | string);\n\tif (orientation === \"horizontal\") {\n\t\treturn after ? \"right\" : \"left\";\n\t}\n\treturn after ? \"down\" : \"up\";\n}\n\n// Direction inferred from the on-screen positions of the two tabs.\nfunction directionFromRects(\n\toldRect: DOMRect,\n\tnewRect: DOMRect,\n\torientation: Orientation,\n): TabsTabActivationDirection {\n\tif (orientation === \"horizontal\") {\n\t\tif (newRect.left < oldRect.left) return \"left\";\n\t\tif (newRect.left > oldRect.left) return \"right\";\n\t} else {\n\t\tif (newRect.top < oldRect.top) return \"up\";\n\t\tif (newRect.top > oldRect.top) return \"down\";\n\t}\n\treturn \"none\";\n}\n\nexport interface TabsRootProps<Value = TabsTabValue>\n\textends BaseUIComponentProps<\"div\", TabsRootState> {\n\t/** Tag/component to render. Defaults to `\"div\"`. */\n\tas?: ValidComponent;\n\t/**\n\t * Controlled selected tab. When provided (resolved value not\n\t * `undefined` — `null` counts as controlled and means \"nothing\n\t * selected\"), the consumer owns the state — pair with\n\t * {@link onValueChange}. When omitted, the tabs manage their own\n\t * selection (seeded from {@link defaultValue}).\n\t */\n\tvalue?: MaybeAccessor<Value | undefined>;\n\t/**\n\t * Initial selected tab when uncontrolled. Read once at mount.\n\t * @default 0\n\t */\n\tdefaultValue?: MaybeAccessor<Value | undefined>;\n\t/**\n\t * Layout orientation — drives `aria-orientation` on `<Tabs.List>` and the\n\t * direction that arrow-key navigation travels.\n\t * @default \"horizontal\"\n\t */\n\torientation?: MaybeAccessor<Orientation | undefined>;\n\t/**\n\t * Fires when the user activates a different tab. Calling\n\t * `eventDetails.cancel()` keeps the tabs' own (uncontrolled) selection\n\t * unchanged, mirroring React Base UI; controlled consumers simply\n\t * don't update their signal.\n\t */\n\tonValueChange?:\n\t\t| ((value: Value, eventDetails: TabsRootChangeEventDetails) => void)\n\t\t| undefined;\n}\n\n/**\n * Groups a `<Tabs.List>` + a series of `<Tabs.Panel>`s into a single coordinated\n * tabs widget. Renders a `<div>` by default. Holds selection state, the DOM\n * map of tabs (for activation-direction math + `aria-labelledby`), and the\n * mounted-panel registry (for `aria-controls`).\n *\n * Solid 2 notes:\n *\n * - Provider lives INSIDE `get children()` of `params.props` so the root's\n *   attribute getters stay owned by this setup scope (matches the radio-group /\n *   progress-root pattern).\n * - Activation direction is computed lazily inside `onValueChange`; we also\n *   track the previous value so the `data-activation-direction` attribute can\n *   roll over on the transition. React Base UI recomputes it during render to\n *   avoid a one-frame flash — Solid 2's render-effect timing makes that\n *   unnecessary: the attribute projection runs in a `createRenderEffect` after\n *   the state memo settles, so descendants see the correct direction as soon\n *   as `value` flips.\n */\nexport function TabsRoot<Value = TabsTabValue>(\n\tprops: TabsRootProps<Value>,\n): JSX.Element {\n\t// Controlled / uncontrolled value state (Base UI `value` / `defaultValue`\n\t// contract): the `value` prop wins while its resolved value is defined\n\t// (`null` is a controlled \"nothing selected\"); otherwise an internal\n\t// signal (seeded once from `defaultValue`, else `0` — React's\n\t// destructuring default) backs the state.\n\tconst [resolvedValue, setUncontrolledValue] =\n\t\tcreateControlledState<TabsTabValue>({\n\t\t\tcontrolled: () => readOption(props.value),\n\t\t\tdefault: () => readOption(props.defaultValue),\n\t\t\tfallback: 0,\n\t\t\tname: \"<Tabs.Root>\",\n\t\t\tstate: \"value\",\n\t\t});\n\n\t// Compose the headless primitive. It owns the value/orientation accessors\n\t// and the change-event emitter; the wrapper keeps DOM-shaped concerns\n\t// (tab map, panel-id registry, activation-direction math) since those are\n\t// inherently structural. Every derivation downstream (tab aria-selected,\n\t// panel hidden state, indicator, activation-direction math) reads\n\t// `c.value`, which resolves through the controlled-or-internal accessor.\n\tconst c = createTabs({\n\t\tvalue: resolvedValue,\n\t\torientation: () => readOption(props.orientation) ?? \"horizontal\",\n\t});\n\n\tconst value = c.value;\n\tconst orientation = c.orientation;\n\n\t// Tab map owned by this root; `<Tabs.List>`'s composite-list forwards its\n\t// sorted element-map here via `setTabMap` (plumbed through the context).\n\t// Stored in a signal so dependent memos (like `selectedTabMetadata`) pick\n\t// up new registrations.\n\tconst [tabMap, setTabMap] = createSignal<\n\t\tMap<Element, CompositeMetadata<TabsTabMetadata> | null>\n\t>(new Map(), { ownedWrite: true });\n\n\t// Activation direction latched inside onValueChange (called from\n\t// unowned event-handler scope, so `ownedWrite` is correct).\n\tconst [tabActivationDirection, setTabActivationDirection] =\n\t\tcreateSignal<TabsTabActivationDirection>(\"none\", { ownedWrite: true });\n\n\tconst computeActivationDirection = (\n\t\toldValue: TabsTabValue,\n\t\tnewValue: TabsTabValue,\n\t): TabsTabActivationDirection => {\n\t\tif (oldValue == null || newValue == null) return \"none\";\n\t\tconst { oldTab, newTab } = findTabElements(tabMap(), oldValue, newValue);\n\t\tif (!oldTab || !newTab) {\n\t\t\treturn directionFromValues(\n\t\t\t\toldValue,\n\t\t\t\tnewValue,\n\t\t\t\torientation(),\n\t\t\t\tBoolean(oldTab || newTab),\n\t\t\t);\n\t\t}\n\t\treturn directionFromRects(\n\t\t\toldTab.getBoundingClientRect(),\n\t\t\tnewTab.getBoundingClientRect(),\n\t\t\torientation(),\n\t\t);\n\t};\n\n\t// Change flow mirrors React's `TabsRoot.onValueChange`: compute the\n\t// activation direction and expose it on the details bag, fire the\n\t// consumer callback, honor `eventDetails.cancel()`, then latch the\n\t// direction + write the uncontrolled state (the write is ignored for\n\t// reads while the `value` prop is controlled — the consumer's signal\n\t// write is the source of truth).\n\tconst onValueChange = (\n\t\tnewValue: TabsTabValue,\n\t\teventDetails: TabsRootChangeEventDetails,\n\t): void => {\n\t\tconst currentValue = value();\n\t\tconst direction = computeActivationDirection(\n\t\t\tcurrentValue as TabsTabValue,\n\t\t\tnewValue,\n\t\t);\n\t\teventDetails.activationDirection = direction;\n\t\t// Internal state is `TabsTabValue` (unknown); the `Value` generic is a\n\t\t// typed convenience for callers, so cast at this boundary.\n\t\tprops.onValueChange?.(newValue as Value, eventDetails);\n\t\tif (eventDetails.isCanceled) return;\n\t\tsetTabActivationDirection(direction);\n\t\tsetUncontrolledValue(newValue);\n\t};\n\n\t// Mounted panels registry — panels call `registerMountedTabPanel(value, id)`\n\t// on mount so tabs can wire `aria-controls={panelId}`. Kept as a plain\n\t// `Map` with a tick signal driving consumer memos.\n\tconst mountedPanels = new Map<TabsTabValue, string>();\n\tconst [panelTick, setPanelTick] = createSignal(0, { ownedWrite: true });\n\tconst bumpPanels = (): void => {\n\t\tsetPanelTick((t) => t + 1);\n\t};\n\n\tconst registerMountedTabPanel = (\n\t\tpanelValue: TabsTabValue,\n\t\tpanelId: string,\n\t): void => {\n\t\tif (mountedPanels.get(panelValue) === panelId) return;\n\t\tmountedPanels.set(panelValue, panelId);\n\t\tbumpPanels();\n\t};\n\tconst unregisterMountedTabPanel = (\n\t\tpanelValue: TabsTabValue,\n\t\tpanelId: string,\n\t): void => {\n\t\tif (mountedPanels.get(panelValue) !== panelId) return;\n\t\tmountedPanels.delete(panelValue);\n\t\tbumpPanels();\n\t};\n\tconst getTabPanelIdByValue = (tabValue: TabsTabValue): string | undefined => {\n\t\tpanelTick();\n\t\treturn mountedPanels.get(tabValue);\n\t};\n\n\tconst getTabIdByPanelValue = (\n\t\tpanelValue: TabsTabValue,\n\t): string | undefined => {\n\t\tconst map = tabMap();\n\t\tfor (const metadata of map.values()) {\n\t\t\tif (panelValue === metadata?.value) return metadata?.id;\n\t\t}\n\t\treturn undefined;\n\t};\n\n\tconst getTabElementBySelectedValue = (\n\t\tselectedValue: TabsTabValue | undefined,\n\t): HTMLElement | null => {\n\t\tif (selectedValue === undefined) return null;\n\t\tconst map = tabMap();\n\t\tfor (const [tabElement, metadata] of map.entries()) {\n\t\t\tif (metadata == null) continue;\n\t\t\tconst tabValue = metadata.value ?? metadata.index;\n\t\t\tif (selectedValue === tabValue) return tabElement as HTMLElement;\n\t\t}\n\t\treturn null;\n\t};\n\n\tconst contextValue: TabsRootContextValue = {\n\t\tvalue,\n\t\tonValueChange,\n\t\torientation,\n\t\ttabActivationDirection,\n\t\tgetTabElementBySelectedValue,\n\t\tgetTabIdByPanelValue,\n\t\tgetTabPanelIdByValue,\n\t\tregisterMountedTabPanel,\n\t\tunregisterMountedTabPanel,\n\t\tsetTabMap,\n\t\tpresent: true,\n\t};\n\tconst userClassStyle = resolveClassStyle(props, () => ({\n\t\torientation: orientation(),\n\t\ttabActivationDirection: tabActivationDirection(),\n\t}));\n\n\tconst userHtmlProps = omit(\n\t\tprops,\n\t\t\"as\",\n\t\t\"class\",\n\t\t\"style\",\n\t\t\"attrs\",\n\t\t\"children\",\n\t\t\"defaultValue\",\n\t\t\"onValueChange\",\n\t\t\"orientation\",\n\t\t\"value\",\n\t) as Record<string, unknown>;\n\n\tconst internalProps = {\n\t\tget \"data-orientation\"() {\n\t\t\treturn orientation();\n\t\t},\n\t\tget \"data-activation-direction\"() {\n\t\t\treturn tabActivationDirection();\n\t\t},\n\t};\n\n\tconst merged = mergeRootProps(\n\t\tmergeRootProps(internalProps, userClassStyle),\n\t\tuserHtmlProps,\n\t);\n\n\tconst Tag = dynamic(() => props.as ?? \"div\");\n\treturn (\n\t\t<Tag {...merged}>\n\t\t\t<TabsRootContext value={contextValue}>{props.children}</TabsRootContext>\n\t\t</Tag>\n\t);\n}\n"],"mappings":"AACA,SAASA,OAAO,QAAQ,cAAc;AACtC,SAASC,YAAY,EAAEC,IAAI,QAAQ,UAAU;AAE7C,SAASC,qBAAqB,QAAQ,yCAAyC;AAC/E,SAA6BC,UAAU,QAAQ,gCAAgC;AAC/E,SAASC,cAAc,QAAQ,kCAAkC;AACjE,SAASC,iBAAiB,QAAQ,qCAAqC;AAEvE,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAGCC,eAAe,QAMT,yBAAyB;AAahC;AACA;AACA;AACA,SAASC,eAAeA,CACvBC,GAA4D,EAC5DC,QAAsB,EACtBC,QAAsB,EACuC;EAC7D,IAAIC,MAA0B,GAAG,IAAI;EACrC,IAAIC,MAA0B,GAAG,IAAI;EACrC,KAAK,MAAM,CAACC,UAAU,EAAEC,WAAW,CAAC,IAAIN,GAAG,CAACO,OAAO,CAAC,CAAC,EAAE;IACtD,IAAID,WAAW,IAAI,IAAI,EAAE;IACzB,MAAME,QAAQ,GAAGF,WAAW,CAACG,KAAK,IAAIH,WAAW,CAACI,KAAK;IACvD,IAAIT,QAAQ,KAAKO,QAAQ,EAAEL,MAAM,GAAGE,UAAyB;IAC7D,IAAIH,QAAQ,KAAKM,QAAQ,EAAEJ,MAAM,GAAGC,UAAyB;IAC7D,IAAIF,MAAM,IAAIC,MAAM,EAAE;EACvB;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