bge-ui 1.6.8 → 1.7.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/dist/index.js CHANGED
@@ -6186,6 +6186,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
6186
6186
  type: [String, Number],
6187
6187
  default: ""
6188
6188
  },
6189
+ clearable: Boolean,
6189
6190
  thousand: Boolean,
6190
6191
  placeholder: String,
6191
6192
  disabled: Boolean,
@@ -6314,7 +6315,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
6314
6315
  class: normalizeClass(["bge-input__suffix", { suffix: !!unref(suffixSlot) }])
6315
6316
  }, [
6316
6317
  createElementVNode("span", _hoisted_6$5, [
6317
- __props.modelValue && !__props.readonly && !__props.disabled ? (openBlock(), createBlock(_sfc_main$1C, {
6318
+ __props.modelValue && !__props.readonly && !__props.disabled && __props.clearable ? (openBlock(), createBlock(_sfc_main$1C, {
6318
6319
  key: 0,
6319
6320
  class: "bge-input__icon clear",
6320
6321
  onMouseover: _cache[0] || (_cache[0] = withModifiers(($event) => hoverClear(true), ["prevent"])),
@@ -7955,7 +7956,7 @@ const usePopper = function(triggerReference, suppliedOptions = {}) {
7955
7956
  };
7956
7957
  const openWithDelay = useDebounceFn(async () => {
7957
7958
  var _a;
7958
- if (isTargetHovered.value) {
7959
+ if (isTargetHovered.value || !options.hover) {
7959
7960
  const updated = await ((_a = popperInstance.value) == null ? void 0 : _a.update());
7960
7961
  placementState.value = (updated == null ? void 0 : updated.placement) || options.placement;
7961
7962
  isOpened.value = true;
@@ -8278,7 +8279,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
8278
8279
  */
8279
8280
  openDelay: {
8280
8281
  type: Number,
8281
- default: 500,
8282
+ default: 200,
8282
8283
  validator: (value) => {
8283
8284
  const isPositive = value >= 0;
8284
8285
  if (!isPositive) {
@@ -8389,7 +8390,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
8389
8390
  size: props.size,
8390
8391
  type: props.type,
8391
8392
  disableClickOutside: props.disableClickOutside,
8392
- openDelay: props.openDelay,
8393
+ openDelay: props.type === "dropdown" ? 0 : props.openDelay,
8393
8394
  closeDelay: props.closeDelay,
8394
8395
  showArrow: props.showArrow,
8395
8396
  strategy: props.strategy,
@@ -10934,6 +10935,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
10934
10935
  class: "bge-select-popper-wrapper",
10935
10936
  teleported: false,
10936
10937
  "show-arrow": false,
10938
+ "open-delay": 0,
10937
10939
  type: "dropdown",
10938
10940
  hover: false
10939
10941
  }, {
@@ -8,6 +8,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
8
8
  type: (StringConstructor | NumberConstructor)[];
9
9
  default: string;
10
10
  };
11
+ clearable: BooleanConstructor;
11
12
  thousand: BooleanConstructor;
12
13
  placeholder: StringConstructor;
13
14
  disabled: BooleanConstructor;
@@ -36,6 +37,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
36
37
  type: (StringConstructor | NumberConstructor)[];
37
38
  default: string;
38
39
  };
40
+ clearable: BooleanConstructor;
39
41
  thousand: BooleanConstructor;
40
42
  placeholder: StringConstructor;
41
43
  disabled: BooleanConstructor;
@@ -58,6 +60,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
58
60
  type: string;
59
61
  disabled: boolean;
60
62
  modelValue: string | number;
63
+ clearable: boolean;
61
64
  readonly: boolean;
62
65
  thousand: boolean;
63
66
  rows: string | number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bge-ui",
3
- "version": "1.6.8",
3
+ "version": "1.7.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -14,7 +14,7 @@
14
14
  @change="handleChange" @input="handleInput" />
15
15
  <span class="bge-input__suffix" :class="{ suffix: !!suffixSlot }">
16
16
  <span class="bge-input__suffix-inner">
17
- <mono-close class="bge-input__icon clear" v-if="modelValue && !readonly && !disabled" @mouseover.prevent="hoverClear(true)"
17
+ <mono-close class="bge-input__icon clear" v-if="modelValue && !readonly && !disabled && clearable" @mouseover.prevent="hoverClear(true)"
18
18
  @mouseout.prevent="hoverClear(false)" @click="handelClear" size="20" />
19
19
  <slot v-if="type !== 'textarea'" name="suffix" />
20
20
  </span>
@@ -39,6 +39,7 @@ const props = defineProps({
39
39
  type: [String, Number],
40
40
  default: '',
41
41
  },
42
+ clearable: Boolean,
42
43
  thousand: Boolean,
43
44
  placeholder: String,
44
45
  disabled: Boolean,
@@ -9,6 +9,7 @@
9
9
  class="bge-select-popper-wrapper"
10
10
  :teleported="false"
11
11
  :show-arrow="false"
12
+ :open-delay="0"
12
13
  type="dropdown"
13
14
  :hover="false"
14
15
  >
@@ -84,7 +84,7 @@ const props = defineProps({
84
84
  */
85
85
  openDelay: {
86
86
  type: Number,
87
- default: 500,
87
+ default: 200,
88
88
  validator: (value: number) => {
89
89
  const isPositive = value >= 0;
90
90
  if (!isPositive) {
@@ -212,7 +212,7 @@ function initTooltip() {
212
212
  size: props.size,
213
213
  type: props.type,
214
214
  disableClickOutside: props.disableClickOutside,
215
- openDelay: props.openDelay,
215
+ openDelay: props.type === 'dropdown' ? 0 : props.openDelay,
216
216
  closeDelay: props.closeDelay,
217
217
  showArrow: props.showArrow,
218
218
  strategy: props.strategy,
@@ -198,7 +198,7 @@ const usePopper = function (triggerReference, suppliedOptions: Options = {}) {
198
198
  * Handle the opening of the tooltip with delay
199
199
  */
200
200
  const openWithDelay = useDebounceFn(async () => {
201
- if (isTargetHovered.value) {
201
+ if (isTargetHovered.value || !options.hover) {
202
202
  const updated = await popperInstance.value?.update();
203
203
  placementState.value = updated?.placement || options.placement;
204
204
  isOpened.value = true;