@varlet/ui 3.3.8 → 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.8",
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.8",
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: {
@@ -1188,7 +1189,7 @@ const {
1188
1189
  n: n$1p,
1189
1190
  classes: classes$1a
1190
1191
  } = createNamespace("popup");
1191
- var stdin_default$5V = defineComponent({
1192
+ var stdin_default$5V = vue.defineComponent({
1192
1193
  name: name$1i,
1193
1194
  inheritAttrs: false,
1194
1195
  props: props$1h,
@@ -1200,9 +1201,13 @@ var stdin_default$5V = 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();
@@ -1210,11 +1215,11 @@ var stdin_default$5V = defineComponent({
1210
1215
  bindPopupItems
1211
1216
  } = usePopupItems();
1212
1217
  useLock(() => props2.show, () => props2.lockScroll);
1213
- watch(() => props2.show, (newValue) => {
1218
+ vue.watch(() => props2.show, (newValue) => {
1214
1219
  newValue ? call(props2.onOpen) : call(props2.onClose);
1215
1220
  });
1216
1221
  bindPopupItems({
1217
- show: computed(() => props2.show)
1222
+ show: vue.computed(() => props2.show)
1218
1223
  });
1219
1224
  useEventListener(() => window, "keydown", handleKeydown);
1220
1225
  useRouteListener(() => call(props2.onRouteChange));
@@ -1237,7 +1242,7 @@ var stdin_default$5V = 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,14 +1251,14 @@ var stdin_default$5V = 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"
1253
1258
  }, attrs), [rendered.value && call(slots.default)]), [[vue.vShow, props2.show]]);
1254
1259
  }
1255
1260
  function renderPopup() {
1256
- return vue.createVNode(Transition, {
1261
+ return vue.createVNode(vue.Transition, {
1257
1262
  "name": n$1p("$-fade"),
1258
1263
  "onAfterEnter": props2.onOpened,
1259
1264
  "onAfterLeave": props2.onClosed
@@ -1261,9 +1266,9 @@ var stdin_default$5V = 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
- }, [props2.overlay && renderOverlay(), vue.createVNode(Transition, {
1271
+ }, [props2.overlay && renderOverlay(), vue.createVNode(vue.Transition, {
1267
1272
  "name": props2.transition || n$1p(`$-pop-${props2.position}`)
1268
1273
  }, {
1269
1274
  default: () => [renderContent()]
@@ -1286,7 +1291,7 @@ var stdin_default$5V = defineComponent({
1286
1291
  teleport
1287
1292
  } = props2;
1288
1293
  if (teleport) {
1289
- return vue.createVNode(Teleport, {
1294
+ return vue.createVNode(vue.Teleport, {
1290
1295
  "to": teleport,
1291
1296
  "disabled": disabled.value
1292
1297
  }, {
@@ -18455,7 +18460,7 @@ const {
18455
18460
  name: name$r,
18456
18461
  n: n$u
18457
18462
  } = createNamespace("overlay");
18458
- var stdin_default$40 = defineComponent({
18463
+ var stdin_default$40 = vue.defineComponent({
18459
18464
  name: name$r,
18460
18465
  inheritAttrs: false,
18461
18466
  props: props$r,
@@ -18500,7 +18505,7 @@ var stdin_default$40 = defineComponent({
18500
18505
  }), [call(slots.default)]);
18501
18506
  }
18502
18507
  function renderTransitionOverlay() {
18503
- return vue.createVNode(Transition, {
18508
+ return vue.createVNode(vue.Transition, {
18504
18509
  "name": n$u("--fade")
18505
18510
  }, {
18506
18511
  default: () => [props2.show && renderOverlay()]
@@ -18511,7 +18516,7 @@ var stdin_default$40 = defineComponent({
18511
18516
  teleport
18512
18517
  } = props2;
18513
18518
  if (teleport) {
18514
- return vue.createVNode(Teleport, {
18519
+ return vue.createVNode(vue.Teleport, {
18515
18520
  "to": teleport,
18516
18521
  "disabled": disabled.value
18517
18522
  }, {
@@ -23219,7 +23224,7 @@ const {
23219
23224
  function getSize(size, isInternalSize2) {
23220
23225
  return isInternalSize2 ? [`var(--space-size-${size}-y)`, `var(--space-size-${size}-x)`] : isArray(size) ? size.map(toSizeUnit) : [toSizeUnit(size), toSizeUnit(size)];
23221
23226
  }
23222
- var stdin_default$3r = defineComponent({
23227
+ var stdin_default$3r = vue.defineComponent({
23223
23228
  name: name$c,
23224
23229
  props: props$c,
23225
23230
  setup(props2, {
@@ -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.8";
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.8",
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.8",
52
- "@varlet/use": "3.3.8",
53
- "@varlet/shared": "3.3.8"
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/ui": "3.3.8",
68
- "@varlet/cli": "3.3.8",
69
- "@varlet/touch-emulator": "3.3.8"
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>