-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[QColorPicker] Add focus accessibility (#38)
* Add focus accessibility to QColorPicker
- Loading branch information
ViZhe
authored
Jan 20, 2021
1 parent
e664116
commit dd0d01b
Showing
15 changed files
with
311 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import Component from './src/QColorAlphaSlider'; | ||
|
||
describe('QColorAlphaSlider', () => { | ||
it('should match snapshot', async () => { | ||
const instance = shallowMount(Component, { | ||
propsData: { | ||
color: 'rgba(255,155,155,.5)', | ||
alpha: 55 | ||
} | ||
}); | ||
|
||
expect(instance.element).toMatchSnapshot(); | ||
}); | ||
|
||
it('data should match snapshot', () => { | ||
expect(Component.data()).toMatchSnapshot(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Component from './src/QColorHueSlider'; | ||
|
||
describe('QColorHueSlider', () => { | ||
it('should match snapshot', async () => { | ||
const instance = shallowMount(Component, { | ||
propsData: { | ||
hue: 155 | ||
} | ||
}); | ||
|
||
expect(instance.element).toMatchSnapshot(); | ||
}); | ||
|
||
it('data should match snapshot', () => { | ||
expect(Component.data()).toMatchSnapshot(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Component from './src/QColorPicker'; | ||
|
||
describe('QColorPicker', () => { | ||
it('should match snapshot', async () => { | ||
const instance = shallowMount(Component); | ||
|
||
expect(instance.element).toMatchSnapshot(); | ||
}); | ||
|
||
it('data should match snapshot', () => { | ||
expect(Component.data()).toMatchSnapshot(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import Component from './src/QColorSvpanel'; | ||
|
||
describe('QColorSvpanel', () => { | ||
it('should match snapshot', async () => { | ||
const instance = shallowMount(Component, { | ||
propsData: { | ||
hue: 100, | ||
saturation: 50, | ||
value: 25 | ||
} | ||
}); | ||
|
||
expect(instance.element).toMatchSnapshot(); | ||
}); | ||
|
||
it('data should match snapshot', () => { | ||
expect(Component.data()).toMatchSnapshot(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Component from './src/QPickerDropdown'; | ||
|
||
describe('QPickerDropdown', () => { | ||
it('should match snapshot', async () => { | ||
const instance = shallowMount(Component); | ||
|
||
expect(instance.element).toMatchSnapshot(); | ||
}); | ||
|
||
it('data should match snapshot', () => { | ||
expect(Component.data()).toMatchSnapshot(); | ||
}); | ||
}); |
22 changes: 22 additions & 0 deletions
22
src/qComponents/QColorPicker/__snapshots__/QColorAlphaSlider.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`QColorAlphaSlider data should match snapshot 1`] = ` | ||
Object { | ||
"thumbLeft": 0, | ||
} | ||
`; | ||
|
||
exports[`QColorAlphaSlider should match snapshot 1`] = ` | ||
<div | ||
class="q-color-alpha-slider" | ||
> | ||
<div | ||
class="q-color-alpha-slider__bar" | ||
/> | ||
<div | ||
class="q-color-alpha-slider__thumb" | ||
style="left: 0px;" | ||
/> | ||
</div> | ||
`; |
22 changes: 22 additions & 0 deletions
22
src/qComponents/QColorPicker/__snapshots__/QColorHueSlider.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`QColorHueSlider data should match snapshot 1`] = ` | ||
Object { | ||
"thumbTop": 0, | ||
} | ||
`; | ||
|
||
exports[`QColorHueSlider should match snapshot 1`] = ` | ||
<div | ||
class="q-color-hue-slider" | ||
> | ||
<div | ||
class="q-color-hue-slider__bar" | ||
/> | ||
<div | ||
class="q-color-hue-slider__thumb" | ||
style="top: 0px;" | ||
/> | ||
</div> | ||
`; |
37 changes: 37 additions & 0 deletions
37
src/qComponents/QColorPicker/__snapshots__/QColorPicker.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`QColorPicker data should match snapshot 1`] = ` | ||
Object { | ||
"isClickIgnored": false, | ||
"isPickerShown": false, | ||
"popperJS": null, | ||
"zIndex": null, | ||
} | ||
`; | ||
|
||
exports[`QColorPicker should match snapshot 1`] = ` | ||
<div | ||
class="q-color-picker" | ||
> | ||
<div | ||
class="q-color-picker-trigger" | ||
> | ||
<button | ||
class="q-color-picker-trigger__default" | ||
> | ||
<div | ||
class="q-color-picker-trigger__color" | ||
/> | ||
<span | ||
class="q-color-picker-trigger__icon q-icon-triangle-down" | ||
/> | ||
</button> | ||
</div> | ||
<q-picker-dropdown-stub | ||
colorformat="hex" | ||
isclearbtnshown="true" | ||
/> | ||
</div> | ||
`; |
20 changes: 20 additions & 0 deletions
20
src/qComponents/QColorPicker/__snapshots__/QColorSvpanel.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`QColorSvpanel data should match snapshot 1`] = ` | ||
Object { | ||
"cursorLeft": 0, | ||
"cursorTop": 0, | ||
} | ||
`; | ||
|
||
exports[`QColorSvpanel should match snapshot 1`] = ` | ||
<div | ||
class="q-color-svpanel" | ||
style="background-color: rgb(0, 0, 0);" | ||
> | ||
<div | ||
class="q-color-svpanel__cursor" | ||
style="top: 0px; left: 0px;" | ||
/> | ||
</div> | ||
`; |
71 changes: 71 additions & 0 deletions
71
src/qComponents/QColorPicker/__snapshots__/QPickerDropdown.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`QPickerDropdown data should match snapshot 1`] = ` | ||
Object { | ||
"alpha": 100, | ||
"elementToFocusAfterClosing": null, | ||
"hue": 0, | ||
"saturation": 100, | ||
"tempColor": "", | ||
"value": 100, | ||
} | ||
`; | ||
|
||
exports[`QPickerDropdown should match snapshot 1`] = ` | ||
<transition-stub | ||
name="fade" | ||
> | ||
<div | ||
class="q-picker-dropdown" | ||
style="display: none;" | ||
tabindex="-1" | ||
> | ||
<div | ||
class="q-picker-dropdown__base" | ||
> | ||
<q-color-svpanel-stub | ||
hue="0" | ||
saturation="0" | ||
value="0" | ||
/> | ||
<q-color-hue-slider-stub | ||
hue="0" | ||
/> | ||
</div> | ||
<!----> | ||
<div | ||
class="q-picker-dropdown__footer" | ||
> | ||
<div | ||
class="q-picker-dropdown__input" | ||
> | ||
<q-input-stub | ||
autocomplete="off" | ||
label="" | ||
suffixicon="" | ||
tabindex="" | ||
type="text" | ||
value="#000000" | ||
/> | ||
</div> | ||
<!----> | ||
<q-button-stub | ||
icon="" | ||
nativetype="button" | ||
size="medium" | ||
theme="primary" | ||
type="default" | ||
> | ||
Применить | ||
</q-button-stub> | ||
</div> | ||
</div> | ||
</transition-stub> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.