Skip to content

Commit af838b1

Browse files
author
Alyssa
committed
fix(checkbox): integrate new icons
n
2 parents 5084d10 + f0e9146 commit af838b1

23 files changed

+561
-1093
lines changed

CHANGELOG.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,68 @@
1+
# [0.5.0](https://github.com/zepdev/zeppelin-element-library/compare/v0.4.5...v0.5.0) (2019-04-16)
2+
3+
4+
### Bug Fixes
5+
6+
* **icons:** uncomment out file to all fonts to be bundled ([977fa65](https://github.com/zepdev/zeppelin-element-library/commit/977fa65))
7+
8+
9+
### Features
10+
11+
* **grid:** started grid, added breakpoints ([d844f1a](https://github.com/zepdev/zeppelin-element-library/commit/d844f1a))
12+
* **theme:** allows for new themes, zeppelin, cat and rental ([4bb94bb](https://github.com/zepdev/zeppelin-element-library/commit/4bb94bb))
13+
14+
## [0.4.5](https://github.com/zepdev/zeppelin-element-library/compare/v0.4.4...v0.4.5) (2019-04-12)
15+
16+
17+
### Bug Fixes
18+
19+
* **bundler:** remove double zepicon naming ([b763376](https://github.com/zepdev/zeppelin-element-library/commit/b763376))
20+
21+
## [0.4.4](https://github.com/zepdev/zeppelin-element-library/compare/v0.4.3...v0.4.4) (2019-04-12)
22+
23+
24+
### Bug Fixes
25+
26+
* **a11y:** added sr-only for icons ([2d1a58f](https://github.com/zepdev/zeppelin-element-library/commit/2d1a58f))
27+
* **rename icons for build:** rename icons for build ([15893ac](https://github.com/zepdev/zeppelin-element-library/commit/15893ac))
28+
29+
## [0.4.3](https://github.com/zepdev/zeppelin-element-library/compare/v0.4.2...v0.4.3) (2019-04-12)
30+
31+
32+
### Bug Fixes
33+
34+
* **bundler:** changed icon naming ([b0ecf3e](https://github.com/zepdev/zeppelin-element-library/commit/b0ecf3e))
35+
* **bundler:** fix icon naming in bundler ([05d14e7](https://github.com/zepdev/zeppelin-element-library/commit/05d14e7))
36+
* **icons:** new icons svg for development use ([1328bfb](https://github.com/zepdev/zeppelin-element-library/commit/1328bfb))
37+
38+
## [0.4.2](https://github.com/zepdev/zeppelin-element-library/compare/v0.4.1...v0.4.2) (2019-04-12)
39+
40+
41+
### Bug Fixes
42+
43+
* **icons:** add back in icons ([7d2302e](https://github.com/zepdev/zeppelin-element-library/commit/7d2302e))
44+
45+
## [0.4.1](https://github.com/zepdev/zeppelin-element-library/compare/v0.4.0...v0.4.1) (2019-04-11)
46+
47+
48+
### Bug Fixes
49+
50+
* **npm:** Updated to react-scripts to minimum dependency ([1311e73](https://github.com/zepdev/zeppelin-element-library/commit/1311e73))
51+
52+
# [0.4.0](https://github.com/zepdev/zeppelin-element-library/compare/v0.3.6...v0.4.0) (2019-04-10)
53+
54+
55+
### Bug Fixes
56+
57+
* **bundle-script:** Removed shell hash removal ([198962c](https://github.com/zepdev/zeppelin-element-library/commit/198962c))
58+
* **Circle:** Added missing filters to the other jobs ([2d82fa0](https://github.com/zepdev/zeppelin-element-library/commit/2d82fa0))
59+
* **Circle:** Added tags filter because of transient dependency ([3dfba30](https://github.com/zepdev/zeppelin-element-library/commit/3dfba30))
60+
61+
62+
### Features
63+
64+
* **tag:** new element added: tag ([3e52fd4](https://github.com/zepdev/zeppelin-element-library/commit/3e52fd4))
65+
166
## [0.3.6](https://github.com/zepdev/zeppelin-element-library/compare/v0.3.5...v0.3.6) (2019-04-10)
267

368

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zeppelin-element-library",
3-
"version": "0.3.6",
3+
"version": "0.5.0",
44
"description": "Zeppelin Elements Library is an element library for digital Zeppelin products.",
55
"main": "bundle/zeppelin-element-library.cjs.js",
66
"module": "bundle/zeppelin-element-library.esm.js",

src/App.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ import elements from './elements/elements';
33
import ButtonPage from './elements/button/ButtonPage.jsx';
44
import TagPage from './elements/tag/TagPage.jsx';
55
import CheckboxPage from './elements/checkbox/CheckboxPage.jsx';
6+
import InputPage from './elements/input/InputPage.jsx';
7+
import NumberInputPage from './elements/numberinput/NumberInputPage.jsx';
68
import './base_bundle_entry.scss';
7-
import './zeppelin-element-library.css';
8-
// import './icons.font';
9+
import './icons.font';
10+
/* TODO: remove this import, the css itself and the icont font files,
11+
after the files are extracted in a separate repo/npm package */
12+
import './zeppelin-icons.css';
913

1014
function App() {
1115
const [content, setContent] = useState('welcome');
@@ -57,7 +61,8 @@ function App() {
5761
{content === 'tabs' && <p>This element is not ready</p>}
5862
{content === 'tag' && <TagPage />}
5963
{content === 'checkbox' && <CheckboxPage />}
60-
<CheckboxPage />
64+
{content === 'input' && <InputPage />}
65+
{content === 'numberInput' && <NumberInputPage />}
6166
</div>
6267
</div>
6368
</div>

src/assets/fonts/zepicons.eot

12 Bytes
Binary file not shown.

src/assets/fonts/zepicons.svg

Lines changed: 43 additions & 40 deletions
Loading

src/assets/fonts/zepicons.ttf

12 Bytes
Binary file not shown.

src/assets/fonts/zepicons.woff

24 Bytes
Binary file not shown.

src/assets/fonts/zepicons.woff2

44 Bytes
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Loading

src/base_bundle_entry.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ $include-typography: true !default;
2828
@import './elements/button/button';
2929
@import './elements/tag/tag';
3030
@import './elements/checkbox/checkbox';
31+
@import './elements/input/input';

src/elements/button/_button.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@
6565
cursor: not-allowed;
6666
}
6767

68+
&.#{$prefix}button--number-input {
69+
background-color: get('colors.gray.grayLighter.hex');
70+
padding: 0;
71+
width: 3rem;
72+
height: 3rem;
73+
font-size: 1.375rem;
74+
line-height: 1;
75+
}
76+
6877
.#{$prefix}button--full {
6978
display: block;
7079
width: 100%;

src/elements/checkbox/_checkbox.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
display: inline-block;
6060
background: get('colors.gray.white.hex');
6161
line-height: $boxSize + $borderWidth;
62-
font-size: 18px;
62+
font-size: 1.125rem;
6363
text-align: center;
6464
transform: scale(1);
6565
@include themify($themes) {

src/elements/elements.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ module.exports = {
1212
isReady: true
1313
},
1414
checkbox: {
15-
name: 'checkbox',
15+
name: 'checkbox'
16+
},
17+
input: {
18+
name: 'input',
19+
isReady: true
20+
},
21+
numberInput: {
22+
name: 'numberInput',
1623
isReady: true
1724
}
1825
};

src/elements/input/InputPage.jsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from 'react';
2+
3+
function Input() {
4+
return (
5+
<>
6+
<input type="text" className="zep-input" defaultValue="Type Something" />
7+
</>
8+
);
9+
}
10+
11+
export default Input;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
3+
import InputPage from '../InputPage.jsx';
4+
5+
it('renders without crashing', () => {
6+
const div = document.createElement('div');
7+
ReactDOM.render(<InputPage />, div);
8+
});

src/elements/input/_input.scss

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
//Tag - base style
2+
3+
@mixin input {
4+
.#{$prefix}input {
5+
@extend %typo-normal-3;
6+
border: solid 2px get('colors.gray.grayLighter.hex');
7+
background-color: get('colors.gray.white.hex');
8+
padding-left: 1.25rem;
9+
padding-top: 0.25rem;
10+
11+
&:focus {
12+
outline: 2px solid get('colors.primary.catYellow.hex');
13+
}
14+
}
15+
16+
.#{$prefix}input--number {
17+
width: 3rem;
18+
height: 3rem;
19+
margin-left: 0.125rem;
20+
margin-right: 0.125rem;
21+
text-align: center;
22+
padding-left: 0;
23+
}
24+
25+
.#{$prefix}input__icon--number {
26+
width: 1.375rem;
27+
height: 1.375rem;
28+
cursor: pointer;
29+
}
30+
}
31+
32+
@include exports('input') {
33+
@include input;
34+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from 'react';
2+
3+
function NumberInput() {
4+
return (
5+
<>
6+
<button className="zep-button zep-button--number-input">
7+
<span className="zepicons zepicons-minus" />
8+
</button>
9+
<input
10+
type="text"
11+
className="zep-input zep-input--number"
12+
defaultValue="1"
13+
/>
14+
<button className="zep-button zep-button--number-input">
15+
<span className="zepicons zepicons-plus" />
16+
</button>
17+
</>
18+
);
19+
}
20+
21+
export default NumberInput;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
3+
import NumberInputPage from '../NumberInputPage.jsx';
4+
5+
it('renders without crashing', () => {
6+
const div = document.createElement('div');
7+
ReactDOM.render(<NumberInputPage />, div);
8+
});

src/elements/tag/TagPage.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import React from 'react';
2-
import closeIcon from '../../assets/icons/zepicons-close.svg';
32

43
function Tag() {
54
return (
65
<>
76
<span role="button" className="zep-tag">
87
Tag
9-
<img src={closeIcon} alt="close" />
8+
<i className="zepicons zepicons-close" />
109
</span>
1110
</>
1211
);

src/elements/tag/_tag.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
&:hover,
1212
&:focus,
1313
&.#{$prefix}tag--hover {
14-
background-color: get('colors.secondary.catYellowLighter.hex');
14+
background-color: get('colors.secondary.catYellowLightest.hex');
1515
}
1616
img,
1717
i,

src/style-basics/_globals.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ a {
4242
}
4343
}
4444

45-
[aria-hidden='true'],
46-
[hidden] {
47-
display: none;
48-
}
49-
5045
.sr-only {
5146
position: absolute;
5247
width: 1px;

0 commit comments

Comments
 (0)