@expcat/tigercat-vue 2.1.0 → 2.1.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/dist/{chunk-7W3NALIL.mjs → chunk-3FPS7XVB.mjs} +26 -27
- package/dist/{chunk-2OI6GWOT.mjs → chunk-3KAHJF7D.mjs} +12 -11
- package/dist/{chunk-IEAEB4TX.mjs → chunk-3OCHBGPF.mjs} +242 -51
- package/dist/{chunk-4HUYX5WW.mjs → chunk-4PQZMDBK.mjs} +29 -8
- package/dist/{chunk-DI6RRAGQ.mjs → chunk-562Z32GR.mjs} +3 -3
- package/dist/{chunk-OQVGB7X6.mjs → chunk-626VUZ2Q.mjs} +1 -1
- package/dist/{chunk-66OS5A4D.mjs → chunk-67VS6QHJ.mjs} +26 -12
- package/dist/{chunk-EHGFW5GX.mjs → chunk-6JAAXPBW.mjs} +4 -3
- package/dist/{chunk-JHMT5Q6P.mjs → chunk-6NYC7EY2.mjs} +29 -15
- package/dist/{chunk-6BDDX2R4.mjs → chunk-73Z7N7VG.mjs} +1 -4
- package/dist/{chunk-F3ZVVVYD.mjs → chunk-7C7SG3SS.mjs} +15 -3
- package/dist/{chunk-CHEXI7MO.mjs → chunk-7TJE7OYH.mjs} +4 -3
- package/dist/{chunk-AU6IC6K7.mjs → chunk-ABNS4B5V.mjs} +35 -15
- package/dist/{chunk-EGIMTTZA.mjs → chunk-BOHE5URZ.mjs} +18 -3
- package/dist/{chunk-5RIHHZF6.mjs → chunk-BQK7LH2L.mjs} +4 -1
- package/dist/{chunk-E6EZHSGY.mjs → chunk-BSOLH6R5.mjs} +0 -1
- package/dist/{chunk-RSM6FOWX.mjs → chunk-CCC3S6LK.mjs} +6 -3
- package/dist/{chunk-U75YXWSA.mjs → chunk-CLTRADS7.mjs} +17 -5
- package/dist/{chunk-BEIPGX74.mjs → chunk-DRLQCY7R.mjs} +162 -7
- package/dist/{chunk-KBJANUZZ.mjs → chunk-E523VGZP.mjs} +1 -1
- package/dist/{chunk-D3U2NJ32.mjs → chunk-FEQ7PZXI.mjs} +8 -2
- package/dist/{chunk-PE5OA4YG.mjs → chunk-FHUGOSEY.mjs} +8 -2
- package/dist/{chunk-OAPIT53X.mjs → chunk-FIEECAJV.mjs} +7 -10
- package/dist/{chunk-7SFB77JR.mjs → chunk-GBPMQJJJ.mjs} +8 -1
- package/dist/{chunk-6AMWX5K4.mjs → chunk-GQOPDD44.mjs} +1 -1
- package/dist/{chunk-5RXYJWNA.mjs → chunk-H4DEIGEG.mjs} +77 -25
- package/dist/{chunk-EZYOCPMM.mjs → chunk-IK2WHKDA.mjs} +29 -15
- package/dist/{chunk-HGXD57QM.mjs → chunk-JBS3AESR.mjs} +65 -23
- package/dist/{chunk-PYRKFQ6J.mjs → chunk-JIU5UEOU.mjs} +70 -26
- package/dist/{chunk-JALHMWKW.mjs → chunk-K5MHUMKR.mjs} +2 -2
- package/dist/{chunk-5E4LINDO.mjs → chunk-LH2V2JMZ.mjs} +26 -10
- package/dist/{chunk-PQBKN2NH.mjs → chunk-LRFKHJDU.mjs} +14 -5
- package/dist/{chunk-W5XFWVNV.mjs → chunk-M4FWWEMX.mjs} +15 -6
- package/dist/{chunk-VLW3UBIR.mjs → chunk-N2XV37BL.mjs} +37 -41
- package/dist/{chunk-2LIIMWBR.mjs → chunk-OYU47A57.mjs} +1 -2
- package/dist/{chunk-KU2Q5V3L.mjs → chunk-P62TYR3M.mjs} +18 -2
- package/dist/{chunk-P5FDKBXG.mjs → chunk-P7X46BAW.mjs} +70 -3
- package/dist/{chunk-KROVW4AW.mjs → chunk-PJQTRDIG.mjs} +13 -3
- package/dist/{chunk-26OI3TEA.mjs → chunk-PMQSXEMT.mjs} +42 -6
- package/dist/{chunk-XLNK3Z2P.mjs → chunk-POWDTOMF.mjs} +88 -79
- package/dist/{chunk-AXDBME5A.mjs → chunk-PSGVG4TN.mjs} +38 -21
- package/dist/{chunk-7DWWNFRP.mjs → chunk-PWWWACHC.mjs} +1 -1
- package/dist/{chunk-UUWTKCMY.mjs → chunk-QWLD5FMJ.mjs} +1 -1
- package/dist/{chunk-ALIUAGJO.mjs → chunk-QZLOF36M.mjs} +7 -13
- package/dist/{chunk-WLYQHKLZ.mjs → chunk-QZRSFGZZ.mjs} +50 -11
- package/dist/{chunk-37W7XTA6.mjs → chunk-RHQWQJ4I.mjs} +4 -3
- package/dist/{chunk-32X54QKW.mjs → chunk-RRLE7QRH.mjs} +43 -22
- package/dist/{chunk-RID7A5V7.mjs → chunk-RRNQL6MJ.mjs} +23 -6
- package/dist/{chunk-VJ6YM2EW.mjs → chunk-S4BKVFQ7.mjs} +1 -1
- package/dist/{chunk-LPZBXTJ6.mjs → chunk-SAC4PAG3.mjs} +4 -4
- package/dist/{chunk-W5RZPTFD.mjs → chunk-SNNT64HK.mjs} +13 -2
- package/dist/{chunk-N3C6YI7I.mjs → chunk-SWMYIORV.mjs} +22 -7
- package/dist/{chunk-U4B5QT72.mjs → chunk-SX3NAN4M.mjs} +1 -1
- package/dist/{chunk-JL3CN4UK.mjs → chunk-TDBMAKTJ.mjs} +10 -3
- package/dist/chunk-UEGNXN5B.mjs +28 -0
- package/dist/{chunk-NEEGXKJW.mjs → chunk-UGHLEKEZ.mjs} +22 -3
- package/dist/{chunk-HKYRRQS7.mjs → chunk-UNQO7EVG.mjs} +1 -1
- package/dist/{chunk-VN2TWPRC.mjs → chunk-UR5F74ZB.mjs} +112 -18
- package/dist/{chunk-VCCK4CDT.mjs → chunk-URPXBKK4.mjs} +23 -5
- package/dist/{chunk-7KCOF5US.mjs → chunk-VY6FVIOZ.mjs} +10 -8
- package/dist/{chunk-KICZSLOX.mjs → chunk-W2ICYZVU.mjs} +1 -1
- package/dist/{chunk-FIVVKBBF.mjs → chunk-W3QOMJKQ.mjs} +8 -6
- package/dist/{chunk-DCMRB3HR.mjs → chunk-WV25G4M3.mjs} +4 -3
- package/dist/{chunk-ZOYHZF4N.mjs → chunk-X5LJT76O.mjs} +49 -32
- package/dist/{chunk-BNYA5IUB.mjs → chunk-YNXP34KO.mjs} +39 -38
- package/dist/{chunk-2T2NEZRZ.mjs → chunk-YVDTXHQ6.mjs} +1 -1
- package/dist/{chunk-AUMTHL6N.mjs → chunk-ZOP7PEKY.mjs} +2 -1
- package/dist/components/ActivityFeed.d.mts +29 -11
- package/dist/components/ActivityFeed.mjs +2 -2
- package/dist/components/Affix.mjs +1 -1
- package/dist/components/Alert.d.mts +2 -2
- package/dist/components/Anchor.d.mts +1 -1
- package/dist/components/Anchor.mjs +1 -1
- package/dist/components/AreaChart.d.mts +3 -3
- package/dist/components/AreaChart.mjs +4 -3
- package/dist/components/AutoComplete.d.mts +5 -5
- package/dist/components/AutoComplete.mjs +1 -1
- package/dist/components/Avatar.d.mts +1 -1
- package/dist/components/AvatarGroup.d.mts +1 -1
- package/dist/components/BackTop.d.mts +2 -2
- package/dist/components/Badge.d.mts +4 -4
- package/dist/components/BarChart.d.mts +2 -2
- package/dist/components/BarChart.mjs +4 -3
- package/dist/components/Breadcrumb.d.mts +3 -3
- package/dist/components/Button.d.mts +3 -3
- package/dist/components/ButtonGroup.d.mts +1 -1
- package/dist/components/Calendar.d.mts +1 -1
- package/dist/components/Calendar.mjs +1 -1
- package/dist/components/Card.d.mts +2 -2
- package/dist/components/Cascader.d.mts +3 -3
- package/dist/components/Cascader.mjs +1 -1
- package/dist/components/ChartCanvas.d.mts +8 -4
- package/dist/components/ChartCanvas.mjs +1 -1
- package/dist/components/ChartGrid.d.mts +1 -1
- package/dist/components/ChartLegend.d.mts +1 -1
- package/dist/components/ChatWindow.d.mts +30 -12
- package/dist/components/ChatWindow.mjs +3 -3
- package/dist/components/Checkbox.d.mts +1 -1
- package/dist/components/Code.d.mts +33 -6
- package/dist/components/Code.mjs +3 -1
- package/dist/components/CodeEditor.d.mts +3 -3
- package/dist/components/Collapse.d.mts +1 -1
- package/dist/components/CollapsePanel.d.mts +1 -1
- package/dist/components/CollapsePanel.mjs +1 -1
- package/dist/components/ColorPicker.mjs +1 -1
- package/dist/components/ColorSwatch.d.mts +8 -2
- package/dist/components/ColorSwatch.mjs +1 -1
- package/dist/components/CommentThread.d.mts +62 -26
- package/dist/components/CommentThread.mjs +2 -2
- package/dist/components/Container.d.mts +1 -1
- package/dist/components/ContextMenu.d.mts +1 -1
- package/dist/components/Countdown.d.mts +2 -2
- package/dist/components/CronEditor.d.mts +3 -3
- package/dist/components/DataExport.mjs +2 -2
- package/dist/components/DataTableWithToolbar.d.mts +9 -9
- package/dist/components/DataTableWithToolbar.mjs +7 -7
- package/dist/components/DatePicker.d.mts +4 -4
- package/dist/components/Descriptions.d.mts +2 -2
- package/dist/components/DonutChart.d.mts +3 -3
- package/dist/components/DonutChart.mjs +4 -4
- package/dist/components/Drawer.d.mts +3 -3
- package/dist/components/Dropdown.d.mts +20 -1
- package/dist/components/Dropdown.mjs +1 -1
- package/dist/components/FileManager.d.mts +9 -3
- package/dist/components/FileManager.mjs +1 -1
- package/dist/components/FloatButton.d.mts +34 -4
- package/dist/components/FloatButton.mjs +1 -1
- package/dist/components/Form.d.mts +2 -2
- package/dist/components/FormWizard.d.mts +5 -5
- package/dist/components/FormWizard.mjs +1 -1
- package/dist/components/FunnelChart.d.mts +3 -3
- package/dist/components/FunnelChart.mjs +3 -3
- package/dist/components/Gantt.d.mts +5 -3
- package/dist/components/Gantt.mjs +2 -2
- package/dist/components/GaugeChart.d.mts +2 -2
- package/dist/components/GaugeChart.mjs +2 -2
- package/dist/components/HeatmapChart.d.mts +3 -3
- package/dist/components/HeatmapChart.mjs +3 -3
- package/dist/components/Icon.d.mts +2 -2
- package/dist/components/Image.d.mts +2 -2
- package/dist/components/Image.mjs +3 -3
- package/dist/components/ImageAnnotation.d.mts +5 -5
- package/dist/components/ImageCompare.d.mts +2 -2
- package/dist/components/ImageGroup.mjs +2 -2
- package/dist/components/ImagePreview.mjs +1 -1
- package/dist/components/InfiniteScroll.d.mts +3 -3
- package/dist/components/Input.d.mts +3 -3
- package/dist/components/Input.mjs +1 -1
- package/dist/components/InputGroup.d.mts +1 -1
- package/dist/components/InputNumber.d.mts +1 -1
- package/dist/components/InputNumber.mjs +1 -1
- package/dist/components/InputOTP.d.mts +5 -5
- package/dist/components/Kanban.mjs +2 -2
- package/dist/components/Kbd.d.mts +1 -1
- package/dist/components/LineChart.d.mts +2 -2
- package/dist/components/LineChart.mjs +4 -3
- package/dist/components/Link.d.mts +1 -1
- package/dist/components/List.d.mts +6 -6
- package/dist/components/List.mjs +2 -2
- package/dist/components/Loading.d.mts +6 -6
- package/dist/components/Loading.mjs +1 -1
- package/dist/components/LoadingBarContainer.d.mts +3 -3
- package/dist/components/MarkdownEditor.d.mts +3 -3
- package/dist/components/Marquee.d.mts +2 -2
- package/dist/components/MaskInput.d.mts +11 -5
- package/dist/components/MaskInput.mjs +1 -1
- package/dist/components/Mentions.d.mts +3 -3
- package/dist/components/Menu.d.mts +4 -4
- package/dist/components/Modal.d.mts +6 -6
- package/dist/components/NavigationMenu.d.mts +5 -5
- package/dist/components/NotificationCenter.d.mts +46 -28
- package/dist/components/NotificationCenter.mjs +4 -4
- package/dist/components/NumberKeyboard.d.mts +6 -6
- package/dist/components/OrgChart.d.mts +3 -3
- package/dist/components/OrgChart.mjs +2 -2
- package/dist/components/Pagination.d.mts +4 -4
- package/dist/components/Pagination.mjs +1 -1
- package/dist/components/PieChart.d.mts +3 -3
- package/dist/components/PieChart.mjs +3 -3
- package/dist/components/Popconfirm.d.mts +2 -2
- package/dist/components/Popconfirm.mjs +2 -2
- package/dist/components/Popover.d.mts +1 -1
- package/dist/components/Popover.mjs +2 -2
- package/dist/components/Progress.d.mts +3 -3
- package/dist/components/QRCode.d.mts +4 -13
- package/dist/components/QRCode.mjs +1 -1
- package/dist/components/RadarChart.d.mts +3 -3
- package/dist/components/RadarChart.mjs +3 -3
- package/dist/components/Radio.d.mts +1 -1
- package/dist/components/Radio.mjs +1 -1
- package/dist/components/Rate.d.mts +1 -1
- package/dist/components/Rate.mjs +1 -1
- package/dist/components/Result.d.mts +1 -1
- package/dist/components/RichTextEditor.d.mts +2 -2
- package/dist/components/Row.d.mts +1 -1
- package/dist/components/ScatterChart.d.mts +2 -2
- package/dist/components/ScatterChart.mjs +4 -3
- package/dist/components/ScrollArea.d.mts +2 -2
- package/dist/components/ScrollSpy.d.mts +3 -3
- package/dist/components/ScrollSpy.mjs +1 -1
- package/dist/components/Select.d.mts +3 -3
- package/dist/components/Signature.d.mts +4 -4
- package/dist/components/Signature.mjs +1 -1
- package/dist/components/Skeleton.d.mts +1 -1
- package/dist/components/Slider.d.mts +18 -0
- package/dist/components/Slider.mjs +1 -1
- package/dist/components/Space.d.mts +2 -2
- package/dist/components/SplitButton.d.mts +5 -5
- package/dist/components/SplitButton.mjs +2 -2
- package/dist/components/Splitter.d.mts +5 -5
- package/dist/components/Splitter.mjs +1 -1
- package/dist/components/Spotlight.d.mts +4 -4
- package/dist/components/Stepper.d.mts +7 -1
- package/dist/components/Stepper.mjs +1 -1
- package/dist/components/Steps.d.mts +3 -3
- package/dist/components/SunburstChart.d.mts +2 -2
- package/dist/components/SunburstChart.mjs +3 -3
- package/dist/components/Switch.d.mts +22 -6
- package/dist/components/Switch.mjs +1 -1
- package/dist/components/Table.d.mts +9 -9
- package/dist/components/Table.mjs +3 -3
- package/dist/components/Tabs.d.mts +3 -3
- package/dist/components/Tag.d.mts +2 -2
- package/dist/components/TagsInput.d.mts +5 -5
- package/dist/components/TaskBoard.mjs +1 -1
- package/dist/components/Text.d.mts +3 -3
- package/dist/components/Textarea.d.mts +3 -3
- package/dist/components/Textarea.mjs +1 -1
- package/dist/components/TimePicker.d.mts +4 -4
- package/dist/components/Timeline.d.mts +3 -3
- package/dist/components/Tooltip.d.mts +1 -1
- package/dist/components/Tooltip.mjs +2 -2
- package/dist/components/Tour.d.mts +2 -2
- package/dist/components/Tour.mjs +1 -1
- package/dist/components/Transfer.d.mts +5 -4
- package/dist/components/Transfer.mjs +1 -1
- package/dist/components/Tree.d.mts +4 -4
- package/dist/components/TreeMapChart.d.mts +2 -2
- package/dist/components/TreeMapChart.mjs +3 -3
- package/dist/components/TreeSelect.d.mts +3 -3
- package/dist/components/TreeSelect.mjs +1 -1
- package/dist/components/Upload.d.mts +2 -2
- package/dist/components/Upload.mjs +1 -1
- package/dist/components/VirtualTable.d.mts +3 -3
- package/dist/components/Watermark.d.mts +1 -1
- package/dist/composables/useChartInteraction.d.mts +5 -0
- package/dist/composables/useChartInteraction.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +51 -0
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useChartInteraction
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FHUGOSEY.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ChartSeries
|
|
6
6
|
} from "./chunk-2ZUEXCVJ.mjs";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-SPFL55TF.mjs";
|
|
10
10
|
import {
|
|
11
11
|
ChartCanvas
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SNNT64HK.mjs";
|
|
13
13
|
import {
|
|
14
14
|
ChartLegend
|
|
15
15
|
} from "./chunk-V443QIJM.mjs";
|
|
@@ -20,7 +20,9 @@ import {
|
|
|
20
20
|
chartAxisTickTextClasses,
|
|
21
21
|
chartGridLineClasses,
|
|
22
22
|
classNames,
|
|
23
|
+
createCircleRingPath,
|
|
23
24
|
createPolygonPath,
|
|
25
|
+
createPolygonRingPath,
|
|
24
26
|
getChartGridLineDasharray,
|
|
25
27
|
getChartInnerRect,
|
|
26
28
|
getRadarAngles,
|
|
@@ -269,6 +271,7 @@ var RadarChart = defineComponent({
|
|
|
269
271
|
wrapperClasses
|
|
270
272
|
} = useChartInteraction({
|
|
271
273
|
hoverable: computed(() => props.hoverable),
|
|
274
|
+
showTooltip: computed(() => props.showTooltip),
|
|
272
275
|
hoveredIndexProp: () => props.hoveredIndex,
|
|
273
276
|
selectable: computed(() => props.selectable),
|
|
274
277
|
selectedIndexProp: () => props.selectedIndex,
|
|
@@ -284,7 +287,7 @@ var RadarChart = defineComponent({
|
|
|
284
287
|
});
|
|
285
288
|
const hoveredPoint = ref(null);
|
|
286
289
|
const handlePointEnter = (seriesIndex, pointIndex, event) => {
|
|
287
|
-
if (!props.hoverable) return;
|
|
290
|
+
if (!props.hoverable && !props.showTooltip) return;
|
|
288
291
|
hoveredPoint.value = { seriesIndex, pointIndex };
|
|
289
292
|
handleHoverEnter(seriesIndex, event);
|
|
290
293
|
};
|
|
@@ -547,43 +550,36 @@ var RadarChart = defineComponent({
|
|
|
547
550
|
);
|
|
548
551
|
}) : []
|
|
549
552
|
]) : null,
|
|
550
|
-
// Split area (alternating fills –
|
|
553
|
+
// Split area (alternating fills – evenodd ring, transparent inner)
|
|
551
554
|
...splitAreaPaths.value.map((area, index) => {
|
|
555
|
+
const shared = {
|
|
556
|
+
key: `split-${index}`,
|
|
557
|
+
fill: area.color,
|
|
558
|
+
"fill-opacity": props.splitAreaOpacity,
|
|
559
|
+
stroke: "none",
|
|
560
|
+
"data-radar-split-area": "true"
|
|
561
|
+
};
|
|
552
562
|
if (area.type === "circle-ring") {
|
|
553
|
-
|
|
554
|
-
h("
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
area.
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
]);
|
|
563
|
+
if (area.innerRadius > 0) {
|
|
564
|
+
return h("path", {
|
|
565
|
+
...shared,
|
|
566
|
+
d: createCircleRingPath(area.cx, area.cy, area.outerRadius, area.innerRadius),
|
|
567
|
+
"fill-rule": "evenodd"
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
return h("circle", {
|
|
571
|
+
...shared,
|
|
572
|
+
cx: area.cx,
|
|
573
|
+
cy: area.cy,
|
|
574
|
+
r: area.outerRadius
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
if (area.innerPoints.length > 0) {
|
|
578
|
+
const d2 = createPolygonRingPath(area.outerPoints, area.innerPoints);
|
|
579
|
+
return d2 ? h("path", { ...shared, d: d2, "fill-rule": "evenodd" }) : null;
|
|
571
580
|
}
|
|
572
|
-
const
|
|
573
|
-
return h("
|
|
574
|
-
outerPath ? h("path", {
|
|
575
|
-
d: outerPath,
|
|
576
|
-
fill: area.color,
|
|
577
|
-
"fill-opacity": props.splitAreaOpacity,
|
|
578
|
-
stroke: "none",
|
|
579
|
-
"data-radar-split-area": "true"
|
|
580
|
-
}) : null,
|
|
581
|
-
area.innerPoints.length > 0 ? h("path", {
|
|
582
|
-
d: createPolygonPath(area.innerPoints),
|
|
583
|
-
fill: "var(--tiger-bg,#fff)",
|
|
584
|
-
stroke: "none"
|
|
585
|
-
}) : null
|
|
586
|
-
]);
|
|
581
|
+
const d = createPolygonPath(area.outerPoints);
|
|
582
|
+
return d ? h("path", { ...shared, d }) : null;
|
|
587
583
|
}),
|
|
588
584
|
// Grid lines
|
|
589
585
|
...gridPaths.value.map(
|
|
@@ -694,9 +690,9 @@ var RadarChart = defineComponent({
|
|
|
694
690
|
"data-series-index": seriesIndex,
|
|
695
691
|
"data-series-key": item.seriesKey,
|
|
696
692
|
"data-point-index": point.index,
|
|
697
|
-
onMouseenter: props.showTooltip
|
|
698
|
-
onMousemove: props.showTooltip
|
|
699
|
-
onMouseleave: props.showTooltip
|
|
693
|
+
onMouseenter: props.showTooltip || props.hoverable ? (e) => handlePointEnter(seriesIndex, point.index, e) : void 0,
|
|
694
|
+
onMousemove: props.showTooltip || props.hoverable ? handlePointMove : void 0,
|
|
695
|
+
onMouseleave: props.showTooltip || props.hoverable ? handlePointLeave : void 0,
|
|
700
696
|
onFocus: props.showTooltip && props.hoverable ? (e) => showPointTooltipFromElement(
|
|
701
697
|
e.currentTarget,
|
|
702
698
|
seriesIndex,
|
|
@@ -753,7 +749,7 @@ var RadarChart = defineComponent({
|
|
|
753
749
|
].filter(Boolean)
|
|
754
750
|
}
|
|
755
751
|
);
|
|
756
|
-
const tooltip = props.showTooltip
|
|
752
|
+
const tooltip = props.showTooltip ? h(ChartTooltip, {
|
|
757
753
|
content: tooltipContent.value,
|
|
758
754
|
open: hoveredPoint.value !== null && tooltipContent.value !== "",
|
|
759
755
|
x: tooltipPosition.value.x,
|
|
@@ -19,7 +19,6 @@ import {
|
|
|
19
19
|
getPageRange,
|
|
20
20
|
validateCurrentPage,
|
|
21
21
|
getPageNumbers,
|
|
22
|
-
defaultTotalText,
|
|
23
22
|
formatPaginationTotal,
|
|
24
23
|
getPaginationContainerClasses,
|
|
25
24
|
getPaginationButtonBaseClasses,
|
|
@@ -357,7 +356,7 @@ var Pagination = defineComponent({
|
|
|
357
356
|
const prevDisabled = page <= 1 || props.disabled;
|
|
358
357
|
const nextDisabled = page >= pages || props.disabled;
|
|
359
358
|
if (props.showTotal) {
|
|
360
|
-
const totalTextFn = props.totalText || (
|
|
359
|
+
const totalTextFn = props.totalText || ((value, range) => formatPaginationTotal(labels.value.totalText, value, range, localeCode.value));
|
|
361
360
|
elements.push(
|
|
362
361
|
h("span", { class: getTotalTextClasses(size) }, totalTextFn(props.total, pageRange.value))
|
|
363
362
|
);
|
|
@@ -102,6 +102,9 @@ var CollapsePanel = defineComponent({
|
|
|
102
102
|
collapseContext.handlePanelClick(props.panelKey);
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
|
+
const handleExtraClick = (event) => {
|
|
106
|
+
event.stopPropagation();
|
|
107
|
+
};
|
|
105
108
|
const handleKeydown = (event) => {
|
|
106
109
|
if (props.disabled) {
|
|
107
110
|
return;
|
|
@@ -163,7 +166,16 @@ var CollapsePanel = defineComponent({
|
|
|
163
166
|
)
|
|
164
167
|
);
|
|
165
168
|
if (extraSlot) {
|
|
166
|
-
headerContent.push(
|
|
169
|
+
headerContent.push(
|
|
170
|
+
h(
|
|
171
|
+
"span",
|
|
172
|
+
{
|
|
173
|
+
class: "ml-auto",
|
|
174
|
+
onClick: handleExtraClick
|
|
175
|
+
},
|
|
176
|
+
extraSlot
|
|
177
|
+
)
|
|
178
|
+
);
|
|
167
179
|
}
|
|
168
180
|
if (props.showArrow && collapseContext.expandIconPosition === "end") {
|
|
169
181
|
headerContent.push(arrowIcon);
|
|
@@ -187,7 +199,11 @@ var CollapsePanel = defineComponent({
|
|
|
187
199
|
ref: contentRef,
|
|
188
200
|
"data-tiger-collapse-content": "",
|
|
189
201
|
class: collapsePanelContentWrapperClasses,
|
|
190
|
-
style: initialContentStyle
|
|
202
|
+
style: initialContentStyle,
|
|
203
|
+
...isActive.value ? {} : {
|
|
204
|
+
inert: true,
|
|
205
|
+
"aria-hidden": "true"
|
|
206
|
+
}
|
|
191
207
|
},
|
|
192
208
|
[
|
|
193
209
|
h(
|
|
@@ -3,7 +3,15 @@ import {
|
|
|
3
3
|
} from "./chunk-UOJOJBEU.mjs";
|
|
4
4
|
|
|
5
5
|
// src/components/Signature.ts
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
computed,
|
|
8
|
+
defineComponent,
|
|
9
|
+
h,
|
|
10
|
+
onMounted,
|
|
11
|
+
onUnmounted,
|
|
12
|
+
ref,
|
|
13
|
+
watch
|
|
14
|
+
} from "vue";
|
|
7
15
|
import {
|
|
8
16
|
classNames,
|
|
9
17
|
clampSignatureLineWidth,
|
|
@@ -61,8 +69,10 @@ var Signature = defineComponent({
|
|
|
61
69
|
const canvasRef = ref(null);
|
|
62
70
|
const strokes = ref([]);
|
|
63
71
|
const activeStroke = ref(null);
|
|
72
|
+
const capturedPointerId = ref(null);
|
|
64
73
|
const isDisabled = computed(() => props.disabled || props.readonly);
|
|
65
74
|
const normalizedLineWidth = computed(() => clampSignatureLineWidth(props.lineWidth));
|
|
75
|
+
let documentPointerListening = false;
|
|
66
76
|
const draw = (nextStrokes) => {
|
|
67
77
|
const canvas = canvasRef.value;
|
|
68
78
|
const context = canvas?.getContext("2d");
|
|
@@ -90,6 +100,8 @@ var Signature = defineComponent({
|
|
|
90
100
|
if (value === "" && !isSignatureEmpty(strokes.value)) {
|
|
91
101
|
strokes.value = [];
|
|
92
102
|
activeStroke.value = null;
|
|
103
|
+
detachDocumentPointerListeners();
|
|
104
|
+
releaseCanvasPointer();
|
|
93
105
|
draw([]);
|
|
94
106
|
}
|
|
95
107
|
}
|
|
@@ -130,6 +142,8 @@ var Signature = defineComponent({
|
|
|
130
142
|
const clear = () => {
|
|
131
143
|
strokes.value = [];
|
|
132
144
|
activeStroke.value = null;
|
|
145
|
+
detachDocumentPointerListeners();
|
|
146
|
+
releaseCanvasPointer();
|
|
133
147
|
draw([]);
|
|
134
148
|
emitChange([]);
|
|
135
149
|
emit("clear");
|
|
@@ -144,10 +158,55 @@ var Signature = defineComponent({
|
|
|
144
158
|
};
|
|
145
159
|
return getSignaturePoint(event.clientX, event.clientY, rect, props.width, props.height);
|
|
146
160
|
};
|
|
161
|
+
const captureCanvasPointer = (pointerId) => {
|
|
162
|
+
capturedPointerId.value = pointerId;
|
|
163
|
+
const canvas = canvasRef.value;
|
|
164
|
+
if (!canvas || typeof canvas.setPointerCapture !== "function") return;
|
|
165
|
+
try {
|
|
166
|
+
canvas.setPointerCapture(pointerId);
|
|
167
|
+
} catch {
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
const releaseCanvasPointer = () => {
|
|
171
|
+
const canvas = canvasRef.value;
|
|
172
|
+
const pointerId = capturedPointerId.value;
|
|
173
|
+
capturedPointerId.value = null;
|
|
174
|
+
if (!canvas || pointerId == null || typeof canvas.releasePointerCapture !== "function") return;
|
|
175
|
+
if (typeof canvas.hasPointerCapture === "function") {
|
|
176
|
+
try {
|
|
177
|
+
if (!canvas.hasPointerCapture(pointerId)) return;
|
|
178
|
+
} catch {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
try {
|
|
183
|
+
canvas.releasePointerCapture(pointerId);
|
|
184
|
+
} catch {
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
const handleDocumentPointerEnd = () => {
|
|
188
|
+
finishStroke();
|
|
189
|
+
};
|
|
190
|
+
const attachDocumentPointerListeners = () => {
|
|
191
|
+
if (documentPointerListening || !isBrowser()) return;
|
|
192
|
+
document.addEventListener("pointerup", handleDocumentPointerEnd);
|
|
193
|
+
document.addEventListener("pointercancel", handleDocumentPointerEnd);
|
|
194
|
+
documentPointerListening = true;
|
|
195
|
+
};
|
|
196
|
+
const detachDocumentPointerListeners = () => {
|
|
197
|
+
if (!documentPointerListening || !isBrowser()) return;
|
|
198
|
+
document.removeEventListener("pointerup", handleDocumentPointerEnd);
|
|
199
|
+
document.removeEventListener("pointercancel", handleDocumentPointerEnd);
|
|
200
|
+
documentPointerListening = false;
|
|
201
|
+
};
|
|
147
202
|
const handlePointerDown = (event) => {
|
|
148
203
|
if (isDisabled.value) return;
|
|
149
204
|
event.preventDefault();
|
|
150
205
|
canvasRef.value?.focus();
|
|
206
|
+
const pointerId = event.pointerId;
|
|
207
|
+
if (typeof pointerId === "number") {
|
|
208
|
+
captureCanvasPointer(pointerId);
|
|
209
|
+
}
|
|
151
210
|
const stroke = {
|
|
152
211
|
color: props.penColor,
|
|
153
212
|
lineWidth: normalizedLineWidth.value,
|
|
@@ -155,6 +214,7 @@ var Signature = defineComponent({
|
|
|
155
214
|
};
|
|
156
215
|
activeStroke.value = stroke;
|
|
157
216
|
strokes.value = [...strokes.value, stroke];
|
|
217
|
+
attachDocumentPointerListeners();
|
|
158
218
|
emit("begin");
|
|
159
219
|
};
|
|
160
220
|
const handlePointerMove = (event) => {
|
|
@@ -163,12 +223,18 @@ var Signature = defineComponent({
|
|
|
163
223
|
activeStroke.value.points.push(getPointFromEvent(event));
|
|
164
224
|
strokes.value = [...strokes.value];
|
|
165
225
|
};
|
|
166
|
-
|
|
226
|
+
function finishStroke() {
|
|
167
227
|
if (!activeStroke.value) return;
|
|
168
228
|
activeStroke.value = null;
|
|
169
229
|
const payload = emitChange(strokes.value);
|
|
170
230
|
emit("end", payload);
|
|
171
|
-
|
|
231
|
+
detachDocumentPointerListeners();
|
|
232
|
+
releaseCanvasPointer();
|
|
233
|
+
}
|
|
234
|
+
onUnmounted(() => {
|
|
235
|
+
detachDocumentPointerListeners();
|
|
236
|
+
releaseCanvasPointer();
|
|
237
|
+
});
|
|
172
238
|
const handleKeyDown = (event) => {
|
|
173
239
|
if (!props.clearable || isDisabled.value) return;
|
|
174
240
|
if (event.key !== "Delete" && event.key !== "Backspace") return;
|
|
@@ -213,6 +279,7 @@ var Signature = defineComponent({
|
|
|
213
279
|
onPointermove: handlePointerMove,
|
|
214
280
|
onPointerup: finishStroke,
|
|
215
281
|
onPointercancel: finishStroke,
|
|
282
|
+
onLostpointercapture: finishStroke,
|
|
216
283
|
onKeydown: handleKeyDown
|
|
217
284
|
})
|
|
218
285
|
]),
|
|
@@ -101,6 +101,15 @@ var DropdownItem = defineComponent({
|
|
|
101
101
|
type: Boolean,
|
|
102
102
|
default: false
|
|
103
103
|
},
|
|
104
|
+
/**
|
|
105
|
+
* When set, overrides the parent Dropdown `closeOnClick`.
|
|
106
|
+
* Omitted inherits the parent. Must default to undefined (not false): a
|
|
107
|
+
* bare Boolean would coerce omitted to false and break parent inheritance.
|
|
108
|
+
*/
|
|
109
|
+
closeOnClick: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
default: void 0
|
|
112
|
+
},
|
|
104
113
|
/**
|
|
105
114
|
* Additional CSS classes
|
|
106
115
|
*/
|
|
@@ -125,8 +134,9 @@ var DropdownItem = defineComponent({
|
|
|
125
134
|
return;
|
|
126
135
|
}
|
|
127
136
|
emit("click", event);
|
|
128
|
-
|
|
129
|
-
|
|
137
|
+
const shouldClose = props.closeOnClick ?? context?.closeOnClick ?? true;
|
|
138
|
+
if (shouldClose) {
|
|
139
|
+
context?.handleItemClick();
|
|
130
140
|
}
|
|
131
141
|
};
|
|
132
142
|
const itemClasses = computed(() => {
|
|
@@ -286,7 +296,7 @@ var Dropdown = defineComponent({
|
|
|
286
296
|
}
|
|
287
297
|
};
|
|
288
298
|
const handleItemClick = () => {
|
|
289
|
-
|
|
299
|
+
setVisible(false);
|
|
290
300
|
};
|
|
291
301
|
let hoverTimer = null;
|
|
292
302
|
const handleMouseEnter = () => {
|
|
@@ -3,9 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-Q7Y22OFX.mjs";
|
|
4
4
|
|
|
5
5
|
// src/utils/use-floating-popup.ts
|
|
6
|
-
import { computed, ref, watch } from "vue";
|
|
6
|
+
import { computed, onBeforeUnmount, ref, watch } from "vue";
|
|
7
7
|
import {
|
|
8
8
|
buildTriggerHandlerMap,
|
|
9
|
+
createFloatingHoverDelayController,
|
|
9
10
|
restoreFocus
|
|
10
11
|
} from "@expcat/tigercat-core";
|
|
11
12
|
function useFloatingPopup(options) {
|
|
@@ -27,6 +28,10 @@ function useFloatingPopup(options) {
|
|
|
27
28
|
emit("update:open", next);
|
|
28
29
|
emit("open-change", next);
|
|
29
30
|
};
|
|
31
|
+
const hoverController = createFloatingHoverDelayController({
|
|
32
|
+
show: () => setVisible(true),
|
|
33
|
+
hide: () => setVisible(false)
|
|
34
|
+
});
|
|
30
35
|
const containerRef = ref(null);
|
|
31
36
|
const triggerRef = ref(null);
|
|
32
37
|
const floatingRef = ref(null);
|
|
@@ -40,7 +45,7 @@ function useFloatingPopup(options) {
|
|
|
40
45
|
}, 0);
|
|
41
46
|
};
|
|
42
47
|
const closeAndRestoreFocus = () => {
|
|
43
|
-
|
|
48
|
+
hoverController.closeNow();
|
|
44
49
|
restoreTriggerFocus();
|
|
45
50
|
};
|
|
46
51
|
const effectiveTrigger = computed(
|
|
@@ -59,21 +64,52 @@ function useFloatingPopup(options) {
|
|
|
59
64
|
if (reason === "escape") {
|
|
60
65
|
closeAndRestoreFocus();
|
|
61
66
|
} else {
|
|
62
|
-
|
|
67
|
+
hoverController.closeNow();
|
|
63
68
|
}
|
|
64
69
|
}
|
|
65
70
|
});
|
|
66
71
|
const x = overlay.x;
|
|
67
72
|
const y = overlay.y;
|
|
68
73
|
const handleToggle = () => {
|
|
69
|
-
if (
|
|
74
|
+
if (props.disabled) return;
|
|
75
|
+
hoverController.cancel();
|
|
76
|
+
setVisible(!currentVisible.value);
|
|
70
77
|
};
|
|
71
78
|
const handleShow = () => {
|
|
72
|
-
if (
|
|
79
|
+
if (props.disabled) return;
|
|
80
|
+
if (effectiveTrigger.value === "hover") {
|
|
81
|
+
hoverController.enter();
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
hoverController.cancel();
|
|
85
|
+
setVisible(true);
|
|
73
86
|
};
|
|
74
87
|
const handleHide = () => {
|
|
75
|
-
if (
|
|
88
|
+
if (props.disabled) return;
|
|
89
|
+
if (effectiveTrigger.value === "hover") {
|
|
90
|
+
hoverController.leave();
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
hoverController.closeNow();
|
|
76
94
|
};
|
|
95
|
+
watch(
|
|
96
|
+
() => [floatingRef.value, currentVisible.value, effectiveTrigger.value],
|
|
97
|
+
([el, visible, trigger], _prev, onCleanup) => {
|
|
98
|
+
if (!multiTrigger || trigger !== "hover" || !visible || !el) return;
|
|
99
|
+
const handleEnter = () => hoverController.enter();
|
|
100
|
+
const handleLeave = () => hoverController.leave();
|
|
101
|
+
el.addEventListener("mouseenter", handleEnter);
|
|
102
|
+
el.addEventListener("mouseleave", handleLeave);
|
|
103
|
+
onCleanup(() => {
|
|
104
|
+
el.removeEventListener("mouseenter", handleEnter);
|
|
105
|
+
el.removeEventListener("mouseleave", handleLeave);
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
{ flush: "post", immediate: true }
|
|
109
|
+
);
|
|
110
|
+
onBeforeUnmount(() => {
|
|
111
|
+
hoverController.dispose();
|
|
112
|
+
});
|
|
77
113
|
const triggerHandlers = computed(() => {
|
|
78
114
|
if (!multiTrigger) {
|
|
79
115
|
return { onClick: handleToggle };
|
|
@@ -10,7 +10,7 @@ import { defineComponent, computed, ref, watch, h, inject, getCurrentInstance }
|
|
|
10
10
|
import {
|
|
11
11
|
classNames,
|
|
12
12
|
coerceClassValue,
|
|
13
|
-
|
|
13
|
+
getInputFieldClasses,
|
|
14
14
|
getInputWrapperClasses,
|
|
15
15
|
getInputAffixClasses,
|
|
16
16
|
getInputErrorClasses,
|
|
@@ -177,14 +177,18 @@ var Input = defineComponent({
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
);
|
|
180
|
-
watch(
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
180
|
+
watch(
|
|
181
|
+
[effectiveStatus, effectiveShakeTrigger],
|
|
182
|
+
([newStatus]) => {
|
|
183
|
+
if (newStatus === "error" && wrapperRef.value) {
|
|
184
|
+
const el = wrapperRef.value;
|
|
185
|
+
el.classList.remove(SHAKE_CLASS);
|
|
186
|
+
void el.offsetWidth;
|
|
187
|
+
el.classList.add(SHAKE_CLASS);
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
{ flush: "post" }
|
|
191
|
+
);
|
|
188
192
|
const handleAnimationEnd = () => {
|
|
189
193
|
wrapperRef.value?.classList.remove(SHAKE_CLASS);
|
|
190
194
|
};
|
|
@@ -195,14 +199,6 @@ var Input = defineComponent({
|
|
|
195
199
|
const activeError = computed(
|
|
196
200
|
() => effectiveStatus.value === "error" && !!effectiveErrorMessage.value
|
|
197
201
|
);
|
|
198
|
-
const inputClasses = computed(
|
|
199
|
-
() => getInputClasses({
|
|
200
|
-
size: effectiveSize.value,
|
|
201
|
-
status: effectiveStatus.value,
|
|
202
|
-
hasPrefix: hasPrefix.value,
|
|
203
|
-
hasSuffix: hasSuffix.value
|
|
204
|
-
})
|
|
205
|
-
);
|
|
206
202
|
const effectiveType = computed(() => {
|
|
207
203
|
if (props.showPassword && props.type === "password") {
|
|
208
204
|
return passwordVisible.value ? "text" : "password";
|
|
@@ -233,55 +229,56 @@ var Input = defineComponent({
|
|
|
233
229
|
const currentValStr = String(localValue.value);
|
|
234
230
|
const showClear = props.clearable && !props.disabled && !props.readonly && currentValStr.length > 0;
|
|
235
231
|
const showPasswordToggle = props.showPassword && props.type === "password" && !props.disabled;
|
|
232
|
+
const dualSuffix = showClear && showPasswordToggle;
|
|
233
|
+
const inputClasses = getInputFieldClasses({
|
|
234
|
+
size: effectiveSize.value,
|
|
235
|
+
status: effectiveStatus.value,
|
|
236
|
+
hasPrefix: hasPrefix.value,
|
|
237
|
+
hasSuffix: hasSuffix.value,
|
|
238
|
+
hasDualSuffix: dualSuffix
|
|
239
|
+
});
|
|
236
240
|
const suffixNodes = [];
|
|
237
|
-
if (
|
|
241
|
+
if (showClear) {
|
|
242
|
+
suffixNodes.push(
|
|
243
|
+
h(
|
|
244
|
+
"button",
|
|
245
|
+
{
|
|
246
|
+
type: "button",
|
|
247
|
+
class: getInputClearButtonClasses(
|
|
248
|
+
effectiveSize.value,
|
|
249
|
+
dualSuffix ? { offset: true } : void 0
|
|
250
|
+
),
|
|
251
|
+
onClick: handleClear,
|
|
252
|
+
"aria-label": "Clear input",
|
|
253
|
+
tabindex: -1
|
|
254
|
+
},
|
|
255
|
+
"\u2715"
|
|
256
|
+
)
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
if (showPasswordToggle) {
|
|
260
|
+
suffixNodes.push(
|
|
261
|
+
h(
|
|
262
|
+
"button",
|
|
263
|
+
{
|
|
264
|
+
type: "button",
|
|
265
|
+
class: getInputPasswordToggleClasses(effectiveSize.value),
|
|
266
|
+
onClick: togglePasswordVisibility,
|
|
267
|
+
"aria-label": passwordVisible.value ? "Hide password" : "Show password",
|
|
268
|
+
tabindex: -1
|
|
269
|
+
},
|
|
270
|
+
passwordVisible.value ? "\u{1F648}" : "\u{1F441}"
|
|
271
|
+
)
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
if (!showClear && !showPasswordToggle && hasSuffix.value) {
|
|
238
275
|
suffixNodes.push(
|
|
239
276
|
h(
|
|
240
277
|
"div",
|
|
241
|
-
{
|
|
242
|
-
|
|
278
|
+
{ class: getInputAffixClasses("suffix", effectiveSize.value) },
|
|
279
|
+
slots.suffix ? slots.suffix() : props.suffix
|
|
243
280
|
)
|
|
244
281
|
);
|
|
245
|
-
} else {
|
|
246
|
-
if (showClear) {
|
|
247
|
-
suffixNodes.push(
|
|
248
|
-
h(
|
|
249
|
-
"button",
|
|
250
|
-
{
|
|
251
|
-
type: "button",
|
|
252
|
-
class: getInputClearButtonClasses(effectiveSize.value),
|
|
253
|
-
onClick: handleClear,
|
|
254
|
-
"aria-label": "Clear input",
|
|
255
|
-
tabindex: -1
|
|
256
|
-
},
|
|
257
|
-
"\u2715"
|
|
258
|
-
)
|
|
259
|
-
);
|
|
260
|
-
}
|
|
261
|
-
if (showPasswordToggle) {
|
|
262
|
-
suffixNodes.push(
|
|
263
|
-
h(
|
|
264
|
-
"button",
|
|
265
|
-
{
|
|
266
|
-
type: "button",
|
|
267
|
-
class: getInputPasswordToggleClasses(effectiveSize.value),
|
|
268
|
-
onClick: togglePasswordVisibility,
|
|
269
|
-
"aria-label": passwordVisible.value ? "Hide password" : "Show password",
|
|
270
|
-
tabindex: -1
|
|
271
|
-
},
|
|
272
|
-
passwordVisible.value ? "\u{1F648}" : "\u{1F441}"
|
|
273
|
-
)
|
|
274
|
-
);
|
|
275
|
-
}
|
|
276
|
-
if (!showClear && !showPasswordToggle && hasSuffix.value) {
|
|
277
|
-
suffixNodes.push(
|
|
278
|
-
h(
|
|
279
|
-
"div",
|
|
280
|
-
{ class: getInputAffixClasses("suffix", effectiveSize.value) },
|
|
281
|
-
slots.suffix ? slots.suffix() : props.suffix
|
|
282
|
-
)
|
|
283
|
-
);
|
|
284
|
-
}
|
|
285
282
|
}
|
|
286
283
|
const wrapperChildren = [
|
|
287
284
|
hasPrefix.value && h(
|
|
@@ -292,7 +289,7 @@ var Input = defineComponent({
|
|
|
292
289
|
h("input", {
|
|
293
290
|
...restAttrs,
|
|
294
291
|
ref: inputRef,
|
|
295
|
-
class: inputClasses
|
|
292
|
+
class: inputClasses,
|
|
296
293
|
type: effectiveType.value,
|
|
297
294
|
value: localValue.value,
|
|
298
295
|
placeholder: props.placeholder,
|
|
@@ -314,29 +311,41 @@ var Input = defineComponent({
|
|
|
314
311
|
}),
|
|
315
312
|
...suffixNodes
|
|
316
313
|
];
|
|
317
|
-
const
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
314
|
+
const chromeNode = h(
|
|
315
|
+
"div",
|
|
316
|
+
{
|
|
317
|
+
ref: wrapperRef,
|
|
318
|
+
class: classNames(
|
|
319
|
+
getInputWrapperClasses(effectiveStatus.value),
|
|
320
|
+
props.className,
|
|
321
|
+
coerceClassValue(attrClass)
|
|
322
|
+
),
|
|
323
|
+
style: [attrStyle, props.style],
|
|
324
|
+
onAnimationend: handleAnimationEnd
|
|
325
|
+
},
|
|
326
|
+
wrapperChildren
|
|
327
|
+
);
|
|
328
|
+
const extras = [];
|
|
329
|
+
if (activeError.value) {
|
|
330
|
+
extras.push(
|
|
331
|
+
h(
|
|
332
|
+
"div",
|
|
333
|
+
{
|
|
334
|
+
id: errorMsgId,
|
|
335
|
+
class: getInputErrorClasses(effectiveSize.value),
|
|
336
|
+
"aria-live": "polite"
|
|
337
|
+
},
|
|
338
|
+
effectiveErrorMessage.value
|
|
339
|
+
)
|
|
340
|
+
);
|
|
341
|
+
}
|
|
333
342
|
if (props.showCount) {
|
|
334
343
|
const count = currentValStr.length;
|
|
335
344
|
const isOver = props.maxLength !== void 0 && count > props.maxLength;
|
|
336
345
|
const countText = props.maxLength !== void 0 ? `${count} / ${props.maxLength}` : `${count}`;
|
|
337
|
-
|
|
346
|
+
extras.push(h("div", { class: getInputCountClasses(isOver) }, countText));
|
|
338
347
|
}
|
|
339
|
-
return
|
|
348
|
+
return extras.length === 0 ? chromeNode : h("div", { class: "w-full" }, [chromeNode, ...extras]);
|
|
340
349
|
};
|
|
341
350
|
}
|
|
342
351
|
});
|