Skip to content

Commit 8ecf603

Browse files
authored
fix(package): Minor improvements on component design and user accessibility
2 parents 00a5f2f + 2d22280 commit 8ecf603

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+20012
-733
lines changed

doc/.env.development

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
HOMEPAGE_ROOT_URL_PREFIX='/'

doc/.env.production

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
HOMEPAGE_ROOT_URL_PREFIX='/react-lite-ui/'

doc/gatsby-browser.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
// You can delete this file if you're not using it
88
exports.onPreRouteUpdate = ({ location }) => {
99
if (window && typeof window.gtag === 'function') {
10-
window.gtag('config', 'UA-41862404-1', { page_path: location.pathname });
10+
if (location.href.indexOf('?') >= 0) {
11+
const component = location.search.substring(1).split('=')[1];
12+
window.gtag('config', 'UA-41862404-1', { page_path: `${location.pathname}/${component}` });
13+
} else {
14+
window.gtag('config', 'UA-41862404-1', { page_path: location.pathname });
15+
}
1116
}
1217
};

doc/gatsby-config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
require('dotenv').config({
2+
path: `.env.${process.env.NODE_ENV}`,
3+
});
4+
15
module.exports = {
26
pathPrefix: '/react-lite-ui',
37
siteMetadata: {

doc/package-lock.json

Lines changed: 14282 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"scripts": {
2424
"build": "gatsby build --prefix-paths",
2525
"develop": "gatsby develop",
26-
"serve": "rm -rf ./cache && rm -rf ./public && gatsby build && gatsby serve",
26+
"serve": "rm -rf ./cache && rm -rf ./public && gatsby build --prefix-paths && gatsby serve",
2727
"format": "prettier --write '**/*.js'",
2828
"test": "echo \"Error: no test specified\" && exit 1"
2929
},

doc/src/components/common/componentData/Carousel/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ export const componentData = {
3333
type: 'Boolean',
3434
defaultValue: 'true',
3535
description: 'Set boolean for showing / hiding left and right controls.',
36+
},
37+
{
38+
prop: 'pauseOnHover',
39+
type: 'Boolean',
40+
defaultValue: 'true',
41+
description: 'Set boolean to pause the carousel animation on mouse hover.',
3642
}
3743
],
3844
themesData: [

doc/src/components/common/componentData/Checkbox/theme.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
}
44

55
:local(.checkbox) {
6-
border-color: #6b76ff;
6+
border-color: #8b104e;
77
.check-item {
8-
border-color: #6b76ff !important;
8+
border-color: #8b104e !important;
99
}
1010
}
1111

1212

1313
:local(.inverted) {
14-
background-color: #0b409c !important;
14+
background-color: #8b104e !important;
1515
.check-item {
16-
border-color: #f18a9b !important;
16+
border-color: #fefefe !important;
1717
}
1818
}

doc/src/components/common/componentData/Navbar/index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,6 @@ export const componentData = {
145145
146146
render() {
147147
148-
const MenuIcon = () => (
149-
<svg xmlns="http://www.w3.org/2000/svg" height="30px" id="Layer_1" version="1.1" viewBox="0 0 30 30" width="30px"><path d="M4,10h24c1.104,0,2-0.896,2-2s-0.896-2-2-2H4C2.896,6,2,6.896,2,8S2.896,10,4,10z M28,14H4c-1.104,0-2,0.896-2,2 s0.896,2,2,2h24c1.104,0,2-0.896,2-2S29.104,14,28,14z M28,22H4c-1.104,0-2,0.896-2,2s0.896,2,2,2h24c1.104,0,2-0.896,2-2 S29.104,22,28,22z"/></svg>
150-
);
151-
152148
return (
153149
<div>
154150
<PreviewBlock header="Default Navbar">
@@ -160,7 +156,7 @@ export const componentData = {
160156
<PreviewBlock header="Navbar with leftIcon">
161157
162158
{/* Navbar with icon on left set with leftIcon prop */}
163-
<Navbar leftIcon={<MenuIcon />} title="logo" />
159+
<Navbar leftIcon={match} title="logo" />
164160
165161
</PreviewBlock>
166162
<PreviewBlock header="Flat Navbar (No box shadow)">

doc/src/components/common/componentData/Pagination/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ export const componentData = {
7878
name: 'dots',
7979
description: 'Class used for displaying dots between ends and current portion.',
8080
},
81+
{
82+
name: 'withNavigation',
83+
description: 'Class used for controlling width of component when navigation buttons are present.',
84+
},
85+
{
86+
name: 'noNavigation',
87+
description: 'Class used for controlling width of component when navigation buttons are not present.',
88+
},
8189
],
8290
basicComponent: `
8391
<Pagination total={10}/>

0 commit comments

Comments
 (0)