@vuetify/nightly 3.0.0-next-20220107.0 → 3.0.0-next-20220126.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/json/attributes.json +96 -20
  2. package/dist/json/importMap.json +8 -0
  3. package/dist/json/tags.json +32 -3
  4. package/dist/json/web-types.json +338 -41
  5. package/dist/vuetify.css +77 -20
  6. package/dist/vuetify.d.ts +204 -48
  7. package/dist/vuetify.esm.js +707 -387
  8. package/dist/vuetify.esm.js.map +1 -1
  9. package/dist/vuetify.js +707 -387
  10. package/dist/vuetify.js.map +1 -1
  11. package/dist/vuetify.min.css +2 -2
  12. package/dist/vuetify.min.js +2 -2
  13. package/dist/vuetify.min.js.map +1 -1
  14. package/lib/components/VBtn/VBtn.css +0 -16
  15. package/lib/components/VBtn/VBtn.sass +0 -6
  16. package/lib/components/VBtn/_variables.scss +0 -2
  17. package/lib/components/VExpansionPanel/VExpansionPanel.mjs +2 -2
  18. package/lib/components/VExpansionPanel/VExpansionPanel.mjs.map +1 -1
  19. package/lib/components/VHover/VHover.mjs +3 -3
  20. package/lib/components/VHover/VHover.mjs.map +1 -1
  21. package/lib/components/VInput/VInput.mjs +3 -2
  22. package/lib/components/VInput/VInput.mjs.map +1 -1
  23. package/lib/components/VList/VList.css +4 -2
  24. package/lib/components/VList/VList.mjs +34 -35
  25. package/lib/components/VList/VList.mjs.map +1 -1
  26. package/lib/components/VList/VList.sass +5 -2
  27. package/lib/components/VList/VListChildren.mjs +19 -14
  28. package/lib/components/VList/VListChildren.mjs.map +1 -1
  29. package/lib/components/VList/VListGroup.mjs +16 -40
  30. package/lib/components/VList/VListGroup.mjs.map +1 -1
  31. package/lib/components/VList/VListItem.mjs +3 -3
  32. package/lib/components/VList/VListItem.mjs.map +1 -1
  33. package/lib/components/VList/VListSubheader.mjs +20 -12
  34. package/lib/components/VList/VListSubheader.mjs.map +1 -1
  35. package/lib/components/VList/list.mjs +31 -0
  36. package/lib/components/VList/list.mjs.map +1 -0
  37. package/lib/components/VMessages/VMessages.mjs +12 -4
  38. package/lib/components/VMessages/VMessages.mjs.map +1 -1
  39. package/lib/components/VOverlay/VOverlay.mjs +2 -2
  40. package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
  41. package/lib/components/VOverlay/useActivator.mjs +12 -2
  42. package/lib/components/VOverlay/useActivator.mjs.map +1 -1
  43. package/lib/components/VPagination/VPagination.mjs +23 -31
  44. package/lib/components/VPagination/VPagination.mjs.map +1 -1
  45. package/lib/components/VWindow/VWindow.css +70 -0
  46. package/lib/components/VWindow/VWindow.mjs +158 -233
  47. package/lib/components/VWindow/VWindow.mjs.map +1 -1
  48. package/lib/components/VWindow/VWindow.sass +26 -50
  49. package/lib/components/VWindow/VWindowItem.mjs +72 -98
  50. package/lib/components/VWindow/VWindowItem.mjs.map +1 -1
  51. package/lib/components/VWindow/_variables.scss +2 -3
  52. package/lib/components/VWindow/index.mjs +2 -9
  53. package/lib/components/VWindow/index.mjs.map +1 -1
  54. package/lib/components/index.d.ts +200 -47
  55. package/lib/components/index.mjs +1 -1
  56. package/lib/components/index.mjs.map +1 -1
  57. package/lib/composables/group.mjs +1 -6
  58. package/lib/composables/group.mjs.map +1 -1
  59. package/lib/composables/nested/nested.mjs +1 -1
  60. package/lib/composables/nested/nested.mjs.map +1 -1
  61. package/lib/composables/nested/openStrategies.mjs +1 -1
  62. package/lib/composables/nested/openStrategies.mjs.map +1 -1
  63. package/lib/directives/touch/index.mjs +6 -3
  64. package/lib/directives/touch/index.mjs.map +1 -1
  65. package/lib/entry-bundler.mjs +1 -1
  66. package/lib/index.d.ts +2 -0
  67. package/package.json +2 -1
