@varlet/ui 3.3.9 → 3.3.10

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
- "version": "3.3.9",
4
+ "version": "3.3.10",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -5317,6 +5317,15 @@
5317
5317
  "type": "boolean",
5318
5318
  "kind": "expression"
5319
5319
  }
5320
+ },
5321
+ {
5322
+ "name": "z-index",
5323
+ "description": "The zIndex of element",
5324
+ "default": "-",
5325
+ "value": {
5326
+ "type": "number",
5327
+ "kind": "expression"
5328
+ }
5320
5329
  }
5321
5330
  ],
5322
5331
  "events": [
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
- "version": "3.3.9",
4
+ "version": "3.3.10",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -5476,6 +5476,15 @@
5476
5476
  "type": "boolean",
5477
5477
  "kind": "expression"
5478
5478
  }
5479
+ },
5480
+ {
5481
+ "name": "z-index",
5482
+ "description": "元素 z-index",
5483
+ "default": "-",
5484
+ "value": {
5485
+ "type": "number",
5486
+ "kind": "expression"
5487
+ }
5479
5488
  }
5480
5489
  ],
5481
5490
  "events": [
package/lib/varlet.cjs.js CHANGED
@@ -1013,6 +1013,7 @@ const props$1h = {
1013
1013
  type: Boolean,
1014
1014
  default: true
1015
1015
  },
1016
+ zIndex: Number,
1016
1017
  safeArea: Boolean,
1017
1018
  safeAreaTop: Boolean,
1018
1019
  teleport: {
@@ -1200,9 +1201,13 @@ var stdin_default$5V = vue.defineComponent({
1200
1201
  const {
1201
1202
  zIndex
1202
1203
  } = useZIndex(() => props2.show, 3);
1204
+ const normalizedZIndex = vue.computed(() => {
1205
+ var _a;
1206
+ return (_a = props2.zIndex) != null ? _a : zIndex.value;
1207
+ });
1203
1208
  const {
1204
1209
  onStackTop
1205
- } = useStack(() => props2.show, zIndex);
1210
+ } = useStack(() => props2.show, normalizedZIndex);
1206
1211
  const {
1207
1212
  disabled
1208
1213
  } = useTeleport();
@@ -1237,7 +1242,7 @@ var stdin_default$5V = vue.defineComponent({
1237
1242
  return vue.createVNode("div", {
1238
1243
  "class": classes$1a(n$1p("overlay"), overlayClass),
1239
1244
  "style": __spreadValues$u({
1240
- zIndex: zIndex.value - 1
1245
+ zIndex: normalizedZIndex.value - 1
1241
1246
  }, overlayStyle),
1242
1247
  "onClick": hidePopup
1243
1248
  }, null);
@@ -1246,7 +1251,7 @@ var stdin_default$5V = vue.defineComponent({
1246
1251
  return vue.withDirectives(vue.createVNode("div", vue.mergeProps({
1247
1252
  "class": classes$1a(n$1p("content"), n$1p(`--${props2.position}`), [props2.defaultStyle, n$1p("--content-background-color")], [props2.defaultStyle, n$1p("$-elevation--3")], [props2.safeArea, n$1p("--safe-area")], [props2.safeAreaTop, n$1p("--safe-area-top")]),
1248
1253
  "style": {
1249
- zIndex: zIndex.value
1254
+ zIndex: normalizedZIndex.value
1250
1255
  },
1251
1256
  "role": "dialog",
1252
1257
  "aria-modal": "true"
@@ -1261,7 +1266,7 @@ var stdin_default$5V = vue.defineComponent({
1261
1266
  default: () => [vue.withDirectives(vue.createVNode("div", {
1262
1267
  "class": classes$1a(n$1p("$--box"), n$1p(), [!props2.overlay, n$1p("--pointer-events-none")]),
1263
1268
  "style": {
1264
- zIndex: zIndex.value - 2
1269
+ zIndex: normalizedZIndex.value - 2
1265
1270
  }
1266
1271
  }, [props2.overlay && renderOverlay(), vue.createVNode(vue.Transition, {
1267
1272
  "name": props2.transition || n$1p(`$-pop-${props2.position}`)
@@ -29109,7 +29114,7 @@ withInstall(stdin_default$1);
29109
29114
  withPropsDefaultsSetter(stdin_default$1, props);
29110
29115
  const _WatermarkComponent = stdin_default$1;
29111
29116
  var stdin_default = stdin_default$1;
29112
- const version = "3.3.9";
29117
+ const version = "3.3.10";
29113
29118
  function install(app) {
29114
29119
  stdin_default$5G.install && app.use(stdin_default$5G);
29115
29120
  stdin_default$5E.install && app.use(stdin_default$5E);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "3.3.9",
3
+ "version": "3.3.10",
4
4
  "description": "A material like components library",
5
5
  "main": "lib/varlet.cjs.js",
6
6
  "module": "es/index.mjs",
@@ -48,9 +48,9 @@
48
48
  "@popperjs/core": "^2.11.6",
49
49
  "dayjs": "^1.10.4",
50
50
  "decimal.js": "^10.2.1",
51
- "@varlet/icons": "3.3.9",
52
- "@varlet/use": "3.3.9",
53
- "@varlet/shared": "3.3.9"
51
+ "@varlet/icons": "3.3.10",
52
+ "@varlet/shared": "3.3.10",
53
+ "@varlet/use": "3.3.10"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@vue/runtime-core": "3.4.21",
@@ -64,9 +64,9 @@
64
64
  "typescript": "^5.1.5",
65
65
  "vue": "3.4.21",
66
66
  "vue-router": "4.2.0",
67
- "@varlet/cli": "3.3.9",
68
- "@varlet/ui": "3.3.9",
69
- "@varlet/touch-emulator": "3.3.9"
67
+ "@varlet/cli": "3.3.10",
68
+ "@varlet/ui": "3.3.10",
69
+ "@varlet/touch-emulator": "3.3.10"
70
70
  },
71
71
  "scripts": {
72
72
  "dev": "varlet-cli dev",
package/types/popup.d.ts CHANGED
@@ -17,6 +17,7 @@ export interface PopupProps extends BasicAttributes {
17
17
  defaultStyle?: boolean
18
18
  safeArea?: boolean
19
19
  safeAreaTop?: boolean
20
+ zIndex?: number
20
21
  teleport?: TeleportProps['to'] | false
21
22
  onOpen?: ListenerProp<() => void>
22
23
  onOpened?: ListenerProp<() => void>