@varlet/ui 2.8.5 → 2.8.6-alpha.1677756540023

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": "2.8.5",
4
+ "version": "2.8.6-alpha.1677756540023",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -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": "2.8.5",
4
+ "version": "2.8.6-alpha.1677756540023",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
package/lib/varlet.cjs.js CHANGED
@@ -15211,7 +15211,7 @@ function __render__$A(_ctx, _cache) {
15211
15211
  "div",
15212
15212
  {
15213
15213
  class: vue.normalizeClass(_ctx.classes(_ctx.n(), _ctx.n("$--box"), [_ctx.disabled, _ctx.n("--disabled")])),
15214
- onClick: _cache[10] || (_cache[10] = function() {
15214
+ onClick: _cache[14] || (_cache[14] = function() {
15215
15215
  return _ctx.handleClick && _ctx.handleClick(...arguments);
15216
15216
  })
15217
15217
  },
@@ -15277,6 +15277,12 @@ function __render__$A(_ctx, _cache) {
15277
15277
  }),
15278
15278
  onTouchstart: _cache[4] || (_cache[4] = function() {
15279
15279
  return _ctx.handleTouchstart && _ctx.handleTouchstart(...arguments);
15280
+ }),
15281
+ onCompositionstart: _cache[5] || (_cache[5] = function() {
15282
+ return _ctx.handleCompositionStart && _ctx.handleCompositionStart(...arguments);
15283
+ }),
15284
+ onCompositionend: _cache[6] || (_cache[6] = function() {
15285
+ return _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...arguments);
15280
15286
  })
15281
15287
  },
15282
15288
  "\n ",
@@ -15298,20 +15304,26 @@ function __render__$A(_ctx, _cache) {
15298
15304
  color: _ctx.textColor,
15299
15305
  caretColor: !_ctx.errorMessage ? _ctx.focusColor : void 0
15300
15306
  }),
