@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/es/chip/Chip.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import VarIcon from "../icon/index.mjs";
2
2
  import { defineComponent, computed } from "vue";
3
3
  import { props } from "./props.mjs";
4
- import { createNamespace } from "../utils/components.mjs";
4
+ import { createNamespace, formatElevation } from "../utils/components.mjs";
5
5
  import { call } from "@varlet/shared";
6
6
  const { name, n, classes } = createNamespace("chip");
7
7
  import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, mergeProps as _mergeProps, Transition as _Transition, withCtx as _withCtx, createBlock as _createBlock } from "vue";
@@ -14,7 +14,7 @@ function __render__(_ctx, _cache) {
14
14
  _createElementVNode(
15
15
  "span",
16
16
  _mergeProps({
17
- class: _ctx.classes(_ctx.n(), _ctx.n("$--box"), ..._ctx.contentClass),
17
+ class: _ctx.classes(_ctx.n(), _ctx.n("$--box"), _ctx.formatElevation(_ctx.elevation, 1), ..._ctx.contentClass),
18
18
  style: _ctx.chipStyle
19
19
  }, _ctx.$attrs),
20
20
  [
@@ -92,6 +92,7 @@ const __sfc__ = defineComponent({
92
92
  contentClass,
93
93
  n,
94
94
  classes,
95
+ formatElevation,
95
96
  handleClose
96
97
  };
97
98
  }
package/es/chip/props.mjs CHANGED
@@ -18,6 +18,10 @@ const props = {
18
18
  type: Boolean,
19
19
  default: true
20
20
  },
21
+ elevation: {
22
+ type: [Boolean, Number, String],
23
+ default: false
24
+ },
21
25
  block: Boolean,
22
26
  closeable: Boolean,
23
27
  onClose: defineListenerProp()
@@ -1,4 +1,5 @@
1
1
  import '../../styles/common.css'
2
+ import '../../styles/elevation.css'
2
3
  import '../../icon/icon.css'
3
4
  import '../chip.css'
4
5
  import '../ChipSfc.css'
@@ -31,6 +31,7 @@ import { toNumber } from "@varlet/shared";
31
31
  import { createNamespace } from "../../utils/components.mjs";
32
32
  import { t } from "../../locale/index.mjs";
33
33
  import { onSmartMounted } from "@varlet/use";
34
+ import { injectLocaleProvider } from "../../locale-provider/provide.mjs";
34
35
  dayjs.extend(isSameOrBefore);
35
36
  dayjs.extend(isSameOrAfter);
36
37
  const { n, classes } = createNamespace("day-picker");
@@ -181,6 +182,7 @@ const __sfc__ = defineComponent({
181
182
  left: false,
182
183
  right: false
183
184
  });
185
+ const { t: pt } = injectLocaleProvider();
184
186
  const isCurrent = computed(
185
187
  () => props.preview.previewYear === currentYear && props.preview.previewMonth === currentMonth
186
188
  );
@@ -196,7 +198,7 @@ const __sfc__ = defineComponent({
196
198
  });
197
199
  const getDayAbbr = (key) => {
198
200
  var _a, _b;
199
- return (_b = (_a = t("datePickerWeekDict")) == null ? void 0 : _a[key].abbr) != null ? _b : "";
201
+ return (_b = (_a = (pt || t)("datePickerWeekDict")) == null ? void 0 : _a[key].abbr) != null ? _b : "";
200
202
  };
201
203
  const filterDay = (day) => day > 0 ? day : "";
202
204
  const initDate = () => {
@@ -24,6 +24,7 @@ import VarButton from "../../button/index.mjs";
24
24
  import { toNumber } from "@varlet/shared";
25
25
  import { createNamespace } from "../../utils/components.mjs";
26
26
  import { t } from "../../locale/index.mjs";
27
+ import { injectLocaleProvider } from "../../locale-provider/provide.mjs";
27
28
  dayjs.extend(isSameOrBefore);
28
29
  dayjs.extend(isSameOrAfter);
29
30
  const { n, classes } = createNamespace("month-picker");
@@ -137,11 +138,12 @@ const __sfc__ = defineComponent({
137
138
  left: false,
138
139
  right: false
139
140
  });
141
+ const { t: pt } = injectLocaleProvider();
140
142
  const isSameYear = computed(() => props.choose.chooseYear === props.preview.previewYear);
141
143
  const isCurrentYear = computed(() => props.preview.previewYear === currentYear);
142
144
  const getMonthAbbr = (key) => {
143
145
  var _a, _b;
144
- return (_b = (_a = t("datePickerMonthDict")) == null ? void 0 : _a[key].abbr) != null ? _b : "";
146
+ return (_b = (_a = (pt || t)("datePickerMonthDict")) == null ? void 0 : _a[key].abbr) != null ? _b : "";
145
147
  };
146
148
  const inRange = (key) => {
147
149
  const {
@@ -265,7 +265,7 @@ import './tooltip/style/index.mjs'
265
265
  import './uploader/style/index.mjs'
266
266
  import './watermark/style/index.mjs'
267
267
 
268
- const version = '3.2.15-alpha.1718198392925'
268
+ const version = '3.3.0'
269
269
 
270
270
  function install(app) {
271
271
  ActionSheet.install && app.use(ActionSheet)
package/es/index.mjs CHANGED
@@ -176,7 +176,7 @@ export * from './tooltip/index.mjs'
176
176
  export * from './uploader/index.mjs'
177
177
  export * from './watermark/index.mjs'
178
178
 
179
- const version = '3.2.15-alpha.1718198392925'
179
+ const version = '3.3.0'
180
180
 
181
181
  function install(app) {
182
182
  ActionSheet.install && app.use(ActionSheet)
@@ -62,7 +62,7 @@ function __render__(_ctx, _cache) {
62
62
  focusing: _ctx.isFocusing && !_ctx.disabled
63
63
  }, null, 8, ["hovering", "focusing"])
64
64
  ], 42, _hoisted_1)), [
65
- [_directive_ripple, { disabled: _ctx.disabled }],
65
+ [_directive_ripple, { disabled: _ctx.disabled || !_ctx.ripple }],
66
66
  [_directive_hover, _ctx.handleHovering, "desktop"]
67
67
  ]);
68
68
  }
@@ -1,7 +1,11 @@
1
1
  const props = {
2
2
  label: {},
3
3
  value: {},
4
- disabled: Boolean
4
+ disabled: Boolean,
5
+ ripple: {
6
+ type: Boolean,
7
+ default: true
8
+ }
5
9
  };
6
10
  export {
7
11
  props
@@ -51,7 +51,7 @@ function __render__(_ctx, _cache) {
51
51
  }, ["stop"])),
52
52
  onChange: _ctx.handleSelect
53
53
  }, null, 8, ["modelValue", "checked-color", "disabled", "onChange"])) : _createCommentVNode("v-if", true),
54
- _renderSlot(_ctx.$slots, "default", {}, () => [
54
+ _renderSlot(_ctx.$slots, "default", { selected: _ctx.optionSelected }, () => [
55
55
  _createElementVNode(
56
56
  "div",
57
57
  {
@@ -1,6 +1,6 @@
1
1
  import '../../styles/common.css'
2
2
  import '../../ripple/ripple.css'
3
+ import '../../hover-overlay/hoverOverlay.css'
3
4
  import '../../checkbox/checkbox.css'
4
- import '../../select/select.css'
5
5
  import '../option.css'
6
6
  import '../OptionSfc.css'
@@ -1,7 +1,7 @@
1
1
  import '../../styles/common.css'
2
- import '../SnackbarSfc.css'
3
2
  import '../../styles/elevation.css'
4
3
  import '../../loading/loading.css'
5
4
  import '../../icon/icon.css'
6
5
  import '../snackbar.css'
7
6
  import '../coreSfc.css'
7
+ import '../SnackbarSfc.css'