@mindly/ui-components 5.22.0 → 5.23.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.
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/lib2/shared/assets/icons/IconCancelRounded.d.ts +1 -2
- package/dist/cjs/lib2/shared/hooks/useCircleRating.d.ts +8 -7
- package/dist/cjs/lib2/shared/types/ratingCircleTypes.d.ts +9 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/lib2/shared/assets/icons/IconCancelRounded.d.ts +1 -2
- package/dist/esm/lib2/shared/hooks/useCircleRating.d.ts +8 -7
- package/dist/esm/lib2/shared/types/ratingCircleTypes.d.ts +9 -0
- package/dist/index.d.ts +20 -7
- package/package.json +1 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { FC } from 'react';
|
|
3
2
|
interface IconProps extends React.SVGAttributes<SVGElement> {
|
|
4
3
|
size?: number | string;
|
|
5
4
|
color?: string;
|
|
6
5
|
className?: string;
|
|
7
6
|
style?: React.CSSProperties;
|
|
8
7
|
}
|
|
9
|
-
export declare
|
|
8
|
+
export declare function IconCancelRounded({ color, size, ...other }: IconProps): JSX.Element;
|
|
10
9
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { SizeValues, CircleRatingRange, CircleRatingDataProps, CircleRatingDataResult, CircleRatingLegendProps, ProgressRangeProps, BreakPointPositionResult, CircleRatingContextData } from '../types/ratingCircleTypes';
|
|
2
|
+
export declare const SIZES: SizeValues;
|
|
3
3
|
export declare const BREAKPOINT_ICON_SIZE = 20;
|
|
4
4
|
export declare function useCircleRatingRenderData({ progress, size, maxValue, isReverse, }: CircleRatingDataProps): CircleRatingDataResult;
|
|
5
5
|
export declare function useRangeIndex({ progress, maxValue, ranges, isReverse }: ProgressRangeProps): number;
|
|
@@ -13,11 +13,12 @@ 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, isReverse }:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
export declare function useRatingCircleLegend({ ranges, t, isReverse, isPercentage, }: CircleRatingLegendProps): string[];
|
|
17
|
+
export declare function useRatingCircleContentValue({ progress, isPercentage, decimal, }: {
|
|
18
|
+
progress: number;
|
|
19
|
+
isPercentage?: boolean;
|
|
20
|
+
decimal?: number;
|
|
21
|
+
}): string;
|
|
21
22
|
export declare function useRatingCircleBreakPoints({ ranges, maxValue, isReverse, }: {
|
|
22
23
|
ranges: CircleRatingRange[];
|
|
23
24
|
maxValue: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WithTranslation } from 'react-i18next';
|
|
1
2
|
export declare enum CircleRatingSize {
|
|
2
3
|
'S' = "S",
|
|
3
4
|
'M' = "M",
|
|
@@ -44,17 +45,25 @@ export type BreakPointPositionResult = {
|
|
|
44
45
|
top: number;
|
|
45
46
|
left: number;
|
|
46
47
|
};
|
|
48
|
+
export type CircleRatingLegendProps = {
|
|
49
|
+
ranges: CircleRatingRange[];
|
|
50
|
+
t: WithTranslation['t'];
|
|
51
|
+
isReverse?: boolean;
|
|
52
|
+
isPercentage?: boolean;
|
|
53
|
+
};
|
|
47
54
|
export type CircleRatingComponentProps = {
|
|
48
55
|
size: keyof typeof CircleRatingSize;
|
|
49
56
|
content?: CircleRatingContent | null;
|
|
50
57
|
progress: number;
|
|
51
58
|
ranges: CircleRatingRange[];
|
|
59
|
+
decimal?: number;
|
|
52
60
|
isColorless?: boolean;
|
|
53
61
|
isRatingDisabled?: boolean;
|
|
54
62
|
isShowLegend?: boolean;
|
|
55
63
|
isShowBreakPoints?: boolean;
|
|
56
64
|
isReverse?: boolean;
|
|
57
65
|
isZeroTransparent?: boolean;
|
|
66
|
+
className?: string;
|
|
58
67
|
};
|
|
59
68
|
export type CircleRatingContextProps = CircleRatingComponentProps & {
|
|
60
69
|
legend?: string[];
|