@instructure/ui-rating 8.8.1-snapshot.8 → 8.9.0

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.
@@ -24,7 +24,6 @@
24
24
 
25
25
  /** @jsx jsx */
26
26
  import { Component } from 'react'
27
- import PropTypes from 'prop-types'
28
27
 
29
28
  import { IconStarSolid, IconStarLightSolid } from '@instructure/ui-icons'
30
29
  import { requestAnimationFrame } from '@instructure/ui-dom-utils'
@@ -34,7 +33,8 @@ import { Transition } from '@instructure/ui-motion'
34
33
  import { withStyle, jsx } from '@instructure/emotion'
35
34
  import generateStyle from './styles'
36
35
  import generateComponentTheme from './theme'
37
- import { RatingIconProps, RatingIconState } from './types'
36
+ import type { RatingIconProps, RatingIconState } from './props'
37
+ import { allowedProps, propTypes } from './props'
38
38
 
39
39
  /**
40
40
  ---
@@ -46,16 +46,8 @@ id: Rating.Icon
46
46
  class RatingIcon extends Component<RatingIconProps, RatingIconState> {
47
47
  static readonly componentId = 'Rating.Icon'
48
48
 
49
- static propTypes = {
50
- animationDelay: PropTypes.number,
51
- animateFill: PropTypes.bool,
52
- filled: PropTypes.bool,
53
- size: PropTypes.oneOf(['small', 'medium', 'large']),
54
- // eslint-disable-next-line react/require-default-props
55
- makeStyles: PropTypes.func,
56
- // eslint-disable-next-line react/require-default-props
57
- styles: PropTypes.object
58
- }
49
+ static allowedProps = allowedProps
50
+ static propTypes = propTypes
59
51
 
60
52
  static defaultProps = {
61
53
  animationDelay: 200,
@@ -78,16 +70,14 @@ class RatingIcon extends Component<RatingIconProps, RatingIconState> {
78
70
  _animation: RequestAnimationFrameType | undefined
79
71
 
80
72
  componentDidMount() {
81
- // @ts-expect-error ts-migrate(2722) FIXME: Cannot invoke an object which is possibly 'undefin... Remove this comment to see the full error message
82
- this.props.makeStyles(this.makeStyleProps())
73
+ this.props.makeStyles?.(this.makeStyleProps())
83
74
  if (this.props.animateFill) {
84
75
  // @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'Timeout' is not assignable to pa... Remove this comment to see the full error message
85
76
  this._timeouts.push(setTimeout(this.fill, this.props.animationDelay))
86
77
  }
87
78
  }
88
79
 
89
- // @ts-expect-error ts-migrate(7006) FIXME: Parameter 'prevProps' implicitly has an 'any' type... Remove this comment to see the full error message
90
- componentDidUpdate(prevProps, prevState, snapshot) {
80
+ componentDidUpdate(prevProps: RatingIconProps) {
91
81
  if (
92
82
  this.props.animateFill &&
93
83
  this.props.filled &&
@@ -95,8 +85,7 @@ class RatingIcon extends Component<RatingIconProps, RatingIconState> {
95
85
  ) {
96
86
  this.fill()
97
87
  }
98
- // @ts-expect-error ts-migrate(2722) FIXME: Cannot invoke an object which is possibly 'undefin... Remove this comment to see the full error message
99
- this.props.makeStyles(this.makeStyleProps())
88
+ this.props.makeStyles?.(this.makeStyleProps())
100
89
  }
101
90
 
102
91
  componentWillUnmount() {
@@ -121,14 +110,14 @@ class RatingIcon extends Component<RatingIconProps, RatingIconState> {
121
110
  const Icon = this.state.filled ? IconStarSolid : IconStarLightSolid
122
111
 
123
112
  return (
124
- <span css={this.props.styles.ratingIcon}>
113
+ <span css={this.props.styles?.ratingIcon}>
125
114
  <span>
126
115
  {this.state.filled && animateFill ? (
127
116
  <Transition in transitionOnMount type="scale">
128
- <Icon css={this.props.styles.icon} />
117
+ <Icon css={this.props.styles?.icon} />
129
118
  </Transition>
130
119
  ) : (
131
- <Icon css={this.props.styles.icon} />
120
+ <Icon css={this.props.styles?.icon} />
132
121
  )}
133
122
  </span>
134
123
  </span>
@@ -0,0 +1,61 @@
1
+ /*
2
+ * The MIT License (MIT)
3
+ *
4
+ * Copyright (c) 2015 - present Instructure, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+ import PropTypes from 'prop-types'
25
+
26
+ import type { PropValidators } from '@instructure/shared-types'
27
+ import type { WithStyleProps } from '@instructure/emotion'
28
+
29
+ type RatingIconOwnProps = {
30
+ animationDelay?: number
31
+ animateFill?: boolean
32
+ filled?: boolean
33
+ size?: 'small' | 'medium' | 'large'
34
+ }
35
+
36
+ export type RatingIconState = {
37
+ filled: boolean
38
+ }
39
+
40
+ type PropKeys = keyof RatingIconOwnProps
41
+
42
+ type AllowedPropKeys = Readonly<Array<PropKeys>>
43
+
44
+ type RatingIconProps = RatingIconOwnProps & WithStyleProps
45
+
46
+ const propTypes: PropValidators<PropKeys> = {
47
+ animationDelay: PropTypes.number,
48
+ animateFill: PropTypes.bool,
49
+ filled: PropTypes.bool,
50
+ size: PropTypes.oneOf(['small', 'medium', 'large'])
51
+ }
52
+
53
+ const allowedProps: AllowedPropKeys = [
54
+ 'animationDelay',
55
+ 'animateFill',
56
+ 'filled',
57
+ 'size'
58
+ ]
59
+
60
+ export type { RatingIconProps }
61
+ export { propTypes, allowedProps }
@@ -23,7 +23,7 @@
23
23
  */
