@varlet/ui 2.18.2 → 2.18.3-alpha.1699110299826

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.
Files changed (73) hide show
  1. package/es/action-sheet/ActionSheet.mjs +2 -1
  2. package/es/action-sheet/index.mjs +2 -2
  3. package/es/avatar/Avatar.mjs +2 -1
  4. package/es/back-top/BackTop.mjs +2 -2
  5. package/es/bottom-navigation/BottomNavigation.mjs +2 -2
  6. package/es/bottom-navigation-item/BottomNavigationItem.mjs +2 -1
  7. package/es/breadcrumb/Breadcrumb.mjs +2 -1
  8. package/es/button/Button.mjs +2 -2
  9. package/es/card/Card.mjs +2 -2
  10. package/es/cell/Cell.mjs +2 -1
  11. package/es/checkbox/Checkbox.mjs +3 -1
  12. package/es/checkbox-group/CheckboxGroup.mjs +2 -2
  13. package/es/chip/Chip.mjs +2 -1
  14. package/es/col/Col.mjs +2 -2
  15. package/es/collapse/Collapse.mjs +2 -2
  16. package/es/countdown/Countdown.mjs +2 -2
  17. package/es/counter/Counter.mjs +2 -2
  18. package/es/date-picker/DatePicker.mjs +2 -2
  19. package/es/dialog/Dialog.mjs +2 -1
  20. package/es/dialog/index.mjs +2 -2
  21. package/es/drag/Drag.mjs +2 -2
  22. package/es/ellipsis/Ellipsis.mjs +7 -6
  23. package/es/fab/Fab.mjs +3 -3
  24. package/es/field-decorator/FieldDecorator.mjs +2 -2
  25. package/es/floating-panel/FloatingPanel.mjs +3 -3
  26. package/es/form/Form.mjs +2 -2
  27. package/es/image/Image.mjs +2 -1
  28. package/es/image-preview/ImagePreview.mjs +2 -2
  29. package/es/image-preview/index.mjs +2 -2
  30. package/es/index-bar/IndexBar.mjs +4 -3
  31. package/es/index.bundle.mjs +1 -1
  32. package/es/index.mjs +1 -1
  33. package/es/input/Input.mjs +2 -2
  34. package/es/lazy/index.mjs +1 -2
  35. package/es/link/Link.mjs +2 -1
  36. package/es/list/List.mjs +2 -2
  37. package/es/loading/Loading.mjs +2 -1
  38. package/es/menu/usePopover.mjs +2 -3
  39. package/es/menu-select/MenuSelect.mjs +3 -1
  40. package/es/overlay/Overlay.mjs +2 -1
  41. package/es/pagination/Pagination.mjs +2 -2
  42. package/es/paper/Paper.mjs +2 -1
  43. package/es/picker/Picker.mjs +3 -3
  44. package/es/picker/index.mjs +2 -2
  45. package/es/popup/Popup.mjs +2 -1
  46. package/es/pull-refresh/PullRefresh.mjs +2 -2
  47. package/es/radio/Radio.mjs +3 -1
  48. package/es/radio-group/RadioGroup.mjs +2 -1
  49. package/es/rate/Rate.mjs +2 -2
  50. package/es/row/Row.mjs +2 -2
  51. package/es/select/Select.mjs +2 -2
  52. package/es/slider/Slider.mjs +2 -2
  53. package/es/snackbar/core.mjs +2 -1
  54. package/es/snackbar/index.mjs +2 -2
  55. package/es/space/Space.mjs +2 -2
  56. package/es/steps/Steps.mjs +2 -1
  57. package/es/sticky/Sticky.mjs +2 -2
  58. package/es/style-provider/StyleProvider.mjs +2 -1
  59. package/es/swipe/Swipe.mjs +2 -2
  60. package/es/switch/Switch.mjs +2 -1
  61. package/es/tab/Tab.mjs +2 -1
  62. package/es/tabs/Tabs.mjs +2 -2
  63. package/es/tabs-items/TabsItems.mjs +2 -2
  64. package/es/time-picker/TimePicker.mjs +2 -2
  65. package/es/uploader/Uploader.mjs +19 -6
  66. package/es/uploader/props.mjs +1 -0
  67. package/es/utils/components.mjs +2 -6
  68. package/es/varlet.esm.js +4125 -4112
  69. package/highlight/web-types.en-US.json +2 -2
  70. package/highlight/web-types.zh-CN.json +2 -2
  71. package/lib/varlet.cjs.js +29 -17
  72. package/package.json +7 -7
  73. package/umd/varlet.js +5 -5
