yc-design-vue 1.6.9 → 1.7.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.
- package/es/Drawer/index.d.ts +5 -0
- package/es/Drawer/index.js +2 -1
- package/es/Tooltip/index.d.ts +6 -6
- package/es/Tooltip/index.vue.d.ts +2 -2
- package/es/Tooltip/index.vue.js +2 -2
- package/es/Tooltip/type.d.ts +1 -1
- package/es/Trigger/hooks/useTriggerPosition.js +4 -4
- package/es/Trigger/index.css +1 -1
- package/es/style.css +1 -1
- package/lib/Drawer/index.d.ts +5 -0
- package/lib/Drawer/index.js +1 -1
- package/lib/Tooltip/index.d.ts +6 -6
- package/lib/Tooltip/index.vue.d.ts +2 -2
- package/lib/Tooltip/index.vue.js +1 -1
- package/lib/Tooltip/type.d.ts +1 -1
- package/lib/Trigger/hooks/useTriggerPosition.js +1 -1
- package/lib/Trigger/index.css +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/es/Drawer/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { App } from 'vue';
|
2
|
+
import { DrawerConfig, DrawerUpdateConfig } from './type';
|
2
3
|
import { default as _Drawer } from './Drawer.vue';
|
3
4
|
export type DrawerInstance = InstanceType<typeof _Drawer>;
|
4
5
|
export * from './type';
|
@@ -133,6 +134,10 @@ declare const Drawer: {
|
|
133
134
|
$slots: Readonly<import('./type').DrawerSlots> & import('./type').DrawerSlots;
|
134
135
|
}) & {
|
135
136
|
install: (app: App) => void;
|
137
|
+
open: (props: DrawerConfig) => {
|
138
|
+
close: () => void;
|
139
|
+
update: (updateProps: DrawerUpdateConfig) => void;
|
140
|
+
};
|
136
141
|
};
|
137
142
|
declare module 'vue' {
|
138
143
|
interface GlobalComponents {
|
package/es/Drawer/index.js
CHANGED
package/es/Tooltip/index.d.ts
CHANGED
@@ -16,14 +16,14 @@ declare const Tooltip: {
|
|
16
16
|
mini: boolean;
|
17
17
|
popupVisible: boolean;
|
18
18
|
defaultPopupVisible: boolean;
|
19
|
-
position: TriggerPostion;
|
19
|
+
position: import('..').TriggerPostion;
|
20
20
|
contentClass: import('../_shared/type').ClassName;
|
21
21
|
contentStyle: import('vue').CSSProperties;
|
22
22
|
arrowClass: import('../_shared/type').ClassName;
|
23
23
|
arrowStyle: import('vue').CSSProperties;
|
24
24
|
popupContainer: import('..').PopupContainer;
|
25
25
|
content: string;
|
26
|
-
triggerProps: TriggerProps;
|
26
|
+
triggerProps: import('..').TriggerProps;
|
27
27
|
backgroundColor: string;
|
28
28
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
29
29
|
P: {};
|
@@ -42,14 +42,14 @@ declare const Tooltip: {
|
|
42
42
|
mini: boolean;
|
43
43
|
popupVisible: boolean;
|
44
44
|
defaultPopupVisible: boolean;
|
45
|
-
position: TriggerPostion;
|
45
|
+
position: import('..').TriggerPostion;
|
46
46
|
contentClass: import('../_shared/type').ClassName;
|
47
47
|
contentStyle: import('vue').CSSProperties;
|
48
48
|
arrowClass: import('../_shared/type').ClassName;
|
49
49
|
arrowStyle: import('vue').CSSProperties;
|
50
50
|
popupContainer: import('..').PopupContainer;
|
51
51
|
content: string;
|
52
|
-
triggerProps: TriggerProps;
|
52
|
+
triggerProps: import('..').TriggerProps;
|
53
53
|
backgroundColor: string;
|
54
54
|
}>;
|
55
55
|
__isFragment?: never;
|
@@ -68,14 +68,14 @@ declare const Tooltip: {
|
|
68
68
|
mini: boolean;
|
69
69
|
popupVisible: boolean;
|
70
70
|
defaultPopupVisible: boolean;
|
71
|
-
position: TriggerPostion;
|
71
|
+
position: import('..').TriggerPostion;
|
72
72
|
contentClass: import('../_shared/type').ClassName;
|
73
73
|
contentStyle: import('vue').CSSProperties;
|
74
74
|
arrowClass: import('../_shared/type').ClassName;
|
75
75
|
arrowStyle: import('vue').CSSProperties;
|
76
76
|
popupContainer: import('..').PopupContainer;
|
77
77
|
content: string;
|
78
|
-
triggerProps: TriggerProps;
|
78
|
+
triggerProps: import('..').TriggerProps;
|
79
79
|
backgroundColor: string;
|
80
80
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
81
81
|
$slots: Readonly<import('./type').TooltipSlots> & import('./type').TooltipSlots;
|
@@ -20,14 +20,14 @@ declare const __VLS_component: import('vue').DefineComponent<TooltipProps, {
|
|
20
20
|
mini: boolean;
|
21
21
|
popupVisible: boolean;
|
22
22
|
defaultPopupVisible: boolean;
|
23
|
-
position: TriggerPostion;
|
23
|
+
position: import('../Trigger').TriggerPostion;
|
24
24
|
contentClass: import('../_shared/type').ClassName;
|
25
25
|
contentStyle: CSSProperties;
|
26
26
|
arrowClass: import('../_shared/type').ClassName;
|
27
27
|
arrowStyle: CSSProperties;
|
28
28
|
popupContainer: import('..').PopupContainer;
|
29
29
|
content: string;
|
30
|
-
triggerProps: TriggerProps;
|
30
|
+
triggerProps: import('../Trigger').TriggerProps;
|
31
31
|
backgroundColor: string;
|
32
32
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
33
33
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
package/es/Tooltip/index.vue.js
CHANGED
@@ -76,7 +76,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
76
76
|
"popup-container": _ctx.popupContainer,
|
77
77
|
position: _ctx.position,
|
78
78
|
"arrow-class": ["yc-tooltip-popup-arrow", _ctx.arrowClass],
|
79
|
-
"arrow-style":
|
79
|
+
"arrow-style": arrowStyle.value,
|
80
80
|
"content-class": [
|
81
81
|
"yc-tooltip-popup-content",
|
82
82
|
_ctx.contentClass,
|
@@ -84,7 +84,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
84
84
|
"yc-tooltip-mini": _ctx.mini
|
85
85
|
}
|
86
86
|
],
|
87
|
-
"content-style":
|
87
|
+
"content-style": contentStyle.value,
|
88
88
|
"popup-offset": 10,
|
89
89
|
class: ["yc-tooltip", _ctx.$attrs.class],
|
90
90
|
style: _ctx.$attrs.style,
|
package/es/Tooltip/type.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { CSSProperties, VNode } from 'vue';
|
2
2
|
import { ClassName, PopupContainer } from '../_shared/type';
|
3
|
-
import { TriggerPostion, TriggerProps } from '../
|
3
|
+
import { TriggerPostion, TriggerProps } from '../Trigger/type';
|
4
4
|
export interface TooltipProps {
|
5
5
|
popupVisible?: boolean;
|
6
6
|
defaultPopupVisible?: boolean;
|
@@ -247,9 +247,9 @@ const useTriggerPosition = (params) => {
|
|
247
247
|
arrowRight = valueToPx((triggerWidth2 - arrowWidth2) / 2);
|
248
248
|
}
|
249
249
|
inset = {
|
250
|
-
top: position2.startsWith("b") ?
|
250
|
+
top: position2.startsWith("b") ? valueToPx(-arrowHeight2 / 2) : "",
|
251
251
|
right: arrowRight,
|
252
|
-
bottom: position2.startsWith("t") ?
|
252
|
+
bottom: position2.startsWith("t") ? valueToPx(-arrowHeight2 / 2) : "",
|
253
253
|
left: arrowLeft
|
254
254
|
};
|
255
255
|
} else {
|
@@ -264,9 +264,9 @@ const useTriggerPosition = (params) => {
|
|
264
264
|
}
|
265
265
|
inset = {
|
266
266
|
top: arrowTop,
|
267
|
-
right: position2.startsWith("l") ?
|
267
|
+
right: position2.startsWith("l") ? valueToPx(-arrowWidth2 / 2) : "",
|
268
268
|
bottom: arrowBottom,
|
269
|
-
left: position2.startsWith("r") ?
|
269
|
+
left: position2.startsWith("r") ? valueToPx(-arrowWidth2 / 2) : ""
|
270
270
|
};
|
271
271
|
}
|
272
272
|
return inset;
|
package/es/Trigger/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.yc-trigger{position:fixed}.yc-trigger .yc-trigger-content{background-color:var(--color-bg-5)}.yc-trigger .yc-trigger-arrow{position:absolute;width:8px;height:8px;background-color:var(--color-bg-5)}.yc-trigger-absolute{position:absolute}.yc-trigger.yc-trigger-position-top .yc-trigger-arrow,.yc-trigger.yc-trigger-position-tl .yc-trigger-arrow,.yc-trigger.yc-trigger-position-tr .yc-trigger-arrow{
|
1
|
+
.yc-trigger{position:fixed}.yc-trigger .yc-trigger-content{background-color:var(--color-bg-5)}.yc-trigger .yc-trigger-arrow{position:absolute;transform:rotate(45deg);width:8px;height:8px;background-color:var(--color-bg-5)}.yc-trigger-absolute{position:absolute}.yc-trigger.yc-trigger-position-top .yc-trigger-arrow,.yc-trigger.yc-trigger-position-tl .yc-trigger-arrow,.yc-trigger.yc-trigger-position-tr .yc-trigger-arrow{border-bottom-right-radius:2px;border-top:none;border-left:none}.yc-trigger.yc-trigger-position-bottom .yc-trigger-arrow,.yc-trigger.yc-trigger-position-bl .yc-trigger-arrow,.yc-trigger.yc-trigger-position-br .yc-trigger-arrow{border-top-left-radius:2px;border-bottom:none;border-right:none}.yc-trigger.yc-trigger-position-left .yc-trigger-arrow,.yc-trigger.yc-trigger-position-lt .yc-trigger-arrow,.yc-trigger.yc-trigger-position-lb .yc-trigger-arrow{border-top-right-radius:2px;border-bottom:none;border-left:none}.yc-trigger.yc-trigger-position-right .yc-trigger-arrow,.yc-trigger.yc-trigger-position-rt .yc-trigger-arrow,.yc-trigger.yc-trigger-position-rb .yc-trigger-arrow{border-bottom-left-radius:2px;border-top:none;border-right:none}.yc-trigger-transform-origin.yc-trigger-position-top .yc-trigger-content{transform-origin:50% 100%}.yc-trigger-transform-origin.yc-trigger-position-tl .yc-trigger-content{transform-origin:0 100%}.yc-trigger-transform-origin.yc-trigger-position-tr .yc-trigger-content{transform-origin:100% 100%}.yc-trigger-transform-origin.yc-trigger-position-bottom .yc-trigger-content{transform-origin:50% 0}.yc-trigger-transform-origin.yc-trigger-position-bl .yc-trigger-content{transform-origin:0 0}.yc-trigger-transform-origin.yc-trigger-position-br .yc-trigger-content{transform-origin:100% 0}.yc-trigger-transform-origin.yc-trigger-position-right .yc-trigger-content{transform-origin:0 50%}.yc-trigger-transform-origin.yc-trigger-position-rt .yc-trigger-content{transform-origin:0 50%}.yc-trigger-transform-origin.yc-trigger-position-rb .yc-trigger-content{transform-origin:0 100%}.yc-trigger-transform-origin.yc-trigger-position-left .yc-trigger-content{transform-origin:100% 50%}.yc-trigger-transform-origin.yc-trigger-position-lt .yc-trigger-content{transform-origin:100% 0}.yc-trigger-transform-origin.yc-trigger-position-lb .yc-trigger-content{transform-origin:100% 100%}
|