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

[PWA-623]: Update Venia's inputs #2510

Merged
merged 84 commits into from
Jul 14, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
39778f4
PWA-621: Carry over design tokens from styleguide
anthoula Jun 9, 2020
18b1b8e
Merge branch 'develop' of github.com:magento/pwa-studio into PWA-621
anthoula Jun 9, 2020
26832d0
PWA-621: Carry over design tokens from styleguide
anthoula Jun 10, 2020
70e218a
Merge branch 'develop' of github.com:magento/pwa-studio into PWA-621
anthoula Jun 10, 2020
b572c09
Merge branch 'develop' of github.com:magento/pwa-studio into PWA-621
anthoula Jun 15, 2020
04f6e49
PWA-621: Carry over design tokens from styleguide
anthoula Jun 15, 2020
1ec9180
PWA-621: Carry over design tokens from styleguide
anthoula Jun 15, 2020
fcc0ca1
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 15, 2020
c0bef2a
PWA-621: Carry over design tokens from styleguide
anthoula Jun 15, 2020
feff900
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 15, 2020
7baf474
Merge branch 'develop' of github.com:magento/pwa-studio into PWA-621
anthoula Jun 16, 2020
bced8a9
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 16, 2020
71907b8
Merge branch 'develop' of github.com:magento/pwa-studio into PWA-621
anthoula Jun 17, 2020
adb825c
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 17, 2020
1f7ae7c
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 17, 2020
90794c4
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 17, 2020
199670d
Merge branch 'PWA-621' into PWA-622
davemacaulay Jun 17, 2020
10b3b28
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 18, 2020
9da638d
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 18, 2020
a5c01c3
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 18, 2020
598270f
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 18, 2020
c7e05c3
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 18, 2020
1bbbca6
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 18, 2020
bd11567
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 18, 2020
667c822
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jun 18, 2020
1fffe5b
Merge branch 'develop' into PWA-622
davemacaulay Jun 22, 2020
a46dcb4
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 22, 2020
aa66d8f
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 22, 2020
097c694
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jun 22, 2020
bf31cda
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 22, 2020
6eaf2f7
Merge branch 'develop' into PWA-622
davemacaulay Jun 22, 2020
98ec9ca
Merge branch 'PWA-622' of github.com:magento-obsessive-owls/pwa-studi…
anthoula Jun 23, 2020
964a3a7
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 23, 2020
46f1628
Merge branch 'develop' into PWA-622
davemacaulay Jun 23, 2020
bfd2e76
Merge branch 'PWA-622' of github.com:magento-obsessive-owls/pwa-studi…
anthoula Jun 23, 2020
32ff9a1
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jun 23, 2020
a7fe268
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 23, 2020
ac809be
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jun 23, 2020
1ce2851
Merge branch 'PWA-622' of github.com:magento-obsessive-owls/pwa-studi…
anthoula Jun 23, 2020
0e295a9
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 23, 2020
cbf339b
Merge branch 'PWA-622' of github.com:magento-obsessive-owls/pwa-studi…
anthoula Jun 23, 2020
1f332b1
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jun 24, 2020
d95f194
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 24, 2020
cf677aa
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 25, 2020
d6f8c7e
Merge branch 'PWA-622' of github.com:magento-obsessive-owls/pwa-studi…
anthoula Jun 25, 2020
8c6e821
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 26, 2020
474e4ce
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 26, 2020
138623a
PWA-622: Update Venia's button to match the styleguide's button
davemacaulay Jun 26, 2020
3a036f5
Merge branch 'PWA-622' of github.com:magento-obsessive-owls/pwa-studi…
anthoula Jun 26, 2020
60dc26a
Merge branch 'develop' of github.com:magento/pwa-studio into PWA-623
anthoula Jun 26, 2020
a291183
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jun 26, 2020
c935dbe
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jun 26, 2020
5ad7a9a
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jun 26, 2020
ef6a198
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 6, 2020
2c80bef
Merge branch 'develop' of github.com:magento/pwa-studio into PWA-623
anthoula Jul 6, 2020
8f94bf5
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 7, 2020
57e9818
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 7, 2020
fe7ef31
Merge branch 'develop' of github.com:magento/pwa-studio into PWA-623
anthoula Jul 7, 2020
220372d
Merge branch 'develop' of github.com:magento/pwa-studio into PWA-623
anthoula Jul 7, 2020
4b2b561
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 7, 2020
9ef403b
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 7, 2020
d3f87f1
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 7, 2020
94b1713
Merge branch 'develop' of github.com:magento/pwa-studio into PWA-623
anthoula Jul 7, 2020
074eb90
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 7, 2020
b908b16
Merge branch 'develop' of github.com:magento/pwa-studio into PWA-623
anthoula Jul 8, 2020
0a4652c
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 8, 2020
21fc286
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 8, 2020
9702b84
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 8, 2020
80456ea
Merge branch 'develop' of github.com:magento/pwa-studio into PWA-623
anthoula Jul 8, 2020
9d0849a
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 8, 2020
8c87b90
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 8, 2020
dff6f12
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 9, 2020
e8d5cbc
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 9, 2020
91099cc
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 9, 2020
4bae472
Merge branch 'develop' of github.com:magento/pwa-studio into PWA-623
anthoula Jul 9, 2020
daea614
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 13, 2020
197ba3a
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 13, 2020
1e60f71
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 13, 2020
0768e67
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 13, 2020
c869293
Merge branch 'develop' of github.com:magento/pwa-studio into PWA-623
anthoula Jul 13, 2020
da7c414
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 13, 2020
351a7f6
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 13, 2020
c87e0ae
PWA-623: Update Venia's inputs to match the styleguide's inputs
anthoula Jul 13, 2020
fd1660b
Update packages/venia-ui/lib/components/TextInput/textInput.js
anthoula Jul 14, 2020
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
Prev Previous commit
Next Next commit
PWA-623: Update Venia's inputs to match the styleguide's inputs
- update checkbox styles
  • Loading branch information
