@eturnity/eturnity_reusable_components 9.34.4 → 9.34.6
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
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M11.501 7.99414C11.777 7.99414 12.0008 8.21818 12.001 8.49414V10.9951H14.501C14.7771 10.9951 15.001 11.219 15.001 11.4951C15.001 11.7713 14.7771 11.9951 14.501 11.9951H12.001V14.4951C12.001 14.7713 11.7771 14.9951 11.501 14.9951C11.2248 14.9951 11.001 14.7713 11.001 14.4951V11.9951H8.5C8.22401 11.9949 8 11.7711 8 11.4951C8 11.2191 8.22401 10.9953 8.5 10.9951H11.001V8.49414C11.0012 8.21818 11.225 7.99414 11.501 7.99414ZM7.90039 1.5C9.43019 1.50004 10.8364 1.70587 11.877 2.05273C12.3945 2.22529 12.8497 2.44239 13.1855 2.70703C13.5156 2.96723 13.7997 3.33271 13.7998 3.7998V9.99512H13.001V8.49316C13.0007 8.22135 12.9266 7.96709 12.7998 7.74707V5.14746C12.5298 5.30006 12.2172 5.43344 11.877 5.54688C10.8364 5.89374 9.43019 6.09957 7.90039 6.09961C6.37054 6.09961 4.96448 5.89372 3.92383 5.54688C3.58334 5.43338 3.2702 5.30017 3 5.14746V8C3 8.03181 3.01842 8.13999 3.23242 8.30957C3.44143 8.47518 3.7753 8.64589 4.2334 8.79883C5.14452 9.103 6.43877 9.2998 7.90039 9.2998C8.65535 9.29979 9.3652 9.24506 10.001 9.15234V9.99512H8.49902C8.16322 9.99541 7.85361 10.107 7.60352 10.2939C6.18175 10.2694 4.8886 10.0724 3.91699 9.74805C3.57907 9.63523 3.26834 9.50236 3 9.35059V12.2002C3.00008 12.2322 3.01885 12.3405 3.23242 12.5098C3.44144 12.6754 3.77534 12.8461 4.2334 12.999C5.14452 13.3032 6.43877 13.5 7.90039 13.5C8.65533 13.5 9.36519 13.4453 10.001 13.3525V14.3633C9.34864 14.451 8.63986 14.5 7.90039 14.5C6.36222 14.5 4.95583 14.295 3.91699 13.9482C3.40014 13.7757 2.94607 13.5582 2.61133 13.293C2.28171 13.0317 2.00008 12.6662 2 12.2002V3.7998C2.00008 3.3325 2.28504 2.96725 2.61523 2.70703C2.95111 2.44234 3.40613 2.2253 3.92383 2.05273C4.96446 1.70591 6.3706 1.5 7.90039 1.5ZM13.4922 12.9951C13.4015 13.1054 13.2986 13.2057 13.1885 13.293C13.1297 13.3396 13.0668 13.3841 13.001 13.4277V12.9951H13.4922ZM7.90039 2.5C6.44801 2.5 5.153 2.69737 4.23926 3.00195C3.78005 3.15507 3.44395 3.32626 3.2334 3.49219C3.01792 3.6621 3.00008 3.76988 3 3.7998C3 3.82946 3.01718 3.93798 3.2334 4.1084C3.44397 4.27435 3.77996 4.4455 4.23926 4.59863C5.153 4.90321 6.44801 5.09961 7.90039 5.09961C9.35261 5.09957 10.6469 4.90319 11.5605 4.59863C12.0199 4.4455 12.3558 4.27435 12.5664 4.1084C12.7827 3.93796 12.7998 3.82947 12.7998 3.7998C12.7997 3.76988 12.782 3.66216 12.5664 3.49219C12.3558 3.32624 12.0198 3.15508 11.5605 3.00195C10.6469 2.6974 9.35262 2.50004 7.90039 2.5Z" fill="#263238"/>
|
|
3
|
+
</svg>
|
|
@@ -67,6 +67,23 @@ describe('ButtonIcon.vue', () => {
|
|
|
67
67
|
expect(icon.props('name')).toBe('settings')
|
|
68
68
|
})
|
|
69
69
|
|
|
70
|
+
it('renders the icon at 14px when no icon size is given', () => {
|
|
71
|
+
const icon = wrapper.findComponent({ name: 'Icon' })
|
|
72
|
+
expect(icon.props('size')).toBe('14px')
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
it('renders the icon at the given icon size', async () => {
|
|
76
|
+
await wrapper.setProps({ iconSize: '24px' })
|
|
77
|
+
const icon = wrapper.findComponent({ name: 'Icon' })
|
|
78
|
+
expect(icon.props('size')).toBe('24px')
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
it('keeps the caret at its own size when the icon size changes', async () => {
|
|
82
|
+
await wrapper.setProps({ iconSize: '24px', showCaret: true })
|
|
83
|
+
const caret = wrapper.findComponent('[data-test-id="button-icon-caret"]')
|
|
84
|
+
expect(caret.props('size')).toBe('8px')
|
|
85
|
+
})
|
|
86
|
+
|
|
70
87
|
it('applies disabled state correctly', async () => {
|
|
71
88
|
await wrapper.setProps({ isDisabled: true })
|
|
72
89
|
const buttonWrapper = wrapper.find('[data-test-id="button-icon-wrapper"]')
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
:fill-type="fillType"
|
|
35
35
|
:hovered-color="getIconColor"
|
|
36
36
|
:name="iconName"
|
|
37
|
-
size="
|
|
37
|
+
:size="iconSize"
|
|
38
38
|
/>
|
|
39
39
|
</IconContainer>
|
|
40
40
|
<ButtonContainer
|
|
@@ -473,6 +473,11 @@
|
|
|
473
473
|
default: null,
|
|
474
474
|
type: String,
|
|
475
475
|
},
|
|
476
|
+
iconSize: {
|
|
477
|
+
required: false,
|
|
478
|
+
default: '14px',
|
|
479
|
+
type: String,
|
|
480
|
+
},
|
|
476
481
|
fontSize: {
|
|
477
482
|
required: false,
|
|
478
483
|
default: '14px',
|