Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Sep 7, 2022
1 parent 69e7fed commit c581d94
Show file tree
Hide file tree
Showing 45 changed files with 155 additions and 129 deletions.
32 changes: 16 additions & 16 deletions components/doc/rating/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,18 @@ export class RatingDemo extends Component {
value={this.state.val3}
onChange={(e) => this.setState({ val3: e.value })}
cancelIcon={
<img src={\`images/rating/cancel.png\`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-cancel-image" width="20px" height="20px" />
<img src={\`images/rating/cancel.png\`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-cancel-image" width="25px" height="25px" />
}
onIcon={
<img
src={\`images/rating/custom-icon-active.png\`}
onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')}
alt="custom-image-active"
width="20px"
height="20px"
width="25px"
height="25px"
/>
}
offIcon={<img src={\`images/rating/custom-icon.png\`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-image" width="20px" height="20px" />}
offIcon={<img src={\`images/rating/custom-icon.png\`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-image" width="25px" height="25px" />}
/>
</div>
</div>
Expand Down Expand Up @@ -97,18 +97,18 @@ const RatingDemo = () => {
value={val3}
onChange={(e) => setVal3(e.value)}
cancelIcon={
<img src={\`images/rating/cancel.png\`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-cancel-image" width="20px" height="20px" />
<img src={\`images/rating/cancel.png\`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-cancel-image" width="25px" height="25px" />
}
onIcon={
<img
src={\`images/rating/custom-icon-active.png\`}
onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')}
alt="custom-image-active"
width="20px"
height="20px"
width="25px"
height="25px"
/>
}
offIcon={<img src={\`images/rating/custom-icon.png\`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-image" width="20px" height="20px" />}
offIcon={<img src={\`images/rating/custom-icon.png\`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-image" width="25px" height="25px" />}
/>
</div>
</div>
Expand Down Expand Up @@ -147,18 +147,18 @@ const RatingDemo = () => {
value={val3}
onChange={(e) => setVal3(e.value)}
cancelIcon={
<img src={\`images/rating/cancel.png\`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-cancel-image" width="20px" height="20px" />
<img src={\`images/rating/cancel.png\`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-cancel-image" width="25px" height="25px" />
}
onIcon={
<img
src={\`images/rating/custom-icon-active.png\`}
onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')}
alt="custom-image-active"
width="20px"
height="20px"
width="25px"
height="25px"
/>
}
offIcon={<img src={\`images/rating/custom-icon.png\`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-image" width="20px" height="20px" />}
offIcon={<img src={\`images/rating/custom-icon.png\`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-image" width="25px" height="25px" />}
/>
</div>
</div>
Expand Down Expand Up @@ -200,18 +200,18 @@ const RatingDemo = () => {
value={val3}
onChange={(e) => setVal3(e.value)}
cancelIcon={
<img src={\`images/rating/cancel.png\`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-cancel-image" width="20px" height="20px" />
<img src={\`images/rating/cancel.png\`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-cancel-image" width="25px" height="25px" />
}
onIcon={
<img
src={\`images/rating/custom-icon-active.png\`}
onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')}
alt="custom-image-active"
width="20px"
height="20px"
width="25px"
height="25px"
/>
}
offIcon={<img src={\`images/rating/custom-icon.png\`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-image" width="20px" height="20px" />}
offIcon={<img src={\`images/rating/custom-icon.png\`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-image" width="25px" height="25px" />}
/>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/lib/rating/Rating.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
}

.p-rating-item {
display: flex;
display: inline-flex;
align-items: center;
cursor: pointer;
}
Expand Down
8 changes: 4 additions & 4 deletions pages/rating/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,18 @@ const RatingDemo = () => {
value={val3}
onChange={(e) => setVal3(e.value)}
cancelIcon={
<img src={`${contextPath}/images/rating/cancel.png`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-cancel-image" width="20px" height="20px" />
<img src={`${contextPath}/images/rating/cancel.png`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-cancel-image" width="25px" height="25px" />
}
onIcon={
<img
src={`${contextPath}/images/rating/custom-icon-active.png`}
onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')}
alt="custom-image-active"
width="20px"
height="20px"
width="25px"
height="25px"
/>
}
offIcon={<img src={`${contextPath}/images/rating/custom-icon.png`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-image" width="20px" height="20px" />}
offIcon={<img src={`${contextPath}/images/rating/custom-icon.png`} onError={(e) => (e.target.src = 'https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png')} alt="custom-image" width="25px" height="25px" />}
/>
</div>
</div>
Expand Down
5 changes: 3 additions & 2 deletions public/themes/arya-blue/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,7 @@
}

.p-rating {
gap: 0.25rem;
gap: 0.5rem;
}
.p-rating .p-rating-item .p-rating-icon {
color: rgba(255, 255, 255, 0.87);
Expand Down Expand Up @@ -2763,7 +2763,8 @@
background: #1e1e1e;
}
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot {
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot, .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
background-color: #1e1e1e;
}
.p-datatable .p-datatable-loading-icon {
Expand Down
5 changes: 3 additions & 2 deletions public/themes/arya-green/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,7 @@
}

.p-rating {
gap: 0.25rem;
gap: 0.5rem;
}
.p-rating .p-rating-item .p-rating-icon {
color: rgba(255, 255, 255, 0.87);
Expand Down Expand Up @@ -2763,7 +2763,8 @@
background: #1e1e1e;
}
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot {
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot, .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
background-color: #1e1e1e;
}
.p-datatable .p-datatable-loading-icon {
Expand Down
5 changes: 3 additions & 2 deletions public/themes/arya-orange/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,7 @@
}

.p-rating {
gap: 0.25rem;
gap: 0.5rem;
}
.p-rating .p-rating-item .p-rating-icon {
color: rgba(255, 255, 255, 0.87);
Expand Down Expand Up @@ -2763,7 +2763,8 @@
background: #1e1e1e;
}
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot {
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot, .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
background-color: #1e1e1e;
}
.p-datatable .p-datatable-loading-icon {
Expand Down
5 changes: 3 additions & 2 deletions public/themes/arya-purple/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,7 @@
}

.p-rating {
gap: 0.25rem;
gap: 0.5rem;
}
.p-rating .p-rating-item .p-rating-icon {
color: rgba(255, 255, 255, 0.87);
Expand Down Expand Up @@ -2763,7 +2763,8 @@
background: #1e1e1e;
}
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot {
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot, .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
background-color: #1e1e1e;
}
.p-datatable .p-datatable-loading-icon {
Expand Down
5 changes: 3 additions & 2 deletions public/themes/bootstrap4-dark-blue/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@
}

.p-rating {
gap: 0.25rem;
gap: 0.5rem;
}
.p-rating .p-rating-item .p-rating-icon {
color: rgba(255, 255, 255, 0.87);
Expand Down Expand Up @@ -2775,7 +2775,8 @@
background: #2a323d;
}
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot {
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot, .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
background-color: #2a323d;
}
.p-datatable .p-datatable-loading-icon {
Expand Down
5 changes: 3 additions & 2 deletions public/themes/bootstrap4-dark-purple/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@
}

.p-rating {
gap: 0.25rem;
gap: 0.5rem;
}
.p-rating .p-rating-item .p-rating-icon {
color: rgba(255, 255, 255, 0.87);
Expand Down Expand Up @@ -2775,7 +2775,8 @@
background: #2a323d;
}
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot {
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot, .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
background-color: #2a323d;
}
.p-datatable .p-datatable-loading-icon {
Expand Down
5 changes: 3 additions & 2 deletions public/themes/bootstrap4-light-blue/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@
}

.p-rating {
gap: 0.25rem;
gap: 0.5rem;
}
.p-rating .p-rating-item .p-rating-icon {
color: #495057;
Expand Down Expand Up @@ -2775,7 +2775,8 @@
background: #efefef;
}
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot {
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot, .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
background-color: #ffffff;
}
.p-datatable .p-datatable-loading-icon {
Expand Down
5 changes: 3 additions & 2 deletions public/themes/bootstrap4-light-purple/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@
}

.p-rating {
gap: 0.25rem;
gap: 0.5rem;
}
.p-rating .p-rating-item .p-rating-icon {
color: #495057;
Expand Down Expand Up @@ -2775,7 +2775,8 @@
background: #efefef;
}
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot {
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot, .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
background-color: #ffffff;
}
.p-datatable .p-datatable-loading-icon {
Expand Down
5 changes: 3 additions & 2 deletions public/themes/fluent-light/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,7 @@
}

.p-rating {
gap: 0.25rem;
gap: 0.5rem;
}
.p-rating .p-rating-item .p-rating-icon {
color: #323130;
Expand Down Expand Up @@ -2763,7 +2763,8 @@
background: #faf9f8;
}
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot {
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot, .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
background-color: #ffffff;
}
.p-datatable .p-datatable-loading-icon {
Expand Down
5 changes: 3 additions & 2 deletions public/themes/lara-dark-blue/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,7 @@
}

.p-rating {
gap: 0.25rem;
gap: 0.5rem;
}
.p-rating .p-rating-item .p-rating-icon {
color: rgba(255, 255, 255, 0.87);
Expand Down Expand Up @@ -2763,7 +2763,8 @@
background: #071426;
}
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot {
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot, .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
background-color: #071426;
}
.p-datatable .p-datatable-loading-icon {
Expand Down
5 changes: 3 additions & 2 deletions public/themes/lara-dark-indigo/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,7 @@
}

.p-rating {
gap: 0.25rem;
gap: 0.5rem;
}
.p-rating .p-rating-item .p-rating-icon {
color: rgba(255, 255, 255, 0.87);
Expand Down Expand Up @@ -2763,7 +2763,8 @@
background: #071426;
}
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot {
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot, .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
background-color: #071426;
}
.p-datatable .p-datatable-loading-icon {
Expand Down
5 changes: 3 additions & 2 deletions public/themes/lara-dark-purple/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,7 @@
}

.p-rating {
gap: 0.25rem;
gap: 0.5rem;
}
.p-rating .p-rating-item .p-rating-icon {
color: rgba(255, 255, 255, 0.87);
Expand Down Expand Up @@ -2763,7 +2763,8 @@
background: #071426;
}
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot {
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot, .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
background-color: #071426;
}
.p-datatable .p-datatable-loading-icon {
Expand Down
5 changes: 3 additions & 2 deletions public/themes/lara-dark-teal/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,7 @@
}

.p-rating {
gap: 0.25rem;
gap: 0.5rem;
}
.p-rating .p-rating-item .p-rating-icon {
color: rgba(255, 255, 255, 0.87);
Expand Down Expand Up @@ -2763,7 +2763,8 @@
background: #071426;
}
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot {
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-datatable-table > .p-datatable-tfoot, .p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-thead,
.p-datatable.p-datatable-scrollable > .p-datatable-wrapper > .p-virtualscroller > .p-datatable-table > .p-datatable-tfoot {
background-color: #071426;
}
.p-datatable .p-datatable-loading-icon {
Expand Down
Loading

0 comments on commit c581d94

Please sign in to comment.