Major overhaul to the theme and now functioning.
This commit is contained in:
1 parent
5823ca3c39
commit
a475dfeab6
5218 files changed
+1643729
-13229
No files matched your search
+466
-6
@@ -1,15 +1,475 @@
|
||||
{
|
||||
"hash": "de5351f0",
|
||||
"configHash": "ad9d2ba9",
|
||||
"lockfileHash": "d8cac6d1",
|
||||
"browserHash": "85657f81",
|
||||
"hash": "58793c98",
|
||||
"configHash": "939bcc17",
|
||||
"lockfileHash": "b10062e0",
|
||||
"browserHash": "e6aae6df",
|
||||
"optimized": {
|
||||
"vue": {
|
||||
"src": "../../vue/dist/vue.runtime.esm-bundler.js",
|
||||
"file": "vue.js",
|
||||
"fileHash": "936bccf3",
|
||||
"fileHash": "c9954258",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vue-router": {
|
||||
"src": "../../vue-router/dist/vue-router.mjs",
|
||||
"file": "vue-router.js",
|
||||
"fileHash": "e764d986",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify": {
|
||||
"src": "../../vuetify/lib/framework.js",
|
||||
"file": "vuetify.js",
|
||||
"fileHash": "369c86f0",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components": {
|
||||
"src": "../../vuetify/lib/components/index.js",
|
||||
"file": "vuetify_components.js",
|
||||
"fileHash": "721553c0",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/directives": {
|
||||
"src": "../../vuetify/lib/directives/index.js",
|
||||
"file": "vuetify_directives.js",
|
||||
"fileHash": "cf4c59e7",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/iconsets/mdi": {
|
||||
"src": "../../vuetify/lib/iconsets/mdi.js",
|
||||
"file": "vuetify_iconsets_mdi.js",
|
||||
"fileHash": "590e0963",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VApp": {
|
||||
"src": "../../vuetify/lib/components/VApp/index.js",
|
||||
"file": "vuetify_components_VApp.js",
|
||||
"fileHash": "f6cb1574",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VAppBar": {
|
||||
"src": "../../vuetify/lib/components/VAppBar/index.js",
|
||||
"file": "vuetify_components_VAppBar.js",
|
||||
"fileHash": "bd33378b",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VBtn": {
|
||||
"src": "../../vuetify/lib/components/VBtn/index.js",
|
||||
"file": "vuetify_components_VBtn.js",
|
||||
"fileHash": "b2541520",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VDivider": {
|
||||
"src": "../../vuetify/lib/components/VDivider/index.js",
|
||||
"file": "vuetify_components_VDivider.js",
|
||||
"fileHash": "1201295e",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VGrid": {
|
||||
"src": "../../vuetify/lib/components/VGrid/index.js",
|
||||
"file": "vuetify_components_VGrid.js",
|
||||
"fileHash": "dec97038",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VList": {
|
||||
"src": "../../vuetify/lib/components/VList/index.js",
|
||||
"file": "vuetify_components_VList.js",
|
||||
"fileHash": "92076a71",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VMain": {
|
||||
"src": "../../vuetify/lib/components/VMain/index.js",
|
||||
"file": "vuetify_components_VMain.js",
|
||||
"fileHash": "aea7930b",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VNavigationDrawer": {
|
||||
"src": "../../vuetify/lib/components/VNavigationDrawer/index.js",
|
||||
"file": "vuetify_components_VNavigationDrawer.js",
|
||||
"fileHash": "fa7c5e03",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VAlert": {
|
||||
"src": "../../vuetify/lib/components/VAlert/index.js",
|
||||
"file": "vuetify_components_VAlert.js",
|
||||
"fileHash": "5dc7580a",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VCard": {
|
||||
"src": "../../vuetify/lib/components/VCard/index.js",
|
||||
"file": "vuetify_components_VCard.js",
|
||||
"fileHash": "90108afc",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VDialog": {
|
||||
"src": "../../vuetify/lib/components/VDialog/index.js",
|
||||
"file": "vuetify_components_VDialog.js",
|
||||
"fileHash": "e56ad233",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VIcon": {
|
||||
"src": "../../vuetify/lib/components/VIcon/index.js",
|
||||
"file": "vuetify_components_VIcon.js",
|
||||
"fileHash": "ccd96f39",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VToolbar": {
|
||||
"src": "../../vuetify/lib/components/VToolbar/index.js",
|
||||
"file": "vuetify_components_VToolbar.js",
|
||||
"fileHash": "f4e18631",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VBreadcrumbs": {
|
||||
"src": "../../vuetify/lib/components/VBreadcrumbs/index.js",
|
||||
"file": "vuetify_components_VBreadcrumbs.js",
|
||||
"fileHash": "b9da5690",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VDataTable": {
|
||||
"src": "../../vuetify/lib/components/VDataTable/index.js",
|
||||
"file": "vuetify_components_VDataTable.js",
|
||||
"fileHash": "d06d0545",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VFileInput": {
|
||||
"src": "../../vuetify/lib/components/VFileInput/index.js",
|
||||
"file": "vuetify_components_VFileInput.js",
|
||||
"fileHash": "9b6d1640",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VMenu": {
|
||||
"src": "../../vuetify/lib/components/VMenu/index.js",
|
||||
"file": "vuetify_components_VMenu.js",
|
||||
"fileHash": "6401d9c7",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VProgressLinear": {
|
||||
"src": "../../vuetify/lib/components/VProgressLinear/index.js",
|
||||
"file": "vuetify_components_VProgressLinear.js",
|
||||
"fileHash": "f6998592",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VSelect": {
|
||||
"src": "../../vuetify/lib/components/VSelect/index.js",
|
||||
"file": "vuetify_components_VSelect.js",
|
||||
"fileHash": "fff4e409",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VSnackbar": {
|
||||
"src": "../../vuetify/lib/components/VSnackbar/index.js",
|
||||
"file": "vuetify_components_VSnackbar.js",
|
||||
"fileHash": "e8e1d7d3",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VCheckbox": {
|
||||
"src": "../../vuetify/lib/components/VCheckbox/index.js",
|
||||
"file": "vuetify_components_VCheckbox.js",
|
||||
"fileHash": "6c2a3d1f",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VChip": {
|
||||
"src": "../../vuetify/lib/components/VChip/index.js",
|
||||
"file": "vuetify_components_VChip.js",
|
||||
"fileHash": "149d1552",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VExpansionPanel": {
|
||||
"src": "../../vuetify/lib/components/VExpansionPanel/index.js",
|
||||
"file": "vuetify_components_VExpansionPanel.js",
|
||||
"fileHash": "e8175e4b",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VSlider": {
|
||||
"src": "../../vuetify/lib/components/VSlider/index.js",
|
||||
"file": "vuetify_components_VSlider.js",
|
||||
"fileHash": "70d54e33",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/transitions": {
|
||||
"src": "../../vuetify/lib/components/transitions/index.js",
|
||||
"file": "vuetify_components_transitions.js",
|
||||
"fileHash": "1ae42e15",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VImg": {
|
||||
"src": "../../vuetify/lib/components/VImg/index.js",
|
||||
"file": "vuetify_components_VImg.js",
|
||||
"fileHash": "55902c55",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VProgressCircular": {
|
||||
"src": "../../vuetify/lib/components/VProgressCircular/index.js",
|
||||
"file": "vuetify_components_VProgressCircular.js",
|
||||
"fileHash": "4ac970e2",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VSheet": {
|
||||
"src": "../../vuetify/lib/components/VSheet/index.js",
|
||||
"file": "vuetify_components_VSheet.js",
|
||||
"fileHash": "60500776",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VForm": {
|
||||
"src": "../../vuetify/lib/components/VForm/index.js",
|
||||
"file": "vuetify_components_VForm.js",
|
||||
"fileHash": "6098d2ad",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VTextField": {
|
||||
"src": "../../vuetify/lib/components/VTextField/index.js",
|
||||
"file": "vuetify_components_VTextField.js",
|
||||
"fileHash": "6c3b6c9f",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VBtnToggle": {
|
||||
"src": "../../vuetify/lib/components/VBtnToggle/index.js",
|
||||
"file": "vuetify_components_VBtnToggle.js",
|
||||
"fileHash": "92b719ca",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vuetify/components/VTextarea": {
|
||||
"src": "../../vuetify/lib/components/VTextarea/index.js",
|
||||
"file": "vuetify_components_VTextarea.js",
|
||||
"fileHash": "c4710e99",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
"chunks": {}
|
||||
"chunks": {
|
||||
"chunk-KPWCGWEX": {
|
||||
"file": "chunk-KPWCGWEX.js"
|
||||
},
|
||||
"chunk-5LZQZ6A5": {
|
||||
"file": "chunk-5LZQZ6A5.js"
|
||||
},
|
||||
"chunk-F6LZGKE2": {
|
||||
"file": "chunk-F6LZGKE2.js"
|
||||
},
|
||||
"chunk-4MMPKXON": {
|
||||
"file": "chunk-4MMPKXON.js"
|
||||
},
|
||||
"chunk-LHMOJDYM": {
|
||||
"file": "chunk-LHMOJDYM.js"
|
||||
},
|
||||
"chunk-TSTWIJCO": {
|
||||
"file": "chunk-TSTWIJCO.js"
|
||||
},
|
||||
"chunk-YDVSSFCH": {
|
||||
"file": "chunk-YDVSSFCH.js"
|
||||
},
|
||||
"chunk-RNFCLGZV": {
|
||||
"file": "chunk-RNFCLGZV.js"
|
||||
},
|
||||
"chunk-WNCBJDZZ": {
|
||||
"file": "chunk-WNCBJDZZ.js"
|
||||
},
|
||||
"chunk-34XWDQGB": {
|
||||
"file": "chunk-34XWDQGB.js"
|
||||
},
|
||||
"chunk-RH43OVWP": {
|
||||
"file": "chunk-RH43OVWP.js"
|
||||
},
|
||||
"chunk-PEUMXYT2": {
|
||||
"file": "chunk-PEUMXYT2.js"
|
||||
},
|
||||
"chunk-4HCXUCLO": {
|
||||
"file": "chunk-4HCXUCLO.js"
|
||||
},
|
||||
"chunk-ERI3RTQS": {
|
||||
"file": "chunk-ERI3RTQS.js"
|
||||
},
|
||||
"chunk-VSEC5QGQ": {
|
||||
"file": "chunk-VSEC5QGQ.js"
|
||||
},
|
||||
"chunk-BYBKODOB": {
|
||||
"file": "chunk-BYBKODOB.js"
|
||||
},
|
||||
"chunk-SHBPUR7N": {
|
||||
"file": "chunk-SHBPUR7N.js"
|
||||
},
|
||||
"chunk-HGIC64KW": {
|
||||
"file": "chunk-HGIC64KW.js"
|
||||
},
|
||||
"chunk-BXEVD6W6": {
|
||||
"file": "chunk-BXEVD6W6.js"
|
||||
},
|
||||
"chunk-LPZZJ62X": {
|
||||
"file": "chunk-LPZZJ62X.js"
|
||||
},
|
||||
"chunk-UIXKNP5E": {
|
||||
"file": "chunk-UIXKNP5E.js"
|
||||
},
|
||||
"chunk-DRSCVHAQ": {
|
||||
"file": "chunk-DRSCVHAQ.js"
|
||||
},
|
||||
"chunk-TSYQL5U3": {
|
||||
"file": "chunk-TSYQL5U3.js"
|
||||
},
|
||||
"chunk-MVBFAXEB": {
|
||||
"file": "chunk-MVBFAXEB.js"
|
||||
},
|
||||
"chunk-QC7VWQER": {
|
||||
"file": "chunk-QC7VWQER.js"
|
||||
},
|
||||
"chunk-NURQ3473": {
|
||||
"file": "chunk-NURQ3473.js"
|
||||
},
|
||||
"chunk-ET5GCC5W": {
|
||||
"file": "chunk-ET5GCC5W.js"
|
||||
},
|
||||
"chunk-W6DJL42A": {
|
||||
"file": "chunk-W6DJL42A.js"
|
||||
},
|
||||
"chunk-HV7P7R7J": {
|
||||
"file": "chunk-HV7P7R7J.js"
|
||||
},
|
||||
"chunk-MPVSDM4V": {
|
||||
"file": "chunk-MPVSDM4V.js"
|
||||
},
|
||||
"chunk-HOEZWRBG": {
|
||||
"file": "chunk-HOEZWRBG.js"
|
||||
},
|
||||
"chunk-Z3677HMS": {
|
||||
"file": "chunk-Z3677HMS.js"
|
||||
},
|
||||
"chunk-ADXDXPPR": {
|
||||
"file": "chunk-ADXDXPPR.js"
|
||||
},
|
||||
"chunk-7SKEB5LN": {
|
||||
"file": "chunk-7SKEB5LN.js"
|
||||
},
|
||||
"chunk-PCKQGDLK": {
|
||||
"file": "chunk-PCKQGDLK.js"
|
||||
},
|
||||
"chunk-6CRS5HI4": {
|
||||
"file": "chunk-6CRS5HI4.js"
|
||||
},
|
||||
"chunk-X7YBE6PF": {
|
||||
"file": "chunk-X7YBE6PF.js"
|
||||
},
|
||||
"chunk-YJD2PNP6": {
|
||||
"file": "chunk-YJD2PNP6.js"
|
||||
},
|
||||
"chunk-I4SZJCEY": {
|
||||
"file": "chunk-I4SZJCEY.js"
|
||||
},
|
||||
"chunk-OI3EYDCB": {
|
||||
"file": "chunk-OI3EYDCB.js"
|
||||
},
|
||||
"chunk-IZQZFEAL": {
|
||||
"file": "chunk-IZQZFEAL.js"
|
||||
},
|
||||
"chunk-J7Q2NMV7": {
|
||||
"file": "chunk-J7Q2NMV7.js"
|
||||
},
|
||||
"chunk-4VABFUPG": {
|
||||
"file": "chunk-4VABFUPG.js"
|
||||
},
|
||||
"chunk-GAYXO4FM": {
|
||||
"file": "chunk-GAYXO4FM.js"
|
||||
},
|
||||
"chunk-B4JFJDWM": {
|
||||
"file": "chunk-B4JFJDWM.js"
|
||||
},
|
||||
"chunk-U2DSRSME": {
|
||||
"file": "chunk-U2DSRSME.js"
|
||||
},
|
||||
"chunk-FVDWV4NO": {
|
||||
"file": "chunk-FVDWV4NO.js"
|
||||
},
|
||||
"chunk-AJ7MUB7M": {
|
||||
"file": "chunk-AJ7MUB7M.js"
|
||||
},
|
||||
"chunk-KTTVT6V2": {
|
||||
"file": "chunk-KTTVT6V2.js"
|
||||
},
|
||||
"chunk-TM3MIDYC": {
|
||||
"file": "chunk-TM3MIDYC.js"
|
||||
},
|
||||
"chunk-CMZ4UYUX": {
|
||||
"file": "chunk-CMZ4UYUX.js"
|
||||
},
|
||||
"chunk-PIT7IT55": {
|
||||
"file": "chunk-PIT7IT55.js"
|
||||
},
|
||||
"chunk-VH7QIDM4": {
|
||||
"file": "chunk-VH7QIDM4.js"
|
||||
},
|
||||
"chunk-AQK3CYVW": {
|
||||
"file": "chunk-AQK3CYVW.js"
|
||||
},
|
||||
"chunk-2HZIACSB": {
|
||||
"file": "chunk-2HZIACSB.js"
|
||||
},
|
||||
"chunk-WGYWYQOA": {
|
||||
"file": "chunk-WGYWYQOA.js"
|
||||
},
|
||||
"chunk-NJV3GUE4": {
|
||||
"file": "chunk-NJV3GUE4.js"
|
||||
},
|
||||
"chunk-6VKWM6MN": {
|
||||
"file": "chunk-6VKWM6MN.js"
|
||||
},
|
||||
"chunk-TS6Y6OVT": {
|
||||
"file": "chunk-TS6Y6OVT.js"
|
||||
},
|
||||
"chunk-YGX2Z63P": {
|
||||
"file": "chunk-YGX2Z63P.js"
|
||||
},
|
||||
"chunk-5BPWKCNA": {
|
||||
"file": "chunk-5BPWKCNA.js"
|
||||
},
|
||||
"chunk-BVUPSGRF": {
|
||||
"file": "chunk-BVUPSGRF.js"
|
||||
},
|
||||
"chunk-573D4TYC": {
|
||||
"file": "chunk-573D4TYC.js"
|
||||
},
|
||||
"chunk-GUNW7S2L": {
|
||||
"file": "chunk-GUNW7S2L.js"
|
||||
},
|
||||
"chunk-5ONGSJQ2": {
|
||||
"file": "chunk-5ONGSJQ2.js"
|
||||
},
|
||||
"chunk-CAGZXMOS": {
|
||||
"file": "chunk-CAGZXMOS.js"
|
||||
},
|
||||
"chunk-6EZKHCRW": {
|
||||
"file": "chunk-6EZKHCRW.js"
|
||||
},
|
||||
"chunk-N4LJHDYD": {
|
||||
"file": "chunk-N4LJHDYD.js"
|
||||
},
|
||||
"chunk-OJDZBU5D": {
|
||||
"file": "chunk-OJDZBU5D.js"
|
||||
},
|
||||
"chunk-IYFY4IHW": {
|
||||
"file": "chunk-IYFY4IHW.js"
|
||||
},
|
||||
"chunk-KQXZAEJP": {
|
||||
"file": "chunk-KQXZAEJP.js"
|
||||
},
|
||||
"chunk-XDSAO7OT": {
|
||||
"file": "chunk-XDSAO7OT.js"
|
||||
},
|
||||
"chunk-ENTLCOCZ": {
|
||||
"file": "chunk-ENTLCOCZ.js"
|
||||
},
|
||||
"chunk-KA77II4V": {
|
||||
"file": "chunk-KA77II4V.js"
|
||||
},
|
||||
"chunk-WXMECWZN": {
|
||||
"file": "chunk-WXMECWZN.js"
|
||||
},
|
||||
"chunk-BHV5Z34M": {
|
||||
"file": "chunk-BHV5Z34M.js"
|
||||
},
|
||||
"chunk-3DSR7NCB": {
|
||||
"file": "chunk-3DSR7NCB.js"
|
||||
},
|
||||
"chunk-LZ5T2ERG": {
|
||||
"file": "chunk-LZ5T2ERG.js"
|
||||
},
|
||||
"chunk-2MKFL3BX": {
|
||||
"file": "chunk-2MKFL3BX.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
import {
|
||||
propsFactory
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
|
||||
// node_modules/vuetify/lib/composables/tag.js
|
||||
var makeTagProps = propsFactory({
|
||||
tag: {
|
||||
type: [String, Object, Function],
|
||||
default: "div"
|
||||
}
|
||||
}, "tag");
|
||||
|
||||
export {
|
||||
makeTagProps
|
||||
};
|
||||
//# sourceMappingURL=chunk-2HZIACSB.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/composables/tag.ts"],
|
||||
"sourcesContent": ["// Utilities\nimport { propsFactory } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { JSXComponent } from '@/util'\n\n// Types\nexport interface TagProps {\n tag: string | JSXComponent\n}\n\n// Composables\nexport const makeTagProps = propsFactory({\n tag: {\n type: [String, Object, Function] as PropType<string | JSXComponent>,\n default: 'div',\n },\n}, 'tag')\n"],
|
||||
"mappings": ";;;;;AAaO,IAAMA,eAAeC,aAAa;EACvCC,KAAK;IACHC,MAAM,CAACC,QAAQC,QAAQC,QAAQ;IAC/BC,SAAS;EACX;AACF,GAAG,KAAK;",
|
||||
"names": ["makeTagProps", "propsFactory", "tag", "type", "String", "Object", "Function", "default"]
|
||||
}
|
||||
+12787
File diff suppressed because it is too large.
Load diff
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../@vue/shared/dist/shared.esm-bundler.js", "../../@vue/reactivity/dist/reactivity.esm-bundler.js", "../../@vue/runtime-core/dist/runtime-core.esm-bundler.js", "../../@vue/runtime-dom/dist/runtime-dom.esm-bundler.js", "../../vue/dist/vue.runtime.esm-bundler.js"],
|
||||
"sourcesContent": ["/**\n* @vue/shared v3.5.26\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n// @__NO_SIDE_EFFECTS__\nfunction makeMap(str) {\n const map = /* @__PURE__ */ Object.create(null);\n for (const key of str.split(\",\")) map[key] = 1;\n return (val) => val in map;\n}\n\nconst EMPTY_OBJ = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze({}) : {};\nconst EMPTY_ARR = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze([]) : [];\nconst NOOP = () => {\n};\nconst NO = () => false;\nconst isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter\n(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\nconst extend = Object.assign;\nconst remove = (arr, el) => {\n const i = arr.indexOf(el);\n if (i > -1) {\n arr.splice(i, 1);\n }\n};\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst isArray = Array.isArray;\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isString = (val) => typeof val === \"string\";\nconst isSymbol = (val) => typeof val === \"symbol\";\nconst isObject = (val) => val !== null && typeof val === \"object\";\nconst isPromise = (val) => {\n return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst toRawType = (value) => {\n return toTypeString(value).slice(8, -1);\n};\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nconst isReservedProp = /* @__PURE__ */ makeMap(\n // the leading comma is intentional so empty string \"\" is also included\n \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n);\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\n \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n);\nconst cacheStringFunction = (fn) => {\n const cache = /* @__PURE__ */ Object.create(null);\n return ((str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n });\n};\nconst camelizeRE = /-\\w/g;\nconst camelize = cacheStringFunction(\n (str) => {\n return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());\n }\n);\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst capitalize = cacheStringFunction((str) => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n});\nconst toHandlerKey = cacheStringFunction(\n (str) => {\n const s = str ? `on${capitalize(str)}` : ``;\n return s;\n }\n);\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nconst invokeArrayFns = (fns, ...arg) => {\n for (let i = 0; i < fns.length; i++) {\n fns[i](...arg);\n }\n};\nconst def = (obj, key, value, writable = false) => {\n Object.defineProperty(obj, key, {\n configurable: true,\n enumerable: false,\n writable,\n value\n });\n};\nconst looseToNumber = (val) => {\n const n = parseFloat(val);\n return isNaN(n) ? val : n;\n};\nconst toNumber = (val) => {\n const n = isString(val) ? Number(val) : NaN;\n return isNaN(n) ? val : n;\n};\nlet _globalThis;\nconst getGlobalThis = () => {\n return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n};\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\nfunction genPropsAccessExp(name) {\n return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\n}\nfunction genCacheKey(source, options) {\n return source + JSON.stringify(\n options,\n (_, val) => typeof val === \"function\" ? val.toString() : val\n );\n}\n\nconst PatchFlags = {\n \"TEXT\": 1,\n \"1\": \"TEXT\",\n \"CLASS\": 2,\n \"2\": \"CLASS\",\n \"STYLE\": 4,\n \"4\": \"STYLE\",\n \"PROPS\": 8,\n \"8\": \"PROPS\",\n \"FULL_PROPS\": 16,\n \"16\": \"FULL_PROPS\",\n \"NEED_HYDRATION\": 32,\n \"32\": \"NEED_HYDRATION\",\n \"STABLE_FRAGMENT\": 64,\n \"64\": \"STABLE_FRAGMENT\",\n \"KEYED_FRAGMENT\": 128,\n \"128\": \"KEYED_FRAGMENT\",\n \"UNKEYED_FRAGMENT\": 256,\n \"256\": \"UNKEYED_FRAGMENT\",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AAM,IAAI,GAAG;AACf,eAAO,OAAO;AAAA,MAChB;AAAA,IACF;AAAA,EACF;AACA,SAAO,IAAI,KAAK;AAClB;AACA,SAAS,eAAe,OAAO;AAC7B,MAAI,CAAC,MAAO,QAAO;AACnB,MAAI,EAAE,OAAO,OAAO,MAAM,IAAI;AAC9B,MAAI,SAAS,CAAC,SAAS,KAAK,GAAG;AAC7B,UAAM,QAAQ,eAAe,KAAK;AAAA,EACpC;AACA,MAAI,OAAO;AACT,UAAM,QAAQ,eAAe,KAAK;AAAA,EACpC;AACA,SAAO;AACT;AAEA,IAAM,YAAY;AAClB,IAAM,WAAW;AACjB,IAAM,YAAY;AAClB,IAAM,YAAY;AAClB,IAAM,YAA4B,QAAQ,SAAS;AACnD,IAAM,WAA2B,QAAQ,QAAQ;AACjD,IAAM,cAA8B,QAAQ,SAAS;AACrD,IAAM,YAA4B,QAAQ,SAAS;AAEnD,IAAM,sBAAsB;AAC5B,IAAM,uBAAuC,QAAQ,mBAAmB;AACxE,IAAM,gBAAgC;AAAA,EACpC,sBAAsB;AACxB;AACA,SAAS,mBAAmB,OAAO;AACjC,SAAO,CAAC,CAAC,SAAS,UAAU;AAC9B;AAmBA,IAAM,kBAAkC;AAAA,EACtC;AACF;AACA,IAAM,iBAAiC;AAAA,EACrC;AACF;AACA,IAAM,oBAAoC;AAAA,EACxC;AACF;AACA,SAAS,sBAAsB,OAAO;AACpC,MAAI,SAAS,MAAM;AACjB,WAAO;AAAA,EACT;AACA,QAAM,OAAO,OAAO;AACpB,SAAO,SAAS,YAAY,SAAS,YAAY,SAAS;AAC5D;AA6CA,IAAM,4BAA4B;AAClC,SAAS,qBAAqB,KAAK,cAAc;AAC/C,SAAO,ILine truncated
|
||||
"names": ["map", "computed", "computed", "self", "hasOwnProperty", "isRef", "readonly", "effect", "isRef", "isRef", "p", "version", "effect", "watch", "callHook", "remove", "ref", "ref2", "patchProp", "hydrate", "hasWarned", "resolve", "render", "computed", "h", "createApp", "track", "trigger", "isModelListener", "emit", "render2", "remove2", "warn", "warn", "callHook", "resolve", "watch", "isBoolean", "def", "enterCbKey", "compile", "warn"]
|
||||
}
|
||||
+137
@@ -0,0 +1,137 @@
|
||||
import {
|
||||
VDialogTransition
|
||||
} from "./chunk-B4JFJDWM.js";
|
||||
import {
|
||||
VDefaultsProvider
|
||||
} from "./chunk-VH7QIDM4.js";
|
||||
import {
|
||||
VOverlay,
|
||||
makeVOverlayProps
|
||||
} from "./chunk-TS6Y6OVT.js";
|
||||
import {
|
||||
useScopeId
|
||||
} from "./chunk-BVUPSGRF.js";
|
||||
import {
|
||||
forwardRefs
|
||||
} from "./chunk-GUNW7S2L.js";
|
||||
import {
|
||||
useProxiedModel
|
||||
} from "./chunk-KA77II4V.js";
|
||||
import {
|
||||
genericComponent,
|
||||
omit,
|
||||
propsFactory,
|
||||
useRender
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
createVNode,
|
||||
mergeProps,
|
||||
nextTick,
|
||||
ref,
|
||||
watch
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/VDialog/VDialog.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VDialog/VDialog.css";
|
||||
var makeVDialogProps = propsFactory({
|
||||
fullscreen: Boolean,
|
||||
scrollable: Boolean,
|
||||
...omit(makeVOverlayProps({
|
||||
captureFocus: true,
|
||||
origin: "center center",
|
||||
scrollStrategy: "block",
|
||||
transition: {
|
||||
component: VDialogTransition
|
||||
},
|
||||
zIndex: 2400,
|
||||
retainFocus: true
|
||||
}), ["disableInitialFocus"])
|
||||
}, "VDialog");
|
||||
var VDialog = genericComponent()({
|
||||
name: "VDialog",
|
||||
props: makeVDialogProps(),
|
||||
emits: {
|
||||
"update:modelValue": (value) => true,
|
||||
afterEnter: () => true,
|
||||
afterLeave: () => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
emit,
|
||||
slots
|
||||
} = _ref;
|
||||
const isActive = useProxiedModel(props, "modelValue");
|
||||
const {
|
||||
scopeId
|
||||
} = useScopeId();
|
||||
const overlay = ref();
|
||||
function onAfterEnter() {
|
||||
emit("afterEnter");
|
||||
if ((props.scrim || props.retainFocus) && overlay.value?.contentEl && !overlay.value.contentEl.contains(document.activeElement)) {
|
||||
overlay.value.contentEl.focus({
|
||||
preventScroll: true
|
||||
});
|
||||
}
|
||||
}
|
||||
function onAfterLeave() {
|
||||
emit("afterLeave");
|
||||
}
|
||||
watch(isActive, async (val) => {
|
||||
if (!val) {
|
||||
await nextTick();
|
||||
overlay.value.activatorEl?.focus({
|
||||
preventScroll: true
|
||||
});
|
||||
}
|
||||
});
|
||||
useRender(() => {
|
||||
const overlayProps = VOverlay.filterProps(props);
|
||||
const activatorProps = mergeProps({
|
||||
"aria-haspopup": "dialog"
|
||||
}, props.activatorProps);
|
||||
const contentProps = mergeProps({
|
||||
tabindex: -1
|
||||
}, props.contentProps);
|
||||
return createVNode(VOverlay, mergeProps({
|
||||
"ref": overlay,
|
||||
"class": ["v-dialog", {
|
||||
"v-dialog--fullscreen": props.fullscreen,
|
||||
"v-dialog--scrollable": props.scrollable
|
||||
}, props.class],
|
||||
"style": props.style
|
||||
}, overlayProps, {
|
||||
"modelValue": isActive.value,
|
||||
"onUpdate:modelValue": ($event) => isActive.value = $event,
|
||||
"aria-modal": "true",
|
||||
"activatorProps": activatorProps,
|
||||
"contentProps": contentProps,
|
||||
"height": !props.fullscreen ? props.height : void 0,
|
||||
"width": !props.fullscreen ? props.width : void 0,
|
||||
"maxHeight": !props.fullscreen ? props.maxHeight : void 0,
|
||||
"maxWidth": !props.fullscreen ? props.maxWidth : void 0,
|
||||
"role": "dialog",
|
||||
"onAfterEnter": onAfterEnter,
|
||||
"onAfterLeave": onAfterLeave
|
||||
}, scopeId), {
|
||||
activator: slots.activator,
|
||||
default: function() {
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
return createVNode(VDefaultsProvider, {
|
||||
"root": "VDialog"
|
||||
}, {
|
||||
default: () => [slots.default?.(...args)]
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
return forwardRefs({}, overlay);
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
makeVDialogProps,
|
||||
VDialog
|
||||
};
|
||||
//# sourceMappingURL=chunk-34XWDQGB.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VDialog/VDialog.tsx"],
|
||||
"sourcesContent": ["// Styles\nimport './VDialog.sass'\n\n// Components\nimport { VDialogTransition } from '@/components/transitions'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { VOverlay } from '@/components/VOverlay'\nimport { makeVOverlayProps } from '@/components/VOverlay/VOverlay'\n\n// Composables\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { useScopeId } from '@/composables/scopeId'\n\n// Utilities\nimport { mergeProps, nextTick, ref, watch } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { OverlaySlots } from '@/components/VOverlay/VOverlay'\n\nexport const makeVDialogProps = propsFactory({\n fullscreen: Boolean,\n scrollable: Boolean,\n\n ...omit(makeVOverlayProps({\n captureFocus: true,\n origin: 'center center' as const,\n scrollStrategy: 'block' as const,\n transition: { component: VDialogTransition },\n zIndex: 2400,\n retainFocus: true,\n }), ['disableInitialFocus']),\n}, 'VDialog')\n\nexport const VDialog = genericComponent<OverlaySlots>()({\n name: 'VDialog',\n\n props: makeVDialogProps(),\n\n emits: {\n 'update:modelValue': (value: boolean) => true,\n afterEnter: () => true,\n afterLeave: () => true,\n },\n\n setup (props, { emit, slots }) {\n const isActive = useProxiedModel(props, 'modelValue')\n const { scopeId } = useScopeId()\n\n const overlay = ref<VOverlay>()\n\n function onAfterEnter () {\n emit('afterEnter')\n if (\n (props.scrim || props.retainFocus) &&\n overlay.value?.contentEl &&\n !overlay.value.contentEl.contains(document.activeElement)\n ) {\n overlay.value.contentEl.focus({ preventScroll: true })\n }\n }\n\n function onAfterLeave () {\n emit('afterLeave')\n }\n\n watch(isActive, async val => {\n if (!val) {\n await nextTick()\n overlay.value!.activatorEl?.focus({ preventScroll: true })\n }\n })\n\n useRender(() => {\n const overlayProps = VOverlay.filterProps(props)\n const activatorProps = mergeProps({\n 'aria-haspopup': 'dialog',\n }, props.activatorProps)\n const contentProps = mergeProps({\n tabindex: -1,\n }, props.contentProps)\n\n return (\n <VOverlay\n ref={ overlay }\n class={[\n 'v-dialog',\n {\n 'v-dialog--fullscreen': props.fullscreen,\n 'v-dialog--scrollable': props.scrollable,\n },\n props.class,\n ]}\n style={ props.style }\n { ...overlayProps }\n v-model={ isActive.value }\n aria-modal=\"true\"\n activatorProps={ activatorProps }\n contentProps={ contentProps }\n height={ !props.fullscreen ? props.height : undefined }\n width={ !props.fullscreen ? props.width : undefined }\n maxHeight={ !props.fullscreen ? props.maxHeight : undefined }\n maxWidth={ !props.fullscreen ? props.maxWidth : undefined }\n role=\"dialog\"\n onAfterEnter={ onAfterEnter }\n onAfterLeave={ onAfterLeave }\n { ...scopeId }\n >\n {{\n activator: slots.activator,\n default: (...args) => (\n <VDefaultsProvider root=\"VDialog\">\n { slots.default?.(...args) }\n </VDefaultsProvider>\n ),\n }}\n </VOverlay>\n )\n })\n\n return forwardRefs({}, overlay)\n },\n})\n\nexport type VDialog = InstanceType<typeof VDialog>\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAA;AAoBO,IAAMA,mBAAmBC,aAAa;EAC3CC,YAAYC;EACZC,YAAYD;EAEZ,GAAGE,KAAKC,kBAAkB;IACxBC,cAAc;IACdC,QAAQ;IACRC,gBAAgB;IAChBC,YAAY;MAAEC,WAAWC;IAAkB;IAC3CC,QAAQ;IACRC,aA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AAK,uBAAAsC,YAAd/B,SAASP,QAAKsC;QAAA,cAAA;QAAA,kBAEPR;QAAc,gBAChBE;QAAY,UAClB,CAAClC,MAAMhB,aAAagB,MAAMyC,SAASC;QAAS,SAC7C,CAAC1C,MAAMhB,aAAagB,MAAM2C,QAAQD;QAAS,aACvC,CAAC1C,MAAMhB,aAAagB,MAAM4C,YAAYF;QAAS,YAChD,CAAC1C,MAAMhB,aAAagB,MAAM6C,WAAWH;QAAS,QAAA;QAAA,gBAE1C3B;QAAY,gBACZQ;MAAY,GACtBZ,OAAO,GAAA;QAGVmC,WAAWtC,MAAMsC;QACjBC,SAAS,WAAA;AAAA,mBAAAC,OAAAC,UAAAC,QAAIC,OAAI,IAAAC,MAAAJ,IAAA,GAAAK,OAAA,GAAAA,OAAAL,MAAAK,QAAA;AAAJF,iBAAIE,IAAA,IAAAJ,UAAAI,IAAA;UAAA;AAAA,iBAAAjB,YAAAkB,mBAAA;YAAA,QAAA;UAAA,GAAA;YAAAP,SAAAA,MAAA,CAEXvC,MAAMuC,UAAU,GAAGI,IAAI,CAAC;UAAA,CAAA;QAAA;MAE7B,CAAA;IAIT,CAAC;AAED,WAAOI,YAAY,CAAC,GAAG1C,OAAO;EAChC;AACF,CAAC;",
|
||||
"names": ["makeVDialogProps", "propsFactory", "fullscreen", "Boolean", "scrollable", "omit", "makeVOverlayProps", "captureFocus", "origin", "scrollStrategy", "transition", "component", "VDialogTransition", "zIndex", "retainFocus", "VDialog", "genericComponent", "name", "props", "emits", "value", "afterEnter", "afterLeave", "setup", "_ref", "emit", "slots", "isActive", "useProxiedModel", "scopeId", "useScopeId", "overlay", "ref", "onAfterEnter", "scrim", "contentEl", "contains", "document", "activeElement", "focus", "preventScroll", "onAfterLeave", "watch", "val", "nextTick", "activatorEl", "useRender", "overlayProps", "VOverlay", "filterProps", "activatorProps", "mergeProps", "contentProps", "tabindex", "_createVNode", "_mergeProps", "class", "style", "$event", "height", "undefined", "width", "maxHeight", "maxWidth", "activator", "default", "_len", "arguments", "length", "args", "Array", "_key", "VDefaultsProvider", "forwardRefs"]
|
||||
}
|
||||
+427
@@ -0,0 +1,427 @@
|
||||
import {
|
||||
IN_BROWSER,
|
||||
RGBtoHex,
|
||||
SUPPORTS_MATCH_MEDIA,
|
||||
consoleWarn,
|
||||
createRange,
|
||||
darken,
|
||||
deprecate,
|
||||
getCurrentInstance,
|
||||
getForeground,
|
||||
getLuma,
|
||||
lighten,
|
||||
mergeDeep,
|
||||
parseColor,
|
||||
propsFactory
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
computed,
|
||||
getCurrentScope,
|
||||
inject,
|
||||
onScopeDispose,
|
||||
provide,
|
||||
ref,
|
||||
shallowRef,
|
||||
toRef,
|
||||
watch,
|
||||
watchEffect
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/composables/theme.js
|
||||
var ThemeSymbol = /* @__PURE__ */ Symbol.for("vuetify:theme");
|
||||
var makeThemeProps = propsFactory({
|
||||
theme: String
|
||||
}, "theme");
|
||||
function genDefaults() {
|
||||
return {
|
||||
defaultTheme: "light",
|
||||
prefix: "v-",
|
||||
variations: {
|
||||
colors: [],
|
||||
lighten: 0,
|
||||
darken: 0
|
||||
},
|
||||
themes: {
|
||||
light: {
|
||||
dark: false,
|
||||
colors: {
|
||||
background: "#FFFFFF",
|
||||
surface: "#FFFFFF",
|
||||
"surface-bright": "#FFFFFF",
|
||||
"surface-light": "#EEEEEE",
|
||||
"surface-variant": "#424242",
|
||||
"on-surface-variant": "#EEEEEE",
|
||||
primary: "#1867C0",
|
||||
"primary-darken-1": "#1F5592",
|
||||
secondary: "#48A9A6",
|
||||
"secondary-darken-1": "#018786",
|
||||
error: "#B00020",
|
||||
info: "#2196F3",
|
||||
success: "#4CAF50",
|
||||
warning: "#FB8C00"
|
||||
},
|
||||
variables: {
|
||||
"border-color": "#000000",
|
||||
"border-opacity": 0.12,
|
||||
"high-emphasis-opacity": 0.87,
|
||||
"medium-emphasis-opacity": 0.6,
|
||||
"disabled-opacity": 0.38,
|
||||
"idle-opacity": 0.04,
|
||||
"hover-opacity": 0.04,
|
||||
"focus-opacity": 0.12,
|
||||
"selected-opacity": 0.08,
|
||||
"activated-opacity": 0.12,
|
||||
"pressed-opacity": 0.12,
|
||||
"dragged-opacity": 0.08,
|
||||
"theme-kbd": "#EEEEEE",
|
||||
"theme-on-kbd": "#000000",
|
||||
"theme-code": "#F5F5F5",
|
||||
"theme-on-code": "#000000"
|
||||
}
|
||||
},
|
||||
dark: {
|
||||
dark: true,
|
||||
colors: {
|
||||
background: "#121212",
|
||||
surface: "#212121",
|
||||
"surface-bright": "#ccbfd6",
|
||||
"surface-light": "#424242",
|
||||
"surface-variant": "#c8c8c8",
|
||||
"on-surface-variant": "#000000",
|
||||
primary: "#2196F3",
|
||||
"primary-darken-1": "#277CC1",
|
||||
secondary: "#54B6B2",
|
||||
"secondary-darken-1": "#48A9A6",
|
||||
error: "#CF6679",
|
||||
info: "#2196F3",
|
||||
success: "#4CAF50",
|
||||
warning: "#FB8C00"
|
||||
},
|
||||
variables: {
|
||||
"border-color": "#FFFFFF",
|
||||
"border-opacity": 0.12,
|
||||
"high-emphasis-opacity": 1,
|
||||
"medium-emphasis-opacity": 0.7,
|
||||
"disabled-opacity": 0.5,
|
||||
"idle-opacity": 0.1,
|
||||
"hover-opacity": 0.04,
|
||||
"focus-opacity": 0.12,
|
||||
"selected-opacity": 0.08,
|
||||
"activated-opacity": 0.12,
|
||||
"pressed-opacity": 0.16,
|
||||
"dragged-opacity": 0.08,
|
||||
"theme-kbd": "#424242",
|
||||
"theme-on-kbd": "#FFFFFF",
|
||||
"theme-code": "#343434",
|
||||
"theme-on-code": "#CCCCCC"
|
||||
}
|
||||
}
|
||||
},
|
||||
stylesheetId: "vuetify-theme-stylesheet",
|
||||
scoped: false,
|
||||
unimportant: false,
|
||||
utilities: true
|
||||
};
|
||||
}
|
||||
function parseThemeOptions() {
|
||||
let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : genDefaults();
|
||||
const defaults = genDefaults();
|
||||
if (!options) return {
|
||||
...defaults,
|
||||
isDisabled: true
|
||||
};
|
||||
const themes = {};
|
||||
for (const [key, theme] of Object.entries(options.themes ?? {})) {
|
||||
const defaultTheme = theme.dark || key === "dark" ? defaults.themes?.dark : defaults.themes?.light;
|
||||
themes[key] = mergeDeep(defaultTheme, theme);
|
||||
}
|
||||
return mergeDeep(defaults, {
|
||||
...options,
|
||||
themes
|
||||
});
|
||||
}
|
||||
function createCssClass(lines, selector, content, scope) {
|
||||
lines.push(`${getScopedSelector(selector, scope)} {
|
||||
`, ...content.map((line) => ` ${line};
|
||||
`), "}\n");
|
||||
}
|
||||
function genCssVariables(theme, prefix) {
|
||||
const lightOverlay = theme.dark ? 2 : 1;
|
||||
const darkOverlay = theme.dark ? 1 : 2;
|
||||
const variables = [];
|
||||
for (const [key, value] of Object.entries(theme.colors)) {
|
||||
const rgb = parseColor(value);
|
||||
variables.push(`--${prefix}theme-${key}: ${rgb.r},${rgb.g},${rgb.b}`);
|
||||
if (!key.startsWith("on-")) {
|
||||
variables.push(`--${prefix}theme-${key}-overlay-multiplier: ${getLuma(value) > 0.18 ? lightOverlay : darkOverlay}`);
|
||||
}
|
||||
}
|
||||
for (const [key, value] of Object.entries(theme.variables)) {
|
||||
const color = typeof value === "string" && value.startsWith("#") ? parseColor(value) : void 0;
|
||||
const rgb = color ? `${color.r}, ${color.g}, ${color.b}` : void 0;
|
||||
variables.push(`--${prefix}${key}: ${rgb ?? value}`);
|
||||
}
|
||||
return variables;
|
||||
}
|
||||
function genVariation(name, color, variations) {
|
||||
const object = {};
|
||||
if (variations) {
|
||||
for (const variation of ["lighten", "darken"]) {
|
||||
const fn = variation === "lighten" ? lighten : darken;
|
||||
for (const amount of createRange(variations[variation], 1)) {
|
||||
object[`${name}-${variation}-${amount}`] = RGBtoHex(fn(parseColor(color), amount));
|
||||
}
|
||||
}
|
||||
}
|
||||
return object;
|
||||
}
|
||||
function genVariations(colors, variations) {
|
||||
if (!variations) return {};
|
||||
let variationColors = {};
|
||||
for (const name of variations.colors) {
|
||||
const color = colors[name];
|
||||
if (!color) continue;
|
||||
variationColors = {
|
||||
...variationColors,
|
||||
...genVariation(name, color, variations)
|
||||
};
|
||||
}
|
||||
return variationColors;
|
||||
}
|
||||
function genOnColors(colors) {
|
||||
const onColors = {};
|
||||
for (const color of Object.keys(colors)) {
|
||||
if (color.startsWith("on-") || colors[`on-${color}`]) continue;
|
||||
const onColor = `on-${color}`;
|
||||
const colorVal = parseColor(colors[color]);
|
||||
onColors[onColor] = getForeground(colorVal);
|
||||
}
|
||||
return onColors;
|
||||
}
|
||||
function getScopedSelector(selector, scope) {
|
||||
if (!scope) return selector;
|
||||
const scopeSelector = `:where(${scope})`;
|
||||
return selector === ":root" ? scopeSelector : `${scopeSelector} ${selector}`;
|
||||
}
|
||||
function upsertStyles(id, cspNonce, styles) {
|
||||
const styleEl = getOrCreateStyleElement(id, cspNonce);
|
||||
if (!styleEl) return;
|
||||
styleEl.innerHTML = styles;
|
||||
}
|
||||
function getOrCreateStyleElement(id, cspNonce) {
|
||||
if (!IN_BROWSER) return null;
|
||||
let style = document.getElementById(id);
|
||||
if (!style) {
|
||||
style = document.createElement("style");
|
||||
style.id = id;
|
||||
style.type = "text/css";
|
||||
if (cspNonce) style.setAttribute("nonce", cspNonce);
|
||||
document.head.appendChild(style);
|
||||
}
|
||||
return style;
|
||||
}
|
||||
function createTheme(options) {
|
||||
const parsedOptions = parseThemeOptions(options);
|
||||
const _name = shallowRef(parsedOptions.defaultTheme);
|
||||
const themes = ref(parsedOptions.themes);
|
||||
const systemName = shallowRef("light");
|
||||
const name = computed({
|
||||
get() {
|
||||
return _name.value === "system" ? systemName.value : _name.value;
|
||||
},
|
||||
set(val) {
|
||||
_name.value = val;
|
||||
}
|
||||
});
|
||||
const computedThemes = computed(() => {
|
||||
const acc = {};
|
||||
for (const [name2, original] of Object.entries(themes.value)) {
|
||||
const colors = {
|
||||
...original.colors,
|
||||
...genVariations(original.colors, parsedOptions.variations)
|
||||
};
|
||||
acc[name2] = {
|
||||
...original,
|
||||
colors: {
|
||||
...colors,
|
||||
...genOnColors(colors)
|
||||
}
|
||||
};
|
||||
}
|
||||
return acc;
|
||||
});
|
||||
const current = toRef(() => computedThemes.value[name.value]);
|
||||
const isSystem = toRef(() => _name.value === "system");
|
||||
const styles = computed(() => {
|
||||
const lines = [];
|
||||
const important = parsedOptions.unimportant ? "" : " !important";
|
||||
const scoped = parsedOptions.scoped ? parsedOptions.prefix : "";
|
||||
if (current.value?.dark) {
|
||||
createCssClass(lines, ":root", ["color-scheme: dark"], parsedOptions.scope);
|
||||
}
|
||||
createCssClass(lines, ":root", genCssVariables(current.value, parsedOptions.prefix), parsedOptions.scope);
|
||||
for (const [themeName, theme] of Object.entries(computedThemes.value)) {
|
||||
createCssClass(lines, `.${parsedOptions.prefix}theme--${themeName}`, [`color-scheme: ${theme.dark ? "dark" : "normal"}`, ...genCssVariables(theme, parsedOptions.prefix)], parsedOptions.scope);
|
||||
}
|
||||
if (parsedOptions.utilities) {
|
||||
const bgLines = [];
|
||||
const fgLines = [];
|
||||
const colors = new Set(Object.values(computedThemes.value).flatMap((theme) => Object.keys(theme.colors)));
|
||||
for (const key of colors) {
|
||||
if (key.startsWith("on-")) {
|
||||
createCssClass(fgLines, `.${key}`, [`color: rgb(var(--${parsedOptions.prefix}theme-${key}))${important}`], parsedOptions.scope);
|
||||
} else {
|
||||
createCssClass(bgLines, `.${scoped}bg-${key}`, [`--${parsedOptions.prefix}theme-overlay-multiplier: var(--${parsedOptions.prefix}theme-${key}-overlay-multiplier)`, `background-color: rgb(var(--${parsedOptions.prefix}theme-${key}))${important}`, `color: rgb(var(--${parsedOptions.prefix}theme-on-${key}))${important}`], parsedOptions.scope);
|
||||
createCssClass(fgLines, `.${scoped}text-${key}`, [`color: rgb(var(--${parsedOptions.prefix}theme-${key}))${important}`], parsedOptions.scope);
|
||||
createCssClass(fgLines, `.${scoped}border-${key}`, [`--${parsedOptions.prefix}border-color: var(--${parsedOptions.prefix}theme-${key})`], parsedOptions.scope);
|
||||
}
|
||||
}
|
||||
if (parsedOptions.layers) {
|
||||
lines.push("@layer background {\n", ...bgLines.map((v) => ` ${v}`), "}\n", "@layer foreground {\n", ...fgLines.map((v) => ` ${v}`), "}\n");
|
||||
} else {
|
||||
lines.push(...bgLines, ...fgLines);
|
||||
}
|
||||
}
|
||||
let final = lines.map((str, i) => i === 0 ? str : ` ${str}`).join("");
|
||||
if (parsedOptions.layers) {
|
||||
final = "@layer vuetify.theme {\n" + lines.map((v) => ` ${v}`).join("") + "\n}";
|
||||
}
|
||||
return final;
|
||||
});
|
||||
const themeClasses = toRef(() => parsedOptions.isDisabled ? void 0 : `${parsedOptions.prefix}theme--${name.value}`);
|
||||
const themeNames = toRef(() => Object.keys(computedThemes.value));
|
||||
if (SUPPORTS_MATCH_MEDIA) {
|
||||
let updateSystemName = function() {
|
||||
systemName.value = media.matches ? "dark" : "light";
|
||||
};
|
||||
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
||||
updateSystemName();
|
||||
media.addEventListener("change", updateSystemName, {
|
||||
passive: true
|
||||
});
|
||||
if (getCurrentScope()) {
|
||||
onScopeDispose(() => {
|
||||
media.removeEventListener("change", updateSystemName);
|
||||
});
|
||||
}
|
||||
}
|
||||
function install(app) {
|
||||
if (parsedOptions.isDisabled) return;
|
||||
const head = app._context.provides.usehead;
|
||||
if (head) {
|
||||
let getHead = function() {
|
||||
return {
|
||||
style: [{
|
||||
textContent: styles.value,
|
||||
id: parsedOptions.stylesheetId,
|
||||
nonce: parsedOptions.cspNonce || false
|
||||
}]
|
||||
};
|
||||
};
|
||||
if (head.push) {
|
||||
const entry = head.push(getHead);
|
||||
if (IN_BROWSER) {
|
||||
watch(styles, () => {
|
||||
entry.patch(getHead);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (IN_BROWSER) {
|
||||
head.addHeadObjs(toRef(getHead));
|
||||
watchEffect(() => head.updateDOM());
|
||||
} else {
|
||||
head.addHeadObjs(getHead());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let updateStyles = function() {
|
||||
upsertStyles(parsedOptions.stylesheetId, parsedOptions.cspNonce, styles.value);
|
||||
};
|
||||
if (IN_BROWSER) {
|
||||
watch(styles, updateStyles, {
|
||||
immediate: true
|
||||
});
|
||||
} else {
|
||||
updateStyles();
|
||||
}
|
||||
}
|
||||
}
|
||||
function change(themeName) {
|
||||
if (themeName !== "system" && !themeNames.value.includes(themeName)) {
|
||||
consoleWarn(`Theme "${themeName}" not found on the Vuetify theme instance`);
|
||||
return;
|
||||
}
|
||||
name.value = themeName;
|
||||
}
|
||||
function cycle() {
|
||||
let themeArray = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : themeNames.value;
|
||||
const currentIndex = themeArray.indexOf(name.value);
|
||||
const nextIndex = currentIndex === -1 ? 0 : (currentIndex + 1) % themeArray.length;
|
||||
change(themeArray[nextIndex]);
|
||||
}
|
||||
function toggle() {
|
||||
let themeArray = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ["light", "dark"];
|
||||
cycle(themeArray);
|
||||
}
|
||||
const globalName = new Proxy(name, {
|
||||
get(target, prop) {
|
||||
return Reflect.get(target, prop);
|
||||
},
|
||||
set(target, prop, val) {
|
||||
if (prop === "value") {
|
||||
deprecate(`theme.global.name.value = ${val}`, `theme.change('${val}')`);
|
||||
}
|
||||
return Reflect.set(target, prop, val);
|
||||
}
|
||||
});
|
||||
return {
|
||||
install,
|
||||
change,
|
||||
cycle,
|
||||
toggle,
|
||||
isDisabled: parsedOptions.isDisabled,
|
||||
isSystem,
|
||||
name,
|
||||
themes,
|
||||
current,
|
||||
computedThemes,
|
||||
prefix: parsedOptions.prefix,
|
||||
themeClasses,
|
||||
styles,
|
||||
global: {
|
||||
name: globalName,
|
||||
current
|
||||
}
|
||||
};
|
||||
}
|
||||
function provideTheme(props) {
|
||||
getCurrentInstance("provideTheme");
|
||||
const theme = inject(ThemeSymbol, null);
|
||||
if (!theme) throw new Error("Could not find Vuetify theme injection");
|
||||
const name = toRef(() => props.theme ?? theme.name.value);
|
||||
const current = toRef(() => theme.themes.value[name.value]);
|
||||
const themeClasses = toRef(() => theme.isDisabled ? void 0 : `${theme.prefix}theme--${name.value}`);
|
||||
const newTheme = {
|
||||
...theme,
|
||||
name,
|
||||
current,
|
||||
themeClasses
|
||||
};
|
||||
provide(ThemeSymbol, newTheme);
|
||||
return newTheme;
|
||||
}
|
||||
function useTheme() {
|
||||
getCurrentInstance("useTheme");
|
||||
const theme = inject(ThemeSymbol, null);
|
||||
if (!theme) throw new Error("Could not find Vuetify theme injection");
|
||||
return theme;
|
||||
}
|
||||
|
||||
export {
|
||||
ThemeSymbol,
|
||||
makeThemeProps,
|
||||
createTheme,
|
||||
provideTheme,
|
||||
useTheme
|
||||
};
|
||||
//# sourceMappingURL=chunk-3DSR7NCB.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/composables/theme.ts"],
|
||||
"sourcesContent": ["// Utilities\nimport {\n computed,\n getCurrentScope,\n inject,\n onScopeDispose,\n provide,\n ref,\n shallowRef,\n toRef,\n watch,\n watchEffect,\n} from 'vue'\nimport {\n consoleWarn,\n createRange,\n darken,\n deprecate,\n getCurrentInstance,\n getForeground,\n getLuma,\n IN_BROWSER,\n lighten,\n mergeDeep,\n parseColor,\n propsFactory,\n RGBtoHex,\n SUPPORTS_MATCH_MEDIA,\n} from '@/util'\n\n// Types\nimport type { VueHeadClient } from '@unhead/vue/client'\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?: 'light' | 'dark' | 'system' | string & {}\n variations?: false | VariationsOptions\n themes?: Record<string, ThemeDefinition>\n stylesheetId?: string\n scope?: string\n unimportant?: boolean\n layers?: boolean\n}\nexport type ThemeDefinition = DeepPartial<InternalThemeDefinition>\n\ninterface InternalThemeOptions {\n cspNonce?: string\n isDisabled: boolean\n defaultTheme: 'light' | 'dark' | 'system' | string & {}\n prefix: string\n variations: false | VariationsOptions\n themes: Record<string, InternalThemeDefinition>\n stylesheetId: string\n scope?: string\n scoped: boolean\n unimportant: boolean\n utilities: boolean\n layers?: boolean\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 change: (themeName: string) => void\n cycle: (themeArray?: string[]) => void\n toggle: (themeArray?: [string, string]) => void\n\n readonly isDisabled: boolean\n readonly isSystem: Readonly<Ref<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 readonly prefix: string\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 prefix: 'v-',\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': '#EEEEEE',\n 'theme-on-kbd': '#000000',\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': '#c8c8c8',\n 'on-surface-variant': '#000000',\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: '#FB8CLine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6HO,IAAMA,cAA2CC,uBAAOC,IAAI,eAAe;AAE3E,IAAMC,iBAAiBC,aAAa;EACzCC,OAAOC;AACT,GAAG,OAAO;AAEV,SAASC,cAAe;AACtB,SAAO;IACLC,cAAc;IACdC,QAAQ;IACRC,YAAY;MAAEC,QAAQ,CAAA;MAAIC,SAAS;MAAGC,QAAQ;IAAE;IAChDC,QAAQ;MACNC,OAAO;QACLC,MAAM;QACNL,QAA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UACN,GAAGA;UACH,GAAG6D,YAAY7D,MAAM;QACvB;MACF;IACF;AACA,WAAO+F;EACT,CAAC;AAED,QAAME,UAAUC,MAAM,MAAMJ,eAAepD,MAAMU,KAAKV,KAAK,CAAC;AAE5D,QAAMyD,WAAWD,MAAM,MAAMZ,MAAM5C,UAAU,QAAQ;AAErD,QAAM6B,SAASmB,SAAS,MAAM;AAC5B,UAAM3D,QAAkB,CAAA;AACxB,UAAMqE,YAAYf,cAAcpE,cAAc,KAAK;AACnD,UAAMD,SAASqE,cAAcrE,SAASqE,cAAcvF,SAAS;AAE7D,QAAImG,QAAQvD,OAAOrC,MAAM;AACvByB,qBAAeC,OAAO,SAAS,CAAC,oBAAoB,GAAGsD,cAAcnD,KAAK;IAC5E;AAEAJ,mBAAeC,OAAO,SAASQ,gBAAgB0D,QAAQvD,OAAO2C,cAAcvF,MALine truncated
|
||||
"names": ["ThemeSymbol", "Symbol", "for", "makeThemeProps", "propsFactory", "theme", "String", "genDefaults", "defaultTheme", "prefix", "variations", "colors", "lighten", "darken", "themes", "light", "dark", "background", "surface", "primary", "secondary", "error", "info", "success", "warning", "variables", "stylesheetId", "scoped", "unimportant", "utilities", "parseThemeOptions", "options", "arguments", "length", "undefined", "defaults", "isDisabled", "key", "Object", "entries", "mergeDeep", "createCssClass", "lines", "selector", "content", "scope", "push", "getScopedSelector", "map", "line", "genCssVariables", "lightOverlay", "darkOverlay", "value", "rgb", "parseColor", "r", "g", "b", "startsWith", "getLuma", "color", "genVariation", "name", "object", "variation", "fn", "amount", "createRange", "RGBtoHex", "genVariations", "variationColors", "genOnColors", "onColors", "keys", "onColor", "colorVal", "getForeground", "scopeSelector", "upsertStyles", "id", "cspNonce", "styles", "styleEl", "getOrCreateStyleElement", "innerHTML", "IN_BROWSER", "style", "document", "getElementById", "createElement", "type", "setAttribute", "head", "appendChild", "createTheme", "parsedOptions", "_name", "shallowRef", "ref", "systemName", "computed", "get", "set", "val", "computedThemes", "acc", "original", "current", "toRef", "isSystem", "important", "themeName", "bgLines", "fgLines", "Set", "values", "flatMap", "layers", "v", "final", "str", "i", "join", "themeClasses", "themeNames", "SUPPORTS_MATCH_MEDIA", "updateSystemName", "media", "matches", "window", "matchMedia", "addEventListener", "passive", "getCurrentScope", "onScopeDispose", "removeEventListener", "install", "app", "_context", "provides", "usehead", "getHead", "textContent", "nonce", "entry", "watch", "patch", "addHeadObjs", "watchEffect", "updateDOM", "updateStyles", "immediate", "change", "includes", "consoleWarn", "cycle", "themeArray", "currentIndex", "indexOf", "nextIndex", "toggle", "globalName", "Proxy", "target", "prop", "Reflect", "deprecate", "global", "provideTheme", "props", "getCurrentInstance", "inject", "Error", "newTheme", "provide", "useTheme"]
|
||||
}
|
||||
+3189
File diff suppressed because it is too large.
Load diff
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VDataTable/VDataTable.tsx", "../../vuetify/src/components/VDataTable/VDataTableFooter.tsx", "../../vuetify/src/components/VPagination/VPagination.tsx", "../../vuetify/src/composables/refs.ts", "../../vuetify/src/components/VDataTable/composables/paginate.ts", "../../vuetify/src/components/VDataTable/VDataTableColumn.tsx", "../../vuetify/src/components/VDataTable/composables/headers.ts", "../../vuetify/src/components/VDataTable/composables/select.ts", "../../vuetify/src/components/VDataTable/composables/sort.ts", "../../vuetify/src/components/VDataTable/VDataTableHeaders.tsx", "../../vuetify/src/components/VDataTable/composables/group.ts", "../../vuetify/src/components/VDataTable/VDataTableGroupHeaderRow.tsx", "../../vuetify/src/components/VDataTable/composables/expand.ts", "../../vuetify/src/components/VDataTable/VDataTableRow.tsx", "../../vuetify/src/components/VDataTable/VDataTableRows.tsx", "../../vuetify/src/components/VTable/VTable.tsx", "../../vuetify/src/components/VDataTable/composables/items.ts", "../../vuetify/src/components/VDataTable/composables/options.ts", "../../vuetify/src/composables/filter.tsx", "../../vuetify/src/components/VDataTable/VDataTableVirtual.tsx", "../../vuetify/src/components/VDataTable/VDataTableServer.tsx"],
|
||||
"sourcesContent": ["// Styles\nimport './VDataTable.sass'\n\n// Components\nimport { makeVDataTableFooterProps, VDataTableFooter } from './VDataTableFooter'\nimport { makeVDataTableHeadersProps, VDataTableHeaders } from './VDataTableHeaders'\nimport { makeVDataTableRowsProps, VDataTableRows } from './VDataTableRows'\nimport { VDivider } from '@/components/VDivider'\nimport { makeVTableProps, VTable } from '@/components/VTable/VTable'\n\n// Composables\nimport { makeDataTableExpandProps, provideExpanded } from './composables/expand'\nimport { createGroupBy, makeDataTableGroupProps, provideGroupBy, useGroupedItems } from './composables/group'\nimport { createHeaders, makeDataTableHeaderProps } from './composables/headers'\nimport { makeDataTableItemsProps, useDataTableItems } from './composables/items'\nimport { useOptions } from './composables/options'\nimport { createPagination, makeDataTablePaginateProps, providePagination, usePaginatedItems } from './composables/paginate'\nimport { makeDataTableSelectProps, provideSelection } from './composables/select'\nimport { createSort, makeDataTableSortProps, provideSort, useSortedItems } from './composables/sort'\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeFilterProps, useFilter } from '@/composables/filter'\n\n// Utilities\nimport { computed, toRef, toRefs } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { DeepReadonly, UnwrapRef } from 'vue'\nimport type { Group, GroupSummary } from './composables/group'\nimport type { CellProps, DataTableHeader, DataTableItem, InternalDataTableHeader, RowProps } from './types'\nimport type { VDataTableHeadersSlots } from './VDataTableHeaders'\nimport type { VDataTableRowsSlots } from './VDataTableRows'\nimport type { GenericProps, SelectItemKey } from '@/util'\n\nexport type VDataTableSlotProps<T> = {\n page: number\n itemsPerPage: number\n sortBy: UnwrapRef<ReturnType<typeof provideSort>['sortBy']>\n pageCount: number\n toggleSort: ReturnType<typeof provideSort>['toggleSort']\n setItemsPerPage: ReturnType<typeof providePagination>['setItemsPerPage']\n someSelected: boolean\n allSelected: boolean\n isSelected: ReturnType<typeof provideSelection>['isSelected']\n select: ReturnType<typeof provideSelection>['select']\n selectAll: ReturnType<typeof provideSelection>['selectAll']\n toggleSelect: ReturnType<typeof provideSelection>['toggleSelect']\n isExpanded: ReturnType<typeof provideExpanded>['isExpanded']\n toggleExpand: ReturnType<typeof provideExpanded>['toggleExpand']\n isGroupOpen: ReturnType<typeof provideGroupBy>['isGroupOpen']\n toggleGroup: ReturnType<typeof provideGroupBy>['toggleGroup']\n items: readonly T[]\n internalItems: readonly DataTableItem[]\n groupedItems: readonly (DataTableItem<T> | Group<DataTableItem<T>> | GroupSummary<DataTableItem<T>>)[]\n columns: InternalDataTableHeader[]\n headers: InternalDataTableHeader[][]\n}\n\nexport type VDataTableSlots<T> = VDataTableRowsSlots<T> & VDataTableHeadersSlots & {\n default: VDataTableSlotProps<T>\n colgroup: VDataTableSlotProps<T>\n top: VDataTableSlotProps<T>\n body: VDataTableSlotProps<T>\n tbody: VDataTableSlotProps<T>\n thead: VDataTableSlotProps<T>\n tfoot: VDataTableSlotProps<T>\n bottom: VDataTableSlotProps<T>\n 'body.prepend': VDataTableSlotProps<T>\n 'body.append': VDataTableSlotProps<T>\n 'footer.prepend': never\n}\n\nexport const makeDataTableProps = propsFactory({\n ...makeVDataTableRowsProps(),\n\n hideDefaultBody: Boolean,\n hideDefaultFooter: Boolean,\n hideDefaultHeader: Boolean,\n width: [String, Number],\n search: String,\n\n ...makeDataTableExpandProps(),\n ...makeDataTableGroupProps(),\n ...makeDataTableHeaderProps(),\n ...makeDataTableItemsProps(),\n ...makeDataTableSelectProps(),\n ...makeDataTableSortProps(),\n ...omit(makeVDataTableHeadersProps(), ['multiSort', 'initialSortOrder']),\n ...makeVTableProps(),\n}, 'DataTable')\n\nexport const makeVDataTableProps = propsFactory({\n ...makeDataTablePaginateProps(),\n ...makeDataTableProps(),\n ...makeFilterProps(),\n ...makeVDataTableFooterProps(),\n}, 'VDataTable')\n\ntype ItemType<T> = T extends readonly (infer U)[] ? U : never\n\nexport const VDataTable = genericComponent<new <T extends readonly any[], V>(\n props: {\n items?: T\n itemValue?: SelectItemKey<ItemType<T>>\n rowProps?: RowProps<ItemType<T>>\n cellProps?: CellProps<ItemType<T>>\n itemSelectable?: SelectItemKey<ItemType<T>>\n headers?: DeepReadonly<DataTableHeader<ItemType<T>>[]>\n modelValue?: V\n 'onUpdate:modelValue'?: (value: V) => void\n },\n slots: VDataTableSlots<ItemType<T>>,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VDataTable',\n\n props: makeVDataTableProps(),\n\n emits: {\n 'update:modelValue': (value: any[]) => true,\n 'update:page': (value: number) => true,\n 'update:itemsPerPage': (value: number) => true,\n 'update:sortBLine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAA;;;ACAA,OAAA;;;ACAA,OAAA;;;ACKO,SAASA,UAA0B;AACxC,QAAMC,OAAOC,IAAuB,CAAA,CAAE;AAEtCC,iBAAe,MAAOF,KAAKG,QAAQ,CAAA,CAAG;AAEtC,WAASC,UAAWC,GAAQC,GAAW;AACrCN,SAAKG,MAAMG,CAAC,IAAID;EAClB;AAEA,SAAO;IAAEL;IAAMI;EAAU;AAC3B;;;ADsCO,IAAMG,uBAAuBC,aAAa;EAC/CC,aAAaC;EACbC,OAAO;IACLC,MAAM,CAACC,QAAQH,MAAM;IACrBI,SAAS;EACX;EACAC,YAAY;IACVH,MAAMC;IACNC,SAAUE,WAAeA,MAAML;EACjC;EACAM,UAAUC;EACVC,QAAQ;IACNP,MAAM,CAACC,QAAQH,MAAM;IACrBI,SAAS;IACTM,WAAYC,SAAgBA,MAAM,MAAM;EAC1C;EACAC,cAAc,CAACT,QAAQH,MAAM;EAC7Ba,WAAW;IACTX,MAAMY;IACNV,SAAS;EACX;EACAW,UAAU;IACRb,MAAMY;IACNV,SAAS;EACX;EACAY,UAAU;IACRd,MAAMY;IACNV,SAAS;EAC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AAe,CAAC,CAACvH,MAAMLine truncated
|
||||
"names": ["useRefs", "refs", "ref", "onBeforeUpdate", "value", "updateRef", "e", "i", "makeVPaginationProps", "propsFactory", "activeColor", "String", "start", "type", "Number", "default", "modelValue", "props", "disabled", "Boolean", "length", "validator", "val", "totalVisible", "firstIcon", "IconValue", "prevIcon", "nextIcon", "lastIcon", "ariaLabel", "pageAriaLabel", "currentPageAriaLabel", "firstAriaLabel", "previousAriaLabel", "nextAriaLabel", "lastAriaLabel", "ellipsis", "showFirstLastPage", "makeBorderProps", "makeComponentProps", "makeDensityProps", "makeElevationProps", "makeRoundedProps", "makeSizeProps", "makeTagProps", "tag", "makeThemeProps", "makeVariantProps", "variant", "VPagination", "genericComponent", "name", "emits", "value", "first", "prev", "next", "last", "setup", "_ref", "slots", "emit", "page", "useProxiedModel", "t", "n", "useLocale", "isRtl", "useRtl", "themeClasses", "provideTheme", "width", "useDisplay", "maxButtons", "shallowRef", "provideDefaults", "undefined", "scoped", "resizeRef", "useResizeObserver", "entries", "target", "contentRect", "firstItem", "querySelector", "totalWidth", "itemWidth", "offsetWidth", "parseFloat", "getComputedStyle", "marginRight", "getMax", "computed", "parseInt", "minButtons", "Math", "max", "floor", "toFixed", "range", "isNaN", "MAX_SAFE_INTEGER", "createRange", "even", "middle", "left", "right", "rangeLength", "rangeStart", "ceil", "setValue", "e", "event", "preventDefault", "refs", "updateRef", "useRefs", "VPaginationBtn", "color", "toRef", "border", "density", "size", "rounded", "elevation", "items", "map", "item", "index", "ref", "isActive", "key", "icon", "onClick", "controls", "prevDisabled", "nextDisabled", "updateFocus", "currentIndex", "$el", "focus", "onKeydown", "keyValues", "nextTick", "useRender", "_createVNode", "_normalizeClass", "class", "_normalizeStyle", "style", "_createElementVNode", "VBtn", "_mergeProps", "makeDataTablePaginateProps", "propsFactory", "page", "type", "Number", "String", "default", "itemsPerPage", "VDataTablePaginationSymbol", "Symbol", "for", "createPagination", "props", "useProxiedModel", "undefined", "value", "providePagination", "options", "itemsLength", "startIndex", "computed", "stopIndex", "Math", "min", "pageCount", "ceil", "watch", "setItemsPerPage", "nextPage", "clamp", "prevPage", "setPage", "data", "provide", "usePagination", "inject", "Error", "usePaginatedItems", "vm", "getCurrentInstance", "items", "paginatedItems", "slice", "val", "emit", "immediate", "makeVDataTableFooterProps", "propsFactory", "color", "String", "prevIcon", "type", "IconValue", "default", "nextIcon", "firstIcon", "lastIcon", "itemsPerPageText", "pageText", "firstPageLabel", "prevPageLabel", "nextPageLabel", "lastPageLabel", "itemsPerPageOptions", "Array", "value", "title", "showCurrentPage", "Boolean", "VDataTableFooter", "genericComponent", "name", "props", "setup", "_ref", "slots", "t", "useLocale", "page", "pageCount", "startIndex", "stopIndex", "itemsLength", "itemsPerPage", "setItemsPerPage", "usePagination", "computed", "map", "option", "isNaN", "Number", "useRender", "paginationProps", "VPagination", "filterProps", "_createElementVNode", "prepend", "_createVNode", "VSelect", "v", "_mergeProps", "$event", "omit", "VDataTableColumn", "defineFunctionalComponent", "align", "type", "String", "default", "fixed", "Boolean", "fixedOffset", "Number", "fixedEndOffset", "height", "lastFixed", "firstFixedEnd", "noPadding", "indent", "empty", "tag", "width", "maxWidth", "nowrap", "props", "_ref", "slots", "Tag", "fixedSide", "_createVNode", "_normalizeClass", "convertToUnit", "left", "undefined", "right", "paddingInlineStart", "makeDataTableHeaderProps", "propsFactory", "headers", "Array", "VDataTableHeadersSymbol", "Symbol", "for", "defaultHeader", "title", "sortable", "defaultActionHeader", "width", "priorityQueue", "arr", "arguments", "length", "undefined", "queue", "map", "element", "priority", "enqueue", "added", "i", "item", "splice", "push", "size", "count", "whole", "Math", "floor", "dequeue", "shift", "extractLeaves", "columns", "children", "child", "extractKeys", "keys", "Set", "key", "add", "getDefaultItem", "includes", "getDepth", "depth", "max", "parseFixedColumns", "items", "seenFixed", "setFixed", "side", "parentFixedSide", "fixed", "lastFixed", "firstFixedEnd", "isNaN", "Number", "consoleError", "minWidth", "fixedOffset", "setFixedOffset", "fixedEndOffset", "setFixedEndOffset", "offset", "parseFloat", "parse", "maxDepth", "currentDepth", "rowSize", "row", "fraction", "diff", "rowspan", "colspan", "sort", "pow", "flat", "convertToInternalHeaders", "internalHeaders", "defaultItem", "value", "internalItem", "createHeaders", "props", "options", "ref", "sortFunctions", "sortRawFunctions", "filterFunctions", "watchEffect", "_headers", "Object", "capitalize", "slice", "groupBy", "has", "unshift", "showSelect", "showExpand", "parsed", "flatHeaders", "header", "sortRaw", "filter", "data", "provide", "useHeaders", "inject", Line truncated
|
||||
}
|
||||
Whitespace-only changes.
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
+562
@@ -0,0 +1,562 @@
|
||||
import {
|
||||
useForm
|
||||
} from "./chunk-GAYXO4FM.js";
|
||||
import {
|
||||
VSlideYTransition
|
||||
} from "./chunk-B4JFJDWM.js";
|
||||
import {
|
||||
makeDensityProps,
|
||||
useDensity
|
||||
} from "./chunk-TM3MIDYC.js";
|
||||
import {
|
||||
VIcon
|
||||
} from "./chunk-CMZ4UYUX.js";
|
||||
import {
|
||||
MaybeTransition,
|
||||
makeTransitionProps
|
||||
} from "./chunk-CAGZXMOS.js";
|
||||
import {
|
||||
makeDimensionProps,
|
||||
useDimension
|
||||
} from "./chunk-6EZKHCRW.js";
|
||||
import {
|
||||
IconValue
|
||||
} from "./chunk-OJDZBU5D.js";
|
||||
import {
|
||||
useLocale,
|
||||
useRtl
|
||||
} from "./chunk-ENTLCOCZ.js";
|
||||
import {
|
||||
useProxiedModel,
|
||||
useToggleScope
|
||||
} from "./chunk-KA77II4V.js";
|
||||
import {
|
||||
useTextColor
|
||||
} from "./chunk-BHV5Z34M.js";
|
||||
import {
|
||||
makeThemeProps,
|
||||
provideTheme
|
||||
} from "./chunk-3DSR7NCB.js";
|
||||
import {
|
||||
EventProp,
|
||||
callEvent,
|
||||
genericComponent,
|
||||
getCurrentInstance,
|
||||
getCurrentInstanceName,
|
||||
makeComponentProps,
|
||||
pick,
|
||||
propsFactory,
|
||||
useRender,
|
||||
wrapInArray
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
computed,
|
||||
createBaseVNode,
|
||||
createVNode,
|
||||
inject,
|
||||
mergeProps,
|
||||
nextTick,
|
||||
normalizeClass,
|
||||
normalizeStyle,
|
||||
onBeforeMount,
|
||||
onBeforeUnmount,
|
||||
onMounted,
|
||||
ref,
|
||||
shallowRef,
|
||||
toRef,
|
||||
unref,
|
||||
useId,
|
||||
watch
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/VLabel/VLabel.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VLabel/VLabel.css";
|
||||
var makeVLabelProps = propsFactory({
|
||||
text: String,
|
||||
onClick: EventProp(),
|
||||
...makeComponentProps(),
|
||||
...makeThemeProps()
|
||||
}, "VLabel");
|
||||
var VLabel = genericComponent()({
|
||||
name: "VLabel",
|
||||
props: makeVLabelProps(),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
useRender(() => createBaseVNode("label", {
|
||||
"class": normalizeClass(["v-label", {
|
||||
"v-label--clickable": !!props.onClick
|
||||
}, props.class]),
|
||||
"style": normalizeStyle(props.style),
|
||||
"onClick": props.onClick
|
||||
}, [props.text, slots.default?.()]));
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/vuetify/lib/components/VMessages/VMessages.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VMessages/VMessages.css";
|
||||
var makeVMessagesProps = propsFactory({
|
||||
active: Boolean,
|
||||
color: String,
|
||||
messages: {
|
||||
type: [Array, String],
|
||||
default: () => []
|
||||
},
|
||||
...makeComponentProps(),
|
||||
...makeTransitionProps({
|
||||
transition: {
|
||||
component: VSlideYTransition,
|
||||
leaveAbsolute: true,
|
||||
group: true
|
||||
}
|
||||
})
|
||||
}, "VMessages");
|
||||
var VMessages = genericComponent()({
|
||||
name: "VMessages",
|
||||
props: makeVMessagesProps(),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
const messages = computed(() => wrapInArray(props.messages));
|
||||
const {
|
||||
textColorClasses,
|
||||
textColorStyles
|
||||
} = useTextColor(() => props.color);
|
||||
useRender(() => createVNode(MaybeTransition, {
|
||||
"transition": props.transition,
|
||||
"tag": "div",
|
||||
"class": normalizeClass(["v-messages", textColorClasses.value, props.class]),
|
||||
"style": normalizeStyle([textColorStyles.value, props.style])
|
||||
}, {
|
||||
default: () => [props.active && messages.value.map((message, i) => createBaseVNode("div", {
|
||||
"class": "v-messages__message",
|
||||
"key": `${i}-${messages.value}`
|
||||
}, [slots.message ? slots.message({
|
||||
message
|
||||
}) : message]))]
|
||||
}));
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/vuetify/lib/components/VInput/VInput.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VInput/VInput.css";
|
||||
|
||||
// node_modules/vuetify/lib/components/VInput/InputIcon.js
|
||||
function useInputIcon(props) {
|
||||
const {
|
||||
t
|
||||
} = useLocale();
|
||||
function InputIcon(_ref) {
|
||||
let {
|
||||
name,
|
||||
color,
|
||||
...attrs
|
||||
} = _ref;
|
||||
const localeKey = {
|
||||
prepend: "prependAction",
|
||||
prependInner: "prependAction",
|
||||
append: "appendAction",
|
||||
appendInner: "appendAction",
|
||||
clear: "clear"
|
||||
}[name];
|
||||
const listener = props[`onClick:${name}`];
|
||||
function onKeydown(e) {
|
||||
if (e.key !== "Enter" && e.key !== " ") return;
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
callEvent(listener, new PointerEvent("click", e));
|
||||
}
|
||||
const label = listener && localeKey ? t(`$vuetify.input.${localeKey}`, props.label ?? "") : void 0;
|
||||
return createVNode(VIcon, mergeProps({
|
||||
"icon": props[`${name}Icon`],
|
||||
"aria-label": label,
|
||||
"onClick": listener,
|
||||
"onKeydown": onKeydown,
|
||||
"color": color
|
||||
}, attrs), null);
|
||||
}
|
||||
return {
|
||||
InputIcon
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/vuetify/lib/composables/focus.js
|
||||
var makeFocusProps = propsFactory({
|
||||
focused: Boolean,
|
||||
"onUpdate:focused": EventProp()
|
||||
}, "focus");
|
||||
function useFocus(props) {
|
||||
let name = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : getCurrentInstanceName();
|
||||
const isFocused = useProxiedModel(props, "focused");
|
||||
const focusClasses = toRef(() => {
|
||||
return {
|
||||
[`${name}--focused`]: isFocused.value
|
||||
};
|
||||
});
|
||||
function focus() {
|
||||
isFocused.value = true;
|
||||
}
|
||||
function blur() {
|
||||
isFocused.value = false;
|
||||
}
|
||||
return {
|
||||
focusClasses,
|
||||
isFocused,
|
||||
focus,
|
||||
blur
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/vuetify/lib/labs/rules/rules.js
|
||||
var RulesSymbol = /* @__PURE__ */ Symbol.for("vuetify:rules");
|
||||
function useRules(fn) {
|
||||
const rules = inject(RulesSymbol, null);
|
||||
if (!fn) {
|
||||
if (!rules) {
|
||||
throw new Error("Could not find Vuetify rules injection");
|
||||
}
|
||||
return rules.aliases;
|
||||
}
|
||||
return rules?.resolve(fn) ?? toRef(fn);
|
||||
}
|
||||
|
||||
// node_modules/vuetify/lib/composables/validation.js
|
||||
var makeValidationProps = propsFactory({
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: null
|
||||
},
|
||||
error: Boolean,
|
||||
errorMessages: {
|
||||
type: [Array, String],
|
||||
default: () => []
|
||||
},
|
||||
maxErrors: {
|
||||
type: [Number, String],
|
||||
default: 1
|
||||
},
|
||||
name: String,
|
||||
label: String,
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
default: null
|
||||
},
|
||||
rules: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
modelValue: null,
|
||||
validateOn: String,
|
||||
validationValue: null,
|
||||
...makeFocusProps()
|
||||
}, "validation");
|
||||
function useValidation(props) {
|
||||
let name = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : getCurrentInstanceName();
|
||||
let id = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : useId();
|
||||
const model = useProxiedModel(props, "modelValue");
|
||||
const validationModel = computed(() => props.validationValue === void 0 ? model.value : props.validationValue);
|
||||
const form = useForm(props);
|
||||
const rules = useRules(() => props.rules);
|
||||
const internalErrorMessages = ref([]);
|
||||
const isPristine = shallowRef(true);
|
||||
const isDirty = computed(() => !!(wrapInArray(model.value === "" ? null : model.value).length || wrapInArray(validationModel.value === "" ? null : validationModel.value).length));
|
||||
const errorMessages = computed(() => {
|
||||
return props.errorMessages?.length ? wrapInArray(props.errorMessages).concat(internalErrorMessages.value).slice(0, Math.max(0, Number(props.maxErrors))) : internalErrorMessages.value;
|
||||
});
|
||||
const validateOn = computed(() => {
|
||||
let value = (props.validateOn ?? form.validateOn?.value) || "input";
|
||||
if (value === "lazy") value = "input lazy";
|
||||
if (value === "eager") value = "input eager";
|
||||
const set = new Set(value?.split(" ") ?? []);
|
||||
return {
|
||||
input: set.has("input"),
|
||||
blur: set.has("blur") || set.has("input") || set.has("invalid-input"),
|
||||
invalidInput: set.has("invalid-input"),
|
||||
lazy: set.has("lazy"),
|
||||
eager: set.has("eager")
|
||||
};
|
||||
});
|
||||
const isValid = computed(() => {
|
||||
if (props.error || props.errorMessages?.length) return false;
|
||||
if (!props.rules.length) return true;
|
||||
if (isPristine.value) {
|
||||
return internalErrorMessages.value.length || validateOn.value.lazy ? null : true;
|
||||
} else {
|
||||
return !internalErrorMessages.value.length;
|
||||
}
|
||||
});
|
||||
const isValidating = shallowRef(false);
|
||||
const validationClasses = computed(() => {
|
||||
return {
|
||||
[`${name}--error`]: isValid.value === false,
|
||||
[`${name}--dirty`]: isDirty.value,
|
||||
[`${name}--disabled`]: form.isDisabled.value,
|
||||
[`${name}--readonly`]: form.isReadonly.value
|
||||
};
|
||||
});
|
||||
const vm = getCurrentInstance("validation");
|
||||
const uid = computed(() => props.name ?? unref(id));
|
||||
onBeforeMount(() => {
|
||||
form.register?.({
|
||||
id: uid.value,
|
||||
vm,
|
||||
validate,
|
||||
reset,
|
||||
resetValidation
|
||||
});
|
||||
});
|
||||
onBeforeUnmount(() => {
|
||||
form.unregister?.(uid.value);
|
||||
});
|
||||
onMounted(async () => {
|
||||
if (!validateOn.value.lazy) {
|
||||
await validate(!validateOn.value.eager);
|
||||
}
|
||||
form.update?.(uid.value, isValid.value, errorMessages.value);
|
||||
});
|
||||
useToggleScope(() => validateOn.value.input || validateOn.value.invalidInput && isValid.value === false, () => {
|
||||
watch(validationModel, () => {
|
||||
if (validationModel.value != null) {
|
||||
validate();
|
||||
} else if (props.focused) {
|
||||
const unwatch = watch(() => props.focused, (val) => {
|
||||
if (!val) validate();
|
||||
unwatch();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
useToggleScope(() => validateOn.value.blur, () => {
|
||||
watch(() => props.focused, (val) => {
|
||||
if (!val) validate();
|
||||
});
|
||||
});
|
||||
watch([isValid, errorMessages], () => {
|
||||
form.update?.(uid.value, isValid.value, errorMessages.value);
|
||||
});
|
||||
async function reset() {
|
||||
model.value = null;
|
||||
await nextTick();
|
||||
await resetValidation();
|
||||
}
|
||||
async function resetValidation() {
|
||||
isPristine.value = true;
|
||||
if (!validateOn.value.lazy) {
|
||||
await validate(!validateOn.value.eager);
|
||||
} else {
|
||||
internalErrorMessages.value = [];
|
||||
}
|
||||
}
|
||||
async function validate() {
|
||||
let silent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
||||
const results = [];
|
||||
isValidating.value = true;
|
||||
for (const rule of rules.value) {
|
||||
if (results.length >= Number(props.maxErrors ?? 1)) {
|
||||
break;
|
||||
}
|
||||
const handler = typeof rule === "function" ? rule : () => rule;
|
||||
const result = await handler(validationModel.value);
|
||||
if (result === true) continue;
|
||||
if (result !== false && typeof result !== "string") {
|
||||
console.warn(`${result} is not a valid value. Rule functions must return boolean true or a string.`);
|
||||
continue;
|
||||
}
|
||||
results.push(result || "");
|
||||
}
|
||||
internalErrorMessages.value = results;
|
||||
isValidating.value = false;
|
||||
isPristine.value = silent;
|
||||
return internalErrorMessages.value;
|
||||
}
|
||||
return {
|
||||
errorMessages,
|
||||
isDirty,
|
||||
isDisabled: form.isDisabled,
|
||||
isReadonly: form.isReadonly,
|
||||
isPristine,
|
||||
isValid,
|
||||
isValidating,
|
||||
reset,
|
||||
resetValidation,
|
||||
validate,
|
||||
validationClasses
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/vuetify/lib/components/VInput/VInput.js
|
||||
var makeVInputProps = propsFactory({
|
||||
id: String,
|
||||
appendIcon: IconValue,
|
||||
baseColor: String,
|
||||
centerAffix: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
color: String,
|
||||
glow: Boolean,
|
||||
iconColor: [Boolean, String],
|
||||
prependIcon: IconValue,
|
||||
hideDetails: [Boolean, String],
|
||||
hideSpinButtons: Boolean,
|
||||
hint: String,
|
||||
persistentHint: Boolean,
|
||||
messages: {
|
||||
type: [Array, String],
|
||||
default: () => []
|
||||
},
|
||||
direction: {
|
||||
type: String,
|
||||
default: "horizontal",
|
||||
validator: (v) => ["horizontal", "vertical"].includes(v)
|
||||
},
|
||||
"onClick:prepend": EventProp(),
|
||||
"onClick:append": EventProp(),
|
||||
...makeComponentProps(),
|
||||
...makeDensityProps(),
|
||||
...pick(makeDimensionProps(), ["maxWidth", "minWidth", "width"]),
|
||||
...makeThemeProps(),
|
||||
...makeValidationProps()
|
||||
}, "VInput");
|
||||
var VInput = genericComponent()({
|
||||
name: "VInput",
|
||||
props: {
|
||||
...makeVInputProps()
|
||||
},
|
||||
emits: {
|
||||
"update:modelValue": (value) => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
attrs,
|
||||
slots,
|
||||
emit
|
||||
} = _ref;
|
||||
const {
|
||||
densityClasses
|
||||
} = useDensity(props);
|
||||
const {
|
||||
dimensionStyles
|
||||
} = useDimension(props);
|
||||
const {
|
||||
themeClasses
|
||||
} = provideTheme(props);
|
||||
const {
|
||||
rtlClasses
|
||||
} = useRtl();
|
||||
const {
|
||||
InputIcon
|
||||
} = useInputIcon(props);
|
||||
const uid = useId();
|
||||
const id = computed(() => props.id || `input-${uid}`);
|
||||
const {
|
||||
errorMessages,
|
||||
isDirty,
|
||||
isDisabled,
|
||||
isReadonly,
|
||||
isPristine,
|
||||
isValid,
|
||||
isValidating,
|
||||
reset,
|
||||
resetValidation,
|
||||
validate,
|
||||
validationClasses
|
||||
} = useValidation(props, "v-input", id);
|
||||
const messages = computed(() => {
|
||||
if (props.errorMessages?.length || !isPristine.value && errorMessages.value.length) {
|
||||
return errorMessages.value;
|
||||
} else if (props.hint && (props.persistentHint || props.focused)) {
|
||||
return props.hint;
|
||||
} else {
|
||||
return props.messages;
|
||||
}
|
||||
});
|
||||
const hasMessages = toRef(() => messages.value.length > 0);
|
||||
const hasDetails = toRef(() => !props.hideDetails || props.hideDetails === "auto" && (hasMessages.value || !!slots.details));
|
||||
const messagesId = computed(() => hasDetails.value ? `${id.value}-messages` : void 0);
|
||||
const slotProps = computed(() => ({
|
||||
id,
|
||||
messagesId,
|
||||
isDirty,
|
||||
isDisabled,
|
||||
isReadonly,
|
||||
isPristine,
|
||||
isValid,
|
||||
isValidating,
|
||||
hasDetails,
|
||||
reset,
|
||||
resetValidation,
|
||||
validate
|
||||
}));
|
||||
const color = toRef(() => {
|
||||
return props.error || props.disabled ? void 0 : props.focused ? props.color : props.baseColor;
|
||||
});
|
||||
const iconColor = toRef(() => {
|
||||
if (!props.iconColor) return void 0;
|
||||
return props.iconColor === true ? color.value : props.iconColor;
|
||||
});
|
||||
useRender(() => {
|
||||
const hasPrepend = !!(slots.prepend || props.prependIcon);
|
||||
const hasAppend = !!(slots.append || props.appendIcon);
|
||||
return createBaseVNode("div", {
|
||||
"class": normalizeClass(["v-input", `v-input--${props.direction}`, {
|
||||
"v-input--center-affix": props.centerAffix,
|
||||
"v-input--focused": props.focused,
|
||||
"v-input--glow": props.glow,
|
||||
"v-input--hide-spin-buttons": props.hideSpinButtons
|
||||
}, densityClasses.value, themeClasses.value, rtlClasses.value, validationClasses.value, props.class]),
|
||||
"style": normalizeStyle([dimensionStyles.value, props.style])
|
||||
}, [hasPrepend && createBaseVNode("div", {
|
||||
"key": "prepend",
|
||||
"class": "v-input__prepend"
|
||||
}, [slots.prepend ? slots.prepend(slotProps.value) : props.prependIcon && createVNode(InputIcon, {
|
||||
"key": "prepend-icon",
|
||||
"name": "prepend",
|
||||
"color": iconColor.value
|
||||
}, null)]), slots.default && createBaseVNode("div", {
|
||||
"class": "v-input__control"
|
||||
}, [slots.default?.(slotProps.value)]), hasAppend && createBaseVNode("div", {
|
||||
"key": "append",
|
||||
"class": "v-input__append"
|
||||
}, [slots.append ? slots.append(slotProps.value) : props.appendIcon && createVNode(InputIcon, {
|
||||
"key": "append-icon",
|
||||
"name": "append",
|
||||
"color": iconColor.value
|
||||
}, null)]), hasDetails.value && createBaseVNode("div", {
|
||||
"id": messagesId.value,
|
||||
"class": "v-input__details",
|
||||
"role": "alert",
|
||||
"aria-live": "polite"
|
||||
}, [createVNode(VMessages, {
|
||||
"active": hasMessages.value,
|
||||
"messages": messages.value
|
||||
}, {
|
||||
message: slots.message
|
||||
}), slots.details?.(slotProps.value)])]);
|
||||
});
|
||||
return {
|
||||
reset,
|
||||
resetValidation,
|
||||
validate,
|
||||
isValid,
|
||||
errorMessages
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
VLabel,
|
||||
useInputIcon,
|
||||
makeFocusProps,
|
||||
useFocus,
|
||||
VMessages,
|
||||
makeValidationProps,
|
||||
useValidation,
|
||||
makeVInputProps,
|
||||
VInput
|
||||
};
|
||||
//# sourceMappingURL=chunk-4VABFUPG.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VLabel/VLabel.tsx", "../../vuetify/src/components/VMessages/VMessages.tsx", "../../vuetify/src/components/VInput/VInput.tsx", "../../vuetify/src/components/VInput/InputIcon.tsx", "../../vuetify/src/composables/focus.ts", "../../vuetify/src/labs/rules/rules.ts", "../../vuetify/src/composables/validation.ts"],
|
||||
"sourcesContent": ["// Styles\nimport './VLabel.sass'\n\n// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { makeThemeProps } from '@/composables/theme'\n\n// Utilities\nimport { EventProp, genericComponent, propsFactory, useRender } from '@/util'\n\nexport const makeVLabelProps = propsFactory({\n text: String,\n\n onClick: EventProp<[MouseEvent]>(),\n\n ...makeComponentProps(),\n ...makeThemeProps(),\n}, 'VLabel')\n\nexport const VLabel = genericComponent()({\n name: 'VLabel',\n\n props: makeVLabelProps(),\n\n setup (props, { slots }) {\n useRender(() => (\n <label\n class={[\n 'v-label',\n {\n 'v-label--clickable': !!props.onClick,\n },\n props.class,\n ]}\n style={ props.style }\n onClick={ props.onClick }\n >\n { props.text }\n\n { slots.default?.() }\n </label>\n ))\n\n return {}\n },\n})\n\nexport type VLabel = InstanceType<typeof VLabel>\n", "// Styles\nimport './VMessages.sass'\n\n// Components\nimport { VSlideYTransition } from '@/components/transitions'\n\n// Composables\nimport { useTextColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { makeTransitionProps, MaybeTransition } from '@/composables/transition'\n\n// Utilities\nimport { computed } from 'vue'\nimport { genericComponent, propsFactory, useRender, wrapInArray } from '@/util'\n\n// Types\nimport type { Component, PropType } from 'vue'\n\nexport type VMessageSlot = {\n message: string\n}\n\nexport type VMessagesSlots = {\n message: VMessageSlot\n}\n\nexport const makeVMessagesProps = propsFactory({\n active: Boolean,\n color: String,\n messages: {\n type: [Array, String] as PropType<string | readonly string[]>,\n default: () => ([]),\n },\n\n ...makeComponentProps(),\n ...makeTransitionProps({\n transition: {\n component: VSlideYTransition as Component,\n leaveAbsolute: true,\n group: true,\n },\n }),\n}, 'VMessages')\n\nexport const VMessages = genericComponent<VMessagesSlots>()({\n name: 'VMessages',\n\n props: makeVMessagesProps(),\n\n setup (props, { slots }) {\n const messages = computed(() => wrapInArray(props.messages))\n const { textColorClasses, textColorStyles } = useTextColor(() => props.color)\n\n useRender(() => (\n <MaybeTransition\n transition={ props.transition }\n tag=\"div\"\n class={[\n 'v-messages',\n textColorClasses.value,\n props.class,\n ]}\n style={[\n textColorStyles.value,\n props.style,\n ]}\n >\n { props.active && (\n messages.value.map((message, i) => (\n <div\n class=\"v-messages__message\"\n key={ `${i}-${messages.value}` }\n >\n { slots.message ? slots.message({ message }) : message }\n </div>\n ))\n )}\n </MaybeTransition>\n ))\n\n return {}\n },\n})\n\nexport type VMessages = InstanceType<typeof VMessages>\n", "// Styles\nimport './VInput.sass'\n\n// Components\nimport { useInputIcon } from '@/components/VInput/InputIcon'\nimport { VMessages } from '@/components/VMessages/VMessages'\n\n// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { IconValue } from '@/composables/icons'\nimport { useRtl } from '@/composables/locale'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { makeValidationProps, useValidation } from '@/composables/validation'\n\n// Utilities\nimport { computed, toRef, useId } from 'vue'\nimport { EventProp, genericComponent, pick, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { ComputedRef, PropType, Ref } from 'vue'\nimport type { VMessageSlot } from '@/components/VMessages/VMessages'\nimport type { GenericProps } from '@/util'\n\nexport interface VInputSlot {\n id: ComputedRef<string>\n messagesId: ComputedRef<string | undefined>\n isDirty: ComputedRef<boolean>\n isDisabled: ComputedRef<boolean>\n isReadonly: ComputedRef<boolean>\n isPristine: Ref<boolean>\n isValid: ComputedRef<boolean | null>\n isValidating: Ref<boolean>\n hasDetails: Ref<boolean>\n reset: () => void\n resetValidation: () => void\n validate: () => void\n}\n\nexport const makeVInputProps = propsFactory({\n id: String,\n appendIcon: IconValue,\n baseColor: String,\n centerAffix: {\n type: Boolean,\n default: true,\n },\n color: String,\n glow: Boolean,\n iconColor: [Boolean, String],\n prependIcon: IconValue,\n hideDetails: [Boolean, String] as PropType<boolean | 'auto'>,\n hideSpinButtons: Boolean,\n hint: String,\n persistentHint: Boolean,\n messages: {\n type: [Array, String] as PropType<string | Line truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAA;AASO,IAAMA,kBAAkBC,aAAa;EAC1CC,MAAMC;EAENC,SAASC,UAAwB;EAEjC,GAAGC,mBAAmB;EACtB,GAAGC,eAAe;AACpB,GAAG,QAAQ;AAEJ,IAAMC,SAASC,iBAAiB,EAAE;EACvCC,MAAM;EAENC,OAAOX,gBAAgB;EAEvBY,MAAOD,OAAKE,MAAa;AAAA,QAAX;MAAEC;IAAM,IAACD;AACrBE,cAAU,MAAAC,gBAAA,SAAA;MAAA,SAAAC,eAEC,CACL,WACA;QACE,sBAAsB,CAAC,CAACN,MAAMP;MAChC,GACAO,MAAMO,KAAK,CACZ;MAAA,SAAAC,eACOR,MAAMS,KAAK;MAAA,WACTT,MAAMP;IAAO,GAAA,CAErBO,MAAMT,MAENY,MAAMO,UAAU,CAAC,CAAA,CAEtB;AAED,WAAO,CAAC;EACV;AACF,CAAC;;;AC5CD,OAAA;AAyBO,IAAMC,qBAAqBC,aAAa;EAC7CC,QAAQC;EACRC,OAAOC;EACPC,UAAU;IACRC,MAAM,CAACC,OAAOH,MAAM;IACpBI,SAASA,MAAO,CAAA;EAClB;EAEA,GAAGC,mBAAmB;EACtB,GAAGC,oBAAoB;IACrBC,YAAY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MAAMT,QAAQmD,MAAMrC,EAAE,CAAC;AALine truncated
|
||||
"names": ["makeVLabelProps", "propsFactory", "text", "String", "onClick", "EventProp", "makeComponentProps", "makeThemeProps", "VLabel", "genericComponent", "name", "props", "setup", "_ref", "slots", "useRender", "_createElementVNode", "_normalizeClass", "class", "_normalizeStyle", "style", "default", "makeVMessagesProps", "propsFactory", "active", "Boolean", "color", "String", "messages", "type", "Array", "default", "makeComponentProps", "makeTransitionProps", "transition", "component", "VSlideYTransition", "leaveAbsolute", "group", "VMessages", "genericComponent", "name", "props", "setup", "_ref", "slots", "computed", "wrapInArray", "textColorClasses", "textColorStyles", "useTextColor", "useRender", "_createVNode", "MaybeTransition", "_normalizeClass", "value", "class", "_normalizeStyle", "style", "map", "message", "i", "_createElementVNode", "useInputIcon", "props", "t", "useLocale", "InputIcon", "_ref", "name", "color", "attrs", "localeKey", "prepend", "prependInner", "append", "appendInner", "clear", "listener", "onKeydown", "e", "key", "preventDefault", "stopPropagation", "callEvent", "PointerEvent", "label", "undefined", "_createVNode", "VIcon", "_mergeProps", "makeFocusProps", "propsFactory", "focused", "Boolean", "EventProp", "useFocus", "props", "name", "arguments", "length", "undefined", "getCurrentInstanceName", "isFocused", "useProxiedModel", "focusClasses", "toRef", "value", "focus", "blur", "RulesSymbol", "Symbol", "for", "useRules", "fn", "rules", "inject", "Error", "aliases", "resolve", "toRef", "makeValidationProps", "propsFactory", "disabled", "type", "Boolean", "default", "error", "errorMessages", "Array", "String", "maxErrors", "Number", "name", "label", "readonly", "rules", "modelValue", "validateOn", "validationValue", "makeFocusProps", "useValidation", "props", "arguments", "length", "undefined", "getCurrentInstanceName", "id", "useId", "model", "useProxiedModel", "validationModel", "computed", "value", "form", "useForm", "useRules", "internalErrorMessages", "ref", "isPristine", "shallowRef", "isDirty", "wrapInArray", "concat", "slice", "Math", "max", "set", "Set", "split", "input", "has", "blur", "invalidInput", "lazy", "eager", "isValid", "isValidating", "validationClasses", "isDisabled", "isReadonly", "vm", "getCurrentInstance", "uid", "unref", "onBeforeMount", "register", "validate", "reset", "resetValidation", "onBeforeUnmount", "unregister", "onMounted", "update", "useToggleScope", "watch", "focused", "unwatch", "val", "nextTick", "silent", "results", "rule", "handler", "result", "console", "warn", "push", "makeVInputProps", "propsFactory", "id", "String", "appendIcon", "IconValue", "baseColor", "centerAffix", "type", "Boolean", "default", "color", "glow", "iconColor", "prependIcon", "hideDetails", "hideSpinButtons", "hint", "persistentHint", "messages", "Array", "direction", "validator", "v", "includes", "EventProp", "makeComponentProps", "makeDensityProps", "pick", "makeDimensionProps", "makeThemeProps", "makeValidationProps", "VInput", "genericComponent", "name", "props", "emits", "value", "setup", "_ref", "attrs", "slots", "emit", "densityClasses", "useDensity", "dimensionStyles", "useDimension", "themeClasses", "provideTheme", "rtlClasses", "useRtl", "InputIcon", "useInputIcon", "uid", "useId", "computed", "errorMessages", "isDirty", "isDisabled", "isReadonly", "isPristine", "isValid", "isValidating", "reset", "resetValidation", "validate", "validationClasses", "useValidation", "length", "focused", "hasMessages", "toRef", "hasDetails", "details", "messagesId", "undefined", "slotProps", "error", "disabled", "useRender", "hasPrepend", "prepend", "hasAppend", "append", "_createElementVNode", "_normalizeClass", "class", "_normalizeStyle", "style", "_createVNode", "VMessages", "message"]
|
||||
}
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
import {
|
||||
IN_BROWSER,
|
||||
deepEqual,
|
||||
getCurrentInstance,
|
||||
hasEvent,
|
||||
propsFactory
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
computed,
|
||||
nextTick,
|
||||
onScopeDispose,
|
||||
reactive,
|
||||
resolveDynamicComponent,
|
||||
toRef
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/composables/router.js
|
||||
function useRoute() {
|
||||
const vm = getCurrentInstance("useRoute");
|
||||
return computed(() => vm?.proxy?.$route);
|
||||
}
|
||||
function useRouter() {
|
||||
return getCurrentInstance("useRouter")?.proxy?.$router;
|
||||
}
|
||||
function useLink(props, attrs) {
|
||||
const RouterLink = resolveDynamicComponent("RouterLink");
|
||||
const isLink = toRef(() => !!(props.href || props.to));
|
||||
const isClickable = computed(() => {
|
||||
return isLink?.value || hasEvent(attrs, "click") || hasEvent(props, "click");
|
||||
});
|
||||
if (typeof RouterLink === "string" || !("useLink" in RouterLink)) {
|
||||
const href2 = toRef(() => props.href);
|
||||
return {
|
||||
isLink,
|
||||
isRouterLink: toRef(() => false),
|
||||
isClickable,
|
||||
href: href2,
|
||||
linkProps: reactive({
|
||||
href: href2
|
||||
})
|
||||
};
|
||||
}
|
||||
const routerLink = RouterLink.useLink({
|
||||
to: toRef(() => props.to || ""),
|
||||
replace: toRef(() => props.replace)
|
||||
});
|
||||
const link = computed(() => props.to ? routerLink : void 0);
|
||||
const route = useRoute();
|
||||
const isActive = computed(() => {
|
||||
if (!link.value) return false;
|
||||
if (!props.exact) return link.value.isActive?.value ?? false;
|
||||
if (!route.value) return link.value.isExactActive?.value ?? false;
|
||||
return link.value.isExactActive?.value && deepEqual(link.value.route.value.query, route.value.query);
|
||||
});
|
||||
const href = computed(() => props.to ? link.value?.route.value.href : props.href);
|
||||
const isRouterLink = toRef(() => !!props.to);
|
||||
return {
|
||||
isLink,
|
||||
isRouterLink,
|
||||
isClickable,
|
||||
isActive,
|
||||
route: link.value?.route,
|
||||
navigate: link.value?.navigate,
|
||||
href,
|
||||
linkProps: reactive({
|
||||
href,
|
||||
"aria-current": toRef(() => isActive.value ? "page" : void 0),
|
||||
"aria-disabled": toRef(() => props.disabled && isLink.value ? "true" : void 0),
|
||||
tabindex: toRef(() => props.disabled && isLink.value ? "-1" : void 0)
|
||||
})
|
||||
};
|
||||
}
|
||||
var makeRouterProps = propsFactory({
|
||||
href: String,
|
||||
replace: Boolean,
|
||||
to: [String, Object],
|
||||
exact: Boolean
|
||||
}, "router");
|
||||
var inTransition = false;
|
||||
function useBackButton(router, cb) {
|
||||
let popped = false;
|
||||
let removeBefore;
|
||||
let removeAfter;
|
||||
if (IN_BROWSER && router?.beforeEach) {
|
||||
nextTick(() => {
|
||||
window.addEventListener("popstate", onPopstate);
|
||||
removeBefore = router.beforeEach((to, from, next) => {
|
||||
if (!inTransition) {
|
||||
setTimeout(() => popped ? cb(next) : next());
|
||||
} else {
|
||||
popped ? cb(next) : next();
|
||||
}
|
||||
inTransition = true;
|
||||
});
|
||||
removeAfter = router?.afterEach(() => {
|
||||
inTransition = false;
|
||||
});
|
||||
});
|
||||
onScopeDispose(() => {
|
||||
window.removeEventListener("popstate", onPopstate);
|
||||
removeBefore?.();
|
||||
removeAfter?.();
|
||||
});
|
||||
}
|
||||
function onPopstate(e) {
|
||||
if (e.state?.replaced) return;
|
||||
popped = true;
|
||||
setTimeout(() => popped = false);
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
useRouter,
|
||||
useLink,
|
||||
makeRouterProps,
|
||||
useBackButton
|
||||
};
|
||||
//# sourceMappingURL=chunk-573D4TYC.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/composables/router.tsx"],
|
||||
"sourcesContent": ["// Utilities\nimport {\n computed,\n nextTick,\n onScopeDispose, reactive,\n resolveDynamicComponent,\n toRef,\n} from 'vue'\nimport { deepEqual, getCurrentInstance, hasEvent, IN_BROWSER, propsFactory } from '@/util'\n\n// Types\nimport type { PropType, Ref, SetupContext } from 'vue'\nimport type {\n RouterLink as _RouterLink,\n useLink as _useLink,\n NavigationGuardNext,\n RouteLocationNormalizedLoaded,\n RouteLocationRaw,\n Router,\n} from 'vue-router'\nimport type { EventProp } from '@/util'\n\nexport function useRoute (): Ref<RouteLocationNormalizedLoaded | undefined> {\n const vm = getCurrentInstance('useRoute')\n\n return computed(() => vm?.proxy?.$route)\n}\n\nexport function useRouter (): Router | undefined {\n return getCurrentInstance('useRouter')?.proxy?.$router\n}\n\nexport interface LinkProps {\n href: string | undefined\n replace: boolean | undefined\n to: RouteLocationRaw | undefined\n exact: boolean | undefined\n disabled: boolean | undefined\n}\n\nexport interface LinkListeners {\n onClick?: EventProp | undefined\n onClickOnce?: EventProp | undefined\n}\n\nexport interface UseLink extends Omit<Partial<ReturnType<typeof _useLink>>, 'href'> {\n isLink: Readonly<Ref<boolean>>\n isRouterLink: Readonly<Ref<boolean>>\n isClickable: Readonly<Ref<boolean>>\n href: Ref<string | undefined>\n linkProps: Record<string, string | undefined>\n}\n\nexport function useLink (props: LinkProps & LinkListeners, attrs: SetupContext['attrs']): UseLink {\n const RouterLink = resolveDynamicComponent('RouterLink') as typeof _RouterLink | string\n\n const isLink = toRef(() => !!(props.href || props.to))\n const isClickable = computed(() => {\n return isLink?.value || hasEvent(attrs, 'click') || hasEvent(props, 'click')\n })\n\n if (typeof RouterLink === 'string' || !('useLink' in RouterLink)) {\n const href = toRef(() => props.href)\n return {\n isLink,\n isRouterLink: toRef(() => false),\n isClickable,\n href,\n linkProps: reactive({ href }),\n }\n }\n\n // vue-router useLink `to` prop needs to be reactive and useLink will crash if undefined\n const routerLink = RouterLink.useLink({\n to: toRef(() => props.to || ''),\n replace: toRef(() => props.replace),\n })\n // Actual link needs to be undefined when to prop is not used\n const link = computed(() => props.to ? routerLink : undefined)\n const route = useRoute()\n const isActive = computed(() => {\n if (!link.value) return false\n if (!props.exact) return link.value.isActive?.value ?? false\n if (!route.value) return link.value.isExactActive?.value ?? false\n\n return link.value.isExactActive?.value && deepEqual(link.value.route.value.query, route.value.query)\n })\n const href = computed(() => props.to ? link.value?.route.value.href : props.href)\n const isRouterLink = toRef(() => !!props.to)\n\n return {\n isLink,\n isRouterLink,\n isClickable,\n isActive,\n route: link.value?.route,\n navigate: link.value?.navigate,\n href,\n linkProps: reactive({\n href,\n 'aria-current': toRef(() => isActive.value ? 'page' : undefined),\n 'aria-disabled': toRef(() => props.disabled && isLink.value ? 'true' : undefined),\n tabindex: toRef(() => props.disabled && isLink.value ? '-1' : undefined),\n }),\n }\n}\n\nexport const makeRouterProps = propsFactory({\n href: String,\n replace: Boolean,\n to: [String, Object] as PropType<RouteLocationRaw>,\n exact: Boolean,\n}, 'router')\n\nlet inTransition = false\nexport function useBackButton (router: Router | undefined, cb: (next: NavigationGuardNext) => void) {\n let popped = false\n let removeBefore: (() => void) | undefined\n let removeAfter: (() => void) | undefined\n\n if (IN_BROWSER && router?.beforeEach) {\n nextTick(() => {\n window.addEventListener('popstate', onPopstate)\n removeBefore = router.beforeEach((to, from, next) => {\n if (!inTransition) {\n setTimeout(() => popped ? cb(next) : next())\n } else {\n popped ? cb(next) : next()\n }\n inTransition = true\n })\n removeAfter = router?.afterEach(() => {\n inTransition = false\n })\n })\n onScopeDispose(() => {\n window.removeEventListener('popstate', onPopstate)\n removeBefore?.()\n removeAfter?.()\n })\n }\n\n function onPopstate (e: PopStateEvent) {\n if (e.state?.replaced) return\n\n popped = true\n setTimeout(() => (popped = false))\n }\n}\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;AAsBO,SAASA,WAA4D;AAC1E,QAAMC,KAAKC,mBAAmB,UAAU;AAExC,SAAOC,SAAS,MAAMF,IAAIG,OAAOC,MAAM;AACzC;AAEO,SAASC,YAAiC;AAC/C,SAAOJ,mBAAmB,WAAW,GAAGE,OAAOG;AACjD;AAuBO,SAASC,QAASC,OAAkCC,OAAuC;AAChG,QAAMC,aAAaC,wBAAwB,YAAY;AAEvD,QAAMC,SAASC,MAAM,MAAM,CAAC,EAAEL,MAAMM,QAAQN,MAAMO,GAAG;AACrD,QAAMC,cAAcd,SAAS,MAAM;AACjC,WAAOU,QAAQK,SAASC,SAAST,OAAO,OAAO,KAAKS,SAASV,OAAO,OAAO;EAC7E,CAAC;AAED,MAAI,OAAOE,eAAe,YAAY,EAAE,aAAaA,aAAa;AAChE,UAAMI,QAAOD,MAAM,MAAML,MAAMM,IAAI;AACnC,WAAO;MACLF;MACAO,cAAcN,MAAM,MAAM,KAAK;MAC/BG;MACAF,MAAAA;MACAM,WAAWC,SAAS;QAAEP,MA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,eAAe;AACZ,SAASC,cAAeC,QAA4BC,IAAyC;AAClG,MAAIC,SAAS;AACb,MAAIC;AACJ,MAAIC;AAEJ,MAAIC,cAAcL,QAAQM,YAAY;AACpCC,aAAS,MAAM;AACbC,aAAOC,iBAAiB,YAAYC,UAAU;AAC9CP,qBAAeH,OAAOM,WAAW,CAACjC,IAAIsC,MAAMC,SAAS;AACnD,YAAI,CAACd,cAAc;AACjBe,qBAAW,MAAMX,SAASD,GAAGW,IAAI,IAAIA,KAAK,CAAC;QAC7C,OAAO;AACLV,mBAASD,GAAGW,IAAI,IAAIA,KAAK;QAC3B;AACAd,uBAAe;MACjB,CAAC;AACDM,oBAAcJ,QAAQc,UAAU,MAAM;AACpChB,uBAAe;MACjB,CAAC;IACH,CAAC;AACDiB,mBAAe,MAAM;AACnBP,aAAOQ,oBAAoB,YAAYN,UAAU;AACjDP,qBAAe;AACfC,oBAAc;IAChB,CAAC;EACH;AAEA,WAASM,WAAYO,GAAkB;AACrC,QAAIA,EAAEC,OAAOC,SAAU;AAEvBjB,aAAS;AACTW,eAAW,MAAOX,SAAS,KAAM;EACnC;AACF;",
|
||||
"names": ["useRoute", "vm", "getCurrentInstance", "computed", "proxy", "$route", "useRouter", "$router", "useLink", "props", "attrs", "RouterLink", "resolveDynamicComponent", "isLink", "toRef", "href", "to", "isClickable", "value", "hasEvent", "isRouterLink", "linkProps", "reactive", "routerLink", "replace", "link", "undefined", "route", "isActive", "exact", "isExactActive", "deepEqual", "query", "navigate", "disabled", "tabindex", "makeRouterProps", "propsFactory", "String", "Boolean", "Object", "inTransition", "useBackButton", "router", "cb", "popped", "removeBefore", "removeAfter", "IN_BROWSER", "beforeEach", "nextTick", "window", "addEventListener", "onPopstate", "from", "next", "setTimeout", "afterEach", "onScopeDispose", "removeEventListener", "e", "state", "replaced"]
|
||||
}
|
||||
+290
@@ -0,0 +1,290 @@
|
||||
import {
|
||||
isObject
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
|
||||
// node_modules/vuetify/lib/directives/ripple/index.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/directives/ripple/VRipple.css";
|
||||
var stopSymbol = /* @__PURE__ */ Symbol("rippleStop");
|
||||
var DELAY_RIPPLE = 80;
|
||||
function transform(el, value) {
|
||||
el.style.transform = value;
|
||||
el.style.webkitTransform = value;
|
||||
}
|
||||
function isTouchEvent(e) {
|
||||
return e.constructor.name === "TouchEvent";
|
||||
}
|
||||
function isKeyboardEvent(e) {
|
||||
return e.constructor.name === "KeyboardEvent";
|
||||
}
|
||||
var calculate = function(e, el) {
|
||||
let value = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
||||
let localX = 0;
|
||||
let localY = 0;
|
||||
if (!isKeyboardEvent(e)) {
|
||||
const offset = el.getBoundingClientRect();
|
||||
const target = isTouchEvent(e) ? e.touches[e.touches.length - 1] : e;
|
||||
localX = target.clientX - offset.left;
|
||||
localY = target.clientY - offset.top;
|
||||
}
|
||||
let radius = 0;
|
||||
let scale = 0.3;
|
||||
if (el._ripple?.circle) {
|
||||
scale = 0.15;
|
||||
radius = el.clientWidth / 2;
|
||||
radius = value.center ? radius : radius + Math.sqrt((localX - radius) ** 2 + (localY - radius) ** 2) / 4;
|
||||
} else {
|
||||
radius = Math.sqrt(el.clientWidth ** 2 + el.clientHeight ** 2) / 2;
|
||||
}
|
||||
const centerX = `${(el.clientWidth - radius * 2) / 2}px`;
|
||||
const centerY = `${(el.clientHeight - radius * 2) / 2}px`;
|
||||
const x = value.center ? centerX : `${localX - radius}px`;
|
||||
const y = value.center ? centerY : `${localY - radius}px`;
|
||||
return {
|
||||
radius,
|
||||
scale,
|
||||
x,
|
||||
y,
|
||||
centerX,
|
||||
centerY
|
||||
};
|
||||
};
|
||||
var ripples = {
|
||||
/* eslint-disable max-statements */
|
||||
show(e, el) {
|
||||
let value = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
||||
if (!el?._ripple?.enabled) {
|
||||
return;
|
||||
}
|
||||
const container = document.createElement("span");
|
||||
const animation = document.createElement("span");
|
||||
container.appendChild(animation);
|
||||
container.className = "v-ripple__container";
|
||||
if (value.class) {
|
||||
container.className += ` ${value.class}`;
|
||||
}
|
||||
const {
|
||||
radius,
|
||||
scale,
|
||||
x,
|
||||
y,
|
||||
centerX,
|
||||
centerY
|
||||
} = calculate(e, el, value);
|
||||
const size = `${radius * 2}px`;
|
||||
animation.className = "v-ripple__animation";
|
||||
animation.style.width = size;
|
||||
animation.style.height = size;
|
||||
el.appendChild(container);
|
||||
const computed = window.getComputedStyle(el);
|
||||
if (computed && computed.position === "static") {
|
||||
el.style.position = "relative";
|
||||
el.dataset.previousPosition = "static";
|
||||
}
|
||||
animation.classList.add("v-ripple__animation--enter");
|
||||
animation.classList.add("v-ripple__animation--visible");
|
||||
transform(animation, `translate(${x}, ${y}) scale3d(${scale},${scale},${scale})`);
|
||||
animation.dataset.activated = String(performance.now());
|
||||
requestAnimationFrame(() => {
|
||||
requestAnimationFrame(() => {
|
||||
animation.classList.remove("v-ripple__animation--enter");
|
||||
animation.classList.add("v-ripple__animation--in");
|
||||
transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`);
|
||||
});
|
||||
});
|
||||
},
|
||||
hide(el) {
|
||||
if (!el?._ripple?.enabled) return;
|
||||
const ripples2 = el.getElementsByClassName("v-ripple__animation");
|
||||
if (ripples2.length === 0) return;
|
||||
const animation = Array.from(ripples2).findLast((ripple) => !ripple.dataset.isHiding);
|
||||
if (!animation) return;
|
||||
else animation.dataset.isHiding = "true";
|
||||
const diff = performance.now() - Number(animation.dataset.activated);
|
||||
const delay = Math.max(250 - diff, 0);
|
||||
setTimeout(() => {
|
||||
animation.classList.remove("v-ripple__animation--in");
|
||||
animation.classList.add("v-ripple__animation--out");
|
||||
setTimeout(() => {
|
||||
const ripples3 = el.getElementsByClassName("v-ripple__animation");
|
||||
if (ripples3.length === 1 && el.dataset.previousPosition) {
|
||||
el.style.position = el.dataset.previousPosition;
|
||||
delete el.dataset.previousPosition;
|
||||
}
|
||||
if (animation.parentNode?.parentNode === el) el.removeChild(animation.parentNode);
|
||||
}, 300);
|
||||
}, delay);
|
||||
}
|
||||
};
|
||||
function isRippleEnabled(value) {
|
||||
return typeof value === "undefined" || !!value;
|
||||
}
|
||||
function rippleShow(e) {
|
||||
const value = {};
|
||||
const element = e.currentTarget;
|
||||
if (!element?._ripple || element._ripple.touched || e[stopSymbol]) return;
|
||||
e[stopSymbol] = true;
|
||||
if (isTouchEvent(e)) {
|
||||
element._ripple.touched = true;
|
||||
element._ripple.isTouch = true;
|
||||
} else {
|
||||
if (element._ripple.isTouch) return;
|
||||
}
|
||||
value.center = element._ripple.centered || isKeyboardEvent(e);
|
||||
if (element._ripple.class) {
|
||||
value.class = element._ripple.class;
|
||||
}
|
||||
if (isTouchEvent(e)) {
|
||||
if (element._ripple.showTimerCommit) return;
|
||||
element._ripple.showTimerCommit = () => {
|
||||
ripples.show(e, element, value);
|
||||
};
|
||||
element._ripple.showTimer = window.setTimeout(() => {
|
||||
if (element?._ripple?.showTimerCommit) {
|
||||
element._ripple.showTimerCommit();
|
||||
element._ripple.showTimerCommit = null;
|
||||
}
|
||||
}, DELAY_RIPPLE);
|
||||
} else {
|
||||
ripples.show(e, element, value);
|
||||
}
|
||||
}
|
||||
function rippleStop(e) {
|
||||
e[stopSymbol] = true;
|
||||
}
|
||||
function rippleHide(e) {
|
||||
const element = e.currentTarget;
|
||||
if (!element?._ripple) return;
|
||||
window.clearTimeout(element._ripple.showTimer);
|
||||
if (e.type === "touchend" && element._ripple.showTimerCommit) {
|
||||
element._ripple.showTimerCommit();
|
||||
element._ripple.showTimerCommit = null;
|
||||
element._ripple.showTimer = window.setTimeout(() => {
|
||||
rippleHide(e);
|
||||
});
|
||||
return;
|
||||
}
|
||||
window.setTimeout(() => {
|
||||
if (element._ripple) {
|
||||
element._ripple.touched = false;
|
||||
}
|
||||
});
|
||||
ripples.hide(element);
|
||||
}
|
||||
function rippleCancelShow(e) {
|
||||
const element = e.currentTarget;
|
||||
if (!element?._ripple) return;
|
||||
if (element._ripple.showTimerCommit) {
|
||||
element._ripple.showTimerCommit = null;
|
||||
}
|
||||
window.clearTimeout(element._ripple.showTimer);
|
||||
}
|
||||
var keyboardRipple = false;
|
||||
function keyboardRippleShow(e, keys) {
|
||||
if (!keyboardRipple && keys.includes(e.key)) {
|
||||
keyboardRipple = true;
|
||||
rippleShow(e);
|
||||
}
|
||||
}
|
||||
function keyboardRippleHide(e) {
|
||||
keyboardRipple = false;
|
||||
rippleHide(e);
|
||||
}
|
||||
function focusRippleHide(e) {
|
||||
if (keyboardRipple) {
|
||||
keyboardRipple = false;
|
||||
rippleHide(e);
|
||||
}
|
||||
}
|
||||
function updateRipple(el, binding, wasEnabled) {
|
||||
const {
|
||||
value,
|
||||
modifiers
|
||||
} = binding;
|
||||
const enabled = isRippleEnabled(value);
|
||||
if (!enabled) {
|
||||
ripples.hide(el);
|
||||
}
|
||||
el._ripple = el._ripple ?? {};
|
||||
el._ripple.enabled = enabled;
|
||||
el._ripple.centered = modifiers.center;
|
||||
el._ripple.circle = modifiers.circle;
|
||||
const bindingValue = isObject(value) ? value : {};
|
||||
if (bindingValue.class) {
|
||||
el._ripple.class = bindingValue.class;
|
||||
}
|
||||
const allowedKeys = bindingValue.keys ?? ["Enter", "Space"];
|
||||
el._ripple.keyDownHandler = (e) => keyboardRippleShow(e, allowedKeys);
|
||||
if (enabled && !wasEnabled) {
|
||||
if (modifiers.stop) {
|
||||
el.addEventListener("touchstart", rippleStop, {
|
||||
passive: true
|
||||
});
|
||||
el.addEventListener("mousedown", rippleStop);
|
||||
return;
|
||||
}
|
||||
el.addEventListener("touchstart", rippleShow, {
|
||||
passive: true
|
||||
});
|
||||
el.addEventListener("touchend", rippleHide, {
|
||||
passive: true
|
||||
});
|
||||
el.addEventListener("touchmove", rippleCancelShow, {
|
||||
passive: true
|
||||
});
|
||||
el.addEventListener("touchcancel", rippleHide);
|
||||
el.addEventListener("mousedown", rippleShow);
|
||||
el.addEventListener("mouseup", rippleHide);
|
||||
el.addEventListener("mouseleave", rippleHide);
|
||||
el.addEventListener("keydown", el._ripple.keyDownHandler);
|
||||
el.addEventListener("keyup", keyboardRippleHide);
|
||||
el.addEventListener("blur", focusRippleHide);
|
||||
el.addEventListener("dragstart", rippleHide, {
|
||||
passive: true
|
||||
});
|
||||
} else if (!enabled && wasEnabled) {
|
||||
removeListeners(el);
|
||||
}
|
||||
}
|
||||
function removeListeners(el) {
|
||||
el.removeEventListener("touchstart", rippleStop);
|
||||
el.removeEventListener("mousedown", rippleStop);
|
||||
el.removeEventListener("touchstart", rippleShow);
|
||||
el.removeEventListener("touchend", rippleHide);
|
||||
el.removeEventListener("touchmove", rippleCancelShow);
|
||||
el.removeEventListener("touchcancel", rippleHide);
|
||||
el.removeEventListener("mousedown", rippleShow);
|
||||
el.removeEventListener("mouseup", rippleHide);
|
||||
el.removeEventListener("mouseleave", rippleHide);
|
||||
if (el._ripple?.keyDownHandler) {
|
||||
el.removeEventListener("keydown", el._ripple.keyDownHandler);
|
||||
}
|
||||
el.removeEventListener("keyup", keyboardRippleHide);
|
||||
el.removeEventListener("blur", focusRippleHide);
|
||||
el.removeEventListener("dragstart", rippleHide);
|
||||
}
|
||||
function mounted(el, binding) {
|
||||
updateRipple(el, binding, false);
|
||||
}
|
||||
function unmounted(el) {
|
||||
removeListeners(el);
|
||||
delete el._ripple;
|
||||
}
|
||||
function updated(el, binding) {
|
||||
if (binding.value === binding.oldValue) {
|
||||
return;
|
||||
}
|
||||
const wasEnabled = isRippleEnabled(binding.oldValue);
|
||||
updateRipple(el, binding, wasEnabled);
|
||||
}
|
||||
var Ripple = {
|
||||
mounted,
|
||||
unmounted,
|
||||
updated
|
||||
};
|
||||
var ripple_default = Ripple;
|
||||
|
||||
export {
|
||||
Ripple,
|
||||
ripple_default
|
||||
};
|
||||
//# sourceMappingURL=chunk-5BPWKCNA.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/directives/ripple/index.ts"],
|
||||
"sourcesContent": ["// Styles\nimport './VRipple.sass'\n\n// Utilities\nimport { isObject } from '@/util'\n\n// Types\nimport type { DirectiveBinding } from 'vue'\n\nconst stopSymbol = Symbol('rippleStop')\n\ntype VuetifyRippleEvent = (MouseEvent | TouchEvent | KeyboardEvent) & { [stopSymbol]?: boolean }\n\nconst DELAY_RIPPLE = 80\n\nfunction transform (el: HTMLElement, value: string) {\n el.style.transform = value\n el.style.webkitTransform = value\n}\n\ninterface RippleOptions {\n class?: string\n center?: boolean\n circle?: boolean\n}\n\nexport interface RippleDirectiveBinding extends Omit<DirectiveBinding, 'modifiers' | 'value'> {\n value?: boolean | {\n class?: string\n keys?: string[]\n }\n modifiers: {\n center?: boolean\n circle?: boolean\n stop?: boolean\n }\n}\n\nfunction isTouchEvent (e: VuetifyRippleEvent): e is TouchEvent {\n return e.constructor.name === 'TouchEvent'\n}\n\nfunction isKeyboardEvent (e: VuetifyRippleEvent): e is KeyboardEvent {\n return e.constructor.name === 'KeyboardEvent'\n}\n\nconst calculate = (\n e: VuetifyRippleEvent,\n el: HTMLElement,\n value: RippleOptions = {}\n) => {\n let localX = 0\n let localY = 0\n\n if (!isKeyboardEvent(e)) {\n const offset = el.getBoundingClientRect()\n const target = isTouchEvent(e) ? e.touches[e.touches.length - 1] : e\n\n localX = target.clientX - offset.left\n localY = target.clientY - offset.top\n }\n\n let radius = 0\n let scale = 0.3\n if (el._ripple?.circle) {\n scale = 0.15\n radius = el.clientWidth / 2\n radius = value.center ? radius : radius + Math.sqrt((localX - radius) ** 2 + (localY - radius) ** 2) / 4\n } else {\n radius = Math.sqrt(el.clientWidth ** 2 + el.clientHeight ** 2) / 2\n }\n\n const centerX = `${(el.clientWidth - (radius * 2)) / 2}px`\n const centerY = `${(el.clientHeight - (radius * 2)) / 2}px`\n\n const x = value.center ? centerX : `${localX - radius}px`\n const y = value.center ? centerY : `${localY - radius}px`\n\n return { radius, scale, x, y, centerX, centerY }\n}\n\nconst ripples = {\n /* eslint-disable max-statements */\n show (\n e: VuetifyRippleEvent,\n el: HTMLElement,\n value: RippleOptions = {}\n ) {\n if (!el?._ripple?.enabled) {\n return\n }\n\n const container = document.createElement('span')\n const animation = document.createElement('span')\n\n container.appendChild(animation)\n container.className = 'v-ripple__container'\n\n if (value.class) {\n container.className += ` ${value.class}`\n }\n\n const { radius, scale, x, y, centerX, centerY } = calculate(e, el, value)\n\n const size = `${radius * 2}px`\n animation.className = 'v-ripple__animation'\n animation.style.width = size\n animation.style.height = size\n\n el.appendChild(container)\n\n const computed = window.getComputedStyle(el)\n if (computed && computed.position === 'static') {\n el.style.position = 'relative'\n el.dataset.previousPosition = 'static'\n }\n\n animation.classList.add('v-ripple__animation--enter')\n animation.classList.add('v-ripple__animation--visible')\n transform(animation, `translate(${x}, ${y}) scale3d(${scale},${scale},${scale})`)\n animation.dataset.activated = String(performance.now())\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n animation.classList.remove('v-ripple__animation--enter')\n animation.classList.add('v-ripple__animation--in')\n transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`)\n })\n })\n },\n\n hide (el: HTMLElement | null) {\n if (!el?._ripple?.enabled) return\n\n const ripples = el.getElementsByClassName('v-ripple__animation')\n\n if (ripples.length === 0) return\n const animation = Array.from(ripples).findLast(ripple => !ripple.dataset.isHiding)\n\n if (!animation) return\n else animation.dataset.isHiding = 'true'\n\n const diff = performance.now() - Number(animation.dataset.activated)\n const delay = Math.max(250 - diff, 0)\n\n setTimeout(() => {\n animation.classList.remove('v-ripple__animation--in')\n animation.classList.add('v-ripple__animation--out')\n\n setTimeout(() => {\n const ripples = el.getElementsByClassName('v-ripple__animation')\n if (ripples.length === 1 && el.dataset.previousPosition) {\n el.style.position = el.dataset.previousPosition\n delete el.dataset.previousPosition\n }\n\n if (animation.parentNode?.parentNode === el) el.removeChild(animation.parentNode)\n }, 300)\n }, delay)\n },\n}\n\nfunction isRippleEnabled (value: any) {\n return typeof value === 'undefined' || !!value\n}\n\nfunction rippleShow (e: VuetifyRippleEvent) {\n const value: RippleOptions = {}\n const element = e.currentTarget as HTMLElement | undefined\n\n if (!element?._ripple || element._ripple.touched || e[stopSymbol]) return\n\n // Don't allow the event to trigger riLine truncated
|
||||
"mappings": ";;;;;AACA,OAAA;AAQA,IAAMA,aAAaC,uBAAO,YAAY;AAItC,IAAMC,eAAe;AAErB,SAASC,UAAWC,IAAiBC,OAAe;AAClDD,KAAGE,MAAMH,YAAYE;AACrBD,KAAGE,MAAMC,kBAAkBF;AAC7B;AAoBA,SAASG,aAAcC,GAAwC;AAC7D,SAAOA,EAAEC,YAAYC,SAAS;AAChC;AAEA,SAASC,gBAAiBH,GAA2C;AACnE,SAAOA,EAAEC,YAAYC,SAAS;AAChC;AAEA,IAAME,YAAY,SAChBJ,GACAL,IAEG;AAAA,MADHC,QAAoBS,UAAAC,SAAA,KAAAD,UAAA,CAAA,MAAAE,SAAAF,UAAA,CAAA,IAAG,CAAC;AAExB,MAAIG,SAAS;AACb,MAAIC,SAAS;AAEb,MAAI,CAACN,gBAAgBH,CAAC,GAAG;AACvB,UAAMU,SAASf,GAAGgB,sBAAsB;AACxC,UAAMC,SAASb,aAAaC,CAAC,IAAIA,EAAEa,QAAQb,EAAEa,QAAQP,SAAS,CAAC,IAAIN;AAEnEQ,aAASI,OAAOE,UAAUJ,OAAOK;AACjCN,aAASG,OAAOI,UAAUN,OAAOO;EACnC;AAEA,MAAIC,SAAS;AACb,MAAIC,QAAQ;AACZ,MAAIxB,GAAGyB,SAASC,QAAQ;AACtBF,YAAQ;AACRD,aAASvB,GAAG2B,cAAc;AAC1BJ,aAAStB,MAAM2B,SAASL,SAASA,SAASM,KAAKC,MAAMjB,SAASU,WAAW,KAAKT,SAASS,WAAW,CAAC,IAAI;EACzG,OAAO;AACLA,aAASM,KAAKC,KAAK9B,GAAG2B,eA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"isTouchEvent", "e", "constructor", "name", "isKeyboardEvent", "calculate", "arguments", "length", "undefined", "localX", "localY", "offset", "getBoundingClientRect", "target", "touches", "clientX", "left", "clientY", "top", "radius", "scale", "_ripple", "circle", "clientWidth", "center", "Math", "sqrt", "clientHeight", "centerX", "centerY", "x", "y", "ripples", "show", "enabled", "container", "document", "createElement", "animation", "appendChild", "className", "class", "size", "width", "height", "computed", "window", "getComputedStyle", "position", "dataset", "previousPosition", "classList", "add", "activated", "String", "performance", "now", "requestAnimationFrame", "remove", "hide", "getElementsByClassName", "Array", "from", "findLast", "ripple", "isHiding", "diff", "Number", "delay", "max", "setTimeout", "parentNode", "removeChild", "isRippleEnabled", "rippleShow", "element", "currentTarget", "touched", "isTouch", "centered", "showTimerCommit", "showTimer", "rippleStop", "rippleHide", "clearTimeout", "type", "rippleCancelShow", "keyboardRipple", "keyboardRippleShow", "keys", "includes", "key", "keyboardRippleHide", "focusRippleHide", "updateRipple", "binding", "wasEnabled", "modifiers", "bindingValue", "isObject", "allowedKeys", "keyDownHandler", "stop", "addEventListener", "passive", "removeListeners", "removeEventListener", "mounted", "unmounted", "updated", "oldValue", "Ripple"]
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
import {
|
||||
createForm,
|
||||
makeFormProps
|
||||
} from "./chunk-GAYXO4FM.js";
|
||||
import {
|
||||
forwardRefs
|
||||
} from "./chunk-GUNW7S2L.js";
|
||||
import {
|
||||
genericComponent,
|
||||
makeComponentProps,
|
||||
propsFactory,
|
||||
useRender
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
createBaseVNode,
|
||||
normalizeClass,
|
||||
normalizeStyle,
|
||||
ref
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/VForm/VForm.js
|
||||
var makeVFormProps = propsFactory({
|
||||
...makeComponentProps(),
|
||||
...makeFormProps()
|
||||
}, "VForm");
|
||||
var VForm = genericComponent()({
|
||||
name: "VForm",
|
||||
props: makeVFormProps(),
|
||||
emits: {
|
||||
"update:modelValue": (val) => true,
|
||||
submit: (e) => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots,
|
||||
emit
|
||||
} = _ref;
|
||||
const form = createForm(props);
|
||||
const formRef = ref();
|
||||
function onReset(e) {
|
||||
e.preventDefault();
|
||||
form.reset();
|
||||
}
|
||||
function onSubmit(_e) {
|
||||
const e = _e;
|
||||
const ready = form.validate();
|
||||
e.then = ready.then.bind(ready);
|
||||
e.catch = ready.catch.bind(ready);
|
||||
e.finally = ready.finally.bind(ready);
|
||||
emit("submit", e);
|
||||
if (!e.defaultPrevented) {
|
||||
ready.then((_ref2) => {
|
||||
let {
|
||||
valid
|
||||
} = _ref2;
|
||||
if (valid) {
|
||||
formRef.value?.submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
e.preventDefault();
|
||||
}
|
||||
useRender(() => createBaseVNode("form", {
|
||||
"ref": formRef,
|
||||
"class": normalizeClass(["v-form", props.class]),
|
||||
"style": normalizeStyle(props.style),
|
||||
"novalidate": true,
|
||||
"onReset": onReset,
|
||||
"onSubmit": onSubmit
|
||||
}, [slots.default?.(form)]));
|
||||
return forwardRefs(form, formRef);
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
VForm
|
||||
};
|
||||
//# sourceMappingURL=chunk-5LZQZ6A5.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VForm/VForm.tsx"],
|
||||
"sourcesContent": ["// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { createForm, makeFormProps } from '@/composables/form'\nimport { forwardRefs } from '@/composables/forwardRefs'\n\n// Utilities\nimport { ref } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { SubmitEventPromise } from '@/composables/form'\n\nexport const makeVFormProps = propsFactory({\n ...makeComponentProps(),\n ...makeFormProps(),\n}, 'VForm')\n\ntype VFormSlots = {\n default: ReturnType<typeof createForm>\n}\n\nexport const VForm = genericComponent<VFormSlots>()({\n name: 'VForm',\n\n props: makeVFormProps(),\n\n emits: {\n 'update:modelValue': (val: boolean | null) => true,\n submit: (e: SubmitEventPromise) => true,\n },\n\n setup (props, { slots, emit }) {\n const form = createForm(props)\n const formRef = ref<HTMLFormElement>()\n\n function onReset (e: Event) {\n e.preventDefault()\n form.reset()\n }\n\n function onSubmit (_e: Event) {\n const e = _e as SubmitEventPromise\n\n const ready = form.validate()\n e.then = ready.then.bind(ready)\n e.catch = ready.catch.bind(ready)\n e.finally = ready.finally.bind(ready)\n\n emit('submit', e)\n\n if (!e.defaultPrevented) {\n ready.then(({ valid }) => {\n if (valid) {\n formRef.value?.submit()\n }\n })\n }\n\n e.preventDefault()\n }\n\n useRender(() => ((\n <form\n ref={ formRef }\n class={[\n 'v-form',\n props.class,\n ]}\n style={ props.style }\n novalidate\n onReset={ onReset }\n onSubmit={ onSubmit }\n >\n { slots.default?.(form) }\n </form>\n )))\n\n return forwardRefs(form, formRef)\n },\n})\n\nexport type VForm = InstanceType<typeof VForm>\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAYO,IAAMA,iBAAiBC,aAAa;EACzC,GAAGC,mBAAmB;EACtB,GAAGC,cAAc;AACnB,GAAG,OAAO;AAMH,IAAMC,QAAQC,iBAA6B,EAAE;EAClDC,MAAM;EAENC,OAAOP,eAAe;EAEtBQ,OAAO;IACL,qBAAsBC,SAAwB;IAC9CC,QAASC,OAA0B;EACrC;EAEAC,MAAOL,OAAKM,MAAmB;AAAA,QAAjB;MAAEC;MAAOC;IAAK,IAACF;AAC3B,UAAMG,OAAOC,WAAWV,KAAK;AAC7B,UAAMW,UAAUC,IAAqB;AAErC,aAASC,QAAST,GAAU;AAC1BA,QAAEU,eAAe;AACjBL,WAAKM,MAAM;IACb;AAEA,aAASC,SAAUC,IAAW;AAC5B,YAAMb,IAAIa;AAEV,YAAMC,QAAQT,KAAKU,SAAS;AAC5Bf,QAAEgB,OAAOF,MAAME,KAAKC,KAAKH,KAAK;AAC9Bd,QAAEkB,QAAQJ,MAAMI,MAAMD,KAAKH,KAAK;AAChCd,QAAEmB,UAAUL,MAAMK,QAAQF,KAAKH,KAAK;AAEpCV,WAAK,UAAUJ,CAAC;AAEhB,UAAI,CAACA,EAAEoB,kBAAkB;AACvBN,cAAME,KAAKK,WAAe;AAAA,cAAd;YAAEC;UAAM,IAACD;AACnB,cAAIC,OAAO;AACTf,oBAAQgB,OAAOxB,OAAO;UACxB;QACF,CAAC;MACH;AAEAC,QAAEU,eAAe;IACnB;AAEAc,cAAU,MAAAC,gBAAA,QAAA;MAAA,OAEAlB;MAAO,SAAAmB,eACN,CACL,UACA9B,MAAM+B,KAAK,CACZ;MAAA,SAAAC,eACOhC,MAAMiC,KAAK;MAAA,cAAA;MAAA,WAETpB;MAAO,YACNG;IAAQ,GAAA,CAEjBT,MAAM2B,UAAUzB,IAAI,CAAC,CAAA,CAEzB;AAEF,WAAO0B,YAAY1B,MAAME,OAAO;EAClC;AACF,CAAC;",
|
||||
"names": ["makeVFormProps", "propsFactory", "makeComponentProps", "makeFormProps", "VForm", "genericComponent", "name", "props", "emits", "val", "submit", "e", "setup", "_ref", "slots", "emit", "form", "createForm", "formRef", "ref", "onReset", "preventDefault", "reset", "onSubmit", "_e", "ready", "validate", "then", "bind", "catch", "finally", "defaultPrevented", "_ref2", "valid", "value", "useRender", "_createElementVNode", "_normalizeClass", "class", "_normalizeStyle", "style", "default", "forwardRefs"]
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
import {
|
||||
SUPPORTS_INTERSECTION
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
|
||||
// node_modules/vuetify/lib/directives/intersect/index.js
|
||||
function mounted(el, binding) {
|
||||
if (!SUPPORTS_INTERSECTION) return;
|
||||
const modifiers = binding.modifiers || {};
|
||||
const value = binding.value;
|
||||
const {
|
||||
handler,
|
||||
options
|
||||
} = typeof value === "object" ? value : {
|
||||
handler: value,
|
||||
options: {}
|
||||
};
|
||||
const observer = new IntersectionObserver(function() {
|
||||
let entries = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
||||
let observer2 = arguments.length > 1 ? arguments[1] : void 0;
|
||||
const _observe = el._observe?.[binding.instance.$.uid];
|
||||
if (!_observe) return;
|
||||
const isIntersecting = entries.some((entry) => entry.isIntersecting);
|
||||
if (handler && (!modifiers.quiet || _observe.init) && (!modifiers.once || isIntersecting || _observe.init)) {
|
||||
handler(isIntersecting, entries, observer2);
|
||||
}
|
||||
if (isIntersecting && modifiers.once) unmounted(el, binding);
|
||||
else _observe.init = true;
|
||||
}, options);
|
||||
el._observe = Object(el._observe);
|
||||
el._observe[binding.instance.$.uid] = {
|
||||
init: false,
|
||||
observer
|
||||
};
|
||||
observer.observe(el);
|
||||
}
|
||||
function unmounted(el, binding) {
|
||||
const observe = el._observe?.[binding.instance.$.uid];
|
||||
if (!observe) return;
|
||||
observe.observer.unobserve(el);
|
||||
delete el._observe[binding.instance.$.uid];
|
||||
}
|
||||
var Intersect = {
|
||||
mounted,
|
||||
unmounted
|
||||
};
|
||||
var intersect_default = Intersect;
|
||||
|
||||
export {
|
||||
Intersect,
|
||||
intersect_default
|
||||
};
|
||||
//# sourceMappingURL=chunk-5ONGSJQ2.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/directives/intersect/index.ts"],
|
||||
"sourcesContent": ["// Utilities\nimport { SUPPORTS_INTERSECTION } from '@/util'\n\n// Types\nimport type {\n DirectiveBinding,\n} from 'vue'\n\ntype ObserveHandler = (\n isIntersecting: boolean,\n entries: IntersectionObserverEntry[],\n observer: IntersectionObserver,\n) => void\n\nexport interface ObserveDirectiveBinding extends Omit<DirectiveBinding, 'modifiers' | 'value'> {\n value?: ObserveHandler | { handler: ObserveHandler, options?: IntersectionObserverInit }\n modifiers: {\n once?: boolean\n quiet?: boolean\n }\n}\n\nfunction mounted (el: HTMLElement, binding: ObserveDirectiveBinding) {\n if (!SUPPORTS_INTERSECTION) return\n\n const modifiers = binding.modifiers || {}\n const value = binding.value\n const { handler, options } = typeof value === 'object'\n ? value\n : { handler: value, options: {} }\n\n const observer = new IntersectionObserver((\n entries: IntersectionObserverEntry[] = [],\n observer: IntersectionObserver\n ) => {\n const _observe = el._observe?.[binding.instance!.$.uid]\n if (!_observe) return // Just in case, should never fire\n\n const isIntersecting = entries.some(entry => entry.isIntersecting)\n\n // If is not quiet or has already been\n // initted, invoke the user callback\n if (\n handler && (\n !modifiers.quiet ||\n _observe.init\n ) && (\n !modifiers.once ||\n isIntersecting ||\n _observe.init\n )\n ) {\n handler(isIntersecting, entries, observer)\n }\n\n if (isIntersecting && modifiers.once) unmounted(el, binding)\n else _observe.init = true\n }, options)\n\n el._observe = Object(el._observe)\n el._observe![binding.instance!.$.uid] = { init: false, observer }\n\n observer.observe(el)\n}\n\nfunction unmounted (el: HTMLElement, binding: ObserveDirectiveBinding) {\n const observe = el._observe?.[binding.instance!.$.uid]\n if (!observe) return\n\n observe.observer.unobserve(el)\n delete el._observe![binding.instance!.$.uid]\n}\n\nexport const Intersect = {\n mounted,\n unmounted,\n}\n\nexport default Intersect\n"],
|
||||
"mappings": ";;;;;AAsBA,SAASA,QAASC,IAAiBC,SAAkC;AACnE,MAAI,CAACC,sBAAuB;AAE5B,QAAMC,YAAYF,QAAQE,aAAa,CAAC;AACxC,QAAMC,QAAQH,QAAQG;AACtB,QAAM;IAAEC;IAASC;EAAQ,IAAI,OAAOF,UAAU,WAC1CA,QACA;IAAEC,SAASD;IAAOE,SAAS,CAAC;EAAE;AAElC,QAAMC,WAAW,IAAIC,qBAAqB,WAGrC;AAAA,QAFHC,UAAoCC,UAAAC,SAAA,KAAAD,UAAA,CAAA,MAAAE,SAAAF,UAAA,CAAA,IAAG,CAAA;AAAE,QACzCH,YAA8BG,UAAAC,SAAA,IAAAD,UAAA,CAAA,IAAAE;AAE9B,UAAMC,WAAWb,GAAGa,WAAWZ,QAAQa,SAAUC,EAAEC,GAAG;AACtD,QAAI,CAACH,SAAU;AAEf,UAAMI,iBAAiBR,QAAQS,KAAKC,WAASA,MAAMF,cAAc;AAIjE,QACEZ,YACE,CAACF,UAAUiB,SACXP,SAASQ,UAET,CAAClB,UAAUmB,QACXL,kBACAJ,SAASQ,OAEX;AACAhB,cAAQY,gBAAgBR,SAASF,SAAQ;IAC3C;AAEA,QAAIU,kBAAkBd,UAAUmB,KAAMC,WAAUvB,IAAIC,OAAO;QACtDY,UAASQ,OAAO;EACvB,GAAGf,OAAO;AAEVN,KAAGa,WAAWW,OAAOxB,GAAGa,QAAQ;AAChCb,KAAGa,SAAUZ,QAAQa,SAAUC,EAAEC,GAAG,IAAI;IAAEK,MAAM;IAAOd;EAAS;AAEhEA,WAASkB,QAAQzB,EAAE;AACrB;AAEA,SAASuB,UAAWvB,IAAiBC,SAAkC;AACrE,QAAMwB,UAAUzB,GAAGa,WAAWZ,QAAQa,SAAUC,EAAEC,GAAG;AACrD,MAAI,CAACS,QAAS;AAEdA,UAAQlB,SAASmB,UAAU1B,EAAE;AAC7B,SAAOA,GAAGa,SAAUZ,QAAQa,SAAUC,EAAEC,GAAG;AAC7C;AAEO,IAAMW,YAAY;EACvB5B;EACAwB;AACF;AAEA,IAAA,oBAAeI;",
|
||||
"names": ["mounted", "el", "binding", "SUPPORTS_INTERSECTION", "modifiers", "value", "handler", "options", "observer", "IntersectionObserver", "entries", "arguments", "length", "undefined", "_observe", "instance", "$", "uid", "isIntersecting", "some", "entry", "quiet", "init", "once", "unmounted", "Object", "observe", "unobserve", "Intersect"]
|
||||
}
|
||||
+387
@@ -0,0 +1,387 @@
|
||||
import {
|
||||
makeRoundedProps,
|
||||
useRounded
|
||||
} from "./chunk-AQK3CYVW.js";
|
||||
import {
|
||||
intersect_default
|
||||
} from "./chunk-5ONGSJQ2.js";
|
||||
import {
|
||||
MaybeTransition,
|
||||
makeTransitionProps
|
||||
} from "./chunk-CAGZXMOS.js";
|
||||
import {
|
||||
makeDimensionProps,
|
||||
useDimension
|
||||
} from "./chunk-6EZKHCRW.js";
|
||||
import {
|
||||
useBackgroundColor
|
||||
} from "./chunk-BHV5Z34M.js";
|
||||
import {
|
||||
SUPPORTS_INTERSECTION,
|
||||
convertToUnit,
|
||||
genericComponent,
|
||||
getCurrentInstance,
|
||||
makeComponentProps,
|
||||
propsFactory,
|
||||
useRender
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
Fragment,
|
||||
computed,
|
||||
createBaseVNode,
|
||||
createVNode,
|
||||
mergeProps,
|
||||
nextTick,
|
||||
normalizeClass,
|
||||
normalizeStyle,
|
||||
onBeforeMount,
|
||||
onBeforeUnmount,
|
||||
ref,
|
||||
shallowRef,
|
||||
toRef,
|
||||
vShow,
|
||||
watch,
|
||||
withDirectives
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/VImg/VImg.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VImg/VImg.css";
|
||||
|
||||
// node_modules/vuetify/lib/components/VResponsive/VResponsive.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VResponsive/VResponsive.css";
|
||||
function useAspectStyles(props) {
|
||||
return {
|
||||
aspectStyles: computed(() => {
|
||||
const ratio = Number(props.aspectRatio);
|
||||
return ratio ? {
|
||||
paddingBottom: String(1 / ratio * 100) + "%"
|
||||
} : void 0;
|
||||
})
|
||||
};
|
||||
}
|
||||
var makeVResponsiveProps = propsFactory({
|
||||
aspectRatio: [String, Number],
|
||||
contentClass: null,
|
||||
inline: Boolean,
|
||||
...makeComponentProps(),
|
||||
...makeDimensionProps()
|
||||
}, "VResponsive");
|
||||
var VResponsive = genericComponent()({
|
||||
name: "VResponsive",
|
||||
props: makeVResponsiveProps(),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
const {
|
||||
aspectStyles
|
||||
} = useAspectStyles(props);
|
||||
const {
|
||||
dimensionStyles
|
||||
} = useDimension(props);
|
||||
useRender(() => createBaseVNode("div", {
|
||||
"class": normalizeClass(["v-responsive", {
|
||||
"v-responsive--inline": props.inline
|
||||
}, props.class]),
|
||||
"style": normalizeStyle([dimensionStyles.value, props.style])
|
||||
}, [createBaseVNode("div", {
|
||||
"class": "v-responsive__sizer",
|
||||
"style": normalizeStyle(aspectStyles.value)
|
||||
}, null), slots.additional?.(), slots.default && createBaseVNode("div", {
|
||||
"class": normalizeClass(["v-responsive__content", props.contentClass])
|
||||
}, [slots.default()])]));
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/vuetify/lib/components/VImg/VImg.js
|
||||
var makeVImgProps = propsFactory({
|
||||
absolute: Boolean,
|
||||
alt: String,
|
||||
cover: Boolean,
|
||||
color: String,
|
||||
draggable: {
|
||||
type: [Boolean, String],
|
||||
default: void 0
|
||||
},
|
||||
eager: Boolean,
|
||||
gradient: String,
|
||||
lazySrc: String,
|
||||
options: {
|
||||
type: Object,
|
||||
// For more information on types, navigate to:
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API
|
||||
default: () => ({
|
||||
root: void 0,
|
||||
rootMargin: void 0,
|
||||
threshold: void 0
|
||||
})
|
||||
},
|
||||
sizes: String,
|
||||
src: {
|
||||
type: [String, Object],
|
||||
default: ""
|
||||
},
|
||||
crossorigin: String,
|
||||
referrerpolicy: String,
|
||||
srcset: String,
|
||||
position: String,
|
||||
...makeVResponsiveProps(),
|
||||
...makeComponentProps(),
|
||||
...makeRoundedProps(),
|
||||
...makeTransitionProps()
|
||||
}, "VImg");
|
||||
var VImg = genericComponent()({
|
||||
name: "VImg",
|
||||
directives: {
|
||||
vIntersect: intersect_default
|
||||
},
|
||||
props: makeVImgProps(),
|
||||
emits: {
|
||||
loadstart: (value) => true,
|
||||
load: (value) => true,
|
||||
error: (value) => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
emit,
|
||||
slots
|
||||
} = _ref;
|
||||
const {
|
||||
backgroundColorClasses,
|
||||
backgroundColorStyles
|
||||
} = useBackgroundColor(() => props.color);
|
||||
const {
|
||||
roundedClasses
|
||||
} = useRounded(props);
|
||||
const vm = getCurrentInstance("VImg");
|
||||
const currentSrc = shallowRef("");
|
||||
const image = ref();
|
||||
const state = shallowRef(props.eager ? "loading" : "idle");
|
||||
const naturalWidth = shallowRef();
|
||||
const naturalHeight = shallowRef();
|
||||
const normalisedSrc = computed(() => {
|
||||
return props.src && typeof props.src === "object" ? {
|
||||
src: props.src.src,
|
||||
srcset: props.srcset || props.src.srcset,
|
||||
lazySrc: props.lazySrc || props.src.lazySrc,
|
||||
aspect: Number(props.aspectRatio || props.src.aspect || 0)
|
||||
} : {
|
||||
src: props.src,
|
||||
srcset: props.srcset,
|
||||
lazySrc: props.lazySrc,
|
||||
aspect: Number(props.aspectRatio || 0)
|
||||
};
|
||||
});
|
||||
const aspectRatio = computed(() => {
|
||||
return normalisedSrc.value.aspect || naturalWidth.value / naturalHeight.value || 0;
|
||||
});
|
||||
watch(() => props.src, () => {
|
||||
init(state.value !== "idle");
|
||||
});
|
||||
watch(aspectRatio, (val, oldVal) => {
|
||||
if (!val && oldVal && image.value) {
|
||||
pollForSize(image.value);
|
||||
}
|
||||
});
|
||||
onBeforeMount(() => init());
|
||||
function init(isIntersecting) {
|
||||
if (props.eager && isIntersecting) return;
|
||||
if (SUPPORTS_INTERSECTION && !isIntersecting && !props.eager) return;
|
||||
state.value = "loading";
|
||||
if (normalisedSrc.value.lazySrc) {
|
||||
const lazyImg = new Image();
|
||||
lazyImg.src = normalisedSrc.value.lazySrc;
|
||||
pollForSize(lazyImg, null);
|
||||
}
|
||||
if (!normalisedSrc.value.src) return;
|
||||
nextTick(() => {
|
||||
emit("loadstart", image.value?.currentSrc || normalisedSrc.value.src);
|
||||
setTimeout(() => {
|
||||
if (vm.isUnmounted) return;
|
||||
if (image.value?.complete) {
|
||||
if (!image.value.naturalWidth) {
|
||||
onError();
|
||||
}
|
||||
if (state.value === "error") return;
|
||||
if (!aspectRatio.value) pollForSize(image.value, null);
|
||||
if (state.value === "loading") onLoad();
|
||||
} else {
|
||||
if (!aspectRatio.value) pollForSize(image.value);
|
||||
getSrc();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
function onLoad() {
|
||||
if (vm.isUnmounted) return;
|
||||
getSrc();
|
||||
pollForSize(image.value);
|
||||
state.value = "loaded";
|
||||
emit("load", image.value?.currentSrc || normalisedSrc.value.src);
|
||||
}
|
||||
function onError() {
|
||||
if (vm.isUnmounted) return;
|
||||
state.value = "error";
|
||||
emit("error", image.value?.currentSrc || normalisedSrc.value.src);
|
||||
}
|
||||
function getSrc() {
|
||||
const img = image.value;
|
||||
if (img) currentSrc.value = img.currentSrc || img.src;
|
||||
}
|
||||
let timer = -1;
|
||||
onBeforeUnmount(() => {
|
||||
clearTimeout(timer);
|
||||
});
|
||||
function pollForSize(img) {
|
||||
let timeout = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 100;
|
||||
const poll = () => {
|
||||
clearTimeout(timer);
|
||||
if (vm.isUnmounted) return;
|
||||
const {
|
||||
naturalHeight: imgHeight,
|
||||
naturalWidth: imgWidth
|
||||
} = img;
|
||||
if (imgHeight || imgWidth) {
|
||||
naturalWidth.value = imgWidth;
|
||||
naturalHeight.value = imgHeight;
|
||||
} else if (!img.complete && state.value === "loading" && timeout != null) {
|
||||
timer = window.setTimeout(poll, timeout);
|
||||
} else if (img.currentSrc.endsWith(".svg") || img.currentSrc.startsWith("data:image/svg+xml")) {
|
||||
naturalWidth.value = 1;
|
||||
naturalHeight.value = 1;
|
||||
}
|
||||
};
|
||||
poll();
|
||||
}
|
||||
const containClasses = toRef(() => ({
|
||||
"v-img__img--cover": props.cover,
|
||||
"v-img__img--contain": !props.cover
|
||||
}));
|
||||
const __image = () => {
|
||||
if (!normalisedSrc.value.src || state.value === "idle") return null;
|
||||
const img = createBaseVNode("img", {
|
||||
"class": normalizeClass(["v-img__img", containClasses.value]),
|
||||
"style": {
|
||||
objectPosition: props.position
|
||||
},
|
||||
"crossorigin": props.crossorigin,
|
||||
"src": normalisedSrc.value.src,
|
||||
"srcset": normalisedSrc.value.srcset,
|
||||
"alt": props.alt,
|
||||
"referrerpolicy": props.referrerpolicy,
|
||||
"draggable": props.draggable,
|
||||
"sizes": props.sizes,
|
||||
"ref": image,
|
||||
"onLoad": onLoad,
|
||||
"onError": onError
|
||||
}, null);
|
||||
const sources = slots.sources?.();
|
||||
return createVNode(MaybeTransition, {
|
||||
"transition": props.transition,
|
||||
"appear": true
|
||||
}, {
|
||||
default: () => [withDirectives(sources ? createBaseVNode("picture", {
|
||||
"class": "v-img__picture"
|
||||
}, [sources, img]) : img, [[vShow, state.value === "loaded"]])]
|
||||
});
|
||||
};
|
||||
const __preloadImage = () => createVNode(MaybeTransition, {
|
||||
"transition": props.transition
|
||||
}, {
|
||||
default: () => [normalisedSrc.value.lazySrc && state.value !== "loaded" && createBaseVNode("img", {
|
||||
"class": normalizeClass(["v-img__img", "v-img__img--preload", containClasses.value]),
|
||||
"style": {
|
||||
objectPosition: props.position
|
||||
},
|
||||
"crossorigin": props.crossorigin,
|
||||
"src": normalisedSrc.value.lazySrc,
|
||||
"alt": props.alt,
|
||||
"referrerpolicy": props.referrerpolicy,
|
||||
"draggable": props.draggable
|
||||
}, null)]
|
||||
});
|
||||
const __placeholder = () => {
|
||||
if (!slots.placeholder) return null;
|
||||
return createVNode(MaybeTransition, {
|
||||
"transition": props.transition,
|
||||
"appear": true
|
||||
}, {
|
||||
default: () => [(state.value === "loading" || state.value === "error" && !slots.error) && createBaseVNode("div", {
|
||||
"class": "v-img__placeholder"
|
||||
}, [slots.placeholder()])]
|
||||
});
|
||||
};
|
||||
const __error = () => {
|
||||
if (!slots.error) return null;
|
||||
return createVNode(MaybeTransition, {
|
||||
"transition": props.transition,
|
||||
"appear": true
|
||||
}, {
|
||||
default: () => [state.value === "error" && createBaseVNode("div", {
|
||||
"class": "v-img__error"
|
||||
}, [slots.error()])]
|
||||
});
|
||||
};
|
||||
const __gradient = () => {
|
||||
if (!props.gradient) return null;
|
||||
return createBaseVNode("div", {
|
||||
"class": "v-img__gradient",
|
||||
"style": {
|
||||
backgroundImage: `linear-gradient(${props.gradient})`
|
||||
}
|
||||
}, null);
|
||||
};
|
||||
const isBooted = shallowRef(false);
|
||||
{
|
||||
const stop = watch(aspectRatio, (val) => {
|
||||
if (val) {
|
||||
requestAnimationFrame(() => {
|
||||
requestAnimationFrame(() => {
|
||||
isBooted.value = true;
|
||||
});
|
||||
});
|
||||
stop();
|
||||
}
|
||||
});
|
||||
}
|
||||
useRender(() => {
|
||||
const responsiveProps = VResponsive.filterProps(props);
|
||||
return withDirectives(createVNode(VResponsive, mergeProps({
|
||||
"class": ["v-img", {
|
||||
"v-img--absolute": props.absolute,
|
||||
"v-img--booting": !isBooted.value
|
||||
}, backgroundColorClasses.value, roundedClasses.value, props.class],
|
||||
"style": [{
|
||||
width: convertToUnit(props.width === "auto" ? naturalWidth.value : props.width)
|
||||
}, backgroundColorStyles.value, props.style]
|
||||
}, responsiveProps, {
|
||||
"aspectRatio": aspectRatio.value,
|
||||
"aria-label": props.alt,
|
||||
"role": props.alt ? "img" : void 0
|
||||
}), {
|
||||
additional: () => createBaseVNode(Fragment, null, [createVNode(__image, null, null), createVNode(__preloadImage, null, null), createVNode(__gradient, null, null), createVNode(__placeholder, null, null), createVNode(__error, null, null)]),
|
||||
default: slots.default
|
||||
}), [[intersect_default, {
|
||||
handler: init,
|
||||
options: props.options
|
||||
}, null, {
|
||||
once: true
|
||||
}]]);
|
||||
});
|
||||
return {
|
||||
currentSrc,
|
||||
image,
|
||||
state,
|
||||
naturalWidth,
|
||||
naturalHeight
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
VResponsive,
|
||||
makeVImgProps,
|
||||
VImg
|
||||
};
|
||||
//# sourceMappingURL=chunk-6CRS5HI4.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VImg/VImg.tsx", "../../vuetify/src/components/VResponsive/VResponsive.tsx"],
|
||||
"sourcesContent": ["// Styles\nimport './VImg.sass'\n\n// Components\nimport { makeVResponsiveProps, VResponsive } from '@/components/VResponsive/VResponsive'\n\n// Composables\nimport { useBackgroundColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeTransitionProps, MaybeTransition } from '@/composables/transition'\n\n// Directives\nimport vIntersect from '@/directives/intersect'\n\n// Utilities\nimport {\n computed,\n nextTick,\n onBeforeMount,\n onBeforeUnmount,\n ref,\n shallowRef,\n toRef,\n vShow,\n watch,\n withDirectives,\n} from 'vue'\nimport {\n convertToUnit,\n genericComponent,\n getCurrentInstance,\n propsFactory,\n SUPPORTS_INTERSECTION,\n useRender,\n} from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\n// not intended for public use, this is passed in by vuetify-loader\nexport interface srcObject {\n src?: string\n srcset?: string\n lazySrc?: string\n aspect: number\n}\n\nexport type VImgSlots = {\n default: never\n placeholder: never\n error: never\n sources: never\n}\n\nexport const makeVImgProps = propsFactory({\n absolute: Boolean,\n alt: String,\n cover: Boolean,\n color: String,\n draggable: {\n type: [Boolean, String] as PropType<boolean | 'true' | 'false'>,\n default: undefined,\n },\n eager: Boolean,\n gradient: String,\n lazySrc: String,\n options: {\n type: Object as PropType<IntersectionObserverInit>,\n // For more information on types, navigate to:\n // https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API\n default: () => ({\n root: undefined,\n rootMargin: undefined,\n threshold: undefined,\n }),\n },\n sizes: String,\n src: {\n type: [String, Object] as PropType<string | srcObject>,\n default: '',\n },\n crossorigin: String as PropType<'' | 'anonymous' | 'use-credentials'>,\n referrerpolicy: String as PropType<\n | 'no-referrer'\n | 'no-referrer-when-downgrade'\n | 'origin'\n | 'origin-when-cross-origin'\n | 'same-origin'\n | 'strict-origin'\n | 'strict-origin-when-cross-origin'\n | 'unsafe-url'\n >,\n srcset: String,\n position: String,\n\n ...makeVResponsiveProps(),\n ...makeComponentProps(),\n ...makeRoundedProps(),\n ...makeTransitionProps(),\n}, 'VImg')\n\nexport const VImg = genericComponent<VImgSlots>()({\n name: 'VImg',\n\n directives: { vIntersect },\n\n props: makeVImgProps(),\n\n emits: {\n loadstart: (value: string | undefined) => true,\n load: (value: string | undefined) => true,\n error: (value: string | undefined) => true,\n },\n\n setup (props, { emit, slots }) {\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(() => props.color)\n const { roundedClasses } = useRounded(props)\n const vm = getCurrentInstance('VImg')\n\n const currentSrc = shallowRef('') // Set from srcset\n const image = ref<HTMLImageElement>()\n const state = shallowRef<'idle' | 'loading' | 'loaded' | 'error'>(props.eager ? 'loading' : 'idle')\n const naturalWidth = shallowRef<number>()\n const naturalHeight = shallowRef<number>()\n\n const normalisedSrc = computed<srcObject>(() => {\n return props.src && typeof props.src === 'object'\n ? {\n src: props.src.src,\n srcset: props.srcset || props.src.srcset,\n lazySrc: props.lazySrc || props.src.lazySrc,\n aspect: Number(props.aspectRatio || props.src.aspect || 0),\n } : {\n src: props.src,\n srcset: props.srcset,\n lazySrc: props.lazySrc,\n aspect: Number(props.aspectRatio || 0),\n }\n })\n const aspectRatio = computed(() => {\n return normalisedSrc.value.aspect || naturalWidth.value! / naturalHeight.value! || 0\n })\n\n watch(() => props.src, () => {\n init(state.value !== 'idle')\n })\n watch(aspectRatio, (val, oldVal) => {\n if (!val && oldVal && image.value) {\n pollForSize(image.value)\n }\n })\n\n // TODO: getSrc when window width changes\n\n onBeforeMount(() => init())\n\n function init (isIntersecting?: boolean) {\n if (props.eager && isIntersecting) return\n if (\n SUPPORTS_INTERSECTION &&\n !isIntersecting &&\n !props.eager\n ) return\n\n state.value = 'loading'\n\n if (normalisedSrc.value.lazySrc) {\n const lazyImg = new Image()\n lazyImg.src = normalisedSrc.value.lazySrc\n pollForSize(lazyImg, null)\n }\n\n if (!normalisedSrc.value.src) return\n\n nextTick(() => {\n emit('loadstart', image.value?.currentSrc || normalisedSrc.value.src)\n\n setTimeout(() => {\n if (vm.isUnmounted) return\n\n if (image.value?.complete) {\n if (!image.value.naturalWidth) {\n onError()\n }\n\n if (stLine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAA;;;ACAA,OAAA;AAeO,SAASA,gBAAiBC,OAA0C;AACzE,SAAO;IACLC,cAAcC,SAAS,MAAM;AAC3B,YAAMC,QAAQC,OAAOJ,MAAMK,WAAW;AAEtC,aAAOF,QACH;QAAEG,eAAeC,OAAO,IAAIJ,QAAQ,GAAG,IAAI;MAAI,IAC/CK;IACN,CAAC;EACH;AACF;AAEO,IAAMC,uBAAuBC,aAAa;EAC/CL,aAAa,CAACE,QAAQH,MAAM;EAC5BO,cAAc;EACdC,QAAQC;EAER,GAAGC,mBAAmB;EACtB,GAAGC,mBAAmB;AACxB,GAAG,aAAa;AAET,IAAMC,cAAcC,iBAAmC,EAAE;EAC9DC,MAAM;EAENlB,OAAOS,qBAAqB;EAE5BU,MAAOnB,OAAKoB,MAAa;AAAA,QAAX;MAAEC;IAAM,IAACD;AACrB,UAAM;MAAEnB;IAAa,IAAIF,gBAAgBC,KAAK;AAC9C,UAAM;MAAEsB;IAAgB,IAAIC,aAAavB,KAAK;AAE9CwB,cAAU,MAAAC,gBAAA,OAAA;MAAA,SAAAC,eAEC,CACL,gBACA;QAAE,wBAAwB1B,MAAMY;MAAO,GACvCZ,MAAM2B,KAAK,CACZ;MAAA,SAAAC,eACM,CACLN,gBAAgBO,OAChB7B,MAAM8B,KAAK,CACZ;IAAA,GAAA,CAAAL,gBAAA,OAAA;MAAA,SAAA;MAAA,SAAAG,e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Styles", "computed", "ratio", "Number", "aspectRatio", "paddingBottom", "String", "undefined", "makeVResponsiveProps", "propsFactory", "contentClass", "inline", "Boolean", "makeComponentProps", "makeDimensionProps", "VResponsive", "genericComponent", "name", "setup", "_ref", "slots", "dimensionStyles", "useDimension", "useRender", "_createElementVNode", "_normalizeClass", "class", "_normalizeStyle", "value", "style", "additional", "default", "makeVImgProps", "propsFactory", "absolute", "Boolean", "alt", "String", "cover", "color", "draggable", "type", "default", "undefined", "eager", "gradient", "lazySrc", "options", "Object", "root", "rootMargin", "threshold", "sizes", "src", "crossorigin", "referrerpolicy", "srcset", "position", "makeVResponsiveProps", "makeComponentProps", "makeRoundedProps", "makeTransitionProps", "VImg", "genericComponent", "name", "directives", "vIntersect", "props", "emits", "loadstart", "value", "load", "error", "setup", "_ref", "emit", "slots", "backgroundColorClasses", "backgroundColorStyles", "useBackgroundColor", "roundedClasses", "useRounded", "vm", "getCurrentInstance", "currentSrc", "shallowRef", "image", "ref", "state", "naturalWidth", "naturalHeight", "normalisedSrc", "computed", "aspect", "Number", "aspectRatio", "watch", "init", "val", "oldVal", "pollForSize", "onBeforeMount", "isIntersecting", "SUPPORTS_INTERSECTION", "lazyImg", "Image", "nextTick", "setTimeout", "isUnmounted", "complete", "onError", "onLoad", "getSrc", "img", "timer", "onBeforeUnmount", "clearTimeout", "timeout", "arguments", "length", "poll", "imgHeight", "imgWidth", "window", "endsWith", "startsWith", "containClasses", "toRef", "__image", "_createElementVNode", "_normalizeClass", "objectPosition", "sources", "_createVNode", "MaybeTransition", "transition", "withDirectives", "vShow", "__preloadImage", "__placeholder", "placeholder", "__error", "__gradient", "backgroundImage", "isBooted", "stop", "requestAnimationFrame", "useRender", "responsiveProps", "VResponsive", "filterProps", "_withDirectives", "_mergeProps", "class", "width", "convertToUnit", "style", "additional", "_Fragment", "handler", "once"]
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
import {
|
||||
convertToUnit,
|
||||
propsFactory
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
computed
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/composables/dimensions.js
|
||||
var makeDimensionProps = propsFactory({
|
||||
height: [Number, String],
|
||||
maxHeight: [Number, String],
|
||||
maxWidth: [Number, String],
|
||||
minHeight: [Number, String],
|
||||
minWidth: [Number, String],
|
||||
width: [Number, String]
|
||||
}, "dimension");
|
||||
function useDimension(props) {
|
||||
const dimensionStyles = computed(() => {
|
||||
const styles = {};
|
||||
const height = convertToUnit(props.height);
|
||||
const maxHeight = convertToUnit(props.maxHeight);
|
||||
const maxWidth = convertToUnit(props.maxWidth);
|
||||
const minHeight = convertToUnit(props.minHeight);
|
||||
const minWidth = convertToUnit(props.minWidth);
|
||||
const width = convertToUnit(props.width);
|
||||
if (height != null) styles.height = height;
|
||||
if (maxHeight != null) styles.maxHeight = maxHeight;
|
||||
if (maxWidth != null) styles.maxWidth = maxWidth;
|
||||
if (minHeight != null) styles.minHeight = minHeight;
|
||||
if (minWidth != null) styles.minWidth = minWidth;
|
||||
if (width != null) styles.width = width;
|
||||
return styles;
|
||||
});
|
||||
return {
|
||||
dimensionStyles
|
||||
};
|
||||
}
|
||||
|
||||
export {
|
||||
makeDimensionProps,
|
||||
useDimension
|
||||
};
|
||||
//# sourceMappingURL=chunk-6EZKHCRW.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/composables/dimensions.ts"],
|
||||
"sourcesContent": ["// Utilities\nimport { computed } from 'vue'\nimport { convertToUnit, propsFactory } from '@/util'\n\n// Types\nexport interface DimensionProps {\n height?: number | string\n maxHeight?: number | string\n maxWidth?: number | string\n minHeight?: number | string\n minWidth?: number | string\n width?: number | string\n}\n\n// Composables\nexport const makeDimensionProps = propsFactory({\n height: [Number, String],\n maxHeight: [Number, String],\n maxWidth: [Number, String],\n minHeight: [Number, String],\n minWidth: [Number, String],\n width: [Number, String],\n}, 'dimension')\n\nexport function useDimension (props: DimensionProps) {\n const dimensionStyles = computed(() => {\n const styles: Record<string, any> = {}\n\n const height = convertToUnit(props.height)\n const maxHeight = convertToUnit(props.maxHeight)\n const maxWidth = convertToUnit(props.maxWidth)\n const minHeight = convertToUnit(props.minHeight)\n const minWidth = convertToUnit(props.minWidth)\n const width = convertToUnit(props.width)\n\n if (height != null) styles.height = height\n if (maxHeight != null) styles.maxHeight = maxHeight\n if (maxWidth != null) styles.maxWidth = maxWidth\n if (minHeight != null) styles.minHeight = minHeight\n if (minWidth != null) styles.minWidth = minWidth\n if (width != null) styles.width = width\n\n return styles\n })\n\n return { dimensionStyles }\n}\n"],
|
||||
"mappings": ";;;;;;;;;AAeO,IAAMA,qBAAqBC,aAAa;EAC7CC,QAAQ,CAACC,QAAQC,MAAM;EACvBC,WAAW,CAACF,QAAQC,MAAM;EAC1BE,UAAU,CAACH,QAAQC,MAAM;EACzBG,WAAW,CAACJ,QAAQC,MAAM;EAC1BI,UAAU,CAACL,QAAQC,MAAM;EACzBK,OAAO,CAACN,QAAQC,MAAM;AACxB,GAAG,WAAW;AAEP,SAASM,aAAcC,OAAuB;AACnD,QAAMC,kBAAkBC,SAAS,MAAM;AACrC,UAAMC,SAA8B,CAAC;AAErC,UAAMZ,SAASa,cAAcJ,MAAMT,MAAM;AACzC,UAAMG,YAAYU,cAAcJ,MAAMN,SAAS;AAC/C,UAAMC,WAAWS,cAAcJ,MAAML,QAAQ;AAC7C,UAAMC,YAAYQ,cAAcJ,MAAMJ,SAAS;AAC/C,UAAMC,WAAWO,cAAcJ,MAAMH,QAAQ;AAC7C,UAAMC,QAAQM,cAAcJ,MAAMF,KAAK;AAEvC,QAAIP,UAAU,KAAMY,QAAOZ,SAASA;AACpC,QAAIG,aAAa,KAAMS,QAAOT,YAAYA;AAC1C,QAAIC,YAAY,KAAMQ,QAAOR,WAAWA;AACxC,QAAIC,aAAa,KAAMO,QAAOP,YAAYA;AAC1C,QAAIC,YAAY,KAAMM,QAAON,WAAWA;AACxC,QAAIC,SAAS,KAAMK,QAAOL,QAAQA;AAElC,WAAOK;EACT,CAAC;AAED,SAAO;IAAEF;EAAgB;AAC3B;",
|
||||
"names": ["makeDimensionProps", "propsFactory", "height", "Number", "String", "maxHeight", "maxWidth", "minHeight", "minWidth", "width", "useDimension", "props", "dimensionStyles", "computed", "styles", "convertToUnit"]
|
||||
}
|
||||
+257
@@ -0,0 +1,257 @@
|
||||
import {
|
||||
VOverlay,
|
||||
makeVOverlayProps
|
||||
} from "./chunk-TS6Y6OVT.js";
|
||||
import {
|
||||
useScopeId
|
||||
} from "./chunk-BVUPSGRF.js";
|
||||
import {
|
||||
forwardRefs
|
||||
} from "./chunk-GUNW7S2L.js";
|
||||
import {
|
||||
useProxiedModel
|
||||
} from "./chunk-KA77II4V.js";
|
||||
import {
|
||||
genericComponent,
|
||||
keys,
|
||||
omit,
|
||||
propsFactory,
|
||||
useRender
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
computed,
|
||||
createVNode,
|
||||
mergeProps,
|
||||
ref,
|
||||
toRef,
|
||||
useId
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/directives/resize/index.js
|
||||
function mounted(el, binding) {
|
||||
const handler = binding.value;
|
||||
const options = {
|
||||
passive: !binding.modifiers?.active
|
||||
};
|
||||
window.addEventListener("resize", handler, options);
|
||||
el._onResize = Object(el._onResize);
|
||||
el._onResize[binding.instance.$.uid] = {
|
||||
handler,
|
||||
options
|
||||
};
|
||||
if (!binding.modifiers?.quiet) {
|
||||
handler();
|
||||
}
|
||||
}
|
||||
function unmounted(el, binding) {
|
||||
if (!el._onResize?.[binding.instance.$.uid]) return;
|
||||
const {
|
||||
handler,
|
||||
options
|
||||
} = el._onResize[binding.instance.$.uid];
|
||||
window.removeEventListener("resize", handler, options);
|
||||
delete el._onResize[binding.instance.$.uid];
|
||||
}
|
||||
var Resize = {
|
||||
mounted,
|
||||
unmounted
|
||||
};
|
||||
var resize_default = Resize;
|
||||
|
||||
// node_modules/vuetify/lib/directives/touch/index.js
|
||||
var handleGesture = (wrapper) => {
|
||||
const {
|
||||
touchstartX,
|
||||
touchendX,
|
||||
touchstartY,
|
||||
touchendY
|
||||
} = wrapper;
|
||||
const dirRatio = 0.5;
|
||||
const minDistance = 16;
|
||||
wrapper.offsetX = touchendX - touchstartX;
|
||||
wrapper.offsetY = touchendY - touchstartY;
|
||||
if (Math.abs(wrapper.offsetY) < dirRatio * Math.abs(wrapper.offsetX)) {
|
||||
wrapper.left && touchendX < touchstartX - minDistance && wrapper.left(wrapper);
|
||||
wrapper.right && touchendX > touchstartX + minDistance && wrapper.right(wrapper);
|
||||
}
|
||||
if (Math.abs(wrapper.offsetX) < dirRatio * Math.abs(wrapper.offsetY)) {
|
||||
wrapper.up && touchendY < touchstartY - minDistance && wrapper.up(wrapper);
|
||||
wrapper.down && touchendY > touchstartY + minDistance && wrapper.down(wrapper);
|
||||
}
|
||||
};
|
||||
function touchstart(event, wrapper) {
|
||||
const touch = event.changedTouches[0];
|
||||
wrapper.touchstartX = touch.clientX;
|
||||
wrapper.touchstartY = touch.clientY;
|
||||
wrapper.start?.({
|
||||
originalEvent: event,
|
||||
...wrapper
|
||||
});
|
||||
}
|
||||
function touchend(event, wrapper) {
|
||||
const touch = event.changedTouches[0];
|
||||
wrapper.touchendX = touch.clientX;
|
||||
wrapper.touchendY = touch.clientY;
|
||||
wrapper.end?.({
|
||||
originalEvent: event,
|
||||
...wrapper
|
||||
});
|
||||
handleGesture(wrapper);
|
||||
}
|
||||
function touchmove(event, wrapper) {
|
||||
const touch = event.changedTouches[0];
|
||||
wrapper.touchmoveX = touch.clientX;
|
||||
wrapper.touchmoveY = touch.clientY;
|
||||
wrapper.move?.({
|
||||
originalEvent: event,
|
||||
...wrapper
|
||||
});
|
||||
}
|
||||
function createHandlers() {
|
||||
let value = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
||||
const wrapper = {
|
||||
touchstartX: 0,
|
||||
touchstartY: 0,
|
||||
touchendX: 0,
|
||||
touchendY: 0,
|
||||
touchmoveX: 0,
|
||||
touchmoveY: 0,
|
||||
offsetX: 0,
|
||||
offsetY: 0,
|
||||
left: value.left,
|
||||
right: value.right,
|
||||
up: value.up,
|
||||
down: value.down,
|
||||
start: value.start,
|
||||
move: value.move,
|
||||
end: value.end
|
||||
};
|
||||
return {
|
||||
touchstart: (e) => touchstart(e, wrapper),
|
||||
touchend: (e) => touchend(e, wrapper),
|
||||
touchmove: (e) => touchmove(e, wrapper)
|
||||
};
|
||||
}
|
||||
function mounted2(el, binding) {
|
||||
const value = binding.value;
|
||||
const target = value?.parent ? el.parentElement : el;
|
||||
const options = value?.options ?? {
|
||||
passive: true
|
||||
};
|
||||
const uid = binding.instance?.$.uid;
|
||||
if (!target || uid === void 0) return;
|
||||
const handlers = createHandlers(binding.value);
|
||||
target._touchHandlers = target._touchHandlers ?? /* @__PURE__ */ Object.create(null);
|
||||
target._touchHandlers[uid] = handlers;
|
||||
keys(handlers).forEach((eventName) => {
|
||||
target.addEventListener(eventName, handlers[eventName], options);
|
||||
});
|
||||
}
|
||||
function unmounted2(el, binding) {
|
||||
const target = binding.value?.parent ? el.parentElement : el;
|
||||
const uid = binding.instance?.$.uid;
|
||||
if (!target?._touchHandlers || uid === void 0) return;
|
||||
const handlers = target._touchHandlers[uid];
|
||||
keys(handlers).forEach((eventName) => {
|
||||
target.removeEventListener(eventName, handlers[eventName]);
|
||||
});
|
||||
delete target._touchHandlers[uid];
|
||||
}
|
||||
var Touch = {
|
||||
mounted: mounted2,
|
||||
unmounted: unmounted2
|
||||
};
|
||||
var touch_default = Touch;
|
||||
|
||||
// node_modules/vuetify/lib/components/VTooltip/VTooltip.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VTooltip/VTooltip.css";
|
||||
var makeVTooltipProps = propsFactory({
|
||||
id: String,
|
||||
interactive: Boolean,
|
||||
text: String,
|
||||
...omit(makeVOverlayProps({
|
||||
closeOnBack: false,
|
||||
location: "end",
|
||||
locationStrategy: "connected",
|
||||
eager: true,
|
||||
minWidth: 0,
|
||||
offset: 10,
|
||||
openOnClick: false,
|
||||
openOnHover: true,
|
||||
origin: "auto",
|
||||
scrim: false,
|
||||
scrollStrategy: "reposition",
|
||||
transition: null
|
||||
}), ["absolute", "retainFocus", "captureFocus", "disableInitialFocus"])
|
||||
}, "VTooltip");
|
||||
var VTooltip = genericComponent()({
|
||||
name: "VTooltip",
|
||||
props: makeVTooltipProps(),
|
||||
emits: {
|
||||
"update:modelValue": (value) => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
const isActive = useProxiedModel(props, "modelValue");
|
||||
const {
|
||||
scopeId
|
||||
} = useScopeId();
|
||||
const uid = useId();
|
||||
const id = toRef(() => props.id || `v-tooltip-${uid}`);
|
||||
const overlay = ref();
|
||||
const location = computed(() => {
|
||||
return props.location.split(" ").length > 1 ? props.location : props.location + " center";
|
||||
});
|
||||
const origin = computed(() => {
|
||||
return props.origin === "auto" || props.origin === "overlap" || props.origin.split(" ").length > 1 || props.location.split(" ").length > 1 ? props.origin : props.origin + " center";
|
||||
});
|
||||
const transition = toRef(() => {
|
||||
if (props.transition != null) return props.transition;
|
||||
return isActive.value ? "scale-transition" : "fade-transition";
|
||||
});
|
||||
const activatorProps = computed(() => mergeProps({
|
||||
"aria-describedby": id.value
|
||||
}, props.activatorProps));
|
||||
useRender(() => {
|
||||
const overlayProps = VOverlay.filterProps(props);
|
||||
return createVNode(VOverlay, mergeProps({
|
||||
"ref": overlay,
|
||||
"class": ["v-tooltip", {
|
||||
"v-tooltip--interactive": props.interactive
|
||||
}, props.class],
|
||||
"style": props.style,
|
||||
"id": id.value
|
||||
}, overlayProps, {
|
||||
"modelValue": isActive.value,
|
||||
"onUpdate:modelValue": ($event) => isActive.value = $event,
|
||||
"transition": transition.value,
|
||||
"absolute": true,
|
||||
"location": location.value,
|
||||
"origin": origin.value,
|
||||
"role": "tooltip",
|
||||
"activatorProps": activatorProps.value,
|
||||
"_disableGlobalStack": true
|
||||
}, scopeId), {
|
||||
activator: slots.activator,
|
||||
default: function() {
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
return slots.default?.(...args) ?? props.text;
|
||||
}
|
||||
});
|
||||
});
|
||||
return forwardRefs({}, overlay);
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
Resize,
|
||||
resize_default,
|
||||
Touch,
|
||||
touch_default,
|
||||
VTooltip
|
||||
};
|
||||
//# sourceMappingURL=chunk-6VKWM6MN.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/directives/resize/index.ts", "../../vuetify/src/directives/touch/index.ts", "../../vuetify/src/components/VTooltip/VTooltip.tsx"],
|
||||
"sourcesContent": ["// Types\nimport type { DirectiveBinding } from 'vue'\n\ninterface ResizeDirectiveBinding extends Omit<DirectiveBinding, 'modifiers'> {\n value: () => void\n modifiers?: {\n active?: boolean\n quiet?: boolean\n }\n}\n\nfunction mounted (el: HTMLElement, binding: ResizeDirectiveBinding) {\n const handler = binding.value\n const options: AddEventListenerOptions = {\n passive: !binding.modifiers?.active,\n }\n\n window.addEventListener('resize', handler, options)\n\n el._onResize = Object(el._onResize)\n el._onResize![binding.instance!.$.uid] = {\n handler,\n options,\n }\n\n if (!binding.modifiers?.quiet) {\n handler()\n }\n}\n\nfunction unmounted (el: HTMLElement, binding: ResizeDirectiveBinding) {\n if (!el._onResize?.[binding.instance!.$.uid]) return\n\n const { handler, options } = el._onResize[binding.instance!.$.uid]!\n\n window.removeEventListener('resize', handler, options)\n\n delete el._onResize[binding.instance!.$.uid]\n}\n\nexport const Resize = {\n mounted,\n unmounted,\n}\n\nexport default Resize\n", "// Utilities\nimport { keys } from '@/util'\n\n// Types\nimport type {\n DirectiveBinding,\n} from 'vue'\n\nexport interface TouchHandlers {\n start?: (wrapperEvent: { originalEvent: TouchEvent } & TouchData) => void\n end?: (wrapperEvent: { originalEvent: TouchEvent } & TouchData) => void\n move?: (wrapperEvent: { originalEvent: TouchEvent } & TouchData) => void\n left?: (wrapper: TouchData) => void\n right?: (wrapper: TouchData) => void\n up?: (wrapper: TouchData) => void\n down?: (wrapper: TouchData) => void\n}\n\nexport interface TouchData {\n touchstartX: number\n touchstartY: number\n touchmoveX: number\n touchmoveY: number\n touchendX: number\n touchendY: number\n offsetX: number\n offsetY: number\n}\n\nexport type TouchWrapper = TouchHandlers & TouchData\n\nexport interface TouchValue extends TouchHandlers {\n parent?: boolean\n options?: AddEventListenerOptions\n}\n\nexport interface TouchStoredHandlers {\n touchstart: (e: TouchEvent) => void\n touchend: (e: TouchEvent) => void\n touchmove: (e: TouchEvent) => void\n}\n\nexport interface TouchDirectiveBinding extends Omit<DirectiveBinding, 'value'> {\n value?: TouchValue\n}\n\nconst handleGesture = (wrapper: TouchWrapper) => {\n const { touchstartX, touchendX, touchstartY, touchendY } = wrapper\n const dirRatio = 0.5\n const minDistance = 16\n wrapper.offsetX = touchendX - touchstartX\n wrapper.offsetY = touchendY - touchstartY\n\n if (Math.abs(wrapper.offsetY) < dirRatio * Math.abs(wrapper.offsetX)) {\n wrapper.left && (touchendX < touchstartX - minDistance) && wrapper.left(wrapper)\n wrapper.right && (touchendX > touchstartX + minDistance) && wrapper.right(wrapper)\n }\n\n if (Math.abs(wrapper.offsetX) < dirRatio * Math.abs(wrapper.offsetY)) {\n wrapper.up && (touchendY < touchstartY - minDistance) && wrapper.up(wrapper)\n wrapper.down && (touchendY > touchstartY + minDistance) && wrapper.down(wrapper)\n }\n}\n\nfunction touchstart (event: TouchEvent, wrapper: TouchWrapper) {\n const touch = event.changedTouches[0]\n wrapper.touchstartX = touch.clientX\n wrapper.touchstartY = touch.clientY\n\n wrapper.start?.({ originalEvent: event, ...wrapper })\n}\n\nfunction touchend (event: TouchEvent, wrapper: TouchWrapper) {\n const touch = event.changedTouches[0]\n wrapper.touchendX = touch.clientX\n wrapper.touchendY = touch.clientY\n\n wrapper.end?.({ originalEvent: event, ...wrapper })\n\n handleGesture(wrapper)\n}\n\nfunction touchmove (event: TouchEvent, wrapper: TouchWrapper) {\n const touch = event.changedTouches[0]\n wrapper.touchmoveX = touch.clientX\n wrapper.touchmoveY = touch.clientY\n\n wrapper.move?.({ originalEvent: event, ...wrapper })\n}\n\nfunction createHandlers (value: TouchHandlers = {}): TouchStoredHandlers {\n const wrapper = {\n touchstartX: 0,\n touchstartY: 0,\n touchendX: 0,\n touchendY: 0,\n touchmoveX: 0,\n touchmoveY: 0,\n offsetX: 0,\n offsetY: 0,\n left: value.left,\n right: value.right,\n up: value.up,\n down: value.down,\n start: value.start,\n move: value.move,\n end: value.end,\n }\n\n return {\n touchstart: (e: TouchEvent) => touchstart(e, wrapper),\n touchend: (e: TouchEvent) => touchend(e, wrapper),\n touchmove: (e: TouchEvent) => touchmove(e, wrapper),\n }\n}\n\nfunction mounted (el: HTMLElement, binding: TouchDirectiveBinding) {\n const value = binding.value\n const target = value?.parent ? el.parentElement : el\n const options = value?.options ?? { passive: true }\n const uid = binding.instance?.$.uid // TODO: use custom uid generator\n\n if (!target || uid === undefined) return\n\n const handlers = createHandlers(binding.value)\n\n target._touchHandlers = target._touchHandlers ?? Object.create(null)\n target._touchHandlers![uid] = handlers\n\n keys(handlers).forEach(eventName => {\n target.addEventListener(eventName, handlerLine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,SAASA,QAASC,IAAiBC,SAAiC;AAClE,QAAMC,UAAUD,QAAQE;AACxB,QAAMC,UAAmC;IACvCC,SAAS,CAACJ,QAAQK,WAAWC;EAC/B;AAEAC,SAAOC,iBAAiB,UAAUP,SAASE,OAAO;AAElDJ,KAAGU,YAAYC,OAAOX,GAAGU,SAAS;AAClCV,K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K0B;QAAA,cACXhC,WAAWM;QAAK,YAAA;QAAA,YAElBhB,SAASgB;QAAK,UAChBT,OAAOS;QAAK,QAAA;QAAA,kBAEJgB,eAAehB;QAAK,uBAAA;MAAA,GAEhCM,OAAO,GAAA;QAGVqB,WAAWxB,MAAMwB;QACjBC,SAAS,WAAA;AAAA,mBAAAC,OAAAC,UAAAf,QAAIgB,OAAI,IAAAC,MAAAH,IAAA,GAAAI,OAAA,GAAAA,OAAAJ,MAAAI,QAAA;AAAJF,iBAAIE,IAAA,IAAAH,UAAAG,IAAA;UAAA;AAAA,iBAAK9B,MAAMyB,UAAU,GAAGG,IAAI,KAAKjC,MAAMlB;QAAI;MAAA,CAAA;IAIpE,CAAC;AAED,WAAOsD,YAAY,CAAC,GAAGvB,OAAO;EAChC;AACF,CAAC;",
|
||||
"names": ["mounted", "el", "binding", "handler", "value", "options", "passive", "modifiers", "active", "window", "addEventListener", "_onResize", "Object", "instance", "$", "uid", "quiet", "unmounted", "removeEventListener", "Resize", "handleGesture", "wrapper", "touchstartX", "touchendX", "touchstartY", "touchendY", "dirRatio", "minDistance", "offsetX", "offsetY", "Math", "abs", "left", "right", "up", "down", "touchstart", "event", "touch", "changedTouches", "clientX", "clientY", "start", "originalEvent", "touchend", "end", "touchmove", "touchmoveX", "touchmoveY", "move", "createHandlers", "value", "arguments", "length", "undefined", "e", "mounted", "el", "binding", "target", "parent", "parentElement", "options", "passive", "uid", "instance", "$", "handlers", "_touchHandlers", "Object", "create", "keys", "forEach", "eventName", "addEventListener", "unmounted", "removeEventListener", "Touch", "makeVTooltipProps", "propsFactory", "id", "String", "interactive", "Boolean", "text", "omit", "makeVOverlayProps", "closeOnBack", "location", "locationStrategy", "eager", "minWidth", "offset", "openOnClick", "openOnHover", "origin", "scrim", "scrollStrategy", "transition", "VTooltip", "genericComponent", "name", "props", "emits", "value", "setup", "_ref", "slots", "isActive", "useProxiedModel", "scopeId", "useScopeId", "uid", "useId", "toRef", "overlay", "ref", "computed", "split", "length", "activatorProps", "mergeProps", "useRender", "overlayProps", "VOverlay", "filterProps", "_createVNode", "_mergeProps", "class", "style", "$event", "activator", "default", "_len", "arguments", "args", "Array", "_key", "forwardRefs"]
|
||||
}
|
||||
+643
@@ -0,0 +1,643 @@
|
||||
import {
|
||||
useSsrBoot
|
||||
} from "./chunk-PCKQGDLK.js";
|
||||
import {
|
||||
VImg
|
||||
} from "./chunk-6CRS5HI4.js";
|
||||
import {
|
||||
makeBorderProps,
|
||||
useBorder
|
||||
} from "./chunk-X7YBE6PF.js";
|
||||
import {
|
||||
makeElevationProps,
|
||||
useElevation
|
||||
} from "./chunk-YJD2PNP6.js";
|
||||
import {
|
||||
VDefaultsProvider
|
||||
} from "./chunk-VH7QIDM4.js";
|
||||
import {
|
||||
makeRoundedProps,
|
||||
useRounded
|
||||
} from "./chunk-AQK3CYVW.js";
|
||||
import {
|
||||
makeTagProps
|
||||
} from "./chunk-2HZIACSB.js";
|
||||
import {
|
||||
makeDelayProps,
|
||||
makeFocusTrapProps,
|
||||
useDelay,
|
||||
useFocusTrap,
|
||||
useScopeId
|
||||
} from "./chunk-BVUPSGRF.js";
|
||||
import {
|
||||
useRouter
|
||||
} from "./chunk-573D4TYC.js";
|
||||
import {
|
||||
makeDisplayProps,
|
||||
useDisplay
|
||||
} from "./chunk-N4LJHDYD.js";
|
||||
import {
|
||||
makeLayoutItemProps,
|
||||
useLayoutItem
|
||||
} from "./chunk-KQXZAEJP.js";
|
||||
import {
|
||||
useRtl
|
||||
} from "./chunk-ENTLCOCZ.js";
|
||||
import {
|
||||
useProxiedModel,
|
||||
useToggleScope
|
||||
} from "./chunk-KA77II4V.js";
|
||||
import {
|
||||
useBackgroundColor
|
||||
} from "./chunk-BHV5Z34M.js";
|
||||
import {
|
||||
makeThemeProps,
|
||||
provideTheme
|
||||
} from "./chunk-3DSR7NCB.js";
|
||||
import {
|
||||
CircularBuffer,
|
||||
clamp,
|
||||
convertToUnit,
|
||||
genericComponent,
|
||||
makeComponentProps,
|
||||
omit,
|
||||
propsFactory,
|
||||
provideDefaults,
|
||||
toPhysical,
|
||||
useRender
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
Fragment,
|
||||
Transition,
|
||||
computed,
|
||||
createBaseVNode,
|
||||
createVNode,
|
||||
mergeProps,
|
||||
nextTick,
|
||||
onBeforeUnmount,
|
||||
onMounted,
|
||||
onScopeDispose,
|
||||
readonly,
|
||||
ref,
|
||||
shallowRef,
|
||||
toRef,
|
||||
watch,
|
||||
watchEffect
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/VNavigationDrawer/VNavigationDrawer.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VNavigationDrawer/VNavigationDrawer.css";
|
||||
|
||||
// node_modules/vuetify/lib/components/VNavigationDrawer/sticky.js
|
||||
function useSticky(_ref) {
|
||||
let {
|
||||
rootEl,
|
||||
isSticky,
|
||||
layoutItemStyles
|
||||
} = _ref;
|
||||
const isStuck = shallowRef(false);
|
||||
const stuckPosition = shallowRef(0);
|
||||
const stickyStyles = computed(() => {
|
||||
const side = typeof isStuck.value === "boolean" ? "top" : isStuck.value;
|
||||
return [isSticky.value ? {
|
||||
top: "auto",
|
||||
bottom: "auto",
|
||||
height: void 0
|
||||
} : void 0, isStuck.value ? {
|
||||
[side]: convertToUnit(stuckPosition.value)
|
||||
} : {
|
||||
top: layoutItemStyles.value.top
|
||||
}];
|
||||
});
|
||||
onMounted(() => {
|
||||
watch(isSticky, (val) => {
|
||||
if (val) {
|
||||
window.addEventListener("scroll", onScroll, {
|
||||
passive: true
|
||||
});
|
||||
} else {
|
||||
window.removeEventListener("scroll", onScroll);
|
||||
}
|
||||
}, {
|
||||
immediate: true
|
||||
});
|
||||
});
|
||||
onBeforeUnmount(() => {
|
||||
window.removeEventListener("scroll", onScroll);
|
||||
});
|
||||
let lastScrollTop = 0;
|
||||
function onScroll() {
|
||||
const direction = lastScrollTop > window.scrollY ? "up" : "down";
|
||||
const rect = rootEl.value.getBoundingClientRect();
|
||||
const layoutTop = parseFloat(layoutItemStyles.value.top ?? 0);
|
||||
const top = window.scrollY - Math.max(0, stuckPosition.value - layoutTop);
|
||||
const bottom = rect.height + Math.max(stuckPosition.value, layoutTop) - window.scrollY - window.innerHeight;
|
||||
const bodyScroll = parseFloat(getComputedStyle(rootEl.value).getPropertyValue("--v-body-scroll-y")) || 0;
|
||||
if (rect.height < window.innerHeight - layoutTop) {
|
||||
isStuck.value = "top";
|
||||
stuckPosition.value = layoutTop;
|
||||
} else if (direction === "up" && isStuck.value === "bottom" || direction === "down" && isStuck.value === "top") {
|
||||
stuckPosition.value = window.scrollY + rect.top - bodyScroll;
|
||||
isStuck.value = true;
|
||||
} else if (direction === "down" && bottom <= 0) {
|
||||
stuckPosition.value = 0;
|
||||
isStuck.value = "bottom";
|
||||
} else if (direction === "up" && top <= 0) {
|
||||
if (!bodyScroll) {
|
||||
stuckPosition.value = rect.top + top;
|
||||
isStuck.value = "top";
|
||||
} else if (isStuck.value !== "top") {
|
||||
stuckPosition.value = -top + bodyScroll + layoutTop;
|
||||
isStuck.value = "top";
|
||||
}
|
||||
}
|
||||
lastScrollTop = window.scrollY;
|
||||
}
|
||||
return {
|
||||
isStuck,
|
||||
stickyStyles
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/vuetify/lib/composables/touch.js
|
||||
var HORIZON = 100;
|
||||
var HISTORY = 20;
|
||||
function kineticEnergyToVelocity(work) {
|
||||
const sqrt2 = 1.41421356237;
|
||||
return (work < 0 ? -1 : 1) * Math.sqrt(Math.abs(work)) * sqrt2;
|
||||
}
|
||||
function calculateImpulseVelocity(samples) {
|
||||
if (samples.length < 2) {
|
||||
return 0;
|
||||
}
|
||||
if (samples.length === 2) {
|
||||
if (samples[1].t === samples[0].t) {
|
||||
return 0;
|
||||
}
|
||||
return (samples[1].d - samples[0].d) / (samples[1].t - samples[0].t);
|
||||
}
|
||||
let work = 0;
|
||||
for (let i = samples.length - 1; i > 0; i--) {
|
||||
if (samples[i].t === samples[i - 1].t) {
|
||||
continue;
|
||||
}
|
||||
const vprev = kineticEnergyToVelocity(work);
|
||||
const vcurr = (samples[i].d - samples[i - 1].d) / (samples[i].t - samples[i - 1].t);
|
||||
work += (vcurr - vprev) * Math.abs(vcurr);
|
||||
if (i === samples.length - 1) {
|
||||
work *= 0.5;
|
||||
}
|
||||
}
|
||||
return kineticEnergyToVelocity(work) * 1e3;
|
||||
}
|
||||
function useVelocity() {
|
||||
const touches = {};
|
||||
function addMovement(e) {
|
||||
Array.from(e.changedTouches).forEach((touch) => {
|
||||
const samples = touches[touch.identifier] ?? (touches[touch.identifier] = new CircularBuffer(HISTORY));
|
||||
samples.push([e.timeStamp, touch]);
|
||||
});
|
||||
}
|
||||
function endTouch(e) {
|
||||
Array.from(e.changedTouches).forEach((touch) => {
|
||||
delete touches[touch.identifier];
|
||||
});
|
||||
}
|
||||
function getVelocity(id) {
|
||||
const samples = touches[id]?.values().reverse();
|
||||
if (!samples) {
|
||||
throw new Error(`No samples for touch id ${id}`);
|
||||
}
|
||||
const newest = samples[0];
|
||||
const x = [];
|
||||
const y = [];
|
||||
for (const val of samples) {
|
||||
if (newest[0] - val[0] > HORIZON) break;
|
||||
x.push({
|
||||
t: val[0],
|
||||
d: val[1].clientX
|
||||
});
|
||||
y.push({
|
||||
t: val[0],
|
||||
d: val[1].clientY
|
||||
});
|
||||
}
|
||||
return {
|
||||
x: calculateImpulseVelocity(x),
|
||||
y: calculateImpulseVelocity(y),
|
||||
get direction() {
|
||||
const {
|
||||
x: x2,
|
||||
y: y2
|
||||
} = this;
|
||||
const [absX, absY] = [Math.abs(x2), Math.abs(y2)];
|
||||
return absX > absY && x2 >= 0 ? "right" : absX > absY && x2 <= 0 ? "left" : absY > absX && y2 >= 0 ? "down" : absY > absX && y2 <= 0 ? "up" : oops();
|
||||
}
|
||||
};
|
||||
}
|
||||
return {
|
||||
addMovement,
|
||||
endTouch,
|
||||
getVelocity
|
||||
};
|
||||
}
|
||||
function oops() {
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
// node_modules/vuetify/lib/components/VNavigationDrawer/touch.js
|
||||
function useTouch(_ref) {
|
||||
let {
|
||||
el,
|
||||
isActive,
|
||||
isTemporary,
|
||||
width,
|
||||
touchless,
|
||||
position
|
||||
} = _ref;
|
||||
onMounted(() => {
|
||||
window.addEventListener("touchstart", onTouchstart, {
|
||||
passive: true
|
||||
});
|
||||
window.addEventListener("touchmove", onTouchmove, {
|
||||
passive: false
|
||||
});
|
||||
window.addEventListener("touchend", onTouchend, {
|
||||
passive: true
|
||||
});
|
||||
});
|
||||
onBeforeUnmount(() => {
|
||||
window.removeEventListener("touchstart", onTouchstart);
|
||||
window.removeEventListener("touchmove", onTouchmove);
|
||||
window.removeEventListener("touchend", onTouchend);
|
||||
});
|
||||
const isHorizontal = computed(() => ["left", "right"].includes(position.value));
|
||||
const {
|
||||
addMovement,
|
||||
endTouch,
|
||||
getVelocity
|
||||
} = useVelocity();
|
||||
let maybeDragging = false;
|
||||
const isDragging = shallowRef(false);
|
||||
const dragProgress = shallowRef(0);
|
||||
const offset = shallowRef(0);
|
||||
let start;
|
||||
function getOffset(pos, active) {
|
||||
return (position.value === "left" ? pos : position.value === "right" ? document.documentElement.clientWidth - pos : position.value === "top" ? pos : position.value === "bottom" ? document.documentElement.clientHeight - pos : oops2()) - (active ? width.value : 0);
|
||||
}
|
||||
function getProgress(pos) {
|
||||
let limit = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
||||
const progress = position.value === "left" ? (pos - offset.value) / width.value : position.value === "right" ? (document.documentElement.clientWidth - pos - offset.value) / width.value : position.value === "top" ? (pos - offset.value) / width.value : position.value === "bottom" ? (document.documentElement.clientHeight - pos - offset.value) / width.value : oops2();
|
||||
return limit ? clamp(progress) : progress;
|
||||
}
|
||||
function onTouchstart(e) {
|
||||
if (touchless.value) return;
|
||||
const touchX = e.changedTouches[0].clientX;
|
||||
const touchY = e.changedTouches[0].clientY;
|
||||
const touchZone = 25;
|
||||
const inTouchZone = position.value === "left" ? touchX < touchZone : position.value === "right" ? touchX > document.documentElement.clientWidth - touchZone : position.value === "top" ? touchY < touchZone : position.value === "bottom" ? touchY > document.documentElement.clientHeight - touchZone : oops2();
|
||||
const inElement = isActive.value && (position.value === "left" ? touchX < width.value : position.value === "right" ? touchX > document.documentElement.clientWidth - width.value : position.value === "top" ? touchY < width.value : position.value === "bottom" ? touchY > document.documentElement.clientHeight - width.value : oops2());
|
||||
if (inTouchZone || inElement || isActive.value && isTemporary.value) {
|
||||
start = [touchX, touchY];
|
||||
offset.value = getOffset(isHorizontal.value ? touchX : touchY, isActive.value);
|
||||
dragProgress.value = getProgress(isHorizontal.value ? touchX : touchY);
|
||||
maybeDragging = offset.value > -20 && offset.value < 80;
|
||||
endTouch(e);
|
||||
addMovement(e);
|
||||
}
|
||||
}
|
||||
function onTouchmove(e) {
|
||||
const touchX = e.changedTouches[0].clientX;
|
||||
const touchY = e.changedTouches[0].clientY;
|
||||
if (maybeDragging) {
|
||||
if (!e.cancelable) {
|
||||
maybeDragging = false;
|
||||
return;
|
||||
}
|
||||
const dx = Math.abs(touchX - start[0]);
|
||||
const dy = Math.abs(touchY - start[1]);
|
||||
const thresholdMet = isHorizontal.value ? dx > dy && dx > 3 : dy > dx && dy > 3;
|
||||
if (thresholdMet) {
|
||||
isDragging.value = true;
|
||||
maybeDragging = false;
|
||||
} else if ((isHorizontal.value ? dy : dx) > 3) {
|
||||
maybeDragging = false;
|
||||
}
|
||||
}
|
||||
if (!isDragging.value) return;
|
||||
e.preventDefault();
|
||||
addMovement(e);
|
||||
const progress = getProgress(isHorizontal.value ? touchX : touchY, false);
|
||||
dragProgress.value = Math.max(0, Math.min(1, progress));
|
||||
if (progress > 1) {
|
||||
offset.value = getOffset(isHorizontal.value ? touchX : touchY, true);
|
||||
} else if (progress < 0) {
|
||||
offset.value = getOffset(isHorizontal.value ? touchX : touchY, false);
|
||||
}
|
||||
}
|
||||
function onTouchend(e) {
|
||||
maybeDragging = false;
|
||||
if (!isDragging.value) return;
|
||||
addMovement(e);
|
||||
isDragging.value = false;
|
||||
const velocity = getVelocity(e.changedTouches[0].identifier);
|
||||
const vx = Math.abs(velocity.x);
|
||||
const vy = Math.abs(velocity.y);
|
||||
const thresholdMet = isHorizontal.value ? vx > vy && vx > 400 : vy > vx && vy > 3;
|
||||
if (thresholdMet) {
|
||||
isActive.value = velocity.direction === ({
|
||||
left: "right",
|
||||
right: "left",
|
||||
top: "down",
|
||||
bottom: "up"
|
||||
}[position.value] || oops2());
|
||||
} else {
|
||||
isActive.value = dragProgress.value > 0.5;
|
||||
}
|
||||
}
|
||||
const dragStyles = computed(() => {
|
||||
return isDragging.value ? {
|
||||
transform: position.value === "left" ? `translateX(calc(-100% + ${dragProgress.value * width.value}px))` : position.value === "right" ? `translateX(calc(100% - ${dragProgress.value * width.value}px))` : position.value === "top" ? `translateY(calc(-100% + ${dragProgress.value * width.value}px))` : position.value === "bottom" ? `translateY(calc(100% - ${dragProgress.value * width.value}px))` : oops2(),
|
||||
transition: "none"
|
||||
} : void 0;
|
||||
});
|
||||
useToggleScope(isDragging, () => {
|
||||
const transform = el.value?.style.transform ?? null;
|
||||
const transition = el.value?.style.transition ?? null;
|
||||
watchEffect(() => {
|
||||
el.value?.style.setProperty("transform", dragStyles.value?.transform || "none");
|
||||
el.value?.style.setProperty("transition", dragStyles.value?.transition || null);
|
||||
});
|
||||
onScopeDispose(() => {
|
||||
el.value?.style.setProperty("transform", transform);
|
||||
el.value?.style.setProperty("transition", transition);
|
||||
});
|
||||
});
|
||||
return {
|
||||
isDragging,
|
||||
dragProgress,
|
||||
dragStyles
|
||||
};
|
||||
}
|
||||
function oops2() {
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
// node_modules/vuetify/lib/components/VNavigationDrawer/VNavigationDrawer.js
|
||||
var locations = ["start", "end", "left", "right", "top", "bottom"];
|
||||
var makeVNavigationDrawerProps = propsFactory({
|
||||
color: String,
|
||||
disableResizeWatcher: Boolean,
|
||||
disableRouteWatcher: Boolean,
|
||||
expandOnHover: Boolean,
|
||||
floating: Boolean,
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
default: null
|
||||
},
|
||||
permanent: Boolean,
|
||||
rail: {
|
||||
type: Boolean,
|
||||
default: null
|
||||
},
|
||||
railWidth: {
|
||||
type: [Number, String],
|
||||
default: 56
|
||||
},
|
||||
scrim: {
|
||||
type: [Boolean, String],
|
||||
default: true
|
||||
},
|
||||
image: String,
|
||||
temporary: Boolean,
|
||||
persistent: Boolean,
|
||||
touchless: Boolean,
|
||||
width: {
|
||||
type: [Number, String],
|
||||
default: 256
|
||||
},
|
||||
location: {
|
||||
type: String,
|
||||
default: "start",
|
||||
validator: (value) => locations.includes(value)
|
||||
},
|
||||
sticky: Boolean,
|
||||
...makeBorderProps(),
|
||||
...makeComponentProps(),
|
||||
...makeDelayProps(),
|
||||
...makeDisplayProps({
|
||||
mobile: null
|
||||
}),
|
||||
...makeElevationProps(),
|
||||
...makeLayoutItemProps(),
|
||||
...makeRoundedProps(),
|
||||
...omit(makeFocusTrapProps(), ["disableInitialFocus"]),
|
||||
...makeTagProps({
|
||||
tag: "nav"
|
||||
}),
|
||||
...makeThemeProps()
|
||||
}, "VNavigationDrawer");
|
||||
var VNavigationDrawer = genericComponent()({
|
||||
name: "VNavigationDrawer",
|
||||
props: makeVNavigationDrawerProps(),
|
||||
emits: {
|
||||
"update:modelValue": (val) => true,
|
||||
"update:rail": (val) => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
attrs,
|
||||
emit,
|
||||
slots
|
||||
} = _ref;
|
||||
const {
|
||||
isRtl
|
||||
} = useRtl();
|
||||
const {
|
||||
themeClasses
|
||||
} = provideTheme(props);
|
||||
const {
|
||||
borderClasses
|
||||
} = useBorder(props);
|
||||
const {
|
||||
backgroundColorClasses,
|
||||
backgroundColorStyles
|
||||
} = useBackgroundColor(() => props.color);
|
||||
const {
|
||||
elevationClasses
|
||||
} = useElevation(props);
|
||||
const {
|
||||
displayClasses,
|
||||
mobile
|
||||
} = useDisplay(props);
|
||||
const {
|
||||
roundedClasses
|
||||
} = useRounded(props);
|
||||
const router = useRouter();
|
||||
const isActive = useProxiedModel(props, "modelValue", null, (v) => !!v);
|
||||
const {
|
||||
ssrBootStyles
|
||||
} = useSsrBoot();
|
||||
const {
|
||||
scopeId
|
||||
} = useScopeId();
|
||||
const rootEl = ref();
|
||||
const isHovering = shallowRef(false);
|
||||
const {
|
||||
runOpenDelay,
|
||||
runCloseDelay
|
||||
} = useDelay(props, (value) => {
|
||||
isHovering.value = value;
|
||||
});
|
||||
const width = computed(() => {
|
||||
return props.rail && props.expandOnHover && isHovering.value ? Number(props.width) : Number(props.rail ? props.railWidth : props.width);
|
||||
});
|
||||
const location = computed(() => {
|
||||
return toPhysical(props.location, isRtl.value);
|
||||
});
|
||||
const isPersistent = toRef(() => props.persistent);
|
||||
const isTemporary = computed(() => !props.permanent && (mobile.value || props.temporary));
|
||||
const isSticky = computed(() => props.sticky && !isTemporary.value && location.value !== "bottom");
|
||||
useFocusTrap(props, {
|
||||
isActive,
|
||||
localTop: isTemporary,
|
||||
contentEl: rootEl
|
||||
});
|
||||
useToggleScope(() => props.expandOnHover && props.rail != null, () => {
|
||||
watch(isHovering, (val) => emit("update:rail", !val));
|
||||
});
|
||||
useToggleScope(() => !props.disableResizeWatcher, () => {
|
||||
watch(isTemporary, (val) => !props.permanent && nextTick(() => isActive.value = !val));
|
||||
});
|
||||
useToggleScope(() => !props.disableRouteWatcher && !!router, () => {
|
||||
watch(router.currentRoute, () => isTemporary.value && (isActive.value = false));
|
||||
});
|
||||
watch(() => props.permanent, (val) => {
|
||||
if (val) isActive.value = true;
|
||||
});
|
||||
if (props.modelValue == null && !isTemporary.value) {
|
||||
isActive.value = props.permanent || !mobile.value;
|
||||
}
|
||||
const {
|
||||
isDragging,
|
||||
dragProgress
|
||||
} = useTouch({
|
||||
el: rootEl,
|
||||
isActive,
|
||||
isTemporary,
|
||||
width,
|
||||
touchless: toRef(() => props.touchless),
|
||||
position: location
|
||||
});
|
||||
const layoutSize = computed(() => {
|
||||
const size = isTemporary.value ? 0 : props.rail && props.expandOnHover ? Number(props.railWidth) : width.value;
|
||||
return isDragging.value ? size * dragProgress.value : size;
|
||||
});
|
||||
const {
|
||||
layoutItemStyles,
|
||||
layoutItemScrimStyles
|
||||
} = useLayoutItem({
|
||||
id: props.name,
|
||||
order: computed(() => parseInt(props.order, 10)),
|
||||
position: location,
|
||||
layoutSize,
|
||||
elementSize: width,
|
||||
active: readonly(isActive),
|
||||
disableTransitions: toRef(() => isDragging.value),
|
||||
absolute: computed(() => (
|
||||
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
||||
props.absolute || isSticky.value && typeof isStuck.value !== "string"
|
||||
))
|
||||
});
|
||||
const {
|
||||
isStuck,
|
||||
stickyStyles
|
||||
} = useSticky({
|
||||
rootEl,
|
||||
isSticky,
|
||||
layoutItemStyles
|
||||
});
|
||||
const scrimColor = useBackgroundColor(() => {
|
||||
return typeof props.scrim === "string" ? props.scrim : null;
|
||||
});
|
||||
const scrimStyles = computed(() => ({
|
||||
...isDragging.value ? {
|
||||
opacity: dragProgress.value * 0.2,
|
||||
transition: "none"
|
||||
} : void 0,
|
||||
...layoutItemScrimStyles.value
|
||||
}));
|
||||
provideDefaults({
|
||||
VList: {
|
||||
bgColor: "transparent"
|
||||
}
|
||||
});
|
||||
useRender(() => {
|
||||
const hasImage = slots.image || props.image;
|
||||
return createBaseVNode(Fragment, null, [createVNode(props.tag, mergeProps({
|
||||
"ref": rootEl,
|
||||
"onMouseenter": runOpenDelay,
|
||||
"onMouseleave": runCloseDelay,
|
||||
"class": ["v-navigation-drawer", `v-navigation-drawer--${location.value}`, {
|
||||
"v-navigation-drawer--expand-on-hover": props.expandOnHover,
|
||||
"v-navigation-drawer--floating": props.floating,
|
||||
"v-navigation-drawer--is-hovering": isHovering.value,
|
||||
"v-navigation-drawer--rail": props.rail,
|
||||
"v-navigation-drawer--temporary": isTemporary.value,
|
||||
"v-navigation-drawer--persistent": isPersistent.value,
|
||||
"v-navigation-drawer--active": isActive.value,
|
||||
"v-navigation-drawer--sticky": isSticky.value
|
||||
}, themeClasses.value, backgroundColorClasses.value, borderClasses.value, displayClasses.value, elevationClasses.value, roundedClasses.value, props.class],
|
||||
"style": [backgroundColorStyles.value, layoutItemStyles.value, ssrBootStyles.value, stickyStyles.value, props.style],
|
||||
"inert": !isActive.value
|
||||
}, scopeId, attrs), {
|
||||
default: () => [hasImage && createBaseVNode("div", {
|
||||
"key": "image",
|
||||
"class": "v-navigation-drawer__img"
|
||||
}, [!slots.image ? createVNode(VImg, {
|
||||
"key": "image-img",
|
||||
"alt": "",
|
||||
"cover": true,
|
||||
"height": "inherit",
|
||||
"src": props.image
|
||||
}, null) : createVNode(VDefaultsProvider, {
|
||||
"key": "image-defaults",
|
||||
"disabled": !props.image,
|
||||
"defaults": {
|
||||
VImg: {
|
||||
alt: "",
|
||||
cover: true,
|
||||
height: "inherit",
|
||||
src: props.image
|
||||
}
|
||||
}
|
||||
}, slots.image)]), slots.prepend && createBaseVNode("div", {
|
||||
"class": "v-navigation-drawer__prepend"
|
||||
}, [slots.prepend?.()]), createBaseVNode("div", {
|
||||
"class": "v-navigation-drawer__content"
|
||||
}, [slots.default?.()]), slots.append && createBaseVNode("div", {
|
||||
"class": "v-navigation-drawer__append"
|
||||
}, [slots.append?.()])]
|
||||
}), createVNode(Transition, {
|
||||
"name": "fade-transition"
|
||||
}, {
|
||||
default: () => [isTemporary.value && (isDragging.value || isActive.value) && !!props.scrim && createBaseVNode("div", mergeProps({
|
||||
"class": ["v-navigation-drawer__scrim", scrimColor.backgroundColorClasses.value],
|
||||
"style": [scrimStyles.value, scrimColor.backgroundColorStyles.value],
|
||||
"onClick": () => {
|
||||
if (isPersistent.value) return;
|
||||
isActive.value = false;
|
||||
}
|
||||
}, scopeId), null)]
|
||||
})]);
|
||||
});
|
||||
return {
|
||||
isStuck
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
VNavigationDrawer
|
||||
};
|
||||
//# sourceMappingURL=chunk-7SKEB5LN.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VNavigationDrawer/VNavigationDrawer.tsx", "../../vuetify/src/components/VNavigationDrawer/sticky.ts", "../../vuetify/src/composables/touch.ts", "../../vuetify/src/components/VNavigationDrawer/touch.ts"],
|
||||
"sourcesContent": ["// Styles\nimport './VNavigationDrawer.sass'\n\n// Components\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { VImg } from '@/components/VImg'\n\n// Composables\nimport { useSticky } from './sticky'\nimport { useTouch } from './touch'\nimport { useRtl } from '@/composables'\nimport { makeBorderProps, useBorder } from '@/composables/border'\nimport { useBackgroundColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeDelayProps, useDelay } from '@/composables/delay'\nimport { makeDisplayProps, useDisplay } from '@/composables/display'\nimport { makeElevationProps, useElevation } from '@/composables/elevation'\nimport { makeFocusTrapProps, useFocusTrap } from '@/composables/focusTrap'\nimport { makeLayoutItemProps, useLayoutItem } from '@/composables/layout'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { useRouter } from '@/composables/router'\nimport { useScopeId } from '@/composables/scopeId'\nimport { useSsrBoot } from '@/composables/ssrBoot'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Utilities\nimport { computed, nextTick, readonly, ref, shallowRef, toRef, Transition, watch } from 'vue'\nimport { genericComponent, omit, propsFactory, toPhysical, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\nexport type VNavigationDrawerImageSlot = {\n image: string | undefined\n}\n\nexport type VNavigationDrawerSlots = {\n default: never\n prepend: never\n append: never\n image: VNavigationDrawerImageSlot\n}\n\nconst locations = ['start', 'end', 'left', 'right', 'top', 'bottom'] as const\n\nexport const makeVNavigationDrawerProps = propsFactory({\n color: String,\n disableResizeWatcher: Boolean,\n disableRouteWatcher: Boolean,\n expandOnHover: Boolean,\n floating: Boolean,\n modelValue: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n permanent: Boolean,\n rail: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n railWidth: {\n type: [Number, String],\n default: 56,\n },\n scrim: {\n type: [Boolean, String],\n default: true,\n },\n image: String,\n temporary: Boolean,\n persistent: Boolean,\n touchless: Boolean,\n width: {\n type: [Number, String],\n default: 256,\n },\n location: {\n type: String as PropType<typeof locations[number]>,\n default: 'start',\n validator: (value: any) => locations.includes(value),\n },\n sticky: Boolean,\n\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeDelayProps(),\n ...makeDisplayProps({ mobile: null }),\n ...makeElevationProps(),\n ...makeLayoutItemProps(),\n ...makeRoundedProps(),\n ...omit(makeFocusTrapProps(), ['disableInitialFocus']),\n ...makeTagProps({ tag: 'nav' }),\n ...makeThemeProps(),\n}, 'VNavigationDrawer')\n\nexport const VNavigationDrawer = genericComponent<VNavigationDrawerSlots>()({\n name: 'VNavigationDrawer',\n\n props: makeVNavigationDrawerProps(),\n\n emits: {\n 'update:modelValue': (val: boolean) => true,\n 'update:rail': (val: boolean) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const { isRtl } = useRtl()\n const { themeClasses } = provideTheme(props)\n const { borderClasses } = useBorder(props)\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(() => props.color)\n const { elevationClasses } = useElevation(props)\n const { displayClasses, mobile } = useDisplay(props)\n const { roundedClasses } = useRounded(props)\n const router = useRouter()\n const isActive = useProxiedModel(props, 'modelValue', null, v => !!v)\n const { ssrBootStyles } = useSsrBoot()\n const { scopeId } = useScopeId()\n\n const rootEl = ref<HTMLElement>()\n const isHovering = shallowRef(false)\n\n const { runOpenDelay, runCloseDelay } = useDelay(props, value => {\n isHovering.value = value\n })\n\n const width = computed(() => {\n return (props.rail && props.expandOnHover && isHovering.value)\n ? Number(props.width)\n : Number(props.rail ? props.railWidth : props.width)\n })\n const location = computed(() => {\n return toPhysical(props.location, isRtl.value) as 'left' | 'right' | 'bottom'\n })\n const isPersistent = toRef(() => props.persistent)\n const isTemporary = computed(() => !props.permanent && (mobile.value || props.temporary))\n const isSticky = computed(() =>\n props.sticky &&\n !isTemporary.value &&\n location.value !== 'bottom'\n )\n\n useFocusTrap(props, { isActive, localTop: isTemporary, contentEl: rootEl })\n\n useToggleScope(() => props.expandOnHover && proLine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAA;;;ACYO,SAASA,UAASC,MAAuD;AAAA,MAArD;IAAEC;IAAQC;IAAUC;EAA8B,IAACH;AAC5E,QAAMI,UAAUC,WAAuC,KAAK;AAC5D,QAAMC,gBAAgBD,WAAW,CAAC;AAElC,QAAME,eAAeC,SAAqB,MAAM;AAC9C,UAAMC,OAAO,OAAOL,QAAQM,UAAU,YAAY,QAAQN,QAAQM;AAClE,WAAO,CACLR,SAASQ,QAAQ;MAAEC,KAAK;MAAQC,QAAQ;MAAQC,QAAQC;IAAU,IAAIA,QACtEV,QAAQM,QACJ;MAAE,CAACD,IAAI,GAAGM,cAAcT,cAAcI,KAAK;IAAE,IAC7C;MAAEC,KAAKR,iBAAiBO,MAAMC;IAAI,CAAC;EAE3C,CAAC;AAEDK,YAAU,MAAM;AACdC,UAAMf,UAAUgB,SAAO;AACrB,UAAIA,KAAK;AACPC,eAAOC,iBAAiB,UAAUC,UAAU;UAAEC,SAAS;QAAK,CAAC;MAC/D,OAAO;AACLH,e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,UAAU,WAAWc,SAASC,gBAAgBC,cAAcJ,MAAMH,OAAOT,SAASf,MAAMe,QACjGb,SAASa,UAAU,SAASY,MAAMH,OAAOT,SAASf,MAAMe,QACxDb,SAASa,UAAU,YAAYc,SAASC,gBAAgBE,eAAeL,MAAMH,OAAOT,SAASLine truncated
|
||||
"names": ["useSticky", "_ref", "rootEl", "isSticky", "layoutItemStyles", "isStuck", "shallowRef", "stuckPosition", "stickyStyles", "computed", "side", "value", "top", "bottom", "height", "undefined", "convertToUnit", "onMounted", "watch", "val", "window", "addEventListener", "onScroll", "passive", "removeEventListener", "immediate", "onBeforeUnmount", "lastScrollTop", "direction", "scrollY", "rect", "getBoundingClientRect", "layoutTop", "parseFloat", "Math", "max", "innerHeight", "bodyScroll", "getComputedStyle", "getPropertyValue", "HORIZON", "HISTORY", "kineticEnergyToVelocity", "work", "sqrt2", "Math", "sqrt", "abs", "calculateImpulseVelocity", "samples", "length", "t", "d", "i", "vprev", "vcurr", "useVelocity", "touches", "addMovement", "e", "Array", "from", "changedTouches", "forEach", "touch", "identifier", "CircularBuffer", "push", "timeStamp", "endTouch", "getVelocity", "id", "values", "reverse", "Error", "newest", "x", "y", "val", "clientX", "clientY", "direction", "absX", "absY", "oops", "useTouch", "_ref", "el", "isActive", "isTemporary", "width", "touchless", "position", "onMounted", "window", "addEventListener", "onTouchstart", "passive", "onTouchmove", "onTouchend", "onBeforeUnmount", "removeEventListener", "isHorizontal", "computed", "includes", "value", "addMovement", "endTouch", "getVelocity", "useVelocity", "maybeDragging", "isDragging", "shallowRef", "dragProgress", "offset", "start", "getOffset", "pos", "active", "document", "documentElement", "clientWidth", "clientHeight", "oops", "getProgress", "limit", "arguments", "length", "undefined", "progress", "clamp", "e", "touchX", "changedTouches", "clientX", "touchY", "clientY", "touchZone", "inTouchZone", "inElement", "cancelable", "dx", "Math", "abs", "dy", "thresholdMet", "preventDefault", "max", "min", "velocity", "identifier", "vx", "x", "vy", "y", "direction", "left", "right", "top", "bottom", "dragStyles", "transform", "transition", "useToggleScope", "style", "watchEffect", "setProperty", "onScopeDispose", "Error", "locations", "makeVNavigationDrawerProps", "propsFactory", "color", "String", "disableResizeWatcher", "Boolean", "disableRouteWatcher", "expandOnHover", "floating", "modelValue", "type", "default", "permanent", "rail", "railWidth", "Number", "scrim", "image", "temporary", "persistent", "touchless", "width", "location", "validator", "value", "includes", "sticky", "makeBorderProps", "makeComponentProps", "makeDelayProps", "makeDisplayProps", "mobile", "makeElevationProps", "makeLayoutItemProps", "makeRoundedProps", "omit", "makeFocusTrapProps", "makeTagProps", "tag", "makeThemeProps", "VNavigationDrawer", "genericComponent", "name", "props", "emits", "val", "setup", "_ref", "attrs", "emit", "slots", "isRtl", "useRtl", "themeClasses", "provideTheme", "borderClasses", "useBorder", "backgroundColorClasses", "backgroundColorStyles", "useBackgroundColor", "elevationClasses", "useElevation", "displayClasses", "useDisplay", "roundedClasses", "useRounded", "router", "useRouter", "isActive", "useProxiedModel", "v", "ssrBootStyles", "useSsrBoot", "scopeId", "useScopeId", "rootEl", "ref", "isHovering", "shallowRef", "runOpenDelay", "runCloseDelay", "useDelay", "computed", "toPhysical", "isPersistent", "toRef", "isTemporary", "isSticky", "useFocusTrap", "localTop", "contentEl", "useToggleScope", "watch", "nextTick", "currentRoute", "isDragging", "dragProgress", "useTouch", "el", "position", "layoutSize", "size", "layoutItemStyles", "layoutItemScrimStyles", "useLayoutItem", "id", "order", "parseInt", "elementSize", "active", "readonly", "disableTransitions", "absolute", "isStuck", "stickyStyles", "useSticky", "scrimColor", "scrimStyles", "opacity", "transition", "undefined", "provideDefaults", "VList", "bgColor", "useRender", "hasImage", "_createElementVNode", "_Fragment", "_createVNode", "_mergeProps", "class", "style", "VImg", "VDefaultsProvider", "alt", "cover", "height", "src", "prepend", "append", "Transition", "onClick"]
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
import {
|
||||
useColor
|
||||
} from "./chunk-BHV5Z34M.js";
|
||||
import {
|
||||
getCurrentInstanceName,
|
||||
propsFactory
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
Fragment,
|
||||
createBaseVNode,
|
||||
normalizeClass,
|
||||
toRef,
|
||||
toValue
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/composables/variant.js
|
||||
var allowedVariants = ["elevated", "flat", "tonal", "outlined", "text", "plain"];
|
||||
function genOverlays(isClickable, name) {
|
||||
return createBaseVNode(Fragment, null, [isClickable && createBaseVNode("span", {
|
||||
"key": "overlay",
|
||||
"class": normalizeClass(`${name}__overlay`)
|
||||
}, null), createBaseVNode("span", {
|
||||
"key": "underlay",
|
||||
"class": normalizeClass(`${name}__underlay`)
|
||||
}, null)]);
|
||||
}
|
||||
var makeVariantProps = propsFactory({
|
||||
color: String,
|
||||
variant: {
|
||||
type: String,
|
||||
default: "elevated",
|
||||
validator: (v) => allowedVariants.includes(v)
|
||||
}
|
||||
}, "variant");
|
||||
function useVariant(props) {
|
||||
let name = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : getCurrentInstanceName();
|
||||
const variantClasses = toRef(() => {
|
||||
const {
|
||||
variant
|
||||
} = toValue(props);
|
||||
return `${name}--variant-${variant}`;
|
||||
});
|
||||
const {
|
||||
colorClasses,
|
||||
colorStyles
|
||||
} = useColor(() => {
|
||||
const {
|
||||
variant,
|
||||
color
|
||||
} = toValue(props);
|
||||
return {
|
||||
[["elevated", "flat"].includes(variant) ? "background" : "text"]: color
|
||||
};
|
||||
});
|
||||
return {
|
||||
colorClasses,
|
||||
colorStyles,
|
||||
variantClasses
|
||||
};
|
||||
}
|
||||
|
||||
export {
|
||||
genOverlays,
|
||||
makeVariantProps,
|
||||
useVariant
|
||||
};
|
||||
//# sourceMappingURL=chunk-ADXDXPPR.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/composables/variant.tsx"],
|
||||
"sourcesContent": ["// Composables\nimport { useColor } from '@/composables/color'\n\n// Utilities\nimport { toRef, toValue } from 'vue'\nimport { getCurrentInstanceName, propsFactory } from '@/util'\n\n// Types\nimport type { MaybeRefOrGetter, PropType } from 'vue'\n\nexport const allowedVariants = [\n 'elevated',\n 'flat',\n 'tonal',\n 'outlined',\n 'text',\n 'plain',\n] as const\n\nexport type Variant = typeof allowedVariants[number]\n\nexport interface VariantProps {\n color?: string\n variant: Variant\n}\n\nexport function genOverlays (isClickable: boolean, name: string) {\n return (\n <>\n { isClickable && <span key=\"overlay\" class={ `${name}__overlay` } /> }\n\n <span key=\"underlay\" class={ `${name}__underlay` } />\n </>\n )\n}\n\nexport const makeVariantProps = propsFactory({\n color: String,\n variant: {\n type: String as PropType<Variant>,\n default: 'elevated',\n validator: (v: any) => allowedVariants.includes(v),\n },\n}, 'variant')\n\nexport function useVariant (\n props: MaybeRefOrGetter<VariantProps>,\n name = getCurrentInstanceName(),\n) {\n const variantClasses = toRef(() => {\n const { variant } = toValue(props)\n return `${name}--variant-${variant}`\n })\n\n const { colorClasses, colorStyles } = useColor(() => {\n const { variant, color } = toValue(props)\n return {\n [['elevated', 'flat'].includes(variant) ? 'background' : 'text']: color,\n }\n })\n\n return { colorClasses, colorStyles, variantClasses }\n}\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;AAUO,IAAMA,kBAAkB,CAC7B,YACA,QACA,SACA,YACA,QACA,OAAO;AAUF,SAASC,YAAaC,aAAsBC,MAAc;AAC/D,SAAAC,gBAAAC,UAAA,MAAA,CAEMH,eAAWE,gBAAA,QAAA;IAAA,OAAA;IAAA,SAAAE,eAAgC,GAAGH,IAAI,WAAW;EAAA,GAAA,IAAA,GAAKC,gBAAA,QAAA;IAAA,OAAA;IAAA,SAAAE,eAEvC,GAAGH,IAAI,YAAY;EAAA,GAAA,IAAA,CAAA,CAAA;AAGtD;AAEO,IAAMI,mBAAmBC,aAAa;EAC3CC,OAAOC;EACPC,SAAS;IACPC,MAAMF;IACNG,SAAS;IACTC,WAAYC,OAAWf,gBAAgBgB,SAASD,CAAC;EACnD;AACF,GAAG,SAAS;AAEL,SAASE,WACdC,OAEA;AAAA,MADAf,OAAIgB,UAAAC,SAAA,KAAAD,UAAA,CAAA,MAAAE,SAAAF,UAAA,CAAA,IAAGG,uBAAuB;AAE9B,QAAMC,iBAAiBC,MAAM,MAAM;AACjC,UAAM;MAAEb;IAAQ,IAAIc,QAAQP,KAAK;AACjC,WAAO,GAAGf,IAAI,aAAaQ,OAAO;EACpC,CAAC;AAED,QAAM;IAAEe;IAAcC;EAAY,IAAIC,SAAS,MAAM;AACnD,UAAM;MAAEjB;MAASF;IAAM,IAAIgB,QAAQP,KAAK;AACxC,WAAO;MACL,CAAC,CAAC,YAAY,MAAM,EAAEF,SAASL,OAAO,IAAI,eAAe,MAAM,GAAGF;IACpE;EACF,CAAC;AAED,SAAO;IAAEiB;IAAcC;IAAaJ;EAAe;AACrD;",
|
||||
"names": ["allowedVariants", "genOverlays", "isClickable", "name", "_createElementVNode", "_Fragment", "_normalizeClass", "makeVariantProps", "propsFactory", "color", "String", "variant", "type", "default", "validator", "v", "includes", "useVariant", "props", "arguments", "length", "undefined", "getCurrentInstanceName", "variantClasses", "toRef", "toValue", "colorClasses", "colorStyles", "useColor"]
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
import {
|
||||
SUPPORTS_INTERSECTION
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
onScopeDispose,
|
||||
ref,
|
||||
shallowRef,
|
||||
watch
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/composables/intersectionObserver.js
|
||||
function useIntersectionObserver(callback, options) {
|
||||
const intersectionRef = ref();
|
||||
const isIntersecting = shallowRef(false);
|
||||
if (SUPPORTS_INTERSECTION) {
|
||||
const observer = new IntersectionObserver((entries) => {
|
||||
callback?.(entries, observer);
|
||||
isIntersecting.value = !!entries.find((entry) => entry.isIntersecting);
|
||||
}, options);
|
||||
onScopeDispose(() => {
|
||||
observer.disconnect();
|
||||
});
|
||||
watch(intersectionRef, (newValue, oldValue) => {
|
||||
if (oldValue) {
|
||||
observer.unobserve(oldValue);
|
||||
isIntersecting.value = false;
|
||||
}
|
||||
if (newValue) observer.observe(newValue);
|
||||
}, {
|
||||
flush: "post"
|
||||
});
|
||||
}
|
||||
return {
|
||||
intersectionRef,
|
||||
isIntersecting
|
||||
};
|
||||
}
|
||||
|
||||
export {
|
||||
useIntersectionObserver
|
||||
};
|
||||
//# sourceMappingURL=chunk-AJ7MUB7M.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/composables/intersectionObserver.ts"],
|
||||
"sourcesContent": ["// Utilities\nimport { onScopeDispose, ref, shallowRef, watch } from 'vue'\nimport { SUPPORTS_INTERSECTION } from '@/util'\n\nexport function useIntersectionObserver (callback?: IntersectionObserverCallback, options?: IntersectionObserverInit) {\n const intersectionRef = ref<HTMLElement>()\n const isIntersecting = shallowRef(false)\n\n if (SUPPORTS_INTERSECTION) {\n const observer = new IntersectionObserver((entries: IntersectionObserverEntry[]) => {\n callback?.(entries, observer)\n\n isIntersecting.value = !!entries.find(entry => entry.isIntersecting)\n }, options)\n\n onScopeDispose(() => {\n observer.disconnect()\n })\n\n watch(intersectionRef, (newValue, oldValue) => {\n if (oldValue) {\n observer.unobserve(oldValue)\n isIntersecting.value = false\n }\n\n if (newValue) observer.observe(newValue)\n }, {\n flush: 'post',\n })\n }\n\n return { intersectionRef, isIntersecting }\n}\n"],
|
||||
"mappings": ";;;;;;;;;;;AAIO,SAASA,wBAAyBC,UAAyCC,SAAoC;AACpH,QAAMC,kBAAkBC,IAAiB;AACzC,QAAMC,iBAAiBC,WAAW,KAAK;AAEvC,MAAIC,uBAAuB;AACzB,UAAMC,WAAW,IAAIC,qBAAsBC,aAAyC;AAClFT,iBAAWS,SAASF,QAAQ;AAE5BH,qBAAeM,QAAQ,CAAC,CAACD,QAAQE,KAAKC,WAASA,MAAMR,cAAc;IACrE,GAAGH,OAAO;AAEVY,mBAAe,MAAM;AACnBN,eAASO,WAAW;IACtB,CAAC;AAEDC,UAAMb,iBAAiB,CAACc,UAAUC,aAAa;AAC7C,UAAIA,UAAU;AACZV,iBAASW,UAAUD,QAAQ;AAC3Bb,uBAAeM,QAAQ;MACzB;AAEA,UAAIM,SAAUT,UAASY,QAAQH,QAAQ;IACzC,GAAG;MACDI,OAAO;IACT,CAAC;EACH;AAEA,SAAO;IAAElB;IAAiBE;EAAe;AAC3C;",
|
||||
"names": ["useIntersectionObserver", "callback", "options", "intersectionRef", "ref", "isIntersecting", "shallowRef", "SUPPORTS_INTERSECTION", "observer", "IntersectionObserver", "entries", "value", "find", "entry", "onScopeDispose", "disconnect", "watch", "newValue", "oldValue", "unobserve", "observe", "flush"]
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
import {
|
||||
getCurrentInstanceName,
|
||||
propsFactory
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
computed,
|
||||
isRef
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/composables/rounded.js
|
||||
var makeRoundedProps = propsFactory({
|
||||
rounded: {
|
||||
type: [Boolean, Number, String],
|
||||
default: void 0
|
||||
},
|
||||
tile: Boolean
|
||||
}, "rounded");
|
||||
function useRounded(props) {
|
||||
let name = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : getCurrentInstanceName();
|
||||
const roundedClasses = computed(() => {
|
||||
const rounded = isRef(props) ? props.value : props.rounded;
|
||||
const tile = isRef(props) ? false : props.tile;
|
||||
const classes = [];
|
||||
if (tile || rounded === false) {
|
||||
classes.push("rounded-0");
|
||||
} else if (rounded === true || rounded === "") {
|
||||
classes.push(`${name}--rounded`);
|
||||
} else if (typeof rounded === "string" || rounded === 0) {
|
||||
for (const value of String(rounded).split(" ")) {
|
||||
classes.push(`rounded-${value}`);
|
||||
}
|
||||
}
|
||||
return classes;
|
||||
});
|
||||
return {
|
||||
roundedClasses
|
||||
};
|
||||
}
|
||||
|
||||
export {
|
||||
makeRoundedProps,
|
||||
useRounded
|
||||
};
|
||||
//# sourceMappingURL=chunk-AQK3CYVW.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/composables/rounded.ts"],
|
||||
"sourcesContent": ["// Utilities\nimport { computed, isRef } from 'vue'\nimport { getCurrentInstanceName, propsFactory } from '@/util'\n\n// Types\nimport type { Ref } from 'vue'\n\ntype RoundedValue = boolean | string | number | null | undefined\n\nexport interface RoundedProps {\n rounded?: RoundedValue\n tile?: boolean\n}\n\ntype RoundedData = {\n roundedClasses: Ref<string[]>\n}\n\n// Composables\nexport const makeRoundedProps = propsFactory({\n rounded: {\n type: [Boolean, Number, String],\n default: undefined,\n },\n tile: Boolean,\n}, 'rounded')\n\nexport function useRounded (\n props: RoundedProps | Ref<RoundedValue>,\n name = getCurrentInstanceName(),\n): RoundedData {\n const roundedClasses = computed(() => {\n const rounded = isRef(props) ? props.value : props.rounded\n const tile = isRef(props) ? false : props.tile\n const classes: string[] = []\n\n if (tile || rounded === false) {\n classes.push('rounded-0')\n } else if (rounded === true || rounded === '') {\n classes.push(`${name}--rounded`)\n } else if (typeof rounded === 'string' || rounded === 0) {\n for (const value of String(rounded).split(' ')) {\n classes.push(`rounded-${value}`)\n }\n }\n\n return classes\n })\n\n return { roundedClasses }\n}\n"],
|
||||
"mappings": ";;;;;;;;;;AAmBO,IAAMA,mBAAmBC,aAAa;EAC3CC,SAAS;IACPC,MAAM,CAACC,SAASC,QAAQC,MAAM;IAC9BC,SAASC;EACX;EACAC,MAAML;AACR,GAAG,SAAS;AAEL,SAASM,WACdC,OAEa;AAAA,MADbC,OAAIC,UAAAC,SAAA,KAAAD,UAAA,CAAA,MAAAL,SAAAK,UAAA,CAAA,IAAGE,uBAAuB;AAE9B,QAAMC,iBAAiBC,SAAS,MAAM;AACpC,UAAMf,UAAUgB,MAAMP,KAAK,IAAIA,MAAMQ,QAAQR,MAAMT;AACnD,UAAMO,OAAOS,MAAMP,KAAK,IAAI,QAAQA,MAAMF;AAC1C,UAAMW,UAAoB,CAAA;AAE1B,QAAIX,QAAQP,YAAY,OAAO;AAC7BkB,cAAQC,KAAK,WAAW;IAC1B,WAAWnB,YAAY,QAAQA,YAAY,IAAI;AAC7CkB,cAAQC,KAAK,GAAGT,IAAI,WAAW;IACjC,WAAW,OAAOV,YAAY,YAAYA,YAAY,GAAG;AACvD,iBAAWiB,SAASb,OAAOJ,OAAO,EAAEoB,MAAM,GAAG,GAAG;AAC9CF,gBAAQC,KAAK,WAAWF,KAAK,EAAE;MACjC;IACF;AAEA,WAAOC;EACT,CAAC;AAED,SAAO;IAAEJ;EAAe;AAC1B;",
|
||||
"names": ["makeRoundedProps", "propsFactory", "rounded", "type", "Boolean", "Number", "String", "default", "undefined", "tile", "useRounded", "props", "name", "arguments", "length", "getCurrentInstanceName", "roundedClasses", "computed", "isRef", "value", "classes", "push", "split"]
|
||||
}
|
||||
+394
@@ -0,0 +1,394 @@
|
||||
import {
|
||||
PREFERS_REDUCED_MOTION,
|
||||
acceleratedEasing,
|
||||
animate,
|
||||
deceleratedEasing,
|
||||
genericComponent,
|
||||
getTargetBox,
|
||||
nullifyTransforms,
|
||||
propsFactory,
|
||||
standardEasing
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
Transition,
|
||||
TransitionGroup,
|
||||
camelize,
|
||||
createVNode,
|
||||
h,
|
||||
mergeProps
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/transitions/createTransition.js
|
||||
var makeTransitionProps = propsFactory({
|
||||
disabled: Boolean,
|
||||
group: Boolean,
|
||||
hideOnLeave: Boolean,
|
||||
leaveAbsolute: Boolean,
|
||||
mode: String,
|
||||
origin: String
|
||||
}, "transition");
|
||||
function createCssTransition(name, origin, mode) {
|
||||
return genericComponent()({
|
||||
name,
|
||||
props: makeTransitionProps({
|
||||
mode,
|
||||
origin
|
||||
}),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
const functions = {
|
||||
onBeforeEnter(el) {
|
||||
if (props.origin) {
|
||||
el.style.transformOrigin = props.origin;
|
||||
}
|
||||
},
|
||||
onLeave(el) {
|
||||
if (props.leaveAbsolute) {
|
||||
const {
|
||||
offsetTop,
|
||||
offsetLeft,
|
||||
offsetWidth,
|
||||
offsetHeight
|
||||
} = el;
|
||||
el._transitionInitialStyles = {
|
||||
position: el.style.position,
|
||||
top: el.style.top,
|
||||
left: el.style.left,
|
||||
width: el.style.width,
|
||||
height: el.style.height
|
||||
};
|
||||
el.style.position = "absolute";
|
||||
el.style.top = `${offsetTop}px`;
|
||||
el.style.left = `${offsetLeft}px`;
|
||||
el.style.width = `${offsetWidth}px`;
|
||||
el.style.height = `${offsetHeight}px`;
|
||||
}
|
||||
if (props.hideOnLeave) {
|
||||
el.style.setProperty("display", "none", "important");
|
||||
}
|
||||
},
|
||||
onAfterLeave(el) {
|
||||
if (props.leaveAbsolute && el?._transitionInitialStyles) {
|
||||
const {
|
||||
position,
|
||||
top,
|
||||
left,
|
||||
width,
|
||||
height
|
||||
} = el._transitionInitialStyles;
|
||||
delete el._transitionInitialStyles;
|
||||
el.style.position = position || "";
|
||||
el.style.top = top || "";
|
||||
el.style.left = left || "";
|
||||
el.style.width = width || "";
|
||||
el.style.height = height || "";
|
||||
}
|
||||
}
|
||||
};
|
||||
return () => {
|
||||
const tag = props.group ? TransitionGroup : Transition;
|
||||
return h(tag, {
|
||||
name: props.disabled ? "" : name,
|
||||
css: !props.disabled,
|
||||
...props.group ? void 0 : {
|
||||
mode: props.mode
|
||||
},
|
||||
...props.disabled ? {} : functions
|
||||
}, slots.default);
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
function createJavascriptTransition(name, functions) {
|
||||
let mode = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "in-out";
|
||||
return genericComponent()({
|
||||
name,
|
||||
props: {
|
||||
mode: {
|
||||
type: String,
|
||||
default: mode
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: PREFERS_REDUCED_MOTION()
|
||||
},
|
||||
group: Boolean
|
||||
},
|
||||
setup(props, _ref2) {
|
||||
let {
|
||||
slots
|
||||
} = _ref2;
|
||||
const tag = props.group ? TransitionGroup : Transition;
|
||||
return () => {
|
||||
return h(tag, {
|
||||
name: props.disabled ? "" : name,
|
||||
css: !props.disabled,
|
||||
// mode: props.mode, // TODO: vuejs/vue-next#3104
|
||||
...props.disabled ? {} : functions
|
||||
}, slots.default);
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// node_modules/vuetify/lib/components/transitions/expand-transition.js
|
||||
function expand_transition_default() {
|
||||
let expandedParentClass = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
||||
let x = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
||||
const sizeProperty = x ? "width" : "height";
|
||||
const offsetProperty = camelize(`offset-${sizeProperty}`);
|
||||
return {
|
||||
onBeforeEnter(el) {
|
||||
el._parent = el.parentNode;
|
||||
el._initialStyle = {
|
||||
transition: el.style.transition,
|
||||
overflow: el.style.overflow,
|
||||
[sizeProperty]: el.style[sizeProperty]
|
||||
};
|
||||
},
|
||||
onEnter(el) {
|
||||
const initialStyle = el._initialStyle;
|
||||
if (!initialStyle) return;
|
||||
el.style.setProperty("transition", "none", "important");
|
||||
el.style.overflow = "hidden";
|
||||
const offset = `${el[offsetProperty]}px`;
|
||||
el.style[sizeProperty] = "0";
|
||||
void el.offsetHeight;
|
||||
el.style.transition = initialStyle.transition;
|
||||
if (expandedParentClass && el._parent) {
|
||||
el._parent.classList.add(expandedParentClass);
|
||||
}
|
||||
requestAnimationFrame(() => {
|
||||
el.style[sizeProperty] = offset;
|
||||
});
|
||||
},
|
||||
onAfterEnter: resetStyles,
|
||||
onEnterCancelled: resetStyles,
|
||||
onLeave(el) {
|
||||
el._initialStyle = {
|
||||
transition: "",
|
||||
overflow: el.style.overflow,
|
||||
[sizeProperty]: el.style[sizeProperty]
|
||||
};
|
||||
el.style.overflow = "hidden";
|
||||
el.style[sizeProperty] = `${el[offsetProperty]}px`;
|
||||
void el.offsetHeight;
|
||||
requestAnimationFrame(() => el.style[sizeProperty] = "0");
|
||||
},
|
||||
onAfterLeave,
|
||||
onLeaveCancelled: onAfterLeave
|
||||
};
|
||||
function onAfterLeave(el) {
|
||||
if (expandedParentClass && el._parent) {
|
||||
el._parent.classList.remove(expandedParentClass);
|
||||
}
|
||||
resetStyles(el);
|
||||
}
|
||||
function resetStyles(el) {
|
||||
if (!el._initialStyle) return;
|
||||
const size = el._initialStyle[sizeProperty];
|
||||
el.style.overflow = el._initialStyle.overflow;
|
||||
if (size != null) el.style[sizeProperty] = size;
|
||||
delete el._initialStyle;
|
||||
}
|
||||
}
|
||||
|
||||
// node_modules/vuetify/lib/components/transitions/dialog-transition.js
|
||||
var makeVDialogTransitionProps = propsFactory({
|
||||
target: [Object, Array]
|
||||
}, "v-dialog-transition");
|
||||
var saved = /* @__PURE__ */ new WeakMap();
|
||||
var VDialogTransition = genericComponent()({
|
||||
name: "VDialogTransition",
|
||||
props: makeVDialogTransitionProps(),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
const functions = {
|
||||
onBeforeEnter(el) {
|
||||
el.style.pointerEvents = "none";
|
||||
el.style.visibility = "hidden";
|
||||
},
|
||||
async onEnter(el, done) {
|
||||
await new Promise((resolve) => requestAnimationFrame(resolve));
|
||||
await new Promise((resolve) => requestAnimationFrame(resolve));
|
||||
el.style.visibility = "";
|
||||
const dimensions = getDimensions(props.target, el);
|
||||
const {
|
||||
x,
|
||||
y,
|
||||
sx,
|
||||
sy,
|
||||
speed
|
||||
} = dimensions;
|
||||
saved.set(el, dimensions);
|
||||
if (PREFERS_REDUCED_MOTION()) {
|
||||
animate(el, [{
|
||||
opacity: 0
|
||||
}, {}], {
|
||||
duration: 125 * speed,
|
||||
easing: deceleratedEasing
|
||||
}).finished.then(() => done());
|
||||
} else {
|
||||
const animation = animate(el, [{
|
||||
transform: `translate(${x}px, ${y}px) scale(${sx}, ${sy})`,
|
||||
opacity: 0
|
||||
}, {}], {
|
||||
duration: 225 * speed,
|
||||
easing: deceleratedEasing
|
||||
});
|
||||
getChildren(el)?.forEach((el2) => {
|
||||
animate(el2, [{
|
||||
opacity: 0
|
||||
}, {
|
||||
opacity: 0,
|
||||
offset: 0.33
|
||||
}, {}], {
|
||||
duration: 225 * 2 * speed,
|
||||
easing: standardEasing
|
||||
});
|
||||
});
|
||||
animation.finished.then(() => done());
|
||||
}
|
||||
},
|
||||
onAfterEnter(el) {
|
||||
el.style.removeProperty("pointer-events");
|
||||
},
|
||||
onBeforeLeave(el) {
|
||||
el.style.pointerEvents = "none";
|
||||
},
|
||||
async onLeave(el, done) {
|
||||
await new Promise((resolve) => requestAnimationFrame(resolve));
|
||||
let dimensions;
|
||||
if (!saved.has(el) || Array.isArray(props.target) || props.target.offsetParent || props.target.getClientRects().length) {
|
||||
dimensions = getDimensions(props.target, el);
|
||||
} else {
|
||||
dimensions = saved.get(el);
|
||||
}
|
||||
const {
|
||||
x,
|
||||
y,
|
||||
sx,
|
||||
sy,
|
||||
speed
|
||||
} = dimensions;
|
||||
if (PREFERS_REDUCED_MOTION()) {
|
||||
animate(el, [{}, {
|
||||
opacity: 0
|
||||
}], {
|
||||
duration: 85 * speed,
|
||||
easing: acceleratedEasing
|
||||
}).finished.then(() => done());
|
||||
} else {
|
||||
const animation = animate(el, [{}, {
|
||||
transform: `translate(${x}px, ${y}px) scale(${sx}, ${sy})`,
|
||||
opacity: 0
|
||||
}], {
|
||||
duration: 125 * speed,
|
||||
easing: acceleratedEasing
|
||||
});
|
||||
animation.finished.then(() => done());
|
||||
getChildren(el)?.forEach((el2) => {
|
||||
animate(el2, [{}, {
|
||||
opacity: 0,
|
||||
offset: 0.2
|
||||
}, {
|
||||
opacity: 0
|
||||
}], {
|
||||
duration: 125 * 2 * speed,
|
||||
easing: standardEasing
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
onAfterLeave(el) {
|
||||
el.style.removeProperty("pointer-events");
|
||||
}
|
||||
};
|
||||
return () => {
|
||||
return props.target ? createVNode(Transition, mergeProps({
|
||||
"name": "dialog-transition"
|
||||
}, functions, {
|
||||
"css": false
|
||||
}), slots) : createVNode(Transition, {
|
||||
"name": "dialog-transition"
|
||||
}, slots);
|
||||
};
|
||||
}
|
||||
});
|
||||
function getChildren(el) {
|
||||
const els = el.querySelector(":scope > .v-card, :scope > .v-sheet, :scope > .v-list")?.children;
|
||||
return els && [...els];
|
||||
}
|
||||
function getDimensions(target, el) {
|
||||
const targetBox = getTargetBox(target);
|
||||
const elBox = nullifyTransforms(el);
|
||||
const [originX, originY] = getComputedStyle(el).transformOrigin.split(" ").map((v) => parseFloat(v));
|
||||
const [anchorSide, anchorOffset] = getComputedStyle(el).getPropertyValue("--v-overlay-anchor-origin").split(" ");
|
||||
let offsetX = targetBox.left + targetBox.width / 2;
|
||||
if (anchorSide === "left" || anchorOffset === "left") {
|
||||
offsetX -= targetBox.width / 2;
|
||||
} else if (anchorSide === "right" || anchorOffset === "right") {
|
||||
offsetX += targetBox.width / 2;
|
||||
}
|
||||
let offsetY = targetBox.top + targetBox.height / 2;
|
||||
if (anchorSide === "top" || anchorOffset === "top") {
|
||||
offsetY -= targetBox.height / 2;
|
||||
} else if (anchorSide === "bottom" || anchorOffset === "bottom") {
|
||||
offsetY += targetBox.height / 2;
|
||||
}
|
||||
const tsx = targetBox.width / elBox.width;
|
||||
const tsy = targetBox.height / elBox.height;
|
||||
const maxs = Math.max(1, tsx, tsy);
|
||||
const sx = tsx / maxs || 0;
|
||||
const sy = tsy / maxs || 0;
|
||||
const asa = elBox.width * elBox.height / (window.innerWidth * window.innerHeight);
|
||||
const speed = asa > 0.12 ? Math.min(1.5, (asa - 0.12) * 10 + 1) : 1;
|
||||
return {
|
||||
x: offsetX - (originX + elBox.left),
|
||||
y: offsetY - (originY + elBox.top),
|
||||
sx,
|
||||
sy,
|
||||
speed
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/vuetify/lib/components/transitions/index.js
|
||||
var VFabTransition = createCssTransition("fab-transition", "center center", "out-in");
|
||||
var VDialogBottomTransition = createCssTransition("dialog-bottom-transition");
|
||||
var VDialogTopTransition = createCssTransition("dialog-top-transition");
|
||||
var VFadeTransition = createCssTransition("fade-transition");
|
||||
var VScaleTransition = createCssTransition("scale-transition");
|
||||
var VScrollXTransition = createCssTransition("scroll-x-transition");
|
||||
var VScrollXReverseTransition = createCssTransition("scroll-x-reverse-transition");
|
||||
var VScrollYTransition = createCssTransition("scroll-y-transition");
|
||||
var VScrollYReverseTransition = createCssTransition("scroll-y-reverse-transition");
|
||||
var VSlideXTransition = createCssTransition("slide-x-transition");
|
||||
var VSlideXReverseTransition = createCssTransition("slide-x-reverse-transition");
|
||||
var VSlideYTransition = createCssTransition("slide-y-transition");
|
||||
var VSlideYReverseTransition = createCssTransition("slide-y-reverse-transition");
|
||||
var VExpandTransition = createJavascriptTransition("expand-transition", expand_transition_default());
|
||||
var VExpandXTransition = createJavascriptTransition("expand-x-transition", expand_transition_default("", true));
|
||||
|
||||
export {
|
||||
VDialogTransition,
|
||||
VFabTransition,
|
||||
VDialogBottomTransition,
|
||||
VDialogTopTransition,
|
||||
VFadeTransition,
|
||||
VScaleTransition,
|
||||
VScrollXTransition,
|
||||
VScrollXReverseTransition,
|
||||
VScrollYTransition,
|
||||
VScrollYReverseTransition,
|
||||
VSlideXTransition,
|
||||
VSlideXReverseTransition,
|
||||
VSlideYTransition,
|
||||
VSlideYReverseTransition,
|
||||
VExpandTransition,
|
||||
VExpandXTransition
|
||||
};
|
||||
//# sourceMappingURL=chunk-B4JFJDWM.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/transitions/createTransition.ts", "../../vuetify/src/components/transitions/expand-transition.ts", "../../vuetify/src/components/transitions/dialog-transition.tsx", "../../vuetify/src/components/transitions/index.ts"],
|
||||
"sourcesContent": ["// Utilities\nimport { h, Transition, TransitionGroup } from 'vue'\nimport { genericComponent, PREFERS_REDUCED_MOTION, propsFactory } from '@/util'\n\n// Types\nimport type { FunctionalComponent, PropType } from 'vue'\n\nexport const makeTransitionProps = propsFactory({\n disabled: Boolean,\n group: Boolean,\n hideOnLeave: Boolean,\n leaveAbsolute: Boolean,\n mode: String,\n origin: String,\n}, 'transition')\n\nexport function createCssTransition (\n name: string,\n origin?: string,\n mode?: string\n) {\n return genericComponent()({\n name,\n\n props: makeTransitionProps({\n mode,\n origin,\n }),\n\n setup (props, { slots }) {\n const functions = {\n onBeforeEnter (el: HTMLElement) {\n if (props.origin) {\n el.style.transformOrigin = props.origin\n }\n },\n onLeave (el: HTMLElement) {\n if (props.leaveAbsolute) {\n const { offsetTop, offsetLeft, offsetWidth, offsetHeight } = el\n el._transitionInitialStyles = {\n position: el.style.position,\n top: el.style.top,\n left: el.style.left,\n width: el.style.width,\n height: el.style.height,\n }\n el.style.position = 'absolute'\n el.style.top = `${offsetTop}px`\n el.style.left = `${offsetLeft}px`\n el.style.width = `${offsetWidth}px`\n el.style.height = `${offsetHeight}px`\n }\n\n if (props.hideOnLeave) {\n el.style.setProperty('display', 'none', 'important')\n }\n },\n onAfterLeave (el: HTMLElement) {\n if (props.leaveAbsolute && el?._transitionInitialStyles) {\n const { position, top, left, width, height } = el._transitionInitialStyles\n delete el._transitionInitialStyles\n el.style.position = position || ''\n el.style.top = top || ''\n el.style.left = left || ''\n el.style.width = width || ''\n el.style.height = height || ''\n }\n },\n }\n\n return () => {\n const tag = props.group ? TransitionGroup : Transition\n\n return h(tag as FunctionalComponent, {\n name: props.disabled ? '' : name,\n css: !props.disabled,\n ...(props.group ? undefined : { mode: props.mode }),\n ...(props.disabled ? {} : functions),\n }, slots.default)\n }\n },\n })\n}\n\nexport function createJavascriptTransition (\n name: string,\n functions: Record<string, any>,\n mode = 'in-out'\n) {\n return genericComponent()({\n name,\n\n props: {\n mode: {\n type: String as PropType<'in-out' | 'out-in' | 'default'>,\n default: mode,\n },\n disabled: {\n type: Boolean,\n default: PREFERS_REDUCED_MOTION(),\n },\n group: Boolean,\n },\n\n setup (props, { slots }) {\n const tag = props.group ? TransitionGroup : Transition\n\n return () => {\n return h(tag as FunctionalComponent, {\n name: props.disabled ? '' : name,\n css: !props.disabled,\n // mode: props.mode, // TODO: vuejs/vue-next#3104\n ...(props.disabled ? {} : functions),\n }, slots.default)\n }\n },\n })\n}\n", "// Utilities\nimport { camelize } from 'vue'\n\ninterface HTMLExpandElement extends HTMLElement {\n _parent?: (Node & ParentNode & HTMLElement) | null\n _initialStyle?: {\n transition: string\n overflow: string\n height?: string | null\n width?: string | null\n }\n}\n\nexport default function (expandedParentClass = '', x = false) {\n const sizeProperty = x ? 'width' : 'height' as 'width' | 'height'\n const offsetProperty = camelize(`offset-${sizeProperty}`) as 'offsetHeight' | 'offsetWidth'\n\n return {\n onBeforeEnter (el: HTMLExpandElement) {\n el._parent = el.parentNode as (Node & ParentNode & HTMLElement) | null\n el._initialStyle = {\n transition: el.style.transition,\n overflow: el.style.overflow,\n [sizeProperty]: el.style[sizeProperty],\n }\n },\n\n onEnter (el: HTMLExpandElement) {\n const initialStyle = el._initialStyle\n if (!initialStyle) return\n\n el.style.setProperty('transition', 'none', 'important')\n // Hide overflow to account for collapsed margins in the calculated height\n el.style.overflow = 'hidden'\n const offset = `${el[offsetProperty]}px`\n\n el.style[sizeProperty] = '0'\n\n void el.offsetHeight // force reflow\n\n el.style.transition = initialStyle.transition\n\n if (expandedParentClass && el._parent) {\n el._parent.classList.add(expandedParentClass)\n }\n\n requestAnimationFrame(() => {\n el.style[sizeProperty] = offset\n })\n },\n\n onAfterEnter: resetStyles,\n onEnterCancelled: resetSt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AAYP,QAAQlB,IAAI,CAC5B;YAAE0B,WAAW,aAAaf,CAAC,OAAOC,CAAC,aAAaC,EAAE,KAAKC,EAAE;YAAKK,SAAS;UAAE,GACzE,CAAC,CAAC,GACD;YACDC,UAAU,MAAML;YAChBM,QAAQC;UACV,CAAC;AACDK,sBAAY3B,EAAE,GAAG4B,QAAQ5B,CAAAA,QAAM;AAC7BkB,oBAAQlB,KAAI,CACV;cAAEmB,SAAS;YAAE,GACb;cAAEA,SAAS;cAAGU,QAAQ;YAAK,GAC3B,CAAC,CAAC,GACD;cACDT,UAAU,MAAM,IAAIL;cACpBM,QAAQS;YACV,CAAC;UACH,CAAC;AACDL,oBAAUF,SAASC,KAAK,MAAMnB,KAAK,CAAC;QACtC;MACF;MACA0B,aAAc/B,IAAa;AACxBA,WAAmBC,MAAM+B,eAAe,gBAAgB;MAC3D;MACAC,cAAejC,IAAa;AACzBA,WAAmBC,MAAMC,gBAAgB;MAC5C;MACA,MAAMgC,QAASlC,IAAaK,MAAkB;AAC5C,cAAM,IAAIC,QAAQC,aAAWC,sBAAsBD,OAAO,CAAC;AAE3D,YAAIE;AACJ,YACE,CAACpB,MAAM8C,IAAInC,EAAE,KACbZ,MAAMgD,QAAQ1C,MAAMR,MAAM,KAC1BQ,MAAMR,OAAQmD,gBACd3C,MAAMR,OAAQoD,eAAe,EAAEC,QAC/B;AACA9B,uBAAaC,cAAchB,MAAMR,QAASc,EAAiB;QAC7D,OAAO;AACLS,uBAAapB,MAALine truncated
|
||||
"names": ["makeTransitionProps", "propsFactory", "disabled", "Boolean", "group", "hideOnLeave", "leaveAbsolute", "mode", "String", "origin", "createCssTransition", "name", "genericComponent", "props", "setup", "_ref", "slots", "functions", "onBeforeEnter", "el", "style", "transformOrigin", "onLeave", "offsetTop", "offsetLeft", "offsetWidth", "offsetHeight", "_transitionInitialStyles", "position", "top", "left", "width", "height", "setProperty", "onAfterLeave", "tag", "TransitionGroup", "Transition", "h", "css", "undefined", "default", "createJavascriptTransition", "arguments", "length", "type", "PREFERS_REDUCED_MOTION", "_ref2", "expandedParentClass", "arguments", "length", "undefined", "x", "sizeProperty", "offsetProperty", "camelize", "onBeforeEnter", "el", "_parent", "parentNode", "_initialStyle", "transition", "style", "overflow", "onEnter", "initialStyle", "setProperty", "offset", "offsetHeight", "classList", "add", "requestAnimationFrame", "onAfterEnter", "resetStyles", "onEnterCancelled", "onLeave", "onAfterLeave", "onLeaveCancelled", "remove", "size", "makeVDialogTransitionProps", "propsFactory", "target", "Object", "Array", "saved", "WeakMap", "VDialogTransition", "genericComponent", "name", "props", "setup", "_ref", "slots", "functions", "onBeforeEnter", "el", "style", "pointerEvents", "visibility", "onEnter", "done", "Promise", "resolve", "requestAnimationFrame", "dimensions", "getDimensions", "x", "y", "sx", "sy", "speed", "set", "PREFERS_REDUCED_MOTION", "animate", "opacity", "duration", "easing", "deceleratedEasing", "finished", "then", "animation", "transform", "getChildren", "forEach", "offset", "standardEasing", "onAfterEnter", "removeProperty", "onBeforeLeave", "onLeave", "has", "isArray", "offsetParent", "getClientRects", "length", "get", "acceleratedEasing", "onAfterLeave", "_createVNode", "Transition", "_mergeProps", "els", "querySelector", "children", "targetBox", "getTargetBox", "elBox", "nullifyTransforms", "originX", "originY", "getComputedStyle", "transformOrigin", "split", "map", "v", "parseFloat", "anchorSide", "anchorOffset", "getPropertyValue", "offsetX", "left", "width", "offsetY", "top", "height", "tsx", "tsy", "maxs", "Math", "max", "asa", "window", "innerWidth", "innerHeight", "min", "VFabTransition", "createCssTransition", "VDialogBottomTransition", "VDialogTopTransition", "VFadeTransition", "VScaleTransition", "VScrollXTransition", "VScrollXReverseTransition", "VScrollYTransition", "VScrollYReverseTransition", "VSlideXTransition", "VSlideXReverseTransition", "VSlideYTransition", "VSlideYReverseTransition", "VExpandTransition", "createJavascriptTransition", "ExpandTransitionGenerator", "VExpandXTransition"]
|
||||
}
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
import {
|
||||
destructComputed,
|
||||
getForeground,
|
||||
isCssColor,
|
||||
isParsableColor,
|
||||
parseColor
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
toValue
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/composables/color.js
|
||||
function useColor(colors) {
|
||||
return destructComputed(() => {
|
||||
const {
|
||||
class: colorClasses,
|
||||
style: colorStyles
|
||||
} = computeColor(colors);
|
||||
return {
|
||||
colorClasses,
|
||||
colorStyles
|
||||
};
|
||||
});
|
||||
}
|
||||
function useTextColor(color) {
|
||||
const {
|
||||
colorClasses: textColorClasses,
|
||||
colorStyles: textColorStyles
|
||||
} = useColor(() => ({
|
||||
text: toValue(color)
|
||||
}));
|
||||
return {
|
||||
textColorClasses,
|
||||
textColorStyles
|
||||
};
|
||||
}
|
||||
function useBackgroundColor(color) {
|
||||
const {
|
||||
colorClasses: backgroundColorClasses,
|
||||
colorStyles: backgroundColorStyles
|
||||
} = useColor(() => ({
|
||||
background: toValue(color)
|
||||
}));
|
||||
return {
|
||||
backgroundColorClasses,
|
||||
backgroundColorStyles
|
||||
};
|
||||
}
|
||||
function computeColor(colors) {
|
||||
const _colors = toValue(colors);
|
||||
const classes = [];
|
||||
const styles = {};
|
||||
if (_colors.background) {
|
||||
if (isCssColor(_colors.background)) {
|
||||
styles.backgroundColor = _colors.background;
|
||||
if (!_colors.text && isParsableColor(_colors.background)) {
|
||||
const backgroundColor = parseColor(_colors.background);
|
||||
if (backgroundColor.a == null || backgroundColor.a === 1) {
|
||||
const textColor = getForeground(backgroundColor);
|
||||
styles.color = textColor;
|
||||
styles.caretColor = textColor;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
classes.push(`bg-${_colors.background}`);
|
||||
}
|
||||
}
|
||||
if (_colors.text) {
|
||||
if (isCssColor(_colors.text)) {
|
||||
styles.color = _colors.text;
|
||||
styles.caretColor = _colors.text;
|
||||
} else {
|
||||
classes.push(`text-${_colors.text}`);
|
||||
}
|
||||
}
|
||||
return {
|
||||
class: classes,
|
||||
style: styles
|
||||
};
|
||||
}
|
||||
|
||||
export {
|
||||
useColor,
|
||||
useTextColor,
|
||||
useBackgroundColor,
|
||||
computeColor
|
||||
};
|
||||
//# sourceMappingURL=chunk-BHV5Z34M.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/composables/color.ts"],
|
||||
"sourcesContent": ["// Utilities\nimport { toValue } from 'vue'\nimport { destructComputed, getForeground, isCssColor, isParsableColor, parseColor } from '@/util'\n\n// Types\nimport type { CSSProperties, MaybeRefOrGetter, Ref } from 'vue'\n\nexport type ColorValue = string | false | null | undefined\n\nexport interface TextColorData {\n textColorClasses: Ref<string[]>\n textColorStyles: Ref<CSSProperties>\n}\n\nexport interface BackgroundColorData {\n backgroundColorClasses: Ref<string[]>\n backgroundColorStyles: Ref<CSSProperties>\n}\n\n// Composables\nexport function useColor (colors: MaybeRefOrGetter<{ background?: ColorValue, text?: ColorValue }>) {\n return destructComputed(() => {\n const {\n class: colorClasses,\n style: colorStyles,\n } = computeColor(colors)\n\n return { colorClasses, colorStyles }\n })\n}\n\nexport function useTextColor (color: MaybeRefOrGetter<ColorValue>): TextColorData {\n const {\n colorClasses: textColorClasses,\n colorStyles: textColorStyles,\n } = useColor(() => ({\n text: toValue(color),\n }))\n\n return { textColorClasses, textColorStyles }\n}\n\nexport function useBackgroundColor (color: MaybeRefOrGetter<ColorValue>): BackgroundColorData {\n const {\n colorClasses: backgroundColorClasses,\n colorStyles: backgroundColorStyles,\n } = useColor(() => ({\n background: toValue(color),\n }))\n\n return { backgroundColorClasses, backgroundColorStyles }\n}\n\nexport function computeColor (colors: MaybeRefOrGetter<{ background?: ColorValue, text?: ColorValue }>) {\n const _colors = toValue(colors)\n const classes: string[] = []\n const styles: CSSProperties = {}\n\n if (_colors.background) {\n if (isCssColor(_colors.background)) {\n styles.backgroundColor = _colors.background\n\n if (!_colors.text && isParsableColor(_colors.background)) {\n const backgroundColor = parseColor(_colors.background)\n if (backgroundColor.a == null || backgroundColor.a === 1) {\n const textColor = getForeground(backgroundColor)\n\n styles.color = textColor\n styles.caretColor = textColor\n }\n }\n } else {\n classes.push(`bg-${_colors.background}`)\n }\n }\n\n if (_colors.text) {\n if (isCssColor(_colors.text)) {\n styles.color = _colors.text\n styles.caretColor = _colors.text\n } else {\n classes.push(`text-${_colors.text}`)\n }\n }\n\n return { class: classes, style: styles }\n}\n"],
|
||||
"mappings": ";;;;;;;;;;;;AAoBO,SAASA,SAAUC,QAA0E;AAClG,SAAOC,iBAAiB,MAAM;AAC5B,UAAM;MACJC,OAAOC;MACPC,OAAOC;IACT,IAAIC,aAAaN,MAAM;AAEvB,WAAO;MAAEG;MAAcE;IAAY;EACrC,CAAC;AACH;AAEO,SAASE,aAAcC,OAAoD;AAChF,QAAM;IACJL,cAAcM;IACdJ,aAAaK;EACf,IAAIX,SAAS,OAAO;IAClBY,MAAMC,QAAQJ,KAAK;EACrB,EAAE;AAEF,SAAO;IAAEC;IAAkBC;EAAgB;AAC7C;AAEO,SAASG,mBAAoBL,OAA0D;AAC5F,QAAM;IACJL,cAAcW;IACdT,aAAaU;EACf,IAAIhB,SAAS,OAAO;IAClBiB,YAAYJ,QAAQJ,KAAK;EAC3B,EAAE;AAEF,SAAO;IAAEM;IAAwBC;EAAsB;AACzD;AAEO,SAAST,aAAcN,QAA0E;AACtG,QAAMiB,UAAUL,QAAQZ,MAAM;AAC9B,QAAMkB,UAAoB,CAAA;AAC1B,QAAMC,SAAwB,CAAC;AAE/B,MAAIF,QAAQD,YAAY;AACtB,QAAII,WAAWH,QAAQD,UAAU,GAAG;AAClCG,aAAOE,kBAAkBJ,QAAQD;AAEjC,UAAI,CAACC,QAAQN,QAAQW,gBAAgBL,QAAQD,UAAU,GAAG;AACxD,cAAMK,kBAAkBE,WAAWN,QAAQD,UAAU;AACrD,YAAIK,gBAAgBG,KAAK,QAAQH,gBAAgBG,MAAM,GAAG;AACxD,gBAAMC,YAAYC,cAAcL,eAAe;AAE/CF,iBAAOX,QAAQiB;AACfN,iBAAOQ,aAAaF;QACtB;MACF;IACF,OAAO;AACLP,cAAQU,KAAK,MAAMX,QAAQD,UAAU,EAAE;IACzC;EACF;AAEA,MAAIC,QAAQN,MAAM;AAChB,QAAIS,WAAWH,QAAQN,IAAI,GAAG;AAC5BQ,aAAOX,QAAQS,QAAQN;AACvBQ,aAAOQ,aAAaV,QAAQN;IAC9B,OAAO;AACLO,cAAQU,KAAK,QAAQX,QAAQN,IAAI,EAAE;IACrC;EACF;AAEA,SAAO;IAAET,OAAOgB;IAASd,OAAOe;EAAO;AACzC;",
|
||||
"names": ["useColor", "colors", "destructComputed", "class", "colorClasses", "style", "colorStyles", "computeColor", "useTextColor", "color", "textColorClasses", "textColorStyles", "text", "toValue", "useBackgroundColor", "backgroundColorClasses", "backgroundColorStyles", "background", "_colors", "classes", "styles", "isCssColor", "backgroundColor", "isParsableColor", "parseColor", "a", "textColor", "getForeground", "caretColor", "push"]
|
||||
}
|
||||
+202
@@ -0,0 +1,202 @@
|
||||
import {
|
||||
IN_BROWSER,
|
||||
defer,
|
||||
focusableChildren,
|
||||
getCurrentInstance,
|
||||
propsFactory
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
nextTick,
|
||||
onScopeDispose,
|
||||
toRef,
|
||||
toValue,
|
||||
watch
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/composables/delay.js
|
||||
var makeDelayProps = propsFactory({
|
||||
closeDelay: [Number, String],
|
||||
openDelay: [Number, String]
|
||||
}, "delay");
|
||||
function useDelay(props, cb) {
|
||||
let clearDelay = () => {
|
||||
};
|
||||
function runDelay(isOpening, options) {
|
||||
clearDelay?.();
|
||||
const delay = isOpening ? props.openDelay : props.closeDelay;
|
||||
const normalizedDelay = Math.max(options?.minDelay ?? 0, Number(delay ?? 0));
|
||||
return new Promise((resolve) => {
|
||||
clearDelay = defer(normalizedDelay, () => {
|
||||
cb?.(isOpening);
|
||||
resolve(isOpening);
|
||||
});
|
||||
});
|
||||
}
|
||||
function runOpenDelay() {
|
||||
return runDelay(true);
|
||||
}
|
||||
function runCloseDelay(options) {
|
||||
return runDelay(false, options);
|
||||
}
|
||||
return {
|
||||
clearDelay,
|
||||
runOpenDelay,
|
||||
runCloseDelay
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/vuetify/lib/composables/focusTrap.js
|
||||
var makeFocusTrapProps = propsFactory({
|
||||
retainFocus: Boolean,
|
||||
captureFocus: Boolean,
|
||||
/** @deprecated */
|
||||
disableInitialFocus: Boolean
|
||||
}, "focusTrap");
|
||||
var registry = /* @__PURE__ */ new Map();
|
||||
var subscribers = 0;
|
||||
function onKeydown(e) {
|
||||
const activeElement = document.activeElement;
|
||||
if (e.key !== "Tab" || !activeElement) return;
|
||||
const parentTraps = Array.from(registry.values()).filter((_ref) => {
|
||||
let {
|
||||
isActive,
|
||||
contentEl
|
||||
} = _ref;
|
||||
return isActive.value && contentEl.value?.contains(activeElement);
|
||||
}).map((x) => x.contentEl.value);
|
||||
let closestTrap;
|
||||
let currentParent = activeElement.parentElement;
|
||||
while (currentParent) {
|
||||
if (parentTraps.includes(currentParent)) {
|
||||
closestTrap = currentParent;
|
||||
break;
|
||||
}
|
||||
currentParent = currentParent.parentElement;
|
||||
}
|
||||
if (!closestTrap) return;
|
||||
const focusable = focusableChildren(closestTrap).filter((x) => x.tabIndex >= 0);
|
||||
if (!focusable.length) return;
|
||||
const active = document.activeElement;
|
||||
if (focusable.length === 1 && focusable[0].classList.contains("v-list") && focusable[0].contains(active)) {
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
const firstElement = focusable[0];
|
||||
const lastElement = focusable[focusable.length - 1];
|
||||
if (e.shiftKey && (active === firstElement || firstElement.classList.contains("v-list") && firstElement.contains(active))) {
|
||||
e.preventDefault();
|
||||
lastElement.focus();
|
||||
}
|
||||
if (!e.shiftKey && (active === lastElement || lastElement.classList.contains("v-list") && lastElement.contains(active))) {
|
||||
e.preventDefault();
|
||||
firstElement.focus();
|
||||
}
|
||||
}
|
||||
function useFocusTrap(props, _ref2) {
|
||||
let {
|
||||
isActive,
|
||||
localTop,
|
||||
activatorEl,
|
||||
contentEl
|
||||
} = _ref2;
|
||||
const trapId = /* @__PURE__ */ Symbol("trap");
|
||||
let focusTrapSuppressed = false;
|
||||
let focusTrapSuppressionTimeout = -1;
|
||||
async function onPointerdown() {
|
||||
focusTrapSuppressed = true;
|
||||
focusTrapSuppressionTimeout = window.setTimeout(() => {
|
||||
focusTrapSuppressed = false;
|
||||
}, 100);
|
||||
}
|
||||
async function captureOnFocus(e) {
|
||||
const before = e.relatedTarget;
|
||||
const after = e.target;
|
||||
document.removeEventListener("pointerdown", onPointerdown);
|
||||
document.removeEventListener("keydown", captureOnKeydown);
|
||||
await nextTick();
|
||||
if (isActive.value && !focusTrapSuppressed && before !== after && contentEl.value && // We're the menu without open submenus or overlays
|
||||
toValue(localTop) && // It isn't the document or the container body
|
||||
![document, contentEl.value].includes(after) && // It isn't inside the container body
|
||||
!contentEl.value.contains(after)) {
|
||||
const focusable = focusableChildren(contentEl.value);
|
||||
focusable[0]?.focus();
|
||||
}
|
||||
}
|
||||
function captureOnKeydown(e) {
|
||||
if (e.key !== "Tab") return;
|
||||
document.removeEventListener("keydown", captureOnKeydown);
|
||||
if (isActive.value && contentEl.value && e.target && !contentEl.value.contains(e.target)) {
|
||||
const allFocusableElements = focusableChildren(document.documentElement);
|
||||
if (e.shiftKey && e.target === allFocusableElements.at(0) || !e.shiftKey && e.target === allFocusableElements.at(-1)) {
|
||||
const focusable = focusableChildren(contentEl.value);
|
||||
if (focusable.length > 0) {
|
||||
e.preventDefault();
|
||||
focusable[0].focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
const shouldCapture = toRef(() => isActive.value && props.captureFocus && !props.disableInitialFocus);
|
||||
if (IN_BROWSER) {
|
||||
watch(() => props.retainFocus, (val) => {
|
||||
if (val) {
|
||||
registry.set(trapId, {
|
||||
isActive,
|
||||
contentEl
|
||||
});
|
||||
} else {
|
||||
registry.delete(trapId);
|
||||
}
|
||||
}, {
|
||||
immediate: true
|
||||
});
|
||||
watch(shouldCapture, (val) => {
|
||||
if (val) {
|
||||
document.addEventListener("pointerdown", onPointerdown);
|
||||
document.addEventListener("focusin", captureOnFocus, {
|
||||
once: true
|
||||
});
|
||||
document.addEventListener("keydown", captureOnKeydown);
|
||||
} else {
|
||||
document.removeEventListener("pointerdown", onPointerdown);
|
||||
document.removeEventListener("focusin", captureOnFocus);
|
||||
document.removeEventListener("keydown", captureOnKeydown);
|
||||
}
|
||||
}, {
|
||||
immediate: true
|
||||
});
|
||||
if (subscribers++ < 1) {
|
||||
document.addEventListener("keydown", onKeydown);
|
||||
}
|
||||
}
|
||||
onScopeDispose(() => {
|
||||
registry.delete(trapId);
|
||||
clearTimeout(focusTrapSuppressionTimeout);
|
||||
document.removeEventListener("pointerdown", onPointerdown);
|
||||
document.removeEventListener("focusin", captureOnFocus);
|
||||
document.removeEventListener("keydown", captureOnKeydown);
|
||||
if (--subscribers < 1) {
|
||||
document.removeEventListener("keydown", onKeydown);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// node_modules/vuetify/lib/composables/scopeId.js
|
||||
function useScopeId() {
|
||||
const vm = getCurrentInstance("useScopeId");
|
||||
const scopeId = vm.vnode.scopeId;
|
||||
return {
|
||||
scopeId: scopeId ? {
|
||||
[scopeId]: ""
|
||||
} : void 0
|
||||
};
|
||||
}
|
||||
|
||||
export {
|
||||
makeDelayProps,
|
||||
useDelay,
|
||||
makeFocusTrapProps,
|
||||
useFocusTrap,
|
||||
useScopeId
|
||||
};
|
||||
//# sourceMappingURL=chunk-BVUPSGRF.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/composables/delay.ts", "../../vuetify/src/composables/focusTrap.ts", "../../vuetify/src/composables/scopeId.ts"],
|
||||
"sourcesContent": ["// Utilities\nimport { defer, propsFactory } from '@/util'\n\n// Types\nexport interface DelayProps {\n closeDelay?: number | string\n openDelay?: number | string\n}\n\n// Composables\nexport const makeDelayProps = propsFactory({\n closeDelay: [Number, String],\n openDelay: [Number, String],\n}, 'delay')\n\nexport function useDelay (props: DelayProps, cb?: (value: boolean) => void) {\n let clearDelay: (() => void) = () => {}\n\n function runDelay (isOpening: boolean, options?: { minDelay: number }) {\n clearDelay?.()\n\n const delay = isOpening ? props.openDelay : props.closeDelay\n\n const normalizedDelay = Math.max(\n options?.minDelay ?? 0,\n Number(delay ?? 0)\n )\n\n return new Promise(resolve => {\n clearDelay = defer(normalizedDelay, () => {\n cb?.(isOpening)\n resolve(isOpening)\n })\n })\n }\n\n function runOpenDelay () {\n return runDelay(true)\n }\n\n function runCloseDelay (options?: { minDelay: number }) {\n return runDelay(false, options)\n }\n\n return {\n clearDelay,\n runOpenDelay,\n runCloseDelay,\n }\n}\n", "// Utilities\nimport { nextTick, onScopeDispose, toRef, toValue, watch } from 'vue'\nimport { focusableChildren, IN_BROWSER, propsFactory } from '@/util'\n\n// Types\nimport type { Ref } from 'vue'\n\n// Types\nexport interface FocusTrapProps {\n retainFocus: boolean\n captureFocus: boolean\n disableInitialFocus?: boolean\n}\n\n// Composables\nexport const makeFocusTrapProps = propsFactory({\n retainFocus: Boolean,\n captureFocus: Boolean,\n /** @deprecated */\n disableInitialFocus: Boolean,\n}, 'focusTrap')\n\nconst registry = new Map<symbol, {\n isActive: Ref<boolean>\n contentEl: Ref<HTMLElement | undefined>\n}>()\nlet subscribers = 0\n\nfunction onKeydown (e: KeyboardEvent) {\n const activeElement = document.activeElement as HTMLElement | null\n if (e.key !== 'Tab' || !activeElement) return\n\n const parentTraps = Array.from(registry.values())\n .filter(({ isActive, contentEl }) => isActive.value && contentEl.value?.contains(activeElement))\n .map(x => x.contentEl.value)\n\n let closestTrap\n let currentParent = activeElement.parentElement\n while (currentParent) {\n if (parentTraps.includes(currentParent)) {\n closestTrap = currentParent\n break\n }\n currentParent = currentParent.parentElement\n }\n\n if (!closestTrap) return\n\n const focusable = focusableChildren(closestTrap)\n // excluding VListItems with tabindex=\"-2\"\n .filter(x => x.tabIndex >= 0)\n\n if (!focusable.length) return\n\n const active = document.activeElement as HTMLElement | null\n if (\n focusable.length === 1 &&\n focusable[0].classList.contains('v-list') &&\n focusable[0].contains(active)\n ) {\n e.preventDefault()\n return\n }\n\n const firstElement = focusable[0]\n const lastElement = focusable[focusable.length - 1]\n\n if (\n e.shiftKey &&\n (\n active === firstElement ||\n (firstElement.classList.contains('v-list') && firstElement.contains(active))\n )\n ) {\n e.preventDefault()\n lastElement.focus()\n }\n\n if (\n !e.shiftKey &&\n (\n active === lastElement ||\n (lastElement.classList.contains('v-list') && lastElement.contains(active))\n )\n ) {\n e.preventDefault()\n firstElement.focus()\n }\n}\n\nexport function useFocusTrap (\n props: FocusTrapProps,\n { isActive, localTop, activatorEl, contentEl }: {\n isActive: Ref<boolean>\n localTop: Readonly<Ref<boolean>>\n activatorEl?: Readonly<Ref<HTMLElement | undefined>>\n contentEl: Readonly<Ref<HTMLElement | undefined>>\n }\n) {\n const trapId = Symbol('trap')\n\n let focusTrapSuppressed = false\n let focusTrapSuppressionTimeout = -1\n\n async function onPointerdown () {\n focusTrapSuppressed = true\n focusTrapSuppressionTimeout = window.setTimeout(() => {\n focusTrapSuppressed = false\n }, 100)\n }\n\n async function captureOnFocus (e: FocusEvent) {\n const before = e.relatedTarget as HTMLElement | null\n const after = e.target as HTMLElement | null\n\n document.removeEventListener('pointerdown', onPointerdown)\n document.removeEventListener('keydown', captureOnKeydown)\n\n await nextTick()\n\n if (\n isActive.value &&\n !focusTrapSuppressed &&\n before !== after &&\n contentEl.value &&\n // We're the menu without open submenus or overlays\n toValue(localTop) &&\n // It isn't the document or the container body\n ![document, contentEl.value].includes(after!) &&\n // It isn't inside the container body\n !contentEl.value.contains(after)\n ) {\n const focusable = focusableChildren(contentEl.value)\n focusable[0]?.focus()\n }\n }\n\n function captureOnKeydown (e: KeyboardEvent) {\n if (e.key !== 'Tab') return\n document.removeEventListener('keydown', captureOnKeydown)\n\n if (\n isActive.value &&\Line truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;AAUO,IAAMA,iBAAiBC,aAAa;EACzCC,YAAY,CAACC,QAAQC,MAAM;EAC3BC,WAAW,CAACF,QAAQC,MAAM;AAC5B,GAAG,OAAO;AAEH,SAASE,SAAUC,OAAmBC,IAA+B;AAC1E,MAAIC,aAA2BA,MAAM;EAAC;AAEtC,WAASC,SAAUC,WAAoBC,SAAgC;AACrEH,iBAAa;AAEb,UAAMI,QAAQF,YAAYJ,MAAMF,YAAYE,MAAML;AAElD,UAAMY,kBAAkBC,KAAKC,IAC3BJ,SAASK,YAAY,GACrBd,OAAOU,SAAS,CAAC,CACnB;AAEA,WAAO,IAAIK,QAAQC,aAAW;AAC5BV,mBAAaW,MAAMN,iBAAiB,MAAM;AACxCN,aAAKG,SAAS;AACdQ,gBAAQR,SAAS;MACnB,CAAC;IACH,CAAC;EACH;AAEA,WAASU,eAAgB;AACvB,WAAOX,SAAS,IAAI;EACtB;AAEA,WAASY,cAAeV,SAAgC;AACtD,WAAOF,SAAS,OAAOE,OAAO;EAChC;AAEA,SAAO;IACLH;IACAY;IACAC;EACF;AACF;;;AClCO,IAAMC,qBAAqBC,aAAa;EAC7CC,aAAaC;EACbC,cAAcD;;EAEdE,qBAAqBF;AACvB,GAAG,WAAW;AAEd,IAAMG,WAAW,oBAAIC,IAGlB;AACH,IAAIC,cAAc;AAElB,SAASC,UAAWC,GAAkB;AACpC,QAAMC,gBAAgBC,SAASD;AAC/B,MAAID,EAAEG,QAAQ,SAAS,CAACF,cAAe;AAEvC,QAAMG,cAAcC,MAAMC,KAAKV,SAASW,OAAO,CAAC,EAC7CC,OAAOC,UAAA;AAAA,QAAC;MAAEC;MAAUC;IAAU,IAACF;AAAA,WAAKC,SAASE,SAASD,UAAUC,OAAOC,S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UAAE1B;UAAUC;QAAU,CAAC;MAC9C,OAAO;AACLf,iBAASiE,OAAOzB,MAAM;MACxB;IACF,GAAG;MAAE0B,WAAW;IAAK,CAAC;AAEtBJ,UAAMH,eAAeI,SAAO;AAC1B,UAAIA,KAAK;AACPzD,iBAAS6D,iBAAiB,eAAevB,aAAa;AACtDtC,iBAAS6D,iBAAiB,WAAWpB,gBAAgB;UAAEqB,MAAM;QAAK,CAAC;AACnE9D,iBAAS6D,iBAAiB,WAAWd,gBAAgB;MACvD,OAAO;AACL/C,iBAAS8C,oBAAoB,eAAeR,aAAa;AACzDtC,iBAAS8C,oBAAoB,WAAWL,cAAc;AACtDzC,iBAAS8C,oBAAoB,WAAWC,gBAAgB;MAC1D;IACF,GAAG;MAAEa,WAAW;IAAK,CAAC;AAEtB,QAAIhE,gBAAgB,GAAG;AACrBI,eAAS6D,iBAAiB,WAAWhE,SAAS;IAChD;EACF;AAEAkE,iBAAe,MAAM;AACnBrE,aAASiE,OAAOzB,MAAM;AACtB8B,iBAAa3B,2BAA2B;AACxCrC,aAAS8C,oBAAoB,eAAeR,aAAa;AACzDtC,aAAS8C,oBAAoB,WAAWL,cAAc;AACtDzC,aAAS8C,oBAAoB,WAAWC,gBAAgB;AAExD,QAAI,EAAEnD,cAAc,GAAG;AACrBI,eAAS8C,oBAAoB,WAAWjD,SAAS;IACnD;EACF,CAAC;AACH;;;ACtMO,SAASoE,aAAc;AAC5B,QAAMC,KAAKC,mBAAmB,YAAY;AAE1C,QAAMC,UAAUF,GAAIG,MAAMD;AAE1B,SAAO;IAAEA,SAASA,UAAU;MAAE,CAACA,OAAO,GAAG;IAAG,IAAIE;EAAU;AAC5D;",
|
||||
"names": ["makeDelayProps", "propsFactory", "closeDelay", "Number", "String", "openDelay", "useDelay", "props", "cb", "clearDelay", "runDelay", "isOpening", "options", "delay", "normalizedDelay", "Math", "max", "minDelay", "Promise", "resolve", "defer", "runOpenDelay", "runCloseDelay", "makeFocusTrapProps", "propsFactory", "retainFocus", "Boolean", "captureFocus", "disableInitialFocus", "registry", "Map", "subscribers", "onKeydown", "e", "activeElement", "document", "key", "parentTraps", "Array", "from", "values", "filter", "_ref", "isActive", "contentEl", "value", "contains", "map", "x", "closestTrap", "currentParent", "parentElement", "includes", "focusable", "focusableChildren", "tabIndex", "length", "active", "classList", "preventDefault", "firstElement", "lastElement", "shiftKey", "focus", "useFocusTrap", "props", "_ref2", "localTop", "activatorEl", "trapId", "Symbol", "focusTrapSuppressed", "focusTrapSuppressionTimeout", "onPointerdown", "window", "setTimeout", "captureOnFocus", "before", "relatedTarget", "after", "target", "removeEventListener", "captureOnKeydown", "nextTick", "toValue", "allFocusableElements", "documentElement", "at", "shouldCapture", "toRef", "IN_BROWSER", "watch", "val", "set", "delete", "immediate", "addEventListener", "once", "onScopeDispose", "clearTimeout", "useScopeId", "vm", "getCurrentInstance", "scopeId", "vnode", "undefined"]
|
||||
}
|
||||
+360
@@ -0,0 +1,360 @@
|
||||
import {
|
||||
VToolbar,
|
||||
VToolbarTitle,
|
||||
makeVToolbarProps,
|
||||
makeVToolbarTitleProps
|
||||
} from "./chunk-LPZZJ62X.js";
|
||||
import {
|
||||
VBtn,
|
||||
makeVBtnProps
|
||||
} from "./chunk-QC7VWQER.js";
|
||||
import {
|
||||
useSsrBoot
|
||||
} from "./chunk-PCKQGDLK.js";
|
||||
import {
|
||||
makeLayoutItemProps,
|
||||
useLayoutItem
|
||||
} from "./chunk-KQXZAEJP.js";
|
||||
import {
|
||||
useProxiedModel,
|
||||
useToggleScope
|
||||
} from "./chunk-KA77II4V.js";
|
||||
import {
|
||||
clamp,
|
||||
consoleWarn,
|
||||
genericComponent,
|
||||
omit,
|
||||
propsFactory,
|
||||
useRender
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
computed,
|
||||
createVNode,
|
||||
mergeProps,
|
||||
onBeforeUnmount,
|
||||
onMounted,
|
||||
ref,
|
||||
shallowRef,
|
||||
toRef,
|
||||
watch,
|
||||
watchEffect
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/VAppBar/VAppBar.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VAppBar/VAppBar.css";
|
||||
|
||||
// node_modules/vuetify/lib/composables/scroll.js
|
||||
var makeScrollProps = propsFactory({
|
||||
scrollTarget: {
|
||||
type: String
|
||||
},
|
||||
scrollThreshold: {
|
||||
type: [String, Number],
|
||||
default: 300
|
||||
}
|
||||
}, "scroll");
|
||||
function useScroll(props) {
|
||||
let args = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
||||
const {
|
||||
canScroll,
|
||||
layoutSize
|
||||
} = args;
|
||||
let previousScroll = 0;
|
||||
let previousScrollHeight = 0;
|
||||
const target = ref(null);
|
||||
const currentScroll = shallowRef(0);
|
||||
const savedScroll = shallowRef(0);
|
||||
const currentThreshold = shallowRef(0);
|
||||
const isScrollActive = shallowRef(false);
|
||||
const isScrollingUp = shallowRef(false);
|
||||
const isAtBottom = shallowRef(false);
|
||||
const reachedBottomWhileScrollingDown = shallowRef(false);
|
||||
const hasEnoughScrollableSpace = shallowRef(true);
|
||||
const scrollThreshold = computed(() => {
|
||||
return Number(props.scrollThreshold);
|
||||
});
|
||||
const scrollRatio = computed(() => {
|
||||
return clamp((scrollThreshold.value - currentScroll.value) / scrollThreshold.value || 0);
|
||||
});
|
||||
function getScrollMetrics(targetEl) {
|
||||
const clientHeight = "window" in targetEl ? window.innerHeight : targetEl.clientHeight;
|
||||
const scrollHeight = "window" in targetEl ? document.documentElement.scrollHeight : targetEl.scrollHeight;
|
||||
return {
|
||||
clientHeight,
|
||||
scrollHeight
|
||||
};
|
||||
}
|
||||
function checkScrollableSpace() {
|
||||
const targetEl = target.value;
|
||||
if (!targetEl) return;
|
||||
const {
|
||||
clientHeight,
|
||||
scrollHeight
|
||||
} = getScrollMetrics(targetEl);
|
||||
const maxScrollableDistance = scrollHeight - clientHeight;
|
||||
const elementHeight = layoutSize?.value || 0;
|
||||
const minRequiredDistance = scrollThreshold.value + elementHeight;
|
||||
hasEnoughScrollableSpace.value = maxScrollableDistance > minRequiredDistance;
|
||||
}
|
||||
function onResize() {
|
||||
checkScrollableSpace();
|
||||
}
|
||||
function onScroll() {
|
||||
const targetEl = target.value;
|
||||
if (!targetEl || canScroll && !canScroll.value) return;
|
||||
previousScroll = currentScroll.value;
|
||||
currentScroll.value = "window" in targetEl ? targetEl.pageYOffset : targetEl.scrollTop;
|
||||
const currentScrollHeight = targetEl instanceof Window ? document.documentElement.scrollHeight : targetEl.scrollHeight;
|
||||
if (previousScrollHeight !== currentScrollHeight) {
|
||||
if (currentScrollHeight > previousScrollHeight) {
|
||||
checkScrollableSpace();
|
||||
}
|
||||
previousScrollHeight = currentScrollHeight;
|
||||
}
|
||||
isScrollingUp.value = currentScroll.value < previousScroll;
|
||||
currentThreshold.value = Math.abs(currentScroll.value - scrollThreshold.value);
|
||||
const {
|
||||
clientHeight,
|
||||
scrollHeight
|
||||
} = getScrollMetrics(targetEl);
|
||||
const atBottom = currentScroll.value + clientHeight >= scrollHeight - 5;
|
||||
if (!isScrollingUp.value && atBottom && currentScroll.value >= scrollThreshold.value && hasEnoughScrollableSpace.value) {
|
||||
reachedBottomWhileScrollingDown.value = true;
|
||||
}
|
||||
const scrollJumped = Math.abs(currentScroll.value - previousScroll) > 100;
|
||||
const atTop = currentScroll.value <= 5;
|
||||
const scrolledUpSignificantly = isScrollingUp.value && previousScroll - currentScroll.value > 1;
|
||||
if (scrolledUpSignificantly && !atBottom || scrollJumped && currentScroll.value < scrollThreshold.value || atTop) {
|
||||
reachedBottomWhileScrollingDown.value = false;
|
||||
}
|
||||
isAtBottom.value = atBottom;
|
||||
}
|
||||
watch(isScrollingUp, () => {
|
||||
savedScroll.value = savedScroll.value || currentScroll.value;
|
||||
});
|
||||
watch(isScrollActive, () => {
|
||||
savedScroll.value = 0;
|
||||
});
|
||||
onMounted(() => {
|
||||
watch(() => props.scrollTarget, (scrollTarget) => {
|
||||
const newTarget = scrollTarget ? document.querySelector(scrollTarget) : window;
|
||||
if (!newTarget) {
|
||||
consoleWarn(`Unable to locate element with identifier ${scrollTarget}`);
|
||||
return;
|
||||
}
|
||||
if (newTarget === target.value) return;
|
||||
target.value?.removeEventListener("scroll", onScroll);
|
||||
target.value = newTarget;
|
||||
target.value.addEventListener("scroll", onScroll, {
|
||||
passive: true
|
||||
});
|
||||
Promise.resolve().then(() => {
|
||||
checkScrollableSpace();
|
||||
});
|
||||
}, {
|
||||
immediate: true
|
||||
});
|
||||
window.addEventListener("resize", onResize, {
|
||||
passive: true
|
||||
});
|
||||
});
|
||||
onBeforeUnmount(() => {
|
||||
target.value?.removeEventListener("scroll", onScroll);
|
||||
window.removeEventListener("resize", onResize);
|
||||
});
|
||||
canScroll && watch(canScroll, onScroll, {
|
||||
immediate: true
|
||||
});
|
||||
return {
|
||||
scrollThreshold,
|
||||
currentScroll,
|
||||
currentThreshold,
|
||||
isScrollActive,
|
||||
scrollRatio,
|
||||
// required only for testing
|
||||
// probably can be removed
|
||||
// later (2 chars chlng)
|
||||
isScrollingUp,
|
||||
savedScroll,
|
||||
isAtBottom,
|
||||
reachedBottomWhileScrollingDown,
|
||||
hasEnoughScrollableSpace
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/vuetify/lib/components/VAppBar/VAppBar.js
|
||||
var makeVAppBarProps = propsFactory({
|
||||
scrollBehavior: String,
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
location: {
|
||||
type: String,
|
||||
default: "top",
|
||||
validator: (value) => ["top", "bottom"].includes(value)
|
||||
},
|
||||
...makeVToolbarProps(),
|
||||
...makeLayoutItemProps(),
|
||||
...makeScrollProps(),
|
||||
height: {
|
||||
type: [Number, String],
|
||||
default: 64
|
||||
}
|
||||
}, "VAppBar");
|
||||
var VAppBar = genericComponent()({
|
||||
name: "VAppBar",
|
||||
props: makeVAppBarProps(),
|
||||
emits: {
|
||||
"update:modelValue": (value) => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
const vToolbarRef = ref();
|
||||
const isActive = useProxiedModel(props, "modelValue");
|
||||
const scrollBehavior = computed(() => {
|
||||
const behavior = new Set(props.scrollBehavior?.split(" ") ?? []);
|
||||
return {
|
||||
hide: behavior.has("hide"),
|
||||
fullyHide: behavior.has("fully-hide"),
|
||||
inverted: behavior.has("inverted"),
|
||||
collapse: behavior.has("collapse"),
|
||||
elevate: behavior.has("elevate"),
|
||||
fadeImage: behavior.has("fade-image")
|
||||
// shrink: behavior.has('shrink'),
|
||||
};
|
||||
});
|
||||
const canScroll = computed(() => {
|
||||
const behavior = scrollBehavior.value;
|
||||
return behavior.hide || behavior.fullyHide || behavior.inverted || behavior.collapse || behavior.elevate || behavior.fadeImage || // behavior.shrink ||
|
||||
!isActive.value;
|
||||
});
|
||||
const appBarHeight = computed(() => {
|
||||
const height2 = vToolbarRef.value?.contentHeight ?? 0;
|
||||
const extensionHeight = vToolbarRef.value?.extensionHeight ?? 0;
|
||||
return height2 + extensionHeight;
|
||||
});
|
||||
const {
|
||||
currentScroll,
|
||||
scrollThreshold,
|
||||
isScrollingUp,
|
||||
scrollRatio,
|
||||
isAtBottom,
|
||||
reachedBottomWhileScrollingDown,
|
||||
hasEnoughScrollableSpace
|
||||
} = useScroll(props, {
|
||||
canScroll,
|
||||
layoutSize: appBarHeight
|
||||
});
|
||||
const canHide = toRef(() => scrollBehavior.value.hide || scrollBehavior.value.fullyHide);
|
||||
const isCollapsed = computed(() => props.collapse || scrollBehavior.value.collapse && (scrollBehavior.value.inverted ? scrollRatio.value > 0 : scrollRatio.value === 0));
|
||||
const isFlat = computed(() => props.flat || scrollBehavior.value.fullyHide && !isActive.value || scrollBehavior.value.elevate && (scrollBehavior.value.inverted ? currentScroll.value > 0 : currentScroll.value === 0));
|
||||
const opacity = computed(() => scrollBehavior.value.fadeImage ? scrollBehavior.value.inverted ? 1 - scrollRatio.value : scrollRatio.value : void 0);
|
||||
const height = computed(() => {
|
||||
if (scrollBehavior.value.hide && scrollBehavior.value.inverted) return 0;
|
||||
const height2 = vToolbarRef.value?.contentHeight ?? 0;
|
||||
const extensionHeight = vToolbarRef.value?.extensionHeight ?? 0;
|
||||
if (!canHide.value) return height2 + extensionHeight;
|
||||
return currentScroll.value < scrollThreshold.value || scrollBehavior.value.fullyHide ? height2 + extensionHeight : height2;
|
||||
});
|
||||
useToggleScope(() => !!props.scrollBehavior, () => {
|
||||
watchEffect(() => {
|
||||
if (!canHide.value) {
|
||||
isActive.value = true;
|
||||
return;
|
||||
}
|
||||
if (scrollBehavior.value.inverted) {
|
||||
isActive.value = currentScroll.value > scrollThreshold.value;
|
||||
return;
|
||||
}
|
||||
if (!hasEnoughScrollableSpace.value) {
|
||||
isActive.value = true;
|
||||
return;
|
||||
}
|
||||
if (reachedBottomWhileScrollingDown.value) {
|
||||
isActive.value = false;
|
||||
return;
|
||||
}
|
||||
isActive.value = isScrollingUp.value && !isAtBottom.value || currentScroll.value < scrollThreshold.value;
|
||||
});
|
||||
});
|
||||
const {
|
||||
ssrBootStyles
|
||||
} = useSsrBoot();
|
||||
const {
|
||||
layoutItemStyles
|
||||
} = useLayoutItem({
|
||||
id: props.name,
|
||||
order: computed(() => parseInt(props.order, 10)),
|
||||
position: toRef(() => props.location),
|
||||
layoutSize: height,
|
||||
elementSize: shallowRef(void 0),
|
||||
active: isActive,
|
||||
absolute: toRef(() => props.absolute)
|
||||
});
|
||||
useRender(() => {
|
||||
const toolbarProps = VToolbar.filterProps(props);
|
||||
return createVNode(VToolbar, mergeProps({
|
||||
"ref": vToolbarRef,
|
||||
"class": ["v-app-bar", {
|
||||
"v-app-bar--bottom": props.location === "bottom"
|
||||
}, props.class],
|
||||
"style": [{
|
||||
...layoutItemStyles.value,
|
||||
"--v-toolbar-image-opacity": opacity.value,
|
||||
height: void 0,
|
||||
...ssrBootStyles.value
|
||||
}, props.style]
|
||||
}, toolbarProps, {
|
||||
"collapse": isCollapsed.value,
|
||||
"flat": isFlat.value
|
||||
}), slots);
|
||||
});
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/vuetify/lib/components/VAppBar/VAppBarNavIcon.js
|
||||
var makeVAppBarNavIconProps = propsFactory({
|
||||
...omit(makeVBtnProps({
|
||||
icon: "$menu",
|
||||
variant: "text"
|
||||
}), ["spaced"])
|
||||
}, "VAppBarNavIcon");
|
||||
var VAppBarNavIcon = genericComponent()({
|
||||
name: "VAppBarNavIcon",
|
||||
props: makeVAppBarNavIconProps(),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
useRender(() => createVNode(VBtn, mergeProps(props, {
|
||||
"class": ["v-app-bar-nav-icon"]
|
||||
}), slots));
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/vuetify/lib/components/VAppBar/VAppBarTitle.js
|
||||
var VAppBarTitle = genericComponent()({
|
||||
name: "VAppBarTitle",
|
||||
props: makeVToolbarTitleProps(),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
useRender(() => createVNode(VToolbarTitle, mergeProps(props, {
|
||||
"class": "v-app-bar-title"
|
||||
}), slots));
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
VAppBar,
|
||||
VAppBarNavIcon,
|
||||
VAppBarTitle
|
||||
};
|
||||
//# sourceMappingURL=chunk-BXEVD6W6.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VAppBar/VAppBar.tsx", "../../vuetify/src/composables/scroll.ts", "../../vuetify/src/components/VAppBar/VAppBarNavIcon.tsx", "../../vuetify/src/components/VAppBar/VAppBarTitle.tsx"],
|
||||
"sourcesContent": ["// Styles\nimport './VAppBar.sass'\n\n// Components\nimport { makeVToolbarProps, VToolbar } from '@/components/VToolbar/VToolbar'\n\n// Composables\nimport { makeLayoutItemProps, useLayoutItem } from '@/composables/layout'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { makeScrollProps, useScroll } from '@/composables/scroll'\nimport { useSsrBoot } from '@/composables/ssrBoot'\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Utilities\nimport { computed, ref, shallowRef, toRef, watchEffect } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VToolbarSlots } from '@/components/VToolbar/VToolbar'\n\nexport const makeVAppBarProps = propsFactory({\n scrollBehavior: String as PropType<'hide' | 'fully-hide' | 'inverted' | 'collapse' | 'elevate' | 'fade-image' | (string & {})>,\n modelValue: {\n type: Boolean,\n default: true,\n },\n location: {\n type: String as PropType<'top' | 'bottom'>,\n default: 'top',\n validator: (value: any) => ['top', 'bottom'].includes(value),\n },\n\n ...makeVToolbarProps(),\n ...makeLayoutItemProps(),\n ...makeScrollProps(),\n\n height: {\n type: [Number, String],\n default: 64,\n },\n}, 'VAppBar')\n\nexport const VAppBar = genericComponent<VToolbarSlots>()({\n name: 'VAppBar',\n\n props: makeVAppBarProps(),\n\n emits: {\n 'update:modelValue': (value: boolean) => true,\n },\n\n setup (props, { slots }) {\n const vToolbarRef = ref<VToolbar>()\n const isActive = useProxiedModel(props, 'modelValue')\n const scrollBehavior = computed(() => {\n const behavior = new Set(props.scrollBehavior?.split(' ') ?? [])\n return {\n hide: behavior.has('hide'),\n fullyHide: behavior.has('fully-hide'),\n inverted: behavior.has('inverted'),\n collapse: behavior.has('collapse'),\n elevate: behavior.has('elevate'),\n fadeImage: behavior.has('fade-image'),\n // shrink: behavior.has('shrink'),\n }\n })\n const canScroll = computed(() => {\n const behavior = scrollBehavior.value\n return (\n behavior.hide ||\n behavior.fullyHide ||\n behavior.inverted ||\n behavior.collapse ||\n behavior.elevate ||\n behavior.fadeImage ||\n // behavior.shrink ||\n !isActive.value\n )\n })\n\n const appBarHeight = computed(() => {\n const height = vToolbarRef.value?.contentHeight ?? 0\n const extensionHeight = vToolbarRef.value?.extensionHeight ?? 0\n return height + extensionHeight\n })\n\n const {\n currentScroll,\n scrollThreshold,\n isScrollingUp,\n scrollRatio,\n isAtBottom,\n reachedBottomWhileScrollingDown,\n hasEnoughScrollableSpace,\n } = useScroll(props, { canScroll, layoutSize: appBarHeight })\n\n const canHide = toRef(() => (\n scrollBehavior.value.hide ||\n scrollBehavior.value.fullyHide\n ))\n const isCollapsed = computed(() => props.collapse || (\n scrollBehavior.value.collapse &&\n (scrollBehavior.value.inverted ? scrollRatio.value > 0 : scrollRatio.value === 0)\n ))\n const isFlat = computed(() => props.flat || (\n scrollBehavior.value.fullyHide &&\n !isActive.value\n ) || (\n scrollBehavior.value.elevate &&\n (scrollBehavior.value.inverted ? currentScroll.value > 0 : currentScroll.value === 0)\n ))\n const opacity = computed(() => (\n scrollBehavior.value.fadeImage\n ? (scrollBehavior.value.inverted ? 1 - scrollRatio.value : scrollRatio.value)\n : undefined\n ))\n const height = computed(() => {\n if (scrollBehavior.value.hide && scrollBehavior.value.inverted) return 0\n\n const height = vToolbarRef.value?.contentHeight ?? 0\n const extensionHeight = vToolbarRef.value?.extensionHeight ?? 0\n\n if (!canHide.value) return (height + extensionHeight)\n\n return currentScroll.value < scrollThreshold.value || scrollBehavior.value.fullyHide\n ? (height + extensionHeight)\n : height\n })\n\n useToggleScope(() => !!props.scrollBehavior, () => {\n watchEffect(() => {\n if (!canHide.value) {\n isActive.value = true\n return\n }\n\n if (scrollBehavior.value.inverted) {\n isActive.value = currentScroll.value > scrollThreshold.value\n return\n }\n\n // If there's not enough scrollable space, don't apply scroll-hide behavior at all\n // This prevents flickering/bouncing animations on short pages\n if (!hasEnoughScrollableSpace.value) {\n isActive.value = true\n return\n }\n\n // Prevent navbar from showing when we reached bottom while scrolling down\n // This handles the case where scroll momentum causes to hit bottom during hide transition\n if (reachedBotLine truncated
|
||||
"mappings": ";;;;;;;;;;;;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MyB,SACtB;AACD,UAAMoB,cAAc1B,SAAS,MAAMT,MAAMiB,YACvCnC,eAAeQ,MAAM2B,aACpBnC,eAAeQ,MAAM0B,WAAWW,YAAYrC,QAAQ,IAAIqC,YAAYrC,UAAU,EAChF;AACD,UAAM8C,SAAS3B,SAAS,MAAMT,MAAMqC,QAClCvD,eAAeQ,MAAMyB,aACrB,CAACR,SAASjB,SAEVR,eAAeQ,MAAM4B,YACpBpC,eAAeQ,MAAM0B,WAAWQ,cAAclC,QAAQ,IAAIkC,cAAclC,UAAU,EACpF;AACD,UAAMgD,UAAU7B,SAAS,MACvB3B,eAAeQ,MAAM6B,YAChBrC,eAAeQ,MAAM0B,WAAW,IAAIW,YAAYrC,QAAQqC,YAAYrC,QACrEiD,MACL;AACD,UAAM5C,SAASc,SAAS,MAAM;AAC5B,UAAI3B,eAAeQ,MAAMuB,QAAQ/B,eAAeQ,MAAM0B,SAAU,QAAO;AAEvE,YAAMrB,UAASU,YAAYf,OAAOgC,iBAAiB;AACnD,YAAMC,kBAAkBlB,YAAYf,OAAOiC,mBAAmB;AAE9D,UAAI,CAACU,QAAQ3C,MAAO,QAAQK,UAAS4B;AAErC,aAAOC,cAAclC,QAAQmC,gBAAgBnC,SAASR,eAAeQ,MAAMyB,YACtEpB,UAAS4B,kBACV5B;IACN,CAAC;AAED6C,mBAAe,MAAM,CAAC,CAACxC,MAAMlB,gBAAgB,MAAMLine truncated
|
||||
"names": ["makeScrollProps", "propsFactory", "scrollTarget", "type", "String", "scrollThreshold", "Number", "default", "useScroll", "props", "args", "arguments", "length", "undefined", "canScroll", "layoutSize", "previousScroll", "previousScrollHeight", "target", "ref", "currentScroll", "shallowRef", "savedScroll", "currentThreshold", "isScrollActive", "isScrollingUp", "isAtBottom", "reachedBottomWhileScrollingDown", "hasEnoughScrollableSpace", "computed", "scrollRatio", "clamp", "value", "getScrollMetrics", "targetEl", "clientHeight", "window", "innerHeight", "scrollHeight", "document", "documentElement", "checkScrollableSpace", "maxScrollableDistance", "elementHeight", "minRequiredDistance", "onResize", "onScroll", "pageYOffset", "scrollTop", "currentScrollHeight", "Window", "Math", "abs", "atBottom", "scrollJumped", "atTop", "scrolledUpSignificantly", "watch", "onMounted", "newTarget", "querySelector", "consoleWarn", "removeEventListener", "addEventListener", "passive", "Promise", "resolve", "then", "immediate", "onBeforeUnmount", "makeVAppBarProps", "propsFactory", "scrollBehavior", "String", "modelValue", "type", "Boolean", "default", "location", "validator", "value", "includes", "makeVToolbarProps", "makeLayoutItemProps", "makeScrollProps", "height", "Number", "VAppBar", "genericComponent", "name", "props", "emits", "setup", "_ref", "slots", "vToolbarRef", "ref", "isActive", "useProxiedModel", "computed", "behavior", "Set", "split", "hide", "has", "fullyHide", "inverted", "collapse", "elevate", "fadeImage", "canScroll", "appBarHeight", "contentHeight", "extensionHeight", "currentScroll", "scrollThreshold", "isScrollingUp", "scrollRatio", "isAtBottom", "reachedBottomWhileScrollingDown", "hasEnoughScrollableSpace", "useScroll", "layoutSize", "canHide", "toRef", "isCollapsed", "isFlat", "flat", "opacity", "undefined", "useToggleScope", "watchEffect", "ssrBootStyles", "useSsrBoot", "layoutItemStyles", "useLayoutItem", "id", "order", "parseInt", "position", "elementSize", "shallowRef", "active", "absolute", "useRender", "toolbarProps", "VToolbar", "filterProps", "_createVNode", "_mergeProps", "class", "style", "makeVAppBarNavIconProps", "propsFactory", "omit", "makeVBtnProps", "icon", "variant", "VAppBarNavIcon", "genericComponent", "name", "props", "setup", "_ref", "slots", "useRender", "_createVNode", "VBtn", "_mergeProps", "VAppBarTitle", "genericComponent", "name", "props", "makeVToolbarTitleProps", "setup", "_ref", "slots", "useRender", "_createVNode", "VToolbarTitle", "_mergeProps"]
|
||||
}
|
||||
+501
@@ -0,0 +1,501 @@
|
||||
import {
|
||||
VInput,
|
||||
VLabel,
|
||||
makeVInputProps,
|
||||
useFocus
|
||||
} from "./chunk-4VABFUPG.js";
|
||||
import {
|
||||
makeDensityProps,
|
||||
useDensity
|
||||
} from "./chunk-TM3MIDYC.js";
|
||||
import {
|
||||
VIcon
|
||||
} from "./chunk-CMZ4UYUX.js";
|
||||
import {
|
||||
ripple_default
|
||||
} from "./chunk-5BPWKCNA.js";
|
||||
import {
|
||||
forwardRefs
|
||||
} from "./chunk-GUNW7S2L.js";
|
||||
import {
|
||||
IconValue
|
||||
} from "./chunk-OJDZBU5D.js";
|
||||
import {
|
||||
useProxiedModel
|
||||
} from "./chunk-KA77II4V.js";
|
||||
import {
|
||||
useBackgroundColor,
|
||||
useTextColor
|
||||
} from "./chunk-BHV5Z34M.js";
|
||||
import {
|
||||
makeThemeProps
|
||||
} from "./chunk-3DSR7NCB.js";
|
||||
import {
|
||||
deepEqual,
|
||||
filterInputAttrs,
|
||||
genericComponent,
|
||||
makeComponentProps,
|
||||
matchesSelector,
|
||||
omit,
|
||||
propsFactory,
|
||||
provideDefaults,
|
||||
useRender,
|
||||
wrapInArray
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
Fragment,
|
||||
computed,
|
||||
createBaseVNode,
|
||||
createVNode,
|
||||
inject,
|
||||
mergeProps,
|
||||
nextTick,
|
||||
normalizeClass,
|
||||
normalizeStyle,
|
||||
onScopeDispose,
|
||||
provide,
|
||||
ref,
|
||||
shallowRef,
|
||||
toRef,
|
||||
useId,
|
||||
withDirectives
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/VCheckbox/VCheckbox.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VCheckbox/VCheckbox.css";
|
||||
|
||||
// node_modules/vuetify/lib/components/VSelectionControl/VSelectionControl.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VSelectionControl/VSelectionControl.css";
|
||||
|
||||
// node_modules/vuetify/lib/components/VSelectionControlGroup/VSelectionControlGroup.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VSelectionControlGroup/VSelectionControlGroup.css";
|
||||
var VSelectionControlGroupSymbol = /* @__PURE__ */ Symbol.for("vuetify:selection-control-group");
|
||||
var makeSelectionControlGroupProps = propsFactory({
|
||||
color: String,
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: null
|
||||
},
|
||||
defaultsTarget: String,
|
||||
error: Boolean,
|
||||
id: String,
|
||||
inline: Boolean,
|
||||
falseIcon: IconValue,
|
||||
trueIcon: IconValue,
|
||||
ripple: {
|
||||
type: [Boolean, Object],
|
||||
default: true
|
||||
},
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
default: null
|
||||
},
|
||||
name: String,
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
default: null
|
||||
},
|
||||
modelValue: null,
|
||||
type: String,
|
||||
valueComparator: {
|
||||
type: Function,
|
||||
default: deepEqual
|
||||
},
|
||||
...makeComponentProps(),
|
||||
...makeDensityProps(),
|
||||
...makeThemeProps()
|
||||
}, "SelectionControlGroup");
|
||||
var makeVSelectionControlGroupProps = propsFactory({
|
||||
...makeSelectionControlGroupProps({
|
||||
defaultsTarget: "VSelectionControl"
|
||||
})
|
||||
}, "VSelectionControlGroup");
|
||||
var VSelectionControlGroup = genericComponent()({
|
||||
name: "VSelectionControlGroup",
|
||||
props: makeVSelectionControlGroupProps(),
|
||||
emits: {
|
||||
"update:modelValue": (value) => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
const modelValue = useProxiedModel(props, "modelValue");
|
||||
const uid = useId();
|
||||
const id = toRef(() => props.id || `v-selection-control-group-${uid}`);
|
||||
const name = toRef(() => props.name || id.value);
|
||||
const updateHandlers = /* @__PURE__ */ new Set();
|
||||
provide(VSelectionControlGroupSymbol, {
|
||||
modelValue,
|
||||
forceUpdate: () => {
|
||||
updateHandlers.forEach((fn) => fn());
|
||||
},
|
||||
onForceUpdate: (cb) => {
|
||||
updateHandlers.add(cb);
|
||||
onScopeDispose(() => {
|
||||
updateHandlers.delete(cb);
|
||||
});
|
||||
}
|
||||
});
|
||||
provideDefaults({
|
||||
[props.defaultsTarget]: {
|
||||
color: toRef(() => props.color),
|
||||
disabled: toRef(() => props.disabled),
|
||||
density: toRef(() => props.density),
|
||||
error: toRef(() => props.error),
|
||||
inline: toRef(() => props.inline),
|
||||
modelValue,
|
||||
multiple: toRef(() => !!props.multiple || props.multiple == null && Array.isArray(modelValue.value)),
|
||||
name,
|
||||
falseIcon: toRef(() => props.falseIcon),
|
||||
trueIcon: toRef(() => props.trueIcon),
|
||||
readonly: toRef(() => props.readonly),
|
||||
ripple: toRef(() => props.ripple),
|
||||
type: toRef(() => props.type),
|
||||
valueComparator: toRef(() => props.valueComparator)
|
||||
}
|
||||
});
|
||||
useRender(() => createBaseVNode("div", {
|
||||
"class": normalizeClass(["v-selection-control-group", {
|
||||
"v-selection-control-group--inline": props.inline
|
||||
}, props.class]),
|
||||
"style": normalizeStyle(props.style),
|
||||
"role": props.type === "radio" ? "radiogroup" : void 0
|
||||
}, [slots.default?.()]));
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/vuetify/lib/components/VSelectionControl/VSelectionControl.js
|
||||
var makeVSelectionControlProps = propsFactory({
|
||||
label: String,
|
||||
baseColor: String,
|
||||
trueValue: null,
|
||||
falseValue: null,
|
||||
value: null,
|
||||
...makeComponentProps(),
|
||||
...makeSelectionControlGroupProps()
|
||||
}, "VSelectionControl");
|
||||
function useSelectionControl(props) {
|
||||
const group = inject(VSelectionControlGroupSymbol, void 0);
|
||||
const {
|
||||
densityClasses
|
||||
} = useDensity(props);
|
||||
const modelValue = useProxiedModel(props, "modelValue");
|
||||
const trueValue = computed(() => props.trueValue !== void 0 ? props.trueValue : props.value !== void 0 ? props.value : true);
|
||||
const falseValue = computed(() => props.falseValue !== void 0 ? props.falseValue : false);
|
||||
const isMultiple = computed(() => !!props.multiple || props.multiple == null && Array.isArray(modelValue.value));
|
||||
const model = computed({
|
||||
get() {
|
||||
const val = group ? group.modelValue.value : modelValue.value;
|
||||
return isMultiple.value ? wrapInArray(val).some((v) => props.valueComparator(v, trueValue.value)) : props.valueComparator(val, trueValue.value);
|
||||
},
|
||||
set(val) {
|
||||
if (props.readonly) return;
|
||||
const currentValue = val ? trueValue.value : falseValue.value;
|
||||
let newVal = currentValue;
|
||||
if (isMultiple.value) {
|
||||
newVal = val ? [...wrapInArray(modelValue.value), currentValue] : wrapInArray(modelValue.value).filter((item) => !props.valueComparator(item, trueValue.value));
|
||||
}
|
||||
if (group) {
|
||||
group.modelValue.value = newVal;
|
||||
} else {
|
||||
modelValue.value = newVal;
|
||||
}
|
||||
}
|
||||
});
|
||||
const {
|
||||
textColorClasses,
|
||||
textColorStyles
|
||||
} = useTextColor(() => {
|
||||
if (props.error || props.disabled) return void 0;
|
||||
return model.value ? props.color : props.baseColor;
|
||||
});
|
||||
const {
|
||||
backgroundColorClasses,
|
||||
backgroundColorStyles
|
||||
} = useBackgroundColor(() => {
|
||||
return model.value && !props.error && !props.disabled ? props.color : props.baseColor;
|
||||
});
|
||||
const icon = computed(() => model.value ? props.trueIcon : props.falseIcon);
|
||||
return {
|
||||
group,
|
||||
densityClasses,
|
||||
trueValue,
|
||||
falseValue,
|
||||
model,
|
||||
textColorClasses,
|
||||
textColorStyles,
|
||||
backgroundColorClasses,
|
||||
backgroundColorStyles,
|
||||
icon
|
||||
};
|
||||
}
|
||||
var VSelectionControl = genericComponent()({
|
||||
name: "VSelectionControl",
|
||||
directives: {
|
||||
vRipple: ripple_default
|
||||
},
|
||||
inheritAttrs: false,
|
||||
props: makeVSelectionControlProps(),
|
||||
emits: {
|
||||
"update:modelValue": (value) => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
attrs,
|
||||
slots
|
||||
} = _ref;
|
||||
const {
|
||||
group,
|
||||
densityClasses,
|
||||
icon,
|
||||
model,
|
||||
textColorClasses,
|
||||
textColorStyles,
|
||||
backgroundColorClasses,
|
||||
backgroundColorStyles,
|
||||
trueValue
|
||||
} = useSelectionControl(props);
|
||||
const uid = useId();
|
||||
const isFocused = shallowRef(false);
|
||||
const isFocusVisible = shallowRef(false);
|
||||
const input = ref();
|
||||
const id = toRef(() => props.id || `input-${uid}`);
|
||||
const isInteractive = toRef(() => !props.disabled && !props.readonly);
|
||||
group?.onForceUpdate(() => {
|
||||
if (input.value) {
|
||||
input.value.checked = model.value;
|
||||
}
|
||||
});
|
||||
function onFocus(e) {
|
||||
if (!isInteractive.value) return;
|
||||
isFocused.value = true;
|
||||
if (matchesSelector(e.target, ":focus-visible") !== false) {
|
||||
isFocusVisible.value = true;
|
||||
}
|
||||
}
|
||||
function onBlur() {
|
||||
isFocused.value = false;
|
||||
isFocusVisible.value = false;
|
||||
}
|
||||
function onClickLabel(e) {
|
||||
e.stopPropagation();
|
||||
}
|
||||
function onInput(e) {
|
||||
if (!isInteractive.value) {
|
||||
if (input.value) {
|
||||
input.value.checked = model.value;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (props.readonly && group) {
|
||||
nextTick(() => group.forceUpdate());
|
||||
}
|
||||
model.value = e.target.checked;
|
||||
}
|
||||
useRender(() => {
|
||||
const label = slots.label ? slots.label({
|
||||
label: props.label,
|
||||
props: {
|
||||
for: id.value
|
||||
}
|
||||
}) : props.label;
|
||||
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|
||||
const inputNode = createBaseVNode("input", mergeProps({
|
||||
"ref": input,
|
||||
"checked": model.value,
|
||||
"disabled": !!props.disabled,
|
||||
"id": id.value,
|
||||
"onBlur": onBlur,
|
||||
"onFocus": onFocus,
|
||||
"onInput": onInput,
|
||||
"aria-disabled": !!props.disabled,
|
||||
"aria-label": props.label,
|
||||
"type": props.type,
|
||||
"value": trueValue.value,
|
||||
"name": props.name,
|
||||
"aria-checked": props.type === "checkbox" ? model.value : void 0
|
||||
}, inputAttrs), null);
|
||||
return createBaseVNode("div", mergeProps({
|
||||
"class": ["v-selection-control", {
|
||||
"v-selection-control--dirty": model.value,
|
||||
"v-selection-control--disabled": props.disabled,
|
||||
"v-selection-control--error": props.error,
|
||||
"v-selection-control--focused": isFocused.value,
|
||||
"v-selection-control--focus-visible": isFocusVisible.value,
|
||||
"v-selection-control--inline": props.inline
|
||||
}, densityClasses.value, props.class]
|
||||
}, rootAttrs, {
|
||||
"style": props.style
|
||||
}), [createBaseVNode("div", {
|
||||
"class": normalizeClass(["v-selection-control__wrapper", textColorClasses.value]),
|
||||
"style": normalizeStyle(textColorStyles.value)
|
||||
}, [slots.default?.({
|
||||
backgroundColorClasses,
|
||||
backgroundColorStyles
|
||||
}), withDirectives(createBaseVNode("div", {
|
||||
"class": normalizeClass(["v-selection-control__input"])
|
||||
}, [slots.input?.({
|
||||
model,
|
||||
textColorClasses,
|
||||
textColorStyles,
|
||||
backgroundColorClasses,
|
||||
backgroundColorStyles,
|
||||
inputNode,
|
||||
icon: icon.value,
|
||||
props: {
|
||||
onFocus,
|
||||
onBlur,
|
||||
id: id.value
|
||||
}
|
||||
}) ?? createBaseVNode(Fragment, null, [icon.value && createVNode(VIcon, {
|
||||
"key": "icon",
|
||||
"icon": icon.value
|
||||
}, null), inputNode])]), [[ripple_default, !props.disabled && !props.readonly && props.ripple, null, {
|
||||
center: true,
|
||||
circle: true
|
||||
}]])]), label && createVNode(VLabel, {
|
||||
"for": id.value,
|
||||
"onClick": onClickLabel
|
||||
}, {
|
||||
default: () => [label]
|
||||
})]);
|
||||
});
|
||||
return {
|
||||
isFocused,
|
||||
input
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/vuetify/lib/components/VCheckbox/VCheckboxBtn.js
|
||||
var makeVCheckboxBtnProps = propsFactory({
|
||||
indeterminate: Boolean,
|
||||
indeterminateIcon: {
|
||||
type: IconValue,
|
||||
default: "$checkboxIndeterminate"
|
||||
},
|
||||
...makeVSelectionControlProps({
|
||||
falseIcon: "$checkboxOff",
|
||||
trueIcon: "$checkboxOn"
|
||||
})
|
||||
}, "VCheckboxBtn");
|
||||
var VCheckboxBtn = genericComponent()({
|
||||
name: "VCheckboxBtn",
|
||||
props: makeVCheckboxBtnProps(),
|
||||
emits: {
|
||||
"update:modelValue": (value) => true,
|
||||
"update:indeterminate": (value) => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
const indeterminate = useProxiedModel(props, "indeterminate");
|
||||
const model = useProxiedModel(props, "modelValue");
|
||||
function onChange(v) {
|
||||
if (indeterminate.value) {
|
||||
indeterminate.value = false;
|
||||
}
|
||||
}
|
||||
const falseIcon = toRef(() => {
|
||||
return indeterminate.value ? props.indeterminateIcon : props.falseIcon;
|
||||
});
|
||||
const trueIcon = toRef(() => {
|
||||
return indeterminate.value ? props.indeterminateIcon : props.trueIcon;
|
||||
});
|
||||
useRender(() => {
|
||||
const controlProps = omit(VSelectionControl.filterProps(props), ["modelValue"]);
|
||||
return createVNode(VSelectionControl, mergeProps(controlProps, {
|
||||
"modelValue": model.value,
|
||||
"onUpdate:modelValue": [($event) => model.value = $event, onChange],
|
||||
"class": ["v-checkbox-btn", props.class],
|
||||
"style": props.style,
|
||||
"type": "checkbox",
|
||||
"falseIcon": falseIcon.value,
|
||||
"trueIcon": trueIcon.value,
|
||||
"aria-checked": indeterminate.value ? "mixed" : void 0
|
||||
}), slots);
|
||||
});
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/vuetify/lib/components/VCheckbox/VCheckbox.js
|
||||
var makeVCheckboxProps = propsFactory({
|
||||
...makeVInputProps(),
|
||||
...omit(makeVCheckboxBtnProps(), ["inline"])
|
||||
}, "VCheckbox");
|
||||
var VCheckbox = genericComponent()({
|
||||
name: "VCheckbox",
|
||||
inheritAttrs: false,
|
||||
props: makeVCheckboxProps(),
|
||||
emits: {
|
||||
"update:modelValue": (value) => true,
|
||||
"update:focused": (focused) => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
attrs,
|
||||
slots
|
||||
} = _ref;
|
||||
const model = useProxiedModel(props, "modelValue");
|
||||
const {
|
||||
isFocused,
|
||||
focus,
|
||||
blur
|
||||
} = useFocus(props);
|
||||
const inputRef = ref();
|
||||
const uid = useId();
|
||||
useRender(() => {
|
||||
const [rootAttrs, controlAttrs] = filterInputAttrs(attrs);
|
||||
const inputProps = VInput.filterProps(props);
|
||||
const checkboxProps = VCheckboxBtn.filterProps(props);
|
||||
return createVNode(VInput, mergeProps({
|
||||
"ref": inputRef,
|
||||
"class": ["v-checkbox", props.class]
|
||||
}, rootAttrs, inputProps, {
|
||||
"modelValue": model.value,
|
||||
"onUpdate:modelValue": ($event) => model.value = $event,
|
||||
"id": props.id || `checkbox-${uid}`,
|
||||
"focused": isFocused.value,
|
||||
"style": props.style
|
||||
}), {
|
||||
...slots,
|
||||
default: (_ref2) => {
|
||||
let {
|
||||
id,
|
||||
messagesId,
|
||||
isDisabled,
|
||||
isReadonly,
|
||||
isValid
|
||||
} = _ref2;
|
||||
return createVNode(VCheckboxBtn, mergeProps(checkboxProps, {
|
||||
"id": id.value,
|
||||
"aria-describedby": messagesId.value,
|
||||
"disabled": isDisabled.value,
|
||||
"readonly": isReadonly.value
|
||||
}, controlAttrs, {
|
||||
"error": isValid.value === false,
|
||||
"modelValue": model.value,
|
||||
"onUpdate:modelValue": ($event) => model.value = $event,
|
||||
"onFocus": focus,
|
||||
"onBlur": blur
|
||||
}), slots);
|
||||
}
|
||||
});
|
||||
});
|
||||
return forwardRefs({}, inputRef);
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
makeSelectionControlGroupProps,
|
||||
VSelectionControlGroup,
|
||||
makeVSelectionControlProps,
|
||||
VSelectionControl,
|
||||
VCheckboxBtn,
|
||||
VCheckbox
|
||||
};
|
||||
//# sourceMappingURL=chunk-BYBKODOB.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VCheckbox/VCheckbox.tsx", "../../vuetify/src/components/VSelectionControl/VSelectionControl.tsx", "../../vuetify/src/components/VSelectionControlGroup/VSelectionControlGroup.tsx", "../../vuetify/src/components/VCheckbox/VCheckboxBtn.tsx"],
|
||||
"sourcesContent": ["// Styles\nimport './VCheckbox.sass'\n\n// Components\nimport { makeVCheckboxBtnProps, VCheckboxBtn } from './VCheckboxBtn'\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\n\n// Composables\nimport { useFocus } from '@/composables/focus'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { ref, useId } from 'vue'\nimport { filterInputAttrs, genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { VSelectionControlSlots } from '../VSelectionControl/VSelectionControl'\nimport type { VInputSlots } from '@/components/VInput/VInput'\nimport type { GenericProps } from '@/util'\n\nexport type VCheckboxSlots = Omit<VInputSlots, 'default'> & VSelectionControlSlots\n\nexport const makeVCheckboxProps = propsFactory({\n ...makeVInputProps(),\n ...omit(makeVCheckboxBtnProps(), ['inline']),\n}, 'VCheckbox')\n\nexport const VCheckbox = genericComponent<new <T>(\n props: {\n modelValue?: T | null\n 'onUpdate:modelValue'?: (value: T | null) => void\n },\n slots: VCheckboxSlots,\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VCheckbox',\n\n inheritAttrs: false,\n\n props: makeVCheckboxProps(),\n\n emits: {\n 'update:modelValue': (value: any) => true,\n 'update:focused': (focused: boolean) => true,\n },\n\n setup (props, { attrs, slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const { isFocused, focus, blur } = useFocus(props)\n const inputRef = ref<VInput>()\n\n const uid = useId()\n\n useRender(() => {\n const [rootAttrs, controlAttrs] = filterInputAttrs(attrs)\n const inputProps = VInput.filterProps(props)\n const checkboxProps = VCheckboxBtn.filterProps(props)\n\n return (\n <VInput\n ref={ inputRef }\n class={[\n 'v-checkbox',\n props.class,\n ]}\n { ...rootAttrs }\n { ...inputProps }\n v-model={ model.value }\n id={ props.id || `checkbox-${uid}` }\n focused={ isFocused.value }\n style={ props.style }\n >\n {{\n ...slots,\n default: ({\n id,\n messagesId,\n isDisabled,\n isReadonly,\n isValid,\n }) => (\n <VCheckboxBtn\n { ...checkboxProps }\n id={ id.value }\n aria-describedby={ messagesId.value }\n disabled={ isDisabled.value }\n readonly={ isReadonly.value }\n { ...controlAttrs }\n error={ isValid.value === false }\n v-model={ model.value }\n onFocus={ focus }\n onBlur={ blur }\n v-slots={ slots }\n />\n ),\n }}\n </VInput>\n )\n })\n\n return forwardRefs({}, inputRef)\n },\n})\n\nexport type VCheckbox = InstanceType<typeof VCheckbox>\n", "// Styles\nimport './VSelectionControl.sass'\n\n// Components\nimport { VIcon } from '@/components/VIcon'\nimport { VLabel } from '@/components/VLabel'\nimport { makeSelectionControlGroupProps, VSelectionControlGroupSymbol } from '@/components/VSelectionControlGroup/VSelectionControlGroup'\n\n// Composables\nimport { useBackgroundColor, useTextColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { useDensity } from '@/composables/density'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Directives\nimport vRipple from '@/directives/ripple'\n\n// Utilities\nimport { computed, inject, nextTick, ref, shallowRef, toRef, useId } from 'vue'\nimport {\n filterInputAttrs,\n genericComponent,\n matchesSelector,\n propsFactory,\n useRender,\n wrapInArray,\n} from '@/util'\n\n// Types\nimport type { CSSProperties, ExtractPropTypes, Ref, VNode, WritableComputedRef } from 'vue'\nimport type { IconValue } from '@/composables/icons'\nimport type { EventProp, GenericProps } from '@/util'\n\nexport type SelectionControlSlot = {\n model: WritableComputedRef<boolean>\n textColorClasses: Ref<string[]>\n textColorStyles: Ref<CSSProperties>\n backgroundColorClasses: Ref<string[]>\n backgroundColorStyles: Ref<CSSProperties>\n inputNode: VNode\n icon: IconValue | undefined\n props: {\n onBlur: (e: Event) => void\n onFocus: (e: FocusEvent) => void\n id: string\n }\n}\n\nexport type VSelectionControlSlots = {\n default: {\n backgroundColorClasses: Ref<string[]>\n backgroundColorStyles: Ref<CSSProperties>\n }\n label: { label: string | undefined, props: Record<string, unknown> }\n input: SelectionControlSlot\n}\n\nexport const makeVSelectionControlProps = propsFactory({\n label: String,\n baseColor: String,\n trueValue: null,\n falseValue: null,\n value: null,\n\n ...makeComponentProps(),\n ...makeLine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAA;;;ACAA,OAAA;;;ACAA,OAAA;AAyBO,IAAMA,+BAAqEC,uBAAOC,IAAI,iCAAiC;AAEvH,IAAMC,iCAAiCC,aAAa;EACzDC,OAAOC;EACPC,UAAU;IACRC,MAAMC;IACNC,SAAS;EACX;EACAC,gBAAgBL;EAChBM,OAAOH;EACPI,IAAIP;EACJQ,QAAQL;EACRM,WAAWC;EACXC,UAAUD;EACVE,QAAQ;IACNV,MAAM,CAACC,SAASU,MAAM;IACtBT,SAAS;EACX;EACAU,UAAU;IACRZ,MAAMC;IACNC,SAAS;EACX;EACAW,MAAMf;EACNgB,UAAU;IACRd,MAAMC;IACNC,SAAS;EACX;EACAa,YAAY;EACZf,MAAMF;EACNkB,iBAAiB;IACfhB,MAAMiB;IACNf,SAASgB;EACX;EAEA,GAAGC,mBAAmB;EACtB,GAAGC,iBAAiB;EACpB,GAAGC,eAAe;AACpB,GAAG,uBAAuB;AAEnB,IAAMC,kCAAkC1B,aAAa;EAC1D,GAAGD,+BAA+B;IAChCQ,gBAAgB;EAClB,CAAC;AACH,GAAG,wBAAwB;AAEpB,IAAMoB,yBAAyBC,iBAMS,EAAE;EAC/CX,MAAM;EAENY,OAAOH,gCAAgC;EAEvCI,OAAO;IACL,qBAAsBC,WAAe;EACvC;EAEAC,MAAOH,OAAKI,MAAa;AAAA,QAAX;MAAEC;IAAM,IAACD;AACrB,UAAMd,aAAagB,gBAAgBN,OAAO,YAAY;AACtD,UAAMO,MAAMC,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D,MAAM,SAASP,GAAG,EAAE;AACjD,UAAMS,gBAAgBD,MAAM,MAAM,CAAC1D,MAAM+B,YAAY,CAAC/B,MAAMsB,QAAQ;AAEpErB,WAAO2D,cAAc,MAAM;AACzB,UAAIL,MAAM3D,OAAO;AACf2D,cAAM3D,MAAMiE,UAAU/C,MAAMlB;MAC9B;IACF,CAAC;AAED,aAASkE,QAASC,GAAe;AAC/B,UAAI,CAACJ,cAAc/D,MAAO;AAE1BwD,gBAAUxD,QAAQ;AAClB,UAAIoE,gBAAgBD,EAAEE,QAAuB,gBAAgB,MAAM,OAAO;AACxEX,uBAAe1D,QAAQ;MACzB;IACF;AAEA,aAASsE,SAAU;AACjBd,gBAAUxD,QAAQ;AAClB0D,qBAAe1D,QAAQ;IACzB;AAEA,aAASuE,aAAcJ,GAAU;AAC/BA,QAAEK,gBAAgB;IACpB;AAEA,aAASC,QAASN,GAAU;AAC1B,UAAI,CAACJ,cAAc/D,OAAO;AACxB,YAAI2D,MAAM3D,OAAO;AAIf2D,gBAAM3D,MAAMiE,UAAU/C,MAAMlB;QAC9B;AAEA;MACF;AAEA,UAAII,MAAMsB,YAAYrB,OAAO;AAC3BqE,iBAAS,MAAMrE,MAAMsE,YAAY,CAAC;MACpC;AACAzD,YAAMlB,QAASmE,EAAEE,OAA4BJ;IAC/C;AAEAW,cAAU,MAAM;AACd,YAAMjF,QAAQ0D,MAAM1D,QAChB0D,MAAM1D,MAAM;QACZA,OAAOS,MAAMT;QACbS,OAAO;UAAEyE,KAAKhB,GAAG7D;QAAM;MACzB,CAAC,IACCI,MAAMT;AACV,YAAM,CAACmF,WAAWC,UAAU,IAAIC,iBAAiB5B,KAAK;AAEtD,YAAM6B,YAASC,gBAAA,SAAAC,WAAA;QAAA,OAELxB;QAAK,WACLine truncated
|
||||
"names": ["VSelectionControlGroupSymbol", "Symbol", "for", "makeSelectionControlGroupProps", "propsFactory", "color", "String", "disabled", "type", "Boolean", "default", "defaultsTarget", "error", "id", "inline", "falseIcon", "IconValue", "trueIcon", "ripple", "Object", "multiple", "name", "readonly", "modelValue", "valueComparator", "Function", "deepEqual", "makeComponentProps", "makeDensityProps", "makeThemeProps", "makeVSelectionControlGroupProps", "VSelectionControlGroup", "genericComponent", "props", "emits", "value", "setup", "_ref", "slots", "useProxiedModel", "uid", "useId", "toRef", "updateHandlers", "Set", "provide", "forceUpdate", "forEach", "fn", "onForceUpdate", "cb", "add", "onScopeDispose", "delete", "provideDefaults", "density", "Array", "isArray", "useRender", "_createElementVNode", "_normalizeClass", "class", "_normalizeStyle", "style", "undefined", "makeVSelectionControlProps", "propsFactory", "label", "String", "baseColor", "trueValue", "falseValue", "value", "makeComponentProps", "makeSelectionControlGroupProps", "useSelectionControl", "props", "group", "inject", "VSelectionControlGroupSymbol", "undefined", "densityClasses", "useDensity", "modelValue", "useProxiedModel", "computed", "isMultiple", "multiple", "Array", "isArray", "model", "get", "val", "wrapInArray", "some", "v", "valueComparator", "set", "readonly", "currentValue", "newVal", "filter", "item", "textColorClasses", "textColorStyles", "useTextColor", "error", "disabled", "color", "backgroundColorClasses", "backgroundColorStyles", "useBackgroundColor", "icon", "trueIcon", "falseIcon", "VSelectionControl", "genericComponent", "name", "directives", "vRipple", "inheritAttrs", "emits", "setup", "_ref", "attrs", "slots", "uid", "useId", "isFocused", "shallowRef", "isFocusVisible", "input", "ref", "id", "toRef", "isInteractive", "onForceUpdate", "checked", "onFocus", "e", "matchesSelector", "target", "onBlur", "onClickLabel", "stopPropagation", "onInput", "nextTick", "forceUpdate", "useRender", "for", "rootAttrs", "inputAttrs", "filterInputAttrs", "inputNode", "_createElementVNode", "_mergeProps", "type", "inline", "class", "style", "_normalizeClass", "_normalizeStyle", "default", "_withDirectives", "_Fragment", "_createVNode", "VIcon", "ripple", "center", "circle", "VLabel", "makeVCheckboxBtnProps", "propsFactory", "indeterminate", "Boolean", "indeterminateIcon", "type", "IconValue", "default", "makeVSelectionControlProps", "falseIcon", "trueIcon", "VCheckboxBtn", "genericComponent", "name", "props", "emits", "value", "setup", "_ref", "slots", "useProxiedModel", "model", "onChange", "v", "toRef", "useRender", "controlProps", "omit", "VSelectionControl", "filterProps", "_createVNode", "_mergeProps", "$event", "class", "style", "undefined", "makeVCheckboxProps", "propsFactory", "makeVInputProps", "omit", "makeVCheckboxBtnProps", "VCheckbox", "genericComponent", "name", "inheritAttrs", "props", "emits", "value", "focused", "setup", "_ref", "attrs", "slots", "model", "useProxiedModel", "isFocused", "focus", "blur", "useFocus", "inputRef", "ref", "uid", "useId", "useRender", "rootAttrs", "controlAttrs", "filterInputAttrs", "inputProps", "VInput", "filterProps", "checkboxProps", "VCheckboxBtn", "_createVNode", "_mergeProps", "class", "$event", "id", "style", "default", "_ref2", "messagesId", "isDisabled", "isReadonly", "isValid", "forwardRefs"]
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
import {
|
||||
isObject,
|
||||
onlyDefinedProps,
|
||||
propsFactory
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
Transition,
|
||||
TransitionGroup,
|
||||
h,
|
||||
mergeProps
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/composables/transition.js
|
||||
var makeTransitionProps = propsFactory({
|
||||
transition: {
|
||||
type: null,
|
||||
default: "fade-transition",
|
||||
validator: (val) => val !== true
|
||||
}
|
||||
}, "transition");
|
||||
var MaybeTransition = (props, _ref) => {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
const {
|
||||
transition,
|
||||
disabled,
|
||||
group,
|
||||
...rest
|
||||
} = props;
|
||||
const {
|
||||
component = group ? TransitionGroup : Transition,
|
||||
...customProps
|
||||
} = isObject(transition) ? transition : {};
|
||||
let transitionProps;
|
||||
if (isObject(transition)) {
|
||||
transitionProps = mergeProps(customProps, onlyDefinedProps({
|
||||
disabled,
|
||||
group
|
||||
}), rest);
|
||||
} else {
|
||||
transitionProps = mergeProps({
|
||||
name: disabled || !transition ? "" : transition
|
||||
}, rest);
|
||||
}
|
||||
return h(component, transitionProps, slots);
|
||||
};
|
||||
|
||||
export {
|
||||
makeTransitionProps,
|
||||
MaybeTransition
|
||||
};
|
||||
//# sourceMappingURL=chunk-CAGZXMOS.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/composables/transition.ts"],
|
||||
"sourcesContent": ["// Utilities\nimport { h, mergeProps, Transition, TransitionGroup } from 'vue'\nimport { isObject, onlyDefinedProps, propsFactory } from '@/util'\n\n// Types\nimport type { Component, FunctionalComponent, Prop, TransitionProps } from 'vue'\n\nexport const makeTransitionProps = propsFactory({\n transition: {\n type: null,\n default: 'fade-transition',\n validator: val => val !== true,\n } as Prop<null | string | boolean | TransitionProps & { component?: Component }>,\n}, 'transition')\n\ninterface MaybeTransitionProps extends TransitionProps {\n transition?: null | string | boolean | TransitionProps & { component?: any }\n disabled?: boolean\n group?: boolean\n}\n\nexport const MaybeTransition: FunctionalComponent<MaybeTransitionProps> = (props, { slots }) => {\n const { transition, disabled, group, ...rest } = props\n\n const {\n component = group ? TransitionGroup : Transition,\n ...customProps\n } = isObject(transition) ? transition : {}\n\n let transitionProps\n if (isObject(transition)) {\n transitionProps = mergeProps(\n customProps,\n onlyDefinedProps({ disabled, group }),\n rest,\n )\n } else {\n transitionProps = mergeProps(\n { name: disabled || !transition ? '' : transition },\n rest,\n )\n }\n\n return h(\n component,\n transitionProps,\n slots\n )\n}\n"],
|
||||
"mappings": ";;;;;;;;;;;;;AAOO,IAAMA,sBAAsBC,aAAa;EAC9CC,YAAY;IACVC,MAAM;IACNC,SAAS;IACTC,WAAWC,SAAOA,QAAQ;EAC5B;AACF,GAAG,YAAY;AAQR,IAAMC,kBAA6DA,CAACC,OAAKC,SAAgB;AAAA,MAAd;IAAEC;EAAM,IAACD;AACzF,QAAM;IAAEP;IAAYS;IAAUC;IAAO,GAAGC;EAAK,IAAIL;AAEjD,QAAM;IACJM,YAAYF,QAAQG,kBAAkBC;IACtC,GAAGC;EACL,IAAIC,SAAShB,UAAU,IAAIA,aAAa,CAAC;AAEzC,MAAIiB;AACJ,MAAID,SAAShB,UAAU,GAAG;AACxBiB,sBAAkBC,WAChBH,aACAI,iBAAiB;MAAEV;MAAUC;IAAM,CAAC,GACpCC,IACF;EACF,OAAO;AACLM,sBAAkBC,WAChB;MAAEE,MAAMX,YAAY,CAACT,aAAa,KAAKA;IAAW,GAClDW,IACF;EACF;AAEA,SAAOU,EACLT,WACAK,iBACAT,KACF;AACF;",
|
||||
"names": ["makeTransitionProps", "propsFactory", "transition", "type", "default", "validator", "val", "MaybeTransition", "props", "_ref", "slots", "disabled", "group", "rest", "component", "TransitionGroup", "Transition", "customProps", "isObject", "transitionProps", "mergeProps", "onlyDefinedProps", "name", "h"]
|
||||
}
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
import {
|
||||
makeSizeProps,
|
||||
useSize
|
||||
} from "./chunk-PIT7IT55.js";
|
||||
import {
|
||||
makeTagProps
|
||||
} from "./chunk-2HZIACSB.js";
|
||||
import {
|
||||
IconValue,
|
||||
useIcon
|
||||
} from "./chunk-OJDZBU5D.js";
|
||||
import {
|
||||
useTextColor
|
||||
} from "./chunk-BHV5Z34M.js";
|
||||
import {
|
||||
makeThemeProps,
|
||||
useTheme
|
||||
} from "./chunk-3DSR7NCB.js";
|
||||
import {
|
||||
convertToUnit,
|
||||
flattenFragments,
|
||||
genericComponent,
|
||||
makeComponentProps,
|
||||
propsFactory,
|
||||
useRender
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
Text,
|
||||
createVNode,
|
||||
normalizeClass,
|
||||
normalizeStyle,
|
||||
shallowRef
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/VIcon/VIcon.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VIcon/VIcon.css";
|
||||
var makeVIconProps = propsFactory({
|
||||
color: String,
|
||||
disabled: Boolean,
|
||||
start: Boolean,
|
||||
end: Boolean,
|
||||
icon: IconValue,
|
||||
opacity: [String, Number],
|
||||
...makeComponentProps(),
|
||||
...makeSizeProps(),
|
||||
...makeTagProps({
|
||||
tag: "i"
|
||||
}),
|
||||
...makeThemeProps()
|
||||
}, "VIcon");
|
||||
var VIcon = genericComponent()({
|
||||
name: "VIcon",
|
||||
props: makeVIconProps(),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
attrs,
|
||||
slots
|
||||
} = _ref;
|
||||
const slotIcon = shallowRef();
|
||||
const {
|
||||
themeClasses
|
||||
} = useTheme();
|
||||
const {
|
||||
iconData
|
||||
} = useIcon(() => slotIcon.value || props.icon);
|
||||
const {
|
||||
sizeClasses
|
||||
} = useSize(props);
|
||||
const {
|
||||
textColorClasses,
|
||||
textColorStyles
|
||||
} = useTextColor(() => props.color);
|
||||
useRender(() => {
|
||||
const slotValue = slots.default?.();
|
||||
if (slotValue) {
|
||||
slotIcon.value = flattenFragments(slotValue).filter((node) => node.type === Text && node.children && typeof node.children === "string")[0]?.children;
|
||||
}
|
||||
const hasClick = !!(attrs.onClick || attrs.onClickOnce);
|
||||
return createVNode(iconData.value.component, {
|
||||
"tag": props.tag,
|
||||
"icon": iconData.value.icon,
|
||||
"class": normalizeClass(["v-icon", "notranslate", themeClasses.value, sizeClasses.value, textColorClasses.value, {
|
||||
"v-icon--clickable": hasClick,
|
||||
"v-icon--disabled": props.disabled,
|
||||
"v-icon--start": props.start,
|
||||
"v-icon--end": props.end
|
||||
}, props.class]),
|
||||
"style": normalizeStyle([{
|
||||
"--v-icon-opacity": props.opacity
|
||||
}, !sizeClasses.value ? {
|
||||
fontSize: convertToUnit(props.size),
|
||||
height: convertToUnit(props.size),
|
||||
width: convertToUnit(props.size)
|
||||
} : void 0, textColorStyles.value, props.style]),
|
||||
"role": hasClick ? "button" : void 0,
|
||||
"aria-hidden": !hasClick,
|
||||
"tabindex": hasClick ? props.disabled ? -1 : 0 : void 0
|
||||
}, {
|
||||
default: () => [slotValue]
|
||||
});
|
||||
});
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
VIcon
|
||||
};
|
||||
//# sourceMappingURL=chunk-CMZ4UYUX.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VIcon/VIcon.tsx"],
|
||||
"sourcesContent": ["// Styles\nimport './VIcon.sass'\n\n// Composables\nimport { useTextColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { IconValue, useIcon } from '@/composables/icons'\nimport { makeSizeProps, useSize } from '@/composables/size'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, useTheme } from '@/composables/theme'\n\n// Utilities\nimport { shallowRef, Text } from 'vue'\nimport { convertToUnit, flattenFragments, genericComponent, propsFactory, useRender } from '@/util'\n\nexport const makeVIconProps = propsFactory({\n color: String,\n disabled: Boolean,\n start: Boolean,\n end: Boolean,\n icon: IconValue,\n opacity: [String, Number],\n\n ...makeComponentProps(),\n ...makeSizeProps(),\n ...makeTagProps({ tag: 'i' }),\n ...makeThemeProps(),\n}, 'VIcon')\n\nexport const VIcon = genericComponent()({\n name: 'VIcon',\n\n props: makeVIconProps(),\n\n setup (props, { attrs, slots }) {\n const slotIcon = shallowRef<string>()\n\n const { themeClasses } = useTheme()\n const { iconData } = useIcon(() => slotIcon.value || props.icon)\n const { sizeClasses } = useSize(props)\n const { textColorClasses, textColorStyles } = useTextColor(() => props.color)\n\n useRender(() => {\n const slotValue = slots.default?.()\n if (slotValue) {\n slotIcon.value = flattenFragments(slotValue).filter(node =>\n node.type === Text && node.children && typeof node.children === 'string'\n )[0]?.children as string\n }\n const hasClick = !!(attrs.onClick || attrs.onClickOnce)\n\n return (\n <iconData.value.component\n tag={ props.tag }\n icon={ iconData.value.icon }\n class={[\n 'v-icon',\n 'notranslate',\n themeClasses.value,\n sizeClasses.value,\n textColorClasses.value,\n {\n 'v-icon--clickable': hasClick,\n 'v-icon--disabled': props.disabled,\n 'v-icon--start': props.start,\n 'v-icon--end': props.end,\n },\n props.class,\n ]}\n style={[\n {\n '--v-icon-opacity': props.opacity,\n },\n !sizeClasses.value ? ({\n fontSize: convertToUnit(props.size),\n height: convertToUnit(props.size),\n width: convertToUnit(props.size),\n }) : undefined,\n textColorStyles.value,\n props.style,\n ]}\n role={ hasClick ? 'button' : undefined }\n aria-hidden={ !hasClick }\n tabindex={ hasClick ? props.disabled ? -1 : 0 : undefined }\n >\n { slotValue }\n </iconData.value.component>\n )\n })\n\n return {}\n },\n})\n\nexport type VIcon = InstanceType<typeof VIcon>\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAA;AAcO,IAAMA,iBAAiBC,aAAa;EACzCC,OAAOC;EACPC,UAAUC;EACVC,OAAOD;EACPE,KAAKF;EACLG,MAAMC;EACNC,SAAS,CAACP,QAAQQ,MAAM;EAExB,GAAGC,mBAAmB;EACtB,GAAGC,cAAc;EACjB,GAAGC,aAAa;IAAEC,KAAK;EAAI,CAAC;EAC5B,GAAGC,eAAe;AACpB,GAAG,OAAO;AAEH,IAAMC,QAAQC,iBAAiB,EAAE;EACtCC,MAAM;EAENC,OAAOpB,eAAe;EAEtBqB,MAAOD,OAAKE,MAAoB;AAAA,QAAlB;MAAEC;MAAOC;IAAM,IAACF;AAC5B,UAAMG,WAAWC,WAAmB;AAEpC,UAAM;MAAEC;IAAa,IAAIC,SAAS;AAClC,UAAM;MAAEC;IAAS,IAAIC,QAAQ,MAAML,SAASM,SAASX,MAAMZ,IAAI;AAC/D,UAAM;MAAEwB;IAAY,IAAIC,QAAQb,KAAK;AACrC,UAAM;MAAEc;MAAkBC;IAAgB,IAAIC,aAAa,MAAMhB,MAAMlB,KAAK;AAE5EmC,cAAU,MAAM;AACd,YAAMC,YAAYd,MAAMe,UAAU;AAClC,UAAID,WAAW;AACbb,iBAASM,QAAQS,iBAAiBF,SAAS,EAAEG,OAAOC,UAClDA,KAAKC,SAASC,QAAQF,KAAKG,YAAY,OAAOH,KAAKG,aAAa,QAClE,EAAE,CAAC,GAAGA;MACR;AACA,YAAMC,WAAW,CAAC,EAAEvB,MAAMwB,WAAWxB,MAAMyB;AAE3C,aAAAC,YAAApB,SAAAE,MAAAmB,WAAA;QAAA,OAEU9B,MAAML;QAAG,QACRc,SAASE,MAAMvB;QAAI,SAAA2C,eACnB,CACL,UACA,eACAxB,aAAaI,OACbC,YAAYD,OACZG,iBAAiBH,OACjB;UACE,qBAAqBe;UACrB,oBAAoB1B,MAAMhB;UAC1B,iBAAiBgB,MAAMd;UACvB,eAAec,MAAMb;QACvB,GACAa,MAAMgC,KAAK,CACZ;QAAA,SAAAC,eACM,CACL;UACE,oBAAoBjC,MAAMV;QAC5B,GACA,CAACsB,YAAYD,QAAS;UACpBuB,UAAUC,cAAcnC,MAAMoC,IAAI;UAClCC,QAAQF,cAAcnC,MAAMoC,IAAI;UAChCE,OAAOH,cAAcnC,MAAMoC,IAAI;QACjC,IAAKG,QACLxB,gBAAgBJ,OAChBX,MAAMwC,KAAK,CACZ;QAAA,QACMd,WAAW,WAAWa;QAAS,eACxB,CAACb;QAAQ,YACZA,WAAW1B,MAAMhB,WAAW,KAAK,IAAIuD;MAAS,GAAA;QAAApB,SAAAA,MAAA,CAEvDD,SAAS;MAAA,CAAA;IAGjB,CAAC;AAED,WAAO,CAAC;EACV;AACF,CAAC;",
|
||||
"names": ["makeVIconProps", "propsFactory", "color", "String", "disabled", "Boolean", "start", "end", "icon", "IconValue", "opacity", "Number", "makeComponentProps", "makeSizeProps", "makeTagProps", "tag", "makeThemeProps", "VIcon", "genericComponent", "name", "props", "setup", "_ref", "attrs", "slots", "slotIcon", "shallowRef", "themeClasses", "useTheme", "iconData", "useIcon", "value", "sizeClasses", "useSize", "textColorClasses", "textColorStyles", "useTextColor", "useRender", "slotValue", "default", "flattenFragments", "filter", "node", "type", "Text", "children", "hasClick", "onClick", "onClickOnce", "_createVNode", "component", "_normalizeClass", "class", "_normalizeStyle", "fontSize", "convertToUnit", "size", "height", "width", "undefined", "style"]
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
import {
|
||||
useSsrBoot
|
||||
} from "./chunk-PCKQGDLK.js";
|
||||
import {
|
||||
makeTagProps
|
||||
} from "./chunk-2HZIACSB.js";
|
||||
import {
|
||||
makeDimensionProps,
|
||||
useDimension
|
||||
} from "./chunk-6EZKHCRW.js";
|
||||
import {
|
||||
useLayout
|
||||
} from "./chunk-KQXZAEJP.js";
|
||||
import {
|
||||
genericComponent,
|
||||
makeComponentProps,
|
||||
propsFactory,
|
||||
useRender
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
createBaseVNode,
|
||||
createVNode,
|
||||
normalizeClass,
|
||||
normalizeStyle
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/VMain/VMain.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VMain/VMain.css";
|
||||
var makeVMainProps = propsFactory({
|
||||
scrollable: Boolean,
|
||||
...makeComponentProps(),
|
||||
...makeDimensionProps(),
|
||||
...makeTagProps({
|
||||
tag: "main"
|
||||
})
|
||||
}, "VMain");
|
||||
var VMain = genericComponent()({
|
||||
name: "VMain",
|
||||
props: makeVMainProps(),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
const {
|
||||
dimensionStyles
|
||||
} = useDimension(props);
|
||||
const {
|
||||
mainStyles
|
||||
} = useLayout();
|
||||
const {
|
||||
ssrBootStyles
|
||||
} = useSsrBoot();
|
||||
useRender(() => createVNode(props.tag, {
|
||||
"class": normalizeClass(["v-main", {
|
||||
"v-main--scrollable": props.scrollable
|
||||
}, props.class]),
|
||||
"style": normalizeStyle([mainStyles.value, ssrBootStyles.value, dimensionStyles.value, props.style])
|
||||
}, {
|
||||
default: () => [props.scrollable ? createBaseVNode("div", {
|
||||
"class": "v-main__scroller"
|
||||
}, [slots.default?.()]) : slots.default?.()]
|
||||
}));
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
VMain
|
||||
};
|
||||
//# sourceMappingURL=chunk-DRSCVHAQ.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VMain/VMain.tsx"],
|
||||
"sourcesContent": ["// Styles\nimport './VMain.sass'\n\n// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { useLayout } from '@/composables/layout'\nimport { useSsrBoot } from '@/composables/ssrBoot'\nimport { makeTagProps } from '@/composables/tag'\n\n// Utilities\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\nexport const makeVMainProps = propsFactory({\n scrollable: Boolean,\n\n ...makeComponentProps(),\n ...makeDimensionProps(),\n ...makeTagProps({ tag: 'main' }),\n}, 'VMain')\n\nexport const VMain = genericComponent()({\n name: 'VMain',\n\n props: makeVMainProps(),\n\n setup (props, { slots }) {\n const { dimensionStyles } = useDimension(props)\n const { mainStyles } = useLayout()\n const { ssrBootStyles } = useSsrBoot()\n\n useRender(() => (\n <props.tag\n class={[\n 'v-main',\n { 'v-main--scrollable': props.scrollable },\n props.class,\n ]}\n style={[\n mainStyles.value,\n ssrBootStyles.value,\n dimensionStyles.value,\n props.style,\n ]}\n >\n { props.scrollable\n ? (\n <div class=\"v-main__scroller\">\n { slots.default?.() }\n </div>\n )\n : slots.default?.()\n }\n </props.tag>\n ))\n\n return {}\n },\n})\n\nexport type VMain = InstanceType<typeof VMain>\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAA;AAYO,IAAMA,iBAAiBC,aAAa;EACzCC,YAAYC;EAEZ,GAAGC,mBAAmB;EACtB,GAAGC,mBAAmB;EACtB,GAAGC,aAAa;IAAEC,KAAK;EAAO,CAAC;AACjC,GAAG,OAAO;AAEH,IAAMC,QAAQC,iBAAiB,EAAE;EACtCC,MAAM;EAENC,OAAOX,eAAe;EAEtBY,MAAOD,OAAKE,MAAa;AAAA,QAAX;MAAEC;IAAM,IAACD;AACrB,UAAM;MAAEE;IAAgB,IAAIC,aAAaL,KAAK;AAC9C,UAAM;MAAEM;IAAW,IAAIC,UAAU;AACjC,UAAM;MAAEC;IAAc,IAAIC,WAAW;AAErCC,cAAU,MAAAC,YAAAX,MAAAJ,KAAA;MAAA,SAAAgB,eAEC,CACL,UACA;QAAE,sBAAsBZ,MAAMT;MAAW,GACzCS,MAAMa,KAAK,CACZ;MAAA,SAAAC,eACM,CACLR,WAAWS,OACXP,cAAcO,OACdX,gBAAgBW,OAChBf,MAAMgB,KAAK,CACZ;IAAA,GAAA;MAAAC,SAAAA,MAAA,CAECjB,MAAMT,aAAU2B,gBAAA,OAAA;QAAA,SAAA;MAAA,GAAA,CAGVf,MAAMc,UAAU,CAAC,CAAA,IAGrBd,MAAMc,UAAU,CAAC;IAAA,CAAA,CAGxB;AAED,WAAO,CAAC;EACV;AACF,CAAC;",
|
||||
"names": ["makeVMainProps", "propsFactory", "scrollable", "Boolean", "makeComponentProps", "makeDimensionProps", "makeTagProps", "tag", "VMain", "genericComponent", "name", "props", "setup", "_ref", "slots", "dimensionStyles", "useDimension", "mainStyles", "useLayout", "ssrBootStyles", "useSsrBoot", "useRender", "_createVNode", "_normalizeClass", "class", "_normalizeStyle", "value", "style", "default", "_createElementVNode"]
|
||||
}
|
||||
+409
@@ -0,0 +1,409 @@
|
||||
import {
|
||||
useProxiedModel
|
||||
} from "./chunk-KA77II4V.js";
|
||||
import {
|
||||
consoleError,
|
||||
consoleWarn,
|
||||
getObjectValueByPath
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
computed,
|
||||
inject,
|
||||
provide,
|
||||
ref,
|
||||
shallowRef,
|
||||
toRef,
|
||||
watch
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/locale/en.js
|
||||
var en_default = {
|
||||
badge: "Badge",
|
||||
open: "Open",
|
||||
close: "Close",
|
||||
dismiss: "Dismiss",
|
||||
confirmEdit: {
|
||||
ok: "OK",
|
||||
cancel: "Cancel"
|
||||
},
|
||||
dataIterator: {
|
||||
noResultsText: "No matching records found",
|
||||
loadingText: "Loading items..."
|
||||
},
|
||||
dataTable: {
|
||||
itemsPerPageText: "Rows per page:",
|
||||
ariaLabel: {
|
||||
sortDescending: "Sorted descending.",
|
||||
sortAscending: "Sorted ascending.",
|
||||
sortNone: "Not sorted.",
|
||||
activateNone: "Activate to remove sorting.",
|
||||
activateDescending: "Activate to sort descending.",
|
||||
activateAscending: "Activate to sort ascending."
|
||||
},
|
||||
sortBy: "Sort by"
|
||||
},
|
||||
dataFooter: {
|
||||
itemsPerPageText: "Items per page:",
|
||||
itemsPerPageAll: "All",
|
||||
nextPage: "Next page",
|
||||
prevPage: "Previous page",
|
||||
firstPage: "First page",
|
||||
lastPage: "Last page",
|
||||
pageText: "{0}-{1} of {2}"
|
||||
},
|
||||
dateRangeInput: {
|
||||
divider: "to"
|
||||
},
|
||||
datePicker: {
|
||||
itemsSelected: "{0} selected",
|
||||
range: {
|
||||
title: "Select dates",
|
||||
header: "Enter dates"
|
||||
},
|
||||
title: "Select date",
|
||||
header: "Enter date",
|
||||
input: {
|
||||
placeholder: "Enter date"
|
||||
},
|
||||
ariaLabel: {
|
||||
previousMonth: "Previous month",
|
||||
nextMonth: "Next month",
|
||||
selectYear: "Select year",
|
||||
previousYear: "Previous year",
|
||||
nextYear: "Next year",
|
||||
selectMonth: "Select month",
|
||||
selectDate: "{0}",
|
||||
// Full date format
|
||||
currentDate: "Today, {0}"
|
||||
}
|
||||
},
|
||||
noDataText: "No data available",
|
||||
carousel: {
|
||||
prev: "Previous visual",
|
||||
next: "Next visual",
|
||||
ariaLabel: {
|
||||
delimiter: "Carousel slide {0} of {1}"
|
||||
}
|
||||
},
|
||||
calendar: {
|
||||
moreEvents: "{0} more",
|
||||
today: "Today"
|
||||
},
|
||||
input: {
|
||||
clear: "Clear {0}",
|
||||
prependAction: "{0} prepended action",
|
||||
appendAction: "{0} appended action",
|
||||
otp: "Please enter OTP character {0}"
|
||||
},
|
||||
fileInput: {
|
||||
counter: "{0} files",
|
||||
counterSize: "{0} files ({1} in total)"
|
||||
},
|
||||
fileUpload: {
|
||||
title: "Drag and drop files here",
|
||||
divider: "or",
|
||||
browse: "Browse Files"
|
||||
},
|
||||
timePicker: {
|
||||
am: "AM",
|
||||
pm: "PM",
|
||||
title: "Select Time",
|
||||
hour: "Hour",
|
||||
minute: "Minute",
|
||||
second: "Second"
|
||||
},
|
||||
pagination: {
|
||||
ariaLabel: {
|
||||
root: "Pagination Navigation",
|
||||
next: "Next page",
|
||||
previous: "Previous page",
|
||||
page: "Go to page {0}",
|
||||
currentPage: "Page {0}, Current page",
|
||||
first: "First page",
|
||||
last: "Last page"
|
||||
}
|
||||
},
|
||||
stepper: {
|
||||
next: "Next",
|
||||
prev: "Previous"
|
||||
},
|
||||
rating: {
|
||||
ariaLabel: {
|
||||
item: "Rating {0} of {1}"
|
||||
}
|
||||
},
|
||||
loading: "Loading...",
|
||||
infiniteScroll: {
|
||||
loadMore: "Load more",
|
||||
empty: "No more"
|
||||
},
|
||||
rules: {
|
||||
required: "This field is required",
|
||||
email: "Please enter a valid email",
|
||||
number: "This field can only contain numbers",
|
||||
integer: "This field can only contain integer values",
|
||||
capital: "This field can only contain uppercase letters",
|
||||
maxLength: "You must enter a maximum of {0} characters",
|
||||
minLength: "You must enter a minimum of {0} characters",
|
||||
strictLength: "The length of the entered field is invalid",
|
||||
exclude: "The {0} character is not allowed",
|
||||
notEmpty: "Please choose at least one value",
|
||||
pattern: "Invalid format"
|
||||
},
|
||||
hotkey: {
|
||||
then: "then",
|
||||
ctrl: "Ctrl",
|
||||
command: "Command",
|
||||
space: "Space",
|
||||
shift: "Shift",
|
||||
alt: "Alt",
|
||||
enter: "Enter",
|
||||
escape: "Escape",
|
||||
upArrow: "Up Arrow",
|
||||
downArrow: "Down Arrow",
|
||||
leftArrow: "Left Arrow",
|
||||
rightArrow: "Right Arrow",
|
||||
backspace: "Backspace",
|
||||
option: "Option",
|
||||
plus: "plus",
|
||||
shortcut: "Keyboard shortcut: {0}",
|
||||
or: "or"
|
||||
},
|
||||
video: {
|
||||
play: "Play",
|
||||
pause: "Pause",
|
||||
seek: "Seek",
|
||||
volume: "Volume",
|
||||
showVolume: "Show volume control",
|
||||
mute: "Mute",
|
||||
unmute: "Unmute",
|
||||
enterFullscreen: "Full screen",
|
||||
exitFullscreen: "Exit full screen"
|
||||
},
|
||||
colorPicker: {
|
||||
ariaLabel: {
|
||||
eyedropper: "Select color with eyedropper",
|
||||
hueSlider: "Hue",
|
||||
alphaSlider: "Alpha",
|
||||
redInput: "Red value",
|
||||
greenInput: "Green value",
|
||||
blueInput: "Blue value",
|
||||
alphaInput: "Alpha value",
|
||||
hueInput: "Hue value",
|
||||
saturationInput: "Saturation value",
|
||||
lightnessInput: "Lightness value",
|
||||
hexInput: "HEX value",
|
||||
hexaInput: "HEX with alpha value",
|
||||
changeFormat: "Change color format"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// node_modules/vuetify/lib/locale/adapters/vuetify.js
|
||||
var LANG_PREFIX = "$vuetify.";
|
||||
var replace = (str, params) => {
|
||||
return str.replace(/\{(\d+)\}/g, (match, index) => {
|
||||
return String(params[Number(index)]);
|
||||
});
|
||||
};
|
||||
var createTranslateFunction = (current, fallback, messages) => {
|
||||
return function(key) {
|
||||
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
params[_key - 1] = arguments[_key];
|
||||
}
|
||||
if (!key.startsWith(LANG_PREFIX)) {
|
||||
return replace(key, params);
|
||||
}
|
||||
const shortKey = key.replace(LANG_PREFIX, "");
|
||||
const currentLocale = current.value && messages.value[current.value];
|
||||
const fallbackLocale = fallback.value && messages.value[fallback.value];
|
||||
let str = getObjectValueByPath(currentLocale, shortKey, null);
|
||||
if (!str) {
|
||||
consoleWarn(`Translation key "${key}" not found in "${current.value}", trying fallback locale`);
|
||||
str = getObjectValueByPath(fallbackLocale, shortKey, null);
|
||||
}
|
||||
if (!str) {
|
||||
consoleError(`Translation key "${key}" not found in fallback`);
|
||||
str = key;
|
||||
}
|
||||
if (typeof str !== "string") {
|
||||
consoleError(`Translation key "${key}" has a non-string value`);
|
||||
str = key;
|
||||
}
|
||||
return replace(str, params);
|
||||
};
|
||||
};
|
||||
function createNumberFunction(current, fallback) {
|
||||
return (value, options) => {
|
||||
const numberFormat = new Intl.NumberFormat([current.value, fallback.value], options);
|
||||
return numberFormat.format(value);
|
||||
};
|
||||
}
|
||||
function inferDecimalSeparator(current, fallback) {
|
||||
const format = createNumberFunction(current, fallback);
|
||||
return format(0.1).includes(",") ? "," : ".";
|
||||
}
|
||||
function useProvided(props, prop, provided) {
|
||||
const internal = useProxiedModel(props, prop, props[prop] ?? provided.value);
|
||||
internal.value = props[prop] ?? provided.value;
|
||||
watch(provided, (v) => {
|
||||
if (props[prop] == null) {
|
||||
internal.value = provided.value;
|
||||
}
|
||||
});
|
||||
return internal;
|
||||
}
|
||||
function createProvideFunction(state) {
|
||||
return (props) => {
|
||||
const current = useProvided(props, "locale", state.current);
|
||||
const fallback = useProvided(props, "fallback", state.fallback);
|
||||
const messages = useProvided(props, "messages", state.messages);
|
||||
return {
|
||||
name: "vuetify",
|
||||
current,
|
||||
fallback,
|
||||
messages,
|
||||
decimalSeparator: toRef(() => inferDecimalSeparator(current, fallback)),
|
||||
t: createTranslateFunction(current, fallback, messages),
|
||||
n: createNumberFunction(current, fallback),
|
||||
provide: createProvideFunction({
|
||||
current,
|
||||
fallback,
|
||||
messages
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
function createVuetifyAdapter(options) {
|
||||
const current = shallowRef(options?.locale ?? "en");
|
||||
const fallback = shallowRef(options?.fallback ?? "en");
|
||||
const messages = ref({
|
||||
en: en_default,
|
||||
...options?.messages
|
||||
});
|
||||
return {
|
||||
name: "vuetify",
|
||||
current,
|
||||
fallback,
|
||||
messages,
|
||||
decimalSeparator: toRef(() => options?.decimalSeparator ?? inferDecimalSeparator(current, fallback)),
|
||||
t: createTranslateFunction(current, fallback, messages),
|
||||
n: createNumberFunction(current, fallback),
|
||||
provide: createProvideFunction({
|
||||
current,
|
||||
fallback,
|
||||
messages
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/vuetify/lib/composables/locale.js
|
||||
var LocaleSymbol = /* @__PURE__ */ Symbol.for("vuetify:locale");
|
||||
function isLocaleInstance(obj) {
|
||||
return obj.name != null;
|
||||
}
|
||||
function createLocale(options) {
|
||||
const i18n = options?.adapter && isLocaleInstance(options?.adapter) ? options?.adapter : createVuetifyAdapter(options);
|
||||
const rtl = createRtl(i18n, options);
|
||||
return {
|
||||
...i18n,
|
||||
...rtl
|
||||
};
|
||||
}
|
||||
function useLocale() {
|
||||
const locale = inject(LocaleSymbol);
|
||||
if (!locale) throw new Error("[Vuetify] Could not find injected locale instance");
|
||||
return locale;
|
||||
}
|
||||
function provideLocale(props) {
|
||||
const locale = inject(LocaleSymbol);
|
||||
if (!locale) throw new Error("[Vuetify] Could not find injected locale instance");
|
||||
const i18n = locale.provide(props);
|
||||
const rtl = provideRtl(i18n, locale.rtl, props);
|
||||
const data = {
|
||||
...i18n,
|
||||
...rtl
|
||||
};
|
||||
provide(LocaleSymbol, data);
|
||||
return data;
|
||||
}
|
||||
function genDefaults() {
|
||||
return {
|
||||
af: false,
|
||||
ar: true,
|
||||
bg: false,
|
||||
ca: false,
|
||||
ckb: false,
|
||||
cs: false,
|
||||
de: false,
|
||||
el: false,
|
||||
en: false,
|
||||
es: false,
|
||||
et: false,
|
||||
fa: true,
|
||||
fi: false,
|
||||
fr: false,
|
||||
hr: false,
|
||||
hu: false,
|
||||
he: true,
|
||||
id: false,
|
||||
it: false,
|
||||
ja: false,
|
||||
km: false,
|
||||
ko: false,
|
||||
lv: false,
|
||||
lt: false,
|
||||
nl: false,
|
||||
no: false,
|
||||
pl: false,
|
||||
pt: false,
|
||||
ro: false,
|
||||
ru: false,
|
||||
sk: false,
|
||||
sl: false,
|
||||
srCyrl: false,
|
||||
srLatn: false,
|
||||
sv: false,
|
||||
th: false,
|
||||
tr: false,
|
||||
az: false,
|
||||
uk: false,
|
||||
vi: false,
|
||||
zhHans: false,
|
||||
zhHant: false
|
||||
};
|
||||
}
|
||||
function createRtl(i18n, options) {
|
||||
const rtl = ref(options?.rtl ?? genDefaults());
|
||||
const isRtl = computed(() => rtl.value[i18n.current.value] ?? false);
|
||||
return {
|
||||
isRtl,
|
||||
rtl,
|
||||
rtlClasses: toRef(() => `v-locale--is-${isRtl.value ? "rtl" : "ltr"}`)
|
||||
};
|
||||
}
|
||||
function provideRtl(locale, rtl, props) {
|
||||
const isRtl = computed(() => props.rtl ?? rtl.value[locale.current.value] ?? false);
|
||||
return {
|
||||
isRtl,
|
||||
rtl,
|
||||
rtlClasses: toRef(() => `v-locale--is-${isRtl.value ? "rtl" : "ltr"}`)
|
||||
};
|
||||
}
|
||||
function useRtl() {
|
||||
const locale = inject(LocaleSymbol);
|
||||
if (!locale) throw new Error("[Vuetify] Could not find injected rtl instance");
|
||||
return {
|
||||
isRtl: locale.isRtl,
|
||||
rtlClasses: locale.rtlClasses
|
||||
};
|
||||
}
|
||||
|
||||
export {
|
||||
LocaleSymbol,
|
||||
createLocale,
|
||||
useLocale,
|
||||
provideLocale,
|
||||
useRtl
|
||||
};
|
||||
//# sourceMappingURL=chunk-ENTLCOCZ.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/locale/en.ts", "../../vuetify/src/locale/adapters/vuetify.ts", "../../vuetify/src/composables/locale.ts"],
|
||||
"sourcesContent": ["export default {\n badge: 'Badge',\n open: 'Open',\n close: 'Close',\n dismiss: 'Dismiss',\n confirmEdit: {\n ok: 'OK',\n cancel: 'Cancel',\n },\n dataIterator: {\n noResultsText: 'No matching records found',\n loadingText: 'Loading items...',\n },\n dataTable: {\n itemsPerPageText: 'Rows per page:',\n ariaLabel: {\n sortDescending: 'Sorted descending.',\n sortAscending: 'Sorted ascending.',\n sortNone: 'Not sorted.',\n activateNone: 'Activate to remove sorting.',\n activateDescending: 'Activate to sort descending.',\n activateAscending: 'Activate to sort ascending.',\n },\n sortBy: 'Sort by',\n },\n dataFooter: {\n itemsPerPageText: 'Items per page:',\n itemsPerPageAll: 'All',\n nextPage: 'Next page',\n prevPage: 'Previous page',\n firstPage: 'First page',\n lastPage: 'Last page',\n pageText: '{0}-{1} of {2}',\n },\n dateRangeInput: {\n divider: 'to',\n },\n datePicker: {\n itemsSelected: '{0} selected',\n range: {\n title: 'Select dates',\n header: 'Enter dates',\n },\n title: 'Select date',\n header: 'Enter date',\n input: {\n placeholder: 'Enter date',\n },\n ariaLabel: {\n previousMonth: 'Previous month',\n nextMonth: 'Next month',\n selectYear: 'Select year',\n previousYear: 'Previous year',\n nextYear: 'Next year',\n selectMonth: 'Select month',\n selectDate: '{0}', // Full date format\n currentDate: 'Today, {0}',\n },\n },\n noDataText: 'No data available',\n carousel: {\n prev: 'Previous visual',\n next: 'Next visual',\n ariaLabel: {\n delimiter: 'Carousel slide {0} of {1}',\n },\n },\n calendar: {\n moreEvents: '{0} more',\n today: 'Today',\n },\n input: {\n clear: 'Clear {0}',\n prependAction: '{0} prepended action',\n appendAction: '{0} appended action',\n otp: 'Please enter OTP character {0}',\n },\n fileInput: {\n counter: '{0} files',\n counterSize: '{0} files ({1} in total)',\n },\n fileUpload: {\n title: 'Drag and drop files here',\n divider: 'or',\n browse: 'Browse Files',\n },\n timePicker: {\n am: 'AM',\n pm: 'PM',\n title: 'Select Time',\n hour: 'Hour',\n minute: 'Minute',\n second: 'Second',\n },\n pagination: {\n ariaLabel: {\n root: 'Pagination Navigation',\n next: 'Next page',\n previous: 'Previous page',\n page: 'Go to page {0}',\n currentPage: 'Page {0}, Current page',\n first: 'First page',\n last: 'Last page',\n },\n },\n stepper: {\n next: 'Next',\n prev: 'Previous',\n },\n rating: {\n ariaLabel: {\n item: 'Rating {0} of {1}',\n },\n },\n loading: 'Loading...',\n infiniteScroll: {\n loadMore: 'Load more',\n empty: 'No more',\n },\n rules: {\n required: 'This field is required',\n email: 'Please enter a valid email',\n number: 'This field can only contain numbers',\n integer: 'This field can only contain integer values',\n capital: 'This field can only contain uppercase letters',\n maxLength: 'You must enter a maximum of {0} characters',\n minLength: 'You must enter a minimum of {0} characters',\n strictLength: 'The length of the entered field is invalid',\n exclude: 'The {0} character is not allowed',\n notEmpty: 'Please choose at least one value',\n pattern: 'Invalid format',\n },\n hotkey: {\n then: 'then',\n ctrl: 'Ctrl',\n command: 'Command',\n space: 'Space',\n shift: 'Shift',\n alt: 'Alt',\n enter: 'Enter',\n escape: 'Escape',\n upArrow: 'Up Arrow',\n downArrow: 'Down Arrow',\n leftArrow: 'Left Arrow',\n rightArrow: 'Right Arrow',\n backspace: 'Backspace',\n option: 'Option',\n plus: 'plus',\n shortcut: 'Keyboard shortcut: {0}',\n or: 'or',\n },\n video: {\n play: 'Play',\n pause: 'Pause',\n seek: 'Seek',\n volume: 'Volume',\n showVolume: 'Show volume control',\n mute: 'Mute',\n unmute: 'Unmute',\n enterFullscreen: 'Full screen',\n exitFullscreen: 'Exit full screen',\n },\n colorPicker: {\n ariaLabel: {\n eyedropper: 'Select color with eyedropper',\n hueSlider: 'Hue',\n alphaSlider: 'Alpha',\n redInput: 'Red value',\n greenInput: 'Green value',\n blueInput: 'Blue value',\n alphaInput: 'Alpha value',\n hueInput: 'Hue value',\n saturationInput: 'Saturation value',\n lightnessInput: 'Lightness value',\n hexInput: 'HEX value',\n hexaInput: 'HEX with alpha value',\n changeFormat: 'Change color format',\n },\n },\n}\n", "// Composables\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { ref, shallowRef, toRef, watch } from 'vue'\nimport { consoleError, consoleWarn, getObjectValueByPath } from '@/util'\n\n// Locales\nimport en from '@/locale/en'\n\n// Types\nimport type { Ref } from 'vue'\nimport type { LocaleILine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA,IAAA,aAAe;EACbA,OAAO;EACPC,MAAM;EACNC,OAAO;EACPC,SAAS;EACTC,aAAa;IACXC,IAAI;IACJC,QAAQ;EACV;EACAC,cAAc;IACZC,eAAe;IACfC,aAAa;EACf;EACAC,WAAW;IACTC,kBAAkB;IAClBC,WAAW;MACTC,gBAAgB;MAChBC,eAAe;MACfC,UAAU;MACVC,cAAc;MACdC,oBAAoB;MACpBC,mBAAmB;IACrB;IACAC,QAAQ;EACV;EACAC,YAAY;IACVT,kBAAkB;IAClBU,iBAAiB;IACjBC,UAAU;IACVC,UAAU;IACVC,WAAW;IACXC,UAAU;IACVC,UAAU;EACZ;EACAC,gBAAgB;IACdC,SAAS;EACX;EACAC,YAAY;IACVC,eAAe;IACfC,OAAO;MACLC,OAAO;MACPC,QAAQ;IACV;IACAD,OAAO;IACPC,QAAQ;IACRC,OAAO;MACLC,aAAa;IACf;IACAvB,WAAW;MACTwB,eAAe;MACfC,WAAW;MACXC,YAAY;MACZC,cAAc;MACdC,UAAU;MACVC,aAAa;MACbC,YAAY;;MACZC,aAAa;IACf;EACF;EACAC,YAAY;EACZC,UAAU;IACRC,MAAM;IACNC,MAAM;IACNnC,WAAW;MACToC,WAAW;IACb;EACF;EACAC,UAAU;IACRC,YAAY;IACZC,OAAO;EACT;EACAjB,OAAO;IACLkB,OAAO;IACPC,eAAe;IACfC,cAAc;IACdC,KAAK;EACP;EACAC,WAAW;IACTC,SAAS;IACTC,aAAa;EACf;EACAC,YAAY;IACV3B,OAAO;IACPJ,SAAS;IACTgC,QAAQ;EACV;EACAC,YAAY;IACVC,IAAI;IACJC,IAAI;IACJ/B,OAAO;IACPgC,MAAM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BAAqBjB,SAASC,QAAQ;IACzCuC,SAASP,sBAAsB;MAAEjC;MAASC;MAAUC;IAAS,CAAC;EAChE;AACF;;;ACzFO,IAAM4C,eAA2DC,uBAAOC,IAAI,gBAAgB;AAEnG,SAASC,iBAAkBC,KAAiC;AAC1D,SAAOA,IAAIC,QAAQ;AACrB;AAEO,SAASC,aAAcC,SAAsC;AAClE,QAAMC,OAAOD,SAASE,WAAWN,iBAAiBI,SAASE,OAAO,IAAIF,SAASE,UAAUC,qBAAqBH,OAAO;AACrH,QAAMI,MAAMC,UAAUJ,MAAMD,OAAO;AAEnC,SAAO;IAAE,GAAGC;IAAM,GAAGG;EAAI;AAC3B;AAEO,SAASE,YAAa;AAC3B,QAAMC,SAASC,OAAOf,YAAY;AAElC,MAAI,CAACc,OAAQ,OAAM,IAAIE,MAAM,mDAAmD;AAEhF,SAAOF;AACT;AAEO,SAASG,cAAeC,OAAiC;AAC9D,QAAMJ,SAASC,OAAOf,YAAY;AAElC,MAAI,CAACc,OAAQ,OAAM,IAAIE,MAAM,mDAAmD;AAEhF,QAAMR,OAAOM,OAAOK,QAAQD,KAAK;AACjC,QAAMP,MAAMS,WAAWZ,MAAMM,OAAOH,KAAKO,KAAK;AAE9C,QAAMG,OAAO;IAAE,GAAGb;IAAM,GAAGG;EAAI;AAE/BQ,UAAQnB,cAAcqB,IAAI;AAE1B,SAAOA;AACT;AAoBA,SAASC,cAAe;AACtB,SAAO;IACLC,IAAI;IACJC,IAAI;IACJC,IAAI;IACJC,IAAI;IACLine truncated
|
||||
"names": ["badge", "open", "close", "dismiss", "confirmEdit", "ok", "cancel", "dataIterator", "noResultsText", "loadingText", "dataTable", "itemsPerPageText", "ariaLabel", "sortDescending", "sortAscending", "sortNone", "activateNone", "activateDescending", "activateAscending", "sortBy", "dataFooter", "itemsPerPageAll", "nextPage", "prevPage", "firstPage", "lastPage", "pageText", "dateRangeInput", "divider", "datePicker", "itemsSelected", "range", "title", "header", "input", "placeholder", "previousMonth", "nextMonth", "selectYear", "previousYear", "nextYear", "selectMonth", "selectDate", "currentDate", "noDataText", "carousel", "prev", "next", "delimiter", "calendar", "moreEvents", "today", "clear", "prependAction", "appendAction", "otp", "fileInput", "counter", "counterSize", "fileUpload", "browse", "timePicker", "am", "pm", "hour", "minute", "second", "pagination", "root", "previous", "page", "currentPage", "first", "last", "stepper", "rating", "item", "loading", "infiniteScroll", "loadMore", "empty", "rules", "required", "email", "number", "integer", "capital", "maxLength", "minLength", "strictLength", "exclude", "notEmpty", "pattern", "hotkey", "then", "ctrl", "command", "space", "shift", "alt", "enter", "escape", "upArrow", "downArrow", "leftArrow", "rightArrow", "backspace", "option", "plus", "shortcut", "or", "video", "play", "pause", "seek", "volume", "showVolume", "mute", "unmute", "enterFullscreen", "exitFullscreen", "colorPicker", "eyedropper", "hueSlider", "alphaSlider", "redInput", "greenInput", "blueInput", "alphaInput", "hueInput", "saturationInput", "lightnessInput", "hexInput", "hexaInput", "changeFormat", "LANG_PREFIX", "replace", "str", "params", "match", "index", "String", "Number", "createTranslateFunction", "current", "fallback", "messages", "key", "_len", "arguments", "length", "Array", "_key", "startsWith", "shortKey", "currentLocale", "value", "fallbackLocale", "getObjectValueByPath", "consoleWarn", "consoleError", "createNumberFunction", "options", "numberFormat", "Intl", "NumberFormat", "format", "inferDecimalSeparator", "includes", "useProvided", "props", "prop", "provided", "internal", "useProxiedModel", "watch", "v", "createProvideFunction", "state", "name", "decimalSeparator", "toRef", "t", "n", "provide", "createVuetifyAdapter", "shallowRef", "locale", "ref", "en", "LocaleSymbol", "Symbol", "for", "isLocaleInstance", "obj", "name", "createLocale", "options", "i18n", "adapter", "createVuetifyAdapter", "rtl", "createRtl", "useLocale", "locale", "inject", "Error", "provideLocale", "props", "provide", "provideRtl", "data", "genDefaults", "af", "ar", "bg", "ca", "ckb", "cs", "de", "el", "en", "es", "et", "fa", "fi", "fr", "hr", "hu", "he", "id", "it", "ja", "km", "ko", "lv", "lt", "nl", "no", "pl", "pt", "ro", "ru", "sk", "sl", "srCyrl", "srLatn", "sv", "th", "tr", "az", "uk", "vi", "zhHans", "zhHant", "createRtl", "i18n", "options", "rtl", "ref", "isRtl", "computed", "value", "current", "rtlClasses", "toRef", "provideRtl", "locale", "props", "useRtl", "inject", "LocaleSymbol", "Error"]
|
||||
}
|
||||
+1082
File diff suppressed because it is too large.
Load diff
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VSelect/VSelect.tsx", "../../vuetify/src/components/VVirtualScroll/VVirtualScroll.tsx", "../../vuetify/src/components/VVirtualScroll/VVirtualScrollItem.tsx", "../../vuetify/src/composables/virtual.ts", "../../vuetify/src/components/VSelect/useScrolling.ts", "../../vuetify/src/composables/menuActivator.ts"],
|
||||
"sourcesContent": ["// Styles\nimport './VSelect.sass'\n\n// Components\nimport { VDialogTransition } from '@/components/transitions'\nimport { VAvatar } from '@/components/VAvatar'\nimport { VCheckboxBtn } from '@/components/VCheckbox'\nimport { VChip } from '@/components/VChip'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { VDivider } from '@/components/VDivider'\nimport { VIcon } from '@/components/VIcon'\nimport { useInputIcon } from '@/components/VInput/InputIcon'\nimport { VList, VListItem, VListSubheader } from '@/components/VList'\nimport { VMenu } from '@/components/VMenu'\nimport { makeVTextFieldProps, VTextField } from '@/components/VTextField/VTextField'\nimport { VVirtualScroll } from '@/components/VVirtualScroll'\n\n// Composables\nimport { useScrolling } from './useScrolling'\nimport { useAutocomplete } from '@/composables/autocomplete'\nimport { useForm } from '@/composables/form'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { IconValue } from '@/composables/icons'\nimport { makeItemsProps, useItems } from '@/composables/list-items'\nimport { useLocale } from '@/composables/locale'\nimport { makeMenuActivatorProps, useMenuActivator } from '@/composables/menuActivator'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { makeTransitionProps } from '@/composables/transition'\n\n// Utilities\nimport { computed, mergeProps, nextTick, ref, shallowRef, toRef, watch } from 'vue'\nimport {\n camelizeProps,\n checkPrintable,\n deepEqual,\n ensureValidVNode,\n genericComponent,\n IN_BROWSER,\n matchesSelector,\n omit,\n propsFactory,\n useRender,\n wrapInArray,\n} from '@/util'\n\n// Types\nimport type { Component, PropType } from 'vue'\nimport type { VFieldSlots } from '@/components/VField/VField'\nimport type { VInputSlots } from '@/components/VInput/VInput'\nimport type { ListItem } from '@/composables/list-items'\nimport type { GenericProps, SelectItemKey } from '@/util'\n\ntype Primitive = string | number | boolean | symbol\n\ntype Val <T, ReturnObject extends boolean> = [T] extends [Primitive]\n ? T\n : (ReturnObject extends true ? T : any)\n\ntype Value <T, ReturnObject extends boolean, Multiple extends boolean> =\n Multiple extends true\n ? readonly Val<T, ReturnObject>[]\n : Val<T, ReturnObject> | null\n\nexport const makeSelectProps = propsFactory({\n chips: Boolean,\n closableChips: Boolean,\n eager: Boolean,\n hideNoData: Boolean,\n hideSelected: Boolean,\n listProps: {\n type: Object as PropType<VList['$props']>,\n },\n menu: Boolean,\n menuIcon: {\n type: IconValue,\n default: '$dropdown',\n },\n menuProps: {\n type: Object as PropType<VMenu['$props']>,\n },\n multiple: Boolean,\n noDataText: {\n type: String,\n default: '$vuetify.noDataText',\n },\n openOnClear: Boolean,\n itemColor: String,\n noAutoScroll: Boolean,\n\n ...makeMenuActivatorProps(),\n ...makeItemsProps({ itemChildren: false }),\n}, 'Select')\n\nexport const makeVSelectProps = propsFactory({\n ...makeSelectProps(),\n ...omit(makeVTextFieldProps({\n modelValue: null,\n role: 'combobox',\n }), ['validationValue', 'dirty']),\n ...makeTransitionProps({ transition: { component: VDialogTransition as Component } }),\n}, 'VSelect')\n\ntype ItemType<T> = T extends readonly (infer U)[] ? U : never\n\nexport const VSelect = genericComponent<new <\n T extends readonly any[],\n Item = ItemType<T>,\n ReturnObject extends boolean = false,\n Multiple extends boolean = false,\n V extends Value<Item, ReturnObject, Multiple> = Value<Item, ReturnObject, Multiple>\n>(\n props: {\n items?: T\n itemTitle?: SelectItemKey<ItemType<T>>\n itemValue?: SelectItemKey<ItemType<T>>\n itemProps?: SelectItemKey<ItemType<T>>\n returnObject?: ReturnObject\n multiple?: Multiple\n modelValue?: V | null\n 'onUpdate:modelValue'?: (value: V) => void\n },\n slots: Omit<VInputSlots & VFieldSlots, 'default'> & {\n item: { item: ListItem<Item>, index: number, props: Record<string, unknown> }\n chip: { item: ListItem<Item>, index: number, props: Record<string, unknown> }\n selection: { item: ListItem<Item>, index: number }\n subheader: { props: Record<string, unknown>, index: number }\n divider: { props: Record<string, unknown>, index: number }\n 'prepend-item': never\n 'append-item': never\n 'no-data': never\n }\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VSelect',\n\n props: makeVSelectProps(),\n\n emits: {\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': (value: any) => true,\n 'update:menu': (ue: boolean) => true,\n },\n\n setup (props, { slots }) {\n const { t } = useLocale()\n const vTextFieldRef = ref<VTextField>()\n const vMenuRef = ref<VMenu>()\n const vVirtualScrollRef = ref<VVirtualScroll>()\n const { items, transformIn, transformOut } = useItems(props)\n const model = useProxiedModel(\n Line truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAA;;;ACAA,OAAA;;;ACUO,IAAMA,8BAA8BC,aAAa;EACtDC,YAAYC;EAEZ,GAAGC,mBAAmB;AACxB,GAAG,oBAAoB;AAEhB,IAAMC,qBAAqBC,iBASa,EAAE;EAC/CC,MAAM;EAENC,cAAc;EAEdC,OAAOT,4BAA4B;EAEnCU,OAAO;IACL,iBAAkBC,YAAmB;EACvC;EAEAC,MAAOH,OAAKI,MAA0B;AAAA,QAAxB;MAAEC;MAAOC;MAAMC;IAAM,IAACH;AAClC,UAAM;MAAEI;MAAWC;IAAY,IAAIC,kBAAkBC,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gBtB,KAAK;AACxE,YAAMsD,iBAAiBhC,gBAAgB8B,GAAG,IAAI9B,gBAAgBlD,KAAKH,KAAK;AACxE,YAAMsF,iBAAiBlF,KAAK+B,IAAIiD,aAAaC,cAAc;AAE3D,UAAIC,iBAAiBzG,WAAW;AAC9BqB,cAAMF,QAAQ+B;AACd5B,aAAKH,QAAQmF;MACf,OAAO;AAEL,YAAIpD,SAAS,EAAG7B,OAAMF,QAAQ+B;AAC9B,YAAIoD,OAAOxF,MAAMK,MAAMuB,OAAQpB,MAAKH,QAAQmF;MAC9C;IACF;AAEA5E,eAAWP,QAAQqD,gBAAgBnD,MAAMF,KAAK;AALine truncated
|
||||
"names": ["makeVVirtualScrollItemProps", "propsFactory", "renderless", "Boolean", "makeComponentProps", "VVirtualScrollItem", "genericComponent", "name", "inheritAttrs", "props", "emits", "height", "setup", "_ref", "attrs", "emit", "slots", "resizeRef", "contentRect", "useResizeObserver", "undefined", "watch", "value", "useRender", "_createElementVNode", "_Fragment", "default", "itemRef", "_mergeProps", "class", "style", "UP", "DOWN", "BUFFER_PX", "makeVirtualProps", "propsFactory", "itemHeight", "type", "Number", "String", "default", "itemKey", "Array", "Function", "height", "useVirtual", "props", "items", "display", "useDisplay", "shallowRef", "watchEffect", "value", "parseFloat", "first", "last", "Math", "ceil", "parseInt", "paddingTop", "paddingBottom", "containerRef", "ref", "markerRef", "markerOffset", "resizeRef", "contentRect", "useResizeObserver", "viewportHeight", "computed", "document", "documentElement", "hasInitialRender", "sizes", "from", "length", "offsets", "updateTime", "targetScrollIndex", "getSize", "index", "updateOffsets", "debounce", "start", "performance", "now", "i", "max", "unwatch", "watch", "v", "offsetTop", "immediate", "calculateVisibleItems", "nextTick", "IN_BROWSER", "window", "requestAnimationFrame", "scrollToIndex", "onScopeDispose", "clear", "handleItemResize", "prevHeight", "prevMinHeight", "min", "calculateOffset", "clamp", "whole", "floor", "fraction", "next", "wholeOffset", "nextOffset", "calculateIndex", "scrollTop", "binaryClosest", "lastScrollTop", "scrollVelocity", "lastScrollTime", "val", "oldVal", "scrollTimeout", "handleScroll", "scrollTime", "scrollDeltaT", "sign", "clearTimeout", "setTimeout", "handleScrollend", "raf", "cancelAnimationFrame", "_calculateVisibleItems", "direction", "startPx", "endPx", "end", "topOverflow", "bottomOverflow", "bufferOverflow", "offset", "computedItems", "slice", "map", "item", "_index", "raw", "key", "getPropertyFromItem", "deep", "arr", "high", "low", "mid", "target", "makeVVirtualScrollProps", "propsFactory", "items", "type", "Array", "default", "renderless", "Boolean", "makeVirtualProps", "makeComponentProps", "makeDimensionProps", "VVirtualScroll", "genericComponent", "name", "props", "setup", "_ref", "slots", "vm", "getCurrentInstance", "dimensionStyles", "useDimension", "calculateVisibleItems", "containerRef", "markerRef", "handleScroll", "handleScrollend", "handleItemResize", "scrollToIndex", "paddingTop", "paddingBottom", "computedItems", "useVirtual", "toRef", "useToggleScope", "handleListeners", "add", "arguments", "length", "undefined", "method", "value", "document", "documentElement", "passive", "onMounted", "getScrollParent", "vnode", "el", "onScopeDispose", "useRender", "children", "map", "item", "_createVNode", "VVirtualScrollItem", "key", "height", "index", "slotProps", "raw", "_createElementVNode", "_Fragment", "convertToUnit", "_normalizeClass", "class", "_normalizeStyle", "style", "useScrolling", "listRef", "textFieldRef", "isScrolling", "shallowRef", "scrollTimeout", "onListScroll", "e", "cancelAnimationFrame", "value", "requestAnimationFrame", "finishScrolling", "Promise", "resolve", "stop", "watch", "onListKeydown", "key", "focus", "includes", "el", "$el", "scrollTo", "top", "scrollHeight", "behavior", "children", "querySelectorAll", "getBoundingClientRect", "child", "bottom", "reverse", "onScrollPassive", "onKeydown", "makeMenuActivatorProps", "propsFactory", "closeText", "type", "String", "default", "openText", "useMenuActivator", "props", "isOpen", "uid", "useId", "menuId", "computed", "ariaExpanded", "toRef", "toValue", "ariaControls", "value", "makeSelectProps", "propsFactory", "chips", "Boolean", "closableChips", "eager", "hideNoData", "hideSelected", "listProps", "type", "Object", "menu", "menuIcon", "IconValue", "default", "menuProps", "multiple", "noDataText", "String", "openOnClear", "itemColor", "noAutoScroll", "makeMenuActivatorProps", "makeItemsProps", "itemChildren", "makeVSelectProps", "omit", "makeVTextFieldProps", "modelValue", "role", "makeTransitionProps", "transition", "component", "VDialogTransition", "VSelect", "genericComponent", "name", "props", "emits", "focused", "value", "ue", "setup", "_ref", "slots", "t", "useLocale", "vTextFieldRef", "ref", "vMenuRef", "vVirtualScrollRef", "items", "transformIn", "transformOut", "useItems", "model", "useProxiedModel", "v", "wrapInArray", "transformed", "counterValue", "computed", "length", "form", "useForm", "autocomplete", "useAutocomplete", "selectedValues", "map", "selection", "isFocused", "shallowRef", "toRef", "isReadonly", "isDisabled", "InputIcon", "useInputIcon", "keyboardLookupPrefix", "keyboardLookupIndex", "keyboardLookupLastTime", "displayItems", "filter", "item", "some", "s", "valueComparator", "deepEqual", "menuDisabled", "_menu", "get", "set", "ΨopenChildren", "size", "menuId", "ariaExpanded", "ariaControls", "useMenuActivator", "computedMenuProps", "activatorProps", "listRef", "listEvents", "useScrolling", "onClear", "e", "onMLine truncated
|
||||
}
|
||||
+171
@@ -0,0 +1,171 @@
|
||||
import {
|
||||
useIntersectionObserver
|
||||
} from "./chunk-AJ7MUB7M.js";
|
||||
import {
|
||||
makeSizeProps,
|
||||
useSize
|
||||
} from "./chunk-PIT7IT55.js";
|
||||
import {
|
||||
makeTagProps
|
||||
} from "./chunk-2HZIACSB.js";
|
||||
import {
|
||||
useResizeObserver
|
||||
} from "./chunk-XDSAO7OT.js";
|
||||
import {
|
||||
useTextColor
|
||||
} from "./chunk-BHV5Z34M.js";
|
||||
import {
|
||||
makeThemeProps,
|
||||
provideTheme
|
||||
} from "./chunk-3DSR7NCB.js";
|
||||
import {
|
||||
PREFERS_REDUCED_MOTION,
|
||||
clamp,
|
||||
convertToUnit,
|
||||
genericComponent,
|
||||
makeComponentProps,
|
||||
propsFactory,
|
||||
useRender
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
computed,
|
||||
createBaseVNode,
|
||||
createVNode,
|
||||
normalizeClass,
|
||||
normalizeStyle,
|
||||
ref,
|
||||
toRef,
|
||||
watchEffect
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/VProgressCircular/VProgressCircular.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VProgressCircular/VProgressCircular.css";
|
||||
var makeVProgressCircularProps = propsFactory({
|
||||
bgColor: String,
|
||||
color: String,
|
||||
indeterminate: [Boolean, String],
|
||||
rounded: Boolean,
|
||||
modelValue: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
},
|
||||
rotate: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
},
|
||||
width: {
|
||||
type: [Number, String],
|
||||
default: 4
|
||||
},
|
||||
...makeComponentProps(),
|
||||
...makeSizeProps(),
|
||||
...makeTagProps({
|
||||
tag: "div"
|
||||
}),
|
||||
...makeThemeProps()
|
||||
}, "VProgressCircular");
|
||||
var VProgressCircular = genericComponent()({
|
||||
name: "VProgressCircular",
|
||||
props: makeVProgressCircularProps(),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
const MAGIC_RADIUS_CONSTANT = 20;
|
||||
const CIRCUMFERENCE = 2 * Math.PI * MAGIC_RADIUS_CONSTANT;
|
||||
const root = ref();
|
||||
const {
|
||||
themeClasses
|
||||
} = provideTheme(props);
|
||||
const {
|
||||
sizeClasses,
|
||||
sizeStyles
|
||||
} = useSize(props);
|
||||
const {
|
||||
textColorClasses,
|
||||
textColorStyles
|
||||
} = useTextColor(() => props.color);
|
||||
const {
|
||||
textColorClasses: underlayColorClasses,
|
||||
textColorStyles: underlayColorStyles
|
||||
} = useTextColor(() => props.bgColor);
|
||||
const {
|
||||
intersectionRef,
|
||||
isIntersecting
|
||||
} = useIntersectionObserver();
|
||||
const {
|
||||
resizeRef,
|
||||
contentRect
|
||||
} = useResizeObserver();
|
||||
const normalizedValue = toRef(() => clamp(parseFloat(props.modelValue), 0, 100));
|
||||
const width = toRef(() => Number(props.width));
|
||||
const size = toRef(() => {
|
||||
return sizeStyles.value ? Number(props.size) : contentRect.value ? contentRect.value.width : Math.max(width.value, 32);
|
||||
});
|
||||
const diameter = toRef(() => MAGIC_RADIUS_CONSTANT / (1 - width.value / size.value) * 2);
|
||||
const strokeWidth = toRef(() => width.value / size.value * diameter.value);
|
||||
const strokeDashOffset = toRef(() => {
|
||||
const baseLength = (100 - normalizedValue.value) / 100 * CIRCUMFERENCE;
|
||||
return props.rounded && normalizedValue.value > 0 && normalizedValue.value < 100 ? convertToUnit(Math.min(CIRCUMFERENCE - 0.01, baseLength + strokeWidth.value)) : convertToUnit(baseLength);
|
||||
});
|
||||
const startAngle = computed(() => {
|
||||
const baseAngle = Number(props.rotate);
|
||||
return props.rounded ? baseAngle + strokeWidth.value / 2 / CIRCUMFERENCE * 360 : baseAngle;
|
||||
});
|
||||
watchEffect(() => {
|
||||
intersectionRef.value = root.value;
|
||||
resizeRef.value = root.value;
|
||||
});
|
||||
useRender(() => createVNode(props.tag, {
|
||||
"ref": root,
|
||||
"class": normalizeClass(["v-progress-circular", {
|
||||
"v-progress-circular--indeterminate": !!props.indeterminate,
|
||||
"v-progress-circular--visible": isIntersecting.value,
|
||||
"v-progress-circular--disable-shrink": props.indeterminate && (props.indeterminate === "disable-shrink" || PREFERS_REDUCED_MOTION())
|
||||
}, themeClasses.value, sizeClasses.value, textColorClasses.value, props.class]),
|
||||
"style": normalizeStyle([sizeStyles.value, textColorStyles.value, props.style]),
|
||||
"role": "progressbar",
|
||||
"aria-valuemin": "0",
|
||||
"aria-valuemax": "100",
|
||||
"aria-valuenow": props.indeterminate ? void 0 : normalizedValue.value
|
||||
}, {
|
||||
default: () => [createBaseVNode("svg", {
|
||||
"style": {
|
||||
transform: `rotate(calc(-90deg + ${startAngle.value}deg))`
|
||||
},
|
||||
"xmlns": "http://www.w3.org/2000/svg",
|
||||
"viewBox": `0 0 ${diameter.value} ${diameter.value}`
|
||||
}, [createBaseVNode("circle", {
|
||||
"class": normalizeClass(["v-progress-circular__underlay", underlayColorClasses.value]),
|
||||
"style": normalizeStyle(underlayColorStyles.value),
|
||||
"fill": "transparent",
|
||||
"cx": "50%",
|
||||
"cy": "50%",
|
||||
"r": MAGIC_RADIUS_CONSTANT,
|
||||
"stroke-width": strokeWidth.value,
|
||||
"stroke-dasharray": CIRCUMFERENCE,
|
||||
"stroke-dashoffset": 0
|
||||
}, null), createBaseVNode("circle", {
|
||||
"class": "v-progress-circular__overlay",
|
||||
"fill": "transparent",
|
||||
"cx": "50%",
|
||||
"cy": "50%",
|
||||
"r": MAGIC_RADIUS_CONSTANT,
|
||||
"stroke-width": strokeWidth.value,
|
||||
"stroke-dasharray": CIRCUMFERENCE,
|
||||
"stroke-dashoffset": strokeDashOffset.value,
|
||||
"stroke-linecap": props.rounded ? "round" : void 0
|
||||
}, null)]), slots.default && createBaseVNode("div", {
|
||||
"class": "v-progress-circular__content"
|
||||
}, [slots.default({
|
||||
value: normalizedValue.value
|
||||
})])]
|
||||
}));
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
VProgressCircular
|
||||
};
|
||||
//# sourceMappingURL=chunk-ET5GCC5W.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VProgressCircular/VProgressCircular.tsx"],
|
||||
"sourcesContent": ["// Styles\nimport './VProgressCircular.sass'\n\n// Composables\nimport { useTextColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { useIntersectionObserver } from '@/composables/intersectionObserver'\nimport { useResizeObserver } from '@/composables/resizeObserver'\nimport { makeSizeProps, useSize } from '@/composables/size'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { computed, ref, toRef, watchEffect } from 'vue'\nimport { clamp, convertToUnit, genericComponent, PREFERS_REDUCED_MOTION, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\nexport const makeVProgressCircularProps = propsFactory({\n bgColor: String,\n color: String,\n indeterminate: [Boolean, String] as PropType<boolean | 'disable-shrink'>,\n rounded: Boolean,\n modelValue: {\n type: [Number, String],\n default: 0,\n },\n rotate: {\n type: [Number, String],\n default: 0,\n },\n width: {\n type: [Number, String],\n default: 4,\n },\n\n ...makeComponentProps(),\n ...makeSizeProps(),\n ...makeTagProps({ tag: 'div' }),\n ...makeThemeProps(),\n}, 'VProgressCircular')\n\ntype VProgressCircularSlots = {\n default: { value: number }\n}\n\nexport const VProgressCircular = genericComponent<VProgressCircularSlots>()({\n name: 'VProgressCircular',\n\n props: makeVProgressCircularProps(),\n\n setup (props, { slots }) {\n const MAGIC_RADIUS_CONSTANT = 20\n const CIRCUMFERENCE = 2 * Math.PI * MAGIC_RADIUS_CONSTANT\n\n const root = ref<HTMLElement>()\n\n const { themeClasses } = provideTheme(props)\n const { sizeClasses, sizeStyles } = useSize(props)\n const { textColorClasses, textColorStyles } = useTextColor(() => props.color)\n const { textColorClasses: underlayColorClasses, textColorStyles: underlayColorStyles } = useTextColor(() => props.bgColor)\n const { intersectionRef, isIntersecting } = useIntersectionObserver()\n const { resizeRef, contentRect } = useResizeObserver()\n\n const normalizedValue = toRef(() => clamp(parseFloat(props.modelValue), 0, 100))\n const width = toRef(() => Number(props.width))\n const size = toRef(() => {\n // Get size from element if size prop value is small, large etc\n return sizeStyles.value\n ? Number(props.size)\n : contentRect.value\n ? contentRect.value.width\n : Math.max(width.value, 32)\n })\n const diameter = toRef(() => (MAGIC_RADIUS_CONSTANT / (1 - width.value / size.value)) * 2)\n const strokeWidth = toRef(() => width.value / size.value * diameter.value)\n const strokeDashOffset = toRef(() => {\n const baseLength = ((100 - normalizedValue.value) / 100) * CIRCUMFERENCE\n return props.rounded && normalizedValue.value > 0 && normalizedValue.value < 100\n ? convertToUnit(Math.min(CIRCUMFERENCE - 0.01, baseLength + strokeWidth.value))\n : convertToUnit(baseLength)\n })\n const startAngle = computed(() => {\n const baseAngle = Number(props.rotate)\n return props.rounded\n ? baseAngle + (strokeWidth.value / 2) / CIRCUMFERENCE * 360\n : baseAngle\n })\n\n watchEffect(() => {\n intersectionRef.value = root.value\n resizeRef.value = root.value\n })\n\n useRender(() => (\n <props.tag\n ref={ root }\n class={[\n 'v-progress-circular',\n {\n 'v-progress-circular--indeterminate': !!props.indeterminate,\n 'v-progress-circular--visible': isIntersecting.value,\n 'v-progress-circular--disable-shrink': props.indeterminate &&\n (props.indeterminate === 'disable-shrink' || PREFERS_REDUCED_MOTION()),\n },\n themeClasses.value,\n sizeClasses.value,\n textColorClasses.value,\n props.class,\n ]}\n style={[\n sizeStyles.value,\n textColorStyles.value,\n props.style,\n ]}\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n aria-valuenow={ props.indeterminate ? undefined : normalizedValue.value }\n >\n <svg\n style={{\n transform: `rotate(calc(-90deg + ${startAngle.value}deg))`,\n }}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox={ `0 0 ${diameter.value} ${diameter.value}` }\n >\n <circle\n class={[\n 'v-progress-circular__underlay',\n underlayColorClasses.value,\n ]}\n style={ underlayColorStyles.value }\n fill=\"transparent\"\n cx=\"50%\"\n cy=\"50%\"\n r={ MAGIC_RADIUS_CONSTANT }\n stroke-width={ strokeWidth.value }\n stroke-dasharray={ CIRCUMFERENCE }\n stroke-dashoffset={ 0 }\n />\n\n Line truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAA;AAkBO,IAAMA,6BAA6BC,aAAa;EACrDC,SAASC;EACTC,OAAOD;EACPE,eAAe,CAACC,SAASH,MAAM;EAC/BI,SAASD;EACTE,YAAY;IACVC,MAAM,CAACC,QAAQP,MAAM;IACrBQ,SAAS;EACX;EACAC,QAAQ;IACNH,MAAM,CA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AIE,SAASF,KAAK;MAAE,GAAA,CAAAoB,gBAAA,UAAA;QAAA,SAAAN,eAG1C,CACL,iCACA3B,qBAAqBa,KAAK,CAC3B;QAAA,SAAAiB,eACO7B,oBAAoBY,KAAK;QAAA,QAAA;QAAA,MAAA;QAAA,MAAA;QAAA,KAI7B3B;QAAqB,gBACV8B,YAAYH;QAAK,oBACb1B;QAAa,qBACZ;MAAC,GAAA,IAAA,GAAA8C,gBAAA,UAAA;QAAA,SAAA;QAAA,QAAA;QAAA,MAAA;QAAA,MAAA;QAAA,KAQjB/C;QAAqB,gBACV8B,YAAYH;QAAK,oBACb1B;QAAa,qBACZ8B,iBAAiBJ;QAAK,kBACzB/B,MAAMf,UAAU,UAAUiE;MAAS,GAAA,IAAA,CAAA,CAAA,GAItD/C,MAAMd,WAAO8D,gBAAA,OAAA;QAAA,SAAA;MAAA,GAAA,CAEThD,MAAMd,QAAQ;QAAE0C,OAAOL,gBAAgBK;MAAM,CAAC,CAAC,CAAA,CAEpD;IAAA,CAAA,CAEJ;AAED,WAAO,CAAC;EACV;AACF,CAAC;",
|
||||
"names": ["makeVProgressCircularProps", "propsFactory", "bgColor", "String", "color", "indeterminate", "Boolean", "rounded", "modelValue", "type", "Number", "default", "rotate", "width", "makeComponentProps", "makeSizeProps", "makeTagProps", "tag", "makeThemeProps", "VProgressCircular", "genericComponent", "name", "props", "setup", "_ref", "slots", "MAGIC_RADIUS_CONSTANT", "CIRCUMFERENCE", "Math", "PI", "root", "ref", "themeClasses", "provideTheme", "sizeClasses", "sizeStyles", "useSize", "textColorClasses", "textColorStyles", "useTextColor", "underlayColorClasses", "underlayColorStyles", "intersectionRef", "isIntersecting", "useIntersectionObserver", "resizeRef", "contentRect", "useResizeObserver", "normalizedValue", "toRef", "clamp", "parseFloat", "size", "value", "max", "diameter", "strokeWidth", "strokeDashOffset", "baseLength", "convertToUnit", "min", "startAngle", "computed", "baseAngle", "watchEffect", "useRender", "_createVNode", "_normalizeClass", "PREFERS_REDUCED_MOTION", "class", "_normalizeStyle", "style", "undefined", "_createElementVNode", "transform"]
|
||||
}
|
||||
Whitespace-only changes.
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
+321
@@ -0,0 +1,321 @@
|
||||
import {
|
||||
useIntersectionObserver
|
||||
} from "./chunk-AJ7MUB7M.js";
|
||||
import {
|
||||
makeLocationProps,
|
||||
useLocation
|
||||
} from "./chunk-KTTVT6V2.js";
|
||||
import {
|
||||
makeRoundedProps,
|
||||
useRounded
|
||||
} from "./chunk-AQK3CYVW.js";
|
||||
import {
|
||||
makeTagProps
|
||||
} from "./chunk-2HZIACSB.js";
|
||||
import {
|
||||
useResizeObserver
|
||||
} from "./chunk-XDSAO7OT.js";
|
||||
import {
|
||||
useRtl
|
||||
} from "./chunk-ENTLCOCZ.js";
|
||||
import {
|
||||
useProxiedModel,
|
||||
useToggleScope
|
||||
} from "./chunk-KA77II4V.js";
|
||||
import {
|
||||
useBackgroundColor,
|
||||
useTextColor
|
||||
} from "./chunk-BHV5Z34M.js";
|
||||
import {
|
||||
makeThemeProps,
|
||||
provideTheme
|
||||
} from "./chunk-3DSR7NCB.js";
|
||||
import {
|
||||
clamp,
|
||||
convertToUnit,
|
||||
genericComponent,
|
||||
makeComponentProps,
|
||||
propsFactory,
|
||||
useRender
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
Transition,
|
||||
computed,
|
||||
createBaseVNode,
|
||||
createVNode,
|
||||
normalizeClass,
|
||||
normalizeStyle,
|
||||
ref,
|
||||
shallowRef,
|
||||
toRef,
|
||||
toValue,
|
||||
watchEffect
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/VProgressLinear/VProgressLinear.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VProgressLinear/VProgressLinear.css";
|
||||
|
||||
// node_modules/vuetify/lib/components/VProgressLinear/chunks.js
|
||||
var makeChunksProps = propsFactory({
|
||||
chunkCount: {
|
||||
type: [Number, String],
|
||||
default: null
|
||||
},
|
||||
chunkWidth: {
|
||||
type: [Number, String],
|
||||
default: null
|
||||
},
|
||||
chunkGap: {
|
||||
type: [Number, String],
|
||||
default: 4
|
||||
}
|
||||
}, "chunks");
|
||||
function useChunks(props, containerWidth) {
|
||||
const hasChunks = toRef(() => !!props.chunkCount || !!props.chunkWidth);
|
||||
const chunkWidth = computed(() => {
|
||||
const containerSize = toValue(containerWidth);
|
||||
if (!containerSize) {
|
||||
return 0;
|
||||
}
|
||||
if (!props.chunkCount) {
|
||||
return Number(props.chunkWidth);
|
||||
}
|
||||
const count = Number(props.chunkCount);
|
||||
const availableWidth = containerSize - Number(props.chunkGap) * (count - 1);
|
||||
return availableWidth / count;
|
||||
});
|
||||
const chunkGap = toRef(() => Number(props.chunkGap));
|
||||
const chunksMaskStyles = computed(() => {
|
||||
if (!hasChunks.value) {
|
||||
return {};
|
||||
}
|
||||
const chunkGapPx = convertToUnit(chunkGap.value);
|
||||
const chunkWidthPx = convertToUnit(chunkWidth.value);
|
||||
return {
|
||||
maskRepeat: "repeat-x",
|
||||
maskImage: `linear-gradient(90deg, #000, #000 ${chunkWidthPx}, transparent ${chunkWidthPx}, transparent)`,
|
||||
maskSize: `calc(${chunkWidthPx} + ${chunkGapPx}) 100%`
|
||||
};
|
||||
});
|
||||
function snapValueToChunk(val) {
|
||||
const containerSize = toValue(containerWidth);
|
||||
if (!containerSize) {
|
||||
return val;
|
||||
}
|
||||
const gapRelativeSize = 100 * chunkGap.value / containerSize;
|
||||
const chunkRelativeSize = 100 * (chunkWidth.value + chunkGap.value) / containerSize;
|
||||
const filledChunks = Math.floor((val + gapRelativeSize) / chunkRelativeSize);
|
||||
return clamp(0, filledChunks * chunkRelativeSize - gapRelativeSize / 2, 100);
|
||||
}
|
||||
return {
|
||||
hasChunks,
|
||||
chunksMaskStyles,
|
||||
snapValueToChunk
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/vuetify/lib/components/VProgressLinear/VProgressLinear.js
|
||||
var makeVProgressLinearProps = propsFactory({
|
||||
absolute: Boolean,
|
||||
active: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
bgColor: String,
|
||||
bgOpacity: [Number, String],
|
||||
bufferValue: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
},
|
||||
bufferColor: String,
|
||||
bufferOpacity: [Number, String],
|
||||
clickable: Boolean,
|
||||
color: String,
|
||||
height: {
|
||||
type: [Number, String],
|
||||
default: 4
|
||||
},
|
||||
indeterminate: Boolean,
|
||||
max: {
|
||||
type: [Number, String],
|
||||
default: 100
|
||||
},
|
||||
modelValue: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
},
|
||||
opacity: [Number, String],
|
||||
reverse: Boolean,
|
||||
stream: Boolean,
|
||||
striped: Boolean,
|
||||
roundedBar: Boolean,
|
||||
...makeChunksProps(),
|
||||
...makeComponentProps(),
|
||||
...makeLocationProps({
|
||||
location: "top"
|
||||
}),
|
||||
...makeRoundedProps(),
|
||||
...makeTagProps(),
|
||||
...makeThemeProps()
|
||||
}, "VProgressLinear");
|
||||
var VProgressLinear = genericComponent()({
|
||||
name: "VProgressLinear",
|
||||
props: makeVProgressLinearProps(),
|
||||
emits: {
|
||||
"update:modelValue": (value) => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
const root = ref();
|
||||
const progress = useProxiedModel(props, "modelValue");
|
||||
const {
|
||||
isRtl,
|
||||
rtlClasses
|
||||
} = useRtl();
|
||||
const {
|
||||
themeClasses
|
||||
} = provideTheme(props);
|
||||
const {
|
||||
locationStyles
|
||||
} = useLocation(props);
|
||||
const {
|
||||
textColorClasses,
|
||||
textColorStyles
|
||||
} = useTextColor(() => props.color);
|
||||
const {
|
||||
backgroundColorClasses,
|
||||
backgroundColorStyles
|
||||
} = useBackgroundColor(() => props.bgColor || props.color);
|
||||
const {
|
||||
backgroundColorClasses: bufferColorClasses,
|
||||
backgroundColorStyles: bufferColorStyles
|
||||
} = useBackgroundColor(() => props.bufferColor || props.bgColor || props.color);
|
||||
const {
|
||||
backgroundColorClasses: barColorClasses,
|
||||
backgroundColorStyles: barColorStyles
|
||||
} = useBackgroundColor(() => props.color);
|
||||
const {
|
||||
roundedClasses
|
||||
} = useRounded(props);
|
||||
const {
|
||||
intersectionRef,
|
||||
isIntersecting
|
||||
} = useIntersectionObserver();
|
||||
const max = computed(() => parseFloat(props.max));
|
||||
const height = computed(() => parseFloat(props.height));
|
||||
const normalizedBuffer = computed(() => clamp(parseFloat(props.bufferValue) / max.value * 100, 0, 100));
|
||||
const normalizedValue = computed(() => clamp(parseFloat(progress.value) / max.value * 100, 0, 100));
|
||||
const isReversed = computed(() => isRtl.value !== props.reverse);
|
||||
const transition = computed(() => props.indeterminate ? "fade-transition" : "slide-x-transition");
|
||||
const containerWidth = shallowRef(0);
|
||||
const {
|
||||
hasChunks,
|
||||
chunksMaskStyles,
|
||||
snapValueToChunk
|
||||
} = useChunks(props, containerWidth);
|
||||
useToggleScope(hasChunks, () => {
|
||||
const {
|
||||
resizeRef
|
||||
} = useResizeObserver((entries) => containerWidth.value = entries[0].contentRect.width);
|
||||
watchEffect(() => resizeRef.value = root.value);
|
||||
});
|
||||
const bufferWidth = computed(() => {
|
||||
return hasChunks.value ? snapValueToChunk(normalizedBuffer.value) : normalizedBuffer.value;
|
||||
});
|
||||
const barWidth = computed(() => {
|
||||
return hasChunks.value ? snapValueToChunk(normalizedValue.value) : normalizedValue.value;
|
||||
});
|
||||
function handleClick(e) {
|
||||
if (!intersectionRef.value) return;
|
||||
const {
|
||||
left,
|
||||
right,
|
||||
width
|
||||
} = intersectionRef.value.getBoundingClientRect();
|
||||
const value = isReversed.value ? width - e.clientX + (right - width) : e.clientX - left;
|
||||
progress.value = Math.round(value / width * max.value);
|
||||
}
|
||||
watchEffect(() => {
|
||||
intersectionRef.value = root.value;
|
||||
});
|
||||
useRender(() => createVNode(props.tag, {
|
||||
"ref": root,
|
||||
"class": normalizeClass(["v-progress-linear", {
|
||||
"v-progress-linear--absolute": props.absolute,
|
||||
"v-progress-linear--active": props.active && isIntersecting.value,
|
||||
"v-progress-linear--reverse": isReversed.value,
|
||||
"v-progress-linear--rounded": props.rounded,
|
||||
"v-progress-linear--rounded-bar": props.roundedBar,
|
||||
"v-progress-linear--striped": props.striped,
|
||||
"v-progress-linear--clickable": props.clickable
|
||||
}, roundedClasses.value, themeClasses.value, rtlClasses.value, props.class]),
|
||||
"style": normalizeStyle([{
|
||||
bottom: props.location === "bottom" ? 0 : void 0,
|
||||
top: props.location === "top" ? 0 : void 0,
|
||||
height: props.active ? convertToUnit(height.value) : 0,
|
||||
"--v-progress-linear-height": convertToUnit(height.value),
|
||||
...props.absolute ? locationStyles.value : {}
|
||||
}, chunksMaskStyles.value, props.style]),
|
||||
"role": "progressbar",
|
||||
"aria-hidden": props.active ? "false" : "true",
|
||||
"aria-valuemin": "0",
|
||||
"aria-valuemax": props.max,
|
||||
"aria-valuenow": props.indeterminate ? void 0 : Math.min(parseFloat(progress.value), max.value),
|
||||
"onClick": props.clickable && handleClick
|
||||
}, {
|
||||
default: () => [props.stream && createBaseVNode("div", {
|
||||
"key": "stream",
|
||||
"class": normalizeClass(["v-progress-linear__stream", textColorClasses.value]),
|
||||
"style": {
|
||||
...textColorStyles.value,
|
||||
[isReversed.value ? "left" : "right"]: convertToUnit(-height.value),
|
||||
borderTop: `${convertToUnit(height.value / 2)} dotted`,
|
||||
opacity: parseFloat(props.bufferOpacity),
|
||||
top: `calc(50% - ${convertToUnit(height.value / 4)})`,
|
||||
width: convertToUnit(100 - normalizedBuffer.value, "%"),
|
||||
"--v-progress-linear-stream-to": convertToUnit(height.value * (isReversed.value ? 1 : -1))
|
||||
}
|
||||
}, null), createBaseVNode("div", {
|
||||
"class": normalizeClass(["v-progress-linear__background", backgroundColorClasses.value]),
|
||||
"style": normalizeStyle([backgroundColorStyles.value, {
|
||||
opacity: parseFloat(props.bgOpacity),
|
||||
width: props.stream ? 0 : void 0
|
||||
}])
|
||||
}, null), createBaseVNode("div", {
|
||||
"class": normalizeClass(["v-progress-linear__buffer", bufferColorClasses.value]),
|
||||
"style": normalizeStyle([bufferColorStyles.value, {
|
||||
opacity: parseFloat(props.bufferOpacity),
|
||||
width: convertToUnit(bufferWidth.value, "%")
|
||||
}])
|
||||
}, null), createVNode(Transition, {
|
||||
"name": transition.value
|
||||
}, {
|
||||
default: () => [!props.indeterminate ? createBaseVNode("div", {
|
||||
"class": normalizeClass(["v-progress-linear__determinate", barColorClasses.value]),
|
||||
"style": normalizeStyle([barColorStyles.value, {
|
||||
width: convertToUnit(barWidth.value, "%")
|
||||
}])
|
||||
}, null) : createBaseVNode("div", {
|
||||
"class": "v-progress-linear__indeterminate"
|
||||
}, [["long", "short"].map((bar) => createBaseVNode("div", {
|
||||
"key": bar,
|
||||
"class": normalizeClass(["v-progress-linear__indeterminate", bar, barColorClasses.value]),
|
||||
"style": normalizeStyle(barColorStyles.value)
|
||||
}, null))])]
|
||||
}), slots.default && createBaseVNode("div", {
|
||||
"class": "v-progress-linear__content"
|
||||
}, [slots.default({
|
||||
value: normalizedValue.value,
|
||||
buffer: normalizedBuffer.value
|
||||
})])]
|
||||
}));
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
VProgressLinear
|
||||
};
|
||||
//# sourceMappingURL=chunk-FVDWV4NO.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VProgressLinear/VProgressLinear.tsx", "../../vuetify/src/components/VProgressLinear/chunks.ts"],
|
||||
"sourcesContent": ["// Styles\nimport './VProgressLinear.sass'\n\n// Composables\nimport { useBackgroundColor, useTextColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { useIntersectionObserver } from '@/composables/intersectionObserver'\nimport { useRtl } from '@/composables/locale'\nimport { makeLocationProps, useLocation } from '@/composables/location'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { useResizeObserver } from '@/composables/resizeObserver'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Utilities\nimport { computed, ref, shallowRef, Transition, watchEffect } from 'vue'\nimport { makeChunksProps, useChunks } from './chunks'\nimport { clamp, convertToUnit, genericComponent, propsFactory, useRender } from '@/util'\n\ntype VProgressLinearSlots = {\n default: { value: number, buffer: number }\n}\n\nexport const makeVProgressLinearProps = propsFactory({\n absolute: Boolean,\n active: {\n type: Boolean,\n default: true,\n },\n bgColor: String,\n bgOpacity: [Number, String],\n bufferValue: {\n type: [Number, String],\n default: 0,\n },\n bufferColor: String,\n bufferOpacity: [Number, String],\n clickable: Boolean,\n color: String,\n height: {\n type: [Number, String],\n default: 4,\n },\n indeterminate: Boolean,\n max: {\n type: [Number, String],\n default: 100,\n },\n modelValue: {\n type: [Number, String],\n default: 0,\n },\n opacity: [Number, String],\n reverse: Boolean,\n stream: Boolean,\n striped: Boolean,\n roundedBar: Boolean,\n\n ...makeChunksProps(),\n ...makeComponentProps(),\n ...makeLocationProps({ location: 'top' } as const),\n ...makeRoundedProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n}, 'VProgressLinear')\n\nexport const VProgressLinear = genericComponent<VProgressLinearSlots>()({\n name: 'VProgressLinear',\n\n props: makeVProgressLinearProps(),\n\n emits: {\n 'update:modelValue': (value: number) => true,\n },\n\n setup (props, { slots }) {\n const root = ref<HTMLElement>()\n\n const progress = useProxiedModel(props, 'modelValue')\n const { isRtl, rtlClasses } = useRtl()\n const { themeClasses } = provideTheme(props)\n const { locationStyles } = useLocation(props)\n const { textColorClasses, textColorStyles } = useTextColor(() => props.color)\n const {\n backgroundColorClasses,\n backgroundColorStyles,\n } = useBackgroundColor(() => props.bgColor || props.color)\n const {\n backgroundColorClasses: bufferColorClasses,\n backgroundColorStyles: bufferColorStyles,\n } = useBackgroundColor(() => props.bufferColor || props.bgColor || props.color)\n const {\n backgroundColorClasses: barColorClasses,\n backgroundColorStyles: barColorStyles,\n } = useBackgroundColor(() => props.color)\n const { roundedClasses } = useRounded(props)\n const { intersectionRef, isIntersecting } = useIntersectionObserver()\n\n const max = computed(() => parseFloat(props.max))\n const height = computed(() => parseFloat(props.height))\n const normalizedBuffer = computed(() => clamp(parseFloat(props.bufferValue) / max.value * 100, 0, 100))\n const normalizedValue = computed(() => clamp(parseFloat(progress.value) / max.value * 100, 0, 100))\n const isReversed = computed(() => isRtl.value !== props.reverse)\n const transition = computed(() => props.indeterminate ? 'fade-transition' : 'slide-x-transition')\n\n const containerWidth = shallowRef(0)\n const { hasChunks, chunksMaskStyles, snapValueToChunk } = useChunks(props, containerWidth)\n useToggleScope(hasChunks, () => {\n const { resizeRef } = useResizeObserver(entries => containerWidth.value = entries[0].contentRect.width)\n watchEffect(() => resizeRef.value = root.value)\n })\n\n const bufferWidth = computed(() => {\n return hasChunks.value\n ? snapValueToChunk(normalizedBuffer.value)\n : normalizedBuffer.value\n })\n\n const barWidth = computed(() => {\n return hasChunks.value\n ? snapValueToChunk(normalizedValue.value)\n : normalizedValue.value\n })\n\n function handleClick (e: MouseEvent) {\n if (!intersectionRef.value) return\n\n const { left, right, width } = intersectionRef.value.getBoundingClientRect()\n const value = isReversed.value ? (width - e.clientX) + (right - width) : e.clientX - left\n\n progress.value = Math.round(value / width * max.value)\n }\n\n watchEffect(() => {\n intersectionRef.value = root.value\n })\n\n useRender(() => (\n <props.tag\n ref={ root }\n class={[\n 'v-progress-linear',\n {\n 'v-progress-linear--absolute': props.absoluteLine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAA;;;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AAOqB,KAAK,IAAI;QACrD,8BAA8BsE,cAAc3F,OAAOqB,KAAK;QACxD,GAAIF,MAAMjC,WAAWgD,eAAeb,QAAQ,CAAC;MAC/C,GACAwC,iBAAiBxC,OACjBF,MAAMyE,KAAK,CACZ;MAAA,QAAA;MAAA,eAEazE,MAAM/B,SAAS,UAAU;MAAM,iBAAA;MAAA,iBAE7B+B,MAAMjB;MAAG,iBACTiB,MAAMlB,gBAAgBwF,SAAYV,KAAKc,IAAIzC,WAAWzB,SAASN,KAAK,GAAGnB,IAAImB,KAAK;MAAC,WACvFF,MAAMrB,aAAa2E;IAAW,GAAA;MAAAnF,SAAAA,MAAA,CAEtC6B,MAAMb,UAAMwF,gBAAA,OAAA;QAAA,OAAA;QAAA,SAAAV,eAGH,CACL,6BACAhD,iBAAiBf,KAAK,CACvB;QAAA,SACM;UACL,GAAGgB,gBAAgBhB;UACnB,CAACmC,WAAWnC,QAAQ,SAAS,OAAO,GAAGsE,cAAc,CAAC3F,OAAOqB,KAAK;UAClE0E,WAAW,GAAGJ,cAAc3F,OAAOqB,QAAQ,CAAC,CAAC;UAC7CjB,SAASgD,WAAWjC,MAAMtB,aAAc;UACxC6F,KAAK,cAAcC,cAAc3F,OAAOqB,QAAQ,CAAC,CAAC;UACLine truncated
|
||||
"names": ["makeChunksProps", "propsFactory", "chunkCount", "type", "Number", "String", "default", "chunkWidth", "chunkGap", "useChunks", "props", "containerWidth", "hasChunks", "toRef", "computed", "containerSize", "toValue", "count", "availableWidth", "chunksMaskStyles", "value", "chunkGapPx", "convertToUnit", "chunkWidthPx", "maskRepeat", "maskImage", "maskSize", "snapValueToChunk", "val", "gapRelativeSize", "chunkRelativeSize", "filledChunks", "Math", "floor", "clamp", "makeVProgressLinearProps", "propsFactory", "absolute", "Boolean", "active", "type", "default", "bgColor", "String", "bgOpacity", "Number", "bufferValue", "bufferColor", "bufferOpacity", "clickable", "color", "height", "indeterminate", "max", "modelValue", "opacity", "reverse", "stream", "striped", "roundedBar", "makeChunksProps", "makeComponentProps", "makeLocationProps", "location", "makeRoundedProps", "makeTagProps", "makeThemeProps", "VProgressLinear", "genericComponent", "name", "props", "emits", "value", "setup", "_ref", "slots", "root", "ref", "progress", "useProxiedModel", "isRtl", "rtlClasses", "useRtl", "themeClasses", "provideTheme", "locationStyles", "useLocation", "textColorClasses", "textColorStyles", "useTextColor", "backgroundColorClasses", "backgroundColorStyles", "useBackgroundColor", "bufferColorClasses", "bufferColorStyles", "barColorClasses", "barColorStyles", "roundedClasses", "useRounded", "intersectionRef", "isIntersecting", "useIntersectionObserver", "computed", "parseFloat", "normalizedBuffer", "clamp", "normalizedValue", "isReversed", "transition", "containerWidth", "shallowRef", "hasChunks", "chunksMaskStyles", "snapValueToChunk", "useChunks", "useToggleScope", "resizeRef", "useResizeObserver", "entries", "contentRect", "width", "watchEffect", "bufferWidth", "barWidth", "handleClick", "e", "left", "right", "getBoundingClientRect", "clientX", "Math", "round", "useRender", "_createVNode", "tag", "_normalizeClass", "rounded", "class", "_normalizeStyle", "bottom", "undefined", "top", "convertToUnit", "style", "min", "_createElementVNode", "borderTop", "Transition", "map", "bar", "buffer"]
|
||||
}
|
||||
+155
@@ -0,0 +1,155 @@
|
||||
import {
|
||||
useProxiedModel
|
||||
} from "./chunk-KA77II4V.js";
|
||||
import {
|
||||
consoleWarn,
|
||||
propsFactory
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
computed,
|
||||
inject,
|
||||
markRaw,
|
||||
provide,
|
||||
ref,
|
||||
shallowRef,
|
||||
toRef,
|
||||
watch
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/composables/form.js
|
||||
var FormKey = /* @__PURE__ */ Symbol.for("vuetify:form");
|
||||
var makeFormProps = propsFactory({
|
||||
disabled: Boolean,
|
||||
fastFail: Boolean,
|
||||
readonly: Boolean,
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
default: null
|
||||
},
|
||||
validateOn: {
|
||||
type: String,
|
||||
default: "input"
|
||||
}
|
||||
}, "form");
|
||||
function createForm(props) {
|
||||
const model = useProxiedModel(props, "modelValue");
|
||||
const isDisabled = toRef(() => props.disabled);
|
||||
const isReadonly = toRef(() => props.readonly);
|
||||
const isValidating = shallowRef(false);
|
||||
const items = ref([]);
|
||||
const errors = ref([]);
|
||||
async function validate() {
|
||||
const results = [];
|
||||
let valid = true;
|
||||
errors.value = [];
|
||||
isValidating.value = true;
|
||||
for (const item of items.value) {
|
||||
const itemErrorMessages = await item.validate();
|
||||
if (itemErrorMessages.length > 0) {
|
||||
valid = false;
|
||||
results.push({
|
||||
id: item.id,
|
||||
errorMessages: itemErrorMessages
|
||||
});
|
||||
}
|
||||
if (!valid && props.fastFail) break;
|
||||
}
|
||||
errors.value = results;
|
||||
isValidating.value = false;
|
||||
return {
|
||||
valid,
|
||||
errors: errors.value
|
||||
};
|
||||
}
|
||||
function reset() {
|
||||
items.value.forEach((item) => item.reset());
|
||||
}
|
||||
function resetValidation() {
|
||||
items.value.forEach((item) => item.resetValidation());
|
||||
}
|
||||
watch(items, () => {
|
||||
let valid = 0;
|
||||
let invalid = 0;
|
||||
const results = [];
|
||||
for (const item of items.value) {
|
||||
if (item.isValid === false) {
|
||||
invalid++;
|
||||
results.push({
|
||||
id: item.id,
|
||||
errorMessages: item.errorMessages
|
||||
});
|
||||
} else if (item.isValid === true) valid++;
|
||||
}
|
||||
errors.value = results;
|
||||
model.value = invalid > 0 ? false : valid === items.value.length ? true : null;
|
||||
}, {
|
||||
deep: true,
|
||||
flush: "post"
|
||||
});
|
||||
provide(FormKey, {
|
||||
register: (_ref) => {
|
||||
let {
|
||||
id,
|
||||
vm,
|
||||
validate: validate2,
|
||||
reset: reset2,
|
||||
resetValidation: resetValidation2
|
||||
} = _ref;
|
||||
if (items.value.some((item) => item.id === id)) {
|
||||
consoleWarn(`Duplicate input name "${id}"`);
|
||||
}
|
||||
items.value.push({
|
||||
id,
|
||||
validate: validate2,
|
||||
reset: reset2,
|
||||
resetValidation: resetValidation2,
|
||||
vm: markRaw(vm),
|
||||
isValid: null,
|
||||
errorMessages: []
|
||||
});
|
||||
},
|
||||
unregister: (id) => {
|
||||
items.value = items.value.filter((item) => {
|
||||
return item.id !== id;
|
||||
});
|
||||
},
|
||||
update: (id, isValid, errorMessages) => {
|
||||
const found = items.value.find((item) => item.id === id);
|
||||
if (!found) return;
|
||||
found.isValid = isValid;
|
||||
found.errorMessages = errorMessages;
|
||||
},
|
||||
isDisabled,
|
||||
isReadonly,
|
||||
isValidating,
|
||||
isValid: model,
|
||||
items,
|
||||
validateOn: toRef(() => props.validateOn)
|
||||
});
|
||||
return {
|
||||
errors,
|
||||
isDisabled,
|
||||
isReadonly,
|
||||
isValidating,
|
||||
isValid: model,
|
||||
items,
|
||||
validate,
|
||||
reset,
|
||||
resetValidation
|
||||
};
|
||||
}
|
||||
function useForm(props) {
|
||||
const form = inject(FormKey, null);
|
||||
return {
|
||||
...form,
|
||||
isReadonly: computed(() => !!(props?.readonly ?? form?.isReadonly.value)),
|
||||
isDisabled: computed(() => !!(props?.disabled ?? form?.isDisabled.value))
|
||||
};
|
||||
}
|
||||
|
||||
export {
|
||||
makeFormProps,
|
||||
createForm,
|
||||
useForm
|
||||
};
|
||||
//# sourceMappingURL=chunk-GAYXO4FM.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/composables/form.ts"],
|
||||
"sourcesContent": ["// Composables\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, inject, markRaw, provide, ref, shallowRef, toRef, watch } from 'vue'\nimport { consoleWarn, propsFactory } from '@/util'\n\n// Types\nimport type { ComponentInternalInstance, InjectionKey, PropType, Raw, Ref } from 'vue'\nimport type { ValidationProps } from './validation'\nimport type { EventProp } from '@/util'\n\nexport interface FormProvide {\n register: (item: {\n id: number | string\n vm: ComponentInternalInstance\n validate: () => Promise<string[]>\n reset: () => Promise<void>\n resetValidation: () => Promise<void>\n }) => void\n unregister: (id: number | string) => void\n update: (id: number | string, isValid: boolean | null, errorMessages: string[]) => void\n items: Ref<FormField[]>\n isDisabled: Readonly<Ref<boolean>>\n isReadonly: Readonly<Ref<boolean>>\n isValidating: Ref<boolean>\n isValid: Ref<boolean | null>\n validateOn: Ref<FormProps['validateOn']>\n}\n\nexport interface FormField {\n id: number | string\n validate: () => Promise<string[]>\n reset: () => Promise<void>\n resetValidation: () => Promise<void>\n vm: Raw<ComponentInternalInstance>\n isValid: boolean | null\n errorMessages: string[]\n}\n\nexport interface FieldValidationResult {\n id: number | string\n errorMessages: string[]\n}\n\nexport interface FormValidationResult {\n valid: boolean\n errors: FieldValidationResult[]\n}\n\nexport interface SubmitEventPromise extends SubmitEvent, Promise<FormValidationResult> {}\n\nexport const FormKey: InjectionKey<FormProvide> = Symbol.for('vuetify:form')\n\nexport interface FormProps {\n disabled: boolean\n fastFail: boolean\n readonly: boolean\n modelValue: boolean | null\n 'onUpdate:modelValue': EventProp<[boolean | null]> | undefined\n validateOn: ValidationProps['validateOn']\n}\n\nexport const makeFormProps = propsFactory({\n disabled: Boolean,\n fastFail: Boolean,\n readonly: Boolean,\n modelValue: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n validateOn: {\n type: String as PropType<FormProps['validateOn']>,\n default: 'input',\n },\n}, 'form')\n\nexport function createForm (props: FormProps) {\n const model = useProxiedModel(props, 'modelValue')\n\n const isDisabled = toRef(() => props.disabled)\n const isReadonly = toRef(() => props.readonly)\n const isValidating = shallowRef(false)\n const items = ref<FormField[]>([])\n const errors = ref<FieldValidationResult[]>([])\n\n async function validate () {\n const results = []\n let valid = true\n\n errors.value = []\n isValidating.value = true\n\n for (const item of items.value) {\n const itemErrorMessages = await item.validate()\n\n if (itemErrorMessages.length > 0) {\n valid = false\n\n results.push({\n id: item.id,\n errorMessages: itemErrorMessages,\n })\n }\n\n if (!valid && props.fastFail) break\n }\n\n errors.value = results\n isValidating.value = false\n\n return { valid, errors: errors.value }\n }\n\n function reset () {\n items.value.forEach(item => item.reset())\n }\n\n function resetValidation () {\n items.value.forEach(item => item.resetValidation())\n }\n\n watch(items, () => {\n let valid = 0\n let invalid = 0\n const results = []\n\n for (const item of items.value) {\n if (item.isValid === false) {\n invalid++\n results.push({\n id: item.id,\n errorMessages: item.errorMessages,\n })\n } else if (item.isValid === true) valid++\n }\n\n errors.value = results\n model.value =\n invalid > 0 ? false\n : valid === items.value.length ? true\n : null\n }, { deep: true, flush: 'post' })\n\n provide(FormKey, {\n register: ({ id, vm, validate, reset, resetValidation }) => {\n if (items.value.some(item => item.id === id)) {\n consoleWarn(`Duplicate input name \"${id}\"`)\n }\n\n items.value.push({\n id,\n validate,\n reset,\n resetValidation,\n vm: markRaw(vm),\n isValid: null,\n errorMessages: [],\n })\n },\n unregister: id => {\n items.value = items.value.filter(item => {\n return item.id !== id\n })\n },\n update: (id, isValid, errorMessages) => {\n const found = items.value.find(item => item.id === id)\n\n if (!found) return\n\n found.isValid = isValid\n found.errorMessages = errorMessages\n },\n isDisabled,\n isReadonly,\n isValidating,\n isValid: model,\n items,\n validateOn: toRef(() => props.validateOn),\n })\n\n return {\n errors,\n isDisabled,\n isReadonly,\n isValidating,\n isValid: model,\n items,\n validate,\n reset,\n resetValidation,\n }\n}\n\nexport function useForm (props?: { readonly: boolean | null, disabled: boolean | null }) {\n cLine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;AAoDO,IAAMA,UAAqCC,uBAAOC,IAAI,cAAc;AAWpE,IAAMC,gBAAgBC,aAAa;EACxCC,UAAUC;EACVC,UAAUD;EACVE,UAAUF;EACVG,YAAY;IACVC,MAAMJ;IACNK,SAAS;EACX;EACAC,YAAY;IACVF,MAAMG;IACNF,SAAS;EACX;AACF,GAAG,MAAM;AAEF,SAASG,WAAYC,OAAkB;AAC5C,QAAMC,QAAQC,gBAAgBF,OAAO,YAAY;AAEjD,QAAMG,aAAaC,MAAM,MAAMJ,MAAMV,QAA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,UAAQ5C,SAAS;IACf6C,UAAUC,UAAkD;AAAA,UAAjD;QAAEZ;QAAIa;QAAIrB,UAAAA;QAAUU,OAAAA;QAAOE,iBAAAA;MAAgB,IAACQ;AACrD,UAAIvB,MAAMM,MAAMmB,KAAKlB,UAAQA,KAAKI,OAAOA,EAAE,GAAG;AAC5Ce,oBAAY,yBAAyBf,EAAE,GAAG;MAC5C;AAEAX,YAAMM,MAAMI,KAAK;QACfC;QACAR,UAAAA;QACAU,OAAAA;QACAE,iBAAAA;QACAS,IAAIG,QAAQH,EAAE;QACdN,SAAS;QACTN,eAAe,CAAA;MACjB,CAAC;IACH;IACAgB,YAAYjB,QAAM;AAChBX,YAAMM,QAAQN,MAAMM,MAAMuB,OAAOtB,UAAQ;AACvC,eAAOA,KAAKI,OAAOA;MACrB,CAAC;IACH;IACAmB,QAAQA,CAACnB,IAAIO,SAASN,kBAAkB;AACtC,YAAMmB,QAAQ/B,MAAMM,MAAM0B,KAAKzB,UAAQA,KAAKI,OAAOA,EAAE;AAErD,UAAI,CAACoB,MAAO;AAEZA,YAAMb,UAAUA;AAChBa,YAAMnB,gBAAgBA;IACxB;IACAjB;IACAE;IACAC;IACAoB,SAASzB;IACTO;IACAX,YAAYO,MAAM,MAAMJ,MAAMH,UAAU;EAC1C,CAAC;AAED,SAAO;IACLa;IACAP;IACAE;IACAC;IACAoB,SAASzB;IACTO;IACAG;IACAU;IACAE;EACF;AACF;AAEO,SAASkB,QAASzC,OAAgE;AACvF,QAAM0C,OAAOC,OAAO1D,SAAS,IAAI;AACjC,SAAO;IACL,GAAGyD;IACHrC,YAAYuC,SAAS,MAAM,CAAC,EAAE5C,OAAOP,YAAYiD,MAAMrC,WAAWS,MAAM;IACxEX,YAAYyC,SAAS,MAAM,CAAC,EAAE5C,OAAOV,YAAYoD,MAAMvC,WAAWW,MAAM;EAC1E;AACF;",
|
||||
"names": ["FormKey", "Symbol", "for", "makeFormProps", "propsFactory", "disabled", "Boolean", "fastFail", "readonly", "modelValue", "type", "default", "validateOn", "String", "createForm", "props", "model", "useProxiedModel", "isDisabled", "toRef", "isReadonly", "isValidating", "shallowRef", "items", "ref", "errors", "validate", "results", "valid", "value", "item", "itemErrorMessages", "length", "push", "id", "errorMessages", "reset", "forEach", "resetValidation", "watch", "invalid", "isValid", "deep", "flush", "provide", "register", "_ref", "vm", "some", "consoleWarn", "markRaw", "unregister", "filter", "update", "found", "find", "useForm", "form", "inject", "computed"]
|
||||
}
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
// node_modules/vuetify/lib/composables/forwardRefs.js
|
||||
var Refs = /* @__PURE__ */ Symbol("Forwarded refs");
|
||||
function getDescriptor(obj, key) {
|
||||
let currentObj = obj;
|
||||
while (currentObj) {
|
||||
const descriptor = Reflect.getOwnPropertyDescriptor(currentObj, key);
|
||||
if (descriptor) return descriptor;
|
||||
currentObj = Object.getPrototypeOf(currentObj);
|
||||
}
|
||||
return void 0;
|
||||
}
|
||||
function forwardRefs(target) {
|
||||
for (var _len = arguments.length, refs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
refs[_key - 1] = arguments[_key];
|
||||
}
|
||||
target[Refs] = refs;
|
||||
return new Proxy(target, {
|
||||
get(target2, key) {
|
||||
if (Reflect.has(target2, key)) {
|
||||
return Reflect.get(target2, key);
|
||||
}
|
||||
if (typeof key === "symbol" || key.startsWith("$") || key.startsWith("__")) return;
|
||||
for (const ref of refs) {
|
||||
if (ref.value && Reflect.has(ref.value, key)) {
|
||||
const val = Reflect.get(ref.value, key);
|
||||
return typeof val === "function" ? val.bind(ref.value) : val;
|
||||
}
|
||||
}
|
||||
},
|
||||
has(target2, key) {
|
||||
if (Reflect.has(target2, key)) {
|
||||
return true;
|
||||
}
|
||||
if (typeof key === "symbol" || key.startsWith("$") || key.startsWith("__")) return false;
|
||||
for (const ref of refs) {
|
||||
if (ref.value && Reflect.has(ref.value, key)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
set(target2, key, value) {
|
||||
if (Reflect.has(target2, key)) {
|
||||
return Reflect.set(target2, key, value);
|
||||
}
|
||||
if (typeof key === "symbol" || key.startsWith("$") || key.startsWith("__")) return false;
|
||||
for (const ref of refs) {
|
||||
if (ref.value && Reflect.has(ref.value, key)) {
|
||||
return Reflect.set(ref.value, key, value);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
getOwnPropertyDescriptor(target2, key) {
|
||||
const descriptor = Reflect.getOwnPropertyDescriptor(target2, key);
|
||||
if (descriptor) return descriptor;
|
||||
if (typeof key === "symbol" || key.startsWith("$") || key.startsWith("__")) return;
|
||||
for (const ref of refs) {
|
||||
if (!ref.value) continue;
|
||||
const descriptor2 = getDescriptor(ref.value, key) ?? ("_" in ref.value ? getDescriptor(ref.value._?.setupState, key) : void 0);
|
||||
if (descriptor2) return descriptor2;
|
||||
}
|
||||
for (const ref of refs) {
|
||||
const childRefs = ref.value && ref.value[Refs];
|
||||
if (!childRefs) continue;
|
||||
const queue = childRefs.slice();
|
||||
while (queue.length) {
|
||||
const ref2 = queue.shift();
|
||||
const descriptor2 = getDescriptor(ref2.value, key);
|
||||
if (descriptor2) return descriptor2;
|
||||
const childRefs2 = ref2.value && ref2.value[Refs];
|
||||
if (childRefs2) queue.push(...childRefs2);
|
||||
}
|
||||
}
|
||||
return void 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export {
|
||||
forwardRefs
|
||||
};
|
||||
//# sourceMappingURL=chunk-GUNW7S2L.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/composables/forwardRefs.ts"],
|
||||
"sourcesContent": ["// Types\nimport type { ComponentOptionsBase, ComponentPublicInstance, Ref, UnwrapRef } from 'vue'\nimport type { NonEmptyArray, UnionToIntersection } from '@/util'\n\nconst Refs = Symbol('Forwarded refs')\n\n/** Omit properties starting with P */\ntype OmitPrefix<\n T,\n P extends string,\n E = Extract<keyof T, `${P}${any}`>,\n> = [E] extends [never] ? T : Omit<T, `${P}${any}`>\ntype OmitPrivate<T> = OmitPrefix<T, '$'>\n\n/** Omit keyof $props from T */\ntype OmitProps<T> = T extends { $props: any } ? Omit<T, keyof T['$props']> : T\n\nfunction getDescriptor (obj: any, key: PropertyKey) {\n let currentObj = obj\n while (currentObj) {\n const descriptor = Reflect.getOwnPropertyDescriptor(currentObj, key)\n if (descriptor) return descriptor\n currentObj = Object.getPrototypeOf(currentObj)\n }\n return undefined\n}\n\nexport function forwardRefs<\n T extends {},\n U extends NonEmptyArray<Ref<HTMLElement | Omit<ComponentPublicInstance, '$emit' | '$slots'> | undefined>>,\n UU = { [K in keyof U]: NonNullable<UnwrapRef<U[K]>> }[number],\n UC = { [K in keyof U]: OmitPrivate<OmitProps<NonNullable<UnwrapRef<U[K]>>>> }[number],\n R = T & UnionToIntersection<UC> & {\n _allExposed: T | (\n UU extends { $options: infer O }\n ? O extends ComponentOptionsBase<any, infer E, any, any, any, any, any, any>\n ? E\n : never\n : never\n )\n }\n> (target: T, ...refs: U): R {\n (target as any)[Refs] = refs\n\n return new Proxy(target, {\n get (target, key) {\n if (Reflect.has(target, key)) {\n return Reflect.get(target, key)\n }\n\n // Skip internal properties\n if (typeof key === 'symbol' || key.startsWith('$') || key.startsWith('__')) return\n\n for (const ref of refs) {\n if (ref.value && Reflect.has(ref.value, key)) {\n const val = Reflect.get(ref.value, key)\n return typeof val === 'function'\n ? val.bind(ref.value)\n : val\n }\n }\n },\n has (target, key) {\n if (Reflect.has(target, key)) {\n return true\n }\n\n // Skip internal properties\n if (typeof key === 'symbol' || key.startsWith('$') || key.startsWith('__')) return false\n\n for (const ref of refs) {\n if (ref.value && Reflect.has(ref.value, key)) {\n return true\n }\n }\n return false\n },\n set (target, key, value) {\n if (Reflect.has(target, key)) {\n return Reflect.set(target, key, value)\n }\n\n // Skip internal properties\n if (typeof key === 'symbol' || key.startsWith('$') || key.startsWith('__')) return false\n\n for (const ref of refs) {\n if (ref.value && Reflect.has(ref.value, key)) {\n return Reflect.set(ref.value, key, value)\n }\n }\n\n return false\n },\n getOwnPropertyDescriptor (target, key) {\n const descriptor = Reflect.getOwnPropertyDescriptor(target, key)\n if (descriptor) return descriptor\n\n // Skip internal properties\n if (typeof key === 'symbol' || key.startsWith('$') || key.startsWith('__')) return\n\n // Check each ref's own properties\n for (const ref of refs) {\n if (!ref.value) continue\n const descriptor = getDescriptor(ref.value, key) ?? ('_' in ref.value ? getDescriptor(ref.value._?.setupState, key) : undefined)\n if (descriptor) return descriptor\n }\n\n // Recursive search up each ref's prototype\n for (const ref of refs) {\n const childRefs = ref.value && (ref.value as any)[Refs]\n if (!childRefs) continue\n const queue = childRefs.slice()\n while (queue.length) {\n const ref = queue.shift()\n const descriptor = getDescriptor(ref.value, key)\n if (descriptor) return descriptor\n const childRefs = ref.value && (ref.value as any)[Refs]\n if (childRefs) queue.push(...childRefs)\n }\n }\n\n return undefined\n },\n }) as any\n}\n"],
|
||||
"mappings": ";AAIA,IAAMA,OAAOC,uBAAO,gBAAgB;AAapC,SAASC,cAAeC,KAAUC,KAAkB;AAClD,MAAIC,aAAaF;AACjB,SAAOE,YAAY;AACjB,UAAMC,aAAaC,QAAQC,yBAAyBH,YAAYD,GAAG;AACnE,QAAIE,WAAY,QAAOA;AACvBD,iBAAaI,OAAOC,eAAeL,UAAU;EAC/C;AACA,SAAOM;AACT;AAEO,SAASC,YAcbC,QAA0B;AAAA,WAAAC,OAAAC,UAAAC,QAAZC,OAAI,IAAAC,MAAAJ,OAAA,IAAAA,OAAA,IAAA,CAAA,GAAAK,OAAA,GAAAA,OAAAL,MAAAK,QAAA;AAAJF,SAAIE,OAAA,CAAA,IAAAJ,UAAAI,IAAA;EAAA;AAClBN,SAAeb,IAAI,IAAIiB;AAExB,SAAO,IAAIG,MAAMP,QAAQ;IACvBQ,IAAKR,SAAQT,KAAK;AAChB,UAAIG,QAAQe,IAAIT,SAAQT,GAAG,GAAG;AAC5B,eA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B,UAAI,OAAOF,QAAQ,YAAYA,IAAImB,WAAW,GAAG,KAAKnB,IAAImB,WAAW,IAAI,EAAG;AAG5E,iBAAWC,OAAOP,MAAM;AACtB,YAAI,CAACO,IAAIC,MAAO;AAChB,cAAMnB,cAAaJ,cAAcsB,IAAIC,OAAOrB,GAAG,MAAM,OAAOoB,IAAIC,QAAQvB,cAAcsB,IAAIC,MAAMI,GAAGC,YAAY1B,GAAG,IAAIO;AACtH,YAAIL,YAAY,QAAOA;MACzB;AAGA,iBAAWkB,OAAOP,MAAM;AACtB,cAAMc,YAAYP,IAAIC,SAAUD,IAAIC,MAAczB,IAAI;AACtD,YAAI,CAAC+B,UAAW;AAChB,cAAMC,QAAQD,UAAUE,MAAM;AAC9B,eAAOD,MAAMhB,QAAQ;AACnB,gBAAMQ,OAAMQ,MAAME,MAAM;AACxB,gBAAM5B,cAAaJ,cAAcsB,KAAIC,OAAOrB,GAAG;AAC/C,cAAIE,YAAY,QAAOA;AACvB,gBAAMyB,aAAYP,KAAIC,SAAUD,KAAIC,MAAczB,IAAI;AACtD,cAAI+B,WAAWC,OAAMG,KAAK,GAAGJ,UAAS;QACxC;MACF;AAEA,aAAOpB;IACT;EACF,CAAC;AACH;",
|
||||
"names": ["Refs", "Symbol", "getDescriptor", "obj", "key", "currentObj", "descriptor", "Reflect", "getOwnPropertyDescriptor", "Object", "getPrototypeOf", "undefined", "forwardRefs", "target", "_len", "arguments", "length", "refs", "Array", "_key", "Proxy", "get", "has", "startsWith", "ref", "value", "val", "bind", "set", "_", "setupState", "childRefs", "queue", "slice", "shift", "push"]
|
||||
}
|
||||
+206
@@ -0,0 +1,206 @@
|
||||
import {
|
||||
VDialogTransition
|
||||
} from "./chunk-B4JFJDWM.js";
|
||||
import {
|
||||
VDefaultsProvider
|
||||
} from "./chunk-VH7QIDM4.js";
|
||||
import {
|
||||
VMenuSymbol,
|
||||
VOverlay,
|
||||
makeVOverlayProps
|
||||
} from "./chunk-TS6Y6OVT.js";
|
||||
import {
|
||||
useScopeId
|
||||
} from "./chunk-BVUPSGRF.js";
|
||||
import {
|
||||
forwardRefs
|
||||
} from "./chunk-GUNW7S2L.js";
|
||||
import {
|
||||
useRtl
|
||||
} from "./chunk-ENTLCOCZ.js";
|
||||
import {
|
||||
useProxiedModel
|
||||
} from "./chunk-KA77II4V.js";
|
||||
import {
|
||||
focusChild,
|
||||
focusableChildren,
|
||||
genericComponent,
|
||||
getNextElement,
|
||||
isClickInsideElement,
|
||||
omit,
|
||||
propsFactory,
|
||||
useRender
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
computed,
|
||||
createVNode,
|
||||
inject,
|
||||
mergeProps,
|
||||
onBeforeUnmount,
|
||||
onDeactivated,
|
||||
provide,
|
||||
ref,
|
||||
shallowRef,
|
||||
toRef,
|
||||
useId,
|
||||
watch
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/VMenu/VMenu.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VMenu/VMenu.css";
|
||||
var makeVMenuProps = propsFactory({
|
||||
// TODO
|
||||
// disableKeys: Boolean,
|
||||
id: String,
|
||||
submenu: Boolean,
|
||||
...omit(makeVOverlayProps({
|
||||
captureFocus: true,
|
||||
closeDelay: 250,
|
||||
closeOnContentClick: true,
|
||||
locationStrategy: "connected",
|
||||
location: void 0,
|
||||
openDelay: 300,
|
||||
scrim: false,
|
||||
scrollStrategy: "reposition",
|
||||
transition: {
|
||||
component: VDialogTransition
|
||||
}
|
||||
}), ["absolute"])
|
||||
}, "VMenu");
|
||||
var VMenu = genericComponent()({
|
||||
name: "VMenu",
|
||||
props: makeVMenuProps(),
|
||||
emits: {
|
||||
"update:modelValue": (value) => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
const isActive = useProxiedModel(props, "modelValue");
|
||||
const {
|
||||
scopeId
|
||||
} = useScopeId();
|
||||
const {
|
||||
isRtl
|
||||
} = useRtl();
|
||||
const uid = useId();
|
||||
const id = toRef(() => props.id || `v-menu-${uid}`);
|
||||
const overlay = ref();
|
||||
const parent = inject(VMenuSymbol, null);
|
||||
const openChildren = shallowRef(/* @__PURE__ */ new Set());
|
||||
provide(VMenuSymbol, {
|
||||
register() {
|
||||
openChildren.value.add(uid);
|
||||
},
|
||||
unregister() {
|
||||
openChildren.value.delete(uid);
|
||||
},
|
||||
closeParents(e) {
|
||||
setTimeout(() => {
|
||||
if (!openChildren.value.size && !props.persistent && (e == null || overlay.value?.contentEl && !isClickInsideElement(e, overlay.value.contentEl))) {
|
||||
isActive.value = false;
|
||||
parent?.closeParents();
|
||||
}
|
||||
}, 40);
|
||||
}
|
||||
});
|
||||
onBeforeUnmount(() => parent?.unregister());
|
||||
onDeactivated(() => isActive.value = false);
|
||||
watch(isActive, (val) => {
|
||||
val ? parent?.register() : parent?.unregister();
|
||||
}, {
|
||||
immediate: true
|
||||
});
|
||||
function onClickOutside(e) {
|
||||
parent?.closeParents(e);
|
||||
}
|
||||
function onKeydown(e) {
|
||||
if (props.disabled) return;
|
||||
if (e.key === "Tab" || e.key === "Enter" && !props.closeOnContentClick) {
|
||||
if (e.key === "Enter" && (e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLInputElement && !!e.target.closest("form"))) return;
|
||||
if (e.key === "Enter") e.preventDefault();
|
||||
const nextElement = getNextElement(focusableChildren(overlay.value?.contentEl, false), e.shiftKey ? "prev" : "next", (el) => el.tabIndex >= 0);
|
||||
if (!nextElement && !props.retainFocus) {
|
||||
isActive.value = false;
|
||||
overlay.value?.activatorEl?.focus();
|
||||
}
|
||||
} else if (props.submenu && e.key === (isRtl.value ? "ArrowRight" : "ArrowLeft")) {
|
||||
isActive.value = false;
|
||||
overlay.value?.activatorEl?.focus();
|
||||
}
|
||||
}
|
||||
function onActivatorKeydown(e) {
|
||||
if (props.disabled) return;
|
||||
const el = overlay.value?.contentEl;
|
||||
if (el && isActive.value) {
|
||||
if (e.key === "ArrowDown") {
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
focusChild(el, "next");
|
||||
} else if (e.key === "ArrowUp") {
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
focusChild(el, "prev");
|
||||
} else if (props.submenu) {
|
||||
if (e.key === (isRtl.value ? "ArrowRight" : "ArrowLeft")) {
|
||||
isActive.value = false;
|
||||
} else if (e.key === (isRtl.value ? "ArrowLeft" : "ArrowRight")) {
|
||||
e.preventDefault();
|
||||
focusChild(el, "first");
|
||||
}
|
||||
}
|
||||
} else if (props.submenu ? e.key === (isRtl.value ? "ArrowLeft" : "ArrowRight") : ["ArrowDown", "ArrowUp"].includes(e.key)) {
|
||||
isActive.value = true;
|
||||
e.preventDefault();
|
||||
setTimeout(() => setTimeout(() => onActivatorKeydown(e)));
|
||||
}
|
||||
}
|
||||
const activatorProps = computed(() => mergeProps({
|
||||
"aria-haspopup": "menu",
|
||||
"aria-expanded": String(isActive.value),
|
||||
"aria-controls": id.value,
|
||||
"aria-owns": id.value,
|
||||
onKeydown: onActivatorKeydown
|
||||
}, props.activatorProps));
|
||||
useRender(() => {
|
||||
const overlayProps = VOverlay.filterProps(props);
|
||||
return createVNode(VOverlay, mergeProps({
|
||||
"ref": overlay,
|
||||
"id": id.value,
|
||||
"class": ["v-menu", props.class],
|
||||
"style": props.style
|
||||
}, overlayProps, {
|
||||
"modelValue": isActive.value,
|
||||
"onUpdate:modelValue": ($event) => isActive.value = $event,
|
||||
"absolute": true,
|
||||
"activatorProps": activatorProps.value,
|
||||
"location": props.location ?? (props.submenu ? "end" : "bottom"),
|
||||
"onClick:outside": onClickOutside,
|
||||
"onKeydown": onKeydown
|
||||
}, scopeId), {
|
||||
activator: slots.activator,
|
||||
default: function() {
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
return createVNode(VDefaultsProvider, {
|
||||
"root": "VMenu"
|
||||
}, {
|
||||
default: () => [slots.default?.(...args)]
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
return forwardRefs({
|
||||
id,
|
||||
ΨopenChildren: openChildren
|
||||
}, overlay);
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
makeVMenuProps,
|
||||
VMenu
|
||||
};
|
||||
//# sourceMappingURL=chunk-HGIC64KW.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VMenu/VMenu.tsx"],
|
||||
"sourcesContent": ["// Styles\nimport './VMenu.sass'\n\n// Components\nimport { VDialogTransition } from '@/components/transitions'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { VOverlay } from '@/components/VOverlay'\nimport { makeVOverlayProps } from '@/components/VOverlay/VOverlay'\n\n// Composables\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useRtl } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { useScopeId } from '@/composables/scopeId'\n\n// Utilities\nimport {\n computed,\n inject,\n mergeProps,\n onBeforeUnmount,\n onDeactivated,\n provide,\n ref,\n shallowRef, toRef,\n useId,\n watch,\n} from 'vue'\nimport { VMenuSymbol } from './shared'\nimport {\n focusableChildren,\n focusChild,\n genericComponent,\n getNextElement,\n isClickInsideElement,\n omit,\n propsFactory,\n useRender,\n} from '@/util'\n\n// Types\nimport type { OverlaySlots } from '@/components/VOverlay/VOverlay'\n\nexport const makeVMenuProps = propsFactory({\n // TODO\n // disableKeys: Boolean,\n id: String,\n submenu: Boolean,\n\n ...omit(makeVOverlayProps({\n captureFocus: true,\n closeDelay: 250,\n closeOnContentClick: true,\n locationStrategy: 'connected' as const,\n location: undefined,\n openDelay: 300,\n scrim: false,\n scrollStrategy: 'reposition' as const,\n transition: { component: VDialogTransition },\n }), ['absolute']),\n}, 'VMenu')\n\nexport const VMenu = genericComponent<OverlaySlots>()({\n name: 'VMenu',\n\n props: makeVMenuProps(),\n\n emits: {\n 'update:modelValue': (value: boolean) => true,\n },\n\n setup (props, { slots }) {\n const isActive = useProxiedModel(props, 'modelValue')\n const { scopeId } = useScopeId()\n const { isRtl } = useRtl()\n\n const uid = useId()\n const id = toRef(() => props.id || `v-menu-${uid}`)\n\n const overlay = ref<VOverlay>()\n\n const parent = inject(VMenuSymbol, null)\n const openChildren = shallowRef(new Set<string>())\n provide(VMenuSymbol, {\n register () {\n openChildren.value.add(uid)\n },\n unregister () {\n openChildren.value.delete(uid)\n },\n closeParents (e) {\n setTimeout(() => {\n if (!openChildren.value.size &&\n !props.persistent &&\n (e == null || (overlay.value?.contentEl && !isClickInsideElement(e, overlay.value.contentEl)))\n ) {\n isActive.value = false\n parent?.closeParents()\n }\n }, 40)\n },\n })\n\n onBeforeUnmount(() => parent?.unregister())\n onDeactivated(() => isActive.value = false)\n\n watch(isActive, val => {\n val\n ? parent?.register()\n : parent?.unregister()\n }, { immediate: true })\n\n function onClickOutside (e: MouseEvent) {\n parent?.closeParents(e)\n }\n\n function onKeydown (e: KeyboardEvent) {\n if (props.disabled) return\n\n if (e.key === 'Tab' || (e.key === 'Enter' && !props.closeOnContentClick)) {\n if (\n e.key === 'Enter' &&\n ((e.target instanceof HTMLTextAreaElement) ||\n (e.target instanceof HTMLInputElement && !!e.target.closest('form')))\n ) return\n if (e.key === 'Enter') e.preventDefault()\n\n const nextElement = getNextElement(\n focusableChildren(overlay.value?.contentEl as Element, false),\n e.shiftKey ? 'prev' : 'next',\n (el: HTMLElement) => el.tabIndex >= 0\n )\n if (!nextElement && !props.retainFocus) {\n isActive.value = false\n overlay.value?.activatorEl?.focus()\n }\n } else if (props.submenu && e.key === (isRtl.value ? 'ArrowRight' : 'ArrowLeft')) {\n isActive.value = false\n overlay.value?.activatorEl?.focus()\n }\n }\n\n function onActivatorKeydown (e: KeyboardEvent) {\n if (props.disabled) return\n\n const el = overlay.value?.contentEl\n if (el && isActive.value) {\n if (e.key === 'ArrowDown') {\n e.preventDefault()\n e.stopImmediatePropagation()\n focusChild(el, 'next')\n } else if (e.key === 'ArrowUp') {\n e.preventDefault()\n e.stopImmediatePropagation()\n focusChild(el, 'prev')\n } else if (props.submenu) {\n if (e.key === (isRtl.value ? 'ArrowRight' : 'ArrowLeft')) {\n isActive.value = false\n } else if (e.key === (isRtl.value ? 'ArrowLeft' : 'ArrowRight')) {\n e.preventDefault()\n focusChild(el, 'first')\n }\n }\n } else if (\n props.submenu\n ? e.key === (isRtl.value ? 'ArrowLeft' : 'ArrowRight')\n : ['ArrowDown', 'ArrowUp'].includes(e.key)\n ) {\n isActive.value = true\n e.preventDefault()\n setTimeout(() => setTimeout(() => onActivatorKeydown(e)))\n }\n }\n\n constLine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAA;AA0CO,IAAMA,iBAAiBC,aAAa;;;EAGzCC,IAAIC;EACJC,SAASC;EAET,GAAGC,KAAKC,kBAAkB;IACxBC,cAAc;IACdC,YAAY;IACZC,qBAAqB;IACrBC,kBAAkB;IAClBC,UAAUC;IACVC,WAAW;IACXC,OAAO;IACPC,gBAAgB;IAChBC,YAAY;MAAEC,WAAWC;IAAkB;EAC7C,CAAC,GAAG,CAAC,UAAU,CAAC;AAClB,GAAG,OAAO;AAEH,IAAMC,QAAQC,iBAA+B,EAAE;EACpDC,MAAM;EAENC,OAAOvB,eAAe;EAEtBwB,OAAO;IACL,qBAAsBC,WAAmB;EAC3C;EAEAC,MAAOH,OAAKI,MAAa;AAAA,QAAX;MAAEC;IAAM,IAACD;AACrB,UAAME,WAAWC,gBAAgBP,OAAO,YAAY;AACpD,UAAM;MAAEQ;IAAQ,IAAIC,WAAW;AAC/B,UAAM;MAAEC;IAAM,IAAIC,OAAO;AAEzB,UAAMC,MAAMC,MAAM;AAClB,UAAMlC,KAAKmC,MAAM,MAAMd,MAAMrB,MAAM,UAAUiC,GA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GAAGuB;MAChBuC,WAAWiB;IACb,GAAG1D,MAAM8D,cAAc,CACzB;AAEAG,cAAU,MAAM;AACd,YAAMC,eAAeC,SAASC,YAAYpE,KAAK;AAE/C,aAAAqE,YAAAF,UAAAG,WAAA;QAAA,OAEUvD;QAAO,MACRpC,GAAGuB;QAAK,SACN,CACL,UACAF,MAAMuE,KAAK;QACZ,SACOvE,MAAMwE;MAAK,GACdN,cAAY;QAAA,cACP5D,SAASJ;QAAK,uBAAAuE,YAAdnE,SAASJ,QAAKuE;QAAA,YAAA;QAAA,kBAEPX,eAAe5D;QAAK,YAC1BF,MAAMX,aAAaW,MAAMnB,UAAU,QAAQ;QAAS,mBAC7C2D;QAAc,aACpBC;MAAS,GAChBjC,OAAO,GAAA;QAGVkE,WAAWrE,MAAMqE;QACjBC,SAAS,WAAA;AAAA,mBAAAC,OAAAC,UAAAC,QAAIC,OAAI,IAAAC,MAAAJ,IAAA,GAAAK,OAAA,GAAAA,OAAAL,MAAAK,QAAA;AAAJF,iBAAIE,IAAA,IAAAJ,UAAAI,IAAA;UAAA;AAAA,iBAAAZ,YAAAa,mBAAA;YAAA,QAAA;UAAA,GAAA;YAAAP,SAAAA,MAAA,CAEXtE,MAAMsE,UAAU,GAAGI,IAAI,CAAC;UAAA,CAAA;QAAA;MAE7B,CAAA;IAIT,CAAC;AAED,WAAOI,YAAY;MAAExG;MAAIyG,eAAehE;IAAa,GAAGL,OAAO;EACjE;AACF,CAAC;",
|
||||
"names": ["makeVMenuProps", "propsFactory", "id", "String", "submenu", "Boolean", "omit", "makeVOverlayProps", "captureFocus", "closeDelay", "closeOnContentClick", "locationStrategy", "location", "undefined", "openDelay", "scrim", "scrollStrategy", "transition", "component", "VDialogTransition", "VMenu", "genericComponent", "name", "props", "emits", "value", "setup", "_ref", "slots", "isActive", "useProxiedModel", "scopeId", "useScopeId", "isRtl", "useRtl", "uid", "useId", "toRef", "overlay", "ref", "parent", "inject", "VMenuSymbol", "openChildren", "shallowRef", "Set", "provide", "register", "add", "unregister", "delete", "closeParents", "e", "setTimeout", "size", "persistent", "contentEl", "isClickInsideElement", "onBeforeUnmount", "onDeactivated", "watch", "val", "immediate", "onClickOutside", "onKeydown", "disabled", "key", "target", "HTMLTextAreaElement", "HTMLInputElement", "closest", "preventDefault", "nextElement", "getNextElement", "focusableChildren", "shiftKey", "el", "tabIndex", "retainFocus", "activatorEl", "focus", "onActivatorKeydown", "stopImmediatePropagation", "focusChild", "includes", "activatorProps", "computed", "mergeProps", "useRender", "overlayProps", "VOverlay", "filterProps", "_createVNode", "_mergeProps", "class", "style", "$event", "activator", "default", "_len", "arguments", "length", "args", "Array", "_key", "VDefaultsProvider", "forwardRefs", "ΨopenChildren"]
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
import {
|
||||
getCurrentInstanceName,
|
||||
propsFactory
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
toRef
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/composables/position.js
|
||||
var positionValues = ["static", "relative", "fixed", "absolute", "sticky"];
|
||||
var makePositionProps = propsFactory({
|
||||
position: {
|
||||
type: String,
|
||||
validator: (
|
||||
/* istanbul ignore next */
|
||||
(v) => positionValues.includes(v)
|
||||
)
|
||||
}
|
||||
}, "position");
|
||||
function usePosition(props) {
|
||||
let name = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : getCurrentInstanceName();
|
||||
const positionClasses = toRef(() => {
|
||||
return props.position ? `${name}--${props.position}` : void 0;
|
||||
});
|
||||
return {
|
||||
positionClasses
|
||||
};
|
||||
}
|
||||
|
||||
export {
|
||||
makePositionProps,
|
||||
usePosition
|
||||
};
|
||||
//# sourceMappingURL=chunk-HOEZWRBG.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/composables/position.ts"],
|
||||
"sourcesContent": ["// Utilities\nimport { toRef } from 'vue'\nimport { getCurrentInstanceName, propsFactory } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\nconst positionValues = ['static', 'relative', 'fixed', 'absolute', 'sticky'] as const\n\ntype Position = typeof positionValues[number]\n\nexport interface PositionProps {\n position: Position | undefined\n}\n\n// Composables\nexport const makePositionProps = propsFactory({\n position: {\n type: String as PropType<Position>,\n validator: /* istanbul ignore next */ (v: any) => positionValues.includes(v),\n },\n}, 'position')\n\nexport function usePosition (\n props: PositionProps,\n name = getCurrentInstanceName(),\n) {\n const positionClasses = toRef(() => {\n return props.position ? `${name}--${props.position}` : undefined\n })\n\n return { positionClasses }\n}\n"],
|
||||
"mappings": ";;;;;;;;;AAOA,IAAMA,iBAAiB,CAAC,UAAU,YAAY,SAAS,YAAY,QAAQ;AASpE,IAAMC,oBAAoBC,aAAa;EAC5CC,UAAU;IACRC,MAAMC;IACNC;;MAAuCC,OAAWP,eAAeQ,SAASD,CAAC;;EAC7E;AACF,GAAG,UAAU;AAEN,SAASE,YACdC,OAEA;AAAA,MADAC,OAAIC,UAAAC,SAAA,KAAAD,UAAA,CAAA,MAAAE,SAAAF,UAAA,CAAA,IAAGG,uBAAuB;AAE9B,QAAMC,kBAAkBC,MAAM,MAAM;AAClC,WAAOP,MAAMP,WAAW,GAAGQ,IAAI,KAAKD,MAAMP,QAAQ,KAAKW;EACzD,CAAC;AAED,SAAO;IAAEE;EAAgB;AAC3B;",
|
||||
"names": ["positionValues", "makePositionProps", "propsFactory", "position", "type", "String", "validator", "v", "includes", "usePosition", "props", "name", "arguments", "length", "undefined", "getCurrentInstanceName", "positionClasses", "toRef"]
|
||||
}
|
||||
+1896
File diff suppressed because it is too large.
Load diff
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VList/VList.tsx", "../../vuetify/src/components/VList/list.ts", "../../vuetify/src/composables/nested/activeStrategies.ts", "../../vuetify/src/composables/nested/openStrategies.ts", "../../vuetify/src/composables/nested/selectStrategies.ts", "../../vuetify/src/composables/nested/nested.ts", "../../vuetify/src/components/VList/VListGroup.tsx", "../../vuetify/src/components/VList/VListItem.tsx", "../../vuetify/src/components/VList/VListItemSubtitle.tsx", "../../vuetify/src/components/VList/VListItemTitle.ts", "../../vuetify/src/components/VList/VListSubheader.tsx", "../../vuetify/src/components/VList/VListChildren.tsx", "../../vuetify/src/composables/list-items.ts", "../../vuetify/src/components/VList/VListImg.ts", "../../vuetify/src/components/VList/VListItemAction.tsx", "../../vuetify/src/components/VList/VListItemMedia.tsx"],
|
||||
"sourcesContent": ["// Styles\nimport './VList.sass'\n\n// Components\nimport { VListChildren } from './VListChildren'\n\n// Composables\nimport { createList } from './list'\nimport { makeBorderProps, useBorder } from '@/composables/border'\nimport { useBackgroundColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { makeElevationProps, useElevation } from '@/composables/elevation'\nimport { IconValue } from '@/composables/icons'\nimport { makeItemsProps } from '@/composables/list-items'\nimport { makeNestedProps, useNested } from '@/composables/nested/nested'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { makeVariantProps } from '@/composables/variant'\n\n// Utilities\nimport { computed, ref, shallowRef, toRef } from 'vue'\nimport {\n convertToUnit,\n EventProp,\n focusChild,\n genericComponent,\n getPropertyFromItem,\n isPrimitive,\n omit,\n propsFactory,\n useRender,\n} from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VListChildrenSlots } from './VListChildren'\nimport type { ItemProps, ListItem } from '@/composables/list-items'\nimport type { GenericProps, SelectItemKey } from '@/util'\n\nexport interface InternalListItem<T = any> extends ListItem<T> {}\n\nconst itemTypes = new Set(['item', 'divider', 'subheader'])\n\nfunction transformItem (props: ItemProps, item: any): ListItem {\n const title = isPrimitive(item) ? item : getPropertyFromItem(item, props.itemTitle)\n const value = isPrimitive(item) ? item : getPropertyFromItem(item, props.itemValue, undefined)\n const children = getPropertyFromItem(item, props.itemChildren)\n const itemProps = props.itemProps === true\n ? omit(item, ['children'])\n : getPropertyFromItem(item, props.itemProps)\n\n let type = getPropertyFromItem(item, props.itemType, 'item')\n if (!itemTypes.has(type)) {\n type = 'item'\n }\n\n const _props = {\n title,\n value,\n ...itemProps,\n }\n\n return {\n type,\n title: _props.title,\n value: _props.value,\n props: _props,\n children: type === 'item' && children ? transformItems(props, children) : undefined,\n raw: item,\n }\n}\n\nfunction transformItems (props: ItemProps, items: (string | object)[]) {\n const array: InternalListItem[] = []\n\n for (const item of items) {\n array.push(transformItem(props, item))\n }\n\n return array\n}\n\nexport function useListItems (props: ItemProps) {\n const items = computed(() => transformItems(props, props.items))\n\n return { items }\n}\n\nexport const makeVListProps = propsFactory({\n baseColor: String,\n /* @deprecated */\n activeColor: String,\n activeClass: String,\n bgColor: String,\n disabled: Boolean,\n filterable: Boolean,\n expandIcon: IconValue,\n collapseIcon: IconValue,\n lines: {\n type: [Boolean, String] as PropType<'one' | 'two' | 'three' | false>,\n default: 'one',\n },\n slim: Boolean,\n prependGap: [Number, String],\n indent: [Number, String],\n nav: Boolean,\n\n 'onClick:open': EventProp<[{ id: unknown, value: boolean, path: unknown[] }]>(),\n 'onClick:select': EventProp<[{ id: unknown, value: boolean, path: unknown[] }]>(),\n 'onUpdate:opened': EventProp<[unknown]>(),\n ...makeNestedProps({\n selectStrategy: 'single-leaf' as const,\n openStrategy: 'list' as const,\n }),\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeDimensionProps(),\n ...makeElevationProps(),\n ...makeItemsProps(),\n ...makeRoundedProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeVariantProps({ variant: 'text' } as const),\n}, 'VList')\n\ntype ItemType<T> = T extends readonly (infer U)[] ? U : never\n\nexport const VList = genericComponent<new <S, A, O, T extends readonly any[]>(\n props: {\n items?: T\n itemTitle?: SelectItemKey<ItemType<T>>\n itemValue?: SelectItemKey<ItemType<T>>\n itemChildren?: SelectItemKey<ItemType<T>>\n itemProps?: SelectItemKey<ItemType<T>>\n selected?: S\n activated?: A\n opened?: O\n 'onUpdate:selected'?: (value: S) => void\n 'onUpdate:activated'?: (value: A) => void\n 'onUpdate:opened'?: (value: O) => void\n 'onClick:open'?: (value: { id: unknown, value: boolean, path: unknown[] }) => void\n 'onClick:select'?: (value: { id: unknown, value: boolean, path: unknown[] }) => void\n },\n slots: VListChildrenSlots<ItemType<T>>\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VList',\n\n props: makeVListProps(),\n\n emits: {\n 'update:selected': (value: unknown) => true,\n 'update:activated': (value: unknown) => true,\n 'update:opeLine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAA;;;ACmBO,IAAMA,UAIRC,uBAAOC,IAAI,cAAc;AAMvB,SAASC,aAAyE;AAAA,MAA7D;IAAEC;EAAgC,IAACC,UAAAC,SAAA,KAAAD,UAAA,CAAA,MAAAE,SAAAF,UAAA,CAAA,IAAG;IAAED,YAAY;EAAM;AACpF,QAAMI,SAASC,OAAOT,SAAS;IAC7BI,YAAY;IACZM,YAAYC,WAAW,KAAK;IAC5BC,kBAAkBA,MAAM;EAC1B,CAAC;AAED,QAAMC,OAAO;IACXT,YAAYI,OAAOJ,cAAcA;IACjCM,YAAYC,WAAW,KAAK;IAC5BC,kBAAmBE,WAAmB;AACpC,UAAIA,MAAOD,MAAKH,WAAWI,QAAQA;IACrC;EACF;AAEAC,UAAQf,SAASa,IAAI;AAErB,SAAOL;AACT;AAEO,SAASQ,UAAW;AACzB,SAAOP,OAAOT,SAAS,IAAI;AAC7B;;;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ASC,aAAa;AACtC,UAAIH,GAAGH,QAAQ;AACb,eAAOW,eAAeT,GAAGC,EAAEc,MAAM,GAAG,CAAC,GAAGb,UAAUC,SAASC,QAAQ;MACrE;AAEA,aAAO,oBAAIE,IAAI;IACjB;IACAC,KAAKA,CAACN,GAAGC,UAAUC,YAAYLine truncated
|
||||
"names": ["ListKey", "Symbol", "for", "createList", "filterable", "arguments", "length", "undefined", "parent", "inject", "hasPrepend", "shallowRef", "updateHasPrepend", "data", "value", "provide", "useList", "independentActiveStrategy", "mandatory", "strategy", "activate", "_ref", "id", "value", "activated", "toRaw", "size", "has", "add", "delete", "in", "v", "children", "parents", "set", "Set", "wrapInArray", "out", "Array", "from", "independentSingleActiveStrategy", "parentStrategy", "_ref2", "rest", "singleSelected", "arr", "length", "slice", "leafActiveStrategy", "_ref3", "leafSingleActiveStrategy", "_ref4", "singleOpenStrategy", "open", "_ref", "id", "value", "opened", "parents", "newOpened", "Set", "add", "parent", "get", "delete", "select", "multipleOpenStrategy", "_ref2", "listOpenStrategy", "_ref3", "path", "push", "independentSelectStrategy", "mandatory", "strategy", "select", "_ref", "id", "value", "selected", "toRaw", "on", "Array", "from", "entries", "reduce", "arr", "_ref2", "key", "push", "length", "set", "in", "v", "children", "parents", "disabled", "map", "Map", "out", "independentSingleSelectStrategy", "parentStrategy", "_ref3", "rest", "singleSelected", "has", "get", "slice", "leafSelectStrategy", "_ref4", "leafSingleSelectStrategy", "_ref5", "classicSelectStrategy", "_ref6", "original", "items", "item", "shift", "parent", "everySelected", "noneSelected", "child", "cid", "_ref7", "Set", "trunkSelectStrategy", "VNestedSymbol", "Symbol", "for", "emptyNested", "id", "shallowRef", "root", "itemsRegistration", "ref", "register", "unregister", "updateDisabled", "children", "Map", "parents", "disabled", "Set", "open", "openOnSelect", "activate", "select", "activatable", "selectable", "opened", "activated", "selected", "selectedValues", "getPath", "makeNestedProps", "propsFactory", "Boolean", "activeStrategy", "String", "Function", "Object", "selectStrategy", "openStrategy", "mandatory", "type", "default", "useNested", "props", "items", "returnObject", "isUnmounted", "useProxiedModel", "v", "Array", "isArray", "map", "i", "toRaw", "values", "computed", "leafActiveStrategy", "leafSingleActiveStrategy", "independentActiveStrategy", "independentSingleActiveStrategy", "leafSingleSelectStrategy", "leafSelectStrategy", "independentSelectStrategy", "independentSingleSelectStrategy", "trunkSelectStrategy", "classicSelectStrategy", "listOpenStrategy", "singleOpenStrategy", "multipleOpenStrategy", "value", "in", "out", "onBeforeUnmount", "path", "parent", "undefined", "unshift", "get", "vm", "getCurrentInstance", "nodeIds", "itemsUpdatePropagation", "throttle", "nextTick", "watch", "toValue", "updateInternalMaps", "immediate", "_parents", "_children", "_disabled", "getValue", "item", "raw", "stack", "length", "itemValue", "childValues", "child", "childValue", "set", "push", "add", "nested", "toRef", "arr", "key", "entries", "parentId", "isDisabled", "isGroup", "has", "join", "newPath", "concat", "consoleError", "delete", "list", "filter", "event", "emit", "newOpened", "newSelected", "newActivated", "size", "provide", "useNestedItem", "inject", "uidSymbol", "computedId", "idValue", "e", "isOpen", "isActivated", "isSelected", "isIndeterminate", "isLeaf", "isGroupActivator", "onBeforeMount", "val", "oldVal", "useNestedGroupActivator", "VListGroupActivator", "defineComponent", "name", "setup", "_", "_ref", "slots", "useNestedGroupActivator", "default", "makeVListGroupProps", "propsFactory", "activeColor", "String", "baseColor", "color", "collapseIcon", "type", "IconValue", "disabled", "Boolean", "expandIcon", "rawId", "Number", "prependIcon", "appendIcon", "fluid", "subgroup", "title", "value", "makeComponentProps", "makeTagProps", "VListGroup", "genericComponent", "props", "_ref2", "isOpen", "open", "id", "_id", "useNestedItem", "computed", "list", "useList", "isBooted", "useSsrBoot", "parent", "inject", "VNestedSymbol", "renderWhenClosed", "toRef", "root", "itemsRegistration", "onClick", "e", "includes", "target", "tagName", "activatorProps", "class", "toggleIcon", "activatorDefaults", "VListItem", "useRender", "_createVNode", "tag", "_normalizeClass", "hasPrepend", "_normalizeStyle", "style", "activator", "VDefaultsProvider", "MaybeTransition", "component", "VExpandTransition", "_withDirectives", "_createElementVNode", "_vShow", "makeVListItemSubtitleProps", "propsFactory", "opacity", "Number", "String", "makeComponentProps", "makeTagProps", "VListItemSubtitle", "genericComponent", "name", "props", "setup", "_ref", "slots", "useRender", "_createVNode", "tag", "_normalizeClass", "class", "_normalizeStyle", "style", "VListItemTitle", "createSimpleFunctional", "makeVListItemProps", "propsFactory", "active", "type", "Boolean", "default", "undefined", "activeClass", "String", "activeColor", "appendAvatar", "appendIcon", "IconValue", "baseColor", "disabled", "lines", "link", "nav", "prependAvatar", "prependIcon", "ripple", "Object", "slim", "prependGap", "Number", "subtitle", "title", "value", "onClick", "EveLine truncated
|
||||
}
|
||||
+353
@@ -0,0 +1,353 @@
|
||||
import {
|
||||
makeAutocompleteProps,
|
||||
useAutocomplete,
|
||||
useAutofocus
|
||||
} from "./chunk-IZQZFEAL.js";
|
||||
import {
|
||||
VCounter,
|
||||
VField,
|
||||
makeVFieldProps
|
||||
} from "./chunk-J7Q2NMV7.js";
|
||||
import {
|
||||
VInput,
|
||||
makeVInputProps,
|
||||
useFocus
|
||||
} from "./chunk-4VABFUPG.js";
|
||||
import {
|
||||
forwardRefs
|
||||
} from "./chunk-GUNW7S2L.js";
|
||||
import {
|
||||
intersect_default
|
||||
} from "./chunk-5ONGSJQ2.js";
|
||||
import {
|
||||
useDisplay
|
||||
} from "./chunk-N4LJHDYD.js";
|
||||
import {
|
||||
useProxiedModel
|
||||
} from "./chunk-KA77II4V.js";
|
||||
import {
|
||||
callEvent,
|
||||
clamp,
|
||||
convertToUnit,
|
||||
filterInputAttrs,
|
||||
genericComponent,
|
||||
propsFactory,
|
||||
useRender
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
Fragment,
|
||||
computed,
|
||||
createBaseVNode,
|
||||
createVNode,
|
||||
mergeProps,
|
||||
nextTick,
|
||||
normalizeClass,
|
||||
onBeforeUnmount,
|
||||
onMounted,
|
||||
ref,
|
||||
shallowRef,
|
||||
vModelText,
|
||||
watch,
|
||||
watchEffect,
|
||||
withDirectives
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/VTextarea/VTextarea.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VTextarea/VTextarea.css";
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VTextField/VTextField.css";
|
||||
var makeVTextareaProps = propsFactory({
|
||||
autoGrow: Boolean,
|
||||
autofocus: Boolean,
|
||||
counter: [Boolean, Number, String],
|
||||
counterValue: Function,
|
||||
prefix: String,
|
||||
placeholder: String,
|
||||
persistentPlaceholder: Boolean,
|
||||
persistentCounter: Boolean,
|
||||
noResize: Boolean,
|
||||
rows: {
|
||||
type: [Number, String],
|
||||
default: 5,
|
||||
validator: (v) => !isNaN(parseFloat(v))
|
||||
},
|
||||
maxHeight: {
|
||||
type: [Number, String],
|
||||
validator: (v) => !isNaN(parseFloat(v))
|
||||
},
|
||||
maxRows: {
|
||||
type: [Number, String],
|
||||
validator: (v) => !isNaN(parseFloat(v))
|
||||
},
|
||||
suffix: String,
|
||||
modelModifiers: Object,
|
||||
...makeAutocompleteProps(),
|
||||
...makeVInputProps(),
|
||||
...makeVFieldProps()
|
||||
}, "VTextarea");
|
||||
var VTextarea = genericComponent()({
|
||||
name: "VTextarea",
|
||||
directives: {
|
||||
vIntersect: intersect_default
|
||||
},
|
||||
inheritAttrs: false,
|
||||
props: makeVTextareaProps(),
|
||||
emits: {
|
||||
"click:control": (e) => true,
|
||||
"mousedown:control": (e) => true,
|
||||
"update:focused": (focused) => true,
|
||||
"update:modelValue": (val) => true,
|
||||
"update:rows": (rows) => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
attrs,
|
||||
emit,
|
||||
slots
|
||||
} = _ref;
|
||||
const model = useProxiedModel(props, "modelValue");
|
||||
const {
|
||||
isFocused,
|
||||
focus,
|
||||
blur
|
||||
} = useFocus(props);
|
||||
const {
|
||||
onIntersect
|
||||
} = useAutofocus(props);
|
||||
const counterValue = computed(() => {
|
||||
return typeof props.counterValue === "function" ? props.counterValue(model.value) : (model.value || "").toString().length;
|
||||
});
|
||||
const max = computed(() => {
|
||||
if (attrs.maxlength) return attrs.maxlength;
|
||||
if (!props.counter || typeof props.counter !== "number" && typeof props.counter !== "string") return void 0;
|
||||
return props.counter;
|
||||
});
|
||||
const vInputRef = ref();
|
||||
const vFieldRef = ref();
|
||||
const controlHeight = shallowRef("");
|
||||
const textareaRef = ref();
|
||||
const scrollbarWidth = ref(0);
|
||||
const {
|
||||
platform
|
||||
} = useDisplay();
|
||||
const autocomplete = useAutocomplete(props);
|
||||
const isActive = computed(() => props.persistentPlaceholder || isFocused.value || props.active);
|
||||
function onFocus() {
|
||||
if (autocomplete.isSuppressing.value) {
|
||||
autocomplete.update();
|
||||
}
|
||||
if (textareaRef.value !== document.activeElement) {
|
||||
textareaRef.value?.focus();
|
||||
}
|
||||
if (!isFocused.value) focus();
|
||||
}
|
||||
function onControlClick(e) {
|
||||
onFocus();
|
||||
emit("click:control", e);
|
||||
}
|
||||
function onControlMousedown(e) {
|
||||
emit("mousedown:control", e);
|
||||
}
|
||||
function onClear(e) {
|
||||
e.stopPropagation();
|
||||
onFocus();
|
||||
nextTick(() => {
|
||||
model.value = "";
|
||||
callEvent(props["onClick:clear"], e);
|
||||
});
|
||||
}
|
||||
function onInput(e) {
|
||||
const el = e.target;
|
||||
if (!props.modelModifiers?.trim) {
|
||||
model.value = el.value;
|
||||
return;
|
||||
}
|
||||
const value = el.value;
|
||||
const start = el.selectionStart;
|
||||
const end = el.selectionEnd;
|
||||
model.value = value;
|
||||
nextTick(() => {
|
||||
let offset = 0;
|
||||
if (value.trimStart().length === el.value.length) {
|
||||
offset = value.length - el.value.length;
|
||||
}
|
||||
if (start != null) el.selectionStart = start - offset;
|
||||
if (end != null) el.selectionEnd = end - offset;
|
||||
});
|
||||
}
|
||||
const sizerRef = ref();
|
||||
const rows = ref(Number(props.rows));
|
||||
const isPlainOrUnderlined = computed(() => ["plain", "underlined"].includes(props.variant));
|
||||
watchEffect(() => {
|
||||
if (!props.autoGrow) rows.value = Number(props.rows);
|
||||
});
|
||||
function calculateInputHeight() {
|
||||
nextTick(() => {
|
||||
if (!textareaRef.value) return;
|
||||
if (platform.value.firefox) {
|
||||
scrollbarWidth.value = 12;
|
||||
return;
|
||||
}
|
||||
const {
|
||||
offsetWidth,
|
||||
clientWidth
|
||||
} = textareaRef.value;
|
||||
scrollbarWidth.value = Math.max(0, offsetWidth - clientWidth);
|
||||
});
|
||||
if (!props.autoGrow) return;
|
||||
nextTick(() => {
|
||||
if (!sizerRef.value || !vFieldRef.value) return;
|
||||
const style = getComputedStyle(sizerRef.value);
|
||||
const fieldStyle = getComputedStyle(vFieldRef.value.$el);
|
||||
const padding = parseFloat(style.getPropertyValue("--v-field-padding-top")) + parseFloat(style.getPropertyValue("--v-input-padding-top")) + parseFloat(style.getPropertyValue("--v-field-padding-bottom"));
|
||||
const height = sizerRef.value.scrollHeight;
|
||||
const lineHeight = parseFloat(style.lineHeight);
|
||||
const minHeight = Math.max(parseFloat(props.rows) * lineHeight + padding, parseFloat(fieldStyle.getPropertyValue("--v-input-control-height")));
|
||||
const maxHeight = props.maxHeight ? parseFloat(props.maxHeight) : parseFloat(props.maxRows) * lineHeight + padding || Infinity;
|
||||
const newHeight = clamp(height ?? 0, minHeight, maxHeight);
|
||||
rows.value = Math.floor((newHeight - padding) / lineHeight);
|
||||
controlHeight.value = convertToUnit(newHeight);
|
||||
});
|
||||
}
|
||||
onMounted(calculateInputHeight);
|
||||
watch(model, calculateInputHeight);
|
||||
watch(() => props.rows, calculateInputHeight);
|
||||
watch(() => props.maxHeight, calculateInputHeight);
|
||||
watch(() => props.maxRows, calculateInputHeight);
|
||||
watch(() => props.density, calculateInputHeight);
|
||||
watch(rows, (val) => {
|
||||
emit("update:rows", val);
|
||||
});
|
||||
let observer;
|
||||
watch(sizerRef, (val) => {
|
||||
if (val) {
|
||||
observer = new ResizeObserver(calculateInputHeight);
|
||||
observer.observe(sizerRef.value);
|
||||
} else {
|
||||
observer?.disconnect();
|
||||
}
|
||||
});
|
||||
onBeforeUnmount(() => {
|
||||
observer?.disconnect();
|
||||
});
|
||||
useRender(() => {
|
||||
const hasCounter = !!(slots.counter || props.counter || props.counterValue);
|
||||
const hasDetails = !!(hasCounter || slots.details);
|
||||
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|
||||
const {
|
||||
modelValue: _,
|
||||
...inputProps
|
||||
} = VInput.filterProps(props);
|
||||
const fieldProps = {
|
||||
...VField.filterProps(props),
|
||||
"onClick:clear": onClear
|
||||
};
|
||||
return createVNode(VInput, mergeProps({
|
||||
"ref": vInputRef,
|
||||
"modelValue": model.value,
|
||||
"onUpdate:modelValue": ($event) => model.value = $event,
|
||||
"class": ["v-textarea v-text-field", {
|
||||
"v-textarea--prefixed": props.prefix,
|
||||
"v-textarea--suffixed": props.suffix,
|
||||
"v-text-field--prefixed": props.prefix,
|
||||
"v-text-field--suffixed": props.suffix,
|
||||
"v-textarea--auto-grow": props.autoGrow,
|
||||
"v-textarea--no-resize": props.noResize || props.autoGrow,
|
||||
"v-input--plain-underlined": isPlainOrUnderlined.value
|
||||
}, props.class],
|
||||
"style": [{
|
||||
"--v-textarea-max-height": props.maxHeight ? convertToUnit(props.maxHeight) : void 0,
|
||||
"--v-textarea-scroll-bar-width": convertToUnit(scrollbarWidth.value)
|
||||
}, props.style]
|
||||
}, rootAttrs, inputProps, {
|
||||
"centerAffix": rows.value === 1 && !isPlainOrUnderlined.value,
|
||||
"focused": isFocused.value
|
||||
}), {
|
||||
...slots,
|
||||
default: (_ref2) => {
|
||||
let {
|
||||
id,
|
||||
isDisabled,
|
||||
isDirty,
|
||||
isReadonly,
|
||||
isValid,
|
||||
hasDetails: hasDetails2
|
||||
} = _ref2;
|
||||
return createVNode(VField, mergeProps({
|
||||
"ref": vFieldRef,
|
||||
"style": {
|
||||
"--v-textarea-control-height": controlHeight.value
|
||||
},
|
||||
"onClick": onControlClick,
|
||||
"onMousedown": onControlMousedown,
|
||||
"onClick:prependInner": props["onClick:prependInner"],
|
||||
"onClick:appendInner": props["onClick:appendInner"]
|
||||
}, fieldProps, {
|
||||
"id": id.value,
|
||||
"active": isActive.value || isDirty.value,
|
||||
"labelId": `${id.value}-label`,
|
||||
"centerAffix": rows.value === 1 && !isPlainOrUnderlined.value,
|
||||
"dirty": isDirty.value || props.dirty,
|
||||
"disabled": isDisabled.value,
|
||||
"focused": isFocused.value,
|
||||
"details": hasDetails2.value,
|
||||
"error": isValid.value === false
|
||||
}), {
|
||||
...slots,
|
||||
default: (_ref3) => {
|
||||
let {
|
||||
props: {
|
||||
class: fieldClass,
|
||||
...slotProps
|
||||
},
|
||||
controlRef
|
||||
} = _ref3;
|
||||
return createBaseVNode(Fragment, null, [props.prefix && createBaseVNode("span", {
|
||||
"class": "v-text-field__prefix"
|
||||
}, [props.prefix]), withDirectives(createBaseVNode("textarea", mergeProps({
|
||||
"ref": (val) => textareaRef.value = controlRef.value = val,
|
||||
"class": fieldClass,
|
||||
"value": model.value,
|
||||
"onInput": onInput,
|
||||
"autofocus": props.autofocus,
|
||||
"readonly": isReadonly.value,
|
||||
"disabled": isDisabled.value,
|
||||
"placeholder": props.placeholder,
|
||||
"rows": props.rows,
|
||||
"name": autocomplete.fieldName.value,
|
||||
"autocomplete": autocomplete.fieldAutocomplete.value,
|
||||
"onFocus": onFocus,
|
||||
"onBlur": blur,
|
||||
"aria-labelledby": `${id.value}-label`
|
||||
}, slotProps, inputAttrs), null), [[intersect_default, {
|
||||
handler: onIntersect
|
||||
}, null, {
|
||||
once: true
|
||||
}]]), props.autoGrow && withDirectives(createBaseVNode("textarea", {
|
||||
"class": normalizeClass([fieldClass, "v-textarea__sizer"]),
|
||||
"id": `${slotProps.id}-sizer`,
|
||||
"onUpdate:modelValue": ($event) => model.value = $event,
|
||||
"ref": sizerRef,
|
||||
"readonly": true,
|
||||
"aria-hidden": "true"
|
||||
}, null), [[vModelText, model.value]]), props.suffix && createBaseVNode("span", {
|
||||
"class": "v-text-field__suffix"
|
||||
}, [props.suffix])]);
|
||||
}
|
||||
});
|
||||
},
|
||||
details: hasDetails ? (slotProps) => createBaseVNode(Fragment, null, [slots.details?.(slotProps), hasCounter && createBaseVNode(Fragment, null, [createBaseVNode("span", null, null), createVNode(VCounter, {
|
||||
"active": props.persistentCounter || isFocused.value,
|
||||
"value": counterValue.value,
|
||||
"max": max.value,
|
||||
"disabled": props.disabled
|
||||
}, slots.counter)])]) : void 0
|
||||
});
|
||||
});
|
||||
return forwardRefs({}, vInputRef, vFieldRef, textareaRef);
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
VTextarea
|
||||
};
|
||||
//# sourceMappingURL=chunk-I4SZJCEY.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VTextarea/VTextarea.tsx"],
|
||||
"sourcesContent": ["// Styles\nimport './VTextarea.sass'\nimport '../VTextField/VTextField.sass'\n\n// Components\nimport { VCounter } from '@/components/VCounter/VCounter'\nimport { VField } from '@/components/VField'\nimport { makeVFieldProps } from '@/components/VField/VField'\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\n\n// Composables\nimport { useDisplay } from '@/composables'\nimport { makeAutocompleteProps, useAutocomplete } from '@/composables/autocomplete'\nimport { useAutofocus } from '@/composables/autofocus'\nimport { useFocus } from '@/composables/focus'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Directives\nimport vIntersect from '@/directives/intersect'\n\n// Utilities\nimport { computed, nextTick, onBeforeUnmount, onMounted, ref, shallowRef, watch, watchEffect } from 'vue'\nimport { callEvent, clamp, convertToUnit, filterInputAttrs, genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VCounterSlot } from '@/components/VCounter/VCounter'\nimport type { VFieldSlots } from '@/components/VField/VField'\nimport type { VInputSlots } from '@/components/VInput/VInput'\n\nexport const makeVTextareaProps = propsFactory({\n autoGrow: Boolean,\n autofocus: Boolean,\n counter: [Boolean, Number, String] as PropType<true | number | string>,\n counterValue: Function as PropType<(value: any) => number>,\n prefix: String,\n placeholder: String,\n persistentPlaceholder: Boolean,\n persistentCounter: Boolean,\n noResize: Boolean,\n rows: {\n type: [Number, String],\n default: 5,\n validator: (v: any) => !isNaN(parseFloat(v)),\n },\n maxHeight: {\n type: [Number, String],\n validator: (v: any) => !isNaN(parseFloat(v)),\n },\n maxRows: {\n type: [Number, String],\n validator: (v: any) => !isNaN(parseFloat(v)),\n },\n suffix: String,\n modelModifiers: Object as PropType<Record<string, boolean>>,\n\n ...makeAutocompleteProps(),\n ...makeVInputProps(),\n ...makeVFieldProps(),\n}, 'VTextarea')\n\ntype VTextareaSlots = Omit<VInputSlots & VFieldSlots, 'default'> & {\n counter: VCounterSlot\n}\n\nexport const VTextarea = genericComponent<VTextareaSlots>()({\n name: 'VTextarea',\n\n directives: { vIntersect },\n\n inheritAttrs: false,\n\n props: makeVTextareaProps(),\n\n emits: {\n 'click:control': (e: MouseEvent) => true,\n 'mousedown:control': (e: MouseEvent) => true,\n 'update:focused': (focused: boolean) => true,\n 'update:modelValue': (val: string) => true,\n 'update:rows': (rows: number) => true,\n },\n\n setup (props, { attrs, emit, slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const { isFocused, focus, blur } = useFocus(props)\n const { onIntersect } = useAutofocus(props)\n const counterValue = computed(() => {\n return typeof props.counterValue === 'function'\n ? props.counterValue(model.value)\n : (model.value || '').toString().length\n })\n const max = computed(() => {\n if (attrs.maxlength) return attrs.maxlength as string | number\n\n if (\n !props.counter ||\n (typeof props.counter !== 'number' &&\n typeof props.counter !== 'string')\n ) return undefined\n\n return props.counter\n })\n\n const vInputRef = ref<VInput>()\n const vFieldRef = ref<VInput>()\n const controlHeight = shallowRef('')\n const textareaRef = ref<HTMLTextAreaElement>()\n const scrollbarWidth = ref(0)\n const { platform } = useDisplay()\n const autocomplete = useAutocomplete(props)\n const isActive = computed(() => (\n props.persistentPlaceholder ||\n isFocused.value ||\n props.active\n ))\n\n function onFocus () {\n if (autocomplete.isSuppressing.value) {\n autocomplete.update()\n }\n\n if (textareaRef.value !== document.activeElement) {\n textareaRef.value?.focus()\n }\n\n if (!isFocused.value) focus()\n }\n function onControlClick (e: MouseEvent) {\n onFocus()\n\n emit('click:control', e)\n }\n function onControlMousedown (e: MouseEvent) {\n emit('mousedown:control', e)\n }\n function onClear (e: MouseEvent) {\n e.stopPropagation()\n\n onFocus()\n\n nextTick(() => {\n model.value = ''\n\n callEvent(props['onClick:clear'], e)\n })\n }\n function onInput (e: Event) {\n const el = e.target as HTMLTextAreaElement\n if (!props.modelModifiers?.trim) {\n model.value = el.value\n return\n }\n\n const value = el.value\n const start = el.selectionStart\n const end = el.selectionEnd\n\n model.value = value\n\n nextTick(() => {\n let offset = 0\n if (value.trimStart().length === el.value.length) {\n // #22307 - Whitespace has been removed from the\n // start, offset thLine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAA;AACA,OAAA;AA6BO,IAAMA,qBAAqBC,aAAa;EAC7CC,UAAUC;EACVC,WAAWD;EACXE,SAAS,CAACF,SAASG,QAAQC,MAAM;EACjCC,cAAcC;EACdC,QAAQH;EACRI,aAAaJ;EACbK,uBAAuBT;EACvBU,mBAAmBV;EACnBW,UAAUX;EACVY,MAAM;IACJC,MAAM,CAACV,QAAQC,MAAM;IACrBU,SAAS;IACTC,WAAYC,OAAW,CAACC,MAAMC,WAAWF,CAAC,CAAC;EAC7C;EACAG,WAAW;IACTN,MAAM,CAACV,QAAQC,MAAM;IACrBW,WAAYC,OAAW,CAACC,MAAMC,WAAWF,CAAC,CAAC;EAC7C;EACAI,SAAS;IACP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C9B,0BAA0BY,MAAM1B;UAChC,0BAA0B0B,MAAMZ;UAChC,yBAAyBY,MAAMlC;UAC/B,yBAAyBkC,MAAMtB,YAAYsB,MAAMlC;UACjD,6BAA6B8F,oBAAoBzC;QACnD,GACAnB,MAAM6G,KAAK;QACZ,SACM,CACL;UACE,2BAA2B7G,MAAMd,YAAYiG,cAAcnF,MAAMd,SAAS,IAAIsC;UAC9E,iCAAiC2D,cAAcpD,eAAeZ,KAAK;QACrE,GACAnB,MAAMqE,KAAK;MACZ,GACI2B,WACAK,YAAU;QAAA,eACD1H,KAAKwC,UAAULine truncated
|
||||
"names": ["makeVTextareaProps", "propsFactory", "autoGrow", "Boolean", "autofocus", "counter", "Number", "String", "counterValue", "Function", "prefix", "placeholder", "persistentPlaceholder", "persistentCounter", "noResize", "rows", "type", "default", "validator", "v", "isNaN", "parseFloat", "maxHeight", "maxRows", "suffix", "modelModifiers", "Object", "makeAutocompleteProps", "makeVInputProps", "makeVFieldProps", "VTextarea", "genericComponent", "name", "directives", "vIntersect", "inheritAttrs", "props", "emits", "e", "focused", "val", "setup", "_ref", "attrs", "emit", "slots", "model", "useProxiedModel", "isFocused", "focus", "blur", "useFocus", "onIntersect", "useAutofocus", "computed", "value", "toString", "length", "max", "maxlength", "undefined", "vInputRef", "ref", "vFieldRef", "controlHeight", "shallowRef", "textareaRef", "scrollbarWidth", "platform", "useDisplay", "autocomplete", "useAutocomplete", "isActive", "active", "onFocus", "isSuppressing", "update", "document", "activeElement", "onControlClick", "onControlMousedown", "onClear", "stopPropagation", "nextTick", "callEvent", "onInput", "el", "target", "trim", "start", "selectionStart", "end", "selectionEnd", "offset", "trimStart", "sizerRef", "isPlainOrUnderlined", "includes", "variant", "watchEffect", "calculateInputHeight", "firefox", "offsetWidth", "clientWidth", "Math", "style", "getComputedStyle", "fieldStyle", "$el", "padding", "getPropertyValue", "height", "scrollHeight", "lineHeight", "minHeight", "Infinity", "newHeight", "clamp", "floor", "convertToUnit", "onMounted", "watch", "density", "observer", "ResizeObserver", "observe", "disconnect", "onBeforeUnmount", "useRender", "hasCounter", "hasDetails", "details", "rootAttrs", "inputAttrs", "filterInputAttrs", "modelValue", "_", "inputProps", "VInput", "filterProps", "fieldProps", "VField", "_createVNode", "_mergeProps", "$event", "class", "_ref2", "id", "isDisabled", "isDirty", "isReadonly", "isValid", "dirty", "_ref3", "fieldClass", "slotProps", "controlRef", "_createElementVNode", "_Fragment", "_withDirectives", "fieldName", "fieldAutocomplete", "handler", "once", "_normalizeClass", "_vModelText", "VCounter", "disabled", "forwardRefs"]
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
import {
|
||||
createLayout,
|
||||
makeLayoutProps
|
||||
} from "./chunk-KQXZAEJP.js";
|
||||
import {
|
||||
useRtl
|
||||
} from "./chunk-ENTLCOCZ.js";
|
||||
import {
|
||||
makeThemeProps,
|
||||
provideTheme
|
||||
} from "./chunk-3DSR7NCB.js";
|
||||
import {
|
||||
genericComponent,
|
||||
makeComponentProps,
|
||||
omit,
|
||||
propsFactory,
|
||||
useRender
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
createBaseVNode,
|
||||
normalizeClass,
|
||||
normalizeStyle
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/VApp/VApp.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VApp/VApp.css";
|
||||
var makeVAppProps = propsFactory({
|
||||
...makeComponentProps(),
|
||||
...omit(makeLayoutProps(), ["fullHeight"]),
|
||||
...makeThemeProps()
|
||||
}, "VApp");
|
||||
var VApp = genericComponent()({
|
||||
name: "VApp",
|
||||
props: makeVAppProps(),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
const theme = provideTheme(props);
|
||||
const {
|
||||
layoutClasses,
|
||||
getLayoutItem,
|
||||
items,
|
||||
layoutRef
|
||||
} = createLayout({
|
||||
...props,
|
||||
fullHeight: true
|
||||
});
|
||||
const {
|
||||
rtlClasses
|
||||
} = useRtl();
|
||||
useRender(() => createBaseVNode("div", {
|
||||
"ref": layoutRef,
|
||||
"class": normalizeClass(["v-application", theme.themeClasses.value, layoutClasses.value, rtlClasses.value, props.class]),
|
||||
"style": normalizeStyle([props.style])
|
||||
}, [createBaseVNode("div", {
|
||||
"class": "v-application__wrap"
|
||||
}, [slots.default?.()])]));
|
||||
return {
|
||||
getLayoutItem,
|
||||
items,
|
||||
theme
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
VApp
|
||||
};
|
||||
//# sourceMappingURL=chunk-IYFY4IHW.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VApp/VApp.tsx"],
|
||||
"sourcesContent": ["// Styles\nimport './VApp.sass'\n\n// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { createLayout, makeLayoutProps } from '@/composables/layout'\nimport { useRtl } from '@/composables/locale'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { genericComponent, omit, propsFactory, useRender } from '@/util'\n\nexport const makeVAppProps = propsFactory({\n ...makeComponentProps(),\n ...omit(makeLayoutProps(), ['fullHeight']),\n ...makeThemeProps(),\n}, 'VApp')\n\nexport const VApp = genericComponent()({\n name: 'VApp',\n\n props: makeVAppProps(),\n\n setup (props, { slots }) {\n const theme = provideTheme(props)\n const { layoutClasses, getLayoutItem, items, layoutRef } = createLayout({ ...props, fullHeight: true })\n const { rtlClasses } = useRtl()\n\n useRender(() => (\n <div\n ref={ layoutRef }\n class={[\n 'v-application',\n theme.themeClasses.value,\n layoutClasses.value,\n rtlClasses.value,\n props.class,\n ]}\n style={[\n props.style,\n ]}\n >\n <div class=\"v-application__wrap\">\n { slots.default?.() }\n </div>\n </div>\n ))\n\n return {\n getLayoutItem,\n items,\n theme,\n }\n },\n})\n\nexport type VApp = InstanceType<typeof VApp>\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAA;AAWO,IAAMA,gBAAgBC,aAAa;EACxC,GAAGC,mBAAmB;EACtB,GAAGC,KAAKC,gBAAgB,GAAG,CAAC,YAAY,CAAC;EACzC,GAAGC,eAAe;AACpB,GAAG,MAAM;AAEF,IAAMC,OAAOC,iBAAiB,EAAE;EACrCC,MAAM;EAENC,OAAOT,cAAc;EAErBU,MAAOD,OAAKE,MAAa;AAAA,QAAX;MAAEC;IAAM,IAACD;AACrB,UAAME,QAAQC,aAAaL,KAAK;AAChC,UAAM;MAAEM;MAAeC;MAAeC;MAAOC;IAAU,IAAIC,aAAa;MAAE,GAAGV;MAAOW,YAAY;IAAK,CAAC;AACtG,UAAM;MAAEC;IAAW,IAAIC,OAAO;AAE9BC,cAAU,MAAAC,gBAAA,OAAA;MAAA,OAEAN;MAAS,SAAAO,eACR,CACL,iBACAZ,MAAMa,aAAaC,OACnBZ,cAAcY,OACdN,WAAWM,OACXlB,MAAMmB,KAAK,CACZ;MAAA,SAAAC,eACM,CACLpB,MAAMqB,KAAK,CACZ;IAAA,GAAA,CAAAN,gBAAA,OAAA;MAAA,SAAA;IAAA,GAAA,CAGGZ,MAAMmB,UAAU,CAAC,CAAA,CAAA,CAAA,CAGxB;AAED,WAAO;MACLf;MACAC;MACAJ;IACF;EACF;AACF,CAAC;",
|
||||
"names": ["makeVAppProps", "propsFactory", "makeComponentProps", "omit", "makeLayoutProps", "makeThemeProps", "VApp", "genericComponent", "name", "props", "setup", "_ref", "slots", "theme", "provideTheme", "layoutClasses", "getLayoutItem", "items", "layoutRef", "createLayout", "fullHeight", "rtlClasses", "useRtl", "useRender", "_createElementVNode", "_normalizeClass", "themeClasses", "value", "class", "_normalizeStyle", "style", "default"]
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
import {
|
||||
propsFactory
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
shallowRef,
|
||||
toRef,
|
||||
useId
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/composables/autocomplete.js
|
||||
var makeAutocompleteProps = propsFactory({
|
||||
autocomplete: String
|
||||
}, "autocomplete");
|
||||
function useAutocomplete(props) {
|
||||
const uniqueId = useId();
|
||||
const reloadTrigger = shallowRef(0);
|
||||
const isSuppressing = toRef(() => props.autocomplete === "suppress");
|
||||
const fieldName = toRef(() => {
|
||||
if (!props.name) return void 0;
|
||||
return isSuppressing.value ? `${props.name}-${uniqueId}-${reloadTrigger.value}` : props.name;
|
||||
});
|
||||
const fieldAutocomplete = toRef(() => {
|
||||
return isSuppressing.value ? "off" : props.autocomplete;
|
||||
});
|
||||
return {
|
||||
isSuppressing,
|
||||
fieldAutocomplete,
|
||||
fieldName,
|
||||
update: () => reloadTrigger.value = (/* @__PURE__ */ new Date()).getTime()
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/vuetify/lib/composables/autofocus.js
|
||||
function useAutofocus(props) {
|
||||
function onIntersect(isIntersecting, entries) {
|
||||
if (!props.autofocus || !isIntersecting) return;
|
||||
const el = entries[0].target;
|
||||
const target = el.matches("input,textarea") ? el : el.querySelector("input,textarea");
|
||||
target?.focus();
|
||||
}
|
||||
return {
|
||||
onIntersect
|
||||
};
|
||||
}
|
||||
|
||||
export {
|
||||
makeAutocompleteProps,
|
||||
useAutocomplete,
|
||||
useAutofocus
|
||||
};
|
||||
//# sourceMappingURL=chunk-IZQZFEAL.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/composables/autocomplete.ts", "../../vuetify/src/composables/autofocus.ts"],
|
||||
"sourcesContent": ["// Utilities\nimport { shallowRef, toRef, useId } from 'vue'\nimport { propsFactory } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\n// Types\nexport interface InputAutocompleteProps {\n autocomplete: 'suppress' | string | undefined\n name?: string\n}\n\n// Composables\nexport const makeAutocompleteProps = propsFactory({\n autocomplete: String as PropType<'suppress' | string>,\n}, 'autocomplete')\n\nexport function useAutocomplete (props: InputAutocompleteProps) {\n const uniqueId = useId()\n const reloadTrigger = shallowRef(0)\n\n const isSuppressing = toRef(() => props.autocomplete === 'suppress')\n\n const fieldName = toRef(() => {\n if (!props.name) return undefined\n\n return isSuppressing.value\n ? `${props.name}-${uniqueId}-${reloadTrigger.value}`\n : props.name\n })\n\n const fieldAutocomplete = toRef(() => {\n return isSuppressing.value\n ? 'off'\n : props.autocomplete\n })\n\n return {\n isSuppressing,\n fieldAutocomplete,\n fieldName,\n update: () => reloadTrigger.value = new Date().getTime(),\n }\n}\n", "interface AutofocusProps {\n autofocus: boolean\n}\n\nexport function useAutofocus (props: AutofocusProps) {\n function onIntersect (\n isIntersecting: boolean,\n entries: IntersectionObserverEntry[]\n ) {\n if (!props.autofocus || !isIntersecting) return\n\n const el = entries[0].target\n const target = (el.matches('input,textarea') ? el : el.querySelector('input,textarea')) as HTMLElement | null\n target?.focus()\n }\n\n return {\n onIntersect,\n }\n}\n"],
|
||||
"mappings": ";;;;;;;;;;AAcO,IAAMA,wBAAwBC,aAAa;EAChDC,cAAcC;AAChB,GAAG,cAAc;AAEV,SAASC,gBAAiBC,OAA+B;AAC9D,QAAMC,WAAWC,MAAM;AACvB,QAAMC,gBAAgBC,WAAW,CAAC;AAElC,QAAMC,gBAAgBC,MAAM,MAAMN,MAAMH,iBAAiB,UAAU;AAEnE,QAAMU,YAAYD,MAAM,MAAM;AAC5B,QAAI,CAACN,MAAMQ,KAAM,QAAOC;AAExB,WAAOJ,cAAcK,QACjB,GAAGV,MAAMQ,IAAI,IAAIP,QAAQ,IAAIE,cAAcO,KAAK,KAChDV,MAAMQ;EACZ,CAAC;AAED,QAAMG,oBAAoBL,MAAM,MAAM;AACpC,WAAOD,cAAcK,QACjB,QACAV,MAAMH;EACZ,CAAC;AAED,SAAO;IACLQ;IACAM;IACAJ;IACAK,QAAQA,MAAMT,cAAcO,SAAQ,oBAAIG,KAAK,GAAEC,QAAQ;EACzD;AACF;;;ACxCO,SAASC,aAAcC,OAAuB;AACnD,WAASC,YACPC,gBACAC,SACA;AACA,QAAI,CAACH,MAAMI,aAAa,CAACF,eAAgB;AAEzC,UAAMG,KAAKF,QAAQ,CAAC,EAAEG;AACtB,UAAMA,SAAUD,GAAGE,QAAQ,gBAAgB,IAAIF,KAAKA,GAAGG,cAAc,gBAAgB;AACrFF,YAAQG,MAAM;EAChB;AAEA,SAAO;IACLR;EACF;AACF;",
|
||||
"names": ["makeAutocompleteProps", "propsFactory", "autocomplete", "String", "useAutocomplete", "props", "uniqueId", "useId", "reloadTrigger", "shallowRef", "isSuppressing", "toRef", "fieldName", "name", "undefined", "value", "fieldAutocomplete", "update", "Date", "getTime", "useAutofocus", "props", "onIntersect", "isIntersecting", "entries", "autofocus", "el", "target", "matches", "querySelector", "focus"]
|
||||
}
|
||||
+455
@@ -0,0 +1,455 @@
|
||||
import {
|
||||
VLabel,
|
||||
makeFocusProps,
|
||||
useFocus,
|
||||
useInputIcon
|
||||
} from "./chunk-4VABFUPG.js";
|
||||
import {
|
||||
VExpandXTransition,
|
||||
VSlideYTransition
|
||||
} from "./chunk-B4JFJDWM.js";
|
||||
import {
|
||||
LoaderSlot,
|
||||
makeLoaderProps,
|
||||
useLoader
|
||||
} from "./chunk-U2DSRSME.js";
|
||||
import {
|
||||
VDefaultsProvider
|
||||
} from "./chunk-VH7QIDM4.js";
|
||||
import {
|
||||
makeRoundedProps,
|
||||
useRounded
|
||||
} from "./chunk-AQK3CYVW.js";
|
||||
import {
|
||||
MaybeTransition,
|
||||
makeTransitionProps
|
||||
} from "./chunk-CAGZXMOS.js";
|
||||
import {
|
||||
IconValue
|
||||
} from "./chunk-OJDZBU5D.js";
|
||||
import {
|
||||
useRtl
|
||||
} from "./chunk-ENTLCOCZ.js";
|
||||
import {
|
||||
useBackgroundColor,
|
||||
useTextColor
|
||||
} from "./chunk-BHV5Z34M.js";
|
||||
import {
|
||||
makeThemeProps,
|
||||
provideTheme
|
||||
} from "./chunk-3DSR7NCB.js";
|
||||
import {
|
||||
EventProp,
|
||||
PREFERS_REDUCED_MOTION,
|
||||
animate,
|
||||
convertToUnit,
|
||||
genericComponent,
|
||||
makeComponentProps,
|
||||
nullifyTransforms,
|
||||
propsFactory,
|
||||
standardEasing,
|
||||
useRender
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
Fragment,
|
||||
computed,
|
||||
createBaseVNode,
|
||||
createVNode,
|
||||
mergeProps,
|
||||
normalizeClass,
|
||||
normalizeStyle,
|
||||
ref,
|
||||
toRef,
|
||||
useId,
|
||||
vShow,
|
||||
watch,
|
||||
withDirectives
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/VCounter/VCounter.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VCounter/VCounter.css";
|
||||
var makeVCounterProps = propsFactory({
|
||||
active: Boolean,
|
||||
disabled: Boolean,
|
||||
max: [Number, String],
|
||||
value: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
},
|
||||
...makeComponentProps(),
|
||||
...makeTransitionProps({
|
||||
transition: {
|
||||
component: VSlideYTransition
|
||||
}
|
||||
})
|
||||
}, "VCounter");
|
||||
var VCounter = genericComponent()({
|
||||
name: "VCounter",
|
||||
functional: true,
|
||||
props: makeVCounterProps(),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
const counter = toRef(() => {
|
||||
return props.max ? `${props.value} / ${props.max}` : String(props.value);
|
||||
});
|
||||
useRender(() => createVNode(MaybeTransition, {
|
||||
"transition": props.transition
|
||||
}, {
|
||||
default: () => [withDirectives(createBaseVNode("div", {
|
||||
"class": normalizeClass(["v-counter", {
|
||||
"text-error": props.max && !props.disabled && parseFloat(props.value) > parseFloat(props.max)
|
||||
}, props.class]),
|
||||
"style": normalizeStyle(props.style)
|
||||
}, [slots.default ? slots.default({
|
||||
counter: counter.value,
|
||||
max: props.max,
|
||||
value: props.value
|
||||
}) : counter.value]), [[vShow, props.active]])]
|
||||
}));
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/vuetify/lib/components/VField/VFieldLabel.js
|
||||
var makeVFieldLabelProps = propsFactory({
|
||||
floating: Boolean,
|
||||
...makeComponentProps()
|
||||
}, "VFieldLabel");
|
||||
var VFieldLabel = genericComponent()({
|
||||
name: "VFieldLabel",
|
||||
props: makeVFieldLabelProps(),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
useRender(() => createVNode(VLabel, {
|
||||
"class": normalizeClass(["v-field-label", {
|
||||
"v-field-label--floating": props.floating
|
||||
}, props.class]),
|
||||
"style": normalizeStyle(props.style)
|
||||
}, slots));
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/vuetify/lib/components/VField/VField.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VField/VField.css";
|
||||
var allowedVariants = ["underlined", "outlined", "filled", "solo", "solo-inverted", "solo-filled", "plain"];
|
||||
var makeVFieldProps = propsFactory({
|
||||
appendInnerIcon: IconValue,
|
||||
bgColor: String,
|
||||
clearable: Boolean,
|
||||
clearIcon: {
|
||||
type: IconValue,
|
||||
default: "$clear"
|
||||
},
|
||||
active: Boolean,
|
||||
centerAffix: {
|
||||
type: Boolean,
|
||||
default: void 0
|
||||
},
|
||||
color: String,
|
||||
baseColor: String,
|
||||
dirty: Boolean,
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: null
|
||||
},
|
||||
glow: Boolean,
|
||||
error: Boolean,
|
||||
flat: Boolean,
|
||||
iconColor: [Boolean, String],
|
||||
label: String,
|
||||
persistentClear: Boolean,
|
||||
prependInnerIcon: IconValue,
|
||||
reverse: Boolean,
|
||||
singleLine: Boolean,
|
||||
variant: {
|
||||
type: String,
|
||||
default: "filled",
|
||||
validator: (v) => allowedVariants.includes(v)
|
||||
},
|
||||
"onClick:clear": EventProp(),
|
||||
"onClick:appendInner": EventProp(),
|
||||
"onClick:prependInner": EventProp(),
|
||||
...makeComponentProps(),
|
||||
...makeLoaderProps(),
|
||||
...makeRoundedProps(),
|
||||
...makeThemeProps()
|
||||
}, "VField");
|
||||
var VField = genericComponent()({
|
||||
name: "VField",
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
id: String,
|
||||
details: Boolean,
|
||||
labelId: String,
|
||||
...makeFocusProps(),
|
||||
...makeVFieldProps()
|
||||
},
|
||||
emits: {
|
||||
"update:focused": (focused) => true,
|
||||
"update:modelValue": (value) => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
attrs,
|
||||
emit,
|
||||
slots
|
||||
} = _ref;
|
||||
const {
|
||||
themeClasses
|
||||
} = provideTheme(props);
|
||||
const {
|
||||
loaderClasses
|
||||
} = useLoader(props);
|
||||
const {
|
||||
focusClasses,
|
||||
isFocused,
|
||||
focus,
|
||||
blur
|
||||
} = useFocus(props);
|
||||
const {
|
||||
InputIcon
|
||||
} = useInputIcon(props);
|
||||
const {
|
||||
roundedClasses
|
||||
} = useRounded(props);
|
||||
const {
|
||||
rtlClasses
|
||||
} = useRtl();
|
||||
const isActive = toRef(() => props.dirty || props.active);
|
||||
const hasLabel = toRef(() => !!(props.label || slots.label));
|
||||
const hasFloatingLabel = toRef(() => !props.singleLine && hasLabel.value);
|
||||
const uid = useId();
|
||||
const id = computed(() => props.id || `input-${uid}`);
|
||||
const messagesId = toRef(() => !props.details ? void 0 : `${id.value}-messages`);
|
||||
const labelRef = ref();
|
||||
const floatingLabelRef = ref();
|
||||
const controlRef = ref();
|
||||
const isPlainOrUnderlined = computed(() => ["plain", "underlined"].includes(props.variant));
|
||||
const color = computed(() => {
|
||||
return props.error || props.disabled ? void 0 : isActive.value && isFocused.value ? props.color : props.baseColor;
|
||||
});
|
||||
const iconColor = computed(() => {
|
||||
if (!props.iconColor || props.glow && !isFocused.value) return void 0;
|
||||
return props.iconColor === true ? color.value : props.iconColor;
|
||||
});
|
||||
const {
|
||||
backgroundColorClasses,
|
||||
backgroundColorStyles
|
||||
} = useBackgroundColor(() => props.bgColor);
|
||||
const {
|
||||
textColorClasses,
|
||||
textColorStyles
|
||||
} = useTextColor(color);
|
||||
watch(isActive, (val) => {
|
||||
if (hasFloatingLabel.value && !PREFERS_REDUCED_MOTION()) {
|
||||
const el = labelRef.value.$el;
|
||||
const targetEl = floatingLabelRef.value.$el;
|
||||
requestAnimationFrame(() => {
|
||||
const rect = nullifyTransforms(el);
|
||||
const targetRect = targetEl.getBoundingClientRect();
|
||||
const x = targetRect.x - rect.x;
|
||||
const y = targetRect.y - rect.y - (rect.height / 2 - targetRect.height / 2);
|
||||
const targetWidth = targetRect.width / 0.75;
|
||||
const width = Math.abs(targetWidth - rect.width) > 1 ? {
|
||||
maxWidth: convertToUnit(targetWidth)
|
||||
} : void 0;
|
||||
const style = getComputedStyle(el);
|
||||
const targetStyle = getComputedStyle(targetEl);
|
||||
const duration = parseFloat(style.transitionDuration) * 1e3 || 150;
|
||||
const scale = parseFloat(targetStyle.getPropertyValue("--v-field-label-scale"));
|
||||
const color2 = targetStyle.getPropertyValue("color");
|
||||
el.style.visibility = "visible";
|
||||
targetEl.style.visibility = "hidden";
|
||||
animate(el, {
|
||||
transform: `translate(${x}px, ${y}px) scale(${scale})`,
|
||||
color: color2,
|
||||
...width
|
||||
}, {
|
||||
duration,
|
||||
easing: standardEasing,
|
||||
direction: val ? "normal" : "reverse"
|
||||
}).finished.then(() => {
|
||||
el.style.removeProperty("visibility");
|
||||
targetEl.style.removeProperty("visibility");
|
||||
});
|
||||
});
|
||||
}
|
||||
}, {
|
||||
flush: "post"
|
||||
});
|
||||
const slotProps = computed(() => ({
|
||||
isActive,
|
||||
isFocused,
|
||||
controlRef,
|
||||
iconColor,
|
||||
blur,
|
||||
focus
|
||||
}));
|
||||
function onClick(e) {
|
||||
if (e.target !== document.activeElement) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
useRender(() => {
|
||||
const isOutlined = props.variant === "outlined";
|
||||
const hasPrepend = !!(slots["prepend-inner"] || props.prependInnerIcon);
|
||||
const hasClear = !!(props.clearable || slots.clear) && !props.disabled;
|
||||
const hasAppend = !!(slots["append-inner"] || props.appendInnerIcon || hasClear);
|
||||
const label = () => slots.label ? slots.label({
|
||||
...slotProps.value,
|
||||
label: props.label,
|
||||
props: {
|
||||
for: id.value
|
||||
}
|
||||
}) : props.label;
|
||||
return createBaseVNode("div", mergeProps({
|
||||
"class": ["v-field", {
|
||||
"v-field--active": isActive.value,
|
||||
"v-field--appended": hasAppend,
|
||||
"v-field--center-affix": props.centerAffix ?? !isPlainOrUnderlined.value,
|
||||
"v-field--disabled": props.disabled,
|
||||
"v-field--dirty": props.dirty,
|
||||
"v-field--error": props.error,
|
||||
"v-field--glow": props.glow,
|
||||
"v-field--flat": props.flat,
|
||||
"v-field--has-background": !!props.bgColor,
|
||||
"v-field--persistent-clear": props.persistentClear,
|
||||
"v-field--prepended": hasPrepend,
|
||||
"v-field--reverse": props.reverse,
|
||||
"v-field--single-line": props.singleLine,
|
||||
"v-field--no-label": !label(),
|
||||
[`v-field--variant-${props.variant}`]: true
|
||||
}, themeClasses.value, backgroundColorClasses.value, focusClasses.value, loaderClasses.value, roundedClasses.value, rtlClasses.value, props.class],
|
||||
"style": [backgroundColorStyles.value, props.style],
|
||||
"onClick": onClick
|
||||
}, attrs), [createBaseVNode("div", {
|
||||
"class": "v-field__overlay"
|
||||
}, null), createVNode(LoaderSlot, {
|
||||
"name": "v-field",
|
||||
"active": !!props.loading,
|
||||
"color": props.error ? "error" : typeof props.loading === "string" ? props.loading : props.color
|
||||
}, {
|
||||
default: slots.loader
|
||||
}), hasPrepend && createBaseVNode("div", {
|
||||
"key": "prepend",
|
||||
"class": "v-field__prepend-inner"
|
||||
}, [slots["prepend-inner"] ? slots["prepend-inner"](slotProps.value) : props.prependInnerIcon && createVNode(InputIcon, {
|
||||
"key": "prepend-icon",
|
||||
"name": "prependInner",
|
||||
"color": iconColor.value
|
||||
}, null)]), createBaseVNode("div", {
|
||||
"class": "v-field__field",
|
||||
"data-no-activator": ""
|
||||
}, [["filled", "solo", "solo-inverted", "solo-filled"].includes(props.variant) && hasFloatingLabel.value && createVNode(VFieldLabel, {
|
||||
"key": "floating-label",
|
||||
"ref": floatingLabelRef,
|
||||
"class": normalizeClass([textColorClasses.value]),
|
||||
"floating": true,
|
||||
"for": id.value,
|
||||
"aria-hidden": !isActive.value,
|
||||
"style": normalizeStyle(textColorStyles.value)
|
||||
}, {
|
||||
default: () => [label()]
|
||||
}), hasLabel.value && createVNode(VFieldLabel, {
|
||||
"key": "label",
|
||||
"ref": labelRef,
|
||||
"id": props.labelId,
|
||||
"for": id.value,
|
||||
"aria-hidden": hasFloatingLabel.value && isActive.value
|
||||
}, {
|
||||
default: () => [label()]
|
||||
}), slots.default?.({
|
||||
...slotProps.value,
|
||||
props: {
|
||||
id: id.value,
|
||||
class: "v-field__input",
|
||||
"aria-describedby": messagesId.value
|
||||
},
|
||||
focus,
|
||||
blur
|
||||
}) ?? createBaseVNode("div", {
|
||||
"id": id.value,
|
||||
"class": "v-field__input",
|
||||
"aria-describedby": messagesId.value
|
||||
}, null)]), hasClear && createVNode(VExpandXTransition, {
|
||||
"key": "clear"
|
||||
}, {
|
||||
default: () => [withDirectives(createBaseVNode("div", {
|
||||
"class": "v-field__clearable",
|
||||
"onMousedown": (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
}, [createVNode(VDefaultsProvider, {
|
||||
"defaults": {
|
||||
VIcon: {
|
||||
icon: props.clearIcon
|
||||
}
|
||||
}
|
||||
}, {
|
||||
default: () => [slots.clear ? slots.clear({
|
||||
...slotProps.value,
|
||||
props: {
|
||||
onFocus: focus,
|
||||
onBlur: blur,
|
||||
onClick: props["onClick:clear"],
|
||||
tabindex: -1
|
||||
}
|
||||
}) : createVNode(InputIcon, {
|
||||
"name": "clear",
|
||||
"onFocus": focus,
|
||||
"onBlur": blur,
|
||||
"tabindex": -1
|
||||
}, null)]
|
||||
})]), [[vShow, props.dirty]])]
|
||||
}), hasAppend && createBaseVNode("div", {
|
||||
"key": "append",
|
||||
"class": "v-field__append-inner"
|
||||
}, [slots["append-inner"] ? slots["append-inner"](slotProps.value) : props.appendInnerIcon && createVNode(InputIcon, {
|
||||
"key": "append-icon",
|
||||
"name": "appendInner",
|
||||
"color": iconColor.value
|
||||
}, null)]), createBaseVNode("div", {
|
||||
"class": normalizeClass(["v-field__outline", textColorClasses.value]),
|
||||
"style": normalizeStyle(textColorStyles.value)
|
||||
}, [isOutlined && createBaseVNode(Fragment, null, [createBaseVNode("div", {
|
||||
"class": "v-field__outline__start"
|
||||
}, null), hasFloatingLabel.value && createBaseVNode("div", {
|
||||
"class": "v-field__outline__notch"
|
||||
}, [createVNode(VFieldLabel, {
|
||||
"ref": floatingLabelRef,
|
||||
"floating": true,
|
||||
"for": id.value,
|
||||
"aria-hidden": !isActive.value
|
||||
}, {
|
||||
default: () => [label()]
|
||||
})]), createBaseVNode("div", {
|
||||
"class": "v-field__outline__end"
|
||||
}, null)]), isPlainOrUnderlined.value && hasFloatingLabel.value && createVNode(VFieldLabel, {
|
||||
"ref": floatingLabelRef,
|
||||
"floating": true,
|
||||
"for": id.value,
|
||||
"aria-hidden": !isActive.value
|
||||
}, {
|
||||
default: () => [label()]
|
||||
})])]);
|
||||
});
|
||||
return {
|
||||
controlRef,
|
||||
fieldIconColor: iconColor
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
VCounter,
|
||||
VFieldLabel,
|
||||
makeVFieldProps,
|
||||
VField
|
||||
};
|
||||
//# sourceMappingURL=chunk-J7Q2NMV7.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VCounter/VCounter.tsx", "../../vuetify/src/components/VField/VFieldLabel.tsx", "../../vuetify/src/components/VField/VField.tsx"],
|
||||
"sourcesContent": ["// Styles\nimport './VCounter.sass'\n\n// Components\nimport { VSlideYTransition } from '@/components/transitions'\n\n// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { makeTransitionProps, MaybeTransition } from '@/composables/transition'\n\n// Utilities\nimport { toRef } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { Component } from 'vue'\n\nexport const makeVCounterProps = propsFactory({\n active: Boolean,\n disabled: Boolean,\n max: [Number, String],\n value: {\n type: [Number, String],\n default: 0,\n },\n\n ...makeComponentProps(),\n ...makeTransitionProps({\n transition: { component: VSlideYTransition as Component },\n }),\n}, 'VCounter')\n\nexport type VCounterSlot = {\n counter: string\n max: string | number | undefined\n value: string | number | undefined\n}\n\ntype VCounterSlots = {\n default: VCounterSlot\n}\n\nexport const VCounter = genericComponent<VCounterSlots>()({\n name: 'VCounter',\n\n functional: true,\n\n props: makeVCounterProps(),\n\n setup (props, { slots }) {\n const counter = toRef(() => {\n return props.max ? `${props.value} / ${props.max}` : String(props.value)\n })\n\n useRender(() => (\n <MaybeTransition transition={ props.transition }>\n <div\n v-show={ props.active }\n class={[\n 'v-counter',\n {\n 'text-error': props.max && !props.disabled &&\n parseFloat(props.value) > parseFloat(props.max),\n },\n props.class,\n ]}\n style={ props.style }\n >\n { slots.default\n ? slots.default({\n counter: counter.value,\n max: props.max,\n value: props.value,\n })\n : counter.value\n }\n </div>\n </MaybeTransition>\n ))\n\n return {}\n },\n})\n\nexport type VCounter = InstanceType<typeof VCounter>\n", "// Components\nimport { VLabel } from '@/components/VLabel'\n\n// Composables\nimport { makeComponentProps } from '@/composables/component'\n\n// Utilities\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\nexport const makeVFieldLabelProps = propsFactory({\n floating: Boolean,\n\n ...makeComponentProps(),\n}, 'VFieldLabel')\n\nexport const VFieldLabel = genericComponent()({\n name: 'VFieldLabel',\n\n props: makeVFieldLabelProps(),\n\n setup (props, { slots }) {\n useRender(() => (\n <VLabel\n class={[\n 'v-field-label',\n { 'v-field-label--floating': props.floating },\n props.class,\n ]}\n style={ props.style }\n v-slots={ slots }\n />\n ))\n\n return {}\n },\n})\n\nexport type VFieldLabel = InstanceType<typeof VFieldLabel>\n", "// Styles\nimport './VField.sass'\n\n// Components\nimport { VFieldLabel } from './VFieldLabel'\nimport { VExpandXTransition } from '@/components/transitions'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { useInputIcon } from '@/components/VInput/InputIcon'\n\n// Composables\nimport { useBackgroundColor, useTextColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { IconValue } from '@/composables/icons'\nimport { LoaderSlot, makeLoaderProps, useLoader } from '@/composables/loader'\nimport { useRtl } from '@/composables/locale'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { computed, ref, toRef, useId, watch } from 'vue'\nimport {\n animate,\n convertToUnit,\n EventProp,\n genericComponent,\n nullifyTransforms,\n PREFERS_REDUCED_MOTION,\n propsFactory,\n standardEasing,\n useRender,\n} from '@/util'\n\n// Types\nimport type { ComputedRef, PropType, Ref } from 'vue'\nimport type { LoaderSlotProps } from '@/composables/loader'\nimport type { GenericProps } from '@/util'\n\nconst allowedVariants = ['underlined', 'outlined', 'filled', 'solo', 'solo-inverted', 'solo-filled', 'plain'] as const\ntype Variant = typeof allowedVariants[number]\n\nexport interface DefaultInputSlot {\n isActive: Ref<boolean>\n isFocused: Ref<boolean>\n iconColor: ComputedRef<string | undefined>\n controlRef: Ref<HTMLElement | undefined>\n focus: () => void\n blur: () => void\n}\n\nexport interface VFieldSlot extends DefaultInputSlot {\n props: Record<string, unknown>\n}\n\nexport const makeVFieldProps = propsFactory({\n appendInnerIcon: IconValue,\n bgColor: String,\n clearable: Boolean,\n clearIcon: {\n type: IconValue,\n default: '$clear',\n },\n active: Boolean,\n centerAffix: {\n type: Boolean,\n default: undefined,\n },\n color: String,\n baseColor: String,\n dirty: Boolean,\n disabled: {\n type: BooleLine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAA;AAgBO,IAAMA,oBAAoBC,aAAa;EAC5CC,QAAQC;EACRC,UAAUD;EACVE,KAAK,CAACC,QAAQC,MAAM;EACpBC,OAAO;IACLC,MAAM,CAACH,QAAQC,MAAM;IACrBG,SAAS;EACX;EAEA,GAAGC,mBAAmB;EACtB,GAAGC,oBAAoB;IACrBC,YAAY;MAAEC,WAAWC;IAA+B;EAC1D,CAAC;AACH,GAAG,UAAU;AAYN,IAAMC,WAAWC,iBAAgC,EAAE;EACxDC,MAAM;EAENC,YAAY;EAEZC,OAAOpB,kBAAkB;EAEzBqB,MAAOD,OAAKE,MAAa;AAAA,QAAX;MAAEC;IAAM,IAACD;AACrB,UAAME,UAAUC,MAAM,MAAM;AAC1B,aAAOL,MAAMf,MAAM,GAAGe,MAAMZ,KAAK,MAAMY,MAAMf,GAAG,KAAKE,OAAOa,MAAMZ,KAAK;IACzE,CAAC;AAEDkB,cAAU,MAAAC,YAAAC,iBAAA;MAAA,cACsBR,MAAMP;IAAU,GAAA;MAAAH,SAAAA,MAAA,CAAAmB,eAAAC,gBAAA,OAAA;QAAA,SAAAC,eAGnC,CACL,aACA;UACE,cAAcX,MAAMf,OAAO,CAACe,MAAMhB,YAChC4B,WAAWZ,MAAMZ,KAAK,IAAIwB,WAAWZ,MAAMf,GAAG;QAClD,GACAe,MAAMa,KAAK,CACZ;QAAA,SAAAC,eACOd,MAAMe,KAAK;MAAA,GAAA,CAEjBZ,MAAMb,UACJa,MAAMb,QAAQ;QACdc,SAASA,QAAQhB;QACjBH,KAAKe,MAAMf;QACXG,OAAOY,MAAMZ;MACf,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OAAQ;AAChE,gBAAMC,QAAQF,WAAWF,YAAYK,iBAAiB,uBAAuB,CAAC;AAC9E,gBAAMpG,SAAQ+F,YAAYK,iBAAiB,OAAO;AAElDxB,aAAGiB,MAAMQ,aAAa;AACtBvB,mBAASe,MAAMQ,aAAa;AAE5BC,kBAAQ1B,IAAI;YACV2B,WAAW,aAAanB,CAAC,OAAOC,CAAC,aAAac,KAAK;YACnDnG,OAAAA;YACA,GAAGwF;UACL,GAAG;YACDQ;YACAQ,QAAQC;YACRC,WAAWhC,MAAM,WAAW;UAC9B,CAAC,EAAEiC,SAASC,KAAK,MAAM;AACrBhC,eAAGiB,MAAMgB,eAAe,YAAY;AACpC/B,qBAASe,MAAMgB,eAAe,YAAY;UAC5C,CAAC;QACH,CAAC;MACH;IACF,GAAG;MAAEC,OAAO;IAAO,CAAC;AAEpB,UAAMC,YAAYnD,SAA2B,OAAO;MAClDN;MACAV;MACAqB;MACA1D;MACAuC;MACAD;IACF,EAAE;AAEF,aAASmE,QAASC,GAAe;AAC/B,UAAIA,EAAEC,WAAWC,SAASC,eAAe;AACvCH,UAAEI,eAAe;MACnB;IACF;AAEAC,cAAU,MAAM;AACd,YAAMC,aAAa7F,MAAMb,YAAY;AACrC,YAAM2G,aAAa,CAAC,EAAElF,MAAM,eAAe,KAAKZ,MAAMhB;AACtD,YAAM+G,WAAW,CAAC,EAAE/F,MAAMlC,aAAa8C,MAAMoF,UAAU,CAAChG,MAAMvB;AAC9D,YAAMwH,YAAY,CAAC,EAAErF,MAAM,cAAc,KAAKZ,MAAMtC,mBAAmBqI;AACvE,YAAMjH,QAAQA,MACZ8B,MAAM9B,QACF8B,MAAM9B,MAAM;QACZ,GAAGuGLine truncated
|
||||
"names": ["makeVCounterProps", "propsFactory", "active", "Boolean", "disabled", "max", "Number", "String", "value", "type", "default", "makeComponentProps", "makeTransitionProps", "transition", "component", "VSlideYTransition", "VCounter", "genericComponent", "name", "functional", "props", "setup", "_ref", "slots", "counter", "toRef", "useRender", "_createVNode", "MaybeTransition", "_withDirectives", "_createElementVNode", "_normalizeClass", "parseFloat", "class", "_normalizeStyle", "style", "_vShow", "makeVFieldLabelProps", "propsFactory", "floating", "Boolean", "makeComponentProps", "VFieldLabel", "genericComponent", "name", "props", "setup", "_ref", "slots", "useRender", "_createVNode", "VLabel", "_normalizeClass", "class", "_normalizeStyle", "style", "allowedVariants", "makeVFieldProps", "propsFactory", "appendInnerIcon", "IconValue", "bgColor", "String", "clearable", "Boolean", "clearIcon", "type", "default", "active", "centerAffix", "undefined", "color", "baseColor", "dirty", "disabled", "glow", "error", "flat", "iconColor", "label", "persistentClear", "prependInnerIcon", "reverse", "singleLine", "variant", "validator", "v", "includes", "EventProp", "makeComponentProps", "makeLoaderProps", "makeRoundedProps", "makeThemeProps", "VField", "genericComponent", "name", "inheritAttrs", "props", "id", "details", "labelId", "makeFocusProps", "emits", "focused", "value", "setup", "_ref", "attrs", "emit", "slots", "themeClasses", "provideTheme", "loaderClasses", "useLoader", "focusClasses", "isFocused", "focus", "blur", "useFocus", "InputIcon", "useInputIcon", "roundedClasses", "useRounded", "rtlClasses", "useRtl", "isActive", "toRef", "hasLabel", "hasFloatingLabel", "uid", "useId", "computed", "messagesId", "labelRef", "ref", "floatingLabelRef", "controlRef", "isPlainOrUnderlined", "backgroundColorClasses", "backgroundColorStyles", "useBackgroundColor", "textColorClasses", "textColorStyles", "useTextColor", "watch", "val", "PREFERS_REDUCED_MOTION", "el", "$el", "targetEl", "requestAnimationFrame", "rect", "nullifyTransforms", "targetRect", "getBoundingClientRect", "x", "y", "height", "targetWidth", "width", "Math", "abs", "maxWidth", "convertToUnit", "style", "getComputedStyle", "targetStyle", "duration", "parseFloat", "transitionDuration", "scale", "getPropertyValue", "visibility", "animate", "transform", "easing", "standardEasing", "direction", "finished", "then", "removeProperty", "flush", "slotProps", "onClick", "e", "target", "document", "activeElement", "preventDefault", "useRender", "isOutlined", "hasPrepend", "hasClear", "clear", "hasAppend", "for", "_createElementVNode", "_mergeProps", "class", "_createVNode", "LoaderSlot", "loading", "loader", "VFieldLabel", "_normalizeClass", "_normalizeStyle", "VExpandXTransition", "_withDirectives", "stopPropagation", "VDefaultsProvider", "VIcon", "icon", "onFocus", "onBlur", "tabindex", "_vShow", "_Fragment", "fieldIconColor"]
|
||||
}
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
import {
|
||||
getCurrentInstance,
|
||||
toKebabCase
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
computed,
|
||||
effectScope,
|
||||
onScopeDispose,
|
||||
ref,
|
||||
toRaw,
|
||||
watch
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/composables/toggleScope.js
|
||||
function useToggleScope(source, fn) {
|
||||
let scope;
|
||||
function start() {
|
||||
scope = effectScope();
|
||||
scope.run(() => fn.length ? fn(() => {
|
||||
scope?.stop();
|
||||
start();
|
||||
}) : fn());
|
||||
}
|
||||
watch(source, (active) => {
|
||||
if (active && !scope) {
|
||||
start();
|
||||
} else if (!active) {
|
||||
scope?.stop();
|
||||
scope = void 0;
|
||||
}
|
||||
}, {
|
||||
immediate: true
|
||||
});
|
||||
onScopeDispose(() => {
|
||||
scope?.stop();
|
||||
});
|
||||
}
|
||||
|
||||
// node_modules/vuetify/lib/composables/proxiedModel.js
|
||||
function useProxiedModel(props, prop, defaultValue) {
|
||||
let transformIn = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : (v) => v;
|
||||
let transformOut = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : (v) => v;
|
||||
const vm = getCurrentInstance("useProxiedModel");
|
||||
const internal = ref(props[prop] !== void 0 ? props[prop] : defaultValue);
|
||||
const kebabProp = toKebabCase(prop);
|
||||
const checkKebab = kebabProp !== prop;
|
||||
const isControlled = checkKebab ? computed(() => {
|
||||
void props[prop];
|
||||
return !!((vm.vnode.props?.hasOwnProperty(prop) || vm.vnode.props?.hasOwnProperty(kebabProp)) && (vm.vnode.props?.hasOwnProperty(`onUpdate:${prop}`) || vm.vnode.props?.hasOwnProperty(`onUpdate:${kebabProp}`)));
|
||||
}) : computed(() => {
|
||||
void props[prop];
|
||||
return !!(vm.vnode.props?.hasOwnProperty(prop) && vm.vnode.props?.hasOwnProperty(`onUpdate:${prop}`));
|
||||
});
|
||||
useToggleScope(() => !isControlled.value, () => {
|
||||
watch(() => props[prop], (val) => {
|
||||
internal.value = val;
|
||||
});
|
||||
});
|
||||
const model = computed({
|
||||
get() {
|
||||
const externalValue = props[prop];
|
||||
return transformIn(isControlled.value ? externalValue : internal.value);
|
||||
},
|
||||
set(internalValue) {
|
||||
const newValue = transformOut(internalValue);
|
||||
const value = toRaw(isControlled.value ? props[prop] : internal.value);
|
||||
if (value === newValue || transformIn(value) === internalValue) {
|
||||
return;
|
||||
}
|
||||
internal.value = newValue;
|
||||
vm?.emit(`update:${prop}`, newValue);
|
||||
}
|
||||
});
|
||||
Object.defineProperty(model, "externalValue", {
|
||||
get: () => isControlled.value ? props[prop] : internal.value
|
||||
});
|
||||
return model;
|
||||
}
|
||||
|
||||
export {
|
||||
useToggleScope,
|
||||
useProxiedModel
|
||||
};
|
||||
//# sourceMappingURL=chunk-KA77II4V.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/composables/toggleScope.ts", "../../vuetify/src/composables/proxiedModel.ts"],
|
||||
"sourcesContent": ["// Utilities\nimport { effectScope, onScopeDispose, watch } from 'vue'\n\n// Types\nimport type { EffectScope, WatchSource } from 'vue'\n\nexport function useToggleScope (source: WatchSource<boolean>, fn: (reset: () => void) => void) {\n let scope: EffectScope | undefined\n function start () {\n scope = effectScope()\n scope.run(() => fn.length\n ? fn(() => { scope?.stop(); start() })\n : (fn as any)()\n )\n }\n\n watch(source, active => {\n if (active && !scope) {\n start()\n } else if (!active) {\n scope?.stop()\n scope = undefined\n }\n }, { immediate: true })\n\n onScopeDispose(() => {\n scope?.stop()\n })\n}\n", "// Composables\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Utilities\nimport { computed, ref, toRaw, watch } from 'vue'\nimport { getCurrentInstance, toKebabCase } from '@/util'\n\n// Types\nimport type { Ref } from 'vue'\nimport type { EventProp } from '@/util'\n\ntype InnerVal<T> = T extends any[] ? Readonly<T> : T\n\n// Composables\nexport function useProxiedModel<\n Props extends object & { [key in Prop as `onUpdate:${Prop}`]: EventProp | undefined },\n Prop extends Extract<keyof Props, string>,\n Inner = Props[Prop],\n> (\n props: Props,\n prop: Prop,\n defaultValue?: Props[Prop],\n transformIn: (value?: Props[Prop]) => Inner = (v: any) => v,\n transformOut: (value: Inner) => Props[Prop] = (v: any) => v,\n) {\n const vm = getCurrentInstance('useProxiedModel')\n const internal = ref(props[prop] !== undefined ? props[prop] : defaultValue) as Ref<Props[Prop]>\n const kebabProp = toKebabCase(prop)\n const checkKebab = kebabProp !== prop\n\n const isControlled = checkKebab\n ? computed(() => {\n void props[prop]\n return !!(\n (vm.vnode.props?.hasOwnProperty(prop) || vm.vnode.props?.hasOwnProperty(kebabProp)) &&\n (vm.vnode.props?.hasOwnProperty(`onUpdate:${prop}`) || vm.vnode.props?.hasOwnProperty(`onUpdate:${kebabProp}`))\n )\n })\n : computed(() => {\n void props[prop]\n return !!(vm.vnode.props?.hasOwnProperty(prop) && vm.vnode.props?.hasOwnProperty(`onUpdate:${prop}`))\n })\n\n useToggleScope(() => !isControlled.value, () => {\n watch(() => props[prop], val => {\n internal.value = val\n })\n })\n\n const model = computed({\n get (): any {\n const externalValue = props[prop]\n return transformIn(isControlled.value ? externalValue : internal.value)\n },\n set (internalValue) {\n const newValue = transformOut(internalValue)\n const value = toRaw(isControlled.value ? props[prop] : internal.value)\n if (value === newValue || transformIn(value) === internalValue) {\n return\n }\n internal.value = newValue\n vm?.emit(`update:${prop}`, newValue)\n },\n }) as any as Ref<InnerVal<Inner>> & { readonly externalValue: Props[Prop] }\n\n Object.defineProperty(model, 'externalValue', {\n get: () =>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H,CAAC,IACCI,SAAS,MAAM;AACf,SAAKjB,MAAMC,IAAI;AACf,WAAO,CAAC,EAAEQ,GAAGS,MAAMlB,OAAOmB,eAAelB,IAAI,KAAKQ,GAAGS,MAAMlB,OAAOmB,eAAe,YAAYlB,IAAI,EAAE;EACrG,CAAC;AAEHmB,iBAAe,MAAM,CAACJ,aAAaK,OAAO,MAAM;AAC9CC,UAAM,MAAMtB,MAAMC,IAAI,GAAGsB,SAAO;AAC9BZ,eAASU,QAAQE;IACnB,CAAC;EACH,CAAC;AAED,QAAMC,QAAQP,SAAS;IACrBQ,MAAY;AACV,YAAMC,gBAAgB1B,MAAMC,IAAI;AAChC,aAAOE,YAAYa,aAAaK,QAAQK,gBAAgBf,SAASU,KAAK;IACxE;IACAM,IAAKC,eAAe;AAClB,YAAMC,WAAWrB,aAAaoB,aAAa;AAC3C,YAAMP,QAAQS,MAAMd,aAAaK,QAAQrB,MAAMC,IAAI,IAAIU,SAASU,KAAK;AACrE,UAAIA,UAAUQ,YAAY1B,YAAYkB,KAAK,MAAMO,eAAe;AAC9D;MACF;AACAjB,eAASU,QAAQQ;AACjBpB,UAAIsB,KAAK,UAAU9B,IAAI,IAAI4B,QAAQ;IACrC;EACF,CAAC;AAEDG,SAAOC,eAAeT,OAAO,iBAAiB;IAC5CC,KAAKA,MAAMT,aAAaK,QAAQrB,MAAMC,IAAI,IAAIU,SAASU;EACzD,CAAC;AAED,SAAOG;AACT;",
|
||||
"names": ["useToggleScope", "source", "fn", "scope", "start", "effectScope", "run", "length", "stop", "watch", "active", "undefined", "immediate", "onScopeDispose", "useProxiedModel", "props", "prop", "defaultValue", "transformIn", "arguments", "length", "undefined", "v", "transformOut", "vm", "getCurrentInstance", "internal", "ref", "kebabProp", "toKebabCase", "checkKebab", "isControlled", "computed", "vnode", "hasOwnProperty", "useToggleScope", "value", "watch", "val", "model", "get", "externalValue", "set", "internalValue", "newValue", "toRaw", "emit", "Object", "defineProperty"]
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
import {
|
||||
VClassIcon
|
||||
} from "./chunk-OJDZBU5D.js";
|
||||
import {
|
||||
h
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/iconsets/mdi.js
|
||||
var aliases = {
|
||||
collapse: "mdi-chevron-up",
|
||||
complete: "mdi-check",
|
||||
cancel: "mdi-close-circle",
|
||||
close: "mdi-close",
|
||||
delete: "mdi-close-circle",
|
||||
// delete (e.g. v-chip close)
|
||||
clear: "mdi-close-circle",
|
||||
success: "mdi-check-circle",
|
||||
info: "mdi-information",
|
||||
warning: "mdi-alert-circle",
|
||||
error: "mdi-close-circle",
|
||||
prev: "mdi-chevron-left",
|
||||
next: "mdi-chevron-right",
|
||||
checkboxOn: "mdi-checkbox-marked",
|
||||
checkboxOff: "mdi-checkbox-blank-outline",
|
||||
checkboxIndeterminate: "mdi-minus-box",
|
||||
delimiter: "mdi-circle",
|
||||
// for carousel
|
||||
sortAsc: "mdi-arrow-up",
|
||||
sortDesc: "mdi-arrow-down",
|
||||
expand: "mdi-chevron-down",
|
||||
menu: "mdi-menu",
|
||||
subgroup: "mdi-menu-down",
|
||||
dropdown: "mdi-menu-down",
|
||||
radioOn: "mdi-radiobox-marked",
|
||||
radioOff: "mdi-radiobox-blank",
|
||||
edit: "mdi-pencil",
|
||||
ratingEmpty: "mdi-star-outline",
|
||||
ratingFull: "mdi-star",
|
||||
ratingHalf: "mdi-star-half-full",
|
||||
loading: "mdi-cached",
|
||||
first: "mdi-page-first",
|
||||
last: "mdi-page-last",
|
||||
unfold: "mdi-unfold-more-horizontal",
|
||||
file: "mdi-paperclip",
|
||||
plus: "mdi-plus",
|
||||
minus: "mdi-minus",
|
||||
calendar: "mdi-calendar",
|
||||
treeviewCollapse: "mdi-menu-down",
|
||||
treeviewExpand: "mdi-menu-right",
|
||||
tableGroupCollapse: "mdi-chevron-down",
|
||||
tableGroupExpand: "mdi-chevron-right",
|
||||
eyeDropper: "mdi-eyedropper",
|
||||
upload: "mdi-cloud-upload",
|
||||
color: "mdi-palette",
|
||||
command: "mdi-apple-keyboard-command",
|
||||
ctrl: "mdi-apple-keyboard-control",
|
||||
space: "mdi-keyboard-space",
|
||||
shift: "mdi-apple-keyboard-shift",
|
||||
alt: "mdi-apple-keyboard-option",
|
||||
enter: "mdi-keyboard-return",
|
||||
arrowup: "mdi-arrow-up",
|
||||
arrowdown: "mdi-arrow-down",
|
||||
arrowleft: "mdi-arrow-left",
|
||||
arrowright: "mdi-arrow-right",
|
||||
backspace: "mdi-backspace",
|
||||
play: "mdi-play",
|
||||
pause: "mdi-pause",
|
||||
fullscreen: "mdi-fullscreen",
|
||||
fullscreenExit: "mdi-fullscreen-exit",
|
||||
volumeHigh: "mdi-volume-high",
|
||||
volumeMedium: "mdi-volume-medium",
|
||||
volumeLow: "mdi-volume-low",
|
||||
volumeOff: "mdi-volume-variant-off"
|
||||
};
|
||||
var mdi = {
|
||||
// Not using mergeProps here, functional components merge props by default (?)
|
||||
component: (props) => h(VClassIcon, {
|
||||
...props,
|
||||
class: "mdi"
|
||||
})
|
||||
};
|
||||
|
||||
export {
|
||||
aliases,
|
||||
mdi
|
||||
};
|
||||
//# sourceMappingURL=chunk-KPWCGWEX.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/iconsets/mdi.ts"],
|
||||
"sourcesContent": ["// Composables\nimport { VClassIcon } from '@/composables/icons'\n\n// Utilities\nimport { h } from 'vue'\n\n// Types\nimport type { IconAliases, IconSet } from '@/composables/icons'\n\nconst aliases: IconAliases = {\n collapse: 'mdi-chevron-up',\n complete: 'mdi-check',\n cancel: 'mdi-close-circle',\n close: 'mdi-close',\n delete: 'mdi-close-circle', // delete (e.g. v-chip close)\n clear: 'mdi-close-circle',\n success: 'mdi-check-circle',\n info: 'mdi-information',\n warning: 'mdi-alert-circle',\n error: 'mdi-close-circle',\n prev: 'mdi-chevron-left',\n next: 'mdi-chevron-right',\n checkboxOn: 'mdi-checkbox-marked',\n checkboxOff: 'mdi-checkbox-blank-outline',\n checkboxIndeterminate: 'mdi-minus-box',\n delimiter: 'mdi-circle', // for carousel\n sortAsc: 'mdi-arrow-up',\n sortDesc: 'mdi-arrow-down',\n expand: 'mdi-chevron-down',\n menu: 'mdi-menu',\n subgroup: 'mdi-menu-down',\n dropdown: 'mdi-menu-down',\n radioOn: 'mdi-radiobox-marked',\n radioOff: 'mdi-radiobox-blank',\n edit: 'mdi-pencil',\n ratingEmpty: 'mdi-star-outline',\n ratingFull: 'mdi-star',\n ratingHalf: 'mdi-star-half-full',\n loading: 'mdi-cached',\n first: 'mdi-page-first',\n last: 'mdi-page-last',\n unfold: 'mdi-unfold-more-horizontal',\n file: 'mdi-paperclip',\n plus: 'mdi-plus',\n minus: 'mdi-minus',\n calendar: 'mdi-calendar',\n treeviewCollapse: 'mdi-menu-down',\n treeviewExpand: 'mdi-menu-right',\n tableGroupCollapse: 'mdi-chevron-down',\n tableGroupExpand: 'mdi-chevron-right',\n eyeDropper: 'mdi-eyedropper',\n upload: 'mdi-cloud-upload',\n color: 'mdi-palette',\n command: 'mdi-apple-keyboard-command',\n ctrl: 'mdi-apple-keyboard-control',\n space: 'mdi-keyboard-space',\n shift: 'mdi-apple-keyboard-shift',\n alt: 'mdi-apple-keyboard-option',\n enter: 'mdi-keyboard-return',\n arrowup: 'mdi-arrow-up',\n arrowdown: 'mdi-arrow-down',\n arrowleft: 'mdi-arrow-left',\n arrowright: 'mdi-arrow-right',\n backspace: 'mdi-backspace',\n play: 'mdi-play',\n pause: 'mdi-pause',\n fullscreen: 'mdi-fullscreen',\n fullscreenExit: 'mdi-fullscreen-exit',\n volumeHigh: 'mdi-volume-high',\n volumeMedium: 'mdi-volume-medium',\n volumeLow: 'mdi-volume-low',\n volumeOff: 'mdi-volume-variant-off',\n}\n\nconst mdi: IconSet = {\n // Not using mergeProps here, functional components merge props by default (?)\n component: (props: any) => h(VClassIcon, { ...props, class: 'mdi' }),\n}\n\nexport { aliases, mdi }\n"],
|
||||
"mappings": ";;;;;;;;AASA,IAAMA,UAAuB;EAC3BC,UAAU;EACVC,UAAU;EACVC,QAAQ;EACRC,OAAO;EACPC,QAAQ;;EACRC,OAAO;EACPC,SAAS;EACTC,MAAM;EACNC,SAAS;EACTC,OAAO;EACPC,MAAM;EACNC,MAAM;EACNC,YAAY;EACZC,aAAa;EACbC,uBAAuB;EACvBC,WAAW;;EACXC,SAAS;EACTC,UAAU;EACVC,QAAQ;EACRC,MAAM;EACNC,UAAU;EACVC,UAAU;EACVC,SAAS;EACTC,UAAU;EACVC,MAAM;EACNC,aAAa;EACbC,YAAY;EACZC,YAAY;EACZC,SAAS;EACTC,OAAO;EACPC,MAAM;EACNC,QAAQ;EACRC,MAAM;EACNC,MAAM;EACNC,OAAO;EACPC,UAAU;EACVC,kBAAkB;EAClBC,gBAAgB;EAChBC,oBAAoB;EACpBC,kBAAkB;EAClBC,YAAY;EACZC,QAAQ;EACRC,OAAO;EACPC,SAAS;EACTC,MAAM;EACNC,OAAO;EACPC,OAAO;EACPC,KAAK;EACLC,OAAO;EACPC,SAAS;EACTC,WAAW;EACXC,WAAW;EACXC,YAAY;EACZC,WAAW;EACXC,MAAM;EACNC,OAAO;EACPC,YAAY;EACZC,gBAAgB;EAChBC,YAAY;EACZC,cAAc;EACdC,WAAW;EACXC,WAAW;AACb;AAEA,IAAMC,MAAe;;EAEnBC,WAAYC,WAAeC,EAAEC,YAAY;IAAE,GAAGF;IAAOG,OAAO;EAAM,CAAC;AACrE;",
|
||||
"names": ["aliases", "collapse", "complete", "cancel", "close", "delete", "clear", "success", "info", "warning", "error", "prev", "next", "checkboxOn", "checkboxOff", "checkboxIndeterminate", "delimiter", "sortAsc", "sortDesc", "expand", "menu", "subgroup", "dropdown", "radioOn", "radioOff", "edit", "ratingEmpty", "ratingFull", "ratingHalf", "loading", "first", "last", "unfold", "file", "plus", "minus", "calendar", "treeviewCollapse", "treeviewExpand", "tableGroupCollapse", "tableGroupExpand", "eyeDropper", "upload", "color", "command", "ctrl", "space", "shift", "alt", "enter", "arrowup", "arrowdown", "arrowleft", "arrowright", "backspace", "play", "pause", "fullscreen", "fullscreenExit", "volumeHigh", "volumeMedium", "volumeLow", "volumeOff", "mdi", "component", "props", "h", "VClassIcon", "class"]
|
||||
}
|
||||
+304
@@ -0,0 +1,304 @@
|
||||
import {
|
||||
useResizeObserver
|
||||
} from "./chunk-XDSAO7OT.js";
|
||||
import {
|
||||
consoleWarn,
|
||||
convertToUnit,
|
||||
findChildrenWithProvide,
|
||||
getCurrentInstance,
|
||||
propsFactory
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
computed,
|
||||
inject,
|
||||
onActivated,
|
||||
onBeforeUnmount,
|
||||
onDeactivated,
|
||||
onMounted,
|
||||
provide,
|
||||
reactive,
|
||||
ref,
|
||||
shallowRef,
|
||||
toRef,
|
||||
useId
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/composables/layout.js
|
||||
var VuetifyLayoutKey = /* @__PURE__ */ Symbol.for("vuetify:layout");
|
||||
var VuetifyLayoutItemKey = /* @__PURE__ */ Symbol.for("vuetify:layout-item");
|
||||
var ROOT_ZINDEX = 1e3;
|
||||
var makeLayoutProps = propsFactory({
|
||||
overlaps: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
fullHeight: Boolean
|
||||
}, "layout");
|
||||
var makeLayoutItemProps = propsFactory({
|
||||
name: {
|
||||
type: String
|
||||
},
|
||||
order: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
},
|
||||
absolute: Boolean
|
||||
}, "layout-item");
|
||||
function useLayout() {
|
||||
const layout = inject(VuetifyLayoutKey);
|
||||
if (!layout) throw new Error("[Vuetify] Could not find injected layout");
|
||||
return {
|
||||
getLayoutItem: layout.getLayoutItem,
|
||||
mainRect: layout.mainRect,
|
||||
mainStyles: layout.mainStyles
|
||||
};
|
||||
}
|
||||
function useLayoutItem(options) {
|
||||
const layout = inject(VuetifyLayoutKey);
|
||||
if (!layout) throw new Error("[Vuetify] Could not find injected layout");
|
||||
const id = options.id ?? `layout-item-${useId()}`;
|
||||
const vm = getCurrentInstance("useLayoutItem");
|
||||
provide(VuetifyLayoutItemKey, {
|
||||
id
|
||||
});
|
||||
const isKeptAlive = shallowRef(false);
|
||||
onDeactivated(() => isKeptAlive.value = true);
|
||||
onActivated(() => isKeptAlive.value = false);
|
||||
const {
|
||||
layoutItemStyles,
|
||||
layoutItemScrimStyles
|
||||
} = layout.register(vm, {
|
||||
...options,
|
||||
active: computed(() => isKeptAlive.value ? false : options.active.value),
|
||||
id
|
||||
});
|
||||
onBeforeUnmount(() => layout.unregister(id));
|
||||
return {
|
||||
layoutItemStyles,
|
||||
layoutRect: layout.layoutRect,
|
||||
layoutItemScrimStyles
|
||||
};
|
||||
}
|
||||
var generateLayers = (layout, positions, layoutSizes, activeItems) => {
|
||||
let previousLayer = {
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0
|
||||
};
|
||||
const layers = [{
|
||||
id: "",
|
||||
layer: {
|
||||
...previousLayer
|
||||
}
|
||||
}];
|
||||
for (const id of layout) {
|
||||
const position = positions.get(id);
|
||||
const amount = layoutSizes.get(id);
|
||||
const active = activeItems.get(id);
|
||||
if (!position || !amount || !active) continue;
|
||||
const layer = {
|
||||
...previousLayer,
|
||||
[position.value]: parseInt(previousLayer[position.value], 10) + (active.value ? parseInt(amount.value, 10) : 0)
|
||||
};
|
||||
layers.push({
|
||||
id,
|
||||
layer
|
||||
});
|
||||
previousLayer = layer;
|
||||
}
|
||||
return layers;
|
||||
};
|
||||
function createLayout(props) {
|
||||
const parentLayout = inject(VuetifyLayoutKey, null);
|
||||
const rootZIndex = computed(() => parentLayout ? parentLayout.rootZIndex.value - 100 : ROOT_ZINDEX);
|
||||
const registered = ref([]);
|
||||
const positions = reactive(/* @__PURE__ */ new Map());
|
||||
const layoutSizes = reactive(/* @__PURE__ */ new Map());
|
||||
const priorities = reactive(/* @__PURE__ */ new Map());
|
||||
const activeItems = reactive(/* @__PURE__ */ new Map());
|
||||
const disabledTransitions = reactive(/* @__PURE__ */ new Map());
|
||||
const {
|
||||
resizeRef,
|
||||
contentRect: layoutRect
|
||||
} = useResizeObserver();
|
||||
const computedOverlaps = computed(() => {
|
||||
const map = /* @__PURE__ */ new Map();
|
||||
const overlaps = props.overlaps ?? [];
|
||||
for (const overlap of overlaps.filter((item) => item.includes(":"))) {
|
||||
const [top, bottom] = overlap.split(":");
|
||||
if (!registered.value.includes(top) || !registered.value.includes(bottom)) continue;
|
||||
const topPosition = positions.get(top);
|
||||
const bottomPosition = positions.get(bottom);
|
||||
const topAmount = layoutSizes.get(top);
|
||||
const bottomAmount = layoutSizes.get(bottom);
|
||||
if (!topPosition || !bottomPosition || !topAmount || !bottomAmount) continue;
|
||||
map.set(bottom, {
|
||||
position: topPosition.value,
|
||||
amount: parseInt(topAmount.value, 10)
|
||||
});
|
||||
map.set(top, {
|
||||
position: bottomPosition.value,
|
||||
amount: -parseInt(bottomAmount.value, 10)
|
||||
});
|
||||
}
|
||||
return map;
|
||||
});
|
||||
const layers = computed(() => {
|
||||
const uniquePriorities = [...new Set([...priorities.values()].map((p) => p.value))].sort((a, b) => a - b);
|
||||
const layout = [];
|
||||
for (const p of uniquePriorities) {
|
||||
const items2 = registered.value.filter((id) => priorities.get(id)?.value === p);
|
||||
layout.push(...items2);
|
||||
}
|
||||
return generateLayers(layout, positions, layoutSizes, activeItems);
|
||||
});
|
||||
const transitionsEnabled = computed(() => {
|
||||
return !Array.from(disabledTransitions.values()).some((ref2) => ref2.value);
|
||||
});
|
||||
const mainRect = computed(() => {
|
||||
return layers.value[layers.value.length - 1].layer;
|
||||
});
|
||||
const mainStyles = toRef(() => {
|
||||
return {
|
||||
"--v-layout-left": convertToUnit(mainRect.value.left),
|
||||
"--v-layout-right": convertToUnit(mainRect.value.right),
|
||||
"--v-layout-top": convertToUnit(mainRect.value.top),
|
||||
"--v-layout-bottom": convertToUnit(mainRect.value.bottom),
|
||||
...transitionsEnabled.value ? void 0 : {
|
||||
transition: "none"
|
||||
}
|
||||
};
|
||||
});
|
||||
const items = computed(() => {
|
||||
return layers.value.slice(1).map((_ref, index) => {
|
||||
let {
|
||||
id
|
||||
} = _ref;
|
||||
const {
|
||||
layer
|
||||
} = layers.value[index];
|
||||
const size = layoutSizes.get(id);
|
||||
const position = positions.get(id);
|
||||
return {
|
||||
id,
|
||||
...layer,
|
||||
size: Number(size.value),
|
||||
position: position.value
|
||||
};
|
||||
});
|
||||
});
|
||||
const getLayoutItem = (id) => {
|
||||
return items.value.find((item) => item.id === id);
|
||||
};
|
||||
const rootVm = getCurrentInstance("createLayout");
|
||||
const isMounted = shallowRef(false);
|
||||
onMounted(() => {
|
||||
isMounted.value = true;
|
||||
});
|
||||
provide(VuetifyLayoutKey, {
|
||||
register: (vm, _ref2) => {
|
||||
let {
|
||||
id,
|
||||
order,
|
||||
position,
|
||||
layoutSize,
|
||||
elementSize,
|
||||
active,
|
||||
disableTransitions,
|
||||
absolute
|
||||
} = _ref2;
|
||||
priorities.set(id, order);
|
||||
positions.set(id, position);
|
||||
layoutSizes.set(id, layoutSize);
|
||||
activeItems.set(id, active);
|
||||
disableTransitions && disabledTransitions.set(id, disableTransitions);
|
||||
const instances = findChildrenWithProvide(VuetifyLayoutItemKey, rootVm?.vnode);
|
||||
const instanceIndex = instances.indexOf(vm);
|
||||
if (instanceIndex > -1) registered.value.splice(instanceIndex, 0, id);
|
||||
else registered.value.push(id);
|
||||
const index = computed(() => items.value.findIndex((i) => i.id === id));
|
||||
const zIndex = computed(() => rootZIndex.value + layers.value.length * 2 - index.value * 2);
|
||||
const layoutItemStyles = computed(() => {
|
||||
const isHorizontal = position.value === "left" || position.value === "right";
|
||||
const isOppositeHorizontal = position.value === "right";
|
||||
const isOppositeVertical = position.value === "bottom";
|
||||
const size = elementSize.value ?? layoutSize.value;
|
||||
const unit = size === 0 ? "%" : "px";
|
||||
const styles = {
|
||||
[position.value]: 0,
|
||||
zIndex: zIndex.value,
|
||||
transform: `translate${isHorizontal ? "X" : "Y"}(${(active.value ? 0 : -(size === 0 ? 100 : size)) * (isOppositeHorizontal || isOppositeVertical ? -1 : 1)}${unit})`,
|
||||
position: absolute.value || rootZIndex.value !== ROOT_ZINDEX ? "absolute" : "fixed",
|
||||
...transitionsEnabled.value ? void 0 : {
|
||||
transition: "none"
|
||||
}
|
||||
};
|
||||
if (!isMounted.value) return styles;
|
||||
const item = items.value[index.value];
|
||||
if (!item) consoleWarn(`[Vuetify] Could not find layout item "${id}"`);
|
||||
const overlap = computedOverlaps.value.get(id);
|
||||
if (overlap) {
|
||||
item[overlap.position] += overlap.amount;
|
||||
}
|
||||
return {
|
||||
...styles,
|
||||
height: isHorizontal ? `calc(100% - ${item.top}px - ${item.bottom}px)` : elementSize.value ? `${elementSize.value}px` : void 0,
|
||||
left: isOppositeHorizontal ? void 0 : `${item.left}px`,
|
||||
right: isOppositeHorizontal ? `${item.right}px` : void 0,
|
||||
top: position.value !== "bottom" ? `${item.top}px` : void 0,
|
||||
bottom: position.value !== "top" ? `${item.bottom}px` : void 0,
|
||||
width: !isHorizontal ? `calc(100% - ${item.left}px - ${item.right}px)` : elementSize.value ? `${elementSize.value}px` : void 0
|
||||
};
|
||||
});
|
||||
const layoutItemScrimStyles = computed(() => ({
|
||||
zIndex: zIndex.value - 1
|
||||
}));
|
||||
return {
|
||||
layoutItemStyles,
|
||||
layoutItemScrimStyles,
|
||||
zIndex
|
||||
};
|
||||
},
|
||||
unregister: (id) => {
|
||||
priorities.delete(id);
|
||||
positions.delete(id);
|
||||
layoutSizes.delete(id);
|
||||
activeItems.delete(id);
|
||||
disabledTransitions.delete(id);
|
||||
registered.value = registered.value.filter((v) => v !== id);
|
||||
},
|
||||
mainRect,
|
||||
mainStyles,
|
||||
getLayoutItem,
|
||||
items,
|
||||
layoutRect,
|
||||
rootZIndex
|
||||
});
|
||||
const layoutClasses = toRef(() => ["v-layout", {
|
||||
"v-layout--full-height": props.fullHeight
|
||||
}]);
|
||||
const layoutStyles = toRef(() => ({
|
||||
zIndex: parentLayout ? rootZIndex.value : void 0,
|
||||
position: parentLayout ? "relative" : void 0,
|
||||
overflow: parentLayout ? "hidden" : void 0
|
||||
}));
|
||||
return {
|
||||
layoutClasses,
|
||||
layoutStyles,
|
||||
getLayoutItem,
|
||||
items,
|
||||
layoutRect,
|
||||
layoutRef: resizeRef
|
||||
};
|
||||
}
|
||||
|
||||
export {
|
||||
VuetifyLayoutKey,
|
||||
makeLayoutProps,
|
||||
makeLayoutItemProps,
|
||||
useLayout,
|
||||
useLayoutItem,
|
||||
createLayout
|
||||
};
|
||||
//# sourceMappingURL=chunk-KQXZAEJP.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/composables/layout.ts"],
|
||||
"sourcesContent": ["// Composables\nimport { useResizeObserver } from '@/composables/resizeObserver'\n\n// Utilities\nimport {\n computed,\n inject,\n onActivated,\n onBeforeUnmount,\n onDeactivated,\n onMounted,\n provide,\n reactive,\n ref,\n shallowRef, toRef,\n useId,\n} from 'vue'\nimport { consoleWarn, convertToUnit, findChildrenWithProvide, getCurrentInstance, propsFactory } from '@/util'\n\n// Types\nimport type { ComponentInternalInstance, CSSProperties, InjectionKey, Prop, Ref } from 'vue'\n\nexport type Position = 'top' | 'left' | 'right' | 'bottom'\n\ninterface Layer {\n top: number\n bottom: number\n left: number\n right: number\n}\n\ninterface LayoutItem extends Layer {\n id: string\n size: number\n position: Position\n}\n\ninterface LayoutProvide {\n register: (\n vm: ComponentInternalInstance,\n options: {\n id: string\n order: Ref<number>\n position: Ref<Position>\n layoutSize: Ref<number | string>\n elementSize: Ref<number | string | undefined>\n active: Ref<boolean>\n disableTransitions?: Ref<boolean>\n absolute: Ref<boolean | undefined>\n }\n ) => {\n layoutItemStyles: Ref<CSSProperties>\n layoutItemScrimStyles: Ref<CSSProperties>\n zIndex: Ref<number>\n }\n unregister: (id: string) => void\n mainRect: Ref<Layer>\n mainStyles: Ref<CSSProperties>\n getLayoutItem: (id: string) => LayoutItem | undefined\n items: Ref<LayoutItem[]>\n layoutRect: Ref<DOMRectReadOnly | undefined>\n rootZIndex: Ref<number>\n}\n\nexport const VuetifyLayoutKey: InjectionKey<LayoutProvide> = Symbol.for('vuetify:layout')\nexport const VuetifyLayoutItemKey: InjectionKey<{ id: string }> = Symbol.for('vuetify:layout-item')\n\nconst ROOT_ZINDEX = 1000\n\nexport const makeLayoutProps = propsFactory({\n overlaps: {\n type: Array,\n default: () => ([]),\n } as Prop<string[]>,\n fullHeight: Boolean,\n}, 'layout')\n\n// Composables\nexport const makeLayoutItemProps = propsFactory({\n name: {\n type: String,\n },\n order: {\n type: [Number, String],\n default: 0,\n },\n absolute: Boolean,\n}, 'layout-item')\n\nexport function useLayout () {\n const layout = inject(VuetifyLayoutKey)\n\n if (!layout) throw new Error('[Vuetify] Could not find injected layout')\n\n return {\n getLayoutItem: layout.getLayoutItem,\n mainRect: layout.mainRect,\n mainStyles: layout.mainStyles,\n }\n}\n\nexport function useLayoutItem (options: {\n id: string | undefined\n order: Ref<number>\n position: Ref<Position>\n layoutSize: Ref<number | string>\n elementSize: Ref<number | string | undefined>\n active: Ref<boolean>\n disableTransitions?: Ref<boolean>\n absolute: Ref<boolean | undefined>\n}) {\n const layout = inject(VuetifyLayoutKey)\n\n if (!layout) throw new Error('[Vuetify] Could not find injected layout')\n\n const id = options.id ?? `layout-item-${useId()}`\n\n const vm = getCurrentInstance('useLayoutItem')\n\n provide(VuetifyLayoutItemKey, { id })\n\n const isKeptAlive = shallowRef(false)\n onDeactivated(() => isKeptAlive.value = true)\n onActivated(() => isKeptAlive.value = false)\n\n const {\n layoutItemStyles,\n layoutItemScrimStyles,\n } = layout.register(vm, {\n ...options,\n active: computed(() => isKeptAlive.value ? false : options.active.value),\n id,\n })\n\n onBeforeUnmount(() => layout.unregister(id))\n\n return { layoutItemStyles, layoutRect: layout.layoutRect, layoutItemScrimStyles }\n}\n\nconst generateLayers = (\n layout: string[],\n positions: Map<string, Ref<Position>>,\n layoutSizes: Map<string, Ref<number | string>>,\n activeItems: Map<string, Ref<boolean>>,\n): { id: string, layer: Layer }[] => {\n let previousLayer: Layer = { top: 0, left: 0, right: 0, bottom: 0 }\n const layers = [{ id: '', layer: { ...previousLayer } }]\n for (const id of layout) {\n const position = positions.get(id)\n const amount = layoutSizes.get(id)\n const active = activeItems.get(id)\n if (!position || !amount || !active) continue\n\n const layer = {\n ...previousLayer,\n [position.value]: parseInt(previousLayer[position.value], 10) + (active.value ? parseInt(amount.value, 10) : 0),\n }\n\n layers.push({\n id,\n layer,\n })\n\n previousLayer = layer\n }\n\n return layers\n}\n\nexport function createLayout (props: { overlaps?: string[], fullHeight?: boolean }) {\n const parentLayout = inject(VuetifyLayoutKey, null)\n const rootZIndex = computed(() => parentLayout ? parentLayout.rootZIndex.value - 100 : ROOT_ZINDEX)\n const registered = ref<string[]>([])\n const positions = reactive(new Map<string, Ref<Position>>())\n const layoutSizes = reactive(new Map<string, Ref<number | string>>())\n const priorities = reactive(new Map<string, Ref<number>>())\n const activeItems = reactive(new Map<string, Ref<boolean>>())\n const disabledTransitions = reactive(new Map<string, Ref<boolean>>())\n const { resizeRef, contentRect: layoutRectLine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAgEO,IAAMA,mBAAgDC,uBAAOC,IAAI,gBAAgB;AACjF,IAAMC,uBAAqDF,uBAAOC,IAAI,qBAAqB;AAElG,IAAME,cAAc;AAEb,IAAMC,kBAAkBC,aAAa;EAC1CC,UAAU;IACRC,MAAMC;IACNC,SAASA,MAAO,CAAA;EAClB;EACAC,YAAYC;AACd,GAAG,QAAQ;AAGJ,IAAMC,sBAAsBP,aAAa;EAC9CQ,MAAM;IACJN,MAAMO;EACR;EACAC,OAAO;IACLR,MAAM,CAACS,QAAQF,M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AI1D,IAAIa,MAAM;AAC1ByE,4BAAsB3C,oBAAoBe,IAAI1D,IAAIsF,kBAAkB;AAEpE,YAAMC,YAAYC,wBAAwBjH,sBAAsByG,QAAQS,KAAK;AAC7E,YAAMC,gBAAgBH,UAAUI,QAAQzF,EAAE;AAE1C,UAAIwF,gBAAgB,GAAIpD,YAAW9B,MAAMoF,OAAOF,eAAe,GAAG1F,EAAE;UAC/DsC,YAAW9B,MAAMyB,KAAKjC,EAAE;AAE7B,YAAM6E,QAAQ/D,SAAS,MAAMoD,MAAM1D,MAAMqF,UAAUC,OAAKA,EAAE9F,OAAOA,EAAE,CAAC;AACpE,YAAM+F,SAASjF,SAAS,MAAMuB,WAAW7B,QAASmB,OAAOnB,MAAM8D,SAAS,IAAMO,MAAMrE,QAAQ,CAAE;AAE9F,YAAME,mBAAmBI,SAAwB,MAAM;AACrD,cAAMkF,eAAenLine truncated
|
||||
"names": ["VuetifyLayoutKey", "Symbol", "for", "VuetifyLayoutItemKey", "ROOT_ZINDEX", "makeLayoutProps", "propsFactory", "overlaps", "type", "Array", "default", "fullHeight", "Boolean", "makeLayoutItemProps", "name", "String", "order", "Number", "absolute", "useLayout", "layout", "inject", "Error", "getLayoutItem", "mainRect", "mainStyles", "useLayoutItem", "options", "id", "useId", "vm", "getCurrentInstance", "provide", "isKeptAlive", "shallowRef", "onDeactivated", "value", "onActivated", "layoutItemStyles", "layoutItemScrimStyles", "register", "active", "computed", "onBeforeUnmount", "unregister", "layoutRect", "generateLayers", "positions", "layoutSizes", "activeItems", "previousLayer", "top", "left", "right", "bottom", "layers", "layer", "position", "get", "amount", "parseInt", "push", "createLayout", "props", "parentLayout", "rootZIndex", "registered", "ref", "reactive", "Map", "priorities", "disabledTransitions", "resizeRef", "contentRect", "useResizeObserver", "computedOverlaps", "map", "overlap", "filter", "item", "includes", "split", "topPosition", "bottomPosition", "topAmount", "bottomAmount", "set", "uniquePriorities", "Set", "values", "p", "sort", "a", "b", "items", "transitionsEnabled", "from", "some", "length", "toRef", "convertToUnit", "undefined", "transition", "slice", "_ref", "index", "size", "find", "rootVm", "isMounted", "onMounted", "_ref2", "layoutSize", "elementSize", "disableTransitions", "instances", "findChildrenWithProvide", "vnode", "instanceIndex", "indexOf", "splice", "findIndex", "i", "zIndex", "isHorizontal", "isOppositeHorizontal", "isOppositeVertical", "unit", "styles", "transform", "consoleWarn", "height", "width", "delete", "v", "layoutClasses", "layoutStyles", "overflow", "layoutRef"]
|
||||
}
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
import {
|
||||
useRtl
|
||||
} from "./chunk-ENTLCOCZ.js";
|
||||
import {
|
||||
parseAnchor,
|
||||
propsFactory
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
computed
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/composables/location.js
|
||||
var oppositeMap = {
|
||||
center: "center",
|
||||
top: "bottom",
|
||||
bottom: "top",
|
||||
left: "right",
|
||||
right: "left"
|
||||
};
|
||||
var makeLocationProps = propsFactory({
|
||||
location: String
|
||||
}, "location");
|
||||
function useLocation(props) {
|
||||
let opposite = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
||||
let offset = arguments.length > 2 ? arguments[2] : void 0;
|
||||
const {
|
||||
isRtl
|
||||
} = useRtl();
|
||||
const locationStyles = computed(() => {
|
||||
if (!props.location) return {};
|
||||
const {
|
||||
side,
|
||||
align
|
||||
} = parseAnchor(props.location.split(" ").length > 1 ? props.location : `${props.location} center`, isRtl.value);
|
||||
function getOffset(side2) {
|
||||
return offset ? offset(side2) : 0;
|
||||
}
|
||||
const styles = {};
|
||||
if (side !== "center") {
|
||||
if (opposite) styles[oppositeMap[side]] = `calc(100% - ${getOffset(side)}px)`;
|
||||
else styles[side] = 0;
|
||||
}
|
||||
if (align !== "center") {
|
||||
if (opposite) styles[oppositeMap[align]] = `calc(100% - ${getOffset(align)}px)`;
|
||||
else styles[align] = 0;
|
||||
} else {
|
||||
if (side === "center") styles.top = styles.left = "50%";
|
||||
else {
|
||||
styles[{
|
||||
top: "left",
|
||||
bottom: "left",
|
||||
left: "top",
|
||||
right: "top"
|
||||
}[side]] = "50%";
|
||||
}
|
||||
styles.transform = {
|
||||
top: "translateX(-50%)",
|
||||
bottom: "translateX(-50%)",
|
||||
left: "translateY(-50%)",
|
||||
right: "translateY(-50%)",
|
||||
center: "translate(-50%, -50%)"
|
||||
}[side];
|
||||
}
|
||||
return styles;
|
||||
});
|
||||
return {
|
||||
locationStyles
|
||||
};
|
||||
}
|
||||
|
||||
export {
|
||||
makeLocationProps,
|
||||
useLocation
|
||||
};
|
||||
//# sourceMappingURL=chunk-KTTVT6V2.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/composables/location.ts"],
|
||||
"sourcesContent": ["// Composables\nimport { useRtl } from '@/composables/locale'\n\n// Utilities\nimport { computed } from 'vue'\nimport { parseAnchor, propsFactory } from '@/util'\n\n// Types\nimport type { CSSProperties, PropType } from 'vue'\nimport type { Anchor } from '@/util'\n\nconst oppositeMap = {\n center: 'center',\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n} as const\n\nexport interface LocationProps {\n location: Anchor | null | undefined\n}\n\nexport const makeLocationProps = propsFactory({\n location: String as PropType<Anchor | null>,\n}, 'location')\n\nexport function useLocation (props: LocationProps, opposite = false, offset?: (side: string) => number) {\n const { isRtl } = useRtl()\n\n const locationStyles = computed(() => {\n if (!props.location) return {}\n\n const { side, align } = parseAnchor(\n props.location.split(' ').length > 1\n ? props.location\n : `${props.location} center` as Anchor,\n isRtl.value\n )\n\n function getOffset (side: string) {\n return offset\n ? offset(side)\n : 0\n }\n\n const styles = {} as CSSProperties\n\n if (side !== 'center') {\n if (opposite) styles[oppositeMap[side]] = `calc(100% - ${getOffset(side)}px)`\n else styles[side] = 0\n }\n if (align !== 'center') {\n if (opposite) styles[oppositeMap[align]] = `calc(100% - ${getOffset(align)}px)`\n else styles[align] = 0\n } else {\n if (side === 'center') styles.top = styles.left = '50%'\n else {\n styles[({\n top: 'left',\n bottom: 'left',\n left: 'top',\n right: 'top',\n } as const)[side]] = '50%'\n }\n styles.transform = {\n top: 'translateX(-50%)',\n bottom: 'translateX(-50%)',\n left: 'translateY(-50%)',\n right: 'translateY(-50%)',\n center: 'translate(-50%, -50%)',\n }[side]\n }\n\n return styles\n })\n\n return { locationStyles }\n}\n"],
|
||||
"mappings": ";;;;;;;;;;;;AAWA,IAAMA,cAAc;EAClBC,QAAQ;EACRC,KAAK;EACLC,QAAQ;EACRC,MAAM;EACNC,OAAO;AACT;AAMO,IAAMC,oBAAoBC,aAAa;EAC5CC,UAAUC;AACZ,GAAG,UAAU;AAEN,SAASC,YAAaC,OAA2E;AAAA,MAArDC,WAAQC,UAAAC,SAAA,KAAAD,UAAA,CAAA,MAAAE,SAAAF,UAAA,CAAA,IAAG;AAAK,MAAEG,SAAiCH,UAAAC,SAAA,IAAAD,UAAA,CAAA,IAAAE;AACpG,QAAM;IAAEE;EAAM,IAAIC,OAAO;AAEzB,QAAMC,iBAAiBC,SAAS,MAAM;AACpC,QAAI,CAACT,MAAMH,SAAU,QAAO,CAAC;AAE7B,UAAM;MAAEa;MAAMC;IAAM,IAAIC,YACtBZ,MAAMH,SAASgB,MAAM,GAAG,EAAEV,SAAS,IAC/BH,MAAMH,WACN,GAAGG,MAAMH,QAAQ,WACrBS,MAAMQ,KACR;AAEA,aAASC,UAAWL,OAAc;AAChC,aAAOL,SACHA,OAAOK,KAAI,IACX;IACN;AAEA,UAAMM,SAAS,CAAC;AAEhB,QAAIN,SAAS,UAAU;AACrB,UAAIT,SAAUe,QAAO3B,YAAYqB,IAAI,CAAC,IAAI,eAAeK,UAAUL,IAAI,CAAC;UACnEM,QAAON,IAAI,IAAI;IACtB;AACA,QAAIC,UAAU,UAAU;AACtB,UAAIV,SAAUe,QAAO3B,YAAYsB,KAAK,CAAC,IAAI,eAAeI,UAAUJ,KAAK,CAAC;UACrEK,QAAOL,KAAK,IAAI;IACvB,OAAO;AACL,UAAID,SAAS,SAAUM,QAAOzB,MAAMyB,OAAOvB,OAAO;WAC7C;AACHuB,eAAQ;UACNzB,KAAK;UACLC,QAAQ;UACRC,MAAM;UACNC,OAAO;QACT,EAAYgB,IAAI,CAAC,IAAI;MACvB;AACAM,aAAOC,YAAY;QACjB1B,KAAK;QACLC,QAAQ;QACRC,MAAM;QACNC,OAAO;QACPJ,QAAQ;MACV,EAAEoB,IAAI;IACR;AAEA,WAAOM;EACT,CAAC;AAED,SAAO;IAAER;EAAe;AAC1B;",
|
||||
"names": ["oppositeMap", "center", "top", "bottom", "left", "right", "makeLocationProps", "propsFactory", "location", "String", "useLocation", "props", "opposite", "arguments", "length", "undefined", "offset", "isRtl", "useRtl", "locationStyles", "computed", "side", "align", "parseAnchor", "split", "value", "getOffset", "styles", "transform"]
|
||||
}
|
||||
+830
@@ -0,0 +1,830 @@
|
||||
import {
|
||||
makeElevationProps,
|
||||
useElevation
|
||||
} from "./chunk-YJD2PNP6.js";
|
||||
import {
|
||||
VInput,
|
||||
VLabel,
|
||||
makeFocusProps,
|
||||
makeVInputProps,
|
||||
useFocus
|
||||
} from "./chunk-4VABFUPG.js";
|
||||
import {
|
||||
useForm
|
||||
} from "./chunk-GAYXO4FM.js";
|
||||
import {
|
||||
VScaleTransition
|
||||
} from "./chunk-B4JFJDWM.js";
|
||||
import {
|
||||
makeRoundedProps,
|
||||
useRounded
|
||||
} from "./chunk-AQK3CYVW.js";
|
||||
import {
|
||||
ripple_default
|
||||
} from "./chunk-5BPWKCNA.js";
|
||||
import {
|
||||
forwardRefs
|
||||
} from "./chunk-GUNW7S2L.js";
|
||||
import {
|
||||
useRtl
|
||||
} from "./chunk-ENTLCOCZ.js";
|
||||
import {
|
||||
useProxiedModel
|
||||
} from "./chunk-KA77II4V.js";
|
||||
import {
|
||||
useBackgroundColor,
|
||||
useTextColor
|
||||
} from "./chunk-BHV5Z34M.js";
|
||||
import {
|
||||
clamp,
|
||||
convertToUnit,
|
||||
createRange,
|
||||
filterInputAttrs,
|
||||
genericComponent,
|
||||
getDecimals,
|
||||
keyValues,
|
||||
makeComponentProps,
|
||||
propsFactory,
|
||||
useRender
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
Fragment,
|
||||
computed,
|
||||
createBaseVNode,
|
||||
createVNode,
|
||||
inject,
|
||||
mergeProps,
|
||||
nextTick,
|
||||
normalizeClass,
|
||||
normalizeStyle,
|
||||
onScopeDispose,
|
||||
provide,
|
||||
ref,
|
||||
shallowRef,
|
||||
toRef,
|
||||
vShow,
|
||||
withDirectives
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/VSlider/VSlider.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VSlider/VSlider.css";
|
||||
|
||||
// node_modules/vuetify/lib/components/VSlider/VSliderThumb.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VSlider/VSliderThumb.css";
|
||||
|
||||
// node_modules/vuetify/lib/components/VSlider/slider.js
|
||||
var VSliderSymbol = /* @__PURE__ */ Symbol.for("vuetify:v-slider");
|
||||
function getOffset(e, el, direction) {
|
||||
const vertical = direction === "vertical";
|
||||
const rect = el.getBoundingClientRect();
|
||||
const touch = "touches" in e ? e.touches[0] : e;
|
||||
return vertical ? touch.clientY - (rect.top + rect.height / 2) : touch.clientX - (rect.left + rect.width / 2);
|
||||
}
|
||||
function getPosition(e, position) {
|
||||
if ("touches" in e && e.touches.length) return e.touches[0][position];
|
||||
else if ("changedTouches" in e && e.changedTouches.length) return e.changedTouches[0][position];
|
||||
else return e[position];
|
||||
}
|
||||
var makeSliderProps = propsFactory({
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: null
|
||||
},
|
||||
error: Boolean,
|
||||
readonly: {
|
||||
type: Boolean,
|
||||
default: null
|
||||
},
|
||||
max: {
|
||||
type: [Number, String],
|
||||
default: 100
|
||||
},
|
||||
min: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
},
|
||||
step: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
},
|
||||
thumbColor: String,
|
||||
thumbLabel: {
|
||||
type: [Boolean, String],
|
||||
default: void 0,
|
||||
validator: (v) => typeof v === "boolean" || v === "always"
|
||||
},
|
||||
thumbSize: {
|
||||
type: [Number, String],
|
||||
default: 20
|
||||
},
|
||||
showTicks: {
|
||||
type: [Boolean, String],
|
||||
default: false,
|
||||
validator: (v) => typeof v === "boolean" || v === "always"
|
||||
},
|
||||
ticks: {
|
||||
type: [Array, Object]
|
||||
},
|
||||
tickSize: {
|
||||
type: [Number, String],
|
||||
default: 2
|
||||
},
|
||||
color: String,
|
||||
trackColor: String,
|
||||
trackFillColor: String,
|
||||
trackSize: {
|
||||
type: [Number, String],
|
||||
default: 4
|
||||
},
|
||||
direction: {
|
||||
type: String,
|
||||
default: "horizontal",
|
||||
validator: (v) => ["vertical", "horizontal"].includes(v)
|
||||
},
|
||||
reverse: Boolean,
|
||||
noKeyboard: Boolean,
|
||||
...makeRoundedProps(),
|
||||
...makeElevationProps({
|
||||
elevation: 2
|
||||
}),
|
||||
ripple: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
}, "Slider");
|
||||
var useSteps = (props) => {
|
||||
const min = computed(() => parseFloat(props.min));
|
||||
const max = computed(() => parseFloat(props.max));
|
||||
const step = computed(() => Number(props.step) > 0 ? parseFloat(props.step) : 0);
|
||||
const decimals = computed(() => Math.max(getDecimals(step.value), getDecimals(min.value)));
|
||||
function roundValue(value) {
|
||||
value = parseFloat(value);
|
||||
if (step.value <= 0) return value;
|
||||
const clamped = clamp(value, min.value, max.value);
|
||||
const offset = min.value % step.value;
|
||||
let newValue = Math.round((clamped - offset) / step.value) * step.value + offset;
|
||||
if (clamped > newValue && newValue + step.value > max.value) {
|
||||
newValue = max.value;
|
||||
}
|
||||
return parseFloat(Math.min(newValue, max.value).toFixed(decimals.value));
|
||||
}
|
||||
return {
|
||||
min,
|
||||
max,
|
||||
step,
|
||||
decimals,
|
||||
roundValue
|
||||
};
|
||||
};
|
||||
var useSlider = (_ref) => {
|
||||
let {
|
||||
props,
|
||||
steps,
|
||||
onSliderStart,
|
||||
onSliderMove,
|
||||
onSliderEnd,
|
||||
getActiveThumb
|
||||
} = _ref;
|
||||
const form = useForm(props);
|
||||
const {
|
||||
isRtl
|
||||
} = useRtl();
|
||||
const isReversed = toRef(() => props.reverse);
|
||||
const vertical = computed(() => props.direction === "vertical");
|
||||
const indexFromEnd = computed(() => vertical.value !== isReversed.value);
|
||||
const {
|
||||
min,
|
||||
max,
|
||||
step,
|
||||
decimals,
|
||||
roundValue
|
||||
} = steps;
|
||||
const thumbSize = computed(() => parseInt(props.thumbSize, 10));
|
||||
const tickSize = computed(() => parseInt(props.tickSize, 10));
|
||||
const trackSize = computed(() => parseInt(props.trackSize, 10));
|
||||
const numTicks = computed(() => (max.value - min.value) / step.value);
|
||||
const thumbColor = computed(() => props.error || form.isDisabled.value ? void 0 : props.thumbColor ?? props.color);
|
||||
const thumbLabelColor = computed(() => props.error || form.isDisabled.value ? void 0 : props.thumbColor);
|
||||
const trackColor = computed(() => props.error || form.isDisabled.value ? void 0 : props.trackColor ?? props.color);
|
||||
const trackFillColor = computed(() => props.error || form.isDisabled.value ? void 0 : props.trackFillColor ?? props.color);
|
||||
const mousePressed = shallowRef(false);
|
||||
const startOffset = shallowRef(0);
|
||||
const trackContainerRef = ref();
|
||||
const activeThumbRef = ref();
|
||||
function parseMouseMove(e) {
|
||||
const el = trackContainerRef.value?.$el;
|
||||
if (!el) return;
|
||||
const vertical2 = props.direction === "vertical";
|
||||
const start = vertical2 ? "top" : "left";
|
||||
const length = vertical2 ? "height" : "width";
|
||||
const position2 = vertical2 ? "clientY" : "clientX";
|
||||
const {
|
||||
[start]: trackStart,
|
||||
[length]: trackLength
|
||||
} = el.getBoundingClientRect();
|
||||
const clickOffset = getPosition(e, position2);
|
||||
let clickPos = clamp((clickOffset - trackStart - startOffset.value) / trackLength) || 0;
|
||||
if (vertical2 ? indexFromEnd.value : indexFromEnd.value !== isRtl.value) clickPos = 1 - clickPos;
|
||||
return roundValue(min.value + clickPos * (max.value - min.value));
|
||||
}
|
||||
const handleStop = (e) => {
|
||||
const value = parseMouseMove(e);
|
||||
if (value != null) {
|
||||
onSliderEnd({
|
||||
value
|
||||
});
|
||||
}
|
||||
mousePressed.value = false;
|
||||
startOffset.value = 0;
|
||||
};
|
||||
const handleStart = (e) => {
|
||||
const value = parseMouseMove(e);
|
||||
activeThumbRef.value = getActiveThumb(e);
|
||||
if (!activeThumbRef.value) return;
|
||||
mousePressed.value = true;
|
||||
if (activeThumbRef.value.contains(e.target)) {
|
||||
startOffset.value = getOffset(e, activeThumbRef.value, props.direction);
|
||||
} else {
|
||||
startOffset.value = 0;
|
||||
if (value != null) {
|
||||
onSliderMove({
|
||||
value
|
||||
});
|
||||
}
|
||||
}
|
||||
if (value != null) {
|
||||
onSliderStart({
|
||||
value
|
||||
});
|
||||
}
|
||||
nextTick(() => activeThumbRef.value?.focus());
|
||||
};
|
||||
const moveListenerOptions = {
|
||||
passive: true,
|
||||
capture: true
|
||||
};
|
||||
function onMouseMove(e) {
|
||||
const value = parseMouseMove(e);
|
||||
if (value != null) {
|
||||
onSliderMove({
|
||||
value
|
||||
});
|
||||
}
|
||||
}
|
||||
function onSliderMouseUp(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
handleStop(e);
|
||||
window.removeEventListener("mousemove", onMouseMove, moveListenerOptions);
|
||||
window.removeEventListener("mouseup", onSliderMouseUp);
|
||||
}
|
||||
function onSliderTouchend(e) {
|
||||
handleStop(e);
|
||||
window.removeEventListener("touchmove", onMouseMove, moveListenerOptions);
|
||||
e.target?.removeEventListener("touchend", onSliderTouchend);
|
||||
}
|
||||
function onSliderTouchstart(e) {
|
||||
handleStart(e);
|
||||
window.addEventListener("touchmove", onMouseMove, moveListenerOptions);
|
||||
e.target?.addEventListener("touchend", onSliderTouchend, {
|
||||
passive: false
|
||||
});
|
||||
}
|
||||
function onSliderMousedown(e) {
|
||||
if (e.button !== 0) return;
|
||||
e.preventDefault();
|
||||
handleStart(e);
|
||||
window.addEventListener("mousemove", onMouseMove, moveListenerOptions);
|
||||
window.addEventListener("mouseup", onSliderMouseUp, {
|
||||
passive: false
|
||||
});
|
||||
}
|
||||
onScopeDispose(() => {
|
||||
window.removeEventListener("touchmove", onMouseMove);
|
||||
window.removeEventListener("mousemove", onMouseMove);
|
||||
window.removeEventListener("mouseup", onSliderMouseUp);
|
||||
});
|
||||
const position = (val) => {
|
||||
const percentage = (val - min.value) / (max.value - min.value) * 100;
|
||||
return clamp(isNaN(percentage) ? 0 : percentage, 0, 100);
|
||||
};
|
||||
const showTicks = toRef(() => props.showTicks);
|
||||
const parsedTicks = computed(() => {
|
||||
if (!showTicks.value) return [];
|
||||
if (!props.ticks) {
|
||||
return numTicks.value !== Infinity ? createRange(numTicks.value + 1).map((t) => {
|
||||
const value = min.value + t * step.value;
|
||||
return {
|
||||
value,
|
||||
position: position(value)
|
||||
};
|
||||
}) : [];
|
||||
}
|
||||
if (Array.isArray(props.ticks)) return props.ticks.map((t) => ({
|
||||
value: t,
|
||||
position: position(t),
|
||||
label: t.toString()
|
||||
}));
|
||||
return Object.keys(props.ticks).map((key) => ({
|
||||
value: parseFloat(key),
|
||||
position: position(parseFloat(key)),
|
||||
label: props.ticks[key]
|
||||
}));
|
||||
});
|
||||
const hasLabels = computed(() => parsedTicks.value.some((_ref2) => {
|
||||
let {
|
||||
label
|
||||
} = _ref2;
|
||||
return !!label;
|
||||
}));
|
||||
const data = {
|
||||
activeThumbRef,
|
||||
color: toRef(() => props.color),
|
||||
decimals,
|
||||
disabled: form.isDisabled,
|
||||
direction: toRef(() => props.direction),
|
||||
elevation: toRef(() => props.elevation),
|
||||
hasLabels,
|
||||
isReversed,
|
||||
indexFromEnd,
|
||||
min,
|
||||
max,
|
||||
mousePressed,
|
||||
noKeyboard: toRef(() => props.noKeyboard),
|
||||
numTicks,
|
||||
onSliderMousedown,
|
||||
onSliderTouchstart,
|
||||
parsedTicks,
|
||||
parseMouseMove,
|
||||
position,
|
||||
readonly: form.isReadonly,
|
||||
rounded: toRef(() => props.rounded),
|
||||
roundValue,
|
||||
showTicks,
|
||||
startOffset,
|
||||
step,
|
||||
thumbSize,
|
||||
thumbColor,
|
||||
thumbLabelColor,
|
||||
thumbLabel: toRef(() => props.thumbLabel),
|
||||
ticks: toRef(() => props.ticks),
|
||||
tickSize,
|
||||
trackColor,
|
||||
trackContainerRef,
|
||||
trackFillColor,
|
||||
trackSize,
|
||||
vertical
|
||||
};
|
||||
provide(VSliderSymbol, data);
|
||||
return data;
|
||||
};
|
||||
|
||||
// node_modules/vuetify/lib/components/VSlider/VSliderThumb.js
|
||||
var makeVSliderThumbProps = propsFactory({
|
||||
focused: Boolean,
|
||||
max: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
min: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
modelValue: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
position: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
ripple: {
|
||||
type: [Boolean, Object],
|
||||
default: true
|
||||
},
|
||||
name: String,
|
||||
noKeyboard: Boolean,
|
||||
...makeComponentProps()
|
||||
}, "VSliderThumb");
|
||||
var VSliderThumb = genericComponent()({
|
||||
name: "VSliderThumb",
|
||||
directives: {
|
||||
vRipple: ripple_default
|
||||
},
|
||||
props: makeVSliderThumbProps(),
|
||||
emits: {
|
||||
"update:modelValue": (v) => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots,
|
||||
emit
|
||||
} = _ref;
|
||||
const slider = inject(VSliderSymbol);
|
||||
const {
|
||||
isRtl,
|
||||
rtlClasses
|
||||
} = useRtl();
|
||||
if (!slider) throw new Error("[Vuetify] v-slider-thumb must be used inside v-slider or v-range-slider");
|
||||
const {
|
||||
min,
|
||||
max,
|
||||
thumbColor,
|
||||
thumbLabelColor,
|
||||
step,
|
||||
disabled,
|
||||
thumbSize,
|
||||
thumbLabel,
|
||||
direction,
|
||||
isReversed,
|
||||
vertical,
|
||||
readonly,
|
||||
elevation,
|
||||
mousePressed,
|
||||
decimals,
|
||||
indexFromEnd
|
||||
} = slider;
|
||||
const elevationProps = computed(() => !disabled.value ? elevation.value : void 0);
|
||||
const {
|
||||
elevationClasses
|
||||
} = useElevation(elevationProps);
|
||||
const {
|
||||
textColorClasses,
|
||||
textColorStyles
|
||||
} = useTextColor(thumbColor);
|
||||
const {
|
||||
backgroundColorClasses,
|
||||
backgroundColorStyles
|
||||
} = useBackgroundColor(thumbLabelColor);
|
||||
const {
|
||||
pageup,
|
||||
pagedown,
|
||||
end,
|
||||
home,
|
||||
left,
|
||||
right,
|
||||
down,
|
||||
up
|
||||
} = keyValues;
|
||||
const relevantKeys = [pageup, pagedown, end, home, left, right, down, up];
|
||||
const multipliers = computed(() => {
|
||||
if (step.value) return [1, 2, 3];
|
||||
else return [1, 5, 10];
|
||||
});
|
||||
function parseKeydown(e, value) {
|
||||
if (props.noKeyboard || disabled.value) return;
|
||||
if (!relevantKeys.includes(e.key)) return;
|
||||
e.preventDefault();
|
||||
const _step = step.value || 0.1;
|
||||
const steps = (max.value - min.value) / _step;
|
||||
if ([left, right, down, up].includes(e.key)) {
|
||||
const increase = vertical.value ? [isRtl.value ? left : right, isReversed.value ? down : up] : indexFromEnd.value !== isRtl.value ? [left, up] : [right, up];
|
||||
const direction2 = increase.includes(e.key) ? 1 : -1;
|
||||
const multiplier = e.shiftKey ? 2 : e.ctrlKey ? 1 : 0;
|
||||
if (direction2 === -1 && value === max.value && !multiplier && !Number.isInteger(steps)) {
|
||||
value = value - steps % 1 * _step;
|
||||
} else {
|
||||
value = value + direction2 * _step * multipliers.value[multiplier];
|
||||
}
|
||||
} else if (e.key === home) {
|
||||
value = min.value;
|
||||
} else if (e.key === end) {
|
||||
value = max.value;
|
||||
} else {
|
||||
const direction2 = e.key === pagedown ? 1 : -1;
|
||||
value = value - direction2 * _step * (steps > 100 ? steps / 10 : 10);
|
||||
}
|
||||
return Math.max(props.min, Math.min(props.max, value));
|
||||
}
|
||||
function onKeydown(e) {
|
||||
const newValue = parseKeydown(e, props.modelValue);
|
||||
newValue != null && emit("update:modelValue", newValue);
|
||||
}
|
||||
useRender(() => {
|
||||
const positionPercentage = convertToUnit(indexFromEnd.value ? 100 - props.position : props.position, "%");
|
||||
return createBaseVNode("div", {
|
||||
"class": normalizeClass(["v-slider-thumb", {
|
||||
"v-slider-thumb--focused": props.focused,
|
||||
"v-slider-thumb--pressed": props.focused && mousePressed.value
|
||||
}, props.class, rtlClasses.value]),
|
||||
"style": normalizeStyle([{
|
||||
"--v-slider-thumb-position": positionPercentage,
|
||||
"--v-slider-thumb-size": convertToUnit(thumbSize.value)
|
||||
}, props.style]),
|
||||
"role": "slider",
|
||||
"tabindex": disabled.value ? -1 : 0,
|
||||
"aria-label": props.name,
|
||||
"aria-valuemin": min.value,
|
||||
"aria-valuemax": max.value,
|
||||
"aria-valuenow": props.modelValue,
|
||||
"aria-readonly": !!readonly.value,
|
||||
"aria-orientation": direction.value,
|
||||
"onKeydown": !readonly.value ? onKeydown : void 0
|
||||
}, [createBaseVNode("div", {
|
||||
"class": normalizeClass(["v-slider-thumb__surface", textColorClasses.value, elevationClasses.value]),
|
||||
"style": normalizeStyle(textColorStyles.value)
|
||||
}, null), withDirectives(createBaseVNode("div", {
|
||||
"class": normalizeClass(["v-slider-thumb__ripple", textColorClasses.value]),
|
||||
"style": normalizeStyle(textColorStyles.value)
|
||||
}, null), [[ripple_default, props.ripple, null, {
|
||||
circle: true,
|
||||
center: true
|
||||
}]]), createVNode(VScaleTransition, {
|
||||
"origin": "bottom center"
|
||||
}, {
|
||||
default: () => [withDirectives(createBaseVNode("div", {
|
||||
"class": "v-slider-thumb__label-container"
|
||||
}, [createBaseVNode("div", {
|
||||
"class": normalizeClass(["v-slider-thumb__label", backgroundColorClasses.value]),
|
||||
"style": normalizeStyle(backgroundColorStyles.value)
|
||||
}, [createBaseVNode("div", null, [slots["thumb-label"]?.({
|
||||
modelValue: props.modelValue
|
||||
}) ?? props.modelValue.toFixed(step.value ? decimals.value : 1)]), createBaseVNode("div", {
|
||||
"class": "v-slider-thumb__label-wedge"
|
||||
}, null)])]), [[vShow, thumbLabel.value && props.focused || thumbLabel.value === "always"]])]
|
||||
})]);
|
||||
});
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/vuetify/lib/components/VSlider/VSliderTrack.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VSlider/VSliderTrack.css";
|
||||
var makeVSliderTrackProps = propsFactory({
|
||||
start: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
stop: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
...makeComponentProps()
|
||||
}, "VSliderTrack");
|
||||
var VSliderTrack = genericComponent()({
|
||||
name: "VSliderTrack",
|
||||
props: makeVSliderTrackProps(),
|
||||
emits: {},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
const slider = inject(VSliderSymbol);
|
||||
if (!slider) throw new Error("[Vuetify] v-slider-track must be inside v-slider or v-range-slider");
|
||||
const {
|
||||
color,
|
||||
parsedTicks,
|
||||
rounded,
|
||||
showTicks,
|
||||
tickSize,
|
||||
trackColor,
|
||||
trackFillColor,
|
||||
trackSize,
|
||||
vertical,
|
||||
min,
|
||||
max,
|
||||
indexFromEnd
|
||||
} = slider;
|
||||
const {
|
||||
roundedClasses
|
||||
} = useRounded(rounded);
|
||||
const {
|
||||
backgroundColorClasses: trackFillColorClasses,
|
||||
backgroundColorStyles: trackFillColorStyles
|
||||
} = useBackgroundColor(trackFillColor);
|
||||
const {
|
||||
backgroundColorClasses: trackColorClasses,
|
||||
backgroundColorStyles: trackColorStyles
|
||||
} = useBackgroundColor(trackColor);
|
||||
const startDir = computed(() => `inset-${vertical.value ? "block" : "inline"}-${indexFromEnd.value ? "end" : "start"}`);
|
||||
const endDir = computed(() => vertical.value ? "height" : "width");
|
||||
const backgroundStyles = computed(() => {
|
||||
return {
|
||||
[startDir.value]: "0%",
|
||||
[endDir.value]: "100%"
|
||||
};
|
||||
});
|
||||
const trackFillWidth = computed(() => props.stop - props.start);
|
||||
const trackFillStyles = computed(() => {
|
||||
return {
|
||||
[startDir.value]: convertToUnit(props.start, "%"),
|
||||
[endDir.value]: convertToUnit(trackFillWidth.value, "%")
|
||||
};
|
||||
});
|
||||
const computedTicks = computed(() => {
|
||||
if (!showTicks.value) return [];
|
||||
const ticks = vertical.value ? parsedTicks.value.slice().reverse() : parsedTicks.value;
|
||||
return ticks.map((tick, index) => {
|
||||
const directionValue = tick.value !== min.value && tick.value !== max.value ? convertToUnit(tick.position, "%") : void 0;
|
||||
return createBaseVNode("div", {
|
||||
"key": tick.value,
|
||||
"class": normalizeClass(["v-slider-track__tick", {
|
||||
"v-slider-track__tick--filled": tick.position >= props.start && tick.position <= props.stop,
|
||||
"v-slider-track__tick--first": tick.value === min.value,
|
||||
"v-slider-track__tick--last": tick.value === max.value
|
||||
}]),
|
||||
"style": {
|
||||
[startDir.value]: directionValue
|
||||
}
|
||||
}, [(tick.label || slots["tick-label"]) && createBaseVNode("div", {
|
||||
"class": "v-slider-track__tick-label"
|
||||
}, [slots["tick-label"]?.({
|
||||
tick,
|
||||
index
|
||||
}) ?? tick.label])]);
|
||||
});
|
||||
});
|
||||
useRender(() => {
|
||||
return createBaseVNode("div", {
|
||||
"class": normalizeClass(["v-slider-track", roundedClasses.value, props.class]),
|
||||
"style": normalizeStyle([{
|
||||
"--v-slider-track-size": convertToUnit(trackSize.value),
|
||||
"--v-slider-tick-size": convertToUnit(tickSize.value)
|
||||
}, props.style])
|
||||
}, [createBaseVNode("div", {
|
||||
"class": normalizeClass(["v-slider-track__background", trackColorClasses.value, {
|
||||
"v-slider-track__background--opacity": !!color.value || !trackFillColor.value
|
||||
}]),
|
||||
"style": {
|
||||
...backgroundStyles.value,
|
||||
...trackColorStyles.value
|
||||
}
|
||||
}, null), createBaseVNode("div", {
|
||||
"class": normalizeClass(["v-slider-track__fill", trackFillColorClasses.value]),
|
||||
"style": {
|
||||
...trackFillStyles.value,
|
||||
...trackFillColorStyles.value
|
||||
}
|
||||
}, null), showTicks.value && createBaseVNode("div", {
|
||||
"class": normalizeClass(["v-slider-track__ticks", {
|
||||
"v-slider-track__ticks--always-show": showTicks.value === "always"
|
||||
}])
|
||||
}, [computedTicks.value])]);
|
||||
});
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/vuetify/lib/components/VSlider/VSlider.js
|
||||
var makeVSliderProps = propsFactory({
|
||||
...makeFocusProps(),
|
||||
...makeSliderProps(),
|
||||
...makeVInputProps(),
|
||||
modelValue: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
}
|
||||
}, "VSlider");
|
||||
var VSlider = genericComponent()({
|
||||
name: "VSlider",
|
||||
inheritAttrs: false,
|
||||
props: makeVSliderProps(),
|
||||
emits: {
|
||||
"update:focused": (value) => true,
|
||||
"update:modelValue": (v) => true,
|
||||
start: (value) => true,
|
||||
end: (value) => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots,
|
||||
emit,
|
||||
attrs
|
||||
} = _ref;
|
||||
const thumbContainerRef = ref();
|
||||
const inputRef = ref();
|
||||
const {
|
||||
rtlClasses
|
||||
} = useRtl();
|
||||
const steps = useSteps(props);
|
||||
const model = useProxiedModel(props, "modelValue", void 0, (value) => {
|
||||
return steps.roundValue(value == null ? steps.min.value : value);
|
||||
});
|
||||
const {
|
||||
min,
|
||||
max,
|
||||
mousePressed,
|
||||
roundValue,
|
||||
onSliderMousedown,
|
||||
onSliderTouchstart,
|
||||
trackContainerRef,
|
||||
position,
|
||||
hasLabels,
|
||||
disabled,
|
||||
readonly,
|
||||
noKeyboard
|
||||
} = useSlider({
|
||||
props,
|
||||
steps,
|
||||
onSliderStart: () => {
|
||||
if (!disabled.value && !readonly.value) {
|
||||
emit("start", model.value);
|
||||
}
|
||||
},
|
||||
onSliderEnd: (_ref2) => {
|
||||
let {
|
||||
value
|
||||
} = _ref2;
|
||||
const roundedValue = roundValue(value);
|
||||
if (!disabled.value && !readonly.value) {
|
||||
model.value = roundedValue;
|
||||
}
|
||||
emit("end", roundedValue);
|
||||
},
|
||||
onSliderMove: (_ref3) => {
|
||||
let {
|
||||
value
|
||||
} = _ref3;
|
||||
if (!disabled.value && !readonly.value) {
|
||||
model.value = roundValue(value);
|
||||
}
|
||||
},
|
||||
getActiveThumb: () => thumbContainerRef.value?.$el
|
||||
});
|
||||
const {
|
||||
isFocused,
|
||||
focus,
|
||||
blur
|
||||
} = useFocus(props);
|
||||
const trackStop = computed(() => position(model.value));
|
||||
useRender(() => {
|
||||
const inputProps = VInput.filterProps(props);
|
||||
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|
||||
const hasPrepend = !!(props.label || slots.label || slots.prepend);
|
||||
return createVNode(VInput, mergeProps({
|
||||
"ref": inputRef,
|
||||
"class": ["v-slider", {
|
||||
"v-slider--has-labels": !!slots["tick-label"] || hasLabels.value,
|
||||
"v-slider--focused": isFocused.value,
|
||||
"v-slider--pressed": mousePressed.value,
|
||||
"v-slider--disabled": disabled.value
|
||||
}, rtlClasses.value, props.class],
|
||||
"style": props.style
|
||||
}, inputProps, rootAttrs, {
|
||||
"focused": isFocused.value
|
||||
}), {
|
||||
...slots,
|
||||
prepend: hasPrepend ? (slotProps) => createBaseVNode(Fragment, null, [slots.label?.(slotProps) ?? (props.label ? createVNode(VLabel, {
|
||||
"id": slotProps.id.value,
|
||||
"class": "v-slider__label",
|
||||
"text": props.label
|
||||
}, null) : void 0), slots.prepend?.(slotProps)]) : void 0,
|
||||
default: (_ref4) => {
|
||||
let {
|
||||
id,
|
||||
messagesId
|
||||
} = _ref4;
|
||||
return createBaseVNode("div", {
|
||||
"class": "v-slider__container",
|
||||
"onMousedown": !readonly.value ? onSliderMousedown : void 0,
|
||||
"onTouchstartPassive": !readonly.value ? onSliderTouchstart : void 0
|
||||
}, [createBaseVNode("input", {
|
||||
"id": id.value,
|
||||
"name": props.name || id.value,
|
||||
"disabled": disabled.value,
|
||||
"readonly": readonly.value,
|
||||
"tabindex": "-1",
|
||||
"value": model.value
|
||||
}, null), createVNode(VSliderTrack, {
|
||||
"ref": trackContainerRef,
|
||||
"start": 0,
|
||||
"stop": trackStop.value
|
||||
}, {
|
||||
"tick-label": slots["tick-label"]
|
||||
}), createVNode(VSliderThumb, mergeProps({
|
||||
"ref": thumbContainerRef,
|
||||
"aria-describedby": messagesId.value,
|
||||
"focused": isFocused.value,
|
||||
"noKeyboard": noKeyboard.value,
|
||||
"min": min.value,
|
||||
"max": max.value,
|
||||
"modelValue": model.value,
|
||||
"onUpdate:modelValue": (v) => model.value = v,
|
||||
"position": trackStop.value,
|
||||
"elevation": props.elevation,
|
||||
"onFocus": focus,
|
||||
"onBlur": blur,
|
||||
"ripple": props.ripple,
|
||||
"name": props.name
|
||||
}, inputAttrs), {
|
||||
"thumb-label": slots["thumb-label"]
|
||||
})]);
|
||||
}
|
||||
});
|
||||
});
|
||||
return forwardRefs({
|
||||
focus: () => thumbContainerRef.value?.$el.focus()
|
||||
}, inputRef);
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
getOffset,
|
||||
makeSliderProps,
|
||||
useSteps,
|
||||
useSlider,
|
||||
VSliderThumb,
|
||||
VSliderTrack,
|
||||
VSlider
|
||||
};
|
||||
//# sourceMappingURL=chunk-LHMOJDYM.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VSlider/VSlider.tsx", "../../vuetify/src/components/VSlider/VSliderThumb.tsx", "../../vuetify/src/components/VSlider/slider.ts", "../../vuetify/src/components/VSlider/VSliderTrack.tsx"],
|
||||
"sourcesContent": ["// Styles\nimport './VSlider.sass'\n\n// Components\nimport { VSliderThumb } from './VSliderThumb'\nimport { VSliderTrack } from './VSliderTrack'\nimport { makeVInputProps, VInput } from '@/components/VInput/VInput'\nimport { VLabel } from '@/components/VLabel'\n\n// Composables\nimport { makeSliderProps, useSlider, useSteps } from './slider'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useRtl } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, ref } from 'vue'\nimport { filterInputAttrs, genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { VSliderThumbSlots } from './VSliderThumb'\nimport type { VSliderTrackSlots } from './VSliderTrack'\nimport type { VInputSlot, VInputSlots } from '@/components/VInput/VInput'\n\nexport type VSliderSlots = VInputSlots & VSliderThumbSlots & VSliderTrackSlots & {\n label: VInputSlot\n}\n\nexport const makeVSliderProps = propsFactory({\n ...makeFocusProps(),\n ...makeSliderProps(),\n ...makeVInputProps(),\n\n modelValue: {\n type: [Number, String],\n default: 0,\n },\n}, 'VSlider')\n\nexport const VSlider = genericComponent<VSliderSlots>()({\n name: 'VSlider',\n\n inheritAttrs: false,\n\n props: makeVSliderProps(),\n\n emits: {\n 'update:focused': (value: boolean) => true,\n 'update:modelValue': (v: number) => true,\n start: (value: number) => true,\n end: (value: number) => true,\n },\n\n setup (props, { slots, emit, attrs }) {\n const thumbContainerRef = ref<VSliderThumb>()\n const inputRef = ref<VInput>()\n const { rtlClasses } = useRtl()\n\n const steps = useSteps(props)\n\n const model = useProxiedModel(\n props,\n 'modelValue',\n undefined,\n value => {\n return steps.roundValue(value == null ? steps.min.value : value)\n },\n )\n\n const {\n min,\n max,\n mousePressed,\n roundValue,\n onSliderMousedown,\n onSliderTouchstart,\n trackContainerRef,\n position,\n hasLabels,\n disabled,\n readonly,\n noKeyboard,\n } = useSlider({\n props,\n steps,\n onSliderStart: () => {\n if (!disabled.value && !readonly.value) {\n emit('start', model.value)\n }\n },\n onSliderEnd: ({ value }) => {\n const roundedValue = roundValue(value)\n\n if (!disabled.value && !readonly.value) {\n model.value = roundedValue\n }\n\n emit('end', roundedValue)\n },\n onSliderMove: ({ value }) => {\n if (!disabled.value && !readonly.value) {\n model.value = roundValue(value)\n }\n },\n getActiveThumb: () => thumbContainerRef.value?.$el,\n })\n\n const { isFocused, focus, blur } = useFocus(props)\n const trackStop = computed(() => position(model.value))\n\n useRender(() => {\n const inputProps = VInput.filterProps(props)\n const [rootAttrs, inputAttrs] = filterInputAttrs(attrs)\n const hasPrepend = !!(props.label || slots.label || slots.prepend)\n\n return (\n <VInput\n ref={ inputRef }\n class={[\n 'v-slider',\n {\n 'v-slider--has-labels': !!slots['tick-label'] || hasLabels.value,\n 'v-slider--focused': isFocused.value,\n 'v-slider--pressed': mousePressed.value,\n 'v-slider--disabled': disabled.value,\n },\n rtlClasses.value,\n props.class,\n ]}\n style={ props.style }\n { ...inputProps }\n { ...rootAttrs }\n focused={ isFocused.value }\n >\n {{\n ...slots,\n prepend: hasPrepend ? slotProps => (\n <>\n { slots.label?.(slotProps) ?? (\n props.label\n ? (\n <VLabel\n id={ slotProps.id.value }\n class=\"v-slider__label\"\n text={ props.label }\n />\n ) : undefined\n )}\n\n { slots.prepend?.(slotProps) }\n </>\n ) : undefined,\n default: ({ id, messagesId }) => (\n <div\n class=\"v-slider__container\"\n onMousedown={ !readonly.value ? onSliderMousedown : undefined }\n onTouchstartPassive={ !readonly.value ? onSliderTouchstart : undefined }\n >\n <input\n id={ id.value }\n name={ props.name || id.value }\n disabled={ disabled.value }\n readonly={ readonly.value }\n tabindex=\"-1\"\n value={ model.value }\n />\n\n <VSliLine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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1B,QAAQ;AAErB,QAAI+B,eAAe/B,MAAMyC,SAASrG,EAAEsG,MAAc,GAAG;AACnDd,kBAAY5B,QAAQ7D,UAAUC,GAAG2F,eAAe/B,OAAON,MAAMpD,SAAS;IACxE,OAAO;AACLsF,kBAAY5B,QAAQ;AACpB,UAAIA,SAAS,MAAM;AACjBY,qBAAa;UAAEZ;QAAM,CAAC;MACxB;IACF;AAEA,QAAIA,SAAS,MAAM;AACjBW,oBAAc;QAAEX;MAAM,CAAC;IACzB;AACA2C,aAAS,MAAMZ,eAAe/B,OAAO4C,MAAM,CAAC;EAC9C;AAEA,QAAMC,sBAAsB;IAAEC,SAAS;IAAMC,SAAS;EAAK;AAE3D,WAASC,YAAa5G,GAA4B;AAChD,UAAM4D,QAAQgC,eAAe5F,CAAC;AAC9B,QAAI4D,SAAS,MAAM;AACjBY,mBAAa;QAAEZ;MAAM,CAAC;IACxB;EACF;AAEA,WAASiD,gBAAiB7G,GAAe;AACvCA,MAAE8G,gBAAgB;AAClB9G,MAAE+G,eAAe;AAEjBZ,eAAWnG,CAAC;AAEZgH,WAAOC,oBAAoB,aAAaL,aAAaH,mBAAmB;AACxEO,WAAOC,oBAAoB,WAAWJ,eAAe;EACvD;AAEA,WAASK,iBAAkBlH,GAAe;AACxCmG,eAAWnG,CAAC;AAEZgH,WAAOC,oBAAoB,aAAaL,aAAaLine truncated
|
||||
"names": ["VSliderSymbol", "Symbol", "for", "getOffset", "e", "el", "direction", "vertical", "rect", "getBoundingClientRect", "touch", "touches", "clientY", "top", "height", "clientX", "left", "width", "getPosition", "position", "length", "changedTouches", "makeSliderProps", "propsFactory", "disabled", "type", "Boolean", "default", "error", "readonly", "max", "Number", "String", "min", "step", "thumbColor", "thumbLabel", "undefined", "validator", "v", "thumbSize", "showTicks", "ticks", "Array", "Object", "tickSize", "color", "trackColor", "trackFillColor", "trackSize", "includes", "reverse", "noKeyboard", "makeRoundedProps", "makeElevationProps", "elevation", "ripple", "useSteps", "props", "computed", "parseFloat", "decimals", "Math", "getDecimals", "value", "roundValue", "clamped", "clamp", "offset", "newValue", "round", "toFixed", "useSlider", "_ref", "steps", "onSliderStart", "onSliderMove", "onSliderEnd", "getActiveThumb", "form", "useForm", "isRtl", "useRtl", "isReversed", "toRef", "indexFromEnd", "parseInt", "numTicks", "isDisabled", "thumbLabelColor", "mousePressed", "shallowRef", "startOffset", "trackContainerRef", "ref", "activeThumbRef", "parseMouseMove", "$el", "start", "trackStart", "trackLength", "clickOffset", "clickPos", "handleStop", "handleStart", "contains", "target", "nextTick", "focus", "moveListenerOptions", "passive", "capture", "onMouseMove", "onSliderMouseUp", "stopPropagation", "preventDefault", "window", "removeEventListener", "onSliderTouchend", "onSliderTouchstart", "addEventListener", "onSliderMousedown", "button", "onScopeDispose", "val", "percentage", "isNaN", "parsedTicks", "Infinity", "createRange", "map", "t", "isArray", "label", "toString", "keys", "key", "hasLabels", "some", "_ref2", "data", "isReadonly", "rounded", "provide", "makeVSliderThumbProps", "propsFactory", "focused", "Boolean", "max", "type", "Number", "required", "min", "modelValue", "position", "ripple", "Object", "default", "name", "String", "noKeyboard", "makeComponentProps", "VSliderThumb", "genericComponent", "directives", "vRipple", "props", "emits", "v", "setup", "_ref", "slots", "emit", "slider", "inject", "VSliderSymbol", "isRtl", "rtlClasses", "useRtl", "Error", "thumbColor", "thumbLabelColor", "step", "disabled", "thumbSize", "thumbLabel", "direction", "isReversed", "vertical", "readonly", "elevation", "mousePressed", "decimals", "indexFromEnd", "elevationProps", "computed", "value", "undefined", "elevationClasses", "useElevation", "textColorClasses", "textColorStyles", "useTextColor", "backgroundColorClasses", "backgroundColorStyles", "useBackgroundColor", "pageup", "pagedown", "end", "home", "left", "right", "down", "up", "keyValues", "relevantKeys", "multipliers", "parseKeydown", "e", "includes", "key", "preventDefault", "_step", "steps", "increase", "multiplier", "shiftKey", "ctrlKey", "isInteger", "Math", "onKeydown", "newValue", "useRender", "positionPercentage", "convertToUnit", "_createElementVNode", "_normalizeClass", "class", "_normalizeStyle", "style", "_withDirectives", "circle", "center", "_createVNode", "VScaleTransition", "toFixed", "_vShow", "makeVSliderTrackProps", "propsFactory", "start", "type", "Number", "required", "stop", "makeComponentProps", "VSliderTrack", "genericComponent", "name", "props", "emits", "setup", "_ref", "slots", "slider", "inject", "VSliderSymbol", "Error", "color", "parsedTicks", "rounded", "showTicks", "tickSize", "trackColor", "trackFillColor", "trackSize", "vertical", "min", "max", "indexFromEnd", "roundedClasses", "useRounded", "backgroundColorClasses", "trackFillColorClasses", "backgroundColorStyles", "trackFillColorStyles", "useBackgroundColor", "trackColorClasses", "trackColorStyles", "startDir", "computed", "value", "endDir", "backgroundStyles", "trackFillWidth", "trackFillStyles", "convertToUnit", "computedTicks", "ticks", "slice", "reverse", "map", "tick", "index", "directionValue", "position", "undefined", "_createElementVNode", "_normalizeClass", "label", "useRender", "class", "_normalizeStyle", "style", "makeVSliderProps", "propsFactory", "makeFocusProps", "makeSliderProps", "makeVInputProps", "modelValue", "type", "Number", "String", "default", "VSlider", "genericComponent", "name", "inheritAttrs", "props", "emits", "value", "v", "start", "end", "setup", "_ref", "slots", "emit", "attrs", "thumbContainerRef", "ref", "inputRef", "rtlClasses", "useRtl", "steps", "useSteps", "model", "useProxiedModel", "undefined", "roundValue", "min", "max", "mousePressed", "onSliderMousedown", "onSliderTouchstart", "trackContainerRef", "position", "hasLabels", "disabled", "readonly", "noKeyboard", "useSlider", "onSliderStart", "onSliderEnd", "_ref2", "roundedValue", "onSliderMove", "_ref3", "getActiveThumb", "$el", "isFocused", "focus", "blur", "useFocus", "trackStop", "computed", "useRender", "inputProps", "VInput", "filterProps", "rootAttrs", "inputAttrs", "filterInputAttrs", "hasPrepend", "label", "prepend", "_createVNode", "_mergeProps", "class", "style", "Line truncated
|
||||
}
|
||||
+239
@@ -0,0 +1,239 @@
|
||||
import {
|
||||
VImg
|
||||
} from "./chunk-6CRS5HI4.js";
|
||||
import {
|
||||
makeBorderProps,
|
||||
useBorder
|
||||
} from "./chunk-X7YBE6PF.js";
|
||||
import {
|
||||
makeElevationProps,
|
||||
useElevation
|
||||
} from "./chunk-YJD2PNP6.js";
|
||||
import {
|
||||
VExpandTransition
|
||||
} from "./chunk-B4JFJDWM.js";
|
||||
import {
|
||||
VDefaultsProvider
|
||||
} from "./chunk-VH7QIDM4.js";
|
||||
import {
|
||||
makeRoundedProps,
|
||||
useRounded
|
||||
} from "./chunk-AQK3CYVW.js";
|
||||
import {
|
||||
makeTagProps
|
||||
} from "./chunk-2HZIACSB.js";
|
||||
import {
|
||||
useRtl
|
||||
} from "./chunk-ENTLCOCZ.js";
|
||||
import {
|
||||
useBackgroundColor
|
||||
} from "./chunk-BHV5Z34M.js";
|
||||
import {
|
||||
makeThemeProps,
|
||||
provideTheme
|
||||
} from "./chunk-3DSR7NCB.js";
|
||||
import {
|
||||
convertToUnit,
|
||||
genericComponent,
|
||||
makeComponentProps,
|
||||
propsFactory,
|
||||
provideDefaults,
|
||||
useRender
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
computed,
|
||||
createBaseVNode,
|
||||
createVNode,
|
||||
normalizeClass,
|
||||
normalizeStyle,
|
||||
shallowRef
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/VToolbar/VToolbarTitle.js
|
||||
var makeVToolbarTitleProps = propsFactory({
|
||||
text: String,
|
||||
...makeComponentProps(),
|
||||
...makeTagProps()
|
||||
}, "VToolbarTitle");
|
||||
var VToolbarTitle = genericComponent()({
|
||||
name: "VToolbarTitle",
|
||||
props: makeVToolbarTitleProps(),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
useRender(() => {
|
||||
const hasText = !!(slots.default || slots.text || props.text);
|
||||
return createVNode(props.tag, {
|
||||
"class": normalizeClass(["v-toolbar-title", props.class]),
|
||||
"style": normalizeStyle(props.style)
|
||||
}, {
|
||||
default: () => [hasText && createBaseVNode("div", {
|
||||
"class": "v-toolbar-title__placeholder"
|
||||
}, [slots.text ? slots.text() : props.text, slots.default?.()])]
|
||||
});
|
||||
});
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/vuetify/lib/components/VToolbar/VToolbar.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VToolbar/VToolbar.css";
|
||||
var allowedDensities = [null, "prominent", "default", "comfortable", "compact"];
|
||||
var makeVToolbarProps = propsFactory({
|
||||
absolute: Boolean,
|
||||
collapse: Boolean,
|
||||
collapsePosition: {
|
||||
type: String,
|
||||
default: "start"
|
||||
},
|
||||
color: String,
|
||||
density: {
|
||||
type: String,
|
||||
default: "default",
|
||||
validator: (v) => allowedDensities.includes(v)
|
||||
},
|
||||
extended: {
|
||||
type: Boolean,
|
||||
default: null
|
||||
},
|
||||
extensionHeight: {
|
||||
type: [Number, String],
|
||||
default: 48
|
||||
},
|
||||
flat: Boolean,
|
||||
floating: Boolean,
|
||||
height: {
|
||||
type: [Number, String],
|
||||
default: 64
|
||||
},
|
||||
image: String,
|
||||
title: String,
|
||||
...makeBorderProps(),
|
||||
...makeComponentProps(),
|
||||
...makeElevationProps(),
|
||||
...makeRoundedProps(),
|
||||
...makeTagProps({
|
||||
tag: "header"
|
||||
}),
|
||||
...makeThemeProps()
|
||||
}, "VToolbar");
|
||||
var VToolbar = genericComponent()({
|
||||
name: "VToolbar",
|
||||
props: makeVToolbarProps(),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
const {
|
||||
backgroundColorClasses,
|
||||
backgroundColorStyles
|
||||
} = useBackgroundColor(() => props.color);
|
||||
const {
|
||||
borderClasses
|
||||
} = useBorder(props);
|
||||
const {
|
||||
elevationClasses
|
||||
} = useElevation(props);
|
||||
const {
|
||||
roundedClasses
|
||||
} = useRounded(props);
|
||||
const {
|
||||
themeClasses
|
||||
} = provideTheme(props);
|
||||
const {
|
||||
rtlClasses
|
||||
} = useRtl();
|
||||
const isExtended = shallowRef(props.extended === null ? !!slots.extension?.() : props.extended);
|
||||
const contentHeight = computed(() => parseInt(Number(props.height) + (props.density === "prominent" ? Number(props.height) : 0) - (props.density === "comfortable" ? 8 : 0) - (props.density === "compact" ? 16 : 0), 10));
|
||||
const extensionHeight = computed(() => isExtended.value ? parseInt(Number(props.extensionHeight) + (props.density === "prominent" ? Number(props.extensionHeight) : 0) - (props.density === "comfortable" ? 4 : 0) - (props.density === "compact" ? 8 : 0), 10) : 0);
|
||||
provideDefaults({
|
||||
VBtn: {
|
||||
variant: "text"
|
||||
}
|
||||
});
|
||||
useRender(() => {
|
||||
const hasTitle = !!(props.title || slots.title);
|
||||
const hasImage = !!(slots.image || props.image);
|
||||
const extension = slots.extension?.();
|
||||
isExtended.value = props.extended === null ? !!extension : props.extended;
|
||||
return createVNode(props.tag, {
|
||||
"class": normalizeClass(["v-toolbar", `v-toolbar--collapse-${props.collapsePosition}`, {
|
||||
"v-toolbar--absolute": props.absolute,
|
||||
"v-toolbar--collapse": props.collapse,
|
||||
"v-toolbar--flat": props.flat,
|
||||
"v-toolbar--floating": props.floating,
|
||||
[`v-toolbar--density-${props.density}`]: true
|
||||
}, backgroundColorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value, themeClasses.value, rtlClasses.value, props.class]),
|
||||
"style": normalizeStyle([backgroundColorStyles.value, props.style])
|
||||
}, {
|
||||
default: () => [hasImage && createBaseVNode("div", {
|
||||
"key": "image",
|
||||
"class": "v-toolbar__image"
|
||||
}, [!slots.image ? createVNode(VImg, {
|
||||
"key": "image-img",
|
||||
"cover": true,
|
||||
"src": props.image
|
||||
}, null) : createVNode(VDefaultsProvider, {
|
||||
"key": "image-defaults",
|
||||
"disabled": !props.image,
|
||||
"defaults": {
|
||||
VImg: {
|
||||
cover: true,
|
||||
src: props.image
|
||||
}
|
||||
}
|
||||
}, slots.image)]), createVNode(VDefaultsProvider, {
|
||||
"defaults": {
|
||||
VTabs: {
|
||||
height: convertToUnit(contentHeight.value)
|
||||
}
|
||||
}
|
||||
}, {
|
||||
default: () => [createBaseVNode("div", {
|
||||
"class": "v-toolbar__content",
|
||||
"style": {
|
||||
height: convertToUnit(contentHeight.value)
|
||||
}
|
||||
}, [slots.prepend && createBaseVNode("div", {
|
||||
"class": "v-toolbar__prepend"
|
||||
}, [slots.prepend?.()]), hasTitle && createVNode(VToolbarTitle, {
|
||||
"key": "title",
|
||||
"text": props.title
|
||||
}, {
|
||||
text: slots.title
|
||||
}), slots.default?.(), slots.append && createBaseVNode("div", {
|
||||
"class": "v-toolbar__append"
|
||||
}, [slots.append?.()])])]
|
||||
}), createVNode(VDefaultsProvider, {
|
||||
"defaults": {
|
||||
VTabs: {
|
||||
height: convertToUnit(extensionHeight.value)
|
||||
}
|
||||
}
|
||||
}, {
|
||||
default: () => [createVNode(VExpandTransition, null, {
|
||||
default: () => [isExtended.value && createBaseVNode("div", {
|
||||
"class": "v-toolbar__extension",
|
||||
"style": {
|
||||
height: convertToUnit(extensionHeight.value)
|
||||
}
|
||||
}, [extension])]
|
||||
})]
|
||||
})]
|
||||
});
|
||||
});
|
||||
return {
|
||||
contentHeight,
|
||||
extensionHeight
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
makeVToolbarTitleProps,
|
||||
VToolbarTitle,
|
||||
makeVToolbarProps,
|
||||
VToolbar
|
||||
};
|
||||
//# sourceMappingURL=chunk-LPZZJ62X.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VToolbar/VToolbarTitle.tsx", "../../vuetify/src/components/VToolbar/VToolbar.tsx"],
|
||||
"sourcesContent": ["// Composables\nimport { makeComponentProps } from '@/composables/component'\nimport { makeTagProps } from '@/composables/tag'\n\n// Utilities\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\nexport const makeVToolbarTitleProps = propsFactory({\n text: String,\n\n ...makeComponentProps(),\n ...makeTagProps(),\n}, 'VToolbarTitle')\n\nexport type VToolbarTitleSlots = {\n default: never\n text: never\n}\n\nexport const VToolbarTitle = genericComponent<VToolbarTitleSlots>()({\n name: 'VToolbarTitle',\n\n props: makeVToolbarTitleProps(),\n\n setup (props, { slots }) {\n useRender(() => {\n const hasText = !!(slots.default || slots.text || props.text)\n\n return (\n <props.tag\n class={[\n 'v-toolbar-title',\n props.class,\n ]}\n style={ props.style }\n >\n { hasText && (\n <div class=\"v-toolbar-title__placeholder\">\n { slots.text ? slots.text() : props.text }\n\n { slots.default?.() }\n </div>\n )}\n </props.tag>\n )\n })\n\n return {}\n },\n})\n\nexport type VToolbarTitle = InstanceType<typeof VToolbarTitle>\n", "// Styles\nimport './VToolbar.sass'\n\n// Components\nimport { VToolbarTitle } from './VToolbarTitle'\nimport { VExpandTransition } from '@/components/transitions'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { VImg } from '@/components/VImg'\n\n// Composables\nimport { makeBorderProps, useBorder } from '@/composables/border'\nimport { useBackgroundColor } from '@/composables/color'\nimport { makeComponentProps } from '@/composables/component'\nimport { provideDefaults } from '@/composables/defaults'\nimport { makeElevationProps, useElevation } from '@/composables/elevation'\nimport { useRtl } from '@/composables/locale'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\n\n// Utilities\nimport { computed, shallowRef } from 'vue'\nimport { convertToUnit, genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\nconst allowedDensities = [null, 'prominent', 'default', 'comfortable', 'compact'] as const\n\nexport type Density = null | 'prominent' | 'default' | 'comfortable' | 'compact'\n\nexport const makeVToolbarProps = propsFactory({\n absolute: Boolean,\n collapse: Boolean,\n collapsePosition: {\n type: String as PropType<'start' | 'end'>,\n default: 'start',\n },\n color: String,\n density: {\n type: String as PropType<Density>,\n default: 'default',\n validator: (v: any) => allowedDensities.includes(v),\n },\n extended: {\n type: Boolean,\n default: null,\n },\n extensionHeight: {\n type: [Number, String],\n default: 48,\n },\n flat: Boolean,\n floating: Boolean,\n height: {\n type: [Number, String],\n default: 64,\n },\n image: String,\n title: String,\n\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeElevationProps(),\n ...makeRoundedProps(),\n ...makeTagProps({ tag: 'header' }),\n ...makeThemeProps(),\n}, 'VToolbar')\n\nexport type VToolbarSlots = {\n default: never\n image: never\n prepend: never\n append: never\n title: never\n extension: never\n}\n\nexport const VToolbar = genericComponent<VToolbarSlots>()({\n name: 'VToolbar',\n\n props: makeVToolbarProps(),\n\n setup (props, { slots }) {\n const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(() => props.color)\n const { borderClasses } = useBorder(props)\n const { elevationClasses } = useElevation(props)\n const { roundedClasses } = useRounded(props)\n const { themeClasses } = provideTheme(props)\n const { rtlClasses } = useRtl()\n\n const isExtended = shallowRef(props.extended === null ? !!(slots.extension?.()) : props.extended)\n const contentHeight = computed(() => parseInt((\n Number(props.height) +\n (props.density === 'prominent' ? Number(props.height) : 0) -\n (props.density === 'comfortable' ? 8 : 0) -\n (props.density === 'compact' ? 16 : 0)\n ), 10))\n const extensionHeight = computed(() => isExtended.value\n ? parseInt((\n Number(props.extensionHeight) +\n (props.density === 'prominent' ? Number(props.extensionHeight) : 0) -\n (props.density === 'comfortable' ? 4 : 0) -\n (props.density === 'compact' ? 8 : 0)\n ), 10)\n : 0\n )\n\n provideDefaults({\n VBtn: {\n variant: 'text',\n },\n })\n\n useRender(() => {\n const hasTitle = !!(props.title || slots.title)\n const hasImage = !!(slots.image || props.image)\n\n const extension = slots.extension?.()\n isExtended.value = props.extended === null ? !!extension : props.extended\n\n return (\n <props.tag\n Line truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOO,IAAMA,yBAAyBC,aAAa;EACjDC,MAAMC;EAEN,GAAGC,mBAAmB;EACtB,GAAGC,aAAa;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IrBd,YAAQE,YAAAa,eAAA;YAAA,OAAA;YAAA,QAC0B3C,MAAMX;UAAK,GAAA;YACxCuD,MAAMzC,MAAMd;UAAK,CAAA,GAItBc,MAAM3B,UAAU,GAEhB2B,MAAM0C,UAAMV,gBAAA,OAAA;YAAA,SAAA;UAAA,GAAA,CAERhC,MAAM0C,SAAS,CAAC,CAAA,CAErB,CAAA,CAAA;QAAA,CAAA,GAAAf,YAAAO,mBAAA;UAAA,YAKO;YACRG,OAAO;cACLrD,QAAQsD,cAAc1D,gBAAgBwC,KAAK;YAC7C;UACF;QAAC,GAAA;UAAA/C,SAAAA,MAAA,CAAAsD,YAAAgB,mBAAA,MAAA;YAAAtE,SAAAA,MAAA,CAGGyC,WAAWM,SAAKY,gBAAA,OAAA;cAAA,SAAA;cAAA,SAGP;gBAAEhD,QAAQsD,cAAc1D,gBAAgBwC,KAAK;cAAE;YAAC,GAAA,CAErDJ,SAAS,CAAA,CAEd;UAAA,CAAA,CAAA;QAAA,CAAA,CAAA;MAAA,CAAA;IAKX,CAAC;AAED,WAAO;MACLC;MACArC;IACF;EACF;AACF,CAAC;",
|
||||
"names": ["makeVToolbarTitleProps", "propsFactory", "text", "String", "makeComponentProps", "makeTagProps", "VToolbarTitle", "genericComponent", "name", "props", "setup", "_ref", "slots", "useRender", "hasText", "default", "_createVNode", "tag", "_normalizeClass", "class", "_normalizeStyle", "style", "_createElementVNode", "allowedDensities", "makeVToolbarProps", "propsFactory", "absolute", "Boolean", "collapse", "collapsePosition", "type", "String", "default", "color", "density", "validator", "v", "includes", "extended", "extensionHeight", "Number", "flat", "floating", "height", "image", "title", "makeBorderProps", "makeComponentProps", "makeElevationProps", "makeRoundedProps", "makeTagProps", "tag", "makeThemeProps", "VToolbar", "genericComponent", "name", "props", "setup", "_ref", "slots", "backgroundColorClasses", "backgroundColorStyles", "useBackgroundColor", "borderClasses", "useBorder", "elevationClasses", "useElevation", "roundedClasses", "useRounded", "themeClasses", "provideTheme", "rtlClasses", "useRtl", "isExtended", "shallowRef", "extension", "contentHeight", "computed", "parseInt", "value", "provideDefaults", "VBtn", "variant", "useRender", "hasTitle", "hasImage", "_createVNode", "_normalizeClass", "class", "_normalizeStyle", "style", "_createElementVNode", "VImg", "VDefaultsProvider", "cover", "src", "VTabs", "convertToUnit", "prepend", "VToolbarTitle", "text", "append", "VExpandTransition"]
|
||||
}
|
||||
+1721
File diff suppressed because it is too large.
Load diff
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/util/globals.ts", "../../vuetify/src/util/console.ts", "../../vuetify/src/util/helpers.ts", "../../vuetify/src/util/getCurrentInstance.ts", "../../vuetify/src/util/injectSelf.ts", "../../vuetify/src/composables/defaults.ts", "../../vuetify/src/util/propsFactory.ts", "../../vuetify/src/util/defineComponent.tsx", "../../vuetify/src/util/anchor.ts", "../../vuetify/src/util/box.ts", "../../vuetify/src/util/animation.ts", "../../vuetify/src/util/bindProps.ts", "../../vuetify/src/util/color/APCA.ts", "../../vuetify/src/util/color/transformCIELAB.ts", "../../vuetify/src/util/color/transformSRGB.ts", "../../vuetify/src/util/colorUtils.ts", "../../vuetify/src/composables/component.ts", "../../vuetify/src/util/createSimpleFunctional.ts", "../../vuetify/src/util/deepEqual.ts", "../../vuetify/src/util/dom.ts", "../../vuetify/src/util/easing.ts", "../../vuetify/src/util/events.ts", "../../vuetify/src/util/getScrollParent.ts", "../../vuetify/src/util/indentLines.ts", "../../vuetify/src/util/isFixedPosition.ts", "../../vuetify/src/util/useRender.ts", "../../vuetify/src/util/throttle.ts"],
|
||||
"sourcesContent": ["export const IN_BROWSER = typeof window !== 'undefined'\nexport const SUPPORTS_INTERSECTION = IN_BROWSER && 'IntersectionObserver' in window\nexport const SUPPORTS_TOUCH = IN_BROWSER && ('ontouchstart' in window || window.navigator.maxTouchPoints > 0)\nexport const SUPPORTS_EYE_DROPPER = IN_BROWSER && 'EyeDropper' in window\nexport const SUPPORTS_MATCH_MEDIA = IN_BROWSER && 'matchMedia' in window && typeof window.matchMedia === 'function'\nexport const PREFERS_REDUCED_MOTION = () => (\n SUPPORTS_MATCH_MEDIA && window.matchMedia('(prefers-reduced-motion: reduce)').matches\n)\n", "/* eslint-disable no-console */\n\n// Utilities\nimport { warn } from 'vue'\n\nexport function consoleWarn (message: string): void {\n warn(`Vuetify: ${message}`)\n}\n\nexport function consoleError (message: string): void {\n warn(`Vuetify error: ${message}`)\n}\n\nexport function deprecate (original: string, replacement: string | string[]) {\n replacement = Array.isArray(replacement)\n ? replacement.slice(0, -1).map(s => `'${s}'`).join(', ') + ` or '${replacement.at(-1)}'`\n : `'${replacement}'`\n warn(`[Vuetify UPGRADE] '${original}' is deprecated, use ${replacement} instead.`)\n}\nexport function breaking (original: string, replacement: string) {\n // warn(`[Vuetify BREAKING] '${original}' has been removed, use '${replacement}' instead. For more information, see the upgrade guide https://github.com/vuetifyjs/vuetify/releases/tag/v2.0.0#user-content-upgrade-guide`)\n}\nexport function removed (original: string) {\n // warn(`[Vuetify REMOVED] '${original}' has been removed. You can safely omit it.`)\n}\n", "// Utilities\nimport {\n camelize,\n capitalize,\n Comment,\n Fragment,\n isProxy,\n isReactive,\n isRef,\n isVNode,\n reactive,\n shallowRef,\n toRaw,\n toRef,\n unref,\n watchEffect,\n} from 'vue'\nimport { consoleError } from '@/util/console'\nimport { IN_BROWSER } from '@/util/globals'\n\n// Types\nimport type {\n ComponentInternalInstance,\n ComponentPublicInstance,\n ComputedGetter,\n InjectionKey,\n PropType,\n Ref,\n ToRef,\n VNode,\n VNodeArrayChildren,\n VNodeChild,\n} from 'vue'\n\nexport function getNestedValue (obj: any, path: (string | number)[], fallback?: any): any {\n const last = path.length - 1\n\n if (last < 0) return obj === undefined ? fallback : obj\n\n for (let i = 0; i < last; i++) {\n if (obj == null) {\n return fallback\n }\n obj = obj[path[i]]\n }\n\n if (obj == null) return fallback\n\n return obj[path[last]] === undefined ? fallback : obj[path[last]]\n}\n\nexport function getObjectValueByPath (obj: any, path?: string | null, fallback?: any): any {\n // credit: http://stackoverflow.com/questions/6491463/accessing-nested-javascript-objects-with-string-key#comment55278413_6491621\n if (obj == null || !path || typeof path !== 'string') return fallback\n if (obj[path] !== undefined) return obj[path]\n path = path.replace(/\\[(\\w+)\\]/g, '.$1') // convert indexes to properties\n path = path.replace(/^\\./, '') // strip a leading dot\n return getNestedValue(obj, path.split('.'), fallback)\n}\n\nexport type SelectItemKey<T = Record<string, any>> =\n | boolean | null | undefined // Ignored\n | string // Lookup by key, can use dot notation for nested objects\n | readonly (string | number)[] // Nested lookup by key, each array item is a key in the next level\n | ((item: T, fallback?: any) => any)\n\nexport function getPropertyFromItem (\n item: any,\n property: SelectItemKey,\n fallback?: any\n): any {\n if (property === true) return item === undefined ? fallback : item\n\n if (property == null || typeof property === 'boolean') return fallback\n\n if (item !== Object(item)) {\n if (typeof property !== 'function') return fallback\n\n const value = property(item, fallback)\n\n return typeof value === 'undefined' ? fallback : value\n }\n\n if (typeof property === 'string') return getObjectValueByPath(item, property, fallback)\n\n if (Array.isArray(property)) return getNestedValue(item, property, fallback)\n\n if (typeof property !== 'function') return fallback\n\n const value = property(item, fallback)\n\n return typeof value === 'undefined' ? fallback : value\n}\n\nexport function createRange (length: number, start = 0): number[] {\n return Array.from({ length }, (v, k) => start + k)\n}\n\nexport function getZIndex (el?: Element | null): number {\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0\n\n const index = Number(window.getComputedStyle(el).getPropertyValue('z-index'))\n\n if (!index) return getZIndex(el.parentNode as Element)\n return index\n}\n\nexport function convertToUnit (str: number, unit?: string): string\nexport function convertToUnit (str: string | number | null | undefined, unit?: string): string | undefined\nexport function convertToUnit (str: string | number | null | undefined, unit = 'px'): string | undefined {\n if (str == null || str === '') {\n return undefined\nLine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,aAAa,OAAOC,WAAW;AACrC,IAAMC,wBAAwBF,cAAc,0BAA0BC;AACtE,I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GX,IAAMC,wBAAwB,CAC5B,WACA,aACA,cACA,aACA,SACA,UACA,OACA,GAAG;AAGE,SAASC,qBAAsBC,GAA2B;AAC/D,SAAOA,EAAEC,eAAeH,sBAAsBI,SAASF,EAAEzB,GAAG;AAC9D;AAOO,SAAS4B,iBAAkBC,OAAgC;AAChE,QAAM,CAACC,QAAQC,KAAK,IAAIvB,aAAaqB,OAAO,CAACT,IAAI,CAAC;AAClD,QAAMY,cAAchB,KAAKc,QAAQR,cAAc;AAC/C,QAAM,CAACW,WAAWC,UAAU,IAAI1B,aAAauB,OAAO,CAAC,SAAS,SAAS,MAAM,SAAS,QAAQ,CAAC;AAC/FhE,SAAOoE,OAAOF,WAAWH,MAAM;AAC/B/D,SAAOoE,OAAOD,YAAYF,WAAW;AACrC,SAAO,CAACC,WAAWC,UAAU;AAC/B;AAcO,SAASE,YACdC,GAGqB;AACrB,SAAOA,KAAK,OACR,CAAA,IACAC,MAAMC,QAAQF,CAAC,IACbA,IAAW,CAACA,CAAC;AACrB;AASO,SAASG,SAAUC,IAAcC,OAAyB;AAC/D,MAAIC,YAAY;AAChB,QAAMC,OAAO,WAAoB;AAAA,Line truncated
|
||||
"names": ["IN_BROWSER", "window", "SUPPORTS_INTERSECTION", "SUPPORTS_TOUCH", "navigator", "maxTouchPoints", "SUPPORTS_EYE_DROPPER", "SUPPORTS_MATCH_MEDIA", "matchMedia", "PREFERS_REDUCED_MOTION", "matches", "consoleWarn", "message", "warn", "consoleError", "deprecate", "original", "replacement", "Array", "isArray", "slice", "map", "s", "join", "at", "getNestedValue", "obj", "path", "fallback", "last", "length", "undefined", "i", "getObjectValueByPath", "replace", "split", "getPropertyFromItem", "item", "property", "Object", "value", "Array", "isArray", "createRange", "start", "arguments", "from", "v", "k", "convertToUnit", "str", "unit", "arguments", "length", "undefined", "num", "Number", "isNaN", "String", "isFinite", "isObject", "obj", "Array", "isArray", "isPlainObject", "proto", "Object", "getPrototypeOf", "prototype", "refElement", "el", "$el", "nodeType", "Node", "TEXT_NODE", "nextElementSibling", "keyCodes", "freeze", "enter", "tab", "delete", "esc", "space", "up", "down", "left", "right", "end", "home", "del", "backspace", "insert", "pageup", "pagedown", "shift", "keyValues", "keys", "o", "has", "key", "every", "k", "hasOwnProperty", "pick", "paths", "found", "call", "pickWithRest", "exclude", "create", "rest", "some", "path", "RegExp", "test", "omit", "clone", "forEach", "prop", "onRE", "isOn", "bubblingEvents", "compositionIgnoreKeys", "isComposingIgnoreKey", "e", "isComposing", "includes", "filterInputAttrs", "attrs", "events", "props", "inputEvents", "rootAttrs", "inputAttrs", "assign", "wrapInArray", "v", "Array", "isArray", "debounce", "fn", "delay", "timeoutId", "wrap", "_len", "arguments", "length", "args", "Array", "_key", "clearTimeout", "setTimeout", "unref", "clear", "immediate", "clamp", "value", "min", "undefined", "max", "Math", "getDecimals", "trimmedStr", "toString", "trim", "includes", "indexOf", "padEnd", "str", "char", "repeat", "padStart", "chunk", "size", "chunked", "index", "push", "substr", "humanReadableFileSize", "bytes", "base", "arguments", "length", "undefined", "prefix", "unit", "Math", "abs", "toFixed", "mergeDeep", "source", "target", "arrayFn", "out", "key", "sourceProperty", "targetProperty", "isPlainObject", "Array", "isArray", "flattenFragments", "nodes", "map", "node", "type", "Fragment", "children", "flat", "toKebabCase", "str", "cache", "has", "get", "kebab", "replace", "toLowerCase", "set", "Map", "findChildrenWithProvide", "vnode", "child", "suspense", "ssContent", "component", "Object", "getOwnPropertyDescriptor", "provides", "subTree", "_arr", "WeakMap", "_pointer", "CircularBuffer", "constructor", "size", "_classPrivateFieldInitSpec", "isFull", "_classPrivateFieldGet", "push", "val", "_classPrivateFieldSet", "values", "slice", "concat", "clear", "getEventCoordinates", "e", "clientX", "touches", "clientY", "destructComputed", "getter", "refs", "reactive", "watchEffect", "flush", "obj", "toRef", "includes", "arr", "eventName", "propName", "EventProp", "Function", "hasEvent", "props", "name", "capitalize", "callEvent", "handler", "_len2", "args", "_key2", "h", "focusableChildren", "el", "filterByTabIndex", "targets", "s", "join", "elements", "querySelectorAll", "err", "consoleError", "String", "filter", "x", "closest", "offsetParent", "getClientRects", "parentElement", "tagName", "getNextElement", "location", "condition", "_el", "idx", "indexOf", "document", "activeElement", "inc", "focusChild", "focusable", "contains", "focus", "at", "isEmpty", "trim", "noop", "matchesSelector", "selector", "supportsSelector", "IN_BROWSER", "CSS", "supports", "matches", "ensureValidVNode", "vnodes", "some", "isVNode", "Comment", "renderSlot", "slot", "fallback", "defer", "timeout", "cb", "timeoutId", "window", "setTimeout", "clearTimeout", "isClickInsideElement", "event", "targetDiv", "mouseX", "mouseY", "divRect", "getBoundingClientRect", "divLeft", "left", "divTop", "top", "divRight", "right", "divBottom", "bottom", "templateRef", "shallowRef", "fn", "value", "defineProperty", "enumerable", "refElement", "checkPrintable", "isPrintableChar", "noModifier", "ctrlKey", "metaKey", "altKey", "isPrimitive", "escapeForRegex", "sign", "extractNumber", "text", "decimalDigitsLimit", "decimalSeparator", "onlyValidCharacters", "RegExp", "cleanText", "split", "test", "i", "all", "decimalPart", "parts", "substring", "camelizeProps", "prop", "camelize", "onlyDefinedProps", "booleanAttributes", "fromEntries", "entries", "_ref", "v", "deepToRaw", "objectIterator", "input", "item", "isRef", "isReactive", "isProxy", "toRaw", "keys", "reduce", "acc", "getCurrentInstance", "name", "message", "vm", "_getCurrentInstance", "Error", "getCurrentInstanceName", "arguments", "length", "undefined", "type", "toKebabCase", "aliasName", "injectSelf", "key", "vm", "arguments", "length", "undefined", "getCurrentInstance", "provides", "DefaultsSymbol", "Symbol", "for", "createDefaults", "options", "ref", "injectDefaults", "defaults", "inject", "Error", "provideDefaults", "injectedDefaults", "providedDefauLine truncated
|
||||
}
|
||||
+444
@@ -0,0 +1,444 @@
|
||||
import {
|
||||
makePositionProps,
|
||||
usePosition
|
||||
} from "./chunk-HOEZWRBG.js";
|
||||
import {
|
||||
VAvatar
|
||||
} from "./chunk-Z3677HMS.js";
|
||||
import {
|
||||
genOverlays,
|
||||
makeVariantProps,
|
||||
useVariant
|
||||
} from "./chunk-ADXDXPPR.js";
|
||||
import {
|
||||
VImg
|
||||
} from "./chunk-6CRS5HI4.js";
|
||||
import {
|
||||
makeBorderProps,
|
||||
useBorder
|
||||
} from "./chunk-X7YBE6PF.js";
|
||||
import {
|
||||
makeElevationProps,
|
||||
useElevation
|
||||
} from "./chunk-YJD2PNP6.js";
|
||||
import {
|
||||
LoaderSlot,
|
||||
makeLoaderProps,
|
||||
useLoader
|
||||
} from "./chunk-U2DSRSME.js";
|
||||
import {
|
||||
makeLocationProps,
|
||||
useLocation
|
||||
} from "./chunk-KTTVT6V2.js";
|
||||
import {
|
||||
makeDensityProps,
|
||||
useDensity
|
||||
} from "./chunk-TM3MIDYC.js";
|
||||
import {
|
||||
VIcon
|
||||
} from "./chunk-CMZ4UYUX.js";
|
||||
import {
|
||||
VDefaultsProvider
|
||||
} from "./chunk-VH7QIDM4.js";
|
||||
import {
|
||||
makeRoundedProps,
|
||||
useRounded
|
||||
} from "./chunk-AQK3CYVW.js";
|
||||
import {
|
||||
makeTagProps
|
||||
} from "./chunk-2HZIACSB.js";
|
||||
import {
|
||||
ripple_default
|
||||
} from "./chunk-5BPWKCNA.js";
|
||||
import {
|
||||
makeRouterProps,
|
||||
useLink
|
||||
} from "./chunk-573D4TYC.js";
|
||||
import {
|
||||
makeDimensionProps,
|
||||
useDimension
|
||||
} from "./chunk-6EZKHCRW.js";
|
||||
import {
|
||||
IconValue
|
||||
} from "./chunk-OJDZBU5D.js";
|
||||
import {
|
||||
makeThemeProps,
|
||||
provideTheme
|
||||
} from "./chunk-3DSR7NCB.js";
|
||||
import {
|
||||
createSimpleFunctional,
|
||||
genericComponent,
|
||||
makeComponentProps,
|
||||
propsFactory,
|
||||
provideDefaults,
|
||||
useRender
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
Fragment,
|
||||
createBaseVNode,
|
||||
createVNode,
|
||||
mergeProps,
|
||||
normalizeClass,
|
||||
normalizeStyle,
|
||||
shallowRef,
|
||||
toDisplayString,
|
||||
watch,
|
||||
withDirectives
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/VCard/VCard.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VCard/VCard.css";
|
||||
|
||||
// node_modules/vuetify/lib/components/VCard/VCardActions.js
|
||||
var makeVCardActionsProps = propsFactory({
|
||||
...makeComponentProps(),
|
||||
...makeTagProps()
|
||||
}, "VCardActions");
|
||||
var VCardActions = genericComponent()({
|
||||
name: "VCardActions",
|
||||
props: makeVCardActionsProps(),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
provideDefaults({
|
||||
VBtn: {
|
||||
slim: true,
|
||||
variant: "text"
|
||||
}
|
||||
});
|
||||
useRender(() => createVNode(props.tag, {
|
||||
"class": normalizeClass(["v-card-actions", props.class]),
|
||||
"style": normalizeStyle(props.style)
|
||||
}, slots));
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/vuetify/lib/components/VCard/VCardSubtitle.js
|
||||
var makeVCardSubtitleProps = propsFactory({
|
||||
opacity: [Number, String],
|
||||
...makeComponentProps(),
|
||||
...makeTagProps()
|
||||
}, "VCardSubtitle");
|
||||
var VCardSubtitle = genericComponent()({
|
||||
name: "VCardSubtitle",
|
||||
props: makeVCardSubtitleProps(),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
useRender(() => createVNode(props.tag, {
|
||||
"class": normalizeClass(["v-card-subtitle", props.class]),
|
||||
"style": normalizeStyle([{
|
||||
"--v-card-subtitle-opacity": props.opacity
|
||||
}, props.style])
|
||||
}, slots));
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/vuetify/lib/components/VCard/VCardTitle.js
|
||||
var VCardTitle = createSimpleFunctional("v-card-title");
|
||||
|
||||
// node_modules/vuetify/lib/components/VCard/VCardItem.js
|
||||
var makeCardItemProps = propsFactory({
|
||||
appendAvatar: String,
|
||||
appendIcon: IconValue,
|
||||
prependAvatar: String,
|
||||
prependIcon: IconValue,
|
||||
subtitle: {
|
||||
type: [String, Number, Boolean],
|
||||
default: void 0
|
||||
},
|
||||
title: {
|
||||
type: [String, Number, Boolean],
|
||||
default: void 0
|
||||
},
|
||||
...makeComponentProps(),
|
||||
...makeDensityProps(),
|
||||
...makeTagProps()
|
||||
}, "VCardItem");
|
||||
var VCardItem = genericComponent()({
|
||||
name: "VCardItem",
|
||||
props: makeCardItemProps(),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
useRender(() => {
|
||||
const hasPrependMedia = !!(props.prependAvatar || props.prependIcon);
|
||||
const hasPrepend = !!(hasPrependMedia || slots.prepend);
|
||||
const hasAppendMedia = !!(props.appendAvatar || props.appendIcon);
|
||||
const hasAppend = !!(hasAppendMedia || slots.append);
|
||||
const hasTitle = !!(props.title != null || slots.title);
|
||||
const hasSubtitle = !!(props.subtitle != null || slots.subtitle);
|
||||
return createVNode(props.tag, {
|
||||
"class": normalizeClass(["v-card-item", props.class]),
|
||||
"style": normalizeStyle(props.style)
|
||||
}, {
|
||||
default: () => [hasPrepend && createBaseVNode("div", {
|
||||
"key": "prepend",
|
||||
"class": "v-card-item__prepend"
|
||||
}, [!slots.prepend ? createBaseVNode(Fragment, null, [props.prependAvatar && createVNode(VAvatar, {
|
||||
"key": "prepend-avatar",
|
||||
"density": props.density,
|
||||
"image": props.prependAvatar
|
||||
}, null), props.prependIcon && createVNode(VIcon, {
|
||||
"key": "prepend-icon",
|
||||
"density": props.density,
|
||||
"icon": props.prependIcon
|
||||
}, null)]) : createVNode(VDefaultsProvider, {
|
||||
"key": "prepend-defaults",
|
||||
"disabled": !hasPrependMedia,
|
||||
"defaults": {
|
||||
VAvatar: {
|
||||
density: props.density,
|
||||
image: props.prependAvatar
|
||||
},
|
||||
VIcon: {
|
||||
density: props.density,
|
||||
icon: props.prependIcon
|
||||
}
|
||||
}
|
||||
}, slots.prepend)]), createBaseVNode("div", {
|
||||
"class": "v-card-item__content"
|
||||
}, [hasTitle && createVNode(VCardTitle, {
|
||||
"key": "title"
|
||||
}, {
|
||||
default: () => [slots.title?.() ?? toDisplayString(props.title)]
|
||||
}), hasSubtitle && createVNode(VCardSubtitle, {
|
||||
"key": "subtitle"
|
||||
}, {
|
||||
default: () => [slots.subtitle?.() ?? toDisplayString(props.subtitle)]
|
||||
}), slots.default?.()]), hasAppend && createBaseVNode("div", {
|
||||
"key": "append",
|
||||
"class": "v-card-item__append"
|
||||
}, [!slots.append ? createBaseVNode(Fragment, null, [props.appendIcon && createVNode(VIcon, {
|
||||
"key": "append-icon",
|
||||
"density": props.density,
|
||||
"icon": props.appendIcon
|
||||
}, null), props.appendAvatar && createVNode(VAvatar, {
|
||||
"key": "append-avatar",
|
||||
"density": props.density,
|
||||
"image": props.appendAvatar
|
||||
}, null)]) : createVNode(VDefaultsProvider, {
|
||||
"key": "append-defaults",
|
||||
"disabled": !hasAppendMedia,
|
||||
"defaults": {
|
||||
VAvatar: {
|
||||
density: props.density,
|
||||
image: props.appendAvatar
|
||||
},
|
||||
VIcon: {
|
||||
density: props.density,
|
||||
icon: props.appendIcon
|
||||
}
|
||||
}
|
||||
}, slots.append)])]
|
||||
});
|
||||
});
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/vuetify/lib/components/VCard/VCardText.js
|
||||
var makeVCardTextProps = propsFactory({
|
||||
opacity: [Number, String],
|
||||
...makeComponentProps(),
|
||||
...makeTagProps()
|
||||
}, "VCardText");
|
||||
var VCardText = genericComponent()({
|
||||
name: "VCardText",
|
||||
props: makeVCardTextProps(),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
useRender(() => createVNode(props.tag, {
|
||||
"class": normalizeClass(["v-card-text", props.class]),
|
||||
"style": normalizeStyle([{
|
||||
"--v-card-text-opacity": props.opacity
|
||||
}, props.style])
|
||||
}, slots));
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/vuetify/lib/components/VCard/VCard.js
|
||||
var makeVCardProps = propsFactory({
|
||||
appendAvatar: String,
|
||||
appendIcon: IconValue,
|
||||
disabled: Boolean,
|
||||
flat: Boolean,
|
||||
hover: Boolean,
|
||||
image: String,
|
||||
link: {
|
||||
type: Boolean,
|
||||
default: void 0
|
||||
},
|
||||
prependAvatar: String,
|
||||
prependIcon: IconValue,
|
||||
ripple: {
|
||||
type: [Boolean, Object],
|
||||
default: true
|
||||
},
|
||||
subtitle: {
|
||||
type: [String, Number, Boolean],
|
||||
default: void 0
|
||||
},
|
||||
text: {
|
||||
type: [String, Number, Boolean],
|
||||
default: void 0
|
||||
},
|
||||
title: {
|
||||
type: [String, Number, Boolean],
|
||||
default: void 0
|
||||
},
|
||||
...makeBorderProps(),
|
||||
...makeComponentProps(),
|
||||
...makeDensityProps(),
|
||||
...makeDimensionProps(),
|
||||
...makeElevationProps(),
|
||||
...makeLoaderProps(),
|
||||
...makeLocationProps(),
|
||||
...makePositionProps(),
|
||||
...makeRoundedProps(),
|
||||
...makeRouterProps(),
|
||||
...makeTagProps(),
|
||||
...makeThemeProps(),
|
||||
...makeVariantProps({
|
||||
variant: "elevated"
|
||||
})
|
||||
}, "VCard");
|
||||
var VCard = genericComponent()({
|
||||
name: "VCard",
|
||||
directives: {
|
||||
vRipple: ripple_default
|
||||
},
|
||||
props: makeVCardProps(),
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
attrs,
|
||||
slots
|
||||
} = _ref;
|
||||
const {
|
||||
themeClasses
|
||||
} = provideTheme(props);
|
||||
const {
|
||||
borderClasses
|
||||
} = useBorder(props);
|
||||
const {
|
||||
colorClasses,
|
||||
colorStyles,
|
||||
variantClasses
|
||||
} = useVariant(props);
|
||||
const {
|
||||
densityClasses
|
||||
} = useDensity(props);
|
||||
const {
|
||||
dimensionStyles
|
||||
} = useDimension(props);
|
||||
const {
|
||||
elevationClasses
|
||||
} = useElevation(props);
|
||||
const {
|
||||
loaderClasses
|
||||
} = useLoader(props);
|
||||
const {
|
||||
locationStyles
|
||||
} = useLocation(props);
|
||||
const {
|
||||
positionClasses
|
||||
} = usePosition(props);
|
||||
const {
|
||||
roundedClasses
|
||||
} = useRounded(props);
|
||||
const link = useLink(props, attrs);
|
||||
const loadingColor = shallowRef(void 0);
|
||||
watch(() => props.loading, (val, old) => {
|
||||
loadingColor.value = !val && typeof old === "string" ? old : typeof val === "boolean" ? void 0 : val;
|
||||
}, {
|
||||
immediate: true
|
||||
});
|
||||
useRender(() => {
|
||||
const isLink = props.link !== false && link.isLink.value;
|
||||
const isClickable = !props.disabled && props.link !== false && (props.link || link.isClickable.value);
|
||||
const Tag = isLink ? "a" : props.tag;
|
||||
const hasTitle = !!(slots.title || props.title != null);
|
||||
const hasSubtitle = !!(slots.subtitle || props.subtitle != null);
|
||||
const hasHeader = hasTitle || hasSubtitle;
|
||||
const hasAppend = !!(slots.append || props.appendAvatar || props.appendIcon);
|
||||
const hasPrepend = !!(slots.prepend || props.prependAvatar || props.prependIcon);
|
||||
const hasImage = !!(slots.image || props.image);
|
||||
const hasCardItem = hasHeader || hasPrepend || hasAppend;
|
||||
const hasText = !!(slots.text || props.text != null);
|
||||
return withDirectives(createVNode(Tag, mergeProps(link.linkProps, {
|
||||
"class": ["v-card", {
|
||||
"v-card--disabled": props.disabled,
|
||||
"v-card--flat": props.flat,
|
||||
"v-card--hover": props.hover && !(props.disabled || props.flat),
|
||||
"v-card--link": isClickable
|
||||
}, themeClasses.value, borderClasses.value, colorClasses.value, densityClasses.value, elevationClasses.value, loaderClasses.value, positionClasses.value, roundedClasses.value, variantClasses.value, props.class],
|
||||
"style": [colorStyles.value, dimensionStyles.value, locationStyles.value, props.style],
|
||||
"onClick": isClickable && link.navigate,
|
||||
"tabindex": props.disabled ? -1 : void 0
|
||||
}), {
|
||||
default: () => [hasImage && createBaseVNode("div", {
|
||||
"key": "image",
|
||||
"class": "v-card__image"
|
||||
}, [!slots.image ? createVNode(VImg, {
|
||||
"key": "image-img",
|
||||
"cover": true,
|
||||
"src": props.image
|
||||
}, null) : createVNode(VDefaultsProvider, {
|
||||
"key": "image-defaults",
|
||||
"disabled": !props.image,
|
||||
"defaults": {
|
||||
VImg: {
|
||||
cover: true,
|
||||
src: props.image
|
||||
}
|
||||
}
|
||||
}, slots.image)]), createVNode(LoaderSlot, {
|
||||
"name": "v-card",
|
||||
"active": !!props.loading,
|
||||
"color": loadingColor.value
|
||||
}, {
|
||||
default: slots.loader
|
||||
}), hasCardItem && createVNode(VCardItem, {
|
||||
"key": "item",
|
||||
"prependAvatar": props.prependAvatar,
|
||||
"prependIcon": props.prependIcon,
|
||||
"title": props.title,
|
||||
"subtitle": props.subtitle,
|
||||
"appendAvatar": props.appendAvatar,
|
||||
"appendIcon": props.appendIcon
|
||||
}, {
|
||||
default: slots.item,
|
||||
prepend: slots.prepend,
|
||||
title: slots.title,
|
||||
subtitle: slots.subtitle,
|
||||
append: slots.append
|
||||
}), hasText && createVNode(VCardText, {
|
||||
"key": "text"
|
||||
}, {
|
||||
default: () => [slots.text?.() ?? props.text]
|
||||
}), slots.default?.(), slots.actions && createVNode(VCardActions, null, {
|
||||
default: slots.actions
|
||||
}), genOverlays(isClickable, "v-card")]
|
||||
}), [[ripple_default, isClickable && props.ripple]]);
|
||||
});
|
||||
return {};
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
VCardActions,
|
||||
VCardSubtitle,
|
||||
VCardTitle,
|
||||
VCardItem,
|
||||
VCardText,
|
||||
VCard
|
||||
};
|
||||
//# sourceMappingURL=chunk-MPVSDM4V.js.map
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../vuetify/src/components/VCard/VCard.tsx", "../../vuetify/src/components/VCard/VCardActions.tsx", "../../vuetify/src/components/VCard/VCardSubtitle.tsx", "../../vuetify/src/components/VCard/VCardTitle.ts", "../../vuetify/src/components/VCard/VCardItem.tsx", "../../vuetify/src/components/VCard/VCardText.tsx"],
|
||||
"sourcesContent": ["/* eslint-disable complexity */\n\n// Styles\nimport './VCard.sass'\n\n// Components\nimport { VCardActions } from './VCardActions'\nimport { VCardItem } from './VCardItem'\nimport { VCardText } from './VCardText'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\nimport { VImg } from '@/components/VImg'\n\n// Composables\nimport { makeBorderProps, useBorder } from '@/composables/border'\nimport { makeComponentProps } from '@/composables/component'\nimport { makeDensityProps, useDensity } from '@/composables/density'\nimport { makeDimensionProps, useDimension } from '@/composables/dimensions'\nimport { makeElevationProps, useElevation } from '@/composables/elevation'\nimport { IconValue } from '@/composables/icons'\nimport { LoaderSlot, makeLoaderProps, useLoader } from '@/composables/loader'\nimport { makeLocationProps, useLocation } from '@/composables/location'\nimport { makePositionProps, usePosition } from '@/composables/position'\nimport { makeRoundedProps, useRounded } from '@/composables/rounded'\nimport { makeRouterProps, useLink } from '@/composables/router'\nimport { makeTagProps } from '@/composables/tag'\nimport { makeThemeProps, provideTheme } from '@/composables/theme'\nimport { genOverlays, makeVariantProps, useVariant } from '@/composables/variant'\n\n// Directives\nimport vRipple from '@/directives/ripple'\n\n// Utilities\nimport { shallowRef, watch } from 'vue'\nimport { genericComponent, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VCardItemSlots } from './VCardItem'\nimport type { LoaderSlotProps } from '@/composables/loader'\nimport type { RippleDirectiveBinding } from '@/directives/ripple'\n\nexport const makeVCardProps = propsFactory({\n appendAvatar: String,\n appendIcon: IconValue,\n disabled: Boolean,\n flat: Boolean,\n hover: Boolean,\n image: String,\n link: {\n type: Boolean,\n default: undefined,\n },\n prependAvatar: String,\n prependIcon: IconValue,\n ripple: {\n type: [Boolean, Object] as PropType<RippleDirectiveBinding['value']>,\n default: true,\n },\n subtitle: {\n type: [String, Number, Boolean],\n default: undefined,\n },\n text: {\n type: [String, Number, Boolean],\n default: undefined,\n },\n title: {\n type: [String, Number, Boolean],\n default: undefined,\n },\n\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeDensityProps(),\n ...makeDimensionProps(),\n ...makeElevationProps(),\n ...makeLoaderProps(),\n ...makeLocationProps(),\n ...makePositionProps(),\n ...makeRoundedProps(),\n ...makeRouterProps(),\n ...makeTagProps(),\n ...makeThemeProps(),\n ...makeVariantProps({ variant: 'elevated' } as const),\n}, 'VCard')\n\nexport type VCardSlots = VCardItemSlots & {\n default: never\n actions: never\n text: never\n loader: LoaderSlotProps\n image: never\n item: never\n}\n\nexport const VCard = genericComponent<VCardSlots>()({\n name: 'VCard',\n\n directives: { vRipple },\n\n props: makeVCardProps(),\n\n setup (props, { attrs, slots }) {\n const { themeClasses } = provideTheme(props)\n const { borderClasses } = useBorder(props)\n const { colorClasses, colorStyles, variantClasses } = useVariant(props)\n const { densityClasses } = useDensity(props)\n const { dimensionStyles } = useDimension(props)\n const { elevationClasses } = useElevation(props)\n const { loaderClasses } = useLoader(props)\n const { locationStyles } = useLocation(props)\n const { positionClasses } = usePosition(props)\n const { roundedClasses } = useRounded(props)\n const link = useLink(props, attrs)\n const loadingColor = shallowRef<string | undefined>(undefined)\n\n watch(() => props.loading, (val, old) => {\n loadingColor.value = !val && typeof old === 'string'\n ? old\n : typeof val === 'boolean'\n ? undefined\n : val\n }, { immediate: true })\n\n useRender(() => {\n const isLink = props.link !== false && link.isLink.value\n const isClickable = (\n !props.disabled &&\n props.link !== false &&\n (props.link || link.isClickable.value)\n )\n const Tag = isLink ? 'a' : props.tag\n const hasTitle = !!(slots.title || props.title != null)\n const hasSubtitle = !!(slots.subtitle || props.subtitle != null)\n const hasHeader = hasTitle || hasSubtitle\n const hasAppend = !!(slots.append || props.appendAvatar || props.appendIcon)\n const hasPrepend = !!(slots.prepend || props.prependAvatar || props.prependIcon)\n const hasImage = !!(slots.image || props.image)\n const hasCardItem = hasHeader || hasPrepend || hasAppend\n const hasText = !!(slots.text || props.text != null)\n\n return (\n <Tag\n { ...link.linkProps }\n class={[\n 'v-card',\n {\n 'v-card--disabled': props.disabled,\n 'v-card--flat': prLine truncated
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,OAAA;;;ACKO,IAAMA,wBAAwBC,aAAa;EAChD,GAAGC,mBAAmB;EACtB,GAAGC,aAAa;AAClB,GAAG,cAAc;AAEV,IAAMC,eAAeC,iBAAiB,EAAE;EAC7CC,MAAM;EAENC,OAAOP,sBAAsB;EAE7BQ,MAAOD,OAAKE,MAAa;AAAA,QAAX;MAAEC;IAAM,IAACD;AACrBE,oBAAgB;MACdC,MAAM;QACJC,MAAM;QACNC,SAAS;MACX;IACF,CAAC;AAEDC,cAAU,MAAAC,YAAAT,MAAAU,KAAA;MAAA,SAAAC,eAEC,CACL,kBACAX,MAAMY,KAAK,CACZ;MAAA,SAAAC,eACOb,MAAMc,KAAK;IAAA,GACTX,KAAK,CAElB;AAED,WAAO,CAAC;EACV;AACF,CAAC;;;AChCM,IAAMY,yBAAyBC,aAAa;EACjDC,SAAS,CAACC,QAAQC,MAAM;EAExB,GAAGC,mBAAmB;EACtB,GAAGC,aAAa;AAClB,GAAG,eAAe;AAEX,IAAMC,gBAAgBC,iBAAiB,EAAE;EAC9CC,MAAM;EAENC,OAAOV,uBAAuB;EAE9BW,MAAOD,OAAKE,MAAa;AAAA,QAAX;MAAEC;IAAM,IAACD;AACrBE,cAAU,MAAAC,YAAAL,MAAAM,KAAA;MAAA,SAAAC,eAEC,CACL,mBACAP,MAAMQ,KAAK,CACZ;MAAA,SAAAC,eACM,CACL;QAAE,6BAA6BT,MAAMR;MAAQ,GAC7CQ,MAAMU,KAAK,CACZ;IAAA,GACSP,KAAK,CAElB;AAED,WAAO,CAAC;EACV;AACF,CAAC;;;ACjCM,IAAMQ,aAAaC,uBAAuB,cAAc;;;AC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GC,iBAAiB;EACpB,GAAGC,gBAAgB;EACnB,GAAGC,aAAa;EAChB,GAAGC,eAAe;EAClB,GAAGC,iBAAiB;IAAEC,SAAS;EAAW,CAAU;AACtD,GAAG,OAAO;AAWH,IAAMC,QAAQC,iBAA6B,EAAE;EAClDC,MAAM;EAENC,YAAY;IAAEC;EAAQ;EAEtBC,OAAO1C,eAAe;EAEtB2C,MAAOD,OAAKE,MAAoB;AAAA,QAAlB;MAAEC;MAAOC;IAAM,IAACF;AAC5B,UAAM;MAAEG;IAAa,IAAIC,aAAaN,KAAK;AAC3C,UAAM;MAAEO;IAAc,IAAIC,UAAUR,KAAK;AACzC,UAAM;MAAES;MAAcC;MAAaC;IAAe,IAAIC,WAAWZ,KAAK;AACtE,UAAM;MAAEa;IAAe,IAAIC,WAAWd,KAAK;AAC3C,UAAM;MAAEe;IAAgB,IAAIC,aAAahB,KAAK;AAC9C,UAAM;MAAEiB;IAAiB,IAAIC,aAAalB,KAAK;AAC/C,UAAM;MAAEmB;IAAc,IAAIC,UAAUpB,KAAK;AACzC,UAAM;MAAEqB;IAAe,IAAIC,YAAYtB,KAAK;AAC5C,UAAM;MAAEuB;IAAgB,IAAIC,YAAYxB,KAAK;AAC7C,UAAM;MAAEyB;IAAe,IAAIC,WAAW1B,KAAK;AAC3C,UAAM/B,OAAO0D,QAAQ3B,OAAOG,KAAK;AACjC,UAAMyB,eAAeC,WAA+BzD,MAAS;AAE7D0D,UAAM,MAAM9B,MAAM+B,SAAS,CAACC,KAAKC,QAAQ;AACvCL,mBAAaM,QAAQ,CAACF,OAAO,OAALine truncated
|
||||
"names": ["makeVCardActionsProps", "propsFactory", "makeComponentProps", "makeTagProps", "VCardActions", "genericComponent", "name", "props", "setup", "_ref", "slots", "provideDefaults", "VBtn", "slim", "variant", "useRender", "_createVNode", "tag", "_normalizeClass", "class", "_normalizeStyle", "style", "makeVCardSubtitleProps", "propsFactory", "opacity", "Number", "String", "makeComponentProps", "makeTagProps", "VCardSubtitle", "genericComponent", "name", "props", "setup", "_ref", "slots", "useRender", "_createVNode", "tag", "_normalizeClass", "class", "_normalizeStyle", "style", "VCardTitle", "createSimpleFunctional", "makeCardItemProps", "propsFactory", "appendAvatar", "String", "appendIcon", "IconValue", "prependAvatar", "prependIcon", "subtitle", "type", "Number", "Boolean", "default", "undefined", "title", "makeComponentProps", "makeDensityProps", "makeTagProps", "VCardItem", "genericComponent", "name", "props", "setup", "_ref", "slots", "useRender", "hasPrependMedia", "hasPrepend", "prepend", "hasAppendMedia", "hasAppend", "append", "hasTitle", "hasSubtitle", "_createVNode", "tag", "_normalizeClass", "class", "_normalizeStyle", "style", "_createElementVNode", "_Fragment", "VAvatar", "density", "VIcon", "VDefaultsProvider", "image", "icon", "VCardTitle", "toDisplayString", "VCardSubtitle", "makeVCardTextProps", "propsFactory", "opacity", "Number", "String", "makeComponentProps", "makeTagProps", "VCardText", "genericComponent", "name", "props", "setup", "_ref", "slots", "useRender", "_createVNode", "tag", "_normalizeClass", "class", "_normalizeStyle", "style", "makeVCardProps", "propsFactory", "appendAvatar", "String", "appendIcon", "IconValue", "disabled", "Boolean", "flat", "hover", "image", "link", "type", "default", "undefined", "prependAvatar", "prependIcon", "ripple", "Object", "subtitle", "Number", "text", "title", "makeBorderProps", "makeComponentProps", "makeDensityProps", "makeDimensionProps", "makeElevationProps", "makeLoaderProps", "makeLocationProps", "makePositionProps", "makeRoundedProps", "makeRouterProps", "makeTagProps", "makeThemeProps", "makeVariantProps", "variant", "VCard", "genericComponent", "name", "directives", "vRipple", "props", "setup", "_ref", "attrs", "slots", "themeClasses", "provideTheme", "borderClasses", "useBorder", "colorClasses", "colorStyles", "variantClasses", "useVariant", "densityClasses", "useDensity", "dimensionStyles", "useDimension", "elevationClasses", "useElevation", "loaderClasses", "useLoader", "locationStyles", "useLocation", "positionClasses", "usePosition", "roundedClasses", "useRounded", "useLink", "loadingColor", "shallowRef", "watch", "loading", "val", "old", "value", "immediate", "useRender", "isLink", "isClickable", "Tag", "tag", "hasTitle", "hasSubtitle", "hasHeader", "hasAppend", "append", "hasPrepend", "prepend", "hasImage", "hasCardItem", "hasText", "_withDirectives", "_createVNode", "_mergeProps", "linkProps", "class", "style", "navigate", "_createElementVNode", "VImg", "VDefaultsProvider", "cover", "src", "LoaderSlot", "loader", "VCardItem", "item", "VCardText", "actions", "VCardActions", "genOverlays"]
|
||||
}
|
||||
Whitespace-only changes.
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
+185
@@ -0,0 +1,185 @@
|
||||
import {
|
||||
IN_BROWSER,
|
||||
SUPPORTS_TOUCH,
|
||||
getCurrentInstanceName,
|
||||
mergeDeep,
|
||||
propsFactory
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
computed,
|
||||
inject,
|
||||
onScopeDispose,
|
||||
reactive,
|
||||
shallowRef,
|
||||
toRef,
|
||||
toRefs,
|
||||
watchEffect
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/composables/display.js
|
||||
var breakpoints = ["sm", "md", "lg", "xl", "xxl"];
|
||||
var DisplaySymbol = /* @__PURE__ */ Symbol.for("vuetify:display");
|
||||
var defaultDisplayOptions = {
|
||||
mobileBreakpoint: "lg",
|
||||
thresholds: {
|
||||
xs: 0,
|
||||
sm: 600,
|
||||
md: 960,
|
||||
lg: 1280,
|
||||
xl: 1920,
|
||||
xxl: 2560
|
||||
}
|
||||
};
|
||||
var parseDisplayOptions = function() {
|
||||
let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : defaultDisplayOptions;
|
||||
return mergeDeep(defaultDisplayOptions, options);
|
||||
};
|
||||
function getClientWidth(ssr) {
|
||||
return IN_BROWSER && !ssr ? window.innerWidth : typeof ssr === "object" && ssr.clientWidth || 0;
|
||||
}
|
||||
function getClientHeight(ssr) {
|
||||
return IN_BROWSER && !ssr ? window.innerHeight : typeof ssr === "object" && ssr.clientHeight || 0;
|
||||
}
|
||||
function getPlatform(ssr) {
|
||||
const userAgent = IN_BROWSER && !ssr ? window.navigator.userAgent : "ssr";
|
||||
function match(regexp) {
|
||||
return Boolean(userAgent.match(regexp));
|
||||
}
|
||||
const android = match(/android/i);
|
||||
const ios = match(/iphone|ipad|ipod/i);
|
||||
const cordova = match(/cordova/i);
|
||||
const electron = match(/electron/i);
|
||||
const chrome = match(/chrome/i);
|
||||
const edge = match(/edge/i);
|
||||
const firefox = match(/firefox/i);
|
||||
const opera = match(/opera/i);
|
||||
const win = match(/win/i);
|
||||
const mac = match(/mac/i);
|
||||
const linux = match(/linux/i);
|
||||
return {
|
||||
android,
|
||||
ios,
|
||||
cordova,
|
||||
electron,
|
||||
chrome,
|
||||
edge,
|
||||
firefox,
|
||||
opera,
|
||||
win,
|
||||
mac,
|
||||
linux,
|
||||
touch: SUPPORTS_TOUCH,
|
||||
ssr: userAgent === "ssr"
|
||||
};
|
||||
}
|
||||
function createDisplay(options, ssr) {
|
||||
const {
|
||||
thresholds,
|
||||
mobileBreakpoint
|
||||
} = parseDisplayOptions(options);
|
||||
const height = shallowRef(getClientHeight(ssr));
|
||||
const platform = shallowRef(getPlatform(ssr));
|
||||
const state = reactive({});
|
||||
const width = shallowRef(getClientWidth(ssr));
|
||||
function updateSize() {
|
||||
height.value = getClientHeight();
|
||||
width.value = getClientWidth();
|
||||
}
|
||||
function update() {
|
||||
updateSize();
|
||||
platform.value = getPlatform();
|
||||
}
|
||||
watchEffect(() => {
|
||||
const xs = width.value < thresholds.sm;
|
||||
const sm = width.value < thresholds.md && !xs;
|
||||
const md = width.value < thresholds.lg && !(sm || xs);
|
||||
const lg = width.value < thresholds.xl && !(md || sm || xs);
|
||||
const xl = width.value < thresholds.xxl && !(lg || md || sm || xs);
|
||||
const xxl = width.value >= thresholds.xxl;
|
||||
const name = xs ? "xs" : sm ? "sm" : md ? "md" : lg ? "lg" : xl ? "xl" : "xxl";
|
||||
const breakpointValue = typeof mobileBreakpoint === "number" ? mobileBreakpoint : thresholds[mobileBreakpoint];
|
||||
const mobile = width.value < breakpointValue;
|
||||
state.xs = xs;
|
||||
state.sm = sm;
|
||||
state.md = md;
|
||||
state.lg = lg;
|
||||
state.xl = xl;
|
||||
state.xxl = xxl;
|
||||
state.smAndUp = !xs;
|
||||
state.mdAndUp = !(xs || sm);
|
||||
state.lgAndUp = !(xs || sm || md);
|
||||
state.xlAndUp = !(xs || sm || md || lg);
|
||||
state.smAndDown = !(md || lg || xl || xxl);
|
||||
state.mdAndDown = !(lg || xl || xxl);
|
||||
state.lgAndDown = !(xl || xxl);
|
||||
state.xlAndDown = !xxl;
|
||||
state.name = name;
|
||||
state.height = height.value;
|
||||
state.width = width.value;
|
||||
state.mobile = mobile;
|
||||
state.mobileBreakpoint = mobileBreakpoint;
|
||||
state.platform = platform.value;
|
||||
state.thresholds = thresholds;
|
||||
});
|
||||
if (IN_BROWSER) {
|
||||
window.addEventListener("resize", updateSize, {
|
||||
passive: true
|
||||
});
|
||||
onScopeDispose(() => {
|
||||
window.removeEventListener("resize", updateSize);
|
||||
}, true);
|
||||
}
|
||||
return {
|
||||
...toRefs(state),
|
||||
update,
|
||||
ssr: !!ssr
|
||||
};
|
||||
}
|
||||
var makeDisplayProps = propsFactory({
|
||||
mobile: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
mobileBreakpoint: [Number, String]
|
||||
}, "display");
|
||||
function useDisplay() {
|
||||
let props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
||||
mobile: null
|
||||
};
|
||||
let name = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : getCurrentInstanceName();
|
||||
const display = inject(DisplaySymbol);
|
||||
if (!display) throw new Error("Could not find Vuetify display injection");
|
||||
const mobile = computed(() => {
|
||||
if (props.mobile) {
|
||||
return true;
|
||||
} else if (typeof props.mobileBreakpoint === "number") {
|
||||
return display.width.value < props.mobileBreakpoint;
|
||||
} else if (props.mobileBreakpoint) {
|
||||
return display.width.value < display.thresholds.value[props.mobileBreakpoint];
|
||||
} else if (props.mobile === null) {
|
||||
return display.mobile.value;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
const displayClasses = toRef(() => {
|
||||
if (!name) return {};
|
||||
return {
|
||||
[`${name}--mobile`]: mobile.value
|
||||
};
|
||||
});
|
||||
return {
|
||||
...display,
|
||||
displayClasses,
|
||||
mobile
|
||||
};
|
||||
}
|
||||
|
||||
export {
|
||||
breakpoints,
|
||||
DisplaySymbol,
|
||||
createDisplay,
|
||||
makeDisplayProps,
|
||||
useDisplay
|
||||
};
|
||||
//# sourceMappingURL=chunk-N4LJHDYD.js.map
|
||||
Loaded 100 of 5218 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user