@varlet/ui 2.13.0 → 2.13.1-alpha.1689610161691

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.
@@ -244,7 +244,7 @@ import './time-picker/style/index.mjs'
244
244
  import './tooltip/style/index.mjs'
245
245
  import './uploader/style/index.mjs'
246
246
 
247
- const version = '2.13.0'
247
+ const version = '2.13.1-alpha.1689610161691'
248
248
 
249
249
  function install(app) {
250
250
  ActionSheet.install && app.use(ActionSheet)
package/es/index.mjs CHANGED
@@ -162,7 +162,7 @@ export * from './time-picker/index.mjs'
162
162
  export * from './tooltip/index.mjs'
163
163
  export * from './uploader/index.mjs'
164
164
 
165
- const version = '2.13.0'
165
+ const version = '2.13.1-alpha.1689610161691'
166
166
 
167
167
  function install(app) {
168
168
  ActionSheet.install && app.use(ActionSheet)
package/es/menu/Menu.mjs CHANGED
@@ -35,7 +35,7 @@ function __render__(_ctx, _cache) {
35
35
  zIndex: _ctx.zIndex,
36
36
  width: _ctx.sameWidth ? _ctx.toSizeUnit(Math.ceil(_ctx.hostSize.width)) : undefined
37
37
  }),
38
- class: _normalizeClass(_ctx.classes(_ctx.n('menu'), _ctx.n('$--box'), [_ctx.defaultStyle, _ctx.n('--menu-background-color')], [_ctx.defaultStyle, _ctx.formatElevation(_ctx.elevation, 3)])),
38
+ class: _normalizeClass(_ctx.classes(_ctx.n('menu'), _ctx.n('$--box'), _ctx.popoverClass, [_ctx.defaultStyle, _ctx.n('--menu-background-color')], [_ctx.defaultStyle, _ctx.formatElevation(_ctx.elevation, 3)])),
39
39
  onClick: _cache[0] || (_cache[0] = _withModifiers(() => {}, ["stop"])),
40
40
  onMouseenter: _cache[1] || (_cache[1] = function () {
41
41
  return _ctx.handlePopoverMouseenter && _ctx.handlePopoverMouseenter(...arguments);
package/es/menu/props.mjs CHANGED
@@ -51,6 +51,9 @@ export var props = {
51
51
  type: Boolean,
52
52
  default: true
53
53
  },
54
+ popoverClass: {
55
+ type: String
56
+ },
54
57
  closeOnClickReference: {
55
58
  type: Boolean,
56
59
  default: false
@@ -62,7 +62,9 @@ var __sfc__ = defineComponent({
62
62
  computeLabel
63
63
  } = select;
64
64
  var handleClick = () => {
65
- optionSelected.value = !optionSelected.value;
65
+ if (multiple.value) {
66
+ optionSelected.value = !optionSelected.value;
67
+ }
66
68
  onSelect(optionProvider);
67
69
  };
68
70
  var handleSelect = () => onSelect(optionProvider);
@@ -38,6 +38,7 @@ function __render__(_ctx, _cache) {
38
38
  show: _ctx.showMenu,
39
39
  "onUpdate:show": _cache[1] || (_cache[1] = $event => _ctx.showMenu = $event),
40
40
  class: _normalizeClass(_ctx.n('menu')),
41
+ "popover-class": _ctx.variant === 'standard' && _ctx.hint ? _ctx.n('--menu-margin') : undefined,
41
42
  "offset-y": _ctx.offsetY,
42
43
  disabled: _ctx.formReadonly || _ctx.readonly || _ctx.formDisabled || _ctx.disabled,
43
44
  placement: _ctx.placement,
@@ -46,7 +47,7 @@ function __render__(_ctx, _cache) {
46
47
  }, {
47
48
  menu: _withCtx(() => [_createElementVNode("div", {
48
49
  ref: "menuEl",
49
- class: _normalizeClass(_ctx.classes(_ctx.n('scroller'), _ctx.n("--scroller-" + _ctx.variant), _ctx.n('$-elevation--3'), [!_ctx.hint, _ctx.n('--scroller-non-hint')]))
50
+ class: _normalizeClass(_ctx.classes(_ctx.n('scroller'), _ctx.n('$-elevation--3')))
50
51
  }, [_renderSlot(_ctx.$slots, "default")], 2 /* CLASS */)]),
51
52
 
52
53
  default: _withCtx(() => [_createVNode(_component_var_field_decorator, _normalizeProps(_guardReactiveProps({
@@ -102,7 +103,7 @@ function __render__(_ctx, _cache) {
102
103
  }), 128 /* KEYED_FRAGMENT */))], 2 /* CLASS */)) : (_openBlock(), _createElementBlock("div", {
103
104
  key: 1,
104
105
  class: _normalizeClass(_ctx.n('values'))
105
- }, _toDisplayString(_ctx.labels.join(_ctx.separator)), 3 /* TEXT, CLASS */))], 64 /* STABLE_FRAGMENT */)) : (_openBlock(), _createElementBlock("span", _hoisted_1, _toDisplayString(_ctx.label), 1 /* TEXT */))]) : _createCommentVNode("v-if", true)], 2 /* CLASS */), _ctx.useCustomPlaceholder ? (_openBlock(), _createElementBlock("span", {
106
+ }, _toDisplayString(_ctx.labels.join(_ctx.separator)), 3 /* TEXT, CLASS */))], 64 /* STABLE_FRAGMENT */)) : (_openBlock(), _createElementBlock("span", _hoisted_1, _toDisplayString(_ctx.label), 1 /* TEXT */))]) : _createCommentVNode("v-if", true)], 2 /* CLASS */), _ctx.enableCustomPlaceholder ? (_openBlock(), _createElementBlock("span", {
106
107
  key: 0,
107
108
  class: _normalizeClass(_ctx.classes(_ctx.n('placeholder'), _ctx.n('$--ellipsis'))),
108
109
  style: _normalizeStyle({
@@ -125,7 +126,7 @@ function __render__(_ctx, _cache) {
125
126
  } : undefined]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */)]),
126
127
 
127
128
  _: 3 /* FORWARDED */
128
- }, 8 /* PROPS */, ["show", "class", "offset-y", "disabled", "placement", "onClickOutside"]), _createVNode(_component_var_form_details, {
129
+ }, 8 /* PROPS */, ["show", "class", "popover-class", "offset-y", "disabled", "placement", "onClickOutside"]), _createVNode(_component_var_form_details, {
129
130
  "error-message": _ctx.errorMessage,
130
131
  onClick: _cache[2] || (_cache[2] = _withModifiers(() => {}, ["stop"]))
131
132
  }, null, 8 /* PROPS */, ["error-message"])], 2 /* CLASS */);
