@vuetify/nightly 3.7.4-next.2024-11-06 → 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 (262) hide show
  1. package/dist/json/attributes.json +2853 -2845
  2. package/dist/json/importMap-labs.json +20 -20
  3. package/dist/json/importMap.json +150 -150
  4. package/dist/json/tags.json +2 -0
  5. package/dist/json/web-types.json +5324 -5306
  6. package/dist/vuetify-labs.css +25135 -23418
  7. package/dist/vuetify-labs.d.ts +202 -196
  8. package/dist/vuetify-labs.esm.js +107 -106
  9. package/dist/vuetify-labs.esm.js.map +1 -1
  10. package/dist/vuetify-labs.js +106 -105
  11. package/dist/vuetify-labs.min.css +4 -3
  12. package/dist/vuetify.css +23838 -22118
  13. package/dist/vuetify.d.ts +191 -185
  14. package/dist/vuetify.esm.js +96 -96
  15. package/dist/vuetify.esm.js.map +1 -1
  16. package/dist/vuetify.js +95 -95
  17. package/dist/vuetify.js.map +1 -1
  18. package/dist/vuetify.min.css +4 -3
  19. package/dist/vuetify.min.js +884 -889
  20. package/dist/vuetify.min.js.map +1 -1
  21. package/lib/components/VAlert/VAlert.css +215 -207
  22. package/lib/components/VApp/VApp.css +15 -16
  23. package/lib/components/VAppBar/VAppBar.css +12 -14
  24. package/lib/components/VAppBar/index.d.mts +6 -6
  25. package/lib/components/VAutocomplete/VAutocomplete.css +85 -86
  26. package/lib/components/VAutocomplete/VAutocomplete.mjs +4 -4
  27. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  28. package/lib/components/VAutocomplete/index.d.mts +22 -22
  29. package/lib/components/VAvatar/VAvatar.css +106 -108
  30. package/lib/components/VBadge/VBadge.css +77 -73
  31. package/lib/components/VBadge/VBadge.sass +4 -0
  32. package/lib/components/VBanner/VBanner.css +166 -161
  33. package/lib/components/VBottomNavigation/VBottomNavigation.css +63 -64
  34. package/lib/components/VBottomSheet/VBottomSheet.css +31 -34
  35. package/lib/components/VBreadcrumbs/VBreadcrumbs.css +57 -54
  36. package/lib/components/VBtn/VBtn.css +408 -385
  37. package/lib/components/VBtn/VBtn.sass +4 -4
  38. package/lib/components/VBtn/index.d.mts +7 -7
  39. package/lib/components/VBtnGroup/VBtnGroup.css +64 -63
  40. package/lib/components/VBtnToggle/VBtnToggle.css +14 -16
  41. package/lib/components/VBtnToggle/index.d.mts +9 -9
  42. package/lib/components/VCard/VCard.css +302 -294
  43. package/lib/components/VCarousel/VCarousel.css +65 -63
  44. package/lib/components/VCarousel/VCarousel.mjs.map +1 -1
  45. package/lib/components/VCarousel/VCarousel.sass +1 -1
  46. package/lib/components/VCarousel/index.d.mts +9 -9
  47. package/lib/components/VCheckbox/VCheckbox.css +5 -7
  48. package/lib/components/VCheckbox/VCheckbox.mjs +3 -3
  49. package/lib/components/VCheckbox/VCheckbox.mjs.map +1 -1
  50. package/lib/components/VChip/VChip.css +411 -378
  51. package/lib/components/VChip/VChip.mjs +18 -10
  52. package/lib/components/VChip/VChip.mjs.map +1 -1
  53. package/lib/components/VChip/index.d.mts +13 -8
  54. package/lib/components/VChipGroup/VChipGroup.css +18 -19
  55. package/lib/components/VChipGroup/VChipGroup.mjs +2 -0
  56. package/lib/components/VChipGroup/VChipGroup.mjs.map +1 -1
  57. package/lib/components/VChipGroup/index.d.mts +20 -15
  58. package/lib/components/VCode/VCode.css +8 -10
  59. package/lib/components/VColorPicker/VColorPicker.css +22 -22
  60. package/lib/components/VColorPicker/VColorPickerCanvas.css +22 -24
  61. package/lib/components/VColorPicker/VColorPickerEdit.css +28 -29
  62. package/lib/components/VColorPicker/VColorPickerPreview.css +67 -69
  63. package/lib/components/VColorPicker/VColorPickerPreview.sass +2 -4
  64. package/lib/components/VColorPicker/VColorPickerSwatches.css +34 -34
  65. package/lib/components/VCombobox/VCombobox.css +85 -86
  66. package/lib/components/VCombobox/VCombobox.mjs +4 -4
  67. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  68. package/lib/components/VCombobox/index.d.mts +22 -22
  69. package/lib/components/VConfirmEdit/VConfirmEdit.mjs +9 -7
  70. package/lib/components/VConfirmEdit/VConfirmEdit.mjs.map +1 -1
  71. package/lib/components/VConfirmEdit/__test__/VConfirmEdit.spec.browser.mjs +1 -1
  72. package/lib/components/VConfirmEdit/__test__/VConfirmEdit.spec.browser.mjs.map +1 -1
  73. package/lib/components/VConfirmEdit/index.d.mts +3 -7
  74. package/lib/components/VCounter/VCounter.css +5 -7
  75. package/lib/components/VDataTable/VDataTable.css +186 -189
  76. package/lib/components/VDataTable/VDataTable.sass +10 -20
  77. package/lib/components/VDataTable/VDataTableFooter.css +31 -33
  78. package/lib/components/VDatePicker/VDatePicker.css +6 -8
  79. package/lib/components/VDatePicker/VDatePickerControls.css +56 -54
  80. package/lib/components/VDatePicker/VDatePickerHeader.css +60 -56
  81. package/lib/components/VDatePicker/VDatePickerHeader.mjs +2 -1
  82. package/lib/components/VDatePicker/VDatePickerHeader.mjs.map +1 -1
  83. package/lib/components/VDatePicker/VDatePickerMonth.css +55 -51
  84. package/lib/components/VDatePicker/VDatePickerMonths.css +19 -20
  85. package/lib/components/VDatePicker/VDatePickerYears.css +15 -16
  86. package/lib/components/VDatePicker/index.d.mts +5 -5
  87. package/lib/components/VDialog/VDialog.css +95 -95
  88. package/lib/components/VDivider/VDivider.css +52 -52
  89. package/lib/components/VEmptyState/VEmptyState.css +67 -62
  90. package/lib/components/VExpansionPanel/VExpansionPanel.css +209 -203
  91. package/lib/components/VExpansionPanel/VExpansionPanel.sass +25 -27
  92. package/lib/components/VExpansionPanel/index.d.mts +7 -7
  93. package/lib/components/VFab/VFab.css +69 -74
  94. package/lib/components/VFab/VFab.sass +4 -5
  95. package/lib/components/VFab/index.d.mts +6 -6
  96. package/lib/components/VField/VField.css +579 -539
  97. package/lib/components/VField/VField.mjs +5 -4
  98. package/lib/components/VField/VField.mjs.map +1 -1
  99. package/lib/components/VFileInput/VFileInput.css +29 -31
  100. package/lib/components/VFooter/VFooter.css +36 -38
  101. package/lib/components/VGrid/VGrid.css +592 -565
  102. package/lib/components/VIcon/VIcon.css +52 -51
  103. package/lib/components/VImg/VImg.css +51 -50
  104. package/lib/components/VInfiniteScroll/VInfiniteScroll.css +37 -36
  105. package/lib/components/VInput/VInput.css +142 -131
  106. package/lib/components/VInput/VInput.mjs +3 -3
  107. package/lib/components/VInput/VInput.mjs.map +1 -1
  108. package/lib/components/VItemGroup/VItemGroup.css +5 -7
  109. package/lib/components/VItemGroup/VItemGroup.mjs.map +1 -1
  110. package/lib/components/VItemGroup/index.d.mts +9 -9
  111. package/lib/components/VKbd/VKbd.css +11 -13
  112. package/lib/components/VLabel/VLabel.css +15 -16
  113. package/lib/components/VLayout/VLayout.css +8 -10
  114. package/lib/components/VLayout/VLayoutItem.css +7 -8
  115. package/lib/components/VList/VList.css +108 -104
  116. package/lib/components/VList/VList.mjs +3 -2
  117. package/lib/components/VList/VList.mjs.map +1 -1
  118. package/lib/components/VList/VList.sass +1 -1
  119. package/lib/components/VList/VListItem.css +452 -440
  120. package/lib/components/VList/VListItem.mjs +3 -2
  121. package/lib/components/VList/VListItem.mjs.map +1 -1
  122. package/lib/components/VList/VListItem.sass +1 -2
  123. package/lib/components/VList/index.d.mts +10 -10
  124. package/lib/components/VLocaleProvider/VLocaleProvider.css +2 -4
  125. package/lib/components/VMain/VMain.css +30 -32
  126. package/lib/components/VMenu/VMenu.css +19 -21
  127. package/lib/components/VMenu/VMenu.mjs +3 -3
  128. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  129. package/lib/components/VMenu/index.d.mts +6 -6
  130. package/lib/components/VMessages/VMessages.css +15 -17
  131. package/lib/components/VNavigationDrawer/VNavigationDrawer.css +108 -106
  132. package/lib/components/VOtpInput/VOtpInput.css +58 -56
  133. package/lib/components/VOverlay/VOverlay.css +63 -60
  134. package/lib/components/VOverlay/VOverlay.sass +13 -14
  135. package/lib/components/VPagination/VPagination.css +8 -10
  136. package/lib/components/VParallax/VParallax.css +6 -8
  137. package/lib/components/VProgressCircular/VProgressCircular.css +101 -95
  138. package/lib/components/VProgressLinear/VProgressLinear.css +222 -209
  139. package/lib/components/VRadioGroup/VRadioGroup.css +12 -14
  140. package/lib/components/VRadioGroup/VRadioGroup.mjs +3 -3
  141. package/lib/components/VRadioGroup/VRadioGroup.mjs.map +1 -1
  142. package/lib/components/VRating/VRating.css +53 -52
  143. package/lib/components/VRating/VRating.mjs +4 -3
  144. package/lib/components/VRating/VRating.mjs.map +1 -1
  145. package/lib/components/VResponsive/VResponsive.css +26 -25
  146. package/lib/components/VSelect/VSelect.css +52 -54
  147. package/lib/components/VSelect/VSelect.mjs +3 -3
  148. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  149. package/lib/components/VSelect/index.d.mts +22 -22
  150. package/lib/components/VSelectionControl/VSelectionControl.css +102 -100
  151. package/lib/components/VSelectionControl/VSelectionControl.mjs +3 -3
  152. package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
  153. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.css +8 -10
  154. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs +3 -3
  155. package/lib/components/VSelectionControlGroup/VSelectionControlGroup.mjs.map +1 -1
  156. package/lib/components/VSheet/VSheet.css +36 -38
  157. package/lib/components/VSkeletonLoader/VSkeletonLoader.css +224 -225
  158. package/lib/components/VSlideGroup/VSlideGroup.css +55 -53
  159. package/lib/components/VSlideGroup/index.d.mts +10 -10
  160. package/lib/components/VSlider/VSlider.css +57 -53
  161. package/lib/components/VSlider/VSliderThumb.css +153 -142
  162. package/lib/components/VSlider/VSliderTrack.css +174 -155
  163. package/lib/components/VSnackbar/VSnackbar.css +140 -140
  164. package/lib/components/VSparkline/VBarline.mjs +3 -3
  165. package/lib/components/VSparkline/VBarline.mjs.map +1 -1
  166. package/lib/components/VSparkline/VTrendline.mjs +3 -3
  167. package/lib/components/VSparkline/VTrendline.mjs.map +1 -1
  168. package/lib/components/VSpeedDial/VSpeedDial.css +41 -43
  169. package/lib/components/VStepper/VStepper.css +56 -55
  170. package/lib/components/VStepper/VStepper.mjs +5 -4
  171. package/lib/components/VStepper/VStepper.mjs.map +1 -1
  172. package/lib/components/VStepper/VStepperItem.css +115 -112
  173. package/lib/components/VStepper/VStepperItem.mjs +5 -4
  174. package/lib/components/VStepper/VStepperItem.mjs.map +1 -1
  175. package/lib/components/VStepper/index.d.mts +51 -45
  176. package/lib/components/VSwitch/VSwitch.css +139 -129
  177. package/lib/components/VSwitch/VSwitch.mjs +3 -3
  178. package/lib/components/VSwitch/VSwitch.mjs.map +1 -1
  179. package/lib/components/VSystemBar/VSystemBar.css +43 -45
  180. package/lib/components/VTable/VTable.css +141 -140
  181. package/lib/components/VTable/VTable.sass +2 -4
  182. package/lib/components/VTabs/VTab.css +29 -30
  183. package/lib/components/VTabs/VTabs.css +65 -59
  184. package/lib/components/VTabs/index.d.mts +7 -7
  185. package/lib/components/VTextField/VTextField.css +68 -65
  186. package/lib/components/VTextarea/VTextarea.css +39 -47
  187. package/lib/components/VTextarea/VTextarea.sass +2 -4
  188. package/lib/components/VThemeProvider/VThemeProvider.css +3 -5
  189. package/lib/components/VTimeline/VTimeline.css +418 -379
  190. package/lib/components/VToolbar/VToolbar.css +143 -136
  191. package/lib/components/VTooltip/VTooltip.css +21 -25
  192. package/lib/components/VTooltip/VTooltip.mjs +3 -3
  193. package/lib/components/VTooltip/VTooltip.mjs.map +1 -1
  194. package/lib/components/VTooltip/VTooltip.sass +6 -8
  195. package/lib/components/VVirtualScroll/VVirtualScroll.css +9 -11
  196. package/lib/components/VWindow/VWindow.css +70 -73
  197. package/lib/components/VWindow/index.d.mts +7 -7
  198. package/lib/components/index.d.mts +138 -132
  199. package/lib/composables/form.mjs +7 -2
  200. package/lib/composables/form.mjs.map +1 -1
  201. package/lib/composables/group.mjs +3 -3
  202. package/lib/composables/group.mjs.map +1 -1
  203. package/lib/composables/layout.mjs +3 -3
  204. package/lib/composables/layout.mjs.map +1 -1
  205. package/lib/composables/nested/nested.mjs +2 -2
  206. package/lib/composables/nested/nested.mjs.map +1 -1
  207. package/lib/composables/theme.mjs +4 -4
  208. package/lib/composables/theme.mjs.map +1 -1
  209. package/lib/composables/validation.mjs +13 -15
  210. package/lib/composables/validation.mjs.map +1 -1
  211. package/lib/directives/ripple/VRipple.css +36 -38
  212. package/lib/entry-bundler.mjs +1 -1
  213. package/lib/entry-bundler.mjs.map +1 -1
  214. package/lib/framework.mjs +2 -3
  215. package/lib/framework.mjs.map +1 -1
  216. package/lib/index.d.mts +53 -53
  217. package/lib/labs/VCalendar/VCalendar.css +225 -219
  218. package/lib/labs/VCalendar/VCalendarDay.css +32 -33
  219. package/lib/labs/VCalendar/VCalendarHeader.css +13 -13
  220. package/lib/labs/VCalendar/VCalendarInterval.css +42 -43
  221. package/lib/labs/VCalendar/VCalendarIntervalEvent.css +5 -7
  222. package/lib/labs/VCalendar/VCalendarMonthDay.css +58 -61
  223. package/lib/labs/VCalendar/VCalendarMonthDay.sass +2 -3
  224. package/lib/labs/VDateInput/VDateInput.mjs +1 -1
  225. package/lib/labs/VDateInput/VDateInput.mjs.map +1 -1
  226. package/lib/labs/VNumberInput/VNumberInput.css +38 -40
  227. package/lib/labs/VNumberInput/VNumberInput.mjs +7 -5
  228. package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
  229. package/lib/labs/VPicker/VPicker.css +57 -53
  230. package/lib/labs/VStepperVertical/index.d.mts +44 -44
  231. package/lib/labs/VTimePicker/VTimePicker.css +7 -9
  232. package/lib/labs/VTimePicker/VTimePickerClock.css +129 -126
  233. package/lib/labs/VTimePicker/VTimePickerControls.css +103 -102
  234. package/lib/labs/VTreeview/VTreeviewItem.css +15 -17
  235. package/lib/labs/VTreeview/VTreeviewItem.mjs +3 -4
  236. package/lib/labs/VTreeview/VTreeviewItem.mjs.map +1 -1
  237. package/lib/labs/VTreeview/VTreeviewItem.sass +1 -2
  238. package/lib/labs/VTreeview/index.d.mts +20 -20
  239. package/lib/labs/components.d.mts +64 -64
  240. package/lib/locale/fr.mjs +1 -1
  241. package/lib/locale/fr.mjs.map +1 -1
  242. package/lib/styles/elements/_global.sass +1 -1
  243. package/lib/styles/generic/_colors.scss +3 -3
  244. package/lib/styles/generic/_layers.scss +1 -13
  245. package/lib/styles/generic/_transitions.scss +32 -32
  246. package/lib/styles/main.css +16139 -14666
  247. package/lib/styles/settings/_utilities.scss +5 -0
  248. package/lib/styles/settings/_variables.scss +2 -1
  249. package/lib/styles/tools/_bootable.sass +3 -0
  250. package/lib/styles/tools/_border.sass +4 -4
  251. package/lib/styles/tools/_display.sass +10 -0
  252. package/lib/styles/tools/_elevation.sass +2 -2
  253. package/lib/styles/tools/_index.sass +2 -0
  254. package/lib/styles/tools/_layer.scss +2 -4
  255. package/lib/styles/tools/_position.sass +2 -2
  256. package/lib/styles/tools/_radius.sass +10 -0
  257. package/lib/styles/tools/_rounded.sass +2 -2
  258. package/lib/styles/tools/_utilities.sass +5 -1
  259. package/lib/styles/utilities/_elevation.scss +1 -1
  260. package/lib/util/getCurrentInstance.mjs +1 -15
  261. package/lib/util/getCurrentInstance.mjs.map +1 -1
  262. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"theme.mjs","names":["computed","inject","provide","ref","watch","watchEffect","createRange","darken","getCurrentInstance","getForeground","getLuma","IN_BROWSER","lighten","mergeDeep","parseColor","propsFactory","RGBtoHex","ThemeSymbol","Symbol","for","makeThemeProps","theme","String","genDefaults","defaultTheme","variations","colors","themes","light","dark","background","surface","primary","secondary","error","info","success","warning","variables","parseThemeOptions","options","arguments","length","undefined","defaults","isDisabled","key","Object","entries","createTheme","parsedOptions","name","computedThemes","acc","original","value","color","variation","fn","amount","keys","test","onColor","colorVal","current","styles","lines","createCssClass","genCssVariables","themeName","bgLines","fgLines","Set","values","flatMap","push","map","v","join","getHead","style","children","id","nonce","cspNonce","install","app","head","_context","provides","usehead","entry","patch","addHeadObjs","updateDOM","styleEl","document","getElementById","updateStyles","immediate","el","createElement","type","setAttribute","appendChild","innerHTML","themeClasses","global","provideTheme","props","Error","newTheme","useTheme","selector","content","line","lightOverlay","darkOverlay","rgb","r","g","b","startsWith"],"sources":["../../src/composables/theme.ts"],"sourcesContent":["// Utilities\nimport {\n computed,\n inject,\n provide,\n ref,\n watch,\n watchEffect,\n} from 'vue'\nimport {\n createRange,\n darken,\n getCurrentInstance,\n getForeground,\n getLuma,\n IN_BROWSER,\n lighten,\n mergeDeep,\n parseColor,\n propsFactory,\n RGBtoHex,\n} from '@/util'\n\n// Types\nimport type { VueHeadClient } from '@unhead/vue'\nimport type { HeadClient } from '@vueuse/head'\nimport type { App, DeepReadonly, InjectionKey, Ref } from 'vue'\n\ntype DeepPartial<T> = T extends object ? { [P in keyof T]?: DeepPartial<T[P]> } : T\n\nexport type ThemeOptions = false | {\n cspNonce?: string\n defaultTheme?: string\n variations?: false | VariationsOptions\n themes?: Record<string, ThemeDefinition>\n}\nexport type ThemeDefinition = DeepPartial<InternalThemeDefinition>\n\ninterface InternalThemeOptions {\n cspNonce?: string\n isDisabled: boolean\n defaultTheme: string\n variations: false | VariationsOptions\n themes: Record<string, InternalThemeDefinition>\n}\n\ninterface VariationsOptions {\n colors: string[]\n lighten: number\n darken: number\n}\n\ninterface InternalThemeDefinition {\n dark: boolean\n colors: Colors\n variables: Record<string, string | number>\n}\n\nexport interface Colors extends BaseColors, OnColors {\n [key: string]: string\n}\n\ninterface BaseColors {\n background: string\n surface: string\n primary: string\n secondary: string\n success: string\n warning: string\n error: string\n info: string\n}\n\ninterface OnColors {\n 'on-background': string\n 'on-surface': string\n 'on-primary': string\n 'on-secondary': string\n 'on-success': string\n 'on-warning': string\n 'on-error': string\n 'on-info': string\n}\n\nexport interface ThemeInstance {\n readonly isDisabled: boolean\n readonly themes: Ref<Record<string, InternalThemeDefinition>>\n\n readonly name: Readonly<Ref<string>>\n readonly current: DeepReadonly<Ref<InternalThemeDefinition>>\n readonly computedThemes: DeepReadonly<Ref<Record<string, InternalThemeDefinition>>>\n\n readonly themeClasses: Readonly<Ref<string | undefined>>\n readonly styles: Readonly<Ref<string>>\n\n readonly global: {\n readonly name: Ref<string>\n readonly current: DeepReadonly<Ref<InternalThemeDefinition>>\n }\n}\n\nexport const ThemeSymbol: InjectionKey<ThemeInstance> = Symbol.for('vuetify:theme')\n\nexport const makeThemeProps = propsFactory({\n theme: String,\n}, 'theme')\n\nfunction genDefaults () {\n return {\n defaultTheme: 'light',\n variations: { colors: [], lighten: 0, darken: 0 },\n themes: {\n light: {\n dark: false,\n colors: {\n background: '#FFFFFF',\n surface: '#FFFFFF',\n 'surface-bright': '#FFFFFF',\n 'surface-light': '#EEEEEE',\n 'surface-variant': '#424242',\n 'on-surface-variant': '#EEEEEE',\n primary: '#1867C0',\n 'primary-darken-1': '#1F5592',\n secondary: '#48A9A6',\n 'secondary-darken-1': '#018786',\n error: '#B00020',\n info: '#2196F3',\n success: '#4CAF50',\n warning: '#FB8C00',\n },\n variables: {\n 'border-color': '#000000',\n 'border-opacity': 0.12,\n 'high-emphasis-opacity': 0.87,\n 'medium-emphasis-opacity': 0.60,\n 'disabled-opacity': 0.38,\n 'idle-opacity': 0.04,\n 'hover-opacity': 0.04,\n 'focus-opacity': 0.12,\n 'selected-opacity': 0.08,\n 'activated-opacity': 0.12,\n 'pressed-opacity': 0.12,\n 'dragged-opacity': 0.08,\n 'theme-kbd': '#212529',\n 'theme-on-kbd': '#FFFFFF',\n 'theme-code': '#F5F5F5',\n 'theme-on-code': '#000000',\n },\n },\n dark: {\n dark: true,\n colors: {\n background: '#121212',\n surface: '#212121',\n 'surface-bright': '#ccbfd6',\n 'surface-light': '#424242',\n 'surface-variant': '#a3a3a3',\n 'on-surface-variant': '#424242',\n primary: '#2196F3',\n 'primary-darken-1': '#277CC1',\n secondary: '#54B6B2',\n 'secondary-darken-1': '#48A9A6',\n error: '#CF6679',\n info: '#2196F3',\n success: '#4CAF50',\n warning: '#FB8C00',\n },\n variables: {\n 'border-color': '#FFFFFF',\n 'border-opacity': 0.12,\n 'high-emphasis-opacity': 1,\n 'medium-emphasis-opacity': 0.70,\n 'disabled-opacity': 0.50,\n 'idle-opacity': 0.10,\n 'hover-opacity': 0.04,\n 'focus-opacity': 0.12,\n 'selected-opacity': 0.08,\n 'activated-opacity': 0.12,\n 'pressed-opacity': 0.16,\n 'dragged-opacity': 0.08,\n 'theme-kbd': '#212529',\n 'theme-on-kbd': '#FFFFFF',\n 'theme-code': '#343434',\n 'theme-on-code': '#CCCCCC',\n },\n },\n },\n }\n}\n\nfunction parseThemeOptions (options: ThemeOptions = genDefaults()): InternalThemeOptions {\n const defaults = genDefaults()\n\n if (!options) return { ...defaults, isDisabled: true } as any\n\n const themes: Record<string, InternalThemeDefinition> = {}\n for (const [key, theme] of Object.entries(options.themes ?? {})) {\n const defaultTheme = theme.dark || key === 'dark'\n ? defaults.themes?.dark\n : defaults.themes?.light\n themes[key] = mergeDeep(defaultTheme, theme) as InternalThemeDefinition\n }\n\n return mergeDeep(\n defaults,\n { ...options, themes },\n ) as InternalThemeOptions\n}\n\n// Composables\nexport function createTheme (options?: ThemeOptions): ThemeInstance & { install: (app: App) => void } {\n const parsedOptions = parseThemeOptions(options)\n const name = ref(parsedOptions.defaultTheme)\n const themes = ref(parsedOptions.themes)\n\n const computedThemes = computed(() => {\n const acc: Record<string, InternalThemeDefinition> = {}\n for (const [name, original] of Object.entries(themes.value)) {\n const theme: InternalThemeDefinition = acc[name] = {\n ...original,\n colors: {\n ...original.colors,\n },\n }\n\n if (parsedOptions.variations) {\n for (const name of parsedOptions.variations.colors) {\n const color = theme.colors[name]\n\n if (!color) continue\n\n for (const variation of (['lighten', 'darken'] as const)) {\n const fn = variation === 'lighten' ? lighten : darken\n for (const amount of createRange(parsedOptions.variations[variation], 1)) {\n theme.colors[`${name}-${variation}-${amount}`] = RGBtoHex(fn(parseColor(color), amount))\n }\n }\n }\n }\n\n for (const color of Object.keys(theme.colors)) {\n if (/^on-[a-z]/.test(color) || theme.colors[`on-${color}`]) continue\n\n const onColor = `on-${color}` as keyof OnColors\n const colorVal = parseColor(theme.colors[color]!)\n\n theme.colors[onColor] = getForeground(colorVal)\n }\n }\n\n return acc\n })\n const current = computed(() => computedThemes.value[name.value])\n\n const styles = computed(() => {\n const lines: string[] = []\n\n if (current.value?.dark) {\n createCssClass(lines, ':root', ['color-scheme: dark'])\n }\n\n createCssClass(lines, ':root', genCssVariables(current.value))\n\n for (const [themeName, theme] of Object.entries(computedThemes.value)) {\n createCssClass(lines, `.v-theme--${themeName}`, [\n `color-scheme: ${theme.dark ? 'dark' : 'normal'}`,\n ...genCssVariables(theme),\n ])\n }\n\n const bgLines: string[] = []\n const fgLines: string[] = []\n\n const colors = new Set(Object.values(computedThemes.value).flatMap(theme => Object.keys(theme.colors)))\n for (const key of colors) {\n if (/^on-[a-z]/.test(key)) {\n createCssClass(fgLines, `.${key}`, [`color: rgb(var(--v-theme-${key}))`])\n } else {\n createCssClass(bgLines, `.bg-${key}`, [\n `--v-theme-overlay-multiplier: var(--v-theme-${key}-overlay-multiplier)`,\n `background-color: rgb(var(--v-theme-${key}))`,\n `color: rgb(var(--v-theme-on-${key}))`,\n ])\n createCssClass(fgLines, `.text-${key}`, [`color: rgb(var(--v-theme-${key}))`])\n createCssClass(fgLines, `.border-${key}`, [`--v-border-color: var(--v-theme-${key})`])\n }\n }\n\n lines.push(...bgLines, ...fgLines)\n\n return '@layer vuetify.theme {\\n' + lines.map(v => ` ${v}`).join('') + '\\n}'\n })\n\n function getHead () {\n return {\n style: [{\n children: styles.value,\n id: 'vuetify-theme-stylesheet',\n nonce: parsedOptions.cspNonce || false as never,\n }],\n }\n }\n\n function install (app: App) {\n if (parsedOptions.isDisabled) return\n\n const head = app._context.provides.usehead as HeadClient & VueHeadClient<any> | undefined\n if (head) {\n if (head.push) {\n const entry = head.push(getHead)\n if (IN_BROWSER) {\n watch(styles, () => { entry.patch(getHead) })\n }\n } else {\n if (IN_BROWSER) {\n head.addHeadObjs(computed(getHead))\n watchEffect(() => head.updateDOM())\n } else {\n head.addHeadObjs(getHead())\n }\n }\n } else {\n let styleEl = IN_BROWSER\n ? document.getElementById('vuetify-theme-stylesheet')\n : null\n\n if (IN_BROWSER) {\n watch(styles, updateStyles, { immediate: true })\n } else {\n updateStyles()\n }\n\n function updateStyles () {\n if (typeof document !== 'undefined' && !styleEl) {\n const el = document.createElement('style')\n el.type = 'text/css'\n el.id = 'vuetify-theme-stylesheet'\n if (parsedOptions.cspNonce) el.setAttribute('nonce', parsedOptions.cspNonce)\n\n styleEl = el\n document.head.appendChild(styleEl)\n }\n\n if (styleEl) styleEl.innerHTML = styles.value\n }\n }\n }\n\n const themeClasses = computed(() => parsedOptions.isDisabled ? undefined : `v-theme--${name.value}`)\n\n return {\n install,\n isDisabled: parsedOptions.isDisabled,\n name,\n themes,\n current,\n computedThemes,\n themeClasses,\n styles,\n global: {\n name,\n current,\n },\n }\n}\n\nexport function provideTheme (props: { theme?: string }) {\n getCurrentInstance('provideTheme')\n\n const theme = inject(ThemeSymbol, null)\n\n if (!theme) throw new Error('Could not find Vuetify theme injection')\n\n const name = computed<string>(() => {\n return props.theme ?? theme.name.value\n })\n const current = computed(() => theme.themes.value[name.value])\n\n const themeClasses = computed(() => theme.isDisabled ? undefined : `v-theme--${name.value}`)\n\n const newTheme: ThemeInstance = {\n ...theme,\n name,\n current,\n themeClasses,\n }\n\n provide(ThemeSymbol, newTheme)\n\n return newTheme\n}\n\nexport function useTheme () {\n getCurrentInstance('useTheme')\n\n const theme = inject(ThemeSymbol, null)\n\n if (!theme) throw new Error('Could not find Vuetify theme injection')\n\n return theme\n}\n\nfunction createCssClass (lines: string[], selector: string, content: string[]) {\n lines.push(\n `${selector} {\\n`,\n ...content.map(line => ` ${line};\\n`),\n '}\\n',\n )\n}\n\nfunction genCssVariables (theme: InternalThemeDefinition) {\n const lightOverlay = theme.dark ? 2 : 1\n const darkOverlay = theme.dark ? 1 : 2\n\n const variables: string[] = []\n for (const [key, value] of Object.entries(theme.colors)) {\n const rgb = parseColor(value)\n variables.push(`--v-theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`)\n if (!key.startsWith('on-')) {\n variables.push(`--v-theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`)\n }\n }\n\n for (const [key, value] of Object.entries(theme.variables)) {\n const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined\n const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined\n variables.push(`--v-${key}: ${rgb ?? value}`)\n }\n\n return variables\n}\n"],"mappings":"AAAA;AACA,SACEA,QAAQ,EACRC,MAAM,EACNC,OAAO,EACPC,GAAG,EACHC,KAAK,EACLC,WAAW,QACN,KAAK;AAAA,SAEVC,WAAW,EACXC,MAAM,EACNC,kBAAkB,EAClBC,aAAa,EACbC,OAAO,EACPC,UAAU,EACVC,OAAO,EACPC,SAAS,EACTC,UAAU,EACVC,YAAY,EACZC,QAAQ,6BAGV;AA8EA,OAAO,MAAMC,WAAwC,GAAGC,MAAM,CAACC,GAAG,CAAC,eAAe,CAAC;AAEnF,OAAO,MAAMC,cAAc,GAAGL,YAAY,CAAC;EACzCM,KAAK,EAAEC;AACT,CAAC,EAAE,OAAO,CAAC;AAEX,SAASC,WAAWA,CAAA,EAAI;EACtB,OAAO;IACLC,YAAY,EAAE,OAAO;IACrBC,UAAU,EAAE;MAAEC,MAAM,EAAE,EAAE;MAAEd,OAAO,EAAE,CAAC;MAAEL,MAAM,EAAE;IAAE,CAAC;IACjDoB,MAAM,EAAE;MACNC,KAAK,EAAE;QACLC,IAAI,EAAE,KAAK;QACXH,MAAM,EAAE;UACNI,UAAU,EAAE,SAAS;UACrBC,OAAO,EAAE,SAAS;UAClB,gBAAgB,EAAE,SAAS;UAC3B,eAAe,EAAE,SAAS;UAC1B,iBAAiB,EAAE,SAAS;UAC5B,oBAAoB,EAAE,SAAS;UAC/BC,OAAO,EAAE,SAAS;UAClB,kBAAkB,EAAE,SAAS;UAC7BC,SAAS,EAA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AAK,GAAG,OAAOD,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACmE,UAAU,CAAC,GAAG,CAAC,GAAG5G,UAAU,CAACyC,KAAK,CAAC,GAAGZ,SAAS;IAChG,MAAM2E,GAAG,GAAG9D,KAAK,GAAG,GAAGA,KAAK,CAAC+D,CAAC,KAAK/D,KAAK,CAACgE,CAAC,KAAKhE,KAAK,CAACiE,CAAC,EAAE,GAAG9E,SAAS;IACpEL,SAAS,CAACqC,IAAI,CAAC,OAAO7B,GAAG,KAAKwE,GAAG,IAAI/D,KAAK,EAAE,CAAC;EAC/C;EAEA,OAAOjB,SAAS;AAClB","ignoreList":[]}