@@ -1,24 +1,20 @@
1
- // @ts-nocheck
2
-
3
- /* eslint-disable */
4
- // Components
5
- // Mixins
6
- import Bootable from "../../mixins/bootable.mjs";
7
- import { factory as GroupableFactory } from "../../mixins/groupable.mjs"; // Directives
1
+ import { withDirectives as _withDirectives, createVNode as _createVNode, vShow as _vShow } from "vue";
2
+ // Composables
3
+ import { makeGroupItemProps, useGroupItem } from "../../composables/group.mjs";
4
+ import { makeLazyProps, useLazy } from "../../composables/lazy.mjs";
5
+ import { MaybeTransition } from "../../composables/transition.mjs"; // Directives
8
6
 
9
7
  import Touch from "../../directives/touch/index.mjs"; // Utilities
10
8
 
11
- import { convertToUnit } from "../../util/helpers.mjs";
12
- import mixins from "../../util/mixins.mjs"; // Types
13
-
14
- const baseMixins = mixins(Bootable, GroupableFactory('windowGroup', 'v-window-item', 'v-window'));
15
- export default baseMixins.extend().extend().extend({
16
- name: 'v-window-item',
9
+ import { computed, inject, nextTick, ref } from 'vue';
10
+ import { convertToUnit, defineComponent } from "../../util/index.mjs";
11
+ import { VWindowGroupSymbol, VWindowSymbol } from "./VWindow.mjs";
12
+ export const VWindowItem = defineComponent({
13
+ name: 'VWindowItem',
17
14
  directives: {
18
15
  Touch
19
16
  },
20
17
  props: {
21
- disabled: Boolean,
22
18
  reverseTransition: {
23
19
  type: [Boolean, String],
24
20
  default: undefined
@@ -27,122 +23,100 @@ export default baseMixins.extend().extend().extend({
27
23
  type: [Boolean, String],
28
24
  default: undefined
29
25
  },
30
- value: {
31
- required: false
32
- }
33
- },
34
-
35
- data() {
36
- return {
37
- isActive: false,
38
- inTransition: false
39
- };
40
- },
41
-
42
- computed: {
43
- classes() {
44
- return this.groupClasses;
45
- },
46
-
47
- computedTransition() {
48
- if (!this.windowGroup.internalReverse) {
49
- return typeof this.transition !== 'undefined' ? this.transition || '' : this.windowGroup.computedTransition;
50
- }
51
-
52
- return typeof this.reverseTransition !== 'undefined' ? this.reverseTransition || '' : this.windowGroup.computedTransition;
53
- }
54
-
26
+ ...makeLazyProps(),
27
+ ...makeGroupItemProps()
55
28
  },
56
- methods: {
57
- genDefaultSlot() {
58
- return this.$slots.default;
59
- },
60
-
61
- genWindowItem() {
62
- return this.$createElement('div', {
63
- staticClass: 'v-window-item',
64
- class: this.classes,
65
- directives: [{
66
- name: 'show',
67
- value: this.isActive
68
- }],
69
- on: this.$listeners
70
- }, this.genDefaultSlot());
71
- },
72
29
 
73
- onAfterTransition() {
74
- if (!this.inTransition) {
30
+ setup(props, _ref) {
31
+ let {
32
+ slots
33
+ } = _ref;
34
+ const window = inject(VWindowSymbol);
35
+ const groupItem = useGroupItem(props, VWindowGroupSymbol);
36
+ if (!window || !groupItem) throw new Error('[Vuetify] VWindowItem must be used inside VWindow');
37
+ const isTransitioning = ref(false);
38
+ const hasTransition = computed(() => window.isReversed.value ? props.reverseTransition !== false : props.transition !== false);
39
+
40
+ function onAfterTransition() {
41
+ if (!isTransitioning.value || !window) {
75
42
  return;
76
43
  } // Finalize transition state.
77
44
 
78
45
 
79
- this.inTransition = false;
46
+ isTransitioning.value = false;
80
47
 
81
- if (this.windowGroup.transitionCount > 0) {
82
- this.windowGroup.transitionCount--; // Remove container height if we are out of transition.
48
+ if (window.transitionCount.value > 0) {
49
+ window.transitionCount.value -= 1; // Remove container height if we are out of transition.
83
50
 
84
- if (this.windowGroup.transitionCount === 0) {
85
- this.windowGroup.transitionHeight = undefined;
51
+ if (window.transitionCount.value === 0) {
52
+ window.transitionHeight.value = undefined;
86
53
  }
87
54
  }
88
- },
55
+ }
89
56
 
90
- onBeforeTransition() {
91
- if (this.inTransition) {
57
+ function onBeforeTransition() {
58
+ if (isTransitioning.value || !window) {
92
59
  return;
93
60
  } // Initialize transition state here.
94
61
 
95
62
 
96
- this.inTransition = true;
63
+ isTransitioning.value = true;
64
+
65
+ if (window.transitionCount.value === 0) {
66
+ var _window$rootRef$value;
97
67
 
98
- if (this.windowGroup.transitionCount === 0) {
99
68
  // Set initial height for height transition.
100
- this.windowGroup.transitionHeight = convertToUnit(this.windowGroup.$el.clientHeight);
69
+ window.transitionHeight.value = convertToUnit((_window$rootRef$value = window.rootRef.value) == null ? void 0 : _window$rootRef$value.clientHeight);
101
70
  }
102
71
 
103
- this.windowGroup.transitionCount++;
104
- },
72
+ window.transitionCount.value += 1;
73
+ }
105
74
 
106
- onTransitionCancelled() {
107
- this.onAfterTransition(); // This should have the same path as normal transition end.
108
- },
75
+ function onTransitionCancelled() {
76
+ onAfterTransition(); // This should have the same path as normal transition end.
77
+ }
109
78
 
110
- onEnter(el) {
111
- if (!this.inTransition) {
79
+ function onEnterTransition(el) {
80
+ if (!isTransitioning.value) {
112
81
  return;
113
82
  }
114
83
 
115
- this.$nextTick(() => {
84
+ nextTick(() => {
116
85
  // Do not set height if no transition or cancelled.
117
- if (!this.computedTransition || !this.inTransition) {
86
+ if (!hasTransition.value || !isTransitioning.value || !window) {
118
87
  return;
119
88
  } // Set transition target height.
120
89
 
121
90
 
122
- this.windowGroup.transitionHeight = convertToUnit(el.clientHeight);
91
+ window.transitionHeight.value = convertToUnit(el.clientHeight);
123
92
  });
124
93
  }
125
94
 
126
- },
127
-
128
- render(h) {
129
- return h('transition', {
130
- props: {
131
- name: this.computedTransition
132
- },
133
- on: {
134
- // Handlers for enter windows.
135
- beforeEnter: this.onBeforeTransition,
136
- afterEnter: this.onAfterTransition,
137
- enterCancelled: this.onTransitionCancelled,
138
- // Handlers for leave windows.
139
- beforeLeave: this.onBeforeTransition,
140
- afterLeave: this.onAfterTransition,
141
- leaveCancelled: this.onTransitionCancelled,
142
- // Enter handler for height transition.
143
- enter: this.onEnter
144
- }
145
- }, this.showLazyContent(() => [this.genWindowItem()]));
95
+ const transition = computed(() => {
96
+ const name = window.isReversed.value ? props.reverseTransition : props.transition;
97
+ return !hasTransition.value ? false : {
98
+ name: typeof name !== 'string' ? window.transition.value : name,
99
+ onBeforeEnter: onBeforeTransition,
100
+ onAfterEnter: onAfterTransition,
101
+ onEnterCancelled: onTransitionCancelled,
102
+ onBeforeLeave: onBeforeTransition,
103
+ onAfterLeave: onAfterTransition,
104
+ onLeaveCancelled: onTransitionCancelled,
105
+ onEnter: onEnterTransition
106
+ };
107
+ });
108
+ const {
109
+ hasContent
110
+ } = useLazy(props, groupItem.isSelected);
111
+ return () => {
112
+ return _createVNode(MaybeTransition, {
113
+ "transition": transition.value
114
+ }, {
115
+ default: () => [_withDirectives(_createVNode("div", {
116
+ "class": ['v-window-item', groupItem.selectedClass.value]
117
+ }, [slots.default && hasContent.value && slots.default()], 2), [[_vShow, groupItem.isSelected.value]])]
118
+ }, 8, ["transition"]);
119
+ };
146
120
  }
147
121
 
148
122
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/VWindow/VWindowItem.ts"],"names":["Bootable","factory","GroupableFactory","Touch","convertToUnit","mixins","baseMixins","extend","name","directives","props","disabled","Boolean","reverseTransition","type","String","default","undefined","transition","value","required","data","isActive","inTransition","computed","classes","groupClasses","computedTransition","windowGroup","internalReverse","methods","genDefaultSlot","$slots","genWindowItem","$createElement","staticClass","class","on","$listeners","onAfterTransition","transitionCount","transitionHeight","onBeforeTransition","$el","clientHeight","onTransitionCancelled","onEnter","el","$nextTick","render","h","beforeEnter","afterEnter","enterCancelled","beforeLeave","afterLeave","leaveCancelled","enter","showLazyContent"],"mappings":"AAAA;;AACA;AAEA;AAGA;OACOA,Q;SACEC,OAAO,IAAIC,gB,sCAEpB;;OACOC,K,0CAEP;;SACSC,a;OACFC,M,+BAEP;;AAGA,MAAMC,UAAU,GAAGD,MAAM,CACvBL,QADuB,EAEvBE,gBAAgB,CAAC,aAAD,EAAgB,eAAhB,EAAiC,UAAjC,CAFO,CAAzB;AAUA,eAAeI,UAAU,CAACC,MAAX,GAA6BA,MAA7B,GAEbA,MAFa,CAEN;AACPC,EAAAA,IAAI,EAAE,eADC;AAGPC,EAAAA,UAAU,EAAE;AACVN,IAAAA;AADU,GAHL;AAOPO,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAEC,OADL;AAELC,IAAAA,iBAAiB,EAAE;AACjBC,MAAAA,IAAI,EAAE,CAACF,OAAD,EAAUG,MAAV,CADW;AAEjBC,MAAAA,OAAO,EAAEC;AAFQ,KAFd;AAMLC,IAAAA,UAAU,EAAE;AACVJ,MAAAA,IAAI,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,OADc;AAIrBU,MAAAA,EAAE,EAAE;AACF;AACAc,QAAAA,WAAW,EAAE,KAAKT,kBAFhB;AAGFU,QAAAA,UAAU,EAAE,KAAKb,iBAHf;AAIFc,QAAAA,cAAc,EAAE,KAAKR,qBAJnB;AAMF;AACAS,QAAAA,WAAW,EAAE,KAAKZ,kBAPhB;AAQFa,QAAAA,UAAU,EAAE,KAAKhB,iBARf;AASFiB,QAAAA,cAAc,EAAE,KAAKX,qBATnB;AAWF;AACAY,QAAAA,KAAK,EAAE,KAAKX;AAZV;AAJiB,KAAf,EAkBL,KAAKY,eAAL,CAAqB,MAAM,CAAC,KAAKzB,aAAL,EAAD,CAA3B,CAlBK,CAAR;AAmBD;;AAlIM,CAFM,CAAf","sourcesContent":["// @ts-nocheck\n/* eslint-disable */\n\n// Components\nimport VWindow from './VWindow'\n\n// Mixins\nimport Bootable from '../../mixins/bootable'\nimport { factory as GroupableFactory } from '../../mixins/groupable'\n\n// Directives\nimport Touch from '../../directives/touch'\n\n// Utilities\nimport { convertToUnit } from '../../util/helpers'\nimport mixins, { ExtractVue } from '../../util/mixins'\n\n// Types\nimport { VNode } from 'vue'\n\nconst baseMixins = mixins(\n Bootable,\n GroupableFactory('windowGroup', 'v-window-item', 'v-window')\n)\n\ninterface options extends ExtractVue<typeof baseMixins> {\n $el: HTMLElement\n windowGroup: InstanceType<typeof VWindow>\n}\n\nexport default baseMixins.extend<options>().extend(\n /* @vue/component */\n).extend({\n name: 'v-window-item',\n\n directives: {\n Touch,\n },\n\n props: {\n disabled: Boolean,\n reverseTransition: {\n type: [Boolean, String],\n default: undefined,\n },\n transition: {\n type: [Boolean, String],\n default: undefined,\n },\n value: {\n required: false,\n },\n },\n\n data () {\n return {\n isActive: false,\n inTransition: false,\n }\n },\n\n computed: {\n classes (): object {\n return this.groupClasses\n },\n computedTransition (): string | boolean {\n if (!this.windowGroup.internalReverse) {\n return typeof this.transition !== 'undefined'\n ? this.transition || ''\n : this.windowGroup.computedTransition\n }\n\n return typeof this.reverseTransition !== 'undefined'\n ? this.reverseTransition || ''\n : this.windowGroup.computedTransition\n },\n },\n\n methods: {\n genDefaultSlot () {\n return this.$slots.default\n },\n genWindowItem () {\n return this.$createElement('div', {\n staticClass: 'v-window-item',\n class: this.classes,\n directives: [{\n name: 'show',\n value: this.isActive,\n }],\n on: this.$listeners,\n }, this.genDefaultSlot())\n },\n onAfterTransition () {\n if (!this.inTransition) {\n return\n }\n\n // Finalize transition state.\n this.inTransition = false\n if (this.windowGroup.transitionCount > 0) {\n this.windowGroup.transitionCount--\n\n // Remove container height if we are out of transition.\n if (this.windowGroup.transitionCount === 0) {\n this.windowGroup.transitionHeight = undefined\n }\n }\n },\n onBeforeTransition () {\n if (this.inTransition) {\n return\n }\n\n // Initialize transition state here.\n this.inTransition = true\n if (this.windowGroup.transitionCount === 0) {\n // Set initial height for height transition.\n this.windowGroup.transitionHeight = convertToUnit(this.windowGroup.$el.clientHeight)\n }\n this.windowGroup.transitionCount++\n },\n onTransitionCancelled () {\n this.onAfterTransition() // This should have the same path as normal transition end.\n },\n onEnter (el: HTMLElement) {\n if (!this.inTransition) {\n return\n }\n\n this.$nextTick(() => {\n // Do not set height if no transition or cancelled.\n if (!this.computedTransition || !this.inTransition) {\n return\n }\n\n // Set transition target height.\n this.windowGroup.transitionHeight = convertToUnit(el.clientHeight)\n })\n },\n },\n\n render (h): VNode {\n return h('transition', {\n props: {\n name: this.computedTransition,\n },\n on: {\n // Handlers for enter windows.\n beforeEnter: this.onBeforeTransition,\n afterEnter: this.onAfterTransition,\n enterCancelled: this.onTransitionCancelled,\n\n // Handlers for leave windows.\n beforeLeave: this.onBeforeTransition,\n afterLeave: this.onAfterTransition,\n leaveCancelled: this.onTransitionCancelled,\n\n // Enter handler for height transition.\n enter: this.onEnter,\n },\n }, this.showLazyContent(() => [this.genWindowItem()]))\n },\n})\n"],"file":"VWindowItem.mjs"}
1
+ {"version":3,"sources":["../../../src/components/VWindow/VWindowItem.tsx"],"names":["makeGroupItemProps","useGroupItem","makeLazyProps","useLazy","MaybeTransition","Touch","computed","inject","nextTick","ref","convertToUnit","defineComponent","VWindowGroupSymbol","VWindowSymbol","VWindowItem","name","directives","props","reverseTransition","type","Boolean","String","default","undefined","transition","setup","slots","window","groupItem","Error","isTransitioning","hasTransition","isReversed","value","onAfterTransition","transitionCount","transitionHeight","onBeforeTransition","rootRef","clientHeight","onTransitionCancelled","onEnterTransition","el","onBeforeEnter","onAfterEnter","onEnterCancelled","onBeforeLeave","onAfterLeave","onLeaveCancelled","onEnter","hasContent","isSelected","selectedClass"],"mappings":";AAAA;SACSA,kB,EAAoBC,Y;SACpBC,a,EAAeC,O;SACfC,e,4CAET;;OACOC,K,0CAEP;;AACA,SAASC,QAAT,EAAmBC,MAAnB,EAA2BC,QAA3B,EAAqCC,GAArC,QAAgD,KAAhD;SACSC,a,EAAeC,e;SACfC,kB,EAAoBC,a;AAE7B,OAAO,MAAMC,WAAW,GAAGH,eAAe,CAAC;AACzCI,EAAAA,IAAI,EAAE,aADmC;AAGzCC,EAAAA,UAAU,EAAE;AACVX,IAAAA;AADU,GAH6B;AAOzCY,EAAAA,KAAK,EAAE;AACLC,IAAAA,iBAAiB,EAAE;AACjBC,MAAAA,IAAI,EAAE,CAACC,OAAD,EAAUC,MAAV,CADW;AAEjBC,MAAAA,OAAO,EAAEC;AAFQ,KADd;AAKLC,IAAAA,UAAU,EAAE;AACVL,MAAAA,IAAI,EAAE,CAACC,OAAD,EAAUC,MAAV,CADI;AAEVC,MAAAA,OAAO,EAAEC;AAFC,KALP;AASL,OAAGrB,aAAa,EATX;AAUL,OAAGF,kBAAkB;AAVhB,GAPkC;;AAoBzCyB,EAAAA,KAAK,CAAER,KAAF,QAAoB;AAAA,QAAX;AAAES,MAAAA;AAAF,KAAW;AACvB,UAAMC,MAAM,GAAGpB,MAAM,CAACM,aAAD,CAArB;AACA,UAAMe,SAAS,GAAG3B,YAAY,CAACgB,KAAD,EAAQL,kBAAR,CAA9B;AAEA,Q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CACL,eADK,EAELL,SAAS,CAACwB,aAAV,CAAwBnB,KAFnB;AAHb,YASQP,KAAK,CAACJ,OAAN,IAAiB4B,UAAU,CAACjB,KAA5B,IAAqCP,KAAK,CAACJ,OAAN,EAT7C,iBAOeM,SAAS,CAACuB,UAAV,CAAqBlB,KAPpC;AAAA;AAaD,KAdD;AAeD;;AApHwC,CAAD,CAAnC","sourcesContent":["// Composables\nimport { makeGroupItemProps, useGroupItem } from '@/composables/group'\nimport { makeLazyProps, useLazy } from '@/composables/lazy'\nimport { MaybeTransition } from '@/composables/transition'\n\n// Directives\nimport Touch from '@/directives/touch'\n\n// Utilities\nimport { computed, inject, nextTick, ref } from 'vue'\nimport { convertToUnit, defineComponent } from '@/util'\nimport { VWindowGroupSymbol, VWindowSymbol } from './VWindow'\n\nexport const VWindowItem = defineComponent({\n name: 'VWindowItem',\n\n directives: {\n Touch,\n },\n\n props: {\n reverseTransition: {\n type: [Boolean, String],\n default: undefined,\n },\n transition: {\n type: [Boolean, String],\n default: undefined,\n },\n ...makeLazyProps(),\n ...makeGroupItemProps(),\n },\n\n setup (props, { slots }) {\n const window = inject(VWindowSymbol)\n const groupItem = useGroupItem(props, VWindowGroupSymbol)\n\n if (!window || !groupItem) throw new Error('[Vuetify] VWindowItem must be used inside VWindow')\n\n const isTransitioning = ref(false)\n const hasTransition = computed(() => window.isReversed.value ? props.reverseTransition !== false : props.transition !== false)\n\n function onAfterTransition () {\n if (!isTransitioning.value || !window) {\n return\n }\n\n // Finalize transition state.\n isTransitioning.value = false\n if (window.transitionCount.value > 0) {\n window.transitionCount.value -= 1\n\n // Remove container height if we are out of transition.\n if (window.transitionCount.value === 0) {\n window.transitionHeight.value = undefined\n }\n }\n }\n\n function onBeforeTransition () {\n if (isTransitioning.value || !window) {\n return\n }\n\n // Initialize transition state here.\n isTransitioning.value = true\n\n if (window.transitionCount.value === 0) {\n // Set initial height for height transition.\n window.transitionHeight.value = convertToUnit(window.rootRef.value?.clientHeight)\n }\n\n window.transitionCount.value += 1\n }\n\n function onTransitionCancelled () {\n onAfterTransition() // This should have the same path as normal transition end.\n }\n\n function onEnterTransition (el: Element) {\n if (!isTransitioning.value) {\n return\n }\n\n nextTick(() => {\n // Do not set height if no transition or cancelled.\n if (!hasTransition.value || !isTransitioning.value || !window) {\n return\n }\n\n // Set transition target height.\n window.transitionHeight.value = convertToUnit(el.clientHeight)\n })\n }\n\n const transition = computed(() => {\n const name = window.isReversed.value\n ? props.reverseTransition\n : props.transition\n\n return !hasTransition.value ? false : {\n name: typeof name !== 'string' ? window.transition.value : name,\n onBeforeEnter: onBeforeTransition,\n onAfterEnter: onAfterTransition,\n onEnterCancelled: onTransitionCancelled,\n onBeforeLeave: onBeforeTransition,\n onAfterLeave: onAfterTransition,\n onLeaveCancelled: onTransitionCancelled,\n onEnter: onEnterTransition,\n }\n })\n\n const { hasContent } = useLazy(props, groupItem.isSelected)\n\n return () => {\n return (\n <MaybeTransition transition={ transition.value } >\n <div\n class={[\n 'v-window-item',\n groupItem.selectedClass.value,\n ]}\n v-show={ groupItem.isSelected.value }\n >\n { slots.default && hasContent.value && slots.default() }\n </div>\n </MaybeTransition>\n )\n }\n },\n})\n"],"file":"VWindowItem.mjs"}
@@ -1,5 +1,4 @@
1
- @import '../../styles/styles.sass';
1
+ @use '../../styles/settings';
2
2
 
3
3
  $window-transition: .3s cubic-bezier(.25, .8, .50, 1) !default;
4
- $window-controls-margin: 0 16px !default;
5
- $window-controls-top: calc(50% - 20px) !default;
4
+ $window-controls-padding: 0 16px !default;
@@ -1,10 +1,3 @@
1
- import VWindow from "./VWindow.mjs";
2
- import VWindowItem from "./VWindowItem.mjs";
3
- export { VWindow, VWindowItem };
4
- export default {
5
- $_vuetify_subcomponents: {
6
- VWindow,
7
- VWindowItem
8
- }
9
- };
1
+ export { VWindow } from "./VWindow.mjs";
2
+ export { VWindowItem } from "./VWindowItem.mjs";
10
3
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/VWindow/index.ts"],"names":["VWindow","VWindowItem","$_vuetify_subcomponents"],"mappings":"OAAOA,O;OACAC,W;AAEP,SAASD,OAAT,EAAkBC,WAAlB;AAEA,eAAe;AACbC,EAAAA,uBAAuB,EAAE;AACvBF,IAAAA,OADuB;AAEvBC,IAAAA;AAFuB;AADZ,CAAf","sourcesContent":["import VWindow from './VWindow'\nimport VWindowItem from './VWindowItem'\n\nexport { VWindow, VWindowItem }\n\nexport default {\n $_vuetify_subcomponents: {\n VWindow,\n VWindowItem,\n },\n}\n"],"file":"index.mjs"}
1
+ {"version":3,"sources":["../../../src/components/VWindow/index.ts"],"names":["VWindow","VWindowItem"],"mappings":"SAASA,O;SACAC,W","sourcesContent":["export { VWindow } from './VWindow'\nexport { VWindowItem } from './VWindowItem'\n"],"file":"index.mjs"}