1 line
14 KiB
Plaintext
1 line
14 KiB
Plaintext
|
{"version":3,"file":"VWindow.mjs","names":["VBtn","makeComponentProps","useGroup","useLocale","useRtl","makeTagProps","makeThemeProps","provideTheme","Touch","computed","provide","ref","shallowRef","watch","genericComponent","propsFactory","useRender","VWindowSymbol","Symbol","for","VWindowGroupSymbol","makeVWindowProps","continuous","Boolean","nextIcon","type","String","Function","Object","default","prevIcon","reverse","showArrows","validator","v","touch","undefined","direction","modelValue","disabled","selectedClass","mandatory","VWindow","name","directives","props","emits","value","setup","_ref","slots","themeClasses","isRtl","t","group","rootRef","isRtlReverse","isReversed","transition","axis","transitionCount","transitionHeight","activeIndex","items","findIndex","item","selected","includes","id","newVal","oldVal","itemsLength","length","lastIndex","canMoveBack","canMoveForward","prev","next","arrows","prevProps","icon","class","onClick","push","_createVNode","nextProps","touchOptions","options","left","right","start","_ref2","originalEvent","stopPropagation","_withDirectives","tag","style","height","additional","_resolveDirective"],"sources":["../../../src/components/VWindow/VWindow.tsx"],"sourcesContent":["// Styles\nimport './VWindow.sass'\n\n// Components\nimport { VBtn } from '@/components/VBtn'\n\n// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { useGroup } from '@/composables/group'\nimport { useLocale, useRtl } from '@/composables/locale'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Directives\nimport { Touch } from '@/directives/touch'\n\n// Utilities\nimport { computed, provide, ref, shallowRef, watch } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { ComputedRef, InjectionKey, PropType, Ref } from 'vue'\nimport type { GroupItemProvide, GroupProvide } from '@/composables/group'\nimport type { IconValue } from '@/composables/icons'\nimport type { TouchHandlers } from '@/directives/touch'\nimport type { GenericProps } from '@/util'\n\nexport type VWindowSlots = {\n default: { group: GroupProvide }\n additional: { group: GroupProvide }\n prev: { props: ControlProps }\n next: { props: ControlProps }\n}\n\ntype WindowProvide = {\n transition: ComputedRef<undefined | string>\n transitionCount: Ref<number>\n transitionHeight: Ref<undefined | string>\n isReversed: Ref<boolean>\n rootRef: Ref<HTMLElement | undefined>\n}\n\ntype ControlProps = {\n icon: IconValue\n class: string\n onClick: () => void\n 'aria-label': string\n}\n\nexport const VWindowSymbol: InjectionKey<WindowProvide> = Symbol.for('vuetify:v-window')\nexport const VWindowGroupSymbol: InjectionKey<GroupItemProvide> = Symbol.for('vuetify:v-window-group')\n\nexport const makeVWindowProps = propsFactory({\n continuous: Boolean,\n nextIcon: {\n type: [Boolean, String, Function, Object] as PropType<IconValue>,\n default: '$next',\n },\n prevIcon: {\n type: [Boolean, String, Function, Object] as PropType<IconValue>,\n default: '$prev',\n },\n reverse: Boolean,\n showArrows: {\n type: [Boolean, String],\n validator: (v: any) => typeof v === 'boolean' || v === 'hover',\n },\n touch: {\n type: [Object, Boolean] as PropType<boolean | TouchHandlers>,\n default: undefined,\n },\n direction: {\n type: String as PropType<'horizontal' | 'vertical'>,\n default: 'horizontal',\n },\n\n modelValue: null,\n disabled: Boolean,\n selectedClass: {\n type: String,\n default: 'v-window-item--active',\n },\n // TODO: mandatory should probably not be exposed but do this for now\n mandatory: {\n type: [Boolean, String] as PropType<boolean | 'force'>,\n default: 'force' as const,\n },\n\n ...makeComponentProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n}, 'VWindow')\n\nexport const VWindow = genericComponent<new <T>(\n props: {\n modelValue?: T\n 'onUpdate:modelValue'?: (value: T) => void\n },\n slots: VWindowSlots,\n) =
|