@fluentui/react-rating 9.4.3 → 9.74.3-experimental.esm.20260709-49ee7a20cf.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/CHANGELOG.md +16 -2
- package/dist/index.d.cts +350 -0
- package/lib/Rating.js +1 -1
- package/lib/Rating.js.map +1 -1
- package/lib/RatingDisplay.js +1 -1
- package/lib/RatingDisplay.js.map +1 -1
- package/lib/RatingItem.js +1 -1
- package/lib/RatingItem.js.map +1 -1
- package/lib/components/Rating/Rating.js +6 -6
- package/lib/components/Rating/Rating.js.map +1 -1
- package/lib/components/Rating/index.js +5 -5
- package/lib/components/Rating/index.js.map +1 -1
- package/lib/components/Rating/renderRating.js +2 -2
- package/lib/components/Rating/renderRating.js.map +1 -1
- package/lib/components/Rating/useRating.js +4 -4
- package/lib/components/Rating/useRating.js.map +1 -1
- package/lib/components/Rating/useRatingContextValues.js +1 -1
- package/lib/components/Rating/useRatingStyles.styles.js +1 -1
- package/lib/components/Rating/useRatingStyles.styles.js.map +1 -1
- package/lib/components/Rating/useRatingStyles.styles.raw.js +1 -1
- package/lib/components/RatingDisplay/RatingDisplay.js +6 -6
- package/lib/components/RatingDisplay/RatingDisplay.js.map +1 -1
- package/lib/components/RatingDisplay/index.js +5 -5
- package/lib/components/RatingDisplay/index.js.map +1 -1
- package/lib/components/RatingDisplay/renderRatingDisplay.js +2 -2
- package/lib/components/RatingDisplay/renderRatingDisplay.js.map +1 -1
- package/lib/components/RatingDisplay/useRatingDisplay.js +4 -4
- package/lib/components/RatingDisplay/useRatingDisplay.js.map +1 -1
- package/lib/components/RatingDisplay/useRatingDisplayContextValues.js +1 -1
- package/lib/components/RatingDisplay/useRatingDisplayStyles.styles.js +2 -2
- package/lib/components/RatingDisplay/useRatingDisplayStyles.styles.js.map +1 -1
- package/lib/components/RatingDisplay/useRatingDisplayStyles.styles.raw.js +2 -2
- package/lib/components/RatingItem/RatingItem.js +5 -5
- package/lib/components/RatingItem/RatingItem.js.map +1 -1
- package/lib/components/RatingItem/index.js +4 -4
- package/lib/components/RatingItem/index.js.map +1 -1
- package/lib/components/RatingItem/renderRatingItem.js +1 -1
- package/lib/components/RatingItem/useRatingItem.js +4 -4
- package/lib/components/RatingItem/useRatingItem.js.map +1 -1
- package/lib/components/RatingItem/useRatingItemStyles.styles.js +3 -3
- package/lib/components/RatingItem/useRatingItemStyles.styles.js.map +1 -1
- package/lib/components/RatingItem/useRatingItemStyles.styles.raw.js +3 -3
- package/lib/contexts/RatingItemContext.js +1 -1
- package/lib/contexts/index.js +1 -1
- package/lib/contexts/index.js.map +1 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib-commonjs/{Rating.js → Rating.cjs} +1 -1
- package/lib-commonjs/{Rating.js.map → Rating.cjs.map} +1 -1
- package/lib-commonjs/{RatingDisplay.js → RatingDisplay.cjs} +1 -1
- package/lib-commonjs/{RatingDisplay.js.map → RatingDisplay.cjs.map} +1 -1
- package/lib-commonjs/{RatingItem.js → RatingItem.cjs} +1 -1
- package/lib-commonjs/{RatingItem.js.map → RatingItem.cjs.map} +1 -1
- package/lib-commonjs/components/Rating/{Rating.js → Rating.cjs} +4 -4
- package/lib-commonjs/components/Rating/{Rating.js.map → Rating.cjs.map} +1 -1
- package/lib-commonjs/components/Rating/{index.js → index.cjs} +5 -5
- package/lib-commonjs/components/Rating/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/Rating/{renderRating.js → renderRating.cjs} +1 -1
- package/lib-commonjs/components/Rating/{renderRating.js.map → renderRating.cjs.map} +1 -1
- package/lib-commonjs/components/Rating/{useRating.js → useRating.cjs} +1 -1
- package/lib-commonjs/components/Rating/{useRating.js.map → useRating.cjs.map} +1 -1
- package/lib-commonjs/components/Rating/useRatingStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/RatingDisplay/{RatingDisplay.js → RatingDisplay.cjs} +4 -4
- package/lib-commonjs/components/RatingDisplay/{RatingDisplay.js.map → RatingDisplay.cjs.map} +1 -1
- package/lib-commonjs/components/RatingDisplay/{index.js → index.cjs} +5 -5
- package/lib-commonjs/components/RatingDisplay/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/RatingDisplay/{renderRatingDisplay.js → renderRatingDisplay.cjs} +1 -1
- package/lib-commonjs/components/RatingDisplay/{renderRatingDisplay.js.map → renderRatingDisplay.cjs.map} +1 -1
- package/lib-commonjs/components/RatingDisplay/{useRatingDisplay.js → useRatingDisplay.cjs} +1 -1
- package/lib-commonjs/components/RatingDisplay/{useRatingDisplay.js.map → useRatingDisplay.cjs.map} +1 -1
- package/lib-commonjs/components/RatingDisplay/useRatingDisplayStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/RatingItem/{RatingItem.js → RatingItem.cjs} +3 -3
- package/lib-commonjs/components/RatingItem/{RatingItem.js.map → RatingItem.cjs.map} +1 -1
- package/lib-commonjs/components/RatingItem/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/RatingItem/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/RatingItem/{useRatingItem.js → useRatingItem.cjs} +1 -1
- package/lib-commonjs/components/RatingItem/{useRatingItem.js.map → useRatingItem.cjs.map} +1 -1
- package/lib-commonjs/components/RatingItem/useRatingItemStyles.styles.cjs.map +1 -0
- package/lib-commonjs/contexts/{index.js → index.cjs} +1 -1
- package/lib-commonjs/contexts/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/{index.js → index.cjs} +4 -4
- package/lib-commonjs/{index.js.map → index.cjs.map} +1 -1
- package/package.json +19 -18
- package/lib-commonjs/components/Rating/useRatingStyles.styles.js.map +0 -1
- package/lib-commonjs/components/RatingDisplay/useRatingDisplayStyles.styles.js.map +0 -1
- package/lib-commonjs/components/RatingItem/useRatingItemStyles.styles.js.map +0 -1
- /package/lib-commonjs/components/Rating/{Rating.types.js → Rating.types.cjs} +0 -0
- /package/lib-commonjs/components/Rating/{Rating.types.js.map → Rating.types.cjs.map} +0 -0
- /package/lib-commonjs/components/Rating/{useRatingContextValues.js → useRatingContextValues.cjs} +0 -0
- /package/lib-commonjs/components/Rating/{useRatingContextValues.js.map → useRatingContextValues.cjs.map} +0 -0
- /package/lib-commonjs/components/Rating/{useRatingStyles.styles.js → useRatingStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/Rating/{useRatingStyles.styles.raw.js → useRatingStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/Rating/{useRatingStyles.styles.raw.js.map → useRatingStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/RatingDisplay/{RatingDisplay.types.js → RatingDisplay.types.cjs} +0 -0
- /package/lib-commonjs/components/RatingDisplay/{RatingDisplay.types.js.map → RatingDisplay.types.cjs.map} +0 -0
- /package/lib-commonjs/components/RatingDisplay/{useRatingDisplayContextValues.js → useRatingDisplayContextValues.cjs} +0 -0
- /package/lib-commonjs/components/RatingDisplay/{useRatingDisplayContextValues.js.map → useRatingDisplayContextValues.cjs.map} +0 -0
- /package/lib-commonjs/components/RatingDisplay/{useRatingDisplayStyles.styles.js → useRatingDisplayStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/RatingDisplay/{useRatingDisplayStyles.styles.raw.js → useRatingDisplayStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/RatingDisplay/{useRatingDisplayStyles.styles.raw.js.map → useRatingDisplayStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/RatingItem/{RatingItem.types.js → RatingItem.types.cjs} +0 -0
- /package/lib-commonjs/components/RatingItem/{RatingItem.types.js.map → RatingItem.types.cjs.map} +0 -0
- /package/lib-commonjs/components/RatingItem/{renderRatingItem.js → renderRatingItem.cjs} +0 -0
- /package/lib-commonjs/components/RatingItem/{renderRatingItem.js.map → renderRatingItem.cjs.map} +0 -0
- /package/lib-commonjs/components/RatingItem/{useRatingItemStyles.styles.js → useRatingItemStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/RatingItem/{useRatingItemStyles.styles.raw.js → useRatingItemStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/RatingItem/{useRatingItemStyles.styles.raw.js.map → useRatingItemStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/contexts/{RatingItemContext.js → RatingItemContext.cjs} +0 -0
- /package/lib-commonjs/contexts/{RatingItemContext.js.map → RatingItemContext.cjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-rating
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 09 Jul 2026 17:34:15 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.74.3-experimental.esm.20260709-49ee7a20cf.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-rating_v9.74.3-experimental.esm.20260709-49ee7a20cf.0)
|
|
8
|
+
|
|
9
|
+
Thu, 09 Jul 2026 17:34:15 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-rating_v9.4.3..@fluentui/react-rating_v9.74.3-experimental.esm.20260709-49ee7a20cf.0)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- Release 9.74.3-experimental.esm.20260709-49ee7a20cf ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
|
15
|
+
- Bump @fluentui/react-jsx-runtime to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
16
|
+
- Bump @fluentui/react-shared-contexts to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
17
|
+
- Bump @fluentui/react-theme to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
18
|
+
- Bump @fluentui/react-tabster to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
19
|
+
- Bump @fluentui/react-utilities to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
20
|
+
|
|
7
21
|
## [9.4.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-rating_v9.4.3)
|
|
8
22
|
|
|
9
|
-
Wed, 24 Jun 2026 11:
|
|
23
|
+
Wed, 24 Jun 2026 11:09:54 GMT
|
|
10
24
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-rating_v9.4.2..@fluentui/react-rating_v9.4.3)
|
|
11
25
|
|
|
12
26
|
### Patches
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
import type { ComponentProps } from '@fluentui/react-utilities';
|
|
2
|
+
import type { ComponentState } from '@fluentui/react-utilities';
|
|
3
|
+
import type { EventData } from '@fluentui/react-utilities';
|
|
4
|
+
import type { EventHandler } from '@fluentui/react-utilities';
|
|
5
|
+
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
6
|
+
import type { JSXElement } from '@fluentui/react-utilities';
|
|
7
|
+
import * as React_2 from 'react';
|
|
8
|
+
import type { Slot } from '@fluentui/react-utilities';
|
|
9
|
+
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Rating is a wrapper for one or more rating items that will be used to set a rating value.
|
|
13
|
+
*/
|
|
14
|
+
export declare const Rating: ForwardRefComponent<RatingProps>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Rating base props — excludes design props (color, size).
|
|
18
|
+
*/
|
|
19
|
+
export declare type RatingBaseProps = Omit<RatingProps, 'color' | 'size'>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Rating base state — excludes design props (color, size).
|
|
23
|
+
*/
|
|
24
|
+
export declare type RatingBaseState = Omit<RatingState, 'color' | 'size'>;
|
|
25
|
+
|
|
26
|
+
export declare const ratingClassNames: SlotClassNames<RatingSlots>;
|
|
27
|
+
|
|
28
|
+
export declare type RatingContextValues = {
|
|
29
|
+
ratingItem: RatingItemContextValue;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* RatingDisplay is a wrapper for one or more rating items that will be used to display a rating value
|
|
34
|
+
* as well as the label for the rating.
|
|
35
|
+
*/
|
|
36
|
+
export declare const RatingDisplay: ForwardRefComponent<RatingDisplayProps>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* RatingDisplay base props — excludes design props (color, size).
|
|
40
|
+
*/
|
|
41
|
+
export declare type RatingDisplayBaseProps = Omit<RatingDisplayProps, 'color' | 'size'>;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* RatingDisplay base state — excludes design props (color, size).
|
|
45
|
+
*/
|
|
46
|
+
export declare type RatingDisplayBaseState = Omit<RatingDisplayState, 'color' | 'size' | 'icon'> & Pick<RatingDisplayProps, 'icon'>;
|
|
47
|
+
|
|
48
|
+
export declare const ratingDisplayClassNames: SlotClassNames<RatingDisplaySlots>;
|
|
49
|
+
|
|
50
|
+
export declare type RatingDisplayContextValues = {
|
|
51
|
+
ratingItem: RatingItemContextValue;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* RatingDisplay Props
|
|
56
|
+
*/
|
|
57
|
+
export declare type RatingDisplayProps = ComponentProps<RatingDisplaySlots> & {
|
|
58
|
+
/**
|
|
59
|
+
* Color of the rating items (stars).
|
|
60
|
+
* @default neutral
|
|
61
|
+
*/
|
|
62
|
+
color?: 'brand' | 'marigold' | 'neutral';
|
|
63
|
+
/**
|
|
64
|
+
* Renders a single filled star, with the value written next to it.
|
|
65
|
+
* @default false
|
|
66
|
+
*/
|
|
67
|
+
compact?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* The number of ratings represented by the rating value.
|
|
70
|
+
* This will be formatted with a thousands separator (if applicable) and displayed next to the value.
|
|
71
|
+
*/
|
|
72
|
+
count?: number;
|
|
73
|
+
/**
|
|
74
|
+
* The icon used for rating items.
|
|
75
|
+
* @default StarFilled
|
|
76
|
+
*/
|
|
77
|
+
icon?: React_2.ElementType;
|
|
78
|
+
/**
|
|
79
|
+
* The max value of the rating. This controls the number of rating items displayed.
|
|
80
|
+
* Must be a whole number greater than 1.
|
|
81
|
+
* @default 5
|
|
82
|
+
*/
|
|
83
|
+
max?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Sets the size of the RatingDisplay items.
|
|
86
|
+
* @default medium
|
|
87
|
+
*/
|
|
88
|
+
size?: 'small' | 'medium' | 'large' | 'extra-large';
|
|
89
|
+
/**
|
|
90
|
+
* The value of the rating
|
|
91
|
+
*/
|
|
92
|
+
value?: number;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export declare type RatingDisplaySlots = {
|
|
96
|
+
root: NonNullable<Slot<'div'>>;
|
|
97
|
+
valueText?: Slot<'span'>;
|
|
98
|
+
countText?: Slot<'span'>;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* State used in rendering RatingDisplay
|
|
103
|
+
*/
|
|
104
|
+
export declare type RatingDisplayState = ComponentState<RatingDisplaySlots> & Required<Pick<RatingDisplayProps, 'color' | 'compact' | 'icon' | 'max' | 'size'>> & Pick<RatingDisplayProps, 'value'>;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* RatingItem is an item that will be used to set or display a rating value.
|
|
108
|
+
*/
|
|
109
|
+
export declare const RatingItem: ForwardRefComponent<RatingItemProps>;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* RatingItem base props — same as RatingItemProps (no design-only props at this level).
|
|
113
|
+
*/
|
|
114
|
+
export declare type RatingItemBaseProps = RatingItemProps;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* RatingItem base state — excludes design props (color, size) from context.
|
|
118
|
+
*/
|
|
119
|
+
export declare type RatingItemBaseState = Omit<RatingItemState, 'color' | 'size'>;
|
|
120
|
+
|
|
121
|
+
export declare const ratingItemClassNames: SlotClassNames<RatingItemSlots>;
|
|
122
|
+
|
|
123
|
+
declare type RatingItemContextValue = Partial<Pick<RatingState, 'name' | 'hoveredValue' | 'value'>> & Pick<RatingState, 'color' | 'iconFilled' | 'iconOutline' | 'itemLabel' | 'step' | 'size'> & Partial<Pick<RatingDisplayState, 'compact'>> & {
|
|
124
|
+
interactive?: boolean;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* RatingItem Props
|
|
129
|
+
*/
|
|
130
|
+
export declare type RatingItemProps = ComponentProps<Partial<RatingItemSlots>> & {
|
|
131
|
+
/**
|
|
132
|
+
* The positive whole number value that is displayed by this RatingItem
|
|
133
|
+
*/
|
|
134
|
+
value?: number;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export declare const RatingItemProvider: React_2.Provider<RatingItemContextValue | undefined>;
|
|
138
|
+
|
|
139
|
+
export declare type RatingItemSlots = {
|
|
140
|
+
/**
|
|
141
|
+
* The root slot of the RatingItem.
|
|
142
|
+
* Default html element is span
|
|
143
|
+
*/
|
|
144
|
+
root: NonNullable<Slot<'span'>>;
|
|
145
|
+
/**
|
|
146
|
+
* Icon displayed when the rating value is greater than or equal to the item's value.
|
|
147
|
+
*/
|
|
148
|
+
selectedIcon?: NonNullable<Slot<'div'>>;
|
|
149
|
+
/**
|
|
150
|
+
* Icon displayed when the rating value is less than the item's value.
|
|
151
|
+
*/
|
|
152
|
+
unselectedIcon?: NonNullable<Slot<'div'>>;
|
|
153
|
+
/**
|
|
154
|
+
* Radio input slot used for half star precision
|
|
155
|
+
*/
|
|
156
|
+
halfValueInput?: NonNullable<Slot<'input'>>;
|
|
157
|
+
/**
|
|
158
|
+
* Radio input slot used for full star precision
|
|
159
|
+
*/
|
|
160
|
+
fullValueInput?: NonNullable<Slot<'input'>>;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* State used in rendering RatingItem
|
|
165
|
+
*/
|
|
166
|
+
export declare type RatingItemState = ComponentState<RatingItemSlots> & Required<Pick<RatingItemProps, 'value'>> & Pick<RatingState, 'color' | 'step' | 'size'> & {
|
|
167
|
+
iconFillWidth: number;
|
|
168
|
+
appearance: 'outline' | 'filled';
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Data for the onChange event for Rating.
|
|
173
|
+
*/
|
|
174
|
+
export declare type RatingOnChangeEventData = EventData<'change', React_2.FormEvent<HTMLDivElement>> & {
|
|
175
|
+
/**
|
|
176
|
+
* The new value of the rating.
|
|
177
|
+
*/
|
|
178
|
+
value: number;
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Rating Props
|
|
183
|
+
*/
|
|
184
|
+
export declare type RatingProps = Omit<ComponentProps<Partial<RatingSlots>>, 'onChange'> & {
|
|
185
|
+
/**
|
|
186
|
+
* Controls the color of the Rating.
|
|
187
|
+
* @default neutral
|
|
188
|
+
*/
|
|
189
|
+
color?: 'brand' | 'marigold' | 'neutral';
|
|
190
|
+
/**
|
|
191
|
+
* Default value of the Rating
|
|
192
|
+
*/
|
|
193
|
+
defaultValue?: number;
|
|
194
|
+
/**
|
|
195
|
+
* The icon to display when the rating value is greater than or equal to the item's value.
|
|
196
|
+
*/
|
|
197
|
+
iconFilled?: React_2.ElementType;
|
|
198
|
+
/**
|
|
199
|
+
* The icon to display when the rating value is less than the item's value.
|
|
200
|
+
*/
|
|
201
|
+
iconOutline?: React_2.ElementType;
|
|
202
|
+
/**
|
|
203
|
+
* Prop to generate the aria-label for the rating inputs.
|
|
204
|
+
* @default (rating) =\> `${rating}`
|
|
205
|
+
*/
|
|
206
|
+
itemLabel?: (rating: number) => string;
|
|
207
|
+
/**
|
|
208
|
+
* The max value of the rating. This controls the number of rating items displayed.
|
|
209
|
+
* Must be a whole number greater than 1.
|
|
210
|
+
* @default 5
|
|
211
|
+
*/
|
|
212
|
+
max?: number;
|
|
213
|
+
/**
|
|
214
|
+
* Name for the Radio inputs. If not provided, one will be automatically generated
|
|
215
|
+
*/
|
|
216
|
+
name?: string;
|
|
217
|
+
/**
|
|
218
|
+
* Callback when the rating value is changed by the user.
|
|
219
|
+
*/
|
|
220
|
+
onChange?: EventHandler<RatingOnChangeEventData>;
|
|
221
|
+
/**
|
|
222
|
+
* Sets the precision to allow half-filled shapes in Rating
|
|
223
|
+
* @default 1
|
|
224
|
+
*/
|
|
225
|
+
step?: 0.5 | 1;
|
|
226
|
+
/**
|
|
227
|
+
* Sets the size of the Rating items.
|
|
228
|
+
* @default extra-large
|
|
229
|
+
*/
|
|
230
|
+
size?: 'small' | 'medium' | 'large' | 'extra-large';
|
|
231
|
+
/**
|
|
232
|
+
* The value of the rating
|
|
233
|
+
*/
|
|
234
|
+
value?: number;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
export declare type RatingSlots = {
|
|
238
|
+
root: NonNullable<Slot<'div'>>;
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* State used in rendering Rating
|
|
243
|
+
*/
|
|
244
|
+
export declare type RatingState = ComponentState<RatingSlots> & Required<Pick<RatingProps, 'color' | 'iconFilled' | 'iconOutline' | 'name' | 'step' | 'size' | 'value'>> & Pick<RatingProps, 'itemLabel'> & {
|
|
245
|
+
hoveredValue?: number | undefined;
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Render the final JSX of Rating
|
|
250
|
+
*/
|
|
251
|
+
export declare const renderRating_unstable: (state: RatingBaseState, contextValues: RatingContextValues) => JSXElement;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Render the final JSX of RatingDisplay
|
|
255
|
+
*/
|
|
256
|
+
export declare const renderRatingDisplay_unstable: (state: RatingDisplayBaseState, contextValues: RatingDisplayContextValues) => JSXElement;
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Render the final JSX of RatingItem
|
|
260
|
+
*/
|
|
261
|
+
export declare const renderRatingItem_unstable: (state: RatingItemBaseState) => JSXElement;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Create the state required to render Rating.
|
|
265
|
+
*
|
|
266
|
+
* The returned state can be modified with hooks such as useRatingStyles_unstable,
|
|
267
|
+
* before being passed to renderRating_unstable.
|
|
268
|
+
*
|
|
269
|
+
* @param props - props from this instance of Rating
|
|
270
|
+
* @param ref - reference to root HTMLElement of Rating
|
|
271
|
+
*/
|
|
272
|
+
export declare const useRating_unstable: (props: RatingProps, ref: React_2.Ref<HTMLDivElement>) => RatingState;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Base hook for Rating component. Manages state related to controlled/uncontrolled
|
|
276
|
+
* rating value, hover state, radiogroup ARIA role, and keyboard/mouse interaction —
|
|
277
|
+
* without design props (color, size).
|
|
278
|
+
*
|
|
279
|
+
* @param props - props from this instance of Rating (without color, size)
|
|
280
|
+
* @param ref - reference to root HTMLElement of Rating
|
|
281
|
+
*/
|
|
282
|
+
export declare const useRatingBase_unstable: (props: RatingBaseProps, ref: React_2.Ref<HTMLDivElement>) => RatingBaseState;
|
|
283
|
+
|
|
284
|
+
export declare const useRatingContextValues: (ratingState: RatingState) => RatingContextValues;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Create the state required to render RatingDisplay.
|
|
288
|
+
*
|
|
289
|
+
* The returned state can be modified with hooks such as useRatingDisplayStyles_unstable,
|
|
290
|
+
* before being passed to renderRatingDisplay_unstable.
|
|
291
|
+
*
|
|
292
|
+
* @param props - props from this instance of RatingDisplay
|
|
293
|
+
* @param ref - reference to root HTMLDivElement of RatingDisplay
|
|
294
|
+
*/
|
|
295
|
+
export declare const useRatingDisplay_unstable: (props: RatingDisplayProps, ref: React_2.Ref<HTMLDivElement>) => RatingDisplayState;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Base hook for RatingDisplay component. Manages state related to ARIA img role,
|
|
299
|
+
* aria-labelledby composition from valueText/countText IDs, slot structure, and
|
|
300
|
+
* compact/full display modes — without design props (color, size).
|
|
301
|
+
*
|
|
302
|
+
* @param props - props from this instance of RatingDisplay (without color, size)
|
|
303
|
+
* @param ref - reference to root HTMLDivElement of RatingDisplay
|
|
304
|
+
*/
|
|
305
|
+
export declare const useRatingDisplayBase_unstable: (props: RatingDisplayBaseProps, ref: React_2.Ref<HTMLDivElement>) => RatingDisplayBaseState;
|
|
306
|
+
|
|
307
|
+
export declare const useRatingDisplayContextValues: (state: RatingDisplayState) => RatingDisplayContextValues;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Apply styling to the RatingDisplay slots based on the state
|
|
311
|
+
*/
|
|
312
|
+
export declare const useRatingDisplayStyles_unstable: (state: RatingDisplayState) => RatingDisplayState;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Create the state required to render RatingItem.
|
|
316
|
+
*
|
|
317
|
+
* The returned state can be modified with hooks such as useRatingItemStyles_unstable,
|
|
318
|
+
* before being passed to renderRatingItem_unstable.
|
|
319
|
+
*
|
|
320
|
+
* @param props - props from this instance of RatingItem
|
|
321
|
+
* @param ref - reference to root HTMLElement of RatingItem
|
|
322
|
+
*/
|
|
323
|
+
export declare const useRatingItem_unstable: (props: RatingItemProps, ref: React_2.Ref<HTMLSpanElement>) => RatingItemState;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Base hook for RatingItem component. Manages state related to fill width calculation,
|
|
327
|
+
* radio input slots (for ARIA rating interaction), icon slots, and interactive mode —
|
|
328
|
+
* without design props (color, size from context).
|
|
329
|
+
*
|
|
330
|
+
* @param props - props from this instance of RatingItem
|
|
331
|
+
* @param ref - reference to root HTMLElement of RatingItem
|
|
332
|
+
*/
|
|
333
|
+
export declare const useRatingItemBase_unstable: (props: RatingItemBaseProps, ref: React_2.Ref<HTMLSpanElement>) => RatingItemBaseState;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Get the value of the RatingContext.
|
|
337
|
+
*/
|
|
338
|
+
export declare const useRatingItemContextValue_unstable: () => RatingItemContextValue;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Apply styling to the RatingItem slots based on the state
|
|
342
|
+
*/
|
|
343
|
+
export declare const useRatingItemStyles_unstable: (state: RatingItemState) => RatingItemState;
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Apply styling to the Rating slots based on the state
|
|
347
|
+
*/
|
|
348
|
+
export declare const useRatingStyles_unstable: (state: RatingState) => RatingState;
|
|
349
|
+
|
|
350
|
+
export { }
|
package/lib/Rating.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Rating, ratingClassNames, renderRating_unstable, useRatingContextValues, useRatingStyles_unstable, useRating_unstable, useRatingBase_unstable } from
|
|
1
|
+
export { Rating, ratingClassNames, renderRating_unstable, useRatingContextValues, useRatingStyles_unstable, useRating_unstable, useRatingBase_unstable } from "./components/Rating/index.js";
|
package/lib/Rating.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Rating.ts"],"sourcesContent":["export type {\n RatingContextValues,\n RatingOnChangeEventData,\n RatingProps,\n RatingBaseProps,\n RatingSlots,\n RatingState,\n RatingBaseState,\n} from './components/Rating/index';\nexport {\n Rating,\n ratingClassNames,\n renderRating_unstable,\n useRatingContextValues,\n useRatingStyles_unstable,\n useRating_unstable,\n useRatingBase_unstable,\n} from './components/Rating/index';\n"],"names":["Rating","ratingClassNames","renderRating_unstable","useRatingContextValues","useRatingStyles_unstable","useRating_unstable","useRatingBase_unstable"],"mappings":"AASA,SACEA,MAAM,EACNC,gBAAgB,EAChBC,qBAAqB,EACrBC,sBAAsB,EACtBC,wBAAwB,EACxBC,kBAAkB,EAClBC,sBAAsB,QACjB
|
|
1
|
+
{"version":3,"sources":["../src/Rating.ts"],"sourcesContent":["export type {\n RatingContextValues,\n RatingOnChangeEventData,\n RatingProps,\n RatingBaseProps,\n RatingSlots,\n RatingState,\n RatingBaseState,\n} from './components/Rating/index';\nexport {\n Rating,\n ratingClassNames,\n renderRating_unstable,\n useRatingContextValues,\n useRatingStyles_unstable,\n useRating_unstable,\n useRatingBase_unstable,\n} from './components/Rating/index';\n"],"names":["Rating","ratingClassNames","renderRating_unstable","useRatingContextValues","useRatingStyles_unstable","useRating_unstable","useRatingBase_unstable"],"mappings":"AASA,SACEA,MAAM,EACNC,gBAAgB,EAChBC,qBAAqB,EACrBC,sBAAsB,EACtBC,wBAAwB,EACxBC,kBAAkB,EAClBC,sBAAsB,QACjB,+BAA4B"}
|
package/lib/RatingDisplay.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { RatingDisplay, ratingDisplayClassNames, renderRatingDisplay_unstable, useRatingDisplayContextValues, useRatingDisplayStyles_unstable, useRatingDisplay_unstable, useRatingDisplayBase_unstable } from
|
|
1
|
+
export { RatingDisplay, ratingDisplayClassNames, renderRatingDisplay_unstable, useRatingDisplayContextValues, useRatingDisplayStyles_unstable, useRatingDisplay_unstable, useRatingDisplayBase_unstable } from "./components/RatingDisplay/index.js";
|
package/lib/RatingDisplay.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/RatingDisplay.ts"],"sourcesContent":["export type {\n RatingDisplayContextValues,\n RatingDisplayProps,\n RatingDisplayBaseProps,\n RatingDisplaySlots,\n RatingDisplayState,\n RatingDisplayBaseState,\n} from './components/RatingDisplay/index';\nexport {\n RatingDisplay,\n ratingDisplayClassNames,\n renderRatingDisplay_unstable,\n useRatingDisplayContextValues,\n useRatingDisplayStyles_unstable,\n useRatingDisplay_unstable,\n useRatingDisplayBase_unstable,\n} from './components/RatingDisplay/index';\n"],"names":["RatingDisplay","ratingDisplayClassNames","renderRatingDisplay_unstable","useRatingDisplayContextValues","useRatingDisplayStyles_unstable","useRatingDisplay_unstable","useRatingDisplayBase_unstable"],"mappings":"AAQA,SACEA,aAAa,EACbC,uBAAuB,EACvBC,4BAA4B,EAC5BC,6BAA6B,EAC7BC,+BAA+B,EAC/BC,yBAAyB,EACzBC,6BAA6B,QACxB,
|
|
1
|
+
{"version":3,"sources":["../src/RatingDisplay.ts"],"sourcesContent":["export type {\n RatingDisplayContextValues,\n RatingDisplayProps,\n RatingDisplayBaseProps,\n RatingDisplaySlots,\n RatingDisplayState,\n RatingDisplayBaseState,\n} from './components/RatingDisplay/index';\nexport {\n RatingDisplay,\n ratingDisplayClassNames,\n renderRatingDisplay_unstable,\n useRatingDisplayContextValues,\n useRatingDisplayStyles_unstable,\n useRatingDisplay_unstable,\n useRatingDisplayBase_unstable,\n} from './components/RatingDisplay/index';\n"],"names":["RatingDisplay","ratingDisplayClassNames","renderRatingDisplay_unstable","useRatingDisplayContextValues","useRatingDisplayStyles_unstable","useRatingDisplay_unstable","useRatingDisplayBase_unstable"],"mappings":"AAQA,SACEA,aAAa,EACbC,uBAAuB,EACvBC,4BAA4B,EAC5BC,6BAA6B,EAC7BC,+BAA+B,EAC/BC,yBAAyB,EACzBC,6BAA6B,QACxB,sCAAmC"}
|
package/lib/RatingItem.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { RatingItem, ratingItemClassNames, renderRatingItem_unstable, useRatingItemStyles_unstable, useRatingItem_unstable, useRatingItemBase_unstable } from
|
|
1
|
+
export { RatingItem, ratingItemClassNames, renderRatingItem_unstable, useRatingItemStyles_unstable, useRatingItem_unstable, useRatingItemBase_unstable } from "./components/RatingItem/index.js";
|
package/lib/RatingItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/RatingItem.ts"],"sourcesContent":["export type {\n RatingItemContextValue,\n RatingItemProps,\n RatingItemBaseProps,\n RatingItemSlots,\n RatingItemState,\n RatingItemBaseState,\n} from './components/RatingItem/index';\nexport {\n RatingItem,\n ratingItemClassNames,\n renderRatingItem_unstable,\n useRatingItemStyles_unstable,\n useRatingItem_unstable,\n useRatingItemBase_unstable,\n} from './components/RatingItem/index';\n"],"names":["RatingItem","ratingItemClassNames","renderRatingItem_unstable","useRatingItemStyles_unstable","useRatingItem_unstable","useRatingItemBase_unstable"],"mappings":"AAQA,SACEA,UAAU,EACVC,oBAAoB,EACpBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,sBAAsB,EACtBC,0BAA0B,QACrB,
|
|
1
|
+
{"version":3,"sources":["../src/RatingItem.ts"],"sourcesContent":["export type {\n RatingItemContextValue,\n RatingItemProps,\n RatingItemBaseProps,\n RatingItemSlots,\n RatingItemState,\n RatingItemBaseState,\n} from './components/RatingItem/index';\nexport {\n RatingItem,\n ratingItemClassNames,\n renderRatingItem_unstable,\n useRatingItemStyles_unstable,\n useRatingItem_unstable,\n useRatingItemBase_unstable,\n} from './components/RatingItem/index';\n"],"names":["RatingItem","ratingItemClassNames","renderRatingItem_unstable","useRatingItemStyles_unstable","useRatingItem_unstable","useRatingItemBase_unstable"],"mappings":"AAQA,SACEA,UAAU,EACVC,oBAAoB,EACpBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,sBAAsB,EACtBC,0BAA0B,QACrB,mCAAgC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { useRating_unstable } from
|
|
4
|
-
import { renderRating_unstable } from
|
|
5
|
-
import { useRatingStyles_unstable } from
|
|
6
|
-
import { useRatingContextValues } from
|
|
7
|
-
import { useCustomStyleHook_unstable } from
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { useRating_unstable } from "./useRating.js";
|
|
4
|
+
import { renderRating_unstable } from "./renderRating.js";
|
|
5
|
+
import { useRatingStyles_unstable } from "./useRatingStyles.styles.js";
|
|
6
|
+
import { useRatingContextValues } from "./useRatingContextValues.js";
|
|
7
|
+
import { useCustomStyleHook_unstable } from "@fluentui/react-shared-contexts";
|
|
8
8
|
/**
|
|
9
9
|
* Rating is a wrapper for one or more rating items that will be used to set a rating value.
|
|
10
10
|
*/ export const Rating = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Rating/Rating.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useRating_unstable } from './useRating';\nimport { renderRating_unstable } from './renderRating';\nimport { useRatingStyles_unstable } from './useRatingStyles.styles';\nimport type { RatingProps } from './Rating.types';\nimport { useRatingContextValues } from './useRatingContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Rating is a wrapper for one or more rating items that will be used to set a rating value.\n */\nexport const Rating: ForwardRefComponent<RatingProps> = React.forwardRef((props, ref) => {\n const state = useRating_unstable(props, ref);\n const contextValues = useRatingContextValues(state);\n\n useRatingStyles_unstable(state);\n useCustomStyleHook_unstable('useRatingStyles_unstable')(state);\n return renderRating_unstable(state, contextValues);\n});\n\nRating.displayName = 'Rating';\n"],"names":["React","useRating_unstable","renderRating_unstable","useRatingStyles_unstable","useRatingContextValues","useCustomStyleHook_unstable","Rating","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,kBAAkB,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/Rating/Rating.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useRating_unstable } from './useRating';\nimport { renderRating_unstable } from './renderRating';\nimport { useRatingStyles_unstable } from './useRatingStyles.styles';\nimport type { RatingProps } from './Rating.types';\nimport { useRatingContextValues } from './useRatingContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Rating is a wrapper for one or more rating items that will be used to set a rating value.\n */\nexport const Rating: ForwardRefComponent<RatingProps> = React.forwardRef((props, ref) => {\n const state = useRating_unstable(props, ref);\n const contextValues = useRatingContextValues(state);\n\n useRatingStyles_unstable(state);\n useCustomStyleHook_unstable('useRatingStyles_unstable')(state);\n return renderRating_unstable(state, contextValues);\n});\n\nRating.displayName = 'Rating';\n"],"names":["React","useRating_unstable","renderRating_unstable","useRatingStyles_unstable","useRatingContextValues","useCustomStyleHook_unstable","Rating","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,kBAAkB,QAAQ,iBAAc;AACjD,SAASC,qBAAqB,QAAQ,oBAAiB;AACvD,SAASC,wBAAwB,QAAQ,8BAA2B;AAEpE,SAASC,sBAAsB,QAAQ,8BAA2B;AAClE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,uBAA2CN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IAC/E,MAAMC,QAAQT,mBAAmBO,OAAOC;IACxC,MAAME,gBAAgBP,uBAAuBM;IAE7CP,yBAAyBO;IACzBL,4BAA4B,4BAA4BK;IACxD,OAAOR,sBAAsBQ,OAAOC;AACtC,GAAG;AAEHL,OAAOM,WAAW,GAAG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { Rating } from
|
|
2
|
-
export { renderRating_unstable } from
|
|
3
|
-
export { useRating_unstable, useRatingBase_unstable } from
|
|
4
|
-
export { ratingClassNames, useRatingStyles_unstable } from
|
|
5
|
-
export { useRatingContextValues } from
|
|
1
|
+
export { Rating } from "./Rating.js";
|
|
2
|
+
export { renderRating_unstable } from "./renderRating.js";
|
|
3
|
+
export { useRating_unstable, useRatingBase_unstable } from "./useRating.js";
|
|
4
|
+
export { ratingClassNames, useRatingStyles_unstable } from "./useRatingStyles.styles.js";
|
|
5
|
+
export { useRatingContextValues } from "./useRatingContextValues.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Rating/index.ts"],"sourcesContent":["export { Rating } from './Rating';\nexport type {\n RatingContextValues,\n RatingOnChangeEventData,\n RatingProps,\n RatingBaseProps,\n RatingSlots,\n RatingState,\n RatingBaseState,\n} from './Rating.types';\nexport { renderRating_unstable } from './renderRating';\nexport { useRating_unstable, useRatingBase_unstable } from './useRating';\nexport { ratingClassNames, useRatingStyles_unstable } from './useRatingStyles.styles';\nexport { useRatingContextValues } from './useRatingContextValues';\n"],"names":["Rating","renderRating_unstable","useRating_unstable","useRatingBase_unstable","ratingClassNames","useRatingStyles_unstable","useRatingContextValues"],"mappings":"AAAA,SAASA,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/Rating/index.ts"],"sourcesContent":["export { Rating } from './Rating';\nexport type {\n RatingContextValues,\n RatingOnChangeEventData,\n RatingProps,\n RatingBaseProps,\n RatingSlots,\n RatingState,\n RatingBaseState,\n} from './Rating.types';\nexport { renderRating_unstable } from './renderRating';\nexport { useRating_unstable, useRatingBase_unstable } from './useRating';\nexport { ratingClassNames, useRatingStyles_unstable } from './useRatingStyles.styles';\nexport { useRatingContextValues } from './useRatingContextValues';\n"],"names":["Rating","renderRating_unstable","useRating_unstable","useRatingBase_unstable","ratingClassNames","useRatingStyles_unstable","useRatingContextValues"],"mappings":"AAAA,SAASA,MAAM,QAAQ,cAAW;AAUlC,SAASC,qBAAqB,QAAQ,oBAAiB;AACvD,SAASC,kBAAkB,EAAEC,sBAAsB,QAAQ,iBAAc;AACzE,SAASC,gBAAgB,EAAEC,wBAAwB,QAAQ,8BAA2B;AACtF,SAASC,sBAAsB,QAAQ,8BAA2B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
-
import { assertSlots } from
|
|
3
|
-
import { RatingItemProvider } from
|
|
2
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
3
|
+
import { RatingItemProvider } from "../../contexts/RatingItemContext.js";
|
|
4
4
|
/**
|
|
5
5
|
* Render the final JSX of Rating
|
|
6
6
|
*/ export const renderRating_unstable = (state, contextValues)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Rating/renderRating.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { RatingBaseState, RatingSlots, RatingContextValues } from './Rating.types';\nimport { RatingItemProvider } from '../../contexts/RatingItemContext';\n\n/**\n * Render the final JSX of Rating\n */\nexport const renderRating_unstable = (state: RatingBaseState, contextValues: RatingContextValues): JSXElement => {\n assertSlots<RatingSlots>(state);\n\n return (\n <RatingItemProvider value={contextValues.ratingItem}>\n <state.root />\n </RatingItemProvider>\n );\n};\n"],"names":["assertSlots","RatingItemProvider","renderRating_unstable","state","contextValues","value","ratingItem","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD,SAASC,kBAAkB,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/Rating/renderRating.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { RatingBaseState, RatingSlots, RatingContextValues } from './Rating.types';\nimport { RatingItemProvider } from '../../contexts/RatingItemContext';\n\n/**\n * Render the final JSX of Rating\n */\nexport const renderRating_unstable = (state: RatingBaseState, contextValues: RatingContextValues): JSXElement => {\n assertSlots<RatingSlots>(state);\n\n return (\n <RatingItemProvider value={contextValues.ratingItem}>\n <state.root />\n </RatingItemProvider>\n );\n};\n"],"names":["assertSlots","RatingItemProvider","renderRating_unstable","state","contextValues","value","ratingItem","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD,SAASC,kBAAkB,QAAQ,sCAAmC;AAEtE;;CAEC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAwBC;IAC5DJ,YAAyBG;IAEzB,qBACE,KAACF;QAAmBI,OAAOD,cAAcE,UAAU;kBACjD,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { getIntrinsicElementProps, isHTMLElement, mergeCallbacks, slot, useControllableState, useId } from
|
|
4
|
-
import { RatingItem } from
|
|
5
|
-
import { StarFilled, StarRegular } from
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { getIntrinsicElementProps, isHTMLElement, mergeCallbacks, slot, useControllableState, useId } from "@fluentui/react-utilities";
|
|
4
|
+
import { RatingItem } from "../../RatingItem.js";
|
|
5
|
+
import { StarFilled, StarRegular } from "@fluentui/react-icons";
|
|
6
6
|
/**
|
|
7
7
|
* Create the state required to render Rating.
|
|
8
8
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Rating/useRating.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n getIntrinsicElementProps,\n isHTMLElement,\n mergeCallbacks,\n slot,\n useControllableState,\n useId,\n} from '@fluentui/react-utilities';\nimport type { RatingBaseProps, RatingBaseState, RatingProps, RatingState } from './Rating.types';\nimport { RatingItem } from '../../RatingItem';\nimport { StarFilled, StarRegular } from '@fluentui/react-icons';\n\n/**\n * Create the state required to render Rating.\n *\n * The returned state can be modified with hooks such as useRatingStyles_unstable,\n * before being passed to renderRating_unstable.\n *\n * @param props - props from this instance of Rating\n * @param ref - reference to root HTMLElement of Rating\n */\nexport const useRating_unstable = (props: RatingProps, ref: React.Ref<HTMLDivElement>): RatingState => {\n const {\n color = 'neutral',\n size = 'extra-large',\n iconFilled = StarFilled,\n iconOutline = StarRegular,\n max = 5,\n ...baseProps\n } = props;\n const state = useRatingBase_unstable({ iconFilled, iconOutline, ...baseProps }, ref);\n\n // Generate the child RatingItems and memoize them to prevent unnecessary re-rendering\n const rootChildren = React.useMemo(() => {\n return Array.from(Array(max), (_, i) => <RatingItem value={i + 1} key={i + 1} />);\n }, [max]);\n\n state.root.children ??= rootChildren;\n\n return {\n ...state,\n color,\n size,\n };\n};\n\n/**\n * Base hook for Rating component. Manages state related to controlled/uncontrolled\n * rating value, hover state, radiogroup ARIA role, and keyboard/mouse interaction —\n * without design props (color, size).\n *\n * @param props - props from this instance of Rating (without color, size)\n * @param ref - reference to root HTMLElement of Rating\n */\nexport const useRatingBase_unstable = (props: RatingBaseProps, ref: React.Ref<HTMLDivElement>): RatingBaseState => {\n const generatedName = useId('rating-');\n const { iconFilled = 'span', iconOutline = 'span', name = generatedName, onChange, step = 1, itemLabel } = props;\n\n const [value, setValue] = useControllableState({\n state: props.value,\n defaultState: props.defaultValue,\n initialState: 0,\n });\n\n const isRatingRadioItem = (target: EventTarget): target is HTMLInputElement =>\n isHTMLElement(target, { constructorName: 'HTMLInputElement' }) && target.type === 'radio' && target.name === name;\n\n const [hoveredValue, setHoveredValue] = React.useState<number | undefined>(undefined);\n const state: RatingBaseState = {\n iconFilled,\n iconOutline,\n name,\n step,\n itemLabel,\n value,\n hoveredValue,\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps(\n 'div',\n {\n ref,\n role: 'radiogroup',\n ...props,\n },\n ['onChange'],\n ),\n { elementType: 'div' },\n ),\n };\n\n state.root.onChange = ev => {\n if (isRatingRadioItem(ev.target)) {\n const newValue = parseFloat(ev.target.value);\n if (!isNaN(newValue)) {\n setValue(newValue);\n onChange?.(ev, { type: 'change', event: ev, value: newValue });\n }\n }\n };\n state.root.onMouseOver = mergeCallbacks(props.onMouseOver, ev => {\n if (isRatingRadioItem(ev.target)) {\n const newValue = parseFloat(ev.target.value);\n if (!isNaN(newValue)) {\n setHoveredValue(newValue);\n }\n }\n });\n state.root.onMouseLeave = mergeCallbacks(props.onMouseLeave, ev => {\n setHoveredValue(undefined);\n });\n\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","isHTMLElement","mergeCallbacks","slot","useControllableState","useId","RatingItem","StarFilled","StarRegular","useRating_unstable","props","ref","state","color","size","iconFilled","iconOutline","max","baseProps","useRatingBase_unstable","rootChildren","useMemo","Array","from","_","i","value","key","root","children","generatedName","name","onChange","step","itemLabel","setValue","defaultState","defaultValue","initialState","isRatingRadioItem","target","constructorName","type","hoveredValue","setHoveredValue","useState","undefined","components","always","role","elementType","ev","newValue","parseFloat","isNaN","event","onMouseOver","onMouseLeave"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,wBAAwB,EACxBC,aAAa,EACbC,cAAc,EACdC,IAAI,EACJC,oBAAoB,EACpBC,KAAK,QACA,4BAA4B;AAEnC,SAASC,UAAU,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/Rating/useRating.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n getIntrinsicElementProps,\n isHTMLElement,\n mergeCallbacks,\n slot,\n useControllableState,\n useId,\n} from '@fluentui/react-utilities';\nimport type { RatingBaseProps, RatingBaseState, RatingProps, RatingState } from './Rating.types';\nimport { RatingItem } from '../../RatingItem';\nimport { StarFilled, StarRegular } from '@fluentui/react-icons';\n\n/**\n * Create the state required to render Rating.\n *\n * The returned state can be modified with hooks such as useRatingStyles_unstable,\n * before being passed to renderRating_unstable.\n *\n * @param props - props from this instance of Rating\n * @param ref - reference to root HTMLElement of Rating\n */\nexport const useRating_unstable = (props: RatingProps, ref: React.Ref<HTMLDivElement>): RatingState => {\n const {\n color = 'neutral',\n size = 'extra-large',\n iconFilled = StarFilled,\n iconOutline = StarRegular,\n max = 5,\n ...baseProps\n } = props;\n const state = useRatingBase_unstable({ iconFilled, iconOutline, ...baseProps }, ref);\n\n // Generate the child RatingItems and memoize them to prevent unnecessary re-rendering\n const rootChildren = React.useMemo(() => {\n return Array.from(Array(max), (_, i) => <RatingItem value={i + 1} key={i + 1} />);\n }, [max]);\n\n state.root.children ??= rootChildren;\n\n return {\n ...state,\n color,\n size,\n };\n};\n\n/**\n * Base hook for Rating component. Manages state related to controlled/uncontrolled\n * rating value, hover state, radiogroup ARIA role, and keyboard/mouse interaction —\n * without design props (color, size).\n *\n * @param props - props from this instance of Rating (without color, size)\n * @param ref - reference to root HTMLElement of Rating\n */\nexport const useRatingBase_unstable = (props: RatingBaseProps, ref: React.Ref<HTMLDivElement>): RatingBaseState => {\n const generatedName = useId('rating-');\n const { iconFilled = 'span', iconOutline = 'span', name = generatedName, onChange, step = 1, itemLabel } = props;\n\n const [value, setValue] = useControllableState({\n state: props.value,\n defaultState: props.defaultValue,\n initialState: 0,\n });\n\n const isRatingRadioItem = (target: EventTarget): target is HTMLInputElement =>\n isHTMLElement(target, { constructorName: 'HTMLInputElement' }) && target.type === 'radio' && target.name === name;\n\n const [hoveredValue, setHoveredValue] = React.useState<number | undefined>(undefined);\n const state: RatingBaseState = {\n iconFilled,\n iconOutline,\n name,\n step,\n itemLabel,\n value,\n hoveredValue,\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps(\n 'div',\n {\n ref,\n role: 'radiogroup',\n ...props,\n },\n ['onChange'],\n ),\n { elementType: 'div' },\n ),\n };\n\n state.root.onChange = ev => {\n if (isRatingRadioItem(ev.target)) {\n const newValue = parseFloat(ev.target.value);\n if (!isNaN(newValue)) {\n setValue(newValue);\n onChange?.(ev, { type: 'change', event: ev, value: newValue });\n }\n }\n };\n state.root.onMouseOver = mergeCallbacks(props.onMouseOver, ev => {\n if (isRatingRadioItem(ev.target)) {\n const newValue = parseFloat(ev.target.value);\n if (!isNaN(newValue)) {\n setHoveredValue(newValue);\n }\n }\n });\n state.root.onMouseLeave = mergeCallbacks(props.onMouseLeave, ev => {\n setHoveredValue(undefined);\n });\n\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","isHTMLElement","mergeCallbacks","slot","useControllableState","useId","RatingItem","StarFilled","StarRegular","useRating_unstable","props","ref","state","color","size","iconFilled","iconOutline","max","baseProps","useRatingBase_unstable","rootChildren","useMemo","Array","from","_","i","value","key","root","children","generatedName","name","onChange","step","itemLabel","setValue","defaultState","defaultValue","initialState","isRatingRadioItem","target","constructorName","type","hoveredValue","setHoveredValue","useState","undefined","components","always","role","elementType","ev","newValue","parseFloat","isNaN","event","onMouseOver","onMouseLeave"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,wBAAwB,EACxBC,aAAa,EACbC,cAAc,EACdC,IAAI,EACJC,oBAAoB,EACpBC,KAAK,QACA,4BAA4B;AAEnC,SAASC,UAAU,QAAQ,sBAAmB;AAC9C,SAASC,UAAU,EAAEC,WAAW,QAAQ,wBAAwB;AAEhE;;;;;;;;CAQC,GACD,OAAO,MAAMC,qBAAqB,CAACC,OAAoBC;QAgBrDC;IAfA,MAAM,EACJC,QAAQ,SAAS,EACjBC,OAAO,aAAa,EACpBC,aAAaR,UAAU,EACvBS,cAAcR,WAAW,EACzBS,MAAM,CAAC,EACP,GAAGC,WACJ,GAAGR;IACJ,MAAME,QAAQO,uBAAuB;QAAEJ;QAAYC;QAAa,GAAGE,SAAS;IAAC,GAAGP;IAEhF,sFAAsF;IACtF,MAAMS,eAAerB,MAAMsB,OAAO,CAAC;QACjC,OAAOC,MAAMC,IAAI,CAACD,MAAML,MAAM,CAACO,GAAGC,kBAAM,oBAACnB;gBAAWoB,OAAOD,IAAI;gBAAGE,KAAKF,IAAI;;IAC7E,GAAG;QAACR;KAAI;;IAERL,cAAAA,cAAAA,MAAMgB,IAAI,EAACC,yDAAXjB,YAAWiB,WAAaT;IAExB,OAAO;QACL,GAAGR,KAAK;QACRC;QACAC;IACF;AACF,EAAE;AAEF;;;;;;;CAOC,GACD,OAAO,MAAMK,yBAAyB,CAACT,OAAwBC;IAC7D,MAAMmB,gBAAgBzB,MAAM;IAC5B,MAAM,EAAEU,aAAa,MAAM,EAAEC,cAAc,MAAM,EAAEe,OAAOD,aAAa,EAAEE,QAAQ,EAAEC,OAAO,CAAC,EAAEC,SAAS,EAAE,GAAGxB;IAE3G,MAAM,CAACgB,OAAOS,SAAS,GAAG/B,qBAAqB;QAC7CQ,OAAOF,MAAMgB,KAAK;QAClBU,cAAc1B,MAAM2B,YAAY;QAChCC,cAAc;IAChB;IAEA,MAAMC,oBAAoB,CAACC,SACzBvC,cAAcuC,QAAQ;YAAEC,iBAAiB;QAAmB,MAAMD,OAAOE,IAAI,KAAK,WAAWF,OAAOT,IAAI,KAAKA;IAE/G,MAAM,CAACY,cAAcC,gBAAgB,GAAG7C,MAAM8C,QAAQ,CAAqBC;IAC3E,MAAMlC,QAAyB;QAC7BG;QACAC;QACAe;QACAE;QACAC;QACAR;QACAiB;QACAI,YAAY;YACVnB,MAAM;QACR;QACAA,MAAMzB,KAAK6C,MAAM,CACfhD,yBACE,OACA;YACEW;YACAsC,MAAM;YACN,GAAGvC,KAAK;QACV,GACA;YAAC;SAAW,GAEd;YAAEwC,aAAa;QAAM;IAEzB;IAEAtC,MAAMgB,IAAI,CAACI,QAAQ,GAAGmB,CAAAA;QACpB,IAAIZ,kBAAkBY,GAAGX,MAAM,GAAG;YAChC,MAAMY,WAAWC,WAAWF,GAAGX,MAAM,CAACd,KAAK;YAC3C,IAAI,CAAC4B,MAAMF,WAAW;gBACpBjB,SAASiB;gBACTpB,qBAAAA,+BAAAA,SAAWmB,IAAI;oBAAET,MAAM;oBAAUa,OAAOJ;oBAAIzB,OAAO0B;gBAAS;YAC9D;QACF;IACF;IACAxC,MAAMgB,IAAI,CAAC4B,WAAW,GAAGtD,eAAeQ,MAAM8C,WAAW,EAAEL,CAAAA;QACzD,IAAIZ,kBAAkBY,GAAGX,MAAM,GAAG;YAChC,MAAMY,WAAWC,WAAWF,GAAGX,MAAM,CAACd,KAAK;YAC3C,IAAI,CAAC4B,MAAMF,WAAW;gBACpBR,gBAAgBQ;YAClB;QACF;IACF;IACAxC,MAAMgB,IAAI,CAAC6B,YAAY,GAAGvD,eAAeQ,MAAM+C,YAAY,EAAEN,CAAAA;QAC3DP,gBAAgBE;IAClB;IAEA,OAAOlC;AACT,EAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
export const useRatingContextValues = (ratingState)=>{
|
|
4
4
|
const { color, hoveredValue, iconFilled, iconOutline, itemLabel, name, step, size, value } = ratingState;
|
|
5
5
|
const ratingItem = React.useMemo(()=>({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__resetStyles","mergeClasses","ratingClassNames","root","useRootClassName","useRatingStyles_unstable","state","rootClassName","className"],"sources":["useRatingStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, mergeClasses } from
|
|
1
|
+
{"version":3,"names":["__resetStyles","mergeClasses","ratingClassNames","root","useRootClassName","useRatingStyles_unstable","state","rootClassName","className"],"sources":["useRatingStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, mergeClasses } from \"@griffel/react\";\nexport const ratingClassNames = {\n root: 'fui-Rating'\n};\n/**\n * Styles for the root slot\n */ const useRootClassName = makeResetStyles({\n display: 'flex',\n flexWrap: 'wrap'\n});\n/**\n * Apply styling to the Rating slots based on the state\n */ export const useRatingStyles_unstable = (state)=>{\n const rootClassName = useRootClassName();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(ratingClassNames.root, rootClassName, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,aAAA,EAA0BC,YAAY,QAAQ,gBAAgB;AAC9D,OAAO,MAAMC,gBAAgB,GAAG;EAC5BC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,gBAAgB,gBAAGJ,aAAA,4DAG5B,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMK,wBAAwB,GAAIC,KAAK,IAAG;EACjD,MAAMC,aAAa,GAAGH,gBAAgB,CAAC,CAAC;EACxC;EACAE,KAAK,CAACH,IAAI,CAACK,SAAS,GAAGP,YAAY,CAACC,gBAAgB,CAACC,IAAI,EAAEI,aAAa,EAAED,KAAK,CAACH,IAAI,CAACK,SAAS,CAAC;EAC/F,OAAOF,KAAK;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { useRatingDisplay_unstable } from
|
|
4
|
-
import { renderRatingDisplay_unstable } from
|
|
5
|
-
import { useRatingDisplayStyles_unstable } from
|
|
6
|
-
import { useRatingDisplayContextValues } from
|
|
7
|
-
import { useCustomStyleHook_unstable } from
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { useRatingDisplay_unstable } from "./useRatingDisplay.js";
|
|
4
|
+
import { renderRatingDisplay_unstable } from "./renderRatingDisplay.js";
|
|
5
|
+
import { useRatingDisplayStyles_unstable } from "./useRatingDisplayStyles.styles.js";
|
|
6
|
+
import { useRatingDisplayContextValues } from "./useRatingDisplayContextValues.js";
|
|
7
|
+
import { useCustomStyleHook_unstable } from "@fluentui/react-shared-contexts";
|
|
8
8
|
/**
|
|
9
9
|
* RatingDisplay is a wrapper for one or more rating items that will be used to display a rating value
|
|
10
10
|
* as well as the label for the rating.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/RatingDisplay/RatingDisplay.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useRatingDisplay_unstable } from './useRatingDisplay';\nimport { renderRatingDisplay_unstable } from './renderRatingDisplay';\nimport { useRatingDisplayStyles_unstable } from './useRatingDisplayStyles.styles';\nimport type { RatingDisplayProps } from './RatingDisplay.types';\nimport { useRatingDisplayContextValues } from './useRatingDisplayContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * RatingDisplay is a wrapper for one or more rating items that will be used to display a rating value\n * as well as the label for the rating.\n */\nexport const RatingDisplay: ForwardRefComponent<RatingDisplayProps> = React.forwardRef((props, ref) => {\n const state = useRatingDisplay_unstable(props, ref);\n const contextValues = useRatingDisplayContextValues(state);\n\n useRatingDisplayStyles_unstable(state);\n useCustomStyleHook_unstable('useRatingDisplayStyles_unstable')(state);\n\n return renderRatingDisplay_unstable(state, contextValues);\n});\n\nRatingDisplay.displayName = 'RatingDisplay';\n"],"names":["React","useRatingDisplay_unstable","renderRatingDisplay_unstable","useRatingDisplayStyles_unstable","useRatingDisplayContextValues","useCustomStyleHook_unstable","RatingDisplay","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,yBAAyB,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/RatingDisplay/RatingDisplay.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useRatingDisplay_unstable } from './useRatingDisplay';\nimport { renderRatingDisplay_unstable } from './renderRatingDisplay';\nimport { useRatingDisplayStyles_unstable } from './useRatingDisplayStyles.styles';\nimport type { RatingDisplayProps } from './RatingDisplay.types';\nimport { useRatingDisplayContextValues } from './useRatingDisplayContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * RatingDisplay is a wrapper for one or more rating items that will be used to display a rating value\n * as well as the label for the rating.\n */\nexport const RatingDisplay: ForwardRefComponent<RatingDisplayProps> = React.forwardRef((props, ref) => {\n const state = useRatingDisplay_unstable(props, ref);\n const contextValues = useRatingDisplayContextValues(state);\n\n useRatingDisplayStyles_unstable(state);\n useCustomStyleHook_unstable('useRatingDisplayStyles_unstable')(state);\n\n return renderRatingDisplay_unstable(state, contextValues);\n});\n\nRatingDisplay.displayName = 'RatingDisplay';\n"],"names":["React","useRatingDisplay_unstable","renderRatingDisplay_unstable","useRatingDisplayStyles_unstable","useRatingDisplayContextValues","useCustomStyleHook_unstable","RatingDisplay","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,yBAAyB,QAAQ,wBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,2BAAwB;AACrE,SAASC,+BAA+B,QAAQ,qCAAkC;AAElF,SAASC,6BAA6B,QAAQ,qCAAkC;AAChF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,8BAAyDN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQT,0BAA0BO,OAAOC;IAC/C,MAAME,gBAAgBP,8BAA8BM;IAEpDP,gCAAgCO;IAChCL,4BAA4B,mCAAmCK;IAE/D,OAAOR,6BAA6BQ,OAAOC;AAC7C,GAAG;AAEHL,cAAcM,WAAW,GAAG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { RatingDisplay } from
|
|
2
|
-
export { renderRatingDisplay_unstable } from
|
|
3
|
-
export { useRatingDisplay_unstable, useRatingDisplayBase_unstable } from
|
|
4
|
-
export { ratingDisplayClassNames, useRatingDisplayStyles_unstable } from
|
|
5
|
-
export { useRatingDisplayContextValues } from
|
|
1
|
+
export { RatingDisplay } from "./RatingDisplay.js";
|
|
2
|
+
export { renderRatingDisplay_unstable } from "./renderRatingDisplay.js";
|
|
3
|
+
export { useRatingDisplay_unstable, useRatingDisplayBase_unstable } from "./useRatingDisplay.js";
|
|
4
|
+
export { ratingDisplayClassNames, useRatingDisplayStyles_unstable } from "./useRatingDisplayStyles.styles.js";
|
|
5
|
+
export { useRatingDisplayContextValues } from "./useRatingDisplayContextValues.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/RatingDisplay/index.ts"],"sourcesContent":["export { RatingDisplay } from './RatingDisplay';\nexport type {\n RatingDisplayContextValues,\n RatingDisplayProps,\n RatingDisplayBaseProps,\n RatingDisplaySlots,\n RatingDisplayState,\n RatingDisplayBaseState,\n} from './RatingDisplay.types';\nexport { renderRatingDisplay_unstable } from './renderRatingDisplay';\nexport { useRatingDisplay_unstable, useRatingDisplayBase_unstable } from './useRatingDisplay';\nexport { ratingDisplayClassNames, useRatingDisplayStyles_unstable } from './useRatingDisplayStyles.styles';\nexport { useRatingDisplayContextValues } from './useRatingDisplayContextValues';\n"],"names":["RatingDisplay","renderRatingDisplay_unstable","useRatingDisplay_unstable","useRatingDisplayBase_unstable","ratingDisplayClassNames","useRatingDisplayStyles_unstable","useRatingDisplayContextValues"],"mappings":"AAAA,SAASA,aAAa,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/RatingDisplay/index.ts"],"sourcesContent":["export { RatingDisplay } from './RatingDisplay';\nexport type {\n RatingDisplayContextValues,\n RatingDisplayProps,\n RatingDisplayBaseProps,\n RatingDisplaySlots,\n RatingDisplayState,\n RatingDisplayBaseState,\n} from './RatingDisplay.types';\nexport { renderRatingDisplay_unstable } from './renderRatingDisplay';\nexport { useRatingDisplay_unstable, useRatingDisplayBase_unstable } from './useRatingDisplay';\nexport { ratingDisplayClassNames, useRatingDisplayStyles_unstable } from './useRatingDisplayStyles.styles';\nexport { useRatingDisplayContextValues } from './useRatingDisplayContextValues';\n"],"names":["RatingDisplay","renderRatingDisplay_unstable","useRatingDisplay_unstable","useRatingDisplayBase_unstable","ratingDisplayClassNames","useRatingDisplayStyles_unstable","useRatingDisplayContextValues"],"mappings":"AAAA,SAASA,aAAa,QAAQ,qBAAkB;AAShD,SAASC,4BAA4B,QAAQ,2BAAwB;AACrE,SAASC,yBAAyB,EAAEC,6BAA6B,QAAQ,wBAAqB;AAC9F,SAASC,uBAAuB,EAAEC,+BAA+B,QAAQ,qCAAkC;AAC3G,SAASC,6BAA6B,QAAQ,qCAAkC"}
|