vuetify 3.5.9 → 3.5.11

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.
Files changed (147) hide show
  1. package/dist/_component-variables-labs.sass +1 -0
  2. package/dist/json/attributes.json +106 -6
  3. package/dist/json/importMap-labs.json +10 -6
  4. package/dist/json/importMap.json +128 -128
  5. package/dist/json/tags.json +30 -0
  6. package/dist/json/web-types.json +582 -15
  7. package/dist/vuetify-labs.css +3076 -3034
  8. package/dist/vuetify-labs.d.ts +2711 -1996
  9. package/dist/vuetify-labs.esm.js +518 -40
  10. package/dist/vuetify-labs.esm.js.map +1 -1
  11. package/dist/vuetify-labs.js +518 -39
  12. package/dist/vuetify-labs.min.css +2 -2
  13. package/dist/vuetify.css +1609 -1604
  14. package/dist/vuetify.d.ts +1885 -1832
  15. package/dist/vuetify.esm.js +605 -330
  16. package/dist/vuetify.esm.js.map +1 -1
  17. package/dist/vuetify.js +604 -328
  18. package/dist/vuetify.js.map +1 -1
  19. package/dist/vuetify.min.css +2 -2
  20. package/dist/vuetify.min.js +1106 -1098
  21. package/dist/vuetify.min.js.map +1 -1
  22. package/lib/components/VAlert/index.d.mts +15 -15
  23. package/lib/components/VApp/index.d.mts +8 -8
  24. package/lib/components/VAppBar/index.d.mts +7 -7
  25. package/lib/components/VAutocomplete/VAutocomplete.mjs +4 -4
  26. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  27. package/lib/components/VAutocomplete/index.d.mts +94 -94
  28. package/lib/components/VAvatar/index.d.mts +8 -8
  29. package/lib/components/VBadge/index.d.mts +7 -7
  30. package/lib/components/VBanner/index.d.mts +20 -20
  31. package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
  32. package/lib/components/VBreadcrumbs/index.d.mts +27 -26
  33. package/lib/components/VBtnGroup/index.d.mts +8 -8
  34. package/lib/components/VCard/index.d.mts +32 -32
  35. package/lib/components/VCarousel/index.d.mts +6 -6
  36. package/lib/components/VCheckbox/index.d.mts +44 -44
  37. package/lib/components/VChip/index.d.mts +7 -7
  38. package/lib/components/VCode/index.d.mts +8 -8
  39. package/lib/components/VCombobox/VCombobox.mjs +5 -4
  40. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  41. package/lib/components/VCombobox/index.d.mts +94 -94
  42. package/lib/components/VDataTable/index.d.mts +6 -6
  43. package/lib/components/VDatePicker/VDatePickerMonth.mjs +10 -4
  44. package/lib/components/VDatePicker/VDatePickerMonth.mjs.map +1 -1
  45. package/lib/components/VDatePicker/index.d.mts +10 -10
  46. package/lib/components/VDefaultsProvider/index.d.mts +8 -8
  47. package/lib/components/VDialog/index.d.mts +12 -6
  48. package/lib/components/VDivider/index.d.mts +8 -8
  49. package/lib/components/VExpansionPanel/index.d.mts +19 -19
  50. package/lib/components/VField/VField.css +2 -0
  51. package/lib/components/VField/VField.mjs +1 -1
  52. package/lib/components/VField/VField.mjs.map +1 -1
  53. package/lib/components/VField/VField.sass +2 -0
  54. package/lib/components/VField/index.d.mts +28 -28
  55. package/lib/components/VFileInput/index.d.mts +133 -133
  56. package/lib/components/VFooter/index.d.mts +8 -8
  57. package/lib/components/VGrid/index.d.mts +32 -32
  58. package/lib/components/VIcon/VIcon.css +4 -0
  59. package/lib/components/VIcon/VIcon.mjs +7 -3
  60. package/lib/components/VIcon/VIcon.mjs.map +1 -1
  61. package/lib/components/VIcon/VIcon.sass +4 -0
  62. package/lib/components/VIcon/_variables.scss +1 -0
  63. package/lib/components/VIcon/index.d.mts +25 -16
  64. package/lib/components/VImg/index.d.mts +4 -4
  65. package/lib/components/VInput/index.d.mts +21 -21
  66. package/lib/components/VKbd/index.d.mts +8 -8
  67. package/lib/components/VLabel/index.d.mts +8 -8
  68. package/lib/components/VLayout/index.d.mts +16 -16
  69. package/lib/components/VLazy/index.d.mts +8 -8
  70. package/lib/components/VList/VListItem.mjs +2 -2
  71. package/lib/components/VList/VListItem.mjs.map +1 -1
  72. package/lib/components/VList/index.d.mts +48 -48
  73. package/lib/components/VLocaleProvider/index.d.mts +12 -12
  74. package/lib/components/VMain/index.d.mts +8 -8
  75. package/lib/components/VMenu/VMenu.mjs +3 -0
  76. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  77. package/lib/components/VMenu/index.d.mts +14 -8
  78. package/lib/components/VNavigationDrawer/VNavigationDrawer.css +1 -1
  79. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +22 -8
  80. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
  81. package/lib/components/VNavigationDrawer/VNavigationDrawer.sass +2 -1
  82. package/lib/components/VNavigationDrawer/index.d.mts +11 -11
  83. package/lib/components/VOtpInput/VOtpInput.mjs +7 -2
  84. package/lib/components/VOtpInput/VOtpInput.mjs.map +1 -1
  85. package/lib/components/VOtpInput/index.d.mts +31 -31
  86. package/lib/components/VOverlay/VOverlay.mjs +8 -3
  87. package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
  88. package/lib/components/VOverlay/index.d.mts +3 -0
  89. package/lib/components/VOverlay/scrollStrategies.mjs +2 -2
  90. package/lib/components/VOverlay/scrollStrategies.mjs.map +1 -1
  91. package/lib/components/VPagination/index.d.mts +7 -7
  92. package/lib/components/VProgressLinear/VProgressLinear.css +0 -1
  93. package/lib/components/VProgressLinear/VProgressLinear.sass +0 -1
  94. package/lib/components/VProgressLinear/index.d.mts +7 -7
  95. package/lib/components/VRadioGroup/index.d.mts +44 -44
  96. package/lib/components/VRangeSlider/index.d.mts +47 -47
  97. package/lib/components/VRating/index.d.mts +7 -7
  98. package/lib/components/VResponsive/index.d.mts +8 -8
  99. package/lib/components/VSelect/index.d.mts +94 -94
  100. package/lib/components/VSheet/index.d.mts +8 -8
  101. package/lib/components/VSkeletonLoader/index.d.mts +8 -8
  102. package/lib/components/VSlider/index.d.mts +47 -47
  103. package/lib/components/VSnackbar/index.d.mts +25 -19
  104. package/lib/components/VStepper/index.d.mts +41 -41
  105. package/lib/components/VSwitch/index.d.mts +39 -39
  106. package/lib/components/VSystemBar/index.d.mts +8 -8
  107. package/lib/components/VTabs/index.d.mts +15 -15
  108. package/lib/components/VTextField/index.d.mts +173 -173
  109. package/lib/components/VTextarea/index.d.mts +119 -119
  110. package/lib/components/VThemeProvider/index.d.mts +8 -8
  111. package/lib/components/VTimeline/index.d.mts +8 -8
  112. package/lib/components/VToolbar/index.d.mts +8 -8
  113. package/lib/components/VTooltip/index.d.mts +14 -8
  114. package/lib/components/VWindow/index.d.mts +10 -10
  115. package/lib/components/index.d.mts +1869 -1832
  116. package/lib/components/transitions/index.d.mts +128 -128
  117. package/lib/composables/date/adapters/vuetify.mjs +1 -1
  118. package/lib/composables/date/adapters/vuetify.mjs.map +1 -1
  119. package/lib/composables/theme.mjs +1 -1
  120. package/lib/composables/theme.mjs.map +1 -1
  121. package/lib/entry-bundler.mjs +3 -2
  122. package/lib/entry-bundler.mjs.map +1 -1
  123. package/lib/framework.mjs +1 -1
  124. package/lib/framework.mjs.map +1 -1
  125. package/lib/index.d.mts +40 -39
  126. package/lib/labs/VCalendar/index.d.mts +32 -32
  127. package/lib/labs/VFab/index.d.mts +15 -15
  128. package/lib/labs/VNumberInput/VNumberInput.css +38 -0
  129. package/lib/labs/VNumberInput/VNumberInput.mjs +209 -0
  130. package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -0
  131. package/lib/labs/VNumberInput/VNumberInput.sass +47 -0
  132. package/lib/labs/VNumberInput/_variables.scss +1 -0
  133. package/lib/labs/VNumberInput/index.d.mts +607 -0
  134. package/lib/labs/VNumberInput/index.mjs +2 -0
  135. package/lib/labs/VNumberInput/index.mjs.map +1 -0
  136. package/lib/labs/VPicker/index.d.mts +8 -8
  137. package/lib/labs/VSparkline/index.d.mts +7 -7
  138. package/lib/labs/VSpeedDial/VSpeedDial.mjs +9 -5
  139. package/lib/labs/VSpeedDial/VSpeedDial.mjs.map +1 -1
  140. package/lib/labs/VSpeedDial/index.d.mts +120 -24
  141. package/lib/labs/VTreeview/index.d.mts +8 -8
  142. package/lib/labs/components.d.mts +788 -95
  143. package/lib/labs/components.mjs +1 -0
  144. package/lib/labs/components.mjs.map +1 -1
  145. package/lib/locale/no.mjs +1 -1
  146. package/lib/locale/no.mjs.map +1 -1
  147. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"VNavigationDrawer.mjs","names":["useSticky","useTouch","useRtl","makeBorderProps","useBorder","useBackgroundColor","makeComponentProps","provideDefaults","makeDisplayProps","useDisplay","makeElevationProps","useElevation","makeLayoutItemProps","useLayoutItem","useProxiedModel","makeRoundedProps","useRounded","useRouter","useScopeId","useSsrBoot","makeTagProps","makeThemeProps","provideTheme","useToggleScope","computed","nextTick","onBeforeMount","ref","shallowRef","toRef","Transition","watch","genericComponent","propsFactory","toPhysical","useRender","locations","makeVNavigationDrawerProps","color","String","disableResizeWatcher","Boolean","disableRouteWatcher","expandOnHover","floating","modelValue","type","default","permanent","rail","railWidth","Number","scrim","image","temporary","touchless","width","location","validator","value","includes","sticky","tag","VNavigationDrawer","name","props","emits","val","setup","_ref","attrs","emit","slots","isRtl","themeClasses","borderClasses","backgroundColorClasses","backgroundColorStyles","elevationClasses","displayClasses","mobile","roundedClasses","router","isActive","v","ssrBootStyles","scopeId","rootEl","isHovering","isTemporary","isSticky","currentRoute","isDragging","dragProgress","dragStyles","position","layoutSize","size","layoutItemStyles","layoutItemScrimStyles","id","order","parseInt","elementSize","active","disableTransitions","absolute","isStuck","stickyStyles","scrimColor","scrimStyles","opacity","transition","undefined","VList","bgColor","onMouseenter","onMouseleave","hasImage","_createVNode","_Fragment","_mergeProps","class","style","prepend","append","onClick"],"sources":["../../../src/components/VNavigationDrawer/VNavigationDrawer.tsx"],"sourcesContent":["// Styles\nimport './VNavigationDrawer.sass'\n\n// Composables\nimport { useSticky } from './sticky'\nimport { useTouch } from './touch'\nimport { useRtl } from '@/composables'\nimport { makeBorderProps, useBorder } from '@/composables/border'\nimport { useBackgroundColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeDisplayProps, useDisplay } from '@/composables/display'\nimport { makeElevationProps, useElevation } from '@/composables/elevation'\nimport { makeLayoutItemProps, useLayoutItem } from '@/composables/layout'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { useRouter } from '@/composables/router'\nimport { useScopeId } from '@/composables/scopeId'\nimport { useSsrBoot } from '@/composables/ssrBoot'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Utilities\nimport { computed, nextTick, onBeforeMount, ref, shallowRef, toRef, Transition, watch } from 'vue'\nimport { genericComponent, propsFactory, toPhysical, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\nexport type VNavigationDrawerImageSlot = {\n image: string | undefined\n}\n\nexport type VNavigationDrawerSlots = {\n default: never\n prepend: never\n append: never\n image: VNavigationDrawerImageSlot\n}\n\nconst locations = ['start', 'end', 'left', 'right', 'top', 'bottom'] as const\n\nexport const makeVNavigationDrawerProps = propsFactory({\n color: String,\n disableResizeWatcher: Boolean,\n disableRouteWatcher: Boolean,\n expandOnHover: Boolean,\n floating: Boolean,\n modelValue: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n permanent: Boolean,\n rail: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n railWidth: {\n type: [Number, String],\n default: 56,\n },\n scrim: {\n type: [Boolean, String],\n default: true,\n },\n image: String,\n temporary: Boolean,\n touchless: Boolean,\n width: {\n type: [Number, String],\n default: 256,\n },\n location: {\n type: String as PropType<typeof locations[number]>,\n default: 'start',\n validator: (value: any) => locations.includes(value),\n },\n sticky: Boolean,\n\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeDisplayProps(),\n ...makeElevationProps(),\n ...makeLayoutItemProps(),\n ...makeRoundedProps(),\n ...makeTagProps({ tag: 'nav' }),\n ...makeThemeProps(),\n}, 'VNavigationDrawer')\n\nexport const VNavigationDrawer = genericComponent<VNavigationDrawerSlots>()({\n name: 'VNavigationDrawer',\n\n props: makeVNavigationDrawerProps(),\n\n emits: {\n 'update:modelValue': (val: boolean) => true,\n 'update:rail': (val: boolean) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const { isRtl } = useRtl()\n const { themeClasses } = provideTheme(props)\n const { borderClasses } = useBorder(props)\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'color'))\n const { elevationClasses } = useElevation(props)\n const { displayClasses, mobile } = useDisplay(props)\n const { roundedClasses } = useRounded(props)\n const router = useRouter()\n const isActive = useProxiedModel(props, 'modelValue', null, v => !!v)\n const { ssrBootStyles } = useSsrBoot()\n const { scopeId } = useScopeId()\n\n const rootEl = ref<HTMLElement>()\n const isHovering = shallowRef(false)\n\n const width = computed(() => {\n return (props.rail && props.expandOnHover && isHovering.value)\n ? Number(props.width)\n : Number(props.rail ? props.railWidth : props.width)\n })\n const location = computed(() => {\n return toPhysical(props.location, isRtl.value) as 'left' | 'right' | 'bottom'\n })\n const isTemporary = computed(() => !props.permanent && (mobile.value || props.temporary))\n const isSticky = computed(() =>\n props.sticky &&\n !isTemporary.value &&\n location.value !== 'bottom'\n )\n\n useToggleScope(() => props.expandOnHover && props.rail != null, () => {\n watch(isHovering, val => emit('update:rail', !val))\n })\n\n useToggleScope(() => !props.disableResizeWatcher, () => {\n watch(isTemporary, val => !props.permanent && (nextTick(() => isActive.value = !val)))\n })\n\n useToggleScope(() => !props.disableRouteWatcher && !!router, () => {\n watch(router!.currentRoute, () => isTemporary.value && (isActive.value = false))\n })\n\n watch(() => props.permanent, val => {\n if (val) isActive.value = true\n })\n\n onBeforeMount(() => {\n if (props.modelValue != null || isTemporary.value) return\n\n isActive.value = props.permanent || !mobile.value\n })\n\n const { isDragging, dragProgress, dragStyles } = useTouch({\n isActive,\n isTemporary,\n width,\n touchless: toRef(props, 'touchless'),\n position: location,\n })\n\n const layoutSize = computed(() => {\n const size = isTemporary.value ? 0\n : props.rail && props.expandOnHover ? Number(props.railWidth)\n : width.value\n\n return isDragging.value ? size * dragProgress.value : size\n })\n\n const { layoutItemStyles, layoutItemScrimStyles } = useLayoutItem({\n id: props.name,\n order: computed(() => parseInt(props.order, 10)),\n position: location,\n layoutSize,\n elementSize: width,\n active: computed(() => isActive.value || isDragging.value),\n disableTransitions: computed(() => isDragging.value),\n absolute: computed(() =>\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n props.absolute || (isSticky.value && typeof isStuck.value !== 'string')\n ),\n })\n\n const { isStuck, stickyStyles } = useSticky({ rootEl, isSticky, layoutItemStyles })\n\n const scrimColor = useBackgroundColor(computed(() => {\n return typeof props.scrim === 'string' ? props.scrim : null\n }))\n const scrimStyles = computed(() => ({\n ...isDragging.value ? {\n opacity: dragProgress.value * 0.2,\n transition: 'none',\n } : undefined,\n ...layoutItemScrimStyles.value,\n }))\n\n provideDefaults({\n VList: {\n bgColor: 'transparent',\n },\n })\n\n function onMouseenter () {\n isHovering.value = true\n }\n function onMouseleave () {\n isHovering.value = false\n }\n\n useRender(() => {\n const hasImage = (slots.image || props.image)\n\n return (\n <>\n <props.tag\n ref={ rootEl }\n onMouseenter={ onMouseenter }\n onMouseleave={ onMouseleave }\n class={[\n 'v-navigation-drawer',\n `v-navigation-drawer--${location.value}`,\n {\n 'v-navigation-drawer--expand-on-hover': props.expandOnHover,\n 'v-navigation-drawer--floating': props.floating,\n 'v-navigation-drawer--is-hovering': isHovering.value,\n 'v-navigation-drawer--rail': props.rail,\n 'v-navigation-drawer--temporary': isTemporary.value,\n 'v-navigation-drawer--active': isActive.value,\n 'v-navigation-drawer--sticky': isSticky.value,\n },\n themeClasses.value,\n backgroundColorClasses.value,\n borderClasses.value,\n displayClasses.value,\n elevationClasses.value,\n roundedClasses.value,\n props.class,\n ]}\n style={[\n backgroundColorStyles.value,\n layoutItemStyles.value,\n dragStyles.value,\n ssrBootStyles.value,\n stickyStyles.value,\n props.style,\n ]}\n { ...scopeId }\n { ...attrs }\n >\n { hasImage && (\n <div key=\"image\" class=\"v-navigation-drawer__img\">\n { slots.image\n ? slots.image?.({ image: props.image })\n : (<img src={ props.image } alt=\"\" />)\n }\n </div>\n )}\n\n { slots.prepend && (\n <div class=\"v-navigation-drawer__prepend\">\n { slots.prepend?.() }\n </div>\n )}\n\n <div class=\"v-navigation-drawer__content\">\n { slots.default?.() }\n </div>\n\n { slots.append && (\n <div class=\"v-navigation-drawer__append\">\n { slots.append?.() }\n </div>\n )}\n </props.tag>\n\n <Transition name=\"fade-transition\">\n { isTemporary.value && (isDragging.value || isActive.value) && !!props.scrim && (\n <div\n class={['v-navigation-drawer__scrim', scrimColor.backgroundColorClasses.value]}\n style={[scrimStyles.value, scrimColor.backgroundColorStyles.value]}\n onClick={ () => isActive.value = false }\n { ...scopeId }\n />\n )}\n </Transition>\n </>\n )\n })\n\n return {\n isStuck,\n }\n },\n})\n\nexport type VNavigationDrawer = InstanceType<typeof VNavigationDrawer>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,SAAS;AAAA,SACTC,QAAQ;AAAA,SACRC,MAAM;AAAA,SACNC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,kBAAkB;AAAA,SAClBC,kBAAkB;AAAA,SAClBC,eAAe;AAAA,SACfC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,mBAAmB,EAAEC,aAAa;AAAA,SAClCC,eAAe;AAAA,SACfC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,SAAS;AAAA,SACTC,UAAU;AAAA,SACVC,UAAU;AAAA,SACVC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY;AAAA,SAC5BC,cAAc,6CAEvB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,aAAa,EAAEC,GAAG,EAAEC,UAAU,EAAEC,KAAK,EAAEC,UAAU,EAAEC,KAAK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Img","useSticky","useTouch","useRtl","makeBorderProps","useBorder","useBackgroundColor","makeComponentProps","provideDefaults","makeDisplayProps","useDisplay","makeElevationProps","useElevation","makeLayoutItemProps","useLayoutItem","useProxiedModel","makeRoundedProps","useRounded","useRouter","useScopeId","useSsrBoot","makeTagProps","makeThemeProps","provideTheme","useToggleScope","computed","nextTick","onBeforeMount","ref","shallowRef","toRef","Transition","watch","genericComponent","propsFactory","toPhysical","useRender","locations","makeVNavigationDrawerProps","color","String","disableResizeWatcher","Boolean","disableRouteWatcher","expandOnHover","floating","modelValue","type","default","permanent","rail","railWidth","Number","scrim","image","temporary","touchless","width","location","validator","value","includes","sticky","tag","VNavigationDrawer","name","props","emits","val","setup","_ref","attrs","emit","slots","isRtl","themeClasses","borderClasses","backgroundColorClasses","backgroundColorStyles","elevationClasses","displayClasses","mobile","roundedClasses","router","isActive","v","ssrBootStyles","scopeId","rootEl","isHovering","isTemporary","isSticky","currentRoute","isDragging","dragProgress","dragStyles","position","layoutSize","size","layoutItemStyles","layoutItemScrimStyles","id","order","parseInt","elementSize","active","disableTransitions","absolute","isStuck","stickyStyles","scrimColor","scrimStyles","opacity","transition","undefined","VList","bgColor","onMouseenter","onMouseleave","hasImage","_createVNode","_Fragment","_mergeProps","class","style","alt","cover","height","src","prepend","append","onClick"],"sources":["../../../src/components/VNavigationDrawer/VNavigationDrawer.tsx"],"sourcesContent":["// Styles\nimport './VNavigationDrawer.sass'\n\n// Components\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { VImg } from '@/components/VImg'\n\n// Composables\nimport { useSticky } from './sticky'\nimport { useTouch } from './touch'\nimport { useRtl } from '@/composables'\nimport { makeBorderProps, useBorder } from '@/composables/border'\nimport { useBackgroundColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeDisplayProps, useDisplay } from '@/composables/display'\nimport { makeElevationProps, useElevation } from '@/composables/elevation'\nimport { makeLayoutItemProps, useLayoutItem } from '@/composables/layout'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { useRouter } from '@/composables/router'\nimport { useScopeId } from '@/composables/scopeId'\nimport { useSsrBoot } from '@/composables/ssrBoot'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Utilities\nimport { computed, nextTick, onBeforeMount, ref, shallowRef, toRef, Transition, watch } from 'vue'\nimport { genericComponent, propsFactory, toPhysical, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\nexport type VNavigationDrawerImageSlot = {\n image: string | undefined\n}\n\nexport type VNavigationDrawerSlots = {\n default: never\n prepend: never\n append: never\n image: VNavigationDrawerImageSlot\n}\n\nconst locations = ['start', 'end', 'left', 'right', 'top', 'bottom'] as const\n\nexport const makeVNavigationDrawerProps = propsFactory({\n color: String,\n disableResizeWatcher: Boolean,\n disableRouteWatcher: Boolean,\n expandOnHover: Boolean,\n floating: Boolean,\n modelValue: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n permanent: Boolean,\n rail: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n railWidth: {\n type: [Number, String],\n default: 56,\n },\n scrim: {\n type: [Boolean, String],\n default: true,\n },\n image: String,\n temporary: Boolean,\n touchless: Boolean,\n width: {\n type: [Number, String],\n default: 256,\n },\n location: {\n type: String as PropType<typeof locations[number]>,\n default: 'start',\n validator: (value: any) => locations.includes(value),\n },\n sticky: Boolean,\n\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeDisplayProps(),\n ...makeElevationProps(),\n ...makeLayoutItemProps(),\n ...makeRoundedProps(),\n ...makeTagProps({ tag: 'nav' }),\n ...makeThemeProps(),\n}, 'VNavigationDrawer')\n\nexport const VNavigationDrawer = genericComponent<VNavigationDrawerSlots>()({\n name: 'VNavigationDrawer',\n\n props: makeVNavigationDrawerProps(),\n\n emits: {\n 'update:modelValue': (val: boolean) => true,\n 'update:rail': (val: boolean) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const { isRtl } = useRtl()\n const { themeClasses } = provideTheme(props)\n const { borderClasses } = useBorder(props)\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'color'))\n const { elevationClasses } = useElevation(props)\n const { displayClasses, mobile } = useDisplay(props)\n const { roundedClasses } = useRounded(props)\n const router = useRouter()\n const isActive = useProxiedModel(props, 'modelValue', null, v => !!v)\n const { ssrBootStyles } = useSsrBoot()\n const { scopeId } = useScopeId()\n\n const rootEl = ref<HTMLElement>()\n const isHovering = shallowRef(false)\n\n const width = computed(() => {\n return (props.rail && props.expandOnHover && isHovering.value)\n ? Number(props.width)\n : Number(props.rail ? props.railWidth : props.width)\n })\n const location = computed(() => {\n return toPhysical(props.location, isRtl.value) as 'left' | 'right' | 'bottom'\n })\n const isTemporary = computed(() => !props.permanent && (mobile.value || props.temporary))\n const isSticky = computed(() =>\n props.sticky &&\n !isTemporary.value &&\n location.value !== 'bottom'\n )\n\n useToggleScope(() => props.expandOnHover && props.rail != null, () => {\n watch(isHovering, val => emit('update:rail', !val))\n })\n\n useToggleScope(() => !props.disableResizeWatcher, () => {\n watch(isTemporary, val => !props.permanent && (nextTick(() => isActive.value = !val)))\n })\n\n useToggleScope(() => !props.disableRouteWatcher && !!router, () => {\n watch(router!.currentRoute, () => isTemporary.value && (isActive.value = false))\n })\n\n watch(() => props.permanent, val => {\n if (val) isActive.value = true\n })\n\n onBeforeMount(() => {\n if (props.modelValue != null || isTemporary.value) return\n\n isActive.value = props.permanent || !mobile.value\n })\n\n const { isDragging, dragProgress, dragStyles } = useTouch({\n isActive,\n isTemporary,\n width,\n touchless: toRef(props, 'touchless'),\n position: location,\n })\n\n const layoutSize = computed(() => {\n const size = isTemporary.value ? 0\n : props.rail && props.expandOnHover ? Number(props.railWidth)\n : width.value\n\n return isDragging.value ? size * dragProgress.value : size\n })\n\n const { layoutItemStyles, layoutItemScrimStyles } = useLayoutItem({\n id: props.name,\n order: computed(() => parseInt(props.order, 10)),\n position: location,\n layoutSize,\n elementSize: width,\n active: computed(() => isActive.value || isDragging.value),\n disableTransitions: computed(() => isDragging.value),\n absolute: computed(() =>\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n props.absolute || (isSticky.value && typeof isStuck.value !== 'string')\n ),\n })\n\n const { isStuck, stickyStyles } = useSticky({ rootEl, isSticky, layoutItemStyles })\n\n const scrimColor = useBackgroundColor(computed(() => {\n return typeof props.scrim === 'string' ? props.scrim : null\n }))\n const scrimStyles = computed(() => ({\n ...isDragging.value ? {\n opacity: dragProgress.value * 0.2,\n transition: 'none',\n } : undefined,\n ...layoutItemScrimStyles.value,\n }))\n\n provideDefaults({\n VList: {\n bgColor: 'transparent',\n },\n })\n\n function onMouseenter () {\n isHovering.value = true\n }\n function onMouseleave () {\n isHovering.value = false\n }\n\n useRender(() => {\n const hasImage = (slots.image || props.image)\n\n return (\n <>\n <props.tag\n ref={ rootEl }\n onMouseenter={ onMouseenter }\n onMouseleave={ onMouseleave }\n class={[\n 'v-navigation-drawer',\n `v-navigation-drawer--${location.value}`,\n {\n 'v-navigation-drawer--expand-on-hover': props.expandOnHover,\n 'v-navigation-drawer--floating': props.floating,\n 'v-navigation-drawer--is-hovering': isHovering.value,\n 'v-navigation-drawer--rail': props.rail,\n 'v-navigation-drawer--temporary': isTemporary.value,\n 'v-navigation-drawer--active': isActive.value,\n 'v-navigation-drawer--sticky': isSticky.value,\n },\n themeClasses.value,\n backgroundColorClasses.value,\n borderClasses.value,\n displayClasses.value,\n elevationClasses.value,\n roundedClasses.value,\n props.class,\n ]}\n style={[\n backgroundColorStyles.value,\n layoutItemStyles.value,\n dragStyles.value,\n ssrBootStyles.value,\n stickyStyles.value,\n props.style,\n ]}\n { ...scopeId }\n { ...attrs }\n >\n { hasImage && (\n <div key=\"image\" class=\"v-navigation-drawer__img\">\n { !slots.image ? (\n <VImg\n key=\"image-img\"\n alt=\"\"\n cover\n height=\"inherit\"\n src={ props.image }\n />\n ) : (\n <VDefaultsProvider\n key=\"image-defaults\"\n disabled={ !props.image }\n defaults={{\n VImg: {\n alt: '',\n cover: true,\n height: 'inherit',\n src: props.image,\n },\n }}\n v-slots:default={ slots.image }\n />\n )}\n </div>\n )}\n\n { slots.prepend && (\n <div class=\"v-navigation-drawer__prepend\">\n { slots.prepend?.() }\n </div>\n )}\n\n <div class=\"v-navigation-drawer__content\">\n { slots.default?.() }\n </div>\n\n { slots.append && (\n <div class=\"v-navigation-drawer__append\">\n { slots.append?.() }\n </div>\n )}\n </props.tag>\n\n <Transition name=\"fade-transition\">\n { isTemporary.value && (isDragging.value || isActive.value) && !!props.scrim && (\n <div\n class={['v-navigation-drawer__scrim', scrimColor.backgroundColorClasses.value]}\n style={[scrimStyles.value, scrimColor.backgroundColorStyles.value]}\n onClick={ () => isActive.value = false }\n { ...scopeId }\n />\n )}\n </Transition>\n </>\n )\n })\n\n return {\n isStuck,\n }\n },\n})\n\nexport type VNavigationDrawer = InstanceType<typeof VNavigationDrawer>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,iBAAiB;AAAA,SACjBC,IAAI,6BAEb;AAAA,SACSC,SAAS;AAAA,SACTC,QAAQ;AAAA,SACRC,MAAM;AAAA,SACNC,eAAe,EAAEC,SAAS;AAAA,SAC1BC,kBAAkB;AAAA,SAClBC,kBAAkB;AAAA,SAClBC,eAAe;AAAA,SACfC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,mBAAmB,EAAEC,aAAa;AAAA,SAClCC,eAAe;AAAA,SACfC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,SAAS;AAAA,SACTC,UAAU;AAAA,SACVC,UAAU;AAAA,SACVC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY;AAAA,SAC5BC,cAAc,6CAEvB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EA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mD,WAAW,CAACnD,KAAK,EAAEkD,UAAU,CAAChC,qBAAqB,CAAClB,KAAK,CAAC;UAAA,WACxDuE,CAAA,KAAM/C,QAAQ,CAACxB,KAAK,GAAG;QAAK,GACjC2B,OAAO,QAEf;MAAA;IAIT,CAAC,CAAC;IAEF,OAAO;MACLqB;IACF,CAAC;EACH;AACF,CAAC,CAAC"}
