@varlet/ui 3.3.13-alpha.1722867213138 → 3.3.13-alpha.1723100749009

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.
@@ -10,7 +10,7 @@ import { call, normalizeToArray } from "@varlet/shared";
10
10
  const { name, n, classes } = createNamespace("button");
11
11
  import { resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, createElementVNode as _createElementVNode, createVNode as _createVNode, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, createElementBlock as _createElementBlock, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
12
12
  const _withScopeId = (n2) => (_pushScopeId(""), n2 = n2(), _popScopeId(), n2);
13
- const _hoisted_1 = ["type", "disabled"];
13
+ const _hoisted_1 = ["tabindex", "type", "disabled"];
14
14
  function __render__(_ctx, _cache) {
15
15
  const _component_var_loading = _resolveComponent("var-loading");
16
16
  const _component_var_hover_overlay = _resolveComponent("var-hover-overlay");
@@ -34,6 +34,7 @@ function __render__(_ctx, _cache) {
34
34
  [_ctx.states.text && _ctx.disabled, _ctx.n("--text-disabled")]
35
35
  )
36
36
  ),
37
+ tabindex: _ctx.focusable ? void 0 : "-1",
37
38
  style: _normalizeStyle({
38
39
  color: _ctx.states.textColor,
39
40
  background: _ctx.states.color
@@ -42,7 +43,7 @@ function __render__(_ctx, _cache) {
42
43
  disabled: _ctx.disabled,
43
44
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
44
45
  onTouchstart: _cache[1] || (_cache[1] = (...args) => _ctx.handleTouchstart && _ctx.handleTouchstart(...args)),
45
- onFocus: _cache[2] || (_cache[2] = ($event) => _ctx.isFocusing = true),
46
+ onFocus: _cache[2] || (_cache[2] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
46
47
  onBlur: _cache[3] || (_cache[3] = ($event) => _ctx.isFocusing = false)
47
48
  }, [
48
49
  _ctx.loading || _ctx.pending ? (_openBlock(), _createBlock(_component_var_loading, {
@@ -137,16 +138,23 @@ const __sfc__ = defineComponent({
137
138
  }
138
139
  attemptAutoLoading(call(onTouchstart, e));
139
140
  }
141
+ function handleFocus() {
142
+ if (!props2.focusable) {
143
+ return;
144
+ }
145
+ isFocusing.value = true;
146
+ }
140
147
  return {
141
148
  pending,
142
149
  states,
143
150
  hovering,
151
+ isFocusing,
144
152
  n,
145
153
  classes,
146
154
  handleHovering,
147
155
  handleClick,
148
156
  handleTouchstart,
149
- isFocusing
157
+ handleFocus
150
158
  };
151
159
  }
152
160
  });
@@ -38,6 +38,10 @@ const props = {
38
38
  type: Boolean,
39
39
  default: true
40
40
  },
41
+ focusable: {
42
+ type: Boolean,
43
+ default: true
44
+ },
41
45
  color: String,
42
46
  textColor: String,
43
47
  elevation: {
@@ -265,7 +265,7 @@ import './tooltip/style/index.mjs'
265
265
  import './uploader/style/index.mjs'
266
266
  import './watermark/style/index.mjs'
267
267
 
268
- const version = '3.3.13-alpha.1722867213138'
268
+ const version = '3.3.13-alpha.1723100749009'
269
269
 
270
270
  function install(app) {
271
271
  ActionSheet.install && app.use(ActionSheet)
package/es/index.mjs CHANGED
@@ -176,7 +176,7 @@ export * from './tooltip/index.mjs'
176
176
  export * from './uploader/index.mjs'
177
177
  export * from './watermark/index.mjs'
178
178
 
179
- const version = '3.3.13-alpha.1722867213138'
179
+ const version = '3.3.13-alpha.1723100749009'
180
180
 
181
181
  function install(app) {
182
182
  ActionSheet.install && app.use(ActionSheet)
@@ -23,7 +23,8 @@ var stdin_default = defineComponent({
23
23
  opacity: props2.opacity,
24
24
  height: toSizeUnit(props2.height),
25
25
  backgroundColor: props2.error ? props2.errorColor : props2.color,
26
- top: toSizeUnit(props2.top)
26
+ top: toSizeUnit(props2.top),
27
+ transitionDuration: props2.transitionDuration == null ? void 0 : `${props2.transitionDuration}ms`
27
28
  }
28
29
  }, null);
29
30
  }
@@ -35,6 +35,7 @@ const mount = () => {
35
35
  };
36
36
  const tick = () => {
37
37
  valueTimer = window.setTimeout(() => {
38
+ ctx.transitionDuration = void 0;
38
39
  if (ctx.value >= 95) {
39
40
  return;
40
41
  }
@@ -63,6 +64,7 @@ const start = () => {
63
64
  clearTimer();
64
65
  ctx.error = false;
65
66
  ctx.value = 0;
67
+ ctx.transitionDuration = 0;
66
68
  mount();
67
69
  opacityTimer = window.setTimeout(() => {
68
70
  ctx.opacity = 1;
@@ -78,6 +80,7 @@ const error = () => {
78
80
  ctx.error = true;
79
81
  if (ctx.value === 100) {
80
82
  ctx.value = 0;
83
+ ctx.transitionDuration = 0;
81
84
  }
82
85
  mount();
83
86
  opacityTimer = window.setTimeout(() => {
@@ -11,7 +11,8 @@ const props = {
11
11
  color: String,
12
12
  errorColor: String,
13
13
  height: [Number, String],
14
- top: [Number, String]
14
+ top: [Number, String],
15
+ transitionDuration: Number
15
16
  };
16
17
  export {
17
18
  props
@@ -1,7 +1,7 @@
1
1
  import '../../styles/common.css'
2
+ import '../SnackbarSfc.css'
2
3
  import '../../styles/elevation.css'
3
4
  import '../../loading/loading.css'
4
5
  import '../../icon/icon.css'
5
6
  import '../snackbar.css'
6
7
  import '../coreSfc.css'
7
- import '../SnackbarSfc.css'