{"version":3,"file":"defaultListItemTheme.mjs","sources":["../../../../../../src/components/ui/typography/listItem/defaultListItemTheme.ts"],"sourcesContent":["import { ComponentTheme, bgAppearance } from \"../../theme/common\";\nimport type { TypographyProps } from \"../common\";\nimport type { ListItemTheme } from \"./ListItemTheme\";\nimport { typographyClassMappers } from \"../../theme/common/typographyClassMappers\";\nimport { SimpleConsumerClassMapper } from \"../../theme/appearance/simpleConsumerClassMapper\";\nimport { textConsumerClass } from \"../../classes/appearanceClasses\";\nimport { LIST_ITEM_CATEGORIES } from \"./ListItemCategories\";\nimport { listItemDefaults } from \"./listItemDefaults\";\n\n/** ListItem theme — composed over the shared `typographyClassMappers`\n *  collection so changes to the shared collection automatically reach\n *  ListItem. Includes `bgAppearance` so `<ListItem danger filled>` produces a\n *  colored background. */\nexport const defaultListItemTheme: ComponentTheme<TypographyProps, ListItemTheme> = new ComponentTheme<TypographyProps, ListItemTheme>(\n  \"li\",\n  \"vane-list-item [&[data-has-icon='true']]:list-none\",\n  {\n    size: {\n      text: typographyClassMappers.size.text,\n      lineHeight: typographyClassMappers.size.lineHeight,\n      // delta: the shared `letterSpacing` mapper is deliberately NOT inherited —\n      // `letterSpacing` is not in LIST_ITEM_CATEGORIES, and LetterSpacingClassMapper\n      // emits a default `tracking-(--ls)` class even when the prop is absent,\n      // which would change every ListItem's class output.\n    },\n    appearance: {\n      ...typographyClassMappers.appearance,\n      // delta: list items support `filled`/`transparent` backgrounds, unlike background-less typography\n      background: bgAppearance,\n      // delta: `alwaysOutput` because listItemDefaults has no appearance default\n      // (items inherit color from the parent List) — the text consumer class must\n      // still be emitted so the <li> stays bound to the cascading --text-color\n      text: new SimpleConsumerClassMapper({ base: textConsumerClass, alwaysOutput: true }, 'text'),\n    },\n    typography: typographyClassMappers.typography,\n    // whole group inherited by reference. This also FIXES a former silent gap:\n    // LIST_ITEM_CATEGORIES registers `width`/`height`, but the old unsized layout\n    // collection had no mappers for them, so `<ListItem wFull>` was a no-op.\n    // The shared group's `cursor` mapper stays inert (`cursor` is not in LIST_ITEM_CATEGORIES).\n    layout: typographyClassMappers.layout,\n  },\n  listItemDefaults,\n  LIST_ITEM_CATEGORIES,\n  undefined,\n  'ui'\n);\n\n/** Alias for backward compatibility */\nexport const listItemTheme = defaultListItemTheme;\n"],"names":[],"mappings":";;;;;;;;;;AAaO,MAAM,uBAAuE,IAAI,cAAA;AAAA,EACtF,IAAA;AAAA,EACA,oDAAA;AAAA,EACA;AAAA,IACE,IAAA,EAAM;AAAA,MACJ,IAAA,EAAM,uBAAuB,IAAA,CAAK,IAAA;AAAA,MAClC,UAAA,EAAY,uBAAuB,IAAA,CAAK;AAAA;AAAA;AAAA;AAAA;AAAA,KAK1C;AAAA,IACA,UAAA,EAAY;AAAA,MACV,GAAG,sBAAA,CAAuB,UAAA;AAAA;AAAA,MAE1B,UAAA,EAAY,YAAA;AAAA;AAAA;AAAA;AAAA,MAIZ,IAAA,EAAM,IAAI,yBAAA,CAA0B,EAAE,MAAM,iBAAA,EAAmB,YAAA,EAAc,IAAA,EAAK,EAAG,MAAM;AAAA,KAC7F;AAAA,IACA,YAAY,sBAAA,CAAuB,UAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKnC,QAAQ,sBAAA,CAAuB;AAAA,GACjC;AAAA,EACA,gBAAA;AAAA,EACA,oBAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF;AAGO,MAAM,aAAA,GAAgB;;;;"}