bkui-vue 0.0.1-beta.412 → 0.0.1-beta.414

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/dist/index.esm.js CHANGED
@@ -55,6 +55,7 @@ var loading = "";
55
55
  var modal = "";
56
56
  var progress = "";
57
57
  var radio = "";
58
+ var radioButton = "";
58
59
  var rate = "";
59
60
  var star$1 = "";
60
61
  var swiper = "";
@@ -7403,7 +7404,7 @@ class BkMaskManager {
7403
7404
  this.zIndexStore = /* @__PURE__ */ new Map();
7404
7405
  this.lastUUID = null;
7405
7406
  this.maskStyle = {
7406
- position: "absolute",
7407
+ position: "fixed",
7407
7408
  left: 0,
7408
7409
  top: 0,
7409
7410
  bottom: 0,
@@ -13814,7 +13815,7 @@ var RadioButton = defineComponent({
13814
13815
  },
13815
13816
  render() {
13816
13817
  const radioClass = classes({
13817
- "bk-radio-button": true,
13818
+ "bk-radio-item": true,
13818
13819
  "is-focused": this.isFocused,
13819
13820
  "is-disabled": this.isDisabled,
13820
13821
  "is-checked": this.isChecked
@@ -13824,14 +13825,14 @@ var RadioButton = defineComponent({
13824
13825
  return null;
13825
13826
  }
13826
13827
  return createVNode("div", {
13827
- "class": "bk-radio-button-label"
13828
+ "class": "bk-radio-item-label"
13828
13829
  }, [this.$slots.default ? this.$slots.default() : this.label]);
13829
13830
  };
13830
13831
  return createVNode("label", {
13831
13832
  "class": radioClass,
13832
13833
  "tabindex": "0"
13833
13834
  }, [createVNode("input", {
13834
- "class": "bk-radio-button-input",
13835
+ "class": "bk-radio-item-input",
13835
13836
  "type": "radio",
13836
13837
  "tabindex": "0",
13837
13838
  "value": this.label,
@@ -13847,7 +13848,8 @@ const radioGroupProps = {
13847
13848
  name: PropTypes.string.def(""),
13848
13849
  modelValue: PropTypes.oneOfType([String, Number, Boolean]),
13849
13850
  disabled: PropTypes.bool,
13850
- withValidate: PropTypes.bool.def(true)
13851
+ withValidate: PropTypes.bool.def(true),
13852
+ type: PropTypes.oneOf(["button", "capsule"]).def("button")
13851
13853
  };
13852
13854
  var RadioGroup = defineComponent({
13853
13855
  name: "RadioGroup",
@@ -13900,7 +13902,7 @@ var RadioGroup = defineComponent({
13900
13902
  render() {
13901
13903
  var _a;
13902
13904
  return createVNode("div", {
13903
- "class": "bk-radio-group"
13905
+ "class": ["bk-radio-group", `bk-radio-${this.type}`]
13904
13906
  }, [(_a = this.$slots) == null ? void 0 : _a.default()]);
13905
13907
  }
13906
13908
  });
@@ -21669,6 +21671,7 @@ var TabTypeEnum = /* @__PURE__ */ ((TabTypeEnum2) => {
21669
21671
  TabTypeEnum2["BORDER_CARD"] = "border-card";
21670
21672
  TabTypeEnum2["UNBORDER_CARD"] = "unborder-card";
21671
21673
  TabTypeEnum2["CARD_TAB"] = "card-tab";
21674
+ TabTypeEnum2["CARD_GRID"] = "card-grid";
21672
21675
  return TabTypeEnum2;
21673
21676
  })(TabTypeEnum || {});
21674
21677
  var PositionEnum = /* @__PURE__ */ ((PositionEnum2) => {
@@ -21963,12 +21966,12 @@ var TabNav = defineComponent({
21963
21966
  drop(index2, sortType);
21964
21967
  },
21965
21968
  "class": getNavItemClass()
21966
- }, [createVNode("div", null, [tabLabel]), getValue(item.closable, closable) && createVNode(close$1, {
21967
- "class": resolveClassName("tab-header-item-close"),
21969
+ }, [createVNode("div", null, [tabLabel]), getValue(item.closable, closable) ? createVNode("span", {
21970
+ "class": resolveClassName("tab-header--close"),
21968
21971
  "onClick": () => this.handleTabRemove(index2, item)
21969
- }, null)]);
21972
+ }, [createVNode(close$1, null, null)]) : ""]);
21970
21973
  });
21971
- const renderSlot2 = () => {
21974
+ const renderOperation = () => {
21972
21975
  var _a, _b;
21973
21976
  const list = [];
21974
21977
  if (typeof this.$slots.add === "function") {
@@ -22001,19 +22004,18 @@ var TabNav = defineComponent({
22001
22004
  }
22002
22005
  return "";
22003
22006
  };
22007
+ const setting = typeof this.$slots.setting === "function" ? createVNode("div", {
22008
+ "class": resolveClassName("tab-header-setting")
22009
+ }, [this.$slots.setting()]) : null;
22010
+ const operations = renderOperation();
22004
22011
  return createVNode("div", {
22005
22012
  "style": {
22006
22013
  lineHeight: `${labelHeight}px`
22007
22014
  },
22008
22015
  "class": resolveClassName("tab-header")
22009
22016
  }, [createVNode("div", {
22010
- "class": resolveClassName("tab-header-nav")
22011
- }, [renderNavs(), renderActiveBar(), createVNode("div", {
22012
- "style": this.activeBarStyle,
22013
- "class": resolveClassName("tab-header-active-bar")
22014
- }, null)]), renderSlot2(), typeof this.$slots.setting === "function" && createVNode("div", {
22015
- "class": resolveClassName("tab-header-setting")
22016
- }, [this.$slots.setting()])]);
22017
+ "class": [resolveClassName("tab-header-nav"), operations || setting ? "tab-header-auto" : ""]
22018
+ }, [renderActiveBar(), renderNavs()]), operations, setting]);
22017
22019
  }
22018
22020
  });
22019
22021
  var Tab = defineComponent({
@@ -28852,14 +28854,14 @@ const treeProps = {
28852
28854
  ]).def(void 0),
28853
28855
  emptyText: PropTypes.string.def("\u6CA1\u6709\u6570\u636E"),
28854
28856
  draggable: PropTypes.bool.def(false),
28855
- disableDrag: PropTypes.func.def(null),
28856
- disableDrop: PropTypes.func.def(null),
28857
+ disableDrag: PropTypes.func,
28858
+ disableDrop: PropTypes.func,
28857
28859
  dragSort: PropTypes.bool.def(false),
28858
28860
  selectable: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]).def(true),
28859
28861
  disabledFolderSelectable: PropTypes.bool.def(false),
28860
28862
  showCheckbox: PropTypes.bool.def(false),
28861
28863
  showNodeTypeIcon: PropTypes.bool.def(true),
28862
- selected: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]).def(null),
28864
+ selected: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]),
28863
28865
  autoCheckChildren: PropTypes.bool.def(true),