1
+ {"version":3,"file":"theme.mjs","names":["computed","inject","provide","ref","watch","watchEffect","createRange","darken","getCurrentInstance","getForeground","getLuma","IN_BROWSER","lighten","mergeDeep","parseColor","propsFactory","RGBtoHex","ThemeSymbol","Symbol","for","makeThemeProps","theme","String","genDefaults","defaultTheme","variations","colors","themes","light","dark","background","surface","primary","secondary","error","info","success","warning","variables","parseThemeOptions","options","arguments","length","undefined","defaults","isDisabled","key","Object","entries","createTheme","parsedOptions","name","computedThemes","acc","original","value","color","variation","fn","amount","keys","test","onColor","colorVal","current","styles","lines","createCssClass","genCssVariables","themeName","bgLines","fgLines","Set","values","flatMap","push","map","str","i","join","getHead","style","children","id","nonce","cspNonce","install","app","head","_context","provides","usehead","entry","patch","addHeadObjs","updateDOM","styleEl","document","getElementById","updateStyles","immediate","el","createElement","type","setAttribute","appendChild","innerHTML","themeClasses","global","provideTheme","props","Error","newTheme","useTheme","selector","content","line","lightOverlay","darkOverlay","rgb","r","g","b","startsWith"],"sources":["../../src/composables/theme.ts"],"sourcesContent":["// Utilities\nimport {\n computed,\n inject,\n provide,\n ref,\n watch,\n watchEffect,\n} from 'vue'\nimport {\n createRange,\n darken,\n getCurrentInstance,\n getForeground,\n getLuma,\n IN_BROWSER,\n lighten,\n mergeDeep,\n parseColor,\n propsFactory,\n RGBtoHex,\n} from '@/util'\n\n// Types\nimport type { VueHeadClient } from '@unhead/vue'\nimport type { HeadClient } from '@vueuse/head'\nimport type { App, DeepReadonly, InjectionKey, Ref } from 'vue'\n\ntype DeepPartial<T> = T extends object ? { [P in keyof T]?: DeepPartial<T[P]> } : T\n\nexport type ThemeOptions = false | {\n cspNonce?: string\n defaultTheme?: string\n variations?: false | VariationsOptions\n themes?: Record<string, ThemeDefinition>\n}\nexport type ThemeDefinition = DeepPartial<InternalThemeDefinition>\n\ninterface InternalThemeOptions {\n cspNonce?: string\n isDisabled: boolean\n defaultTheme: string\n variations: false | VariationsOptions\n themes: Record<string, InternalThemeDefinition>\n}\n\ninterface VariationsOptions {\n colors: string[]\n lighten: number\n darken: number\n}\n\ninterface InternalThemeDefinition {\n dark: boolean\n colors: Colors\n variables: Record<string, string | number>\n}\n\nexport interface Colors extends BaseColors, OnColors {\n [key: string]: string\n}\n\ninterface BaseColors {\n background: string\n surface: string\n primary: string\n secondary: string\n success: string\n warning: string\n error: string\n info: string\n}\n\ninterface OnColors {\n 'on-background': string\n 'on-surface': string\n 'on-primary': string\n 'on-secondary': string\n 'on-success': string\n 'on-warning': string\n 'on-error': string\n 'on-info': string\n}\n\nexport interface ThemeInstance {\n readonly isDisabled: boolean\n readonly themes: Ref<Record<string, InternalThemeDefinition>>\n\n readonly name: Readonly<Ref<string>>\n readonly current: DeepReadonly<Ref<InternalThemeDefinition>>\n readonly computedThemes: DeepReadonly<Ref<Record<string, InternalThemeDefinition>>>\n\n readonly themeClasses: Readonly<Ref<string | undefined>>\n readonly styles: Readonly<Ref<string>>\n\n readonly global: {\n readonly name: Ref<string>\n readonly current: DeepReadonly<Ref<InternalThemeDefinition>>\n }\n}\n\nexport const ThemeSymbol: InjectionKey<ThemeInstance> = Symbol.for('vuetify:theme')\n\nexport const makeThemeProps = propsFactory({\n theme: String,\n}, 'theme')\n\nfunction genDefaults () {\n return {\n defaultTheme: 'light',\n variations: { colors: [], lighten: 0, darken: 0 },\n themes: {\n light: {\n dark: false,\n colors: {\n background: '#FFFFFF',\n surface: '#FFFFFF',\n 'surface-bright': '#FFFFFF',\n 'surface-light': '#EEEEEE',\n 'surface-variant': '#424242',\n 'on-surface-variant': '#EEEEEE',\n primary: '#1867C0',\n 'primary-darken-1': '#1F5592',\n secondary: '#48A9A6',\n 'secondary-darken-1': '#018786',\n error: '#B00020',\n info: '#2196F3',\n success: '#4CAF50',\n warning: '#FB8C00',\n },\n variables: {\n 'border-color': '#000000',\n 'border-opacity': 0.12,\n 'high-emphasis-opacity': 0.87,\n 'medium-emphasis-opacity': 0.60,\n 'disabled-opacity': 0.38,\n 'idle-opacity': 0.04,\n 'hover-opacity': 0.04,\n 'focus-opacity': 0.12,\n 'selected-opacity': 0.08,\n 'activated-opacity': 0.12,\n 'pressed-opacity': 0.12,\n 'dragged-opacity': 0.08,\n 'theme-kbd': '#212529',\n 'theme-on-kbd': '#FFFFFF',\n 'theme-code': '#F5F5F5',\n 'theme-on-code': '#000000',\n },\n },\n dark: {\n dark: true,\n colors: {\n background: '#121212',\n surface: '#212121',\n 'surface-bright': '#ccbfd6',\n 'surface-light': '#424242',\n 'surface-variant': '#a3a3a3',\n 'on-surface-variant': '#424242',\n primary: '#2196F3',\n 'primary-darken-1': '#277CC1',\n secondary: '#54B6B2',\n 'secondary-darken-1': '#48A9A6',\n error: '#CF6679',\n info: '#2196F3',\n success: '#4CAF50',\n warning: '#FB8C00',\n },\n variables: {\n 'border-color': '#FFFFFF',\n 'border-opacity': 0.12,\n 'high-emphasis-opacity': 1,\n 'medium-emphasis-opacity': 0.70,\n 'disabled-opacity': 0.50,\n 'idle-opacity': 0.10,\n 'hover-opacity': 0.04,\n 'focus-opacity': 0.12,\n 'selected-opacity': 0.08,\n 'activated-opacity': 0.12,\n 'pressed-opacity': 0.16,\n 'dragged-opacity': 0.08,\n 'theme-kbd': '#212529',\n 'theme-on-kbd': '#FFFFFF',\n 'theme-code': '#343434',\n 'theme-on-code': '#CCCCCC',\n },\n },\n },\n }\n}\n\nfunction parseThemeOptions (options: ThemeOptions = genDefaults()): InternalThemeOptions {\n const defaults = genDefaults()\n\n if (!options) return { ...defaults, isDisabled: true } as any\n\n const themes: Record<string, InternalThemeDefinition> = {}\n for (const [key, theme] of Object.entries(options.themes ?? {})) {\n const defaultTheme = theme.dark || key === 'dark'\n ? defaults.themes?.dark\n : defaults.themes?.light\n themes[key] = mergeDeep(defaultTheme, theme) as InternalThemeDefinition\n }\n\n return mergeDeep(\n defaults,\n { ...options, themes },\n ) as InternalThemeOptions\n}\n\n// Composables\nexport function createTheme (options?: ThemeOptions): ThemeInstance & { install: (app: App) => void } {\n const parsedOptions = parseThemeOptions(options)\n const name = ref(parsedOptions.defaultTheme)\n const themes = ref(parsedOptions.themes)\n\n const computedThemes = computed(() => {\n const acc: Record<string, InternalThemeDefinition> = {}\n for (const [name, original] of Object.entries(themes.value)) {\n const theme: InternalThemeDefinition = acc[name] = {\n ...original,\n colors: {\n ...original.colors,\n },\n }\n\n if (parsedOptions.variations) {\n for (const name of parsedOptions.variations.colors) {\n const color = theme.colors[name]\n\n if (!color) continue\n\n for (const variation of (['lighten', 'darken'] as const)) {\n const fn = variation === 'lighten' ? lighten : darken\n for (const amount of createRange(parsedOptions.variations[variation], 1)) {\n theme.colors[`${name}-${variation}-${amount}`] = RGBtoHex(fn(parseColor(color), amount))\n }\n }\n }\n }\n\n for (const color of Object.keys(theme.colors)) {\n if (/^on-[a-z]/.test(color) || theme.colors[`on-${color}`]) continue\n\n const onColor = `on-${color}` as keyof OnColors\n const colorVal = parseColor(theme.colors[color]!)\n\n theme.colors[onColor] = getForeground(colorVal)\n }\n }\n\n return acc\n })\n const current = computed(() => computedThemes.value[name.value])\n\n const styles = computed(() => {\n const lines: string[] = []\n\n if (current.value?.dark) {\n createCssClass(lines, ':root', ['color-scheme: dark'])\n }\n\n createCssClass(lines, ':root', genCssVariables(current.value))\n\n for (const [themeName, theme] of Object.entries(computedThemes.value)) {\n createCssClass(lines, `.v-theme--${themeName}`, [\n `color-scheme: ${theme.dark ? 'dark' : 'normal'}`,\n ...genCssVariables(theme),\n ])\n }\n\n const bgLines: string[] = []\n const fgLines: string[] = []\n\n const colors = new Set(Object.values(computedThemes.value).flatMap(theme => Object.keys(theme.colors)))\n for (const key of colors) {\n if (/^on-[a-z]/.test(key)) {\n createCssClass(fgLines, `.${key}`, [`color: rgb(var(--v-theme-${key})) !important`])\n } else {\n createCssClass(bgLines, `.bg-${key}`, [\n `--v-theme-overlay-multiplier: var(--v-theme-${key}-overlay-multiplier)`,\n `background-color: rgb(var(--v-theme-${key})) !important`,\n `color: rgb(var(--v-theme-on-${key})) !important`,\n ])\n createCssClass(fgLines, `.text-${key}`, [`color: rgb(var(--v-theme-${key})) !important`])\n createCssClass(fgLines, `.border-${key}`, [`--v-border-color: var(--v-theme-${key})`])\n }\n }\n\n lines.push(...bgLines, ...fgLines)\n\n return lines.map((str, i) => i === 0 ? str : ` ${str}`).join('')\n })\n\n function getHead () {\n return {\n style: [{\n children: styles.value,\n id: 'vuetify-theme-stylesheet',\n nonce: parsedOptions.cspNonce || false as never,\n }],\n }\n }\n\n function install (app: App) {\n if (parsedOptions.isDisabled) return\n\n const head = app._context.provides.usehead as HeadClient & VueHeadClient<any> | undefined\n if (head) {\n if (head.push) {\n const entry = head.push(getHead)\n if (IN_BROWSER) {\n watch(styles, () => { entry.patch(getHead) })\n }\n } else {\n if (IN_BROWSER) {\n head.addHeadObjs(computed(getHead))\n watchEffect(() => head.updateDOM())\n } else {\n head.addHeadObjs(getHead())\n }\n }\n } else {\n let styleEl = IN_BROWSER\n ? document.getElementById('vuetify-theme-stylesheet')\n : null\n\n if (IN_BROWSER) {\n watch(styles, updateStyles, { immediate: true })\n } else {\n updateStyles()\n }\n\n function updateStyles () {\n if (typeof document !== 'undefined' && !styleEl) {\n const el = document.createElement('style')\n el.type = 'text/css'\n el.id = 'vuetify-theme-stylesheet'\n if (parsedOptions.cspNonce) el.setAttribute('nonce', parsedOptions.cspNonce)\n\n styleEl = el\n document.head.appendChild(styleEl)\n }\n\n if (styleEl) styleEl.innerHTML = styles.value\n }\n }\n }\n\n const themeClasses = computed(() => parsedOptions.isDisabled ? undefined : `v-theme--${name.value}`)\n\n return {\n install,\n isDisabled: parsedOptions.isDisabled,\n name,\n themes,\n current,\n computedThemes,\n themeClasses,\n styles,\n global: {\n name,\n current,\n },\n }\n}\n\nexport function provideTheme (props: { theme?: string }) {\n getCurrentInstance('provideTheme')\n\n const theme = inject(ThemeSymbol, null)\n\n if (!theme) throw new Error('Could not find Vuetify theme injection')\n\n const name = computed<string>(() => {\n return props.theme ?? theme.name.value\n })\n const current = computed(() => theme.themes.value[name.value])\n\n const themeClasses = computed(() => theme.isDisabled ? undefined : `v-theme--${name.value}`)\n\n const newTheme: ThemeInstance = {\n ...theme,\n name,\n current,\n themeClasses,\n }\n\n provide(ThemeSymbol, newTheme)\n\n return newTheme\n}\n\nexport function useTheme () {\n getCurrentInstance('useTheme')\n\n const theme = inject(ThemeSymbol, null)\n\n if (!theme) throw new Error('Could not find Vuetify theme injection')\n\n return theme\n}\n\nfunction createCssClass (lines: string[], selector: string, content: string[]) {\n lines.push(\n `${selector} {\\n`,\n ...content.map(line => ` ${line};\\n`),\n '}\\n',\n )\n}\n\nfunction genCssVariables (theme: InternalThemeDefinition) {\n const lightOverlay = theme.dark ? 2 : 1\n const darkOverlay = theme.dark ? 1 : 2\n\n const variables: string[] = []\n for (const [key, value] of Object.entries(theme.colors)) {\n const rgb = parseColor(value)\n variables.push(`--v-theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`)\n if (!key.startsWith('on-')) {\n variables.push(`--v-theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`)\n }\n }\n\n for (const [key, value] of Object.entries(theme.variables)) {\n const color = typeof value === 'string' && value.startsWith('#') ? parseColor(value) : undefined\n const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : undefined\n variables.push(`--v-${key}: ${rgb ?? value}`)\n }\n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,CAAC,OAAO7B,GAAG,KAAKyE,GAAG,IAAIhE,KAAK,EAAE,CAAC;EAC/C;EAEA,OAAOjB,SAAS;AAClB","ignoreList":[]}
@@ -3,8 +3,8 @@ import { makeFocusProps } from "./focus.mjs";
3
3
  import { useForm } from "./form.mjs";
4
4
  import { useProxiedModel } from "./proxiedModel.mjs";
5
5
  import { useToggleScope } from "./toggleScope.mjs"; // Utilities
6
- import { computed, nextTick, onBeforeMount, onBeforeUnmount, onMounted, ref, shallowRef, unref, watch } from 'vue';
7
- import { getCurrentInstance, getCurrentInstanceName, getUid, propsFactory, wrapInArray } from "../util/index.mjs"; // Types
6
+ import { computed, nextTick, onBeforeMount, onBeforeUnmount, onMounted, ref, shallowRef, unref, useId, watch } from 'vue';
7
+ import { getCurrentInstance, getCurrentInstanceName, propsFactory, wrapInArray } from "../util/index.mjs"; // Types
8
8
  export const makeValidationProps = propsFactory({
9
9
  disabled: {
10
10
  type: Boolean,
@@ -36,20 +36,18 @@ export const makeValidationProps = propsFactory({
36
36
  }, 'validation');
37
37
  export function useValidation(props) {
38
38
  let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();
39
- let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : getUid();
39
+ let id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : useId();
40
40
  const model = useProxiedModel(props, 'modelValue');
41
41
  const validationModel = computed(() => props.validationValue === undefined ? model.value : props.validationValue);
42
- const form = useForm();
42
+ const form = useForm(props);
43
43
  const internalErrorMessages = ref([]);
44
44
  const isPristine = shallowRef(true);
45
45
  const isDirty = computed(() => !!(wrapInArray(model.value === '' ? null : model.value).length || wrapInArray(validationModel.value === '' ? null : validationModel.value).length));
46
- const isDisabled = computed(() => !!(props.disabled ?? form?.isDisabled.value));
47
- const isReadonly = computed(() => !!(props.readonly ?? form?.isReadonly.value));
48
46
  const errorMessages = computed(() => {
49
47
  return props.errorMessages?.length ? wrapInArray(props.errorMessages).concat(internalErrorMessages.value).slice(0, Math.max(0, +props.maxErrors)) : internalErrorMessages.value;
50
48
  });
51
49
  const validateOn = computed(() => {
52
- let value = (props.validateOn ?? form?.validateOn.value) || 'input';
50
+ let value = (props.validateOn ?? form.validateOn?.value) || 'input';
53
51
  if (value === 'lazy') value = 'input lazy';
54
52
  if (value === 'eager') value = 'input eager';
55
53
  const set = new Set(value?.split(' ') ?? []);
@@ -75,14 +73,14 @@ export function useValidation(props) {
75
73
  return {
76
74
  [`${name}--error`]: isValid.value === false,
77
75
  [`${name}--dirty`]: isDirty.value,
78
- [`${name}--disabled`]: isDisabled.value,
79
- [`${name}--readonly`]: isReadonly.value
76
+ [`${name}--disabled`]: form.isDisabled.value,
77
+ [`${name}--readonly`]: form.isReadonly.value
80
78
  };
81
79
  });
82
80
  const vm = getCurrentInstance('validation');
83
81
  const uid = computed(() => props.name ?? unref(id));
84
82
  onBeforeMount(() => {
85
- form?.register({
83
+ form.register?.({
86
84
  id: uid.value,
87
85
  vm,
88
86
  validate,
@@ -91,13 +89,13 @@ export function useValidation(props) {
91
89
  });
92
90
  });
93
91
  onBeforeUnmount(() => {
94
- form?.unregister(uid.value);
92
+ form.unregister?.(uid.value);
95
93
  });
96
94
  onMounted(async () => {
97
95
  if (!validateOn.value.lazy) {
98
96
  await validate(!validateOn.value.eager);
99
97
  }
100
- form?.update(uid.value, isValid.value, errorMessages.value);
98
+ form.update?.(uid.value, isValid.value, errorMessages.value);
101
99
  });
102
100
  useToggleScope(() => validateOn.value.input || validateOn.value.invalidInput && isValid.value === false, () => {
103
101
  watch(validationModel, () => {
@@ -117,7 +115,7 @@ export function useValidation(props) {
117
115
  });
118
116
  });
119
117
  watch([isValid, errorMessages], () => {
120
- form?.update(uid.value, isValid.value, errorMessages.value);
118
+ form.update?.(uid.value, isValid.value, errorMessages.value);
121
119
  });
122
120
  async function reset() {
123
121
  model.value = null;
@@ -158,8 +156,8 @@ export function useValidation(props) {
158
156
  return {
159
157
  errorMessages,
160
158
  isDirty,
161
- isDisabled,
162
- isReadonly,
159
+ isDisabled: form.isDisabled,
160
+ isReadonly: form.isReadonly,
163
161
  isPristine,
164
162
  isValid,
165
163
  isValidating,
@@ -1 +1 @@
1
- {"version":3,"file":"validation.mjs","names":["makeFocusProps","useForm","useProxiedModel","useToggleScope","computed","nextTick","onBeforeMount","onBeforeUnmount","onMounted","ref","shallowRef","unref","watch","getCurrentInstance","getCurrentInstanceName","getUid","propsFactory","wrapInArray","makeValidationProps","disabled","type","Boolean","default","error","errorMessages","Array","String","maxErrors","Number","name","label","readonly","rules","modelValue","validateOn","validationValue","useValidation","props","arguments","length","undefined","id","model","validationModel","value","form","internalErrorMessages","isPristine","isDirty","isDisabled","isReadonly","concat","slice","Math","max","set","Set","split","input","has","blur","invalidInput","lazy","eager","isValid","isValidating","validationClasses","vm","uid","register","validate","reset","resetValidation","unregister","update","focused","unwatch","val","silent","results","rule","handler","result","console","warn","push"],"sources":["../../src/composables/validation.ts"],"sourcesContent":["// Composables\nimport { makeFocusProps } from '@/composables/focus'\nimport { useForm } from '@/composables/form'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Utilities\nimport { computed, nextTick, onBeforeMount, onBeforeUnmount, onMounted, ref, shallowRef, unref, watch } from 'vue'\nimport { getCurrentInstance, getCurrentInstanceName, getUid, propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { EventProp, MaybeRef } from '@/util'\n\nexport type ValidationResult = string | boolean\nexport type ValidationRule =\n | ValidationResult\n | PromiseLike<ValidationResult>\n | ((value: any) => ValidationResult)\n | ((value: any) => PromiseLike<ValidationResult>)\n\ntype ValidateOnValue = 'blur' | 'input' | 'submit' | 'invalid-input'\ntype ValidateOn =\n | ValidateOnValue\n | `${ValidateOnValue} lazy`\n | `${ValidateOnValue} eager`\n | `lazy ${ValidateOnValue}`\n | `eager ${ValidateOnValue}`\n | 'lazy'\n | 'eager'\n\nexport interface ValidationProps {\n disabled: boolean | null\n error: boolean\n errorMessages: string | readonly string[] | null\n focused: boolean\n maxErrors: string | number\n name: string | undefined\n label: string | undefined\n readonly: boolean | null\n rules: readonly ValidationRule[]\n modelValue: any\n 'onUpdate:modelValue': EventProp | undefined\n validateOn?: ValidateOn\n validationValue: any\n}\n\nexport const makeValidationProps = propsFactory({\n disabled: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n error: Boolean,\n errorMessages: {\n type: [Array, String] as PropType<string | readonly string[] | null>,\n default: () => ([]),\n },\n maxErrors: {\n type: [Number, String],\n default: 1,\n },\n name: String,\n label: String,\n readonly: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n rules: {\n type: Array as PropType<readonly ValidationRule[]>,\n default: () => ([]),\n },\n modelValue: null,\n validateOn: String as PropType<ValidationProps['validateOn']>,\n validationValue: null,\n\n ...makeFocusProps(),\n}, 'validation')\n\nexport function useValidation (\n props: ValidationProps,\n name = getCurrentInstanceName(),\n id: MaybeRef<string | number> = getUid(),\n) {\n const model = useProxiedModel(props, 'modelValue')\n const validationModel = computed(() => props.validationValue === undefined ? model.value : props.validationValue)\n const form = useForm()\n const internalErrorMessages = ref<string[]>([])\n const isPristine = shallowRef(true)\n const isDirty = computed(() => !!(\n wrapInArray(model.value === '' ? null : model.value).length ||\n wrapInArray(validationModel.value === '' ? null : validationModel.value).length\n ))\n const isDisabled = computed(() => !!(props.disabled ?? form?.isDisabled.value))\n const isReadonly = computed(() => !!(props.readonly ?? form?.isReadonly.value))\n const errorMessages = computed(() => {\n return props.errorMessages?.length\n ? wrapInArray(props.errorMessages).concat(internalErrorMessages.value).slice(0, Math.max(0, +props.maxErrors))\n : internalErrorMessages.value\n })\n const validateOn = computed(() => {\n let value = (props.validateOn ?? form?.validateOn.value) || 'input'\n if (value === 'lazy') value = 'input lazy'\n if (value === 'eager') value = 'input eager'\n const set = new Set(value?.split(' ') ?? [])\n\n return {\n input: set.has('input'),\n blur: set.has('blur') || set.has('input') || set.has('invalid-input'),\n invalidInput: set.has('invalid-input'),\n lazy: set.has('lazy'),\n eager: set.has('eager'),\n }\n })\n const isValid = computed(() => {\n if (props.error || props.errorMessages?.length) return false\n if (!props.rules.length) return true\n if (isPristine.value) {\n return internalErrorMessages.value.length || validateOn.value.lazy ? null : true\n } else {\n return !internalErrorMessages.value.length\n }\n })\n const isValidating = shallowRef(false)\n const validationClasses = computed(() => {\n return {\n [`${name}--error`]: isValid.value === false,\n [`${name}--dirty`]: isDirty.value,\n [`${name}--disabled`]: isDisabled.value,\n [`${name}--readonly`]: isReadonly.value,\n }\n })\n\n const vm = getCurrentInstance('validation')\n const uid = computed(() => props.name ?? unref(id))\n\n onBeforeMount(() => {\n form?.register({\n id: uid.value,\n vm,\n validate,\n reset,\n resetValidation,\n })\n })\n\n onBeforeUnmount(() => {\n form?.unregister(uid.value)\n })\n\n onMounted(async () => {\n if (!validateOn.value.lazy) {\n await validate(!validateOn.value.eager)\n }\n form?.update(uid.value, isValid.value, errorMessages.value)\n })\n\n useToggleScope(() => validateOn.value.input || (validateOn.value.invalidInput && isValid.value === false), () => {\n watch(validationModel, () => {\n if (validationModel.value != null) {\n validate()\n } else if (props.focused) {\n const unwatch = watch(() => props.focused, val => {\n if (!val) validate()\n\n unwatch()\n })\n }\n })\n })\n\n useToggleScope(() => validateOn.value.blur, () => {\n watch(() => props.focused, val => {\n if (!val) validate()\n })\n })\n\n watch([isValid, errorMessages], () => {\n form?.update(uid.value, isValid.value, errorMessages.value)\n })\n\n async function reset () {\n model.value = null\n await nextTick()\n await resetValidation()\n }\n\n async function resetValidation () {\n isPristine.value = true\n if (!validateOn.value.lazy) {\n await validate(!validateOn.value.eager)\n } else {\n internalErrorMessages.value = []\n }\n }\n\n async function validate (silent = false) {\n const results = []\n\n isValidating.value = true\n\n for (const rule of props.rules) {\n if (results.length >= +(props.maxErrors ?? 1)) {\n break\n }\n\n const handler = typeof rule === 'function' ? rule : () => rule\n const result = await handler(validationModel.value)\n\n if (result === true) continue\n\n if (result !== false && typeof result !== 'string') {\n // eslint-disable-next-line no-console\n console.warn(`${result} is not a valid value. Rule functions must return boolean true or a string.`)\n\n continue\n }\n\n results.push(result || '')\n }\n\n internalErrorMessages.value = results\n isValidating.value = false\n isPristine.value = silent\n\n return internalErrorMessages.value\n }\n\n return {\n errorMessages,\n isDirty,\n isDisabled,\n isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate,\n validationClasses,\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,cAAc;AAAA,SACdC,OAAO;AAAA,SACPC,eAAe;AAAA,SACfC,cAAc,6BAEvB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,aAAa,EAAEC,eAAe,EAAEC,SAAS,EAAEC,GAAG,EAAEC,UAAU,EAAEC,KAAK,EAAEC,KAAK,QAAQ,KAAK;AAAA,SACzGC,kBAAkB,EAAEC,sBAAsB,EAAEC,MAAM,EAAEC,YAAY,EAAEC,WAAW,6BAEtF;AAqCA,OAAO,MAAMC,mBAAmB,GAAGF,YAAY,CAAC;EAC9CG,QAAQ,EAAE;IACRC,IAAI,EAAEC,OAAmC;IACzCC,OAAO,EAAE;EACX,CAAC;EACDC,KAAK,EAAEF,OAAO;EACdG,aAAa,EAAE;IACbJ,IAAI,EAAE,CAACK,KAAK,EAAEC,MAAM,CAAgD;IACpEJ,OAAO,EAAEA,CAAA,KAAO;EAClB,CAAC;EACDK,SAAS,EAAE;IACTP,IAAI,EAAE,CAACQ,MAAM,EAAEF,MAAM,CAAC;IACtBJ,OAAO,EAAE;EACX,CAAC;EACDO,IAAI,EAAEH,MAAM;EACZI,KAAK,EAAEJ,MAAM;EACbK,QAAQ,EAAE;IACRX,IAAI,EAAEC,OAAmC;IACzCC,OAAO,EAAE;EACX,CAAC;EACDU,KAAK,EAAE;IACLZ,IAAI,EAAEK,KAA4C;IAClDH,OAAO,EAAEA,CAAA,KAAO;EAClB,CAAC;EACDW,UAAU,EAAE,IAAI;EAChBC,UAAU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GmC,OAAO;IACrCd,YAAY,CAACrB,KAAK,GAAG,KAAK;IAC1BG,UAAU,CAACH,KAAK,GAAGkC,MAAM;IAEzB,OAAOhC,qBAAqB,CAACF,KAAK;EACpC;EAEA,OAAO;IACLpB,aAAa;IACbwB,OAAO;IACPC,UAAU;IACVC,UAAU;IACVH,UAAU;IACViB,OAAO;IACPC,YAAY;IACZM,KAAK;IACLC,eAAe;IACfF,QAAQ;IACRJ;EACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"file":"validation.mjs","names":["makeFocusProps","useForm","useProxiedModel","useToggleScope","computed","nextTick","onBeforeMount","onBeforeUnmount","onMounted","ref","shallowRef","unref","useId","watch","getCurrentInstance","getCurrentInstanceName","propsFactory","wrapInArray","makeValidationProps","disabled","type","Boolean","default","error","errorMessages","Array","String","maxErrors","Number","name","label","readonly","rules","modelValue","validateOn","validationValue","useValidation","props","arguments","length","undefined","id","model","validationModel","value","form","internalErrorMessages","isPristine","isDirty","concat","slice","Math","max","set","Set","split","input","has","blur","invalidInput","lazy","eager","isValid","isValidating","validationClasses","isDisabled","isReadonly","vm","uid","register","validate","reset","resetValidation","unregister","update","focused","unwatch","val","silent","results","rule","handler","result","console","warn","push"],"sources":["../../src/composables/validation.ts"],"sourcesContent":["// Composables\nimport { makeFocusProps } from '@/composables/focus'\nimport { useForm } from '@/composables/form'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Utilities\nimport { computed, nextTick, onBeforeMount, onBeforeUnmount, onMounted, ref, shallowRef, unref, useId, watch } from 'vue'\nimport { getCurrentInstance, getCurrentInstanceName, propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { EventProp, MaybeRef } from '@/util'\n\nexport type ValidationResult = string | boolean\nexport type ValidationRule =\n | ValidationResult\n | PromiseLike<ValidationResult>\n | ((value: any) => ValidationResult)\n | ((value: any) => PromiseLike<ValidationResult>)\n\ntype ValidateOnValue = 'blur' | 'input' | 'submit' | 'invalid-input'\ntype ValidateOn =\n | ValidateOnValue\n | `${ValidateOnValue} lazy`\n | `${ValidateOnValue} eager`\n | `lazy ${ValidateOnValue}`\n | `eager ${ValidateOnValue}`\n | 'lazy'\n | 'eager'\n\nexport interface ValidationProps {\n disabled: boolean | null\n error: boolean\n errorMessages: string | readonly string[] | null\n focused: boolean\n maxErrors: string | number\n name: string | undefined\n label: string | undefined\n readonly: boolean | null\n rules: readonly ValidationRule[]\n modelValue: any\n 'onUpdate:modelValue': EventProp | undefined\n validateOn?: ValidateOn\n validationValue: any\n}\n\nexport const makeValidationProps = propsFactory({\n disabled: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n error: Boolean,\n errorMessages: {\n type: [Array, String] as PropType<string | readonly string[] | null>,\n default: () => ([]),\n },\n maxErrors: {\n type: [Number, String],\n default: 1,\n },\n name: String,\n label: String,\n readonly: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n rules: {\n type: Array as PropType<readonly ValidationRule[]>,\n default: () => ([]),\n },\n modelValue: null,\n validateOn: String as PropType<ValidationProps['validateOn']>,\n validationValue: null,\n\n ...makeFocusProps(),\n}, 'validation')\n\nexport function useValidation (\n props: ValidationProps,\n name = getCurrentInstanceName(),\n id: MaybeRef<string | number> = useId(),\n) {\n const model = useProxiedModel(props, 'modelValue')\n const validationModel = computed(() => props.validationValue === undefined ? model.value : props.validationValue)\n const form = useForm(props)\n const internalErrorMessages = ref<string[]>([])\n const isPristine = shallowRef(true)\n const isDirty = computed(() => !!(\n wrapInArray(model.value === '' ? null : model.value).length ||\n wrapInArray(validationModel.value === '' ? null : validationModel.value).length\n ))\n const errorMessages = computed(() => {\n return props.errorMessages?.length\n ? wrapInArray(props.errorMessages).concat(internalErrorMessages.value).slice(0, Math.max(0, +props.maxErrors))\n : internalErrorMessages.value\n })\n const validateOn = computed(() => {\n let value = (props.validateOn ?? form.validateOn?.value) || 'input'\n if (value === 'lazy') value = 'input lazy'\n if (value === 'eager') value = 'input eager'\n const set = new Set(value?.split(' ') ?? [])\n\n return {\n input: set.has('input'),\n blur: set.has('blur') || set.has('input') || set.has('invalid-input'),\n invalidInput: set.has('invalid-input'),\n lazy: set.has('lazy'),\n eager: set.has('eager'),\n }\n })\n const isValid = computed(() => {\n if (props.error || props.errorMessages?.length) return false\n if (!props.rules.length) return true\n if (isPristine.value) {\n return internalErrorMessages.value.length || validateOn.value.lazy ? null : true\n } else {\n return !internalErrorMessages.value.length\n }\n })\n const isValidating = shallowRef(false)\n const validationClasses = computed(() => {\n return {\n [`${name}--error`]: isValid.value === false,\n [`${name}--dirty`]: isDirty.value,\n [`${name}--disabled`]: form.isDisabled.value,\n [`${name}--readonly`]: form.isReadonly.value,\n }\n })\n\n const vm = getCurrentInstance('validation')\n const uid = computed(() => props.name ?? unref(id))\n\n onBeforeMount(() => {\n form.register?.({\n id: uid.value,\n vm,\n validate,\n reset,\n resetValidation,\n })\n })\n\n onBeforeUnmount(() => {\n form.unregister?.(uid.value)\n })\n\n onMounted(async () => {\n if (!validateOn.value.lazy) {\n await validate(!validateOn.value.eager)\n }\n form.update?.(uid.value, isValid.value, errorMessages.value)\n })\n\n useToggleScope(() => validateOn.value.input || (validateOn.value.invalidInput && isValid.value === false), () => {\n watch(validationModel, () => {\n if (validationModel.value != null) {\n validate()\n } else if (props.focused) {\n const unwatch = watch(() => props.focused, val => {\n if (!val) validate()\n\n unwatch()\n })\n }\n })\n })\n\n useToggleScope(() => validateOn.value.blur, () => {\n watch(() => props.focused, val => {\n if (!val) validate()\n })\n })\n\n watch([isValid, errorMessages], () => {\n form.update?.(uid.value, isValid.value, errorMessages.value)\n })\n\n async function reset () {\n model.value = null\n await nextTick()\n await resetValidation()\n }\n\n async function resetValidation () {\n isPristine.value = true\n if (!validateOn.value.lazy) {\n await validate(!validateOn.value.eager)\n } else {\n internalErrorMessages.value = []\n }\n }\n\n async function validate (silent = false) {\n const results = []\n\n isValidating.value = true\n\n for (const rule of props.rules) {\n if (results.length >= +(props.maxErrors ?? 1)) {\n break\n }\n\n const handler = typeof rule === 'function' ? rule : () => rule\n const result = await handler(validationModel.value)\n\n if (result === true) continue\n\n if (result !== false && typeof result !== 'string') {\n // eslint-disable-next-line no-console\n console.warn(`${result} is not a valid value. Rule functions must return boolean true or a string.`)\n\n continue\n }\n\n results.push(result || '')\n }\n\n internalErrorMessages.value = results\n isValidating.value = false\n isPristine.value = silent\n\n return internalErrorMessages.value\n }\n\n return {\n errorMessages,\n isDirty,\n isDisabled: form.isDisabled,\n isReadonly: form.isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate,\n validationClasses,\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,cAAc;AAAA,SACdC,OAAO;AAAA,SACPC,eAAe;AAAA,SACfC,cAAc,6BAEvB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,aAAa,EAAEC,eAAe,EAAEC,SAAS,EAAEC,GAAG,EAAEC,UAAU,EAAEC,KAAK,EAAEC,KAAK,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAChHC,kBAAkB,EAAEC,sBAAsB,EAAEC,YAAY,EAAEC,WAAW,6BAE9E;AAqCA,OAAO,MAAMC,mBAAmB,GAAGF,YAAY,CAAC;EAC9CG,QAAQ,EAAE;IACRC,IAAI,EAAEC,OAAmC;IACzCC,OAAO,EAAE;EACX,CAAC;EACDC,KAAK,EAAEF,OAAO;EACdG,aAAa,EAAE;IACbJ,IAAI,EAAE,CAACK,KAAK,EAAEC,MAAM,CAAgD;IACpEJ,OAAO,EAAEA,CAAA,KAAO;EAClB,CAAC;EACDK,SAAS,EAAE;IACTP,IAAI,EAAE,CAACQ,MAAM,EAAEF,MAAM,CAAC;IACtBJ,OAAO,EAAE;EACX,CAAC;EACDO,IAAI,EAAEH,MAAM;EACZI,KAAK,EAAEJ,MAAM;EACbK,QAAQ,EAAE;IACRX,IAAI,EAAEC,OAAmC;IACzCC,OAAO,EAAE;EACX,CAAC;EACDU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AACF,KAAK;EACpC;EAEA,OAAO;IACLpB,aAAa;IACbwB,OAAO;IACPiB,UAAU,EAAEpB,IAAI,CAACoB,UAAU;IAC3BC,UAAU,EAAErB,IAAI,CAACqB,UAAU;IAC3BnB,UAAU;IACVe,OAAO;IACPC,YAAY;IACZQ,KAAK;IACLC,eAAe;IACfF,QAAQ;IACRN;EACF,CAAC;AACH","ignoreList":[]}
@@ -1,39 +1,37 @@
1
- @layer vuetify.components {
2
- .v-ripple__container {
3
- color: inherit;
4
- border-radius: inherit;
5
- position: absolute;
6
- width: 100%;
7
- height: 100%;
8
- left: 0;
9
- top: 0;
10
- overflow: hidden;
11
- z-index: 0;
12
- pointer-events: none;
13
- contain: strict;
14
- }
15
- .v-ripple__animation {
16
- color: inherit;
17
- position: absolute;
18
- top: 0;
19
- left: 0;
20
- border-radius: 50%;
21
- background: currentColor;
22
- opacity: 0;
23
- pointer-events: none;
24
- overflow: hidden;
25
- will-change: transform, opacity;
26
- }
27
- .v-ripple__animation--enter {
28
- transition: none;
29
- opacity: 0;
30
- }
31
- .v-ripple__animation--in {
32
- transition: transform 0.25s cubic-bezier(0, 0, 0.2, 1), opacity 0.1s cubic-bezier(0, 0, 0.2, 1);
33
- opacity: calc(0.25 * var(--v-theme-overlay-multiplier));
34
- }
35
- .v-ripple__animation--out {
36
- transition: opacity 0.3s cubic-bezier(0, 0, 0.2, 1);
37
- opacity: 0;
38
- }
1
+ .v-ripple__container {
2
+ color: inherit;
3
+ border-radius: inherit;
4
+ position: absolute;
5
+ width: 100%;
6
+ height: 100%;
7
+ left: 0;
8
+ top: 0;
9
+ overflow: hidden;
10
+ z-index: 0;
11
+ pointer-events: none;
12
+ contain: strict;
13
+ }
14
+ .v-ripple__animation {
15
+ color: inherit;
16
+ position: absolute;
17
+ top: 0;
18
+ left: 0;
19
+ border-radius: 50%;
20
+ background: currentColor;
21
+ opacity: 0;
22
+ pointer-events: none;
23
+ overflow: hidden;
24
+ will-change: transform, opacity;
25
+ }
26
+ .v-ripple__animation--enter {
27
+ transition: none;
28
+ opacity: 0;
29
+ }
30
+ .v-ripple__animation--in {
31
+ transition: transform 0.25s cubic-bezier(0, 0, 0.2, 1), opacity 0.1s cubic-bezier(0, 0, 0.2, 1);
32
+ opacity: calc(0.25 * var(--v-theme-overlay-multiplier));
33
+ }
34
+ .v-ripple__animation--out {
35
+ transition: opacity 0.3s cubic-bezier(0, 0, 0.2, 1);
36
+ opacity: 0;
39
37
  }
@@ -16,7 +16,7 @@ export const createVuetify = function () {
16
16
  ...options
17
17
  });
18
18
  };
19
- export const version = "3.7.4-next.2024-11-06";
19
+ export const version = "3.7.5-dev.2024-12-16";
20
20
  createVuetify.version = version;
21
21
  export { blueprints, components, directives };
22
22
  export * from "./composables/index.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"entry-bundler.mjs","names":["blueprints","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 blueprints from './blueprints'\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 blueprints,\n components,\n directives,\n}\nexport * from './composables'\n"],"mappings":"AAAA;;AAEA;AACA;;AAEA;AAAA,OACO,KAAKA,UAAU;AAAA,OACf,KAAKC,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,0BAAsB;AAC1CN,aAAa,CAACM,OAAO,GAAGA,OAAO;AAE/B,SACET,UAAU,EACVC,UAAU,EACVC,UAAU;AACX","ignoreList":[]}
1
+ {"version":3,"file":"entry-bundler.mjs","names":["blueprints","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 blueprints from './blueprints'\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 blueprints,\n components,\n directives,\n}\nexport * from './composables'\n"],"mappings":"AAAA;;AAEA;AACA;;AAEA;AAAA,OACO,KAAKA,UAAU;AAAA,OACf,KAAKC,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,yBAAsB;AAC1CN,aAAa,CAACM,OAAO,GAAGA,OAAO;AAE/B,SACET,UAAU,EACVC,UAAU,EACVC,UAAU;AACX","ignoreList":[]}
package/lib/framework.mjs CHANGED
@@ -7,7 +7,7 @@ import { createIcons, IconSymbol } from "./composables/icons.mjs";
7
7
  import { createLocale, LocaleSymbol } from "./composables/locale.mjs";
8
8
  import { createTheme, ThemeSymbol } from "./composables/theme.mjs"; // Utilities
9
9
  import { nextTick, reactive } from 'vue';
10
- import { defineComponent, getUid, IN_BROWSER, mergeDeep } from "./util/index.mjs"; // Types
10
+ import { defineComponent, IN_BROWSER, mergeDeep } from "./util/index.mjs"; // Types
11
11
  export * from "./composables/index.mjs";
12
12
  export function createVuetify() {
13
13
  let vuetify = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -68,7 +68,6 @@ export function createVuetify() {
68
68
  };
69
69
  }
70
70
  }
71
- getUid.reset();
72
71
  if (typeof __VUE_OPTIONS_API__ !== 'boolean' || __VUE_OPTIONS_API__) {
73
72
  app.mixin({
74
73
  computed: {
@@ -97,7 +96,7 @@ export function createVuetify() {
97
96
  goTo
98
97
  };
99
98
  }
100
- export const version = "3.7.4-next.2024-11-06";
99
+ export const version = "3.7.5-dev.2024-12-16";
101
100
  createVuetify.version = version;
102
101
 
103
102
  // Vue's inject() can only be used in setup
@@ -1 +1 @@
1
- {"version":3,"file":"framework.mjs","names":["createDate","DateAdapterSymbol","DateOptionsSymbol","createDefaults","DefaultsSymbol","createDisplay","DisplaySymbol","createGoTo","GoToSymbol","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","goTo","install","app","key","directive","component","name","aliasName","provide","instance","$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, DateOptionsSymbol } from '@/composables/date/date'\nimport { createDefaults, DefaultsSymbol } from '@/composables/defaults'\nimport { createDisplay, DisplaySymbol } from '@/composables/display'\nimport { createGoTo, GoToSymbol } from '@/composables/goto'\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 { GoToOptions } from '@/composables/goto'\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, DateModule } 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 goTo?: GoToOptions\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 const goTo = createGoTo(options.goTo, 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(DateOptionsSymbol, date.options)\n app.provide(DateAdapterSymbol, date.instance)\n app.provide(GoToSymbol, goTo)\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 goTo,\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,EAAEC,iBAAiB;AAAA,SAChDC,cAAc,EAAEC,cAAc;AAAA,SAC9BC,aAAa,EAAEC,aAAa;AAAA,SAC5BC,UAAU,EAAEC,UAAU;AAAA,SACtBC,WAAW,EAAEC,UAAU;AAAA,SACvBC,YAAY,EAAEC,YAAY;AAAA,SAC1BC,WAAW,EAAEC,WAAW,mCAEjC;AACA,SAASC,QAAQ,EA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,KAAK,CAACC,UAAU,EAAEH,QAAQ;EAErE,IAAIA,QAAQ,IAAKrB,GAAG,IAAYqB,QAAQ,EAAE;IACxC,OAAOA,QAAQ,CAAErB,GAAG,CAAY;EAClC;AACF","ignoreList":[]}
1
+ {"version":3,"file":"framework.mjs","names":["createDate","DateAdapterSymbol","DateOptionsSymbol","createDefaults","DefaultsSymbol","createDisplay","DisplaySymbol","createGoTo","GoToSymbol","createIcons","IconSymbol","createLocale","LocaleSymbol","createTheme","ThemeSymbol","nextTick","reactive","defineComponent","IN_BROWSER","mergeDeep","createVuetify","vuetify","arguments","length","undefined","blueprint","rest","options","aliases","components","directives","defaults","display","ssr","theme","icons","locale","date","goTo","install","app","key","directive","component","name","aliasName","provide","instance","$nuxt","hook","update","mount","vm","__VUE_OPTIONS_API__","mixin","computed","$vuetify","inject","call","version","$","provides","parent","vnode","appContext"],"sources":["../src/framework.ts"],"sourcesContent":["// Composables\nimport { createDate, DateAdapterSymbol, DateOptionsSymbol } from '@/composables/date/date'\nimport { createDefaults, DefaultsSymbol } from '@/composables/defaults'\nimport { createDisplay, DisplaySymbol } from '@/composables/display'\nimport { createGoTo, GoToSymbol } from '@/composables/goto'\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, 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 { GoToOptions } from '@/composables/goto'\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, DateModule } 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 goTo?: GoToOptions\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 const goTo = createGoTo(options.goTo, 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(DateOptionsSymbol, date.options)\n app.provide(DateAdapterSymbol, date.instance)\n app.provide(GoToSymbol, goTo)\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 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 goTo,\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,EAAEC,iBAAiB;AAAA,SAChDC,cAAc,EAAEC,cAAc;AAAA,SAC9BC,aAAa,EAAEC,aAAa;AAAA,SAC5BC,UAAU,EAAEC,UAAU;AAAA,SACtBC,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,UAAU,EAAEC,SAAS,4BAE/C;AAAA;AA6BA,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,GAAG5B,cAAc,CAACwB,OAAO,CAACI,QAAQ,CAAC;EACjD,M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