@varlet/ui 3.20.4 → 3.20.6

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": "3.20.4",
4
+ "version": "3.20.6",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -6788,6 +6788,24 @@
6788
6788
  "type": "boolean | object",
6789
6789
  "kind": "expression"
6790
6790
  }
6791
+ },
6792
+ {
6793
+ "name": "active",
6794
+ "description": "Whether to enable the persistent active effect. It uses a translucent primary-color overlay and text color by default and supports object form `{ color?: string }`",
6795
+ "default": "false",
6796
+ "value": {
6797
+ "type": "boolean | object",
6798
+ "kind": "expression"
6799
+ }
6800
+ },
6801
+ {
6802
+ "name": "disabled",
6803
+ "description": "Whether to disable interaction. When disabled, click, hover, and ripple effects are disabled and only a disabled cursor is shown",
6804
+ "default": "false",
6805
+ "value": {
6806
+ "type": "boolean",
6807
+ "kind": "expression"
6808
+ }
6791
6809
  }
6792
6810
  ],
6793
6811
  "events": [
@@ -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": "3.20.4",
4
+ "version": "3.20.6",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -6530,6 +6530,24 @@
6530
6530
  "type": "boolean | object",
6531
6531
  "kind": "expression"
6532
6532
  }
6533
+ },
6534
+ {
6535
+ "name": "active",
6536
+ "description": "是否开启常驻激活效果,默认使用主色半透明叠层和文字颜色,支持对象形式 `{ color?: string }`",
6537
+ "default": "false",
6538
+ "value": {
6539
+ "type": "boolean | object",
6540
+ "kind": "expression"
6541
+ }
6542
+ },
6543
+ {
6544
+ "name": "disabled",
6545
+ "description": "是否禁用交互。禁用后不触发点击、悬停和水波效果,仅显示禁用光标",
6546
+ "default": "false",
6547
+ "value": {
6548
+ "type": "boolean",
6549
+ "kind": "expression"
6550
+ }
6533
6551
  }
6534
6552
  ],
