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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.8.24",
3
+ "version": "0.8.26",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -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
- 'border-separate border-spacing-0 text-sm',
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
  }
@@ -26,6 +26,10 @@ provide('tableHead:props', computed(() => props));
26
26
  const classes = computed(() => {
27
27
  const base = '';
28
28
 
29
+ if (!props.class) {
30
+ return base;
31
+ }
32
+
29
33
  return twMerge(
30
34
  base,
31
35
  props.class,
@@ -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,