@varlet/ui 3.2.11 → 3.2.12

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.2.11",
4
+ "version": "3.2.12",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -1446,6 +1446,24 @@
1446
1446
  "kind": "expression"
1447
1447
  }
1448
1448
  },
1449
+ {
1450
+ "name": "label-key",
1451
+ "description": "As the key that uniquely identifies label",
1452
+ "default": "label",
1453
+ "value": {
1454
+ "type": "string",
1455
+ "kind": "expression"
1456
+ }
1457
+ },
1458
+ {
1459
+ "name": "value-key",
1460
+ "description": "As the key that uniquely identifies value",
1461
+ "default": "value",
1462
+ "value": {
1463
+ "type": "string",
1464
+ "kind": "expression"
1465
+ }
1466
+ },
1449
1467
  {
1450
1468
  "name": "rules",
1451
1469
  "description": "The validation rules, return `true` to indicate that the validation passed. The remaining values are converted to text as user prompts",
@@ -3055,6 +3073,10 @@
3055
3073
  {
3056
3074
  "name": "default",
3057
3075
  "description": "Custom panel content"
3076
+ },
3077
+ {
3078
+ "name": "header",
3079
+ "description": "Custom panel header"
3058
3080
  }
3059
3081
  ]
3060
3082
  },
@@ -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.2.11",
4
+ "version": "3.2.12",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -1605,6 +1605,24 @@
1605
1605
  "kind": "expression"
1606
1606
  }
1607
1607
  },
1608
+ {
1609
+ "name": "label-key",
1610
+ "description": "作为 label 唯一标识的键名",
1611
+ "default": "label",
1612
+ "value": {
1613
+ "type": "string",
1614
+ "kind": "expression"
1615
+ }
1616
+ },
1617
+ {
1618
+ "name": "value-key",
1619
+ "description": "作为 value 唯一标识的键名",
1620
+ "default": "value",
1621
+ "value": {
1622
+ "type": "string",
1623
+ "kind": "expression"
1624
+ }
1625
+ },
1608
1626
  {
1609
1627
  "name": "rules",
1610
1628
  "description": "验证规则,返回 `true` 表示验证通过,其余的值则转换为文本作为用户提示",
@@ -3214,6 +3232,10 @@
3214
3232
  {
3215
3233
  "name": "default",
3216
3234
  "description": "自定义面板内容"
3235
+ },
3236
+ {
3237
+ "name": "header",
3238
+ "description": "自定义面板标头"
3217
3239
  }
3218
3240
  ]
3219
3241
  },
package/lib/varlet.cjs.js CHANGED
@@ -1166,12 +1166,12 @@ var __spreadValues$t = (a, b) => {
1166
1166
  return a;
1167
1167
  };
1168
1168
  const {
1169
- name: name$1h,
1169
+ name: name$1i,
1170
1170
  n: n$1o,
1171
1171
  classes: classes$1a
1172
1172
  } = createNamespace("popup");
