@varlet/ui 3.2.15-alpha.1718198392925 → 3.3.0

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
@@ -5665,6 +5665,10 @@ const props$Y = {
5665
5665
  type: Boolean,
5666
5666
  default: true
5667
5667
  },
5668
+ elevation: {
5669
+ type: [Boolean, Number, String],
5670
+ default: false
5671
+ },
5668
5672
  block: Boolean,
5669
5673
  closeable: Boolean,
5670
5674
  onClose: defineListenerProp()
@@ -5679,7 +5683,7 @@ function __render__$12(_ctx, _cache) {
5679
5683
  vue.createElementVNode(
5680
5684
  "span",
5681
5685
  vue.mergeProps({
5682
- class: _ctx.classes(_ctx.n(), _ctx.n("$--box"), ..._ctx.contentClass),
5686
+ class: _ctx.classes(_ctx.n(), _ctx.n("$--box"), _ctx.formatElevation(_ctx.elevation, 1), ..._ctx.contentClass),
5683
5687
  style: _ctx.chipStyle
5684
5688
  }, _ctx.$attrs),
5685
5689
  [
@@ -5757,6 +5761,7 @@ const __sfc__$14 = vue.defineComponent({
5757
5761
  contentClass,
5758
5762
  n: n$13,
5759
5763
  classes: classes$S,
5764
+ formatElevation,
5760
5765
  handleClose
5761
5766
  };
5762
5767
  }
@@ -9952,11 +9957,12 @@ const __sfc__$Y = vue.defineComponent({
9952
9957
  left: false,
9953
9958
  right: false
9954
9959
  });
9960
+ const { t: pt } = injectLocaleProvider();
9955
9961
  const isSameYear = vue.computed(() => props2.choose.chooseYear === props2.preview.previewYear);
9956
9962
  const isCurrentYear = vue.computed(() => props2.preview.previewYear === currentYear);
9957
9963
  const getMonthAbbr = (key) => {
9958
9964
  var _a, _b;
9959
- return (_b = (_a = t("datePickerMonthDict")) == null ? void 0 : _a[key].abbr) != null ? _b : "";
9965
+ return (_b = (_a = (pt || t)("datePickerMonthDict")) == null ? void 0 : _a[key].abbr) != null ? _b : "";
9960
9966
  };
9961
9967
  const inRange = (key) => {
9962
9968
  const {
@@ -10719,6 +10725,7 @@ const __sfc__$V = vue.defineComponent({
10719
10725
  left: false,
10720
10726
  right: false
10721
10727
  });
10728
+ const { t: pt } = injectLocaleProvider();
10722
10729
  const isCurrent = vue.computed(
10723
10730
  () => props2.preview.previewYear === currentYear && props2.preview.previewMonth === currentMonth
10724
10731
  );
@@ -10734,7 +10741,7 @@ const __sfc__$V = vue.defineComponent({
10734
10741
  });
10735
10742
  const getDayAbbr = (key) => {
10736
10743
  var _a, _b;
10737
- return (_b = (_a = t("datePickerWeekDict")) == null ? void 0 : _a[key].abbr) != null ? _b : "";
10744
+ return (_b = (_a = (pt || t)("datePickerWeekDict")) == null ? void 0 : _a[key].abbr) != null ? _b : "";
10738
10745
  };
10739
10746
  const filterDay = (day) => day > 0 ? day : "";
10740
10747
  const initDate = () => {
@@ -17791,7 +17798,11 @@ function useMenuSelect() {
17791
17798
  const props$u = {
17792
17799
  label: {},
17793
17800
  value: {},
17794
- disabled: Boolean
17801
+ disabled: Boolean,
17802
+ ripple: {
17803
+ type: Boolean,
17804
+ default: true
17805
+ }
17795
17806
  };
17796
17807
  const { name: name$v, n: n$x, classes: classes$r } = createNamespace("menu-option");
17797
17808
  const _hoisted_1$h = ["tabindex"];
@@ -17845,7 +17856,7 @@ function __render__$z(_ctx, _cache) {
17845
17856
  focusing: _ctx.isFocusing && !_ctx.disabled
17846
17857
  }, null, 8, ["hovering", "focusing"])
17847
17858
  ], 42, _hoisted_1$h)), [
17848
- [_directive_ripple, { disabled: _ctx.disabled }],
17859
+ [_directive_ripple, { disabled: _ctx.disabled || !_ctx.ripple }],
17849
17860
  [_directive_hover, _ctx.handleHovering, "desktop"]
17850
17861
  ]);
17851
17862
  }
@@ -18241,7 +18252,7 @@ function __render__$x(_ctx, _cache) {
18241
18252
  }, ["stop"])),
