@atlaskit/rating 0.2.45 → 0.2.47

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/rating
2
2
 
3
+ ## 0.2.47
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 0.2.46
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 0.2.45
4
16
 
5
17
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/rating",
3
- "version": "0.2.45",
3
+ "version": "0.2.47",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/rating",
3
- "version": "0.2.45",
3
+ "version": "0.2.47",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/rating",
3
- "version": "0.2.45",
3
+ "version": "0.2.47",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rating",
3
- "version": "0.2.45",
3
+ "version": "0.2.47",
4
4
  "description": "An accessible rating component that can be heavily customized.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -32,9 +32,9 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/icon": "^21.11.0",
35
- "@atlaskit/motion": "^1.2.0",
35
+ "@atlaskit/motion": "^1.3.0",
36
36
  "@atlaskit/theme": "^12.2.0",
37
- "@atlaskit/tokens": "0.10.30",
37
+ "@atlaskit/tokens": "0.10.32",
38
38
  "@atlaskit/tooltip": "^17.6.0",
39
39
  "@babel/runtime": "^7.0.0",
40
40
  "@emotion/core": "^10.0.9"
@@ -44,7 +44,7 @@
44
44
  "react-dom": "^16.8.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@atlaskit/button": "^16.3.0",
47
+ "@atlaskit/button": "^16.4.0",
48
48
  "@atlaskit/docs": "*",
49
49
  "@atlaskit/ssr": "*",
50
50
  "@atlaskit/visual-regression": "*",
package/report.api.md CHANGED
@@ -1,6 +1,10 @@
1
- ## API Report File for "@atlaskit/rating".
1
+ ## API Report File for "@atlaskit/rating"
2
2
 
3
- > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ <!--
6
+ Generated API Report version: 2.0
7
+ -->
4
8
 