24
24
 
25
25
  import { RatingIconTheme } from '@instructure/shared-types'
26
- import { RatingIconProps, RatingIconState } from './types'
26
+ import { RatingIconProps, RatingIconState } from './props'
27
27
 
28
28
  /**
29
29
  * ---
package/src/index.ts CHANGED
@@ -23,5 +23,5 @@
23
23
  */
24
24
  export { Rating } from './Rating'
25
25
 
26
- export type { RatingProps } from './Rating/types'
27
- export type { RatingIconProps } from './RatingIcon/types'
26
+ export type { RatingProps } from './Rating/props'
27
+ export type { RatingIconProps } from './RatingIcon/props'
@@ -1,9 +1,8 @@
1
1
  /** @jsx jsx */
2
2
  import { Component } from 'react';
3
- import PropTypes from 'prop-types';
4
3
  import { RatingIcon } from '../RatingIcon';
5
4
  import { jsx } from '@instructure/emotion';
6
- import { RatingProps } from './types';
5
+ import type { RatingProps } from './props';
7
6
  /**
8
7
  ---
9
8
  category: components
@@ -11,56 +10,36 @@ category: components
11
10
  **/
12
11
  declare class Rating extends Component<RatingProps> {
13
12
  static readonly componentId = "Rating";
14
- static propTypes: {
15
- /**
16
- * A label is required for accessibility
17
- */
18
- label: PropTypes.Validator<string>;
19
- /**
20
- * A function that returns the current value formatted for screen readers
21
- */
22
- formatValueText: PropTypes.Requireable<(...args: any[]) => any>;
23
- /**
24
- * Choose from a 0-3 or 0-5 rating system
25
- */
26
- iconCount: PropTypes.Requireable<number>;
27
- /**
28
- * Choose from different rating icon sizes
29
- */
30
- size: PropTypes.Requireable<string>;
31
- /**
32
- * The maximum rating (defaults to iconCount)
33
- */
34
- valueMax: PropTypes.Requireable<number>;
35
- /**
36
- * The current rating
37
- */
38
- valueNow: PropTypes.Requireable<number>;
39
- /**
40
- * Set to make the icons animate when they become filled
41
- */
42
- animateFill: PropTypes.Requireable<boolean>;
43
- /**
44
- * Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
45
- * `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
46
- * familiar CSS-like shorthand. For example: `margin="small auto large"`.
47
- */
48
- margin: (props: any, propName: any, componentName: any, location: any) => any;
49
- makeStyles: PropTypes.Requireable<(...args: any[]) => any>;
50
- styles: PropTypes.Requireable<object>;
51
- };
13
+ static allowedProps: readonly (keyof {
14
+ label: string;
15
+ formatValueText?: ((...args: any[]) => any) | undefined;
16
+ iconCount?: 3 | 5 | undefined;
17
+ size?: "small" | "medium" | "large" | undefined;
18
+ valueMax?: number | undefined;
19
+ valueNow?: number | undefined;
20
+ animateFill?: boolean | undefined;
21
+ margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
22
+ })[];
23
+ static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
24
+ label: string;
25
+ formatValueText?: ((...args: any[]) => any) | undefined;
26
+ iconCount?: 3 | 5 | undefined;
27
+ size?: "small" | "medium" | "large" | undefined;
28
+ valueMax?: number | undefined;
29
+ valueNow?: number | undefined;
30
+ animateFill?: boolean | undefined;
31
+ margin?: import("@instructure/emotion/types/styleUtils/ThemeablePropValues").Spacing | undefined;
32
+ }>;
52
33
  static defaultProps: {
53
34
  animateFill: boolean;
54
35
  formatValueText: (filled: any, iconCount: any) => string;
55
36
  iconCount: number;
56
37
  size: string;
57
38
  valueNow: number;
58
- margin: undefined;
59
- valueMax: undefined;
60
39
  };
