@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;