5
9
  [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
6
10
 
@@ -11,19 +15,18 @@ import { ForwardRefExoticComponent } from 'react';
11
15
  import { default as React_2 } from 'react';
12
16
  import { RefAttributes } from 'react';
13
17
 
14
- export declare interface InternalRatingProps extends RatingProps {
15
- /**
16
- * Render callback that should return a ReactNode.
17
- * Is passed an argument which is an object with one property `isChecked`.
18
- */
18
+ // @public (undocumented)
19
+ export interface InternalRatingProps extends RatingProps {
19
20
  render: RatingRender;
20
21
  }
21
22
 
22
- export declare const Rating: ForwardRefExoticComponent<
23
+ // @public (undocumented)
24
+ export const Rating: ForwardRefExoticComponent<
23
25
  InternalRatingProps & RefAttributes<HTMLLabelElement>
24
26
  >;
25
27
 
26
- export declare function RatingGroup({
28
+ // @public (undocumented)
29
+ export function RatingGroup({
27
30
  groupName,
28
31
  onChange,
29
32
  defaultValue,
@@ -32,133 +35,40 @@ export declare function RatingGroup({
32
35
  children,
33
36
  }: RatingGroupProps): JSX.Element;
34
37
 
35
- export declare interface RatingGroupProps {
36
- /**
37
- * Callback that is called everytime the rating changes.
38
- * Use this in conjunction with `value` for [controlled behaviour](https://reactjs.org/docs/forms.html#controlled-components).
39
- */
40
- onChange?: (value?: string) => void;
41
- /**
42
- * Group name for all of the child rating items.
43
- * If you have **multiple ratings on the same page make sure to have a unique name** for each group.
44
-
45
- * Defaults to `"ak--rating-group"`.
46
- */
47
- groupName?: string;
48
- /**
49
- * Will set the default checked value for a child radio rating item.
50
- * Use when wanting to use this in an [uncontrolled way](https://reactjs.org/docs/uncontrolled-components.html).
51
-
52
- * Do not use with `value`.
53
- */
38
+ // @public (undocumented)
39
+ export interface RatingGroupProps {
40
+ children: JSX.Element | JSX.Element[];
54
41
  defaultValue?: string;
55
- /**
56
- * Value that is used to check a child rating item.
57
- * Use when wanting to use this in a [controlled way](https://reactjs.org/docs/forms.html#controlled-components).
58
-
59
- * Do not use with `defaultValue`.
60
- */
61
- value?: string;
62
- /**
63
- A `testId` prop is provided for specified elements,
64
- which is a unique string that appears as a data attribute `data-testid` in the rendered code,
65
- serving as a hook for automated tests.
66
-
67
- Will set these elements:
68
-
69
- * The root container `"{testId}--root"`
70
- * The empty input `"{testId}--input-empty"` which is used to signify "nothing is selected yet".
71
- */
42
+ groupName?: string;
43
+ onChange?: (value?: string) => void;
72
44
  testId?: string;
73
- /**
74
- * Pass in child rating items.
75
- * This component expects the markup to be defined in a particular way,
76
- * so if you pass extra wrapping markup expect undefined behaviour.
77
-
78
- * You can have any amount of child rating items.
79
- */
80
- children: JSX.Element | JSX.Element[];
45
+ value?: string;
81
46
  }
82
47
 
83
- export declare interface RatingProps {
84
- /**
85
- * Label for the rating item.
86
- * This will be read by screen readers as well as used in the tooltip when hovering over the item.
87
- */
48
+ // @public (undocumented)
49
+ export interface RatingProps {
50
+ id?: string;
51
+ isChecked?: boolean;
88
52
  label: string;
89
- /**
90
- * This is passed to the radio button input.
91
-
92
- * When using this with the `<Rating />` component this is handled for you.
93
- */
94
53
  name?: string;
95
- /**
96
- * Sets checked state on the rating item.
97
-
98
- * When using this with the `<Rating />` component this is handled for you.
99
- */
100
- isChecked?: boolean;
101
- /**
102
- A `testId` prop is provided for specified elements,
103
- which is a unique string that appears as a data attribute `data-testid` in the rendered code,
104
- serving as a hook for automated tests.
105
-
106
- Will set two elements:
107
-
108
- * The label as `"{testId}--label"`
109
- * The radio button as `"{testId}--input"`
110
- * The unchecked icon container `"{testId}--icon-container"`
111
- * The checked icon container `"{testId}--icon-checked-container"`
112
-
113
- When using this with the `<Rating />` component this will inherit its `testId` as `"{testId}--{index}--{element}"`,
114
- for example label would be `"{testId}--{index}--label"`.
115
- */
54
+ onChange?: (value?: string) => void;
116
55
  testId?: string;
117
- /**
118
- * Value of the rating item.
119
- * This will be passed back in the `onChange()` handler when checked.
120
- */
121
56
  value: string;
122
- /**
123
- * Id that is passed to both the label and the radio button element.
124
- * This is needed to declare their relationship.
125
-
126
- * When using this with the `<Rating />` component this is handled for you.
127
- */
128
- id?: string;
129
- /**
130
- * Handler that is called back whenever the radio button element changes its checked state.
131
- * When checked will be passed the `value` -
132
- * when unchecked will be passed `undefined`.
133
-
134
- * When using this with the `<Rating />` component this is handled for you.
135
- */
136
- onChange?: (value?: string) => void;
137
57
  }
138
58
 
139
- export declare type RatingRender = (props: {
140
- isChecked: boolean;
141
- }) => React.ReactNode;
59
+ // @public (undocumented)
60
+ export type RatingRender = (props: { isChecked: boolean }) => React.ReactNode;
142
61
 
143
- export declare const Star: React_2.ForwardRefExoticComponent<
62
+ // @public (undocumented)
63
+ export const Star: React_2.ForwardRefExoticComponent<
144
64
  StarProps & React_2.RefAttributes<HTMLLabelElement>
145
65
  >;
146
66
 
147
- export declare interface StarProps extends RatingProps {
148
- /**
149
- * Size of the star icon.
150
-
151
- * Defaults to `"large"`.
152
- */
153
- size?: 'small' | 'medium' | 'large' | 'xlarge';
154
- /**
155
- * Color of the star icon,
156
- * when wanting to customize the color please ensure you use `colors` from `@atlaskit/theme`.
157
-
158
- * Defaults to `colors.Y200`.
159
- */
67
+ // @public (undocumented)
68
+ export interface StarProps extends RatingProps {
160
69
  color?: string;
70
+ size?: 'small' | 'medium' | 'large' | 'xlarge';
161
71
  }
162
72
 
163
- export {};
73
+ // (No @packageDocumentation comment for this package)
164
74
  ```