@vuetify/nightly 3.9.2-master.2025-07-24 → 3.9.2-master.2025-07-25

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 (75) hide show
  1. package/CHANGELOG.md +7 -3
  2. package/dist/_component-variables-labs.sass +1 -0
  3. package/dist/json/attributes.json +4100 -3952
  4. package/dist/json/importMap-labs.json +30 -18
  5. package/dist/json/importMap.json +162 -162
  6. package/dist/json/tags.json +52 -0
  7. package/dist/json/web-types.json +7540 -7045
  8. package/dist/vuetify-labs.cjs +781 -118
  9. package/dist/vuetify-labs.css +4416 -4309
  10. package/dist/vuetify-labs.d.ts +1078 -63
  11. package/dist/vuetify-labs.esm.js +782 -119
  12. package/dist/vuetify-labs.esm.js.map +1 -1
  13. package/dist/vuetify-labs.js +781 -118
  14. package/dist/vuetify-labs.min.css +2 -2
  15. package/dist/vuetify.cjs +40 -28
  16. package/dist/vuetify.cjs.map +1 -1
  17. package/dist/vuetify.css +5492 -5492
  18. package/dist/vuetify.d.ts +67 -62
  19. package/dist/vuetify.esm.js +40 -28
  20. package/dist/vuetify.esm.js.map +1 -1
  21. package/dist/vuetify.js +40 -28
  22. package/dist/vuetify.js.map +1 -1
  23. package/dist/vuetify.min.css +2 -2
  24. package/dist/vuetify.min.js +936 -938
  25. package/dist/vuetify.min.js.map +1 -1
  26. package/lib/components/VOverlay/locationStrategies.js +16 -10
  27. package/lib/components/VOverlay/locationStrategies.js.map +1 -1
  28. package/lib/components/index.js +1 -1
  29. package/lib/components/index.js.map +1 -1
  30. package/lib/composables/goto.d.ts +3 -2
  31. package/lib/composables/goto.js +2 -16
  32. package/lib/composables/goto.js.map +1 -1
  33. package/lib/composables/reveal.d.ts +36 -0
  34. package/lib/composables/reveal.js +30 -0
  35. package/lib/composables/reveal.js.map +1 -0
  36. package/lib/entry-bundler.js +1 -1
  37. package/lib/framework.d.ts +151 -146
  38. package/lib/framework.js +1 -1
  39. package/lib/labs/VPie/VPie.css +105 -0
  40. package/lib/labs/VPie/VPie.d.ts +891 -0
  41. package/lib/labs/VPie/VPie.js +291 -0
  42. package/lib/labs/VPie/VPie.js.map +1 -0
  43. package/lib/labs/VPie/VPie.sass +109 -0
  44. package/lib/labs/VPie/VPieSegment.d.ts +310 -0
  45. package/lib/labs/VPie/VPieSegment.js +103 -0
  46. package/lib/labs/VPie/VPieSegment.js.map +1 -0
  47. package/lib/labs/VPie/VPieTooltip.d.ts +279 -0
  48. package/lib/labs/VPie/VPieTooltip.js +84 -0
  49. package/lib/labs/VPie/VPieTooltip.js.map +1 -0
  50. package/lib/labs/VPie/_variables.scss +11 -0
  51. package/lib/labs/VPie/index.d.ts +3 -0
  52. package/lib/labs/VPie/index.js +4 -0
  53. package/lib/labs/VPie/index.js.map +1 -0
  54. package/lib/labs/VPie/types.d.ts +16 -0
  55. package/lib/labs/VPie/types.js +2 -0
  56. package/lib/labs/VPie/types.js.map +1 -0
  57. package/lib/labs/VPie/utils.d.ts +23 -0
  58. package/lib/labs/VPie/utils.js +49 -0
  59. package/lib/labs/VPie/utils.js.map +1 -0
  60. package/lib/labs/VVideo/VVideo.css +3 -0
  61. package/lib/labs/VVideo/VVideo.sass +3 -0
  62. package/lib/labs/VVideo/VVideoControls.js +9 -5
  63. package/lib/labs/VVideo/VVideoControls.js.map +1 -1
  64. package/lib/labs/VVideo/VVideoVolume.js +7 -3
  65. package/lib/labs/VVideo/VVideoVolume.js.map +1 -1
  66. package/lib/labs/components.d.ts +1 -0
  67. package/lib/labs/components.js +1 -0
  68. package/lib/labs/components.js.map +1 -1
  69. package/lib/util/easing.d.ts +22 -0
  70. package/lib/util/easing.js +53 -0
  71. package/lib/util/easing.js.map +1 -1
  72. package/lib/util/svg-arc-corners.d.ts +4 -0
  73. package/lib/util/svg-arc-corners.js +73 -0
  74. package/lib/util/svg-arc-corners.js.map +1 -0
  75. package/package.json +1 -1
