vuetify 3.1.6 → 3.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/json/attributes.json +33 -33
- package/dist/json/importMap.json +4 -4
- package/dist/json/web-types.json +967 -79
- package/dist/vuetify-labs.css +544 -401
- package/dist/vuetify-labs.d.ts +3453 -144
- package/dist/vuetify-labs.esm.js +66 -44
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +66 -44
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +1398 -1255
- package/dist/vuetify.d.ts +1918 -67
- package/dist/vuetify.esm.js +33 -32
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +33 -32
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +209 -210
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAlert/VAlert.css +1 -1
- package/lib/components/VAlert/VAlert.mjs.map +1 -1
- package/lib/components/VAlert/_variables.scss +1 -1
- package/lib/components/VAlert/index.d.ts +22 -0
- package/lib/components/VApp/index.d.ts +6 -0
- package/lib/components/VAppBar/index.d.ts +36 -0
- package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
- package/lib/components/VAutocomplete/index.d.ts +117 -6
- package/lib/components/VAvatar/index.d.ts +6 -0
- package/lib/components/VBadge/index.d.ts +8 -0
- package/lib/components/VBanner/VBanner.mjs.map +1 -1
- package/lib/components/VBanner/index.d.ts +24 -0
- package/lib/components/VBottomNavigation/VBottomNavigation.mjs.map +1 -1
- package/lib/components/VBottomNavigation/index.d.ts +6 -0
- package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
- package/lib/components/VBreadcrumbs/index.d.ts +28 -4
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtn/index.d.ts +12 -0
- package/lib/components/VBtnGroup/index.d.ts +6 -0
- package/lib/components/VBtnToggle/VBtnToggle.mjs.map +1 -1
- package/lib/components/VBtnToggle/index.d.ts +6 -0
- package/lib/components/VCard/VCard.mjs.map +1 -1
- package/lib/components/VCard/VCardItem.mjs.map +1 -1
- package/lib/components/VCard/index.d.ts +60 -0
- package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
- package/lib/components/VCarousel/index.d.ts +60 -0
- package/lib/components/VCheckbox/index.d.ts +38 -0
- package/lib/components/VChip/VChip.mjs.map +1 -1
- package/lib/components/VChip/index.d.ts +12 -0
- package/lib/components/VChipGroup/VChipGroup.mjs.map +1 -1
- package/lib/components/VChipGroup/index.d.ts +6 -0
- package/lib/components/VCode/index.d.ts +6 -0
- package/lib/components/VColorPicker/VColorPicker.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerEdit.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerPreview.mjs.map +1 -1
- package/lib/components/VColorPicker/VColorPickerSwatches.mjs.map +1 -1
- package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
- package/lib/components/VCombobox/index.d.ts +117 -6
- package/lib/components/VCounter/index.d.ts +24 -0
- package/lib/components/VDefaultsProvider/index.d.ts +6 -0
- package/lib/components/VDialog/index.d.ts +64 -1
- package/lib/components/VDivider/VDivider.mjs.map +1 -1
- package/lib/components/VDivider/index.d.ts +6 -0
- package/lib/components/VExpansionPanel/VExpansionPanel.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelText.mjs.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs.map +1 -1
- package/lib/components/VExpansionPanel/index.d.ts +49 -12
- package/lib/components/VField/VField.mjs.map +1 -1
- package/lib/components/VField/index.d.ts +20 -6
- package/lib/components/VFileInput/VFileInput.mjs +1 -0
- package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
- package/lib/components/VFileInput/index.d.ts +43 -1
- package/lib/components/VFooter/index.d.ts +6 -0
- package/lib/components/VForm/index.d.ts +6 -0
- package/lib/components/VGrid/index.d.ts +24 -0
- package/lib/components/VHover/index.d.ts +12 -0
- package/lib/components/VIcon/index.d.ts +12 -0
- package/lib/components/VImg/index.d.ts +12 -0
- package/lib/components/VInput/VInput.mjs.map +1 -1
- package/lib/components/VInput/index.d.ts +12 -0
- package/lib/components/VItemGroup/VItemGroup.mjs.map +1 -1
- package/lib/components/VItemGroup/index.d.ts +12 -0
- package/lib/components/VKbd/index.d.ts +6 -0
- package/lib/components/VLabel/index.d.ts +6 -0
- package/lib/components/VLayout/index.d.ts +12 -0
- package/lib/components/VLazy/index.d.ts +6 -0
- package/lib/components/VList/VListGroup.mjs.map +1 -1
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/VList/VListSubheader.mjs.map +1 -1
- package/lib/components/VList/index.d.ts +77 -6
- package/lib/components/VLocaleProvider/index.d.ts +6 -0
- package/lib/components/VMain/index.d.ts +6 -0
- package/lib/components/VMenu/index.d.ts +64 -1
- package/lib/components/VMessages/VMessages.mjs.map +1 -1
- package/lib/components/VMessages/index.d.ts +24 -0
- package/lib/components/VNavigationDrawer/index.d.ts +12 -0
- package/lib/components/VNoSsr/index.d.ts +6 -0
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/index.d.ts +18 -0
- package/lib/components/VPagination/VPagination.mjs.map +1 -1
- package/lib/components/VPagination/index.d.ts +14 -0
- package/lib/components/VParallax/index.d.ts +12 -0
- package/lib/components/VProgressCircular/VProgressCircular.mjs.map +1 -1
- package/lib/components/VProgressCircular/index.d.ts +6 -0
- package/lib/components/VProgressLinear/VProgressLinear.mjs.map +1 -1
- package/lib/components/VProgressLinear/index.d.ts +12 -0
- package/lib/components/VRadio/index.d.ts +16 -0
- package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
- package/lib/components/VRadioGroup/index.d.ts +22 -0
- package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
- package/lib/components/VRangeSlider/index.d.ts +16 -0
- package/lib/components/VRating/VRating.mjs.map +1 -1
- package/lib/components/VRating/index.d.ts +8 -0
- package/lib/components/VResponsive/index.d.ts +8 -0
- package/lib/components/VSelect/VSelect.mjs.map +1 -1
- package/lib/components/VSelect/index.d.ts +183 -6
- package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
- package/lib/components/VSelectionControl/index.d.ts +14 -6
- package/lib/components/VSelectionControlGroup/index.d.ts +6 -0
- package/lib/components/VSheet/index.d.ts +6 -0
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSlideGroup/index.d.ts +26 -0
- package/lib/components/VSlider/VSliderTrack.mjs.map +1 -1
- package/lib/components/VSlider/index.d.ts +16 -0
- package/lib/components/VSnackbar/VSnackbar.css +0 -2
- package/lib/components/VSnackbar/VSnackbar.mjs +6 -8
- package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.sass +0 -2
- package/lib/components/VSnackbar/index.d.ts +44 -1
- package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
- package/lib/components/VSwitch/index.d.ts +22 -0
- package/lib/components/VSystemBar/index.d.ts +6 -0
- package/lib/components/VTable/VTable.mjs.map +1 -1
- package/lib/components/VTable/index.d.ts +12 -0
- package/lib/components/VTabs/VTab.mjs.map +1 -1
- package/lib/components/VTabs/VTabs.mjs.map +1 -1
- package/lib/components/VTabs/index.d.ts +12 -0
- package/lib/components/VTextField/VTextField.mjs +1 -0
- package/lib/components/VTextField/VTextField.mjs.map +1 -1
- package/lib/components/VTextField/index.d.ts +54 -6
- package/lib/components/VTextarea/VTextarea.mjs +1 -0
- package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
- package/lib/components/VTextarea/index.d.ts +39 -1
- package/lib/components/VThemeProvider/index.d.ts +6 -0
- package/lib/components/VTimeline/VTimelineDivider.mjs.map +1 -1
- package/lib/components/VTimeline/VTimelineItem.mjs.map +1 -1
- package/lib/components/VTimeline/index.d.ts +16 -0
- package/lib/components/VToolbar/VToolbar.mjs.map +1 -1
- package/lib/components/VToolbar/VToolbarTitle.mjs.map +1 -1
- package/lib/components/VToolbar/index.d.ts +30 -0
- package/lib/components/VTooltip/index.d.ts +46 -1
- package/lib/components/VValidation/index.d.ts +6 -0
- package/lib/components/VWindow/index.d.ts +34 -0
- package/lib/components/index.d.ts +1916 -65
- package/lib/components/transitions/createTransition.mjs +1 -1
- package/lib/components/transitions/createTransition.mjs.map +1 -1
- package/lib/components/transitions/index.d.ts +96 -0
- package/lib/composables/display.mjs +13 -10
- package/lib/composables/display.mjs.map +1 -1
- package/lib/composables/loader.mjs.map +1 -1
- package/lib/composables/theme.mjs +7 -10
- package/lib/composables/theme.mjs.map +1 -1
- package/lib/composables/variant.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/labs/VDataTable/VDataTable.mjs +4 -2
- package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableFooter.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableHeaders.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableRow.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableRows.mjs +4 -6
- package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
- package/lib/labs/VDataTable/VDataTableVirtual.mjs +4 -2
- package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
- package/lib/labs/VDataTable/composables/options.mjs +7 -1
- package/lib/labs/VDataTable/composables/options.mjs.map +1 -1
- package/lib/labs/VDataTable/index.d.ts +1503 -48
- package/lib/labs/VVirtualScroll/VVirtualScroll.mjs +15 -2
- package/lib/labs/VVirtualScroll/VVirtualScroll.mjs.map +1 -1
- package/lib/labs/VVirtualScroll/index.d.ts +9 -6
- package/lib/labs/components.d.ts +1512 -54
- package/lib/locale/index.mjs +1 -1
- package/lib/locale/index.mjs.map +1 -1
- package/lib/styles/elements/_global.sass +0 -4
- package/lib/styles/generic/_index.scss +0 -1
- package/lib/styles/generic/_transitions.scss +111 -9
- package/lib/styles/main.css +312 -167
- package/lib/styles/tools/_sheet.sass +3 -6
- package/lib/styles/utilities/_display.sass +6 -5
- package/lib/styles/utilities/_elevation.scss +13 -0
- package/lib/styles/utilities/_index.sass +3 -2
- package/lib/styles/utilities/_screenreaders.sass +13 -11
- package/lib/util/defineComponent.mjs.map +1 -1
- package/package.json +18 -4
- package/lib/styles/generic/_elevation.scss +0 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VSwitch.mjs","names":["filterControlProps","makeSelectionControlProps","VSelectionControl","filterInputProps","makeVInputProps","VInput","VProgressCircular","LoaderSlot","useLoader","useFocus","useProxiedModel","computed","ref","filterInputAttrs","genericComponent","getUid","useRender","VSwitch","name","inheritAttrs","props","indeterminate","Boolean","inset","flat","loading","type","String","default","emits","focused","val","setup","attrs","slots","model","loaderClasses","isFocused","focus","blur","loaderColor","color","uid","id","onChange","value","inputAttrs","controlAttrs","inputProps","_1","controlProps","_2","control","onClick","input","click","messagesId","isDisabled","isReadonly","isValid","undefined","textColorClasses","textColorStyles","slotProps","loader","isActive"],"sources":["../../../src/components/VSwitch/VSwitch.tsx"],"sourcesContent":["// Styles\nimport './VSwitch.sass'\n\n// Components\nimport { filterControlProps, makeSelectionControlProps, VSelectionControl } from '@/components/VSelectionControl/VSelectionControl'\nimport { filterInputProps, makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { VProgressCircular } from '@/components/VProgressCircular'\n\n// Composables\nimport { LoaderSlot, useLoader } from '@/composables/loader'\nimport { useFocus } from '@/composables/focus'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utility\nimport { computed, ref } from 'vue'\nimport { filterInputAttrs, genericComponent, getUid, useRender } from '@/util'\n\n// Types\nimport type { VInputSlots } from '@/components/VInput/VInput'\nimport type { VSelectionControlSlots } from '@/components/VSelectionControl/VSelectionControl'\n\nexport type VSwitchSlots = VInputSlots & VSelectionControlSlots\n\nexport const VSwitch = genericComponent<VSwitchSlots>()({\n name: 'VSwitch',\n\n inheritAttrs: false,\n\n props: {\n indeterminate: Boolean,\n inset: Boolean,\n flat: Boolean,\n loading: {\n type: [Boolean, String],\n default: false,\n },\n\n ...makeVInputProps(),\n ...makeSelectionControlProps(),\n },\n\n emits: {\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': () => true,\n 'update:indeterminate': (val: boolean) => true,\n },\n\n setup (props, { attrs, slots }) {\n const indeterminate = useProxiedModel(props, 'indeterminate')\n const model = useProxiedModel(props, 'modelValue')\n const { loaderClasses } = useLoader(props)\n const { isFocused, focus, blur } = useFocus(props)\n\n const loaderColor = computed(() => {\n return typeof props.loading === 'string' && props.loading !== ''\n ? props.loading\n : props.color\n })\n\n const uid = getUid()\n const id = computed(() => props.id || `switch-${uid}`)\n\n function onChange () {\n if (indeterminate.value) {\n indeterminate.value = false\n }\n }\n\n useRender(() => {\n const [inputAttrs, controlAttrs] = filterInputAttrs(attrs)\n const [inputProps, _1] = filterInputProps(props)\n const [controlProps, _2] = filterControlProps(props)\n const control = ref<VSelectionControl>()\n\n function onClick () {\n control.value?.input?.click()\n }\n\n return (\n <VInput\n class={[\n 'v-switch',\n { 'v-switch--inset': props.inset },\n { 'v-switch--indeterminate': indeterminate.value },\n loaderClasses.value,\n ]}\n { ...inputAttrs }\n { ...inputProps }\n id={ id.value }\n focused={ isFocused.value }\n >\n {{\n ...slots,\n default: ({\n id,\n messagesId,\n isDisabled,\n isReadonly,\n isValid,\n }) => (\n <VSelectionControl\n ref={ control }\n { ...controlProps }\n v-model={ model.value }\n id={ id.value }\n aria-describedby={ messagesId.value }\n type=\"checkbox\"\n onUpdate:modelValue={ onChange }\n aria-checked={ indeterminate.value ? 'mixed' : undefined }\n disabled={ isDisabled.value }\n readonly={ isReadonly.value }\n onFocus={ focus }\n onBlur={ blur }\n { ...controlAttrs }\n >\n {{\n ...slots,\n default: () => (<div class=\"v-switch__track\" onClick={ onClick }></div>),\n input: ({ textColorClasses, textColorStyles }) => (\n <div\n class={[\n 'v-switch__thumb',\n textColorClasses.value,\n ]}\n style={ textColorStyles.value }\n >\n { props.loading && (\n <LoaderSlot\n name=\"v-switch\"\n active\n color={ isValid.value === false ? undefined : loaderColor.value }\n >\n { slotProps => (\n slots.loader\n ? slots.loader(slotProps)\n : (\n <VProgressCircular\n active={ slotProps.isActive }\n color={ slotProps.color }\n indeterminate\n size=\"16\"\n width=\"2\"\n />\n )\n )}\n </LoaderSlot>\n )
|
|
1
|
+
{"version":3,"file":"VSwitch.mjs","names":["filterControlProps","makeSelectionControlProps","VSelectionControl","filterInputProps","makeVInputProps","VInput","VProgressCircular","LoaderSlot","useLoader","useFocus","useProxiedModel","computed","ref","filterInputAttrs","genericComponent","getUid","useRender","VSwitch","name","inheritAttrs","props","indeterminate","Boolean","inset","flat","loading","type","String","default","emits","focused","val","setup","attrs","slots","model","loaderClasses","isFocused","focus","blur","loaderColor","color","uid","id","onChange","value","inputAttrs","controlAttrs","inputProps","_1","controlProps","_2","control","onClick","input","click","messagesId","isDisabled","isReadonly","isValid","undefined","textColorClasses","textColorStyles","slotProps","loader","isActive"],"sources":["../../../src/components/VSwitch/VSwitch.tsx"],"sourcesContent":["// Styles\nimport './VSwitch.sass'\n\n// Components\nimport { filterControlProps, makeSelectionControlProps, VSelectionControl } from '@/components/VSelectionControl/VSelectionControl'\nimport { filterInputProps, makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { VProgressCircular } from '@/components/VProgressCircular'\n\n// Composables\nimport { LoaderSlot, useLoader } from '@/composables/loader'\nimport { useFocus } from '@/composables/focus'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utility\nimport { computed, ref } from 'vue'\nimport { filterInputAttrs, genericComponent, getUid, useRender } from '@/util'\n\n// Types\nimport type { VInputSlots } from '@/components/VInput/VInput'\nimport type { VSelectionControlSlots } from '@/components/VSelectionControl/VSelectionControl'\n\nexport type VSwitchSlots = VInputSlots & VSelectionControlSlots\n\nexport const VSwitch = genericComponent<VSwitchSlots>()({\n name: 'VSwitch',\n\n inheritAttrs: false,\n\n props: {\n indeterminate: Boolean,\n inset: Boolean,\n flat: Boolean,\n loading: {\n type: [Boolean, String],\n default: false,\n },\n\n ...makeVInputProps(),\n ...makeSelectionControlProps(),\n },\n\n emits: {\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': () => true,\n 'update:indeterminate': (val: boolean) => true,\n },\n\n setup (props, { attrs, slots }) {\n const indeterminate = useProxiedModel(props, 'indeterminate')\n const model = useProxiedModel(props, 'modelValue')\n const { loaderClasses } = useLoader(props)\n const { isFocused, focus, blur } = useFocus(props)\n\n const loaderColor = computed(() => {\n return typeof props.loading === 'string' && props.loading !== ''\n ? props.loading\n : props.color\n })\n\n const uid = getUid()\n const id = computed(() => props.id || `switch-${uid}`)\n\n function onChange () {\n if (indeterminate.value) {\n indeterminate.value = false\n }\n }\n\n useRender(() => {\n const [inputAttrs, controlAttrs] = filterInputAttrs(attrs)\n const [inputProps, _1] = filterInputProps(props)\n const [controlProps, _2] = filterControlProps(props)\n const control = ref<VSelectionControl>()\n\n function onClick () {\n control.value?.input?.click()\n }\n\n return (\n <VInput\n class={[\n 'v-switch',\n { 'v-switch--inset': props.inset },\n { 'v-switch--indeterminate': indeterminate.value },\n loaderClasses.value,\n ]}\n { ...inputAttrs }\n { ...inputProps }\n id={ id.value }\n focused={ isFocused.value }\n >\n {{\n ...slots,\n default: ({\n id,\n messagesId,\n isDisabled,\n isReadonly,\n isValid,\n }) => (\n <VSelectionControl\n ref={ control }\n { ...controlProps }\n v-model={ model.value }\n id={ id.value }\n aria-describedby={ messagesId.value }\n type=\"checkbox\"\n onUpdate:modelValue={ onChange }\n aria-checked={ indeterminate.value ? 'mixed' : undefined }\n disabled={ isDisabled.value }\n readonly={ isReadonly.value }\n onFocus={ focus }\n onBlur={ blur }\n { ...controlAttrs }\n >\n {{\n ...slots,\n default: () => (<div class=\"v-switch__track\" onClick={ onClick }></div>),\n input: ({ textColorClasses, textColorStyles }) => (\n <div\n class={[\n 'v-switch__thumb',\n textColorClasses.value,\n ]}\n style={ textColorStyles.value }\n >\n { props.loading && (\n <LoaderSlot\n name=\"v-switch\"\n active\n color={ isValid.value === false ? undefined : loaderColor.value }\n >\n { slotProps => (\n slots.loader\n ? slots.loader(slotProps)\n : (\n <VProgressCircular\n active={ slotProps.isActive }\n color={ slotProps.color }\n indeterminate\n size=\"16\"\n width=\"2\"\n />\n )\n )}\n </LoaderSlot>\n )}\n </div>\n ),\n }}\n </VSelectionControl>\n ),\n }}\n </VInput>\n )\n })\n\n return {}\n },\n})\n\nexport type VSwitch = InstanceType<typeof VSwitch>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,kBAAkB,EAAEC,yBAAyB,EAAEC,iBAAiB;AAAA,SAChEC,gBAAgB,EAAEC,eAAe,EAAEC,MAAM;AAAA,SACzCC,iBAAiB,0CAE1B;AAAA,SACSC,UAAU,EAAEC,SAAS;AAAA,SACrBC,QAAQ;AAAA,SACRC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,GAAG,QAAQ,KAAK;AAAA,SAC1BC,gBAAgB,EAAEC,gBAAgB,EAAEC,MAAM,EAAEC,SAAS,gCAE9D;AAMA,OAAO,MAAMC,OAAO,GAAGH,gBAAgB,EAAgB,CAAC;EACtDI,IAAI,EAAE,SAAS;EAEfC,YAAY,EAAE,KAAK;EAEnBC,KAAK,EAAE;IACLC,aAAa,EAAEC,OAAO;IACtBC,KAAK,EAAED,OAAO;IACdE,IAAI,EAAEF,OAAO;IACbG,OAAO,EAAE;MACPC,IAAI,EAAE,CAACJ,OAAO,EAAEK,MAAM,CAAC;MACvBC,OAAO,EAAE;IACX,CAAC;IAED,GAAGxB,eAAe,EAAE;IACpB,GAAGH,yBAAyB;EAC9B,CAAC;EAED4B,KAAK,EAAE;IACL,gBAAgB,EAAGC,OAAgB,IAAK,IAAI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AAS,IACT7B,KAAK,CAAC8B,MAAM,GACR9B,KAAK,CAAC8B,MAAM,CAACD,SAAS,CAAC;kBAAA,UAGVA,SAAS,CAACE,QAAQ;kBAAA,SACnBF,SAAS,CAACtB,KAAK;kBAAA;kBAAA,QAElB,IAAI;kBAAA,SACH;gBAAG;cAGlB,EAEJ;YAAA;UAEJ;QAAA;MAGN;IAIT,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
|
|
@@ -89,6 +89,17 @@ declare const VSwitch: vue.DefineComponent<{
|
|
|
89
89
|
}) => vue.VNodeChild) | undefined;
|
|
90
90
|
input?: ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
|
|
91
91
|
};
|
|
92
|
+
$slots?: {
|
|
93
|
+
default?: (((args_0: VInputSlot) => vue.VNodeChild) & (() => vue.VNodeChild)) | undefined;
|
|
94
|
+
prepend?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
95
|
+
append?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
96
|
+
details?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
97
|
+
label?: ((args_0: {
|
|
98
|
+
label: string | undefined;
|
|
99
|
+
props: Record<string, unknown>;
|
|
100
|
+
}) => vue.VNodeChild) | undefined;
|
|
101
|
+
input?: ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
|
|
102
|
+
} | undefined;
|
|
92
103
|
'v-slots'?: {
|
|
93
104
|
default?: false | (((args_0: VInputSlot) => vue.VNodeChild) & (() => vue.VNodeChild)) | undefined;
|
|
94
105
|
prepend?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
@@ -165,6 +176,17 @@ declare const VSwitch: vue.DefineComponent<{
|
|
|
165
176
|
}) => vue.VNodeChild) | undefined;
|
|
166
177
|
input?: ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
|
|
167
178
|
};
|
|
179
|
+
$slots?: {
|
|
180
|
+
default?: (((args_0: VInputSlot) => vue.VNodeChild) & (() => vue.VNodeChild)) | undefined;
|
|
181
|
+
prepend?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
182
|
+
append?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
183
|
+
details?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
184
|
+
label?: ((args_0: {
|
|
185
|
+
label: string | undefined;
|
|
186
|
+
props: Record<string, unknown>;
|
|
187
|
+
}) => vue.VNodeChild) | undefined;
|
|
188
|
+
input?: ((args_0: SelectionControlSlot) => vue.VNodeChild) | undefined;
|
|
189
|
+
} | undefined;
|
|
168
190
|
'v-slots'?: {
|
|
169
191
|
default?: false | (((args_0: VInputSlot) => vue.VNodeChild) & (() => vue.VNodeChild)) | undefined;
|
|
170
192
|
prepend?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
@@ -16,6 +16,9 @@ declare const VSystemBar: vue.DefineComponent<{
|
|
|
16
16
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
17
17
|
default?: (() => vue.VNodeChild) | undefined;
|
|
18
18
|
};
|
|
19
|
+
$slots?: {
|
|
20
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
21
|
+
} | undefined;
|
|
19
22
|
'v-slots'?: {
|
|
20
23
|
default?: false | (() => vue.VNodeChild) | undefined;
|
|
21
24
|
} | undefined;
|
|
@@ -37,6 +40,9 @@ declare const VSystemBar: vue.DefineComponent<{
|
|
|
37
40
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
38
41
|
default?: (() => vue.VNodeChild) | undefined;
|
|
39
42
|
};
|
|
43
|
+
$slots?: {
|
|
44
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
45
|
+
} | undefined;
|
|
40
46
|
'v-slots'?: {
|
|
41
47
|
default?: false | (() => vue.VNodeChild) | undefined;
|
|
42
48
|
} | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VTable.mjs","names":["makeDensityProps","useDensity","makeTagProps","makeThemeProps","provideTheme","convertToUnit","genericComponent","useRender","VTable","name","props","fixedHeader","Boolean","fixedFooter","height","Number","String","hover","setup","slots","themeClasses","densityClasses","top","bottom","value","default","wrapper"],"sources":["../../../src/components/VTable/VTable.tsx"],"sourcesContent":["// Styles\nimport './VTable.sass'\n\n// Composables\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { convertToUnit, genericComponent, useRender } from '@/util'\n\nexport type VTableSlots = {\n default: []\n top: []\n bottom: []\n wrapper: []\n}\n\nexport const VTable = genericComponent<VTableSlots>()({\n name: 'VTable',\n\n props: {\n fixedHeader: Boolean,\n fixedFooter: Boolean,\n height: [Number, String],\n hover: Boolean,\n\n ...makeDensityProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n },\n\n setup (props, { slots }) {\n const { themeClasses } = provideTheme(props)\n const { densityClasses } = useDensity(props)\n\n useRender(() => (\n <props.tag\n class={[\n 'v-table',\n {\n 'v-table--fixed-height': !!props.height,\n 'v-table--fixed-header': props.fixedHeader,\n 'v-table--fixed-footer': props.fixedFooter,\n 'v-table--has-top': !!slots.top,\n 'v-table--has-bottom': !!slots.bottom,\n 'v-table--hover': props.hover,\n },\n themeClasses.value,\n densityClasses.value,\n ]}\n >\n { slots.top?.() }\n\n { slots.default ? (\n <div\n class=\"v-table__wrapper\"\n style={{ height: convertToUnit(props.height) }}\n >\n <table>\n { slots.default() }\n </table>\n </div>\n ) : slots.wrapper?.()
|
|
1
|
+
{"version":3,"file":"VTable.mjs","names":["makeDensityProps","useDensity","makeTagProps","makeThemeProps","provideTheme","convertToUnit","genericComponent","useRender","VTable","name","props","fixedHeader","Boolean","fixedFooter","height","Number","String","hover","setup","slots","themeClasses","densityClasses","top","bottom","value","default","wrapper"],"sources":["../../../src/components/VTable/VTable.tsx"],"sourcesContent":["// Styles\nimport './VTable.sass'\n\n// Composables\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { convertToUnit, genericComponent, useRender } from '@/util'\n\nexport type VTableSlots = {\n default: []\n top: []\n bottom: []\n wrapper: []\n}\n\nexport const VTable = genericComponent<VTableSlots>()({\n name: 'VTable',\n\n props: {\n fixedHeader: Boolean,\n fixedFooter: Boolean,\n height: [Number, String],\n hover: Boolean,\n\n ...makeDensityProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n },\n\n setup (props, { slots }) {\n const { themeClasses } = provideTheme(props)\n const { densityClasses } = useDensity(props)\n\n useRender(() => (\n <props.tag\n class={[\n 'v-table',\n {\n 'v-table--fixed-height': !!props.height,\n 'v-table--fixed-header': props.fixedHeader,\n 'v-table--fixed-footer': props.fixedFooter,\n 'v-table--has-top': !!slots.top,\n 'v-table--has-bottom': !!slots.bottom,\n 'v-table--hover': props.hover,\n },\n themeClasses.value,\n densityClasses.value,\n ]}\n >\n { slots.top?.() }\n\n { slots.default ? (\n <div\n class=\"v-table__wrapper\"\n style={{ height: convertToUnit(props.height) }}\n >\n <table>\n { slots.default() }\n </table>\n </div>\n ) : slots.wrapper?.()}\n\n { slots.bottom?.() }\n </props.tag>\n ))\n\n return {}\n },\n})\n\nexport type VTable = InstanceType<typeof VTable>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY,uCAErC;AAAA,SACSC,aAAa,EAAEC,gBAAgB,EAAEC,SAAS;AASnD,OAAO,MAAMC,MAAM,GAAGF,gBAAgB,EAAe,CAAC;EACpDG,IAAI,EAAE,QAAQ;EAEdC,KAAK,EAAE;IACLC,WAAW,EAAEC,OAAO;IACpBC,WAAW,EAAED,OAAO;IACpBE,MAAM,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;IACxBC,KAAK,EAAEL,OAAO;IAEd,GAAGZ,gBAAgB,EAAE;IACrB,GAAGE,YAAY,EAAE;IACjB,GAAGC,cAAc;EACnB,CAAC;EAEDe,KAAK,CAAER,KAAK,QAAa;IAAA,IAAX;MAAES;IAAM,CAAC;IACrB,MAAM;MAAEC;IAAa,CAAC,GAAGhB,YAAY,CAACM,KAAK,CAAC;IAC5C,MAAM;MAAEW;IAAe,CAAC,GAAGpB,UAAU,CAACS,KAAK,CAAC;IAE5CH,SAAS,CAAC;MAAA,SAEC,CACL,SAAS,EACT;QACE,uBAAuB,EAAE,CAAC,CAACG,KAAK,CAACI,MAAM;QACvC,uBAAuB,EAAEJ,KAAK,CAACC,WAAW;QAC1C,uBAAuB,EAAED,KAAK,CAACG,WAAW;QAC1C,kBAAkB,EAAE,CAAC,CAACM,KAAK,CAACG,GAAG;QAC/B,qBAAqB,EAAE,CAAC,CAACH,KAAK,CAACI,MAAM;QACrC,gBAAgB,EAAEb,KAAK,CAACO;MAC1B,CAAC,EACDG,YAAY,CAACI,KAAK,EAClBH,cAAc,CAACG,KAAK;IACrB;MAAA,gBAECL,KAAK,CAACG,GAAG,IAAI,EAEbH,KAAK,CAACM,OAAO;QAAA,SAEL,kBAAkB;QAAA,SACjB;UAAEX,MAAM,EAAET,aAAa,CAACK,KAAK,CAACI,MAAM;QAAE;MAAC,iCAG1CK,KAAK,CAACM,OAAO,EAAE,OAGnBN,KAAK,CAACO,OAAO,IAAI,EAEnBP,KAAK,CAACI,MAAM,IAAI;IAAA,EAErB,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
|
|
@@ -18,6 +18,12 @@ declare const VTable: vue.DefineComponent<{
|
|
|
18
18
|
bottom?: (() => vue.VNodeChild) | undefined;
|
|
19
19
|
wrapper?: (() => vue.VNodeChild) | undefined;
|
|
20
20
|
};
|
|
21
|
+
$slots?: {
|
|
22
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
23
|
+
top?: (() => vue.VNodeChild) | undefined;
|
|
24
|
+
bottom?: (() => vue.VNodeChild) | undefined;
|
|
25
|
+
wrapper?: (() => vue.VNodeChild) | undefined;
|
|
26
|
+
} | undefined;
|
|
21
27
|
'v-slots'?: {
|
|
22
28
|
default?: false | (() => vue.VNodeChild) | undefined;
|
|
23
29
|
top?: false | (() => vue.VNodeChild) | undefined;
|
|
@@ -45,6 +51,12 @@ declare const VTable: vue.DefineComponent<{
|
|
|
45
51
|
bottom?: (() => vue.VNodeChild) | undefined;
|
|
46
52
|
wrapper?: (() => vue.VNodeChild) | undefined;
|
|
47
53
|
};
|
|
54
|
+
$slots?: {
|
|
55
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
56
|
+
top?: (() => vue.VNodeChild) | undefined;
|
|
57
|
+
bottom?: (() => vue.VNodeChild) | undefined;
|
|
58
|
+
wrapper?: (() => vue.VNodeChild) | undefined;
|
|
59
|
+
} | undefined;
|
|
48
60
|
'v-slots'?: {
|
|
49
61
|
default?: false | (() => vue.VNodeChild) | undefined;
|
|
50
62
|
top?: false | (() => vue.VNodeChild) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VTab.mjs","names":["VBtn","IconValue","makeGroupItemProps","makeRouterProps","makeTagProps","makeThemeProps","useTextColor","computed","ref","animate","genericComponent","pick","standardEasing","useRender","VTabsSymbol","VTab","name","props","fixed","Boolean","icon","String","Function","Object","prependIcon","appendIcon","stacked","title","ripple","type","default","color","sliderColor","hideSlider","direction","selectedClass","setup","slots","attrs","textColorClasses","sliderColorClasses","textColorStyles","sliderColorStyles","isHorizontal","isSelected","rootEl","sliderEl","updateSlider","value","prevEl","$el","parentElement","querySelector","nextEl","getComputedStyle","prevBox","getBoundingClientRect","nextBox","xy","XY","rightBottom","widthHeight","prevPos","nextPos","delta","origin","Math","sign","size","abs","scale","max","initialScale","sigma","backgroundColor","transform","transformOrigin","Array","fill","duration","easing","btnProps","undefined"],"sources":["../../../src/components/VTabs/VTab.tsx"],"sourcesContent":["// Styles\nimport './VTab.sass'\n\n// Components\nimport { VBtn } from '@/components/VBtn'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\nimport { makeGroupItemProps } from '@/composables/group'\nimport { makeRouterProps } from '@/composables/router'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps } from '@/composables/theme'\nimport { useTextColor } from '@/composables/color'\n\n// Utilities\nimport { computed, ref } from 'vue'\nimport { animate, genericComponent, pick, standardEasing, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport { VTabsSymbol } from './shared'\n\nexport const VTab = genericComponent()({\n name: 'VTab',\n\n props: {\n fixed: Boolean,\n icon: [Boolean, String, Function, Object] as PropType<boolean | IconValue>,\n prependIcon: IconValue,\n appendIcon: IconValue,\n\n stacked: Boolean,\n title: String,\n\n ripple: {\n type: Boolean,\n default: true,\n },\n color: String,\n sliderColor: String,\n hideSlider: Boolean,\n\n direction: {\n type: String as PropType<'horizontal' | 'vertical'>,\n default: 'horizontal',\n },\n\n ...makeTagProps(),\n ...makeRouterProps(),\n ...makeGroupItemProps({\n selectedClass: 'v-tab--selected',\n }),\n ...makeThemeProps(),\n },\n\n setup (props, { slots, attrs }) {\n const { textColorClasses: sliderColorClasses, textColorStyles: sliderColorStyles } = useTextColor(props, 'sliderColor')\n const isHorizontal = computed(() => props.direction === 'horizontal')\n const isSelected = ref(false)\n\n const rootEl = ref<VBtn>()\n const sliderEl = ref<HTMLElement>()\n\n function updateSlider ({ value }: { value: boolean }) {\n isSelected.value = value\n\n if (value) {\n const prevEl: HTMLElement | undefined = rootEl.value?.$el.parentElement?.querySelector('.v-tab--selected .v-tab__slider')\n const nextEl = sliderEl.value\n\n if (!prevEl || !nextEl) return\n\n const color = getComputedStyle(prevEl).color\n\n const prevBox = prevEl.getBoundingClientRect()\n const nextBox = nextEl.getBoundingClientRect()\n\n const xy = isHorizontal.value ? 'x' : 'y'\n const XY = isHorizontal.value ? 'X' : 'Y'\n const rightBottom = isHorizontal.value ? 'right' : 'bottom'\n const widthHeight = isHorizontal.value ? 'width' : 'height'\n\n const prevPos = prevBox[xy]\n const nextPos = nextBox[xy]\n const delta = prevPos > nextPos\n ? prevBox[rightBottom] - nextBox[rightBottom]\n : prevBox[xy] - nextBox[xy]\n const origin =\n Math.sign(delta) > 0 ? (isHorizontal.value ? 'right' : 'bottom')\n : Math.sign(delta) < 0 ? (isHorizontal.value ? 'left' : 'top')\n : 'center'\n const size = Math.abs(delta) + (Math.sign(delta) < 0 ? prevBox[widthHeight] : nextBox[widthHeight])\n const scale = size / Math.max(prevBox[widthHeight], nextBox[widthHeight])\n const initialScale = prevBox[widthHeight] / nextBox[widthHeight]\n\n const sigma = 1.5\n animate(nextEl, {\n backgroundColor: [color, ''],\n transform: [\n `translate${XY}(${delta}px) scale${XY}(${initialScale})`,\n `translate${XY}(${delta / sigma}px) scale${XY}(${(scale - 1) / sigma + 1})`,\n '',\n ],\n transformOrigin: Array(3).fill(origin),\n }, {\n duration: 225,\n easing: standardEasing,\n })\n }\n }\n\n useRender(() => {\n const [btnProps] = pick(props, [\n 'href',\n 'to',\n 'replace',\n 'icon',\n 'stacked',\n 'prependIcon',\n 'appendIcon',\n 'ripple',\n 'theme',\n 'disabled',\n 'selectedClass',\n 'value',\n 'color',\n ])\n\n return (\n <VBtn\n _as=\"VTab\"\n symbol={ VTabsSymbol }\n ref={ rootEl }\n class={[\n 'v-tab',\n ]}\n tabindex={ isSelected.value ? 0 : -1 }\n role=\"tab\"\n aria-selected={ String(isSelected.value) }\n active={ false }\n block={ props.fixed }\n maxWidth={ props.fixed ? 300 : undefined }\n variant=\"text\"\n rounded={ 0 }\n { ...btnProps }\n { ...attrs }\n onGroup:selected={ updateSlider }\n >\n { slots.default ? slots.default() : props.title }\n { !props.hideSlider && (\n <div\n ref={ sliderEl }\n class={[\n 'v-tab__slider',\n sliderColorClasses.value,\n ]}\n style={ sliderColorStyles.value }\n />\n )
|
|
1
|
+
{"version":3,"file":"VTab.mjs","names":["VBtn","IconValue","makeGroupItemProps","makeRouterProps","makeTagProps","makeThemeProps","useTextColor","computed","ref","animate","genericComponent","pick","standardEasing","useRender","VTabsSymbol","VTab","name","props","fixed","Boolean","icon","String","Function","Object","prependIcon","appendIcon","stacked","title","ripple","type","default","color","sliderColor","hideSlider","direction","selectedClass","setup","slots","attrs","textColorClasses","sliderColorClasses","textColorStyles","sliderColorStyles","isHorizontal","isSelected","rootEl","sliderEl","updateSlider","value","prevEl","$el","parentElement","querySelector","nextEl","getComputedStyle","prevBox","getBoundingClientRect","nextBox","xy","XY","rightBottom","widthHeight","prevPos","nextPos","delta","origin","Math","sign","size","abs","scale","max","initialScale","sigma","backgroundColor","transform","transformOrigin","Array","fill","duration","easing","btnProps","undefined"],"sources":["../../../src/components/VTabs/VTab.tsx"],"sourcesContent":["// Styles\nimport './VTab.sass'\n\n// Components\nimport { VBtn } from '@/components/VBtn'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\nimport { makeGroupItemProps } from '@/composables/group'\nimport { makeRouterProps } from '@/composables/router'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps } from '@/composables/theme'\nimport { useTextColor } from '@/composables/color'\n\n// Utilities\nimport { computed, ref } from 'vue'\nimport { animate, genericComponent, pick, standardEasing, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport { VTabsSymbol } from './shared'\n\nexport const VTab = genericComponent()({\n name: 'VTab',\n\n props: {\n fixed: Boolean,\n icon: [Boolean, String, Function, Object] as PropType<boolean | IconValue>,\n prependIcon: IconValue,\n appendIcon: IconValue,\n\n stacked: Boolean,\n title: String,\n\n ripple: {\n type: Boolean,\n default: true,\n },\n color: String,\n sliderColor: String,\n hideSlider: Boolean,\n\n direction: {\n type: String as PropType<'horizontal' | 'vertical'>,\n default: 'horizontal',\n },\n\n ...makeTagProps(),\n ...makeRouterProps(),\n ...makeGroupItemProps({\n selectedClass: 'v-tab--selected',\n }),\n ...makeThemeProps(),\n },\n\n setup (props, { slots, attrs }) {\n const { textColorClasses: sliderColorClasses, textColorStyles: sliderColorStyles } = useTextColor(props, 'sliderColor')\n const isHorizontal = computed(() => props.direction === 'horizontal')\n const isSelected = ref(false)\n\n const rootEl = ref<VBtn>()\n const sliderEl = ref<HTMLElement>()\n\n function updateSlider ({ value }: { value: boolean }) {\n isSelected.value = value\n\n if (value) {\n const prevEl: HTMLElement | undefined = rootEl.value?.$el.parentElement?.querySelector('.v-tab--selected .v-tab__slider')\n const nextEl = sliderEl.value\n\n if (!prevEl || !nextEl) return\n\n const color = getComputedStyle(prevEl).color\n\n const prevBox = prevEl.getBoundingClientRect()\n const nextBox = nextEl.getBoundingClientRect()\n\n const xy = isHorizontal.value ? 'x' : 'y'\n const XY = isHorizontal.value ? 'X' : 'Y'\n const rightBottom = isHorizontal.value ? 'right' : 'bottom'\n const widthHeight = isHorizontal.value ? 'width' : 'height'\n\n const prevPos = prevBox[xy]\n const nextPos = nextBox[xy]\n const delta = prevPos > nextPos\n ? prevBox[rightBottom] - nextBox[rightBottom]\n : prevBox[xy] - nextBox[xy]\n const origin =\n Math.sign(delta) > 0 ? (isHorizontal.value ? 'right' : 'bottom')\n : Math.sign(delta) < 0 ? (isHorizontal.value ? 'left' : 'top')\n : 'center'\n const size = Math.abs(delta) + (Math.sign(delta) < 0 ? prevBox[widthHeight] : nextBox[widthHeight])\n const scale = size / Math.max(prevBox[widthHeight], nextBox[widthHeight])\n const initialScale = prevBox[widthHeight] / nextBox[widthHeight]\n\n const sigma = 1.5\n animate(nextEl, {\n backgroundColor: [color, ''],\n transform: [\n `translate${XY}(${delta}px) scale${XY}(${initialScale})`,\n `translate${XY}(${delta / sigma}px) scale${XY}(${(scale - 1) / sigma + 1})`,\n '',\n ],\n transformOrigin: Array(3).fill(origin),\n }, {\n duration: 225,\n easing: standardEasing,\n })\n }\n }\n\n useRender(() => {\n const [btnProps] = pick(props, [\n 'href',\n 'to',\n 'replace',\n 'icon',\n 'stacked',\n 'prependIcon',\n 'appendIcon',\n 'ripple',\n 'theme',\n 'disabled',\n 'selectedClass',\n 'value',\n 'color',\n ])\n\n return (\n <VBtn\n _as=\"VTab\"\n symbol={ VTabsSymbol }\n ref={ rootEl }\n class={[\n 'v-tab',\n ]}\n tabindex={ isSelected.value ? 0 : -1 }\n role=\"tab\"\n aria-selected={ String(isSelected.value) }\n active={ false }\n block={ props.fixed }\n maxWidth={ props.fixed ? 300 : undefined }\n variant=\"text\"\n rounded={ 0 }\n { ...btnProps }\n { ...attrs }\n onGroup:selected={ updateSlider }\n >\n { slots.default ? slots.default() : props.title }\n { !props.hideSlider && (\n <div\n ref={ sliderEl }\n class={[\n 'v-tab__slider',\n sliderColorClasses.value,\n ]}\n style={ sliderColorStyles.value }\n />\n )}\n </VBtn>\n )\n })\n\n return {}\n },\n})\n\nexport type VTab = InstanceType<typeof VTab>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,IAAI,6BAEb;AAAA,SACSC,SAAS;AAAA,SACTC,kBAAkB;AAAA,SAClBC,eAAe;AAAA,SACfC,YAAY;AAAA,SACZC,cAAc;AAAA,SACdC,YAAY,uCAErB;AACA,SAASC,QAAQ,EAAEC,GAAG,QAAQ,KAAK;AAAA,SAC1BC,OAAO,EAAEC,gBAAgB,EAAEC,IAAI,EAAEC,cAAc,EAAEC,SAAS,gCAEnE;AAAA,SAESC,WAAW;AAEpB,OAAO,MAAMC,IAAI,GAAGL,gBAAgB,EAAE,CAAC;EACrCM,IAAI,EAAE,MAAM;EAEZC,KAAK,EAAE;IACLC,KAAK,EAAEC,OAAO;IACdC,IAAI,EAAE,CAACD,OAAO,EAAEE,MAAM,EAAEC,QAAQ,EAAEC,MAAM,CAAkC;IAC1EC,WAAW,EAAEvB,SAAS;IACtBwB,UAAU,EAAExB,SAAS;IAErByB,OAAO,EAAEP,OAAO;IAChBQ,KAAK,EAAEN,MAAM;IAEbO,MAAM,EAAE;MACNC,IAAI,EAAEV,OAAO;MACbW,OAAO,EAAE;I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KAAK,EAC7C,CAACV,KAAK,CAACgB,UAAU;UAAA,OAETa,QAAQ;UAAA,SACP,CACL,eAAe,EACfN,kBAAkB,CAACQ,KAAK,CACzB;UAAA,SACON,iBAAiB,CAACM;QAAK,QAElC;MAAA;IAGP,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VTabs.mjs","names":["VSlideGroup","VTab","makeDensityProps","useDensity","makeTagProps","provideDefaults","useBackgroundColor","useProxiedModel","computed","toRef","convertToUnit","genericComponent","useRender","VTabsSymbol","parseItems","items","map","item","title","value","VTabs","name","props","alignTabs","type","String","default","color","direction","fixedTabs","Boolean","Array","stacked","bgColor","grow","height","Number","undefined","hideSlider","sliderColor","modelValue","mandatory","emits","v","setup","slots","model","parsedItems","densityClasses","backgroundColorClasses","backgroundColorStyles","fixed"],"sources":["../../../src/components/VTabs/VTabs.tsx"],"sourcesContent":["// Styles\nimport './VTabs.sass'\n\n// Components\nimport { VSlideGroup } from '@/components/VSlideGroup'\nimport { VTab } from './VTab'\n\n// Composables\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeTagProps } from '@/composables/tag'\nimport { provideDefaults } from '@/composables/defaults'\nimport { useBackgroundColor } from '@/composables/color'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, toRef } from 'vue'\nimport { convertToUnit, genericComponent, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport { VTabsSymbol } from './shared'\n\nexport type TabItem = string | Record<string, any>\n\nfunction parseItems (items: TabItem[] | undefined) {\n if (!items) return []\n\n return items.map(item => {\n if (typeof item === 'string') return { title: item, value: item }\n\n return item\n })\n}\n\nexport const VTabs = genericComponent()({\n name: 'VTabs',\n\n props: {\n alignTabs: {\n type: String as PropType<'start' | 'title' | 'center' | 'end'>,\n default: 'start',\n },\n color: String,\n direction: {\n type: String as PropType<'horizontal' | 'vertical'>,\n default: 'horizontal',\n },\n fixedTabs: Boolean,\n items: {\n type: Array as PropType<TabItem[]>,\n default: () => ([]),\n },\n stacked: Boolean,\n bgColor: String,\n grow: Boolean,\n height: {\n type: [Number, String],\n default: undefined,\n },\n hideSlider: Boolean,\n sliderColor: String,\n modelValue: null,\n mandatory: {\n type: [Boolean, String] as PropType<boolean | 'force'>,\n default: 'force',\n },\n\n ...makeDensityProps(),\n ...makeTagProps(),\n },\n\n emits: {\n 'update:modelValue': (v: unknown) => true,\n },\n\n setup (props, { slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const parsedItems = computed(() => parseItems(props.items))\n const { densityClasses } = useDensity(props)\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'bgColor'))\n\n provideDefaults({\n VTab: {\n color: toRef(props, 'color'),\n direction: toRef(props, 'direction'),\n stacked: toRef(props, 'stacked'),\n fixed: toRef(props, 'fixedTabs'),\n sliderColor: toRef(props, 'sliderColor'),\n hideSlider: toRef(props, 'hideSlider'),\n },\n })\n\n useRender(() => (\n <VSlideGroup\n v-model={ model.value }\n class={[\n 'v-tabs',\n `v-tabs--${props.direction}`,\n `v-tabs--align-tabs-${props.alignTabs}`,\n {\n 'v-tabs--fixed-tabs': props.fixedTabs,\n 'v-tabs--grow': props.grow,\n 'v-tabs--stacked': props.stacked,\n },\n densityClasses.value,\n backgroundColorClasses.value,\n ]}\n style={[\n { '--v-tabs-height': convertToUnit(props.height) },\n backgroundColorStyles.value,\n ]}\n role=\"tablist\"\n symbol={ VTabsSymbol }\n mandatory={ props.mandatory }\n direction={ props.direction }\n >\n { slots.default ? slots.default() : parsedItems.value.map(item => (\n <VTab { ...item } key={ item.title } />\n ))
|
|
1
|
+
{"version":3,"file":"VTabs.mjs","names":["VSlideGroup","VTab","makeDensityProps","useDensity","makeTagProps","provideDefaults","useBackgroundColor","useProxiedModel","computed","toRef","convertToUnit","genericComponent","useRender","VTabsSymbol","parseItems","items","map","item","title","value","VTabs","name","props","alignTabs","type","String","default","color","direction","fixedTabs","Boolean","Array","stacked","bgColor","grow","height","Number","undefined","hideSlider","sliderColor","modelValue","mandatory","emits","v","setup","slots","model","parsedItems","densityClasses","backgroundColorClasses","backgroundColorStyles","fixed"],"sources":["../../../src/components/VTabs/VTabs.tsx"],"sourcesContent":["// Styles\nimport './VTabs.sass'\n\n// Components\nimport { VSlideGroup } from '@/components/VSlideGroup'\nimport { VTab } from './VTab'\n\n// Composables\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeTagProps } from '@/composables/tag'\nimport { provideDefaults } from '@/composables/defaults'\nimport { useBackgroundColor } from '@/composables/color'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, toRef } from 'vue'\nimport { convertToUnit, genericComponent, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport { VTabsSymbol } from './shared'\n\nexport type TabItem = string | Record<string, any>\n\nfunction parseItems (items: TabItem[] | undefined) {\n if (!items) return []\n\n return items.map(item => {\n if (typeof item === 'string') return { title: item, value: item }\n\n return item\n })\n}\n\nexport const VTabs = genericComponent()({\n name: 'VTabs',\n\n props: {\n alignTabs: {\n type: String as PropType<'start' | 'title' | 'center' | 'end'>,\n default: 'start',\n },\n color: String,\n direction: {\n type: String as PropType<'horizontal' | 'vertical'>,\n default: 'horizontal',\n },\n fixedTabs: Boolean,\n items: {\n type: Array as PropType<TabItem[]>,\n default: () => ([]),\n },\n stacked: Boolean,\n bgColor: String,\n grow: Boolean,\n height: {\n type: [Number, String],\n default: undefined,\n },\n hideSlider: Boolean,\n sliderColor: String,\n modelValue: null,\n mandatory: {\n type: [Boolean, String] as PropType<boolean | 'force'>,\n default: 'force',\n },\n\n ...makeDensityProps(),\n ...makeTagProps(),\n },\n\n emits: {\n 'update:modelValue': (v: unknown) => true,\n },\n\n setup (props, { slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const parsedItems = computed(() => parseItems(props.items))\n const { densityClasses } = useDensity(props)\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'bgColor'))\n\n provideDefaults({\n VTab: {\n color: toRef(props, 'color'),\n direction: toRef(props, 'direction'),\n stacked: toRef(props, 'stacked'),\n fixed: toRef(props, 'fixedTabs'),\n sliderColor: toRef(props, 'sliderColor'),\n hideSlider: toRef(props, 'hideSlider'),\n },\n })\n\n useRender(() => (\n <VSlideGroup\n v-model={ model.value }\n class={[\n 'v-tabs',\n `v-tabs--${props.direction}`,\n `v-tabs--align-tabs-${props.alignTabs}`,\n {\n 'v-tabs--fixed-tabs': props.fixedTabs,\n 'v-tabs--grow': props.grow,\n 'v-tabs--stacked': props.stacked,\n },\n densityClasses.value,\n backgroundColorClasses.value,\n ]}\n style={[\n { '--v-tabs-height': convertToUnit(props.height) },\n backgroundColorStyles.value,\n ]}\n role=\"tablist\"\n symbol={ VTabsSymbol }\n mandatory={ props.mandatory }\n direction={ props.direction }\n >\n { slots.default ? slots.default() : parsedItems.value.map(item => (\n <VTab { ...item } key={ item.title } />\n ))}\n </VSlideGroup>\n ))\n\n return {}\n },\n})\n\nexport type VTabs = InstanceType<typeof VTabs>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,WAAW;AAAA,SACXC,IAAI,sBAEb;AAAA,SACSC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,YAAY;AAAA,SACZC,eAAe;AAAA,SACfC,kBAAkB;AAAA,SAClBC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC5BC,aAAa,EAAEC,gBAAgB,EAAEC,SAAS,gCAEnD;AAAA,SAESC,WAAW;AAIpB,SAASC,UAAU,CAAEC,KAA4B,EAAE;EACjD,IAAI,CAACA,KAAK,EAAE,OAAO,EAAE;EAErB,OAAOA,KAAK,CAACC,GAAG,CAACC,IAAI,IAAI;IACvB,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE,OAAO;MAAEC,KAAK,EAAED,IAAI;M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AAI,mCACjDA,IAAI;QAAA,OAASA,IAAI,CAACC;MAAK,SACnC,CAAC;IAAA,EAEL,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
|
|
@@ -27,6 +27,9 @@ declare const VTabs: vue.DefineComponent<{
|
|
|
27
27
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
28
28
|
default?: (() => vue.VNodeChild) | undefined;
|
|
29
29
|
};
|
|
30
|
+
$slots?: {
|
|
31
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
32
|
+
} | undefined;
|
|
30
33
|
'v-slots'?: {
|
|
31
34
|
default?: false | (() => vue.VNodeChild) | undefined;
|
|
32
35
|
} | undefined;
|
|
@@ -55,6 +58,9 @@ declare const VTabs: vue.DefineComponent<{
|
|
|
55
58
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
56
59
|
default?: (() => vue.VNodeChild) | undefined;
|
|
57
60
|
};
|
|
61
|
+
$slots?: {
|
|
62
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
63
|
+
} | undefined;
|
|
58
64
|
'v-slots'?: {
|
|
59
65
|
default?: false | (() => vue.VNodeChild) | undefined;
|
|
60
66
|
} | undefined;
|
|
@@ -106,6 +112,9 @@ declare const VTab: vue.DefineComponent<{
|
|
|
106
112
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
107
113
|
default?: (() => vue.VNodeChild) | undefined;
|
|
108
114
|
};
|
|
115
|
+
$slots?: {
|
|
116
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
117
|
+
} | undefined;
|
|
109
118
|
'v-slots'?: {
|
|
110
119
|
default?: false | (() => vue.VNodeChild) | undefined;
|
|
111
120
|
} | undefined;
|
|
@@ -137,6 +146,9 @@ declare const VTab: vue.DefineComponent<{
|
|
|
137
146
|
$children?: vue.VNodeChild | (() => vue.VNodeChild) | {
|
|
138
147
|
default?: (() => vue.VNodeChild) | undefined;
|
|
139
148
|
};
|
|
149
|
+
$slots?: {
|
|
150
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
151
|
+
} | undefined;
|
|
140
152
|
'v-slots'?: {
|
|
141
153
|
default?: false | (() => vue.VNodeChild) | undefined;
|
|
142
154
|
} | undefined;
|
|
@@ -148,6 +148,7 @@ export const VTextField = genericComponent()({
|
|
|
148
148
|
"id": id.value,
|
|
149
149
|
"active": isActive.value || isDirty.value,
|
|
150
150
|
"dirty": isDirty.value || props.dirty,
|
|
151
|
+
"disabled": isDisabled.value,
|
|
151
152
|
"focused": isFocused.value,
|
|
152
153
|
"error": isValid.value === false
|
|
153
154
|
}), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VTextField.mjs","names":["filterFieldProps","makeVFieldProps","VField","filterInputProps","makeVInputProps","VInput","VCounter","Intersect","forwardRefs","useFocus","useProxiedModel","cloneVNode","computed","nextTick","ref","callEvent","filterInputAttrs","genericComponent","pick","propsFactory","useRender","activeTypes","EventProp","Function","Array","makeVTextFieldProps","autofocus","Boolean","counter","Number","String","counterValue","hint","persistentHint","prefix","placeholder","persistentPlaceholder","persistentCounter","suffix","type","default","VTextField","name","directives","inheritAttrs","props","emits","e","focused","val","setup","attrs","emit","slots","model","isFocused","focus","blur","value","toString","length","max","maxlength","undefined","onIntersect","isIntersecting","entries","target","vInputRef","vFieldRef","inputRef","isActive","includes","messages","onFocus","document","activeElement","onControlMousedown","preventDefault","onControlClick","onClear","stopPropagation","onInput","hasCounter","hasDetails","details","rootAttrs","inputAttrs","modelValue","_","inputProps","fieldProps","variant","id","isDisabled","isDirty","isReadonly","isValid","dirty","class","fieldClass","slotProps","inputNode","handler","filterVTextFieldProps","Object","keys"],"sources":["../../../src/components/VTextField/VTextField.tsx"],"sourcesContent":["// Styles\nimport './VTextField.sass'\n\n// Components\nimport { filterFieldProps, makeVFieldProps, VField } from '@/components/VField/VField'\nimport { filterInputProps, makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { VCounter } from '@/components/VCounter'\n\n// Directives\nimport Intersect from '@/directives/intersect'\n\n// Composables\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useFocus } from '@/composables/focus'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { cloneVNode, computed, nextTick, ref } from 'vue'\nimport { callEvent, filterInputAttrs, genericComponent, pick, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { ExtractPropTypes, PropType } from 'vue'\nimport type { MakeSlots } from '@/util'\nimport type { VFieldSlots } from '@/components/VField/VField'\nimport type { VInputSlots } from '@/components/VInput/VInput'\n\nconst activeTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'month']\n\ntype EventProp<T = (...args: any[]) => any> = T | T[]\nconst EventProp = [Function, Array] as PropType<EventProp>\n\nexport const makeVTextFieldProps = propsFactory({\n autofocus: Boolean,\n counter: [Boolean, Number, String] as PropType<true | number | string>,\n counterValue: Function as PropType<(value: any) => number>,\n hint: String,\n persistentHint: Boolean,\n prefix: String,\n placeholder: String,\n persistentPlaceholder: Boolean,\n persistentCounter: Boolean,\n suffix: String,\n type: {\n type: String,\n default: 'text',\n },\n\n ...makeVInputProps(),\n ...makeVFieldProps(),\n}, 'v-text-field')\n\nexport const VTextField = genericComponent<Omit<VInputSlots & VFieldSlots, 'default'> & MakeSlots<{\n default: []\n}>>()({\n name: 'VTextField',\n\n directives: { Intersect },\n\n inheritAttrs: false,\n\n props: makeVTextFieldProps(),\n\n emits: {\n 'click:control': (e: MouseEvent) => true,\n 'mousedown:control': (e: MouseEvent) => true,\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const { isFocused, focus, blur } = useFocus(props)\n const counterValue = computed(() => {\n return typeof props.counterValue === 'function'\n ? props.counterValue(model.value)\n : (model.value ?? '').toString().length\n })\n const max = computed(() => {\n if (attrs.maxlength) return attrs.maxlength as unknown as undefined\n\n if (\n !props.counter ||\n (typeof props.counter !== 'number' &&\n typeof props.counter !== 'string')\n ) return undefined\n\n return props.counter\n })\n\n function onIntersect (\n isIntersecting: boolean,\n entries: IntersectionObserverEntry[]\n ) {\n if (!props.autofocus || !isIntersecting) return\n\n (entries[0].target as HTMLInputElement)?.focus?.()\n }\n\n const vInputRef = ref<VInput>()\n const vFieldRef = ref<VField>()\n const inputRef = ref<HTMLInputElement>()\n const isActive = computed(() => (\n activeTypes.includes(props.type) ||\n props.persistentPlaceholder ||\n isFocused.value\n ))\n const messages = computed(() => {\n return props.messages.length\n ? props.messages\n : (isFocused.value || props.persistentHint) ? props.hint : ''\n })\n function onFocus () {\n if (inputRef.value !== document.activeElement) {\n inputRef.value?.focus()\n }\n\n if (!isFocused.value) focus()\n }\n function onControlMousedown (e: MouseEvent) {\n emit('mousedown:control', e)\n\n if (e.target === inputRef.value) return\n\n onFocus()\n e.preventDefault()\n }\n function onControlClick (e: MouseEvent) {\n onFocus()\n\n emit('click:control', e)\n }\n function onClear (e: MouseEvent) {\n e.stopPropagation()\n\n onFocus()\n\n nextTick(() => {\n model.value = null\n\n callEvent(props['onClick:clear'], e)\n })\n }\n function onInput (e: Event) {\n model.value = (e.target as HTMLInputElement).value\n }\n\n useRender(() => {\n const hasCounter = !!(slots.counter || props.counter || props.counterValue)\n const hasDetails = !!(hasCounter || slots.details)\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs)\n const [{ modelValue: _, ...inputProps }] = filterInputProps(props)\n const [fieldProps] = filterFieldProps(props)\n\n return (\n <VInput\n ref={ vInputRef }\n v-model={ model.value }\n class={[\n 'v-text-field',\n {\n 'v-text-field--prefixed': props.prefix,\n 'v-text-field--suffixed': props.suffix,\n 'v-text-field--flush-details': ['plain', 'underlined'].includes(props.variant),\n },\n ]}\n onClick:prepend={ props['onClick:prepend'] }\n onClick:append={ props['onClick:append'] }\n { ...rootAttrs }\n { ...inputProps }\n focused={ isFocused.value }\n messages={ messages.value }\n >\n {{\n ...slots,\n default: ({\n id,\n isDisabled,\n isDirty,\n isReadonly,\n isValid,\n }) => (\n <VField\n ref={ vFieldRef }\n onMousedown={ onControlMousedown }\n onClick={ onControlClick }\n onClick:clear={ onClear }\n onClick:prependInner={ props['onClick:prependInner'] }\n onClick:appendInner={ props['onClick:appendInner'] }\n role=\"textbox\"\n { ...fieldProps }\n id={ id.value }\n active={ isActive.value || isDirty.value }\n dirty={ isDirty.value || props.dirty }\n focused={ isFocused.value }\n error={ isValid.value === false }\n >\n {{\n ...slots,\n default: ({\n props: { class: fieldClass, ...slotProps },\n }) => {\n const inputNode = (\n <input\n ref={ inputRef }\n value={ model.value }\n onInput={ onInput }\n v-intersect={[{\n handler: onIntersect,\n }, null, ['once']]}\n autofocus={ props.autofocus }\n readonly={ isReadonly.value }\n disabled={ isDisabled.value }\n name={ props.name }\n placeholder={ props.placeholder }\n size={ 1 }\n type={ props.type }\n onFocus={ onFocus }\n onBlur={ blur }\n { ...slotProps }\n { ...inputAttrs }\n />\n )\n\n return (\n <>\n { props.prefix && (\n <span class=\"v-text-field__prefix\">\n { props.prefix }\n </span>\n ) }\n\n { slots.default ? (\n <div\n class={ fieldClass }\n data-no-activator=\"\"\n >\n { slots.default() }\n { inputNode }\n </div>\n ) : cloneVNode(inputNode, { class: fieldClass }) }\n\n { props.suffix && (\n <span class=\"v-text-field__suffix\">\n { props.suffix }\n </span>\n ) }\n </>\n )\n },\n }}\n </VField>\n ),\n details: hasDetails ? slotProps => (\n <>\n { slots.details?.(slotProps) }\n\n { hasCounter && (\n <>\n <span />\n\n <VCounter\n active={ props.persistentCounter || isFocused.value }\n value={ counterValue.value }\n max={ max.value }\n v-slots:default={ slots.counter }\n />\n </>\n ) }\n </>\n ) : undefined,\n }}\n </VInput>\n )\n })\n\n return forwardRefs({}, vInputRef, vFieldRef, inputRef)\n },\n})\n\nexport type VTextField = InstanceType<typeof VTextField>\n\nexport function filterVTextFieldProps (props: Partial<ExtractPropTypes<ReturnType<typeof makeVTextFieldProps>>>) {\n return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A;cAAE,IAElB/C,KAAK,CAACb,OAAO,EAAE,EACf8D,SAAS,KAEX3F,UAAU,CAAC2F,SAAS,EAAE;gBAAEH,KAAK,EAAEC;cAAW,CAAC,CAAC,EAE9CvD,KAAK,CAACP,MAAM;gBAAA,SACA;cAAsB,IAC9BO,KAAK,CAACP,MAAM,EAEjB;YAGP;UAAC;QAAA,CAGN;QACD+C,OAAO,EAAED,UAAU,GAAGiB,SAAS,mCAEzBhD,KAAK,CAACgC,OAAO,GAAGgB,SAAS,CAAC,EAE1BlB,UAAU;UAAA,UAKGtC,KAAK,CAACR,iBAAiB,IAAIkB,SAAS,CAACG,KAAK;UAAA,SAC3C3B,YAAY,CAAC2B,KAAK;UAAA,OACpBG,GAAG,CAACH;QAAK,GACGL,KAAK,CAACzB,OAAO,GAGpC,EAEJ,GAAGmC;MAAS;IAIrB,CAAC,CAAC;IAEF,OAAOvD,WAAW,CAAC,CAAC,CAAC,EAAE4D,SAAS,EAAEC,SAAS,EAAEC,QAAQ,CAAC;EACxD;AACF,CAAC,CAAC;AAIF,OAAO,SAASkC,qBAAqB,CAAE3D,KAAwE,EAAE;EAC/G,OAAO3B,IAAI,CAAC2B,KAAK,EAAE4D,MAAM,CAACC,IAAI,CAACjE,UAAU,CAACI,KAAK,CAAC,CAAQ;AAC1D"}
|
|
1
|
+
{"version":3,"file":"VTextField.mjs","names":["filterFieldProps","makeVFieldProps","VField","filterInputProps","makeVInputProps","VInput","VCounter","Intersect","forwardRefs","useFocus","useProxiedModel","cloneVNode","computed","nextTick","ref","callEvent","filterInputAttrs","genericComponent","pick","propsFactory","useRender","activeTypes","EventProp","Function","Array","makeVTextFieldProps","autofocus","Boolean","counter","Number","String","counterValue","hint","persistentHint","prefix","placeholder","persistentPlaceholder","persistentCounter","suffix","type","default","VTextField","name","directives","inheritAttrs","props","emits","e","focused","val","setup","attrs","emit","slots","model","isFocused","focus","blur","value","toString","length","max","maxlength","undefined","onIntersect","isIntersecting","entries","target","vInputRef","vFieldRef","inputRef","isActive","includes","messages","onFocus","document","activeElement","onControlMousedown","preventDefault","onControlClick","onClear","stopPropagation","onInput","hasCounter","hasDetails","details","rootAttrs","inputAttrs","modelValue","_","inputProps","fieldProps","variant","id","isDisabled","isDirty","isReadonly","isValid","dirty","class","fieldClass","slotProps","inputNode","handler","filterVTextFieldProps","Object","keys"],"sources":["../../../src/components/VTextField/VTextField.tsx"],"sourcesContent":["// Styles\nimport './VTextField.sass'\n\n// Components\nimport { filterFieldProps, makeVFieldProps, VField } from '@/components/VField/VField'\nimport { filterInputProps, makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { VCounter } from '@/components/VCounter'\n\n// Directives\nimport Intersect from '@/directives/intersect'\n\n// Composables\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useFocus } from '@/composables/focus'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { cloneVNode, computed, nextTick, ref } from 'vue'\nimport { callEvent, filterInputAttrs, genericComponent, pick, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { ExtractPropTypes, PropType } from 'vue'\nimport type { MakeSlots } from '@/util'\nimport type { VFieldSlots } from '@/components/VField/VField'\nimport type { VInputSlots } from '@/components/VInput/VInput'\n\nconst activeTypes = ['color', 'file', 'time', 'date', 'datetime-local', 'week', 'month']\n\ntype EventProp<T = (...args: any[]) => any> = T | T[]\nconst EventProp = [Function, Array] as PropType<EventProp>\n\nexport const makeVTextFieldProps = propsFactory({\n autofocus: Boolean,\n counter: [Boolean, Number, String] as PropType<true | number | string>,\n counterValue: Function as PropType<(value: any) => number>,\n hint: String,\n persistentHint: Boolean,\n prefix: String,\n placeholder: String,\n persistentPlaceholder: Boolean,\n persistentCounter: Boolean,\n suffix: String,\n type: {\n type: String,\n default: 'text',\n },\n\n ...makeVInputProps(),\n ...makeVFieldProps(),\n}, 'v-text-field')\n\nexport const VTextField = genericComponent<Omit<VInputSlots & VFieldSlots, 'default'> & MakeSlots<{\n default: []\n}>>()({\n name: 'VTextField',\n\n directives: { Intersect },\n\n inheritAttrs: false,\n\n props: makeVTextFieldProps(),\n\n emits: {\n 'click:control': (e: MouseEvent) => true,\n 'mousedown:control': (e: MouseEvent) => true,\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const { isFocused, focus, blur } = useFocus(props)\n const counterValue = computed(() => {\n return typeof props.counterValue === 'function'\n ? props.counterValue(model.value)\n : (model.value ?? '').toString().length\n })\n const max = computed(() => {\n if (attrs.maxlength) return attrs.maxlength as unknown as undefined\n\n if (\n !props.counter ||\n (typeof props.counter !== 'number' &&\n typeof props.counter !== 'string')\n ) return undefined\n\n return props.counter\n })\n\n function onIntersect (\n isIntersecting: boolean,\n entries: IntersectionObserverEntry[]\n ) {\n if (!props.autofocus || !isIntersecting) return\n\n (entries[0].target as HTMLInputElement)?.focus?.()\n }\n\n const vInputRef = ref<VInput>()\n const vFieldRef = ref<VField>()\n const inputRef = ref<HTMLInputElement>()\n const isActive = computed(() => (\n activeTypes.includes(props.type) ||\n props.persistentPlaceholder ||\n isFocused.value\n ))\n const messages = computed(() => {\n return props.messages.length\n ? props.messages\n : (isFocused.value || props.persistentHint) ? props.hint : ''\n })\n function onFocus () {\n if (inputRef.value !== document.activeElement) {\n inputRef.value?.focus()\n }\n\n if (!isFocused.value) focus()\n }\n function onControlMousedown (e: MouseEvent) {\n emit('mousedown:control', e)\n\n if (e.target === inputRef.value) return\n\n onFocus()\n e.preventDefault()\n }\n function onControlClick (e: MouseEvent) {\n onFocus()\n\n emit('click:control', e)\n }\n function onClear (e: MouseEvent) {\n e.stopPropagation()\n\n onFocus()\n\n nextTick(() => {\n model.value = null\n\n callEvent(props['onClick:clear'], e)\n })\n }\n function onInput (e: Event) {\n model.value = (e.target as HTMLInputElement).value\n }\n\n useRender(() => {\n const hasCounter = !!(slots.counter || props.counter || props.counterValue)\n const hasDetails = !!(hasCounter || slots.details)\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs)\n const [{ modelValue: _, ...inputProps }] = filterInputProps(props)\n const [fieldProps] = filterFieldProps(props)\n\n return (\n <VInput\n ref={ vInputRef }\n v-model={ model.value }\n class={[\n 'v-text-field',\n {\n 'v-text-field--prefixed': props.prefix,\n 'v-text-field--suffixed': props.suffix,\n 'v-text-field--flush-details': ['plain', 'underlined'].includes(props.variant),\n },\n ]}\n onClick:prepend={ props['onClick:prepend'] }\n onClick:append={ props['onClick:append'] }\n { ...rootAttrs }\n { ...inputProps }\n focused={ isFocused.value }\n messages={ messages.value }\n >\n {{\n ...slots,\n default: ({\n id,\n isDisabled,\n isDirty,\n isReadonly,\n isValid,\n }) => (\n <VField\n ref={ vFieldRef }\n onMousedown={ onControlMousedown }\n onClick={ onControlClick }\n onClick:clear={ onClear }\n onClick:prependInner={ props['onClick:prependInner'] }\n onClick:appendInner={ props['onClick:appendInner'] }\n role=\"textbox\"\n { ...fieldProps }\n id={ id.value }\n active={ isActive.value || isDirty.value }\n dirty={ isDirty.value || props.dirty }\n disabled={ isDisabled.value }\n focused={ isFocused.value }\n error={ isValid.value === false }\n >\n {{\n ...slots,\n default: ({\n props: { class: fieldClass, ...slotProps },\n }) => {\n const inputNode = (\n <input\n ref={ inputRef }\n value={ model.value }\n onInput={ onInput }\n v-intersect={[{\n handler: onIntersect,\n }, null, ['once']]}\n autofocus={ props.autofocus }\n readonly={ isReadonly.value }\n disabled={ isDisabled.value }\n name={ props.name }\n placeholder={ props.placeholder }\n size={ 1 }\n type={ props.type }\n onFocus={ onFocus }\n onBlur={ blur }\n { ...slotProps }\n { ...inputAttrs }\n />\n )\n\n return (\n <>\n { props.prefix && (\n <span class=\"v-text-field__prefix\">\n { props.prefix }\n </span>\n )}\n\n { slots.default ? (\n <div\n class={ fieldClass }\n data-no-activator=\"\"\n >\n { slots.default() }\n { inputNode }\n </div>\n ) : cloneVNode(inputNode, { class: fieldClass })}\n\n { props.suffix && (\n <span class=\"v-text-field__suffix\">\n { props.suffix }\n </span>\n )}\n </>\n )\n },\n }}\n </VField>\n ),\n details: hasDetails ? slotProps => (\n <>\n { slots.details?.(slotProps) }\n\n { hasCounter && (\n <>\n <span />\n\n <VCounter\n active={ props.persistentCounter || isFocused.value }\n value={ counterValue.value }\n max={ max.value }\n v-slots:default={ slots.counter }\n />\n </>\n )}\n </>\n ) : undefined,\n }}\n </VInput>\n )\n })\n\n return forwardRefs({}, vInputRef, vFieldRef, inputRef)\n },\n})\n\nexport type VTextField = InstanceType<typeof VTextField>\n\nexport function filterVTextFieldProps (props: Partial<ExtractPropTypes<ReturnType<typeof makeVTextFieldProps>>>) {\n return pick(props, Object.keys(VTextField.props) as any)\n}\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,gBAAgB,EAAEC,eAAe,EAAEC,MAAM;AAAA,SACzCC,gBAAgB,EAAEC,eAAe,EAAEC,MAAM;AAAA,SACzCC,QAAQ,iCAEjB;AAAA,OACOC,SAAS,8CAEhB;AAAA,SACSC,WAAW;AAAA,SACXC,QAAQ;AAAA,SACRC,eAAe,8CAExB;AACA,SAASC,UAAU,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,GAAG,QAAQ,KAAK;AAAA,SAChDC,SAAS,EAAEC,gBAAgB,EAAEC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAErF;AAMA,MAAMC,WAAW,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAC;AAGxF,MAAMC,SAAS,GAAG,CAACC,QAAQ,EAAEC,KAAK,CAAwB;AAE1D,OAAO,MAAMC,mBAAmB,GAAGN,YAAY,CAAC;EAC9CO,SAAS,EAAEC,OAAO;EAClBC,OAAO,EAAE,CAACD,OAAO,EAAEE,MAAM,EAAEC,MAAM,CAAqC;EACtEC,YAAY,EAAER,QAA4C;EAC1DS,IAAI,EAAEF,MAAM;EACZG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CAAC,CAAQ;AAC1D"}
|
|
@@ -105,6 +105,17 @@ declare const VTextField: vue.DefineComponent<{
|
|
|
105
105
|
'append-inner'?: ((args_0: DefaultInputSlot & VInputSlot) => vue.VNodeChild) | undefined;
|
|
106
106
|
default?: (() => vue.VNodeChild) | undefined;
|
|
107
107
|
};
|
|
108
|
+
$slots?: {
|
|
109
|
+
clear?: (() => vue.VNodeChild) | undefined;
|
|
110
|
+
details?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
111
|
+
label?: ((args_0: DefaultInputSlot & VInputSlot) => vue.VNodeChild) | undefined;
|
|
112
|
+
append?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
113
|
+
prepend?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
114
|
+
loader?: ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
|
|
115
|
+
'prepend-inner'?: ((args_0: DefaultInputSlot & VInputSlot) => vue.VNodeChild) | undefined;
|
|
116
|
+
'append-inner'?: ((args_0: DefaultInputSlot & VInputSlot) => vue.VNodeChild) | undefined;
|
|
117
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
118
|
+
} | undefined;
|
|
108
119
|
'v-slots'?: {
|
|
109
120
|
clear?: false | (() => vue.VNodeChild) | undefined;
|
|
110
121
|
details?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
@@ -170,6 +181,12 @@ declare const VTextField: vue.DefineComponent<{
|
|
|
170
181
|
append?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
171
182
|
details?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
172
183
|
};
|
|
184
|
+
$slots?: {
|
|
185
|
+
default?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
186
|
+
prepend?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
187
|
+
append?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
188
|
+
details?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
189
|
+
} | undefined;
|
|
173
190
|
'v-slots'?: {
|
|
174
191
|
default?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
175
192
|
prepend?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
@@ -227,6 +244,12 @@ declare const VTextField: vue.DefineComponent<{
|
|
|
227
244
|
append?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
228
245
|
details?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
229
246
|
};
|
|
247
|
+
$slots?: {
|
|
248
|
+
default?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
249
|
+
prepend?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
250
|
+
append?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
251
|
+
details?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
252
|
+
} | undefined;
|
|
230
253
|
'v-slots'?: {
|
|
231
254
|
default?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
232
255
|
prepend?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
@@ -307,6 +330,12 @@ declare const VTextField: vue.DefineComponent<{
|
|
|
307
330
|
append?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
308
331
|
details?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
309
332
|
};
|
|
333
|
+
$slots?: {
|
|
334
|
+
default?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
335
|
+
prepend?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
336
|
+
append?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
337
|
+
details?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
338
|
+
} | undefined;
|
|
310
339
|
'v-slots'?: {
|
|
311
340
|
default?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
312
341
|
prepend?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
@@ -324,7 +353,7 @@ declare const VTextField: vue.DefineComponent<{
|
|
|
324
353
|
reset: () => void;
|
|
325
354
|
resetValidation: () => void;
|
|
326
355
|
validate: () => Promise<string[]>;
|
|
327
|
-
}> & {} & vue.ComponentCustomProperties & {}, "id" | "name" | "label" | "$children" | "v-slot:default" | "v-slots" | keyof vue.VNodeProps | keyof vue.AllowedComponentProps | "v-slot:append" | "v-slot:prepend" | "modelValue" | "onUpdate:modelValue" | "prependIcon" | "appendIcon" | "onClick:append" | "onClick:prepend" | "validateOn" | "validationValue" | "hideDetails" | ("error" | "direction" | "disabled" | "readonly" | "messages" | "density" | "focused" | "errorMessages" | "maxErrors" | "rules") | "v-slot:details">, `$${any}`> & Omit<Omit<{
|
|
356
|
+
}> & {} & vue.ComponentCustomProperties & {}, "id" | "name" | "label" | "$children" | "v-slot:default" | "$slots" | "v-slots" | keyof vue.VNodeProps | keyof vue.AllowedComponentProps | "v-slot:append" | "v-slot:prepend" | "modelValue" | "onUpdate:modelValue" | "prependIcon" | "appendIcon" | "onClick:append" | "onClick:prepend" | "validateOn" | "validationValue" | "hideDetails" | ("error" | "direction" | "disabled" | "readonly" | "messages" | "density" | "focused" | "errorMessages" | "maxErrors" | "rules") | "v-slot:details">, `$${any}`> & Omit<Omit<{
|
|
328
357
|
$: vue.ComponentInternalInstance;
|
|
329
358
|
$data: {};
|
|
330
359
|
$props: Partial<{
|
|
@@ -369,7 +398,7 @@ declare const VTextField: vue.DefineComponent<{
|
|
|
369
398
|
'onClick:prependInner': PropType<EventProp<(...args: any[]) => any>>;
|
|
370
399
|
focused: BooleanConstructor;
|
|
371
400
|
id: StringConstructor;
|
|
372
|
-
}, "$children" | "v-slot:default" | "v-slots" | "modelValue" | "onUpdate:modelValue" | "v-slot:loader" | "v-slot:clear" | "v-slot:label" | "v-slot:prepend-inner" | "v-slot:append-inner">>> & {
|
|
401
|
+
}, "$children" | "v-slot:default" | "$slots" | "v-slots" | "modelValue" | "onUpdate:modelValue" | "v-slot:loader" | "v-slot:clear" | "v-slot:label" | "v-slot:prepend-inner" | "v-slot:append-inner">>> & {
|
|
373
402
|
"onUpdate:focused"?: ((focused: boolean) => any) | undefined;
|
|
374
403
|
} & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, "reverse" | "error" | "active" | "disabled" | "variant" | "clearIcon" | "focused" | "clearable" | "dirty" | "persistentClear" | "singleLine">;
|
|
375
404
|
$attrs: {
|
|
@@ -415,14 +444,14 @@ declare const VTextField: vue.DefineComponent<{
|
|
|
415
444
|
'onClick:prependInner': PropType<EventProp<(...args: any[]) => any>>;
|
|
416
445
|
focused: BooleanConstructor;
|
|
417
446
|
id: StringConstructor;
|
|
418
|
-
}, "$children" | "v-slot:default" | "v-slots" | "modelValue" | "onUpdate:modelValue" | "v-slot:loader" | "v-slot:clear" | "v-slot:label" | "v-slot:prepend-inner" | "v-slot:append-inner">>> & {
|
|
447
|
+
}, "$children" | "v-slot:default" | "$slots" | "v-slots" | "modelValue" | "onUpdate:modelValue" | "v-slot:loader" | "v-slot:clear" | "v-slot:label" | "v-slot:prepend-inner" | "v-slot:append-inner">>> & {
|
|
419
448
|
"onUpdate:focused"?: ((focused: boolean) => any) | undefined;
|
|
420
449
|
}, {
|
|
421
450
|
controlRef: vue.Ref<HTMLElement | undefined>;
|
|
422
451
|
}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Omit<{
|
|
423
452
|
'update:focused': (focused: boolean) => true;
|
|
424
453
|
'update:modelValue': (val: any) => true;
|
|
425
|
-
}, "$children" | "v-slot:default" | "v-slots" | "modelValue" | "update:modelValue" | "v-slot:loader" | "v-slot:clear" | "v-slot:label" | "v-slot:prepend-inner" | "v-slot:append-inner">, string, {
|
|
454
|
+
}, "$children" | "v-slot:default" | "$slots" | "v-slots" | "modelValue" | "update:modelValue" | "v-slot:loader" | "v-slot:clear" | "v-slot:label" | "v-slot:prepend-inner" | "v-slot:append-inner">, string, {
|
|
426
455
|
reverse: boolean;
|
|
427
456
|
error: boolean;
|
|
428
457
|
active: boolean;
|
|
@@ -484,7 +513,7 @@ declare const VTextField: vue.DefineComponent<{
|
|
|
484
513
|
'onClick:prependInner': PropType<EventProp<(...args: any[]) => any>>;
|
|
485
514
|
focused: BooleanConstructor;
|
|
486
515
|
id: StringConstructor;
|
|
487
|
-
}, "$children" | "v-slot:default" | "v-slots" | "modelValue" | "onUpdate:modelValue" | "v-slot:loader" | "v-slot:clear" | "v-slot:label" | "v-slot:prepend-inner" | "v-slot:append-inner">>> & {
|
|
516
|
+
}, "$children" | "v-slot:default" | "$slots" | "v-slots" | "modelValue" | "onUpdate:modelValue" | "v-slot:loader" | "v-slot:clear" | "v-slot:label" | "v-slot:prepend-inner" | "v-slot:append-inner">>> & {
|
|
488
517
|
"onUpdate:focused"?: ((focused: boolean) => any) | undefined;
|
|
489
518
|
} & vue.ShallowUnwrapRef<{
|
|
490
519
|
controlRef: vue.Ref<HTMLElement | undefined>;
|
|
@@ -501,6 +530,14 @@ declare const VTextField: vue.DefineComponent<{
|
|
|
501
530
|
loader?: ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
|
|
502
531
|
default?: ((args_0: VFieldSlot) => vue.VNodeChild) | undefined;
|
|
503
532
|
};
|
|
533
|
+
$slots?: {
|
|
534
|
+
clear?: (() => vue.VNodeChild) | undefined;
|
|
535
|
+
'prepend-inner'?: ((args_0: DefaultInputSlot & VInputSlot) => vue.VNodeChild) | undefined;
|
|
536
|
+
'append-inner'?: ((args_0: DefaultInputSlot & VInputSlot) => vue.VNodeChild) | undefined;
|
|
537
|
+
label?: ((args_0: DefaultInputSlot & VInputSlot) => vue.VNodeChild) | undefined;
|
|
538
|
+
loader?: ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
|
|
539
|
+
default?: ((args_0: VFieldSlot) => vue.VNodeChild) | undefined;
|
|
540
|
+
} | undefined;
|
|
504
541
|
'v-slots'?: {
|
|
505
542
|
clear?: false | (() => vue.VNodeChild) | undefined;
|
|
506
543
|
'prepend-inner'?: false | ((args_0: DefaultInputSlot & VInputSlot) => vue.VNodeChild) | undefined;
|
|
@@ -517,7 +554,7 @@ declare const VTextField: vue.DefineComponent<{
|
|
|
517
554
|
"v-slot:loader"?: false | ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
|
|
518
555
|
"v-slot:default"?: false | ((args_0: VFieldSlot) => vue.VNodeChild) | undefined;
|
|
519
556
|
};
|
|
520
|
-
}, "id" | "color" | "loading" | "label" | "$children" | "theme" | "v-slot:default" | "v-slots" | keyof vue.VNodeProps | keyof vue.AllowedComponentProps | "modelValue" | "onUpdate:modelValue" | "bgColor" | "v-slot:loader" | "appendInnerIcon" | "prependInnerIcon" | "onClick:clear" | "onClick:appendInner" | "onClick:prependInner" | "onUpdate:focused" | "v-slot:clear" | "v-slot:label" | "v-slot:prepend-inner" | "v-slot:append-inner" | ("reverse" | "error" | "active" | "disabled" | "variant" | "clearIcon" | "focused" | "clearable" | "dirty" | "persistentClear" | "singleLine")>, `$${any}`>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
557
|
+
}, "id" | "color" | "loading" | "label" | "$children" | "theme" | "v-slot:default" | "$slots" | "v-slots" | keyof vue.VNodeProps | keyof vue.AllowedComponentProps | "modelValue" | "onUpdate:modelValue" | "bgColor" | "v-slot:loader" | "appendInnerIcon" | "prependInnerIcon" | "onClick:clear" | "onClick:appendInner" | "onClick:prependInner" | "onUpdate:focused" | "v-slot:clear" | "v-slot:label" | "v-slot:prepend-inner" | "v-slot:append-inner" | ("reverse" | "error" | "active" | "disabled" | "variant" | "clearIcon" | "focused" | "clearable" | "dirty" | "persistentClear" | "singleLine")>, `$${any}`>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
521
558
|
'click:control': (e: MouseEvent) => true;
|
|
522
559
|
'mousedown:control': (e: MouseEvent) => true;
|
|
523
560
|
'update:focused': (focused: boolean) => true;
|
|
@@ -585,6 +622,17 @@ declare const VTextField: vue.DefineComponent<{
|
|
|
585
622
|
'append-inner'?: ((args_0: DefaultInputSlot & VInputSlot) => vue.VNodeChild) | undefined;
|
|
586
623
|
default?: (() => vue.VNodeChild) | undefined;
|
|
587
624
|
};
|
|
625
|
+
$slots?: {
|
|
626
|
+
clear?: (() => vue.VNodeChild) | undefined;
|
|
627
|
+
details?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
628
|
+
label?: ((args_0: DefaultInputSlot & VInputSlot) => vue.VNodeChild) | undefined;
|
|
629
|
+
append?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
630
|
+
prepend?: ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
631
|
+
loader?: ((args_0: LoaderSlotProps) => vue.VNodeChild) | undefined;
|
|
632
|
+
'prepend-inner'?: ((args_0: DefaultInputSlot & VInputSlot) => vue.VNodeChild) | undefined;
|
|
633
|
+
'append-inner'?: ((args_0: DefaultInputSlot & VInputSlot) => vue.VNodeChild) | undefined;
|
|
634
|
+
default?: (() => vue.VNodeChild) | undefined;
|
|
635
|
+
} | undefined;
|
|
588
636
|
'v-slots'?: {
|
|
589
637
|
clear?: false | (() => vue.VNodeChild) | undefined;
|
|
590
638
|
details?: false | ((args_0: VInputSlot) => vue.VNodeChild) | undefined;
|
|
@@ -189,6 +189,7 @@ export const VTextarea = genericComponent()({
|
|
|
189
189
|
}, fieldProps, {
|
|
190
190
|
"active": isActive.value || isDirty.value,
|
|
191
191
|
"dirty": isDirty.value || props.dirty,
|
|
192
|
+
"disabled": isDisabled.value,
|
|
192
193
|
"focused": isFocused.value,
|
|
193
194
|
"error": isValid.value === false
|
|
194
195
|
}), {
|