sprintify-ui 0.8.24 → 0.8.26
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/sprintify-ui.es.js +1301 -1301
- package/package.json +1 -1
- package/src/components/BaseTable.vue +8 -1
- package/src/components/BaseTableCell.vue +16 -13
- package/src/components/BaseTableHead.vue +4 -0
- package/src/components/BaseTableHeader.vue +14 -8
- package/src/components/BaseTableRow.vue +4 -8
package/package.json
CHANGED
|
@@ -66,8 +66,15 @@ const props = withDefaults(defineProps<{
|
|
|
66
66
|
});
|
|
67
67
|
|
|
68
68
|
const classes = computed(() => {
|
|
69
|
+
|
|
70
|
+
const base = 'border-separate border-spacing-0 text-sm';
|
|
71
|
+
|
|
72
|
+
if (!props.class) {
|
|
73
|
+
return base;
|
|
74
|
+
}
|
|
75
|
+
|
|
69
76
|
return twMerge(
|
|
70
|
-
|
|
77
|
+
base,
|
|
71
78
|
props.class,
|
|
72
79
|
);
|
|
73
80
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<td
|
|
3
|
-
ref="tdRef"
|
|
4
3
|
:align="align"
|
|
5
4
|
:colspan="colspan"
|
|
6
5
|
:class="classes"
|
|
@@ -154,23 +153,27 @@ const classes = computed(() => {
|
|
|
154
153
|
const horizontalScrolling = baseTable?.value.fixedColumn && baseTableHorizontalScrolling?.value ? 'first:sticky first:z-[1] first:left-0 first:border-r-slate-200' : '';
|
|
155
154
|
const flush = baseTable?.value.flush ? 'first:pl-0 last:pr-0' : '';
|
|
156
155
|
|
|
156
|
+
const internalClasses = [
|
|
157
|
+
base,
|
|
158
|
+
baseTd,
|
|
159
|
+
click,
|
|
160
|
+
backgroundColor,
|
|
161
|
+
borderColor,
|
|
162
|
+
firstCol,
|
|
163
|
+
horizontalScrolling,
|
|
164
|
+
flush,
|
|
165
|
+
];
|
|
166
|
+
|
|
167
|
+
if (!props.class) {
|
|
168
|
+
return internalClasses;
|
|
169
|
+
}
|
|
170
|
+
|
|
157
171
|
return twMerge(
|
|
158
|
-
|
|
159
|
-
base,
|
|
160
|
-
baseTd,
|
|
161
|
-
click,
|
|
162
|
-
backgroundColor,
|
|
163
|
-
borderColor,
|
|
164
|
-
firstCol,
|
|
165
|
-
horizontalScrolling,
|
|
166
|
-
flush,
|
|
167
|
-
],
|
|
172
|
+
internalClasses,
|
|
168
173
|
props.class,
|
|
169
174
|
);
|
|
170
175
|
});
|
|
171
176
|
|
|
172
|
-
const tdRef = ref<HTMLTableCellElement | null>(null);
|
|
173
|
-
|
|
174
177
|
function onClick(event: MouseEvent) {
|
|
175
178
|
propsInternal.value.onClick?.(event);
|
|
176
179
|
}
|
|
@@ -65,15 +65,21 @@ const classes = computed(() => {
|
|
|
65
65
|
const horizontalScrolling = baseTable?.value.fixedColumn && baseTableHorizontalScrolling?.value ? 'first:sticky first:z-[3] first:left-0 first:border-r-slate-200' : '';
|
|
66
66
|
const flush = baseTable?.value.flush ? 'first:pl-0 last:pr-0' : '';
|
|
67
67
|
|
|
68
|
+
const internalClasses = [
|
|
69
|
+
base,
|
|
70
|
+
baseTh,
|
|
71
|
+
sticky,
|
|
72
|
+
firstCol,
|
|
73
|
+
horizontalScrolling,
|
|
74
|
+
flush,
|
|
75
|
+
];
|
|
76
|
+
|
|
77
|
+
if (!props.class) {
|
|
78
|
+
return internalClasses;
|
|
79
|
+
}
|
|
80
|
+
|
|
68
81
|
return twMerge(
|
|
69
|
-
|
|
70
|
-
base,
|
|
71
|
-
baseTh,
|
|
72
|
-
sticky,
|
|
73
|
-
firstCol,
|
|
74
|
-
horizontalScrolling,
|
|
75
|
-
flush,
|
|
76
|
-
],
|
|
82
|
+
internalClasses,
|
|
77
83
|
props.class,
|
|
78
84
|
);
|
|
79
85
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<tr
|
|
3
|
-
ref="trRef"
|
|
4
3
|
:class="classes"
|
|
5
4
|
@mouseenter="onMouseEnter"
|
|
6
5
|
@mouseleave="onMouseLeave"
|
|
@@ -43,16 +42,13 @@ const props = withDefaults(defineProps<{
|
|
|
43
42
|
onClick: undefined,
|
|
44
43
|
});
|
|
45
44
|
|
|
46
|
-
const trRef = ref<null | HTMLTableRowElement>(null);
|
|
47
|
-
const parent = ref<null | undefined | HTMLElement>(null);
|
|
48
|
-
|
|
49
|
-
onMounted(() => {
|
|
50
|
-
parent.value = trRef.value?.parentElement;
|
|
51
|
-
});
|
|
52
|
-
|
|
53
45
|
const classes = computed(() => {
|
|
54
46
|
const base = 'group/row';
|
|
55
47
|
|
|
48
|
+
if (!props.class) {
|
|
49
|
+
return base;
|
|
50
|
+
}
|
|
51
|
+
|
|
56
52
|
return twMerge(
|
|
57
53
|
base,
|
|
58
54
|
props.class,
|