anthoula committed Jun 23, 2020
commit ac809be9822875c6796bef9d9244c8927d17c6b8
71 changes: 35 additions & 36 deletions packages/venia-ui/lib/components/Checkbox/checkbox.css
Original file line number Diff line number Diff line change
@@ -1,55 +1,54 @@
.root {
--stroke: var(--venia-global-color-gray-600);
align-items: center;
color: rgb(var(--venia-global-color-text));
display: inline-grid;
font-size: 1rem;
font-weight: 400;
gap: 0.5rem;
color: rgb(var(--venia-global-color-gray-900));
display: grid;
gap: 0.75rem;
grid-auto-flow: column;
grid-template-columns: auto;
grid-template-areas: 'input label';
grid-template-columns: min-content 1fr;
justify-items: center;
margin: 0.5rem;
vertical-align: top;
line-height: 1.5rem;
}

.input {
-webkit-appearance: none;
background: none;
border: 2px solid transparent;
border-radius: 4px;
cursor: pointer;
grid-area: input;
height: 1.5rem;
width: 1.5rem;
}

.icon {
align-items: center;
display: inline-flex;
grid-column: 1 / span 1;
grid-row: 1 / span 1;
height: 1.25rem;
justify-content: center;
grid-area: input;
height: 1.5rem;
pointer-events: none;
width: 1.25rem;
width: 1.5rem;
}

.input {
background: none;
border: 1px solid rgb(var(--venia-global-color-text));
border-radius: 2px;
cursor: pointer;
display: inline-flex;
grid-column: 1 / span 1;
grid-row: 1 / span 1;
height: 1.25rem;
margin: 0;
width: 1.25rem;
-webkit-appearance: none;
.icon svg {
stroke: rgb(var(--stroke));
}

.label {
font-size: var(--venia-typography-body-S-fontSize);
grid-area: label;
justify-self: start;
}

.input:disabled {
cursor: default;
}

.input:focus {
border-color: rgb(var(--venia-global-color-teal));
box-shadow: 0 0 0 2px rgb(var(--venia-global-color-teal-light)),
0 0 0.5rem 2px rgb(var(--venia-global-color-teal) / 0.2);
outline: none;
.input:checked + .icon {
--stroke: var(--venia-brand-color-1-700);
}

.label {
font-size: 1rem;
grid-column: 2 / span 1;
grid-row: 1 / span 1;
.input:active,
.input:focus {
box-shadow: -3px 3px rgb(var(--venia-brand-color-1-900));
outline: none;
}
11 changes: 6 additions & 5 deletions packages/venia-ui/lib/components/Checkbox/checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ import { compose } from 'redux';

import classify from '../../classify';
import { Message } from '../Field';
import Icon from '../Icon';
import { Check as CheckIcon } from 'react-feather';
import { CheckSquare, Square } from 'react-feather';
import defaultClasses from './checkbox.css';

/* TODO: change lint config to use `label-has-associated-control` */
/* eslint-disable jsx-a11y/label-has-for */

const checkedIcon = <CheckSquare />;
const uncheckedIcon = <Square />;

export class Checkbox extends Component {
static propTypes = {
classes: shape({
Expand All @@ -33,6 +35,7 @@ export class Checkbox extends Component {
render() {
const { classes, fieldState, id, label, message, ...rest } = this.props;
const { value: checked } = fieldState;
const icon = checked ? checkedIcon : uncheckedIcon;

return (
<Fragment>
Expand All @@ -43,9 +46,7 @@ export class Checkbox extends Component {
fieldState={fieldState}
id={id}
/>
<span className={classes.icon}>
{checked && <Icon src={CheckIcon} size={18} />}
</span>
<span className={classes.icon}>{icon}</span>
<span className={classes.label}>{label}</span>
</label>
<Message fieldState={fieldState}>{message}</Message>
Expand Down