@expcat/tigercat-vue 2.0.19 → 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/README.md +20 -10
- package/dist/chunk-26QCTL2E.mjs +180 -0
- package/dist/{chunk-7W3NALIL.mjs → chunk-3FPS7XVB.mjs} +26 -27
- package/dist/{chunk-2OI6GWOT.mjs → chunk-3KAHJF7D.mjs} +12 -11
- package/dist/chunk-3OCHBGPF.mjs +835 -0
- package/dist/chunk-3ONCXHE5.mjs +184 -0
- 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-WUQMFKQ6.mjs → chunk-67VS6QHJ.mjs} +29 -15
- package/dist/chunk-6GR3XC5V.mjs +281 -0
- package/dist/chunk-6GR5U4UB.mjs +225 -0
- package/dist/{chunk-KFJIZED5.mjs → chunk-6JAAXPBW.mjs} +7 -6
- package/dist/{chunk-XGXZF27U.mjs → chunk-6NYC7EY2.mjs} +32 -18
- package/dist/{chunk-6BDDX2R4.mjs → chunk-73Z7N7VG.mjs} +1 -4
- package/dist/chunk-7C7SG3SS.mjs +269 -0
- package/dist/{chunk-NNC75I7F.mjs → chunk-7TJE7OYH.mjs} +7 -6
- package/dist/{chunk-AU6IC6K7.mjs → chunk-ABNS4B5V.mjs} +35 -15
- package/dist/chunk-AECXFT7D.mjs +121 -0
- package/dist/chunk-AOLRZG4E.mjs +347 -0
- package/dist/chunk-AY7CGLMO.mjs +368 -0
- package/dist/chunk-BBNCP55O.mjs +156 -0
- 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-KOG3HKOF.mjs → chunk-GQOPDD44.mjs} +2 -5
- package/dist/{chunk-5RXYJWNA.mjs → chunk-H4DEIGEG.mjs} +77 -25
- package/dist/{chunk-ZGA66PSG.mjs → chunk-IK2WHKDA.mjs} +32 -18
- 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-OTHJIFDV.mjs → chunk-M4FWWEMX.mjs} +18 -9
- package/dist/{chunk-NGAA73CV.mjs → chunk-N2XV37BL.mjs} +40 -44
- package/dist/{chunk-2LIIMWBR.mjs → chunk-OYU47A57.mjs} +1 -2
- package/dist/{chunk-KU2Q5V3L.mjs → chunk-P62TYR3M.mjs} +18 -2
- package/dist/chunk-P6FMU4AT.mjs +54 -0
- package/dist/{chunk-P5FDKBXG.mjs → chunk-P7X46BAW.mjs} +70 -3
- package/dist/chunk-PFIV5MXD.mjs +48 -0
- 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-PWWWACHC.mjs +302 -0
- 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-MAKOSWR6.mjs → chunk-RHQWQJ4I.mjs} +7 -6
- package/dist/{chunk-GS4SV2HK.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-2XCXK3NQ.mjs → chunk-SX3NAN4M.mjs} +1 -1
- package/dist/chunk-TBOXTAIA.mjs +94 -0
- package/dist/{chunk-JL3CN4UK.mjs → chunk-TDBMAKTJ.mjs} +10 -3
- package/dist/{chunk-EDBMWZKH.mjs → chunk-TPESRDUG.mjs} +5 -1
- 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-UR5F74ZB.mjs +601 -0
- package/dist/{chunk-VCCK4CDT.mjs → chunk-URPXBKK4.mjs} +23 -5
- package/dist/chunk-UUWPSRNV.mjs +337 -0
- package/dist/chunk-UXJRH72H.mjs +834 -0
- package/dist/chunk-VFS5XAZ3.mjs +602 -0
- 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-3KITFMBJ.mjs → chunk-X5LJT76O.mjs} +52 -35
- 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 +3 -3
- package/dist/components/Affix.d.mts +4 -4
- package/dist/components/Affix.mjs +1 -1
- package/dist/components/Alert.d.mts +4 -4
- package/dist/components/Anchor.d.mts +2 -2
- package/dist/components/Anchor.mjs +1 -1
- package/dist/components/AreaChart.d.mts +3 -3
- package/dist/components/AreaChart.mjs +5 -4
- package/dist/components/AspectRatio.d.mts +44 -0
- package/dist/components/AspectRatio.mjs +8 -0
- package/dist/components/AutoComplete.d.mts +3 -3
- package/dist/components/AutoComplete.mjs +1 -1
- package/dist/components/Avatar.d.mts +2 -2
- package/dist/components/AvatarGroup.d.mts +2 -2
- package/dist/components/BackTop.d.mts +2 -2
- package/dist/components/Badge.d.mts +5 -5
- package/dist/components/BarChart.d.mts +2 -2
- package/dist/components/BarChart.mjs +5 -4
- package/dist/components/Breadcrumb.d.mts +2 -2
- package/dist/components/Button.d.mts +5 -5
- package/dist/components/ButtonGroup.d.mts +1 -1
- package/dist/components/Calendar.d.mts +2 -2
- package/dist/components/Calendar.mjs +1 -1
- package/dist/components/Card.d.mts +3 -3
- package/dist/components/Carousel.d.mts +3 -3
- package/dist/components/Cascader.d.mts +37 -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 +2 -2
- package/dist/components/ChartTooltip.d.mts +1 -1
- package/dist/components/ChatWindow.d.mts +29 -11
- package/dist/components/ChatWindow.mjs +4 -4
- 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 +1 -1
- package/dist/components/CodeEditor.mjs +1 -1
- package/dist/components/Collapse.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 +63 -27
- package/dist/components/CommentThread.mjs +2 -2
- package/dist/components/Container.d.mts +1 -1
- package/dist/components/ContextMenu.d.mts +234 -0
- package/dist/components/ContextMenu.mjs +17 -0
- package/dist/components/Countdown.d.mts +1 -1
- package/dist/components/CronEditor.d.mts +3 -3
- package/dist/components/CropUpload.d.mts +1 -1
- package/dist/components/DataExport.d.mts +1 -1
- package/dist/components/DataExport.mjs +2 -2
- package/dist/components/DataTableWithToolbar.d.mts +11 -11
- package/dist/components/DataTableWithToolbar.mjs +8 -8
- package/dist/components/DatePicker.d.mts +5 -5
- package/dist/components/Descriptions.d.mts +3 -3
- package/dist/components/DonutChart.d.mts +3 -3
- package/dist/components/DonutChart.mjs +5 -5
- package/dist/components/Drawer.d.mts +6 -6
- package/dist/components/Dropdown.d.mts +21 -2
- package/dist/components/Dropdown.mjs +1 -1
- package/dist/components/Empty.d.mts +1 -1
- package/dist/components/FileManager.d.mts +10 -4
- package/dist/components/FileManager.mjs +1 -1
- package/dist/components/FloatButton.d.mts +37 -7
- package/dist/components/FloatButton.mjs +1 -1
- package/dist/components/Form.d.mts +2 -2
- package/dist/components/FormWizard.d.mts +4 -4
- package/dist/components/FormWizard.mjs +1 -1
- package/dist/components/FunnelChart.d.mts +4 -4
- package/dist/components/FunnelChart.mjs +4 -4
- package/dist/components/Gantt.d.mts +6 -4
- package/dist/components/Gantt.mjs +2 -2
- package/dist/components/GaugeChart.d.mts +4 -4
- package/dist/components/GaugeChart.mjs +2 -2
- package/dist/components/Header.d.mts +1 -1
- package/dist/components/HeatmapChart.d.mts +3 -3
- package/dist/components/HeatmapChart.mjs +3 -3
- package/dist/components/Highlight.d.mts +146 -0
- package/dist/components/Highlight.mjs +8 -0
- 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 +4 -4
- package/dist/components/ImageCompare.d.mts +284 -0
- package/dist/components/ImageCompare.mjs +8 -0
- package/dist/components/ImageCropper.d.mts +1 -1
- package/dist/components/ImageGroup.mjs +2 -2
- package/dist/components/ImagePreview.d.mts +1 -1
- package/dist/components/ImagePreview.mjs +1 -1
- package/dist/components/ImageViewer.d.mts +1 -1
- package/dist/components/InfiniteScroll.d.mts +4 -4
- package/dist/components/Input.d.mts +7 -7
- package/dist/components/Input.mjs +1 -1
- package/dist/components/InputGroup.d.mts +2 -2
- package/dist/components/InputNumber.d.mts +3 -3
- package/dist/components/InputNumber.mjs +1 -1
- package/dist/components/InputOTP.d.mts +261 -0
- package/dist/components/InputOTP.mjs +11 -0
- package/dist/components/Kanban.d.mts +1 -1
- package/dist/components/Kanban.mjs +2 -2
- package/dist/components/Kbd.d.mts +118 -0
- package/dist/components/Kbd.mjs +8 -0
- package/dist/components/LineChart.d.mts +2 -2
- package/dist/components/LineChart.mjs +5 -4
- package/dist/components/Link.d.mts +1 -1
- package/dist/components/List.d.mts +7 -7
- package/dist/components/List.mjs +2 -2
- package/dist/components/Loading.d.mts +7 -7
- package/dist/components/Loading.mjs +1 -1
- package/dist/components/LoadingBar.d.mts +8 -0
- package/dist/components/LoadingBar.mjs +114 -0
- package/dist/components/LoadingBarContainer.d.mts +78 -0
- package/dist/components/LoadingBarContainer.mjs +8 -0
- package/dist/components/LoadingBarRoot.d.mts +6 -0
- package/dist/components/LoadingBarRoot.mjs +6 -0
- package/dist/components/MarkdownEditor.d.mts +4 -4
- package/dist/components/Marquee.d.mts +158 -0
- package/dist/components/Marquee.mjs +8 -0
- package/dist/components/MaskInput.d.mts +207 -0
- package/dist/components/MaskInput.mjs +11 -0
- package/dist/components/Masonry.d.mts +66 -0
- package/dist/components/Masonry.mjs +8 -0
- package/dist/components/Mentions.d.mts +1 -1
- package/dist/components/Menu.d.mts +4 -4
- package/dist/components/Modal.d.mts +7 -7
- package/dist/components/NavigationMenu.d.mts +411 -0
- package/dist/components/NavigationMenu.mjs +25 -0
- package/dist/components/NotificationCenter.d.mts +48 -30
- package/dist/components/NotificationCenter.mjs +4 -4
- package/dist/components/NumberKeyboard.d.mts +4 -4
- package/dist/components/OrgChart.d.mts +4 -4
- package/dist/components/OrgChart.mjs +2 -2
- package/dist/components/PageHeader.d.mts +140 -0
- package/dist/components/PageHeader.mjs +11 -0
- package/dist/components/Pagination.d.mts +5 -5
- package/dist/components/Pagination.mjs +1 -1
- package/dist/components/PieChart.d.mts +3 -3
- package/dist/components/PieChart.mjs +4 -4
- package/dist/components/Popconfirm.d.mts +4 -4
- package/dist/components/Popconfirm.mjs +2 -2
- package/dist/components/Popover.d.mts +5 -5
- package/dist/components/Popover.mjs +2 -2
- package/dist/components/Progress.d.mts +7 -7
- 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 +4 -4
- 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 +4 -4
- package/dist/components/Row.d.mts +1 -1
- package/dist/components/ScatterChart.d.mts +3 -3
- package/dist/components/ScatterChart.mjs +5 -4
- package/dist/components/ScrollArea.d.mts +136 -0
- package/dist/components/ScrollArea.mjs +8 -0
- package/dist/components/ScrollSpy.d.mts +2 -2
- package/dist/components/ScrollSpy.mjs +1 -1
- package/dist/components/Segmented.d.mts +2 -2
- package/dist/components/Select.d.mts +3 -3
- package/dist/components/Signature.d.mts +6 -6
- package/dist/components/Signature.mjs +1 -1
- package/dist/components/Skeleton.d.mts +2 -2
- package/dist/components/Slider.d.mts +19 -1
- package/dist/components/Slider.mjs +1 -1
- package/dist/components/Space.d.mts +2 -2
- package/dist/components/SplitButton.d.mts +286 -0
- package/dist/components/SplitButton.mjs +12 -0
- package/dist/components/Splitter.d.mts +4 -4
- package/dist/components/Splitter.mjs +1 -1
- package/dist/components/Spotlight.d.mts +6 -6
- package/dist/components/Statistic.d.mts +1 -1
- package/dist/components/Stepper.d.mts +7 -1
- package/dist/components/Stepper.mjs +1 -1
- package/dist/components/Steps.d.mts +1 -1
- package/dist/components/SunburstChart.d.mts +2 -2
- package/dist/components/SunburstChart.mjs +4 -4
- 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 +5 -5
- package/dist/components/Tag.d.mts +3 -3
- package/dist/components/TagsInput.d.mts +214 -0
- package/dist/components/TagsInput.mjs +12 -0
- package/dist/components/TaskBoard.d.mts +2 -2
- package/dist/components/TaskBoard.mjs +1 -1
- package/dist/components/Text.d.mts +3 -3
- package/dist/components/Textarea.d.mts +4 -4
- package/dist/components/Textarea.mjs +1 -1
- package/dist/components/TimePicker.d.mts +6 -6
- package/dist/components/Timeline.d.mts +2 -2
- package/dist/components/Tooltip.d.mts +2 -2
- package/dist/components/Tooltip.mjs +2 -2
- package/dist/components/Tour.d.mts +4 -4
- 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 +6 -6
- package/dist/components/TreeMapChart.d.mts +3 -3
- package/dist/components/TreeMapChart.mjs +4 -4
- package/dist/components/TreeSelect.d.mts +54 -3
- package/dist/components/TreeSelect.mjs +2 -1
- package/dist/components/Upload.d.mts +4 -4
- package/dist/components/Upload.mjs +1 -1
- package/dist/components/VirtualTable.d.mts +5 -5
- package/dist/components/Watermark.d.mts +6 -6
- package/dist/composables/useChartInteraction.d.mts +5 -0
- package/dist/composables/useChartInteraction.mjs +1 -1
- package/dist/index.d.mts +17 -1
- package/dist/index.mjs +406 -0
- package/package.json +117 -2
- package/dist/chunk-OTGGPXDT.mjs +0 -433
- package/dist/chunk-WC5MKASU.mjs +0 -393
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useChartInteraction
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FHUGOSEY.mjs";
|
|
4
|
+
import {
|
|
5
|
+
ChartSeries
|
|
6
|
+
} from "./chunk-2ZUEXCVJ.mjs";
|
|
4
7
|
import {
|
|
5
8
|
ChartTooltip
|
|
6
9
|
} from "./chunk-SPFL55TF.mjs";
|
|
7
10
|
import {
|
|
8
11
|
ChartCanvas
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SNNT64HK.mjs";
|
|
10
13
|
import {
|
|
11
14
|
ChartLegend
|
|
12
15
|
} from "./chunk-V443QIJM.mjs";
|
|
13
|
-
import {
|
|
14
|
-
ChartSeries
|
|
15
|
-
} from "./chunk-2ZUEXCVJ.mjs";
|
|
16
16
|
|
|
17
17
|
// src/components/PieChart.ts
|
|
18
18
|
import { defineComponent, computed, h, useId } from "vue";
|
|
@@ -188,6 +188,7 @@ var PieChart = defineComponent({
|
|
|
188
188
|
wrapperClasses
|
|
189
189
|
} = useChartInteraction({
|
|
190
190
|
hoverable: computed(() => props.hoverable),
|
|
191
|
+
showTooltip: computed(() => props.showTooltip),
|
|
191
192
|
hoveredIndexProp: () => props.hoveredIndex,
|
|
192
193
|
selectable: computed(() => props.selectable),
|
|
193
194
|
selectedIndexProp: () => props.selectedIndex,
|
|
@@ -392,7 +393,7 @@ var PieChart = defineComponent({
|
|
|
392
393
|
}
|
|
393
394
|
}
|
|
394
395
|
);
|
|
395
|
-
const tooltip = props.showTooltip
|
|
396
|
+
const tooltip = props.showTooltip ? h(ChartTooltip, {
|
|
396
397
|
content: tooltipContent.value,
|
|
397
398
|
open: resolvedHoveredIndex.value !== null && tooltipContent.value !== "",
|
|
398
399
|
x: tooltipPosition.value.x,
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-BZ6MVFV7.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Radio
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-73Z7N7VG.mjs";
|
|
7
7
|
import {
|
|
8
8
|
Pagination
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OYU47A57.mjs";
|
|
10
10
|
import {
|
|
11
11
|
Empty
|
|
12
12
|
} from "./chunk-SJINC5NF.mjs";
|
|
@@ -128,8 +128,8 @@ var tableProps = {
|
|
|
128
128
|
pagination: {
|
|
129
129
|
type: [Object, Boolean],
|
|
130
130
|
default: () => ({
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
defaultCurrent: 1,
|
|
132
|
+
defaultPageSize: 10,
|
|
133
133
|
total: 0,
|
|
134
134
|
pageSizeOptions: [10, 20, 50, 100],
|
|
135
135
|
showSizeChanger: true,
|
|
@@ -398,7 +398,13 @@ function useTableState(props, emit, measuredColumnWidths) {
|
|
|
398
398
|
}
|
|
399
399
|
if (sortState.value.key && sortState.value.direction) {
|
|
400
400
|
const column = columnByKey.value[sortState.value.key];
|
|
401
|
-
data = sortData(
|
|
401
|
+
data = sortData(
|
|
402
|
+
data,
|
|
403
|
+
sortState.value.key,
|
|
404
|
+
sortState.value.direction,
|
|
405
|
+
column?.sortFn,
|
|
406
|
+
props.columns
|
|
407
|
+
);
|
|
402
408
|
}
|
|
403
409
|
return data;
|
|
404
410
|
});
|
|
@@ -764,7 +770,8 @@ import {
|
|
|
764
770
|
getFixedColumnStyle,
|
|
765
771
|
getCheckboxCellClasses,
|
|
766
772
|
getExpandIconCellClasses,
|
|
767
|
-
formatTableSortByText
|
|
773
|
+
formatTableSortByText,
|
|
774
|
+
tableSortButtonClasses
|
|
768
775
|
} from "@expcat/tigercat-core";
|
|
769
776
|
function renderTableHeader(ctx, props, slots, labels) {
|
|
770
777
|
const headerCells = [];
|
|
@@ -805,14 +812,31 @@ function renderTableHeader(ctx, props, slots, labels) {
|
|
|
805
812
|
width: typeof column.width === "number" ? `${column.width}px` : column.width
|
|
806
813
|
} : void 0;
|
|
807
814
|
const style = fixedStyle ? { ...widthStyle, ...fixedStyle } : widthStyle;
|
|
808
|
-
const
|
|
815
|
+
const titleContent = [];
|
|
809
816
|
const slotContent = slots[`header-${column.key}`]?.();
|
|
810
817
|
if (slotContent && slotContent.length > 0) {
|
|
811
|
-
|
|
818
|
+
titleContent.push(...slotContent);
|
|
812
819
|
} else if (column.renderHeader) {
|
|
813
|
-
|
|
820
|
+
titleContent.push(column.renderHeader());
|
|
821
|
+
} else {
|
|
822
|
+
titleContent.push(column.title);
|
|
823
|
+
}
|
|
824
|
+
const headerContent = [];
|
|
825
|
+
if (column.sortable) {
|
|
826
|
+
headerContent.push(
|
|
827
|
+
h2(
|
|
828
|
+
"button",
|
|
829
|
+
{
|
|
830
|
+
type: "button",
|
|
831
|
+
"data-tiger-table-sort": "",
|
|
832
|
+
class: tableSortButtonClasses,
|
|
833
|
+
onClick: () => ctx.handleSort(column.key)
|
|
834
|
+
},
|
|
835
|
+
[...titleContent, SortIcon(sortDirection)]
|
|
836
|
+
)
|
|
837
|
+
);
|
|
814
838
|
} else {
|
|
815
|
-
headerContent.push(
|
|
839
|
+
headerContent.push(...titleContent);
|
|
816
840
|
}
|
|
817
841
|
if (props.columnLockable) {
|
|
818
842
|
headerContent.push(
|
|
@@ -837,9 +861,6 @@ function renderTableHeader(ctx, props, slots, labels) {
|
|
|
837
861
|
)
|
|
838
862
|
);
|
|
839
863
|
}
|
|
840
|
-
if (column.sortable) {
|
|
841
|
-
headerContent.push(SortIcon(sortDirection));
|
|
842
|
-
}
|
|
843
864
|
headerCells.push(
|
|
844
865
|
h2(
|
|
845
866
|
"th",
|
|
@@ -865,8 +886,7 @@ function renderTableHeader(ctx, props, slots, labels) {
|
|
|
865
886
|
draggable: props.columnDraggable ? "true" : void 0,
|
|
866
887
|
onDragstart: props.columnDraggable ? () => ctx.handleDragStart(column.key) : void 0,
|
|
867
888
|
onDragover: props.columnDraggable ? (e) => e.preventDefault() : void 0,
|
|
868
|
-
onDrop: props.columnDraggable ? () => ctx.handleDrop(column.key) : void 0
|
|
869
|
-
onClick: column.sortable ? () => ctx.handleSort(column.key) : void 0
|
|
889
|
+
onDrop: props.columnDraggable ? () => ctx.handleDrop(column.key) : void 0
|
|
870
890
|
},
|
|
871
891
|
[
|
|
872
892
|
h2("div", { class: "flex items-center gap-2" }, headerContent),
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// src/components/Kbd.ts
|
|
2
|
+
import { defineComponent, h } from "vue";
|
|
3
|
+
import {
|
|
4
|
+
composeComponentClasses,
|
|
5
|
+
formatKbdSeparatorText,
|
|
6
|
+
getKbdParts,
|
|
7
|
+
getKbdRootClasses,
|
|
8
|
+
kbdKeyClasses,
|
|
9
|
+
kbdSeparatorClasses,
|
|
10
|
+
mergeStyleValues
|
|
11
|
+
} from "@expcat/tigercat-core";
|
|
12
|
+
function hasSlotContent(nodes) {
|
|
13
|
+
return Array.isArray(nodes) && nodes.length > 0;
|
|
14
|
+
}
|
|
15
|
+
var Kbd = defineComponent({
|
|
16
|
+
name: "TigerKbd",
|
|
17
|
+
inheritAttrs: false,
|
|
18
|
+
props: {
|
|
19
|
+
/**
|
|
20
|
+
* One key or a combo list. A string is a single key; an array is joined
|
|
21
|
+
* with `separator`. Combine with the default slot to append a final key.
|
|
22
|
+
*/
|
|
23
|
+
keys: {
|
|
24
|
+
type: [String, Array],
|
|
25
|
+
default: void 0
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* Separator between combo keys
|
|
29
|
+
* @default '+'
|
|
30
|
+
*/
|
|
31
|
+
separator: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: void 0
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* Visual size
|
|
37
|
+
* @default 'md'
|
|
38
|
+
*/
|
|
39
|
+
size: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: "md"
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* Visual variant. `default` reuses Tag default chrome; `subtle` is quieter.
|
|
45
|
+
* @default 'default'
|
|
46
|
+
*/
|
|
47
|
+
variant: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: "default"
|
|
50
|
+
},
|
|
51
|
+
/**
|
|
52
|
+
* Additional CSS classes
|
|
53
|
+
*/
|
|
54
|
+
className: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: void 0
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* Inline styles
|
|
60
|
+
*/
|
|
61
|
+
style: {
|
|
62
|
+
type: Object,
|
|
63
|
+
default: void 0
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
setup(props, { slots, attrs }) {
|
|
67
|
+
return () => {
|
|
68
|
+
const attrsRecord = attrs;
|
|
69
|
+
const parts = getKbdParts(props.keys, props.separator);
|
|
70
|
+
const slotNodes = slots.default?.();
|
|
71
|
+
const hasSlot = hasSlotContent(slotNodes);
|
|
72
|
+
const children = [];
|
|
73
|
+
for (const part of parts) {
|
|
74
|
+
if (part.type === "separator") {
|
|
75
|
+
children.push(
|
|
76
|
+
h("span", { class: kbdSeparatorClasses, "data-kbd-separator": "" }, ` ${part.value} `)
|
|
77
|
+
);
|
|
78
|
+
} else {
|
|
79
|
+
children.push(h("kbd", { class: kbdKeyClasses, "data-kbd-key": "" }, part.value));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (hasSlot && slotNodes) {
|
|
83
|
+
if (parts.length > 0) {
|
|
84
|
+
children.push(
|
|
85
|
+
h(
|
|
86
|
+
"span",
|
|
87
|
+
{ class: kbdSeparatorClasses, "data-kbd-separator": "" },
|
|
88
|
+
formatKbdSeparatorText(props.separator)
|
|
89
|
+
)
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
children.push(...slotNodes);
|
|
93
|
+
}
|
|
94
|
+
return h(
|
|
95
|
+
"kbd",
|
|
96
|
+
{
|
|
97
|
+
...attrs,
|
|
98
|
+
class: composeComponentClasses(
|
|
99
|
+
getKbdRootClasses({
|
|
100
|
+
size: props.size,
|
|
101
|
+
variant: props.variant,
|
|
102
|
+
className: props.className
|
|
103
|
+
}),
|
|
104
|
+
attrsRecord.class
|
|
105
|
+
),
|
|
106
|
+
style: mergeStyleValues(attrsRecord.style, props.style),
|
|
107
|
+
"data-kbd": "",
|
|
108
|
+
"data-kbd-size": props.size,
|
|
109
|
+
"data-kbd-variant": props.variant
|
|
110
|
+
},
|
|
111
|
+
children
|
|
112
|
+
);
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
var Kbd_default = Kbd;
|
|
117
|
+
|
|
118
|
+
export {
|
|
119
|
+
Kbd,
|
|
120
|
+
Kbd_default
|
|
121
|
+
};
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FORM_ITEM_CONTROL_INJECTION_KEY
|
|
3
|
+
} from "./chunk-P2LZ2MR5.mjs";
|
|
4
|
+
import {
|
|
5
|
+
Tag
|
|
6
|
+
} from "./chunk-342DH5CF.mjs";
|
|
7
|
+
import {
|
|
8
|
+
useTigerConfig
|
|
9
|
+
} from "./chunk-UOJOJBEU.mjs";
|
|
10
|
+
|
|
11
|
+
// src/components/TagsInput.ts
|
|
12
|
+
import { computed, defineComponent, h, inject, ref, watch } from "vue";
|
|
13
|
+
import {
|
|
14
|
+
addTags,
|
|
15
|
+
classNames,
|
|
16
|
+
coerceClassValue,
|
|
17
|
+
extractTagCandidates,
|
|
18
|
+
formatRemoveTagLabel,
|
|
19
|
+
getTagsInputClearButtonClasses,
|
|
20
|
+
getTagsInputContainerClasses,
|
|
21
|
+
getTagsInputErrorClasses,
|
|
22
|
+
getTagsInputHighlightClasses,
|
|
23
|
+
getTagsInputInnerInputClasses,
|
|
24
|
+
getTagsInputLabels,
|
|
25
|
+
injectShakeStyle,
|
|
26
|
+
mergeStyleValues,
|
|
27
|
+
removeTagAt,
|
|
28
|
+
SHAKE_CLASS,
|
|
29
|
+
splitTagInput
|
|
30
|
+
} from "@expcat/tigercat-core";
|
|
31
|
+
var tagsInputIdCounter = 0;
|
|
32
|
+
var TagsInput = defineComponent({
|
|
33
|
+
name: "TigerTagsInput",
|
|
34
|
+
inheritAttrs: false,
|
|
35
|
+
props: {
|
|
36
|
+
/**
|
|
37
|
+
* Tags (for v-model)
|
|
38
|
+
*/
|
|
39
|
+
modelValue: { type: Array, default: void 0 },
|
|
40
|
+
/**
|
|
41
|
+
* Default tags (for uncontrolled mode)
|
|
42
|
+
*/
|
|
43
|
+
defaultValue: { type: Array, default: () => [] },
|
|
44
|
+
/**
|
|
45
|
+
* Input size
|
|
46
|
+
* @default 'md'
|
|
47
|
+
*/
|
|
48
|
+
size: { type: String, default: "md" },
|
|
49
|
+
/**
|
|
50
|
+
* Validation status
|
|
51
|
+
* @default 'default'
|
|
52
|
+
*/
|
|
53
|
+
status: { type: String, default: "default" },
|
|
54
|
+
/** Error message to display */
|
|
55
|
+
errorMessage: String,
|
|
56
|
+
/** Placeholder for the inner text input */
|
|
57
|
+
placeholder: { type: String, default: "" },
|
|
58
|
+
/** Whether the same tag may be added more than once */
|
|
59
|
+
allowDuplicates: Boolean,
|
|
60
|
+
/** Maximum number of tags */
|
|
61
|
+
max: { type: Number, default: void 0 },
|
|
62
|
+
/**
|
|
63
|
+
* Characters that commit input while typing and split pasted text
|
|
64
|
+
* @default [',']
|
|
65
|
+
*/
|
|
66
|
+
delimiters: { type: Array, default: () => [","] },
|
|
67
|
+
/** Commit the pending input as a tag on blur */
|
|
68
|
+
addOnBlur: Boolean,
|
|
69
|
+
/** Validate/transform a candidate tag before it is added */
|
|
70
|
+
beforeAdd: {
|
|
71
|
+
type: Function,
|
|
72
|
+
default: void 0
|
|
73
|
+
},
|
|
74
|
+
/** Whether to show a clear-all button */
|
|
75
|
+
clearable: Boolean,
|
|
76
|
+
/** Whether the input is disabled */
|
|
77
|
+
disabled: Boolean,
|
|
78
|
+
/** Whether the input is readonly */
|
|
79
|
+
readonly: Boolean,
|
|
80
|
+
/** Name for the hidden input carrying the joined value */
|
|
81
|
+
name: String,
|
|
82
|
+
/** Id attribute applied to the inner text input */
|
|
83
|
+
id: String,
|
|
84
|
+
/** Aria-label template for tag remove buttons; supports {tag} */
|
|
85
|
+
removeTagAriaLabel: String,
|
|
86
|
+
/**
|
|
87
|
+
* Internal shake trigger counter (used by FormItem)
|
|
88
|
+
* @internal
|
|
89
|
+
*/
|
|
90
|
+
_shakeTrigger: { type: Number, default: void 0 },
|
|
91
|
+
/** Additional CSS classes */
|
|
92
|
+
className: String,
|
|
93
|
+
/** Inline styles */
|
|
94
|
+
style: { type: Object, default: void 0 }
|
|
95
|
+
},
|
|
96
|
+
emits: {
|
|
97
|
+
"update:modelValue": null,
|
|
98
|
+
add: null,
|
|
99
|
+
remove: null,
|
|
100
|
+
clear: null,
|
|
101
|
+
focus: null,
|
|
102
|
+
blur: null
|
|
103
|
+
},
|
|
104
|
+
setup(props, { emit, attrs }) {
|
|
105
|
+
injectShakeStyle();
|
|
106
|
+
const config = useTigerConfig();
|
|
107
|
+
const formItemControl = inject(
|
|
108
|
+
FORM_ITEM_CONTROL_INJECTION_KEY,
|
|
109
|
+
null
|
|
110
|
+
);
|
|
111
|
+
const effectiveStatus = computed(
|
|
112
|
+
() => props.status !== "default" ? props.status : formItemControl?.status.value ?? props.status
|
|
113
|
+
);
|
|
114
|
+
const effectiveErrorMessage = computed(
|
|
115
|
+
() => props.errorMessage ?? formItemControl?.errorMessage.value
|
|
116
|
+
);
|
|
117
|
+
const effectiveShakeTrigger = computed(
|
|
118
|
+
() => props._shakeTrigger ?? formItemControl?.shakeTrigger.value
|
|
119
|
+
);
|
|
120
|
+
const labels = computed(() => getTagsInputLabels(config.value.locale));
|
|
121
|
+
const instanceId = ++tagsInputIdCounter;
|
|
122
|
+
const errorMsgId = `tiger-tags-input-error-${instanceId}`;
|
|
123
|
+
const containerRef = ref(null);
|
|
124
|
+
const inputRef = ref(null);
|
|
125
|
+
const isControlled = computed(() => props.modelValue !== void 0);
|
|
126
|
+
const innerTags = ref([...props.defaultValue]);
|
|
127
|
+
const tags = computed(() => isControlled.value ? props.modelValue ?? [] : innerTags.value);
|
|
128
|
+
const inputText = ref("");
|
|
129
|
+
const highlightedIndex = ref(null);
|
|
130
|
+
watch([effectiveStatus, effectiveShakeTrigger], ([newStatus]) => {
|
|
131
|
+
if (newStatus === "error" && containerRef.value) {
|
|
132
|
+
const el = containerRef.value;
|
|
133
|
+
el.classList.remove(SHAKE_CLASS);
|
|
134
|
+
void el.offsetWidth;
|
|
135
|
+
el.classList.add(SHAKE_CLASS);
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
const isInteractive = computed(() => !props.disabled && !props.readonly);
|
|
139
|
+
const setTags = (next) => {
|
|
140
|
+
if (!isControlled.value) innerTags.value = next;
|
|
141
|
+
emit("update:modelValue", next);
|
|
142
|
+
};
|
|
143
|
+
const commitCandidates = (candidates) => {
|
|
144
|
+
const prepared = [];
|
|
145
|
+
for (const raw of candidates) {
|
|
146
|
+
if (!props.beforeAdd) {
|
|
147
|
+
prepared.push(raw);
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
const result = props.beforeAdd(raw.trim());
|
|
151
|
+
if (result === false) continue;
|
|
152
|
+
prepared.push(typeof result === "string" ? result : raw);
|
|
153
|
+
}
|
|
154
|
+
if (prepared.length === 0) return [];
|
|
155
|
+
const { tags: nextTags, added } = addTags(tags.value, prepared, {
|
|
156
|
+
allowDuplicates: props.allowDuplicates,
|
|
157
|
+
max: props.max
|
|
158
|
+
});
|
|
159
|
+
if (added.length > 0) {
|
|
160
|
+
setTags(nextTags);
|
|
161
|
+
added.forEach((tag) => emit("add", tag));
|
|
162
|
+
}
|
|
163
|
+
return added;
|
|
164
|
+
};
|
|
165
|
+
const removeAt = (index) => {
|
|
166
|
+
const tag = tags.value[index];
|
|
167
|
+
if (tag === void 0) return;
|
|
168
|
+
setTags(removeTagAt(tags.value, index));
|
|
169
|
+
emit("remove", tag, index);
|
|
170
|
+
};
|
|
171
|
+
const handleInput = (event) => {
|
|
172
|
+
if (!isInteractive.value) return;
|
|
173
|
+
highlightedIndex.value = null;
|
|
174
|
+
const target = event.target;
|
|
175
|
+
const { candidates, pending } = extractTagCandidates(target.value, props.delimiters);
|
|
176
|
+
if (candidates.length > 0) commitCandidates(candidates);
|
|
177
|
+
inputText.value = pending;
|
|
178
|
+
target.value = pending;
|
|
179
|
+
};
|
|
180
|
+
const handleKeydown = (event) => {
|
|
181
|
+
if (!isInteractive.value) return;
|
|
182
|
+
if (event.key === "Enter") {
|
|
183
|
+
event.preventDefault();
|
|
184
|
+
if (inputText.value.trim()) {
|
|
185
|
+
const added = commitCandidates([inputText.value]);
|
|
186
|
+
if (added.length > 0) inputText.value = "";
|
|
187
|
+
}
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
if (event.key === "Backspace" && inputText.value === "") {
|
|
191
|
+
if (highlightedIndex.value !== null) {
|
|
192
|
+
removeAt(highlightedIndex.value);
|
|
193
|
+
highlightedIndex.value = null;
|
|
194
|
+
} else if (tags.value.length > 0) {
|
|
195
|
+
highlightedIndex.value = tags.value.length - 1;
|
|
196
|
+
}
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
if (event.key === "ArrowLeft" && inputText.value === "" && tags.value.length > 0) {
|
|
200
|
+
highlightedIndex.value = highlightedIndex.value === null ? tags.value.length - 1 : Math.max(0, highlightedIndex.value - 1);
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
if (event.key === "ArrowRight" && highlightedIndex.value !== null) {
|
|
204
|
+
highlightedIndex.value = highlightedIndex.value >= tags.value.length - 1 ? null : highlightedIndex.value + 1;
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
if (event.key === "Escape" && highlightedIndex.value !== null) {
|
|
208
|
+
highlightedIndex.value = null;
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
if (highlightedIndex.value !== null) highlightedIndex.value = null;
|
|
212
|
+
};
|
|
213
|
+
const handlePaste = (event) => {
|
|
214
|
+
if (!isInteractive.value) return;
|
|
215
|
+
const text = event.clipboardData?.getData("text") ?? "";
|
|
216
|
+
const candidates = splitTagInput(text, props.delimiters);
|
|
217
|
+
if (candidates.length <= 1) return;
|
|
218
|
+
event.preventDefault();
|
|
219
|
+
commitCandidates(candidates);
|
|
220
|
+
inputText.value = "";
|
|
221
|
+
if (inputRef.value) inputRef.value.value = "";
|
|
222
|
+
};
|
|
223
|
+
const handleFocus = (event) => emit("focus", event);
|
|
224
|
+
const handleBlur = (event) => {
|
|
225
|
+
highlightedIndex.value = null;
|
|
226
|
+
if (props.addOnBlur && inputText.value.trim() && isInteractive.value) {
|
|
227
|
+
const added = commitCandidates([inputText.value]);
|
|
228
|
+
if (added.length > 0) inputText.value = "";
|
|
229
|
+
}
|
|
230
|
+
emit("blur", event);
|
|
231
|
+
};
|
|
232
|
+
const handleClear = () => {
|
|
233
|
+
if (!isInteractive.value || tags.value.length === 0) return;
|
|
234
|
+
setTags([]);
|
|
235
|
+
inputText.value = "";
|
|
236
|
+
highlightedIndex.value = null;
|
|
237
|
+
emit("clear");
|
|
238
|
+
inputRef.value?.focus();
|
|
239
|
+
};
|
|
240
|
+
const handleContainerClick = (event) => {
|
|
241
|
+
if (event.target === containerRef.value) inputRef.value?.focus();
|
|
242
|
+
};
|
|
243
|
+
return () => {
|
|
244
|
+
const { class: attrClass, style: attrStyle, ...restAttrs } = attrs;
|
|
245
|
+
const activeError = effectiveStatus.value === "error" && !!effectiveErrorMessage.value;
|
|
246
|
+
const isFull = props.max !== void 0 && tags.value.length >= props.max;
|
|
247
|
+
const removeLabelTemplate = props.removeTagAriaLabel ?? labels.value.removeTagLabel;
|
|
248
|
+
const tagSize = props.size === "lg" ? "md" : "sm";
|
|
249
|
+
const children = [];
|
|
250
|
+
tags.value.forEach((tag, index) => {
|
|
251
|
+
children.push(
|
|
252
|
+
h(
|
|
253
|
+
Tag,
|
|
254
|
+
{
|
|
255
|
+
key: `${tag}-${index}`,
|
|
256
|
+
size: tagSize,
|
|
257
|
+
closable: isInteractive.value,
|
|
258
|
+
closeAriaLabel: formatRemoveTagLabel(removeLabelTemplate, tag),
|
|
259
|
+
class: index === highlightedIndex.value ? getTagsInputHighlightClasses() : void 0,
|
|
260
|
+
onClose: (event) => {
|
|
261
|
+
event.preventDefault();
|
|
262
|
+
removeAt(index);
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
() => tag
|
|
266
|
+
)
|
|
267
|
+
);
|
|
268
|
+
});
|
|
269
|
+
children.push(
|
|
270
|
+
h("input", {
|
|
271
|
+
key: "text-input",
|
|
272
|
+
ref: inputRef,
|
|
273
|
+
class: getTagsInputInnerInputClasses(),
|
|
274
|
+
type: "text",
|
|
275
|
+
value: inputText.value,
|
|
276
|
+
placeholder: tags.value.length === 0 ? props.placeholder : "",
|
|
277
|
+
disabled: props.disabled,
|
|
278
|
+
readonly: props.readonly,
|
|
279
|
+
id: props.id ? `${props.id}-input` : props.id,
|
|
280
|
+
...effectiveStatus.value === "error" ? { "aria-invalid": true } : {},
|
|
281
|
+
...activeError ? { "aria-describedby": errorMsgId } : {},
|
|
282
|
+
onInput: handleInput,
|
|
283
|
+
onKeydown: handleKeydown,
|
|
284
|
+
onPaste: handlePaste,
|
|
285
|
+
onFocus: handleFocus,
|
|
286
|
+
onBlur: handleBlur
|
|
287
|
+
})
|
|
288
|
+
);
|
|
289
|
+
if (props.clearable && tags.value.length > 0 && isInteractive.value) {
|
|
290
|
+
children.push(
|
|
291
|
+
h(
|
|
292
|
+
"button",
|
|
293
|
+
{
|
|
294
|
+
key: "clear",
|
|
295
|
+
type: "button",
|
|
296
|
+
class: getTagsInputClearButtonClasses(),
|
|
297
|
+
onClick: handleClear,
|
|
298
|
+
"aria-label": labels.value.clearAllLabel,
|
|
299
|
+
tabindex: -1
|
|
300
|
+
},
|
|
301
|
+
"\u2715"
|
|
302
|
+
)
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
if (props.name) {
|
|
306
|
+
children.push(
|
|
307
|
+
h("input", {
|
|
308
|
+
key: "hidden",
|
|
309
|
+
type: "hidden",
|
|
310
|
+
name: props.name,
|
|
311
|
+
value: tags.value.join(",")
|
|
312
|
+
})
|
|
313
|
+
);
|
|
314
|
+
}
|
|
315
|
+
const containerNode = h(
|
|
316
|
+
"div",
|
|
317
|
+
{
|
|
318
|
+
...restAttrs,
|
|
319
|
+
ref: containerRef,
|
|
320
|
+
id: props.id,
|
|
321
|
+
class: classNames(
|
|
322
|
+
getTagsInputContainerClasses(props.size, effectiveStatus.value, {
|
|
323
|
+
disabled: props.disabled
|
|
324
|
+
}),
|
|
325
|
+
props.className,
|
|
326
|
+
coerceClassValue(attrClass)
|
|
327
|
+
),
|
|
328
|
+
style: mergeStyleValues(props.style, attrStyle),
|
|
329
|
+
"data-state": isFull ? "full" : void 0,
|
|
330
|
+
onClick: handleContainerClick
|
|
331
|
+
},
|
|
332
|
+
children
|
|
333
|
+
);
|
|
334
|
+
if (!activeError) return containerNode;
|
|
335
|
+
return h("div", {}, [
|
|
336
|
+
containerNode,
|
|
337
|
+
h("div", { id: errorMsgId, class: getTagsInputErrorClasses() }, effectiveErrorMessage.value)
|
|
338
|
+
]);
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
var TagsInput_default = TagsInput;
|
|
343
|
+
|
|
344
|
+
export {
|
|
345
|
+
TagsInput,
|
|
346
|
+
TagsInput_default
|
|
347
|
+
};
|