@@ -0,0 +1,291 @@
1
+ import { createElementVNode as _createElementVNode, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, mergeProps as _mergeProps } from "vue";
2
+ // Styles
3
+ import "./VPie.css";
4
+
5
+ // Components
6
+ import { makeVPieSegmentProps, VPieSegment } from "./VPieSegment.js";
7
+ import { VPieTooltip } from "./VPieTooltip.js";
8
+ import { VAvatar } from "../../components/VAvatar/index.js";
9
+ import { VChip } from "../../components/VChip/index.js";
10
+ import { VChipGroup } from "../../components/VChipGroup/index.js";
11
+ import { VDefaultsProvider } from "../../components/VDefaultsProvider/index.js"; // Composables
12
+ import { useColor } from "../../composables/color.js";
13
+ import { makeDensityProps } from "../../composables/density.js"; // Utilities
14
+ import { computed, shallowRef, toRef, watch } from 'vue';
15
+ import { formatTextTemplate } from "./utils.js";
16
+ import { convertToUnit, genericComponent, pick, propsFactory } from "../../util/index.js"; // Types
17
+ export const makeVPieProps = propsFactory({
18
+ title: String,
19
+ bgColor: String,
20
+ items: {
21
+ type: Array,
22
+ default: () => []
23
+ },
24
+ palette: {
25
+ type: Array,
26
+ default: () => []
27
+ },
28
+ itemKey: {
29
+ type: String,
30
+ default: 'key'
31
+ },
32
+ itemValue: {
33
+ type: String,
34
+ default: 'value'
35
+ },
36
+ itemTitle: {
37
+ type: String,
38
+ default: 'title'
39
+ },
40
+ size: {
41
+ type: [Number, String],
42
+ default: 250
43
+ },
44
+ rotate: [Number, String],
45
+ gaugeCut: [Number, String],
46
+ legend: {
47
+ type: [Boolean, Object],
48
+ default: false
49
+ },
50
+ tooltip: {
51
+ type: [Boolean, Object],
52
+ default: false
53
+ },
54
+ ...makeDensityProps(),
55
+ ...pick(makeVPieSegmentProps(), ['animation', 'gap', 'rounded', 'innerCut', 'hoverScale', 'hideSlice', 'reveal'])
56
+ }, 'VPie');
57
+ export const VPie = genericComponent()({
58
+ name: 'VPie',
59
+ props: makeVPieProps(),
60
+ setup(props, _ref) {
61
+ let {
62
+ slots
63
+ } = _ref;
64
+ const legendConfig = computed(() => ({
65
+ visible: !!props.legend,
66
+ position: 'bottom',
67
+ textFormat: '[title]',
68
+ ...(typeof props.legend === 'object' ? props.legend : {})
69
+ }));
70
+ const {
71
+ colorClasses,
72
+ colorStyles
73
+ } = useColor(() => ({
74
+ background: props.bgColor
75
+ }));
76
+ const textColorStyles = toRef(() => pick(colorStyles.value, ['color', 'caretColor']));
77
+ const legendAvatarSize = toRef(() => ({
78
+ default: 20,
79
+ comfortable: 18,
80
+ compact: 16
81
+ })[props.density ?? 'default']);
82
+ const legendDirection = toRef(() => ['left', 'right'].includes(legendConfig.value.position) ? 'vertical' : 'horizontal');
83
+ const legendMode = toRef(() => !legendConfig.value.visible ? 'hidden' : legendConfig.value.position);
84
+ const legendTextFormatFunction = toRef(() => item => {
85
+ return typeof legendConfig.value.textFormat === 'function' ? legendConfig.value.textFormat(item) : formatTextTemplate(legendConfig.value.textFormat, item);
86
+ });
87
+ const arcs = computed(() => {
88
+ // hidden items get (value: 0) to trigger disappearing animation
89
+ return props.items.filter(Boolean).map((item, index) => {
90
+ return {
91
+ key: item[props.itemKey],
92
+ color: item.color ?? colorFromPalette(index),
93
+ value: item[props.itemValue],
94
+ title: String(item[props.itemTitle]),
95
+ pattern: item.pattern ?? patternFromPalette(index),
96
+ raw: item
97
+ };
98
+ });
99
+ });
100
+ const visibleItemsKeys = shallowRef([]);
101
+ watch(() => arcs.value.length, () => {
102
+ // reset when number of items changes
103
+ visibleItemsKeys.value = arcs.value.map(a => a.key);
104
+ }, {
105
+ immediate: true
106
+ });
107
+ const visibleItems = computed(() => {
108
+ // hidden items get (value: 0) to trigger disappearing animation
109
+ return arcs.value.map(item => {
110
+ return isActive(item) ? item : {
111
+ ...item,
112
+ value: 0
113
+ };
114
+ });
115
+ });
116
+ const total = computed(() => visibleItems.value.reduce((sum, item) => sum + item.value, 0));
117
+ const gaugeCut = toRef(() => Number(props.gaugeCut ?? 0));
118
+ const gaugeOffset = computed(() => (1 - Math.cos(Math.PI * Math.min(90, gaugeCut.value / 2) / 180)) / 2);
119
+ const rotateDeg = computed(() => `${gaugeCut.value ? 180 + gaugeCut.value / 2 : props.rotate ?? 0}deg`);
120
+ function arcOffset(index) {
121
+ return visibleItems.value.slice(0, index).reduce((acc, s) => acc + (total.value > 0 ? s.value / total.value : 0) * (360 - gaugeCut.value), 0);
122
+ }
123
+ function arcSize(v) {
124
+ return v / total.value * (100 - gaugeCut.value / 3.6);
125
+ }
126
+ function colorFromPalette(index) {
127
+ if (props.palette.length === 0) return undefined;
128
+ const paletteItem = props.palette[index % props.palette.length];
129
+ return typeof paletteItem === 'object' ? paletteItem.color : paletteItem;
130
+ }
131
+ function patternFromPalette(index) {
132
+ if (props.palette.length === 0) return undefined;
133
+ const paletteItem = props.palette[index % props.palette.length];
134
+ return typeof paletteItem === 'object' ? paletteItem.pattern : undefined;
135
+ }
136
+ function isActive(item) {
137
+ return visibleItemsKeys.value.includes(item.key);
138
+ }
139
+ function toggle(item) {
140
+ if (isActive(item)) {
141
+ visibleItemsKeys.value = visibleItemsKeys.value.filter(x => x !== item.key);
142
+ } else {
143
+ visibleItemsKeys.value = [...visibleItemsKeys.value, item.key];
144
+ }
145
+ }
146
+ const tooltipItem = shallowRef(null);
147
+ const tooltipVisible = shallowRef(false);
148
+ let mouseLeaveTimeout = null;
149
+ function onMouseenter(item) {
150
+ if (!props.tooltip) return;
151
+ clearTimeout(mouseLeaveTimeout);
152
+ tooltipVisible.value = true;
153
+ tooltipItem.value = item;
154
+ }
155
+ function onMouseleave() {
156
+ if (!props.tooltip) return;
157
+ clearTimeout(mouseLeaveTimeout);
158
+ mouseLeaveTimeout = setTimeout(() => {
159
+ tooltipVisible.value = false;
160
+
161
+ // intentionally reusing timeout here
162
+ mouseLeaveTimeout = setTimeout(() => {
163
+ tooltipItem.value = null;
164
+ }, 500);
165
+ }, 100);
166
+ }
167
+ return () => {
168
+ const segmentProps = pick(props, ['animation', 'gap', 'rounded', 'hideSlice', 'reveal', 'innerCut', 'hoverScale']);
169
+ const defaultTooltipTransition = {
170
+ name: 'fade-transition',
171
+ duration: 150
172
+ };
173
+ const tooltipProps = {
174
+ item: tooltipItem.value,
175
+ modelValue: tooltipVisible.value,
176
+ titleFormat: typeof props.tooltip === 'object' ? props.tooltip.titleFormat : '[title]',
177
+ subtitleFormat: typeof props.tooltip === 'object' ? props.tooltip.subtitleFormat : '[value]',
178
+ transition: typeof props.tooltip === 'object' ? props.tooltip.transition : defaultTooltipTransition,
179
+ offset: typeof props.tooltip === 'object' ? props.tooltip.offset : 16
180
+ };
181
+ const legendDefaults = {
182
+ VChipGroup: {
183
+ direction: legendDirection.value
184
+ },
185
+ VChip: {
186
+ density: props.density
187
+ },
188
+ VAvatar: {
189
+ size: legendAvatarSize.value
190
+ }
191
+ };
192
+ const tooltipDefaults = {
193
+ VAvatar: {
194
+ size: 28
195
+ }
196
+ };
197
+ const avatarSlot = _ref2 => {
198
+ let {
199
+ item
200
+ } = _ref2;
201
+ return _createVNode(VAvatar, {
202
+ "color": item.color,
203
+ "start": true
204
+ }, {
205
+ default: () => [item.pattern && _createElementVNode("svg", {
206
+ "height": "40",
207
+ "width": "40"
208
+ }, [_createElementVNode("rect", {
209
+ "width": "40",
210
+ "height": "40",
211
+ "fill": item.pattern
212
+ }, null)])]
213
+ });
214
+ };
215
+ return _createElementVNode("div", {
216
+ "class": _normalizeClass(['v-pie', `v-pie--legend-${legendMode.value}`]),
217
+ "style": {
218
+ '--v-pie-size': convertToUnit(props.size)
219
+ }
220
+ }, [slots.title?.() ?? (props.title && _createElementVNode("div", {
221
+ "class": "v-pie__title"
222
+ }, [props.title])), _createElementVNode("div", {
223
+ "class": _normalizeClass(['v-pie__content', colorClasses.value]),
224
+ "style": _normalizeStyle([{
225
+ transform: `rotate(${rotateDeg.value})`,
226
+ marginBottom: `calc(-1 * ${convertToUnit(props.size)} * ${gaugeOffset.value})`
227
+ }, textColorStyles.value])
228
+ }, [_createElementVNode("div", {
229
+ "class": _normalizeClass(['v-pie__content-underlay', colorClasses.value]),
230
+ "style": _normalizeStyle(colorStyles.value)
231
+ }, null), _createElementVNode("svg", {
232
+ "xmlns": "http://www.w3.org/2000/svg",
233
+ "viewBox": "0 0 100 100"
234
+ }, [arcs.value.map((item, index) => _createVNode(VPieSegment, _mergeProps(segmentProps, {
235
+ "key": item.key,
236
+ "color": item.color,
237
+ "value": isActive(item) ? arcSize(item.value) : 0,
238
+ "rotate": arcOffset(index),
239
+ "pattern": item.pattern,
240
+ "onMouseenter": () => onMouseenter(item),
241
+ "onMouseleave": () => onMouseleave()
242
+ }), null))]), _createElementVNode("div", {
243
+ "class": "v-pie__center-content",
244
+ "style": {
245
+ transform: `translate(-50%, -50%)
246
+ rotate(-${rotateDeg.value})
247
+ translateY(calc(-100% * ${gaugeOffset.value}))`
248
+ }
249
+ }, [_createElementVNode("div", null, [slots.center?.({
250
+ total: total.value
251
+ })])])]), legendConfig.value.visible && _createVNode(VDefaultsProvider, {
252
+ "key": "legend",
253
+ "defaults": legendDefaults
254
+ }, {
255
+ default: () => [_createElementVNode("div", {
256
+ "class": "v-pie__legend"
257
+ }, [slots.legend?.({
258
+ isActive,
259
+ toggle,
260
+ items: arcs.value
261
+ }) ?? _createVNode(VChipGroup, {
262
+ "column": true,
263
+ "multiple": true,
264
+ "modelValue": visibleItemsKeys.value,
265
+ "onUpdate:modelValue": $event => visibleItemsKeys.value = $event
266
+ }, {
267
+ default: () => [arcs.value.map(item => _createVNode(VChip, {
268
+ "value": item.key
269
+ }, {
270
+ prepend: () => avatarSlot({
271
+ item
272
+ }),
273
+ default: () => _createElementVNode("div", {
274
+ "class": "v-pie__legend__text"
275
+ }, [slots['legend-text']?.({
276
+ item
277
+ }) ?? legendTextFormatFunction.value(item)])
278
+ }))]
279
+ })])]
280
+ }), !!props.tooltip && _createVNode(VDefaultsProvider, {
281
+ "defaults": tooltipDefaults
282
+ }, {
283
+ default: () => [_createVNode(VPieTooltip, tooltipProps, {
284
+ default: slots.tooltip,
285
+ prepend: avatarSlot
286
+ })]
287
+ })]);
288
+ };
289
+ }
290
+ });
291
+ //# sourceMappingURL=VPie.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VPie.js","names":["makeVPieSegmentProps","VPieSegment","VPieTooltip","VAvatar","VChip","VChipGroup","VDefaultsProvider","useColor","makeDensityProps","computed","shallowRef","toRef","watch","formatTextTemplate","convertToUnit","genericComponent","pick","propsFactory","makeVPieProps","title","String","bgColor","items","type","Array","default","palette","itemKey","itemValue","itemTitle","size","Number","rotate","gaugeCut","legend","Boolean","Object","tooltip","VPie","name","props","setup","_ref","slots","legendConfig","visible","position","textFormat","colorClasses","colorStyles","background","textColorStyles","value","legendAvatarSize","comfortable","compact","density","legendDirection","includes","legendMode","legendTextFormatFunction","item","arcs","filter","map","index","key","color","colorFromPalette","pattern","patternFromPalette","raw","visibleItemsKeys","length","a","immediate","visibleItems","isActive","total","reduce","sum","gaugeOffset","Math","cos","PI","min","rotateDeg","arcOffset","slice","acc","s","arcSize","v","undefined","paletteItem","toggle","x","tooltipItem","tooltipVisible","mouseLeaveTimeout","onMouseenter","clearTimeout","onMouseleave","setTimeout","segmentProps","defaultTooltipTransition","duration","tooltipProps","modelValue","titleFormat","subtitleFormat","transition","offset","legendDefaults","direction","tooltipDefaults","avatarSlot","_ref2","_createVNode","_createElementVNode","_normalizeClass","_normalizeStyle","transform","marginBottom","_mergeProps","center","$event","prepend"],"sources":["../../../src/labs/VPie/VPie.tsx"],"sourcesContent":["// Styles\nimport './VPie.sass'\n\n// Components\nimport { makeVPieSegmentProps, VPieSegment } from './VPieSegment'\nimport { VPieTooltip } from './VPieTooltip'\nimport { VAvatar } from '@/components/VAvatar'\nimport { VChip } from '@/components/VChip'\nimport { VChipGroup } from '@/components/VChipGroup'\nimport { VDefaultsProvider } from '@/components/VDefaultsProvider'\n\n// Composables\nimport { useColor } from '@/composables/color'\nimport { makeDensityProps } from '@/composables/density'\n\n// Utilities\nimport { computed, shallowRef, toRef, watch } from 'vue'\nimport { formatTextTemplate } from './utils'\nimport { convertToUnit, genericComponent, pick, propsFactory } from '@/util'\n\n// Types\nimport type { PropType, TransitionProps } from 'vue'\nimport type { PieItem, TextTemplate } from './types'\n\nexport type VPieSlots = {\n center: { total: number }\n legend: {\n isActive: (item: PieItem) => boolean\n toggle: (item: PieItem) => void\n items: PieItem[]\n }\n 'legend-text': { item: PieItem }\n title: never\n tooltip: { item: PieItem }\n}\n\nexport const makeVPieProps = propsFactory({\n title: String,\n bgColor: String,\n items: {\n type: Array as PropType<Record<string, any> | { color?: string, pattern?: string }[]>,\n default: () => [],\n },\n palette: {\n type: Array as PropType<({ color?: string, pattern?: string } | string)[]>,\n default: () => [],\n },\n itemKey: {\n type: String,\n default: 'key',\n },\n itemValue: {\n type: String,\n default: 'value',\n },\n itemTitle: {\n type: String,\n default: 'title',\n },\n size: {\n type: [Number, String],\n default: 250,\n },\n rotate: [Number, String],\n gaugeCut: [Number, String],\n legend: {\n type: [Boolean, Object] as PropType<boolean | {\n position?: 'left' | 'top' | 'right' | 'bottom'\n textFormat?: TextTemplate\n }>,\n default: false,\n },\n tooltip: {\n type: [Boolean, Object] as PropType<boolean | {\n titleFormat?: TextTemplate\n subtitleFormat?: TextTemplate\n transition?: string | boolean | TransitionProps\n offset?: number\n }>,\n default: false,\n },\n\n ...makeDensityProps(),\n ...pick(makeVPieSegmentProps(), [\n 'animation',\n 'gap',\n 'rounded',\n 'innerCut',\n 'hoverScale',\n 'hideSlice',\n 'reveal',\n ]),\n}, 'VPie')\n\nexport const VPie = genericComponent<VPieSlots>()({\n name: 'VPie',\n\n props: makeVPieProps(),\n\n setup (props, { slots }) {\n const legendConfig = computed(() => ({\n visible: !!props.legend,\n position: 'bottom',\n textFormat: '[title]',\n ...(typeof props.legend === 'object' ? props.legend : {}),\n }))\n\n const { colorClasses, colorStyles } = useColor(() => ({ background: props.bgColor }))\n const textColorStyles = toRef(() => pick(colorStyles.value, ['color', 'caretColor']))\n\n const legendAvatarSize = toRef(() => ({ default: 20, comfortable: 18, compact: 16 }[props.density ?? 'default']))\n const legendDirection = toRef(() => ['left', 'right'].includes(legendConfig.value.position) ? 'vertical' : 'horizontal')\n\n const legendMode = toRef(() => !legendConfig.value.visible ? 'hidden' : legendConfig.value.position)\n\n const legendTextFormatFunction = toRef(() => (item: PieItem) => {\n return typeof legendConfig.value.textFormat === 'function'\n ? legendConfig.value.textFormat(item)\n : formatTextTemplate(legendConfig.value.textFormat, item)\n })\n\n const arcs = computed<PieItem[]>(() => {\n // hidden items get (value: 0) to trigger disappearing animation\n return props.items\n .filter(Boolean)\n .map((item: any, index: number) => {\n return {\n key: item[props.itemKey],\n color: item.color ?? colorFromPalette(index),\n value: item[props.itemValue],\n title: String(item[props.itemTitle]),\n pattern: item.pattern ?? patternFromPalette(index),\n raw: item,\n } as PieItem\n })\n })\n\n const visibleItemsKeys = shallowRef<PieItem['key'][]>([])\n\n watch(() => arcs.value.length, () => {\n // reset when number of items changes\n visibleItemsKeys.value = arcs.value.map(a => a.key)\n }, { immediate: true })\n\n const visibleItems = computed(() => {\n // hidden items get (value: 0) to trigger disappearing animation\n return arcs.value.map(item => {\n return isActive(item)\n ? item\n : { ...item, value: 0 }\n })\n })\n\n const total = computed(() => visibleItems.value.reduce((sum, item) => sum + item.value, 0))\n\n const gaugeCut = toRef(() => Number(props.gaugeCut ?? 0))\n const gaugeOffset = computed(() => (1 - Math.cos(Math.PI * Math.min(90, gaugeCut.value / 2) / 180)) / 2)\n const rotateDeg = computed(() => `${gaugeCut.value ? (180 + gaugeCut.value / 2) : (props.rotate ?? 0)}deg`)\n\n function arcOffset (index: number) {\n return visibleItems.value\n .slice(0, index)\n .reduce((acc, s) => acc + (total.value > 0 ? s.value / total.value : 0) * (360 - gaugeCut.value), 0)\n }\n\n function arcSize (v: number) { return v / total.value * (100 - gaugeCut.value / 3.6) }\n\n function colorFromPalette (index: number) {\n if (props.palette.length === 0) return undefined\n const paletteItem = props.palette[index % props.palette.length]\n return typeof paletteItem === 'object' ? paletteItem.color : paletteItem\n }\n\n function patternFromPalette (index: number) {\n if (props.palette.length === 0) return undefined\n const paletteItem = props.palette[index % props.palette.length]\n return typeof paletteItem === 'object' ? paletteItem.pattern : undefined\n }\n\n function isActive (item: PieItem) {\n return visibleItemsKeys.value.includes(item.key)\n }\n\n function toggle (item: PieItem) {\n if (isActive(item)) {\n visibleItemsKeys.value = visibleItemsKeys.value.filter(x => x !== item.key)\n } else {\n visibleItemsKeys.value = [...visibleItemsKeys.value, item.key]\n }\n }\n\n const tooltipItem = shallowRef<PieItem | null>(null)\n const tooltipVisible = shallowRef(false)\n\n let mouseLeaveTimeout = null! as ReturnType<typeof setTimeout>\n\n function onMouseenter (item: PieItem) {\n if (!props.tooltip) return\n\n clearTimeout(mouseLeaveTimeout)\n tooltipVisible.value = true\n tooltipItem.value = item\n }\n\n function onMouseleave () {\n if (!props.tooltip) return\n\n clearTimeout(mouseLeaveTimeout)\n mouseLeaveTimeout = setTimeout(() => {\n tooltipVisible.value = false\n\n // intentionally reusing timeout here\n mouseLeaveTimeout = setTimeout(() => {\n tooltipItem.value = null\n }, 500)\n }, 100)\n }\n\n return () => {\n const segmentProps = pick(props, [\n 'animation',\n 'gap',\n 'rounded',\n 'hideSlice',\n 'reveal',\n 'innerCut',\n 'hoverScale',\n ])\n\n const defaultTooltipTransition = {\n name: 'fade-transition',\n duration: 150,\n }\n\n const tooltipProps = {\n item: tooltipItem.value,\n modelValue: tooltipVisible.value,\n titleFormat: typeof props.tooltip === 'object' ? props.tooltip.titleFormat : '[title]',\n subtitleFormat: typeof props.tooltip === 'object' ? props.tooltip.subtitleFormat : '[value]',\n transition: typeof props.tooltip === 'object' ? props.tooltip.transition : defaultTooltipTransition,\n offset: typeof props.tooltip === 'object' ? props.tooltip.offset : 16,\n }\n\n const legendDefaults = {\n VChipGroup: {\n direction: legendDirection.value,\n },\n VChip: {\n density: props.density,\n },\n VAvatar: {\n size: legendAvatarSize.value,\n },\n }\n\n const tooltipDefaults = {\n VAvatar: {\n size: 28,\n },\n }\n\n const avatarSlot = ({ item }: { item: PieItem }) => (\n <VAvatar color={ item.color } start>\n { item.pattern && (\n <svg height=\"40\" width=\"40\">\n <rect width=\"40\" height=\"40\" fill={ item.pattern } />\n </svg>\n )}\n </VAvatar>\n )\n\n return (\n <div\n class={[\n 'v-pie',\n `v-pie--legend-${legendMode.value}`,\n ]}\n style={{\n '--v-pie-size': convertToUnit(props.size),\n }}\n >\n { slots.title?.() ?? (props.title && (<div class=\"v-pie__title\">{ props.title }</div>)) }\n <div\n class={[\n 'v-pie__content',\n colorClasses.value,\n ]}\n style={[\n {\n transform: `rotate(${rotateDeg.value})`,\n marginBottom: `calc(-1 * ${convertToUnit(props.size)} * ${gaugeOffset.value})`,\n },\n textColorStyles.value,\n ]}\n >\n <div\n class={[\n 'v-pie__content-underlay',\n colorClasses.value,\n ]}\n style={ colorStyles.value }\n />\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 100 100\"\n >\n { arcs.value.map((item, index) => (\n <VPieSegment\n { ...segmentProps }\n key={ item.key }\n color={ item.color }\n value={ isActive(item) ? arcSize(item.value) : 0 }\n rotate={ arcOffset(index) }\n pattern={ item.pattern }\n onMouseenter={ () => onMouseenter(item) }\n onMouseleave={ () => onMouseleave() }\n />\n ))}\n </svg>\n\n <div\n class=\"v-pie__center-content\"\n style={{\n transform: `translate(-50%, -50%)\n rotate(-${rotateDeg.value})\n translateY(calc(-100% * ${gaugeOffset.value}))`,\n }}\n >\n <div>\n { slots.center?.({ total: total.value }) }\n </div>\n </div>\n </div>\n\n { legendConfig.value.visible && (\n <VDefaultsProvider key=\"legend\" defaults={ legendDefaults }>\n <div class=\"v-pie__legend\">\n { slots.legend?.({ isActive, toggle, items: arcs.value }) ?? (\n <VChipGroup\n column\n multiple\n v-model={ visibleItemsKeys.value }\n >\n { arcs.value.map(item => (\n <VChip\n value={ item.key }\n v-slots={{\n prepend: () => avatarSlot({ item }),\n default: () => (\n <div class=\"v-pie__legend__text\">\n { slots['legend-text']?.({ item }) ?? legendTextFormatFunction.value(item) }\n </div>\n ),\n }}\n />\n ))}\n </VChipGroup>\n )}\n </div>\n </VDefaultsProvider>\n )}\n { !!props.tooltip && (\n <VDefaultsProvider defaults={ tooltipDefaults }>\n <VPieTooltip\n { ...tooltipProps }\n v-slots={{\n default: slots.tooltip,\n prepend: avatarSlot,\n }}\n />\n </VDefaultsProvider>\n )}\n </div>\n )\n }\n },\n})\n\nexport type VPie = InstanceType<typeof VPie>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,oBAAoB,EAAEC,WAAW;AAAA,SACjCC,WAAW;AAAA,SACXC,OAAO;AAAA,SACPC,KAAK;AAAA,SACLC,UAAU;AAAA,SACVC,iBAAiB,uDAE1B;AAAA,SACSC,QAAQ;AAAA,SACRC,gBAAgB,wCAEzB;AACA,SAASC,QAAQ,EAAEC,UAAU,EAAEC,KAAK,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC/CC,kBAAkB;AAAA,SAClBC,aAAa,EAAEC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,+BAE5D;AAgBA,OAAO,MAAMC,aAAa,GAAGD,YAAY,CAAC;EACxCE,KAAK,EAAEC,MAAM;EACbC,OAAO,EAAED,MAAM;EACfE,KAAK,EAAE;IACLC,IAAI,EAAEC,KAA+E;IACrFC,OAAO,EAAEA,CAAA,KAAM;EACjB,CAAC;EACDC,OAAO,EAAE;IACPH,IAAI,EAAEC,KAAoE;IAC1EC,OAAO,EAAEA,CAAA,KAAM;EACjB,CAAC;EACDE,OAAO,EAAE;IACPJ,IAAI,EAAEH,MAAM;IACZK,OAAO,EAAE;EACX,CAAC;EACDG,SAAS,EAAE;IACTL,IAAI,EAAEH,MAAM;IACZK,OAAO,EAAE;EACX,CAAC;EACDI,SAAS,EAAE;IACTN,IAAI,EAAEH,MAAM;IACZK,OAAO,EAAE;EACX,CAAC;EACDK,IAAI,EAAE;IACJP,IAAI,EAAE,CAACQ,MAAM,EAAEX,MAAM,CAAC;IACtBK,OAAO,E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A;cAAA;YAAA,IAEH5E,KAAK,CAAC,aAAa,CAAC,GAAG;cAAEkB;YAAK,CAAC,CAAC,IAAID,wBAAwB,CAACR,KAAK,CAACS,IAAI,CAAC;UAGhF,CAAC,CAEJ,CAAC;QAAA,EAEL;MAAA,EAGN,EACC,CAAC,CAACrB,KAAK,CAACH,OAAO,IAAAiF,YAAA,CAAAhH,iBAAA;QAAA,YACe6G;MAAe;QAAA1F,OAAA,EAAAA,CAAA,MAAA6F,YAAA,CAAApH,WAAA,EAEpCyG,YAAY,EACR;UACPlF,OAAO,EAAEkB,KAAK,CAACN,OAAO;UACtB0F,OAAO,EAAEX;QACX,CAAC;MAAA,EAGN;IAGP,CAAC;EACH;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,109 @@
1
+ @use '../../styles/tools'
2
+ @use './variables' as *
3
+
4
+ @include tools.layer('components')
5
+ .v-pie
6
+ display: grid
7
+ align-items: center
8
+ column-gap: 24px
9
+ --v-pie-size: 250px
10
+
11
+ &--legend
12
+ &-top
13
+ grid-template-areas: 'title' 'legend' 'content'
14
+ grid-template-columns: var(--v-pie-size)
15
+ &-bottom
16
+ grid-template-areas: 'title' 'content' 'legend'
17
+ grid-template-columns: var(--v-pie-size)
18
+ &-right
19
+ grid-template-areas: 'title .' 'content legend'
20
+ &-left
21
+ grid-template-areas: '. title' 'legend content'
22
+ &-hidden
23
+ grid-template-areas: 'title' 'content'
24
+
25
+ &__title
26
+ grid-area: title
27
+ text-align: center
28
+ padding-bottom: $pie-title-padding-bottom
29
+
30
+ &__content
31
+ grid-area: content
32
+ position: relative
33
+ width: var(--v-pie-size)
34
+ height: var(--v-pie-size)
35
+
36
+ &:is(&)
37
+ // expected to get bg-* class for text color
38
+ // actual background is applied to underlay
39
+ background: none !important
40
+
41
+ .v-overlay
42
+ .v-overlay__scrim,
43
+ .v-overlay__content
44
+ pointer-events: none !important
45
+
46
+ &__content-underlay
47
+ border-radius: 50%
48
+ position: absolute
49
+ inset: $pie-underlay-inset
50
+ pointer-events: none
51
+ z-index: -1
52
+
53
+ &__center-content
54
+ position: absolute
55
+ top: 50%
56
+ left: 50%
57
+ transform: translate(-50%, -50%)
58
+ pointer-events: none
59
+
60
+ > div
61
+ pointer-events: auto
62
+
63
+ &__legend
64
+ grid-area: legend
65
+ padding-block: $pie-legend-padding-block
66
+
67
+ .v-avatar
68
+ border: $pie-legend-avatar-border
69
+
70
+ .v-chip__content
71
+ width: 100%
72
+
73
+ .v-chip:not(.v-chip--selected)
74
+ opacity: $pie-legend-chip-disabled-opacity
75
+
76
+ &__text
77
+ font-size: $pie-legend-chip-default-font-size
78
+ white-space: nowrap
79
+ width: 100%
80
+
81
+ .v-chip--density-compact &
82
+ font-size: $pie-legend-chip-compact-font-size
83
+
84
+ .v-chip.v-chip--density-comfortable .v-avatar--start
85
+ margin-inline-start: -6px
86
+
87
+ .v-chip.v-chip--density-default .v-avatar--start
88
+ margin-inline-start: -4px
89
+
90
+ &-segment
91
+ pointer-events: none
92
+ position: absolute
93
+ inset: 0
94
+
95
+ .v-pie-segment__overlay
96
+ pointer-events: auto
97
+ opacity: 0
98
+
99
+ &__tooltip-content
100
+ .v-list-item
101
+ padding-inline: 0
102
+ min-width: $pie-tooltip-min-width
103
+ zoom: 0.88
104
+
105
+ .v-list-item-subtitle
106
+ opacity: 1
107
+
108
+ .v-avatar
109
+ border: $pie-tooltip-avatar-border