bge-ui 1.0.26 → 1.0.27

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 popper-content--${options.size ? options.size : "default"}` },
7957
+ { class: `popper-content ${options.type ? options.type : "default"} popper-content--${options.size ? options.size : "default"}` },
7958
7958
  [
7959
7959
  slots.default ? slots.default() : "",
7960
7960
  h(
@@ -8034,18 +8034,21 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
8034
8034
  */
8035
8035
  title: {
8036
8036
  type: String,
8037
- default: "详情",
8038
- required: true
8037
+ default: "详情"
8039
8038
  },
8040
8039
  buttonText: {
8041
8040
  type: String,
8042
- default: "知道了",
8043
- required: true
8041
+ default: "知道了"
8042
+ },
8043
+ type: {
8044
+ type: String,
8045
+ default: "default"
8046
+ // default dropdown
8044
8047
  },
8045
8048
  size: {
8046
8049
  type: String,
8047
- default: "default",
8048
- required: true
8050
+ default: "default"
8051
+ // default mini
8049
8052
  },
8050
8053
  /**
8051
8054
  * 是否将弹出层追加到body元素下
@@ -8194,6 +8197,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
8194
8197
  const result = usePopper(triggerRef, {
8195
8198
  hover: props.hover,
8196
8199
  size: props.size,
8200
+ type: props.type,
8197
8201
  disableClickOutside: props.disableClickOutside,
8198
8202
  openDelay: props.openDelay,
8199
8203
  closeDelay: props.closeDelay,
package/dist/style.css CHANGED
@@ -1044,6 +1044,7 @@ to {
1044
1044
  .bge-popper-wrapper .popper-content {
1045
1045
  max-width: 360px;
1046
1046
  box-shadow: 0px 12px 40px 0px rgba(0, 0, 0, 0.08);
1047
+ border: solid 0.5px var(--separator-separator);
1047
1048
  border-radius: var(--radius-small, 4px);
1048
1049
  background: var(--bg-tooltip, #53677A);
1049
1050
  padding: var(--layout-x-3, 12px) var(--layout-x-4, 16px);
@@ -1052,6 +1053,9 @@ to {
1052
1053
  font-weight: 400;
1053
1054
  line-height: 24px;
1054
1055
  }
1056
+ .bge-popper-wrapper .popper-content.dropdown {
1057
+ --bg-tooltip: var(--bg-float);
1058
+ }
1055
1059
  .bge-popper-wrapper .popper-content.popper-content--mini {
1056
1060
  font-size: 12px;
1057
1061
  line-height: 20px;
@@ -7,17 +7,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
7
7
  title: {
8
8
  type: StringConstructor;
9
9
  default: string;
10
- required: true;
11
10
  };
12
11
  buttonText: {
13
12
  type: StringConstructor;
14
13
  default: string;
15
- required: true;
14
+ };
15
+ type: {
16
+ type: StringConstructor;
17
+ default: string;
16
18
  };
17
19
  size: {
18
20
  type: StringConstructor;
19
21
  default: string;
20
- required: true;
21
22
  };
22
23
  /**
23
24
  * 是否将弹出层追加到body元素下
@@ -125,17 +126,18 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
125
126
  title: {
126
127
  type: StringConstructor;
127
128
  default: string;
128
- required: true;
129
129
  };
130
130
  buttonText: {
131
131
  type: StringConstructor;
132
132
  default: string;
133
- required: true;
133
+ };
134
+ type: {
135
+ type: StringConstructor;
136
+ default: string;
134
137
  };
135
138
  size: {
136
139
  type: StringConstructor;
137
140
  default: string;
138
- required: true;
139
141
  };
140
142
  /**
141
143
  * 是否将弹出层追加到body元素下
@@ -234,6 +236,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
234
236
  onClosed?: ((...args: any[]) => any) | undefined;
235
237
  }, {
236
238
  size: string;
239
+ type: string;
237
240
  title: string;
238
241
  teleported: boolean;
239
242
  modifiers: Modifier<any, any>[];
@@ -3,6 +3,7 @@ import type { PositioningStrategy, Placement, Modifier, Options as ModifierOptio
3
3
  type Options = {
4
4
  placement?: Placement;
5
5
  size?: string;
6
+ type?: string;
6
7
  hover?: boolean;
7
8
  disableClickOutside?: boolean;
8
9
  openDelay?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bge-ui",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -38,18 +38,18 @@ const props = defineProps({
38
38
  title: {
39
39
  type: String,
40
40
  default: '详情',
41
- required: true,
42
41
  },
43
42
  buttonText: {
44
43
  type: String,
45
44
  default: '知道了',
46
- required: true,
47
45
  },
48
-
46
+ type: {
47
+ type: String,
48
+ default: 'default', // default dropdown
49
+ },
49
50
  size: {
50
51
  type: String,
51
- default: 'default',
52
- required: true,
52
+ default: 'default', // default mini
53
53
  },
54
54
  /**
55
55
  * 是否将弹出层追加到body元素下
@@ -216,6 +216,7 @@ function initTooltip() {
216
216
  const result = usePopper(triggerRef, {
217
217
  hover: props.hover,
218
218
  size: props.size,
219
+ type: props.type,
219
220
  disableClickOutside: props.disableClickOutside,
220
221
  openDelay: props.openDelay,
221
222
  closeDelay: props.closeDelay,
@@ -285,6 +286,7 @@ defineExpose({
285
286
  .popper-content {
286
287
  max-width: 360px;
287
288
  box-shadow: 0px 12px 40px 0px rgba(0, 0, 0, 0.08);
289
+ border: solid 0.5px var(--separator-separator);
288
290
  border-radius: var(--radius-small, 4px);
289
291
  background: var(--bg-tooltip, #53677A);
290
292
  padding: var(--layout-x-3, 12px) var(--layout-x-4, 16px);
@@ -293,6 +295,10 @@ defineExpose({
293
295
  font-weight: 400;
294
296
  line-height: 24px;
295
297
 
298
+ &.dropdown {
299
+ --bg-tooltip: var(--bg-float);
300
+ }
301
+
296
302
  &.popper-content--mini {
297
303
  font-size: 12px;
298
304
  line-height: 20px;
@@ -87,6 +87,7 @@ const transformOriginMap = {
87
87
  type Options = {
88
88
  placement?: Placement;
89
89
  size?: string;
90
+ type?: string;
90
91
  hover?: boolean;
91
92
  disableClickOutside?: boolean;
92
93
  openDelay?: number;
@@ -492,7 +493,7 @@ const usePopper = function (triggerReference, suppliedOptions: Options = {}) {
492
493
  {
493
494
  default: () => {
494
495
  return withDirectives(h('div',
495
- { class: `popper-content popper-content--${options.size ? options.size : 'default'}` },
496
+ { class: `popper-content ${options.type ? options.type : 'default'} popper-content--${options.size ? options.size : 'default'}` },
496
497
  [
497
498
  slots.default ? slots.default() : '',
498
499
  h('div',