vuetify 3.4.0-beta.0 → 3.4.0

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 (204) hide show
  1. package/dist/json/attributes.json +1980 -2004
  2. package/dist/json/importMap.json +110 -110
  3. package/dist/json/tags.json +1 -7
  4. package/dist/json/web-types.json +3767 -3807
  5. package/dist/vuetify-labs.css +1045 -1032
  6. package/dist/vuetify-labs.d.ts +227 -305
  7. package/dist/vuetify-labs.esm.js +115 -87
  8. package/dist/vuetify-labs.esm.js.map +1 -1
  9. package/dist/vuetify-labs.js +115 -87
  10. package/dist/vuetify-labs.min.css +2 -2
  11. package/dist/vuetify.css +546 -533
  12. package/dist/vuetify.d.ts +260 -338
  13. package/dist/vuetify.esm.js +115 -87
  14. package/dist/vuetify.esm.js.map +1 -1
  15. package/dist/vuetify.js +115 -87
  16. package/dist/vuetify.js.map +1 -1
  17. package/dist/vuetify.min.css +2 -2
  18. package/dist/vuetify.min.js +963 -961
  19. package/dist/vuetify.min.js.map +1 -1
  20. package/lib/components/VAlert/index.d.mts +1 -1
  21. package/lib/components/VApp/index.d.mts +1 -1
  22. package/lib/components/VAppBar/VAppBar.mjs +1 -1
  23. package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
  24. package/lib/components/VAppBar/index.d.mts +1 -1
  25. package/lib/components/VAutocomplete/VAutocomplete.mjs +1 -1
  26. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  27. package/lib/components/VAutocomplete/index.d.mts +1 -1
  28. package/lib/components/VAvatar/index.d.mts +1 -1
  29. package/lib/components/VBadge/VBadge.mjs +2 -2
  30. package/lib/components/VBadge/VBadge.mjs.map +1 -1
  31. package/lib/components/VBadge/index.d.mts +1 -1
  32. package/lib/components/VBanner/index.d.mts +1 -1
  33. package/lib/components/VBottomNavigation/index.d.mts +1 -1
  34. package/lib/components/VBottomSheet/VBottomSheet.mjs +1 -1
  35. package/lib/components/VBottomSheet/VBottomSheet.mjs.map +1 -1
  36. package/lib/components/VBottomSheet/index.d.mts +1 -1
  37. package/lib/components/VBreadcrumbs/index.d.mts +1 -1
  38. package/lib/components/VBtn/VBtn.css +0 -1
  39. package/lib/components/VBtn/_variables.scss +1 -1
  40. package/lib/components/VBtn/index.d.mts +1 -1
  41. package/lib/components/VBtnGroup/VBtnGroup.css +0 -1
  42. package/lib/components/VBtnGroup/index.d.mts +1 -1
  43. package/lib/components/VBtnToggle/VBtnToggle.mjs +1 -1
  44. package/lib/components/VBtnToggle/VBtnToggle.mjs.map +1 -1
  45. package/lib/components/VBtnToggle/index.d.mts +1 -1
  46. package/lib/components/VCard/index.d.mts +1 -1
  47. package/lib/components/VCarousel/VCarousel.mjs +1 -1
  48. package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
  49. package/lib/components/VCarousel/VCarouselItem.mjs +2 -2
  50. package/lib/components/VCarousel/VCarouselItem.mjs.map +1 -1
  51. package/lib/components/VCarousel/index.d.mts +1 -1
  52. package/lib/components/VCheckbox/VCheckbox.mjs +2 -2
  53. package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
  54. package/lib/components/VCheckbox/VCheckboxBtn.mjs +1 -1
  55. package/lib/components/VCheckbox/VCheckboxBtn.mjs.map +1 -1
  56. package/lib/components/VCheckbox/index.d.mts +1 -1
  57. package/lib/components/VChip/index.d.mts +1 -1
  58. package/lib/components/VChipGroup/index.d.mts +1 -1
  59. package/lib/components/VCode/index.d.mts +1 -1
  60. package/lib/components/VColorPicker/VColorPicker.mjs +1 -1
  61. package/lib/components/VColorPicker/VColorPicker.mjs.map +1 -1
  62. package/lib/components/VColorPicker/index.d.mts +1 -1
  63. package/lib/components/VCombobox/VCombobox.mjs +1 -1
  64. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  65. package/lib/components/VCombobox/index.d.mts +1 -1
  66. package/lib/components/VCounter/index.d.mts +1 -1
  67. package/lib/components/VDataIterator/index.d.mts +1 -1
  68. package/lib/components/VDataTable/VDataTable.css +6 -1
  69. package/lib/components/VDataTable/VDataTable.mjs +6 -5
  70. package/lib/components/VDataTable/VDataTable.mjs.map +1 -1
  71. package/lib/components/VDataTable/VDataTable.sass +5 -1
  72. package/lib/components/VDataTable/VDataTableHeaders.mjs +3 -2
  73. package/lib/components/VDataTable/VDataTableHeaders.mjs.map +1 -1
  74. package/lib/components/VDataTable/VDataTableRow.mjs +8 -4
  75. package/lib/components/VDataTable/VDataTableRow.mjs.map +1 -1
  76. package/lib/components/VDataTable/VDataTableServer.mjs +8 -7
  77. package/lib/components/VDataTable/VDataTableServer.mjs.map +1 -1
  78. package/lib/components/VDataTable/VDataTableVirtual.mjs +7 -6
  79. package/lib/components/VDataTable/VDataTableVirtual.mjs.map +1 -1
  80. package/lib/components/VDataTable/index.d.mts +213 -196
  81. package/lib/components/VDatePicker/VDatePicker.mjs +6 -6
  82. package/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
  83. package/lib/components/VDatePicker/index.d.mts +1 -1
  84. package/lib/components/VDefaultsProvider/index.d.mts +1 -1
  85. package/lib/components/VDialog/VDialog.mjs +1 -1
  86. package/lib/components/VDialog/VDialog.mjs.map +1 -1
  87. package/lib/components/VDialog/index.d.mts +1 -1
  88. package/lib/components/VDivider/index.d.mts +1 -1
  89. package/lib/components/VExpansionPanel/index.d.mts +1 -1
  90. package/lib/components/VField/index.d.mts +1 -1
  91. package/lib/components/VFileInput/VFileInput.mjs +3 -3
  92. package/lib/components/VFileInput/VFileInput.mjs.map +1 -1
  93. package/lib/components/VFileInput/index.d.mts +1 -1
  94. package/lib/components/VFooter/index.d.mts +1 -1
  95. package/lib/components/VForm/index.d.mts +1 -1
  96. package/lib/components/VGrid/VSpacer.mjs +3 -0
  97. package/lib/components/VGrid/VSpacer.mjs.map +1 -1
  98. package/lib/components/VGrid/index.d.mts +1 -1
  99. package/lib/components/VHover/index.d.mts +1 -1
  100. package/lib/components/VIcon/index.d.mts +1 -1
  101. package/lib/components/VImg/VImg.mjs +1 -1
  102. package/lib/components/VImg/VImg.mjs.map +1 -1
  103. package/lib/components/VImg/index.d.mts +1 -1
  104. package/lib/components/VInfiniteScroll/index.d.mts +1 -1
  105. package/lib/components/VInput/index.d.mts +1 -1
  106. package/lib/components/VItemGroup/index.d.mts +1 -1
  107. package/lib/components/VKbd/index.d.mts +1 -1
  108. package/lib/components/VLabel/index.d.mts +1 -1
  109. package/lib/components/VLayout/index.d.mts +1 -1
  110. package/lib/components/VLazy/index.d.mts +1 -1
  111. package/lib/components/VList/VList.mjs +2 -2
  112. package/lib/components/VList/VList.mjs.map +1 -1
  113. package/lib/components/VList/VListChildren.mjs +1 -1
  114. package/lib/components/VList/VListChildren.mjs.map +1 -1
  115. package/lib/components/VList/index.d.mts +1 -1
  116. package/lib/components/VLocaleProvider/index.d.mts +1 -1
  117. package/lib/components/VMain/index.d.mts +1 -1
  118. package/lib/components/VMenu/VMenu.mjs +1 -1
  119. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  120. package/lib/components/VMenu/index.d.mts +1 -1
  121. package/lib/components/VMessages/index.d.mts +1 -1
  122. package/lib/components/VNavigationDrawer/index.d.mts +1 -1
  123. package/lib/components/VOtpInput/index.d.mts +1 -1
  124. package/lib/components/VOverlay/index.d.mts +1 -1
  125. package/lib/components/VPagination/index.d.mts +1 -1
  126. package/lib/components/VParallax/index.d.mts +1 -1
  127. package/lib/components/VProgressCircular/index.d.mts +1 -1
  128. package/lib/components/VProgressLinear/index.d.mts +1 -1
  129. package/lib/components/VRadio/index.d.mts +1 -1
  130. package/lib/components/VRadioGroup/VRadioGroup.mjs +2 -2
  131. package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
  132. package/lib/components/VRadioGroup/index.d.mts +1 -1
  133. package/lib/components/VRangeSlider/VRangeSlider.mjs +1 -1
  134. package/lib/components/VRangeSlider/VRangeSlider.mjs.map +1 -1
  135. package/lib/components/VRangeSlider/index.d.mts +1 -1
  136. package/lib/components/VRating/index.d.mts +1 -1
  137. package/lib/components/VResponsive/index.d.mts +1 -1
  138. package/lib/components/VSelect/VSelect.mjs +1 -1
  139. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  140. package/lib/components/VSelect/index.d.mts +1 -1
  141. package/lib/components/VSelectionControl/index.d.mts +1 -1
  142. package/lib/components/VSelectionControlGroup/index.d.mts +1 -1
  143. package/lib/components/VSheet/index.d.mts +1 -1
  144. package/lib/components/VSkeletonLoader/index.d.mts +1 -1
  145. package/lib/components/VSlideGroup/index.d.mts +1 -1
  146. package/lib/components/VSlider/VSlider.mjs +1 -1
  147. package/lib/components/VSlider/VSlider.mjs.map +1 -1
  148. package/lib/components/VSlider/index.d.mts +1 -1
  149. package/lib/components/VSnackbar/VSnackbar.mjs +1 -1
  150. package/lib/components/VSnackbar/VSnackbar.mjs.map +1 -1
  151. package/lib/components/VSnackbar/index.d.mts +1 -1
  152. package/lib/components/VStepper/VStepper.mjs +1 -1
  153. package/lib/components/VStepper/VStepper.mjs.map +1 -1
  154. package/lib/components/VStepper/VStepperWindow.mjs +9 -7
  155. package/lib/components/VStepper/VStepperWindow.mjs.map +1 -1
  156. package/lib/components/VStepper/VStepperWindowItem.mjs +4 -2
  157. package/lib/components/VStepper/VStepperWindowItem.mjs.map +1 -1
  158. package/lib/components/VStepper/index.d.mts +19 -141
  159. package/lib/components/VSwitch/VSwitch.mjs +2 -2
  160. package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
  161. package/lib/components/VSwitch/index.d.mts +1 -1
  162. package/lib/components/VSystemBar/index.d.mts +1 -1
  163. package/lib/components/VTable/VTable.css +12 -2
  164. package/lib/components/VTable/VTable.sass +7 -2
  165. package/lib/components/VTable/index.d.mts +1 -1
  166. package/lib/components/VTabs/VTab.mjs +1 -1
  167. package/lib/components/VTabs/VTab.mjs.map +1 -1
  168. package/lib/components/VTabs/VTabs.mjs +1 -1
  169. package/lib/components/VTabs/VTabs.mjs.map +1 -1
  170. package/lib/components/VTabs/index.d.mts +1 -1
  171. package/lib/components/VTextField/VTextField.mjs +3 -3
  172. package/lib/components/VTextField/VTextField.mjs.map +1 -1
  173. package/lib/components/VTextField/index.d.mts +1 -1
  174. package/lib/components/VTextarea/VTextarea.mjs +5 -3
  175. package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
  176. package/lib/components/VTextarea/index.d.mts +1 -1
  177. package/lib/components/VThemeProvider/index.d.mts +1 -1
  178. package/lib/components/VTimeline/index.d.mts +1 -1
  179. package/lib/components/VToolbar/index.d.mts +1 -1
  180. package/lib/components/VTooltip/VTooltip.mjs +1 -1
  181. package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
  182. package/lib/components/VTooltip/index.d.mts +1 -1
  183. package/lib/components/VValidation/index.d.mts +1 -1
  184. package/lib/components/VVirtualScroll/index.d.mts +1 -1
  185. package/lib/components/VWindow/index.d.mts +1 -1
  186. package/lib/components/index.d.mts +227 -305
  187. package/lib/components/transitions/index.d.mts +1 -1
  188. package/lib/composables/list-items.mjs +2 -2
  189. package/lib/composables/list-items.mjs.map +1 -1
  190. package/lib/entry-bundler.mjs +1 -1
  191. package/lib/entry-bundler.mjs.map +1 -1
  192. package/lib/framework.mjs +1 -1
  193. package/lib/framework.mjs.map +1 -1
  194. package/lib/index.d.mts +33 -33
  195. package/lib/labs/VConfirmEdit/index.d.mts +1 -1
  196. package/lib/labs/VPicker/VPicker.mjs +1 -1
  197. package/lib/labs/VPicker/VPicker.mjs.map +1 -1
  198. package/lib/labs/VPicker/index.d.mts +1 -1
  199. package/lib/labs/components.d.mts +1 -1
  200. package/lib/util/defineComponent.mjs +2 -2
  201. package/lib/util/defineComponent.mjs.map +1 -1
  202. package/lib/util/helpers.mjs +17 -3
  203. package/lib/util/helpers.mjs.map +1 -1
  204. package/package.json +3 -3
