@dataloop-ai/components 0.18.61 → 0.18.62

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.18.61",
3
+ "version": "0.18.62",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -16,6 +16,8 @@
16
16
  @click="onClick"
17
17
  @dblclick="onDblClick"
18
18
  @mousedown="onMouseDown"
19
+ @mouseenter="mouseOver = true"
20
+ @mouseleave="mouseOver = false"
19
21
  >
20
22
  <dl-tooltip
21
23
  v-if="!tooltip && overflow && isOverflowing && hasLabel"
@@ -182,6 +184,7 @@ export default defineComponent({
182
184
  const { active } = toRefs(props)
183
185
  const buttonLabelRef = ref(null)
184
186
  const { hasEllipsis } = useSizeObserver(buttonLabelRef)
187
+ const mouseOver = ref(false)
185
188
 
186
189
  const buttonClass = computed(() => {
187
190
  const classes = ['dl-button']
@@ -195,7 +198,8 @@ export default defineComponent({
195
198
  uuid: `dl-button-${v4()}`,
196
199
  buttonLabelRef,
197
200
  isOverflowing: hasEllipsis,
198
- buttonClass
201
+ buttonClass,
202
+ mouseOver
199
203
  }
200
204
  },
201
205
  computed: {
@@ -206,6 +210,10 @@ export default defineComponent({
206
210
  ]
207
211
  },
208
212
  getIconColor(): string {
213
+ if (this.mouseOver) {
214
+ return 'dl-color-hover'
215
+ }
216
+
209
217
  if (this.iconColor) {
210
218
  return this.iconColor
211
219
  }
@@ -464,6 +472,9 @@ export default defineComponent({
464
472
  transition: var(--dl-button-text-transition-duration);
465
473
  color: var(--dl-button-color-hover);
466
474
  }
475
+ .dl-icon {
476
+ color: var(--dl-button-text-color-hover) !important;
477
+ }
467
478
  }
468
479
  }
469
480
 
@@ -287,13 +287,23 @@
287
287
  <div>
288
288
  <h3>Shaded and outlined</h3>
289
289
  <dl-button
290
- :active="activeButtonState"
291
290
  icon="icon-dl-search"
292
291
  label="test me"
293
292
  shaded
294
293
  outlined
295
294
  />
296
295
  </div>
296
+ <div>
297
+ <h3>button with icon color</h3>
298
+ <dl-button
299
+ icon="icon-dl-search"
300
+ :icon-color="'red'"
301
+ label="test me"
302
+ size="s"
303
+ shaded
304
+ outlined
305
+ />
306
+ </div>
297
307
  </div>
298
308
  </template>
299
309