@varlet/ui 2.13.1-alpha.1689663779667 → 2.13.2

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/lib/varlet.cjs.js CHANGED
@@ -347,7 +347,7 @@ var multiplySizeUnit = function(value, quantity) {
347
347
  return void 0;
348
348
  }
349
349
  var legalSize = toSizeUnit(value);
350
- var unit = legalSize.match(/(vh|%|rem|px|vw)$/)[0];
350
+ var unit = legalSize.match(/(vh|%|rem|px|vw|vmin|vmax)$/)[0];
351
351
  return "" + parseFloat(legalSize) * quantity + unit;
352
352
  };
353
353
  function requestAnimationFrame(fn2) {
@@ -12929,6 +12929,38 @@ function usePopover(options) {
12929
12929
  height: toPxNum(height)
12930
12930
  };
12931
12931
  };
12932
+ var getTransformOrigin = () => {
12933
+ switch (options.placement) {
12934
+ case "top":
12935
+ case "cover-bottom":
12936
+ return "bottom";
12937
+ case "top-start":
12938
+ case "right-end":
12939
+ case "cover-bottom-start":
12940
+ return "bottom left";
12941
+ case "top-end":
12942
+ case "left-end":
12943
+ case "cover-bottom-end":
12944
+ return "bottom right";
12945
+ case "bottom":
12946
+ case "cover-top":
12947
+ return "top";
12948
+ case "bottom-start":
12949
+ case "right-start":
12950
+ case "cover-top-start":
12951
+ return "top left";
12952
+ case "bottom-end":
12953
+ case "left-start":
12954
+ case "cover-top-end":
12955
+ return "top right";
12956
+ case "left":
12957
+ case "cover-right":
12958
+ return "right";
12959
+ case "right":
12960
+ case "cover-left":
12961
+ return "left";
12962
+ }
12963
+ };
12932
12964
  var handleHostMouseenter = () => {
12933
12965
  if (options.trigger !== "hover") {
12934
12966
  return;
@@ -13097,8 +13129,22 @@ function usePopover(options) {
13097
13129
  offset: [skidding, distance]
13098
13130
  }
13099
13131
  }), _extends$9({}, computeStyles$1, {
13132
+ options: {
13133
+ adaptive: false,
13134
+ gpuAcceleration: false
13135
+ },
13100
13136
  enabled: show.value
13101
- })];
13137
+ }), {
13138
+ name: "applyTransformOrigin",
13139
+ enabled: show.value,
13140
+ phase: "beforeWrite",
13141
+ fn(_ref3) {
13142
+ var {
13143
+ state
13144
+ } = _ref3;
13145
+ state.styles.popper.transformOrigin = getTransformOrigin();
13146
+ }
13147
+ }];
13102
13148
  return {
13103
13149
  placement,
13104
13150
  modifiers
@@ -14547,9 +14593,6 @@ var __sfc__$H = vue.defineComponent({
14547
14593
  });
14548
14594
  __sfc__$H.render = __render__$G;
14549
14595
  const SwipeItem = __sfc__$H;
14550
- SwipeItem.install = function(app) {
14551
- app.component(SwipeItem.name, SwipeItem);
14552
- };
14553
14596
  withInstall(SwipeItem);
14554
14597
  var _SwipeItemComponent = SwipeItem;
14555
14598
  function _extends$7() {
@@ -20342,7 +20385,7 @@ var __sfc__$g = vue.defineComponent({
20342
20385
  resetValidation
20343
20386
  } = useValidation();
20344
20387
  var menuEl = vue.ref(null);
20345
- var placement = vue.computed(() => props2.variant === "outlined" ? "bottom-start" : "cover-top-start");
20388
+ var placement = vue.computed(() => props2.variant === "outlined" ? "bottom" : "cover-top");
20346
20389
  var placeholderColor = vue.computed(() => {
20347
20390
  var {
20348
20391
  hint,
@@ -25046,9 +25089,9 @@ const skeleton = "";
25046
25089
  const SkeletonSfc = "";
25047
25090
  const slider = "";
25048
25091
  const SliderSfc = "";
25092
+ const SnackbarSfc = "";
25049
25093
  const snackbar = "";
25050
25094
  const coreSfc = "";
25051
- const SnackbarSfc = "";
25052
25095
  const space = "";
25053
25096
  const step = "";
25054
25097
  const StepSfc = "";
@@ -25073,7 +25116,7 @@ const TimePickerSfc = "";
25073
25116
  const TooltipSfc = "";
25074
25117
  const uploader = "";
25075
25118
  const UploaderSfc = "";
25076
- const version = "2.13.1-alpha.1689663779667";
25119
+ const version = "2.13.2";
25077
25120
  function install(app) {
25078
25121
  ActionSheet.install && app.use(ActionSheet);
25079
25122
  AppBar.install && app.use(AppBar);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "2.13.1-alpha.1689663779667",
3
+ "version": "2.13.2",
4
4
  "description": "A material like components library",
5
5
  "main": "lib/varlet.cjs.js",
6
6
  "module": "es/index.mjs",
@@ -46,9 +46,9 @@
46
46
  "@popperjs/core": "^2.11.6",
47
47
  "dayjs": "^1.10.4",
48
48
  "decimal.js": "^10.2.1",
49
- "@varlet/use": "2.13.1-alpha.1689663779667",
50
- "@varlet/shared": "2.13.1-alpha.1689663779667",
51
- "@varlet/icons": "2.13.1-alpha.1689663779667"
49
+ "@varlet/icons": "2.13.2",
50
+ "@varlet/use": "2.13.2",
51
+ "@varlet/shared": "2.13.2"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@vue/runtime-core": "3.3.4",
@@ -63,8 +63,8 @@
63
63
  "typescript": "^5.1.5",
64
64
  "vue": "3.3.4",
65
65
  "vue-router": "4.2.0",
66
- "@varlet/touch-emulator": "2.13.1-alpha.1689663779667",
67
- "@varlet/cli": "2.13.1-alpha.1689663779667"
66
+ "@varlet/cli": "2.13.2",
67
+ "@varlet/touch-emulator": "2.13.2"
68
68
  },
69
69
  "browserslist": [
70
70
  "Chrome >= 54",
@@ -8,13 +8,9 @@ export type SnackbarType = 'success' | 'warning' | 'info' | 'error' | 'loading'
8
8
 
9
9
  export declare const snackbarProps: Record<string, any>
10
10
 
11
- export type SlotType = string | VNode | (() => VNode)
12
-
13
11
  export interface SnackbarProps extends BasicAttributes {
14
12
  type?: SnackbarType
15
- content?: SlotType
16
- icon?: SlotType
17
- action?: SlotType
13
+ content?: string
18
14
  position?: SnackbarPosition
19
15
  loadingType?: LoadingType
20
16
  loadingSize?: LoadingSize
@@ -50,15 +46,18 @@ export interface SnackbarHandel {
50
46
 
51
47
  export interface SnackbarOptions {
52
48
  type?: SnackbarType
53
- content?: string
54
49
  position?: SnackbarPosition
50
+ content?: string | VNode | (() => VNode)
51
+ icon?: string | VNode | (() => VNode)
52
+ action?: string | VNode | (() => VNode)
53
+ duration?: number
54
+ contentClass?: string
55
+ vertical?: boolean
55
56
  loadingType?: string
56
57
  loadingSize?: string
57
- teleport?: string
58
+ loadingColor?: string
59
+ loadingRadius?: string
58
60
  lockScroll?: boolean
59
- contentClass?: string
60
- duration?: number
61
- vertical?: boolean
62
61
  forbidClick?: boolean
63
62
  onOpen?: () => void
64
63
  onClose?: () => void