@mindly/ui-components 5.20.0 → 5.21.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.
@@ -1,8 +1,8 @@
1
1
  import { WithTranslation } from 'react-i18next';
2
2
  import { CircleRatingRange, CircleRatingDataProps, CircleRatingDataResult, ProgressRangeProps, BreakPointPositionResult, CircleRatingContextData } from '../types/ratingCircleTypes';
3
3
  export declare const BREAKPOINT_ICON_SIZE = 20;
4
- export declare function useCircleRatingRenderData({ progress, size }: CircleRatingDataProps): CircleRatingDataResult;
5
- export declare function useRangeIndex({ progress, ranges }: ProgressRangeProps): number;
4
+ export declare function useCircleRatingRenderData({ progress, size, maxValue, isReverse, }: CircleRatingDataProps): CircleRatingDataResult;
5
+ export declare function useRangeIndex({ progress, maxValue, ranges, isReverse }: ProgressRangeProps): number;
6
6
  export declare function getProgressForBreakPoint({ maxValue, breakPoint, }: {
7
7
  maxValue: number;
8
8
  breakPoint: number;
@@ -13,11 +13,14 @@ export declare function useBreakPointsPosition({ maxValue, breakPoints, radius,
13
13
  radius?: number;
14
14
  strokeWidth?: number;
15
15
  }): BreakPointPositionResult[];
16
- export declare function useRatingCircleLegend({ ranges, t }: {
16
+ export declare function useRatingCircleLegend({ ranges, t, isReverse }: {
17
17
  ranges: CircleRatingRange[];
18
18
  t: WithTranslation['t'];
19
+ isReverse?: boolean;
19
20
  }): string[];
20
- export declare function useRatingCircleBreakPoints({ ranges }: {
21
+ export declare function useRatingCircleBreakPoints({ ranges, maxValue, isReverse, }: {
21
22
  ranges: CircleRatingRange[];
23
+ maxValue: number;
24
+ isReverse?: boolean;
22
25
  }): number[];
23
26
  export declare function useRatingContext(): CircleRatingContextData;
@@ -14,6 +14,8 @@ export type CircleRatingContent = {
14
14
  export type CircleRatingDataProps = {
15
15
  progress: number;
16
16
  size: keyof typeof CircleRatingSize;
17
+ maxValue: number;
18
+ isReverse?: boolean;
17
19
  };
18
20
  export type CircleRatingDataResult = {
19
21
  circleSize: number;
@@ -27,11 +29,11 @@ export type CircleRatingRange = {
27
29
  min: number | null;
28
30
  max: number | null;
29
31
  };
30
- export type CircleRatingCommonProps = {};
31
32
  export type ProgressRangeProps = {
32
33
  progress: number;
34
+ maxValue: number;
33
35
  ranges: CircleRatingRange[];
34
- isColorless?: boolean;
36
+ isReverse?: boolean;
35
37
  };
36
38
  export type BreakPointPositionProps = {
37
39
  radius?: number;
@@ -51,6 +53,8 @@ export type CircleRatingComponentProps = {
51
53
  isRatingDisabled?: boolean;
52
54
  isShowLegend?: boolean;
53
55
  isShowBreakPoints?: boolean;
56
+ isReverse?: boolean;
57
+ isZeroTransparent?: boolean;
54
58
  };
55
59
  export type CircleRatingContextProps = CircleRatingComponentProps & {
56
60
  legend?: string[];
@@ -1,5 +1,7 @@
1
1
  import { FC } from 'react';
2
2
  import { WithTranslation } from 'react-i18next';
3
3
  import { CircleRatingComponentProps } from '../../types';
4
- declare const RatingCircleWrapper: FC<CircleRatingComponentProps & WithTranslation | any>;
4
+ declare const RatingCircleWrapper: FC<CircleRatingComponentProps & {
5
+ t: WithTranslation | any;
6
+ }>;
5
7
  export default RatingCircleWrapper;
@@ -1,4 +1,9 @@
1
1
  export declare const circleRatingStyles: import("tailwind-variants").TVReturnType<{
2
+ transparent: {
3
+ true: {
4
+ coloredStroke: string;
5
+ };
6
+ };
2
7
  isColorless: {
3
8
  true: {
4
9
  coloredStroke: string;
@@ -32,6 +37,11 @@ export declare const circleRatingStyles: import("tailwind-variants").TVReturnTyp
32
37
  contentColor: string;
33
38
  legendItem: string;
34
39
  }, "", import("tailwind-variants/dist/config").TVConfig<{
40
+ transparent: {
41
+ true: {
42
+ coloredStroke: string;
43
+ };
44
+ };
35
45
  isColorless: {
36
46
  true: {
37
47
  coloredStroke: string;
@@ -57,6 +67,11 @@ export declare const circleRatingStyles: import("tailwind-variants").TVReturnTyp
57
67
  };
58
68
  };
59
69
  }, {
70
+ transparent: {
71
+ true: {
72
+ coloredStroke: string;
73
+ };
74
+ };
60
75
  isColorless: {
61
76
  true: {
62
77
  coloredStroke: string;
@@ -82,6 +97,11 @@ export declare const circleRatingStyles: import("tailwind-variants").TVReturnTyp
82
97
  };
83
98
  };
84
99
  }>, {
100
+ transparent: {
101
+ true: {
102
+ coloredStroke: string;
103
+ };
104
+ };
85
105
  isColorless: {
86
106
  true: {
87
107
  coloredStroke: string;
@@ -115,6 +135,11 @@ export declare const circleRatingStyles: import("tailwind-variants").TVReturnTyp
115
135
  contentColor: string;
116
136
  legendItem: string;
117
137
  }, import("tailwind-variants").TVReturnType<{
138
+ transparent: {
139
+ true: {
140
+ coloredStroke: string;
141
+ };
142
+ };
118
143
  isColorless: {
119
144
  true: {
120
145
  coloredStroke: string;
@@ -148,6 +173,11 @@ export declare const circleRatingStyles: import("tailwind-variants").TVReturnTyp
148
173
  contentColor: string;
149
174
  legendItem: string;
150
175
  }, "", import("tailwind-variants/dist/config").TVConfig<{
176
+ transparent: {
177
+ true: {
178
+ coloredStroke: string;
179
+ };
180
+ };
151
181
  isColorless: {
152
182
  true: {
153
183
  coloredStroke: string;
@@ -173,6 +203,11 @@ export declare const circleRatingStyles: import("tailwind-variants").TVReturnTyp
173
203
  };
174
204
  };
175
205
  }, {
206
+ transparent: {
207
+ true: {
208
+ coloredStroke: string;
209
+ };
210
+ };
176
211
  isColorless: {
177
212
  true: {
178
213
  coloredStroke: string;
package/dist/index.d.ts CHANGED
@@ -1612,6 +1612,8 @@ type CircleRatingContent = {
1612
1612
  type CircleRatingDataProps = {
1613
1613
  progress: number;
1614
1614
  size: keyof typeof CircleRatingSize;
1615
+ maxValue: number;
1616
+ isReverse?: boolean;
1615
1617
  };
1616
1618
  type CircleRatingDataResult = {
1617
1619
  circleSize: number;
@@ -1627,8 +1629,9 @@ type CircleRatingRange = {
1627
1629
  };
1628
1630
  type ProgressRangeProps = {
1629
1631
  progress: number;
1632
+ maxValue: number;
1630
1633
  ranges: CircleRatingRange[];
1631
- isColorless?: boolean;
1634
+ isReverse?: boolean;
1632
1635
  };
1633
1636
  type BreakPointPositionResult = {
1634
1637
  top: number;
@@ -1643,6 +1646,8 @@ type CircleRatingComponentProps = {
1643
1646
  isRatingDisabled?: boolean;
1644
1647
  isShowLegend?: boolean;
1645
1648
  isShowBreakPoints?: boolean;
1649
+ isReverse?: boolean;
1650
+ isZeroTransparent?: boolean;
1646
1651
  };
1647
1652
  type CircleRatingContextProps = CircleRatingComponentProps & {
1648
1653
  legend?: string[];
@@ -1660,7 +1665,9 @@ type CircleRatingContextData = CircleRatingContextProps & {
1660
1665
  styles: any;
1661
1666
  };
1662
1667
 
1663
- declare const RatingCircleWrapper: FC<CircleRatingComponentProps & WithTranslation | any>;
1668
+ declare const RatingCircleWrapper: FC<CircleRatingComponentProps & {
1669
+ t: WithTranslation | any;
1670
+ }>;
1664
1671
 
1665
1672
  type IconButtonProps = {
1666
1673
  icon: JSX.Element;
@@ -1763,8 +1770,8 @@ declare function useAutoFocus<T extends InputRefType>(): React.RefObject<T>;
1763
1770
  declare function useToastContext(): ToastState<MindlyToastProps>;
1764
1771
 
1765
1772
  declare const BREAKPOINT_ICON_SIZE = 20;
1766
- declare function useCircleRatingRenderData({ progress, size }: CircleRatingDataProps): CircleRatingDataResult;
1767
- declare function useRangeIndex({ progress, ranges }: ProgressRangeProps): number;
1773
+ declare function useCircleRatingRenderData({ progress, size, maxValue, isReverse, }: CircleRatingDataProps): CircleRatingDataResult;
1774
+ declare function useRangeIndex({ progress, maxValue, ranges, isReverse }: ProgressRangeProps): number;
1768
1775
  declare function getProgressForBreakPoint({ maxValue, breakPoint, }: {
1769
1776
  maxValue: number;
1770
1777
  breakPoint: number;
@@ -1775,12 +1782,15 @@ declare function useBreakPointsPosition({ maxValue, breakPoints, radius, strokeW
1775
1782
  radius?: number;
1776
1783
  strokeWidth?: number;
1777
1784
  }): BreakPointPositionResult[];
1778
- declare function useRatingCircleLegend({ ranges, t }: {
1785
+ declare function useRatingCircleLegend({ ranges, t, isReverse }: {
1779
1786
  ranges: CircleRatingRange[];
1780
1787
  t: WithTranslation['t'];
1788
+ isReverse?: boolean;
1781
1789
  }): string[];
1782
- declare function useRatingCircleBreakPoints({ ranges }: {
1790
+ declare function useRatingCircleBreakPoints({ ranges, maxValue, isReverse, }: {
1783
1791
  ranges: CircleRatingRange[];
1792
+ maxValue: number;
1793
+ isReverse?: boolean;
1784
1794
  }): number[];
1785
1795
  declare function useRatingContext(): CircleRatingContextData;
1786
1796
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindly/ui-components",
3
- "version": "5.20.0",
3
+ "version": "5.21.0",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "clean": "rimraf dist",