@tak-ps/vue-tabler 4.12.0 → 4.12.1
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/CHANGELOG.md +4 -0
- package/components/IconButton.vue +12 -7
- package/package.json +1 -1
- package/test/IconButton.spec.ts +12 -7
package/CHANGELOG.md
CHANGED
|
@@ -49,18 +49,23 @@ const iconButtonStyle = computed(() => {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.custom-hover:not(.disabled) {
|
|
52
|
-
|
|
52
|
+
border: 1px solid transparent;
|
|
53
|
+
transition: background-color 0.15s ease, border-color 0.15s ease;
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
[data-bs-theme='light'] .custom-hover:not(.disabled):hover,
|
|
56
|
-
[data-bs-theme='light'] .custom-hover:not(.disabled):focus-visible
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
[data-bs-theme='light'] .custom-hover:not(.disabled):focus-visible,
|
|
58
|
+
[data-bs-theme='light'] .custom-hover:not(.disabled):focus-within {
|
|
59
|
+
border-radius: 6px;
|
|
60
|
+
border-color: color-mix(in srgb, var(--tblr-body-color) 18%, transparent);
|
|
61
|
+
background: color-mix(in srgb, var(--tblr-body-color) 8%, transparent);
|
|
59
62
|
}
|
|
60
63
|
|
|
61
64
|
[data-bs-theme='dark'] .custom-hover:not(.disabled):hover,
|
|
62
|
-
[data-bs-theme='dark'] .custom-hover:not(.disabled):focus-visible
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
[data-bs-theme='dark'] .custom-hover:not(.disabled):focus-visible,
|
|
66
|
+
[data-bs-theme='dark'] .custom-hover:not(.disabled):focus-within {
|
|
67
|
+
border-radius: 6px;
|
|
68
|
+
border-color: color-mix(in srgb, var(--tblr-light) 30%, transparent);
|
|
69
|
+
background: color-mix(in srgb, var(--tblr-light) 12%, transparent);
|
|
65
70
|
}
|
|
66
71
|
</style>
|
package/package.json
CHANGED
package/test/IconButton.spec.ts
CHANGED
|
@@ -45,15 +45,20 @@ describe('TablerIconButton', () => {
|
|
|
45
45
|
expect(wrapper.get('div').classes()).not.toContain('custom-hover')
|
|
46
46
|
})
|
|
47
47
|
|
|
48
|
-
it('uses
|
|
48
|
+
it('uses theme-derived hover colors and borders instead of fixed values', () => {
|
|
49
|
+
expect(iconButtonSource).toContain('transition: background-color 0.15s ease, border-color 0.15s ease;')
|
|
50
|
+
expect(iconButtonSource).toContain('border: 1px solid transparent;')
|
|
51
|
+
|
|
49
52
|
expect(iconButtonSource).toContain("[data-bs-theme='light'] .custom-hover:not(.disabled):hover,")
|
|
50
|
-
expect(iconButtonSource).toContain("[data-bs-theme='light'] .custom-hover:not(.disabled):focus-visible
|
|
51
|
-
expect(iconButtonSource).toContain(
|
|
52
|
-
expect(iconButtonSource).toContain('color: var(--tblr-body-color);')
|
|
53
|
+
expect(iconButtonSource).toContain("[data-bs-theme='light'] .custom-hover:not(.disabled):focus-visible,")
|
|
54
|
+
expect(iconButtonSource).toContain("[data-bs-theme='light'] .custom-hover:not(.disabled):focus-within {")
|
|
55
|
+
expect(iconButtonSource).toContain('border-color: color-mix(in srgb, var(--tblr-body-color) 18%, transparent);')
|
|
56
|
+
expect(iconButtonSource).toContain('background: color-mix(in srgb, var(--tblr-body-color) 8%, transparent);')
|
|
53
57
|
|
|
54
58
|
expect(iconButtonSource).toContain("[data-bs-theme='dark'] .custom-hover:not(.disabled):hover,")
|
|
55
|
-
expect(iconButtonSource).toContain("[data-bs-theme='dark'] .custom-hover:not(.disabled):focus-visible
|
|
56
|
-
expect(iconButtonSource).toContain('
|
|
57
|
-
expect(iconButtonSource).toContain('color: var(--tblr-
|
|
59
|
+
expect(iconButtonSource).toContain("[data-bs-theme='dark'] .custom-hover:not(.disabled):focus-visible,")
|
|
60
|
+
expect(iconButtonSource).toContain("[data-bs-theme='dark'] .custom-hover:not(.disabled):focus-within {")
|
|
61
|
+
expect(iconButtonSource).toContain('border-color: color-mix(in srgb, var(--tblr-light) 30%, transparent);')
|
|
62
|
+
expect(iconButtonSource).toContain('background: color-mix(in srgb, var(--tblr-light) 12%, transparent);')
|
|
58
63
|
})
|
|
59
64
|
})
|