61
40
  static Icon: typeof RatingIcon;
62
41
  componentDidMount(): void;
63
- componentDidUpdate(prevProps: any, prevState: any, snapshot: any): void;
42
+ componentDidUpdate(): void;
64
43
  get filled(): number | undefined;
65
44
  get empty(): number;
66
45
  render(): jsx.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Rating/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,SAAS,MAAM,YAAY,CAAA;AAMlC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAa,GAAG,EAAsB,MAAM,sBAAsB,CAAA;AAEzE,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAErC;;;;GAIG;AACH,cAEM,MAAO,SAAQ,SAAS,CAAC,WAAW,CAAC;IACzC,MAAM,CAAC,QAAQ,CAAC,WAAW,YAAW;IAEtC,MAAM,CAAC,SAAS;QACd;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;;;WAIG;;;;MAOJ;IAED,MAAM,CAAC,YAAY;;;;;;;;MASlB;IAED,MAAM,CAAC,IAAI,oBAAa;IAExB,iBAAiB;IAMjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAKjD,IAAI,MAAM,uBAiBT;IAED,IAAI,KAAK,WAGR;IAED,MAAM;CA4CP;AAED,eAAe,MAAM,CAAA;AACrB,OAAO,EAAE,MAAM,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Rating/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMjC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAG1C;;;;GAIG;AACH,cAEM,MAAO,SAAQ,SAAS,CAAC,WAAW,CAAC;IACzC,MAAM,CAAC,QAAQ,CAAC,WAAW,YAAW;IAEtC,MAAM,CAAC,YAAY;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;;;MAOlB;IAED,MAAM,CAAC,IAAI,oBAAa;IAExB,iBAAiB;IAIjB,kBAAkB;IAIlB,IAAI,MAAM,uBAiBT;IAED,IAAI,KAAK,WAGR;IAED,MAAM;CA4CP;AAED,eAAe,MAAM,CAAA;AACrB,OAAO,EAAE,MAAM,EAAE,CAAA"}
@@ -0,0 +1,20 @@
1
+ import type { Spacing, WithStyleProps } from '@instructure/emotion';
2
+ import type { PropValidators } from '@instructure/shared-types';
3
+ declare type RatingOwnProps = {
4
+ label: string;
5
+ formatValueText?: (...args: any[]) => any;
6
+ iconCount?: 3 | 5;
7
+ size?: 'small' | 'medium' | 'large';
8
+ valueMax?: number;
9
+ valueNow?: number;
10
+ animateFill?: boolean;
11
+ margin?: Spacing;
12
+ };
13
+ declare type PropKeys = keyof RatingOwnProps;
14
+ declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
15
+ declare type RatingProps = RatingOwnProps & WithStyleProps;
16
+ declare const propTypes: PropValidators<PropKeys>;
17
+ declare const allowedProps: AllowedPropKeys;
18
+ export type { RatingProps };
19
+ export { propTypes, allowedProps };
20
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Rating/props.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE/D,aAAK,cAAc,GAAG;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,eAAe,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACzC,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,CAAA;IACjB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,cAAc,CAAA;AAEpC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,WAAW,GAAG,cAAc,GAAG,cAAc,CAAA;AAElD,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAmCvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eASnB,CAAA;AAED,YAAY,EAAE,WAAW,EAAE,CAAA;AAC3B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -1,9 +1,8 @@
1
1
  /** @jsx jsx */