@@ -2,7 +2,7 @@ import * as vue from 'vue';
2
2
  import { ComponentPropsOptions, ExtractPropTypes, PropType } from 'vue';
3
3
 
4
4
  interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
5
- filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): [yes: Partial<Pick<T, U>>, no: Omit<T, U>];
5
+ filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
6
6
  }
7
7
 
8
8
  declare const VDialogTransition: {
@@ -1,6 +1,6 @@
1
1
  // Utilities
2
2
  import { computed } from 'vue';
3
- import { deepEqual, getPropertyFromItem, pick, propsFactory } from "../util/index.mjs"; // Types
3
+ import { deepEqual, getPropertyFromItem, omit, propsFactory } from "../util/index.mjs"; // Types
4
4
  // Composables
5
5
  export const makeItemsProps = propsFactory({
6
6
  items: {
@@ -33,7 +33,7 @@ export function transformItem(props, item) {
33
33
  const title = getPropertyFromItem(item, props.itemTitle, item);
34
34
  const value = getPropertyFromItem(item, props.itemValue, title);
35
35
  const children = getPropertyFromItem(item, props.itemChildren);
36
- const itemProps = props.itemProps === true ? typeof item === 'object' && item != null && !Array.isArray(item) ? 'children' in item ? pick(item, ['children'])[1] : item : undefined : getPropertyFromItem(item, props.itemProps);
36
+ const itemProps = props.itemProps === true ? typeof item === 'object' && item != null && !Array.isArray(item) ? 'children' in item ? omit(item, ['children']) : item : undefined : getPropertyFromItem(item, props.itemProps);
37
37
  const _props = {
38
38
  title,
39
39
  value,
@@ -1 +1 @@
1
- {"version":3,"file":"list-items.mjs","names":["computed","deepEqual","getPropertyFromItem","pick","propsFactory","makeItemsProps","items","type","Array","default","itemTitle","String","Function","itemValue","itemChildren","Boolean","itemProps","returnObject","valueComparator","transformItem","props","item","title","value","children","isArray","undefined","_props","transformItems","raw","array","push","useItems","hasNullItem","some","transformIn","filter","v","map","find","transformOut","_ref","_ref2"],"sources":["../../src/composables/list-items.ts"],"sourcesContent":["// Utilities\nimport { computed } from 'vue'\nimport { deepEqual, getPropertyFromItem, pick, propsFactory } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { InternalItem } from '@/composables/filter'\nimport type { SelectItemKey } from '@/util'\n\nexport interface ListItem<T = any> extends InternalItem<T> {\n title: string\n props: {\n [key: string]: any\n title: string\n value: any\n }\n children?: ListItem<T>[]\n}\n\nexport interface ItemProps {\n items: any[]\n itemTitle: SelectItemKey\n itemValue: SelectItemKey\n itemChildren: SelectItemKey\n itemProps: SelectItemKey\n returnObject: boolean\n valueComparator: typeof deepEqual\n}\n\n// Composables\nexport const makeItemsProps = propsFactory({\n items: {\n type: Array as PropType<ItemProps['items']>,\n default: () => ([]),\n },\n itemTitle: {\n type: [String, Array, Function] as PropType<SelectItemKey>,\n default: 'title',\n },\n itemValue: {\n type: [String, Array, Function] as PropType<SelectItemKey>,\n default: 'value',\n },\n itemChildren: {\n type: [Boolean, String, Array, Function] as PropType<SelectItemKey>,\n default: 'children',\n },\n itemProps: {\n type: [Boolean, String, Array, Function] as PropType<SelectItemKey>,\n default: 'props',\n },\n returnObject: Boolean,\n valueComparator: {\n type: Function as PropType<typeof deepEqual>,\n default: deepEqual,\n },\n}, 'list-items')\n\nexport function transformItem (props: Omit<ItemProps, 'items'>, item: any): ListItem {\n const title = getPropertyFromItem(item, props.itemTitle, item)\n const value = getPropertyFromItem(item, props.itemValue, title)\n const children = getPropertyFromItem(item, props.itemChildren)\n const itemProps = props.itemProps === true\n ? typeof item === 'object' && item != null && !Array.isArray(item)\n ? 'children' in item\n ? pick(item, ['children'])[1]\n : item\n : undefined\n : getPropertyFromItem(item, props.itemProps)\n\n const _props = {\n title,\n value,\n ...itemProps,\n }\n\n return {\n title: String(_props.title ?? ''),\n value: _props.value,\n props: _props,\n children: Array.isArray(children) ? transformItems(props, children) : undefined,\n raw: item,\n }\n}\n\nexport function transformItems (props: Omit<ItemProps, 'items'>, items: ItemProps['items']) {\n const array: ListItem[] = []\n\n for (const item of items) {\n array.push(transformItem(props, item))\n }\n\n return array\n}\n\nexport function useItems (props: ItemProps) {\n const items = computed(() => transformItems(props, props.items))\n const hasNullItem = computed(() => items.value.some(item => item.value === null))\n\n function transformIn (value: any[]): ListItem[] {\n if (!hasNullItem.value) {\n // When the model value is null, return an InternalItem\n // based on null only if null is one of the items\n value = value.filter(v => v !== null)\n }\n\n return value.map(v => {\n if (props.returnObject && typeof v === 'string') {\n // String model value means value is a custom input value from combobox\n // Don't look up existing items if the model value is a string\n return transformItem(props, v)\n }\n return items.value.find(item => props.valueComparator(v, item.value)) || transformItem(props, v)\n })\n }\n\n function transformOut (value: ListItem[]): any[] {\n return props.returnObject\n ? value.map(({ raw }) => raw)\n : value.map(({ value }) => value)\n }\n\n return { items, transformIn, transformOut }\n}\n"],"mappings":"AAAA;AACA,SAASA,QAAQ,QAAQ,KAAK;AAAA,SACrBC,SAAS,EAAEC,mBAAmB,EAAEC,IAAI,EAAEC,YAAY,6BAE3D;AAyBA;AACA,OAAO,MAAMC,cAAc,GAAGD,YAAY,CAAC;EACzCE,KAAK,EAAE;IACLC,IAAI,EAAEC,KAAqC;IAC3CC,OAAO,EAAEA,CAAA,KAAO;EAClB,CAAC;EACDC,SAAS,EAAE;IACTH,IAAI,EAAE,CAACI,MAAM,EAAEH,KAAK,EAAEI,QAAQ,CAA4B;IAC1DH,OAAO,EAAE;EACX,CAAC;EACDI,SAAS,EAAE;IACTN,IAAI,EAAE,CAACI,MAAM,EAAEH,KAAK,EAAEI,QAAQ,CAA4B;IAC1DH,OAAO,EAAE;EACX,CAAC;EACDK,YAAY,EAAE;IACZP,IAAI,EAAE,CAACQ,OAAO,EAAEJ,MAAM,EAAEH,KAAK,EAAEI,QAAQ,CAA4B;IACnEH,OAAO,EAAE;EACX,CAAC;EACDO,SAAS,EAAE;IACTT,IAAI,EAAE,CAACQ,OAAO,EAAEJ,MAAM,EAAEH,KAAK,EAAEI,QAAQ,CAA4B;IACnEH,OAAO,EAAE;EACX,CAAC;EACDQ,YAAY,EAAEF,OAAO;EACrBG,eAAe,EAAE;IACfX,IAAI,EAAEK,QAAsC;IAC5CH,OAAO,EAAER;EACX;AAC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AmB,KAAA;MAAA,OAAKnB,KAAK;IAAA,EAAC;EACrC;EAEA,OAAO;IAAEjB,KAAK;IAAE6B,WAAW;IAAEK;EAAa,CAAC;AAC7C"}
1
+ {"version":3,"file":"list-items.mjs","names":["computed","deepEqual","getPropertyFromItem","omit","propsFactory","makeItemsProps","items","type","Array","default","itemTitle","String","Function","itemValue","itemChildren","Boolean","itemProps","returnObject","valueComparator","transformItem","props","item","title","value","children","isArray","undefined","_props","transformItems","raw","array","push","useItems","hasNullItem","some","transformIn","filter","v","map","find","transformOut","_ref","_ref2"],"sources":["../../src/composables/list-items.ts"],"sourcesContent":["// Utilities\nimport { computed } from 'vue'\nimport { deepEqual, getPropertyFromItem, omit, propsFactory } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { InternalItem } from '@/composables/filter'\nimport type { SelectItemKey } from '@/util'\n\nexport interface ListItem<T = any> extends InternalItem<T> {\n title: string\n props: {\n [key: string]: any\n title: string\n value: any\n }\n children?: ListItem<T>[]\n}\n\nexport interface ItemProps {\n items: any[]\n itemTitle: SelectItemKey\n itemValue: SelectItemKey\n itemChildren: SelectItemKey\n itemProps: SelectItemKey\n returnObject: boolean\n valueComparator: typeof deepEqual\n}\n\n// Composables\nexport const makeItemsProps = propsFactory({\n items: {\n type: Array as PropType<ItemProps['items']>,\n default: () => ([]),\n },\n itemTitle: {\n type: [String, Array, Function] as PropType<SelectItemKey>,\n default: 'title',\n },\n itemValue: {\n type: [String, Array, Function] as PropType<SelectItemKey>,\n default: 'value',\n },\n itemChildren: {\n type: [Boolean, String, Array, Function] as PropType<SelectItemKey>,\n default: 'children',\n },\n itemProps: {\n type: [Boolean, String, Array, Function] as PropType<SelectItemKey>,\n default: 'props',\n },\n returnObject: Boolean,\n valueComparator: {\n type: Function as PropType<typeof deepEqual>,\n default: deepEqual,\n },\n}, 'list-items')\n\nexport function transformItem (props: Omit<ItemProps, 'items'>, item: any): ListItem {\n const title = getPropertyFromItem(item, props.itemTitle, item)\n const value = getPropertyFromItem(item, props.itemValue, title)\n const children = getPropertyFromItem(item, props.itemChildren)\n const itemProps = props.itemProps === true\n ? typeof item === 'object' && item != null && !Array.isArray(item)\n ? 'children' in item\n ? omit(item, ['children'])\n : item\n : undefined\n : getPropertyFromItem(item, props.itemProps)\n\n const _props = {\n title,\n value,\n ...itemProps,\n }\n\n return {\n title: String(_props.title ?? ''),\n value: _props.value,\n props: _props,\n children: Array.isArray(children) ? transformItems(props, children) : undefined,\n raw: item,\n }\n}\n\nexport function transformItems (props: Omit<ItemProps, 'items'>, items: ItemProps['items']) {\n const array: ListItem[] = []\n\n for (const item of items) {\n array.push(transformItem(props, item))\n }\n\n return array\n}\n\nexport function useItems (props: ItemProps) {\n const items = computed(() => transformItems(props, props.items))\n const hasNullItem = computed(() => items.value.some(item => item.value === null))\n\n function transformIn (value: any[]): ListItem[] {\n if (!hasNullItem.value) {\n // When the model value is null, return an InternalItem\n // based on null only if null is one of the items\n value = value.filter(v => v !== null)\n }\n\n return value.map(v => {\n if (props.returnObject && typeof v === 'string') {\n // String model value means value is a custom input value from combobox\n // Don't look up existing items if the model value is a string\n return transformItem(props, v)\n }\n return items.value.find(item => props.valueComparator(v, item.value)) || transformItem(props, v)\n })\n }\n\n function transformOut (value: ListItem[]): any[] {\n return props.returnObject\n ? value.map(({ raw }) => raw)\n : value.map(({ value }) => value)\n }\n\n return { items, transformIn, transformOut }\n}\n"],"mappings":"AAAA;AACA,SAASA,QAAQ,QAAQ,KAAK;AAAA,SACrBC,SAAS,EAAEC,mBAAmB,EAAEC,IAAI,EAAEC,YAAY,6BAE3D;AAyBA;AACA,OAAO,MAAMC,cAAc,GAAGD,YAAY,CAAC;EACzCE,KAAK,EAAE;IACLC,IAAI,EAAEC,KAAqC;IAC3CC,OAAO,EAAEA,CAAA,KAAO;EAClB,CAAC;EACDC,SAAS,EAAE;IACTH,IAAI,EAAE,CAACI,MAAM,EAAEH,KAAK,EAAEI,QAAQ,CAA4B;IAC1DH,OAAO,EAAE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OAAO/B,KAAK,CAACiB,KAAK,CAACgB,IAAI,CAAClB,IAAI,IAAID,KAAK,CAACF,eAAe,CAACmB,CAAC,EAAEhB,IAAI,CAACE,KAAK,CAAC,CAAC,IAAIJ,aAAa,CAACC,KAAK,EAAEiB,CAAC,CAAC;IAClG,CAAC,CAAC;EACJ;EAEA,SAASG,YAAYA,CAAEjB,KAAiB,EAAS;IAC/C,OAAOH,KAAK,CAACH,YAAY,GACrBM,KAAK,CAACe,GAAG,CAACG,IAAA;MAAA,IAAC;QAAEZ;MAAI,CAAC,GAAAY,IAAA;MAAA,OAAKZ,GAAG;IAAA,EAAC,GAC3BN,KAAK,CAACe,GAAG,CAACI,KAAA;MAAA,IAAC;QAAEnB;MAAM,CAAC,GAAAmB,KAAA;MAAA,OAAKnB,KAAK;IAAA,EAAC;EACrC;EAEA,OAAO;IAAEjB,KAAK;IAAE6B,WAAW;IAAEK;EAAa,CAAC;AAC7C"}
@@ -15,7 +15,7 @@ export const createVuetify = function () {
15
15
  ...options
16
16
  });
17
17
  };
18
- export const version = "3.4.0-beta.0";
18
+ export const version = "3.4.0";
19
19
  createVuetify.version = version;
20
20
  export { components, directives };
21
21
  export * from "./composables/index.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"entry-bundler.mjs","names":["components","directives","createVuetify","_createVuetify","options","arguments","length","undefined","version"],"sources":["../src/entry-bundler.ts"],"sourcesContent":["/* eslint-disable local-rules/sort-imports */\n\n// Styles\nimport './styles/main.sass'\n\n// Components\nimport * as components from './components'\nimport * as directives from './directives'\nimport { createVuetify as _createVuetify } from './framework'\n\n// Types\nimport type { VuetifyOptions } from './framework'\n\nexport const createVuetify = (options: VuetifyOptions = {}) => {\n return _createVuetify({ components, directives, ...options })\n}\n\nexport const version = __VUETIFY_VERSION__\ncreateVuetify.version = version\n\nexport {\n components,\n directives,\n}\nexport * from './composables'\n"],"mappings":"AAAA;;AAEA;AACA;;AAEA;AAAA,OACO,KAAKA,UAAU;AAAA,OACf,KAAKC,UAAU;AAAA,SACbC,aAAa,IAAIC,cAAc,2BAExC;AAGA,OAAO,MAAMD,aAAa,GAAG,SAAAA,CAAA,EAAkC;EAAA,IAAjCE,OAAuB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACxD,OAAOF,cAAc,CAAC;IAAEH,UAAU;IAAEC,UAAU;IAAE,GAAGG;EAAQ,CAAC,CAAC;AAC/D,CAAC;AAED,OAAO,MAAMI,OAAO,iBAAsB;AAC1CN,aAAa,CAACM,OAAO,GAAGA,OAAO;AAE/B,SACER,UAAU,EACVC,UAAU;AACX"}
1
+ {"version":3,"file":"entry-bundler.mjs","names":["components","directives","createVuetify","_createVuetify","options","arguments","length","undefined","version"],"sources":["../src/entry-bundler.ts"],"sourcesContent":["/* eslint-disable local-rules/sort-imports */\n\n// Styles\nimport './styles/main.sass'\n\n// Components\nimport * as components from './components'\nimport * as directives from './directives'\nimport { createVuetify as _createVuetify } from './framework'\n\n// Types\nimport type { VuetifyOptions } from './framework'\n\nexport const createVuetify = (options: VuetifyOptions = {}) => {\n return _createVuetify({ components, directives, ...options })\n}\n\nexport const version = __VUETIFY_VERSION__\ncreateVuetify.version = version\n\nexport {\n components,\n directives,\n}\nexport * from './composables'\n"],"mappings":"AAAA;;AAEA;AACA;;AAEA;AAAA,OACO,KAAKA,UAAU;AAAA,OACf,KAAKC,UAAU;AAAA,SACbC,aAAa,IAAIC,cAAc,2BAExC;AAGA,OAAO,MAAMD,aAAa,GAAG,SAAAA,CAAA,EAAkC;EAAA,IAAjCE,OAAuB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACxD,OAAOF,cAAc,CAAC;IAAEH,UAAU;IAAEC,UAAU;IAAE,GAAGG;EAAQ,CAAC,CAAC;AAC/D,CAAC;AAED,OAAO,MAAMI,OAAO,UAAsB;AAC1CN,aAAa,CAACM,OAAO,GAAGA,OAAO;AAE/B,SACER,UAAU,EACVC,UAAU;AACX"}
package/lib/framework.mjs CHANGED
@@ -92,7 +92,7 @@ export function createVuetify() {
92
92
  date
93
93
  };
94
94
  }
95
- export const version = "3.4.0-beta.0";
95
+ export const version = "3.4.0";
96
96
  createVuetify.version = version;
97
97
 
98
98
  // Vue's inject() can only be used in setup
@@ -1 +1 @@
1
- {"version":3,"file":"framework.mjs","names":["createDate","DateAdapterSymbol","createDefaults","DefaultsSymbol","createDisplay","DisplaySymbol","createIcons","IconSymbol","createLocale","LocaleSymbol","createTheme","ThemeSymbol","nextTick","reactive","defineComponent","getUid","IN_BROWSER","mergeDeep","createVuetify","vuetify","arguments","length","undefined","blueprint","rest","options","aliases","components","directives","defaults","display","ssr","theme","icons","locale","date","install","app","key","directive","component","name","aliasName","provide","$nuxt","hook","update","mount","vm","reset","__VUE_OPTIONS_API__","mixin","computed","$vuetify","inject","call","version","$","provides","parent","vnode","appContext"],"sources":["../src/framework.ts"],"sourcesContent":["// Composables\nimport { createDate, DateAdapterSymbol } from '@/composables/date'\nimport { createDefaults, DefaultsSymbol } from '@/composables/defaults'\nimport { createDisplay, DisplaySymbol } from '@/composables/display'\nimport { createIcons, IconSymbol } from '@/composables/icons'\nimport { createLocale, LocaleSymbol } from '@/composables/locale'\nimport { createTheme, ThemeSymbol } from '@/composables/theme'\n\n// Utilities\nimport { nextTick, reactive } from 'vue'\nimport { defineComponent, getUid, IN_BROWSER, mergeDeep } from '@/util'\n\n// Types\nimport type { App, ComponentPublicInstance, InjectionKey } from 'vue'\nimport type { DateOptions } from '@/composables/date'\nimport type { DefaultsOptions } from '@/composables/defaults'\nimport type { DisplayOptions, SSROptions } from '@/composables/display'\nimport type { IconOptions } from '@/composables/icons'\nimport type { LocaleOptions, RtlOptions } from '@/composables/locale'\nimport type { ThemeOptions } from '@/composables/theme'\nexport * from './composables'\nexport type { DateOptions, DateInstance } from '@/composables/date'\n\nexport interface VuetifyOptions {\n aliases?: Record<string, any>\n blueprint?: Blueprint\n components?: Record<string, any>\n date?: DateOptions\n directives?: Record<string, any>\n defaults?: DefaultsOptions\n display?: DisplayOptions\n theme?: ThemeOptions\n icons?: IconOptions\n locale?: LocaleOptions & RtlOptions\n ssr?: SSROptions\n}\n\nexport interface Blueprint extends Omit<VuetifyOptions, 'blueprint'> {}\n\nexport function createVuetify (vuetify: VuetifyOptions = {}) {\n const { blueprint, ...rest } = vuetify\n const options: VuetifyOptions = mergeDeep(blueprint, rest)\n const {\n aliases = {},\n components = {},\n directives = {},\n } = options\n\n const defaults = createDefaults(options.defaults)\n const display = createDisplay(options.display, options.ssr)\n const theme = createTheme(options.theme)\n const icons = createIcons(options.icons)\n const locale = createLocale(options.locale)\n const date = createDate(options.date, locale)\n\n const install = (app: App) => {\n for (const key in directives) {\n app.directive(key, directives[key])\n }\n\n for (const key in components) {\n app.component(key, components[key])\n }\n\n for (const key in aliases) {\n app.component(key, defineComponent({\n ...aliases[key],\n name: key,\n aliasName: aliases[key].name,\n }))\n }\n\n theme.install(app)\n\n app.provide(DefaultsSymbol, defaults)\n app.provide(DisplaySymbol, display)\n app.provide(ThemeSymbol, theme)\n app.provide(IconSymbol, icons)\n app.provide(LocaleSymbol, locale)\n app.provide(DateAdapterSymbol, date)\n\n if (IN_BROWSER && options.ssr) {\n if (app.$nuxt) {\n app.$nuxt.hook('app:suspense:resolve', () => {\n display.update()\n })\n } else {\n const { mount } = app\n app.mount = (...args) => {\n const vm = mount(...args)\n nextTick(() => display.update())\n app.mount = mount\n return vm\n }\n }\n }\n\n getUid.reset()\n\n if (typeof __VUE_OPTIONS_API__ !== 'boolean' || __VUE_OPTIONS_API__) {\n app.mixin({\n computed: {\n $vuetify () {\n return reactive({\n defaults: inject.call(this, DefaultsSymbol),\n display: inject.call(this, DisplaySymbol),\n theme: inject.call(this, ThemeSymbol),\n icons: inject.call(this, IconSymbol),\n locale: inject.call(this, LocaleSymbol),\n date: inject.call(this, DateAdapterSymbol),\n })\n },\n },\n })\n }\n }\n\n return {\n install,\n defaults,\n display,\n theme,\n icons,\n locale,\n date,\n }\n}\n\nexport const version = __VUETIFY_VERSION__\ncreateVuetify.version = version\n\n// Vue's inject() can only be used in setup\nfunction inject (this: ComponentPublicInstance, key: InjectionKey<any> | string) {\n const vm = this.$\n\n const provides = vm.parent?.provides ?? vm.vnode.appContext?.provides\n\n if (provides && (key as any) in provides) {\n return provides[(key as string)]\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,UAAU,EAAEC,iBAAiB;AAAA,SAC7BC,cAAc,EAAEC,cAAc;AAAA,SAC9BC,aAAa,EAAEC,aAAa;AAAA,SAC5BC,WAAW,EAAEC,UAAU;AAAA,SACvBC,YAAY,EAAEC,YAAY;AAAA,SAC1BC,WAAW,EAAEC,WAAW,mCAEjC;AACA,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,KAAK;AAAA,SAC/BC,eAAe,EAAEC,MAAM,EAAEC,UAAU,EAAEC,SAAS,4BAEvD;AAAA;AA2BA,OAAO,SAASC,aAAaA,CAAA,EAAgC;EAAA,IAA9BC,OAAuB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACzD,MAAM;IAAEG,SAAS;IAAE,GAAGC;EAAK,CAAC,GAAGL,OAAO;EACtC,MAAMM,OAAuB,GAAGR,SAAS,CAACM,SAAS,EAAEC,IAAI,CAAC;EAC1D,MAAM;IACJE,OAAO,GAAG,CAAC,CAAC;IACZC,UAAU,GAAG,CAAC,CAAC;IACfC,UAAU,GAAG,CAAC;EAChB,CAAC,GAAGH,OAAO;EAEX,MAAMI,QAAQ,GAAG3B,cAAc,CAACuB,OAAO,CAACI,QAAQ,CAAC;EACjD,MAAMC,OAAO,GAAG1B,aAAa,CAACqB,OAAO,CAACK,OAAO,EAAEL,OAAO,CAACM,GAAG,CAAC;EAC3D,MAAMC,KAAK,GAAGtB,WAAW,CAACe,OAAO,CAACO,KAAK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ACH;AAEA,OAAO,MAAMqB,OAAO,iBAAsB;AAC1CtC,aAAa,CAACsC,OAAO,GAAGA,OAAO;;AAE/B;AACA,SAASF,MAAMA,CAAiChB,GAA+B,EAAE;EAC/E,MAAMU,EAAE,GAAG,IAAI,CAACS,CAAC;EAEjB,MAAMC,QAAQ,GAAGV,EAAE,CAACW,MAAM,EAAED,QAAQ,IAAIV,EAAE,CAACY,KAAK,CAACC,UAAU,EAAEH,QAAQ;EAErE,IAAIA,QAAQ,IAAKpB,GAAG,IAAYoB,QAAQ,EAAE;IACxC,OAAOA,QAAQ,CAAEpB,GAAG,CAAY;EAClC;AACF"}
1
+ {"version":3,"file":"framework.mjs","names":["createDate","DateAdapterSymbol","createDefaults","DefaultsSymbol","createDisplay","DisplaySymbol","createIcons","IconSymbol","createLocale","LocaleSymbol","createTheme","ThemeSymbol","nextTick","reactive","defineComponent","getUid","IN_BROWSER","mergeDeep","createVuetify","vuetify","arguments","length","undefined","blueprint","rest","options","aliases","components","directives","defaults","display","ssr","theme","icons","locale","date","install","app","key","directive","component","name","aliasName","provide","$nuxt","hook","update","mount","vm","reset","__VUE_OPTIONS_API__","mixin","computed","$vuetify","inject","call","version","$","provides","parent","vnode","appContext"],"sources":["../src/framework.ts"],"sourcesContent":["// Composables\nimport { createDate, DateAdapterSymbol } from '@/composables/date'\nimport { createDefaults, DefaultsSymbol } from '@/composables/defaults'\nimport { createDisplay, DisplaySymbol } from '@/composables/display'\nimport { createIcons, IconSymbol } from '@/composables/icons'\nimport { createLocale, LocaleSymbol } from '@/composables/locale'\nimport { createTheme, ThemeSymbol } from '@/composables/theme'\n\n// Utilities\nimport { nextTick, reactive } from 'vue'\nimport { defineComponent, getUid, IN_BROWSER, mergeDeep } from '@/util'\n\n// Types\nimport type { App, ComponentPublicInstance, InjectionKey } from 'vue'\nimport type { DateOptions } from '@/composables/date'\nimport type { DefaultsOptions } from '@/composables/defaults'\nimport type { DisplayOptions, SSROptions } from '@/composables/display'\nimport type { IconOptions } from '@/composables/icons'\nimport type { LocaleOptions, RtlOptions } from '@/composables/locale'\nimport type { ThemeOptions } from '@/composables/theme'\nexport * from './composables'\nexport type { DateOptions, DateInstance } from '@/composables/date'\n\nexport interface VuetifyOptions {\n aliases?: Record<string, any>\n blueprint?: Blueprint\n components?: Record<string, any>\n date?: DateOptions\n directives?: Record<string, any>\n defaults?: DefaultsOptions\n display?: DisplayOptions\n theme?: ThemeOptions\n icons?: IconOptions\n locale?: LocaleOptions & RtlOptions\n ssr?: SSROptions\n}\n\nexport interface Blueprint extends Omit<VuetifyOptions, 'blueprint'> {}\n\nexport function createVuetify (vuetify: VuetifyOptions = {}) {\n const { blueprint, ...rest } = vuetify\n const options: VuetifyOptions = mergeDeep(blueprint, rest)\n const {\n aliases = {},\n components = {},\n directives = {},\n } = options\n\n const defaults = createDefaults(options.defaults)\n const display = createDisplay(options.display, options.ssr)\n const theme = createTheme(options.theme)\n const icons = createIcons(options.icons)\n const locale = createLocale(options.locale)\n const date = createDate(options.date, locale)\n\n const install = (app: App) => {\n for (const key in directives) {\n app.directive(key, directives[key])\n }\n\n for (const key in components) {\n app.component(key, components[key])\n }\n\n for (const key in aliases) {\n app.component(key, defineComponent({\n ...aliases[key],\n name: key,\n aliasName: aliases[key].name,\n }))\n }\n\n theme.install(app)\n\n app.provide(DefaultsSymbol, defaults)\n app.provide(DisplaySymbol, display)\n app.provide(ThemeSymbol, theme)\n app.provide(IconSymbol, icons)\n app.provide(LocaleSymbol, locale)\n app.provide(DateAdapterSymbol, date)\n\n if (IN_BROWSER && options.ssr) {\n if (app.$nuxt) {\n app.$nuxt.hook('app:suspense:resolve', () => {\n display.update()\n })\n } else {\n const { mount } = app\n app.mount = (...args) => {\n const vm = mount(...args)\n nextTick(() => display.update())\n app.mount = mount\n return vm\n }\n }\n }\n\n getUid.reset()\n\n if (typeof __VUE_OPTIONS_API__ !== 'boolean' || __VUE_OPTIONS_API__) {\n app.mixin({\n computed: {\n $vuetify () {\n return reactive({\n defaults: inject.call(this, DefaultsSymbol),\n display: inject.call(this, DisplaySymbol),\n theme: inject.call(this, ThemeSymbol),\n icons: inject.call(this, IconSymbol),\n locale: inject.call(this, LocaleSymbol),\n date: inject.call(this, DateAdapterSymbol),\n })\n },\n },\n })\n }\n }\n\n return {\n install,\n defaults,\n display,\n theme,\n icons,\n locale,\n date,\n }\n}\n\nexport const version = __VUETIFY_VERSION__\ncreateVuetify.version = version\n\n// Vue's inject() can only be used in setup\nfunction inject (this: ComponentPublicInstance, key: InjectionKey<any> | string) {\n const vm = this.$\n\n const provides = vm.parent?.provides ?? vm.vnode.appContext?.provides\n\n if (provides && (key as any) in provides) {\n return provides[(key as string)]\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,UAAU,EAAEC,iBAAiB;AAAA,SAC7BC,cAAc,EAAEC,cAAc;AAAA,SAC9BC,aAAa,EAAEC,aAAa;AAAA,SAC5BC,WAAW,EAAEC,UAAU;AAAA,SACvBC,YAAY,EAAEC,YAAY;AAAA,SAC1BC,WAAW,EAAEC,WAAW,mCAEjC;AACA,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,KAAK;AAAA,SAC/BC,eAAe,EAAEC,MAAM,EAAEC,UAAU,EAAEC,SAAS,4BAEvD;AAAA;AA2BA,OAAO,SAASC,aAAaA,CAAA,EAAgC;EAAA,IAA9BC,OAAuB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACzD,MAAM;IAAEG,SAAS;IAAE,GAAGC;EAAK,CAAC,GAAGL,OAAO;EACtC,MAAMM,OAAuB,GAAGR,SAAS,CAACM,SAAS,EAAEC,IAAI,CAAC;EAC1D,MAAM;IACJE,OAAO,GAAG,CAAC,CAAC;IACZC,UAAU,GAAG,CAAC,CAAC;IACfC,UAAU,GAAG,CAAC;EAChB,CAAC,GAAGH,OAAO;EAEX,MAAMI,QAAQ,GAAG3B,cAAc,CAACuB,OAAO,CAACI,QAAQ,CA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AC;UACJ;QACF;MACF,CAAC,CAAC;IACJ;EACF,CAAC;EAED,OAAO;IACLmC,OAAO;IACPP,QAAQ;IACRC,OAAO;IACPE,KAAK;IACLC,KAAK;IACLC,MAAM;IACNC;EACF,CAAC;AACH;AAEA,OAAO,MAAMqB,OAAO,UAAsB;AAC1CtC,aAAa,CAACsC,OAAO,GAAGA,OAAO;;AAE/B;AACA,SAASF,MAAMA,CAAiChB,GAA+B,EAAE;EAC/E,MAAMU,EAAE,GAAG,IAAI,CAACS,CAAC;EAEjB,MAAMC,QAAQ,GAAGV,EAAE,CAACW,MAAM,EAAED,QAAQ,IAAIV,EAAE,CAACY,KAAK,CAACC,UAAU,EAAEH,QAAQ;EAErE,IAAIA,QAAQ,IAAKpB,GAAG,IAAYoB,QAAQ,EAAE;IACxC,OAAOA,QAAQ,CAAEpB,GAAG,CAAY;EAClC;AACF"}
package/lib/index.d.mts CHANGED
@@ -437,64 +437,64 @@ declare module '@vue/runtime-core' {
437
437
  }
438
438
 
439
439
  export interface GlobalComponents {
440
- VApp: typeof import('vuetify/components')['VApp']
441
440
  VAppBar: typeof import('vuetify/components')['VAppBar']
442
441
  VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
443
442
  VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
444
- VAlert: typeof import('vuetify/components')['VAlert']
445
- VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
443
+ VApp: typeof import('vuetify/components')['VApp']
446
444
  VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
447
445
  VAvatar: typeof import('vuetify/components')['VAvatar']
446
+ VAlert: typeof import('vuetify/components')['VAlert']
447
+ VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
448
448
  VBadge: typeof import('vuetify/components')['VBadge']
449
- VBanner: typeof import('vuetify/components')['VBanner']
450
- VBannerActions: typeof import('vuetify/components')['VBannerActions']
451
- VBannerText: typeof import('vuetify/components')['VBannerText']
452
449
  VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
453
- VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
454
450
  VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
455
451
  VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
456
452
  VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
457
- VBtn: typeof import('vuetify/components')['VBtn']
458
- VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
453
+ VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
454
+ VBanner: typeof import('vuetify/components')['VBanner']
455
+ VBannerActions: typeof import('vuetify/components')['VBannerActions']
456
+ VBannerText: typeof import('vuetify/components')['VBannerText']
459
457
  VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
458
+ VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
460
459
  VCard: typeof import('vuetify/components')['VCard']
461
460
  VCardActions: typeof import('vuetify/components')['VCardActions']
462
461
  VCardItem: typeof import('vuetify/components')['VCardItem']
463
462
  VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
464
463
  VCardText: typeof import('vuetify/components')['VCardText']
465
464
  VCardTitle: typeof import('vuetify/components')['VCardTitle']
465
+ VBtn: typeof import('vuetify/components')['VBtn']
466
+ VChipGroup: typeof import('vuetify/components')['VChipGroup']
466
467
  VCarousel: typeof import('vuetify/components')['VCarousel']
467
468
  VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
469
+ VCode: typeof import('vuetify/components')['VCode']
470
+ VChip: typeof import('vuetify/components')['VChip']
468
471
  VCheckbox: typeof import('vuetify/components')['VCheckbox']
469
472
  VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
470
- VChip: typeof import('vuetify/components')['VChip']
471
- VChipGroup: typeof import('vuetify/components')['VChipGroup']
472
- VCode: typeof import('vuetify/components')['VCode']
473
473
  VColorPicker: typeof import('vuetify/components')['VColorPicker']
474
474
  VCombobox: typeof import('vuetify/components')['VCombobox']
475
- VCounter: typeof import('vuetify/components')['VCounter']
476
475
  VDataTable: typeof import('vuetify/components')['VDataTable']
477
476
  VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
478
477
  VDataTableRows: typeof import('vuetify/components')['VDataTableRows']
479
478
  VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
480
479
  VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
481
480
  VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
481
+ VCounter: typeof import('vuetify/components')['VCounter']
482
+ VDialog: typeof import('vuetify/components')['VDialog']
482
483
  VDatePicker: typeof import('vuetify/components')['VDatePicker']
483
484
  VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
484
485
  VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
485
486
  VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
486
487
  VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
487
488
  VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
488
- VDialog: typeof import('vuetify/components')['VDialog']
489
489
  VDivider: typeof import('vuetify/components')['VDivider']
490
+ VField: typeof import('vuetify/components')['VField']
491
+ VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
492
+ VFooter: typeof import('vuetify/components')['VFooter']
490
493
  VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
491
494
  VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
492
495
  VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
493
496
  VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
494
- VField: typeof import('vuetify/components')['VField']
495
- VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
496
497
  VFileInput: typeof import('vuetify/components')['VFileInput']
497
- VFooter: typeof import('vuetify/components')['VFooter']
498
498
  VIcon: typeof import('vuetify/components')['VIcon']
499
499
  VComponentIcon: typeof import('vuetify/components')['VComponentIcon']
500
500
  VSvgIcon: typeof import('vuetify/components')['VSvgIcon']
@@ -502,11 +502,9 @@ declare module '@vue/runtime-core' {
502
502
  VClassIcon: typeof import('vuetify/components')['VClassIcon']
503
503
  VImg: typeof import('vuetify/components')['VImg']
504
504
  VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
505
- VInput: typeof import('vuetify/components')['VInput']
506
505
  VItemGroup: typeof import('vuetify/components')['VItemGroup']
507
506
  VItem: typeof import('vuetify/components')['VItem']
508
- VKbd: typeof import('vuetify/components')['VKbd']
509
- VLabel: typeof import('vuetify/components')['VLabel']
507
+ VInput: typeof import('vuetify/components')['VInput']
510
508
  VList: typeof import('vuetify/components')['VList']
511
509
  VListGroup: typeof import('vuetify/components')['VListGroup']
512
510
  VListImg: typeof import('vuetify/components')['VListImg']
@@ -516,25 +514,27 @@ declare module '@vue/runtime-core' {
516
514
  VListItemSubtitle: typeof import('vuetify/components')['VListItemSubtitle']
517
515
  VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
518
516
  VListSubheader: typeof import('vuetify/components')['VListSubheader']
519
- VMain: typeof import('vuetify/components')['VMain']
517
+ VKbd: typeof import('vuetify/components')['VKbd']
518
+ VLabel: typeof import('vuetify/components')['VLabel']
520
519
  VMenu: typeof import('vuetify/components')['VMenu']
521
- VMessages: typeof import('vuetify/components')['VMessages']
520
+ VMain: typeof import('vuetify/components')['VMain']
522
521
  VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
522
+ VMessages: typeof import('vuetify/components')['VMessages']
523
523
  VOtpInput: typeof import('vuetify/components')['VOtpInput']
524
+ VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
524
525
  VOverlay: typeof import('vuetify/components')['VOverlay']
525
526
  VPagination: typeof import('vuetify/components')['VPagination']
526
- VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
527
527
  VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
528
528
  VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
529
529
  VRating: typeof import('vuetify/components')['VRating']
530
530
  VSelect: typeof import('vuetify/components')['VSelect']
531
531
  VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
532
532
  VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
533
- VSheet: typeof import('vuetify/components')['VSheet']
534
533
  VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
534
+ VSheet: typeof import('vuetify/components')['VSheet']
535
+ VSlider: typeof import('vuetify/components')['VSlider']
535
536
  VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
536
537
  VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
537
- VSlider: typeof import('vuetify/components')['VSlider']
538
538
  VSnackbar: typeof import('vuetify/components')['VSnackbar']
539
539
  VStepper: typeof import('vuetify/components')['VStepper']
540
540
  VStepperActions: typeof import('vuetify/components')['VStepperActions']
@@ -542,32 +542,33 @@ declare module '@vue/runtime-core' {
542
542
  VStepperItem: typeof import('vuetify/components')['VStepperItem']
543
543
  VStepperWindow: typeof import('vuetify/components')['VStepperWindow']
544
544
  VStepperWindowItem: typeof import('vuetify/components')['VStepperWindowItem']
545
- VSwitch: typeof import('vuetify/components')['VSwitch']
546
- VSystemBar: typeof import('vuetify/components')['VSystemBar']
547
545
  VTabs: typeof import('vuetify/components')['VTabs']
548
546
  VTab: typeof import('vuetify/components')['VTab']
549
- VTable: typeof import('vuetify/components')['VTable']
550
- VTextarea: typeof import('vuetify/components')['VTextarea']
547
+ VSwitch: typeof import('vuetify/components')['VSwitch']
548
+ VSystemBar: typeof import('vuetify/components')['VSystemBar']
551
549
  VTextField: typeof import('vuetify/components')['VTextField']
550
+ VTable: typeof import('vuetify/components')['VTable']
552
551
  VTimeline: typeof import('vuetify/components')['VTimeline']
553
552
  VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
553
+ VTooltip: typeof import('vuetify/components')['VTooltip']
554
+ VTextarea: typeof import('vuetify/components')['VTextarea']
554
555
  VToolbar: typeof import('vuetify/components')['VToolbar']
555
556
  VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
556
557
  VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
557
- VTooltip: typeof import('vuetify/components')['VTooltip']
558
558
  VWindow: typeof import('vuetify/components')['VWindow']
559
559
  VWindowItem: typeof import('vuetify/components')['VWindowItem']
560
560
  VDataIterator: typeof import('vuetify/components')['VDataIterator']
561
- VForm: typeof import('vuetify/components')['VForm']
562
561
  VContainer: typeof import('vuetify/components')['VContainer']
563
562
  VCol: typeof import('vuetify/components')['VCol']
564
563
  VRow: typeof import('vuetify/components')['VRow']
565
564
  VSpacer: typeof import('vuetify/components')['VSpacer']
565
+ VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
566
+ VForm: typeof import('vuetify/components')['VForm']
566
567
  VHover: typeof import('vuetify/components')['VHover']
567
568
  VLayout: typeof import('vuetify/components')['VLayout']
568
569
  VLayoutItem: typeof import('vuetify/components')['VLayoutItem']
569
- VLazy: typeof import('vuetify/components')['VLazy']
570
570
  VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
571
+ VLazy: typeof import('vuetify/components')['VLazy']
571
572
  VNoSsr: typeof import('vuetify/components')['VNoSsr']
572
573
  VParallax: typeof import('vuetify/components')['VParallax']
573
574
  VRadio: typeof import('vuetify/components')['VRadio']
@@ -592,7 +593,6 @@ declare module '@vue/runtime-core' {
592
593
  VExpandTransition: typeof import('vuetify/components')['VExpandTransition']
593
594
  VExpandXTransition: typeof import('vuetify/components')['VExpandXTransition']
594
595
  VDialogTransition: typeof import('vuetify/components')['VDialogTransition']
595
- VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
596
596
  VPicker: typeof import('vuetify/labs/components')['VPicker']
597
597
  VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
598
598
  VConfirmEdit: typeof import('vuetify/labs/components')['VConfirmEdit']
@@ -27,7 +27,7 @@ type GenericProps<Props, Slots extends Record<string, unknown>> = {
27
27
  $slots: MakeSlots<Slots>;
28
28
  };
29
29
  interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
30
- filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): [yes: Partial<Pick<T, U>>, no: Omit<T, U>];
30
+ filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
31
31
  }
32
32
 
33
33
  type VConfirmEditSlots<T> = {
@@ -28,7 +28,7 @@ export const VPicker = genericComponent()({
28
28
  backgroundColorStyles
29
29
  } = useBackgroundColor(toRef(props, 'color'));
30
30
  useRender(() => {
31
- const [sheetProps] = VSheet.filterProps(props);
31
+ const sheetProps = VSheet.filterProps(props);
32
32
  const hasTitle = !!(props.title || slots.title);
33
33
  return _createVNode(VSheet, _mergeProps(sheetProps, {
34
34
  "color": props.bgColor,
@@ -1 +1 @@
1
- {"version":3,"file":"VPicker.mjs","names":["VPickerTitle","VDefaultsProvider","makeVSheetProps","VSheet","useBackgroundColor","toRef","genericComponent","propsFactory","useRender","makeVPickerProps","bgColor","String","landscape","Boolean","title","hideHeader","VPicker","name","props","setup","_ref","slots","backgroundColorClasses","backgroundColorStyles","sheetProps","filterProps","hasTitle","_createVNode","_mergeProps","actions","class","style","default","value","header","VBtn","slim","variant"],"sources":["../../../src/labs/VPicker/VPicker.tsx"],"sourcesContent":["// Styles\nimport './VPicker.sass'\n\n// Components\nimport { VPickerTitle } from './VPickerTitle'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider/VDefaultsProvider'\nimport { makeVSheetProps, VSheet } from '@/components/VSheet/VSheet'\n\n// Composables\nimport { useBackgroundColor } from '@/composables/color'\n\n// Utilities\nimport { toRef } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nexport type VPickerSlots = {\n header: never\n default: never\n actions: never\n title: never\n}\n\nexport const makeVPickerProps = propsFactory({\n bgColor: String,\n landscape: Boolean,\n title: String,\n hideHeader: Boolean,\n\n ...makeVSheetProps(),\n}, 'VPicker')\n\nexport const VPicker = genericComponent<VPickerSlots>()({\n name: 'VPicker',\n\n props: makeVPickerProps(),\n\n setup (props, { slots }) {\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'color'))\n useRender(() => {\n const [sheetProps] = VSheet.filterProps(props)\n const hasTitle = !!(props.title || slots.title)\n\n return (\n <VSheet\n { ...sheetProps }\n color={ props.bgColor }\n class={[\n 'v-picker',\n {\n 'v-picker--landscape': props.landscape,\n 'v-picker--with-actions': !!slots.actions,\n },\n props.class,\n ]}\n style={ props.style }\n >\n { !props.hideHeader && (\n <div\n key=\"header\"\n class={[\n backgroundColorClasses.value,\n ]}\n style={[\n backgroundColorStyles.value,\n ]}\n >\n { hasTitle && (\n <VPickerTitle key=\"picker-title\">\n { slots.title?.() ?? props.title }\n </VPickerTitle>\n )}\n\n { slots.header && (\n <div class=\"v-picker__header\">\n { slots.header() }\n </div>\n )}\n </div>\n )}\n\n <div class=\"v-picker__body\">\n { slots.default?.() }\n </div>\n\n { slots.actions && (\n <VDefaultsProvider\n defaults={{\n VBtn: {\n slim: true,\n variant: 'text',\n },\n }}\n >\n <div class=\"v-picker__actions\">\n { slots.actions() }\n </div>\n </VDefaultsProvider>\n )}\n </VSheet>\n )\n })\n\n return {}\n },\n})\n\nexport type VPicker = InstanceType<typeof VPicker>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,YAAY;AAAA,SACZC,iBAAiB;AAAA,SACjBC,eAAe,EAAEC,MAAM,8CAEhC;AAAA,SACSC,kBAAkB,uCAE3B;AACA,SAASC,KAAK,QAAQ,KAAK;AAAA,SAClBC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAElD;AAQA,OAAO,MAAMC,gBAAgB,GAAGF,YAAY,CAAC;EAC3CG,OAAO,EAAEC,MAAM;EACfC,SAAS,EAAEC,OAAO;EAClBC,KAAK,EAAEH,MAAM;EACbI,UAAU,EAAEF,OAAO;EAEnB,GAAGX,eAAe;AACpB,CAAC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EnB,EAEJ,EAAAP,YAAA;UAAA,SAEU;QAAgB,IACvBN,KAAK,CAACW,OAAO,IAAI,IAGnBX,KAAK,CAACQ,OAAO,IAAAF,YAAA,CAAA1B,iBAAA;UAAA,YAED;YACRkC,IAAI,EAAE;cACJC,IAAI,EAAE,IAAI;cACVC,OAAO,EAAE;YACX;UACF;QAAC;UAAAL,OAAA,EAAAA,CAAA,MAAAL,YAAA;YAAA,SAEU;UAAmB,IAC1BN,KAAK,CAACQ,OAAO,EAAE;QAAA,EAGtB;MAAA;IAGP,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"VPicker.mjs","names":["VPickerTitle","VDefaultsProvider","makeVSheetProps","VSheet","useBackgroundColor","toRef","genericComponent","propsFactory","useRender","makeVPickerProps","bgColor","String","landscape","Boolean","title","hideHeader","VPicker","name","props","setup","_ref","slots","backgroundColorClasses","backgroundColorStyles","sheetProps","filterProps","hasTitle","_createVNode","_mergeProps","actions","class","style","default","value","header","VBtn","slim","variant"],"sources":["../../../src/labs/VPicker/VPicker.tsx"],"sourcesContent":["// Styles\nimport './VPicker.sass'\n\n// Components\nimport { VPickerTitle } from './VPickerTitle'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider/VDefaultsProvider'\nimport { makeVSheetProps, VSheet } from '@/components/VSheet/VSheet'\n\n// Composables\nimport { useBackgroundColor } from '@/composables/color'\n\n// Utilities\nimport { toRef } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nexport type VPickerSlots = {\n header: never\n default: never\n actions: never\n title: never\n}\n\nexport const makeVPickerProps = propsFactory({\n bgColor: String,\n landscape: Boolean,\n title: String,\n hideHeader: Boolean,\n\n ...makeVSheetProps(),\n}, 'VPicker')\n\nexport const VPicker = genericComponent<VPickerSlots>()({\n name: 'VPicker',\n\n props: makeVPickerProps(),\n\n setup (props, { slots }) {\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, 'color'))\n useRender(() => {\n const sheetProps = VSheet.filterProps(props)\n const hasTitle = !!(props.title || slots.title)\n\n return (\n <VSheet\n { ...sheetProps }\n color={ props.bgColor }\n class={[\n 'v-picker',\n {\n 'v-picker--landscape': props.landscape,\n 'v-picker--with-actions': !!slots.actions,\n },\n props.class,\n ]}\n style={ props.style }\n >\n { !props.hideHeader && (\n <div\n key=\"header\"\n class={[\n backgroundColorClasses.value,\n ]}\n style={[\n backgroundColorStyles.value,\n ]}\n >\n { hasTitle && (\n <VPickerTitle key=\"picker-title\">\n { slots.title?.() ?? props.title }\n </VPickerTitle>\n )}\n\n { slots.header && (\n <div class=\"v-picker__header\">\n { slots.header() }\n </div>\n )}\n </div>\n )}\n\n <div class=\"v-picker__body\">\n { slots.default?.() }\n </div>\n\n { slots.actions && (\n <VDefaultsProvider\n defaults={{\n VBtn: {\n slim: true,\n variant: 'text',\n },\n }}\n >\n <div class=\"v-picker__actions\">\n { slots.actions() }\n </div>\n </VDefaultsProvider>\n )}\n </VSheet>\n )\n })\n\n return {}\n },\n})\n\nexport type VPicker = InstanceType<typeof VPicker>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,YAAY;AAAA,SACZC,iBAAiB;AAAA,SACjBC,eAAe,EAAEC,MAAM,8CAEhC;AAAA,SACSC,kBAAkB,uCAE3B;AACA,SAASC,KAAK,QAAQ,KAAK;AAAA,SAClBC,gBAAgB,EAAEC,YAAY,EAAEC,SAAS,gCAElD;AAQA,OAAO,MAAMC,gBAAgB,GAAGF,YAAY,CAAC;EAC3CG,OAAO,EAAEC,MAAM;EACfC,SAAS,EAAEC,OAAO;EAClBC,KAAK,EAAEH,MAAM;EACbI,UAAU,EAAEF,OAAO;EAEnB,GAAGX,eAAe;AACpB,CAAC,EAAE,SAAS,CAAC;AAEb,OAAO,MAAMc,OAAO,GAAGV,gBAAgB,EAAgB,CAAC;EACtDW,IAAI,EAAE,SAAS;EAEfC,KAAK,EAAET,gBAAgB,EAAE;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YACRkC,IAAI,EAAE;cACJC,IAAI,EAAE,IAAI;cACVC,OAAO,EAAE;YACX;UACF;QAAC;UAAAL,OAAA,EAAAA,CAAA,MAAAL,YAAA;YAAA,SAEU;UAAmB,IAC1BN,KAAK,CAACQ,OAAO,EAAE;QAAA,EAGtB;MAAA;IAGP,CAAC,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}
@@ -8,7 +8,7 @@ type Tinline = typeof inline[number];
8
8
  type Anchor = Tblock | Tinline | 'center' | 'center center' | `${Tblock} ${Tinline | 'center'}` | `${Tinline} ${Tblock | 'center'}`;
9
9
 
10
10
  interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
11
- filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): [yes: Partial<Pick<T, U>>, no: Omit<T, U>];
11
+ filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
12
12
  }
13
13
 
14
14
  declare const VPicker: {
@@ -33,7 +33,7 @@ type GenericProps<Props, Slots extends Record<string, unknown>> = {
33
33
  $slots: MakeSlots<Slots>;
34
34
  };
35
35
  interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {
36
- filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): [yes: Partial<Pick<T, U>>, no: Omit<T, U>];
36
+ filterProps<T extends Partial<Props>, U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>>(props: T): Partial<Pick<T, U>>;
37
37
  }
38
38
 
39
39
  type VConfirmEditSlots<T> = {
@@ -14,9 +14,9 @@ export function defineComponent(options) {
14
14
  }
15
15
  if (options._setup) {
16
16
  options.props = propsFactory(options.props ?? {}, options.name)();
17
- const propKeys = Object.keys(options.props);
17
+ const propKeys = Object.keys(options.props).filter(key => key !== 'class' && key !== 'style');
18
18
  options.filterProps = function filterProps(props) {
19
- return pick(props, propKeys, ['class', 'style']);
19
+ return pick(props, propKeys);
20
20
  };
21
21
  options.props._as = String;
22
22
  options.setup = function setup(props, ctx) {
@@ -1 +1 @@
1
- {"version":3,"file":"defineComponent.mjs","names":["injectDefaults","internalUseDefaults","defineComponent","_defineComponent","consoleWarn","pick","propsFactory","options","_setup","setup","name","props","propKeys","Object","keys","filterProps","_as","String","ctx","defaults","value","_props","provideSubDefaults","setupBindings","genericComponent","exposeDefaults","arguments","length","undefined","defineFunctionalComponent","render"],"sources":["../../src/util/defineComponent.tsx"],"sourcesContent":["// Composables\nimport { injectDefaults, internalUseDefaults } from '@/composables/defaults'\n\n// Utilities\nimport {\n defineComponent as _defineComponent, // eslint-disable-line no-restricted-imports\n} from 'vue'\nimport { consoleWarn } from '@/util/console'\nimport { pick } from '@/util/helpers'\nimport { propsFactory } from '@/util/propsFactory'\n\n// Types\nimport type {\n AllowedComponentProps,\n ComponentCustomProps,\n ComponentInjectOptions,\n ComponentObjectPropsOptions,\n ComponentOptions,\n ComponentOptionsMixin,\n ComponentOptionsWithObjectProps,\n ComponentOptionsWithoutProps,\n ComponentPropsOptions,\n ComputedOptions,\n DefineComponent,\n EmitsOptions,\n ExtractDefaultPropTypes,\n ExtractPropTypes,\n FunctionalComponent,\n MethodOptions,\n ObjectEmitsOptions,\n SlotsType,\n VNode,\n VNodeChild,\n VNodeProps,\n} from 'vue'\n\n// No props\nexport function defineComponent<\n Props = {},\n RawBindings = {},\n D = {},\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = {},\n EE extends string = string,\n I extends {} = {},\n II extends string = string,\n S extends SlotsType = {},\n>(\n options: ComponentOptionsWithoutProps<\n Props,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E,\n EE,\n I,\n II,\n S\n >\n): DefineComponent<Props, RawBindings, D, C, M, Mixin, Extends, E, EE>\n\n// Object Props\nexport function defineComponent<\n PropsOptions extends Readonly<ComponentPropsOptions>,\n RawBindings,\n D,\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = {},\n EE extends string = string,\n I extends {} = {},\n II extends string = string,\n S extends SlotsType = {},\n>(\n options: ComponentOptionsWithObjectProps<\n PropsOptions,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E,\n EE,\n I,\n II,\n S\n >\n): DefineComponent<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE> & FilterPropsOptions<PropsOptions>\n\n// Implementation\nexport function defineComponent (options: ComponentOptions) {\n options._setup = options._setup ?? options.setup\n\n if (!options.name) {\n consoleWarn('The component is missing an explicit name, unable to generate default prop value')\n\n return options\n }\n\n if (options._setup) {\n options.props = propsFactory(options.props ?? {}, options.name)()\n const propKeys = Object.keys(options.props)\n options.filterProps = function filterProps (props: Record<string, any>) {\n return pick(props, propKeys, ['class', 'style'])\n }\n\n options.props._as = String\n options.setup = function setup (props: Record<string, any>, ctx) {\n const defaults = injectDefaults()\n\n // Skip props proxy if defaults are not provided\n if (!defaults.value) return options._setup(props, ctx)\n\n const { props: _props, provideSubDefaults } = internalUseDefaults(props, props._as ?? options.name, defaults)\n\n const setupBindings = options._setup(_props, ctx)\n\n provideSubDefaults()\n\n return setupBindings\n }\n }\n\n return options\n}\n\ntype ToListeners<T extends string | number | symbol> = { [K in T]: K extends `on${infer U}` ? Uncapitalize<U> : K }[T]\n\nexport type SlotsToProps<\n U extends RawSlots,\n T = MakeInternalSlots<U>\n> = {\n $children?: (\n | VNodeChild\n | (T extends { default: infer V } ? V : {})\n | { [K in keyof T]?: T[K] }\n )\n 'v-slots'?: { [K in keyof T]?: T[K] | false }\n} & {\n [K in keyof T as `v-slot:${K & string}`]?: T[K] | false\n}\n\ntype RawSlots = Record<string, unknown>\ntype Slot<T> = [T] extends [never] ? () => VNodeChild : (arg: T) => VNodeChild\ntype VueSlot<T> = [T] extends [never] ? () => VNode[] : (arg: T) => VNode[]\ntype MakeInternalSlots<T extends RawSlots> = {\n [K in keyof T]: Slot<T[K]>\n}\ntype MakeSlots<T extends RawSlots> = {\n [K in keyof T]: VueSlot<T[K]>\n}\n\nexport type GenericProps<Props, Slots extends Record<string, unknown>> = {\n $props: Props & SlotsToProps<Slots>\n $slots: MakeSlots<Slots>\n}\n\ntype DefineComponentWithGenericProps<T extends (new (props: Record<string, any>, slots: RawSlots) => {\n $props?: Record<string, any>\n})> = <\n PropsOptions extends Readonly<ComponentObjectPropsOptions>,\n RawBindings,\n D,\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = Record<string, any>,\n EE extends string = string,\n I extends ComponentInjectOptions = {},\n II extends string = string,\n // Slots extends RawSlots = ConstructorParameters<T> extends [any, infer SS extends RawSlots | undefined] ? Exclude<SS, undefined> : {},\n Slots extends RawSlots = ConstructorParameters<T>[1],\n S extends SlotsType = SlotsType<Partial<MakeSlots<Slots>>>,\n III = InstanceType<T>,\n P = III extends Record<'$props', any>\n ? Omit<PropsOptions, keyof III['$props']>\n : PropsOptions,\n Base = DefineComponent<\n P,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E extends any[] ? E : III extends Record<'$props', any> ? Omit<E, ToListeners<keyof III['$props']>> : E,\n EE,\n PublicProps,\n ExtractPropTypes<P> & ({} extends E ? {} : EmitsToProps<E>),\n ExtractDefaultPropTypes<P>,\n S\n >\n>(\n options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S>\n) => Base & T & FilterPropsOptions<PropsOptions>\n\ntype DefineComponentWithSlots<Slots extends RawSlots> = <\n PropsOptions extends Readonly<ComponentPropsOptions>,\n RawBindings,\n D,\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = Record<string, any>,\n EE extends string = string,\n I extends ComponentInjectOptions = {},\n II extends string = string,\n S extends SlotsType = SlotsType<Partial<MakeSlots<Slots>>>,\n>(\n options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S>\n) => DefineComponent<\n ExtractPropTypes<PropsOptions> & SlotsToProps<Slots>,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E,\n EE,\n PublicProps,\n ExtractPropTypes<PropsOptions> & SlotsToProps<Slots> & ({} extends E ? {} : EmitsToProps<E>),\n ExtractDefaultPropTypes<PropsOptions>,\n S\n> & FilterPropsOptions<PropsOptions>\n\n// No argument - simple default slot\nexport function genericComponent (exposeDefaults?: boolean): DefineComponentWithSlots<{ default: never }>\n\n// Generic constructor argument - generic props and slots\nexport function genericComponent<T extends (new (props: Record<string, any>, slots: any) => {\n $props?: Record<string, any>\n})> (exposeDefaults?: boolean): DefineComponentWithGenericProps<T>\n\n// Slots argument - simple slots\nexport function genericComponent<\n Slots extends RawSlots\n> (exposeDefaults?: boolean): DefineComponentWithSlots<Slots>\n\n// Implementation\nexport function genericComponent (exposeDefaults = true) {\n return (options: any) => ((exposeDefaults ? defineComponent : _defineComponent) as any)(options)\n}\n\nexport function defineFunctionalComponent<\n T extends FunctionalComponent<Props>,\n PropsOptions = ComponentObjectPropsOptions,\n Defaults = ExtractDefaultPropTypes<PropsOptions>,\n Props = Readonly<ExtractPropTypes<PropsOptions>>,\n> (props: PropsOptions, render: T): FunctionalComponent<Partial<Defaults> & Omit<Props, keyof Defaults>> {\n render.props = props as any\n return render as any\n}\n\ntype EmitsToProps<T extends EmitsOptions> = T extends string[]\n ? {\n [K in string & `on${Capitalize<T[number]>}`]?: (...args: any[]) => any\n }\n : T extends ObjectEmitsOptions\n ? {\n [K in string &\n `on${Capitalize<string & keyof T>}`]?: K extends `on${infer C}`\n ? T[Uncapitalize<C>] extends null\n ? (...args: any[]) => any\n : (\n ...args: T[Uncapitalize<C>] extends (...args: infer P) => any\n ? P\n : never\n ) => any\n : never\n }\n : {}\n\ntype PublicProps =\n & VNodeProps\n & AllowedComponentProps\n & ComponentCustomProps\n\n// Adds a filterProps method to the component options\nexport interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {\n filterProps<\n T extends Partial<Props>,\n U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>\n > (props: T): [yes: Partial<Pick<T, U>>, no: Omit<T, U>]\n}\n"],"mappings":"AAAA;AAAA,SACSA,cAAc,EAAEC,mBAAmB,uCAE5C;AACA,SACEC,eAAe,IAAIC,gBAAgB,CAAE;AAAA,OAChC,KAAK;AAAA,SACHC,WAAW;AAAA,SACXC,IAAI;AAAA,SACJC,YAAY,8BAErB;AAuFA;AACA,OAAO,SAASJ,eAAeA,CAAEK,OAAyB,EAAE;EAC1DA,OAAO,CAACC,MAAM,GAAGD,OAAO,CAACC,MAAM,IAAID,OAAO,CAACE,KAAK;EAEhD,IAAI,CAACF,OAAO,CAACG,IAAI,EAAE;IACjBN,WAAW,CAAC,kFAAkF,CAAC;IAE/F,OAAOG,OAAO;EAChB;EAEA,IAAIA,OAAO,CAACC,MAAM,EAAE;IAClBD,OAAO,CAACI,KAAK,GAAGL,YAAY,CAACC,OAAO,CAACI,KAAK,IAAI,CAAC,CAAC,EAAEJ,OAAO,CAACG,IAAI,CAAC,EAAE;IACjE,MAAME,QAAQ,GAAGC,MAAM,CAACC,IAAI,CAACP,OAAO,CAACI,KAAK,CAAC;IAC3CJ,OAAO,CAACQ,WAAW,GAAG,SAASA,WAAWA,CAAEJ,KAA0B,EAAE;MACtE,OAAON,IAAI,CAACM,KAAK,EAAEC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAEDL,OAAO,CAACI,KAAK,CAACK,GAAG,GAAGC,MAAM;IAC1BV,OAAO,CAACE,KAAK,GAAG,SAASA,KAAKA,CAAEE,KAA0B,EAAEO,GAAG,EAAE;MAC/D,MAAMC,QAAQ,GAAGnB,cAAc,EAAE;;MAEjC;MACA,IAAI,CAACmB,QAAQ,CAACC,KAAK,EAAE,OAAOb,OAAO,CAACC,MAAM,CAACG,KAAK,EAAEO,GAAG,CAAC;MAEtD,MAAM;QAAEP,KAAK,EAAEU,MAAM;QAAEC;MAAmB,CAAC,GAAGrB,mBAAmB,CAACU,KAAK,EAAEA,KAAK,CAACK,GAAG,IAAIT,OAAO,CAACG,IAAI,EAAES,QAAQ,CAAC;MAE7G,MAAMI,aAAa,GAAGhB,OAAO,CAACC,MAAM,CAACa,MAAM,EAAEH,GAAG,CAAC;MAEjDI,kBAAkB,EAAE;MAEpB,OAAOC,aAAa;IACtB,CAAC;EACH;EAEA,OAAOhB,OAAO;AAChB;AAqHA;AACA,OAAO,SAASiB,gBAAgBA,CAAA,EAAyB;EAAA,IAAvBC,cAAc,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EACrD,OAAQnB,OAAY,IAAK,CAAEkB,cAAc,GAAGvB,eAAe,GAAGC,gBAAgB,EAAUI,OAAO,CAAC;AAClG;AAEA,OAAO,SAASsB,yBAAyBA,CAKtClB,KAAmB,EAAEmB,MAAS,EAAwE;EACvGA,MAAM,CAACnB,KAAK,GAAGA,KAAY;EAC3B,OAAOmB,MAAM;AACf"}
1
+ {"version":3,"file":"defineComponent.mjs","names":["injectDefaults","internalUseDefaults","defineComponent","_defineComponent","consoleWarn","pick","propsFactory","options","_setup","setup","name","props","propKeys","Object","keys","filter","key","filterProps","_as","String","ctx","defaults","value","_props","provideSubDefaults","setupBindings","genericComponent","exposeDefaults","arguments","length","undefined","defineFunctionalComponent","render"],"sources":["../../src/util/defineComponent.tsx"],"sourcesContent":["// Composables\nimport { injectDefaults, internalUseDefaults } from '@/composables/defaults'\n\n// Utilities\nimport {\n defineComponent as _defineComponent, // eslint-disable-line no-restricted-imports\n} from 'vue'\nimport { consoleWarn } from '@/util/console'\nimport { pick } from '@/util/helpers'\nimport { propsFactory } from '@/util/propsFactory'\n\n// Types\nimport type {\n AllowedComponentProps,\n ComponentCustomProps,\n ComponentInjectOptions,\n ComponentObjectPropsOptions,\n ComponentOptions,\n ComponentOptionsMixin,\n ComponentOptionsWithObjectProps,\n ComponentOptionsWithoutProps,\n ComponentPropsOptions,\n ComputedOptions,\n DefineComponent,\n EmitsOptions,\n ExtractDefaultPropTypes,\n ExtractPropTypes,\n FunctionalComponent,\n MethodOptions,\n ObjectEmitsOptions,\n SlotsType,\n VNode,\n VNodeChild,\n VNodeProps,\n} from 'vue'\n\n// No props\nexport function defineComponent<\n Props = {},\n RawBindings = {},\n D = {},\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = {},\n EE extends string = string,\n I extends {} = {},\n II extends string = string,\n S extends SlotsType = {},\n>(\n options: ComponentOptionsWithoutProps<\n Props,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E,\n EE,\n I,\n II,\n S\n >\n): DefineComponent<Props, RawBindings, D, C, M, Mixin, Extends, E, EE>\n\n// Object Props\nexport function defineComponent<\n PropsOptions extends Readonly<ComponentPropsOptions>,\n RawBindings,\n D,\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = {},\n EE extends string = string,\n I extends {} = {},\n II extends string = string,\n S extends SlotsType = {},\n>(\n options: ComponentOptionsWithObjectProps<\n PropsOptions,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E,\n EE,\n I,\n II,\n S\n >\n): DefineComponent<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE> & FilterPropsOptions<PropsOptions>\n\n// Implementation\nexport function defineComponent (options: ComponentOptions) {\n options._setup = options._setup ?? options.setup\n\n if (!options.name) {\n consoleWarn('The component is missing an explicit name, unable to generate default prop value')\n\n return options\n }\n\n if (options._setup) {\n options.props = propsFactory(options.props ?? {}, options.name)()\n const propKeys = Object.keys(options.props).filter(key => key !== 'class' && key !== 'style')\n options.filterProps = function filterProps (props: Record<string, any>) {\n return pick(props, propKeys)\n }\n\n options.props._as = String\n options.setup = function setup (props: Record<string, any>, ctx) {\n const defaults = injectDefaults()\n\n // Skip props proxy if defaults are not provided\n if (!defaults.value) return options._setup(props, ctx)\n\n const { props: _props, provideSubDefaults } = internalUseDefaults(props, props._as ?? options.name, defaults)\n\n const setupBindings = options._setup(_props, ctx)\n\n provideSubDefaults()\n\n return setupBindings\n }\n }\n\n return options\n}\n\ntype ToListeners<T extends string | number | symbol> = { [K in T]: K extends `on${infer U}` ? Uncapitalize<U> : K }[T]\n\nexport type SlotsToProps<\n U extends RawSlots,\n T = MakeInternalSlots<U>\n> = {\n $children?: (\n | VNodeChild\n | (T extends { default: infer V } ? V : {})\n | { [K in keyof T]?: T[K] }\n )\n 'v-slots'?: { [K in keyof T]?: T[K] | false }\n} & {\n [K in keyof T as `v-slot:${K & string}`]?: T[K] | false\n}\n\ntype RawSlots = Record<string, unknown>\ntype Slot<T> = [T] extends [never] ? () => VNodeChild : (arg: T) => VNodeChild\ntype VueSlot<T> = [T] extends [never] ? () => VNode[] : (arg: T) => VNode[]\ntype MakeInternalSlots<T extends RawSlots> = {\n [K in keyof T]: Slot<T[K]>\n}\ntype MakeSlots<T extends RawSlots> = {\n [K in keyof T]: VueSlot<T[K]>\n}\n\nexport type GenericProps<Props, Slots extends Record<string, unknown>> = {\n $props: Props & SlotsToProps<Slots>\n $slots: MakeSlots<Slots>\n}\n\ntype DefineComponentWithGenericProps<T extends (new (props: Record<string, any>, slots: RawSlots) => {\n $props?: Record<string, any>\n})> = <\n PropsOptions extends Readonly<ComponentObjectPropsOptions>,\n RawBindings,\n D,\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = Record<string, any>,\n EE extends string = string,\n I extends ComponentInjectOptions = {},\n II extends string = string,\n // Slots extends RawSlots = ConstructorParameters<T> extends [any, infer SS extends RawSlots | undefined] ? Exclude<SS, undefined> : {},\n Slots extends RawSlots = ConstructorParameters<T>[1],\n S extends SlotsType = SlotsType<Partial<MakeSlots<Slots>>>,\n III = InstanceType<T>,\n P = III extends Record<'$props', any>\n ? Omit<PropsOptions, keyof III['$props']>\n : PropsOptions,\n Base = DefineComponent<\n P,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E extends any[] ? E : III extends Record<'$props', any> ? Omit<E, ToListeners<keyof III['$props']>> : E,\n EE,\n PublicProps,\n ExtractPropTypes<P> & ({} extends E ? {} : EmitsToProps<E>),\n ExtractDefaultPropTypes<P>,\n S\n >\n>(\n options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S>\n) => Base & T & FilterPropsOptions<PropsOptions>\n\ntype DefineComponentWithSlots<Slots extends RawSlots> = <\n PropsOptions extends Readonly<ComponentPropsOptions>,\n RawBindings,\n D,\n C extends ComputedOptions = {},\n M extends MethodOptions = {},\n Mixin extends ComponentOptionsMixin = ComponentOptionsMixin,\n Extends extends ComponentOptionsMixin = ComponentOptionsMixin,\n E extends EmitsOptions = Record<string, any>,\n EE extends string = string,\n I extends ComponentInjectOptions = {},\n II extends string = string,\n S extends SlotsType = SlotsType<Partial<MakeSlots<Slots>>>,\n>(\n options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, I, II, S>\n) => DefineComponent<\n ExtractPropTypes<PropsOptions> & SlotsToProps<Slots>,\n RawBindings,\n D,\n C,\n M,\n Mixin,\n Extends,\n E,\n EE,\n PublicProps,\n ExtractPropTypes<PropsOptions> & SlotsToProps<Slots> & ({} extends E ? {} : EmitsToProps<E>),\n ExtractDefaultPropTypes<PropsOptions>,\n S\n> & FilterPropsOptions<PropsOptions>\n\n// No argument - simple default slot\nexport function genericComponent (exposeDefaults?: boolean): DefineComponentWithSlots<{ default: never }>\n\n// Generic constructor argument - generic props and slots\nexport function genericComponent<T extends (new (props: Record<string, any>, slots: any) => {\n $props?: Record<string, any>\n})> (exposeDefaults?: boolean): DefineComponentWithGenericProps<T>\n\n// Slots argument - simple slots\nexport function genericComponent<\n Slots extends RawSlots\n> (exposeDefaults?: boolean): DefineComponentWithSlots<Slots>\n\n// Implementation\nexport function genericComponent (exposeDefaults = true) {\n return (options: any) => ((exposeDefaults ? defineComponent : _defineComponent) as any)(options)\n}\n\nexport function defineFunctionalComponent<\n T extends FunctionalComponent<Props>,\n PropsOptions = ComponentObjectPropsOptions,\n Defaults = ExtractDefaultPropTypes<PropsOptions>,\n Props = Readonly<ExtractPropTypes<PropsOptions>>,\n> (props: PropsOptions, render: T): FunctionalComponent<Partial<Defaults> & Omit<Props, keyof Defaults>> {\n render.props = props as any\n return render as any\n}\n\ntype EmitsToProps<T extends EmitsOptions> = T extends string[]\n ? {\n [K in string & `on${Capitalize<T[number]>}`]?: (...args: any[]) => any\n }\n : T extends ObjectEmitsOptions\n ? {\n [K in string &\n `on${Capitalize<string & keyof T>}`]?: K extends `on${infer C}`\n ? T[Uncapitalize<C>] extends null\n ? (...args: any[]) => any\n : (\n ...args: T[Uncapitalize<C>] extends (...args: infer P) => any\n ? P\n : never\n ) => any\n : never\n }\n : {}\n\ntype PublicProps =\n & VNodeProps\n & AllowedComponentProps\n & ComponentCustomProps\n\n// Adds a filterProps method to the component options\nexport interface FilterPropsOptions<PropsOptions extends Readonly<ComponentPropsOptions>, Props = ExtractPropTypes<PropsOptions>> {\n filterProps<\n T extends Partial<Props>,\n U extends Exclude<keyof Props, Exclude<keyof Props, keyof T>>\n > (props: T): Partial<Pick<T, U>>\n}\n"],"mappings":"AAAA;AAAA,SACSA,cAAc,EAAEC,mBAAmB,uCAE5C;AACA,SACEC,eAAe,IAAIC,gBAAgB,CAAE;AAAA,OAChC,KAAK;AAAA,SACHC,WAAW;AAAA,SACXC,IAAI;AAAA,SACJC,YAAY,8BAErB;AAuFA;AACA,OAAO,SAASJ,eAAeA,CAAEK,OAAyB,EAAE;EAC1DA,OAAO,CAACC,MAAM,GAAGD,OAAO,CAACC,MAAM,IAAID,OAAO,CAACE,KAAK;EAEhD,IAAI,CAACF,OAAO,CAACG,IAAI,EAAE;IACjBN,WAAW,CAAC,kFAAkF,CAAC;IAE/F,OAAOG,OAAO;EAChB;EAEA,IAAIA,OAAO,CAACC,MAAM,EAAE;IAClBD,OAAO,CAACI,KAAK,GAAGL,YAAY,CAACC,OAAO,CAACI,KAAK,IAAI,CAAC,CAAC,EAAEJ,OAAO,CAACG,IAAI,CAAC,EAAE;IACjE,MAAME,QAAQ,GAAGC,MAAM,CAACC,IAAI,CAACP,OAAO,CAACI,KAAK,CAAC,CAACI,MAAM,CAACC,GAAG,IAAIA,GAAG,KAAK,OAAO,IAAIA,GAAG,KAAK,OAAO,CAAC;IAC7FT,OAAO,CAACU,WAAW,GAAG,SAASA,WAAWA,CAAEN,KAA0B,EAAE;MACtE,OAAON,IAAI,CAACM,KAAK,EAAEC,QAAQ,CAAC;IAC9B,CAAC;IAEDL,OAAO,CAACI,KAAK,CAACO,GAAG,GAAGC,MAAM;IAC1BZ,OAAO,CAACE,KAAK,GAAG,SAASA,KAAKA,CAAEE,KAA0B,EAAES,GAAG,EAAE;MAC/D,MAAMC,QAAQ,GAAGrB,cAAc,EAAE;;MAEjC;MACA,IAAI,CAACqB,QAAQ,CAACC,KAAK,EAAE,OAAOf,OAAO,CAACC,MAAM,CAACG,KAAK,EAAES,GAAG,CAAC;MAEtD,MAAM;QAAET,KAAK,EAAEY,MAAM;QAAEC;MAAmB,CAAC,GAAGvB,mBAAmB,CAACU,KAAK,EAAEA,KAAK,CAACO,GAAG,IAAIX,OAAO,CAACG,IAAI,EAAEW,QAAQ,CAAC;MAE7G,MAAMI,aAAa,GAAGlB,OAAO,CAACC,MAAM,CAACe,MAAM,EAAEH,GAAG,CAAC;MAEjDI,kBAAkB,EAAE;MAEpB,OAAOC,aAAa;IACtB,CAAC;EACH;EAEA,OAAOlB,OAAO;AAChB;AAqHA;AACA,OAAO,SAASmB,gBAAgBA,CAAA,EAAyB;EAAA,IAAvBC,cAAc,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;EACrD,OAAQrB,OAAY,IAAK,CAAEoB,cAAc,GAAGzB,eAAe,GAAGC,gBAAgB,EAAUI,OAAO,CAAC;AAClG;AAEA,OAAO,SAASwB,yBAAyBA,CAKtCpB,KAAmB,EAAEqB,MAAS,EAAwE;EACvGA,MAAM,CAACrB,KAAK,GAAGA,KAAY;EAC3B,OAAOqB,MAAM;AACf"}
@@ -143,7 +143,21 @@ export function keys(o) {
143
143
  export function has(obj, key) {
144
144
  return key.every(k => obj.hasOwnProperty(k));
145
145
  }
146
- export function pick(obj, paths, exclude) {
146
+ // Array of keys
147
+ export function pick(obj, paths) {
148
+ const found = {};
149
+ const keys = new Set(Object.keys(obj));
150
+ for (const path of paths) {
151
+ if (keys.has(path)) {
152
+ found[path] = obj[path];
153
+ }
154
+ }
155
+ return found;
156
+ }
157
+
158
+ // Array of keys
159
+
160
+ export function pickWithRest(obj, paths, exclude) {
147
161
  const found = Object.create(null);
148
162
  const rest = Object.create(null);
149
163
  for (const key in obj) {
@@ -181,9 +195,9 @@ export function isComposingIgnoreKey(e) {
181
195
  * attributes should be passed to the <input> element inside.
182
196
  */
183
197
  export function filterInputAttrs(attrs) {
184
- const [events, props] = pick(attrs, [onRE]);
198
+ const [events, props] = pickWithRest(attrs, [onRE]);
185
199
  const inputEvents = omit(events, bubblingEvents);
186
- const [rootAttrs, inputAttrs] = pick(props, ['class', 'style', 'id', /^data-/]);
200
+ const [rootAttrs, inputAttrs] = pickWithRest(props, ['class', 'style', 'id', /^data-/]);
187
201
  Object.assign(rootAttrs, events);
188
202
  Object.assign(inputAttrs, inputEvents);
189
203
  return [rootAttrs, inputAttrs];