18242
18253
  onChange: _ctx.handleSelect
18243
18254
  }, null, 8, ["modelValue", "checked-color", "disabled", "onChange"])) : vue.createCommentVNode("v-if", true),
18244
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
18255
+ vue.renderSlot(_ctx.$slots, "default", { selected: _ctx.optionSelected }, () => [
18245
18256
  vue.createElementVNode(
18246
18257
  "div",
18247
18258
  {
@@ -28889,7 +28900,7 @@ withInstall(stdin_default$1);
28889
28900
  withPropsDefaultsSetter(stdin_default$1, props);
28890
28901
  const _WatermarkComponent = stdin_default$1;
28891
28902
  var stdin_default = stdin_default$1;
28892
- const version = "3.2.15-alpha.1718198392925";
28903
+ const version = "3.3.0";
28893
28904
  function install(app) {
28894
28905
  stdin_default$5I.install && app.use(stdin_default$5I);
28895
28906
  stdin_default$5G.install && app.use(stdin_default$5G);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "3.2.15-alpha.1718198392925",
3
+ "version": "3.3.0",
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.15-alpha.1718198392925",
52
- "@varlet/shared": "3.2.15-alpha.1718198392925",
53
- "@varlet/use": "3.2.15-alpha.1718198392925"
51
+ "@varlet/icons": "3.3.0",
52
+ "@varlet/shared": "3.3.0",
53
+ "@varlet/use": "3.3.0"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@vue/runtime-core": "3.4.21",
@@ -64,9 +64,9 @@
64
64
  "typescript": "^5.1.5",
65
65
  "vue": "3.4.21",
66
66
  "vue-router": "4.2.0",
67
- "@varlet/cli": "3.2.15-alpha.1718198392925",
68
- "@varlet/touch-emulator": "3.2.15-alpha.1718198392925",
69
- "@varlet/ui": "3.2.15-alpha.1718198392925"
67
+ "@varlet/cli": "3.3.0",
68
+ "@varlet/ui": "3.3.0",
69
+ "@varlet/touch-emulator": "3.3.0"
70
70
  },
71
71
  "scripts": {
72
72
  "dev": "varlet-cli dev",
package/types/chip.d.ts CHANGED
@@ -21,6 +21,7 @@ export interface ChipProps extends BasicAttributes {
21
21
  namespace?: string
22
22
  plain?: boolean
23
23
  round?: boolean
24
+ elevation?: boolean | number | string
24
25
  block?: boolean
25
26
  closeable?: boolean
26
27
  onClose?: ListenerProp<(e: Event) => void>
@@ -7,6 +7,7 @@ export interface MenuOptionProps extends BasicAttributes {
7
7
  label?: any
8
8
  value?: any
9
9
  disabled?: boolean
10
+ ripple?: boolean
10
11
  }
11
12
 
12
13
  export class MenuOption extends VarComponent {
package/types/option.d.ts CHANGED
@@ -9,13 +9,17 @@ export interface OptionProps extends BasicAttributes {
9
9
  disabled?: boolean
10
10
  }
11
11
 
12
+ export interface OptionData {
13
+ selected: boolean
14
+ }
15
+
12
16
  export class Option extends VarComponent {
13
17
  static setPropsDefaults: SetPropsDefaults<OptionProps>
14
18
 
15
19
  $props: OptionProps
16
20
 
17
21
  $slots: {
18
- default(): VNode[]
22
+ default(data: OptionData): VNode[]
19
23
  }
20
24
  }
21
25