@varlet/ui 2.18.0-alpha.1697608760113 → 2.18.1

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
@@ -1542,10 +1542,13 @@ var stdin_default$3q = {
1542
1542
  }
1543
1543
  },
1544
1544
  datePickerSelected: "个被选择",
1545
+ datePickerHint: "选择日期",
1545
1546
  // pagination
1546
1547
  paginationItem: "条",
1547
1548
  paginationPage: "页",
1548
- paginationJump: "前往"
1549
+ paginationJump: "前往",
1550
+ // time-picker
1551
+ timePickerHint: "选择时间"
1549
1552
  };
1550
1553
  var stdin_default$3p = {
1551
1554
  // Dialog
@@ -1644,10 +1647,13 @@ var stdin_default$3p = {
1644
1647
  }
1645
1648
  },
1646
1649
  datePickerSelected: " selected",
1650
+ datePickerHint: "SELECT DATE",
1647
1651
  // pagination
1648
1652
  paginationItem: "",
1649
1653
  paginationPage: "page",
1650
- paginationJump: "Go to"
1654
+ paginationJump: "Go to",
1655
+ // time-picker
1656
+ timePickerHint: "SELECT TIME"
1651
1657
  };
1652
1658
  var stdin_default$3o = {
1653
1659
  // Dialog
@@ -5038,7 +5044,9 @@ const props$W = {
5038
5044
  default: true
5039
5045
  },
5040
5046
  block: Boolean,
5047
+ /** @deprecated Use closeable to instead. */
5041
5048
  closable: Boolean,
5049
+ closeable: Boolean,
5042
5050
  onClose: defineListenerProp()
5043
5051
  };
5044
5052
  const { name: name$W, n: n$11, classes: classes$S } = createNamespace("chip");
@@ -5068,7 +5076,7 @@ function __render__$11(_ctx, _cache) {
5068
5076
  /* CLASS */
5069
5077
  ),
5070
5078
  vue.renderSlot(_ctx.$slots, "right"),
