bge-ui 1.0.25 → 1.0.26

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
@@ -7954,7 +7954,7 @@ const usePopper = function(triggerReference, suppliedOptions = {}) {
7954
7954
  default: () => {
7955
7955
  return withDirectives(h(
7956
7956
  "div",
7957
- { class: "popper-content" },
7957
+ { class: `popper-content popper-content--${options.size ? options.size : "default"}` },
7958
7958
  [
7959
7959
  slots.default ? slots.default() : "",
7960
7960
  h(
@@ -8042,6 +8042,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
8042
8042
  default: "知道了",
8043
8043
  required: true
8044
8044
  },
8045
+ size: {
8046
+ type: String,
8047
+ default: "default",
8048
+ required: true
8049
+ },
8045
8050
  /**
8046
8051
  * 是否将弹出层追加到body元素下
8047
8052
  */
@@ -8188,6 +8193,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
8188
8193
  function initTooltip() {
8189
8194
  const result = usePopper(triggerRef, {
8190
8195
  hover: props.hover,
8196
+ size: props.size,
8191
8197
  disableClickOutside: props.disableClickOutside,
8192
8198
  openDelay: props.openDelay,
8193
8199
  closeDelay: props.closeDelay,
package/dist/style.css CHANGED
@@ -1052,6 +1052,11 @@ to {
1052
1052
  font-weight: 400;
1053
1053
  line-height: 24px;
1054
1054
  }
1055
+ .bge-popper-wrapper .popper-content.popper-content--mini {
1056
+ font-size: 12px;
1057
+ line-height: 20px;
1058
+ padding: var(--layout-x-2, 8px) var(--layout-x-3, 12px);
1059
+ }
1055
1060
  .bge-tooltip__closeButton {
1056
1061
  width: 100%;
1057
1062
  margin-top: 40px;
@@ -14,6 +14,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
14
14
  default: string;
15
15
  required: true;
16
16
  };
17
+ size: {
18
+ type: StringConstructor;
19
+ default: string;
20
+ required: true;
21
+ };
17
22
  /**
18
23
  * 是否将弹出层追加到body元素下
19
24
  */
@@ -127,6 +132,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
127
132
  default: string;
128
133
  required: true;
129
134
  };
135
+ size: {
136
+ type: StringConstructor;
137
+ default: string;
138
+ required: true;
139
+ };
130
140
  /**
131
141
  * 是否将弹出层追加到body元素下
132
142
  */
@@ -223,6 +233,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
223
233
  onOpened?: ((...args: any[]) => any) | undefined;
224
234
  onClosed?: ((...args: any[]) => any) | undefined;
225
235
  }, {
236
+ size: string;
226
237
  title: string;
227
238
  teleported: boolean;
228
239
  modifiers: Modifier<any, any>[];
@@ -2,6 +2,7 @@ import type { SetupContext, VNode } from 'vue';
2
2
  import type { PositioningStrategy, Placement, Modifier, Options as ModifierOptions } from '@popperjs/core';
3
3
  type Options = {
4
4
  placement?: Placement;
5
+ size?: string;
5
6
  hover?: boolean;
6
7
  disableClickOutside?: boolean;
7
8
  openDelay?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bge-ui",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -45,6 +45,12 @@ const props = defineProps({
45
45
  default: '知道了',
46
46
  required: true,
47
47
  },
48
+
49
+ size: {
50
+ type: String,
51
+ default: 'default',
52
+ required: true,
53
+ },
48
54
  /**
49
55
  * 是否将弹出层追加到body元素下
50
56
  */
@@ -209,6 +215,7 @@ function closeToolTip() {
209
215
  function initTooltip() {
210
216
  const result = usePopper(triggerRef, {
211
217
  hover: props.hover,
218
+ size: props.size,
212
219
  disableClickOutside: props.disableClickOutside,
213
220
  openDelay: props.openDelay,
214
221
  closeDelay: props.closeDelay,
@@ -285,6 +292,12 @@ defineExpose({
285
292
  font-size: 14px;
286
293
  font-weight: 400;
287
294
  line-height: 24px;
295
+
296
+ &.popper-content--mini {
297
+ font-size: 12px;
298
+ line-height: 20px;
299
+ padding: var(--layout-x-2, 8px) var(--layout-x-3, 12px);
300
+ }
288
301
  }
289
302
  }
290
303
 
@@ -86,6 +86,7 @@ const transformOriginMap = {
86
86
 
87
87
  type Options = {
88
88
  placement?: Placement;
89
+ size?: string;
89
90
  hover?: boolean;
90
91
  disableClickOutside?: boolean;
91
92
  openDelay?: number;
@@ -491,7 +492,7 @@ const usePopper = function (triggerReference, suppliedOptions: Options = {}) {
491
492
  {
492
493
  default: () => {
493
494
  return withDirectives(h('div',
494
- { class: 'popper-content' },
495
+ { class: `popper-content popper-content--${options.size ? options.size : 'default'}` },
495
496
  [
496
497
  slots.default ? slots.default() : '',
497
498
  h('div',