@@ -70,7 +70,8 @@
70
70
  width: 100%
71
71
  z-index: -1
72
72
 
73
- img
73
+ // TODO: remove in v4
74
+ img:not(.v-img__img)
74
75
  height: $navigation-drawer-img-height
75
76
  object-fit: $navigation-drawer-img-object-fit
76
77
  width: $navigation-drawer-img-width
@@ -22,9 +22,9 @@ declare const VNavigationDrawer: {
22
22
  temporary: boolean;
23
23
  tag: string;
24
24
  sticky: boolean;
25
+ modelValue: boolean | null;
25
26
  tile: boolean;
26
27
  floating: boolean;
27
- modelValue: boolean | null;
28
28
  scrim: string | boolean;
29
29
  touchless: boolean;
30
30
  disableResizeWatcher: boolean;
@@ -41,8 +41,8 @@ declare const VNavigationDrawer: {
41
41
  class?: any;
42
42
  elevation?: string | number | undefined;
43
43
  theme?: string | undefined;
44
- rounded?: string | number | boolean | undefined;
45
44
  mobileBreakpoint?: number | DisplayBreakpoint | undefined;
45
+ rounded?: string | number | boolean | undefined;
46
46
  } & {
47
47
  $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
48
48
  default?: (() => vue.VNodeChild) | undefined;
@@ -78,9 +78,9 @@ declare const VNavigationDrawer: {
78
78
  temporary: boolean;
79
79
  tag: string;
80
80
  sticky: boolean;
81
+ modelValue: boolean | null;
81
82
  tile: boolean;
82
83
  floating: boolean;
83
- modelValue: boolean | null;
84
84
  scrim: string | boolean;
85
85
  touchless: boolean;
86
86
  disableResizeWatcher: boolean;
@@ -97,8 +97,8 @@ declare const VNavigationDrawer: {
97
97
  class?: any;
98
98
  elevation?: string | number | undefined;
99
99
  theme?: string | undefined;
100
- rounded?: string | number | boolean | undefined;
101
100
  mobileBreakpoint?: number | DisplayBreakpoint | undefined;
101
+ rounded?: string | number | boolean | undefined;
102
102
  } & {
103
103
  $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
104
104
  default?: (() => vue.VNodeChild) | undefined;
@@ -129,10 +129,10 @@ declare const VNavigationDrawer: {
129
129
  temporary: boolean;
130
130
  tag: string;
131
131
  sticky: boolean;
132
+ modelValue: boolean | null;
132
133
  rounded: string | number | boolean;
133
134
  tile: boolean;
134
135
  floating: boolean;
135
- modelValue: boolean | null;
136
136
  scrim: string | boolean;
137
137
  touchless: boolean;
138
138
  disableResizeWatcher: boolean;
@@ -170,9 +170,9 @@ declare const VNavigationDrawer: {
170
170
  temporary: boolean;
171
171
  tag: string;
172
172
  sticky: boolean;
173
+ modelValue: boolean | null;
173
174
  tile: boolean;
174
175
  floating: boolean;
175
- modelValue: boolean | null;
176
176
  scrim: string | boolean;
177
177
  touchless: boolean;
178
178
  disableResizeWatcher: boolean;
@@ -189,8 +189,8 @@ declare const VNavigationDrawer: {
189
189
  class?: any;
190
190
  elevation?: string | number | undefined;
191
191
  theme?: string | undefined;
192
- rounded?: string | number | boolean | undefined;
193
192
  mobileBreakpoint?: number | DisplayBreakpoint | undefined;
193
+ rounded?: string | number | boolean | undefined;
194
194
  } & {
195
195
  $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
196
196
  default?: (() => vue.VNodeChild) | undefined;
@@ -223,10 +223,10 @@ declare const VNavigationDrawer: {
223
223
  temporary: boolean;
224
224
  tag: string;
225
225
  sticky: boolean;
226
+ modelValue: boolean | null;
226
227
  rounded: string | number | boolean;
227
228
  tile: boolean;
228
229
  floating: boolean;
229
- modelValue: boolean | null;
230
230
  scrim: string | boolean;
231
231
  touchless: boolean;
232
232
  disableResizeWatcher: boolean;
@@ -248,9 +248,9 @@ declare const VNavigationDrawer: {
248
248
  temporary: boolean;
249
249
  tag: string;
250
250
  sticky: boolean;
251
+ modelValue: boolean | null;
251
252
  tile: boolean;
252
253
  floating: boolean;
253
- modelValue: boolean | null;
254
254
  scrim: string | boolean;
255
255
  touchless: boolean;
256
256
  disableResizeWatcher: boolean;
@@ -267,8 +267,8 @@ declare const VNavigationDrawer: {
267
267
  class?: any;
268
268
  elevation?: string | number | undefined;
269
269
  theme?: string | undefined;
270
- rounded?: string | number | boolean | undefined;
271
270
  mobileBreakpoint?: number | DisplayBreakpoint | undefined;
271
+ rounded?: string | number | boolean | undefined;
272
272
  } & {
273
273
  $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
274
274
  default?: (() => vue.VNodeChild) | undefined;
@@ -304,10 +304,10 @@ declare const VNavigationDrawer: {
304
304
  temporary: boolean;
305
305
  tag: string;
306
306
  sticky: boolean;
307
+ modelValue: boolean | null;
307
308
  rounded: string | number | boolean;
308
309
  tile: boolean;
309
310
  floating: boolean;
310
- modelValue: boolean | null;
311
311
  scrim: string | boolean;
312
312
  touchless: boolean;
313
313
  disableResizeWatcher: boolean;
@@ -76,7 +76,7 @@ export const VOtpInput = genericComponent()({
76
76
  function onInput() {
77
77
  // The maxlength attribute doesn't work for the number type input, so the text type is used.
78
78
  // The following logic simulates the behavior of a number input.
79
- if (props.type === 'number' && /[^0-9]/g.test(current.value.value)) {
79
+ if (isValidNumber(current.value.value)) {
80
80
  current.value.value = '';
81
81
  return;
82
82
  }
@@ -122,7 +122,9 @@ export const VOtpInput = genericComponent()({
122
122
  function onPaste(index, e) {
123
123
  e.preventDefault();
124
124
  e.stopPropagation();
125
- model.value = (e?.clipboardData?.getData('Text') ?? '').split('');
125
+ const clipboardText = e?.clipboardData?.getData('Text') ?? '';
126
+ if (isValidNumber(clipboardText)) return;
127
+ model.value = clipboardText.split('');
126
128
  inputRef.value?.[index].blur();
127
129
  }
128
130
  function reset() {
@@ -136,6 +138,9 @@ export const VOtpInput = genericComponent()({
136
138
  blur();
137
139
  focusIndex.value = -1;
138
140
  }
141
+ function isValidNumber(value) {
142
+ return props.type === 'number' && /[^0-9]/g.test(value);
143
+ }
139
144
  provideDefaults({
140
145
  VField: {
141
146
  color: computed(() => props.color),
@@ -1 +1 @@
1
- {"version":3,"file":"VOtpInput.mjs","names":["makeVFieldProps","VField","VOverlay","VProgressCircular","provideDefaults","makeDimensionProps","useDimension","makeFocusProps","useFocus","useLocale","useProxiedModel","computed","nextTick","ref","watch","filterInputAttrs","focusChild","genericComponent","only","propsFactory","useRender","makeVOtpInputProps","autofocus","Boolean","divider","String","focusAll","label","type","default","length","Number","modelValue","undefined","placeholder","variant","VOtpInput","name","props","emits","finish","val","setup","_ref","attrs","emit","slots","dimensionStyles","isFocused","focus","blur","model","split","join","t","fields","Array","value","fill","focusIndex","contentRef","inputRef","current","onInput","test","array","slice","target","onKeydown","e","index","includes","key","preventDefault","requestAnimationFrame","select","onPaste","stopPropagation","clipboardData","getData","reset","onFocus","onBlur","color","bgColor","baseColor","disabled","error","scoped","deep","rootAttrs","inputAttrs","_createVNode","_mergeProps","class","style","map","_","i","_Fragment","loader","event","loading","some","input"],"sources":["../../../src/components/VOtpInput/VOtpInput.tsx"],"sourcesContent":["// Styles\nimport './VOtpInput.sass'\n\n// Components\nimport { makeVFieldProps, VField } from '@/components/VField/VField'\nimport { VOverlay } from '@/components/VOverlay/VOverlay'\nimport { VProgressCircular } from '@/components/VProgressCircular/VProgressCircular'\n\n// Composables\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, nextTick, ref, watch } from 'vue'\nimport { filterInputAttrs, focusChild, genericComponent, only, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\n// Types\nexport type VOtpInputSlots = {\n default: never\n loader: never\n}\n\nexport const makeVOtpInputProps = propsFactory({\n autofocus: Boolean,\n divider: String,\n focusAll: Boolean,\n label: {\n type: String,\n default: '$vuetify.input.otp',\n },\n length: {\n type: [Number, String],\n default: 6,\n },\n modelValue: {\n type: [Number, String],\n default: undefined,\n },\n placeholder: String,\n type: {\n type: String as PropType<'text' | 'password' | 'number'>,\n default: 'number',\n },\n\n ...makeDimensionProps(),\n ...makeFocusProps(),\n ...only(makeVFieldProps({\n variant: 'outlined' as const,\n }), [\n 'baseColor',\n 'bgColor',\n 'class',\n 'color',\n 'disabled',\n 'error',\n 'loading',\n 'rounded',\n 'style',\n 'theme',\n 'variant',\n ]),\n}, 'VOtpInput')\n\nexport const VOtpInput = genericComponent<VOtpInputSlots>()({\n name: 'VOtpInput',\n\n props: makeVOtpInputProps(),\n\n emits: {\n finish: (val: string) => true,\n 'update:focused': (val: boolean) => true,\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const { dimensionStyles } = useDimension(props)\n const { isFocused, focus, blur } = useFocus(props)\n const model = useProxiedModel(\n props,\n 'modelValue',\n '',\n val => String(val).split(''),\n val => val.join('')\n )\n const { t } = useLocale()\n\n const length = computed(() => Number(props.length))\n const fields = computed(() => Array(length.value).fill(0))\n const focusIndex = ref(-1)\n const contentRef = ref<HTMLElement>()\n const inputRef = ref<HTMLInputElement[]>([])\n const current = computed(() => inputRef.value[focusIndex.value])\n\n function onInput () {\n // The maxlength attribute doesn't work for the number type input, so the text type is used.\n // The following logic simulates the behavior of a number input.\n if (props.type === 'number' && /[^0-9]/g.test(current.value.value)) {\n current.value.value = ''\n return\n }\n const array = model.value.slice()\n const value = current.value.value\n\n array[focusIndex.value] = value\n\n let target: any = null\n\n if (focusIndex.value > model.value.length) {\n target = model.value.length + 1\n } else if (focusIndex.value + 1 !== length.value) {\n target = 'next'\n }\n\n model.value = array\n\n if (target) focusChild(contentRef.value!, target)\n }\n\n function onKeydown (e: KeyboardEvent) {\n const array = model.value.slice()\n const index = focusIndex.value\n let target: 'next' | 'prev' | 'first' | 'last' | number | null = null\n\n if (![\n 'ArrowLeft',\n 'ArrowRight',\n 'Backspace',\n 'Delete',\n ].includes(e.key)) return\n\n e.preventDefault()\n\n if (e.key === 'ArrowLeft') {\n target = 'prev'\n } else if (e.key === 'ArrowRight') {\n target = 'next'\n } else if (['Backspace', 'Delete'].includes(e.key)) {\n array[focusIndex.value] = ''\n\n model.value = array\n\n if (focusIndex.value > 0 && e.key === 'Backspace') {\n target = 'prev'\n } else {\n requestAnimationFrame(() => {\n inputRef.value[index]?.select()\n })\n }\n }\n\n requestAnimationFrame(() => {\n if (target != null) {\n focusChild(contentRef.value!, target)\n }\n })\n }\n\n function onPaste (index: number, e: ClipboardEvent) {\n e.preventDefault()\n e.stopPropagation()\n\n model.value = (e?.clipboardData?.getData('Text') ?? '').split('')\n\n inputRef.value?.[index].blur()\n }\n\n function reset () {\n model.value = []\n }\n\n function onFocus (e: FocusEvent, index: number) {\n focus()\n\n focusIndex.value = index\n }\n\n function onBlur () {\n blur()\n\n focusIndex.value = -1\n }\n\n provideDefaults({\n VField: {\n color: computed(() => props.color),\n bgColor: computed(() => props.color),\n baseColor: computed(() => props.baseColor),\n disabled: computed(() => props.disabled),\n error: computed(() => props.error),\n variant: computed(() => props.variant),\n },\n }, { scoped: true })\n\n watch(model, val => {\n if (val.length === length.value) emit('finish', val.join(''))\n }, { deep: true })\n\n watch(focusIndex, val => {\n if (val < 0) return\n\n nextTick(() => {\n inputRef.value[val]?.select()\n })\n })\n\n useRender(() => {\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs)\n\n return (\n <div\n class={[\n 'v-otp-input',\n {\n 'v-otp-input--divided': !!props.divider,\n },\n props.class,\n ]}\n style={[\n props.style,\n ]}\n { ...rootAttrs }\n >\n <div\n ref={ contentRef }\n class=\"v-otp-input__content\"\n style={[\n dimensionStyles.value,\n ]}\n >\n { fields.value.map((_, i) => (\n <>\n { props.divider && i !== 0 && (\n <span class=\"v-otp-input__divider\">{ props.divider }</span>\n )}\n\n <VField\n focused={ (isFocused.value && props.focusAll) || focusIndex.value === i }\n key={ i }\n >\n {{\n ...slots,\n loader: undefined,\n default: () => {\n return (\n <input\n ref={ val => inputRef.value[i] = val as HTMLInputElement }\n aria-label={ t(props.label, i + 1) }\n autofocus={ i === 0 && props.autofocus }\n autocomplete=\"one-time-code\"\n class={[\n 'v-otp-input__field',\n ]}\n disabled={ props.disabled }\n inputmode={ props.type === 'number' ? 'numeric' : 'text' }\n min={ props.type === 'number' ? 0 : undefined }\n maxlength=\"1\"\n placeholder={ props.placeholder }\n type={ props.type === 'number' ? 'text' : props.type }\n value={ model.value[i] }\n onInput={ onInput }\n onFocus={ e => onFocus(e, i) }\n onBlur={ onBlur }\n onKeydown={ onKeydown }\n onPaste={ event => onPaste(i, event) }\n />\n )\n },\n }}\n </VField>\n </>\n ))}\n\n <input\n class=\"v-otp-input-input\"\n type=\"hidden\"\n { ...inputAttrs }\n value={ model.value.join('') }\n />\n\n <VOverlay\n contained\n content-class=\"v-otp-input__loader\"\n model-value={ !!props.loading }\n persistent\n >\n { slots.loader?.() ?? (\n <VProgressCircular\n color={ typeof props.loading === 'boolean' ? undefined : props.loading }\n indeterminate\n size=\"24\"\n width=\"2\"\n />\n )}\n </VOverlay>\n\n { slots.default?.() }\n </div>\n </div>\n )\n })\n\n return {\n blur: () => {\n inputRef.value?.some(input => input.blur())\n },\n focus: () => {\n inputRef.value?.[0].focus()\n },\n reset,\n isFocused,\n }\n },\n})\n\nexport type VOtpInput = InstanceType<typeof VOtpInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,eAAe,EAAEC,MAAM;AAAA,SACvBC,QAAQ;AAAA,SACRC,iBAAiB,sDAE1B;AAAA,SACSC,eAAe;AAAA,SACfC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC3CC,gBAAgB,EAAEC,UAAU,EAAEC,gBAAgB,EAA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AC;QAG1C;MAAC,IAIR,CAAC,EAAAT,YAAA,UAAAC,WAAA;QAAA;QAAA;MAAA,GAKKF,UAAU;QAAA,SACPxC,KAAK,CAACM,KAAK,CAACJ,IAAI,CAAC,EAAE;MAAC,WAAAuC,YAAA,CAAA1F,QAAA;QAAA;QAAA;QAAA,eAMd,CAAC,CAACoC,KAAK,CAACgE,OAAO;QAAA;MAAA;QAAAzE,OAAA,EAAAA,CAAA,MAG3BiB,KAAK,CAACsD,MAAM,GAAG,CAAC,IAAAR,YAAA,CAAAzF,iBAAA;UAAA,SAEN,OAAOmC,KAAK,CAACgE,OAAO,KAAK,SAAS,GAAGrE,SAAS,GAAGK,KAAK,CAACgE,OAAO;UAAA;UAAA;UAAA;QAAA,QAKzE;MAAA,IAGDxD,KAAK,CAACjB,OAAO,GAAG,CAAC;IAI3B,CAAC,CAAC;IAEF,OAAO;MACLqB,IAAI,EAAEA,CAAA,KAAM;QACVW,QAAQ,CAACJ,KAAK,EAAE8C,IAAI,CAACC,KAAK,IAAIA,KAAK,CAACtD,IAAI,CAAC,CAAC,CAAC;MAC7C,CAAC;MACDD,KAAK,EAAEA,CAAA,KAAM;QACXY,QAAQ,CAACJ,KAAK,GAAG,CAAC,CAAC,CAACR,KAAK,CAAC,CAAC;MAC7B,CAAC;MACD+B,KAAK;MACLhC;IACF,CAAC;EACH;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"VOtpInput.mjs","names":["makeVFieldProps","VField","VOverlay","VProgressCircular","provideDefaults","makeDimensionProps","useDimension","makeFocusProps","useFocus","useLocale","useProxiedModel","computed","nextTick","ref","watch","filterInputAttrs","focusChild","genericComponent","only","propsFactory","useRender","makeVOtpInputProps","autofocus","Boolean","divider","String","focusAll","label","type","default","length","Number","modelValue","undefined","placeholder","variant","VOtpInput","name","props","emits","finish","val","setup","_ref","attrs","emit","slots","dimensionStyles","isFocused","focus","blur","model","split","join","t","fields","Array","value","fill","focusIndex","contentRef","inputRef","current","onInput","isValidNumber","array","slice","target","onKeydown","e","index","includes","key","preventDefault","requestAnimationFrame","select","onPaste","stopPropagation","clipboardText","clipboardData","getData","reset","onFocus","onBlur","test","color","bgColor","baseColor","disabled","error","scoped","deep","rootAttrs","inputAttrs","_createVNode","_mergeProps","class","style","map","_","i","_Fragment","loader","event","loading","some","input"],"sources":["../../../src/components/VOtpInput/VOtpInput.tsx"],"sourcesContent":["// Styles\nimport './VOtpInput.sass'\n\n// Components\nimport { makeVFieldProps, VField } from '@/components/VField/VField'\nimport { VOverlay } from '@/components/VOverlay/VOverlay'\nimport { VProgressCircular } from '@/components/VProgressCircular/VProgressCircular'\n\n// Composables\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, nextTick, ref, watch } from 'vue'\nimport { filterInputAttrs, focusChild, genericComponent, only, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\n// Types\nexport type VOtpInputSlots = {\n default: never\n loader: never\n}\n\nexport const makeVOtpInputProps = propsFactory({\n autofocus: Boolean,\n divider: String,\n focusAll: Boolean,\n label: {\n type: String,\n default: '$vuetify.input.otp',\n },\n length: {\n type: [Number, String],\n default: 6,\n },\n modelValue: {\n type: [Number, String],\n default: undefined,\n },\n placeholder: String,\n type: {\n type: String as PropType<'text' | 'password' | 'number'>,\n default: 'number',\n },\n\n ...makeDimensionProps(),\n ...makeFocusProps(),\n ...only(makeVFieldProps({\n variant: 'outlined' as const,\n }), [\n 'baseColor',\n 'bgColor',\n 'class',\n 'color',\n 'disabled',\n 'error',\n 'loading',\n 'rounded',\n 'style',\n 'theme',\n 'variant',\n ]),\n}, 'VOtpInput')\n\nexport const VOtpInput = genericComponent<VOtpInputSlots>()({\n name: 'VOtpInput',\n\n props: makeVOtpInputProps(),\n\n emits: {\n finish: (val: string) => true,\n 'update:focused': (val: boolean) => true,\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const { dimensionStyles } = useDimension(props)\n const { isFocused, focus, blur } = useFocus(props)\n const model = useProxiedModel(\n props,\n 'modelValue',\n '',\n val => String(val).split(''),\n val => val.join('')\n )\n const { t } = useLocale()\n\n const length = computed(() => Number(props.length))\n const fields = computed(() => Array(length.value).fill(0))\n const focusIndex = ref(-1)\n const contentRef = ref<HTMLElement>()\n const inputRef = ref<HTMLInputElement[]>([])\n const current = computed(() => inputRef.value[focusIndex.value])\n\n function onInput () {\n // The maxlength attribute doesn't work for the number type input, so the text type is used.\n // The following logic simulates the behavior of a number input.\n if (isValidNumber(current.value.value)) {\n current.value.value = ''\n return\n }\n\n const array = model.value.slice()\n const value = current.value.value\n\n array[focusIndex.value] = value\n\n let target: any = null\n\n if (focusIndex.value > model.value.length) {\n target = model.value.length + 1\n } else if (focusIndex.value + 1 !== length.value) {\n target = 'next'\n }\n\n model.value = array\n\n if (target) focusChild(contentRef.value!, target)\n }\n\n function onKeydown (e: KeyboardEvent) {\n const array = model.value.slice()\n const index = focusIndex.value\n let target: 'next' | 'prev' | 'first' | 'last' | number | null = null\n\n if (![\n 'ArrowLeft',\n 'ArrowRight',\n 'Backspace',\n 'Delete',\n ].includes(e.key)) return\n\n e.preventDefault()\n\n if (e.key === 'ArrowLeft') {\n target = 'prev'\n } else if (e.key === 'ArrowRight') {\n target = 'next'\n } else if (['Backspace', 'Delete'].includes(e.key)) {\n array[focusIndex.value] = ''\n\n model.value = array\n\n if (focusIndex.value > 0 && e.key === 'Backspace') {\n target = 'prev'\n } else {\n requestAnimationFrame(() => {\n inputRef.value[index]?.select()\n })\n }\n }\n\n requestAnimationFrame(() => {\n if (target != null) {\n focusChild(contentRef.value!, target)\n }\n })\n }\n\n function onPaste (index: number, e: ClipboardEvent) {\n e.preventDefault()\n e.stopPropagation()\n\n const clipboardText = e?.clipboardData?.getData('Text') ?? ''\n\n if (isValidNumber(clipboardText)) return\n\n model.value = clipboardText.split('')\n\n inputRef.value?.[index].blur()\n }\n\n function reset () {\n model.value = []\n }\n\n function onFocus (e: FocusEvent, index: number) {\n focus()\n\n focusIndex.value = index\n }\n\n function onBlur () {\n blur()\n\n focusIndex.value = -1\n }\n\n function isValidNumber (value: string) {\n return props.type === 'number' && /[^0-9]/g.test(value)\n }\n\n provideDefaults({\n VField: {\n color: computed(() => props.color),\n bgColor: computed(() => props.color),\n baseColor: computed(() => props.baseColor),\n disabled: computed(() => props.disabled),\n error: computed(() => props.error),\n variant: computed(() => props.variant),\n },\n }, { scoped: true })\n\n watch(model, val => {\n if (val.length === length.value) emit('finish', val.join(''))\n }, { deep: true })\n\n watch(focusIndex, val => {\n if (val < 0) return\n\n nextTick(() => {\n inputRef.value[val]?.select()\n })\n })\n\n useRender(() => {\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs)\n\n return (\n <div\n class={[\n 'v-otp-input',\n {\n 'v-otp-input--divided': !!props.divider,\n },\n props.class,\n ]}\n style={[\n props.style,\n ]}\n { ...rootAttrs }\n >\n <div\n ref={ contentRef }\n class=\"v-otp-input__content\"\n style={[\n dimensionStyles.value,\n ]}\n >\n { fields.value.map((_, i) => (\n <>\n { props.divider && i !== 0 && (\n <span class=\"v-otp-input__divider\">{ props.divider }</span>\n )}\n\n <VField\n focused={ (isFocused.value && props.focusAll) || focusIndex.value === i }\n key={ i }\n >\n {{\n ...slots,\n loader: undefined,\n default: () => {\n return (\n <input\n ref={ val => inputRef.value[i] = val as HTMLInputElement }\n aria-label={ t(props.label, i + 1) }\n autofocus={ i === 0 && props.autofocus }\n autocomplete=\"one-time-code\"\n class={[\n 'v-otp-input__field',\n ]}\n disabled={ props.disabled }\n inputmode={ props.type === 'number' ? 'numeric' : 'text' }\n min={ props.type === 'number' ? 0 : undefined }\n maxlength=\"1\"\n placeholder={ props.placeholder }\n type={ props.type === 'number' ? 'text' : props.type }\n value={ model.value[i] }\n onInput={ onInput }\n onFocus={ e => onFocus(e, i) }\n onBlur={ onBlur }\n onKeydown={ onKeydown }\n onPaste={ event => onPaste(i, event) }\n />\n )\n },\n }}\n </VField>\n </>\n ))}\n\n <input\n class=\"v-otp-input-input\"\n type=\"hidden\"\n { ...inputAttrs }\n value={ model.value.join('') }\n />\n\n <VOverlay\n contained\n content-class=\"v-otp-input__loader\"\n model-value={ !!props.loading }\n persistent\n >\n { slots.loader?.() ?? (\n <VProgressCircular\n color={ typeof props.loading === 'boolean' ? undefined : props.loading }\n indeterminate\n size=\"24\"\n width=\"2\"\n />\n )}\n </VOverlay>\n\n { slots.default?.() }\n </div>\n </div>\n )\n })\n\n return {\n blur: () => {\n inputRef.value?.some(input => input.blur())\n },\n focus: () => {\n inputRef.value?.[0].focus()\n },\n reset,\n isFocused,\n }\n },\n})\n\nexport type VOtpInput = InstanceType<typeof VOtpInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,eAAe,EAAEC,MAAM;AAAA,SACvBC,QAAQ;AAAA,SACRC,iBAAiB,sDAE1B;AAAA,SACSC,eAAe;AAAA,SACfC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC3CC,gBAAgB,EAAEC,UAAU,EAAEC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAEtF;AAGA;AAMA,OAAO,MAAMC,kBAAkB,GAAGF,YAAY,CAAC;EAC7CG,SAAS,EAAEC,OAAO;EAClBC,OAAO,EAAEC,MAAM;EACfC,QAAQ,EAAEH,OAAO;EACjBI,KAAK,EAAE;IACLC,IAAI,EAAEH,MAAM;IACZI,OAAO,EAAE;EACX,CAAC;EACDC,MAAM,EAAE;IACNF,IAAI,EAAE,CAACG,MAAM,EAAEN,MAAM,CAAC;IACt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AA,CAAA5F,QAAA;QAAA;QAAA;QAAA,eAMd,CAAC,CAACoC,KAAK,CAACkE,OAAO;QAAA;MAAA;QAAA3E,OAAA,EAAAA,CAAA,MAG3BiB,KAAK,CAACwD,MAAM,GAAG,CAAC,IAAAR,YAAA,CAAA3F,iBAAA;UAAA,SAEN,OAAOmC,KAAK,CAACkE,OAAO,KAAK,SAAS,GAAGvE,SAAS,GAAGK,KAAK,CAACkE,OAAO;UAAA;UAAA;UAAA;QAAA,QAKzE;MAAA,IAGD1D,KAAK,CAACjB,OAAO,GAAG,CAAC;IAI3B,CAAC,CAAC;IAEF,OAAO;MACLqB,IAAI,EAAEA,CAAA,KAAM;QACVW,QAAQ,CAACJ,KAAK,EAAEgD,IAAI,CAACC,KAAK,IAAIA,KAAK,CAACxD,IAAI,CAAC,CAAC,CAAC;MAC7C,CAAC;MACDD,KAAK,EAAEA,CAAA,KAAM;QACXY,QAAQ,CAACJ,KAAK,GAAG,CAAC,CAAC,CAACR,KAAK,CAAC,CAAC;MAC7B,CAAC;MACDgC,KAAK;MACLjC;IACF,CAAC;EACH;AACF,CAAC,CAAC"}
@@ -8,7 +8,7 @@ interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions
8
8
  declare const VOtpInput: {
9
9
  new (...args: any[]): vue.CreateComponentPublicInstance<{
10
10
  length: string | number;
11
- variant: NonNullable<"filled" | "outlined" | "plain" | "underlined" | "solo" | "solo-inverted" | "solo-filled">;
11
+ variant: NonNullable<"filled" | "underlined" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled">;
12
12
  type: "number" | "text" | "password";
13
13
  error: boolean;
14
14
  label: string;
@@ -30,11 +30,11 @@ declare const VOtpInput: {
30
30
  placeholder?: string | undefined;
31
31
  theme?: string | undefined;
32
32
  divider?: string | undefined;
33
- rounded?: string | number | boolean | undefined;
33
+ 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
34
34
  modelValue?: string | number | undefined;
35
+ rounded?: string | number | boolean | undefined;
35
36
  bgColor?: string | undefined;
36
37
  baseColor?: string | undefined;
37
- 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
38
38
  } & {
39
39
  $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
40
40
  default?: (() => vue.VNodeChild) | undefined;
@@ -48,8 +48,8 @@ declare const VOtpInput: {
48
48
  "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
49
49
  "v-slot:loader"?: false | (() => vue.VNodeChild) | undefined;
50
50
  } & {
51
- "onUpdate:modelValue"?: ((val: string) => any) | undefined;
52
51
  "onUpdate:focused"?: ((val: boolean) => any) | undefined;
52
+ "onUpdate:modelValue"?: ((val: string) => any) | undefined;
53
53
  onFinish?: ((val: string) => any) | undefined;
54
54
  }, {
55
55
  blur: () => void;
@@ -64,7 +64,7 @@ declare const VOtpInput: {
64
64
  'update:modelValue': (val: string) => true;
65
65
  }, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
66
66
  length: string | number;
67
- variant: NonNullable<"filled" | "outlined" | "plain" | "underlined" | "solo" | "solo-inverted" | "solo-filled">;
67
+ variant: NonNullable<"filled" | "underlined" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled">;
68
68
  type: "number" | "text" | "password";
69
69
  error: boolean;
70
70
  label: string;
@@ -86,11 +86,11 @@ declare const VOtpInput: {
86
86
  placeholder?: string | undefined;
87
87
  theme?: string | undefined;
88
88
  divider?: string | undefined;
89
- rounded?: string | number | boolean | undefined;
89
+ 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
90
90
  modelValue?: string | number | undefined;
91
+ rounded?: string | number | boolean | undefined;
91
92
  bgColor?: string | undefined;
92
93
  baseColor?: string | undefined;
93
- 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
94
94
  } & {
95
95
  $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
96
96
  default?: (() => vue.VNodeChild) | undefined;
@@ -104,21 +104,21 @@ declare const VOtpInput: {
104
104
  "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
105
105
  "v-slot:loader"?: false | (() => vue.VNodeChild) | undefined;
106
106
  } & {
107
- "onUpdate:modelValue"?: ((val: string) => any) | undefined;
108
107
  "onUpdate:focused"?: ((val: boolean) => any) | undefined;
108
+ "onUpdate:modelValue"?: ((val: string) => any) | undefined;
109
109
  onFinish?: ((val: string) => any) | undefined;
110
110
  }, {
111
111
  length: string | number;
112
- variant: NonNullable<"filled" | "outlined" | "plain" | "underlined" | "solo" | "solo-inverted" | "solo-filled">;
112
+ variant: NonNullable<"filled" | "underlined" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled">;
113
113
  type: "number" | "text" | "password";
114
114
  error: boolean;
115
115
  label: string;
116
116
  style: vue.StyleValue;
117
117
  autofocus: boolean;
118
118
  disabled: boolean;
119
- rounded: string | number | boolean;
120
- modelValue: string | number;
121
119
  focused: boolean;
120
+ modelValue: string | number;
121
+ rounded: string | number | boolean;
122
122
  focusAll: boolean;
123
123
  }, true, {}, vue.SlotsType<Partial<{
124
124
  default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
@@ -136,7 +136,7 @@ declare const VOtpInput: {
136
136
  Defaults: {};
137
137
  }, {
138
138
  length: string | number;
139
- variant: NonNullable<"filled" | "outlined" | "plain" | "underlined" | "solo" | "solo-inverted" | "solo-filled">;
139
+ variant: NonNullable<"filled" | "underlined" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled">;
140
140
  type: "number" | "text" | "password";
141
141
  error: boolean;
142
142
  label: string;
@@ -158,11 +158,11 @@ declare const VOtpInput: {
158
158
  placeholder?: string | undefined;
159
159
  theme?: string | undefined;
160
160
  divider?: string | undefined;
161
- rounded?: string | number | boolean | undefined;
161
+ 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
162
162
  modelValue?: string | number | undefined;
163
+ rounded?: string | number | boolean | undefined;
163
164
  bgColor?: string | undefined;
164
165
  baseColor?: string | undefined;
165
- 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
166
166
  } & {
167
167
  $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
168
168
  default?: (() => vue.VNodeChild) | undefined;
@@ -176,8 +176,8 @@ declare const VOtpInput: {
176
176
  "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
177
177
  "v-slot:loader"?: false | (() => vue.VNodeChild) | undefined;
178
178
  } & {
179
- "onUpdate:modelValue"?: ((val: string) => any) | undefined;
180
179
  "onUpdate:focused"?: ((val: boolean) => any) | undefined;
180
+ "onUpdate:modelValue"?: ((val: string) => any) | undefined;
181
181
  onFinish?: ((val: string) => any) | undefined;
182
182
  }, {
183
183
  blur: () => void;
@@ -188,16 +188,16 @@ declare const VOtpInput: {
188
188
  };
189
189
  }, {}, {}, {}, {
190
190
  length: string | number;
191
- variant: NonNullable<"filled" | "outlined" | "plain" | "underlined" | "solo" | "solo-inverted" | "solo-filled">;
191
+ variant: NonNullable<"filled" | "underlined" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled">;
192
192
  type: "number" | "text" | "password";
193
193
  error: boolean;
194
194
  label: string;
195
195
  style: vue.StyleValue;
196
196
  autofocus: boolean;
197
197
  disabled: boolean;
198
- rounded: string | number | boolean;
199
- modelValue: string | number;
200
198
  focused: boolean;
199
+ modelValue: string | number;
200
+ rounded: string | number | boolean;
201
201
  focusAll: boolean;
202
202
  }>;
203
203
  __isFragment?: undefined;
@@ -205,7 +205,7 @@ declare const VOtpInput: {
205
205
  __isSuspense?: undefined;
206
206
  } & vue.ComponentOptionsBase<{
207
207
  length: string | number;
208
- variant: NonNullable<"filled" | "outlined" | "plain" | "underlined" | "solo" | "solo-inverted" | "solo-filled">;
208
+ variant: NonNullable<"filled" | "underlined" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled">;
209
209
  type: "number" | "text" | "password";
210
210
  error: boolean;
211
211
  label: string;
@@ -227,11 +227,11 @@ declare const VOtpInput: {
227
227
  placeholder?: string | undefined;
228
228
  theme?: string | undefined;
229
229
  divider?: string | undefined;
230
- rounded?: string | number | boolean | undefined;
230
+ 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
231
231
  modelValue?: string | number | undefined;
232
+ rounded?: string | number | boolean | undefined;
232
233
  bgColor?: string | undefined;
233
234
  baseColor?: string | undefined;
234
- 'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
235
235
  } & {
236
236
  $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
237
237
  default?: (() => vue.VNodeChild) | undefined;
@@ -245,8 +245,8 @@ declare const VOtpInput: {
245
245
  "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
246
246
  "v-slot:loader"?: false | (() => vue.VNodeChild) | undefined;
247
247
  } & {
248
- "onUpdate:modelValue"?: ((val: string) => any) | undefined;
249
248
  "onUpdate:focused"?: ((val: boolean) => any) | undefined;
249
+ "onUpdate:modelValue"?: ((val: string) => any) | undefined;
250
250
  onFinish?: ((val: string) => any) | undefined;
251
251
  }, {
252
252
  blur: () => void;
@@ -261,16 +261,16 @@ declare const VOtpInput: {
261
261
  'update:modelValue': (val: string) => true;
262
262
  }, string, {
263
263
  length: string | number;
264
- variant: NonNullable<"filled" | "outlined" | "plain" | "underlined" | "solo" | "solo-inverted" | "solo-filled">;
264
+ variant: NonNullable<"filled" | "underlined" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled">;
265
265
  type: "number" | "text" | "password";
266
266
  error: boolean;
267
267
  label: string;
268
268
  style: vue.StyleValue;
269
269
  autofocus: boolean;
270
270
  disabled: boolean;
271
- rounded: string | number | boolean;
272
- modelValue: string | number;
273
271
  focused: boolean;
272
+ modelValue: string | number;
273
+ rounded: string | number | boolean;
274
274
  focusAll: boolean;
275
275
  }, {}, string, vue.SlotsType<Partial<{
276
276
  default: () => vue.VNode<vue.RendererNode, vue.RendererElement, {
@@ -281,12 +281,12 @@ declare const VOtpInput: {
281
281
  }>[];
282
282
  }>>> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & FilterPropsOptions<{
283
283
  variant: Omit<{
284
- type: PropType<"filled" | "outlined" | "plain" | "underlined" | "solo" | "solo-inverted" | "solo-filled">;
284
+ type: PropType<"filled" | "underlined" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled">;
285
285
  default: string;
286
286
  validator: (v: any) => boolean;
287
287
  }, "type" | "default"> & {
288
- type: PropType<NonNullable<"filled" | "outlined" | "plain" | "underlined" | "solo" | "solo-inverted" | "solo-filled">>;
289
- default: NonNullable<"filled" | "outlined" | "plain" | "underlined" | "solo" | "solo-inverted" | "solo-filled">;
288
+ type: PropType<NonNullable<"filled" | "underlined" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled">>;
289
+ default: NonNullable<"filled" | "underlined" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled">;
290
290
  };
291
291
  error: BooleanConstructor;
292
292
  color: StringConstructor;
@@ -337,12 +337,12 @@ declare const VOtpInput: {
337
337
  };
338
338
  }, vue.ExtractPropTypes<{
339
339
  variant: Omit<{
340
- type: PropType<"filled" | "outlined" | "plain" | "underlined" | "solo" | "solo-inverted" | "solo-filled">;
340
+ type: PropType<"filled" | "underlined" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled">;
341
341
  default: string;
342
342
  validator: (v: any) => boolean;
343
343
  }, "type" | "default"> & {
344
- type: PropType<NonNullable<"filled" | "outlined" | "plain" | "underlined" | "solo" | "solo-inverted" | "solo-filled">>;
345
- default: NonNullable<"filled" | "outlined" | "plain" | "underlined" | "solo" | "solo-inverted" | "solo-filled">;
344
+ type: PropType<NonNullable<"filled" | "underlined" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled">>;
345
+ default: NonNullable<"filled" | "underlined" | "outlined" | "plain" | "solo" | "solo-inverted" | "solo-filled">;
346
346
  };
347
347
  error: BooleanConstructor;
348
348
  color: StringConstructor;
@@ -145,6 +145,7 @@ export const VOverlay = genericComponent()({
145
145
  if (v) isActive.value = false;
146
146
  });
147
147
  const root = ref();
148
+ const scrimEl = ref();
148
149
  const contentEl = ref();
149
150
  const {
150
151
  contentStyles,
@@ -166,8 +167,10 @@ export const VOverlay = genericComponent()({
166
167
  emit('click:outside', e);
167
168
  if (!props.persistent) isActive.value = false;else animateClick();
168
169
  }
169
- function closeConditional() {
170
- return isActive.value && globalTop.value;
170
+ function closeConditional(e) {
171
+ return isActive.value && globalTop.value && (
172
+ // If using scrim, only close if clicking on it rather than anything opened on top
173
+ !props.scrim || e.target === scrimEl.value);
171
174
  }
172
175
  IN_BROWSER && watch(isActive, val => {
173
176
  if (val) {
@@ -254,7 +257,8 @@ export const VOverlay = genericComponent()({
254
257
  "ref": root
255
258
  }, scopeId, attrs), [_createVNode(Scrim, _mergeProps({
256
259
  "color": scrimColor,
257
- "modelValue": isActive.value && !!props.scrim
260
+ "modelValue": isActive.value && !!props.scrim,
261
+ "ref": scrimEl
258
262
  }, scrimEvents.value), null), _createVNode(MaybeTransition, {
259
263
  "appear": true,
260
264
  "persisted": true,
@@ -277,6 +281,7 @@ export const VOverlay = genericComponent()({
277
281
  })]));
278
282
  return {
279
283
  activatorEl,
284
+ scrimEl,
280
285
  target,
281
286
  animateClick,
282
287
  contentEl,