2
2
  import { Component } from 'react';
3
- import PropTypes from 'prop-types';
4
3
  import type { RequestAnimationFrameType } from '@instructure/ui-dom-utils';
5
4
  import { jsx } from '@instructure/emotion';
6
- import { RatingIconProps, RatingIconState } from './types';
5
+ import type { RatingIconProps, RatingIconState } from './props';
7
6
  /**
8
7
  ---
9
8
  parent: Rating
@@ -12,14 +11,18 @@ id: Rating.Icon
12
11
  **/
13
12
  declare class RatingIcon extends Component<RatingIconProps, RatingIconState> {
14
13
  static readonly componentId = "Rating.Icon";
15
- static propTypes: {
16
- animationDelay: PropTypes.Requireable<number>;
17
- animateFill: PropTypes.Requireable<boolean>;
18
- filled: PropTypes.Requireable<boolean>;
19
- size: PropTypes.Requireable<string>;
20
- makeStyles: PropTypes.Requireable<(...args: any[]) => any>;
21
- styles: PropTypes.Requireable<object>;
22
- };
14
+ static allowedProps: readonly (keyof {
15
+ animationDelay?: number | undefined;
16
+ animateFill?: boolean | undefined;
17
+ filled?: boolean | undefined;
18
+ size?: "small" | "medium" | "large" | undefined;
19
+ })[];
20
+ static propTypes: import("@instructure/shared-types/types/UtilityTypes").PropValidators<keyof {
21
+ animationDelay?: number | undefined;
22
+ animateFill?: boolean | undefined;
23
+ filled?: boolean | undefined;
24
+ size?: "small" | "medium" | "large" | undefined;
25
+ }>;
23
26
  static defaultProps: {
24
27
  animationDelay: number;
25
28
  animateFill: boolean;
@@ -30,7 +33,7 @@ declare class RatingIcon extends Component<RatingIconProps, RatingIconState> {
30
33
  _timeouts: never[];
31
34
  _animation: RequestAnimationFrameType | undefined;
32
35
  componentDidMount(): void;
33
- componentDidUpdate(prevProps: any, prevState: any, snapshot: any): void;
36
+ componentDidUpdate(prevProps: RatingIconProps): void;
34
37
  componentWillUnmount(): void;
35
38
  makeStyleProps: () => {
36
39
  filled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/RatingIcon/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,SAAS,MAAM,YAAY,CAAA;AAIlC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAA;AAG1E,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAGrD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE1D;;;;;GAKG;AACH,cACM,UAAW,SAAQ,SAAS,CAAC,eAAe,EAAE,eAAe,CAAC;IAClE,MAAM,CAAC,QAAQ,CAAC,WAAW,iBAAgB;IAE3C,MAAM,CAAC,SAAS;;;;;;;MASf;IAED,MAAM,CAAC,YAAY;;;;;MAKlB;gBAGW,KAAK,KAAA;IASjB,SAAS,UAAK;IACd,UAAU,EAAE,yBAAyB,GAAG,SAAS,CAAA;IAEjD,iBAAiB;IAUjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAYjD,oBAAoB;IAKpB,cAAc;;MAEb;IAED,IAAI,aAMH;IAED,MAAM;CAkBP;AAED,eAAe,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/RatingIcon/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAIjC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAA;AAG1E,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAGrD,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAG/D;;;;;GAKG;AACH,cACM,UAAW,SAAQ,SAAS,CAAC,eAAe,EAAE,eAAe,CAAC;IAClE,MAAM,CAAC,QAAQ,CAAC,WAAW,iBAAgB;IAE3C,MAAM,CAAC,YAAY;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;;MAKlB;gBAGW,KAAK,KAAA;IASjB,SAAS,UAAK;IACd,UAAU,EAAE,yBAAyB,GAAG,SAAS,CAAA;IAEjD,iBAAiB;IAQjB,kBAAkB,CAAC,SAAS,EAAE,eAAe;IAW7C,oBAAoB;IAKpB,cAAc;;MAEb;IAED,IAAI,aAMH;IAED,MAAM;CAkBP;AAED,eAAe,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,CAAA"}
@@ -0,0 +1,19 @@
1
+ import type { PropValidators } from '@instructure/shared-types';
2
+ import type { WithStyleProps } from '@instructure/emotion';
3
+ declare type RatingIconOwnProps = {
4
+ animationDelay?: number;
5
+ animateFill?: boolean;
6
+ filled?: boolean;
7
+ size?: 'small' | 'medium' | 'large';
8
+ };
9
+ export declare type RatingIconState = {
10
+ filled: boolean;
11
+ };
12
+ declare type PropKeys = keyof RatingIconOwnProps;
13
+ declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
14
+ declare type RatingIconProps = RatingIconOwnProps & WithStyleProps;
15
+ declare const propTypes: PropValidators<PropKeys>;
16
+ declare const allowedProps: AllowedPropKeys;
17
+ export type { RatingIconProps };
18
+ export { propTypes, allowedProps };
19
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/RatingIcon/props.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,aAAK,kBAAkB,GAAG;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;CACpC,CAAA;AAED,oBAAY,eAAe,GAAG;IAC5B,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,kBAAkB,CAAA;AAExC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,eAAe,GAAG,kBAAkB,GAAG,cAAc,CAAA;AAE1D,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAKvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAKnB,CAAA;AAED,YAAY,EAAE,eAAe,EAAE,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { RatingIconTheme } from '@instructure/shared-types';
2
- import { RatingIconProps, RatingIconState } from './types';
2
+ import { RatingIconProps, RatingIconState } from './props';
3
3
  /**
4
4
  * ---
5
5
  * private: true
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { Rating } from './Rating';
2
- export type { RatingProps } from './Rating/types';
3
- export type { RatingIconProps } from './RatingIcon/types';
2
+ export type { RatingProps } from './Rating/props';
3
+ export type { RatingIconProps } from './RatingIcon/props';
4
4
  //# sourceMappingURL=index.d.ts.map
package/LICENSE.md DELETED
@@ -1,27 +0,0 @@
1
- ---
2
- title: The MIT License (MIT)
3
- category: Getting Started
4
- order: 9
5
- ---
6
-
7
- # The MIT License (MIT)
8
-
9
- Copyright (c) 2015 Instructure, Inc.
10
-
11
- **Permission is hereby granted, free of charge, to any person obtaining a copy
12
- of this software and associated documentation files (the "Software"), to deal
13
- in the Software without restriction, including without limitation the rights
14
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- copies of the Software, and to permit persons to whom the Software is
16
- furnished to do so, subject to the following conditions.**
17
-
18
- The above copyright notice and this permission notice shall be included in all
19
- copies or substantial portions of the Software.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
- SOFTWARE.
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- "use strict";
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,14 +0,0 @@
1
- import type { Spacing } from '@instructure/emotion';
2
- export declare type RatingProps = {
3
- label: string;
4
- formatValueText?: (...args: any[]) => any;
5
- iconCount?: 3 | 5;
6
- size?: 'small' | 'medium' | 'large';
7
- valueMax?: number;
8
- valueNow?: number;
9
- animateFill?: boolean;
10
- margin?: Spacing;
11
- makeStyles?: (...args: any[]) => any;
12
- styles?: any;
13
- };
14
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/Rating/types.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAEnD,oBAAY,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,eAAe,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACzC,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,CAAA;IACjB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,MAAM,CAAC,EAAE,GAAG,CAAA;CACb,CAAA"}
@@ -1,12 +0,0 @@
1
- export declare type RatingIconProps = {
2
- animationDelay?: number;
3
- animateFill?: boolean;
4
- filled?: boolean;
5
- size?: 'small' | 'medium' | 'large';
6
- makeStyles?: (...args: any[]) => any;
7
- styles?: any;
8
- };
9
- export declare type RatingIconState = {
10
- filled: boolean;
11
- };
12
- //# sourceMappingURL=types.d.ts.map