element-ps 2.0.22 → 2.0.23
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/components/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +82 -19
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +19 -82
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/alert/index.mjs +2 -2
- package/es/components/alert/src/alert.mjs +33 -83
- package/es/components/alert/src/alert.mjs.map +1 -1
- package/es/components/alert/src/alert2.mjs +83 -33
- package/es/components/alert/src/alert2.mjs.map +1 -1
- package/es/components/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb-item.mjs +11 -46
- package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs +46 -11
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/components/button/index.mjs +2 -2
- package/es/components/button/src/button-group.mjs +1 -1
- package/es/components/button/src/button.mjs +48 -96
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button2.mjs +96 -48
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/check-tag/index.mjs +2 -2
- package/es/components/check-tag/src/check-tag.mjs +20 -7
- package/es/components/check-tag/src/check-tag.mjs.map +1 -1
- package/es/components/check-tag/src/check-tag2.mjs +7 -20
- package/es/components/check-tag/src/check-tag2.mjs.map +1 -1
- package/es/components/collapse/index.mjs +2 -2
- package/es/components/collapse/src/collapse.mjs +14 -61
- package/es/components/collapse/src/collapse.mjs.map +1 -1
- package/es/components/collapse/src/collapse2.mjs +61 -14
- package/es/components/collapse/src/collapse2.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content.mjs +79 -34
- package/es/components/dialog/src/dialog-content.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content2.mjs +34 -79
- package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
- package/es/components/dialog/src/dialog.mjs +1 -1
- package/es/components/dialog/src/dialog2.mjs +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +117 -23
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +23 -117
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/form/index.mjs +2 -2
- package/es/components/form/src/form-item.mjs +46 -177
- package/es/components/form/src/form-item.mjs.map +1 -1
- package/es/components/form/src/form-item2.mjs +177 -46
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/icon/index.mjs +2 -2
- package/es/components/icon/src/icon.mjs +8 -35
- package/es/components/icon/src/icon.mjs.map +1 -1
- package/es/components/icon/src/icon2.mjs +35 -8
- package/es/components/icon/src/icon2.mjs.map +1 -1
- package/es/components/index.mjs +25 -25
- package/es/components/input/index.mjs +2 -2
- package/es/components/input/src/input.mjs +296 -85
- package/es/components/input/src/input.mjs.map +1 -1
- package/es/components/input/src/input2.mjs +85 -296
- package/es/components/input/src/input2.mjs.map +1 -1
- package/es/components/input-number/index.mjs +2 -2
- package/es/components/input-number/src/input-number.mjs +171 -46
- package/es/components/input-number/src/input-number.mjs.map +1 -1
- package/es/components/input-number/src/input-number2.mjs +46 -171
- package/es/components/input-number/src/input-number2.mjs.map +1 -1
- package/es/components/link/index.mjs +2 -2
- package/es/components/link/src/link.mjs +19 -43
- package/es/components/link/src/link.mjs.map +1 -1
- package/es/components/link/src/link2.mjs +43 -19
- package/es/components/link/src/link2.mjs.map +1 -1
- package/es/components/menu/index.mjs +4 -4
- package/es/components/menu/src/menu-item-group.mjs +56 -4
- package/es/components/menu/src/menu-item-group.mjs.map +1 -1
- package/es/components/menu/src/menu-item-group2.mjs +4 -56
- package/es/components/menu/src/menu-item-group2.mjs.map +1 -1
- package/es/components/menu/src/menu-item.mjs +15 -65
- package/es/components/menu/src/menu-item.mjs.map +1 -1
- package/es/components/menu/src/menu-item2.mjs +65 -15
- package/es/components/menu/src/menu-item2.mjs.map +1 -1
- package/es/components/page-header/index.mjs +2 -2
- package/es/components/page-header/src/page-header.mjs +14 -55
- package/es/components/page-header/src/page-header.mjs.map +1 -1
- package/es/components/page-header/src/page-header2.mjs +55 -14
- package/es/components/page-header/src/page-header2.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm2.mjs +1 -1
- package/es/components/popper/index.mjs +6 -6
- package/es/components/popper/src/arrow.mjs +31 -7
- package/es/components/popper/src/arrow.mjs.map +1 -1
- package/es/components/popper/src/arrow2.mjs +7 -31
- package/es/components/popper/src/arrow2.mjs.map +1 -1
- package/es/components/popper/src/content.mjs +64 -52
- package/es/components/popper/src/content.mjs.map +1 -1
- package/es/components/popper/src/content2.mjs +52 -64
- package/es/components/popper/src/content2.mjs.map +1 -1
- package/es/components/popper/src/trigger.mjs +17 -28
- package/es/components/popper/src/trigger.mjs.map +1 -1
- package/es/components/popper/src/trigger2.mjs +28 -17
- package/es/components/popper/src/trigger2.mjs.map +1 -1
- package/es/components/progress/index.mjs +2 -2
- package/es/components/progress/src/progress.mjs +230 -57
- package/es/components/progress/src/progress.mjs.map +1 -1
- package/es/components/progress/src/progress2.mjs +57 -230
- package/es/components/progress/src/progress2.mjs.map +1 -1
- package/es/components/rate/index.d.ts +5 -1
- package/es/components/rate/src/rate.mjs.map +1 -1
- package/es/components/rate/src/rate.vue.d.ts +6 -3
- package/es/components/scrollbar/index.mjs +2 -2
- package/es/components/scrollbar/src/bar.mjs +22 -35
- package/es/components/scrollbar/src/bar.mjs.map +1 -1
- package/es/components/scrollbar/src/bar2.mjs +35 -22
- package/es/components/scrollbar/src/bar2.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar.mjs +112 -42
- package/es/components/scrollbar/src/scrollbar.mjs.map +1 -1
- package/es/components/scrollbar/src/scrollbar2.mjs +42 -112
- package/es/components/scrollbar/src/scrollbar2.mjs.map +1 -1
- package/es/components/teleport/index.mjs +2 -2
- package/es/components/teleport/src/teleport.mjs +43 -18
- package/es/components/teleport/src/teleport.mjs.map +1 -1
- package/es/components/teleport/src/teleport2.mjs +18 -43
- package/es/components/teleport/src/teleport2.mjs.map +1 -1
- package/es/components/timeline/index.mjs +2 -2
- package/es/components/timeline/src/timeline-item.mjs +39 -73
- package/es/components/timeline/src/timeline-item.mjs.map +1 -1
- package/es/components/timeline/src/timeline-item2.mjs +73 -39
- package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +2 -2
- package/es/components/tooltip/src/tooltip2.mjs +1 -1
- package/es/components/tooltip/src/trigger.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +2 -2
- package/es/components/tooltip-v2/src/arrow.mjs +22 -38
- package/es/components/tooltip-v2/src/arrow.mjs.map +1 -1
- package/es/components/tooltip-v2/src/arrow2.mjs +38 -22
- package/es/components/tooltip-v2/src/arrow2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root.mjs +81 -17
- package/es/components/tooltip-v2/src/root.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +17 -81
- package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +4 -4
- package/es/components/tooltip-v2/src/tooltip2.mjs +2 -2
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-content.mjs +46 -15
- package/es/components/upload/src/upload-content.mjs.map +1 -1
- package/es/components/upload/src/upload-content2.mjs +15 -46
- package/es/components/upload/src/upload-content2.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +1 -1
- package/es/index.mjs +25 -25
- package/lib/components/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +82 -19
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +19 -82
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/alert/index.js +2 -2
- package/lib/components/alert/src/alert.js +33 -82
- package/lib/components/alert/src/alert.js.map +1 -1
- package/lib/components/alert/src/alert2.js +82 -33
- package/lib/components/alert/src/alert2.js.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb-item.js +11 -46
- package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item2.js +46 -11
- package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/components/button/index.js +2 -2
- package/lib/components/button/src/button-group.js +1 -1
- package/lib/components/button/src/button.js +50 -96
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button2.js +96 -50
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/check-tag/index.js +2 -2
- package/lib/components/check-tag/src/check-tag.js +20 -7
- package/lib/components/check-tag/src/check-tag.js.map +1 -1
- package/lib/components/check-tag/src/check-tag2.js +7 -20
- package/lib/components/check-tag/src/check-tag2.js.map +1 -1
- package/lib/components/collapse/index.js +2 -2
- package/lib/components/collapse/src/collapse.js +16 -61
- package/lib/components/collapse/src/collapse.js.map +1 -1
- package/lib/components/collapse/src/collapse2.js +61 -16
- package/lib/components/collapse/src/collapse2.js.map +1 -1
- package/lib/components/dialog/src/dialog-content.js +78 -33
- package/lib/components/dialog/src/dialog-content.js.map +1 -1
- package/lib/components/dialog/src/dialog-content2.js +33 -78
- package/lib/components/dialog/src/dialog-content2.js.map +1 -1
- package/lib/components/dialog/src/dialog.js +1 -1
- package/lib/components/dialog/src/dialog2.js +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +117 -23
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +23 -117
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/form/index.js +2 -2
- package/lib/components/form/src/form-item.js +47 -177
- package/lib/components/form/src/form-item.js.map +1 -1
- package/lib/components/form/src/form-item2.js +177 -47
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/icon/index.js +2 -2
- package/lib/components/icon/src/icon.js +8 -35
- package/lib/components/icon/src/icon.js.map +1 -1
- package/lib/components/icon/src/icon2.js +35 -8
- package/lib/components/icon/src/icon2.js.map +1 -1
- package/lib/components/index.js +25 -25
- package/lib/components/input/index.js +2 -2
- package/lib/components/input/src/input.js +295 -84
- package/lib/components/input/src/input.js.map +1 -1
- package/lib/components/input/src/input2.js +84 -295
- package/lib/components/input/src/input2.js.map +1 -1
- package/lib/components/input-number/index.js +2 -2
- package/lib/components/input-number/src/input-number.js +171 -46
- package/lib/components/input-number/src/input-number.js.map +1 -1
- package/lib/components/input-number/src/input-number2.js +46 -171
- package/lib/components/input-number/src/input-number2.js.map +1 -1
- package/lib/components/link/index.js +2 -2
- package/lib/components/link/src/link.js +19 -43
- package/lib/components/link/src/link.js.map +1 -1
- package/lib/components/link/src/link2.js +43 -19
- package/lib/components/link/src/link2.js.map +1 -1
- package/lib/components/menu/index.js +4 -4
- package/lib/components/menu/src/menu-item-group.js +56 -4
- package/lib/components/menu/src/menu-item-group.js.map +1 -1
- package/lib/components/menu/src/menu-item-group2.js +4 -56
- package/lib/components/menu/src/menu-item-group2.js.map +1 -1
- package/lib/components/menu/src/menu-item.js +16 -65
- package/lib/components/menu/src/menu-item.js.map +1 -1
- package/lib/components/menu/src/menu-item2.js +65 -16
- package/lib/components/menu/src/menu-item2.js.map +1 -1
- package/lib/components/page-header/index.js +2 -2
- package/lib/components/page-header/src/page-header.js +14 -55
- package/lib/components/page-header/src/page-header.js.map +1 -1
- package/lib/components/page-header/src/page-header2.js +55 -14
- package/lib/components/page-header/src/page-header2.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm2.js +1 -1
- package/lib/components/popper/index.js +6 -6
- package/lib/components/popper/src/arrow.js +31 -7
- package/lib/components/popper/src/arrow.js.map +1 -1
- package/lib/components/popper/src/arrow2.js +7 -31
- package/lib/components/popper/src/arrow2.js.map +1 -1
- package/lib/components/popper/src/content.js +65 -52
- package/lib/components/popper/src/content.js.map +1 -1
- package/lib/components/popper/src/content2.js +52 -65
- package/lib/components/popper/src/content2.js.map +1 -1
- package/lib/components/popper/src/trigger.js +17 -28
- package/lib/components/popper/src/trigger.js.map +1 -1
- package/lib/components/popper/src/trigger2.js +28 -17
- package/lib/components/popper/src/trigger2.js.map +1 -1
- package/lib/components/progress/index.js +2 -2
- package/lib/components/progress/src/progress.js +230 -57
- package/lib/components/progress/src/progress.js.map +1 -1
- package/lib/components/progress/src/progress2.js +57 -230
- package/lib/components/progress/src/progress2.js.map +1 -1
- package/lib/components/rate/index.d.ts +5 -1
- package/lib/components/rate/src/rate.js.map +1 -1
- package/lib/components/rate/src/rate.vue.d.ts +6 -3
- package/lib/components/scrollbar/index.js +2 -2
- package/lib/components/scrollbar/src/bar.js +22 -35
- package/lib/components/scrollbar/src/bar.js.map +1 -1
- package/lib/components/scrollbar/src/bar2.js +35 -22
- package/lib/components/scrollbar/src/bar2.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar.js +112 -42
- package/lib/components/scrollbar/src/scrollbar.js.map +1 -1
- package/lib/components/scrollbar/src/scrollbar2.js +42 -112
- package/lib/components/scrollbar/src/scrollbar2.js.map +1 -1
- package/lib/components/teleport/index.js +2 -2
- package/lib/components/teleport/src/teleport.js +43 -18
- package/lib/components/teleport/src/teleport.js.map +1 -1
- package/lib/components/teleport/src/teleport2.js +18 -43
- package/lib/components/teleport/src/teleport2.js.map +1 -1
- package/lib/components/timeline/index.js +2 -2
- package/lib/components/timeline/src/timeline-item.js +39 -73
- package/lib/components/timeline/src/timeline-item.js.map +1 -1
- package/lib/components/timeline/src/timeline-item2.js +73 -39
- package/lib/components/timeline/src/timeline-item2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +2 -2
- package/lib/components/tooltip/src/tooltip2.js +1 -1
- package/lib/components/tooltip/src/trigger.js +1 -1
- package/lib/components/tooltip-v2/index.js +2 -2
- package/lib/components/tooltip-v2/src/arrow.js +23 -38
- package/lib/components/tooltip-v2/src/arrow.js.map +1 -1
- package/lib/components/tooltip-v2/src/arrow2.js +38 -23
- package/lib/components/tooltip-v2/src/arrow2.js.map +1 -1
- package/lib/components/tooltip-v2/src/root.js +81 -17
- package/lib/components/tooltip-v2/src/root.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +17 -81
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +4 -4
- package/lib/components/tooltip-v2/src/tooltip2.js +2 -2
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-content.js +46 -15
- package/lib/components/upload/src/upload-content.js.map +1 -1
- package/lib/components/upload/src/upload-content2.js +15 -46
- package/lib/components/upload/src/upload-content2.js.map +1 -1
- package/lib/components/upload/src/upload2.js +1 -1
- package/lib/index.js +25 -25
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -1,79 +1,45 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import '../../../
|
|
4
|
-
import { timelineItemProps } from './timeline-item2.mjs';
|
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { buildProps } from '../../../utils/vue/props.mjs';
|
|
3
|
+
import { iconPropType } from '../../../utils/vue/icon.mjs';
|
|
7
4
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
const timelineItemProps = buildProps({
|
|
6
|
+
timestamp: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: ""
|
|
12
9
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
hideTimestamp: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: false
|
|
13
|
+
},
|
|
14
|
+
center: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false
|
|
17
|
+
},
|
|
18
|
+
placement: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "bottom"
|
|
21
|
+
},
|
|
22
|
+
type: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: ""
|
|
25
|
+
},
|
|
26
|
+
color: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: ""
|
|
29
|
+
},
|
|
30
|
+
size: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "normal"
|
|
33
|
+
},
|
|
34
|
+
icon: {
|
|
35
|
+
type: iconPropType,
|
|
36
|
+
default: ""
|
|
37
|
+
},
|
|
38
|
+
hollow: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: false
|
|
19
41
|
}
|
|
20
42
|
});
|
|
21
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
22
|
-
const _component_ps_icon = resolveComponent("ps-icon");
|
|
23
|
-
return openBlock(), createElementBlock("li", {
|
|
24
|
-
class: normalizeClass([_ctx.ns.b(), { [_ctx.ns.e("center")]: _ctx.center }])
|
|
25
|
-
}, [
|
|
26
|
-
createElementVNode("div", {
|
|
27
|
-
class: normalizeClass(_ctx.ns.e("tail"))
|
|
28
|
-
}, null, 2),
|
|
29
|
-
!_ctx.$slots.dot ? (openBlock(), createElementBlock("div", {
|
|
30
|
-
key: 0,
|
|
31
|
-
class: normalizeClass([
|
|
32
|
-
_ctx.ns.e("node"),
|
|
33
|
-
_ctx.ns.em("node", _ctx.size || ""),
|
|
34
|
-
_ctx.ns.em("node", _ctx.type || ""),
|
|
35
|
-
_ctx.ns.is("hollow", _ctx.hollow)
|
|
36
|
-
]),
|
|
37
|
-
style: normalizeStyle({
|
|
38
|
-
backgroundColor: _ctx.color
|
|
39
|
-
})
|
|
40
|
-
}, [
|
|
41
|
-
_ctx.icon ? (openBlock(), createBlock(_component_ps_icon, {
|
|
42
|
-
key: 0,
|
|
43
|
-
class: normalizeClass(_ctx.ns.e("icon"))
|
|
44
|
-
}, {
|
|
45
|
-
default: withCtx(() => [
|
|
46
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
|
|
47
|
-
]),
|
|
48
|
-
_: 1
|
|
49
|
-
}, 8, ["class"])) : createCommentVNode("v-if", true)
|
|
50
|
-
], 6)) : createCommentVNode("v-if", true),
|
|
51
|
-
_ctx.$slots.dot ? (openBlock(), createElementBlock("div", {
|
|
52
|
-
key: 1,
|
|
53
|
-
class: normalizeClass(_ctx.ns.e("dot"))
|
|
54
|
-
}, [
|
|
55
|
-
renderSlot(_ctx.$slots, "dot")
|
|
56
|
-
], 2)) : createCommentVNode("v-if", true),
|
|
57
|
-
createElementVNode("div", {
|
|
58
|
-
class: normalizeClass(_ctx.ns.e("wrapper"))
|
|
59
|
-
}, [
|
|
60
|
-
!_ctx.hideTimestamp && _ctx.placement === "top" ? (openBlock(), createElementBlock("div", {
|
|
61
|
-
key: 0,
|
|
62
|
-
class: normalizeClass([_ctx.ns.e("timestamp"), _ctx.ns.is("top")])
|
|
63
|
-
}, toDisplayString(_ctx.timestamp), 3)) : createCommentVNode("v-if", true),
|
|
64
|
-
createElementVNode("div", {
|
|
65
|
-
class: normalizeClass(_ctx.ns.e("content"))
|
|
66
|
-
}, [
|
|
67
|
-
renderSlot(_ctx.$slots, "default")
|
|
68
|
-
], 2),
|
|
69
|
-
!_ctx.hideTimestamp && _ctx.placement === "bottom" ? (openBlock(), createElementBlock("div", {
|
|
70
|
-
key: 1,
|
|
71
|
-
class: normalizeClass([_ctx.ns.e("timestamp"), _ctx.ns.is("bottom")])
|
|
72
|
-
}, toDisplayString(_ctx.timestamp), 3)) : createCommentVNode("v-if", true)
|
|
73
|
-
], 2)
|
|
74
|
-
], 2);
|
|
75
|
-
}
|
|
76
|
-
var TimelineItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/meng/workspace/element-ps/packages/components/timeline/src/timeline-item.vue"]]);
|
|
77
43
|
|
|
78
|
-
export {
|
|
44
|
+
export { timelineItemProps };
|
|
79
45
|
//# sourceMappingURL=timeline-item.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline-item.mjs","sources":["../../../../../../packages/components/timeline/src/timeline-item.
|
|
1
|
+
{"version":3,"file":"timeline-item.mjs","sources":["../../../../../../packages/components/timeline/src/timeline-item.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-ps/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type TimelineItem from './timeline-item.vue'\n\nexport const timelineItemProps = buildProps({\n timestamp: {\n type: String,\n default: '',\n },\n hideTimestamp: {\n type: Boolean,\n default: false,\n },\n center: {\n type: Boolean,\n default: false,\n },\n placement: {\n type: String,\n default: 'bottom',\n },\n type: {\n type: String,\n default: '',\n },\n color: {\n type: String,\n default: '',\n },\n size: {\n type: String,\n default: 'normal',\n },\n icon: {\n type: iconPropType,\n default: '',\n },\n hollow: {\n type: Boolean,\n default: false,\n },\n} as const)\nexport type TimelineItemProps = ExtractPropTypes<typeof timelineItemProps>\n\nexport type TimelineItemInstance = InstanceType<typeof TimelineItem>\n"],"names":[],"mappings":";;;;AACY,MAAC,iBAAiB,GAAG,UAAU,CAAC;AAC5C,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,QAAQ;AACrB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,YAAY;AACtB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,45 +1,79 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, createBlock, withCtx, resolveDynamicComponent, createCommentVNode, renderSlot, toDisplayString } from 'vue';
|
|
2
|
+
import { PsIcon } from '../../icon/index.mjs';
|
|
3
|
+
import '../../../hooks/index.mjs';
|
|
4
|
+
import { timelineItemProps } from './timeline-item.mjs';
|
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
4
7
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
const _sfc_main = defineComponent({
|
|
9
|
+
name: "PsTimelineItem",
|
|
10
|
+
components: {
|
|
11
|
+
PsIcon
|
|
9
12
|
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
default: false
|
|
17
|
-
},
|
|
18
|
-
placement: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: "bottom"
|
|
21
|
-
},
|
|
22
|
-
type: {
|
|
23
|
-
type: String,
|
|
24
|
-
default: ""
|
|
25
|
-
},
|
|
26
|
-
color: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: ""
|
|
29
|
-
},
|
|
30
|
-
size: {
|
|
31
|
-
type: String,
|
|
32
|
-
default: "normal"
|
|
33
|
-
},
|
|
34
|
-
icon: {
|
|
35
|
-
type: iconPropType,
|
|
36
|
-
default: ""
|
|
37
|
-
},
|
|
38
|
-
hollow: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
default: false
|
|
13
|
+
props: timelineItemProps,
|
|
14
|
+
setup() {
|
|
15
|
+
const ns = useNamespace("timeline-item");
|
|
16
|
+
return {
|
|
17
|
+
ns
|
|
18
|
+
};
|
|
41
19
|
}
|
|
42
20
|
});
|
|
21
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
22
|
+
const _component_ps_icon = resolveComponent("ps-icon");
|
|
23
|
+
return openBlock(), createElementBlock("li", {
|
|
24
|
+
class: normalizeClass([_ctx.ns.b(), { [_ctx.ns.e("center")]: _ctx.center }])
|
|
25
|
+
}, [
|
|
26
|
+
createElementVNode("div", {
|
|
27
|
+
class: normalizeClass(_ctx.ns.e("tail"))
|
|
28
|
+
}, null, 2),
|
|
29
|
+
!_ctx.$slots.dot ? (openBlock(), createElementBlock("div", {
|
|
30
|
+
key: 0,
|
|
31
|
+
class: normalizeClass([
|
|
32
|
+
_ctx.ns.e("node"),
|
|
33
|
+
_ctx.ns.em("node", _ctx.size || ""),
|
|
34
|
+
_ctx.ns.em("node", _ctx.type || ""),
|
|
35
|
+
_ctx.ns.is("hollow", _ctx.hollow)
|
|
36
|
+
]),
|
|
37
|
+
style: normalizeStyle({
|
|
38
|
+
backgroundColor: _ctx.color
|
|
39
|
+
})
|
|
40
|
+
}, [
|
|
41
|
+
_ctx.icon ? (openBlock(), createBlock(_component_ps_icon, {
|
|
42
|
+
key: 0,
|
|
43
|
+
class: normalizeClass(_ctx.ns.e("icon"))
|
|
44
|
+
}, {
|
|
45
|
+
default: withCtx(() => [
|
|
46
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))
|
|
47
|
+
]),
|
|
48
|
+
_: 1
|
|
49
|
+
}, 8, ["class"])) : createCommentVNode("v-if", true)
|
|
50
|
+
], 6)) : createCommentVNode("v-if", true),
|
|
51
|
+
_ctx.$slots.dot ? (openBlock(), createElementBlock("div", {
|
|
52
|
+
key: 1,
|
|
53
|
+
class: normalizeClass(_ctx.ns.e("dot"))
|
|
54
|
+
}, [
|
|
55
|
+
renderSlot(_ctx.$slots, "dot")
|
|
56
|
+
], 2)) : createCommentVNode("v-if", true),
|
|
57
|
+
createElementVNode("div", {
|
|
58
|
+
class: normalizeClass(_ctx.ns.e("wrapper"))
|
|
59
|
+
}, [
|
|
60
|
+
!_ctx.hideTimestamp && _ctx.placement === "top" ? (openBlock(), createElementBlock("div", {
|
|
61
|
+
key: 0,
|
|
62
|
+
class: normalizeClass([_ctx.ns.e("timestamp"), _ctx.ns.is("top")])
|
|
63
|
+
}, toDisplayString(_ctx.timestamp), 3)) : createCommentVNode("v-if", true),
|
|
64
|
+
createElementVNode("div", {
|
|
65
|
+
class: normalizeClass(_ctx.ns.e("content"))
|
|
66
|
+
}, [
|
|
67
|
+
renderSlot(_ctx.$slots, "default")
|
|
68
|
+
], 2),
|
|
69
|
+
!_ctx.hideTimestamp && _ctx.placement === "bottom" ? (openBlock(), createElementBlock("div", {
|
|
70
|
+
key: 1,
|
|
71
|
+
class: normalizeClass([_ctx.ns.e("timestamp"), _ctx.ns.is("bottom")])
|
|
72
|
+
}, toDisplayString(_ctx.timestamp), 3)) : createCommentVNode("v-if", true)
|
|
73
|
+
], 2)
|
|
74
|
+
], 2);
|
|
75
|
+
}
|
|
76
|
+
var TimelineItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/meng/workspace/element-ps/packages/components/timeline/src/timeline-item.vue"]]);
|
|
43
77
|
|
|
44
|
-
export {
|
|
78
|
+
export { TimelineItem as default };
|
|
45
79
|
//# sourceMappingURL=timeline-item2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline-item2.mjs","sources":["../../../../../../packages/components/timeline/src/timeline-item.
|
|
1
|
+
{"version":3,"file":"timeline-item2.mjs","sources":["../../../../../../packages/components/timeline/src/timeline-item.vue"],"sourcesContent":["<template>\n <li :class=\"[ns.b(), { [ns.e('center')]: center }]\">\n <div :class=\"ns.e('tail')\" />\n <div\n v-if=\"!$slots.dot\"\n :class=\"[\n ns.e('node'),\n ns.em('node', size || ''),\n ns.em('node', type || ''),\n ns.is('hollow', hollow),\n ]\"\n :style=\"{\n backgroundColor: color,\n }\"\n >\n <ps-icon v-if=\"icon\" :class=\"ns.e('icon')\">\n <component :is=\"icon\" />\n </ps-icon>\n </div>\n <div v-if=\"$slots.dot\" :class=\"ns.e('dot')\">\n <slot name=\"dot\" />\n </div>\n\n <div :class=\"ns.e('wrapper')\">\n <div\n v-if=\"!hideTimestamp && placement === 'top'\"\n :class=\"[ns.e('timestamp'), ns.is('top')]\"\n >\n {{ timestamp }}\n </div>\n\n <div :class=\"ns.e('content')\">\n <slot />\n </div>\n\n <div\n v-if=\"!hideTimestamp && placement === 'bottom'\"\n :class=\"[ns.e('timestamp'), ns.is('bottom')]\"\n >\n {{ timestamp }}\n </div>\n </div>\n </li>\n</template>\n\n<script lang=\"ts\">\nimport { defineComponent } from 'vue'\nimport { PsIcon } from '@element-ps/components/icon'\nimport { useNamespace } from '@element-ps/hooks'\nimport { timelineItemProps } from './timeline-item'\n\nexport default defineComponent({\n name: 'PsTimelineItem',\n components: {\n PsIcon,\n },\n props: timelineItemProps,\n setup() {\n const ns = useNamespace('timeline-item')\n return {\n ns,\n }\n },\n})\n</script>\n"],"names":["_createElementBlock","_normalizeClass","_createElementVNode","_normalizeStyle","_openBlock","_createBlock","_resolveDynamicComponent","_renderSlot","_createCommentVNode","_toDisplayString"],"mappings":"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"}
|
|
@@ -3,9 +3,9 @@ import '../../popper/index.mjs';
|
|
|
3
3
|
import '../../../hooks/index.mjs';
|
|
4
4
|
import { buildProps, definePropType } from '../../../utils/vue/props.mjs';
|
|
5
5
|
import { useDelayedToggleProps } from '../../../hooks/use-delayed-toggle/index.mjs';
|
|
6
|
-
import { usePopperContentProps } from '../../popper/src/
|
|
6
|
+
import { usePopperContentProps } from '../../popper/src/content.mjs';
|
|
7
7
|
import { POPPER_CONTAINER_SELECTOR } from '../../../hooks/use-popper-container/index.mjs';
|
|
8
|
-
import { usePopperTriggerProps } from '../../popper/src/
|
|
8
|
+
import { usePopperTriggerProps } from '../../popper/src/trigger.mjs';
|
|
9
9
|
|
|
10
10
|
const triggers = ["hover", "focus", "click", "contextmenu"];
|
|
11
11
|
const useTooltipContentProps = buildProps({
|
|
@@ -7,7 +7,7 @@ import { useTooltipContentProps, useTooltipTriggerProps, useTooltipProps } from
|
|
|
7
7
|
import { TOOLTIP_INJECTION_KEY } from './tokens.mjs';
|
|
8
8
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
9
9
|
import { createModelToggleComposable } from '../../../hooks/use-model-toggle/index.mjs';
|
|
10
|
-
import { usePopperArrowProps } from '../../popper/src/
|
|
10
|
+
import { usePopperArrowProps } from '../../popper/src/arrow2.mjs';
|
|
11
11
|
import { usePopperContainer } from '../../../hooks/use-popper-container/index.mjs';
|
|
12
12
|
import { useId } from '../../../hooks/use-id/index.mjs';
|
|
13
13
|
import { isBoolean } from '@vueuse/core';
|
|
@@ -4,7 +4,7 @@ import '../../../hooks/index.mjs';
|
|
|
4
4
|
import { TOOLTIP_INJECTION_KEY } from './tokens.mjs';
|
|
5
5
|
import { useTooltipTriggerProps } from './tooltip.mjs';
|
|
6
6
|
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
-
import PsPopperTrigger from '../../popper/src/
|
|
7
|
+
import PsPopperTrigger from '../../popper/src/trigger2.mjs';
|
|
8
8
|
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
9
9
|
|
|
10
10
|
const _sfc_main = defineComponent({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
2
|
import TooltipV2 from './src/tooltip.mjs';
|
|
3
|
-
export { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './src/
|
|
3
|
+
export { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './src/arrow.mjs';
|
|
4
4
|
export { tooltipV2ContentProps } from './src/content.mjs';
|
|
5
|
-
export { tooltipV2RootProps } from './src/
|
|
5
|
+
export { tooltipV2RootProps } from './src/root2.mjs';
|
|
6
6
|
export { tooltipV2Props } from './src/tooltip2.mjs';
|
|
7
7
|
export { tooltipV2TriggerProps } from './src/trigger.mjs';
|
|
8
8
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
@@ -1,44 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '
|
|
3
|
-
import {
|
|
4
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
-
import { tooltipV2RootKey, tooltipV2ContentKey } from '../../../tokens/tooltip-v2.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { tooltipV2Sides } from './common.mjs';
|
|
3
|
+
import { buildProps, definePropType } from '../../../utils/vue/props.mjs';
|
|
6
4
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
...__default__,
|
|
12
|
-
props: {
|
|
13
|
-
...tooltipV2ArrowProps,
|
|
14
|
-
...tooltipV2ArrowSpecialProps
|
|
5
|
+
const tooltipV2ArrowProps = buildProps({
|
|
6
|
+
width: {
|
|
7
|
+
type: Number,
|
|
8
|
+
default: 10
|
|
15
9
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
});
|
|
31
|
-
return (_ctx, _cache) => {
|
|
32
|
-
return openBlock(), createElementBlock("span", {
|
|
33
|
-
ref_key: "arrowRef",
|
|
34
|
-
ref: arrowRef,
|
|
35
|
-
style: normalizeStyle(unref(arrowStyle)),
|
|
36
|
-
class: normalizeClass(unref(ns).e("arrow"))
|
|
37
|
-
}, null, 6);
|
|
38
|
-
};
|
|
10
|
+
height: {
|
|
11
|
+
type: Number,
|
|
12
|
+
default: 10
|
|
13
|
+
},
|
|
14
|
+
style: {
|
|
15
|
+
type: definePropType(Object),
|
|
16
|
+
default: null
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const tooltipV2ArrowSpecialProps = buildProps({
|
|
20
|
+
side: {
|
|
21
|
+
type: definePropType(String),
|
|
22
|
+
values: tooltipV2Sides,
|
|
23
|
+
required: true
|
|
39
24
|
}
|
|
40
25
|
});
|
|
41
|
-
var TooltipV2Arrow = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/tooltip-v2/src/arrow.vue"]]);
|
|
42
26
|
|
|
43
|
-
export {
|
|
27
|
+
export { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps };
|
|
44
28
|
//# sourceMappingURL=arrow.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.
|
|
1
|
+
{"version":3,"file":"arrow.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-ps/utils'\nimport { tooltipV2Sides } from './common'\n\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type { TooltipV2Sides } from './common'\n\nexport const tooltipV2ArrowProps = buildProps({\n width: {\n type: Number,\n default: 10,\n },\n height: {\n type: Number,\n default: 10,\n },\n style: {\n type: definePropType<CSSProperties | null>(Object),\n default: null,\n },\n} as const)\n\nexport const tooltipV2ArrowSpecialProps = buildProps({\n side: {\n type: definePropType<TooltipV2Sides>(String),\n values: tooltipV2Sides,\n required: true,\n },\n} as const)\n\nexport type TooltipV2ArrowProps = ExtractPropTypes<typeof tooltipV2ArrowProps>\n"],"names":[],"mappings":";;;;AAEY,MAAC,mBAAmB,GAAG,UAAU,CAAC;AAC9C,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,0BAA0B,GAAG,UAAU,CAAC;AACrD,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC;AAChC,IAAI,MAAM,EAAE,cAAc;AAC1B,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,28 +1,44 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent, inject, computed, openBlock, createElementBlock, normalizeStyle, unref, normalizeClass } from 'vue';
|
|
2
|
+
import '../../../tokens/index.mjs';
|
|
3
|
+
import { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './arrow.mjs';
|
|
4
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
5
|
+
import { tooltipV2RootKey, tooltipV2ContentKey } from '../../../tokens/tooltip-v2.mjs';
|
|
4
6
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const __default__ = {
|
|
8
|
+
name: "PsTooltipV2Arrow"
|
|
9
|
+
};
|
|
10
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
11
|
+
...__default__,
|
|
12
|
+
props: {
|
|
13
|
+
...tooltipV2ArrowProps,
|
|
14
|
+
...tooltipV2ArrowSpecialProps
|
|
9
15
|
},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
setup(__props) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
const { ns } = inject(tooltipV2RootKey);
|
|
19
|
+
const { arrowRef } = inject(tooltipV2ContentKey);
|
|
20
|
+
const arrowStyle = computed(() => {
|
|
21
|
+
const { style, width, height } = props;
|
|
22
|
+
const namespace = ns.namespace.value;
|
|
23
|
+
return {
|
|
24
|
+
[`--${namespace}-tooltip-v2-arrow-width`]: `${width}px`,
|
|
25
|
+
[`--${namespace}-tooltip-v2-arrow-height`]: `${height}px`,
|
|
26
|
+
[`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`,
|
|
27
|
+
[`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1,
|
|
28
|
+
...style || {}
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
return (_ctx, _cache) => {
|
|
32
|
+
return openBlock(), createElementBlock("span", {
|
|
33
|
+
ref_key: "arrowRef",
|
|
34
|
+
ref: arrowRef,
|
|
35
|
+
style: normalizeStyle(unref(arrowStyle)),
|
|
36
|
+
class: normalizeClass(unref(ns).e("arrow"))
|
|
37
|
+
}, null, 6);
|
|
38
|
+
};
|
|
24
39
|
}
|
|
25
40
|
});
|
|
41
|
+
var TooltipV2Arrow = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/tooltip-v2/src/arrow.vue"]]);
|
|
26
42
|
|
|
27
|
-
export {
|
|
43
|
+
export { TooltipV2Arrow as default };
|
|
28
44
|
//# sourceMappingURL=arrow2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow2.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.
|
|
1
|
+
{"version":3,"file":"arrow2.mjs","sources":["../../../../../../packages/components/tooltip-v2/src/arrow.vue"],"sourcesContent":["<template>\n <span ref=\"arrowRef\" :style=\"arrowStyle\" :class=\"ns.e('arrow')\" />\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject } from 'vue'\nimport { tooltipV2ContentKey, tooltipV2RootKey } from '@element-ps/tokens'\nimport { tooltipV2ArrowProps, tooltipV2ArrowSpecialProps } from './arrow'\n\nimport type { CSSProperties } from 'vue'\n\ndefineOptions({\n name: 'PsTooltipV2Arrow',\n})\n\nconst props = defineProps({\n ...tooltipV2ArrowProps,\n ...tooltipV2ArrowSpecialProps,\n})\n\nconst { ns } = inject(tooltipV2RootKey)!\nconst { arrowRef } = inject(tooltipV2ContentKey)!\n\nconst arrowStyle = computed<CSSProperties>(() => {\n const { style, width, height } = props\n const namespace = ns.namespace.value\n\n return {\n [`--${namespace}-tooltip-v2-arrow-width`]: `${width}px`,\n [`--${namespace}-tooltip-v2-arrow-height`]: `${height}px`,\n [`--${namespace}-tooltip-v2-arrow-border-width`]: `${width / 2}px`,\n [`--${namespace}-tooltip-v2-arrow-cover-width`]: width / 2 - 1,\n ...(style || {}),\n }\n})\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAoBA,IAAA,MAAA,EAAA,EAAA,EAAA,GAAA,MAAA,CAAA,gBAAA,CAAA,CAAA;AACA,IAAA,MAAA,EAAA,QAAA,EAAA,GAAA,MAAA,CAAA,mBAAA,CAAA,CAAA;AAEA,IAAA,MAAA,UAAA,GAAA,SAAA,MAAA;AACA,MAAA,MAAA,EAAA,KAAA,EAAA,KAAA,EAAA,MAAA,EAAA,GAAA,KAAA,CAAA;AACA,MAAA,MAAA,SAAA,GAAA,GAAA,SAAA,CAAA,KAAA,CAAA;AAEA,MAAA,OAAA;AAAA,QACA,CAAA,CAAA,EAAA,EAAA,qCAAA,CAAA,EAAA,KAAA,CAAA,EAAA,CAAA;AAAA,QACA,CAAA,CAAA,EAAA,EAAA,sCAAA,CAAA,EAAA,MAAA,CAAA,EAAA,CAAA;AAAA,QACA,CAAA,CAAA,EAAA,EAAA,SAAA,CAAA,8BAAA,CAAA,GAAA,CAAA,EAAA,KAAA,GAAA,CAAA,CAAA,EAAA,CAAA;AAAA,QACA,CAAA,CAAA,EAAA,EAAA,SAAA,CAAA,6BAAA,CAAA,GAAA,KAAA,GAAA,CAAA,GAAA,CAAA;AAAA,QAAA,GACA,SAAA,EAAA;AAAA,OACA,CAAA;AAAA,KACA,CAAA,CAAA;;;;;;;;;;;;;;;"}
|
|
@@ -1,23 +1,87 @@
|
|
|
1
|
+
import { defineComponent, ref, computed, unref, watch, onMounted, onBeforeUnmount, provide, renderSlot } from 'vue';
|
|
2
|
+
import { isNumber, useTimeoutFn } from '@vueuse/core';
|
|
3
|
+
import '../../../hooks/index.mjs';
|
|
1
4
|
import '../../../utils/index.mjs';
|
|
2
|
-
import
|
|
5
|
+
import '../../../tokens/index.mjs';
|
|
6
|
+
import { tooltipV2RootProps } from './root2.mjs';
|
|
7
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
8
|
+
import { isPropAbsent } from '../../../utils/types.mjs';
|
|
9
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
10
|
+
import { useId } from '../../../hooks/use-id/index.mjs';
|
|
11
|
+
import { TOOLTIP_V2_OPEN, tooltipV2RootKey } from '../../../tokens/tooltip-v2.mjs';
|
|
3
12
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
const __default__ = {
|
|
14
|
+
name: "PsTooltipV2Root"
|
|
15
|
+
};
|
|
16
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
|
+
...__default__,
|
|
18
|
+
props: tooltipV2RootProps,
|
|
19
|
+
setup(__props, { expose }) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const _open = ref(props.defaultOpen);
|
|
22
|
+
const triggerRef = ref(null);
|
|
23
|
+
const open = computed({
|
|
24
|
+
get: () => isPropAbsent(props.open) ? _open.value : props.open,
|
|
25
|
+
set: (open2) => {
|
|
26
|
+
var _a;
|
|
27
|
+
_open.value = open2;
|
|
28
|
+
(_a = props["onUpdate:open"]) == null ? void 0 : _a.call(props, open2);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const isOpenDelayed = computed(() => isNumber(props.delayDuration) && props.delayDuration > 0);
|
|
32
|
+
const { start: onDelayedOpen, stop: clearTimer } = useTimeoutFn(() => {
|
|
33
|
+
open.value = true;
|
|
34
|
+
}, computed(() => props.delayDuration), {
|
|
35
|
+
immediate: false
|
|
36
|
+
});
|
|
37
|
+
const ns = useNamespace("tooltip-v2");
|
|
38
|
+
const contentId = useId();
|
|
39
|
+
const onNormalOpen = () => {
|
|
40
|
+
clearTimer();
|
|
41
|
+
open.value = true;
|
|
42
|
+
};
|
|
43
|
+
const onDelayOpen = () => {
|
|
44
|
+
unref(isOpenDelayed) ? onDelayedOpen() : onNormalOpen();
|
|
45
|
+
};
|
|
46
|
+
const onOpen = onNormalOpen;
|
|
47
|
+
const onClose = () => {
|
|
48
|
+
clearTimer();
|
|
49
|
+
open.value = false;
|
|
50
|
+
};
|
|
51
|
+
const onChange = (open2) => {
|
|
52
|
+
var _a;
|
|
53
|
+
if (open2) {
|
|
54
|
+
document.dispatchEvent(new CustomEvent(TOOLTIP_V2_OPEN));
|
|
55
|
+
onOpen();
|
|
56
|
+
}
|
|
57
|
+
(_a = props.onOpenChange) == null ? void 0 : _a.call(props, open2);
|
|
58
|
+
};
|
|
59
|
+
watch(open, onChange);
|
|
60
|
+
onMounted(() => {
|
|
61
|
+
document.addEventListener(TOOLTIP_V2_OPEN, onClose);
|
|
62
|
+
});
|
|
63
|
+
onBeforeUnmount(() => {
|
|
64
|
+
clearTimer();
|
|
65
|
+
document.removeEventListener(TOOLTIP_V2_OPEN, onClose);
|
|
66
|
+
});
|
|
67
|
+
provide(tooltipV2RootKey, {
|
|
68
|
+
contentId,
|
|
69
|
+
triggerRef,
|
|
70
|
+
ns,
|
|
71
|
+
onClose,
|
|
72
|
+
onDelayOpen,
|
|
73
|
+
onOpen
|
|
74
|
+
});
|
|
75
|
+
expose({
|
|
76
|
+
onOpen,
|
|
77
|
+
onClose
|
|
78
|
+
});
|
|
79
|
+
return (_ctx, _cache) => {
|
|
80
|
+
return renderSlot(_ctx.$slots, "default", { open: unref(open) });
|
|
81
|
+
};
|
|
19
82
|
}
|
|
20
83
|
});
|
|
84
|
+
var TooltipV2Root = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/tooltip-v2/src/root.vue"]]);
|
|
21
85
|
|
|
22
|
-
export {
|
|
86
|
+
export { TooltipV2Root as default };
|
|
23
87
|
//# sourceMappingURL=root.mjs.map
|