@@ -186,7 +187,7 @@ var __sfc__ = defineComponent({
186
187
  }
187
188
  return blurColor || 'var(--field-decorator-blur-color)';
188
189
  });
189
- var useCustomPlaceholder = computed(() => !props.hint && isEmpty(props.modelValue) && !isFocus.value);
190
+ var enableCustomPlaceholder = computed(() => !props.hint && isEmpty(props.modelValue));
190
191
  var computeLabel = () => {
191
192
  var {
192
193
  multiple,
@@ -416,7 +417,7 @@ var __sfc__ = defineComponent({
416
417
  placement,
417
418
  cursor,
418
419
  placeholderColor,
419
- useCustomPlaceholder,
420
+ enableCustomPlaceholder,
420
421
  n,
421
422
  classes,
422
423
  handleFocus,
@@ -1 +1 @@
1
- :root { --select-scroller-background: #fff; --select-scroller-padding: 6px 0; --select-scroller-max-height: 278px; --select-scroller-border-radius: 2px; --select-chip-margin: 5px 5px 0; --select-arrow-size: 20px; --select-standard-scroller-margin: calc(var(--field-decorator-placeholder-size) * 0.75 + 12px) 0 0 0; --select-outlined-scroller-margin: 0; --select-label-font-size: 16px;}.var-select__menu[var-select-cover] { width: 100%; background: transparent; display: block;}.var-select__chip[var-select-cover] { margin: var(--select-chip-margin);}.var-select__scroller { max-height: var(--select-scroller-max-height); background: var(--select-scroller-background); padding: var(--select-scroller-padding); overflow-y: auto; transition: background-color 0.25s; border-radius: var(--select-scroller-border-radius);}.var-select__wrap { position: relative; display: flex; flex-direction: column; width: 100%;}.var-select__select { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 24px; outline: none; border: none; font-size: inherit; color: var(--field-decorator-text-color); word-break: break-all; overflow-x: hidden; transition: color 0.25s;}.var-select__label { display: flex; align-items: center; font-size: var(--select-label-font-size);}.var-select__placeholder { max-width: 100%; position: absolute; top: 50%; left: 0; transform: translateY(-50%); font-size: var(--field-decorator-placeholder-size); line-height: 1.5em; color: var(--field-decorator-blur-color); pointer-events: none; cursor: inherit;}.var-select__arrow[var-select-cover] { flex-shrink: 0; font-size: var(--select-arrow-size);}.var-select--scroller-standard { margin: var(--select-standard-scroller-margin);}.var-select--scroller-outlined { margin: 0;}.var-select--scroller-non-hint { margin: 0;}.var-select--disabled { color: var(--field-decorator-disabled-color); cursor: not-allowed;}.var-select--error { color: var(--field-decorator-error-color);}.var-select--arrow-rotate { transform: rotate(180deg);}
1
+ :root { --select-scroller-background: #fff; --select-scroller-padding: 6px 0; --select-scroller-max-height: 278px; --select-scroller-border-radius: 2px; --select-chip-margin: 5px 5px 0; --select-arrow-size: 20px; --select-standard-menu-margin: calc(var(--field-decorator-placeholder-size) * 0.75 + 12px) 0 0 0; --select-label-font-size: 16px;}.var-select__menu[var-select-cover] { width: 100%; background: transparent; display: block;}.var-select__chip[var-select-cover] { margin: var(--select-chip-margin);}.var-select__scroller { max-height: var(--select-scroller-max-height); background: var(--select-scroller-background); padding: var(--select-scroller-padding); overflow-y: auto; transition: background-color 0.25s; border-radius: var(--select-scroller-border-radius);}.var-select__wrap { position: relative; display: flex; flex-direction: column; width: 100%;}.var-select__select { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 24px; outline: none; border: none; font-size: inherit; color: var(--field-decorator-text-color); word-break: break-all; overflow-x: hidden; transition: color 0.25s;}.var-select__label { display: flex; align-items: center; font-size: var(--select-label-font-size);}.var-select__placeholder { max-width: 100%; position: absolute; top: 50%; left: 0; transform: translateY(-50%); font-size: var(--field-decorator-placeholder-size); line-height: 1.5em; color: var(--field-decorator-blur-color); pointer-events: none; cursor: inherit;}.var-select__arrow[var-select-cover] { flex-shrink: 0; font-size: var(--select-arrow-size);}.var-select--standard-menu-margin { margin: var(--select-menu-margin) !important;}.var-select--disabled { color: var(--field-decorator-disabled-color); cursor: not-allowed;}.var-select--error { color: var(--field-decorator-error-color);}.var-select--arrow-rotate { transform: rotate(180deg);}