@atlaskit/rating 0.2.51 → 0.2.52

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,11 @@
1
1
  # @atlaskit/rating
2
2
 
3
+ ## 0.2.52
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 0.2.51
4
10
 
5
11
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/rating",
3
- "version": "0.2.51",
3
+ "version": "0.2.52",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/rating",
3
- "version": "0.2.51",
3
+ "version": "0.2.52",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/rating",
3
- "version": "0.2.51",
3
+ "version": "0.2.52",
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.51",
3
+ "version": "0.2.52",
4
4
  "description": "An accessible rating component that can be heavily customized.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,14 +12,6 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.0 <4.5": {
17
- "*": [
18
- "dist/types-ts4.0/*",
19
- "dist/types-ts4.0/index.d.ts"
20
- ]
21
- }
22
- },
23
15
  "sideEffects": false,
24
16
  "atlaskit:src": "src/index.tsx",
25
17
  "atlassian": {
@@ -34,7 +26,7 @@
34
26
  "@atlaskit/icon": "^21.11.0",
35
27
  "@atlaskit/motion": "^1.3.0",
36
28
  "@atlaskit/theme": "^12.2.0",
37
- "@atlaskit/tokens": "0.10.35",
29
+ "@atlaskit/tokens": "0.11.0",
38
30
  "@atlaskit/tooltip": "^17.6.0",
39
31
  "@babel/runtime": "^7.0.0",
40
32
  "@emotion/react": "^11.7.1"
@@ -1,50 +0,0 @@
1
- /// <reference types="react" />
2
- import { jsx } from '@emotion/react';
3
- export interface RatingGroupProps {
4
- /**
5
- * Callback that is called everytime the rating changes.
6
- * Use this in conjunction with `value` for [controlled behaviour](https://reactjs.org/docs/forms.html#controlled-components).
7
- */
8
- onChange?: (value?: string) => void;
9
- /**
10
- * Group name for all of the child rating items.
11
- * If you have **multiple ratings on the same page make sure to have a unique name** for each group.
12
-
13
- * Defaults to `"ak--rating-group"`.
14
- */
15
- groupName?: string;
16
- /**
17
- * Will set the default checked value for a child radio rating item.
18
- * Use when wanting to use this in an [uncontrolled way](https://reactjs.org/docs/uncontrolled-components.html).
19
-
20
- * Do not use with `value`.
21
- */
22
- defaultValue?: string;
23
- /**
24
- * Value that is used to check a child rating item.
25
- * Use when wanting to use this in a [controlled way](https://reactjs.org/docs/forms.html#controlled-components).
26
-
27
- * Do not use with `defaultValue`.
28
- */
29
- value?: string;
30
- /**
31
- A `testId` prop is provided for specified elements,
32
- which is a unique string that appears as a data attribute `data-testid` in the rendered code,
33
- serving as a hook for automated tests.
34
-
35
- Will set these elements:
36
-
37
- * The root container `"{testId}--root"`
38
- * The empty input `"{testId}--input-empty"` which is used to signify "nothing is selected yet".
39
- */
40
- testId?: string;
41
- /**
42
- * Pass in child rating items.
43
- * This component expects the markup to be defined in a particular way,
44
- * so if you pass extra wrapping markup expect undefined behaviour.
45
-
46
- * You can have any amount of child rating items.
47
- */
48
- children: JSX.Element | JSX.Element[];
49
- }
50
- export default function RatingGroup({ groupName, onChange, defaultValue, value, testId, children, }: RatingGroupProps): jsx.JSX.Element;
@@ -1,68 +0,0 @@
1
- /// <reference types="react" />
2
- export declare type RatingRender = (props: {
3
- isChecked: boolean;
4
- }) => React.ReactNode;
5
- export interface RatingProps {
6
- /**
7
- * Label for the rating item.
8
- * This will be read by screen readers as well as used in the tooltip when hovering over the item.
9
- */
10
- label: string;
11
- /**
12
- * This is passed to the radio button input.
13
-
14
- * When using this with the `<Rating />` component this is handled for you.
15
- */
16
- name?: string;
17
- /**
18
- * Sets checked state on the rating item.
19
-
20
- * When using this with the `<Rating />` component this is handled for you.
21
- */
22
- isChecked?: boolean;
23
- /**
24
- A `testId` prop is provided for specified elements,
25
- which is a unique string that appears as a data attribute `data-testid` in the rendered code,
26
- serving as a hook for automated tests.
27
-
28
- Will set two elements:
29
-
30
- * The label as `"{testId}--label"`
31
- * The radio button as `"{testId}--input"`
32
- * The unchecked icon container `"{testId}--icon-container"`
33
- * The checked icon container `"{testId}--icon-checked-container"`
34
-
35
- When using this with the `<Rating />` component this will inherit its `testId` as `"{testId}--{index}--{element}"`,
36
- for example label would be `"{testId}--{index}--label"`.
37
- */
38
- testId?: string;
39
- /**
40
- * Value of the rating item.
41
- * This will be passed back in the `onChange()` handler when checked.
42
- */
43
- value: string;
44
- /**
45
- * Id that is passed to both the label and the radio button element.
46
- * This is needed to declare their relationship.
47
-
48
- * When using this with the `<Rating />` component this is handled for you.
49
- */
50
- id?: string;
51
- /**
52
- * Handler that is called back whenever the radio button element changes its checked state.
53
- * When checked will be passed the `value` -
54
- * when unchecked will be passed `undefined`.
55
-
56
- * When using this with the `<Rating />` component this is handled for you.
57
- */
58
- onChange?: (value?: string) => void;
59
- }
60
- export interface InternalRatingProps extends RatingProps {
61
- /**
62
- * Render callback that should return a ReactNode.
63
- * Is passed an argument which is an object with one property `isChecked`.
64
- */
65
- render: RatingRender;
66
- }
67
- declare const Rating: import("react").ForwardRefExoticComponent<InternalRatingProps & import("react").RefAttributes<HTMLLabelElement>>;
68
- export default Rating;
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import { RatingProps } from './rating';
3
- export interface StarProps extends RatingProps {
4
- /**
5
- * Size of the star icon.
6
-
7
- * Defaults to `"large"`.
8
- */
9
- size?: 'small' | 'medium' | 'large' | 'xlarge';
10
- /**
11
- * Color of the star icon,
12
- * when wanting to customize the color please ensure you use `colors` from `@atlaskit/theme`.
13
-
14
- * Defaults to `colors.Y200`.
15
- */
16
- color?: string;
17
- }
18
- declare const Star: React.ForwardRefExoticComponent<StarProps & React.RefAttributes<HTMLLabelElement>>;
19
- export default Star;
@@ -1,5 +0,0 @@
1
- import { InternalRatingProps } from '../components/rating';
2
- /**
3
- * This gets around extract-react-types not supporting forwardRef.
4
- */
5
- export default function (_: InternalRatingProps): void;
@@ -1,5 +0,0 @@
1
- import { StarProps } from '../components/star';
2
- /**
3
- * This gets around extract-react-types not supporting forwardRef.
4
- */
5
- export default function (_: StarProps): void;
@@ -1,6 +0,0 @@
1
- export { default as RatingGroup } from './components/rating-group';
2
- export type { RatingGroupProps } from './components/rating-group';
3
- export { default as Star } from './components/star';
4
- export type { StarProps } from './components/star';
5
- export { default as Rating } from './components/rating';
6
- export type { InternalRatingProps, RatingProps, RatingRender, } from './components/rating';