5071
- _ctx.closable ? (vue.openBlock(), vue.createElementBlock(
5079
+ _ctx.closeable || _ctx.closable ? (vue.openBlock(), vue.createElementBlock(
5072
5080
  "span",
5073
5081
  {
5074
5082
  key: 0,
@@ -8228,7 +8236,7 @@ function __render__$Y(_ctx, _cache) {
8228
8236
  [_ctx.disabled || _ctx.formDisabled, _ctx.n("--disabled")],
8229
8237
  [_ctx.errorMessage, _ctx.n("--error")]
8230
8238
  ),
8231
- style: { background: _ctx.color ? _ctx.color : void 0 }
8239
+ style: { background: _ctx.color }
8232
8240
  }, _ctx.$attrs),
8233
8241
  [
8234
8242
  vue.createVNode(_component_var_button, {
@@ -9016,9 +9024,12 @@ const props$Q = {
9016
9024
  type: String,
9017
9025
  default: "date"
9018
9026
  },
9027
+ hint: String,
9019
9028
  allowedDates: Function,
9020
9029
  color: String,
9030
+ /** @deprecated Use titleColor to instead. */
9021
9031
  headerColor: String,
9032
+ titleColor: String,
9022
9033
  elevation: {
9023
9034
  type: [Boolean, Number, String],
9024
9035
  default: false
@@ -9447,6 +9458,7 @@ function __render__$V(_ctx, _cache) {
9447
9458
  return vue.openBlock(), vue.createElementBlock(
9448
9459
  "ul",
9449
9460
  {
9461
+ ref: "panel",
9450
9462
  class: vue.normalizeClass(_ctx.n())
9451
9463
  },
9452
9464
  [
@@ -9482,6 +9494,7 @@ const __sfc__$W = vue.defineComponent({
9482
9494
  },
9483
9495
  emits: ["choose-year"],
9484
9496
  setup(props2, { emit }) {
9497
+ const panel = vue.ref();
9485
9498
  const yearList = vue.computed(() => {
9486
9499
  const list2 = [];
9487
9500
  const {
@@ -9516,7 +9529,7 @@ const __sfc__$W = vue.defineComponent({
9516
9529
  emit("choose-year", year);
9517
9530
  };
9518
9531
  onSmartMounted(() => {
9519
- const activeEl = document.querySelector(`.${n$V("item--active")}`);
9532
+ const activeEl = panel.value.querySelector(`.${n$V("item--active")}`);
9520
9533
  activeEl == null ? void 0 : activeEl.scrollIntoView({
9521
9534
  block: "center"
9522
9535
  });
@@ -9524,6 +9537,7 @@ const __sfc__$W = vue.defineComponent({
9524
9537
  return {
9525
9538
  n: n$V,
9526
9539
  classes: classes$N,
9540
+ panel,
9527
9541
  yearList,
9528
9542
  chooseYear,
9529
9543
  toNumber
@@ -9903,6 +9917,7 @@ var __async$c = (__this, __arguments, generator) => {
9903
9917
  };
9904
9918
  const { name: name$Q, n: n$T, classes: classes$L } = createNamespace("date-picker");
9905
9919
  function __render__$T(_ctx, _cache) {
9920
+ var _a;
9906
9921
  const _component_year_picker_panel = vue.resolveComponent("year-picker-panel");
9907
9922
  const _component_month_picker_panel = vue.resolveComponent("month-picker-panel");
9908
9923
  const _component_day_picker_panel = vue.resolveComponent("day-picker-panel");
@@ -9916,23 +9931,42 @@ function __render__$T(_ctx, _cache) {
9916
9931
  "div",
9917
9932
  {
9918
9933
  class: vue.normalizeClass(_ctx.n("title")),
9919
- style: vue.normalizeStyle({ background: _ctx.headerColor || _ctx.color })
9934
+ style: vue.normalizeStyle({ background: _ctx.titleColor || _ctx.headerColor || _ctx.color })
9920
9935
  },
9921
9936
  [
9922
9937
  vue.createElementVNode(
9923
9938
  "div",
9924
9939
  {
9925
- class: vue.normalizeClass(_ctx.classes(_ctx.n("title-year"), [_ctx.isYearPanel, _ctx.n("title-year--active")])),
9926
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.clickEl("year"))
9940
+ class: vue.normalizeClass(_ctx.n("title-select"))
9927
9941
  },
9928
9942
  [
9929
- vue.renderSlot(_ctx.$slots, "year", { year: _ctx.chooseYear }, () => [
9930
- vue.createTextVNode(
9931
- vue.toDisplayString(_ctx.chooseYear),
9932
- 1
9933
- /* TEXT */
9934
- )
9935
- ])
9943
+ vue.createElementVNode(
9944
+ "div",
9945
+ {
9946
+ class: vue.normalizeClass(_ctx.n("title-hint"))
9947
+ },
9948
+ vue.toDisplayString((_a = _ctx.hint) != null ? _a : _ctx.pack.datePickerHint),
9949
+ 3
9950
+ /* TEXT, CLASS */
9951
+ ),
9952
+ vue.createElementVNode(
9953
+ "div",
9954
+ {
9955
+ class: vue.normalizeClass(_ctx.classes(_ctx.n("title-year"), [_ctx.isYearPanel, _ctx.n("title-year--active")])),
9956
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.clickEl("year"))
9957
+ },
9958
+ [
9959
+ vue.renderSlot(_ctx.$slots, "year", { year: _ctx.chooseYear }, () => [
9960
+ vue.createTextVNode(
9961
+ vue.toDisplayString(_ctx.chooseYear),
9962
+ 1
9963
+ /* TEXT */
9964
+ )
9965
+ ])
9966
+ ],
9967
+ 2
9968
+ /* CLASS */
9969
+ )
9936
9970
  ],
9937
9971
  2
9938
9972
  /* CLASS */
@@ -9948,10 +9982,10 @@ function __render__$T(_ctx, _cache) {
9948
9982
  name: _ctx.multiple ? "" : `${_ctx.n()}${_ctx.reverse ? "-reverse" : ""}-translatey`
9949
9983
  }, {
9950
9984
  default: vue.withCtx(() => {
9951
- var _a, _b, _c;
9985
+ var _a2, _b, _c;
9952
9986
  return [
9953
9987
  _ctx.type === "month" ? (vue.openBlock(), vue.createElementBlock("div", {
9954
- key: `${_ctx.chooseYear}${(_a = _ctx.chooseMonth) == null ? void 0 : _a.index}`
9988
+ key: `${_ctx.chooseYear}${(_a2 = _ctx.chooseMonth) == null ? void 0 : _a2.index}`
9955
9989
  }, [
9956
9990
  _ctx.range ? vue.renderSlot(_ctx.$slots, "range", {
9957
9991
  key: 0,
@@ -10420,6 +10454,7 @@ const __sfc__$U = vue.defineComponent({
10420
10454
  componentProps,
10421
10455
  slotProps,
10422
10456
  formatRange,
10457
+ pack,
10423
10458
  n: n$T,
10424
10459
  classes: classes$L,
10425
10460
  clickEl,
@@ -13563,7 +13598,9 @@ function __render__$M(_ctx, _cache) {
13563
13598
  style: vue.normalizeStyle({
13564
13599
  height: `${_ctx.toSizeUnit(_ctx.maxAnchor)}`,
13565
13600
  transform: `translateY(calc(100% - ${_ctx.toSizeUnit(_ctx.visibleHeight)}))`,
13566
- transition: _ctx.touching ? "none" : `transform ${_ctx.toNumber(_ctx.duration)}ms var(--floating-panel-transition-timing-function)`
13601
+ transition: _ctx.touching ? "none" : `transform ${_ctx.toNumber(
13602
+ _ctx.duration
13603
+ )}ms var(--floating-panel-transition-timing-function), background-color 0.25s`
13567
13604
  }),
13568
13605
  onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.handleTouchstart && _ctx.handleTouchstart(...args)),
13569
13606
  onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.handleTouchmove && _ctx.handleTouchmove(...args)),
@@ -13649,7 +13686,10 @@ const __sfc__$N = vue.defineComponent({
13649
13686
  const target = event.target;
13650
13687
  const eventFromContent = contentRef.value === target || ((_a = contentRef.value) == null ? void 0 : _a.contains(target));
13651
13688
  if (eventFromContent && !props2.contentDraggable) {
13652
- if (isReachTop(contentRef.value) || isReachBottom(contentRef.value)) {
13689
+ return;
13690
+ }
13691
+ if (eventFromContent && props2.contentDraggable && visibleHeight.value >= maxAnchor.value && !isReachTop(contentRef.value)) {
13692
+ if (isReachBottom(contentRef.value)) {
13653
13693
  preventDefault(event);
13654
13694
  }
13655
13695
  return;
@@ -19144,7 +19184,7 @@ const _RadioGroupComponent = stdin_default$1t;
19144
19184
  var stdin_default$1s = stdin_default$1t;
19145
19185
  const props$j = {
19146
19186
  modelValue: {
19147
- type: [String, Number],
19187
+ type: Number,
19148
19188
  default: 0
19149
19189
  },
19150
19190
  count: {
@@ -19256,7 +19296,7 @@ const __sfc__$q = vue.defineComponent({
19256
19296
  const { form, bindForm } = useForm();
19257
19297
  const { errorMessage, validateWithTrigger: vt, validate: v, resetValidation } = useValidation();
19258
19298
  const { hovering } = useHoverOverlay();
19259
- let lastScore = Number(props2.modelValue);
19299
+ let lastScore = toNumber(props2.modelValue);
19260
19300
  const rateProvider = {
19261
19301
  reset,
19262
19302
  validate,
@@ -19298,10 +19338,10 @@ const __sfc__$q = vue.defineComponent({
19298
19338
  if (disabled || (form == null ? void 0 : form.disabled.value)) {
19299
19339
  iconColor = disabledColor;
19300
19340
  }
19301
- if (index <= toNumber(modelValue)) {
19341
+ if (index <= modelValue) {
19302
19342
  return { color: iconColor, name: icon2, namespace };
19303
19343
  }
19304
- if (half2 && index <= toNumber(modelValue) + 0.5) {
19344
+ if (half2 && index <= modelValue + 0.5) {
19305
19345
  return { color: iconColor, name: halfIcon, namespace: halfIconNamespace };
19306
19346
  }
19307
19347
  return {
@@ -19319,22 +19359,24 @@ const __sfc__$q = vue.defineComponent({
19319
19359
  if (lastScore === score && clearable) {
19320
19360
  score = 0;
19321
19361
  }
19362
+ if (lastScore !== score) {
19363
+ call(props2["onUpdate:modelValue"], score);
19364
+ call(props2.onChange, score);
19365
+ }
19322
19366
  lastScore = score;
19323
- call(props2["onUpdate:modelValue"], score);
19324
19367
  }
19325
19368
  function validate() {
19326
- return v(props2.rules, toNumber(props2.modelValue));
19369
+ return v(props2.rules, props2.modelValue);
19327
19370
  }
19328
19371
  function validateWithTrigger() {
19329
19372
  return vue.nextTick(() => vt(["onChange"], "onChange", props2.rules, props2.modelValue));
19330
19373
  }
19331
19374
  function handleClick(score, event) {
19332
- const { readonly, disabled, onChange } = props2;
19375
+ const { readonly, disabled } = props2;
19333
19376
  if (readonly || disabled || (form == null ? void 0 : form.disabled.value) || (form == null ? void 0 : form.readonly.value)) {
19334
19377
  return;
19335
19378
  }
19336
19379
  changeValue(score, event);
19337
- call(onChange, score);
19338
19380
  validateWithTrigger();
19339
19381
  }
19340
19382
  function createHoverHandler(value) {
@@ -19938,7 +19980,7 @@ function __render__$g(_ctx, _cache) {
19938
19980
  return vue.openBlock(), vue.createBlock(_component_var_chip, {
19939
19981
  class: vue.normalizeClass(_ctx.n("chip")),
19940
19982
  "var-select-cover": "",
19941
- closable: "",
19983
+ closeable: "",
19942
19984
  size: "small",
19943
19985
  type: _ctx.errorMessage ? "danger" : void 0,
19944
19986
  key: l,
@@ -22871,8 +22913,11 @@ const props$2 = {
22871
22913
  type: [Boolean, Number, String],
22872
22914
  default: false
22873
22915
  },
22916
+ hint: String,
22874
22917
  color: String,
22918
+ /** @deprecated Use titleColor to instead. */
22875
22919
  headerColor: String,
22920
+ titleColor: String,
22876
22921
  format: {
22877
22922
  type: String,
22878
22923
  default: "ampm"
@@ -23287,6 +23332,7 @@ const _hoisted_1$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.crea
23287
23332
  ));
23288
23333
  const _hoisted_2$2 = { key: 0 };
23289
23334
  function __render__$2(_ctx, _cache) {
23335
+ var _a;
23290
23336
  const _component_clock = vue.resolveComponent("clock");
23291
23337
  return vue.openBlock(), vue.createElementBlock(
23292
23338
  "div",
@@ -23299,83 +23345,102 @@ function __render__$2(_ctx, _cache) {
23299
23345
  "div",
23300
23346
  {
23301
23347
  class: vue.normalizeClass(_ctx.n("title")),
23302
- style: vue.normalizeStyle({ background: _ctx.headerColor || _ctx.color })
23348
+ style: vue.normalizeStyle({ background: _ctx.titleColor || _ctx.headerColor || _ctx.color })
23303
23349
  },
23304
23350
  [
23305
23351
  vue.createElementVNode(
23306
23352
  "div",
23307
23353
  {
23308
- class: vue.normalizeClass(_ctx.n("title-time"))
23354
+ class: vue.normalizeClass(_ctx.n("title-hint"))
23309
23355
  },
23310
- [
23311
- vue.createElementVNode(
23312
- "div",
23313
- {
23314
- class: vue.normalizeClass(_ctx.classes(_ctx.n("title-btn"), [_ctx.type === "hour", _ctx.n("title-btn--active")])),
23315
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.checkPanel("hour"))
23316
- },
23317
- vue.toDisplayString(_ctx.time.hour),
23318
- 3
23319
- /* TEXT, CLASS */
23320
- ),
23321
- _hoisted_1$2,
23322
- vue.createElementVNode(
23323
- "div",
23324
- {
23325
- class: vue.normalizeClass(_ctx.classes(_ctx.n("title-btn"), [_ctx.type === "minute", _ctx.n("title-btn--active")])),
23326
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.checkPanel("minute"))
23327
- },
23328
- vue.toDisplayString(_ctx.time.minute),
23329
- 3
23330
- /* TEXT, CLASS */
23331
- ),
23332
- _ctx.useSeconds ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$2, ":")) : vue.createCommentVNode("v-if", true),
23333
- _ctx.useSeconds ? (vue.openBlock(), vue.createElementBlock(
23334
- "div",
23335
- {
23336
- key: 1,
23337
- class: vue.normalizeClass(_ctx.classes(_ctx.n("title-btn"), [_ctx.type === "second", _ctx.n("title-btn--active")])),
23338
- onClick: _cache[2] || (_cache[2] = ($event) => _ctx.checkPanel("second"))
23339
- },
23340
- vue.toDisplayString(_ctx.time.second),
23341
- 3
23342
- /* TEXT, CLASS */
23343
- )) : vue.createCommentVNode("v-if", true)
23344
- ],
23345
- 2
23346
- /* CLASS */
23356
+ vue.toDisplayString((_a = _ctx.hint) != null ? _a : _ctx.pack.timePickerHint),
23357
+ 3
23358
+ /* TEXT, CLASS */
23347
23359
  ),
23348
- _ctx.format === "ampm" ? (vue.openBlock(), vue.createElementBlock(
23360
+ vue.createElementVNode(
23349
23361
  "div",
23350
23362
  {
23351
- key: 0,
23352
- class: vue.normalizeClass(_ctx.n("title-ampm"))
23363
+ class: vue.normalizeClass(_ctx.n("title-time-container"))
23353
23364
  },
23354
23365
  [
23355
23366
  vue.createElementVNode(
23356
23367
  "div",
23357
23368
  {
23358
- class: vue.normalizeClass(_ctx.classes(_ctx.n("title-btn"), [_ctx.ampm === "am", _ctx.n("title-btn--active")])),
23359
- onClick: _cache[3] || (_cache[3] = ($event) => _ctx.checkAmpm("am"))
23369
+ class: vue.normalizeClass(_ctx.n("title-time"))
23360
23370
  },
23361
- "AM",
23371
+ [
23372
+ vue.createElementVNode(
23373
+ "div",
23374
+ {
23375
+ class: vue.normalizeClass(_ctx.classes(_ctx.n("title-btn"), [_ctx.type === "hour", _ctx.n("title-btn--active")])),
23376
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.checkPanel("hour"))
23377
+ },
23378
+ vue.toDisplayString(_ctx.time.hour),
23379
+ 3
23380
+ /* TEXT, CLASS */
23381
+ ),
23382
+ _hoisted_1$2,
23383
+ vue.createElementVNode(
23384
+ "div",
23385
+ {
23386
+ class: vue.normalizeClass(_ctx.classes(_ctx.n("title-btn"), [_ctx.type === "minute", _ctx.n("title-btn--active")])),
23387
+ onClick: _cache[1] || (_cache[1] = ($event) => _ctx.checkPanel("minute"))
23388
+ },
23389
+ vue.toDisplayString(_ctx.time.minute),
23390
+ 3
23391
+ /* TEXT, CLASS */
23392
+ ),
23393
+ _ctx.useSeconds ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$2, ":")) : vue.createCommentVNode("v-if", true),
23394
+ _ctx.useSeconds ? (vue.openBlock(), vue.createElementBlock(
23395
+ "div",
23396
+ {
23397
+ key: 1,
23398
+ class: vue.normalizeClass(_ctx.classes(_ctx.n("title-btn"), [_ctx.type === "second", _ctx.n("title-btn--active")])),
23399
+ onClick: _cache[2] || (_cache[2] = ($event) => _ctx.checkPanel("second"))
23400
+ },
23401
+ vue.toDisplayString(_ctx.time.second),
23402
+ 3
23403
+ /* TEXT, CLASS */
23404
+ )) : vue.createCommentVNode("v-if", true)
23405
+ ],
23362
23406
  2
23363
23407
  /* CLASS */
23364
23408
  ),
23365
- vue.createElementVNode(
23409
+ _ctx.format === "ampm" ? (vue.openBlock(), vue.createElementBlock(
23366
23410
  "div",
23367
23411
  {
23368
- class: vue.normalizeClass(_ctx.classes(_ctx.n("title-btn"), [_ctx.ampm === "pm", _ctx.n("title-btn--active")])),
23369
- onClick: _cache[4] || (_cache[4] = ($event) => _ctx.checkAmpm("pm"))
23412
+ key: 0,
23413
+ class: vue.normalizeClass(_ctx.n("title-ampm"))
23370
23414
  },
23371
- "PM",
23415
+ [
23416
+ vue.createElementVNode(
23417
+ "div",
23418
+ {
23419
+ class: vue.normalizeClass(_ctx.classes(_ctx.n("title-btn"), [_ctx.ampm === "am", _ctx.n("title-btn--active")])),
23420
+ onClick: _cache[3] || (_cache[3] = ($event) => _ctx.checkAmpm("am"))
23421
+ },
23422
+ " AM ",
23423
+ 2
23424
+ /* CLASS */
23425
+ ),
23426
+ vue.createElementVNode(
23427
+ "div",
23428
+ {
23429
+ class: vue.normalizeClass(_ctx.classes(_ctx.n("title-btn"), [_ctx.ampm === "pm", _ctx.n("title-btn--active")])),
23430
+ onClick: _cache[4] || (_cache[4] = ($event) => _ctx.checkAmpm("pm"))
23431
+ },
23432
+ " PM ",
23433
+ 2
23434
+ /* CLASS */
23435
+ )
23436
+ ],
23372
23437
  2
23373
23438
  /* CLASS */
23374
- )
23439
+ )) : vue.createCommentVNode("v-if", true)
23375
23440
  ],
23376
23441
  2
23377
23442
  /* CLASS */
23378
- )) : vue.createCommentVNode("v-if", true)
23443
+ )
23379
23444
  ],
23380
23445
  6
23381
23446
  /* CLASS, STYLE */
@@ -23668,6 +23733,7 @@ const __sfc__$2 = vue.defineComponent({
23668
23733
  isPreventNextUpdate,
23669
23734
  n: n$2,
23670
23735
  classes: classes$2,
23736
+ pack,
23671
23737
  moveHand,
23672
23738
  checkPanel,
23673
23739
  checkAmpm,
@@ -24638,7 +24704,7 @@ const uploader = "";
24638
24704
  const UploaderSfc = "";
24639
24705
  const watermark = "";
24640
24706
  const WatermarkSfc = "";
24641
- const version = "2.18.0-alpha.1697608760113";
24707
+ const version = "2.18.1";
24642
24708
  function install(app) {
24643
24709
  stdin_default$3k.install && app.use(stdin_default$3k);
24644
24710
  stdin_default$3i.install && app.use(stdin_default$3i);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "2.18.0-alpha.1697608760113",
3
+ "version": "2.18.1",
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": "2.18.0-alpha.1697608760113",
52
- "@varlet/shared": "2.18.0-alpha.1697608760113",
53
- "@varlet/use": "2.18.0-alpha.1697608760113"
51
+ "@varlet/icons": "2.18.1",
52
+ "@varlet/use": "2.18.1",
53
+ "@varlet/shared": "2.18.1"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@vue/runtime-core": "3.3.4",
@@ -66,9 +66,9 @@
66
66
  "typescript": "^5.1.5",
67
67
  "vue": "3.3.4",
68
68
  "vue-router": "4.2.0",
69
- "@varlet/cli": "2.18.0-alpha.1697608760113",
70
- "@varlet/ui": "2.18.0-alpha.1697608760113",
71
- "@varlet/touch-emulator": "2.18.0-alpha.1697608760113"
69
+ "@varlet/touch-emulator": "2.18.1",
70
+ "@varlet/cli": "2.18.1",
71
+ "@varlet/ui": "2.18.1"
72
72
  },
73
73
  "scripts": {
74
74
  "dev": "varlet-cli dev",
@@ -10,7 +10,7 @@ export interface BackTopProps extends BasicAttributes {
10
10
  right?: number | string
11
11
  elevation?: boolean | number | string
12
12
  bottom?: number | string
13
- onClick?: ListenerProp<(e: MouseEvent) => void>
13
+ onClick?: ListenerProp<(e: Event) => void>
14
14
  }
15
15
 
16
16
  export class BackTop extends VarComponent {
package/types/chip.d.ts CHANGED
@@ -15,7 +15,9 @@ export interface ChipProps extends BasicAttributes {
15
15
  plain?: boolean
16
16
  round?: boolean
17
17
  block?: boolean
18
+ /** @deprecated Use closeable to instead. */
18
19
  closable?: boolean
20
+ closeable?: boolean
19
21
  onClose?: ListenerProp<(e: Event) => void>
20
22
  }
21
23
 
@@ -10,7 +10,10 @@ export interface DatePickerProps extends BasicAttributes {
10
10
  type?: DatePickerType
11
11
  allowedDates?: (val: string) => boolean
12
12
  color?: string
13
- headerColor?: string
13
+ hint?: string
14
+ /** @deprecated Use titleColor to instead. */
15
+ headerColor: string
16
+ titleColor: string
14
17
  elevation?: boolean | string | number
15
18
  buttonElevation?: boolean | string | number
16
19
  firstDayOfWeek?: string | number
@@ -1,4 +1,4 @@
1
- import { VNode } from 'vue'
1
+ import { VNode, TeleportProps } from 'vue'
2
2
  import { VarComponent, BasicAttributes, ListenerProp } from './varComponent'
3
3
 
4
4
  export interface FloatingPanelProps extends BasicAttributes {
package/types/menu.d.ts CHANGED
@@ -5,10 +5,10 @@ import { PositioningStrategy } from '@popperjs/core'
5
5
 
6
6
  export declare const menuProps: Record<string, any>
7
7
 
8
- type NeededPopperPlacement = Exclude<PopperPlacement, 'auto' | 'auto-start' | 'auto-end'>
8
+ type MenuNeededPopperPlacement = Exclude<PopperPlacement, 'auto' | 'auto-start' | 'auto-end'>
9
9
 
10
10
  export type MenuPlacement =
11
- | NeededPopperPlacement
11
+ | MenuNeededPopperPlacement
12
12
  | 'cover-top'
13
13
  | 'cover-top-start'
14
14
  | 'cover-top-end'
@@ -5,10 +5,10 @@ import { PositioningStrategy } from '@popperjs/core'
5
5
 
6
6
  export declare const menuSelectProps: Record<string, any>
7
7
 
8
- type NeededPopperPlacement = Exclude<PopperPlacement, 'auto' | 'auto-start' | 'auto-end'>
8
+ type MenuSelectNeededPopperPlacement = Exclude<PopperPlacement, 'auto' | 'auto-start' | 'auto-end'>
9
9
 
10
10
  export type MenuSelectPlacement =
11
- | NeededPopperPlacement
11
+ | MenuSelectNeededPopperPlacement
12
12
  | 'cover-top'
13
13
  | 'cover-top-start'
14
14
  | 'cover-top-end'
package/types/rate.d.ts CHANGED
@@ -3,7 +3,7 @@ import { VarComponent, BasicAttributes, ListenerProp } from './varComponent'
3
3
  export declare const rateProps: Record<string, any>
4
4
 
5
5
  export interface RateProps extends BasicAttributes {
6
- modelValue?: string | number
6
+ modelValue?: number
7
7
  count?: string | number
8
8
  color?: string
9
9
  emptyColor?: string
@@ -22,8 +22,8 @@ export interface RateProps extends BasicAttributes {
22
22
  clearable?: boolean
23
23
  ripple?: boolean
24
24
  rules?: Array<(value: any) => any>
25
- onChange?: ListenerProp<(value: string | number) => void>
26
- 'onUpdate:modelValue'?: ListenerProp<(value: string | number) => void>
25
+ onChange?: ListenerProp<(value: number) => void>
26
+ 'onUpdate:modelValue'?: ListenerProp<(value: number) => void>
27
27
  }
28
28
 
29
29
  export class Rate extends VarComponent {
package/types/switch.d.ts CHANGED
@@ -15,7 +15,7 @@ export interface SwitchProps extends BasicAttributes {
15
15
  closeColor?: string
16
16
  size?: string | number
17
17
  rules?: Array<(value: any) => any>
18
- onClick?: ListenerProp<(event: MouseEvent) => void>
18
+ onClick?: ListenerProp<(event: Event) => void>
19
19
  onChange?: ListenerProp<(value: boolean) => void>
20
20
  'onUpdate:modelValue'?: ListenerProp<(value: boolean) => void>
21
21
  }
@@ -14,7 +14,10 @@ export interface TimePickerProps extends BasicAttributes {
14
14
  modelValue?: string
15
15
  elevation?: boolean | string | number
16
16
  color?: string
17
+ hint?: string
18
+ /** @deprecated Use titleColor to instead. */
17
19
  headerColor?: string
20
+ titleColor?: string
18
21
  allowedTime?: AllowedTime
19
22
  format?: TimePickerFormat
20
23
  min?: string
@@ -5,9 +5,9 @@ import { PositioningStrategy } from '@popperjs/core'
5
5
 
6
6
  export declare const tooltipProps: Record<string, any>
7
7
 
8
- type NeededPopperPlacement = Exclude<PopperPlacement, 'auto' | 'auto-start' | 'auto-end'>
8
+ type TooltipNeededPopperPlacement = Exclude<PopperPlacement, 'auto' | 'auto-start' | 'auto-end'>
9
9
 
10
- export type TooltipPlacement = NeededPopperPlacement
10
+ export type TooltipPlacement = TooltipNeededPopperPlacement
11
11
 
12
12
  export type TooltipTrigger = 'click' | 'hover'
13
13