@@ -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.18.2",
4
+ "version": "2.18.3-alpha.1699110299826",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -3416,7 +3416,7 @@
3416
3416
  {
3417
3417
  "name": "highlight-color",
3418
3418
  "description": "Index character highlight color",
3419
- "default": "#ee0a24",
3419
+ "default": "-",
3420
3420
  "value": {
3421
3421
  "type": "string",
3422
3422
  "kind": "expression"
@@ -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.18.2",
4
+ "version": "2.18.3-alpha.1699110299826",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -3584,7 +3584,7 @@
3584
3584
  {
3585
3585
  "name": "highlight-color",
3586
3586
  "description": "索引字符高亮颜色",
3587
- "default": "#ee0a24",
3587
+ "default": "-",
3588
3588
  "value": {
3589
3589
  "type": "string",
3590
3590
  "kind": "expression"
package/lib/varlet.cjs.js CHANGED
@@ -168,7 +168,7 @@ var throttle = (fn2, delay = 200) => {
168
168
  }
169
169
  };
170
170
  };
171
- function call$1(fn2, ...args) {
171
+ function call(fn2, ...args) {
172
172
  if (isArray(fn2)) {
173
173
  return fn2.map((f) => f(...args));
174
174
  }
@@ -574,7 +574,7 @@ function useWindowSize(options = {}) {
574
574
  height
575
575
  };
576
576
  }
577
- function useVModel$1(props2, key, options = {}) {
577
+ function useVModel(props2, key, options = {}) {
578
578
  const { passive: passive2 = true, eventName, defaultValue, emit } = options;
579
579
  const event = eventName != null ? eventName : `onUpdate:${key.toString()}`;
580
580
  const getValue = () => props2[key] != null ? props2[key] : defaultValue;
@@ -584,7 +584,7 @@ function useVModel$1(props2, key, options = {}) {
584
584
  return getValue();
585
585
  },
586
586
  set(value) {
587
- emit ? emit(event, value) : call$1(props2[event], value);
587
+ emit ? emit(event, value) : call(props2[event], value);
588
588
  }
589
589
  });
590
590
  }
@@ -598,7 +598,7 @@ function useVModel$1(props2, key, options = {}) {
598
598
  vue.watch(
599
599
  () => proxy.value,
600
600
  (newValue) => {
601
- emit ? emit(event, newValue) : call$1(props2[event], newValue);
601
+ emit ? emit(event, newValue) : call(props2[event], newValue);
602
602
  }
603
603
  );
604
604
  return proxy;
@@ -739,8 +739,6 @@ function useTeleport() {
739
739
  };
740
740
  }
741
741
  const createNamespace = createNamespaceFn("var");
742
- const call = call$1;
743
- const useVModel = useVModel$1;
744
742
  function defineListenerProp(fallback) {
745
743
  return {
746
744
  type: [Function, Array],
@@ -13001,16 +12999,16 @@ function __render__$O(_ctx, _cache) {
13001
12999
  const _component_var_tooltip = vue.resolveComponent("var-tooltip");
13002
13000
  return vue.openBlock(), vue.createBlock(
13003
13001
  _component_var_tooltip,
13004
- vue.normalizeProps(vue.guardReactiveProps(_ctx.tooltip)),
13002
+ vue.normalizeProps(vue.guardReactiveProps(_ctx.tooltipProps)),
13005
13003
  {
13006
13004
  content: vue.withCtx(() => [
13007
13005
  vue.renderSlot(_ctx.$slots, "tooltip-content", {}, () => {
13008
13006
  var _a;
13009
13007
  return [
13010
- ((_a = _ctx.tooltip) == null ? void 0 : _a.content) ? (vue.openBlock(), vue.createElementBlock(
13008
+ ((_a = _ctx.tooltipProps) == null ? void 0 : _a.content) ? (vue.openBlock(), vue.createElementBlock(
13011
13009
  "span",
13012
13010
  _hoisted_1$m,
13013
- vue.toDisplayString(_ctx.tooltip.content),
13011
+ vue.toDisplayString(_ctx.tooltipProps.content),
13014
13012
  1
13015
13013
  /* TEXT */
13016
13014
  )) : vue.renderSlot(_ctx.$slots, "default", { key: 1 })
@@ -13048,7 +13046,7 @@ const __sfc__$P = vue.defineComponent({
13048
13046
  setup(props2) {
13049
13047
  const expanding = useVModel(props2, "expand");
13050
13048
  const rootStyles = vue.computed(() => props2.lineClamp ? { "-webkit-line-clamp": props2.lineClamp } : {});
13051
- const tooltip2 = vue.computed(() => {
13049
+ const tooltipProps = vue.computed(() => {
13052
13050
  if (props2.tooltip === false) {
13053
13051
  return {
13054
13052
  disabled: true
@@ -13068,7 +13066,7 @@ const __sfc__$P = vue.defineComponent({
13068
13066
  expanding.value = !expanding.value;
13069
13067
  }
13070
13068
  return {
13071
- tooltip: tooltip2,
13069
+ tooltipProps,
13072
13070
  expanding,
13073
13071
  rootStyles,
13074
13072
  n: n$O,
@@ -15419,7 +15417,7 @@ function __render__$E(_ctx, _cache) {
15419
15417
  return vue.openBlock(), vue.createElementBlock("li", {
15420
15418
  key: anchorName,
15421
15419
  class: vue.normalizeClass(_ctx.classes(_ctx.n("anchor-item"), [_ctx.active === anchorName, _ctx.n("anchor-item--active")])),
15422
- style: vue.normalizeStyle({ color: _ctx.active === anchorName && _ctx.highlightColor ? _ctx.highlightColor : "" }),
15420
+ style: vue.normalizeStyle({ color: _ctx.active === anchorName && _ctx.highlightColor ? _ctx.highlightColor : void 0 }),
15423
15421
  onClick: ($event) => _ctx.anchorClick({ anchorName, manualCall: true })
15424
15422
  }, vue.toDisplayString(anchorName), 15, _hoisted_1$h);
15425
15423
  }),
@@ -23798,6 +23796,7 @@ const props$1 = {
23798
23796
  rules: Array,
23799
23797
  hideList: Boolean,
23800
23798
  preventDefaultPreview: Boolean,
23799
+ onClickAction: defineListenerProp(),
23801
23800
  onBeforeFilter: defineListenerProp(),
23802
23801
  onBeforeRead: defineListenerProp(),
23803
23802
  onAfterRead: defineListenerProp(),
@@ -23928,7 +23927,7 @@ function __render__$1(_ctx, _cache) {
23928
23927
  [_ctx.disabled || _ctx.formDisabled, _ctx.n("--disabled")]
23929
23928
  )
23930
23929
  ),
23931
- onClick: _cache[1] || (_cache[1] = (...args) => _ctx.chooseFile && _ctx.chooseFile(...args))
23930
+ onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleActionClick && _ctx.handleActionClick(...args))
23932
23931
  },
23933
23932
  [
23934
23933
  vue.createElementVNode("input", {
@@ -23939,7 +23938,9 @@ function __render__$1(_ctx, _cache) {
23939
23938
  accept: _ctx.accept,
23940
23939
  capture: _ctx.capture,
23941
23940
  disabled: _ctx.disabled || _ctx.formDisabled || _ctx.readonly || _ctx.formReadonly,
23942
- onChange: _cache[0] || (_cache[0] = (...args) => _ctx.handleChange && _ctx.handleChange(...args))
23941
+ onChange: _cache[0] || (_cache[0] = (...args) => _ctx.handleChange && _ctx.handleChange(...args)),
23942
+ onClick: _cache[1] || (_cache[1] = vue.withModifiers(() => {
23943
+ }, ["stop"]))
23943
23944
  }, null, 42, _hoisted_4$1),
23944
23945
  vue.renderSlot(_ctx.$slots, "default", {}, () => [
23945
23946
  vue.createVNode(_component_var_icon, {
@@ -23984,8 +23985,8 @@ function __render__$1(_ctx, _cache) {
23984
23985
  "var-uploader-cover": "",
23985
23986
  position: "center",
23986
23987
  show: _ctx.showPreview,
23987
- "onUpdate:show": _cache[2] || (_cache[2] = ($event) => _ctx.showPreview = $event),
23988
- onClosed: _cache[3] || (_cache[3] = ($event) => _ctx.currentPreview = null)
23988
+ "onUpdate:show": _cache[3] || (_cache[3] = ($event) => _ctx.showPreview = $event),
23989
+ onClosed: _cache[4] || (_cache[4] = ($event) => _ctx.currentPreview = null)
23989
23990
  }, {
23990
23991
  default: vue.withCtx(() => {
23991
23992
  var _a, _b;
@@ -24195,6 +24196,16 @@ const __sfc__$1 = vue.defineComponent({
24195
24196
  call(props2["onUpdate:modelValue"], expectedFiles);
24196
24197
  });
24197
24198
  }
24199
+ function handleActionClick(event) {
24200
+ if ((form == null ? void 0 : form.disabled.value) || props2.disabled) {
24201
+ return;
24202
+ }
24203
+ if (props2.onClickAction) {
24204
+ call(props2.onClickAction, chooseFile, event);
24205
+ return;
24206
+ }
24207
+ chooseFile();
24208
+ }
24198
24209
  function getSuccess() {
24199
24210
  return props2.modelValue.filter((varFile) => varFile.state === "success");
24200
24211
  }
@@ -24254,6 +24265,7 @@ const __sfc__$1 = vue.defineComponent({
24254
24265
  reset,
24255
24266
  chooseFile,
24256
24267
  closePreview,
24268
+ handleActionClick,
24257
24269
  toSizeUnit
24258
24270
  };
24259
24271
  }
@@ -24708,7 +24720,7 @@ const uploader = "";
24708
24720
  const UploaderSfc = "";
24709
24721
  const watermark = "";
24710
24722
  const WatermarkSfc = "";
24711
- const version = "2.18.2";
24723
+ const version = "2.18.3-alpha.1699110299826";
24712
24724
  function install(app) {
24713
24725
  stdin_default$3k.install && app.use(stdin_default$3k);
24714
24726
  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.2",
3
+ "version": "2.18.3-alpha.1699110299826",
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/use": "2.18.2",
52
- "@varlet/shared": "2.18.2",
53
- "@varlet/icons": "2.18.2"
51
+ "@varlet/shared": "2.18.3-alpha.1699110299826",
52
+ "@varlet/use": "2.18.3-alpha.1699110299826",
53
+ "@varlet/icons": "2.18.3-alpha.1699110299826"
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.2",
70
- "@varlet/touch-emulator": "2.18.2",
71
- "@varlet/ui": "2.18.2"
69
+ "@varlet/ui": "2.18.3-alpha.1699110299826",
70
+ "@varlet/cli": "2.18.3-alpha.1699110299826",
71
+ "@varlet/touch-emulator": "2.18.3-alpha.1699110299826"
72
72
  },
73
73
  "scripts": {
74
74
  "dev": "varlet-cli dev",