@dataloop-ai/components 0.20.130 → 0.20.132

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": "@dataloop-ai/components",
3
- "version": "0.20.130",
3
+ "version": "0.20.132",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -192,6 +192,10 @@ export default defineComponent({
192
192
  * Overwrite default background color on hover
193
193
  */
194
194
  hoverBgColor: { type: String, default: null },
195
+ /**
196
+ * Overwrite default background color on mouse press
197
+ */
198
+ pressedBgColor: { type: String, default: null, required: false },
195
199
  /**
196
200
  * Overwrite default border color on hover
197
201
  */
@@ -404,10 +408,13 @@ export default defineComponent({
404
408
  shaded: this.shaded,
405
409
  outlined: this.shaded
406
410
  }),
407
- '--dl-button-bg-pressed': setBgOnPressed({
408
- shaded: this.shaded,
409
- outlined: this.outlined
410
- }),
411
+ '--dl-button-bg-pressed':
412
+ this.pressedBgColor ??
413
+ setBgOnPressed({
414
+ shaded: this.shaded,
415
+ outlined: this.outlined
416
+ }),
417
+
411
418
  '--dl-button-border-pressed': setBorderOnPressed({
412
419
  shaded: this.shaded,
413
420
  outlined: this.outlined
@@ -47,8 +47,14 @@
47
47
  />
48
48
  </slot>
49
49
  </td>
50
- <td class="chevron-icon-container">
51
- <div class="chevron-icon">
50
+ <td
51
+ class="chevron-icon-container"
52
+ :class="{ 'no-children': (row.children || []).length === 0 }"
53
+ >
54
+ <div
55
+ class="chevron-icon"
56
+ :class="{ 'no-children': (row.children || []).length === 0 }"
57
+ >
52
58
  <DlIcon
53
59
  v-if="(row.children || []).length > 0"
54
60
  :icon="`${
@@ -67,13 +73,13 @@
67
73
  :class="col.tdClass(row)"
68
74
  :style="
69
75
  col.tdStyle(row) +
70
- `padding-left: ${
71
- setTrPadding(
72
- level,
73
- (row.children || []).length > 0,
74
- colIndex
75
- ) + 1
76
- }px;`
76
+ `padding-left: ${
77
+ setTrPadding(
78
+ level,
79
+ (row.children || []).length > 0,
80
+ colIndex
81
+ ) + 1
82
+ }px;`
77
83
  "
78
84
  :col-index="colIndex"
79
85
  :tooltip="tooltip"
@@ -432,9 +438,17 @@ export default defineComponent({
432
438
  cursor: pointer;
433
439
  padding: 5px;
434
440
  height: 100%;
441
+
442
+ &.no-children {
443
+ cursor: default;
444
+ }
435
445
  }
436
446
  .chevron-icon-container {
437
447
  cursor: pointer;
438
448
  width: 25px;
449
+
450
+ &.no-children {
451
+ cursor: default;
452
+ }
439
453
  }
440
454
  </style>