wave-ui 3.4.7 → 3.5.1

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.
@@ -1369,6 +1369,9 @@ function bt(e, t, l, a, r, i) {
1369
1369
  ]),
1370
1370
  _: 3
1371
1371
  }, 16)) : (s(), m(o, ie(C({ key: 1 }, i.buttonProps)), {
1372
+ loading: g(() => [
1373
+ p(e.$slots, "loading")
1374
+ ]),
1372
1375
  default: g(() => [
1373
1376
  p(e.$slots, "default")
1374
1377
  ]),
@@ -1556,7 +1559,7 @@ const _t = {
1556
1559
  Vt
1557
1560
  ], Rt = ["for"], Tt = ["for", "innerHTML"];
1558
1561
  function Lt(e, t, l, a, r, i) {
1559
- return s(), m(V(e.formRegister && !i.wCheckboxes ? "w-form-element" : "div"), C({ ref: "formEl" }, e.formRegister && { validators: e.validators, inputValue: r.isChecked, disabled: e.isDisabled }, {
1562
+ return s(), m(V(e.formRegister && !i.wCheckboxes ? "w-form-element" : "div"), C({ ref: "formEl" }, e.formRegister && { validators: e.validators, inputValue: r.isChecked, disabled: e.isDisabled, readonly: e.isReadonly }, {
1560
1563
  valid: e.valid,
1561
1564
  "onUpdate:valid": t[5] || (t[5] = (o) => e.valid = o),
1562
1565
  onReset: t[6] || (t[6] = (o) => {
@@ -1571,7 +1574,7 @@ function Lt(e, t, l, a, r, i) {
1571
1574
  type: "checkbox",
1572
1575
  name: e.inputName,
1573
1576
  checked: r.isChecked || null,
1574
- disabled: e.isDisabled || null,
1577
+ disabled: e.isDisabled || e.isReadonly || null,
1575
1578
  required: e.required || null,
1576
1579
  tabindex: e.tabindex || null,
1577
1580
  onFocus: t[0] || (t[0] = (o) => e.$emit("focus", o)),
@@ -1661,6 +1664,7 @@ const xt = {
1661
1664
  return {
1662
1665
  [`w-checkbox w-checkbox--${this.isChecked ? "checked" : "unchecked"}`]: !0,
1663
1666
  "w-checkbox--disabled": this.isDisabled,
1667
+ "w-checkbox--readonly": this.isReadonly,
1664
1668
  "w-checkbox--indeterminate": this.indeterminate,
1665
1669
  "w-checkbox--ripple": this.ripple.start,
1666
1670
  "w-checkbox--rippled": this.ripple.end,
@@ -4143,7 +4147,7 @@ const J = 40, ei = J / 2, ti = Math.round(J * 3.14 * 100) / 100, li = {
4143
4147
  }
4144
4148
  }, ii = /* @__PURE__ */ v(li, [["render", Zl]]), si = ["id", "name", "checked", "disabled", "required", "tabindex", "aria-checked"], ai = ["for"], oi = ["for", "innerHTML"], ni = ["for"], ri = ["for", "innerHTML"];
4145
4149
  function di(e, t, l, a, r, i) {
4146
- return s(), m(V(e.formRegister && !i.wRadios ? "w-form-element" : "div"), C({ ref: "formEl" }, e.formRegister && { validators: e.validators, inputValue: e.inputValue, disabled: e.isDisabled }, {
4150
+ return s(), m(V(e.formRegister && !i.wRadios ? "w-form-element" : "div"), C({ ref: "formEl" }, e.formRegister && { validators: e.validators, inputValue: e.inputValue, disabled: e.isDisabled, readonly: e.isReadonly }, {
4147
4151
  valid: e.valid,
4148
4152
  "onUpdate:valid": t[3] || (t[3] = (o) => e.valid = o),
4149
4153
  onReset: t[4] || (t[4] = (o) => {
@@ -4158,7 +4162,7 @@ function di(e, t, l, a, r, i) {
4158
4162
  type: "radio",
4159
4163
  name: e.inputName,
4160
4164
  checked: e.inputValue || null,
4161
- disabled: e.isDisabled || null,
4165
+ disabled: e.isDisabled || e.isReadonly || null,
4162
4166
  required: e.required || null,
4163
4167
  tabindex: e.tabindex || null,
4164
4168
  onFocus: t[0] || (t[0] = (o) => e.$emit("focus", o)),
@@ -4240,6 +4244,7 @@ const ui = {
4240
4244
  return {
4241
4245
  [`w-radio w-radio--${this.inputValue ? "checked" : "unchecked"}`]: !0,
4242
4246
  "w-radio--disabled": this.isDisabled,
4247
+ "w-radio--readonly": this.isReadonly,
4243
4248
  "w-radio--ripple": this.ripple.start,
4244
4249
  "w-radio--rippled": this.ripple.end,
4245
4250
  "w-radio--dark": this.ripple.dark,
@@ -4746,7 +4751,7 @@ function xi(e, t, l, a, r, i) {
4746
4751
  "onUpdate:modelValue": i.onInput,
4747
4752
  onItemClick: t[6] || (t[6] = (h) => e.$emit("item-click", h)),
4748
4753
  onItemSelect: i.onListItemSelect,
4749
- "onKeydown:enter": t[7] || (t[7] = (h) => l.noUnselect && !l.multiple && i.closeMenu("la3")),
4754
+ "onKeydown:enter": t[7] || (t[7] = (h) => l.noUnselect && !l.multiple && i.closeMenu()),
4750
4755
  "onKeydown:escape": t[8] || (t[8] = (h) => e.showMenu && (this.showMenu = !1)),
4751
4756
  items: i.selectItems,
4752
4757
  multiple: l.multiple,
@@ -4904,8 +4909,8 @@ const Pi = {
4904
4909
  },
4905
4910
  onKeydown(e) {
4906
4911
  if (!e.metaKey && !e.ctrlKey && e.keyCode !== 9 && e.preventDefault(), e.keyCode === 27 && this.showMenu)
4907
- this.closeMenu("la5");
4908
- else if (e.keyCode === 13)
4912
+ this.closeMenu();
4913
+ else if ([13, 32].includes(e.keyCode))
4909
4914
  this.openMenu();
4910
4915
  else if ([38, 40].includes(e.keyCode))
4911
4916
  if (this.multiple)
@@ -4943,7 +4948,7 @@ const Pi = {
4943
4948
  const t = this.selectItems.map((l) => l.value);
4944
4949
  return e.map((l) => {
4945
4950
  let a = l;
4946
- return typeof l == "object" && (a = l[this.itemValueKey] !== void 0 ? l[this.itemValueKey] : l[this.itemLabelKey] !== void 0 ? l[this.itemLabelKey] : l), this.selectItems[t.indexOf(a)];
4951
+ return l && typeof l == "object" && (a = l[this.itemValueKey] !== void 0 ? l[this.itemValueKey] : l[this.itemLabelKey] !== void 0 ? l[this.itemLabelKey] : l), this.selectItems[t.indexOf(a)];
4947
4952
  }).filter((l) => l !== void 0);
4948
4953
  },
4949
4954
  openMenu() {