1173
1173
  var stdin_default$5U = vue.defineComponent({
1174
- name: name$1h,
1174
+ name: name$1i,
1175
1175
  inheritAttrs: false,
1176
1176
  props: props$1g,
1177
1177
  setup(props2, {
@@ -1501,7 +1501,7 @@ var __async$h = (__this, __arguments, generator) => {
1501
1501
  step((generator = generator.apply(__this, __arguments)).next());
1502
1502
  });
1503
1503
  };
1504
- const { name: name$1g, n: n$1n, classes: classes$19 } = createNamespace("icon");
1504
+ const { name: name$1h, n: n$1n, classes: classes$19 } = createNamespace("icon");
1505
1505
  function __render__$1n(_ctx, _cache) {
1506
1506
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.isURL(_ctx.name) ? "img" : "i"), {
1507
1507
  class: vue.normalizeClass(
@@ -1525,7 +1525,7 @@ function __render__$1n(_ctx, _cache) {
1525
1525
  }, null, 8, ["class", "style", "src", "onClick"]);
1526
1526
  }
1527
1527
  const __sfc__$1o = vue.defineComponent({
1528
- name: name$1g,
1528
+ name: name$1h,
1529
1529
  props: props$1f,
1530
1530
  setup(props2) {
1531
1531
  const nextName = vue.ref("");
@@ -1569,7 +1569,7 @@ const props$1e = {
1569
1569
  hovering: Boolean,
1570
1570
  focusing: Boolean
1571
1571
  };
1572
- const { name: name$1f, n: n$1m, classes: classes$18 } = createNamespace("hover-overlay");
1572
+ const { name: name$1g, n: n$1m, classes: classes$18 } = createNamespace("hover-overlay");
1573
1573
  function __render__$1m(_ctx, _cache) {
1574
1574
  return vue.openBlock(), vue.createElementBlock(
1575
1575
  "div",
@@ -1582,7 +1582,7 @@ function __render__$1m(_ctx, _cache) {
1582
1582
  );
1583
1583
  }
1584
1584
  const __sfc__$1n = vue.defineComponent({
1585
- name: name$1f,
1585
+ name: name$1g,
1586
1586
  props: props$1e,
1587
1587
  setup: () => ({
1588
1588
  n: n$1m,
@@ -1728,7 +1728,7 @@ const Hover = {
1728
1728
  };
1729
1729
  const _HoverComponent = Hover;
1730
1730
  var stdin_default$5O = Hover;
1731
- const { name: name$1e, n: n$1l, classes: classes$17 } = createNamespace("action-sheet");
1731
+ const { name: name$1f, n: n$1l, classes: classes$17 } = createNamespace("action-sheet");
1732
1732
  function __render__$1l(_ctx, _cache) {
1733
1733
  const _component_var_icon = vue.resolveComponent("var-icon");
1734
1734
  const _component_var_hover_overlay = vue.resolveComponent("var-hover-overlay");
@@ -1770,7 +1770,7 @@ function __render__$1l(_ctx, _cache) {
1770
1770
  ]);
1771
1771
  }
1772
1772
  const __sfc__$1m = vue.defineComponent({
1773
- name: name$1e,
1773
+ name: name$1f,
1774
1774
  components: {
1775
1775
  VarHoverOverlay: stdin_default$5P,
1776
1776
  VarIcon: stdin_default$5R
@@ -2332,7 +2332,7 @@ var stdin_default$5H = {
2332
2332
  t,
2333
2333
  useLocale
2334
2334
  };
2335
- const { name: name$1d, n: n$1k, classes: classes$16 } = createNamespace("action-sheet");
2335
+ const { name: name$1e, n: n$1k, classes: classes$16 } = createNamespace("action-sheet");
2336
2336
  function __render__$1k(_ctx, _cache) {
2337
2337
  const _component_var_action_item = vue.resolveComponent("var-action-item");
2338
2338
  const _component_var_popup = vue.resolveComponent("var-popup");
@@ -2407,7 +2407,7 @@ function __render__$1k(_ctx, _cache) {
2407
2407
  }, 8, ["class", "overlay", "overlay-class", "overlay-style", "lock-scroll", "close-on-click-overlay", "close-on-key-escape", "teleport", "safe-area", "show", "onOpen", "onClose", "onClosed", "onOpened", "onRouteChange", "onKeyEscape"]);
2408
2408
  }
2409
2409
  const __sfc__$1l = vue.defineComponent({
2410
- name: name$1d,
2410
+ name: name$1e,
2411
2411
  directives: { Ripple: stdin_default$5V },
2412
2412
  components: {
2413
2413
  VarPopup: stdin_default$5T,
@@ -2536,7 +2536,7 @@ const props$1c = {
2536
2536
  },
2537
2537
  fixed: Boolean
2538
2538
  };
2539
- const { name: name$1c, n: n$1j, classes: classes$15 } = createNamespace("app-bar");
2539
+ const { name: name$1d, n: n$1j, classes: classes$15 } = createNamespace("app-bar");
2540
2540
  function __render__$1j(_ctx, _cache) {
2541
2541
  return vue.openBlock(), vue.createElementBlock(
2542
2542
  "div",
@@ -2649,7 +2649,7 @@ function __render__$1j(_ctx, _cache) {
2649
2649
  );
2650
2650
  }
2651
2651
  const __sfc__$1k = vue.defineComponent({
2652
- name: name$1c,
2652
+ name: name$1d,
2653
2653
  props: props$1c,
2654
2654
  setup(props2, { slots }) {
2655
2655
  const paddingLeft = vue.ref();
@@ -2971,7 +2971,7 @@ const props$1b = {
2971
2971
  onError: defineListenerProp()
2972
2972
  };
2973
2973
  const isInternalSize$1 = (size) => ["mini", "small", "normal", "large"].includes(size);
2974
- const { name: name$1b, n: n$1i, classes: classes$14 } = createNamespace("avatar");
2974
+ const { name: name$1c, n: n$1i, classes: classes$14 } = createNamespace("avatar");
2975
2975
  const _hoisted_1$y = ["src", "alt", "lazy-loading", "lazy-error"];
2976
2976
  const _hoisted_2$g = ["src", "alt"];
2977
2977
  function __render__$1i(_ctx, _cache) {
@@ -3048,7 +3048,7 @@ function __render__$1i(_ctx, _cache) {
3048
3048
  );
3049
3049
  }
3050
3050
  const __sfc__$1j = vue.defineComponent({
3051
- name: name$1b,
3051
+ name: name$1c,
3052
3052
  directives: { Lazy: stdin_default$5C },
3053
3053
  props: props$1b,
3054
3054
  setup(props2) {
@@ -3110,7 +3110,7 @@ const props$1a = {
3110
3110
  offset: [Number, String],
3111
3111
  vertical: Boolean
3112
3112
  };
3113
- const { name: name$1a, n: n$1h, classes: classes$13 } = createNamespace("avatar-group");
3113
+ const { name: name$1b, n: n$1h, classes: classes$13 } = createNamespace("avatar-group");
3114
3114
  function __render__$1h(_ctx, _cache) {
3115
3115
  return vue.openBlock(), vue.createElementBlock(
3116
3116
  "div",
@@ -3126,7 +3126,7 @@ function __render__$1h(_ctx, _cache) {
3126
3126
  );
3127
3127
  }
3128
3128
  const __sfc__$1i = vue.defineComponent({
3129
- name: name$1a,
3129
+ name: name$1b,
3130
3130
  props: props$1a,
3131
3131
  setup(props2) {
3132
3132
  const rootStyles = vue.computed(() => {
@@ -3164,7 +3164,7 @@ const props$19 = {
3164
3164
  description: String,
3165
3165
  loading: Boolean
3166
3166
  };
3167
- const { name: name$19, n: n$1g, classes: classes$12 } = createNamespace("loading");
3167
+ const { name: name$1a, n: n$1g, classes: classes$12 } = createNamespace("loading");
3168
3168
  const _withScopeId$6 = (n2) => (vue.pushScopeId(""), n2 = n2(), vue.popScopeId(), n2);
3169
3169
  const _hoisted_1$x = /* @__PURE__ */ _withScopeId$6(() => /* @__PURE__ */ vue.createElementVNode(
3170
3170
  "svg",
@@ -3319,7 +3319,7 @@ function __render__$1g(_ctx, _cache) {
3319
3319
  );
3320
3320
  }
3321
3321
  const __sfc__$1h = vue.defineComponent({
3322
- name: name$19,
3322
+ name: name$1a,
3323
3323
  props: props$19,
3324
3324
  setup(props2, { slots }) {
3325
3325
  const isShow = vue.computed(() => {
@@ -3421,7 +3421,7 @@ function useButtonGroup() {
3421
3421
  bindButtonGroup: bindParent
3422
3422
  };
3423
3423
  }
3424
- const { name: name$18, n: n$1f, classes: classes$11 } = createNamespace("button");
3424
+ const { name: name$19, n: n$1f, classes: classes$11 } = createNamespace("button");
3425
3425
  const _hoisted_1$w = ["type", "disabled"];
3426
3426
  function __render__$1f(_ctx, _cache) {
3427
3427
  const _component_var_loading = vue.resolveComponent("var-loading");
@@ -3487,7 +3487,7 @@ function __render__$1f(_ctx, _cache) {
3487
3487
  ]);
3488
3488
  }
3489
3489
  const __sfc__$1g = vue.defineComponent({
3490
- name: name$18,
3490
+ name: name$19,
3491
3491
  components: {
3492
3492
  VarLoading: stdin_default$5w,
3493
3493
  VarHoverOverlay: stdin_default$5P
@@ -3586,7 +3586,7 @@ const props$17 = {
3586
3586
  target: [String, Object],
3587
3587
  onClick: defineListenerProp()
3588
3588
  };
3589
- const { name: name$17, n: n$1e, classes: classes$10 } = createNamespace("back-top");
3589
+ const { name: name$18, n: n$1e, classes: classes$10 } = createNamespace("back-top");
3590
3590
  function __render__$1e(_ctx, _cache) {
3591
3591
  const _component_var_icon = vue.resolveComponent("var-icon");
3592
3592
  const _component_var_button = vue.resolveComponent("var-button");
@@ -3627,7 +3627,7 @@ function __render__$1e(_ctx, _cache) {
3627
3627
  ], 8, ["disabled"]);
3628
3628
  }
3629
3629
  const __sfc__$1f = vue.defineComponent({
3630
- name: name$17,
3630
+ name: name$18,
3631
3631
  components: {
3632
3632
  VarButton: stdin_default$5u,
3633
3633
  VarIcon: stdin_default$5R
@@ -3735,7 +3735,7 @@ var __spreadValues$n = (a, b) => {
3735
3735
  }
3736
3736
  return a;
3737
3737
  };
3738
- const { name: name$16, n: n$1d, classes: classes$$ } = createNamespace("badge");
3738
+ const { name: name$17, n: n$1d, classes: classes$$ } = createNamespace("badge");
3739
3739
  const _hoisted_1$v = { key: 0 };
3740
3740
  function __render__$1d(_ctx, _cache) {
3741
3741
  const _component_var_icon = vue.resolveComponent("var-icon");
@@ -3796,7 +3796,7 @@ function __render__$1d(_ctx, _cache) {
3796
3796
  );
3797
3797
  }
3798
3798
  const __sfc__$1e = vue.defineComponent({
3799
- name: name$16,
3799
+ name: name$17,
3800
3800
  components: { VarIcon: stdin_default$5R },
3801
3801
  inheritAttrs: false,
3802
3802
  props: props$16,
@@ -3874,7 +3874,7 @@ var __spreadValues$m = (a, b) => {
3874
3874
  }
3875
3875
  return a;
3876
3876
  };
3877
- const { name: name$15, n: n$1c, classes: classes$_ } = createNamespace("bottom-navigation");
3877
+ const { name: name$16, n: n$1c, classes: classes$_ } = createNamespace("bottom-navigation");
3878
3878
  const { n: nItem } = createNamespace("bottom-navigation-item");
3879
3879
  const RIGHT_HALF_SPACE_CLASS = nItem("--right-half-space");
3880
3880
  const LEFT_HALF_SPACE_CLASS = nItem("--left-half-space");
@@ -3937,7 +3937,7 @@ function __render__$1c(_ctx, _cache) {
3937
3937
  );
3938
3938
  }
3939
3939
  const __sfc__$1d = vue.defineComponent({
3940
- name: name$15,
3940
+ name: name$16,
3941
3941
  components: { VarButton: stdin_default$5u },
3942
3942
  props: props$15,
3943
3943
  setup(props2, { slots }) {
@@ -4101,7 +4101,7 @@ function useBottomNavigation() {
4101
4101
  bindBottomNavigation: bindParent
4102
4102
  };
4103
4103
  }
4104
- const { name: name$14, n: n$1b, classes: classes$Z } = createNamespace("bottom-navigation-item");
4104
+ const { name: name$15, n: n$1b, classes: classes$Z } = createNamespace("bottom-navigation-item");
4105
4105
  const defaultBadgeProps = {
4106
4106
  type: "danger",
4107
4107
  dot: true
@@ -4190,7 +4190,7 @@ function __render__$1b(_ctx, _cache) {
4190
4190
  ]);
4191
4191
  }
4192
4192
  const __sfc__$1c = vue.defineComponent({
4193
- name: name$14,
4193
+ name: name$15,
4194
4194
  components: {
4195
4195
  VarBadge: stdin_default$5q,
4196
4196
  VarIcon: stdin_default$5R
@@ -4260,7 +4260,7 @@ function useBreadcrumb() {
4260
4260
  bindBreadcrumb: bindParent
4261
4261
  };
4262
4262
  }
4263
- const { name: name$13, n: n$1a, classes: classes$Y } = createNamespace("breadcrumb");
4263
+ const { name: name$14, n: n$1a, classes: classes$Y } = createNamespace("breadcrumb");
4264
4264
  function __render__$1a(_ctx, _cache) {
4265
4265
  return vue.openBlock(), vue.createElementBlock(
4266
4266
  "div",
@@ -4301,7 +4301,7 @@ function __render__$1a(_ctx, _cache) {
4301
4301
  );
4302
4302
  }
4303
4303
  const __sfc__$1b = vue.defineComponent({
4304
- name: name$13,
4304
+ name: name$14,
4305
4305
  props: props$13,
4306
4306
  setup(props2) {
4307
4307
  const { index, breadcrumb, bindBreadcrumb } = useBreadcrumb();
@@ -4335,7 +4335,7 @@ const props$12 = {
4335
4335
  default: "/"
4336
4336
  }
4337
4337
  };
4338
- const { name: name$12, n: n$19 } = createNamespace("breadcrumbs");
4338
+ const { name: name$13, n: n$19 } = createNamespace("breadcrumbs");
4339
4339
  function __render__$19(_ctx, _cache) {
4340
4340
  return vue.openBlock(), vue.createElementBlock(
4341
4341
  "div",
@@ -4352,7 +4352,7 @@ function __render__$19(_ctx, _cache) {
4352
4352
  );
4353
4353
  }
4354
4354
  const __sfc__$1a = vue.defineComponent({
4355
- name: name$12,
4355
+ name: name$13,
4356
4356
  props: props$12,
4357
4357
  setup(props2) {
4358
4358
  const separator = vue.computed(() => props2.separator);
@@ -4392,7 +4392,7 @@ const props$11 = {
4392
4392
  },
4393
4393
  vertical: Boolean
4394
4394
  };
4395
- const { name: name$11, n: n$18, classes: classes$X } = createNamespace("button-group");
4395
+ const { name: name$12, n: n$18, classes: classes$X } = createNamespace("button-group");
4396
4396
  function __render__$18(_ctx, _cache) {
4397
4397
  return vue.openBlock(), vue.createElementBlock(
4398
4398
  "div",
@@ -4415,7 +4415,7 @@ function __render__$18(_ctx, _cache) {
4415
4415
  );
4416
4416
  }
4417
4417
  const __sfc__$19 = vue.defineComponent({
4418
- name: name$11,
4418
+ name: name$12,
4419
4419
  props: props$11,
4420
4420
  setup(props2) {
4421
4421
  const { bindButtons } = useButtons();
@@ -4491,7 +4491,7 @@ var __async$f = (__this, __arguments, generator) => {
4491
4491
  step((generator = generator.apply(__this, __arguments)).next());
4492
4492
  });
4493
4493
  };
4494
- const { name: name$10, n: n$17, classes: classes$W } = createNamespace("card");
4494
+ const { name: name$11, n: n$17, classes: classes$W } = createNamespace("card");
4495
4495
  const RIPPLE_DELAY = 500;
4496
4496
  const _hoisted_1$u = ["src", "alt"];
4497
4497
  function __render__$17(_ctx, _cache) {
@@ -4673,7 +4673,7 @@ function __render__$17(_ctx, _cache) {
4673
4673
  ]);
4674
4674
  }
4675
4675
  const __sfc__$18 = vue.defineComponent({
4676
- name: name$10,
4676
+ name: name$11,
4677
4677
  directives: { Ripple: stdin_default$5V },
4678
4678
  components: {
4679
4679
  VarIcon: stdin_default$5R,
@@ -4826,7 +4826,7 @@ const props$$ = {
4826
4826
  ripple: Boolean,
4827
4827
  onClick: defineListenerProp()
4828
4828
  };
4829
- const { name: name$$, n: n$16, classes: classes$V } = createNamespace("cell");
4829
+ const { name: name$10, n: n$16, classes: classes$V } = createNamespace("cell");
4830
4830
  function __render__$16(_ctx, _cache) {
4831
4831
  const _component_var_icon = vue.resolveComponent("var-icon");
4832
4832
  const _directive_ripple = vue.resolveDirective("ripple");
@@ -4909,7 +4909,7 @@ function __render__$16(_ctx, _cache) {
4909
4909
  ]);
4910
4910
  }
4911
4911
  const __sfc__$17 = vue.defineComponent({
4912
- name: name$$,
4912
+ name: name$10,
4913
4913
  components: { VarIcon: stdin_default$5R },
4914
4914
  directives: { Ripple: stdin_default$5V },
4915
4915
  props: props$$,
@@ -4951,7 +4951,7 @@ const props$_ = {
4951
4951
  default: ""
4952
4952
  }
4953
4953
  };
4954
- const { name: name$_, n: n$15 } = createNamespace("form-details");
4954
+ const { name: name$$, n: n$15 } = createNamespace("form-details");
4955
4955
  const _hoisted_1$t = { key: 0 };
4956
4956
  const _hoisted_2$e = { key: 0 };
4957
4957
  function __render__$15(_ctx, _cache) {
@@ -5028,7 +5028,7 @@ function __render__$15(_ctx, _cache) {
5028
5028
  }, 8, ["name"]);
5029
5029
  }
5030
5030
  const __sfc__$16 = vue.defineComponent({
5031
- name: name$_,
5031
+ name: name$$,
5032
5032
  props: props$_,
5033
5033
  setup: () => ({ n: n$15 })
5034
5034
  });
@@ -5132,7 +5132,7 @@ function useFormItems() {
5132
5132
  bindFormItems: bindChildren
5133
5133
  };
5134
5134
  }
5135
- const { name: name$Z, n: n$14, classes: classes$U } = createNamespace("checkbox");
5135
+ const { name: name$_, n: n$14, classes: classes$U } = createNamespace("checkbox");
5136
5136
  const _hoisted_1$s = ["tabindex"];
5137
5137
  function __render__$14(_ctx, _cache) {
5138
5138
  const _component_var_icon = vue.resolveComponent("var-icon");
@@ -5214,7 +5214,7 @@ function __render__$14(_ctx, _cache) {
5214
5214
  onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleTextClick && _ctx.handleTextClick(...args))
5215
5215
  },
5216
5216
  [
5217
- vue.renderSlot(_ctx.$slots, "default")
5217
+ vue.renderSlot(_ctx.$slots, "default", { checked: _ctx.checked })
5218
5218
  ],
5219
5219
  2
5220
5220
  /* CLASS */
@@ -5230,7 +5230,7 @@ function __render__$14(_ctx, _cache) {
5230
5230
  );
5231
5231
  }
5232
5232
  const __sfc__$15 = vue.defineComponent({
5233
- name: name$Z,
5233
+ name: name$_,
5234
5234
  directives: { Ripple: stdin_default$5V, Hover: stdin_default$5O },
5235
5235
  components: {
5236
5236
  VarIcon: stdin_default$5R,
@@ -5374,22 +5374,39 @@ withInstall(stdin_default$59);
5374
5374
  withPropsDefaultsSetter(stdin_default$59, props$Z);
5375
5375
  const _CheckboxComponent = stdin_default$59;
5376
5376
  var stdin_default$58 = stdin_default$59;
5377
+ const {
5378
+ name: name$Z
5379
+ } = createNamespace("checkbox-group-option");
5377
5380
  var stdin_default$57 = vue.defineComponent({
5378
- name: "CheckboxGroupOption",
5381
+ name: name$Z,
5379
5382
  props: {
5380
- checked: Boolean,
5381
- option: Object
5383
+ labelKey: {
5384
+ type: String,
5385
+ required: true
5386
+ },
5387
+ valueKey: {
5388
+ type: String,
5389
+ required: true
5390
+ },
5391
+ option: {
5392
+ type: Object,
5393
+ required: true
5394
+ }
5382
5395
  },
5383
5396
  setup(props2) {
5384
5397
  return () => {
5385
- if (props2.option == null) {
5386
- return;
5387
- }
5398
+ const {
5399
+ option,
5400
+ labelKey,
5401
+ valueKey
5402
+ } = props2;
5388
5403
  return vue.createVNode(stdin_default$58, {
5389
- "checkedValue": props2.option.value,
5390
- "disabled": props2.option.disabled
5404
+ "checkedValue": option[valueKey],
5405
+ "disabled": option.disabled
5391
5406
  }, {
5392
- default: () => [isFunction(props2.option.label) ? props2.option.label(props2.option, props2.checked) : props2.option.label]
5407
+ default: ({
5408
+ checked
5409
+ }) => isFunction(option[labelKey]) ? option[labelKey](option, checked) : option[labelKey]
5393
5410
  });
5394
5411
  };
5395
5412
  }
@@ -5401,6 +5418,14 @@ const props$Y = {
5401
5418
  },
5402
5419
  max: [String, Number],
5403
5420
  options: Array,
5421
+ labelKey: {
5422
+ type: String,
5423
+ default: "label"
5424
+ },
5425
+ valueKey: {
5426
+ type: String,
5427
+ default: "value"
5428
+ },
5404
5429
  direction: {
5405
5430
  type: String,
5406
5431
  default: "horizontal"
@@ -5434,10 +5459,11 @@ function __render__$13(_ctx, _cache) {
5434
5459
  { key: 0 },
5435
5460
  vue.renderList(_ctx.checkboxGroupOptions, (option) => {
5436
5461
  return vue.openBlock(), vue.createBlock(_component_checkbox_group_option, {
5437
- key: option.value.toString(),
5438
- checked: _ctx.modelValue.includes(option.value),
5462
+ key: option[_ctx.valueKey],
5463
+ "label-key": _ctx.labelKey,
5464
+ "value-key": _ctx.valueKey,
5439
5465
  option
5440
- }, null, 8, ["checked", "option"]);
5466
+ }, null, 8, ["label-key", "value-key", "option"]);
5441
5467
  }),
5442
5468
  128
5443
5469
  /* KEYED_FRAGMENT */
@@ -14718,25 +14744,27 @@ function __render__$L(_ctx, _cache) {
14718
14744
  onTouchcancel: _cache[3] || (_cache[3] = (...args) => _ctx.handleTouchend && _ctx.handleTouchend(...args))
14719
14745
  },
14720
14746
  [
14721
- vue.createElementVNode(
14722
- "div",
14723
- {
14724
- class: vue.normalizeClass(_ctx.n("header"))
14725
- },
14726
- [
14727
- vue.createElementVNode(
14728
- "div",
14729
- {
14730
- class: vue.normalizeClass(_ctx.n("header-toolbar"))
14731
- },
14732
- null,
14733
- 2
14734
- /* CLASS */
14735
- )
14736
- ],
14737
- 2
14738
- /* CLASS */
14739
- ),
14747
+ vue.renderSlot(_ctx.$slots, "header", {}, () => [
14748
+ vue.createElementVNode(
14749
+ "div",
14750
+ {
14751
+ class: vue.normalizeClass(_ctx.n("header"))
14752
+ },
14753
+ [
14754
+ vue.createElementVNode(
14755
+ "div",
14756
+ {
14757
+ class: vue.normalizeClass(_ctx.n("header-toolbar"))
14758
+ },
14759
+ null,
14760
+ 2
14761
+ /* CLASS */
14762
+ )
14763
+ ],
14764
+ 2
14765
+ /* CLASS */
14766
+ )
14767
+ ]),
14740
14768
  vue.createElementVNode(
14741
14769
  "div",
14742
14770
  {
@@ -28600,7 +28628,7 @@ withInstall(stdin_default$1);
28600
28628
  withPropsDefaultsSetter(stdin_default$1, props);
28601
28629
  const _WatermarkComponent = stdin_default$1;
28602
28630
  var stdin_default = stdin_default$1;
28603
- const version = "3.2.11";
28631
+ const version = "3.2.12";
28604
28632
  function install(app) {
28605
28633
  stdin_default$5F.install && app.use(stdin_default$5F);
28606
28634
  stdin_default$5D.install && app.use(stdin_default$5D);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "3.2.11",
3
+ "version": "3.2.12",
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": "3.2.11",
52
- "@varlet/shared": "3.2.11",
53
- "@varlet/use": "3.2.11"
51
+ "@varlet/icons": "3.2.12",
52
+ "@varlet/shared": "3.2.12",
53
+ "@varlet/use": "3.2.12"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@vue/runtime-core": "3.4.21",
@@ -66,9 +66,9 @@
66
66
  "typescript": "^5.1.5",
67
67
  "vue": "3.4.21",
68
68
  "vue-router": "4.2.0",
69
- "@varlet/ui": "3.2.11",
70
- "@varlet/touch-emulator": "3.2.11",
71
- "@varlet/cli": "3.2.11"
69
+ "@varlet/ui": "3.2.12",
70
+ "@varlet/cli": "3.2.12",
71
+ "@varlet/touch-emulator": "3.2.12"
72
72
  },
73
73
  "scripts": {
74
74
  "dev": "varlet-cli dev",
@@ -24,13 +24,17 @@ export interface CheckboxProps extends BasicAttributes {
24
24
  'onUpdate:indeterminate'?: ListenerProp<(value: boolean) => void>
25
25
  }
26
26
 
27
+ export interface CheckboxData {
28
+ checked: boolean
29
+ }
30
+
27
31
  export class Checkbox extends VarComponent {
28
32
  static setPropsDefaults: SetPropsDefaults<CheckboxProps>
29
33
 
30
34
  $props: CheckboxProps
31
35
 
32
36
  $slots: {
33
- default(): VNode[]
37
+ default(data: CheckboxData): VNode[]
34
38
  'checked-icon'(): VNode[]
35
39
  'unchecked-icon'(): VNode[]
36
40
  'indeterminate-icon'(): VNode[]
@@ -15,8 +15,10 @@ export type CheckboxGroupOptionLabelRender = (option: CheckboxGroupOption, check
15
15
 
16
16
  export interface CheckboxGroupOption {
17
17
  label?: string | VNode | CheckboxGroupOptionLabelRender
18
- disabled?: boolean
19
18
  value?: any
19
+ disabled?: boolean
20
+
21
+ [key: PropertyKey]: any
20
22
  }
21
23
 
22
24
  export { CheckboxGroupDirection }
@@ -24,6 +26,8 @@ export { CheckboxGroupDirection }
24
26
  export interface CheckboxGroupProps extends BasicAttributes {
25
27
  modelValue?: any[]
26
28
  max?: string | number
29
+ labelKey?: string
30
+ valueKey?: string
27
31
  options?: Array<CheckboxGroupOption>
28
32
  direction?: CheckboxGroupDirection
29
33
  validateTrigger?: Array<CheckboxGroupValidateTrigger>
@@ -22,6 +22,8 @@ export class FloatingPanel extends VarComponent {
22
22
 
23
23
  $slots: {
24
24
  default(): VNode[]
25
+
26
+ header(): VNode[]
25
27
  }
26
28
  }
27
29