@startupjs-ui/rating 0.1.13 → 0.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.mdx +12 -3
  3. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.1.19](https://github.com/startupjs/startupjs-ui/compare/v0.1.18...v0.1.19) (2026-03-17)
7
+
8
+ **Note:** Version bump only for package @startupjs-ui/rating
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.1.16](https://github.com/startupjs/startupjs-ui/compare/v0.1.15...v0.1.16) (2026-02-10)
15
+
16
+ **Note:** Version bump only for package @startupjs-ui/rating
17
+
18
+
19
+
20
+
21
+
6
22
  ## [0.1.13](https://github.com/startupjs/startupjs-ui/compare/v0.1.12...v0.1.13) (2026-02-03)
7
23
 
8
24
  **Note:** Version bump only for package @startupjs-ui/rating
package/README.mdx CHANGED
@@ -4,7 +4,7 @@ import { Sandbox } from '@startupjs-ui/docs'
4
4
 
5
5
  # Rating
6
6
 
7
- Rating provides an ability for user to leave his opinion and view opinion of other users of a service or a product.
7
+ Rating displays a five-star rating and lets users select a value by tapping on stars.
8
8
 
9
9
  ```js
10
10
  import { Rating } from 'startupjs-ui'
@@ -12,7 +12,7 @@ import { Rating } from 'startupjs-ui'
12
12
 
13
13
  ## Simple example
14
14
 
15
- Rating component provides five-star rating system. The `value` prop gets rounded to the nearest integer.
15
+ The `value` prop sets the current rating. It is rounded to the nearest integer when displayed as stars.
16
16
 
17
17
  ```jsx example
18
18
  return (
@@ -22,6 +22,8 @@ return (
22
22
 
23
23
  ## Controlled
24
24
 
25
+ Use `value` and `onChange` together to create a controlled rating input.
26
+
25
27
  ```jsx example
26
28
  const [rated, setRated] = useState(0)
27
29
  return (
@@ -34,7 +36,7 @@ return (
34
36
 
35
37
  ## Read only
36
38
 
37
- The `readonly` prop prevents the user from changing the value of the rating and display the it in compact view (`false` by default).
39
+ Set `readonly` to `true` to prevent user interaction and display the rating in a compact view with a single star and the numeric value.
38
40
 
39
41
  ```jsx example
40
42
  return(
@@ -42,6 +44,13 @@ return(
42
44
  )
43
45
  ```
44
46
 
47
+ ## Props
48
+
49
+ - **value** -- the current rating value (default `0`)
50
+ - **onChange** -- called with the new value when the user taps a star
51
+ - **readonly** -- disables interaction and shows a compact numeric display (default `false`)
52
+ - **style** -- custom styles for the root container
53
+
45
54
  ## Sandbox
46
55
 
47
56
  <Sandbox
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startupjs-ui/rating",
3
- "version": "0.1.13",
3
+ "version": "0.1.19",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -8,15 +8,15 @@
8
8
  "types": "index.d.ts",
9
9
  "type": "module",
10
10
  "dependencies": {
11
- "@startupjs-ui/core": "^0.1.11",
12
- "@startupjs-ui/div": "^0.1.13",
13
- "@startupjs-ui/icon": "^0.1.13",
14
- "@startupjs-ui/span": "^0.1.13"
11
+ "@startupjs-ui/core": "^0.1.19",
12
+ "@startupjs-ui/div": "^0.1.19",
13
+ "@startupjs-ui/icon": "^0.1.19",
14
+ "@startupjs-ui/span": "^0.1.19"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "react": "*",
18
18
  "react-native": "*",
19
19
  "startupjs": "*"
20
20
  },
21
- "gitHead": "5cfdccf2bdae3873e968289a3e6b938fad02101a"
21
+ "gitHead": "bfcca786dc363f42a09b6eef4feb7ca8139302fc"
22
22
  }