15301
- onFocus: _cache[5] || (_cache[5] = function() {
15307
+ onFocus: _cache[7] || (_cache[7] = function() {
15302
15308
  return _ctx.handleFocus && _ctx.handleFocus(...arguments);
15303
15309
  }),
15304
- onBlur: _cache[6] || (_cache[6] = function() {
15310
+ onBlur: _cache[8] || (_cache[8] = function() {
15305
15311
  return _ctx.handleBlur && _ctx.handleBlur(...arguments);
15306
15312
  }),
15307
- onInput: _cache[7] || (_cache[7] = function() {
15313
+ onInput: _cache[9] || (_cache[9] = function() {
15308
15314
  return _ctx.handleInput && _ctx.handleInput(...arguments);
15309
15315
  }),
15310
- onChange: _cache[8] || (_cache[8] = function() {
15316
+ onChange: _cache[10] || (_cache[10] = function() {
15311
15317
  return _ctx.handleChange && _ctx.handleChange(...arguments);
15312
15318
  }),
15313
- onTouchstart: _cache[9] || (_cache[9] = function() {
15319
+ onTouchstart: _cache[11] || (_cache[11] = function() {
15314
15320
  return _ctx.handleTouchstart && _ctx.handleTouchstart(...arguments);
15321
+ }),
15322
+ onCompositionstart: _cache[12] || (_cache[12] = function() {
15323
+ return _ctx.handleCompositionStart && _ctx.handleCompositionStart(...arguments);
15324
+ }),
15325
+ onCompositionend: _cache[13] || (_cache[13] = function() {
15326
+ return _ctx.handleCompositionEnd && _ctx.handleCompositionEnd(...arguments);
15315
15327
  })
15316
15328
  },
15317
15329
  null,
@@ -15465,7 +15477,7 @@ var __sfc__$B = vue.defineComponent({
15465
15477
  call(props2.onBlur, e);
15466
15478
  validateWithTrigger("onBlur");
15467
15479
  };
15468
- var handleInput = (e) => {
15480
+ var updateValue = (e) => {
15469
15481
  var target = e.target;
15470
15482
  var {
15471
15483
  value
@@ -15475,17 +15487,35 @@ var __sfc__$B = vue.defineComponent({
15475
15487
  }
15476
15488
  value = withMaxlength(withTrim(value));
15477
15489
  target.value = value;
15490
+ return value;
15491
+ };
15492
+ var handleCompositionStart = (e) => {
15493
+ Object.assign(e.target, {
15494
+ composing: true
15495
+ });
15496
+ };
15497
+ var handleCompositionEnd = (e) => {
15498
+ var target = e.target;
15499
+ if (target.composing) {
15500
+ target.composing = false;
15501
+ target.dispatchEvent(new Event("input"));
15502
+ }
15503
+ };
15504
+ var handleInput = (e) => {
15505
+ var {
15506
+ composing
15507
+ } = e.target;
15508
+ console.log(composing);
15509
+ if (composing) {
15510
+ return;
15511
+ }
15512
+ var value = updateValue(e);
15478
15513
  call(props2["onUpdate:modelValue"], value);
15479
15514
  call(props2.onInput, value, e);
15480
15515
  validateWithTrigger("onInput");
15481
15516
  };
15482
15517
  var handleChange = (e) => {
15483
- var target = e.target;
15484
- var {
15485
- value
15486
- } = target;
15487
- value = withMaxlength(withTrim(value));
15488
- target.value = value;
15518
+ var value = updateValue(e);
15489
15519
  call(props2.onChange, value, e);
15490
15520
  validateWithTrigger("onChange");
15491
15521
  };
@@ -15580,6 +15610,8 @@ var __sfc__$B = vue.defineComponent({
15580
15610
  handleClear,
15581
15611
  handleClick,
15582
15612
  handleTouchstart,
15613
+ handleCompositionStart,
15614
+ handleCompositionEnd,
15583
15615
  validate,
15584
15616
  resetValidation,
15585
15617
  reset,
@@ -24348,9 +24380,9 @@ const skeleton = "";
24348
24380
  const SkeletonSfc = "";
24349
24381
  const slider = "";
24350
24382
  const SliderSfc = "";
24351
- const SnackbarSfc = "";
24352
24383
  const snackbar = "";
24353
24384
  const coreSfc = "";
24385
+ const SnackbarSfc = "";
24354
24386
  const space = "";
24355
24387
  const step = "";
24356
24388
  const StepSfc = "";
@@ -24375,7 +24407,7 @@ const TimePickerSfc = "";
24375
24407
  const TooltipSfc = "";
24376
24408
  const uploader = "";
24377
24409
  const UploaderSfc = "";
24378
- const version = "2.8.5";
24410
+ const version = "2.8.6-alpha.1677756540023";
24379
24411
  function install(app) {
24380
24412
  ActionSheet.install && app.use(ActionSheet);
24381
24413
  AppBar.install && app.use(AppBar);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "2.8.5",
3
+ "version": "2.8.6-alpha.1677756540023",
4
4
  "description": "A material like components library",
5
5
  "main": "lib/varlet.cjs.js",
6
6
  "module": "es/index.mjs",
@@ -46,8 +46,8 @@
46
46
  "@popperjs/core": "^2.11.6",
47
47
  "dayjs": "^1.10.4",
48
48
  "decimal.js": "^10.2.1",
49
- "@varlet/icons": "2.8.5",
50
- "@varlet/shared": "2.8.5"
49
+ "@varlet/icons": "2.8.6-alpha.1677756540023",
50
+ "@varlet/shared": "2.8.6-alpha.1677756540023"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/jest": "^26.0.15",
@@ -62,8 +62,8 @@
62
62
  "typescript": "^4.4.4",
63
63
  "vue": "3.2.25",
64
64
  "vue-router": "4.0.12",
65
- "@varlet/cli": "2.8.5",
66
- "@varlet/touch-emulator": "2.8.5"
65
+ "@varlet/cli": "2.8.6-alpha.1677756540023",
66
+ "@varlet/touch-emulator": "2.8.6-alpha.1677756540023"
67
67
  },
68
68
  "browserslist": [
69
69
  "Chrome >= 54",