@fluentui/react-rating 9.4.2 → 9.4.4

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.
Files changed (115) hide show
  1. package/CHANGELOG.md +28 -2
  2. package/dist/index.d.cts +350 -0
  3. package/lib/Rating.js +1 -1
  4. package/lib/Rating.js.map +1 -1
  5. package/lib/RatingDisplay.js +1 -1
  6. package/lib/RatingDisplay.js.map +1 -1
  7. package/lib/RatingItem.js +1 -1
  8. package/lib/RatingItem.js.map +1 -1
  9. package/lib/components/Rating/Rating.js +6 -6
  10. package/lib/components/Rating/Rating.js.map +1 -1
  11. package/lib/components/Rating/index.js +5 -5
  12. package/lib/components/Rating/index.js.map +1 -1
  13. package/lib/components/Rating/renderRating.js +2 -2
  14. package/lib/components/Rating/renderRating.js.map +1 -1
  15. package/lib/components/Rating/useRating.js +4 -4
  16. package/lib/components/Rating/useRating.js.map +1 -1
  17. package/lib/components/Rating/useRatingContextValues.js +1 -1
  18. package/lib/components/Rating/useRatingStyles.styles.js +1 -3
  19. package/lib/components/Rating/useRatingStyles.styles.js.map +1 -1
  20. package/lib/components/Rating/useRatingStyles.styles.raw.js +1 -2
  21. package/lib/components/Rating/useRatingStyles.styles.raw.js.map +1 -1
  22. package/lib/components/RatingDisplay/RatingDisplay.js +6 -6
  23. package/lib/components/RatingDisplay/RatingDisplay.js.map +1 -1
  24. package/lib/components/RatingDisplay/index.js +5 -5
  25. package/lib/components/RatingDisplay/index.js.map +1 -1
  26. package/lib/components/RatingDisplay/renderRatingDisplay.js +2 -2
  27. package/lib/components/RatingDisplay/renderRatingDisplay.js.map +1 -1
  28. package/lib/components/RatingDisplay/useRatingDisplay.js +4 -4
  29. package/lib/components/RatingDisplay/useRatingDisplay.js.map +1 -1
  30. package/lib/components/RatingDisplay/useRatingDisplayContextValues.js +1 -1
  31. package/lib/components/RatingDisplay/useRatingDisplayStyles.styles.js +2 -4
  32. package/lib/components/RatingDisplay/useRatingDisplayStyles.styles.js.map +1 -1
  33. package/lib/components/RatingDisplay/useRatingDisplayStyles.styles.raw.js +2 -3
  34. package/lib/components/RatingDisplay/useRatingDisplayStyles.styles.raw.js.map +1 -1
  35. package/lib/components/RatingItem/RatingItem.js +5 -5
  36. package/lib/components/RatingItem/RatingItem.js.map +1 -1
  37. package/lib/components/RatingItem/index.js +4 -4
  38. package/lib/components/RatingItem/index.js.map +1 -1
  39. package/lib/components/RatingItem/renderRatingItem.js +1 -1
  40. package/lib/components/RatingItem/useRatingItem.js +4 -4
  41. package/lib/components/RatingItem/useRatingItem.js.map +1 -1
  42. package/lib/components/RatingItem/useRatingItemStyles.styles.js +3 -5
  43. package/lib/components/RatingItem/useRatingItemStyles.styles.js.map +1 -1
  44. package/lib/components/RatingItem/useRatingItemStyles.styles.raw.js +3 -4
  45. package/lib/components/RatingItem/useRatingItemStyles.styles.raw.js.map +1 -1
  46. package/lib/contexts/RatingItemContext.js +1 -1
  47. package/lib/contexts/index.js +1 -1
  48. package/lib/contexts/index.js.map +1 -1
  49. package/lib/index.js +4 -4
  50. package/lib/index.js.map +1 -1
  51. package/lib-commonjs/{Rating.js → Rating.cjs} +1 -1
  52. package/lib-commonjs/{Rating.js.map → Rating.cjs.map} +1 -1
  53. package/lib-commonjs/{RatingDisplay.js → RatingDisplay.cjs} +1 -1
  54. package/lib-commonjs/{RatingDisplay.js.map → RatingDisplay.cjs.map} +1 -1
  55. package/lib-commonjs/{RatingItem.js → RatingItem.cjs} +1 -1
  56. package/lib-commonjs/{RatingItem.js.map → RatingItem.cjs.map} +1 -1
  57. package/lib-commonjs/components/Rating/{Rating.js → Rating.cjs} +4 -4
  58. package/lib-commonjs/components/Rating/{Rating.js.map → Rating.cjs.map} +1 -1
  59. package/lib-commonjs/components/Rating/{index.js → index.cjs} +5 -5
  60. package/lib-commonjs/components/Rating/{index.js.map → index.cjs.map} +1 -1
  61. package/lib-commonjs/components/Rating/{renderRating.js → renderRating.cjs} +1 -1
  62. package/lib-commonjs/components/Rating/{renderRating.js.map → renderRating.cjs.map} +1 -1
  63. package/lib-commonjs/components/Rating/{useRating.js → useRating.cjs} +1 -1
  64. package/lib-commonjs/components/Rating/{useRating.js.map → useRating.cjs.map} +1 -1
  65. package/lib-commonjs/components/Rating/{useRatingStyles.styles.js → useRatingStyles.styles.cjs} +0 -1
  66. package/lib-commonjs/components/Rating/useRatingStyles.styles.cjs.map +1 -0
  67. package/lib-commonjs/components/Rating/{useRatingStyles.styles.raw.js → useRatingStyles.styles.raw.cjs} +0 -1
  68. package/lib-commonjs/components/Rating/useRatingStyles.styles.raw.cjs.map +1 -0
  69. package/lib-commonjs/components/RatingDisplay/{RatingDisplay.js → RatingDisplay.cjs} +4 -4
  70. package/lib-commonjs/components/RatingDisplay/{RatingDisplay.js.map → RatingDisplay.cjs.map} +1 -1
  71. package/lib-commonjs/components/RatingDisplay/{index.js → index.cjs} +5 -5
  72. package/lib-commonjs/components/RatingDisplay/{index.js.map → index.cjs.map} +1 -1
  73. package/lib-commonjs/components/RatingDisplay/{renderRatingDisplay.js → renderRatingDisplay.cjs} +1 -1
  74. package/lib-commonjs/components/RatingDisplay/{renderRatingDisplay.js.map → renderRatingDisplay.cjs.map} +1 -1
  75. package/lib-commonjs/components/RatingDisplay/{useRatingDisplay.js → useRatingDisplay.cjs} +1 -1
  76. package/lib-commonjs/components/RatingDisplay/{useRatingDisplay.js.map → useRatingDisplay.cjs.map} +1 -1
  77. package/lib-commonjs/components/RatingDisplay/{useRatingDisplayStyles.styles.js → useRatingDisplayStyles.styles.cjs} +0 -1
  78. package/lib-commonjs/components/RatingDisplay/useRatingDisplayStyles.styles.cjs.map +1 -0
  79. package/lib-commonjs/components/RatingDisplay/{useRatingDisplayStyles.styles.raw.js → useRatingDisplayStyles.styles.raw.cjs} +0 -1
  80. package/lib-commonjs/components/RatingDisplay/useRatingDisplayStyles.styles.raw.cjs.map +1 -0
  81. package/lib-commonjs/components/RatingItem/{RatingItem.js → RatingItem.cjs} +3 -3
  82. package/lib-commonjs/components/RatingItem/{RatingItem.js.map → RatingItem.cjs.map} +1 -1
  83. package/lib-commonjs/components/RatingItem/{index.js → index.cjs} +4 -4
  84. package/lib-commonjs/components/RatingItem/{index.js.map → index.cjs.map} +1 -1
  85. package/lib-commonjs/components/RatingItem/{useRatingItem.js → useRatingItem.cjs} +1 -1
  86. package/lib-commonjs/components/RatingItem/{useRatingItem.js.map → useRatingItem.cjs.map} +1 -1
  87. package/lib-commonjs/components/RatingItem/{useRatingItemStyles.styles.js → useRatingItemStyles.styles.cjs} +0 -1
  88. package/lib-commonjs/components/RatingItem/useRatingItemStyles.styles.cjs.map +1 -0
  89. package/lib-commonjs/components/RatingItem/{useRatingItemStyles.styles.raw.js → useRatingItemStyles.styles.raw.cjs} +0 -1
  90. package/lib-commonjs/components/RatingItem/useRatingItemStyles.styles.raw.cjs.map +1 -0
  91. package/lib-commonjs/contexts/{index.js → index.cjs} +1 -1
  92. package/lib-commonjs/contexts/{index.js.map → index.cjs.map} +1 -1
  93. package/lib-commonjs/{index.js → index.cjs} +4 -4
  94. package/lib-commonjs/{index.js.map → index.cjs.map} +1 -1
  95. package/package.json +18 -12
  96. package/lib-commonjs/components/Rating/useRatingStyles.styles.js.map +0 -1
  97. package/lib-commonjs/components/Rating/useRatingStyles.styles.raw.js.map +0 -1
  98. package/lib-commonjs/components/RatingDisplay/useRatingDisplayStyles.styles.js.map +0 -1
  99. package/lib-commonjs/components/RatingDisplay/useRatingDisplayStyles.styles.raw.js.map +0 -1
  100. package/lib-commonjs/components/RatingItem/useRatingItemStyles.styles.js.map +0 -1
  101. package/lib-commonjs/components/RatingItem/useRatingItemStyles.styles.raw.js.map +0 -1
  102. /package/lib-commonjs/components/Rating/{Rating.types.js → Rating.types.cjs} +0 -0
  103. /package/lib-commonjs/components/Rating/{Rating.types.js.map → Rating.types.cjs.map} +0 -0
  104. /package/lib-commonjs/components/Rating/{useRatingContextValues.js → useRatingContextValues.cjs} +0 -0
  105. /package/lib-commonjs/components/Rating/{useRatingContextValues.js.map → useRatingContextValues.cjs.map} +0 -0
  106. /package/lib-commonjs/components/RatingDisplay/{RatingDisplay.types.js → RatingDisplay.types.cjs} +0 -0
  107. /package/lib-commonjs/components/RatingDisplay/{RatingDisplay.types.js.map → RatingDisplay.types.cjs.map} +0 -0
  108. /package/lib-commonjs/components/RatingDisplay/{useRatingDisplayContextValues.js → useRatingDisplayContextValues.cjs} +0 -0
  109. /package/lib-commonjs/components/RatingDisplay/{useRatingDisplayContextValues.js.map → useRatingDisplayContextValues.cjs.map} +0 -0
  110. /package/lib-commonjs/components/RatingItem/{RatingItem.types.js → RatingItem.types.cjs} +0 -0
  111. /package/lib-commonjs/components/RatingItem/{RatingItem.types.js.map → RatingItem.types.cjs.map} +0 -0
  112. /package/lib-commonjs/components/RatingItem/{renderRatingItem.js → renderRatingItem.cjs} +0 -0
  113. /package/lib-commonjs/components/RatingItem/{renderRatingItem.js.map → renderRatingItem.cjs.map} +0 -0
  114. /package/lib-commonjs/contexts/{RatingItemContext.js → RatingItemContext.cjs} +0 -0
  115. /package/lib-commonjs/contexts/{RatingItemContext.js.map → RatingItemContext.cjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,12 +1,38 @@
1
1
  # Change Log - @fluentui/react-rating
2
2
 
3
- This log was last generated on Tue, 26 May 2026 09:33:57 GMT and should not be manually modified.
3
+ <!-- This log was last generated on Tue, 11 Aug 2026 17:16:02 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.4.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-rating_v9.4.4)
8
+
9
+ Tue, 11 Aug 2026 17:16:02 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-rating_v9.4.3..@fluentui/react-rating_v9.4.4)
11
+
12
+ ### Patches
13
+
14
+ - Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake. ([PR #36327](https://github.com/microsoft/fluentui/pull/36327) by martinhochel@microsoft.com)
15
+ - Bump @fluentui/react-jsx-runtime to v9.4.5 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
16
+ - Bump @fluentui/react-shared-contexts to v9.26.3 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
17
+ - Bump @fluentui/react-tabster to v9.26.17 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
18
+ - Bump @fluentui/react-theme to v9.2.2 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
19
+ - Bump @fluentui/react-utilities to v9.26.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
20
+
21
+ ## [9.4.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-rating_v9.4.3)
22
+
23
+ Wed, 24 Jun 2026 11:09:54 GMT
24
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-rating_v9.4.2..@fluentui/react-rating_v9.4.3)
25
+
26
+ ### Patches
27
+
28
+ - fix: remove redundant use no memo directives, and add justification to valid ones ([PR #36224](https://github.com/microsoft/fluentui/pull/36224) by martinhochel@microsoft.com)
29
+ - Bump @fluentui/react-jsx-runtime to v9.4.4 ([commit](https://github.com/microsoft/fluentui/commit/a4b871ca80c1f16f35ab4229def4fe02be7f30ea) by beachball)
30
+ - Bump @fluentui/react-tabster to v9.26.16 ([commit](https://github.com/microsoft/fluentui/commit/a4b871ca80c1f16f35ab4229def4fe02be7f30ea) by beachball)
31
+ - Bump @fluentui/react-utilities to v9.26.5 ([commit](https://github.com/microsoft/fluentui/commit/a4b871ca80c1f16f35ab4229def4fe02be7f30ea) by beachball)
32
+
7
33
  ## [9.4.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-rating_v9.4.2)
8
34
 
9
- Tue, 26 May 2026 09:33:57 GMT
35
+ Tue, 26 May 2026 09:39:35 GMT
10
36
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-rating_v9.4.1..@fluentui/react-rating_v9.4.2)
11
37
 
12
38
  ### Patches
@@ -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 './components/Rating/index';
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,4BAA4B"}
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"}
@@ -1 +1 @@
1
- export { RatingDisplay, ratingDisplayClassNames, renderRatingDisplay_unstable, useRatingDisplayContextValues, useRatingDisplayStyles_unstable, useRatingDisplay_unstable, useRatingDisplayBase_unstable } from './components/RatingDisplay/index';
1
+ export { RatingDisplay, ratingDisplayClassNames, renderRatingDisplay_unstable, useRatingDisplayContextValues, useRatingDisplayStyles_unstable, useRatingDisplay_unstable, useRatingDisplayBase_unstable } from "./components/RatingDisplay/index.js";
@@ -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,mCAAmC"}
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 './components/RatingItem/index';
1
+ export { RatingItem, ratingItemClassNames, renderRatingItem_unstable, useRatingItemStyles_unstable, useRatingItem_unstable, useRatingItemBase_unstable } from "./components/RatingItem/index.js";
@@ -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,gCAAgC"}
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 'react';
3
- import { useRating_unstable } from './useRating';
4
- import { renderRating_unstable } from './renderRating';
5
- import { useRatingStyles_unstable } from './useRatingStyles.styles';
6
- import { useRatingContextValues } from './useRatingContextValues';
7
- import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
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,cAAc;AACjD,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,wBAAwB,QAAQ,2BAA2B;AAEpE,SAASC,sBAAsB,QAAQ,2BAA2B;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
+ {"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 './Rating';
2
- export { renderRating_unstable } from './renderRating';
3
- export { useRating_unstable, useRatingBase_unstable } from './useRating';
4
- export { ratingClassNames, useRatingStyles_unstable } from './useRatingStyles.styles';
5
- export { useRatingContextValues } from './useRatingContextValues';
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,WAAW;AAUlC,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,kBAAkB,EAAEC,sBAAsB,QAAQ,cAAc;AACzE,SAASC,gBAAgB,EAAEC,wBAAwB,QAAQ,2BAA2B;AACtF,SAASC,sBAAsB,QAAQ,2BAA2B"}
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 '@fluentui/react-utilities';
3
- import { RatingItemProvider } from '../../contexts/RatingItemContext';
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,mCAAmC;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
+ {"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 'react';
3
- import { getIntrinsicElementProps, isHTMLElement, mergeCallbacks, slot, useControllableState, useId } from '@fluentui/react-utilities';
4
- import { RatingItem } from '../../RatingItem';
5
- import { StarFilled, StarRegular } from '@fluentui/react-icons';
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,mBAAmB;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
+ {"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 'react';
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,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { __resetStyles, mergeClasses } from '@griffel/react';
3
+ import { __resetStyles, mergeClasses } from "@griffel/react";
4
4
  export const ratingClassNames = {
5
5
  root: 'fui-Rating'
6
6
  };
@@ -12,8 +12,6 @@ const useRootClassName = /*#__PURE__*/__resetStyles("r2imjyh", null, [".r2imjyh{
12
12
  * Apply styling to the Rating slots based on the state
13
13
  */
14
14
  export const useRatingStyles_unstable = state => {
15
- 'use no memo';
16
-
17
15
  const rootClassName = useRootClassName();
18
16
  // eslint-disable-next-line react-hooks/immutability
19
17
  state.root.className = mergeClasses(ratingClassNames.root, rootClassName, state.root.className);
@@ -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 '@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 'use no memo';\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,aAAa;;EACb,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
+ {"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,5 +1,5 @@
1
1
  'use client';
2
- import { makeResetStyles, mergeClasses } from '@griffel/react';
2
+ import { makeResetStyles, mergeClasses } from "@griffel/react";
3
3
  export const ratingClassNames = {
4
4
  root: 'fui-Rating'
5
5
  };
@@ -12,7 +12,6 @@ export const ratingClassNames = {
12
12
  /**
13
13
  * Apply styling to the Rating slots based on the state
14
14
  */ export const useRatingStyles_unstable = (state)=>{
15
- 'use no memo';
16
15
  const rootClassName = useRootClassName();
17
16
  // eslint-disable-next-line react-hooks/immutability
18
17
  state.root.className = mergeClasses(ratingClassNames.root, rootClassName, state.root.className);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Rating/useRatingStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { RatingSlots, RatingState } from './Rating.types';\n\nexport const ratingClassNames: SlotClassNames<RatingSlots> = {\n root: 'fui-Rating',\n};\n\n/**\n * Styles for the root slot\n */\n\nconst useRootClassName = makeResetStyles({\n display: 'flex',\n flexWrap: 'wrap',\n});\n\n/**\n * Apply styling to the Rating slots based on the state\n */\nexport const useRatingStyles_unstable = (state: RatingState): RatingState => {\n 'use no memo';\n\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"],"names":["makeResetStyles","mergeClasses","ratingClassNames","root","useRootClassName","display","flexWrap","useRatingStyles_unstable","state","rootClassName","className"],"mappings":"AAAA;AAEA,SAASA,eAAe,EAAEC,YAAY,QAAQ,iBAAiB;AAI/D,OAAO,MAAMC,mBAAgD;IAC3DC,MAAM;AACR,EAAE;AAEF;;CAEC,GAED,MAAMC,mBAAmBJ,gBAAgB;IACvCK,SAAS;IACTC,UAAU;AACZ;AAEA;;CAEC,GACD,OAAO,MAAMC,2BAA2B,CAACC;IACvC;IAEA,MAAMC,gBAAgBL;IACtB,oDAAoD;IACpDI,MAAML,IAAI,CAACO,SAAS,GAAGT,aAAaC,iBAAiBC,IAAI,EAAEM,eAAeD,MAAML,IAAI,CAACO,SAAS;IAC9F,OAAOF;AACT,EAAE"}
1
+ {"version":3,"sources":["../src/components/Rating/useRatingStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { RatingSlots, RatingState } from './Rating.types';\n\nexport const ratingClassNames: SlotClassNames<RatingSlots> = {\n root: 'fui-Rating',\n};\n\n/**\n * Styles for the root slot\n */\n\nconst useRootClassName = makeResetStyles({\n display: 'flex',\n flexWrap: 'wrap',\n});\n\n/**\n * Apply styling to the Rating slots based on the state\n */\nexport const useRatingStyles_unstable = (state: RatingState): RatingState => {\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"],"names":["makeResetStyles","mergeClasses","ratingClassNames","root","useRootClassName","display","flexWrap","useRatingStyles_unstable","state","rootClassName","className"],"mappings":"AAAA;AAEA,SAASA,eAAe,EAAEC,YAAY,QAAQ,iBAAiB;AAI/D,OAAO,MAAMC,mBAAgD;IAC3DC,MAAM;AACR,EAAE;AAEF;;CAEC,GAED,MAAMC,mBAAmBJ,gBAAgB;IACvCK,SAAS;IACTC,UAAU;AACZ;AAEA;;CAEC,GACD,OAAO,MAAMC,2BAA2B,CAACC;IACvC,MAAMC,gBAAgBL;IACtB,oDAAoD;IACpDI,MAAML,IAAI,CAACO,SAAS,GAAGT,aAAaC,iBAAiBC,IAAI,EAAEM,eAAeD,MAAML,IAAI,CAACO,SAAS;IAC9F,OAAOF;AACT,EAAE"}
@@ -1,10 +1,10 @@
1
1
  'use client';
2
- import * as React from 'react';
3
- import { useRatingDisplay_unstable } from './useRatingDisplay';
4
- import { renderRatingDisplay_unstable } from './renderRatingDisplay';
5
- import { useRatingDisplayStyles_unstable } from './useRatingDisplayStyles.styles';
6
- import { useRatingDisplayContextValues } from './useRatingDisplayContextValues';
7
- import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
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.