@expcat/tigercat-vue 1.2.47 → 1.3.0
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-6GPX4ONB.mjs → chunk-35NT2WJR.mjs} +1 -1
- package/dist/{chunk-ICECZVMX.js → chunk-3XCQRM3L.js} +5 -5
- package/dist/{chunk-BIDBJNTL.mjs → chunk-4YXQMKKW.mjs} +138 -82
- package/dist/{chunk-OHCC6NNC.mjs → chunk-5VVP4UNO.mjs} +53 -9
- package/dist/{chunk-UETVHC4K.mjs → chunk-6BFGY5W7.mjs} +2 -2
- package/dist/{chunk-JE7AWY34.js → chunk-6NFACBDB.js} +33 -13
- package/dist/{chunk-PT4Q7C2A.mjs → chunk-6OQLZCQK.mjs} +8 -3
- package/dist/{chunk-CKXZONMO.js → chunk-72DDCIVL.js} +9 -1
- package/dist/{chunk-DMNOK6OP.js → chunk-7VHDBN6U.js} +3 -3
- package/dist/{chunk-LFKY2QRD.mjs → chunk-7WQN5BYE.mjs} +5 -2
- package/dist/{chunk-BGMAWKWV.js → chunk-AEOREYSJ.js} +2 -1
- package/dist/{chunk-5TJI4HOT.js → chunk-AP42636I.js} +2 -2
- package/dist/{chunk-IGSAOYXD.mjs → chunk-BC74Z6IG.mjs} +10 -2
- package/dist/{chunk-G36MH6G4.mjs → chunk-BH4AJQTL.mjs} +1 -1
- package/dist/{chunk-2KDSHEZT.js → chunk-BPAZBRCR.js} +2 -0
- package/dist/{chunk-JKJ7HMFO.mjs → chunk-BWIHL7LK.mjs} +2 -2
- package/dist/{chunk-WQXZ3234.mjs → chunk-DBCSR4WY.mjs} +30 -5
- package/dist/{chunk-V6T5GRLE.js → chunk-EW2IW2JW.js} +5 -5
- package/dist/{chunk-VKW2O36D.mjs → chunk-FSGD24HV.mjs} +13 -4
- package/dist/{chunk-3G4VPV4D.mjs → chunk-G6ULKE6H.mjs} +3 -1
- package/dist/{chunk-SGAUVRUS.js → chunk-H6V26X2R.js} +66 -8
- package/dist/{chunk-4VLNT2ED.js → chunk-HA5QZ76M.js} +2 -0
- package/dist/{chunk-BXS7OSVF.js → chunk-HFRPZA5S.js} +3 -3
- package/dist/{chunk-WH4J6PHF.mjs → chunk-IORFQMZH.mjs} +1 -1
- package/dist/{chunk-PYT5DTQQ.mjs → chunk-IZQ7BRHC.mjs} +2 -1
- package/dist/{chunk-FRI62O2J.js → chunk-JJXYM6QR.js} +2 -2
- package/dist/{chunk-I4LQXUMW.js → chunk-JTVFVAM3.js} +9 -1
- package/dist/{chunk-BPRKQVIL.mjs → chunk-K4VUUEFQ.mjs} +2 -2
- package/dist/{chunk-RY2I56HB.js → chunk-K6DYTMBE.js} +30 -5
- package/dist/{chunk-SZFEDBLT.mjs → chunk-LA5YKXPH.mjs} +9 -1
- package/dist/{chunk-QIXG7OIN.mjs → chunk-MJP2SNLK.mjs} +3 -3
- package/dist/{chunk-B2RH4CMG.js → chunk-NKVEXKM5.js} +5 -2
- package/dist/{chunk-ROMVD7LS.mjs → chunk-NUABW6IB.mjs} +1 -1
- package/dist/{chunk-WIQPVVUQ.js → chunk-NYR6OQO4.js} +7 -7
- package/dist/{chunk-QJLFHHI2.js → chunk-Q3IZQUW7.js} +9 -1
- package/dist/{chunk-YS6FW775.js → chunk-Q47OK3FR.js} +2 -2
- package/dist/{chunk-27T3QDSF.js → chunk-RBHF7NOQ.js} +3 -1
- package/dist/{chunk-V2IDOR7Y.mjs → chunk-RNQOMMLM.mjs} +1 -1
- package/dist/{chunk-GQPSQJ5I.mjs → chunk-SL5KAVZK.mjs} +10 -2
- package/dist/{chunk-PXSV3J2H.js → chunk-SRFNKU2H.js} +137 -81
- package/dist/{chunk-6WM7E6C4.js → chunk-SZB5BZBG.js} +64 -20
- package/dist/{chunk-KOTSKHPQ.mjs → chunk-TC6ZPQFT.mjs} +13 -3
- package/dist/{chunk-L6W3XL3A.js → chunk-TZDNF5SK.js} +12 -12
- package/dist/{chunk-XGXGAK27.js → chunk-UG6O4F2A.js} +12 -2
- package/dist/{chunk-7IVLFDZI.js → chunk-UWZSTI3E.js} +14 -5
- package/dist/{chunk-LBGTABIU.mjs → chunk-VCBBWDOV.mjs} +3 -1
- package/dist/{chunk-GD2WAN62.js → chunk-VH2GDZBH.js} +5 -3
- package/dist/{chunk-VWEH6TGR.mjs → chunk-W6VKVYWZ.mjs} +66 -8
- package/dist/{chunk-NP6KUJ4X.mjs → chunk-WUHW7AIM.mjs} +33 -13
- package/dist/{chunk-FI2EIJIF.mjs → chunk-XMGNMKWW.mjs} +5 -3
- package/dist/{chunk-LUAI6VXV.js → chunk-XV6IYXAP.js} +8 -3
- package/dist/{chunk-PO5GVU4Q.mjs → chunk-YZBQ6IR7.mjs} +3 -1
- package/dist/components/ActivityFeed.d.mts +6 -6
- package/dist/components/ActivityFeed.d.ts +6 -6
- package/dist/components/ActivityFeed.js +5 -5
- package/dist/components/ActivityFeed.mjs +4 -4
- package/dist/components/Alert.d.mts +3 -3
- package/dist/components/Alert.d.ts +3 -3
- package/dist/components/Anchor.d.mts +1 -1
- package/dist/components/Anchor.d.ts +1 -1
- package/dist/components/AreaChart.d.mts +3 -3
- package/dist/components/AreaChart.d.ts +3 -3
- package/dist/components/AutoComplete.d.mts +2 -2
- package/dist/components/AutoComplete.d.ts +2 -2
- package/dist/components/Avatar.d.mts +1 -1
- package/dist/components/Avatar.d.ts +1 -1
- package/dist/components/Badge.d.mts +3 -3
- package/dist/components/Badge.d.ts +3 -3
- package/dist/components/BarChart.d.mts +2 -2
- package/dist/components/BarChart.d.ts +2 -2
- package/dist/components/Breadcrumb.d.mts +2 -2
- package/dist/components/Breadcrumb.d.ts +2 -2
- package/dist/components/Button.d.mts +3 -3
- package/dist/components/Button.d.ts +3 -3
- package/dist/components/Button.js +2 -2
- package/dist/components/Button.mjs +1 -1
- package/dist/components/ButtonGroup.d.mts +1 -1
- package/dist/components/ButtonGroup.d.ts +1 -1
- package/dist/components/Calendar.d.mts +1 -1
- package/dist/components/Calendar.d.ts +1 -1
- package/dist/components/Card.d.mts +22 -2
- package/dist/components/Card.d.ts +22 -2
- package/dist/components/Card.js +2 -2
- package/dist/components/Card.mjs +1 -1
- package/dist/components/ChartCanvas.d.mts +1 -1
- package/dist/components/ChartCanvas.d.ts +1 -1
- package/dist/components/ChartGrid.d.mts +1 -1
- package/dist/components/ChartGrid.d.ts +1 -1
- package/dist/components/ChatWindow.d.mts +3 -3
- package/dist/components/ChatWindow.d.ts +3 -3
- package/dist/components/ChatWindow.js +3 -3
- package/dist/components/ChatWindow.mjs +2 -2
- package/dist/components/CodeEditor.d.mts +2 -2
- package/dist/components/CodeEditor.d.ts +2 -2
- package/dist/components/Collapse.d.mts +1 -1
- package/dist/components/Collapse.d.ts +1 -1
- package/dist/components/CollapsePanel.d.mts +1 -1
- package/dist/components/CollapsePanel.d.ts +1 -1
- package/dist/components/ColorSwatch.d.mts +1 -1
- package/dist/components/ColorSwatch.d.ts +1 -1
- package/dist/components/CommentThread.d.mts +2 -2
- package/dist/components/CommentThread.d.ts +2 -2
- package/dist/components/CommentThread.js +4 -4
- package/dist/components/CommentThread.mjs +3 -3
- package/dist/components/ConfigProvider.d.mts +1 -1
- package/dist/components/ConfigProvider.d.ts +1 -1
- package/dist/components/Container.d.mts +1 -1
- package/dist/components/Container.d.ts +1 -1
- package/dist/components/Content.d.mts +18 -0
- package/dist/components/Content.d.ts +18 -0
- package/dist/components/Content.js +2 -2
- package/dist/components/Content.mjs +1 -1
- package/dist/components/CropUpload.js +4 -4
- package/dist/components/CropUpload.mjs +3 -3
- package/dist/components/DataTableWithToolbar.d.mts +35 -13
- package/dist/components/DataTableWithToolbar.d.ts +35 -13
- package/dist/components/DataTableWithToolbar.js +6 -6
- package/dist/components/DataTableWithToolbar.mjs +5 -5
- package/dist/components/DatePicker.d.mts +2 -2
- package/dist/components/DatePicker.d.ts +2 -2
- package/dist/components/Descriptions.d.mts +2 -2
- package/dist/components/Descriptions.d.ts +2 -2
- package/dist/components/DonutChart.d.mts +3 -3
- package/dist/components/DonutChart.d.ts +3 -3
- package/dist/components/Drawer.d.mts +25 -7
- package/dist/components/Drawer.d.ts +25 -7
- package/dist/components/Drawer.js +2 -2
- package/dist/components/Drawer.mjs +1 -1
- package/dist/components/Dropdown.d.mts +1 -1
- package/dist/components/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown.js +2 -2
- package/dist/components/Dropdown.mjs +1 -1
- package/dist/components/DropdownItem.js +3 -3
- package/dist/components/DropdownItem.mjs +2 -2
- package/dist/components/DropdownMenu.js +3 -3
- package/dist/components/DropdownMenu.mjs +1 -1
- package/dist/components/FileManager.d.mts +1 -1
- package/dist/components/FileManager.d.ts +1 -1
- package/dist/components/FloatButton.d.mts +3 -3
- package/dist/components/FloatButton.d.ts +3 -3
- package/dist/components/Form.d.mts +3 -3
- package/dist/components/Form.d.ts +3 -3
- package/dist/components/Form.js +2 -2
- package/dist/components/Form.mjs +1 -1
- package/dist/components/FormItem.js +3 -3
- package/dist/components/FormItem.mjs +2 -2
- package/dist/components/FormWizard.d.mts +5 -5
- package/dist/components/FormWizard.d.ts +5 -5
- package/dist/components/FormWizard.js +3 -3
- package/dist/components/FormWizard.mjs +2 -2
- package/dist/components/FunnelChart.d.mts +2 -2
- package/dist/components/FunnelChart.d.ts +2 -2
- package/dist/components/Gantt.d.mts +2 -2
- package/dist/components/Gantt.d.ts +2 -2
- package/dist/components/GaugeChart.d.mts +2 -2
- package/dist/components/GaugeChart.d.ts +2 -2
- package/dist/components/Header.d.mts +19 -0
- package/dist/components/Header.d.ts +19 -0
- package/dist/components/Header.js +2 -2
- package/dist/components/Header.mjs +1 -1
- package/dist/components/HeatmapChart.d.mts +3 -3
- package/dist/components/HeatmapChart.d.ts +3 -3
- package/dist/components/Icon.d.mts +19 -1
- package/dist/components/Icon.d.ts +19 -1
- package/dist/components/Icon.js +2 -2
- package/dist/components/Icon.mjs +1 -1
- package/dist/components/Image.d.mts +13 -3
- package/dist/components/Image.d.ts +13 -3
- package/dist/components/Image.js +4 -2
- package/dist/components/Image.mjs +3 -1
- package/dist/components/ImageAnnotation.d.mts +4 -4
- package/dist/components/ImageAnnotation.d.ts +4 -4
- package/dist/components/ImagePreview.d.mts +1 -1
- package/dist/components/ImagePreview.d.ts +1 -1
- package/dist/components/InfiniteScroll.d.mts +2 -2
- package/dist/components/InfiniteScroll.d.ts +2 -2
- package/dist/components/Input.d.mts +4 -4
- package/dist/components/Input.d.ts +4 -4
- package/dist/components/InputGroup.d.mts +1 -1
- package/dist/components/InputGroup.d.ts +1 -1
- package/dist/components/InputNumber.d.mts +1 -1
- package/dist/components/InputNumber.d.ts +1 -1
- package/dist/components/Kanban.d.mts +1 -1
- package/dist/components/Kanban.d.ts +1 -1
- package/dist/components/LineChart.d.mts +2 -2
- package/dist/components/LineChart.d.ts +2 -2
- package/dist/components/Link.d.mts +1 -1
- package/dist/components/Link.d.ts +1 -1
- package/dist/components/List.d.mts +6 -6
- package/dist/components/List.d.ts +6 -6
- package/dist/components/Loading.d.mts +5 -5
- package/dist/components/Loading.d.ts +5 -5
- package/dist/components/MarkdownEditor.d.mts +2 -2
- package/dist/components/MarkdownEditor.d.ts +2 -2
- package/dist/components/Mentions.d.mts +2 -2
- package/dist/components/Mentions.d.ts +2 -2
- package/dist/components/Menu.d.mts +6 -6
- package/dist/components/Menu.d.ts +6 -6
- package/dist/components/Menu.js +2 -2
- package/dist/components/Menu.mjs +1 -1
- package/dist/components/MenuItem.js +3 -3
- package/dist/components/MenuItem.mjs +1 -1
- package/dist/components/MenuItemGroup.js +3 -3
- package/dist/components/MenuItemGroup.mjs +1 -1
- package/dist/components/Modal.d.mts +9 -9
- package/dist/components/Modal.d.ts +9 -9
- package/dist/components/Modal.js +3 -3
- package/dist/components/Modal.mjs +2 -2
- package/dist/components/NotificationCenter.d.mts +5 -5
- package/dist/components/NotificationCenter.d.ts +5 -5
- package/dist/components/NotificationCenter.js +4 -4
- package/dist/components/NotificationCenter.mjs +3 -3
- package/dist/components/NumberKeyboard.d.mts +2 -2
- package/dist/components/NumberKeyboard.d.ts +2 -2
- package/dist/components/OrgChart.d.mts +2 -2
- package/dist/components/OrgChart.d.ts +2 -2
- package/dist/components/Pagination.d.mts +4 -4
- package/dist/components/Pagination.d.ts +4 -4
- package/dist/components/PieChart.d.mts +3 -3
- package/dist/components/PieChart.d.ts +3 -3
- package/dist/components/Popconfirm.d.mts +3 -3
- package/dist/components/Popconfirm.d.ts +3 -3
- package/dist/components/Popconfirm.js +2 -2
- package/dist/components/Popconfirm.mjs +1 -1
- package/dist/components/Popover.d.mts +1 -1
- package/dist/components/Popover.d.ts +1 -1
- package/dist/components/Popover.js +2 -2
- package/dist/components/Popover.mjs +1 -1
- package/dist/components/Progress.d.mts +3 -3
- package/dist/components/Progress.d.ts +3 -3
- package/dist/components/QRCode.d.mts +1 -1
- package/dist/components/QRCode.d.ts +1 -1
- package/dist/components/RadarChart.d.mts +3 -3
- package/dist/components/RadarChart.d.ts +3 -3
- package/dist/components/RichTextEditor.d.mts +1 -1
- package/dist/components/RichTextEditor.d.ts +1 -1
- package/dist/components/Row.d.mts +1 -1
- package/dist/components/Row.d.ts +1 -1
- package/dist/components/ScatterChart.d.mts +2 -2
- package/dist/components/ScatterChart.d.ts +2 -2
- package/dist/components/ScrollSpy.d.mts +2 -2
- package/dist/components/ScrollSpy.d.ts +2 -2
- package/dist/components/Select.d.mts +1 -1
- package/dist/components/Select.d.ts +1 -1
- package/dist/components/Select.js +2 -2
- package/dist/components/Select.mjs +1 -1
- package/dist/components/Signature.d.mts +2 -2
- package/dist/components/Signature.d.ts +2 -2
- package/dist/components/Skeleton.d.mts +1 -1
- package/dist/components/Skeleton.d.ts +1 -1
- package/dist/components/Space.d.mts +2 -2
- package/dist/components/Space.d.ts +2 -2
- package/dist/components/Splitter.d.mts +1 -1
- package/dist/components/Splitter.d.ts +1 -1
- package/dist/components/Spotlight.d.mts +5 -5
- package/dist/components/Spotlight.d.ts +5 -5
- package/dist/components/Steps.d.mts +2 -2
- package/dist/components/Steps.d.ts +2 -2
- package/dist/components/SubMenu.js +3 -3
- package/dist/components/SubMenu.mjs +1 -1
- package/dist/components/SunburstChart.d.mts +2 -2
- package/dist/components/SunburstChart.d.ts +2 -2
- package/dist/components/Table.d.mts +36 -6
- package/dist/components/Table.d.ts +36 -6
- package/dist/components/Table.js +3 -3
- package/dist/components/Table.mjs +2 -2
- package/dist/components/Tabs.d.mts +3 -3
- package/dist/components/Tabs.d.ts +3 -3
- package/dist/components/Tag.d.mts +1 -1
- package/dist/components/Tag.d.ts +1 -1
- package/dist/components/Tag.js +2 -2
- package/dist/components/Tag.mjs +1 -1
- package/dist/components/TaskBoard.d.mts +2 -2
- package/dist/components/TaskBoard.d.ts +2 -2
- package/dist/components/Text.d.mts +3 -3
- package/dist/components/Text.d.ts +3 -3
- package/dist/components/Textarea.d.mts +1 -1
- package/dist/components/Textarea.d.ts +1 -1
- package/dist/components/TimePicker.d.mts +3 -3
- package/dist/components/TimePicker.d.ts +3 -3
- package/dist/components/Timeline.d.mts +3 -3
- package/dist/components/Timeline.d.ts +3 -3
- package/dist/components/Timeline.js +2 -2
- package/dist/components/Timeline.mjs +1 -1
- package/dist/components/Tooltip.d.mts +1 -1
- package/dist/components/Tooltip.d.ts +1 -1
- package/dist/components/Tour.d.mts +2 -2
- package/dist/components/Tour.d.ts +2 -2
- package/dist/components/Tree.d.mts +2 -2
- package/dist/components/Tree.d.ts +2 -2
- package/dist/components/TreeMapChart.d.mts +2 -2
- package/dist/components/TreeMapChart.d.ts +2 -2
- package/dist/components/Upload.d.mts +4 -4
- package/dist/components/Upload.d.ts +4 -4
- package/dist/components/VirtualTable.d.mts +2 -2
- package/dist/components/VirtualTable.d.ts +2 -2
- package/dist/components/Watermark.d.mts +1 -1
- package/dist/components/Watermark.d.ts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +27 -27
- package/dist/index.mjs +26 -26
- package/package.json +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkSRFNKU2Hjs = require('./chunk-SRFNKU2H.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkAEOREYSJjs = require('./chunk-AEOREYSJ.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkXV6IYXAPjs = require('./chunk-XV6IYXAP.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _chunk25EYT2CBjs = require('./chunk-25EYT2CB.js');
|
|
@@ -18,7 +18,7 @@ var _chunkBYNMOQBBjs = require('./chunk-BYNMOQBB.js');
|
|
|
18
18
|
var _chunk2YFXJUBTjs = require('./chunk-2YFXJUBT.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkHA5QZ76Mjs = require('./chunk-HA5QZ76M.js');
|
|
22
22
|
|
|
23
23
|
// src/components/DataTableWithToolbar.ts
|
|
24
24
|
|
|
@@ -143,6 +143,14 @@ var DataTableWithToolbar = _vue.defineComponent.call(void 0, {
|
|
|
143
143
|
type: Array,
|
|
144
144
|
default: void 0
|
|
145
145
|
},
|
|
146
|
+
cardClassName: {
|
|
147
|
+
type: [String, Function],
|
|
148
|
+
default: void 0
|
|
149
|
+
},
|
|
150
|
+
renderCard: {
|
|
151
|
+
type: Function,
|
|
152
|
+
default: void 0
|
|
153
|
+
},
|
|
146
154
|
toolbar: {
|
|
147
155
|
type: Object,
|
|
148
156
|
default: void 0
|
|
@@ -349,14 +357,14 @@ var DataTableWithToolbar = _vue.defineComponent.call(void 0, {
|
|
|
349
357
|
const lockedKeys = new Set(_nullishCoalesce(_optionalChain([props, 'access', _35 => _35.toolbar, 'optionalAccess', _36 => _36.columnSettings, 'optionalAccess', _37 => _37.lockedColumnKeys]), () => ( [])));
|
|
350
358
|
const panelTitle = _nullishCoalesce(_optionalChain([props, 'access', _38 => _38.toolbar, 'optionalAccess', _39 => _39.columnSettings, 'optionalAccess', _40 => _40.title]), () => ( tableLabels.value.columnSettingsText));
|
|
351
359
|
return _vue.h.call(void 0,
|
|
352
|
-
|
|
360
|
+
_chunkXV6IYXAPjs.Popover,
|
|
353
361
|
{
|
|
354
362
|
trigger: "click",
|
|
355
363
|
placement: "bottom-end"
|
|
356
364
|
},
|
|
357
365
|
{
|
|
358
366
|
default: () => _vue.h.call(void 0,
|
|
359
|
-
|
|
367
|
+
_chunkHA5QZ76Mjs.Button,
|
|
360
368
|
{
|
|
361
369
|
size: "sm",
|
|
362
370
|
variant: "outline",
|
|
@@ -411,7 +419,21 @@ var DataTableWithToolbar = _vue.defineComponent.call(void 0, {
|
|
|
411
419
|
}
|
|
412
420
|
);
|
|
413
421
|
};
|
|
422
|
+
const toolbarRenderContext = () => ({
|
|
423
|
+
searchValue: _nullishCoalesce(searchValue.value, () => ( "")),
|
|
424
|
+
setSearch: handleSearchChange,
|
|
425
|
+
submitSearch: handleSearchSubmit,
|
|
426
|
+
filters: resolvedFilters.value,
|
|
427
|
+
setFilter: (key, value) => setFilterValue(key, value),
|
|
428
|
+
selectedKeys: selectedKeys.value,
|
|
429
|
+
selectedCount: selectedCount.value,
|
|
430
|
+
hiddenColumnKeys: resolvedHiddenKeys.value,
|
|
431
|
+
setHiddenColumnKeys: handleHiddenColumnsChange
|
|
432
|
+
});
|
|
414
433
|
const renderToolbar = () => {
|
|
434
|
+
if (slots.toolbar) {
|
|
435
|
+
return slots.toolbar(toolbarRenderContext());
|
|
436
|
+
}
|
|
415
437
|
if (!hasSearch.value && !hasFilters.value && !hasFiltersExtra.value && !hasBulkActions.value && !hasColumnSettings.value)
|
|
416
438
|
return null;
|
|
417
439
|
const leftNodes = [];
|
|
@@ -420,7 +442,12 @@ var DataTableWithToolbar = _vue.defineComponent.call(void 0, {
|
|
|
420
442
|
leftNodes.push(
|
|
421
443
|
_vue.h.call(void 0,
|
|
422
444
|
"div",
|
|
423
|
-
{
|
|
445
|
+
{
|
|
446
|
+
class: _tigercatcore.classNames.call(void 0,
|
|
447
|
+
"flex items-center gap-2",
|
|
448
|
+
_nullishCoalesce(_optionalChain([props, 'access', _43 => _43.toolbar, 'optionalAccess', _44 => _44.searchClassName]), () => ( "w-full sm:w-auto sm:min-w-[220px] sm:max-w-[320px]"))
|
|
449
|
+
)
|
|
450
|
+
},
|
|
424
451
|
[
|
|
425
452
|
_vue.h.call(void 0,
|
|
426
453
|
_chunkBYNMOQBBjs.Input,
|
|
@@ -428,7 +455,7 @@ var DataTableWithToolbar = _vue.defineComponent.call(void 0, {
|
|
|
428
455
|
type: "search",
|
|
429
456
|
size: "sm",
|
|
430
457
|
modelValue: searchValue.value,
|
|
431
|
-
placeholder: _nullishCoalesce(_optionalChain([props, 'access',
|
|
458
|
+
placeholder: _nullishCoalesce(_optionalChain([props, 'access', _45 => _45.toolbar, 'optionalAccess', _46 => _46.searchPlaceholder]), () => ( tableLabels.value.searchPlaceholder)),
|
|
432
459
|
"onUpdate:modelValue": (value) => handleSearchChange(String(_nullishCoalesce(value, () => ( "")))),
|
|
433
460
|
onKeydown: (event) => {
|
|
434
461
|
if (event.key === "Enter") {
|
|
@@ -458,7 +485,7 @@ var DataTableWithToolbar = _vue.defineComponent.call(void 0, {
|
|
|
458
485
|
}
|
|
459
486
|
),
|
|
460
487
|
showButton ? _vue.h.call(void 0,
|
|
461
|
-
|
|
488
|
+
_chunkHA5QZ76Mjs.Button,
|
|
462
489
|
{
|
|
463
490
|
size: "sm",
|
|
464
491
|
variant: "primary",
|
|
@@ -467,7 +494,7 @@ var DataTableWithToolbar = _vue.defineComponent.call(void 0, {
|
|
|
467
494
|
disabled: !canSearch.value
|
|
468
495
|
},
|
|
469
496
|
{
|
|
470
|
-
default: () => _nullishCoalesce(_optionalChain([props, 'access',
|
|
497
|
+
default: () => _nullishCoalesce(_optionalChain([props, 'access', _47 => _47.toolbar, 'optionalAccess', _48 => _48.searchButtonText]), () => ( tableLabels.value.searchButtonText))
|
|
471
498
|
}
|
|
472
499
|
) : null
|
|
473
500
|
]
|
|
@@ -475,7 +502,7 @@ var DataTableWithToolbar = _vue.defineComponent.call(void 0, {
|
|
|
475
502
|
);
|
|
476
503
|
}
|
|
477
504
|
if (hasFilters.value) {
|
|
478
|
-
_optionalChain([props, 'access',
|
|
505
|
+
_optionalChain([props, 'access', _49 => _49.toolbar, 'optionalAccess', _50 => _50.filters, 'optionalAccess', _51 => _51.forEach, 'call', _52 => _52((filter) => {
|
|
479
506
|
const currentValue = resolvedFilters.value[filter.key];
|
|
480
507
|
const clearable = filter.clearable !== false;
|
|
481
508
|
if (filter.render) {
|
|
@@ -489,15 +516,23 @@ var DataTableWithToolbar = _vue.defineComponent.call(void 0, {
|
|
|
489
516
|
leftNodes.push(
|
|
490
517
|
_vue.h.call(void 0,
|
|
491
518
|
"div",
|
|
492
|
-
{
|
|
519
|
+
{
|
|
520
|
+
key: filter.key,
|
|
521
|
+
class: _nullishCoalesce(filter.itemClass, () => ( "w-full sm:w-auto")),
|
|
522
|
+
style: filter.itemStyle
|
|
523
|
+
},
|
|
493
524
|
filterNode == null ? [] : [filterNode]
|
|
494
525
|
)
|
|
495
526
|
);
|
|
496
527
|
return;
|
|
497
528
|
}
|
|
498
529
|
leftNodes.push(
|
|
499
|
-
_vue.h.call(void 0, "div", {
|
|
500
|
-
|
|
530
|
+
_vue.h.call(void 0, "div", {
|
|
531
|
+
key: filter.key,
|
|
532
|
+
class: _nullishCoalesce(filter.itemClass, () => ( "w-full sm:w-auto sm:min-w-[120px] sm:max-w-[180px]")),
|
|
533
|
+
style: filter.itemStyle
|
|
534
|
+
}, [
|
|
535
|
+
_vue.h.call(void 0, _chunkAEOREYSJjs.Select, {
|
|
501
536
|
size: "sm",
|
|
502
537
|
options: (_nullishCoalesce(filter.options, () => ( []))).map((opt) => ({
|
|
503
538
|
label: opt.label,
|
|
@@ -514,11 +549,11 @@ var DataTableWithToolbar = _vue.defineComponent.call(void 0, {
|
|
|
514
549
|
);
|
|
515
550
|
})]);
|
|
516
551
|
}
|
|
517
|
-
const filtersExtra = _optionalChain([slots, 'access',
|
|
552
|
+
const filtersExtra = _optionalChain([slots, 'access', _53 => _53["filters-extra"], 'optionalCall', _54 => _54({
|
|
518
553
|
filters: resolvedFilters.value,
|
|
519
554
|
setFilter: (key, value) => setFilterValue(key, value)
|
|
520
555
|
})]);
|
|
521
|
-
if (_optionalChain([filtersExtra, 'optionalAccess',
|
|
556
|
+
if (_optionalChain([filtersExtra, 'optionalAccess', _55 => _55.length])) {
|
|
522
557
|
leftNodes.push(...filtersExtra);
|
|
523
558
|
}
|
|
524
559
|
const bulkChildren = [];
|
|
@@ -544,10 +579,10 @@ var DataTableWithToolbar = _vue.defineComponent.call(void 0, {
|
|
|
544
579
|
);
|
|
545
580
|
}
|
|
546
581
|
;
|
|
547
|
-
(_nullishCoalesce(_optionalChain([props, 'access',
|
|
582
|
+
(_nullishCoalesce(_optionalChain([props, 'access', _56 => _56.toolbar, 'optionalAccess', _57 => _57.bulkActions]), () => ( []))).forEach((action) => {
|
|
548
583
|
bulkChildren.push(
|
|
549
584
|
_vue.h.call(void 0,
|
|
550
|
-
|
|
585
|
+
_chunkHA5QZ76Mjs.Button,
|
|
551
586
|
{
|
|
552
587
|
key: action.key,
|
|
553
588
|
size: "sm",
|
|
@@ -565,8 +600,10 @@ var DataTableWithToolbar = _vue.defineComponent.call(void 0, {
|
|
|
565
600
|
{
|
|
566
601
|
class: _tigercatcore.classNames.call(void 0,
|
|
567
602
|
"tiger-data-table-toolbar flex flex-wrap items-center gap-3",
|
|
568
|
-
props.bordered ? "bg-[var(--tiger-surface-muted,#f9fafb)] dark:bg-gray-800/10 px-4 py-3.5 border-b border-[var(--tiger-border,#e5e7eb)]" : "bg-[var(--tiger-surface-muted,#f9fafb)]/80 dark:bg-gray-800/30 px-4 py-3.5 border border-[var(--tiger-border,#e5e7eb)] rounded-[var(--tiger-radius-md,0.5rem)] shadow-sm"
|
|
603
|
+
props.bordered ? "bg-[var(--tiger-surface-muted,#f9fafb)] dark:bg-gray-800/10 px-4 py-3.5 border-b border-[var(--tiger-border,#e5e7eb)]" : "bg-[var(--tiger-surface-muted,#f9fafb)]/80 dark:bg-gray-800/30 px-4 py-3.5 border border-[var(--tiger-border,#e5e7eb)] rounded-[var(--tiger-radius-md,0.5rem)] shadow-sm",
|
|
604
|
+
_optionalChain([props, 'access', _58 => _58.toolbar, 'optionalAccess', _59 => _59.className])
|
|
569
605
|
),
|
|
606
|
+
style: _optionalChain([props, 'access', _60 => _60.toolbar, 'optionalAccess', _61 => _61.style]),
|
|
570
607
|
role: "toolbar",
|
|
571
608
|
"aria-label": tableLabels.value.toolbarAriaLabel
|
|
572
609
|
},
|
|
@@ -613,10 +650,17 @@ var DataTableWithToolbar = _vue.defineComponent.call(void 0, {
|
|
|
613
650
|
responsiveMode: props.responsiveMode,
|
|
614
651
|
cardBreakpoint: props.cardBreakpoint,
|
|
615
652
|
cardLayout: props.cardLayout,
|
|
653
|
+
cardClassName: props.cardClassName,
|
|
654
|
+
renderCard: props.renderCard,
|
|
616
655
|
class: props.bordered ? "border-none rounded-none shadow-none" : void 0,
|
|
617
656
|
onSelectionChange: (keys) => emit("selection-change", keys),
|
|
618
657
|
onPageChange: handleTablePageChange
|
|
619
658
|
};
|
|
659
|
+
const {
|
|
660
|
+
toolbar: _toolbarSlot,
|
|
661
|
+
"filters-extra": _filtersExtraSlot,
|
|
662
|
+
...tableSlots
|
|
663
|
+
} = slots;
|
|
620
664
|
return _vue.h.call(void 0,
|
|
621
665
|
"div",
|
|
622
666
|
{
|
|
@@ -624,7 +668,7 @@ var DataTableWithToolbar = _vue.defineComponent.call(void 0, {
|
|
|
624
668
|
style: wrapperStyle.value,
|
|
625
669
|
"data-tiger-data-table-with-toolbar": ""
|
|
626
670
|
},
|
|
627
|
-
[renderToolbar(), _vue.h.call(void 0,
|
|
671
|
+
[renderToolbar(), _vue.h.call(void 0, _chunkSRFNKU2Hjs.Table, tableProps, tableSlots)]
|
|
628
672
|
);
|
|
629
673
|
};
|
|
630
674
|
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
coerceClassValue,
|
|
6
6
|
mergeStyleValues,
|
|
7
7
|
getCardClasses,
|
|
8
|
-
|
|
8
|
+
resolveCardPadding,
|
|
9
9
|
cardHeaderClasses,
|
|
10
10
|
cardFooterClasses,
|
|
11
11
|
cardCoverWrapperClasses,
|
|
@@ -34,6 +34,15 @@ var Card = defineComponent({
|
|
|
34
34
|
type: String,
|
|
35
35
|
default: "md"
|
|
36
36
|
},
|
|
37
|
+
/**
|
|
38
|
+
* Padding override for the card content sections. `false` removes the
|
|
39
|
+
* built-in padding; a string supplies a custom padding utility class.
|
|
40
|
+
* Takes precedence over `size`.
|
|
41
|
+
*/
|
|
42
|
+
padding: {
|
|
43
|
+
type: [Boolean, String],
|
|
44
|
+
default: void 0
|
|
45
|
+
},
|
|
37
46
|
/**
|
|
38
47
|
* Whether the card is hoverable (shows hover effect)
|
|
39
48
|
* @default false
|
|
@@ -80,15 +89,16 @@ var Card = defineComponent({
|
|
|
80
89
|
}
|
|
81
90
|
},
|
|
82
91
|
setup(props, { slots, attrs }) {
|
|
92
|
+
const paddingClass = computed(() => resolveCardPadding(props.size, props.padding));
|
|
83
93
|
const cardClasses = computed(
|
|
84
94
|
() => classNames(
|
|
85
95
|
getCardClasses(props.variant, props.hoverable),
|
|
86
96
|
cardDirectionClasses[props.direction],
|
|
87
|
-
!props.cover &&
|
|
97
|
+
!props.cover && paddingClass.value
|
|
88
98
|
)
|
|
89
99
|
);
|
|
90
100
|
const isHorizontal = computed(() => props.direction === "horizontal");
|
|
91
|
-
const sectionSizeClass = computed(() => props.cover ?
|
|
101
|
+
const sectionSizeClass = computed(() => props.cover ? paddingClass.value : void 0);
|
|
92
102
|
const getSectionClasses = (baseClasses) => classNames(baseClasses, sectionSizeClass.value);
|
|
93
103
|
return () => {
|
|
94
104
|
const attrsRecord = attrs;
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
var _chunk6FXYRDYHjs = require('./chunk-6FXYRDYH.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkHA5QZ76Mjs = require('./chunk-HA5QZ76M.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkBPAZBRCRjs = require('./chunk-BPAZBRCR.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _chunkTGHB5XSTjs = require('./chunk-TGHB5XST.js');
|
|
@@ -180,7 +180,7 @@ var CommentThread = _vue.defineComponent.call(void 0, {
|
|
|
180
180
|
const likeCount = node.likes ? ` ${node.likes}` : "";
|
|
181
181
|
actions.push(
|
|
182
182
|
_vue.h.call(void 0,
|
|
183
|
-
|
|
183
|
+
_chunkHA5QZ76Mjs.Button,
|
|
184
184
|
{
|
|
185
185
|
key: "like",
|
|
186
186
|
size: "sm",
|
|
@@ -214,7 +214,7 @@ var CommentThread = _vue.defineComponent.call(void 0, {
|
|
|
214
214
|
if (props.showReply) {
|
|
215
215
|
actions.push(
|
|
216
216
|
_vue.h.call(void 0,
|
|
217
|
-
|
|
217
|
+
_chunkHA5QZ76Mjs.Button,
|
|
218
218
|
{
|
|
219
219
|
key: "reply",
|
|
220
220
|
size: "sm",
|
|
@@ -252,7 +252,7 @@ var CommentThread = _vue.defineComponent.call(void 0, {
|
|
|
252
252
|
if (props.showMore) {
|
|
253
253
|
actions.push(
|
|
254
254
|
_vue.h.call(void 0,
|
|
255
|
-
|
|
255
|
+
_chunkHA5QZ76Mjs.Button,
|
|
256
256
|
{
|
|
257
257
|
key: "more",
|
|
258
258
|
size: "sm",
|
|
@@ -289,7 +289,7 @@ var CommentThread = _vue.defineComponent.call(void 0, {
|
|
|
289
289
|
const actionKey = _nullishCoalesce(action.key, () => ( `${node.id}-action-${index}`));
|
|
290
290
|
actions.push(
|
|
291
291
|
_vue.h.call(void 0,
|
|
292
|
-
|
|
292
|
+
_chunkHA5QZ76Mjs.Button,
|
|
293
293
|
{
|
|
294
294
|
key: actionKey,
|
|
295
295
|
size: "sm",
|
|
@@ -340,13 +340,13 @@ var CommentThread = _vue.defineComponent.call(void 0, {
|
|
|
340
340
|
{ default: () => _optionalChain([node, 'access', _9 => _9.user, 'optionalAccess', _10 => _10.title]) }
|
|
341
341
|
) : null,
|
|
342
342
|
node.tag ? _vue.h.call(void 0,
|
|
343
|
-
|
|
343
|
+
_chunkBPAZBRCRjs.Tag,
|
|
344
344
|
{ size: "sm", variant: _nullishCoalesce(node.tag.variant, () => ( "default")), className: "rounded-full px-2 py-0.5 text-[10px] font-semibold tracking-wide uppercase border border-current bg-opacity-10" },
|
|
345
345
|
{ default: () => _optionalChain([node, 'access', _11 => _11.tag, 'optionalAccess', _12 => _12.label]) }
|
|
346
346
|
) : null,
|
|
347
347
|
...(_nullishCoalesce(node.tags, () => ( []))).map(
|
|
348
348
|
(tag, index) => _vue.h.call(void 0,
|
|
349
|
-
|
|
349
|
+
_chunkBPAZBRCRjs.Tag,
|
|
350
350
|
{
|
|
351
351
|
key: `${node.id}-tag-${index}`,
|
|
352
352
|
size: "sm",
|
|
@@ -387,7 +387,7 @@ var CommentThread = _vue.defineComponent.call(void 0, {
|
|
|
387
387
|
}),
|
|
388
388
|
_vue.h.call(void 0, "div", { class: "flex items-center gap-2 justify-end" }, [
|
|
389
389
|
_vue.h.call(void 0,
|
|
390
|
-
|
|
390
|
+
_chunkHA5QZ76Mjs.Button,
|
|
391
391
|
{
|
|
392
392
|
size: "sm",
|
|
393
393
|
variant: "ghost",
|
|
@@ -400,7 +400,7 @@ var CommentThread = _vue.defineComponent.call(void 0, {
|
|
|
400
400
|
{ default: () => props.cancelReplyText }
|
|
401
401
|
),
|
|
402
402
|
_vue.h.call(void 0,
|
|
403
|
-
|
|
403
|
+
_chunkHA5QZ76Mjs.Button,
|
|
404
404
|
{
|
|
405
405
|
size: "sm",
|
|
406
406
|
variant: "primary",
|
|
@@ -413,7 +413,7 @@ var CommentThread = _vue.defineComponent.call(void 0, {
|
|
|
413
413
|
]
|
|
414
414
|
) : null,
|
|
415
415
|
hasChildren ? _vue.h.call(void 0,
|
|
416
|
-
|
|
416
|
+
_chunkHA5QZ76Mjs.Button,
|
|
417
417
|
{
|
|
418
418
|
size: "sm",
|
|
419
419
|
variant: "ghost",
|
|
@@ -437,7 +437,7 @@ var CommentThread = _vue.defineComponent.call(void 0, {
|
|
|
437
437
|
(child, index) => renderNode(child, depth + 1, index === visibleChildren.length - 1)
|
|
438
438
|
),
|
|
439
439
|
showLoadMore ? _vue.h.call(void 0,
|
|
440
|
-
|
|
440
|
+
_chunkHA5QZ76Mjs.Button,
|
|
441
441
|
{
|
|
442
442
|
size: "sm",
|
|
443
443
|
variant: "ghost",
|
|
@@ -34,6 +34,15 @@ var Card = _vue.defineComponent.call(void 0, {
|
|
|
34
34
|
type: String,
|
|
35
35
|
default: "md"
|
|
36
36
|
},
|
|
37
|
+
/**
|
|
38
|
+
* Padding override for the card content sections. `false` removes the
|
|
39
|
+
* built-in padding; a string supplies a custom padding utility class.
|
|
40
|
+
* Takes precedence over `size`.
|
|
41
|
+
*/
|
|
42
|
+
padding: {
|
|
43
|
+
type: [Boolean, String],
|
|
44
|
+
default: void 0
|
|
45
|
+
},
|
|
37
46
|
/**
|
|
38
47
|
* Whether the card is hoverable (shows hover effect)
|
|
39
48
|
* @default false
|
|
@@ -80,15 +89,16 @@ var Card = _vue.defineComponent.call(void 0, {
|
|
|
80
89
|
}
|
|
81
90
|
},
|
|
82
91
|
setup(props, { slots, attrs }) {
|
|
92
|
+
const paddingClass = _vue.computed.call(void 0, () => _tigercatcore.resolveCardPadding.call(void 0, props.size, props.padding));
|
|
83
93
|
const cardClasses = _vue.computed.call(void 0,
|
|
84
94
|
() => _tigercatcore.classNames.call(void 0,
|
|
85
95
|
_tigercatcore.getCardClasses.call(void 0, props.variant, props.hoverable),
|
|
86
96
|
_tigercatcore.cardDirectionClasses[props.direction],
|
|
87
|
-
!props.cover &&
|
|
97
|
+
!props.cover && paddingClass.value
|
|
88
98
|
)
|
|
89
99
|
);
|
|
90
100
|
const isHorizontal = _vue.computed.call(void 0, () => props.direction === "horizontal");
|
|
91
|
-
const sectionSizeClass = _vue.computed.call(void 0, () => props.cover ?
|
|
101
|
+
const sectionSizeClass = _vue.computed.call(void 0, () => props.cover ? paddingClass.value : void 0);
|
|
92
102
|
const getSectionClasses = (baseClasses) => _tigercatcore.classNames.call(void 0, baseClasses, sectionSizeClass.value);
|
|
93
103
|
return () => {
|
|
94
104
|
const attrsRecord = attrs;
|
|
@@ -303,16 +303,24 @@ var Dropdown = _vue.defineComponent.call(void 0, {
|
|
|
303
303
|
const _menuItemTabIndex = -1;
|
|
304
304
|
return () => {
|
|
305
305
|
const defaultSlot = _optionalChain([slots, 'access', _7 => _7.default, 'optionalCall', _8 => _8()]);
|
|
306
|
-
|
|
306
|
+
const triggerSlot = _optionalChain([slots, 'access', _9 => _9.trigger, 'optionalCall', _10 => _10({ open: currentVisible.value })]);
|
|
307
|
+
if ((!defaultSlot || defaultSlot.length === 0) && (!triggerSlot || triggerSlot.length === 0)) {
|
|
308
|
+
return null;
|
|
309
|
+
}
|
|
307
310
|
let triggerNode = null;
|
|
308
311
|
let menuNode = null;
|
|
309
|
-
|
|
312
|
+
if (triggerSlot && triggerSlot.length > 0) {
|
|
313
|
+
triggerNode = triggerSlot.length === 1 ? triggerSlot[0] : _vue.h.call(void 0, "span", triggerSlot);
|
|
314
|
+
}
|
|
315
|
+
_optionalChain([defaultSlot, 'optionalAccess', _11 => _11.forEach, 'call', _12 => _12((node) => {
|
|
310
316
|
if (node.type === DropdownMenu) {
|
|
311
317
|
menuNode = node;
|
|
312
318
|
return;
|
|
313
319
|
}
|
|
314
|
-
|
|
315
|
-
|
|
320
|
+
if (!triggerSlot) {
|
|
321
|
+
triggerNode = node;
|
|
322
|
+
}
|
|
323
|
+
})]);
|
|
316
324
|
const chevronNode = props.showArrow ? _vue.h.call(void 0,
|
|
317
325
|
"svg",
|
|
318
326
|
{
|
|
@@ -337,7 +345,8 @@ var Dropdown = _vue.defineComponent.call(void 0, {
|
|
|
337
345
|
onMouseleave: handleMouseLeave,
|
|
338
346
|
"aria-haspopup": "menu",
|
|
339
347
|
"aria-expanded": currentVisible.value,
|
|
340
|
-
"aria-controls": currentVisible.value ? menuId : void 0
|
|
348
|
+
"aria-controls": currentVisible.value ? menuId : void 0,
|
|
349
|
+
"data-state": currentVisible.value ? "open" : "closed"
|
|
341
350
|
},
|
|
342
351
|
[triggerNode, chevronNode]
|
|
343
352
|
) : null;
|
|
@@ -134,7 +134,9 @@ var Timeline = defineComponent({
|
|
|
134
134
|
contentChildren.push(h("div", { class: timelineLabelClasses }, item.label));
|
|
135
135
|
}
|
|
136
136
|
if (item.content) {
|
|
137
|
-
contentChildren.push(
|
|
137
|
+
contentChildren.push(
|
|
138
|
+
h("div", { class: timelineDescriptionClasses }, item.content)
|
|
139
|
+
);
|
|
138
140
|
}
|
|
139
141
|
return h("li", { key, class: itemClasses }, [
|
|
140
142
|
h("div", { class: tailClasses }),
|
|
@@ -129,7 +129,8 @@ var Popconfirm = _vue.defineComponent.call(void 0, {
|
|
|
129
129
|
const iconClasses = _vue.computed.call(void 0, () => _tigercatcore.getPopconfirmIconClasses.call(void 0, props.icon));
|
|
130
130
|
const okButtonClasses = _vue.computed.call(void 0, () => _tigercatcore.getPopconfirmOkButtonClasses.call(void 0, props.okType));
|
|
131
131
|
return () => {
|
|
132
|
-
const
|
|
132
|
+
const useTriggerSlot = Boolean(slots.trigger);
|
|
133
|
+
const defaultSlot = useTriggerSlot ? slots.trigger({ open: currentVisible.value }) : _optionalChain([slots, 'access', _ => _.default, 'optionalCall', _2 => _2()]);
|
|
133
134
|
if (!defaultSlot || defaultSlot.length === 0) return null;
|
|
134
135
|
const {
|
|
135
136
|
class: _class,
|
|
@@ -140,10 +141,11 @@ var Popconfirm = _vue.defineComponent.call(void 0, {
|
|
|
140
141
|
"aria-haspopup": "dialog",
|
|
141
142
|
"aria-expanded": Boolean(currentVisible.value),
|
|
142
143
|
"aria-controls": currentVisible.value ? popconfirmId : void 0,
|
|
143
|
-
"aria-disabled": props.disabled ? "true" : void 0
|
|
144
|
+
"aria-disabled": props.disabled ? "true" : void 0,
|
|
145
|
+
"data-state": currentVisible.value ? "open" : "closed"
|
|
144
146
|
};
|
|
145
147
|
const trigger = (() => {
|
|
146
|
-
if (defaultSlot.length === 1) {
|
|
148
|
+
if (!useTriggerSlot && defaultSlot.length === 1) {
|
|
147
149
|
const only = defaultSlot[0];
|
|
148
150
|
if (_vue.isVNode.call(void 0, only)) {
|
|
149
151
|
const existingProps = _nullishCoalesce(only.props, () => ( {}));
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ImagePreview
|
|
3
3
|
} from "./chunk-KY3O3FWK.mjs";
|
|
4
|
+
import {
|
|
5
|
+
useFloatingPopup
|
|
6
|
+
} from "./chunk-M4EP4OVR.mjs";
|
|
7
|
+
import {
|
|
8
|
+
renderVueBodyTeleport
|
|
9
|
+
} from "./chunk-BDTPFPSB.mjs";
|
|
4
10
|
|
|
5
11
|
// src/components/Image.ts
|
|
6
12
|
import {
|
|
@@ -37,6 +43,10 @@ var Image = defineComponent({
|
|
|
37
43
|
fit: { type: String, default: "cover" },
|
|
38
44
|
fallbackSrc: { type: String, default: void 0 },
|
|
39
45
|
preview: { type: Boolean, default: true },
|
|
46
|
+
previewTrigger: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: "click"
|
|
49
|
+
},
|
|
40
50
|
lazy: { type: Boolean, default: false },
|
|
41
51
|
className: { type: String, default: void 0 },
|
|
42
52
|
style: {
|
|
@@ -53,6 +63,35 @@ var Image = defineComponent({
|
|
|
53
63
|
const previewVisible = ref(false);
|
|
54
64
|
let observer = null;
|
|
55
65
|
const group = inject(IMAGE_GROUP_INJECTION_KEY, null);
|
|
66
|
+
const hoverPreviewEnabled = computed(
|
|
67
|
+
() => props.preview && props.previewTrigger === "hover" && !group
|
|
68
|
+
);
|
|
69
|
+
const clickPreviewEnabled = computed(() => props.preview && props.previewTrigger !== "hover");
|
|
70
|
+
const floatingPopupProps = {
|
|
71
|
+
get trigger() {
|
|
72
|
+
return "hover";
|
|
73
|
+
},
|
|
74
|
+
get placement() {
|
|
75
|
+
return "right";
|
|
76
|
+
},
|
|
77
|
+
get offset() {
|
|
78
|
+
return 12;
|
|
79
|
+
},
|
|
80
|
+
get disabled() {
|
|
81
|
+
return !hoverPreviewEnabled.value;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
const {
|
|
85
|
+
currentVisible: hoverVisible,
|
|
86
|
+
triggerRef: hoverTriggerRef,
|
|
87
|
+
floatingRef: hoverFloatingRef,
|
|
88
|
+
floatingStyles: hoverFloatingStyles,
|
|
89
|
+
triggerHandlers: hoverTriggerHandlers
|
|
90
|
+
} = useFloatingPopup({ props: floatingPopupProps, emit });
|
|
91
|
+
const setContainerRef = (el) => {
|
|
92
|
+
containerRef.value = el;
|
|
93
|
+
hoverTriggerRef.value = el;
|
|
94
|
+
};
|
|
56
95
|
const registeredIndex = ref(-1);
|
|
57
96
|
onMounted(() => {
|
|
58
97
|
if (group && props.src) {
|
|
@@ -103,7 +142,7 @@ var Image = defineComponent({
|
|
|
103
142
|
emit("error");
|
|
104
143
|
};
|
|
105
144
|
const handleClick = () => {
|
|
106
|
-
if (!
|
|
145
|
+
if (!clickPreviewEnabled.value) return;
|
|
107
146
|
if (group) {
|
|
108
147
|
group.openPreview(registeredIndex.value >= 0 ? registeredIndex.value : 0);
|
|
109
148
|
} else {
|
|
@@ -193,25 +232,44 @@ var Image = defineComponent({
|
|
|
193
232
|
emit("preview-open-change", val);
|
|
194
233
|
}
|
|
195
234
|
}) : null;
|
|
235
|
+
const hoverPreviewEl = hoverPreviewEnabled.value && hoverVisible.value && props.src ? renderVueBodyTeleport(
|
|
236
|
+
h(
|
|
237
|
+
"div",
|
|
238
|
+
{
|
|
239
|
+
ref: hoverFloatingRef,
|
|
240
|
+
style: hoverFloatingStyles.value,
|
|
241
|
+
"aria-hidden": true,
|
|
242
|
+
class: "rounded-[var(--tiger-radius-md,0.5rem)] border border-[var(--tiger-border,#e5e7eb)] bg-[var(--tiger-surface,#ffffff)] p-1 shadow-lg"
|
|
243
|
+
},
|
|
244
|
+
[
|
|
245
|
+
h("img", {
|
|
246
|
+
src: props.src,
|
|
247
|
+
alt: "",
|
|
248
|
+
class: "block max-w-[16rem] max-h-[16rem] object-contain"
|
|
249
|
+
})
|
|
250
|
+
]
|
|
251
|
+
)
|
|
252
|
+
) : null;
|
|
196
253
|
return h(
|
|
197
254
|
"div",
|
|
198
255
|
{
|
|
199
256
|
...forwardedAttrs,
|
|
200
|
-
ref:
|
|
257
|
+
ref: setContainerRef,
|
|
201
258
|
class: containerClasses.value,
|
|
202
259
|
style: containerStyle.value,
|
|
203
|
-
role:
|
|
204
|
-
tabindex:
|
|
205
|
-
"aria-label":
|
|
260
|
+
role: clickPreviewEnabled.value ? "button" : void 0,
|
|
261
|
+
tabindex: clickPreviewEnabled.value ? 0 : void 0,
|
|
262
|
+
"aria-label": clickPreviewEnabled.value ? `Preview ${props.alt || "image"}` : void 0,
|
|
206
263
|
onClick: handleClick,
|
|
207
264
|
onKeydown: (e) => {
|
|
208
|
-
if (
|
|
265
|
+
if (clickPreviewEnabled.value && (e.key === "Enter" || e.key === " ")) {
|
|
209
266
|
e.preventDefault();
|
|
210
267
|
handleClick();
|
|
211
268
|
}
|
|
212
|
-
}
|
|
269
|
+
},
|
|
270
|
+
...hoverPreviewEnabled.value ? hoverTriggerHandlers.value : {}
|
|
213
271
|
},
|
|
214
|
-
[content, previewEl]
|
|
272
|
+
[content, previewEl, hoverPreviewEl]
|
|
215
273
|
);
|
|
216
274
|
};
|
|
217
275
|
}
|