{"version":3,"file":"defaultListTheme.mjs","sources":["../../../../../../src/components/ui/typography/list/defaultListTheme.ts"],"sourcesContent":["import { ComponentTheme } from \"../../theme/common/ComponentTheme\";\nimport type { ListProps } from \"./ListProps\";\nimport type { ListTheme } from \"./ListTheme\";\nimport { typographyClassMappers } from \"../../theme/common/typographyClassMappers\";\nimport { PlClassMapper } from \"../../theme/size/plClassMapper\";\nimport { ListStyleClassMapper } from \"../../theme/list/listStyleClassMapper\";\nimport { ListPositionClassMapper } from \"../../theme/list/listPositionClassMapper\";\nimport { ListGapClassMapper } from \"../../theme/list/listGapClassMapper\";\nimport { bgAppearance } from \"../../theme/common/appearanceClassMappers\";\nimport { LIST_CATEGORIES } from \"../common\";\nimport { listDefaults } from \"./listDefaults\";\n\n/** List theme composed over the shared `typographyClassMappers` collection\n *  so changes to the shared collection automatically reach List. Wires\n *  `bgAppearance`, but the `transparent: true` default (see listDefaults)\n *  suppresses it, so a List paints a background only when `transparent` is\n *  explicitly cleared (e.g. `filled transparent={false}`). */\nexport const defaultListTheme: ComponentTheme<ListProps, ListTheme> = new ComponentTheme<ListProps, ListTheme>(\n  \"ul\",\n  \"vane-list [&_ul]:list-[circle] [&_ul_ul]:list-[square] [&_ol]:list-[lower-alpha] [&_ol_ol]:list-[lower-roman]\",\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_CATEGORIES, and LetterSpacingClassMapper\n      // emits a default `tracking-(--ls)` class even when the prop is absent,\n      // which would change every List's class output.\n      // delta: size-scaled logical start padding reserves indent space for list markers\n      paddingLeft: new PlClassMapper(),\n    },\n    appearance: {\n      ...typographyClassMappers.appearance,\n      // delta: List wires a background mapper (dormant under the transparent default), unlike background-less typography\n      background: bgAppearance,\n    },\n    typography: typographyClassMappers.typography,\n    // whole group inherited by reference; its `cursor` mapper is inert here\n    // (`cursor` is not in LIST_CATEGORIES, and CursorClassMapper emits nothing without the key)\n    layout: typographyClassMappers.layout,\n    // deltas: list-only categories — marker style, marker position, inter-item gap\n    listStyle: new ListStyleClassMapper(),\n    listPosition: new ListPositionClassMapper(),\n    listGap: new ListGapClassMapper(),\n  },\n  listDefaults,\n  LIST_CATEGORIES,\n  (props: ListProps) => {\n    const componentProps = props as unknown as Record<string, boolean>;\n    const isOrdered = componentProps?.listDecimal || componentProps?.listLowerAlpha || componentProps?.listLowerRoman;\n    return isOrdered ? \"ol\" : \"ul\";\n  },\n  'ui'\n);\n\n/** Alias for backward compatibility */\nexport const listTheme = defaultListTheme;\n"],"names":[],"mappings":";;;;;;;;;;AAiBO,MAAM,mBAAyD,IAAI,cAAA;AAAA,EACxE,IAAA;AAAA,EACA,+GAAA;AAAA,EACA;AAAA,IACE,IAAA,EAAM;AAAA,MACJ,IAAA,EAAM,uBAAuB,IAAA,CAAK,IAAA;AAAA,MAClC,UAAA,EAAY,uBAAuB,IAAA,CAAK,UAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAMxC,WAAA,EAAa,IAAI,aAAA;AAAc,KACjC;AAAA,IACA,UAAA,EAAY;AAAA,MACV,GAAG,sBAAA,CAAuB,UAAA;AAAA;AAAA,MAE1B,UAAA,EAAY;AAAA,KACd;AAAA,IACA,YAAY,sBAAA,CAAuB,UAAA;AAAA;AAAA;AAAA,IAGnC,QAAQ,sBAAA,CAAuB,MAAA;AAAA;AAAA,IAE/B,SAAA,EAAW,IAAI,oBAAA,EAAqB;AAAA,IACpC,YAAA,EAAc,IAAI,uBAAA,EAAwB;AAAA,IAC1C,OAAA,EAAS,IAAI,kBAAA;AAAmB,GAClC;AAAA,EACA,YAAA;AAAA,EACA,eAAA;AAAA,EACA,CAAC,KAAA,KAAqB;AACpB,IAAA,MAAM,cAAA,GAAiB,KAAA;AACvB,IAAA,MAAM,SAAA,GAAY,cAAA,EAAgB,WAAA,IAAe,cAAA,EAAgB,kBAAkB,cAAA,EAAgB,cAAA;AACnG,IAAA,OAAO,YAAY,IAAA,GAAO,IAAA;AAAA,EAC5B,CAAA;AAAA,EACA;AACF;AAGO,MAAM,SAAA,GAAY;;;;"}