{"version":3,"names":["getDefaultLabelId","id","undefined","resolveAriaLabelledBy","fieldLabelId","localLabelId"],"sources":["resolve-aria-labelled-by.ts"],"sourcesContent":["/**\n * Convention used across Base UI: given a root id, the field's label id is\n * `${id}-label`. Returns `undefined` when the root id is absent so callers\n * can feed the result directly into an optional `aria-labelledby`.\n */\nexport function getDefaultLabelId(\n\tid: string | null | undefined,\n): string | undefined {\n\treturn id == null ? undefined : `${id}-label`;\n}\n\n/**\n * Prefers the field-provided label id (when the component is inside a\n * `<Field.Root>`) over the locally-registered one. Mirrors React's rule:\n * if both are present, the field wins because its label wraps the entire\n * control, while the local label might just be ancillary.\n */\nexport function resolveAriaLabelledBy(\n\tfieldLabelId: string | undefined,\n\tlocalLabelId: string | undefined,\n): string | undefined {\n\treturn fieldLabelId ?? localLabelId;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,iBAAiBA,CAChCC,EAA6B,EACR;EACrB,OAAOA,EAAE,IAAI,IAAI,GAAGC,SAAS,GAAG,GAAGD,EAAE,QAAQ;AAC9C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,qBAAqBA,CACpCC,YAAgC,EAChCC,YAAgC,EACX;EACrB,OAAOD,YAAY,IAAIC,YAAY;AACpC","ignoreList":[]}