28864
28866
  autoOpenParentNode: PropTypes.bool.def(true),
28865
28867
  expandAll: PropTypes.bool.def(false),
@@ -39206,7 +39208,7 @@ var SearchSelectInput = defineComponent({
39206
39208
  e && setMenuList();
39207
39209
  }
39208
39210
  function handleInputChange(event) {
39209
- var _a, _b, _c, _d, _e, _f, _g;
39211
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
39210
39212
  clearInput();
39211
39213
  let text = event.target.innerText;
39212
39214
  if (/(\r|\n)/gm.test(text) || /\s{2}/gm.test(text)) {
@@ -39218,13 +39220,20 @@ var SearchSelectInput = defineComponent({
39218
39220
  debounceSetMenuList();
39219
39221
  } else if (!keyword.value && text.length < (((_c = (_b = usingItem.value) == null ? void 0 : _b.inputInnerText) == null ? void 0 : _c.length) || 1)) {
39220
39222
  const outerText = text.replace("\xA0", " ").replace(((_d = usingItem.value) == null ? void 0 : _d.keyInnerText.replace("\xA0", " ").trim()) || "", "").trim();
39223
+ const hasKeyword = text && ((_e = usingItem.value) == null ? void 0 : _e.keyInnerText) && text.replace("\xA0", " ").includes(usingItem.value.keyInnerText.replace("\xA0", " ").trim());
39224
+ if (hasKeyword && outerText && ((_f = usingItem.value.values) == null ? void 0 : _f.length)) {
39225
+ keyword.value = outerText;
39226
+ console.info("outerText", outerText);
39227
+ debounceSetMenuList();
39228
+ return;
39229
+ }
39221
39230
  if (outerText || !(text == null ? void 0 : text.length)) {
39222
39231
  usingItem.value = null;
39223
39232
  }
39224
39233
  keyword.value = outerText ? text : "";
39225
39234
  debounceSetMenuList();
39226
- } else if (!((_f = (_e = usingItem.value) == null ? void 0 : _e.values) == null ? void 0 : _f.length)) {
39227
- keyword.value = text.replace("\xA0", " ").replace(((_g = usingItem.value) == null ? void 0 : _g.keyInnerText.replace("\xA0", " ")) || "", "").trim();
39235
+ } else if (!((_h = (_g = usingItem.value) == null ? void 0 : _g.values) == null ? void 0 : _h.length)) {
39236
+ keyword.value = text.replace("\xA0", " ").replace(((_i = usingItem.value) == null ? void 0 : _i.keyInnerText.replace("\xA0", " ")) || "", "").trim();
39228
39237
  setInputFocus();
39229
39238
  debounceSetMenuList();
39230
39239
  }
@@ -39299,6 +39308,21 @@ var SearchSelectInput = defineComponent({
39299
39308
  showNoSelectValueError.value = true;
39300
39309
  return;
39301
39310
  }
39311
+ if (keyword.value) {
39312
+ const value = {
39313
+ id: keyword.value,
39314
+ name: keyword.value
39315
+ };
39316
+ const res2 = await validateUsingItemValues(value);
39317
+ if (!res2)
39318
+ return;
39319
+ usingItem.value.addValue(value);
39320
+ emit("add", usingItem.value);
39321
+ keyword.value = "";
39322
+ usingItem.value = null;
39323
+ setInputFocus(true);
39324
+ return;
39325
+ }
39302
39326
  const res = await validateUsingItemValues();
39303
39327
  if (!res)
39304
39328
  return;
@@ -39312,7 +39336,7 @@ var SearchSelectInput = defineComponent({
39312
39336
  return;
39313
39337
  }
39314
39338
  if ((_a = usingItem.value) == null ? void 0 : _a.values.length) {
39315
- if (((_b = usingItem.value) == null ? void 0 : _b.multiple) || usingItem.value.isInValueList(usingItem.value.values[0])) {
39339
+ if (((_b = usingItem.value) == null ? void 0 : _b.multiple) || usingItem.value.isInValueList(usingItem.value.values[0]) || props2.mode === SearchInputMode.EDIT && !keyword.value) {
39316
39340
  usingItem.value.values.splice(-1, 1);
39317
39341
  keyword.value = "";
39318
39342
  setInputFocus();
@@ -39326,7 +39350,7 @@ var SearchSelectInput = defineComponent({
39326
39350
  onValidate("");
39327
39351
  }
39328
39352
  async function handleSelectItem(item, type) {
39329
- var _a, _b, _c, _d;
39353
+ var _a, _b, _c, _d, _e;
39330
39354
  if ((_a = item.value) == null ? void 0 : _a.id) {
39331
39355
  if (props2.valueBehavior === ValueBehavior.NEEDKEY && item.value || !props2.validateValues) {
39332
39356
  const seleted = new SelectedItem(__spreadProps(__spreadValues({}, item), {
@@ -39361,7 +39385,7 @@ var SearchSelectInput = defineComponent({
39361
39385
  return;
39362
39386
  if (!usingItem.value.multiple)
39363
39387
  setSelectedItem();
39364
- if (props2.valueBehavior === ValueBehavior.NEEDKEY && usingItem.value.multiple) {
39388
+ if (props2.valueBehavior === ValueBehavior.NEEDKEY && ((_e = usingItem.value) == null ? void 0 : _e.multiple)) {
39365
39389
  setInputFocus();
39366
39390
  }
39367
39391
  }