@varlet/ui 3.1.0-alpha.1710070004473 → 3.1.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.
@@ -3,5 +3,5 @@ import '../../icon/icon.css'
3
3
  import '../../ripple/ripple.css'
4
4
  import '../../popup/popup.css'
5
5
  import '../actionSheet.css'
6
- import '../ActionSheetSfc.css'
7
6
  import '../ActionItemSfc.css'
7
+ import '../ActionSheetSfc.css'
@@ -6,7 +6,7 @@ import { computed, defineComponent, ref } from "vue";
6
6
  import { props } from "./props.mjs";
7
7
  import { createNamespace, formatElevation } from "../utils/components.mjs";
8
8
  import { useButtonGroup } from "./provide.mjs";
9
- import { isArray, call } from "@varlet/shared";
9
+ import { call, normalizeToArray } from "@varlet/shared";
10
10
  const { name, n, classes } = createNamespace("button");
11
11
  import { resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, createElementVNode as _createElementVNode, createVNode as _createVNode, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, createElementBlock as _createElementBlock, withDirectives as _withDirectives, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
12
12
  const _withScopeId = (n2) => (_pushScopeId(""), n2 = n2(), _popScopeId(), n2);
@@ -88,11 +88,12 @@ const __sfc__ = defineComponent({
88
88
  const { buttonGroup } = useButtonGroup();
89
89
  const { hovering, handleHovering } = useHoverOverlay();
90
90
  const states = computed(() => {
91
+ var _a, _b, _c, _d, _e, _f;
91
92
  if (!buttonGroup) {
92
93
  return {
93
94
  elevation: formatElevation(props2.elevation, 2),
94
- type: props2.type != null ? props2.type : "default",
95
- size: props2.size != null ? props2.size : "normal",
95
+ type: (_a = props2.type) != null ? _a : "default",
96
+ size: (_b = props2.size) != null ? _b : "normal",
96
97
  color: props2.color,
97
98
  text: props2.text,
98
99
  textColor: props2.textColor,
@@ -103,10 +104,10 @@ const __sfc__ = defineComponent({
103
104
  const { type, size, color, textColor, mode } = buttonGroup;
104
105
  return {
105
106
  elevation: "",
106
- type: props2.type != null ? props2.type : type.value,
107
- size: props2.size != null ? props2.size : size.value,
108
- color: props2.color != null ? props2.color : color.value,
109
- textColor: props2.textColor != null ? props2.textColor : textColor.value,
107
+ type: (_c = props2.type) != null ? _c : type.value,
108
+ size: (_d = props2.size) != null ? _d : size.value,
109
+ color: (_e = props2.color) != null ? _e : color.value,
110
+ textColor: (_f = props2.textColor) != null ? _f : textColor.value,
110
111
  text: mode.value === "text" || mode.value === "outline",
111
112
  outline: mode.value === "outline",
112
113
  iconContainer: mode.value === "icon-container"
@@ -115,8 +116,7 @@ const __sfc__ = defineComponent({
115
116
  function attemptAutoLoading(result) {
116
117
  if (props2.autoLoading) {
117
118
  pending.value = true;
118
- result = isArray(result) ? result : [result];
119
- Promise.all(result).then(() => {
119
+ Promise.all(normalizeToArray(result)).then(() => {
120
120
  pending.value = false;
121
121
  }).catch(() => {
122
122
  pending.value = false;
@@ -262,7 +262,7 @@ import './tooltip/style/index.mjs'
262
262
  import './uploader/style/index.mjs'
263
263
  import './watermark/style/index.mjs'
264
264
 
265
- const version = '3.1.0-alpha.1710070004473'
265
+ const version = '3.1.0'
266
266
 
267
267
  function install(app) {
268
268
  ActionSheet.install && app.use(ActionSheet)
package/es/index.mjs CHANGED
@@ -174,7 +174,7 @@ export * from './tooltip/index.mjs'
174
174
  export * from './uploader/index.mjs'
175
175
  export * from './watermark/index.mjs'
176
176
 
177
- const version = '3.1.0-alpha.1710070004473'
177
+ const version = '3.1.0'
178
178
 
179
179
  function install(app) {
180
180
  ActionSheet.install && app.use(ActionSheet)
@@ -34,10 +34,8 @@ function useSelectController(options) {
34
34
  return (_a = option == null ? void 0 : option.label.value) != null ? _a : "";
35
35
  }
36
36
  function findValueOrLabel({ value, label: label2 }) {
37
- if (value.value != null) {
38
- return value.value;
39
- }
40
- return label2.value;
37
+ var _a;
38
+ return (_a = value.value) != null ? _a : label2.value;
41
39
  }
42
40
  function getSelectedValue(option) {
43
41
  const multiple = multipleGetter();