@expcat/tigercat-vue 0.4.0 → 0.4.3
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-ZTJTIQZY.mjs → chunk-BS52UCMT.mjs} +139 -6
- package/dist/{chunk-ND4XDRYR.mjs → chunk-CWDBL5YC.mjs} +1 -1
- package/dist/{chunk-KUJ75OHX.js → chunk-ESALMEHU.js} +10 -9
- package/dist/{chunk-KVZLGW45.js → chunk-ETTYERGO.js} +14 -5
- package/dist/{chunk-YZK2HXRT.js → chunk-HBZHIEDV.js} +2 -2
- package/dist/chunk-HK2TAPQX.js +334 -0
- package/dist/chunk-LW3LFCRZ.mjs +331 -0
- package/dist/{chunk-3PQIZBT5.js → chunk-NUFSJMVC.js} +138 -5
- package/dist/{chunk-7FCHU5KV.mjs → chunk-TTDBR2B4.mjs} +11 -10
- package/dist/{chunk-RKPYLBPU.mjs → chunk-WM4ESIHG.mjs} +15 -6
- package/dist/components/ActivityFeed.d.mts +1 -1
- package/dist/components/ActivityFeed.d.ts +1 -1
- package/dist/components/ActivityFeed.js +4 -4
- package/dist/components/ActivityFeed.mjs +2 -2
- package/dist/components/Alert.d.mts +1 -1
- package/dist/components/Alert.d.ts +1 -1
- package/dist/components/Anchor.d.mts +5 -5
- package/dist/components/Anchor.d.ts +5 -5
- package/dist/components/AnchorLink.d.mts +1 -1
- package/dist/components/AnchorLink.d.ts +1 -1
- package/dist/components/Avatar.d.mts +2 -2
- package/dist/components/Avatar.d.ts +2 -2
- package/dist/components/BackTop.d.mts +1 -1
- package/dist/components/BackTop.d.ts +1 -1
- package/dist/components/Badge.d.mts +1 -1
- package/dist/components/Badge.d.ts +1 -1
- package/dist/components/Breadcrumb.d.mts +1 -1
- package/dist/components/Breadcrumb.d.ts +1 -1
- package/dist/components/BreadcrumbItem.d.mts +1 -1
- package/dist/components/BreadcrumbItem.d.ts +1 -1
- package/dist/components/Button.d.mts +2 -2
- package/dist/components/Button.d.ts +2 -2
- package/dist/components/Card.d.mts +1 -1
- package/dist/components/Card.d.ts +1 -1
- package/dist/components/Carousel.d.mts +2 -2
- package/dist/components/Carousel.d.ts +2 -2
- package/dist/components/ChartAxis.d.mts +1 -1
- package/dist/components/ChartAxis.d.ts +1 -1
- package/dist/components/ChartGrid.d.mts +2 -2
- package/dist/components/ChartGrid.d.ts +2 -2
- package/dist/components/ChartTooltip.d.mts +1 -1
- package/dist/components/ChartTooltip.d.ts +1 -1
- package/dist/components/ChatWindow.d.mts +1 -1
- package/dist/components/ChatWindow.d.ts +1 -1
- package/dist/components/Code.d.mts +1 -1
- package/dist/components/Code.d.ts +1 -1
- package/dist/components/Collapse.d.mts +3 -3
- package/dist/components/Collapse.d.ts +3 -3
- package/dist/components/CollapsePanel.d.mts +2 -2
- package/dist/components/CollapsePanel.d.ts +2 -2
- package/dist/components/CommentThread.d.mts +3 -3
- package/dist/components/CommentThread.d.ts +3 -3
- package/dist/components/Content.d.mts +1 -1
- package/dist/components/Content.d.ts +1 -1
- package/dist/components/CropUpload.d.mts +1 -1
- package/dist/components/CropUpload.d.ts +1 -1
- package/dist/components/DataTableWithToolbar.d.mts +3 -3
- package/dist/components/DataTableWithToolbar.d.ts +3 -3
- package/dist/components/DataTableWithToolbar.js +4 -4
- package/dist/components/DataTableWithToolbar.mjs +2 -2
- package/dist/components/DatePicker.d.mts +1 -1
- package/dist/components/DatePicker.d.ts +1 -1
- package/dist/components/Descriptions.d.mts +1 -1
- package/dist/components/Descriptions.d.ts +1 -1
- package/dist/components/Drawer.d.mts +3 -3
- package/dist/components/Drawer.d.ts +3 -3
- package/dist/components/Dropdown.d.mts +1 -1
- package/dist/components/Dropdown.d.ts +1 -1
- package/dist/components/DropdownItem.d.mts +1 -1
- package/dist/components/DropdownItem.d.ts +1 -1
- package/dist/components/DropdownMenu.d.mts +1 -1
- package/dist/components/DropdownMenu.d.ts +1 -1
- package/dist/components/Footer.d.mts +1 -1
- package/dist/components/Footer.d.ts +1 -1
- package/dist/components/FormWizard.d.mts +3 -3
- package/dist/components/FormWizard.d.ts +3 -3
- package/dist/components/Header.d.mts +1 -1
- package/dist/components/Header.d.ts +1 -1
- package/dist/components/Image.d.mts +1 -1
- package/dist/components/Image.d.ts +1 -1
- package/dist/components/ImageCropper.d.mts +1 -1
- package/dist/components/ImageCropper.d.ts +1 -1
- package/dist/components/Input.d.mts +1 -1
- package/dist/components/Input.d.ts +1 -1
- package/dist/components/InputNumber.d.mts +170 -0
- package/dist/components/InputNumber.d.ts +170 -0
- package/dist/components/InputNumber.js +17 -0
- package/dist/components/InputNumber.mjs +2 -0
- package/dist/components/Layout.d.mts +1 -1
- package/dist/components/Layout.d.ts +1 -1
- package/dist/components/List.d.mts +2 -2
- package/dist/components/List.d.ts +2 -2
- package/dist/components/Loading.d.mts +2 -2
- package/dist/components/Loading.d.ts +2 -2
- package/dist/components/Menu.d.mts +1 -1
- package/dist/components/Menu.d.ts +1 -1
- package/dist/components/MenuItem.d.mts +1 -1
- package/dist/components/MenuItem.d.ts +1 -1
- package/dist/components/MenuItemGroup.d.mts +1 -1
- package/dist/components/MenuItemGroup.d.ts +1 -1
- package/dist/components/Modal.d.mts +3 -3
- package/dist/components/Modal.d.ts +3 -3
- package/dist/components/NotificationCenter.d.mts +1 -1
- package/dist/components/NotificationCenter.d.ts +1 -1
- package/dist/components/Pagination.d.mts +2 -2
- package/dist/components/Pagination.d.ts +2 -2
- package/dist/components/Popconfirm.d.mts +1 -1
- package/dist/components/Popconfirm.d.ts +1 -1
- package/dist/components/Popover.d.mts +3 -3
- package/dist/components/Popover.d.ts +3 -3
- package/dist/components/Progress.d.mts +4 -4
- package/dist/components/Progress.d.ts +4 -4
- package/dist/components/Select.d.mts +1 -1
- package/dist/components/Select.d.ts +1 -1
- package/dist/components/Sidebar.d.mts +21 -1
- package/dist/components/Sidebar.d.ts +21 -1
- package/dist/components/Sidebar.js +3 -3
- package/dist/components/Sidebar.mjs +1 -1
- package/dist/components/Skeleton.d.mts +1 -1
- package/dist/components/Skeleton.d.ts +1 -1
- package/dist/components/Slider.d.mts +1 -1
- package/dist/components/Slider.d.ts +1 -1
- package/dist/components/Space.d.mts +1 -1
- package/dist/components/Space.d.ts +1 -1
- package/dist/components/Steps.d.mts +2 -2
- package/dist/components/Steps.d.ts +2 -2
- package/dist/components/StepsItem.d.mts +1 -1
- package/dist/components/StepsItem.d.ts +1 -1
- package/dist/components/SubMenu.d.mts +1 -1
- package/dist/components/SubMenu.d.ts +1 -1
- package/dist/components/SubMenu.js +3 -3
- package/dist/components/SubMenu.mjs +1 -1
- package/dist/components/TabPane.d.mts +1 -1
- package/dist/components/TabPane.d.ts +1 -1
- package/dist/components/Table.d.mts +16 -2
- package/dist/components/Table.d.ts +16 -2
- package/dist/components/Table.js +3 -3
- package/dist/components/Table.mjs +1 -1
- package/dist/components/Tabs.d.mts +1 -1
- package/dist/components/Tabs.d.ts +1 -1
- package/dist/components/Tag.d.mts +1 -1
- package/dist/components/Tag.d.ts +1 -1
- package/dist/components/TaskBoard.d.mts +2 -2
- package/dist/components/TaskBoard.d.ts +2 -2
- package/dist/components/Textarea.d.mts +1 -1
- package/dist/components/Textarea.d.ts +1 -1
- package/dist/components/TimePicker.d.mts +2 -2
- package/dist/components/TimePicker.d.ts +2 -2
- package/dist/components/Timeline.d.mts +2 -2
- package/dist/components/Timeline.d.ts +2 -2
- package/dist/components/Tooltip.d.mts +1 -1
- package/dist/components/Tooltip.d.ts +1 -1
- package/dist/components/Upload.d.mts +3 -3
- package/dist/components/Upload.d.ts +3 -3
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +45 -40
- package/dist/index.mjs +12 -11
- package/package.json +2 -2
- package/dist/{chunk-NGW5UMAN.js → chunk-EBTLMVDJ.js} +1 -1
- package/dist/{chunk-D7VMY6WX.mjs → chunk-RVEEEDJQ.mjs} +1 -1
|
@@ -33,6 +33,20 @@ var LockIcon = (locked) => {
|
|
|
33
33
|
[vue.h("path", { d: locked ? tigercatCore.lockClosedIcon24PathD : tigercatCore.lockOpenIcon24PathD })]
|
|
34
34
|
);
|
|
35
35
|
};
|
|
36
|
+
var ExpandIcon = (expanded) => {
|
|
37
|
+
return vue.h(
|
|
38
|
+
"svg",
|
|
39
|
+
{
|
|
40
|
+
class: tigercatCore.getExpandIconClasses(expanded),
|
|
41
|
+
width: "16",
|
|
42
|
+
height: "16",
|
|
43
|
+
viewBox: tigercatCore.icon16ViewBox,
|
|
44
|
+
fill: "currentColor",
|
|
45
|
+
"aria-hidden": "true"
|
|
46
|
+
},
|
|
47
|
+
[vue.h("path", { d: tigercatCore.expandChevronIcon16PathD })]
|
|
48
|
+
);
|
|
49
|
+
};
|
|
36
50
|
var LoadingSpinner = () => {
|
|
37
51
|
return vue.h(
|
|
38
52
|
"svg",
|
|
@@ -160,6 +174,12 @@ var Table = vue.defineComponent({
|
|
|
160
174
|
rowSelection: {
|
|
161
175
|
type: Object
|
|
162
176
|
},
|
|
177
|
+
/**
|
|
178
|
+
* Row expansion configuration
|
|
179
|
+
*/
|
|
180
|
+
expandable: {
|
|
181
|
+
type: Object
|
|
182
|
+
},
|
|
163
183
|
/**
|
|
164
184
|
* Function to get row key
|
|
165
185
|
*/
|
|
@@ -194,7 +214,15 @@ var Table = vue.defineComponent({
|
|
|
194
214
|
default: "auto"
|
|
195
215
|
}
|
|
196
216
|
},
|
|
197
|
-
emits: [
|
|
217
|
+
emits: [
|
|
218
|
+
"change",
|
|
219
|
+
"row-click",
|
|
220
|
+
"selection-change",
|
|
221
|
+
"sort-change",
|
|
222
|
+
"filter-change",
|
|
223
|
+
"page-change",
|
|
224
|
+
"expand-change"
|
|
225
|
+
],
|
|
198
226
|
setup(props, { emit, slots }) {
|
|
199
227
|
const paginationConfig = vue.computed(() => {
|
|
200
228
|
return props.pagination !== false && typeof props.pagination === "object" ? props.pagination : null;
|
|
@@ -204,6 +232,7 @@ var Table = vue.defineComponent({
|
|
|
204
232
|
vue.computed(() => paginationConfig.value?.current !== void 0);
|
|
205
233
|
vue.computed(() => paginationConfig.value?.pageSize !== void 0);
|
|
206
234
|
const isSelectionControlled = vue.computed(() => props.rowSelection?.selectedRowKeys !== void 0);
|
|
235
|
+
const isExpandControlled = vue.computed(() => props.expandable?.expandedRowKeys !== void 0);
|
|
207
236
|
const uncontrolledSortState = vue.ref(props.defaultSort);
|
|
208
237
|
const uncontrolledFilterState = vue.ref(props.defaultFilters);
|
|
209
238
|
const uncontrolledCurrentPage = vue.ref(
|
|
@@ -215,6 +244,9 @@ var Table = vue.defineComponent({
|
|
|
215
244
|
const uncontrolledSelectedRowKeys = vue.ref(
|
|
216
245
|
props.rowSelection?.defaultSelectedRowKeys ?? props.rowSelection?.selectedRowKeys ?? []
|
|
217
246
|
);
|
|
247
|
+
const uncontrolledExpandedRowKeys = vue.ref(
|
|
248
|
+
props.expandable?.defaultExpandedRowKeys ?? props.expandable?.expandedRowKeys ?? []
|
|
249
|
+
);
|
|
218
250
|
const sortState = vue.computed(() => props.sort ?? uncontrolledSortState.value);
|
|
219
251
|
const filterState = vue.computed(() => props.filters ?? uncontrolledFilterState.value);
|
|
220
252
|
const currentPage = vue.computed(() => {
|
|
@@ -226,6 +258,9 @@ var Table = vue.defineComponent({
|
|
|
226
258
|
const selectedRowKeys = vue.computed(() => {
|
|
227
259
|
return props.rowSelection?.selectedRowKeys ?? uncontrolledSelectedRowKeys.value;
|
|
228
260
|
});
|
|
261
|
+
const expandedRowKeys = vue.computed(() => {
|
|
262
|
+
return props.expandable?.expandedRowKeys ?? uncontrolledExpandedRowKeys.value;
|
|
263
|
+
});
|
|
229
264
|
vue.watch(
|
|
230
265
|
() => props.sort,
|
|
231
266
|
(next) => {
|
|
@@ -266,6 +301,14 @@ var Table = vue.defineComponent({
|
|
|
266
301
|
}
|
|
267
302
|
}
|
|
268
303
|
);
|
|
304
|
+
vue.watch(
|
|
305
|
+
() => props.expandable?.expandedRowKeys,
|
|
306
|
+
(next) => {
|
|
307
|
+
if (next !== void 0) {
|
|
308
|
+
uncontrolledExpandedRowKeys.value = next;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
);
|
|
269
312
|
const fixedOverrides = vue.ref({});
|
|
270
313
|
const displayColumns = vue.computed(() => {
|
|
271
314
|
return props.columns.map((column) => {
|
|
@@ -314,6 +357,15 @@ var Table = vue.defineComponent({
|
|
|
314
357
|
const selectedRowKeySet = vue.computed(() => {
|
|
315
358
|
return new Set(selectedRowKeys.value);
|
|
316
359
|
});
|
|
360
|
+
const expandedRowKeySet = vue.computed(() => {
|
|
361
|
+
return new Set(expandedRowKeys.value);
|
|
362
|
+
});
|
|
363
|
+
const totalColumnCount = vue.computed(() => {
|
|
364
|
+
let count = displayColumns.value.length;
|
|
365
|
+
if (props.rowSelection) count += 1;
|
|
366
|
+
if (props.expandable) count += 1;
|
|
367
|
+
return count;
|
|
368
|
+
});
|
|
317
369
|
const paginationInfo = vue.computed(() => {
|
|
318
370
|
if (props.pagination === false) {
|
|
319
371
|
return null;
|
|
@@ -397,6 +449,21 @@ var Table = vue.defineComponent({
|
|
|
397
449
|
}
|
|
398
450
|
function handleRowClick(record, index) {
|
|
399
451
|
emit("row-click", record, index);
|
|
452
|
+
if (props.expandable?.expandRowByClick) {
|
|
453
|
+
const key = tigercatCore.getRowKey(record, props.rowKey, index);
|
|
454
|
+
const isExpandable = props.expandable?.rowExpandable ? props.expandable.rowExpandable(record) : true;
|
|
455
|
+
if (isExpandable) {
|
|
456
|
+
handleToggleExpand(key, record);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
function handleToggleExpand(key, record) {
|
|
461
|
+
const isExpanded = expandedRowKeySet.value.has(key);
|
|
462
|
+
const newKeys = isExpanded ? expandedRowKeys.value.filter((k) => k !== key) : [...expandedRowKeys.value, key];
|
|
463
|
+
if (!isExpandControlled.value) {
|
|
464
|
+
uncontrolledExpandedRowKeys.value = newKeys;
|
|
465
|
+
}
|
|
466
|
+
emit("expand-change", newKeys, record, !isExpanded);
|
|
400
467
|
}
|
|
401
468
|
function handleSelectRow(key, checked) {
|
|
402
469
|
let newKeys;
|
|
@@ -439,6 +506,15 @@ var Table = vue.defineComponent({
|
|
|
439
506
|
});
|
|
440
507
|
function renderTableHeader() {
|
|
441
508
|
const headerCells = [];
|
|
509
|
+
const expandAtStart = props.expandable && props.expandable.expandIconPosition !== "end";
|
|
510
|
+
const expandAtEnd = props.expandable && props.expandable.expandIconPosition === "end";
|
|
511
|
+
const expandHeaderTh = props.expandable ? vue.h("th", {
|
|
512
|
+
class: tigercatCore.getExpandIconCellClasses(props.size),
|
|
513
|
+
"aria-label": "Expand"
|
|
514
|
+
}) : null;
|
|
515
|
+
if (expandAtStart && expandHeaderTh) {
|
|
516
|
+
headerCells.push(expandHeaderTh);
|
|
517
|
+
}
|
|
442
518
|
if (props.rowSelection && props.rowSelection.showCheckbox !== false && props.rowSelection.type !== "radio") {
|
|
443
519
|
headerCells.push(
|
|
444
520
|
vue.h(
|
|
@@ -558,6 +634,9 @@ var Table = vue.defineComponent({
|
|
|
558
634
|
)
|
|
559
635
|
);
|
|
560
636
|
});
|
|
637
|
+
if (expandAtEnd && expandHeaderTh) {
|
|
638
|
+
headerCells.push(expandHeaderTh);
|
|
639
|
+
}
|
|
561
640
|
return vue.h("thead", { class: tigercatCore.getTableHeaderClasses(props.stickyHeader) }, [
|
|
562
641
|
vue.h("tr", headerCells)
|
|
563
642
|
]);
|
|
@@ -572,7 +651,7 @@ var Table = vue.defineComponent({
|
|
|
572
651
|
vue.h(
|
|
573
652
|
"td",
|
|
574
653
|
{
|
|
575
|
-
colspan:
|
|
654
|
+
colspan: totalColumnCount.value,
|
|
576
655
|
class: tigercatCore.tableEmptyStateClasses
|
|
577
656
|
},
|
|
578
657
|
[
|
|
@@ -589,11 +668,39 @@ var Table = vue.defineComponent({
|
|
|
589
668
|
])
|
|
590
669
|
]);
|
|
591
670
|
}
|
|
592
|
-
const rows = paginatedData.value.
|
|
671
|
+
const rows = paginatedData.value.flatMap((record, index) => {
|
|
593
672
|
const key = paginatedRowKeys.value[index];
|
|
594
673
|
const isSelected = selectedRowKeySet.value.has(key);
|
|
674
|
+
const isExpanded = expandedRowKeySet.value.has(key);
|
|
675
|
+
const isRowExpandable = props.expandable ? props.expandable.rowExpandable ? props.expandable.rowExpandable(record) : true : false;
|
|
595
676
|
const rowClass = typeof props.rowClassName === "function" ? props.rowClassName(record, index) : props.rowClassName;
|
|
596
677
|
const cells = [];
|
|
678
|
+
const expandAtStart = props.expandable && props.expandable.expandIconPosition !== "end";
|
|
679
|
+
const expandToggleCell = props.expandable ? vue.h(
|
|
680
|
+
"td",
|
|
681
|
+
{
|
|
682
|
+
class: tigercatCore.getExpandIconCellClasses(props.size)
|
|
683
|
+
},
|
|
684
|
+
isRowExpandable ? [
|
|
685
|
+
vue.h(
|
|
686
|
+
"button",
|
|
687
|
+
{
|
|
688
|
+
type: "button",
|
|
689
|
+
class: "inline-flex items-center justify-center",
|
|
690
|
+
"aria-label": isExpanded ? "Collapse row" : "Expand row",
|
|
691
|
+
"aria-expanded": isExpanded,
|
|
692
|
+
onClick: (e) => {
|
|
693
|
+
e.stopPropagation();
|
|
694
|
+
handleToggleExpand(key, record);
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
[ExpandIcon(isExpanded)]
|
|
698
|
+
)
|
|
699
|
+
] : []
|
|
700
|
+
) : null;
|
|
701
|
+
if (expandAtStart && expandToggleCell) {
|
|
702
|
+
cells.push(expandToggleCell);
|
|
703
|
+
}
|
|
597
704
|
if (props.rowSelection && props.rowSelection.showCheckbox !== false) {
|
|
598
705
|
const checkboxProps = props.rowSelection?.getCheckboxProps?.(record) || {};
|
|
599
706
|
cells.push(
|
|
@@ -608,6 +715,7 @@ var Table = vue.defineComponent({
|
|
|
608
715
|
class: props.rowSelection?.type === "radio" ? "border-gray-300 text-[var(--tiger-primary,#2563eb)] focus:ring-[var(--tiger-primary,#2563eb)]" : "rounded border-gray-300 text-[var(--tiger-primary,#2563eb)] focus:ring-[var(--tiger-primary,#2563eb)]",
|
|
609
716
|
checked: isSelected,
|
|
610
717
|
disabled: checkboxProps.disabled,
|
|
718
|
+
onClick: (e) => e.stopPropagation(),
|
|
611
719
|
onChange: (e) => handleSelectRow(key, e.target.checked)
|
|
612
720
|
})
|
|
613
721
|
]
|
|
@@ -649,12 +757,15 @@ var Table = vue.defineComponent({
|
|
|
649
757
|
style
|
|
650
758
|
},
|
|
651
759
|
[
|
|
652
|
-
|
|
760
|
+
slots[`cell-${column.key}`]?.({ record, index }) ?? (column.render ? column.render(record, index) : cellValue)
|
|
653
761
|
]
|
|
654
762
|
)
|
|
655
763
|
);
|
|
656
764
|
});
|
|
657
|
-
|
|
765
|
+
if (!expandAtStart && expandToggleCell) {
|
|
766
|
+
cells.push(expandToggleCell);
|
|
767
|
+
}
|
|
768
|
+
const rowNode = vue.h(
|
|
658
769
|
"tr",
|
|
659
770
|
{
|
|
660
771
|
key,
|
|
@@ -666,6 +777,28 @@ var Table = vue.defineComponent({
|
|
|
666
777
|
},
|
|
667
778
|
cells
|
|
668
779
|
);
|
|
780
|
+
if (props.expandable && isExpanded && isRowExpandable) {
|
|
781
|
+
const expandedContent = slots["expanded-row"]?.({ record, index }) || (props.expandable.expandedRowRender ? props.expandable.expandedRowRender(record, index) : null);
|
|
782
|
+
const expandedRow = vue.h(
|
|
783
|
+
"tr",
|
|
784
|
+
{
|
|
785
|
+
key: `${key}-expanded`,
|
|
786
|
+
class: tigercatCore.getExpandedRowClasses()
|
|
787
|
+
},
|
|
788
|
+
[
|
|
789
|
+
vue.h(
|
|
790
|
+
"td",
|
|
791
|
+
{
|
|
792
|
+
colspan: totalColumnCount.value,
|
|
793
|
+
class: tigercatCore.getExpandedRowContentClasses(props.size)
|
|
794
|
+
},
|
|
795
|
+
[expandedContent]
|
|
796
|
+
)
|
|
797
|
+
]
|
|
798
|
+
);
|
|
799
|
+
return [rowNode, expandedRow];
|
|
800
|
+
}
|
|
801
|
+
return rowNode;
|
|
669
802
|
});
|
|
670
803
|
return vue.h("tbody", rows);
|
|
671
804
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MenuContextKey } from './chunk-3AM6WEUE.mjs';
|
|
2
2
|
import { defineComponent, inject, computed, ref, h, Transition, isVNode, cloneVNode, nextTick } from 'vue';
|
|
3
|
-
import { isKeyOpen, classNames, getSubMenuTitleClasses, coerceClassValue, mergeStyleValues, submenuContentHorizontalClasses, submenuContentPopupClasses, submenuContentInlineClasses, submenuContentVerticalClasses, getMenuItemIndent, menuItemIconClasses, getSubMenuExpandIconClasses, moveFocusInMenu, focusMenuEdge, focusFirstChildItem } from '@expcat/tigercat-core';
|
|
3
|
+
import { isKeyOpen, classNames, getSubMenuTitleClasses, coerceClassValue, mergeStyleValues, submenuContentHorizontalClasses, submenuContentHorizontalNestedClasses, submenuContentPopupClasses, submenuContentInlineClasses, submenuContentVerticalClasses, getSubmenuPopupZIndex, getMenuItemIndent, menuItemIconClasses, getSubMenuExpandIconClasses, moveFocusInMenu, focusMenuEdge, focusFirstChildItem } from '@expcat/tigercat-core';
|
|
4
4
|
|
|
5
5
|
var ExpandIcon = (expanded) => {
|
|
6
6
|
return h(
|
|
@@ -85,7 +85,9 @@ var SubMenu = defineComponent({
|
|
|
85
85
|
return props.collapsed ?? (menuContext ? menuContext.collapsed.value : false);
|
|
86
86
|
});
|
|
87
87
|
const isPopup = computed(() => {
|
|
88
|
-
|
|
88
|
+
if (!menuContext) return false;
|
|
89
|
+
if (menuContext.mode.value === "horizontal") return true;
|
|
90
|
+
return menuContext.mode.value === "vertical" && effectiveCollapsed.value;
|
|
89
91
|
});
|
|
90
92
|
const isExpanded = computed(() => {
|
|
91
93
|
if (menuContext?.mode.value === "horizontal" || isPopup.value) {
|
|
@@ -109,12 +111,13 @@ var SubMenu = defineComponent({
|
|
|
109
111
|
const contentClasses = computed(() => {
|
|
110
112
|
if (!menuContext) return "";
|
|
111
113
|
if (menuContext.mode.value === "horizontal") {
|
|
112
|
-
return submenuContentHorizontalClasses;
|
|
114
|
+
return props.level === 0 ? submenuContentHorizontalClasses : submenuContentHorizontalNestedClasses;
|
|
113
115
|
}
|
|
114
116
|
if (isPopup.value) return submenuContentPopupClasses;
|
|
115
117
|
if (menuContext.mode.value === "inline") return submenuContentInlineClasses;
|
|
116
118
|
return submenuContentVerticalClasses;
|
|
117
119
|
});
|
|
120
|
+
const popupZIndex = computed(() => isPopup.value ? getSubmenuPopupZIndex(props.level) : {});
|
|
118
121
|
const handleTitleClick = () => {
|
|
119
122
|
if (!menuContext || props.disabled) return;
|
|
120
123
|
if (menuContext.mode.value === "horizontal") return;
|
|
@@ -206,7 +209,7 @@ var SubMenu = defineComponent({
|
|
|
206
209
|
}
|
|
207
210
|
};
|
|
208
211
|
const indentStyle = computed(() => {
|
|
209
|
-
if (!menuContext || menuContext.mode.value
|
|
212
|
+
if (!menuContext || menuContext.mode.value === "horizontal" || props.level === 0) {
|
|
210
213
|
return {};
|
|
211
214
|
}
|
|
212
215
|
return getMenuItemIndent(props.level, menuContext.inlineIndent.value);
|
|
@@ -224,9 +227,6 @@ var SubMenu = defineComponent({
|
|
|
224
227
|
const nextProps = {
|
|
225
228
|
level: existingProps.level ?? nextLevel
|
|
226
229
|
};
|
|
227
|
-
if (isPopup.value) {
|
|
228
|
-
nextProps.collapsed = false;
|
|
229
|
-
}
|
|
230
230
|
return cloneVNode(node, nextProps);
|
|
231
231
|
});
|
|
232
232
|
};
|
|
@@ -274,12 +274,13 @@ var SubMenu = defineComponent({
|
|
|
274
274
|
},
|
|
275
275
|
titleChildren
|
|
276
276
|
);
|
|
277
|
-
const contentNode =
|
|
277
|
+
const contentNode = isPopup.value ? h(
|
|
278
278
|
"ul",
|
|
279
279
|
{
|
|
280
280
|
class: contentClasses.value,
|
|
281
281
|
style: {
|
|
282
|
-
display: isExpanded.value ? "block" : "none"
|
|
282
|
+
display: isExpanded.value ? "block" : "none",
|
|
283
|
+
...popupZIndex.value
|
|
283
284
|
},
|
|
284
285
|
role: "menu",
|
|
285
286
|
"aria-hidden": isExpanded.value ? void 0 : "true"
|
|
@@ -324,7 +325,7 @@ var SubMenu = defineComponent({
|
|
|
324
325
|
return h(
|
|
325
326
|
"li",
|
|
326
327
|
{
|
|
327
|
-
class:
|
|
328
|
+
class: isPopup.value ? "relative" : "",
|
|
328
329
|
onMouseenter: handleMouseEnter,
|
|
329
330
|
onMouseleave: handleMouseLeave,
|
|
330
331
|
role: "none"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, computed, h } from 'vue';
|
|
2
|
-
import { classNames, layoutSidebarClasses, coerceClassValue, mergeStyleValues } from '@expcat/tigercat-core';
|
|
2
|
+
import { classNames, layoutSidebarClasses, layoutSidebarCollapsedClasses, coerceClassValue, getSidebarStyle, mergeStyleValues } from '@expcat/tigercat-core';
|
|
3
3
|
|
|
4
4
|
// src/components/Sidebar.ts
|
|
5
5
|
var Sidebar = defineComponent({
|
|
@@ -21,6 +21,15 @@ var Sidebar = defineComponent({
|
|
|
21
21
|
type: String,
|
|
22
22
|
default: "256px"
|
|
23
23
|
},
|
|
24
|
+
/**
|
|
25
|
+
* Width when collapsed (mini mode).
|
|
26
|
+
* Set to '0px' to fully hide the sidebar when collapsed.
|
|
27
|
+
* @default '64px'
|
|
28
|
+
*/
|
|
29
|
+
collapsedWidth: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: "64px"
|
|
32
|
+
},
|
|
24
33
|
/**
|
|
25
34
|
* Whether the sidebar is collapsed
|
|
26
35
|
* @default false
|
|
@@ -41,14 +50,14 @@ var Sidebar = defineComponent({
|
|
|
41
50
|
const sidebarClasses = computed(
|
|
42
51
|
() => classNames(
|
|
43
52
|
layoutSidebarClasses,
|
|
53
|
+
props.collapsed && layoutSidebarCollapsedClasses,
|
|
44
54
|
props.className,
|
|
45
55
|
coerceClassValue(attrs.class)
|
|
46
56
|
)
|
|
47
57
|
);
|
|
48
|
-
const sidebarStyle = computed(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}));
|
|
58
|
+
const sidebarStyle = computed(
|
|
59
|
+
() => getSidebarStyle(props.collapsed, props.width, props.collapsedWidth)
|
|
60
|
+
);
|
|
52
61
|
return () => h(
|
|
53
62
|
"aside",
|
|
54
63
|
{
|
|
@@ -56,7 +65,7 @@ var Sidebar = defineComponent({
|
|
|
56
65
|
class: sidebarClasses.value,
|
|
57
66
|
style: mergeStyleValues(props.style, sidebarStyle.value)
|
|
58
67
|
},
|
|
59
|
-
|
|
68
|
+
slots.default?.()
|
|
60
69
|
);
|
|
61
70
|
}
|
|
62
71
|
});
|
|
@@ -107,9 +107,9 @@ declare const ActivityFeed: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
107
107
|
default: undefined;
|
|
108
108
|
};
|
|
109
109
|
}>> & Readonly<{}>, {
|
|
110
|
-
className: string;
|
|
111
110
|
style: Record<string, string | number>;
|
|
112
111
|
loading: boolean;
|
|
112
|
+
className: string;
|
|
113
113
|
emptyText: string;
|
|
114
114
|
items: ActivityItem[];
|
|
115
115
|
groups: ActivityGroup[];
|
|
@@ -107,9 +107,9 @@ declare const ActivityFeed: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
107
107
|
default: undefined;
|
|
108
108
|
};
|
|
109
109
|
}>> & Readonly<{}>, {
|
|
110
|
-
className: string;
|
|
111
110
|
style: Record<string, string | number>;
|
|
112
111
|
loading: boolean;
|
|
112
|
+
className: string;
|
|
113
113
|
emptyText: string;
|
|
114
114
|
items: ActivityItem[];
|
|
115
115
|
groups: ActivityGroup[];
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var chunkEBTLMVDJ_js = require('../chunk-EBTLMVDJ.js');
|
|
6
6
|
require('../chunk-27T3QDSF.js');
|
|
7
|
-
require('../chunk-DN5GU5PC.js');
|
|
8
7
|
require('../chunk-ZED7TU62.js');
|
|
8
|
+
require('../chunk-DN5GU5PC.js');
|
|
9
9
|
require('../chunk-2KDSHEZT.js');
|
|
10
10
|
require('../chunk-DUQ7Q2GO.js');
|
|
11
11
|
require('../chunk-WEFQCJAG.js');
|
|
@@ -16,9 +16,9 @@ require('../chunk-PNKVD2UK.js');
|
|
|
16
16
|
|
|
17
17
|
Object.defineProperty(exports, "ActivityFeed", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkEBTLMVDJ_js.ActivityFeed; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "default", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkEBTLMVDJ_js.ActivityFeed_default; }
|
|
24
24
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { ActivityFeed, ActivityFeed_default as default } from '../chunk-
|
|
1
|
+
export { ActivityFeed, ActivityFeed_default as default } from '../chunk-RVEEEDJQ.mjs';
|
|
2
2
|
import '../chunk-LBGTABIU.mjs';
|
|
3
|
-
import '../chunk-Q6OYCTQO.mjs';
|
|
4
3
|
import '../chunk-4YHOD7LT.mjs';
|
|
4
|
+
import '../chunk-Q6OYCTQO.mjs';
|
|
5
5
|
import '../chunk-3G4VPV4D.mjs';
|
|
6
6
|
import '../chunk-6V7XCCXN.mjs';
|
|
7
7
|
import '../chunk-YXN3YY5Y.mjs';
|
|
@@ -157,10 +157,10 @@ declare const Alert: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
157
157
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
158
158
|
}>, {
|
|
159
159
|
type: AlertType;
|
|
160
|
-
className: string;
|
|
161
160
|
style: Record<string, string | number>;
|
|
162
161
|
title: string;
|
|
163
162
|
size: AlertSize;
|
|
163
|
+
className: string;
|
|
164
164
|
closable: boolean;
|
|
165
165
|
closeAriaLabel: string;
|
|
166
166
|
showIcon: boolean;
|
|
@@ -157,10 +157,10 @@ declare const Alert: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
157
157
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
158
158
|
}>, {
|
|
159
159
|
type: AlertType;
|
|
160
|
-
className: string;
|
|
161
160
|
style: Record<string, string | number>;
|
|
162
161
|
title: string;
|
|
163
162
|
size: AlertSize;
|
|
163
|
+
className: string;
|
|
164
164
|
closable: boolean;
|
|
165
165
|
closeAriaLabel: string;
|
|
166
166
|
showIcon: boolean;
|
|
@@ -96,7 +96,7 @@ declare const Anchor: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
96
96
|
};
|
|
97
97
|
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
98
98
|
[key: string]: any;
|
|
99
|
-
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("
|
|
99
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("change" | "click")[], "change" | "click", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
100
100
|
/**
|
|
101
101
|
* Whether to fix the anchor to the viewport
|
|
102
102
|
* @default true
|
|
@@ -168,9 +168,12 @@ declare const Anchor: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
168
168
|
default: undefined;
|
|
169
169
|
};
|
|
170
170
|
}>> & Readonly<{
|
|
171
|
-
onClick?: ((...args: any[]) => any) | undefined;
|
|
172
171
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
172
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
173
173
|
}>, {
|
|
174
|
+
style: Record<string, unknown>;
|
|
175
|
+
className: string;
|
|
176
|
+
direction: AnchorDirection;
|
|
174
177
|
affix: boolean;
|
|
175
178
|
bounds: number;
|
|
176
179
|
offsetTop: number;
|
|
@@ -178,9 +181,6 @@ declare const Anchor: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
178
181
|
targetOffset: number;
|
|
179
182
|
getCurrentAnchor: (activeLink: string) => string;
|
|
180
183
|
getContainer: () => HTMLElement | Window;
|
|
181
|
-
direction: AnchorDirection;
|
|
182
|
-
className: string;
|
|
183
|
-
style: Record<string, unknown>;
|
|
184
184
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
185
185
|
|
|
186
186
|
export { Anchor, type AnchorContext, AnchorContextKey, type VueAnchorProps, Anchor as default };
|
|
@@ -96,7 +96,7 @@ declare const Anchor: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
96
96
|
};
|
|
97
97
|
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
98
98
|
[key: string]: any;
|
|
99
|
-
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("
|
|
99
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("change" | "click")[], "change" | "click", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
100
100
|
/**
|
|
101
101
|
* Whether to fix the anchor to the viewport
|
|
102
102
|
* @default true
|
|
@@ -168,9 +168,12 @@ declare const Anchor: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
168
168
|
default: undefined;
|
|
169
169
|
};
|
|
170
170
|
}>> & Readonly<{
|
|
171
|
-
onClick?: ((...args: any[]) => any) | undefined;
|
|
172
171
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
172
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
173
173
|
}>, {
|
|
174
|
+
style: Record<string, unknown>;
|
|
175
|
+
className: string;
|
|
176
|
+
direction: AnchorDirection;
|
|
174
177
|
affix: boolean;
|
|
175
178
|
bounds: number;
|
|
176
179
|
offsetTop: number;
|
|
@@ -178,9 +181,6 @@ declare const Anchor: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
178
181
|
targetOffset: number;
|
|
179
182
|
getCurrentAnchor: (activeLink: string) => string;
|
|
180
183
|
getContainer: () => HTMLElement | Window;
|
|
181
|
-
direction: AnchorDirection;
|
|
182
|
-
className: string;
|
|
183
|
-
style: Record<string, unknown>;
|
|
184
184
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
185
185
|
|
|
186
186
|
export { Anchor, type AnchorContext, AnchorContextKey, type VueAnchorProps, Anchor as default };
|
|
@@ -61,8 +61,8 @@ declare const AnchorLink: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
61
61
|
default: undefined;
|
|
62
62
|
};
|
|
63
63
|
}>> & Readonly<{}>, {
|
|
64
|
-
className: string;
|
|
65
64
|
title: string;
|
|
65
|
+
className: string;
|
|
66
66
|
target: string;
|
|
67
67
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
68
68
|
|
|
@@ -61,8 +61,8 @@ declare const AnchorLink: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
61
61
|
default: undefined;
|
|
62
62
|
};
|
|
63
63
|
}>> & Readonly<{}>, {
|
|
64
|
-
className: string;
|
|
65
64
|
title: string;
|
|
65
|
+
className: string;
|
|
66
66
|
target: string;
|
|
67
67
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
68
68
|
|
|
@@ -148,10 +148,10 @@ declare const Avatar: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
148
148
|
default: undefined;
|
|
149
149
|
};
|
|
150
150
|
}>> & Readonly<{}>, {
|
|
151
|
-
className: string;
|
|
152
151
|
style: Record<string, string | number>;
|
|
153
|
-
text: string;
|
|
154
152
|
size: AvatarSize;
|
|
153
|
+
className: string;
|
|
154
|
+
text: string;
|
|
155
155
|
src: string;
|
|
156
156
|
alt: string;
|
|
157
157
|
shape: AvatarShape;
|
|
@@ -148,10 +148,10 @@ declare const Avatar: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
148
148
|
default: undefined;
|
|
149
149
|
};
|
|
150
150
|
}>> & Readonly<{}>, {
|
|
151
|
-
className: string;
|
|
152
151
|
style: Record<string, string | number>;
|
|
153
|
-
text: string;
|
|
154
152
|
size: AvatarSize;
|
|
153
|
+
className: string;
|
|
154
|
+
text: string;
|
|
155
155
|
src: string;
|
|
156
156
|
alt: string;
|
|
157
157
|
shape: AvatarShape;
|
|
@@ -78,8 +78,8 @@ declare const BackTop: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
78
78
|
}>> & Readonly<{
|
|
79
79
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
80
80
|
}>, {
|
|
81
|
-
className: string;
|
|
82
81
|
style: Record<string, unknown>;
|
|
82
|
+
className: string;
|
|
83
83
|
target: () => HTMLElement | Window | null;
|
|
84
84
|
duration: number;
|
|
85
85
|
visibilityHeight: number;
|
|
@@ -78,8 +78,8 @@ declare const BackTop: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
78
78
|
}>> & Readonly<{
|
|
79
79
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
80
80
|
}>, {
|
|
81
|
-
className: string;
|
|
82
81
|
style: Record<string, unknown>;
|
|
82
|
+
className: string;
|
|
83
83
|
target: () => HTMLElement | Window | null;
|
|
84
84
|
duration: number;
|
|
85
85
|
visibilityHeight: number;
|
|
@@ -93,10 +93,10 @@ declare const Badge: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
93
93
|
};
|
|
94
94
|
}>> & Readonly<{}>, {
|
|
95
95
|
type: BadgeType;
|
|
96
|
-
className: string;
|
|
97
96
|
style: Record<string, string | number>;
|
|
98
97
|
size: BadgeSize;
|
|
99
98
|
variant: BadgeVariant;
|
|
99
|
+
className: string;
|
|
100
100
|
max: number;
|
|
101
101
|
content: string | number;
|
|
102
102
|
position: BadgePosition;
|
|
@@ -93,10 +93,10 @@ declare const Badge: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
93
93
|
};
|
|
94
94
|
}>> & Readonly<{}>, {
|
|
95
95
|
type: BadgeType;
|
|
96
|
-
className: string;
|
|
97
96
|
style: Record<string, string | number>;
|
|
98
97
|
size: BadgeSize;
|
|
99
98
|
variant: BadgeVariant;
|
|
99
|
+
className: string;
|
|
100
100
|
max: number;
|
|
101
101
|
content: string | number;
|
|
102
102
|
position: BadgePosition;
|
|
@@ -75,8 +75,8 @@ declare const Breadcrumb: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
75
75
|
default: undefined;
|
|
76
76
|
};
|
|
77
77
|
}>> & Readonly<{}>, {
|
|
78
|
-
className: string;
|
|
79
78
|
style: Record<string, unknown>;
|
|
79
|
+
className: string;
|
|
80
80
|
separator: string;
|
|
81
81
|
extra: VNodeChild | VNodeChild[];
|
|
82
82
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
@@ -75,8 +75,8 @@ declare const Breadcrumb: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
75
75
|
default: undefined;
|
|
76
76
|
};
|
|
77
77
|
}>> & Readonly<{}>, {
|
|
78
|
-
className: string;
|
|
79
78
|
style: Record<string, unknown>;
|
|
79
|
+
className: string;
|
|
80
80
|
separator: string;
|
|
81
81
|
extra: VNodeChild | VNodeChild[];
|
|
82
82
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
@@ -123,8 +123,8 @@ declare const BreadcrumbItem: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
123
123
|
}>> & Readonly<{
|
|
124
124
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
125
125
|
}>, {
|
|
126
|
-
className: string;
|
|
127
126
|
style: Record<string, unknown>;
|
|
127
|
+
className: string;
|
|
128
128
|
separator: string;
|
|
129
129
|
href: string;
|
|
130
130
|
target: "_blank" | "_self" | "_parent" | "_top";
|