@mantine-vue/contextmenu 3.3.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/index.cjs CHANGED
@@ -21,7 +21,7 @@ var ContextMenuDivider_default = /* @__PURE__ */ (0, vue.defineComponent)({
21
21
  __name: "ContextMenuDivider",
22
22
  props: {
23
23
  className: {},
24
- style: { type: Function }
24
+ style: { type: [Object, Function] }
25
25
  },
26
26
  setup(__props) {
27
27
  const props = __props;
@@ -378,7 +378,7 @@ var ContextMenuPortal_default = /* @__PURE__ */ (0, vue.defineComponent)({
378
378
  y: {},
379
379
  content: { type: [Array, Function] },
380
380
  className: {},
381
- style: { type: Function },
381
+ style: { type: [Object, Function] },
382
382
  classNames: {},
383
383
  styles: { type: [Object, Function] }
384
384
  },
package/esm/index.mjs CHANGED
@@ -20,7 +20,7 @@ var ContextMenuDivider_default = /* @__PURE__ */ defineComponent({
20
20
  __name: "ContextMenuDivider",
21
21
  props: {
22
22
  className: {},
23
- style: { type: Function }
23
+ style: { type: [Object, Function] }
24
24
  },
25
25
  setup(__props) {
26
26
  const props = __props;
@@ -377,7 +377,7 @@ var ContextMenuPortal_default = /* @__PURE__ */ defineComponent({
377
377
  y: {},
378
378
  content: { type: [Array, Function] },
379
379
  className: {},
380
- style: { type: Function },
380
+ style: { type: [Object, Function] },
381
381
  classNames: {},
382
382
  styles: { type: [Object, Function] }
383
383
  },
package/lib/types.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import type { MantineColor, MantineNode, MantineRadius, MantineShadow, MantineStyle, MantineTheme } from '@mantine-vue/core';
2
- import type { Ref, VNodeChild } from 'vue';
1
+ import type { MantineColor, MantineNode, MantineRadius, MantineShadow, MantineTheme } from '@mantine-vue/core';
2
+ import type { CSSProperties, Ref, VNodeChild } from 'vue';
3
3
  export type WithRequiredProperty<Type, Key extends keyof Type> = Type & {
4
4
  [Property in Key]-?: Type[Property];
5
5
  };
6
6
  export type WithOptionalProperty<Type, Key extends keyof Type> = Omit<Type, Key> & Partial<Pick<Type, Key>>;
7
- export type ContextMenuStyle = MantineStyle | ((theme: MantineTheme) => MantineStyle);
7
+ export type ContextMenuStyle = CSSProperties | ((theme: MantineTheme) => CSSProperties);
8
8
  export type ContextMenuStyles = Partial<Record<'root' | 'item' | 'divider', ContextMenuStyle>>;
9
9
  export interface ContextMenuOptions {
10
10
  /** The z-index of context menu. @default 9999 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantine-vue/contextmenu",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
4
4
  "description": "Desktop-grade context menu extension for Mantine Vue",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -39,8 +39,8 @@
39
39
  "vue": "^3.5.0"
40
40
  },
41
41
  "peerDependencies": {
42
- "@mantine-vue/core": "3.3.0",
43
- "@mantine-vue/hooks": "3.3.0",
42
+ "@mantine-vue/core": "3.4.0",
43
+ "@mantine-vue/hooks": "3.4.0",
44
44
  "vue": "^3.5.0"
45
45
  },
46
46
  "mantineVue": {
package/styles.css CHANGED
@@ -16,16 +16,13 @@
16
16
  top 0.2s,
17
17
  left 0.2s;
18
18
  }
19
-
20
19
  .mantine-contextmenu-divider {
21
20
  height: calc(0.0625rem * var(--mantine-scale));
22
21
  background: var(--mantine-color-gray-1);
23
22
  }
24
-
25
23
  [data-mantine-color-scheme='dark'] .mantine-contextmenu-divider {
26
24
  background: var(--mantine-color-dark-5);
27
25
  }
28
-
29
26
  .mantine-contextmenu-item-button {
30
27
  width: 100%;
31
28
  display: flex;
@@ -38,28 +35,22 @@
38
35
  transition: background 0.2s;
39
36
  text-align: start;
40
37
  }
41
-
42
38
  .mantine-contextmenu-item-button[disabled] {
43
39
  cursor: not-allowed;
44
40
  color: var(--mantine-color-gray-5);
45
41
  }
46
-
47
42
  [data-mantine-color-scheme='dark'] .mantine-contextmenu-item-button[disabled] {
48
43
  color: var(--mantine-color-dark-3);
49
44
  }
50
-
51
45
  .mantine-contextmenu-item-button:hover:not([disabled]) {
52
46
  background: var(--mantine-contextmenu-item-button-hover-bg-color-light);
53
47
  }
54
-
55
48
  [data-mantine-color-scheme='dark'] .mantine-contextmenu-item-button:hover:not([disabled]) {
56
49
  background: var(--mantine-contextmenu-item-button-hover-bg-color-dark);
57
50
  }
58
-
59
51
  .mantine-contextmenu-item-button:active:not([disabled]) {
60
52
  background: var(--mantine-contextmenu-item-button-pressed-bg-color-light);
61
53
  }
62
-
63
54
  [data-mantine-color-scheme='dark'] .mantine-contextmenu-item-button:active:not([disabled]) {
64
55
  background: var(--mantine-contextmenu-item-button-pressed-bg-color-dark);
65
56
  }
@@ -70,7 +61,6 @@
70
61
  flex-grow: 1;
71
62
  text-align: inherit;
72
63
  }
73
-
74
64
  .mantine-contextmenu-overlay {
75
65
  position: fixed;
76
66
  top: 0;
package/styles.layer.css CHANGED
@@ -17,16 +17,13 @@
17
17
  top 0.2s,
18
18
  left 0.2s;
19
19
  }
20
-
21
20
  .mantine-contextmenu-divider {
22
21
  height: calc(0.0625rem * var(--mantine-scale));
23
22
  background: var(--mantine-color-gray-1);
24
23
  }
25
-
26
24
  [data-mantine-color-scheme='dark'] .mantine-contextmenu-divider {
27
25
  background: var(--mantine-color-dark-5);
28
26
  }
29
-
30
27
  .mantine-contextmenu-item-button {
31
28
  width: 100%;
32
29
  display: flex;
@@ -39,28 +36,22 @@
39
36
  transition: background 0.2s;
40
37
  text-align: start;
41
38
  }
42
-
43
39
  .mantine-contextmenu-item-button[disabled] {
44
40
  cursor: not-allowed;
45
41
  color: var(--mantine-color-gray-5);
46
42
  }
47
-
48
43
  [data-mantine-color-scheme='dark'] .mantine-contextmenu-item-button[disabled] {
49
44
  color: var(--mantine-color-dark-3);
50
45
  }
51
-
52
46
  .mantine-contextmenu-item-button:hover:not([disabled]) {
53
47
  background: var(--mantine-contextmenu-item-button-hover-bg-color-light);
54
48
  }
55
-
56
49
  [data-mantine-color-scheme='dark'] .mantine-contextmenu-item-button:hover:not([disabled]) {
57
50
  background: var(--mantine-contextmenu-item-button-hover-bg-color-dark);
58
51
  }
59
-
60
52
  .mantine-contextmenu-item-button:active:not([disabled]) {
61
53
  background: var(--mantine-contextmenu-item-button-pressed-bg-color-light);
62
54
  }
63
-
64
55
  [data-mantine-color-scheme='dark'] .mantine-contextmenu-item-button:active:not([disabled]) {
65
56
  background: var(--mantine-contextmenu-item-button-pressed-bg-color-dark);
66
57
  }
@@ -71,7 +62,6 @@
71
62
  flex-grow: 1;
72
63
  text-align: inherit;
73
64
  }
74
-
75
65
  .mantine-contextmenu-overlay {
76
66
  position: fixed;
77
67
  top: 0;