UNPKG

@vuesax-alpha/nightly

Version:
1 lines 1.36 kB
{"version":3,"file":"card.mjs","sources":["../../../../../../packages/components/card/src/card.ts"],"sourcesContent":["import { useColorProp } from '@vuesax-alpha/hooks'\nimport { buildProps } from '@vuesax-alpha/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type Card from './card.vue'\n\nconst cardType = [1, '1', 2, '2', 3, '3', 4, '4', 5, '5'] as const\n\nexport const cardProps = buildProps({\n /**\n * @description Component color - Accept Vuesax's color, Hex, rgb\n */\n color: useColorProp,\n /**\n * @description Card type\n * @enum `1` | `2` | `3` | `4` | `5`\n * @default 1\n */\n type: {\n type: [String, Number],\n values: cardType,\n validator: (val: unknown): val is (typeof cardType)[number] =>\n cardType.includes(val as any),\n default: 1,\n },\n} as const)\n\nexport type CardProps = ExtractPropTypes<typeof cardProps>\nexport type CardInstance = InstanceType<typeof Card>\n"],"names":[],"mappings":";;;;;AAMA,MAAM,QAAA,GAAW,CAAC,CAAA,EAAG,GAAK,EAAA,CAAA,EAAG,GAAK,EAAA,CAAA,EAAG,GAAK,EAAA,CAAA,EAAG,GAAK,EAAA,CAAA,EAAG,GAAG,CAAA,CAAA;AAEjD,MAAM,YAAY,UAAW,CAAA;AAAA,EAIlC,KAAO,EAAA,YAAA;AAAA,EAMP,IAAM,EAAA;AAAA,IACJ,IAAA,EAAM,CAAC,MAAA,EAAQ,MAAM,CAAA;AAAA,IACrB,MAAQ,EAAA,QAAA;AAAA,IACR,SAAW,EAAA,CAAC,GACV,KAAA,QAAA,CAAS,SAAS,GAAU,CAAA;AAAA,IAC9B,OAAS,EAAA,CAAA;AAAA,GACX;AACF,CAAU;;;;"}