Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(color-picker): add support for alpha channel (deprecates hideChannels, hideHex, hideSaved) #2841

Merged
merged 95 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
bf8a6d8
feat(color): enable alpha support
jcfranco Jul 30, 2020
b8ba4d2
merge master
jcfranco Aug 27, 2021
4a1f4f0
merge master
jcfranco Apr 8, 2022
b03d0c5
drop unnecessary helpers since latest color module has hexa support
jcfranco Apr 8, 2022
b2bf7b0
rename alphaSupport to alphaEnabled
jcfranco Apr 8, 2022
cb86b2c
deprecate hide props in favor of disabled
jcfranco Apr 9, 2022
30e05a9
process opacity changes on input
jcfranco Apr 9, 2022
c1b6ad5
convert valid shorthand hex to hexa
jcfranco Apr 9, 2022
cff25ac
add swatch e2e tests
jcfranco Apr 9, 2022
e74ae35
add hex input e2e tests
jcfranco Apr 9, 2022
eb43ebb
fix swatch tests
jcfranco Apr 9, 2022
f5c1a82
fix hex input tests
jcfranco Apr 9, 2022
08b641b
add spec test
jcfranco Apr 11, 2022
d99e58b
stabilize existingc color-picker tests
jcfranco Apr 11, 2022
8dc580f
wip – need to lint and fix remaining tests
jcfranco Apr 12, 2022
44eaaa8
merge master
jcfranco Nov 11, 2022
f27e4a3
sync master
benelan Nov 22, 2022
41b0225
Merge branch 'master' into jcfranco/749-add-support-for-alpha
benelan Nov 22, 2022
de37287
Merge branch 'master' into jcfranco/749-add-support-for-alpha
benelan Nov 29, 2022
33cee90
Merge branch 'master' into jcfranco/749-add-support-for-alpha
benelan Dec 9, 2022
f75c4d0
Merge branch 'master' into jcfranco/749-add-support-for-alpha
alisonailea Dec 15, 2022
50103dd
test(color-picker): alpha support (#6265)
alisonailea Mar 16, 2023
8e30ab8
Revert "test(color-picker): alpha support (#6265)"
jcfranco Apr 24, 2023
4c49050
update swatch to latest design
jcfranco Nov 20, 2022
c256057
update hex input to latest design
jcfranco Nov 20, 2022
e1761f4
merge master
jcfranco Apr 24, 2023
728a484
fine-tune swatch redesign
jcfranco Apr 24, 2023
2b011f1
implement slider section redesign
jcfranco Apr 25, 2023
5f95d98
use opacity vs alpha
jcfranco Apr 26, 2023
6b57370
update hex-input to show 6-chars and wire up opacity
jcfranco Apr 26, 2023
dcbb3b0
pass messages into hex input
jcfranco Apr 26, 2023
4e29c7e
tidy up
jcfranco Apr 26, 2023
575d167
add placeholder no-color swatch
jcfranco Apr 26, 2023
a049548
tweak preview + slider spacing
jcfranco Apr 26, 2023
da339e6
tidy up
jcfranco Apr 26, 2023
71056ea
merge master
jcfranco Apr 26, 2023
69d2672
update lock file
jcfranco Apr 26, 2023
c55bb98
improve hex-input opacity input sizing
jcfranco Apr 26, 2023
ac199db
apply correct scale to tabs
jcfranco Apr 26, 2023
e9dc34f
allow pasting #-leading hex codes per spec
jcfranco Apr 26, 2023
00e8e4a
improve hex-input layout
jcfranco Apr 26, 2023
18543ab
make slider trackes more round
jcfranco Apr 26, 2023
4562f04
display alpha channel under color mode section
jcfranco Apr 27, 2023
92ba2ee
improve channel layout
jcfranco Apr 27, 2023
4b5fa4d
tidy up
jcfranco Apr 27, 2023
f1fc63a
fix hex-input value clearing
jcfranco Apr 27, 2023
7924d98
preserve alpha when nudging hex
jcfranco Apr 27, 2023
a6f763d
merge master
jcfranco Apr 27, 2023
0e80960
tidy up
jcfranco Apr 27, 2023
e355cd4
tidy up
jcfranco Apr 27, 2023
2cca8ec
tidy up
jcfranco Apr 27, 2023
7b4c809
improve spacing
jcfranco Apr 28, 2023
bc69834
tidy up
jcfranco Apr 28, 2023
c95a03a
restore active swatch display
jcfranco Apr 28, 2023
88190c7
tidy up
jcfranco Apr 28, 2023
330104b
fix restoring previous color when invalid
jcfranco Apr 28, 2023
2fc6909
tidy up
jcfranco Apr 28, 2023
4c5137b
fix hex-input value nudging
jcfranco Apr 28, 2023
fa7c5c5
fix hue/opacity scope positioning
jcfranco Apr 28, 2023
55df747
tidy up
jcfranco Apr 28, 2023
5ed7105
tidy up
jcfranco Apr 28, 2023
a42c76f
tidy up
jcfranco Apr 28, 2023
e338ebd
drop unused CSS
jcfranco Apr 28, 2023
69d44fc
tidy up
jcfranco Apr 28, 2023
2404483
tidy up
jcfranco Apr 28, 2023
6a2483c
tidy up
jcfranco Apr 28, 2023
a06c05c
tidy up
jcfranco Apr 28, 2023
e6c9e8d
tidy up
jcfranco Apr 28, 2023
d54a8e1
update tests
jcfranco Apr 28, 2023
2f57b2c
fix doc
jcfranco Apr 28, 2023
1bd5350
tidy up
jcfranco Apr 28, 2023
f598e4c
stabilize swatch tests
jcfranco Apr 28, 2023
d92237f
merge master
jcfranco Apr 29, 2023
14acb59
rename opacityEnabled to alphaChannel
jcfranco Apr 29, 2023
1467a4c
Merge branch 'master' into jcfranco/749-add-support-for-alpha
jcfranco Apr 30, 2023
ed40353
stabilize hex-input tests
jcfranco Apr 30, 2023
6f85311
fix no-color swatch
jcfranco May 1, 2023
9b3ac1e
fix hue/opacity slider rendering
jcfranco May 1, 2023
4791924
fix hue slider thumb not restoring previous color on arrow up/down
jcfranco May 1, 2023
da12c0d
ensure interaction state is set before updating internals
jcfranco May 1, 2023
5764e15
tidy up
jcfranco May 1, 2023
b91654d
stabilize color-picker tests
jcfranco May 1, 2023
efc6bbd
merge master
jcfranco May 1, 2023
dd9d827
restore alpha tests
jcfranco May 1, 2023
712a06b
fix swatch spacing
jcfranco May 2, 2023
8f41dd1
drop active swatch styling
jcfranco May 2, 2023
bb1457a
fix alpha channel alignment
jcfranco May 2, 2023
5c63a5d
merge master
jcfranco May 2, 2023
95e1497
drop bottom padding on saved section
jcfranco May 2, 2023
ba19468
fix swatch outline
jcfranco May 2, 2023
5de5ace
fix input sandwich borders in RTL
jcfranco May 2, 2023
d69306f
tweak saved swatch spacing for scale=s
jcfranco May 2, 2023
579341a
skip input sandwich workaround for small scale
jcfranco May 2, 2023
1750177
fix input sandwich border for scale=s
jcfranco May 3, 2023
4547099
Merge branch 'master' into jcfranco/749-add-support-for-alpha
jcfranco May 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25,899 changes: 5 additions & 25,894 deletions package-lock.json

Large diffs are not rendered by default.

514 changes: 350 additions & 164 deletions src/components/color-picker-hex-input/color-picker-hex-input.e2e.ts

Large diffs are not rendered by default.

36 changes: 20 additions & 16 deletions src/components/color-picker-hex-input/color-picker-hex-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,31 @@
}

.container {
@apply inline-grid w-full items-center;
grid-template-columns: 1fr auto;
@apply flex w-full items-center flex-nowrap;
}

.preview {
grid-column: 2 / 3;

@apply pointer-events-none
my-0
mx-1
flex
items-center;
.hex-input {
@apply grow uppercase;
}

.preview,
.input {
grid-row: 1;
.opacity-input {
inline-size: 68px;
margin-inline-start: -1px;
}

.input {
grid-column: 1 / 3;
:host([scale="s"]) {
.container {
@apply flex-wrap gap-y-0.5;
}

.opacity-input {
inline-size: unset;
margin-inline-start: unset;
}
}

@apply w-full uppercase;
:host([scale="l"]) {
.opacity-input {
inline-size: 88px;
}
}
Loading