Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-bar-rating

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-bar-rating - npm Package Compare versions

Comparing version 0.9.0 to 1.0.0

themes/br-bootstrap-theme.css

10

CHANGELOG.md
# Changelog
## 0.5.0
## 1.0.0
- feat(workflow): Compile themes sass to css for production
- include themes folder in dist
- improve movie rating styles, remove padding
## 0.9.0
- First release

3

package.json
{
"name": "ngx-bar-rating",
"version": "0.9.0",
"version": "1.0.0",
"description": "Angular Bar Rating",

@@ -8,2 +8,3 @@ "keywords": [

"rating",
"angular4",
"angular2",

@@ -10,0 +11,0 @@ "angular",

<p align="center">
<img height="150px" width="150px" style="text-align: center;" src="https://cdn.rawgit.com/MurhafSousli/ngx-bar-rating/master/assets/logo.svg">
<img height="150px" width="150px" style="text-align: center;" src="https://cdn.rawgit.com/MurhafSousli/ngx-bar-rating/af32c04d/assets/logo.svg">
<h1 align="center">Angular Bar Rating</h1>
<p align="center">Minimal, light-weight Angular ratings.</p>
</p>
[![npm](https://img.shields.io/badge/demo-online-ed1c46.svg)](https://murhafsousli.github.io/ngx-bar-rating)
[![npm](https://img.shields.io/npm/v/ngx-bar-rating.svg)](https://github.com/MurhafSousli/ngx-bar-rating)
[![npm](https://img.shields.io/npm/v/ngx-bar-rating.svg)](https://www.npmjs.com/package/ngx-bar-rating)
[![Build Status](https://travis-ci.org/MurhafSousli/ngx-bar-rating.svg)](https://travis-ci.org/MurhafSousli/ngx-bar-rating)
[![npm](https://img.shields.io/npm/l/express.svg?maxAge=2592000)](/LICENSE)
___
## Table of Contents

@@ -18,3 +21,3 @@

- [Themes](#themes)
- [Custom Style](#styling)
- [Issues](#issues)
- [Author](#author)

@@ -70,7 +73,7 @@

- **[rate]**: Current rating. Can be a decimal value like 3.14, default `undefined`
- **[rate]**: Current rating. Can be a decimal value like 3.14, default `undefined`.
- **[max]**: Maximal rating that can be given using this widget.
- **[max]**: Maximal rating that can be given using this widget, default `5`
- **[readOnly]**: A flag indicating if rating can be updated.
- **[readOnly]**: A flag indicating if rating can be updated, default `false`

@@ -83,3 +86,3 @@ - **[theme]**: Theme class. default `default`, see available [themes](#themes).

- **[required]**: A flag indicating if rating is required for form validation., default `false`.
- **[required]**: A flag indicating if rating is required for form validation. default `false`.

@@ -89,8 +92,11 @@ - **[disabled]**: A flag indicating if rating is disabled. works only with forms, default `false`.

- **(rateChange)**: An event fired when a user selects a new rating.
*Event's payload equals to the newly selected rating.*
- **(hover)**: An event fired when a user is hovering over a given rating.
*Event's payload equals to the rating being hovered over.*
- **(leave)**: An event fired when a user stops hovering over a given rating.
*Event's payload equals to the rating of the last item being hovered over.*

@@ -102,3 +108,4 @@

```html
<bar-rating [(rate)]="rate" [max]="4" [theme]="'movie'" [titles]="['Bad', 'Mediocre' , 'Good', 'Awesome']"></bar-rating>
<bar-rating [(rate)]="rate" [max]="4" [theme]="'movie'" [showText]="true"
[titles]="['Bad', 'Mediocre' , 'Good', 'Awesome']"></bar-rating>
```

@@ -122,86 +129,36 @@

- pure css stars (default)
```css
@import '~ngx-bar-rating/themes/br-default-theme';
```
- bootstrap stars
```css
@import '~ngx-bar-rating/themes/br-bootstrap-theme';
```
- fontawesome stars
```css
@import '~ngx-bar-rating/themes/br-fontawesome-theme';
```
- fontawesome-o stars
```css
@import '~ngx-bar-rating/themes/br-fontawesome-o-theme';
```
- horizontal bars
```css
@import '~ngx-bar-rating/themes/br-horizontal-theme';
```
- vertical bars
```css
@import '~ngx-bar-rating/themes/br-vertical-theme';
```
- custom svg stars
```css
@import '~ngx-bar-rating/themes/br-custom-stars-theme';
```
- movie rating
```css
@import '~ngx-bar-rating/themes/br-movie-theme';
```
- square rating
```css
@import '~ngx-bar-rating/themes/br-square-theme';
```
// Pure css stars (default)
@import '~ngx-bar-rating/themes/br-default-theme.css';
<a name="styling"/>
// Bootstrap stars
@import '~ngx-bar-rating/themes/br-bootstrap-theme.css';
## Custom Style
// Fontawesome stars
@import '~ngx-bar-rating/themes/br-fontawesome-theme.css';
You can extend or create your own theme using these classes
// Fontawesome-o stars
@import '~ngx-bar-rating/themes/br-fontawesome-o-theme.css';
```scss
.br {
// Horizontal bars
@import '~ngx-bar-rating/themes/br-horizontal-theme.css';
// rating wrapper
// Vertical bars
@import '~ngx-bar-rating/themes/br-vertical-theme.css';
.br-units {
// Custom svg stars
@import '~ngx-bar-rating/themes/br-custom-stars-theme.css';
// units container
}
// Movie rating
@import '~ngx-bar-rating/themes/br-movie-theme.css';
.br-unit {
// Square rating
@import '~ngx-bar-rating/themes/br-square-theme.css';
```
// units (stars)
Rating style can be easily customized, check the classes used in any theme and add your own css.
&.br-active{
// hovered units (stars)
}
&.br-selected {
// selected units (stars)
}
}
&.br-readonly {
.br-active, .br-selected {
// selected or active in read
}
}
.br-text {
// Rate text
}
}
```
You can also do the same for forms classes such as `untouched, touched, dirty, invalid, valid ...etc`
*If you have a nice rating style you would like to share, propuse your theme and I will include it in the package.*
*If you have a nice rating style you would like to share, prupose your theme and I will include it in the package.*

@@ -208,0 +165,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc