VItem.mjs.map 2.0 KB

1
  1. {"version":3,"file":"VItem.mjs","names":["VItemGroupSymbol","makeGroupItemProps","useGroupItem","genericComponent","VItem","name","props","emits","val","setup","_ref","slots","isSelected","select","toggle","selectedClass","value","disabled","default"],"sources":["../../../src/components/VItemGroup/VItem.tsx"],"sourcesContent":["// Composables\nimport { VItemGroupSymbol } from './VItemGroup'\nimport { makeGroupItemProps, useGroupItem } from '@/composables/group'\n\n// Utilities\nimport { genericComponent } from '@/util'\n\ntype VItemSlots = {\n default: {\n isSelected: boolean | undefined\n selectedClass: boolean | (string | undefined)[] | undefined\n select: ((value: boolean) => void) | undefined\n toggle: (() => void) | undefined\n value: unknown\n disabled: boolean | undefined\n }\n}\n\nexport const VItem = genericComponent<VItemSlots>()({\n name: 'VItem',\n\n props: makeGroupItemProps(),\n\n emits: {\n 'group:selected': (val: { value: boolean }) => true,\n },\n\n setup (props, { slots }) {\n const { isSelected, select, toggle, selectedClass, value, disabled } = useGroupItem(props, VItemGroupSymbol)\n return () => slots.default?.({\n isSelected: isSelected.value,\n selectedClass: selectedClass.value,\n select,\n toggle,\n value: value.value,\n disabled: disabled.value,\n })\n },\n})\n\nexport type VItem = InstanceType<typeof VItem>\n"],"mappings":"AAAA;AAAA,SACSA,gBAAgB;AAAA,SAChBC,kBAAkB,EAAEC,YAAY,uCAEzC;AAAA,SACSC,gBAAgB;AAazB,OAAO,MAAMC,KAAK,GAAGD,gBAAgB,EAAc,CAAC;EAClDE,IAAI,EAAE,OAAO;EAEbC,KAAK,EAAEL,kBAAkB,EAAE;EAE3BM,KAAK,EAAE;IACL,gBAAgB,EAAGC,GAAuB,IAAK;EACjD,CAAC;EAEDC,KAAKA,CAAEH,KAAK,EAAAI,IAAA,EAAa;IAAA,IAAX;MAAEC;IAAM,CAAC,GAAAD,IAAA;IACrB,MAAM;MAAEE,UAAU;MAAEC,MAAM;MAAEC,MAAM;MAAEC,aAAa;MAAEC,KAAK;MAAEC;IAAS,CAAC,GAAGf,YAAY,CAACI,KAAK,EAAEN,gBAAgB,CAAC;IAC5G,OAAO,MAAMW,KAAK,CAACO,OAAO,GAAG;MAC3BN,UAAU,EAAEA,UAAU,CAACI,KAAK;MAC5BD,aAAa,EAAEA,aAAa,CAACC,KAAK;MAClCH,MAAM;MACNC,MAAM;MACNE,KAAK,EAAEA,KAAK,CAACA,KAAK;MAClBC,QAAQ,EAAEA,QAAQ,CAACD;IACrB,CAAC,CAAC;EACJ;AACF,CAAC,CAAC"}