@vuetify/nightly 3.7.5-dev.2024-12-03 → 3.7.5-dev.2024-12-16

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 (77) hide show
  1. package/dist/json/attributes.json +3779 -3779
  2. package/dist/json/importMap-labs.json +20 -20
  3. package/dist/json/importMap.json +136 -136
  4. package/dist/json/web-types.json +7026 -7026
  5. package/dist/vuetify-labs.css +4372 -4372
  6. package/dist/vuetify-labs.d.ts +40 -40
  7. package/dist/vuetify-labs.esm.js +21 -38
  8. package/dist/vuetify-labs.esm.js.map +1 -1
  9. package/dist/vuetify-labs.js +20 -37
  10. package/dist/vuetify-labs.min.css +2 -2
  11. package/dist/vuetify.css +4189 -4189
  12. package/dist/vuetify.d.ts +92 -92
  13. package/dist/vuetify.esm.js +21 -38
  14. package/dist/vuetify.esm.js.map +1 -1
  15. package/dist/vuetify.js +20 -37
  16. package/dist/vuetify.js.map +1 -1
  17. package/dist/vuetify.min.css +2 -2
  18. package/dist/vuetify.min.js +876 -881
  19. package/dist/vuetify.min.js.map +1 -1
  20. package/lib/components/VAppBar/index.d.mts +6 -6
  21. package/lib/components/VAutocomplete/index.d.mts +6 -6
  22. package/lib/components/VBtn/index.d.mts +7 -7
  23. package/lib/components/VBtnToggle/index.d.mts +9 -9
  24. package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
  25. package/lib/components/VCarousel/index.d.mts +9 -9
  26. package/lib/components/VCheckbox/VCheckbox.mjs +3 -3
  27. package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
  28. package/lib/components/VChipGroup/VChipGroup.mjs.map +1 -1
  29. package/lib/components/VChipGroup/index.d.mts +15 -15
  30. package/lib/components/VCombobox/index.d.mts +6 -6
  31. package/lib/components/VExpansionPanel/index.d.mts +7 -7
  32. package/lib/components/VFab/index.d.mts +6 -6
  33. package/lib/components/VField/VField.mjs +3 -3
  34. package/lib/components/VField/VField.mjs.map +1 -1
  35. package/lib/components/VInput/VInput.mjs +3 -3
  36. package/lib/components/VInput/VInput.mjs.map +1 -1
  37. package/lib/components/VItemGroup/VItemGroup.mjs.map +1 -1
  38. package/lib/components/VItemGroup/index.d.mts +9 -9
  39. package/lib/components/VMenu/VMenu.mjs +3 -3
  40. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  41. package/lib/components/VMenu/index.d.mts +6 -6
  42. package/lib/components/VRadioGroup/VRadioGroup.mjs +3 -3
  43. package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
  44. package/lib/components/VRating/VRating.mjs +4 -3
  45. package/lib/components/VRating/VRating.mjs.map +1 -1
  46. package/lib/components/VSelect/index.d.mts +6 -6
  47. package/lib/components/VSelectionControl/VSelectionControl.mjs +3 -3
  48. package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
  49. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +3 -3
  50. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -1
  51. package/lib/components/VSlideGroup/index.d.mts +10 -10
  52. package/lib/components/VSparkline/VBarline.mjs +3 -3
  53. package/lib/components/VSparkline/VBarline.mjs.map +1 -1
  54. package/lib/components/VSparkline/VTrendline.mjs +3 -3
  55. package/lib/components/VSparkline/VTrendline.mjs.map +1 -1
  56. package/lib/components/VSwitch/VSwitch.mjs +3 -3
  57. package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
  58. package/lib/components/VTabs/index.d.mts +7 -7
  59. package/lib/components/VTooltip/VTooltip.mjs +3 -3
  60. package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
  61. package/lib/components/VWindow/index.d.mts +7 -7
  62. package/lib/components/index.d.mts +40 -40
  63. package/lib/composables/group.mjs +3 -3
  64. package/lib/composables/group.mjs.map +1 -1
  65. package/lib/composables/layout.mjs +3 -3
  66. package/lib/composables/layout.mjs.map +1 -1
  67. package/lib/composables/nested/nested.mjs +2 -2
  68. package/lib/composables/nested/nested.mjs.map +1 -1
  69. package/lib/composables/validation.mjs +3 -3
  70. package/lib/composables/validation.mjs.map +1 -1
  71. package/lib/entry-bundler.mjs +1 -1
  72. package/lib/framework.mjs +2 -3
  73. package/lib/framework.mjs.map +1 -1
  74. package/lib/index.d.mts +52 -52
  75. package/lib/util/getCurrentInstance.mjs +1 -15
  76. package/lib/util/getCurrentInstance.mjs.map +1 -1
  77. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"VField.mjs","names":["VFieldLabel","VExpandXTransition","VDefaultsProvider","useInputIcon","useBackgroundColor","useTextColor","makeComponentProps","makeFocusProps","useFocus","IconValue","LoaderSlot","makeLoaderProps","useLoader","useRtl","makeRoundedProps","useRounded","makeThemeProps","provideTheme","computed","ref","toRef","watch","animate","convertToUnit","EventProp","genericComponent","getUid","isOn","nullifyTransforms","pick","propsFactory","standardEasing","useRender","allowedVariants","makeVFieldProps","appendInnerIcon","bgColor","String","clearable","Boolean","clearIcon","type","default","active","centerAffix","undefined","color","baseColor","dirty","disabled","error","flat","label","persistentClear","prependInnerIcon","reverse","singleLine","variant","validator","v","includes","VField","name","inheritAttrs","props","id","emits","focused","value","setup","_ref","attrs","emit","slots","themeClasses","loaderClasses","focusClasses","isFocused","focus","blur","InputIcon","roundedClasses","rtlClasses","isActive","hasLabel","uid","messagesId","labelRef","floatingLabelRef","controlRef","isPlainOrUnderlined","backgroundColorClasses","backgroundColorStyles","textColorClasses","textColorStyles","val","el","$el","targetEl","requestAnimationFrame","rect","targetRect","getBoundingClientRect","x","y","height","targetWidth","width","Math","abs","maxWidth","style","getComputedStyle","targetStyle","duration","parseFloat","transitionDuration","scale","getPropertyValue","visibility","transform","easing","direction","finished","then","removeProperty","flush","slotProps","onClick","e","target","document","activeElement","preventDefault","onKeydownClear","key","stopPropagation","MouseEvent","isOutlined","hasPrepend","hasClear","clear","hasAppend","for","_createVNode","_mergeProps","class","loading","loader","_withDirectives","VIcon","icon","onKeydown","onFocus","onBlur","_vShow","_Fragment","filterFieldProps","keys","Object","filter","k"],"sources":["../../../src/components/VField/VField.tsx"],"sourcesContent":["// Styles\nimport './VField.sass'\n\n// Components\nimport { VFieldLabel } from './VFieldLabel'\nimport { VExpandXTransition } from '@/components/transitions'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { useInputIcon } from '@/components/VInput/InputIcon'\n\n// Composables\nimport { useBackgroundColor, useTextColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { IconValue } from '@/composables/icons'\nimport { LoaderSlot, makeLoaderProps, useLoader } from '@/composables/loader'\nimport { useRtl } from '@/composables/locale'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { computed, ref, toRef, watch } from 'vue'\nimport {\n animate,\n convertToUnit,\n EventProp,\n genericComponent,\n getUid,\n isOn,\n nullifyTransforms,\n pick,\n propsFactory,\n standardEasing,\n useRender,\n} from '@/util'\n\n// Types\nimport type { PropType, Ref } from 'vue'\nimport type { LoaderSlotProps } from '@/composables/loader'\nimport type { GenericProps } from '@/util'\n\nconst allowedVariants = ['underlined', 'outlined', 'filled', 'solo', 'solo-inverted', 'solo-filled', 'plain'] as const\ntype Variant = typeof allowedVariants[number]\n\nexport interface DefaultInputSlot {\n isActive: Ref<boolean>\n isFocused: Ref<boolean>\n controlRef: Ref<HTMLElement | undefined>\n focus: () => void\n blur: () => void\n}\n\nexport interface VFieldSlot extends DefaultInputSlot {\n props: Record<string, unknown>\n}\n\nexport const makeVFieldProps = propsFactory({\n appendInnerIcon: IconValue,\n bgColor: String,\n clearable: Boolean,\n clearIcon: {\n type: IconValue,\n default: '$clear',\n },\n active: Boolean,\n centerAffix: {\n type: Boolean,\n default: undefined,\n },\n color: String,\n baseColor: String,\n dirty: Boolean,\n disabled: {\n type: Boolean,\n default: null,\n },\n error: Boolean,\n flat: Boolean,\n label: String,\n persistentClear: Boolean,\n prependInnerIcon: IconValue,\n reverse: Boolean,\n singleLine: Boolean,\n variant: {\n type: String as PropType<Variant>,\n default: 'filled',\n validator: (v: any) => allowedVariants.includes(v),\n },\n\n 'onClick:clear': EventProp<[MouseEvent]>(),\n 'onClick:appendInner': EventProp<[MouseEvent]>(),\n 'onClick:prependInner': EventProp<[MouseEvent]>(),\n\n ...makeComponentProps(),\n ...makeLoaderProps(),\n ...makeRoundedProps(),\n ...makeThemeProps(),\n}, 'VField')\n\nexport type VFieldSlots = {\n clear: DefaultInputSlot & { props: Record<string, any> }\n 'prepend-inner': DefaultInputSlot\n 'append-inner': DefaultInputSlot\n label: DefaultInputSlot & { label: string | undefined, props: Record<string, any> }\n loader: LoaderSlotProps\n default: VFieldSlot\n}\n\nexport const VField = genericComponent<new <T>(\n props: {\n modelValue?: T\n 'onUpdate:modelValue'?: (value: T) => void\n },\n slots: VFieldSlots\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VField',\n\n inheritAttrs: false,\n\n props: {\n id: String,\n\n ...makeFocusProps(),\n ...makeVFieldProps(),\n },\n\n emits: {\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': (value: any) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const { themeClasses } = provideTheme(props)\n const { loaderClasses } = useLoader(props)\n const { focusClasses, isFocused, focus, blur } = useFocus(props)\n const { InputIcon } = useInputIcon(props)\n const { roundedClasses } = useRounded(props)\n const { rtlClasses } = useRtl()\n\n const isActive = computed(() => props.dirty || props.active)\n const hasLabel = computed(() => !props.singleLine && !!(props.label || slots.label))\n\n const uid = getUid()\n const id = computed(() => props.id || `input-${uid}`)\n const messagesId = computed(() => `${id.value}-messages`)\n\n const labelRef = ref<VFieldLabel>()\n const floatingLabelRef = ref<VFieldLabel>()\n const controlRef = ref<HTMLElement>()\n const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant))\n\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'bgColor'))\n const { textColorClasses, textColorStyles } = useTextColor(computed(() => {\n return props.error || props.disabled ? undefined\n : isActive.value && isFocused.value ? props.color\n : props.baseColor\n }))\n\n watch(isActive, val => {\n if (hasLabel.value) {\n const el: HTMLElement = labelRef.value!.$el\n const targetEl: HTMLElement = floatingLabelRef.value!.$el\n\n requestAnimationFrame(() => {\n const rect = nullifyTransforms(el)\n const targetRect = targetEl.getBoundingClientRect()\n\n const x = targetRect.x - rect.x\n const y = targetRect.y - rect.y - (rect.height / 2 - targetRect.height / 2)\n\n const targetWidth = targetRect.width / 0.75\n const width = Math.abs(targetWidth - rect.width) > 1\n ? { maxWidth: convertToUnit(targetWidth) }\n : undefined\n\n const style = getComputedStyle(el)\n const targetStyle = getComputedStyle(targetEl)\n const duration = parseFloat(style.transitionDuration) * 1000 || 150\n const scale = parseFloat(targetStyle.getPropertyValue('--v-field-label-scale'))\n const color = targetStyle.getPropertyValue('color')\n\n el.style.visibility = 'visible'\n targetEl.style.visibility = 'hidden'\n\n animate(el, {\n transform: `translate(${x}px, ${y}px) scale(${scale})`,\n color,\n ...width,\n }, {\n duration,\n easing: standardEasing,\n direction: val ? 'normal' : 'reverse',\n }).finished.then(() => {\n el.style.removeProperty('visibility')\n targetEl.style.removeProperty('visibility')\n })\n })\n }\n }, { flush: 'post' })\n\n const slotProps = computed<DefaultInputSlot>(() => ({\n isActive,\n isFocused,\n controlRef,\n blur,\n focus,\n }))\n\n function onClick (e: MouseEvent) {\n if (e.target !== document.activeElement) {\n e.preventDefault()\n }\n }\n\n function onKeydownClear (e: KeyboardEvent) {\n if (e.key !== 'Enter' && e.key !== ' ') return\n\n e.preventDefault()\n e.stopPropagation()\n\n props['onClick:clear']?.(new MouseEvent('click'))\n }\n\n useRender(() => {\n const isOutlined = props.variant === 'outlined'\n const hasPrepend = !!(slots['prepend-inner'] || props.prependInnerIcon)\n const hasClear = !!(props.clearable || slots.clear)\n const hasAppend = !!(slots['append-inner'] || props.appendInnerIcon || hasClear)\n const label = () => (\n slots.label\n ? slots.label({\n ...slotProps.value,\n label: props.label,\n props: { for: id.value },\n })\n : props.label\n )\n\n return (\n <div\n class={[\n 'v-field',\n {\n 'v-field--active': isActive.value,\n 'v-field--appended': hasAppend,\n 'v-field--center-affix': props.centerAffix ?? !isPlainOrUnderlined.value,\n 'v-field--disabled': props.disabled,\n 'v-field--dirty': props.dirty,\n 'v-field--error': props.error,\n 'v-field--flat': props.flat,\n 'v-field--has-background': !!props.bgColor,\n 'v-field--persistent-clear': props.persistentClear,\n 'v-field--prepended': hasPrepend,\n 'v-field--reverse': props.reverse,\n 'v-field--single-line': props.singleLine,\n 'v-field--no-label': !label(),\n [`v-field--variant-${props.variant}`]: true,\n },\n themeClasses.value,\n backgroundColorClasses.value,\n focusClasses.value,\n loaderClasses.value,\n roundedClasses.value,\n rtlClasses.value,\n props.class,\n ]}\n style={[\n backgroundColorStyles.value,\n props.style,\n ]}\n onClick={ onClick }\n { ...attrs }\n >\n <div class=\"v-field__overlay\" />\n\n <LoaderSlot\n name=\"v-field\"\n active={ !!props.loading }\n color={ props.error ? 'error' : (typeof props.loading === 'string' ? props.loading : props.color) }\n v-slots={{ default: slots.loader }}\n />\n\n { hasPrepend && (\n <div key=\"prepend\" class=\"v-field__prepend-inner\">\n { props.prependInnerIcon && (\n <InputIcon key=\"prepend-icon\" name=\"prependInner\" />\n )}\n\n { slots['prepend-inner']?.(slotProps.value) }\n </div>\n )}\n\n <div class=\"v-field__field\" data-no-activator=\"\">\n {['filled', 'solo', 'solo-inverted', 'solo-filled'].includes(props.variant) && hasLabel.value && (\n <VFieldLabel\n key=\"floating-label\"\n ref={ floatingLabelRef }\n class={[textColorClasses.value]}\n floating\n for={ id.value }\n style={ textColorStyles.value }\n >\n { label() }\n </VFieldLabel>\n )}\n\n { hasLabel.value && (\n <VFieldLabel key=\"label\" ref={ labelRef } for={ id.value }>\n { label() }\n </VFieldLabel>\n )}\n\n { slots.default?.({\n ...slotProps.value,\n props: {\n id: id.value,\n class: 'v-field__input',\n 'aria-describedby': messagesId.value,\n },\n focus,\n blur,\n } as VFieldSlot)}\n </div>\n\n { hasClear && (\n <VExpandXTransition key=\"clear\">\n <div\n class=\"v-field__clearable\"\n v-show={ props.dirty }\n onMousedown={ (e: MouseEvent) => {\n e.preventDefault()\n e.stopPropagation()\n }}\n >\n <VDefaultsProvider\n defaults={{\n VIcon: {\n icon: props.clearIcon,\n },\n }}\n >\n { slots.clear\n ? slots.clear({\n ...slotProps.value,\n props: {\n onKeydown: onKeydownClear,\n onFocus: focus,\n onBlur: blur,\n onClick: props['onClick:clear'],\n },\n })\n : (\n <InputIcon\n name=\"clear\"\n onKeydown={ onKeydownClear }\n onFocus={ focus }\n onBlur={ blur }\n />\n )}\n </VDefaultsProvider>\n </div>\n </VExpandXTransition>\n )}\n\n { hasAppend && (\n <div key=\"append\" class=\"v-field__append-inner\">\n { slots['append-inner']?.(slotProps.value) }\n\n { props.appendInnerIcon && (\n <InputIcon key=\"append-icon\" name=\"appendInner\" />\n )}\n </div>\n )}\n\n <div\n class={[\n 'v-field__outline',\n textColorClasses.value,\n ]}\n style={ textColorStyles.value }\n >\n { isOutlined && (\n <>\n <div class=\"v-field__outline__start\" />\n\n { hasLabel.value && (\n <div class=\"v-field__outline__notch\">\n <VFieldLabel ref={ floatingLabelRef } floating for={ id.value }>\n { label() }\n </VFieldLabel>\n </div>\n )}\n\n <div class=\"v-field__outline__end\" />\n </>\n )}\n\n { isPlainOrUnderlined.value && hasLabel.value && (\n <VFieldLabel ref={ floatingLabelRef } floating for={ id.value }>\n { label() }\n </VFieldLabel>\n )}\n </div>\n </div>\n )\n })\n\n return {\n controlRef,\n }\n },\n})\n\nexport type VField = InstanceType<typeof VField>\n\n// TODO: this is kinda slow, might be better to implicitly inherit props instead\nexport function filterFieldProps (attrs: Record<string, unknown>) {\n const keys = Object.keys(VField.props).filter(k => !isOn(k) && k !== 'class' && k !== 'style')\n return pick(attrs, keys)\n}\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,WAAW;AAA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AAK,OAAO,IAAIA,CAAC,KAAK,OAAO,CAAC;EAC9F,OAAOpI,IAAI,CAAC0C,KAAK,EAAEuF,IAAI,CAAC;AAC1B","ignoreList":[]}
