You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
4.1 KiB
1 lines
4.1 KiB
{"ast":null,"code":"import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';\nimport { useSizeProp } from '../../../hooks/use-size/index.mjs';\nimport { useAriaProps } from '../../../hooks/use-aria/index.mjs';\nimport { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';\nimport { isString } from '@vue/shared';\nimport { isNumber, isBoolean } from '../../../utils/types.mjs';\nconst segmentedProps = buildProps({\n direction: {\n type: definePropType(String),\n default: \"horizontal\"\n },\n options: {\n type: definePropType(Array),\n default: () => []\n },\n modelValue: {\n type: [String, Number, Boolean],\n default: void 0\n },\n block: Boolean,\n size: useSizeProp,\n disabled: Boolean,\n validateEvent: {\n type: Boolean,\n default: true\n },\n id: String,\n name: String,\n ...useAriaProps([\"ariaLabel\"])\n});\nconst segmentedEmits = {\n [UPDATE_MODEL_EVENT]: val => isString(val) || isNumber(val) || isBoolean(val),\n [CHANGE_EVENT]: val => isString(val) || isNumber(val) || isBoolean(val)\n};\nexport { segmentedEmits, segmentedProps };","map":{"version":3,"names":["segmentedProps","buildProps","direction","type","definePropType","String","default","options","Array","modelValue","Number","Boolean","block","size","useSizeProp","disabled","validateEvent","id","name","useAriaProps","segmentedEmits","UPDATE_MODEL_EVENT","val","isString","isNumber","isBoolean","CHANGE_EVENT"],"sources":["../../../../../../packages/components/segmented/src/segmented.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isBoolean,\n isNumber,\n isString,\n} from '@element-plus/utils'\nimport { useAriaProps, useSizeProp } from '@element-plus/hooks'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\n\nimport type { Option } from './types'\nimport type { ExtractPropTypes } from 'vue'\nimport type Segmented from './segmented.vue'\n\nexport const segmentedProps = buildProps({\n direction: {\n type: definePropType<'vertical' | 'horizontal'>(String),\n default: 'horizontal',\n },\n /**\n * @description options of segmented\n */\n options: {\n type: definePropType<Option[]>(Array),\n default: () => [],\n },\n /**\n * @description binding value\n */\n modelValue: {\n type: [String, Number, Boolean],\n default: undefined,\n },\n /**\n * @description fit width of parent content\n */\n block: Boolean,\n /**\n * @description size of component\n */\n size: useSizeProp,\n /**\n * @description whether segmented is disabled\n */\n disabled: Boolean,\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description native input id\n */\n id: String,\n /**\n * @description native `name` attribute\n */\n name: String,\n ...useAriaProps(['ariaLabel']),\n})\n\nexport type SegmentedProps = ExtractPropTypes<typeof segmentedProps>\n\nexport const segmentedEmits = {\n [UPDATE_MODEL_EVENT]: (val: any) =>\n isString(val) || isNumber(val) || isBoolean(val),\n [CHANGE_EVENT]: (val: any) =>\n isString(val) || isNumber(val) || isBoolean(val),\n}\nexport type SegmentedEmits = typeof segmentedEmits\n\nexport type SegmentedInstance = InstanceType<typeof Segmented>\n"],"mappings":";;;;;;AASY,MAACA,cAAc,GAAGC,UAAU,CAAC;EACvCC,SAAS,EAAE;IACTC,IAAI,EAAEC,cAAc,CAACC,MAAM,CAAC;IAC5BC,OAAO,EAAE;EACb,CAAG;EACDC,OAAO,EAAE;IACPJ,IAAI,EAAEC,cAAc,CAACI,KAAK,CAAC;IAC3BF,OAAO,EAAEA,CAAA,KAAM;EACnB,CAAG;EACDG,UAAU,EAAE;IACVN,IAAI,EAAE,CAACE,MAAM,EAAEK,MAAM,EAAEC,OAAO,CAAC;IAC/BL,OAAO,EAAE,KAAK;EAClB,CAAG;EACDM,KAAK,EAAED,OAAO;EACdE,IAAI,EAAEC,WAAW;EACjBC,QAAQ,EAAEJ,OAAO;EACjBK,aAAa,EAAE;IACbb,IAAI,EAAEQ,OAAO;IACbL,OAAO,EAAE;EACb,CAAG;EACDW,EAAE,EAAEZ,MAAM;EACVa,IAAI,EAAEb,MAAM;EACZ,GAAGc,YAAY,CAAC,CAAC,WAAW,CAAC;AAC/B,CAAC;AACW,MAACC,cAAc,GAAG;EAC5B,CAACC,kBAAkB,GAAIC,GAAG,IAAKC,QAAQ,CAACD,GAAG,CAAC,IAAIE,QAAQ,CAACF,GAAG,CAAC,IAAIG,SAAS,CAACH,GAAG,CAAC;EAC/E,CAACI,YAAY,GAAIJ,GAAG,IAAKC,QAAQ,CAACD,GAAG,CAAC,IAAIE,QAAQ,CAACF,GAAG,CAAC,IAAIG,SAAS,CAACH,GAAG;AAC1E","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|