6535
6553
  "events": [
package/lib/varlet.cjs.js CHANGED
@@ -19685,6 +19685,7 @@ function __render__$47(_ctx, _cache) {
19685
19685
  const _component_var_swipe_item = (0, vue.resolveComponent)("var-swipe-item");
19686
19686
  const _component_var_swipe = (0, vue.resolveComponent)("var-swipe");
19687
19687
  const _component_var_icon = (0, vue.resolveComponent)("var-icon");
19688
+ const _component_var_button = (0, vue.resolveComponent)("var-button");
19688
19689
  const _component_var_popup = (0, vue.resolveComponent)("var-popup");
19689
19690
  return (0, vue.openBlock)(), (0, vue.createBlock)(_component_var_popup, {
19690
19691
  show: _ctx.show,
@@ -19756,13 +19757,20 @@ function __render__$47(_ctx, _cache) {
19756
19757
  "loop",
19757
19758
  "onChange"
19758
19759
  ]),
19759
- (0, vue.renderSlot)(_ctx.$slots, "close-icon", {}, () => [_ctx.closeable ? ((0, vue.openBlock)(), (0, vue.createBlock)(_component_var_icon, {
19760
+ (0, vue.renderSlot)(_ctx.$slots, "close-icon", {}, () => [_ctx.closeable ? ((0, vue.openBlock)(), (0, vue.createBlock)(_component_var_button, {
19760
19761
  key: 0,
19761
19762
  class: (0, vue.normalizeClass)(_ctx.n("close-icon")),
19762
- name: "close-circle",
19763
+ text: "",
19764
+ round: "",
19763
19765
  "var-image-preview-cover": "",
19764
19766
  onClick: _ctx.close
19765
- }, null, 8, ["class", "onClick"])) : (0, vue.createCommentVNode)("v-if", true)]),
19767
+ }, {
19768
+ default: (0, vue.withCtx)(() => [(0, vue.createVNode)(_component_var_icon, {
19769
+ class: (0, vue.normalizeClass)(_ctx.n("close-icon-image")),
19770
+ name: "window-close"
19771
+ }, null, 8, ["class"])]),
19772
+ _: 1
19773
+ }, 8, ["class", "onClick"])) : (0, vue.createCommentVNode)("v-if", true)]),
19766
19774
  _ctx.$slots.extra ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
19767
19775
  key: 0,
19768
19776
  class: (0, vue.normalizeClass)(_ctx.n("extra"))
@@ -19787,6 +19795,7 @@ function __render__$47(_ctx, _cache) {
19787
19795
  var __sfc__$47 = (0, vue.defineComponent)({
19788
19796
  name: name$42,
19789
19797
  components: {
19798
+ VarButton: stdin_default$12,
19790
19799
  VarSwipe: stdin_default$89,
19791
19800
  VarSwipeItem: stdin_default$90,
19792
19801
  VarPopup: stdin_default$65,
@@ -21724,6 +21733,11 @@ var props$55 = {
21724
21733
  type: [Boolean, Object],
21725
21734
  default: false
21726
21735
  },
21736
+ active: {
21737
+ type: [Boolean, Object],
21738
+ default: false
21739
+ },
21740
+ disabled: Boolean,
21727
21741
  onClick: defineListenerProp()
21728
21742
  };
21729
21743
  //#endregion
@@ -21734,18 +21748,26 @@ function __render__$39(_ctx, _cache) {
21734
21748
  const _directive_ripple = (0, vue.resolveDirective)("ripple");
21735
21749
  const _directive_hover = (0, vue.resolveDirective)("hover");
21736
21750
  return (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
21737
- class: (0, vue.normalizeClass)(_ctx.classes(_ctx.n(), _ctx.n("$--box"), [_ctx.variant === "standard", _ctx.formatElevation(_ctx.elevation, 2)], [_ctx.onClick || !_ctx.normalizedHoverable.disabled, _ctx.n("--cursor")], [_ctx.round, _ctx.n("--round")], [_ctx.surfaceLow, _ctx.n("--surface-low")], [_ctx.variant === "outlined", _ctx.n("--outlined")], [_ctx.variant === "filled", _ctx.n("--filled")], [_ctx.inline, _ctx.n("$--inline-flex")])),
21751
+ class: (0, vue.normalizeClass)(_ctx.classes(_ctx.n(), _ctx.n("$--box"), [_ctx.variant === "standard", _ctx.formatElevation(_ctx.elevation, 2)], [!_ctx.disabled && (_ctx.onClick || !_ctx.normalizedHoverable.disabled), _ctx.n("--cursor")], [_ctx.disabled, _ctx.n("--disabled")], [!_ctx.disabled && _ctx.normalizedActive.enabled, _ctx.n("--active")], [_ctx.round, _ctx.n("--round")], [_ctx.surfaceLow, _ctx.n("--surface-low")], [_ctx.variant === "outlined", _ctx.n("--outlined")], [_ctx.variant === "filled", _ctx.n("--filled")], [_ctx.inline, _ctx.n("$--inline-flex")])),
21738
21752
  style: (0, vue.normalizeStyle)({
21739
21753
  width: _ctx.toSizeUnit(_ctx.width),
21740
21754
  height: _ctx.toSizeUnit(_ctx.height),
21741
- "border-radius": _ctx.toSizeUnit(_ctx.radius)
21755
+ "border-radius": _ctx.toSizeUnit(_ctx.radius),
21756
+ "--paper-active-color": _ctx.normalizedActive.color
21742
21757
  }),
21743
21758
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
21744
- }, [(0, vue.renderSlot)(_ctx.$slots, "default"), (0, vue.createVNode)(_component_var_hover_overlay, {
21745
- hovering: !_ctx.normalizedHoverable.disabled ? _ctx.hovering : false,
21746
- color: _ctx.normalizedHoverable.color
21747
- }, null, 8, ["hovering", "color"])], 6)), [[_directive_ripple, {
21748
- disabled: _ctx.normalizedRipple.disabled,
21759
+ }, [
21760
+ (0, vue.renderSlot)(_ctx.$slots, "default"),
21761
+ (0, vue.createVNode)(_component_var_hover_overlay, {
21762
+ class: (0, vue.normalizeClass)(_ctx.n("active-overlay")),
21763
+ hovering: !_ctx.disabled && _ctx.normalizedActive.enabled
21764
+ }, null, 8, ["class", "hovering"]),
21765
+ (0, vue.createVNode)(_component_var_hover_overlay, {
21766
+ hovering: !_ctx.disabled && !_ctx.normalizedHoverable.disabled ? _ctx.hovering : false,
21767
+ color: _ctx.normalizedHoverable.color
21768
+ }, null, 8, ["hovering", "color"])
21769
+ ], 6)), [[_directive_ripple, {
21770
+ disabled: _ctx.disabled || _ctx.normalizedRipple.disabled,
21749
21771
  color: _ctx.normalizedRipple.color
21750
21772
  }], [
21751
21773
  _directive_hover,
@@ -21766,6 +21788,7 @@ var __sfc__$39 = (0, vue.defineComponent)({
21766
21788
  const { hovering, handleHovering } = useHoverOverlay();
21767
21789
  const normalizedRipple = (0, vue.computed)(() => normalizeRipple(props2.ripple));
21768
21790
  const normalizedHoverable = (0, vue.computed)(() => normalizeHoverable(props2.hoverable));
21791
+ const normalizedActive = (0, vue.computed)(() => normalizeActive(props2.active));
21769
21792
  function normalizeRipple(value) {
21770
21793
  if (isPlainObject(value)) return {
21771
21794
  disabled: !!value.disabled,
@@ -21786,7 +21809,18 @@ var __sfc__$39 = (0, vue.defineComponent)({
21786
21809
  color: void 0
21787
21810
  };
21788
21811
  }
21812
+ function normalizeActive(value) {
21813
+ if (isPlainObject(value)) return {
21814
+ enabled: true,
21815
+ color: value.color
21816
+ };
21817
+ return {
21818
+ enabled: value,
21819
+ color: void 0
21820
+ };
21821
+ }
21789
21822
  function handleClick(e) {
21823
+ if (props2.disabled) return;
21790
21824
  call(props2.onClick, e);
21791
21825
  }
21792
21826
  return {
@@ -21796,6 +21830,7 @@ var __sfc__$39 = (0, vue.defineComponent)({
21796
21830
  surfaceLow,
21797
21831
  normalizedRipple,
21798
21832
  normalizedHoverable,
21833
+ normalizedActive,
21799
21834
  hovering,
21800
21835
  handleHovering,
21801
21836
  toSizeUnit,
@@ -27541,7 +27576,7 @@ var stdin_default$311 = {
27541
27576
  "--image-preview-swipe-indicators-text-color": "#ddd",
27542
27577
  "--image-preview-swipe-indicators-padding": "16px 0",
27543
27578
  "--image-preview-zoom-container-background": "#000",
27544
- "--image-preview-close-icon-top": "14px",
27579
+ "--image-preview-close-icon-top": "8px",
27545
27580
  "--image-preview-close-icon-right": "14px",
27546
27581
  "--image-preview-extra-top": "14px",
27547
27582
  "--image-preview-extra-left": "14px",
@@ -27691,7 +27726,9 @@ var stdin_default$297 = {
27691
27726
  "--paper-outlined-background": "transparent",
27692
27727
  "--paper-filled-background": "var(--color-surface-container-highest)",
27693
27728
  "--paper-outline-color": "var(--color-outline)",
27694
- "--paper-border-radius": "4px"
27729
+ "--paper-border-radius": "4px",
27730
+ "--paper-active-color": "var(--color-primary)",
27731
+ "--paper-active-opacity": "0.2"
27695
27732
  };
27696
27733
  //#endregion
27697
27734
  //#region es/themes/dark/picker.mjs
@@ -28920,7 +28957,7 @@ var stdin_default$235 = {
28920
28957
  "--image-preview-swipe-indicators-text-color": "#ddd",
28921
28958
  "--image-preview-swipe-indicators-padding": "16px 0",
28922
28959
  "--image-preview-zoom-container-background": "#000",
28923
- "--image-preview-close-icon-top": "14px",
28960
+ "--image-preview-close-icon-top": "8px",
28924
28961
  "--image-preview-close-icon-right": "14px",
28925
28962
  "--image-preview-extra-top": "14px",
28926
28963
  "--image-preview-extra-left": "14px",
@@ -29071,7 +29108,9 @@ var stdin_default$221 = {
29071
29108
  "--paper-outlined-background": "transparent",
29072
29109
  "--paper-filled-background": "var(--color-surface-container-highest)",
29073
29110
  "--paper-outline-color": "var(--color-outline)",
29074
- "--paper-border-radius": "12px"
29111
+ "--paper-border-radius": "12px",
29112
+ "--paper-active-color": "var(--color-primary)",
29113
+ "--paper-active-opacity": "0.2"
29075
29114
  };
29076
29115
  //#endregion
29077
29116
  //#region es/themes/md3-dark/picker.mjs
@@ -30285,7 +30324,7 @@ var stdin_default$159 = {
30285
30324
  "--image-preview-swipe-indicators-text-color": "#ddd",
30286
30325
  "--image-preview-swipe-indicators-padding": "16px 0",
30287
30326
  "--image-preview-zoom-container-background": "#000",
30288
- "--image-preview-close-icon-top": "14px",
30327
+ "--image-preview-close-icon-top": "8px",
30289
30328
  "--image-preview-close-icon-right": "14px",
30290
30329
  "--image-preview-extra-top": "14px",
30291
30330
  "--image-preview-extra-left": "14px",
@@ -30436,7 +30475,9 @@ var stdin_default$145 = {
30436
30475
  "--paper-outlined-background": "transparent",
30437
30476
  "--paper-filled-background": "var(--color-surface-container-highest)",
30438
30477
  "--paper-outline-color": "var(--color-outline)",
30439
- "--paper-border-radius": "12px"
30478
+ "--paper-border-radius": "12px",
30479
+ "--paper-active-color": "var(--color-primary)",
30480
+ "--paper-active-opacity": "0.2"
30440
30481
  };
30441
30482
  //#endregion
30442
30483
  //#region es/themes/md3-light/picker.mjs
@@ -32836,7 +32877,7 @@ var _WatermarkComponent = stdin_default$108;
32836
32877
  var stdin_default$102 = stdin_default$108;
32837
32878
  //#endregion
32838
32879
  //#region es/index.bundle.mjs
32839
- var version = "3.20.4";
32880
+ var version = "3.20.6";
32840
32881
  function install(app) {
32841
32882
  stdin_default.install && app.use(stdin_default);
32842
32883
  stdin_default$1.install && app.use(stdin_default$1);