1
+ {"version":3,"file":"VField.mjs","names":["VFieldLabel","VExpandXTransition","VDefaultsProvider","useInputIcon","useBackgroundColor","useTextColor","makeComponentProps","makeFocusProps","useFocus","IconValue","LoaderSlot","makeLoaderProps","useLoader","useRtl","makeRoundedProps","useRounded","makeThemeProps","provideTheme","computed","ref","toRef","useId","watch","animate","convertToUnit","EventProp","genericComponent","isOn","nullifyTransforms","pick","propsFactory","standardEasing","useRender","allowedVariants","makeVFieldProps","appendInnerIcon","bgColor","String","clearable","Boolean","clearIcon","type","default","active","centerAffix","undefined","color","baseColor","dirty","disabled","error","flat","label","persistentClear","prependInnerIcon","reverse","singleLine","variant","validator","v","includes","VField","name","inheritAttrs","props","id","emits","focused","value","setup","_ref","attrs","emit","slots","themeClasses","loaderClasses","focusClasses","isFocused","focus","blur","InputIcon","roundedClasses","rtlClasses","isActive","hasLabel","uid","messagesId","labelRef","floatingLabelRef","controlRef","isPlainOrUnderlined","backgroundColorClasses","backgroundColorStyles","textColorClasses","textColorStyles","val","el","$el","targetEl","requestAnimationFrame","rect","targetRect","getBoundingClientRect","x","y","height","targetWidth","width","Math","abs","maxWidth","style","getComputedStyle","targetStyle","duration","parseFloat","transitionDuration","scale","getPropertyValue","visibility","transform","easing","direction","finished","then","removeProperty","flush","slotProps","onClick","e","target","document","activeElement","preventDefault","onKeydownClear","key","stopPropagation","MouseEvent","isOutlined","hasPrepend","hasClear","clear","hasAppend","for","_createVNode","_mergeProps","class","loading","loader","_withDirectives","VIcon","icon","onKeydown","onFocus","onBlur","_vShow","_Fragment","filterFieldProps","keys","Object","filter","k"],"sources":["../../../src/components/VField/VField.tsx"],"sourcesContent":["// Styles\nimport './VField.sass'\n\n// Components\nimport { VFieldLabel } from './VFieldLabel'\nimport { VExpandXTransition } from '@/components/transitions'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { useInputIcon } from '@/components/VInput/InputIcon'\n\n// Composables\nimport { useBackgroundColor, useTextColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { IconValue } from '@/composables/icons'\nimport { LoaderSlot, makeLoaderProps, useLoader } from '@/composables/loader'\nimport { useRtl } from '@/composables/locale'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { computed, ref, toRef, useId, watch } from 'vue'\nimport {\n animate,\n convertToUnit,\n EventProp,\n genericComponent,\n isOn,\n nullifyTransforms,\n pick,\n propsFactory,\n standardEasing,\n useRender,\n} from '@/util'\n\n// Types\nimport type { PropType, Ref } from 'vue'\nimport type { LoaderSlotProps } from '@/composables/loader'\nimport type { GenericProps } from '@/util'\n\nconst allowedVariants = ['underlined', 'outlined', 'filled', 'solo', 'solo-inverted', 'solo-filled', 'plain'] as const\ntype Variant = typeof allowedVariants[number]\n\nexport interface DefaultInputSlot {\n isActive: Ref<boolean>\n isFocused: Ref<boolean>\n controlRef: Ref<HTMLElement | undefined>\n focus: () => void\n blur: () => void\n}\n\nexport interface VFieldSlot extends DefaultInputSlot {\n props: Record<string, unknown>\n}\n\nexport const makeVFieldProps = propsFactory({\n appendInnerIcon: IconValue,\n bgColor: String,\n clearable: Boolean,\n clearIcon: {\n type: IconValue,\n default: '$clear',\n },\n active: Boolean,\n centerAffix: {\n type: Boolean,\n default: undefined,\n },\n color: String,\n baseColor: String,\n dirty: Boolean,\n disabled: {\n type: Boolean,\n default: null,\n },\n error: Boolean,\n flat: Boolean,\n label: String,\n persistentClear: Boolean,\n prependInnerIcon: IconValue,\n reverse: Boolean,\n singleLine: Boolean,\n variant: {\n type: String as PropType<Variant>,\n default: 'filled',\n validator: (v: any) => allowedVariants.includes(v),\n },\n\n 'onClick:clear': EventProp<[MouseEvent]>(),\n 'onClick:appendInner': EventProp<[MouseEvent]>(),\n 'onClick:prependInner': EventProp<[MouseEvent]>(),\n\n ...makeComponentProps(),\n ...makeLoaderProps(),\n ...makeRoundedProps(),\n ...makeThemeProps(),\n}, 'VField')\n\nexport type VFieldSlots = {\n clear: DefaultInputSlot & { props: Record<string, any> }\n 'prepend-inner': DefaultInputSlot\n 'append-inner': DefaultInputSlot\n label: DefaultInputSlot & { label: string | undefined, props: Record<string, any> }\n loader: LoaderSlotProps\n default: VFieldSlot\n}\n\nexport const VField = genericComponent<new <T>(\n props: {\n modelValue?: T\n 'onUpdate:modelValue'?: (value: T) => void\n },\n slots: VFieldSlots\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VField',\n\n inheritAttrs: false,\n\n props: {\n id: String,\n\n ...makeFocusProps(),\n ...makeVFieldProps(),\n },\n\n emits: {\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': (value: any) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const { themeClasses } = provideTheme(props)\n const { loaderClasses } = useLoader(props)\n const { focusClasses, isFocused, focus, blur } = useFocus(props)\n const { InputIcon } = useInputIcon(props)\n const { roundedClasses } = useRounded(props)\n const { rtlClasses } = useRtl()\n\n const isActive = computed(() => props.dirty || props.active)\n const hasLabel = computed(() => !props.singleLine && !!(props.label || slots.label))\n\n const uid = useId()\n const id = computed(() => props.id || `input-${uid}`)\n const messagesId = computed(() => `${id.value}-messages`)\n\n const labelRef = ref<VFieldLabel>()\n const floatingLabelRef = ref<VFieldLabel>()\n const controlRef = ref<HTMLElement>()\n const isPlainOrUnderlined = computed(() => ['plain', 'underlined'].includes(props.variant))\n\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'bgColor'))\n const { textColorClasses, textColorStyles } = useTextColor(computed(() => {\n return props.error || props.disabled ? undefined\n : isActive.value && isFocused.value ? props.color\n : props.baseColor\n }))\n\n watch(isActive, val => {\n if (hasLabel.value) {\n const el: HTMLElement = labelRef.value!.$el\n const targetEl: HTMLElement = floatingLabelRef.value!.$el\n\n requestAnimationFrame(() => {\n const rect = nullifyTransforms(el)\n const targetRect = targetEl.getBoundingClientRect()\n\n const x = targetRect.x - rect.x\n const y = targetRect.y - rect.y - (rect.height / 2 - targetRect.height / 2)\n\n const targetWidth = targetRect.width / 0.75\n const width = Math.abs(targetWidth - rect.width) > 1\n ? { maxWidth: convertToUnit(targetWidth) }\n : undefined\n\n const style = getComputedStyle(el)\n const targetStyle = getComputedStyle(targetEl)\n const duration = parseFloat(style.transitionDuration) * 1000 || 150\n const scale = parseFloat(targetStyle.getPropertyValue('--v-field-label-scale'))\n const color = targetStyle.getPropertyValue('color')\n\n el.style.visibility = 'visible'\n targetEl.style.visibility = 'hidden'\n\n animate(el, {\n transform: `translate(${x}px, ${y}px) scale(${scale})`,\n color,\n ...width,\n }, {\n duration,\n easing: standardEasing,\n direction: val ? 'normal' : 'reverse',\n }).finished.then(() => {\n el.style.removeProperty('visibility')\n targetEl.style.removeProperty('visibility')\n })\n })\n }\n }, { flush: 'post' })\n\n const slotProps = computed<DefaultInputSlot>(() => ({\n isActive,\n isFocused,\n controlRef,\n blur,\n focus,\n }))\n\n function onClick (e: MouseEvent) {\n if (e.target !== document.activeElement) {\n e.preventDefault()\n }\n }\n\n function onKeydownClear (e: KeyboardEvent) {\n if (e.key !== 'Enter' && e.key !== ' ') return\n\n e.preventDefault()\n e.stopPropagation()\n\n props['onClick:clear']?.(new MouseEvent('click'))\n }\n\n useRender(() => {\n const isOutlined = props.variant === 'outlined'\n const hasPrepend = !!(slots['prepend-inner'] || props.prependInnerIcon)\n const hasClear = !!(props.clearable || slots.clear)\n const hasAppend = !!(slots['append-inner'] || props.appendInnerIcon || hasClear)\n const label = () => (\n slots.label\n ? slots.label({\n ...slotProps.value,\n label: props.label,\n props: { for: id.value },\n })\n : props.label\n )\n\n return (\n <div\n class={[\n 'v-field',\n {\n 'v-field--active': isActive.value,\n 'v-field--appended': hasAppend,\n 'v-field--center-affix': props.centerAffix ?? !isPlainOrUnderlined.value,\n 'v-field--disabled': props.disabled,\n 'v-field--dirty': props.dirty,\n 'v-field--error': props.error,\n 'v-field--flat': props.flat,\n 'v-field--has-background': !!props.bgColor,\n 'v-field--persistent-clear': props.persistentClear,\n 'v-field--prepended': hasPrepend,\n 'v-field--reverse': props.reverse,\n 'v-field--single-line': props.singleLine,\n 'v-field--no-label': !label(),\n [`v-field--variant-${props.variant}`]: true,\n },\n themeClasses.value,\n backgroundColorClasses.value,\n focusClasses.value,\n loaderClasses.value,\n roundedClasses.value,\n rtlClasses.value,\n props.class,\n ]}\n style={[\n backgroundColorStyles.value,\n props.style,\n ]}\n onClick={ onClick }\n { ...attrs }\n >\n <div class=\"v-field__overlay\" />\n\n <LoaderSlot\n name=\"v-field\"\n active={ !!props.loading }\n color={ props.error ? 'error' : (typeof props.loading === 'string' ? props.loading : props.color) }\n v-slots={{ default: slots.loader }}\n />\n\n { hasPrepend && (\n <div key=\"prepend\" class=\"v-field__prepend-inner\">\n { props.prependInnerIcon && (\n <InputIcon key=\"prepend-icon\" name=\"prependInner\" />\n )}\n\n { slots['prepend-inner']?.(slotProps.value) }\n </div>\n )}\n\n <div class=\"v-field__field\" data-no-activator=\"\">\n {['filled', 'solo', 'solo-inverted', 'solo-filled'].includes(props.variant) && hasLabel.value && (\n <VFieldLabel\n key=\"floating-label\"\n ref={ floatingLabelRef }\n class={[textColorClasses.value]}\n floating\n for={ id.value }\n style={ textColorStyles.value }\n >\n { label() }\n </VFieldLabel>\n )}\n\n { hasLabel.value && (\n <VFieldLabel key=\"label\" ref={ labelRef } for={ id.value }>\n { label() }\n </VFieldLabel>\n )}\n\n { slots.default?.({\n ...slotProps.value,\n props: {\n id: id.value,\n class: 'v-field__input',\n 'aria-describedby': messagesId.value,\n },\n focus,\n blur,\n } as VFieldSlot)}\n </div>\n\n { hasClear && (\n <VExpandXTransition key=\"clear\">\n <div\n class=\"v-field__clearable\"\n v-show={ props.dirty }\n onMousedown={ (e: MouseEvent) => {\n e.preventDefault()\n e.stopPropagation()\n }}\n >\n <VDefaultsProvider\n defaults={{\n VIcon: {\n icon: props.clearIcon,\n },\n }}\n >\n { slots.clear\n ? slots.clear({\n ...slotProps.value,\n props: {\n onKeydown: onKeydownClear,\n onFocus: focus,\n onBlur: blur,\n onClick: props['onClick:clear'],\n },\n })\n : (\n <InputIcon\n name=\"clear\"\n onKeydown={ onKeydownClear }\n onFocus={ focus }\n onBlur={ blur }\n />\n )}\n </VDefaultsProvider>\n </div>\n </VExpandXTransition>\n )}\n\n { hasAppend && (\n <div key=\"append\" class=\"v-field__append-inner\">\n { slots['append-inner']?.(slotProps.value) }\n\n { props.appendInnerIcon && (\n <InputIcon key=\"append-icon\" name=\"appendInner\" />\n )}\n </div>\n )}\n\n <div\n class={[\n 'v-field__outline',\n textColorClasses.value,\n ]}\n style={ textColorStyles.value }\n >\n { isOutlined && (\n <>\n <div class=\"v-field__outline__start\" />\n\n { hasLabel.value && (\n <div class=\"v-field__outline__notch\">\n <VFieldLabel ref={ floatingLabelRef } floating for={ id.value }>\n { label() }\n </VFieldLabel>\n </div>\n )}\n\n <div class=\"v-field__outline__end\" />\n </>\n )}\n\n { isPlainOrUnderlined.value && hasLabel.value && (\n <VFieldLabel ref={ floatingLabelRef } floating for={ id.value }>\n { label() }\n </VFieldLabel>\n )}\n </div>\n </div>\n )\n })\n\n return {\n controlRef,\n }\n },\n})\n\nexport type VField = InstanceType<typeof VField>\n\n// TODO: this is kinda slow, might be better to implicitly inherit props instead\nexport function filterFieldProps (attrs: Record<string, unknown>) {\n const keys = Object.keys(VField.props).filter(k => !isOn(k) && k !== 'class' && k !== 'style')\n return pick(attrs, keys)\n}\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,WAAW;AAAA,SACXC,kBAAkB;AAAA,SAClBC,iBAAiB;AAAA,SACjBC,YAAY,mCAErB;AAAA,SACSC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,kBAAkB;AAAA,SAClBC,cAAc,EA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} from "../../composables/icons.mjs";
12
12
  import { useRtl } from "../../composables/locale.mjs";
13
13
  import { makeThemeProps, provideTheme } from "../../composables/theme.mjs";
14
14
  import { makeValidationProps, useValidation } from "../../composables/validation.mjs"; // Utilities
15
- import { computed } from 'vue';
16
- import { EventProp, genericComponent, getUid, only, propsFactory, useRender } from "../../util/index.mjs"; // Types
15
+ import { computed, useId } from 'vue';
16
+ import { EventProp, genericComponent, only, propsFactory, useRender } from "../../util/index.mjs"; // Types
17
17
  export const makeVInputProps = propsFactory({
18
18
  id: String,
19
19
  appendIcon: IconValue,
@@ -72,7 +72,7 @@ export const VInput = genericComponent()({
72
72
  const {
73
73
  InputIcon
74
74
  } = useInputIcon(props);
75
- const uid = getUid();
75
+ const uid = useId();
76
76
  const id = computed(() => props.id || `input-${uid}`);
77
77
  const messagesId = computed(() => `${id.value}-messages`);
78
78
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"VInput.mjs","names":["useInputIcon","VMessages","makeComponentProps","makeDensityProps","useDensity","makeDimensionProps","useDimension","IconValue","useRtl","makeThemeProps","provideTheme","makeValidationProps","useValidation","computed","EventProp","genericComponent","getUid","only","propsFactory","useRender","makeVInputProps","id","String","appendIcon","centerAffix","type","Boolean","default","prependIcon","hideDetails","hideSpinButtons","hint","persistentHint","messages","Array","direction","validator","v","includes","VInput","name","props","emits","value","setup","_ref","attrs","slots","emit","densityClasses","dimensionStyles","themeClasses","rtlClasses","InputIcon","uid","messagesId","errorMessages","isDirty","isDisabled","isReadonly","isPristine","isValid","isValidating","reset","resetValidation","validate","validationClasses","slotProps","length","focused","hasPrepend","prepend","hasAppend","append","hasMessages","hasDetails","details","_createVNode","class","style","message"],"sources":["../../../src/components/VInput/VInput.tsx"],"sourcesContent":["// Styles\nimport './VInput.sass'\n\n// Components\nimport { useInputIcon } from '@/components/VInput/InputIcon'\nimport { VMessages } from '@/components/VMessages/VMessages'\n\n// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { IconValue } from '@/composables/icons'\nimport { useRtl } from '@/composables/locale'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { makeValidationProps, useValidation } from '@/composables/validation'\n\n// Utilities\nimport { computed } from 'vue'\nimport { EventProp, genericComponent, getUid, only, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { ComputedRef, PropType, Ref } from 'vue'\nimport type { VMessageSlot } from '@/components/VMessages/VMessages'\nimport type { GenericProps } from '@/util'\n\nexport interface VInputSlot {\n id: ComputedRef<string>\n messagesId: ComputedRef<string>\n isDirty: ComputedRef<boolean>\n isDisabled: ComputedRef<boolean>\n isReadonly: ComputedRef<boolean>\n isPristine: Ref<boolean>\n isValid: ComputedRef<boolean | null>\n isValidating: Ref<boolean>\n reset: () => void\n resetValidation: () => void\n validate: () => void\n}\n\nexport const makeVInputProps = propsFactory({\n id: String,\n appendIcon: IconValue,\n centerAffix: {\n type: Boolean,\n default: true,\n },\n prependIcon: IconValue,\n hideDetails: [Boolean, String] as PropType<boolean | 'auto'>,\n hideSpinButtons: Boolean,\n hint: String,\n persistentHint: Boolean,\n messages: {\n type: [Array, String] as PropType<string | readonly string[]>,\n default: () => ([]),\n },\n direction: {\n type: String as PropType<'horizontal' | 'vertical'>,\n default: 'horizontal',\n validator: (v: any) => ['horizontal', 'vertical'].includes(v),\n },\n\n 'onClick:prepend': EventProp<[MouseEvent]>(),\n 'onClick:append': EventProp<[MouseEvent]>(),\n\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...only(makeDimensionProps(), [\n 'maxWidth',\n 'minWidth',\n 'width',\n ]),\n ...makeThemeProps(),\n ...makeValidationProps(),\n}, 'VInput')\n\nexport type VInputSlots = {\n default: VInputSlot\n prepend: VInputSlot\n append: VInputSlot\n details: VInputSlot\n message: VMessageSlot\n}\n\nexport const VInput = genericComponent<new <T>(\n props: {\n modelValue?: T | null\n 'onUpdate:modelValue'?: (value: T | null) => void\n },\n slots: VInputSlots,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VInput',\n\n props: {\n ...makeVInputProps(),\n },\n\n emits: {\n 'update:modelValue': (value: any) => true,\n },\n\n setup (props, { attrs, slots, emit }) {\n const { densityClasses } = useDensity(props)\n const { dimensionStyles } = useDimension(props)\n const { themeClasses } = provideTheme(props)\n const { rtlClasses } = useRtl()\n const { InputIcon } = useInputIcon(props)\n\n const uid = getUid()\n const id = computed(() => props.id || `input-${uid}`)\n const messagesId = computed(() => `${id.value}-messages`)\n\n const {\n errorMessages,\n isDirty,\n isDisabled,\n isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate,\n validationClasses,\n } = useValidation(props, 'v-input', id)\n\n const slotProps = computed<VInputSlot>(() => ({\n id,\n messagesId,\n isDirty,\n isDisabled,\n isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate,\n }))\n\n const messages = computed(() => {\n if (props.errorMessages?.length || (!isPristine.value && errorMessages.value.length)) {\n return errorMessages.value\n } else if (props.hint && (props.persistentHint || props.focused)) {\n return props.hint\n } else {\n return props.messages\n }\n })\n\n useRender(() => {\n const hasPrepend = !!(slots.prepend || props.prependIcon)\n const hasAppend = !!(slots.append || props.appendIcon)\n const hasMessages = messages.value.length > 0\n const hasDetails = !props.hideDetails || (\n props.hideDetails === 'auto' &&\n (hasMessages || !!slots.details)\n )\n\n return (\n <div\n class={[\n 'v-input',\n `v-input--${props.direction}`,\n {\n 'v-input--center-affix': props.centerAffix,\n 'v-input--hide-spin-buttons': props.hideSpinButtons,\n },\n densityClasses.value,\n themeClasses.value,\n rtlClasses.value,\n validationClasses.value,\n props.class,\n ]}\n style={[\n dimensionStyles.value,\n props.style,\n ]}\n >\n { hasPrepend && (\n <div key=\"prepend\" class=\"v-input__prepend\">\n { slots.prepend?.(slotProps.value) }\n\n { props.prependIcon && (\n <InputIcon\n key=\"prepend-icon\"\n name=\"prepend\"\n />\n )}\n </div>\n )}\n\n { slots.default && (\n <div class=\"v-input__control\">\n { slots.default?.(slotProps.value) }\n </div>\n )}\n\n { hasAppend && (\n <div key=\"append\" class=\"v-input__append\">\n { props.appendIcon && (\n <InputIcon\n key=\"append-icon\"\n name=\"append\"\n />\n )}\n\n { slots.append?.(slotProps.value) }\n </div>\n )}\n\n { hasDetails && (\n <div class=\"v-input__details\">\n <VMessages\n id={ messagesId.value }\n active={ hasMessages }\n messages={ messages.value }\n v-slots={{ message: slots.message }}\n />\n\n { slots.details?.(slotProps.value) }\n </div>\n )}\n </div>\n )\n })\n\n return {\n reset,\n resetValidation,\n validate,\n isValid,\n errorMessages,\n }\n },\n})\n\nexport type VInput = InstanceType<typeof VInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,YAAY;AAAA,SACZC,SAAS,sCAElB;AAAA,SACSC,kBAAkB;AAAA,SAClBC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,SAAS;AAAA,SACTC,MAAM;AAAA,SACNC,cAAc,EAAEC,YAAY;AAAA,SAC5BC,mBAAmB,EAAEC,aAAa,4CAE3C;AACA,SAASC,QAAQ,QAAQ,KAAK;AAAA,SACrBC,SAAS,EAAEC,gBAAgB,EAAEC,MAAM,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAE3E;AAmBA,OAAO,MAAMC,eAAe,GAAGF,YAAY,CAAC;EAC1CG,EAAE,EAAEC,MAAM;EACVC,UAAU,EAAEhB,SAAS;EACrBiB,WAAW,EAAE;IACXC,IAAI,EAAEC,OAAO;IACbC,OAAO,EAAE;EACX,CAAC;EACDC,WAAW,EAAErB,SAAS;EACtBsB,WAAW,EAAE,CAACH,OAAO,EAAEJ,MAAM,CAA+B;EAC5DQ,eAAe,EAAEJ,OAAO;EACxBK,IAAI,EAAET,MAAM;EACZU,cAAc,EAAEN,OAAO;EACvBO,QAAQ,EAAE;IACRR,IAAI,EAAE,CAACS,KAAK,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A,MAGDsD,UAAU,CAACZ,KAAK;QAAA,UACZ+B,WAAW;QAAA,YACTzC,QAAQ,CAACU;MAAK,GAChB;QAAEqC,OAAO,EAAEjC,KAAK,CAACiC;MAAQ,CAAC,GAGnCjC,KAAK,CAAC6B,OAAO,GAAGT,SAAS,CAACxB,KAAK,CAAC,EAErC;IAGP,CAAC,CAAC;IAEF,OAAO;MACLoB,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRJ,OAAO;MACPL;IACF,CAAC;EACH;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"VInput.mjs","names":["useInputIcon","VMessages","makeComponentProps","makeDensityProps","useDensity","makeDimensionProps","useDimension","IconValue","useRtl","makeThemeProps","provideTheme","makeValidationProps","useValidation","computed","useId","EventProp","genericComponent","only","propsFactory","useRender","makeVInputProps","id","String","appendIcon","centerAffix","type","Boolean","default","prependIcon","hideDetails","hideSpinButtons","hint","persistentHint","messages","Array","direction","validator","v","includes","VInput","name","props","emits","value","setup","_ref","attrs","slots","emit","densityClasses","dimensionStyles","themeClasses","rtlClasses","InputIcon","uid","messagesId","errorMessages","isDirty","isDisabled","isReadonly","isPristine","isValid","isValidating","reset","resetValidation","validate","validationClasses","slotProps","length","focused","hasPrepend","prepend","hasAppend","append","hasMessages","hasDetails","details","_createVNode","class","style","message"],"sources":["../../../src/components/VInput/VInput.tsx"],"sourcesContent":["// Styles\nimport './VInput.sass'\n\n// Components\nimport { useInputIcon } from '@/components/VInput/InputIcon'\nimport { VMessages } from '@/components/VMessages/VMessages'\n\n// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { IconValue } from '@/composables/icons'\nimport { useRtl } from '@/composables/locale'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { makeValidationProps, useValidation } from '@/composables/validation'\n\n// Utilities\nimport { computed, useId } from 'vue'\nimport { EventProp, genericComponent, only, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { ComputedRef, PropType, Ref } from 'vue'\nimport type { VMessageSlot } from '@/components/VMessages/VMessages'\nimport type { GenericProps } from '@/util'\n\nexport interface VInputSlot {\n id: ComputedRef<string>\n messagesId: ComputedRef<string>\n isDirty: ComputedRef<boolean>\n isDisabled: ComputedRef<boolean>\n isReadonly: ComputedRef<boolean>\n isPristine: Ref<boolean>\n isValid: ComputedRef<boolean | null>\n isValidating: Ref<boolean>\n reset: () => void\n resetValidation: () => void\n validate: () => void\n}\n\nexport const makeVInputProps = propsFactory({\n id: String,\n appendIcon: IconValue,\n centerAffix: {\n type: Boolean,\n default: true,\n },\n prependIcon: IconValue,\n hideDetails: [Boolean, String] as PropType<boolean | 'auto'>,\n hideSpinButtons: Boolean,\n hint: String,\n persistentHint: Boolean,\n messages: {\n type: [Array, String] as PropType<string | readonly string[]>,\n default: () => ([]),\n },\n direction: {\n type: String as PropType<'horizontal' | 'vertical'>,\n default: 'horizontal',\n validator: (v: any) => ['horizontal', 'vertical'].includes(v),\n },\n\n 'onClick:prepend': EventProp<[MouseEvent]>(),\n 'onClick:append': EventProp<[MouseEvent]>(),\n\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...only(makeDimensionProps(), [\n 'maxWidth',\n 'minWidth',\n 'width',\n ]),\n ...makeThemeProps(),\n ...makeValidationProps(),\n}, 'VInput')\n\nexport type VInputSlots = {\n default: VInputSlot\n prepend: VInputSlot\n append: VInputSlot\n details: VInputSlot\n message: VMessageSlot\n}\n\nexport const VInput = genericComponent<new <T>(\n props: {\n modelValue?: T | null\n 'onUpdate:modelValue'?: (value: T | null) => void\n },\n slots: VInputSlots,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VInput',\n\n props: {\n ...makeVInputProps(),\n },\n\n emits: {\n 'update:modelValue': (value: any) => true,\n },\n\n setup (props, { attrs, slots, emit }) {\n const { densityClasses } = useDensity(props)\n const { dimensionStyles } = useDimension(props)\n const { themeClasses } = provideTheme(props)\n const { rtlClasses } = useRtl()\n const { InputIcon } = useInputIcon(props)\n\n const uid = useId()\n const id = computed(() => props.id || `input-${uid}`)\n const messagesId = computed(() => `${id.value}-messages`)\n\n const {\n errorMessages,\n isDirty,\n isDisabled,\n isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate,\n validationClasses,\n } = useValidation(props, 'v-input', id)\n\n const slotProps = computed<VInputSlot>(() => ({\n id,\n messagesId,\n isDirty,\n isDisabled,\n isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate,\n }))\n\n const messages = computed(() => {\n if (props.errorMessages?.length || (!isPristine.value && errorMessages.value.length)) {\n return errorMessages.value\n } else if (props.hint && (props.persistentHint || props.focused)) {\n return props.hint\n } else {\n return props.messages\n }\n })\n\n useRender(() => {\n const hasPrepend = !!(slots.prepend || props.prependIcon)\n const hasAppend = !!(slots.append || props.appendIcon)\n const hasMessages = messages.value.length > 0\n const hasDetails = !props.hideDetails || (\n props.hideDetails === 'auto' &&\n (hasMessages || !!slots.details)\n )\n\n return (\n <div\n class={[\n 'v-input',\n `v-input--${props.direction}`,\n {\n 'v-input--center-affix': props.centerAffix,\n 'v-input--hide-spin-buttons': props.hideSpinButtons,\n },\n densityClasses.value,\n themeClasses.value,\n rtlClasses.value,\n validationClasses.value,\n props.class,\n ]}\n style={[\n dimensionStyles.value,\n props.style,\n ]}\n >\n { hasPrepend && (\n <div key=\"prepend\" class=\"v-input__prepend\">\n { slots.prepend?.(slotProps.value) }\n\n { props.prependIcon && (\n <InputIcon\n key=\"prepend-icon\"\n name=\"prepend\"\n />\n )}\n </div>\n )}\n\n { slots.default && (\n <div class=\"v-input__control\">\n { slots.default?.(slotProps.value) }\n </div>\n )}\n\n { hasAppend && (\n <div key=\"append\" class=\"v-input__append\">\n { props.appendIcon && (\n <InputIcon\n key=\"append-icon\"\n name=\"append\"\n />\n )}\n\n { slots.append?.(slotProps.value) }\n </div>\n )}\n\n { hasDetails && (\n <div class=\"v-input__details\">\n <VMessages\n id={ messagesId.value }\n active={ hasMessages }\n messages={ messages.value }\n v-slots={{ message: slots.message }}\n />\n\n { slots.details?.(slotProps.value) }\n </div>\n )}\n </div>\n )\n })\n\n return {\n reset,\n resetValidation,\n validate,\n isValid,\n errorMessages,\n }\n },\n})\n\nexport type VInput = InstanceType<typeof VInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,YAAY;AAAA,SACZC,SAAS,sCAElB;AAAA,SACSC,kBAAkB;AAAA,SAClBC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,kBAAkB,EAAEC,YAAY;AAAA,SAChCC,SAAS;AAAA,SACTC,MAAM;AAAA,SACNC,cAAc,EAAEC,YAAY;AAAA,SAC5BC,mBAAmB,EAAEC,aAAa,4CAE3C;AACA,SAASC,QAAQ,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC5BC,SAAS,EAAEC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAEnE;AAmBA,OAAO,MAAMC,eAAe,GAAGF,YAAY,CAAC;EAC1CG,EAAE,EAAEC,MAAM;EACVC,UAAU,EAAEhB,SAAS;EACrBiB,WAAW,EAAE;IACXC,IAAI,EAAEC,OAAO;IACbC,OAAO,EAAE;EACX,CAAC;EACDC,WAAW,EAAErB,SAAS;EACtBsB,WAAW,EAAE,CAACH,OAAO,EAAEJ,MAAM,CAA+B;EAC5DQ,eAAe,EAAEJ,OAAO;EACxBK,IAAI,EAAET,MAAM;EACZU,cAAc,EAAEN,OAAO;EACvBO,QAAQ,EAAE;IACRR,IAAI,EAAE,CAACS,KAAK,EAAEZ,MAAM,CAAyC;IAC7DK,OAAO,EAAEA,CAAA,KAAO;EAClB,CAAC;EACDQ,SAAS,EAAE;IACTV,IAAI,EAAEH,MAA6C;IACnDK,OAAO,EAAE,YAAY;IACrBS,SAAS,EAAGC,CAAM,IAAK,CAAC,YAAY,EAAE,UAAU,CAAC,CAACC,QAAQ,CAACD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AAC;IAEF,OAAO;MACLoB,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRJ,OAAO;MACPL;IACF,CAAC;EACH;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"VItemGroup.mjs","names":["makeComponentProps","makeGroupProps","useGroup","makeTagProps","makeThemeProps","provideTheme","genericComponent","propsFactory","VItemGroupSymbol","Symbol","for","makeVItemGroupProps","selectedClass","VItemGroup","name","props","emits","value","setup","_ref","slots","themeClasses","isSelected","select","next","prev","selected","_createVNode","tag","class","style","default"],"sources":["../../../src/components/VItemGroup/VItemGroup.tsx"],"sourcesContent":["// Styles\nimport './VItemGroup.sass'\n\n// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { makeGroupProps, useGroup } from '@/composables/group'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { genericComponent, propsFactory } from '@/util'\n\n// Types\nimport type { GenericProps } from '@/util'\n\nexport const VItemGroupSymbol = Symbol.for('vuetify:v-item-group')\n\nexport const makeVItemGroupProps = propsFactory({\n ...makeComponentProps(),\n ...makeGroupProps({\n selectedClass: 'v-item--selected',\n }),\n ...makeTagProps(),\n ...makeThemeProps(),\n}, 'VItemGroup')\n\ntype VItemGroupSlots = {\n default: {\n isSelected: (id: number) => boolean\n select: (id: number, value: boolean) => void\n next: () => void\n prev: () => void\n selected: readonly number[]\n }\n}\n\nexport const VItemGroup = genericComponent<new <T>(\n props: {\n modelValue?: T\n 'onUpdate:modelValue'?: (value: T) => void\n },\n slots: VItemGroupSlots,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VItemGroup',\n\n props: makeVItemGroupProps(),\n\n emits: {\n 'update:modelValue': (value: any) => true,\n },\n\n setup (props, { slots }) {\n const { themeClasses } = provideTheme(props)\n const { isSelected, select, next, prev, selected } = useGroup(props, VItemGroupSymbol)\n\n return () => (\n <props.tag\n class={[\n 'v-item-group',\n themeClasses.value,\n props.class,\n ]}\n style={ props.style }\n >\n { slots.default?.({\n isSelected,\n select,\n next,\n prev,\n selected: selected.value,\n })}\n </props.tag>\n )\n },\n})\n\nexport type VItemGroup = InstanceType<typeof VItemGroup>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,kBAAkB;AAAA,SAClBC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY,uCAErC;AAAA,SACSC,gBAAgB,EAAEC,YAAY,gCAEvC;AAGA,OAAO,MAAMC,gBAAgB,GAAGC,MAAM,CAACC,GAAG,CAAC,sBAAsB,CAAC;AAElE,OAAO,MAAMC,mBAAmB,GAAGJ,YAAY,CAAC;EAC9C,GAAGP,kBAAkB,CAAC,CAAC;EACvB,GAAGC,cAAc,CAAC;IAChBW,aAAa,EAAE;EACjB,CAAC,CAAC;EACF,GAAGT,YAAY,CAAC,CAAC;EACjB,GAAGC,cAAc,CAAC;AACpB,CAAC,EAAE,YAAY,CAAC;AAYhB,OAAO,MAAMS,UAAU,GAAGP,gBAAgB,CAMK,CAAC,CAAC;EAC/CQ,IAAI,EAAE,YAAY;EAElBC,KAAK,EAAEJ,mBAAmB,CAAC,CAAC;EAE5BK,KAAK,EAAE;IACL,mBAAmB,EAAGC,KAAU,IAAK;EACvC,CAAC;EAEDC,KAAKA,CAAEH,KAAK,EAAAI,IAAA,EAAa;IAAA,IAAX;MAAEC;IAAM,CAAC,GAAAD,IAAA;IACrB,MAAM;MAAEE;IAAa,CAAC,GAAGhB,YAAY,CAACU,KAAK,CAAC;IAC5C,MAAM;MAAEO,UAAU;MAAEC,MAAM;MAAEC,IAAI;MAAEC,IAAI;MAAEC;IAAS,CAAC,GAAGxB,QAAQ,CAACa,KAAK,EAAEP,gBAAgB,CAAC;IAEtF,OAAO,MAAAmB,YAAA,CAAAZ,KAAA,CAAAa,GAAA;MAAA,SAEI,CACL,cAAc,EACdP,YAAY,CAACJ,KAAK,EAClBF,KAAK,CAACc,KAAK,CACZ;MAAA,SACOd,KAAK,CAACe;IAAK;MAAAC,OAAA,EAAAA,CAAA,MAEjBX,KAAK,CAACW,OAAO,GAAG;QAChBT,UAAU;QACVC,MAAM;QACNC,IAAI;QACJC,IAAI;QACJC,QAAQ,EAAEA,QAAQ,CAACT;MACrB,CAAC,CAAC;IAAA,EAEL;EACH;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"VItemGroup.mjs","names":["makeComponentProps","makeGroupProps","useGroup","makeTagProps","makeThemeProps","provideTheme","genericComponent","propsFactory","VItemGroupSymbol","Symbol","for","makeVItemGroupProps","selectedClass","VItemGroup","name","props","emits","value","setup","_ref","slots","themeClasses","isSelected","select","next","prev","selected","_createVNode","tag","class","style","default"],"sources":["../../../src/components/VItemGroup/VItemGroup.tsx"],"sourcesContent":["// Styles\nimport './VItemGroup.sass'\n\n// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { makeGroupProps, useGroup } from '@/composables/group'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { genericComponent, propsFactory } from '@/util'\n\n// Types\nimport type { GenericProps } from '@/util'\n\nexport const VItemGroupSymbol = Symbol.for('vuetify:v-item-group')\n\nexport const makeVItemGroupProps = propsFactory({\n ...makeComponentProps(),\n ...makeGroupProps({\n selectedClass: 'v-item--selected',\n }),\n ...makeTagProps(),\n ...makeThemeProps(),\n}, 'VItemGroup')\n\ntype VItemGroupSlots = {\n default: {\n isSelected: (id: string) => boolean\n select: (id: string, value: boolean) => void\n next: () => void\n prev: () => void\n selected: readonly string[]\n }\n}\n\nexport const VItemGroup = genericComponent<new <T>(\n props: {\n modelValue?: T\n 'onUpdate:modelValue'?: (value: T) => void\n },\n slots: VItemGroupSlots,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VItemGroup',\n\n props: makeVItemGroupProps(),\n\n emits: {\n 'update:modelValue': (value: any) => true,\n },\n\n setup (props, { slots }) {\n const { themeClasses } = provideTheme(props)\n const { isSelected, select, next, prev, selected } = useGroup(props, VItemGroupSymbol)\n\n return () => (\n <props.tag\n class={[\n 'v-item-group',\n themeClasses.value,\n props.class,\n ]}\n style={ props.style }\n >\n { slots.default?.({\n isSelected,\n select,\n next,\n prev,\n selected: selected.value,\n })}\n </props.tag>\n )\n },\n})\n\nexport type VItemGroup = InstanceType<typeof VItemGroup>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,kBAAkB;AAAA,SAClBC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,YAAY;AAAA,SACZC,cAAc,EAAEC,YAAY,uCAErC;AAAA,SACSC,gBAAgB,EAAEC,YAAY,gCAEvC;AAGA,OAAO,MAAMC,gBAAgB,GAAGC,MAAM,CAACC,GAAG,CAAC,sBAAsB,CAAC;AAElE,OAAO,MAAMC,mBAAmB,GAAGJ,YAAY,CAAC;EAC9C,GAAGP,kBAAkB,CAAC,CAAC;EACvB,GAAGC,cAAc,CAAC;IAChBW,aAAa,EAAE;EACjB,CAAC,CAAC;EACF,GAAGT,YAAY,CAAC,CAAC;EACjB,GAAGC,cAAc,CAAC;AACpB,CAAC,EAAE,YAAY,CAAC;AAYhB,OAAO,MAAMS,UAAU,GAAGP,gBAAgB,CAMK,CAAC,CAAC;EAC/CQ,IAAI,EAAE,YAAY;EAElBC,KAAK,EAAEJ,mBAAmB,CAAC,CAAC;EAE5BK,KAAK,EAAE;IACL,mBAAmB,EAAGC,KAAU,IAAK;EACvC,CAAC;EAEDC,KAAKA,CAAEH,KAAK,EAAAI,IAAA,EAAa;IAAA,IAAX;MAAEC;IAAM,CAAC,GAAAD,IAAA;IACrB,MAAM;MAAEE;IAAa,CAAC,GAAGhB,YAAY,CAACU,KAAK,CAAC;IAC5C,MAAM;MAAEO,UAAU;MAAEC,MAAM;MAAEC,IAAI;MAAEC,IAAI;MAAEC;IAAS,CAAC,GAAGxB,QAAQ,CAACa,KAAK,EAAEP,gBAAgB,CAAC;IAEtF,OAAO,MAAAmB,YAAA,CAAAZ,KAAA,CAAAa,GAAA;MAAA,SAEI,CACL,cAAc,EACdP,YAAY,CAACJ,KAAK,EAClBF,KAAK,CAACc,KAAK,CACZ;MAAA,SACOd,KAAK,CAACe;IAAK;MAAAC,OAAA,EAAAA,CAAA,MAEjBX,KAAK,CAACW,OAAO,GAAG;QAChBT,UAAU;QACVC,MAAM;QACNC,IAAI;QACJC,IAAI;QACJC,QAAQ,EAAEA,QAAQ,CAACT;MACrB,CAAC,CAAC;IAAA,EAEL;EACH;AACF,CAAC,CAAC","ignoreList":[]}
@@ -34,11 +34,11 @@ type ClassValue = any;
34
34
 
35
35
  type VItemGroupSlots = {
36
36
  default: {
37
- isSelected: (id: number) => boolean;
38
- select: (id: number, value: boolean) => void;
37
+ isSelected: (id: string) => boolean;
38
+ select: (id: string, value: boolean) => void;
39
39
  next: () => void;
40
40
  prev: () => void;
41
- selected: readonly number[];
41
+ selected: readonly string[];
42
42
  };
43
43
  };
44
44
  declare const VItemGroup: {
@@ -63,11 +63,11 @@ declare const VItemGroup: {
63
63
  selectedClass: string;
64
64
  }, true, {}, vue.SlotsType<Partial<{
65
65
  default: (arg: {
66
- isSelected: (id: number) => boolean;
67
- select: (id: number, value: boolean) => void;
66
+ isSelected: (id: string) => boolean;
67
+ select: (id: string, value: boolean) => void;
68
68
  next: () => void;
69
69
  prev: () => void;
70
- selected: readonly number[];
70
+ selected: readonly string[];
71
71
  }) => vue.VNode[];
72
72
  }>>, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
73
73
  P: {};
@@ -118,11 +118,11 @@ declare const VItemGroup: {
118
118
  selectedClass: string;
119
119
  }, {}, string, vue.SlotsType<Partial<{
120
120
  default: (arg: {
121
- isSelected: (id: number) => boolean;
122
- select: (id: number, value: boolean) => void;
121
+ isSelected: (id: string) => boolean;
122
+ select: (id: string, value: boolean) => void;
123
123
  next: () => void;
124
124
  prev: () => void;
125
- selected: readonly number[];
125
+ selected: readonly string[];
126
126
  }) => vue.VNode[];
127
127
  }>>, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new <T>(props: {
128
128
  modelValue?: T;
@@ -11,9 +11,9 @@ import { forwardRefs } from "../../composables/forwardRefs.mjs";
11
11
  import { useRtl } from "../../composables/locale.mjs";
12
12
  import { useProxiedModel } from "../../composables/proxiedModel.mjs";
13
13
  import { useScopeId } from "../../composables/scopeId.mjs"; // Utilities
14
- import { computed, inject, mergeProps, nextTick, onBeforeUnmount, onDeactivated, provide, ref, shallowRef, watch } from 'vue';
14
+ import { computed, inject, mergeProps, nextTick, onBeforeUnmount, onDeactivated, provide, ref, shallowRef, useId, watch } from 'vue';
15
15
  import { VMenuSymbol } from "./shared.mjs";
16
- import { focusableChildren, focusChild, genericComponent, getNextElement, getUid, IN_BROWSER, isClickInsideElement, omit, propsFactory, useRender } from "../../util/index.mjs"; // Types
16
+ import { focusableChildren, focusChild, genericComponent, getNextElement, IN_BROWSER, isClickInsideElement, omit, propsFactory, useRender } from "../../util/index.mjs"; // Types
17
17
  export const makeVMenuProps = propsFactory({
18
18
  // TODO
19
19
  // disableKeys: Boolean,
@@ -49,7 +49,7 @@ export const VMenu = genericComponent()({
49
49
  const {
50
50
  isRtl
51
51
  } = useRtl();
52
- const uid = getUid();
52
+ const uid = useId();
53
53
  const id = computed(() => props.id || `v-menu-${uid}`);
54
54
  const overlay = ref();
55
55
  const parent = inject(VMenuSymbol, null);
@@ -1 +1 @@
1
- {"version":3,"file":"VMenu.mjs","names":["VDialogTransition","VDefaultsProvider","VOverlay","makeVOverlayProps","forwardRefs","useRtl","useProxiedModel","useScopeId","computed","inject","mergeProps","nextTick","onBeforeUnmount","onDeactivated","provide","ref","shallowRef","watch","VMenuSymbol","focusableChildren","focusChild","genericComponent","getNextElement","getUid","IN_BROWSER","isClickInsideElement","omit","propsFactory","useRender","makeVMenuProps","id","String","submenu","Boolean","closeDelay","closeOnContentClick","locationStrategy","location","undefined","openDelay","scrim","scrollStrategy","transition","component","VMenu","name","props","emits","value","setup","_ref","slots","isActive","scopeId","isRtl","uid","overlay","parent","openChildren","Set","register","add","unregister","delete","closeParents","e","setTimeout","size","persistent","contentEl","document","removeEventListener","onFocusIn","before","relatedTarget","after","target","globalTop","includes","contains","focusable","focus","val","addEventListener","once","immediate","onClickOutside","onKeydown","disabled","key","HTMLTextAreaElement","HTMLInputElement","closest","preventDefault","nextElement","shiftKey","el","tabIndex","activatorEl","onActivatorKeydown","stopImmediatePropagation","activatorProps","overlayProps","filterProps","_createVNode","_mergeProps","class","style","$event","activator","default","_len","arguments","length","args","Array","_key","ΨopenChildren"],"sources":["../../../src/components/VMenu/VMenu.tsx"],"sourcesContent":["// Styles\nimport './VMenu.sass'\n\n// Components\nimport { VDialogTransition } from '@/components/transitions'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { VOverlay } from '@/components/VOverlay'\nimport { makeVOverlayProps } from '@/components/VOverlay/VOverlay'\n\n// Composables\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useRtl } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { useScopeId } from '@/composables/scopeId'\n\n// Utilities\nimport {\n computed,\n inject,\n mergeProps,\n nextTick,\n onBeforeUnmount,\n onDeactivated,\n provide,\n ref,\n shallowRef,\n watch,\n} from 'vue'\nimport { VMenuSymbol } from './shared'\nimport {\n focusableChildren,\n focusChild,\n genericComponent,\n getNextElement,\n getUid,\n IN_BROWSER,\n isClickInsideElement,\n omit,\n propsFactory,\n useRender,\n} from '@/util'\n\n// Types\nimport type { Component } from 'vue'\nimport type { OverlaySlots } from '@/components/VOverlay/VOverlay'\n\nexport const makeVMenuProps = propsFactory({\n // TODO\n // disableKeys: Boolean,\n id: String,\n submenu: Boolean,\n\n ...omit(makeVOverlayProps({\n closeDelay: 250,\n closeOnContentClick: true,\n locationStrategy: 'connected' as const,\n location: undefined,\n openDelay: 300,\n scrim: false,\n scrollStrategy: 'reposition' as const,\n transition: { component: VDialogTransition as Component },\n }), ['absolute']),\n}, 'VMenu')\n\nexport const VMenu = genericComponent<OverlaySlots>()({\n name: 'VMenu',\n\n props: makeVMenuProps(),\n\n emits: {\n 'update:modelValue': (value: boolean) => true,\n },\n\n setup (props, { slots }) {\n const isActive = useProxiedModel(props, 'modelValue')\n const { scopeId } = useScopeId()\n const { isRtl } = useRtl()\n\n const uid = getUid()\n const id = computed(() => props.id || `v-menu-${uid}`)\n\n const overlay = ref<VOverlay>()\n\n const parent = inject(VMenuSymbol, null)\n const openChildren = shallowRef(new Set<number>())\n provide(VMenuSymbol, {\n register () {\n openChildren.value.add(uid)\n },\n unregister () {\n openChildren.value.delete(uid)\n },\n closeParents (e) {\n setTimeout(() => {\n if (!openChildren.value.size &&\n !props.persistent &&\n (e == null || (overlay.value?.contentEl && !isClickInsideElement(e, overlay.value.contentEl)))\n ) {\n isActive.value = false\n parent?.closeParents()\n }\n }, 40)\n },\n })\n\n onBeforeUnmount(() => {\n parent?.unregister()\n document.removeEventListener('focusin', onFocusIn)\n })\n onDeactivated(() => isActive.value = false)\n\n async function onFocusIn (e: FocusEvent) {\n const before = e.relatedTarget as HTMLElement | null\n const after = e.target as HTMLElement | null\n\n await nextTick()\n\n if (\n isActive.value &&\n before !== after &&\n overlay.value?.contentEl &&\n // We're the topmost menu\n overlay.value?.globalTop &&\n // It isn't the document or the menu body\n ![document, overlay.value.contentEl].includes(after!) &&\n // It isn't inside the menu body\n !overlay.value.contentEl.contains(after)\n ) {\n const focusable = focusableChildren(overlay.value.contentEl)\n focusable[0]?.focus()\n }\n }\n\n watch(isActive, val => {\n if (val) {\n parent?.register()\n if (IN_BROWSER) {\n document.addEventListener('focusin', onFocusIn, { once: true })\n }\n } else {\n parent?.unregister()\n if (IN_BROWSER) {\n document.removeEventListener('focusin', onFocusIn)\n }\n }\n }, { immediate: true })\n\n function onClickOutside (e: MouseEvent) {\n parent?.closeParents(e)\n }\n\n function onKeydown (e: KeyboardEvent) {\n if (props.disabled) return\n\n if (e.key === 'Tab' || (e.key === 'Enter' && !props.closeOnContentClick)) {\n if (\n e.key === 'Enter' &&\n ((e.target instanceof HTMLTextAreaElement) ||\n (e.target instanceof HTMLInputElement && !!e.target.closest('form')))\n ) return\n if (e.key === 'Enter') e.preventDefault()\n\n const nextElement = getNextElement(\n focusableChildren(overlay.value?.contentEl as Element, false),\n e.shiftKey ? 'prev' : 'next',\n (el: HTMLElement) => el.tabIndex >= 0\n )\n if (!nextElement) {\n isActive.value = false\n overlay.value?.activatorEl?.focus()\n }\n } else if (props.submenu && e.key === (isRtl.value ? 'ArrowRight' : 'ArrowLeft')) {\n isActive.value = false\n overlay.value?.activatorEl?.focus()\n }\n }\n\n function onActivatorKeydown (e: KeyboardEvent) {\n if (props.disabled) return\n\n const el = overlay.value?.contentEl\n if (el && isActive.value) {\n if (e.key === 'ArrowDown') {\n e.preventDefault()\n e.stopImmediatePropagation()\n focusChild(el, 'next')\n } else if (e.key === 'ArrowUp') {\n e.preventDefault()\n e.stopImmediatePropagation()\n focusChild(el, 'prev')\n } else if (props.submenu) {\n if (e.key === (isRtl.value ? 'ArrowRight' : 'ArrowLeft')) {\n isActive.value = false\n } else if (e.key === (isRtl.value ? 'ArrowLeft' : 'ArrowRight')) {\n e.preventDefault()\n focusChild(el, 'first')\n }\n }\n } else if (\n props.submenu\n ? e.key === (isRtl.value ? 'ArrowLeft' : 'ArrowRight')\n : ['ArrowDown', 'ArrowUp'].includes(e.key)\n ) {\n isActive.value = true\n e.preventDefault()\n setTimeout(() => setTimeout(() => onActivatorKeydown(e)))\n }\n }\n\n const activatorProps = computed(() =>\n mergeProps({\n 'aria-haspopup': 'menu',\n 'aria-expanded': String(isActive.value),\n 'aria-owns': id.value,\n onKeydown: onActivatorKeydown,\n }, props.activatorProps)\n )\n\n useRender(() => {\n const overlayProps = VOverlay.filterProps(props)\n\n return (\n <VOverlay\n ref={ overlay }\n id={ id.value }\n class={[\n 'v-menu',\n props.class,\n ]}\n style={ props.style }\n { ...overlayProps }\n v-model={ isActive.value }\n absolute\n activatorProps={ activatorProps.value }\n location={ props.location ?? (props.submenu ? 'end' : 'bottom') }\n onClick:outside={ onClickOutside }\n onKeydown={ onKeydown }\n { ...scopeId }\n >\n {{\n activator: slots.activator,\n default: (...args) => (\n <VDefaultsProvider root=\"VMenu\">\n { slots.default?.(...args) }\n </VDefaultsProvider>\n ),\n }}\n </VOverlay>\n )\n })\n\n return forwardRefs({ id, ΨopenChildren: openChildren }, overlay)\n },\n})\n\nexport type VMenu = InstanceType<typeof VMenu>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,iBAAiB;AAAA,SACjBC,iBAAiB;AAAA,SACjBC,QAAQ;AAAA,SACRC,iBAAiB,oCAE1B;AAAA,SACSC,WAAW;AAAA,SACXC,MAAM;AAAA,SACNC,eAAe;AAAA,SACfC,UAAU,yCAEnB;AACA,SACEC,QAAQ,EACRC,MAAM,EACNC,UAAU,EACVC,QAAQ,EACRC,eAAe,EACfC,aAAa,EACbC,OAAO,EACPC,GAAG,EACHC,UAAU,EACVC,KAAK,QACA,KAAK;AAAA,SACHC,WAAW;AAAA,SAElBC,iBAAiB,EACjBC,UAAU,EACVC,gBAAgB,EAChBC,cAAc,EACdC,MAAM,EACNC,UAAU,EACVC,oBAAoB,EACpBC,IAAI,EACJC,YAAY,EACZC,SAAS,gCAGX;AAIA,OAAO,MAAMC,cAAc,GAAGF,YAAY,CAAC;EACzC;EACA;EACAG,EAAE,EAAEC,MAAM;EACVC,OAAO,EAAEC,OAAO;EAEhB,GAAGP,IAAI,CAACvB,iBAAiB,CAAC;IACxB+B,UAAU,EAAE,GAAG;IACfC,mBAAmB,EAAE,IAAI;IACzBC,gBAAgB,EAAE,WAAoB;IACtCC,QAAQ,EAAEC,SAAS;IACnBC,SAAS,EAAE,GAAG;IACdC,KAAK,EAAE,KAAK;IACZC,cAAc,EAAE,YAAq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rD,KAAK;QAAA,YAC1BF,KAAK,CAACT,QAAQ,KAAKS,KAAK,CAACd,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;QAAA,mBAC7CsD,cAAc;QAAA,aACpBC;MAAS,GAChBlC,OAAO;QAGVwD,SAAS,EAAE1D,KAAK,CAAC0D,SAAS;QAC1BC,OAAO,EAAE,SAAAA,CAAA;UAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAIC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;YAAJF,IAAI,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;UAAA;UAAA,OAAAZ,YAAA,CAAAvG,iBAAA;YAAA;UAAA;YAAA6G,OAAA,EAAAA,CAAA,MAEX3D,KAAK,CAAC2D,OAAO,GAAG,GAAGI,IAAI,CAAC;UAAA;QAAA;MAE7B;IAIT,CAAC,CAAC;IAEF,OAAO9G,WAAW,CAAC;MAAE0B,EAAE;MAAEuF,aAAa,EAAE3D;IAAa,CAAC,EAAEF,OAAO,CAAC;EAClE;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"VMenu.mjs","names":["VDialogTransition","VDefaultsProvider","VOverlay","makeVOverlayProps","forwardRefs","useRtl","useProxiedModel","useScopeId","computed","inject","mergeProps","nextTick","onBeforeUnmount","onDeactivated","provide","ref","shallowRef","useId","watch","VMenuSymbol","focusableChildren","focusChild","genericComponent","getNextElement","IN_BROWSER","isClickInsideElement","omit","propsFactory","useRender","makeVMenuProps","id","String","submenu","Boolean","closeDelay","closeOnContentClick","locationStrategy","location","undefined","openDelay","scrim","scrollStrategy","transition","component","VMenu","name","props","emits","value","setup","_ref","slots","isActive","scopeId","isRtl","uid","overlay","parent","openChildren","Set","register","add","unregister","delete","closeParents","e","setTimeout","size","persistent","contentEl","document","removeEventListener","onFocusIn","before","relatedTarget","after","target","globalTop","includes","contains","focusable","focus","val","addEventListener","once","immediate","onClickOutside","onKeydown","disabled","key","HTMLTextAreaElement","HTMLInputElement","closest","preventDefault","nextElement","shiftKey","el","tabIndex","activatorEl","onActivatorKeydown","stopImmediatePropagation","activatorProps","overlayProps","filterProps","_createVNode","_mergeProps","class","style","$event","activator","default","_len","arguments","length","args","Array","_key","ΨopenChildren"],"sources":["../../../src/components/VMenu/VMenu.tsx"],"sourcesContent":["// Styles\nimport './VMenu.sass'\n\n// Components\nimport { VDialogTransition } from '@/components/transitions'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { VOverlay } from '@/components/VOverlay'\nimport { makeVOverlayProps } from '@/components/VOverlay/VOverlay'\n\n// Composables\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useRtl } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { useScopeId } from '@/composables/scopeId'\n\n// Utilities\nimport {\n computed,\n inject,\n mergeProps,\n nextTick,\n onBeforeUnmount,\n onDeactivated,\n provide,\n ref,\n shallowRef,\n useId,\n watch,\n} from 'vue'\nimport { VMenuSymbol } from './shared'\nimport {\n focusableChildren,\n focusChild,\n genericComponent,\n getNextElement,\n IN_BROWSER,\n isClickInsideElement,\n omit,\n propsFactory,\n useRender,\n} from '@/util'\n\n// Types\nimport type { Component } from 'vue'\nimport type { OverlaySlots } from '@/components/VOverlay/VOverlay'\n\nexport const makeVMenuProps = propsFactory({\n // TODO\n // disableKeys: Boolean,\n id: String,\n submenu: Boolean,\n\n ...omit(makeVOverlayProps({\n closeDelay: 250,\n closeOnContentClick: true,\n locationStrategy: 'connected' as const,\n location: undefined,\n openDelay: 300,\n scrim: false,\n scrollStrategy: 'reposition' as const,\n transition: { component: VDialogTransition as Component },\n }), ['absolute']),\n}, 'VMenu')\n\nexport const VMenu = genericComponent<OverlaySlots>()({\n name: 'VMenu',\n\n props: makeVMenuProps(),\n\n emits: {\n 'update:modelValue': (value: boolean) => true,\n },\n\n setup (props, { slots }) {\n const isActive = useProxiedModel(props, 'modelValue')\n const { scopeId } = useScopeId()\n const { isRtl } = useRtl()\n\n const uid = useId()\n const id = computed(() => props.id || `v-menu-${uid}`)\n\n const overlay = ref<VOverlay>()\n\n const parent = inject(VMenuSymbol, null)\n const openChildren = shallowRef(new Set<string>())\n provide(VMenuSymbol, {\n register () {\n openChildren.value.add(uid)\n },\n unregister () {\n openChildren.value.delete(uid)\n },\n closeParents (e) {\n setTimeout(() => {\n if (!openChildren.value.size &&\n !props.persistent &&\n (e == null || (overlay.value?.contentEl && !isClickInsideElement(e, overlay.value.contentEl)))\n ) {\n isActive.value = false\n parent?.closeParents()\n }\n }, 40)\n },\n })\n\n onBeforeUnmount(() => {\n parent?.unregister()\n document.removeEventListener('focusin', onFocusIn)\n })\n onDeactivated(() => isActive.value = false)\n\n async function onFocusIn (e: FocusEvent) {\n const before = e.relatedTarget as HTMLElement | null\n const after = e.target as HTMLElement | null\n\n await nextTick()\n\n if (\n isActive.value &&\n before !== after &&\n overlay.value?.contentEl &&\n // We're the topmost menu\n overlay.value?.globalTop &&\n // It isn't the document or the menu body\n ![document, overlay.value.contentEl].includes(after!) &&\n // It isn't inside the menu body\n !overlay.value.contentEl.contains(after)\n ) {\n const focusable = focusableChildren(overlay.value.contentEl)\n focusable[0]?.focus()\n }\n }\n\n watch(isActive, val => {\n if (val) {\n parent?.register()\n if (IN_BROWSER) {\n document.addEventListener('focusin', onFocusIn, { once: true })\n }\n } else {\n parent?.unregister()\n if (IN_BROWSER) {\n document.removeEventListener('focusin', onFocusIn)\n }\n }\n }, { immediate: true })\n\n function onClickOutside (e: MouseEvent) {\n parent?.closeParents(e)\n }\n\n function onKeydown (e: KeyboardEvent) {\n if (props.disabled) return\n\n if (e.key === 'Tab' || (e.key === 'Enter' && !props.closeOnContentClick)) {\n if (\n e.key === 'Enter' &&\n ((e.target instanceof HTMLTextAreaElement) ||\n (e.target instanceof HTMLInputElement && !!e.target.closest('form')))\n ) return\n if (e.key === 'Enter') e.preventDefault()\n\n const nextElement = getNextElement(\n focusableChildren(overlay.value?.contentEl as Element, false),\n e.shiftKey ? 'prev' : 'next',\n (el: HTMLElement) => el.tabIndex >= 0\n )\n if (!nextElement) {\n isActive.value = false\n overlay.value?.activatorEl?.focus()\n }\n } else if (props.submenu && e.key === (isRtl.value ? 'ArrowRight' : 'ArrowLeft')) {\n isActive.value = false\n overlay.value?.activatorEl?.focus()\n }\n }\n\n function onActivatorKeydown (e: KeyboardEvent) {\n if (props.disabled) return\n\n const el = overlay.value?.contentEl\n if (el && isActive.value) {\n if (e.key === 'ArrowDown') {\n e.preventDefault()\n e.stopImmediatePropagation()\n focusChild(el, 'next')\n } else if (e.key === 'ArrowUp') {\n e.preventDefault()\n e.stopImmediatePropagation()\n focusChild(el, 'prev')\n } else if (props.submenu) {\n if (e.key === (isRtl.value ? 'ArrowRight' : 'ArrowLeft')) {\n isActive.value = false\n } else if (e.key === (isRtl.value ? 'ArrowLeft' : 'ArrowRight')) {\n e.preventDefault()\n focusChild(el, 'first')\n }\n }\n } else if (\n props.submenu\n ? e.key === (isRtl.value ? 'ArrowLeft' : 'ArrowRight')\n : ['ArrowDown', 'ArrowUp'].includes(e.key)\n ) {\n isActive.value = true\n e.preventDefault()\n setTimeout(() => setTimeout(() => onActivatorKeydown(e)))\n }\n }\n\n const activatorProps = computed(() =>\n mergeProps({\n 'aria-haspopup': 'menu',\n 'aria-expanded': String(isActive.value),\n 'aria-owns': id.value,\n onKeydown: onActivatorKeydown,\n }, props.activatorProps)\n )\n\n useRender(() => {\n const overlayProps = VOverlay.filterProps(props)\n\n return (\n <VOverlay\n ref={ overlay }\n id={ id.value }\n class={[\n 'v-menu',\n props.class,\n ]}\n style={ props.style }\n { ...overlayProps }\n v-model={ isActive.value }\n absolute\n activatorProps={ activatorProps.value }\n location={ props.location ?? (props.submenu ? 'end' : 'bottom') }\n onClick:outside={ onClickOutside }\n onKeydown={ onKeydown }\n { ...scopeId }\n >\n {{\n activator: slots.activator,\n default: (...args) => (\n <VDefaultsProvider root=\"VMenu\">\n { slots.default?.(...args) }\n </VDefaultsProvider>\n ),\n }}\n </VOverlay>\n )\n })\n\n return forwardRefs({ id, ΨopenChildren: openChildren }, overlay)\n },\n})\n\nexport type VMenu = InstanceType<typeof VMenu>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,iBAAiB;AAAA,SACjBC,iBAAiB;AAAA,SACjBC,QAAQ;AAAA,SACRC,iBAAiB,oCAE1B;AAAA,SACSC,WAAW;AAAA,SACXC,MAAM;AAAA,SACNC,eAAe;AAAA,SACfC,UAAU,yCAEnB;AACA,SACEC,QAAQ,EACRC,MAAM,EACNC,UAAU,EACVC,QAAQ,EACRC,eAAe,EACfC,aAAa,EACbC,OAAO,EACPC,GAAG,EACHC,UAAU,EACVC,KAAK,EACLC,KAAK,QACA,KAAK;AAAA,SACHC,WAAW;AAAA,SAElBC,iBAAiB,EACjBC,UAAU,EACVC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,EACVC,oBAAoB,EACpBC,IAAI,EACJC,YAAY,EACZC,SAAS,gCAGX;AAIA,OAAO,MAAMC,cAAc,GAAGF,YAAY,CAAC;EACzC;EACA;EACAG,EAAE,EAAEC,MAAM;EACVC,OAAO,EAAEC,OAAO;EAEhB,GAAGP,IAAI,CAACvB,iBAAiB,CAAC;IACxB+B,UAAU,EAAE,GAAG;IACfC,mBAAmB,EAAE,IAAI;IACzBC,gBAAgB,EAAE,WAAoB;IACtCC,QAAQ,EAAEC,SAAS;IACnBC,SAAS,EAAE,GAAG;IACdC,KAAK,EAAE,KAAK;IACZC,cAAc,EAAE,YAAqB;IACrCC,UAAU,EAAE;MAAEC,SAAS,EAAE3C;IAA+B;EAC1D,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC;AAClB,CAAC,EAAE,OAAO,CAAC;AAEX,OAAO,MAAM4C,KAAK,GAAGtB,gBAAgB,CAAe,CAAC,CAAC;EACpDuB,IAAI,EAAE,OAAO;EAEbC,KAAK,EAAEjB,cAAc,CA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AC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAIC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;YAAJF,IAAI,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;UAAA;UAAA,OAAAZ,YAAA,CAAAvG,iBAAA;YAAA;UAAA;YAAA6G,OAAA,EAAAA,CAAA,MAEX3D,KAAK,CAAC2D,OAAO,GAAG,GAAGI,IAAI,CAAC;UAAA;QAAA;MAE7B;IAIT,CAAC,CAAC;IAEF,OAAO9G,WAAW,CAAC;MAAE0B,EAAE;MAAEuF,aAAa,EAAE3D;IAAa,CAAC,EAAEF,OAAO,CAAC;EAClE;AACF,CAAC,CAAC","ignoreList":[]}
@@ -177,7 +177,7 @@ declare const VMenu: {
177
177
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
178
178
  }, {
179
179
  id: vue.ComputedRef<string>;
180
- ΨopenChildren: vue.ShallowRef<Set<number>, Set<number>>;
180
+ ΨopenChildren: vue.ShallowRef<Set<string>, Set<string>>;
181
181
  } & Omit<Omit<{
182
182
  $: vue.ComponentInternalInstance;
183
183
  $data: {};
@@ -590,7 +590,7 @@ declare const VMenu: {
590
590
  updateLocation: vue.Ref<((e: Event) => void) | undefined, ((e: Event) => void) | undefined>;
591
591
  } | {
592
592
  id: vue.ComputedRef<string>;
593
- ΨopenChildren: vue.ShallowRef<Set<number>, Set<number>>;
593
+ ΨopenChildren: vue.ShallowRef<Set<string>, Set<string>>;
594
594
  };
595
595
  }, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
596
596
  'update:modelValue': (value: boolean) => true;
@@ -723,7 +723,7 @@ declare const VMenu: {
723
723
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
724
724
  }, {
725
725
  id: vue.ComputedRef<string>;
726
- ΨopenChildren: vue.ShallowRef<Set<number>, Set<number>>;
726
+ ΨopenChildren: vue.ShallowRef<Set<string>, Set<string>>;
727
727
  } & Omit<Omit<{
728
728
  $: vue.ComponentInternalInstance;
729
729
  $data: {};
@@ -1136,7 +1136,7 @@ declare const VMenu: {
1136
1136
  updateLocation: vue.Ref<((e: Event) => void) | undefined, ((e: Event) => void) | undefined>;
1137
1137
  } | {
1138
1138
  id: vue.ComputedRef<string>;
1139
- ΨopenChildren: vue.ShallowRef<Set<number>, Set<number>>;
1139
+ ΨopenChildren: vue.ShallowRef<Set<string>, Set<string>>;
1140
1140
  };
1141
1141
  }, {}, {}, {}, {
1142
1142
  location: Anchor | undefined;
@@ -1255,7 +1255,7 @@ declare const VMenu: {
1255
1255
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
1256
1256
  }, {
1257
1257
  id: vue.ComputedRef<string>;
1258
- ΨopenChildren: vue.ShallowRef<Set<number>, Set<number>>;
1258
+ ΨopenChildren: vue.ShallowRef<Set<string>, Set<string>>;
1259
1259
  } & Omit<Omit<{
1260
1260
  $: vue.ComponentInternalInstance;
1261
1261
  $data: {};
@@ -1668,7 +1668,7 @@ declare const VMenu: {
1668
1668
  updateLocation: vue.Ref<((e: Event) => void) | undefined, ((e: Event) => void) | undefined>;
1669
1669
  } | {
1670
1670
  id: vue.ComputedRef<string>;
1671
- ΨopenChildren: vue.ShallowRef<Set<number>, Set<number>>;
1671
+ ΨopenChildren: vue.ShallowRef<Set<string>, Set<string>>;
1672
1672
  };
1673
1673
  }, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
1674
1674
  'update:modelValue': (value: boolean) => true;
@@ -9,8 +9,8 @@ import { VSelectionControl } from "../VSelectionControl/index.mjs";
9
9
  import { makeSelectionControlGroupProps, VSelectionControlGroup } from "../VSelectionControlGroup/VSelectionControlGroup.mjs"; // Composables
10
10
  import { IconValue } from "../../composables/icons.mjs";
11
11
  import { useProxiedModel } from "../../composables/proxiedModel.mjs"; // Utilities
12
- import { computed } from 'vue';
13
- import { filterInputAttrs, genericComponent, getUid, omit, propsFactory, useRender } from "../../util/index.mjs"; // Types
12
+ import { computed, useId } from 'vue';
13
+ import { filterInputAttrs, genericComponent, omit, propsFactory, useRender } from "../../util/index.mjs"; // Types
14
14
  export const makeVRadioGroupProps = propsFactory({
15
15
  height: {
16
16
  type: [Number, String],
@@ -43,7 +43,7 @@ export const VRadioGroup = genericComponent()({
43
43
  attrs,
44
44
  slots
45
45
  } = _ref;
46
- const uid = getUid();
46
+ const uid = useId();
47
47
  const id = computed(() => props.id || `radio-group-${uid}`);
48
48
  const model = useProxiedModel(props, 'modelValue');
49
49
  useRender(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"VRadioGroup.mjs","names":["makeVInputProps","VInput","VLabel","VSelectionControl","makeSelectionControlGroupProps","VSelectionControlGroup","IconValue","useProxiedModel","computed","filterInputAttrs","genericComponent","getUid","omit","propsFactory","useRender","makeVRadioGroupProps","height","type","Number","String","default","trueIcon","falseIcon","VRadioGroup","name","inheritAttrs","props","emits","value","setup","_ref","attrs","slots","uid","id","model","rootAttrs","controlAttrs","inputProps","filterProps","controlProps","label","for","_createVNode","_mergeProps","class","style","$event","_ref2","messagesId","isDisabled","isReadonly","_Fragment","undefined"],"sources":["../../../src/components/VRadioGroup/VRadioGroup.tsx"],"sourcesContent":["// Styles\nimport './VRadioGroup.sass'\n\n// Components\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { VLabel } from '@/components/VLabel'\nimport { VSelectionControl } from '@/components/VSelectionControl'\nimport { makeSelectionControlGroupProps, VSelectionControlGroup } from '@/components/VSelectionControlGroup/VSelectionControlGroup'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed } from 'vue'\nimport { filterInputAttrs, genericComponent, getUid, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { VInputSlots } from '@/components/VInput/VInput'\nimport type { GenericProps } from '@/util'\n\nexport type VRadioGroupSlots = Omit<VInputSlots, 'default'> & {\n default: never\n label: {\n label: string | undefined\n props: Record<string, any>\n }\n}\n\nexport const makeVRadioGroupProps = propsFactory({\n height: {\n type: [Number, String],\n default: 'auto',\n },\n\n ...makeVInputProps(),\n ...omit(makeSelectionControlGroupProps(), ['multiple']),\n\n trueIcon: {\n type: IconValue,\n default: '$radioOn',\n },\n falseIcon: {\n type: IconValue,\n default: '$radioOff',\n },\n type: {\n type: String,\n default: 'radio',\n },\n}, 'VRadioGroup')\n\nexport const VRadioGroup = genericComponent<new <T>(\n props: {\n modelValue?: T | null\n 'onUpdate:modelValue'?: (value: T | null) => void\n },\n slots: VRadioGroupSlots,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VRadioGroup',\n\n inheritAttrs: false,\n\n props: makeVRadioGroupProps(),\n\n emits: {\n 'update:modelValue': (value: any) => true,\n },\n\n setup (props, { attrs, slots }) {\n const uid = getUid()\n const id = computed(() => props.id || `radio-group-${uid}`)\n const model = useProxiedModel(props, 'modelValue')\n\n useRender(() => {\n const [rootAttrs, controlAttrs] = filterInputAttrs(attrs)\n const inputProps = VInput.filterProps(props)\n const controlProps = VSelectionControl.filterProps(props)\n const label = slots.label\n ? slots.label({\n label: props.label,\n props: { for: id.value },\n })\n : props.label\n\n return (\n <VInput\n class={[\n 'v-radio-group',\n props.class,\n ]}\n style={ props.style }\n { ...rootAttrs }\n { ...inputProps }\n v-model={ model.value }\n id={ id.value }\n >\n {{\n ...slots,\n default: ({\n id,\n messagesId,\n isDisabled,\n isReadonly,\n }) => (\n <>\n { label && (\n <VLabel id={ id.value }>\n { label }\n </VLabel>\n )}\n\n <VSelectionControlGroup\n { ...controlProps }\n id={ id.value }\n aria-describedby={ messagesId.value }\n defaultsTarget=\"VRadio\"\n trueIcon={ props.trueIcon }\n falseIcon={ props.falseIcon }\n type={ props.type }\n disabled={ isDisabled.value }\n readonly={ isReadonly.value }\n aria-labelledby={ label ? id.value : undefined }\n multiple={ false }\n { ...controlAttrs }\n v-model={ model.value }\n v-slots={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EAEV,EAAAE,YAAA,CAAAtC,sBAAA,EAAAuC,WAAA,CAGMJ,YAAY;YAAA,MACZN,EAAE,CAACN,KAAK;YAAA,oBACMqB,UAAU,CAACrB,KAAK;YAAA;YAAA,YAExBF,KAAK,CAACL,QAAQ;YAAA,aACbK,KAAK,CAACJ,SAAS;YAAA,QACpBI,KAAK,CAACT,IAAI;YAAA,YACNiC,UAAU,CAACtB,KAAK;YAAA,YAChBuB,UAAU,CAACvB,KAAK;YAAA,mBACTa,KAAK,GAAGP,EAAE,CAACN,KAAK,GAAGyB,SAAS;YAAA,YACnC;UAAK,GACXhB,YAAY;YAAA,cACPF,KAAK,CAACP,KAAK;YAAA,uBAAAmB,MAAA,IAAXZ,KAAK,CAACP,KAAK,GAAAmB;UAAA,IACXf,KAAK;QAAA;MAGpB;IAIT,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"VRadioGroup.mjs","names":["makeVInputProps","VInput","VLabel","VSelectionControl","makeSelectionControlGroupProps","VSelectionControlGroup","IconValue","useProxiedModel","computed","useId","filterInputAttrs","genericComponent","omit","propsFactory","useRender","makeVRadioGroupProps","height","type","Number","String","default","trueIcon","falseIcon","VRadioGroup","name","inheritAttrs","props","emits","value","setup","_ref","attrs","slots","uid","id","model","rootAttrs","controlAttrs","inputProps","filterProps","controlProps","label","for","_createVNode","_mergeProps","class","style","$event","_ref2","messagesId","isDisabled","isReadonly","_Fragment","undefined"],"sources":["../../../src/components/VRadioGroup/VRadioGroup.tsx"],"sourcesContent":["// Styles\nimport './VRadioGroup.sass'\n\n// Components\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { VLabel } from '@/components/VLabel'\nimport { VSelectionControl } from '@/components/VSelectionControl'\nimport { makeSelectionControlGroupProps, VSelectionControlGroup } from '@/components/VSelectionControlGroup/VSelectionControlGroup'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, useId } from 'vue'\nimport { filterInputAttrs, genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { VInputSlots } from '@/components/VInput/VInput'\nimport type { GenericProps } from '@/util'\n\nexport type VRadioGroupSlots = Omit<VInputSlots, 'default'> & {\n default: never\n label: {\n label: string | undefined\n props: Record<string, any>\n }\n}\n\nexport const makeVRadioGroupProps = propsFactory({\n height: {\n type: [Number, String],\n default: 'auto',\n },\n\n ...makeVInputProps(),\n ...omit(makeSelectionControlGroupProps(), ['multiple']),\n\n trueIcon: {\n type: IconValue,\n default: '$radioOn',\n },\n falseIcon: {\n type: IconValue,\n default: '$radioOff',\n },\n type: {\n type: String,\n default: 'radio',\n },\n}, 'VRadioGroup')\n\nexport const VRadioGroup = genericComponent<new <T>(\n props: {\n modelValue?: T | null\n 'onUpdate:modelValue'?: (value: T | null) => void\n },\n slots: VRadioGroupSlots,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VRadioGroup',\n\n inheritAttrs: false,\n\n props: makeVRadioGroupProps(),\n\n emits: {\n 'update:modelValue': (value: any) => true,\n },\n\n setup (props, { attrs, slots }) {\n const uid = useId()\n const id = computed(() => props.id || `radio-group-${uid}`)\n const model = useProxiedModel(props, 'modelValue')\n\n useRender(() => {\n const [rootAttrs, controlAttrs] = filterInputAttrs(attrs)\n const inputProps = VInput.filterProps(props)\n const controlProps = VSelectionControl.filterProps(props)\n const label = slots.label\n ? slots.label({\n label: props.label,\n props: { for: id.value },\n })\n : props.label\n\n return (\n <VInput\n class={[\n 'v-radio-group',\n props.class,\n ]}\n style={ props.style }\n { ...rootAttrs }\n { ...inputProps }\n v-model={ model.value }\n id={ id.value }\n >\n {{\n ...slots,\n default: ({\n id,\n messagesId,\n isDisabled,\n isReadonly,\n }) => (\n <>\n { label && (\n <VLabel id={ id.value }>\n { label }\n </VLabel>\n )}\n\n <VSelectionControlGroup\n { ...controlProps }\n id={ id.value }\n aria-describedby={ messagesId.value }\n defaultsTarget=\"VRadio\"\n trueIcon={ props.trueIcon }\n falseIcon={ props.falseIcon }\n type={ props.type }\n disabled={ isDisabled.value }\n readonly={ isReadonly.value }\n aria-labelledby={ label ? id.value : undefined }\n multiple={ false }\n { ...controlAttrs }\n v-model={ model.value }\n v-slots={ slots }\n />\n </>\n ),\n }}\n </VInput>\n )\n })\n\n return {}\n },\n})\n\nexport type VRadioGroup = InstanceType<typeof VRadioGroup>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,eAAe,EAAEC,MAAM;AAAA,SACvBC,MAAM;AAAA,SACNC,iBAAiB;AAAA,SACjBC,8BAA8B,EAAEC,sBAAsB,gEAE/D;AAAA,SACSC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC5BC,gBAAgB,EAAEC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAE1E;AAYA,OAAO,MAAMC,oBAAoB,GAAGF,YAAY,CAAC;EAC/CG,MAAM,EAAE;IACNC,IAAI,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;IACtBC,OAAO,EAAE;EACX,CAAC;EAED,GAAGpB,eAAe,CAAC,CAAC;EACpB,GAAGY,IAAI,CAACR,8BAA8B,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC;EAEvDiB,QAAQ,EAAE;IACRJ,IAAI,EAAEX,SAAS;IACfc,OAAO,EAAE;EACX,CAAC;EACDE,SAAS,EAAE;IACTL,IAAI,EAAEX,SAAS;IACfc,OAAO,EAAE;EACX,CAAC;EACDH,IAAI,EAAE;IACJA,IAAI,EAAEE,MAAM;IACZC,OAAO,EAAE;EACX;AACF,CAAC,EAAE,aAAa,CAAC;AAEjB,OAAO,MAAMG,WAAW,GAAGZ,gBAAgB,CAMI,CAAC,CAAC;EAC/Ca,IAAI,EAAE,aAAa;EAEnBC,YAAY,EAAE,KAAK;EAEnBC,KAAK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YACVC,UAAU;YACVC;UACF,CAAC,GAAAH,KAAA;UAAA,OAAAL,YAAA,CAAAS,SAAA,SAEKX,KAAK,IAAAE,YAAA,CAAAzC,MAAA;YAAA,MACQgC,EAAE,CAACN;UAAK;YAAAR,OAAA,EAAAA,CAAA,MACjBqB,KAAK;UAAA,EAEV,EAAAE,YAAA,CAAAtC,sBAAA,EAAAuC,WAAA,CAGMJ,YAAY;YAAA,MACZN,EAAE,CAACN,KAAK;YAAA,oBACMqB,UAAU,CAACrB,KAAK;YAAA;YAAA,YAExBF,KAAK,CAACL,QAAQ;YAAA,aACbK,KAAK,CAACJ,SAAS;YAAA,QACpBI,KAAK,CAACT,IAAI;YAAA,YACNiC,UAAU,CAACtB,KAAK;YAAA,YAChBuB,UAAU,CAACvB,KAAK;YAAA,mBACTa,KAAK,GAAGP,EAAE,CAACN,KAAK,GAAGyB,SAAS;YAAA,YACnC;UAAK,GACXhB,YAAY;YAAA,cACPF,KAAK,CAACP,KAAK;YAAA,uBAAAmB,MAAA,IAAXZ,KAAK,CAACP,KAAK,GAAAmB;UAAA,IACXf,KAAK;QAAA;MAGpB;IAIT,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
@@ -12,8 +12,8 @@ import { useProxiedModel } from "../../composables/proxiedModel.mjs";
12
12
  import { makeSizeProps } from "../../composables/size.mjs";
13
13
  import { makeTagProps } from "../../composables/tag.mjs";
14
14
  import { makeThemeProps, provideTheme } from "../../composables/theme.mjs"; // Utilities
15
- import { computed, shallowRef } from 'vue';
16
- import { clamp, createRange, genericComponent, getUid, propsFactory, useRender } from "../../util/index.mjs"; // Types
15
+ import { computed, shallowRef, useId } from 'vue';
16
+ import { clamp, createRange, genericComponent, propsFactory, useRender } from "../../util/index.mjs"; // Types
17
17
  export const makeVRatingProps = propsFactory({
18
18
  name: String,
19
19
  itemAriaLabel: {
@@ -109,7 +109,8 @@ export const VRating = genericComponent()({
109
109
  onClick
110
110
  };
111
111
  }));
112
- const name = computed(() => props.name ?? `v-rating-${getUid()}`);
112
+ const uid = useId();
113
+ const name = computed(() => props.name ?? `v-rating-${uid}`);
113
114
  function VRatingItem(_ref2) {
114
115
  let {
115
116
  value,