UNPKG

@extclp/vexip-ui

Version:

A Vue 3 UI library, Highly customizability, full TypeScript, performance pretty good

1 lines 1.65 kB
{"version":3,"file":"props.mjs","sources":["../../../components/switch/props.ts"],"sourcesContent":["import { booleanProp, buildProps, eventProp, iconProp, sizeProp, stateProp } from '@vexip-ui/config'\r\n\r\nimport type { ExtractPropTypes, PropType } from 'vue'\r\nimport type { IconEffect } from '@/components/icon'\r\nimport type { ConfigurableProps } from '@vexip-ui/config'\r\nimport type { SwitchSlots } from './symbol'\r\n\r\nexport const switchProps = buildProps({\r\n size: sizeProp,\r\n state: stateProp,\r\n value: booleanProp,\r\n disabled: booleanProp,\r\n openColor: String,\r\n closeColor: String,\r\n loading: booleanProp,\r\n loadingIcon: iconProp,\r\n loadingEffect: String as PropType<IconEffect>,\r\n openIcon: iconProp,\r\n closeIcon: iconProp,\r\n openText: String,\r\n closeText: String,\r\n onBeforeChange: Function as PropType<(checked: boolean) => unknown>,\r\n rectangle: booleanProp,\r\n name: String,\r\n slots: Object as PropType<SwitchSlots>,\r\n onChange: eventProp<(value: boolean) => void>(),\r\n})\r\n\r\nexport type SwitchProps = ExtractPropTypes<typeof switchProps>\r\nexport type SwitchCProps = ConfigurableProps<SwitchProps, never, 'onBeforeChange'>\r\n"],"names":["switchProps","buildProps","sizeProp","stateProp","booleanProp","iconProp","eventProp"],"mappings":";AAOO,MAAMA,IAAcC,EAAW;AAAA,EACpC,MAAMC;AAAA,EACN,OAAOC;AAAA,EACP,OAAOC;AAAA,EACP,UAAUA;AAAA,EACV,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,SAASA;AAAA,EACT,aAAaC;AAAA,EACb,eAAe;AAAA,EACf,UAAUA;AAAA,EACV,WAAWA;AAAA,EACX,UAAU;AAAA,EACV,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,WAAWD;AAAA,EACX,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAUE,EAAoC;AAChD,CAAC;"}