@fluentui/react-rating 9.4.7 → 9.4.8

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 (76) hide show
  1. package/CHANGELOG.md +10 -2
  2. package/lib/components/Rating/Rating.js.map +1 -1
  3. package/lib/components/Rating/Rating.types.js.map +1 -1
  4. package/lib/components/Rating/index.js.map +1 -1
  5. package/lib/components/Rating/renderRating.js +2 -2
  6. package/lib/components/Rating/renderRating.js.map +1 -1
  7. package/lib/components/Rating/useRating.js +1 -2
  8. package/lib/components/Rating/useRating.js.map +1 -1
  9. package/lib/components/Rating/useRatingContextValues.js.map +1 -1
  10. package/lib/components/Rating/useRatingStyles.styles.raw.js.map +1 -1
  11. package/lib/components/RatingDisplay/RatingDisplay.js.map +1 -1
  12. package/lib/components/RatingDisplay/RatingDisplay.types.js.map +1 -1
  13. package/lib/components/RatingDisplay/index.js.map +1 -1
  14. package/lib/components/RatingDisplay/renderRatingDisplay.js +2 -2
  15. package/lib/components/RatingDisplay/renderRatingDisplay.js.map +1 -1
  16. package/lib/components/RatingDisplay/useRatingDisplay.js.map +1 -1
  17. package/lib/components/RatingDisplay/useRatingDisplayContextValues.js.map +1 -1
  18. package/lib/components/RatingDisplay/useRatingDisplayStyles.styles.raw.js.map +1 -1
  19. package/lib/components/RatingItem/RatingItem.js.map +1 -1
  20. package/lib/components/RatingItem/RatingItem.types.js.map +1 -1
  21. package/lib/components/RatingItem/index.js.map +1 -1
  22. package/lib/components/RatingItem/renderRatingItem.js +2 -2
  23. package/lib/components/RatingItem/renderRatingItem.js.map +1 -1
  24. package/lib/components/RatingItem/useRatingItem.js +1 -1
  25. package/lib/components/RatingItem/useRatingItem.js.map +1 -1
  26. package/lib/components/RatingItem/useRatingItemStyles.styles.js +12 -6
  27. package/lib/components/RatingItem/useRatingItemStyles.styles.js.map +1 -1
  28. package/lib/components/RatingItem/useRatingItemStyles.styles.raw.js +7 -2
  29. package/lib/components/RatingItem/useRatingItemStyles.styles.raw.js.map +1 -1
  30. package/lib/contexts/RatingItemContext.js.map +1 -1
  31. package/lib/contexts/index.js.map +1 -1
  32. package/lib-commonjs/Rating.cjs +8 -8
  33. package/lib-commonjs/RatingDisplay.cjs +8 -8
  34. package/lib-commonjs/RatingItem.cjs +7 -7
  35. package/lib-commonjs/components/Rating/Rating.cjs.map +1 -1
  36. package/lib-commonjs/components/Rating/Rating.types.cjs.map +1 -1
  37. package/lib-commonjs/components/Rating/index.cjs +8 -8
  38. package/lib-commonjs/components/Rating/index.cjs.map +1 -1
  39. package/lib-commonjs/components/Rating/renderRating.cjs.map +1 -1
  40. package/lib-commonjs/components/Rating/useRating.cjs +4 -5
  41. package/lib-commonjs/components/Rating/useRating.cjs.map +1 -1
  42. package/lib-commonjs/components/Rating/useRatingContextValues.cjs.map +1 -1
  43. package/lib-commonjs/components/Rating/useRatingStyles.styles.cjs +3 -3
  44. package/lib-commonjs/components/Rating/useRatingStyles.styles.cjs.map +1 -1
  45. package/lib-commonjs/components/Rating/useRatingStyles.styles.raw.cjs +3 -3
  46. package/lib-commonjs/components/Rating/useRatingStyles.styles.raw.cjs.map +1 -1
  47. package/lib-commonjs/components/RatingDisplay/RatingDisplay.cjs.map +1 -1
  48. package/lib-commonjs/components/RatingDisplay/RatingDisplay.types.cjs.map +1 -1
  49. package/lib-commonjs/components/RatingDisplay/index.cjs +8 -8
  50. package/lib-commonjs/components/RatingDisplay/index.cjs.map +1 -1
  51. package/lib-commonjs/components/RatingDisplay/renderRatingDisplay.cjs.map +1 -1
  52. package/lib-commonjs/components/RatingDisplay/useRatingDisplay.cjs +3 -3
  53. package/lib-commonjs/components/RatingDisplay/useRatingDisplay.cjs.map +1 -1
  54. package/lib-commonjs/components/RatingDisplay/useRatingDisplayContextValues.cjs.map +1 -1
  55. package/lib-commonjs/components/RatingDisplay/useRatingDisplayStyles.styles.cjs +3 -3
  56. package/lib-commonjs/components/RatingDisplay/useRatingDisplayStyles.styles.cjs.map +1 -1
  57. package/lib-commonjs/components/RatingDisplay/useRatingDisplayStyles.styles.raw.cjs +3 -3
  58. package/lib-commonjs/components/RatingDisplay/useRatingDisplayStyles.styles.raw.cjs.map +1 -1
  59. package/lib-commonjs/components/RatingItem/RatingItem.cjs.map +1 -1
  60. package/lib-commonjs/components/RatingItem/RatingItem.types.cjs.map +1 -1
  61. package/lib-commonjs/components/RatingItem/index.cjs +7 -7
  62. package/lib-commonjs/components/RatingItem/index.cjs.map +1 -1
  63. package/lib-commonjs/components/RatingItem/renderRatingItem.cjs.map +1 -1
  64. package/lib-commonjs/components/RatingItem/useRatingItem.cjs +4 -4
  65. package/lib-commonjs/components/RatingItem/useRatingItem.cjs.map +1 -1
  66. package/lib-commonjs/components/RatingItem/useRatingItemStyles.styles.cjs +23 -9
  67. package/lib-commonjs/components/RatingItem/useRatingItemStyles.styles.cjs.map +1 -1
  68. package/lib-commonjs/components/RatingItem/useRatingItemStyles.styles.raw.cjs +10 -5
  69. package/lib-commonjs/components/RatingItem/useRatingItemStyles.styles.raw.cjs.map +1 -1
  70. package/lib-commonjs/contexts/RatingItemContext.cjs +4 -4
  71. package/lib-commonjs/contexts/RatingItemContext.cjs.map +1 -1
  72. package/lib-commonjs/contexts/index.cjs +4 -4
  73. package/lib-commonjs/contexts/index.cjs.map +1 -1
  74. package/lib-commonjs/index.cjs +23 -23
  75. package/lib-commonjs/index.cjs.map +1 -1
  76. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/RatingItem/useRatingItemStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport type { RatingItemSlots, RatingItemState } from './RatingItem.types';\n\nexport const ratingItemClassNames: SlotClassNames<RatingItemSlots> = {\n root: 'fui-RatingItem',\n selectedIcon: 'fui-RatingItem__selectedIcon',\n unselectedIcon: 'fui-RatingItem__unselectedIcon',\n halfValueInput: 'fui-RatingItem__halfValueInput',\n fullValueInput: 'fui-RatingItem__fullValueInput',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n position: 'relative',\n ...createFocusOutlineStyle({ style: {}, selector: 'focus-within' }),\n },\n small: {\n fontSize: '12px',\n width: '12px',\n height: '12px',\n },\n\n medium: {\n fontSize: '16px',\n width: '16px',\n height: '16px',\n },\n\n large: {\n fontSize: '20px',\n width: '20px',\n height: '20px',\n },\n\n 'extra-large': {\n fontSize: '28px',\n width: '28px',\n height: '28px',\n },\n});\n\nconst useInputBaseClassName = makeResetStyles({\n position: 'absolute',\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n boxSizing: 'border-box',\n margin: 0,\n opacity: 0,\n cursor: 'pointer',\n height: '100%',\n});\n\nconst useInputStyles = makeStyles({\n lowerHalf: {\n right: '50%',\n },\n upperHalf: {\n left: '50%',\n },\n});\n\nconst useIndicatorBaseClassName = makeResetStyles({\n display: 'flex',\n overflow: 'hidden',\n color: tokens.colorNeutralForeground1,\n fill: 'currentColor',\n pointerEvents: 'none',\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n});\n\nconst useIndicatorStyles = makeStyles({\n lowerHalf: {\n right: '50%',\n '& > svg': {\n flex: '0 0 auto',\n },\n },\n upperHalf: {\n left: '50%',\n marginLeft: '-50%',\n },\n brand: {\n color: tokens.colorBrandForeground1,\n },\n marigold: {\n color: tokens.colorPaletteMarigoldBorderActive,\n },\n filled: {\n color: tokens.colorNeutralBackground6,\n stroke: tokens.colorTransparentStroke,\n '@media (forced-colors: active)': {\n color: 'Canvas',\n stroke: 'CanvasText',\n },\n },\n brandFilled: {\n color: tokens.colorBrandBackground2,\n },\n marigoldFilled: {\n color: tokens.colorPaletteMarigoldBackground2,\n },\n});\n\n/**\n * Apply styling to the RatingItem slots based on the state\n */\nexport const useRatingItemStyles_unstable = (state: RatingItemState): RatingItemState => {\n const { color, size, iconFillWidth, appearance } = state;\n const styles = useStyles();\n const inputBaseClassName = useInputBaseClassName();\n const inputStyles = useInputStyles();\n const indicatorBaseClassName = useIndicatorBaseClassName();\n const indicatorStyles = useIndicatorStyles();\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(ratingItemClassNames.root, styles.root, styles[size], state.root.className);\n\n if (state.halfValueInput) {\n // eslint-disable-next-line react-hooks/immutability\n state.halfValueInput.className = mergeClasses(\n ratingItemClassNames.halfValueInput,\n inputBaseClassName,\n inputStyles.lowerHalf,\n state.halfValueInput.className,\n );\n }\n\n if (state.fullValueInput) {\n // eslint-disable-next-line react-hooks/immutability\n state.fullValueInput.className = mergeClasses(\n ratingItemClassNames.fullValueInput,\n inputBaseClassName,\n state.halfValueInput && inputStyles.upperHalf,\n state.fullValueInput.className,\n );\n }\n\n if (state.unselectedIcon) {\n // eslint-disable-next-line react-hooks/immutability\n state.unselectedIcon.className = mergeClasses(\n ratingItemClassNames.unselectedIcon,\n indicatorBaseClassName,\n appearance === 'filled' && indicatorStyles.filled,\n color === 'brand' && (appearance === 'filled' ? indicatorStyles.brandFilled : indicatorStyles.brand),\n color === 'marigold' && (appearance === 'filled' ? indicatorStyles.marigoldFilled : indicatorStyles.marigold),\n iconFillWidth === 0.5 && indicatorStyles.upperHalf,\n state.unselectedIcon.className,\n );\n }\n\n if (state.selectedIcon) {\n // eslint-disable-next-line react-hooks/immutability\n state.selectedIcon.className = mergeClasses(\n ratingItemClassNames.selectedIcon,\n indicatorBaseClassName,\n color === 'brand' && indicatorStyles.brand,\n color === 'marigold' && indicatorStyles.marigold,\n iconFillWidth === 0.5 && indicatorStyles.lowerHalf,\n state.selectedIcon.className,\n );\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","tokens","createFocusOutlineStyle","ratingItemClassNames","root","selectedIcon","unselectedIcon","halfValueInput","fullValueInput","useStyles","position","style","selector","small","fontSize","width","height","medium","large","useInputBaseClassName","left","top","right","bottom","boxSizing","margin","opacity","cursor","useInputStyles","lowerHalf","upperHalf","useIndicatorBaseClassName","display","overflow","color","colorNeutralForeground1","fill","pointerEvents","useIndicatorStyles","flex","marginLeft","brand","colorBrandForeground1","marigold","colorPaletteMarigoldBorderActive","filled","colorNeutralBackground6","stroke","colorTransparentStroke","brandFilled","colorBrandBackground2","marigoldFilled","colorPaletteMarigoldBackground2","useRatingItemStyles_unstable","state","size","iconFillWidth","appearance","styles","inputBaseClassName","inputStyles","indicatorBaseClassName","indicatorStyles","className"],"mappings":"AAAA;AAEA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAE3E,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,uBAAuB,QAAQ,0BAA0B;AAGlE,OAAO,MAAMC,uBAAwD;IACnEC,MAAM;IACNC,cAAc;IACdC,gBAAgB;IAChBC,gBAAgB;IAChBC,gBAAgB;AAClB,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYV,WAAW;IAC3BK,MAAM;QACJM,UAAU;QACV,GAAGR,wBAAwB;YAAES,OAAO,CAAC;YAAGC,UAAU;QAAe,EAAE;IACrE;IACAC,OAAO;QACLC,UAAU;QACVC,OAAO;QACPC,QAAQ;IACV;IAEAC,QAAQ;QACNH,UAAU;QACVC,OAAO;QACPC,QAAQ;IACV;IAEAE,OAAO;QACLJ,UAAU;QACVC,OAAO;QACPC,QAAQ;IACV;IAEA,eAAe;QACbF,UAAU;QACVC,OAAO;QACPC,QAAQ;IACV;AACF;AAEA,MAAMG,wBAAwBrB,gBAAgB;IAC5CY,UAAU;IACVU,MAAM;IACNC,KAAK;IACLC,OAAO;IACPC,QAAQ;IACRC,WAAW;IACXC,QAAQ;IACRC,SAAS;IACTC,QAAQ;IACRX,QAAQ;AACV;AAEA,MAAMY,iBAAiB7B,WAAW;IAChC8B,WAAW;QACTP,OAAO;IACT;IACAQ,WAAW;QACTV,MAAM;IACR;AAC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AAc,CAACwD,SAAS;IAElC;IAEA,IAAIT,MAAM9C,cAAc,EAAE;QACxB,oDAAoD;QACpD8C,MAAM9C,cAAc,CAACuD,SAAS,GAAG/D,aAC/BG,qBAAqBK,cAAc,EACnCmD,oBACAL,MAAM/C,cAAc,IAAIqD,YAAY9B,SAAS,EAC7CwB,MAAM9C,cAAc,CAACuD,SAAS;IAElC;IAEA,IAAIT,MAAMhD,cAAc,EAAE;QACxB,oDAAoD;QACpDgD,MAAMhD,cAAc,CAACyD,SAAS,GAAG/D,aAC/BG,qBAAqBG,cAAc,EACnCuD,wBACAJ,eAAe,YAAYK,gBAAgBjB,MAAM,EACjDX,UAAU,WAAYuB,CAAAA,eAAe,WAAWK,gBAAgBb,WAAW,GAAGa,gBAAgBrB,KAAK,AAAD,GAClGP,UAAU,cAAeuB,CAAAA,eAAe,WAAWK,gBAAgBX,cAAc,GAAGW,gBAAgBnB,QAAQ,AAAD,GAC3Ga,kBAAkB,OAAOM,gBAAgBhC,SAAS,EAClDwB,MAAMhD,cAAc,CAACyD,SAAS;IAElC;IAEA,IAAIT,MAAMjD,YAAY,EAAE;QACtB,oDAAoD;QACpDiD,MAAMjD,YAAY,CAAC0D,SAAS,GAAG/D,aAC7BG,qBAAqBE,YAAY,EACjCwD,wBACA3B,UAAU,WAAW4B,gBAAgBrB,KAAK,EAC1CP,UAAU,cAAc4B,gBAAgBnB,QAAQ,EAChDa,kBAAkB,OAAOM,gBAAgBjC,SAAS,EAClDyB,MAAMjD,YAAY,CAAC0D,SAAS;IAEhC;IAEA,OAAOT;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/RatingItem/useRatingItemStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport type { RatingItemSlots, RatingItemState } from './RatingItem.types';\n\nexport const ratingItemClassNames: SlotClassNames<RatingItemSlots> = {\n root: 'fui-RatingItem',\n selectedIcon: 'fui-RatingItem__selectedIcon',\n unselectedIcon: 'fui-RatingItem__unselectedIcon',\n halfValueInput: 'fui-RatingItem__halfValueInput',\n fullValueInput: 'fui-RatingItem__fullValueInput',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n position: 'relative',\n ...createFocusOutlineStyle({ style: {}, selector: 'focus-within' }),\n },\n small: {\n fontSize: '12px',\n width: '12px',\n height: '12px',\n },\n\n medium: {\n fontSize: '16px',\n width: '16px',\n height: '16px',\n },\n\n large: {\n fontSize: '20px',\n width: '20px',\n height: '20px',\n },\n\n 'extra-large': {\n fontSize: '28px',\n width: '28px',\n height: '28px',\n },\n});\n\nconst useInputBaseClassName = makeResetStyles({\n position: 'absolute',\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n boxSizing: 'border-box',\n margin: 0,\n opacity: 0,\n cursor: 'pointer',\n height: '100%',\n});\n\nconst useInputStyles = makeStyles({\n lowerHalf: {\n right: '50%',\n },\n upperHalf: {\n left: '50%',\n },\n});\n\nconst useIndicatorBaseClassName = makeResetStyles({\n display: 'flex',\n overflow: 'hidden',\n color: tokens.colorNeutralForeground1,\n fill: 'currentColor',\n pointerEvents: 'none',\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n});\n\nconst useIndicatorStyles = makeStyles({\n lowerHalf: {\n right: '50%',\n '& > svg, & > .fui-Icon-font': {\n flex: '0 0 auto',\n },\n },\n upperHalf: {\n left: '50%',\n marginLeft: '-50%',\n },\n brand: {\n color: tokens.colorBrandForeground1,\n },\n marigold: {\n color: tokens.colorPaletteMarigoldBorderActive,\n },\n filled: {\n color: tokens.colorNeutralBackground6,\n stroke: tokens.colorTransparentStroke,\n '@media (forced-colors: active)': {\n color: 'Canvas',\n stroke: 'CanvasText',\n '& > .fui-Icon-font': {\n WebkitTextStrokeColor: 'CanvasText',\n // Match SVG's default stroke width independently of theme border tokens.\n WebkitTextStrokeWidth: '1px',\n },\n },\n },\n brandFilled: {\n color: tokens.colorBrandBackground2,\n },\n marigoldFilled: {\n color: tokens.colorPaletteMarigoldBackground2,\n },\n});\n\n/**\n * Apply styling to the RatingItem slots based on the state\n */\nexport const useRatingItemStyles_unstable = (state: RatingItemState): RatingItemState => {\n const { color, size, iconFillWidth, appearance } = state;\n const styles = useStyles();\n const inputBaseClassName = useInputBaseClassName();\n const inputStyles = useInputStyles();\n const indicatorBaseClassName = useIndicatorBaseClassName();\n const indicatorStyles = useIndicatorStyles();\n\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(ratingItemClassNames.root, styles.root, styles[size], state.root.className);\n\n if (state.halfValueInput) {\n // eslint-disable-next-line react-hooks/immutability\n state.halfValueInput.className = mergeClasses(\n ratingItemClassNames.halfValueInput,\n inputBaseClassName,\n inputStyles.lowerHalf,\n state.halfValueInput.className,\n );\n }\n\n if (state.fullValueInput) {\n // eslint-disable-next-line react-hooks/immutability\n state.fullValueInput.className = mergeClasses(\n ratingItemClassNames.fullValueInput,\n inputBaseClassName,\n state.halfValueInput && inputStyles.upperHalf,\n state.fullValueInput.className,\n );\n }\n\n if (state.unselectedIcon) {\n // eslint-disable-next-line react-hooks/immutability\n state.unselectedIcon.className = mergeClasses(\n ratingItemClassNames.unselectedIcon,\n indicatorBaseClassName,\n appearance === 'filled' && indicatorStyles.filled,\n color === 'brand' && (appearance === 'filled' ? indicatorStyles.brandFilled : indicatorStyles.brand),\n color === 'marigold' && (appearance === 'filled' ? indicatorStyles.marigoldFilled : indicatorStyles.marigold),\n iconFillWidth === 0.5 && indicatorStyles.upperHalf,\n state.unselectedIcon.className,\n );\n }\n\n if (state.selectedIcon) {\n // eslint-disable-next-line react-hooks/immutability\n state.selectedIcon.className = mergeClasses(\n ratingItemClassNames.selectedIcon,\n indicatorBaseClassName,\n color === 'brand' && indicatorStyles.brand,\n color === 'marigold' && indicatorStyles.marigold,\n iconFillWidth === 0.5 && indicatorStyles.lowerHalf,\n state.selectedIcon.className,\n );\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","tokens","createFocusOutlineStyle","ratingItemClassNames","root","selectedIcon","unselectedIcon","halfValueInput","fullValueInput","useStyles","position","style","selector","small","fontSize","width","height","medium","large","useInputBaseClassName","left","top","right","bottom","boxSizing","margin","opacity","cursor","useInputStyles","lowerHalf","upperHalf","useIndicatorBaseClassName","display","overflow","color","colorNeutralForeground1","fill","pointerEvents","useIndicatorStyles","flex","marginLeft","brand","colorBrandForeground1","marigold","colorPaletteMarigoldBorderActive","filled","colorNeutralBackground6","stroke","colorTransparentStroke","WebkitTextStrokeColor","WebkitTextStrokeWidth","brandFilled","colorBrandBackground2","marigoldFilled","colorPaletteMarigoldBackground2","useRatingItemStyles_unstable","state","size","iconFillWidth","appearance","styles","inputBaseClassName","inputStyles","indicatorBaseClassName","indicatorStyles","className"],"mappings":"AAAA;AAEA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAE3E,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,uBAAuB,QAAQ,0BAA0B;AAGlE,OAAO,MAAMC,uBAAwD;IACnEC,MAAM;IACNC,cAAc;IACdC,gBAAgB;IAChBC,gBAAgB;IAChBC,gBAAgB;AAClB,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYV,WAAW;IAC3BK,MAAM;QACJM,UAAU;QACV,GAAGR,wBAAwB;YAAES,OAAO,CAAC;YAAGC,UAAU;QAAe,EAAE;IACrE;IACAC,OAAO;QACLC,UAAU;QACVC,OAAO;QACPC,QAAQ;IACV;IAEAC,QAAQ;QACNH,UAAU;QACVC,OAAO;QACPC,QAAQ;IACV;IAEAE,OAAO;QACLJ,UAAU;QACVC,OAAO;QACPC,QAAQ;IACV;IAEA,eAAe;QACbF,UAAU;QACVC,OAAO;QACPC,QAAQ;IACV;AACF;AAEA,MAAMG,wBAAwBrB,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MAAMnD,YAAY,CAAC4D,SAAS;IAEhC;IAEA,OAAOT;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contexts/RatingItemContext.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { RatingItemContextValue } from '../RatingItem';\n\n/**\n * RatingContext is provided by Rating, and is consumed by Rating to determine default values of some props.\n */\nexport const RatingItemContext = React.createContext<RatingItemContextValue | undefined>(undefined);\nconst ratingItemContextDefaultValue: RatingItemContextValue = {\n color: 'neutral',\n iconFilled: 'span',\n iconOutline: 'span',\n step: 1,\n size: 'medium',\n};\nexport const RatingItemProvider = RatingItemContext.Provider;\n\n/**\n * Get the value of the RatingContext.\n */\nexport const useRatingItemContextValue_unstable = (): RatingItemContextValue =>\n React.useContext(RatingItemContext) || ratingItemContextDefaultValue;\n"],"names":["React","RatingItemContext","createContext","undefined","ratingItemContextDefaultValue","color","iconFilled","iconOutline","step","size","RatingItemProvider","Provider","useRatingItemContextValue_unstable","useContext"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B;;CAEC,GACD,OAAO,MAAMC,kCAAoBD,MAAME,aAAa,CAAqCC,WAAW;AACpG,MAAMC,gCAAwD;IAC5DC,OAAO;IACPC,YAAY;IACZC,aAAa;IACbC,MAAM;IACNC,MAAM;AACR;AACA,OAAO,MAAMC,qBAAqBT,kBAAkBU,QAAQ,CAAC;AAE7D;;CAEC,GACD,OAAO,MAAMC,qCAAqC,IAChDZ,MAAMa,UAAU,CAACZ,sBAAsBG,8BAA8B"}
1
+ {"version":3,"sources":["../../src/contexts/RatingItemContext.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { RatingItemContextValue } from '../RatingItem';\n\n/**\n * RatingContext is provided by Rating, and is consumed by Rating to determine default values of some props.\n */\nexport const RatingItemContext = React.createContext<RatingItemContextValue | undefined>(undefined);\nconst ratingItemContextDefaultValue: RatingItemContextValue = {\n color: 'neutral',\n iconFilled: 'span',\n iconOutline: 'span',\n step: 1,\n size: 'medium',\n};\nexport const RatingItemProvider = RatingItemContext.Provider;\n\n/**\n * Get the value of the RatingContext.\n */\nexport const useRatingItemContextValue_unstable = (): RatingItemContextValue =>\n React.useContext(RatingItemContext) || ratingItemContextDefaultValue;\n"],"names":["React","RatingItemContext","createContext","undefined","ratingItemContextDefaultValue","color","iconFilled","iconOutline","step","size","RatingItemProvider","Provider","useRatingItemContextValue_unstable","useContext"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B;;CAEC,GACD,OAAO,MAAMC,kCAAoBD,MAAME,aAAa,CAAqCC,WAAW;AACpG,MAAMC,gCAAwD;IAC5DC,OAAO;IACPC,YAAY;IACZC,aAAa;IACbC,MAAM;IACNC,MAAM;AACR;AACA,OAAO,MAAMC,qBAAqBT,kBAAkBU,QAAQ,CAAC;AAE7D;;CAEC,GACD,OAAO,MAAMC,qCAAqC,IAChDZ,MAAMa,UAAU,CAACZ,sBAAsBG,8BAA8B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contexts/index.ts"],"sourcesContent":["export { RatingItemContext, RatingItemProvider, useRatingItemContextValue_unstable } from './RatingItemContext';\n"],"names":["RatingItemContext","RatingItemProvider","useRatingItemContextValue_unstable"],"mappings":"AAAA,SAASA,iBAAiB,EAAEC,kBAAkB,EAAEC,kCAAkC,QAAQ,yBAAsB"}
1
+ {"version":3,"sources":["../../src/contexts/index.ts"],"sourcesContent":["export { RatingItemContext, RatingItemProvider, useRatingItemContextValue_unstable } from './RatingItemContext';\n"],"names":["RatingItemContext","RatingItemProvider","useRatingItemContextValue_unstable"],"mappings":"AAAA,SAASA,iBAAiB,EAAEC,kBAAkB,EAAEC,kCAAkC,QAAQ,yBAAsB"}
@@ -5,29 +5,29 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- Rating: function() {
12
+ get Rating () {
13
13
  return _index.Rating;
14
14
  },
15
- ratingClassNames: function() {
15
+ get ratingClassNames () {
16
16
  return _index.ratingClassNames;
17
17
  },
18
- renderRating_unstable: function() {
18
+ get renderRating_unstable () {
19
19
  return _index.renderRating_unstable;
20
20
  },
21
- useRatingBase_unstable: function() {
21
+ get useRatingBase_unstable () {
22
22
  return _index.useRatingBase_unstable;
23
23
  },
24
- useRatingContextValues: function() {
24
+ get useRatingContextValues () {
25
25
  return _index.useRatingContextValues;
26
26
  },
27
- useRatingStyles_unstable: function() {
27
+ get useRatingStyles_unstable () {
28
28
  return _index.useRatingStyles_unstable;
29
29
  },
30
- useRating_unstable: function() {
30
+ get useRating_unstable () {
31
31
  return _index.useRating_unstable;
32
32
  }
33
33
  });
@@ -5,29 +5,29 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- RatingDisplay: function() {
12
+ get RatingDisplay () {
13
13
  return _index.RatingDisplay;
14
14
  },
15
- ratingDisplayClassNames: function() {
15
+ get ratingDisplayClassNames () {
16
16
  return _index.ratingDisplayClassNames;
17
17
  },
18
- renderRatingDisplay_unstable: function() {
18
+ get renderRatingDisplay_unstable () {
19
19
  return _index.renderRatingDisplay_unstable;
20
20
  },
21
- useRatingDisplayBase_unstable: function() {
21
+ get useRatingDisplayBase_unstable () {
22
22
  return _index.useRatingDisplayBase_unstable;
23
23
  },
24
- useRatingDisplayContextValues: function() {
24
+ get useRatingDisplayContextValues () {
25
25
  return _index.useRatingDisplayContextValues;
26
26
  },
27
- useRatingDisplayStyles_unstable: function() {
27
+ get useRatingDisplayStyles_unstable () {
28
28
  return _index.useRatingDisplayStyles_unstable;
29
29
  },
30
- useRatingDisplay_unstable: function() {
30
+ get useRatingDisplay_unstable () {
31
31
  return _index.useRatingDisplay_unstable;
32
32
  }
33
33
  });
@@ -5,26 +5,26 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- RatingItem: function() {
12
+ get RatingItem () {
13
13
  return _index.RatingItem;
14
14
  },
15
- ratingItemClassNames: function() {
15
+ get ratingItemClassNames () {
16
16
  return _index.ratingItemClassNames;
17
17
  },
18
- renderRatingItem_unstable: function() {
18
+ get renderRatingItem_unstable () {
19
19
  return _index.renderRatingItem_unstable;
20
20
  },
21
- useRatingItemBase_unstable: function() {
21
+ get useRatingItemBase_unstable () {
22
22
  return _index.useRatingItemBase_unstable;
23
23
  },
24
- useRatingItemStyles_unstable: function() {
24
+ get useRatingItemStyles_unstable () {
25
25
  return _index.useRatingItemStyles_unstable;
26
26
  },
27
- useRatingItem_unstable: function() {
27
+ get useRatingItem_unstable () {
28
28
  return _index.useRatingItem_unstable;
29
29
  }
30
30
  });
@@ -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;;;;;;;;;;;;iEAEuB,QAAQ;2BAEI,iBAAc;8BACX,oBAAiB;uCACd,8BAA2B;wCAE7B,8BAA2B;qCACtB,kCAAkC;AAKvE,MAAMM,SAAAA,WAAAA,GAA2CN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IAC/E,MAAMC,YAAQT,6BAAAA,EAAmBO,OAAOC;IACxC,MAAME,oBAAgBP,8CAAAA,EAAuBM;QAE7CP,+CAAAA,EAAyBO;QACzBL,gDAAAA,EAA4B,4BAA4BK;IACxD,WAAOR,mCAAAA,EAAsBQ,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;;;;;;;;;;;;iEAEuB,QAAQ;2BAEI,iBAAc;8BACX,oBAAiB;uCACd,8BAA2B;wCAE7B,8BAA2B;qCACtB,kCAAkC;AAKvE,MAAMM,SAAAA,WAAAA,GAA2CN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IAC/E,MAAMC,YAAQT,6BAAAA,EAAmBO,OAAOC;IACxC,MAAME,oBAAgBP,8CAAAA,EAAuBM;QAE7CP,+CAAAA,EAAyBO;QACzBL,gDAAAA,EAA4B,4BAA4BK;IACxD,WAAOR,mCAAAA,EAAsBQ,OAAOC;AACtC,GAAG;AAEHL,OAAOM,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Rating/Rating.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, EventData, EventHandler, Slot } from '@fluentui/react-utilities';\nimport type { RatingItemContextValue } from '../RatingItem/RatingItem.types';\n\nexport type RatingSlots = {\n root: NonNullable<Slot<'div'>>;\n};\n\n/**\n * Rating Props\n */\nexport type RatingProps = Omit<ComponentProps<Partial<RatingSlots>>, 'onChange'> & {\n /**\n * Controls the color of the Rating.\n * @default neutral\n */\n color?: 'brand' | 'marigold' | 'neutral';\n /**\n * Default value of the Rating\n */\n defaultValue?: number;\n /**\n * The icon to display when the rating value is greater than or equal to the item's value.\n */\n iconFilled?: React.ElementType;\n /**\n * The icon to display when the rating value is less than the item's value.\n */\n iconOutline?: React.ElementType;\n /**\n * Prop to generate the aria-label for the rating inputs.\n * @default (rating) =\\> `${rating}`\n */\n itemLabel?: (rating: number) => string;\n /**\n * The max value of the rating. This controls the number of rating items displayed.\n * Must be a whole number greater than 1.\n * @default 5\n */\n max?: number;\n /**\n * Name for the Radio inputs. If not provided, one will be automatically generated\n */\n name?: string;\n /**\n * Callback when the rating value is changed by the user.\n */\n onChange?: EventHandler<RatingOnChangeEventData>;\n /**\n * Sets the precision to allow half-filled shapes in Rating\n * @default 1\n */\n step?: 0.5 | 1;\n /**\n * Sets the size of the Rating items.\n * @default extra-large\n */\n size?: 'small' | 'medium' | 'large' | 'extra-large';\n /**\n * The value of the rating\n */\n value?: number;\n};\n\n/**\n * Data for the onChange event for Rating.\n */\nexport type RatingOnChangeEventData = EventData<'change', React.FormEvent<HTMLDivElement>> & {\n /**\n * The new value of the rating.\n */\n value: number;\n};\n\n/**\n * Rating base props — excludes design props (color, size).\n */\nexport type RatingBaseProps = Omit<RatingProps, 'color' | 'size'>;\n\n/**\n * State used in rendering Rating\n */\nexport type RatingState = ComponentState<RatingSlots> &\n Required<Pick<RatingProps, 'color' | 'iconFilled' | 'iconOutline' | 'name' | 'step' | 'size' | 'value'>> &\n Pick<RatingProps, 'itemLabel'> & {\n hoveredValue?: number | undefined;\n };\n\n/**\n * Rating base state — excludes design props (color, size).\n */\nexport type RatingBaseState = Omit<RatingState, 'color' | 'size'>;\n\nexport type RatingContextValues = {\n ratingItem: RatingItemContextValue;\n};\n"],"names":[],"mappings":""}
1
+ {"version":3,"sources":["../../../src/components/Rating/Rating.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, EventData, EventHandler, Slot } from '@fluentui/react-utilities';\nimport type { RatingItemContextValue } from '../RatingItem/RatingItem.types';\n\nexport type RatingSlots = {\n root: NonNullable<Slot<'div'>>;\n};\n\n/**\n * Rating Props\n */\nexport type RatingProps = Omit<ComponentProps<Partial<RatingSlots>>, 'onChange'> & {\n /**\n * Controls the color of the Rating.\n * @default neutral\n */\n color?: 'brand' | 'marigold' | 'neutral';\n /**\n * Default value of the Rating\n */\n defaultValue?: number;\n /**\n * The icon to display when the rating value is greater than or equal to the item's value.\n */\n iconFilled?: React.ElementType;\n /**\n * The icon to display when the rating value is less than the item's value.\n */\n iconOutline?: React.ElementType;\n /**\n * Prop to generate the aria-label for the rating inputs.\n * @default (rating) =\\> `${rating}`\n */\n itemLabel?: (rating: number) => string;\n /**\n * The max value of the rating. This controls the number of rating items displayed.\n * Must be a whole number greater than 1.\n * @default 5\n */\n max?: number;\n /**\n * Name for the Radio inputs. If not provided, one will be automatically generated\n */\n name?: string;\n /**\n * Callback when the rating value is changed by the user.\n */\n onChange?: EventHandler<RatingOnChangeEventData>;\n /**\n * Sets the precision to allow half-filled shapes in Rating\n * @default 1\n */\n step?: 0.5 | 1;\n /**\n * Sets the size of the Rating items.\n * @default extra-large\n */\n size?: 'small' | 'medium' | 'large' | 'extra-large';\n /**\n * The value of the rating\n */\n value?: number;\n};\n\n/**\n * Data for the onChange event for Rating.\n */\nexport type RatingOnChangeEventData = EventData<'change', React.FormEvent<HTMLDivElement>> & {\n /**\n * The new value of the rating.\n */\n value: number;\n};\n\n/**\n * Rating base props — excludes design props (color, size).\n */\nexport type RatingBaseProps = Omit<RatingProps, 'color' | 'size'>;\n\n/**\n * State used in rendering Rating\n */\nexport type RatingState = ComponentState<RatingSlots> &\n Required<Pick<RatingProps, 'color' | 'iconFilled' | 'iconOutline' | 'name' | 'step' | 'size' | 'value'>> &\n Pick<RatingProps, 'itemLabel'> & {\n hoveredValue?: number | undefined;\n };\n\n/**\n * Rating base state — excludes design props (color, size).\n */\nexport type RatingBaseState = Omit<RatingState, 'color' | 'size'>;\n\nexport type RatingContextValues = {\n ratingItem: RatingItemContextValue;\n};\n"],"names":[],"mappings":""}
@@ -5,29 +5,29 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- Rating: function() {
12
+ get Rating () {
13
13
  return _Rating.Rating;
14
14
  },
15
- ratingClassNames: function() {
15
+ get ratingClassNames () {
16
16
  return _useRatingStylesstyles.ratingClassNames;
17
17
  },
18
- renderRating_unstable: function() {
18
+ get renderRating_unstable () {
19
19
  return _renderRating.renderRating_unstable;
20
20
  },
21
- useRatingBase_unstable: function() {
21
+ get useRatingBase_unstable () {
22
22
  return _useRating.useRatingBase_unstable;
23
23
  },
24
- useRatingContextValues: function() {
24
+ get useRatingContextValues () {
25
25
  return _useRatingContextValues.useRatingContextValues;
26
26
  },
27
- useRatingStyles_unstable: function() {
27
+ get useRatingStyles_unstable () {
28
28
  return _useRatingStylesstyles.useRatingStyles_unstable;
29
29
  },
30
- useRating_unstable: function() {
30
+ get useRating_unstable () {
31
31
  return _useRating.useRating_unstable;
32
32
  }
33
33
  });
@@ -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":";;;;;;;;;;;IAASA;6BAAM;;IAYNI;sDAAgB;;;eAFhBH,mCAAqB;;;eACDE,iCAAsB;;;eAE1CG,8CAAsB;;;eADJD,+CAAwB;;;eAD1CH,6BAAkB;;;wBAXJ,cAAW;8BAUI,oBAAiB;2BACI,iBAAc;uCACd,8BAA2B;wCAC/C,8BAA2B"}
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":";;;;;;;;;;;;eAASA,cAAM;;;eAYNI,uCAAgB;;;eAFhBH,mCAAqB;;;eACDE,iCAAsB;;;eAE1CG,8CAAsB;;;eADJD,+CAAwB;;;eAD1CH,6BAAkB;;;wBAXJ,cAAW;8BAUI,oBAAiB;2BACI,iBAAc;uCACd,8BAA2B;wCAC/C,8BAA2B"}
@@ -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":";;;;+BAWaE;;;;;;4BAVb,gDAAiD;gCAErB,4BAA4B;mCAGrB,sCAAmC;AAK/D,8BAA8B,CAACC,OAAwBC;QAC5DJ,2BAAAA,EAAyBG;IAEzB,OAAA,WAAA,OACE,eAAA,EAACF,qCAAAA,EAAAA;QAAmBI,OAAOD,cAAcE,UAAU;kBACjD,WAAA,OAAA,eAAA,EAACH,MAAMI,IAAI,EAAA,CAAA;;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":";;;;+BAWaE;;;;;;;gCAVb,gDAAiD,GAEjD,SAASF,WAAW,QAAQ,4BAA4B;mCAGrB,sCAAmC;AAK/D,8BAA8B,CAACG,OAAwBC;QAC5DJ,2BAAAA,EAAyBG;IAEzB,OAAA,WAAA,OACE,eAAA,EAACF,qCAAAA,EAAAA;QAAmBI,OAAOD,cAAcE,UAAU;kBACjD,WAAA,OAAA,eAAA,EAACH,MAAMI,IAAI,EAAA,CAAA;;AAGjB,EAAE"}
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
6
6
  function _export(target, all) {
7
7
  for(var name in all)Object.defineProperty(target, name, {
8
8
  enumerable: true,
9
- get: all[name]
9
+ get: Object.getOwnPropertyDescriptor(all, name).get
10
10
  });
11
11
  }
12
12
  _export(exports, {
13
- useRatingBase_unstable: function() {
13
+ get useRatingBase_unstable () {
14
14
  return useRatingBase_unstable;
15
15
  },
16
- useRating_unstable: function() {
16
+ get useRating_unstable () {
17
17
  return useRating_unstable;
18
18
  }
19
19
  });
@@ -23,7 +23,7 @@ const _reactutilities = require("@fluentui/react-utilities");
23
23
  const _RatingItem = require("../../RatingItem.cjs");
24
24
  const _reacticons = require("@fluentui/react-icons");
25
25
  const useRating_unstable = (props, ref)=>{
26
- var _state_root;
26
+ var _state_root, _children;
27
27
  const { color = 'neutral', size = 'extra-large', iconFilled = _reacticons.StarFilled, iconOutline = _reacticons.StarRegular, max = 5, ...baseProps } = props;
28
28
  const state = useRatingBase_unstable({
29
29
  iconFilled,
@@ -39,7 +39,6 @@ const useRating_unstable = (props, ref)=>{
39
39
  }, [
40
40
  max
41
41
  ]);
42
- var _children;
43
42
  (_children = (_state_root = state.root).children) !== null && _children !== void 0 ? _children : _state_root.children = rootChildren;
44
43
  return {
45
44
  ...state,
@@ -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;;;;;;;;;;;;0BAyDaoB;eAAAA;;IAjCAV,kBAAAA;;;;;iEAtBU,QAAQ;gCAQxB,4BAA4B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gB,GAAG7C,OAAM8C,QAAQ,CAAqBC;IAC3E,MAAMlC,QAAyB;QAC7BG;QACAC;QACAe;QACAE;QACAC;QACAR;QACAiB;QACAI,YAAY;YACVnB,MAAM;QACR;QACAA,MAAMzB,oBAAAA,CAAK6C,MAAM,KACfhD,wCAAAA,EACE,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,aAAAA,QAAAA,aAAAA,KAAAA,IAAAA,KAAAA,IAAAA,SAAWmB,IAAI;oBAAET,MAAM;oBAAUa,OAAOJ;oBAAIzB,OAAO0B;gBAAS;YAC9D;QACF;IACF;IACAxC,MAAMgB,IAAI,CAAC4B,WAAW,OAAGtD,8BAAAA,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,OAAGvD,8BAAAA,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;;;;;;;;;;;;QAyDaoB;;;QAjCAV;;;;;iEAtBU,QAAQ;gCAQxB,4BAA4B;4BAER,sBAAmB;4BACN,wBAAwB;AAWzD,2BAA2B,CAACC,OAAoBC;QAgBrDC,aAAAA;IAfA,MAAM,EACJC,QAAQ,SAAS,EACjBC,OAAO,aAAa,EACpBC,aAAaR,sBAAU,EACvBS,cAAcR,uBAAW,EACzBS,MAAM,CAAC,EACP,GAAGC,WACJ,GAAGR;IACJ,MAAME,QAAQO,uBAAuB;QAAEJ;QAAYC;QAAa,GAAGE,SAAS;IAAC,GAAGP;IAEhF,sFAAsF;IACtF,MAAMS,eAAerB,OAAMsB,OAAO,CAAC;QACjC,OAAOC,MAAMC,IAAI,CAACD,MAAML,MAAM,CAACO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,MAAMY,WAAWC,WAAWF,GAAGX,MAAM,CAACd,KAAK;YAC3C,IAAI,CAAC4B,MAAMF,WAAW;gBACpBjB,SAASiB;gBACTpB,aAAAA,QAAAA,aAAAA,KAAAA,IAAAA,KAAAA,IAAAA,SAAWmB,IAAI;oBAAET,MAAM;oBAAUa,OAAOJ;oBAAIzB,OAAO0B;gBAAS;YAC9D;QACF;IACF;IACAxC,MAAMgB,IAAI,CAAC4B,WAAW,GAAGtD,kCAAAA,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,OAAGvD,8BAAAA,EAAeQ,MAAM+C,YAAY,EAAEN,CAAAA;QAC3DP,gBAAgBE;IAClB;IAEA,OAAOlC;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Rating/useRatingContextValues.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { RatingContextValues, RatingState } from './Rating.types';\nimport type { RatingItemContextValue } from '../RatingItem/RatingItem.types';\n\nexport const useRatingContextValues = (ratingState: RatingState): RatingContextValues => {\n const { color, hoveredValue, iconFilled, iconOutline, itemLabel, name, step, size, value } = ratingState;\n\n const ratingItem = React.useMemo<RatingItemContextValue>(\n () => ({\n color,\n hoveredValue,\n iconFilled,\n iconOutline,\n interactive: true,\n itemLabel,\n name,\n step,\n size,\n value,\n }),\n [color, hoveredValue, iconFilled, iconOutline, itemLabel, name, step, size, value],\n );\n\n return { ratingItem };\n};\n"],"names":["React","useRatingContextValues","ratingState","color","hoveredValue","iconFilled","iconOutline","itemLabel","name","step","size","value","ratingItem","useMemo","interactive"],"mappings":"AAAA;;;;;+BAMaC;;;;;;;iEAJU,QAAQ;AAIxB,+BAA+B,CAACC;IACrC,MAAM,EAAEC,KAAK,EAAEC,YAAY,EAAEC,UAAU,EAAEC,WAAW,EAAEC,SAAS,EAAEC,IAAI,EAAEC,IAAI,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGT;IAE7F,MAAMU,aAAaZ,OAAMa,OAAO,CAC9B,IAAO,CAAA;YACLV;YACAC;YACAC;YACAC;YACAQ,aAAa;YACbP;YACAC;YACAC;YACAC;YACAC;SACF,CAAA,EACA;QAACR;QAAOC;QAAcC;QAAYC;QAAaC;QAAWC;QAAMC;QAAMC;QAAMC;KAAM;IAGpF,OAAO;QAAEC;IAAW;AACtB,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/Rating/useRatingContextValues.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { RatingContextValues, RatingState } from './Rating.types';\nimport type { RatingItemContextValue } from '../RatingItem/RatingItem.types';\n\nexport const useRatingContextValues = (ratingState: RatingState): RatingContextValues => {\n const { color, hoveredValue, iconFilled, iconOutline, itemLabel, name, step, size, value } = ratingState;\n\n const ratingItem = React.useMemo<RatingItemContextValue>(\n () => ({\n color,\n hoveredValue,\n iconFilled,\n iconOutline,\n interactive: true,\n itemLabel,\n name,\n step,\n size,\n value,\n }),\n [color, hoveredValue, iconFilled, iconOutline, itemLabel, name, step, size, value],\n );\n\n return { ratingItem };\n};\n"],"names":["React","useRatingContextValues","ratingState","color","hoveredValue","iconFilled","iconOutline","itemLabel","name","step","size","value","ratingItem","useMemo","interactive"],"mappings":"AAAA;;;;;+BAMaC;;;;;;;iEAJU,QAAQ;AAIxB,+BAA+B,CAACC;IACrC,MAAM,EAAEC,KAAK,EAAEC,YAAY,EAAEC,UAAU,EAAEC,WAAW,EAAEC,SAAS,EAAEC,IAAI,EAAEC,IAAI,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGT;IAE7F,MAAMU,aAAaZ,OAAMa,OAAO,CAC9B,IAAO,CAAA;YACLV;YACAC;YACAC;YACAC;YACAQ,aAAa;YACbP;YACAC;YACAC;YACAC;YACAC;SACF,CAAA,EACA;QAACR;QAAOC;QAAcC;QAAYC;QAAaC;QAAWC;QAAMC;QAAMC;QAAMC;KAAM;IAGpF,OAAO;QAAEC;IAAW;AACtB,EAAE"}
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
6
6
  function _export(target, all) {
7
7
  for(var name in all)Object.defineProperty(target, name, {
8
8
  enumerable: true,
9
- get: all[name]
9
+ get: Object.getOwnPropertyDescriptor(all, name).get
10
10
  });
11
11
  }
12
12
  _export(exports, {
13
- ratingClassNames: function() {
13
+ get ratingClassNames () {
14
14
  return ratingClassNames;
15
15
  },
16
- useRatingStyles_unstable: function() {
16
+ get useRatingStyles_unstable () {
17
17
  return useRatingStyles_unstable;
18
18
  }
19
19
  });
@@ -1 +1 @@
1
- {"version":3,"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"],"names":["__resetStyles","mergeClasses","ratingClassNames","root","useRootClassName","useRatingStyles_unstable","state","rootClassName","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;oBAEiB;;;4BAWY;;;;uBAZK,gBAAgB;AACvD,MAAME,mBAAmB;IAC5BC,IAAI,EAAE;AACV,CAAC;AACD;;CAEA,GAAI,MAAMC,gBAAgB,GAAA,WAAA,OAAGJ,oBAAA,EAAA,WAAA,MAAA;IAAA;CAG5B,CAAC;AAGS,MAAMK,4BAA4BC,KAAK,IAAG;IACjD,MAAMC,aAAa,GAAGH,gBAAgB,CAAC,CAAC;IACxC,oDAAA;IACAE,KAAK,CAACH,IAAI,CAACK,SAAS,OAAGP,mBAAY,EAACC,gBAAgB,CAACC,IAAI,EAAEI,aAAa,EAAED,KAAK,CAACH,IAAI,CAACK,SAAS,CAAC;IAC/F,OAAOF,KAAK;AAChB,CAAC"}
1
+ {"version":3,"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"],"names":["__resetStyles","mergeClasses","ratingClassNames","root","useRootClassName","useRatingStyles_unstable","state","rootClassName","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;;;;;;;;uBACkC,gBAAgB;AACvD,MAAME,gBAAgB,GAAG;IAC5BC,IAAI,EAAE;AACV,CAAC;AACD;;CAEA,GAAI,MAAMC,gBAAgB,GAAA,WAAA,OAAGJ,oBAAA,EAAA,WAAA,MAAA;IAAA;CAG5B,CAAC;AAGS,MAAMK,wBAAwB,IAAIC,KAAK,IAAG;IACjD,MAAMC,aAAa,GAAGH,gBAAgB,CAAC,CAAC;IACxC,oDAAA;IACAE,KAAK,CAACH,IAAI,CAACK,SAAS,OAAGP,mBAAY,EAACC,gBAAgB,CAACC,IAAI,EAAEI,aAAa,EAAED,KAAK,CAACH,IAAI,CAACK,SAAS,CAAC;IAC/F,OAAOF,KAAK;AAChB,CAAC"}
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
6
6
  function _export(target, all) {
7
7
  for(var name in all)Object.defineProperty(target, name, {
8
8
  enumerable: true,
9
- get: all[name]
9
+ get: Object.getOwnPropertyDescriptor(all, name).get
10
10
  });
11
11
  }
12
12
  _export(exports, {
13
- ratingClassNames: function() {
13
+ get ratingClassNames () {
14
14
  return ratingClassNames;
15
15
  },
16
- useRatingStyles_unstable: function() {
16
+ get useRatingStyles_unstable () {
17
17
  return useRatingStyles_unstable;
18
18
  }
19
19
  });
@@ -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 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;;;;;;;;;;;;oBAMaE;;;IAgBAK,wBAAAA;;;;uBApBiC,iBAAiB;AAIxD,MAAML,mBAAgD;IAC3DC,MAAM;AACR,EAAE;AAEF;;CAEC,GAED,MAAMC,uBAAmBJ,sBAAAA,EAAgB;IACvCK,SAAS;IACTC,UAAU;AACZ;AAKO,iCAAiC,CAACE;IACvC,MAAMC,gBAAgBL;IACtB,oDAAoD;IACpDI,MAAML,IAAI,CAACO,SAAS,OAAGT,mBAAAA,EAAaC,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;;;;;;;;;;;;;;;;;;;uBAE8C,iBAAiB;AAIxD,MAAME,mBAAgD;IAC3DC,MAAM;AACR,EAAE;AAEF;;CAEC,GAED,MAAMC,uBAAmBJ,sBAAAA,EAAgB;IACvCK,SAAS;IACTC,UAAU;AACZ;AAKO,MAAMC,2BAA2B,CAACC;IACvC,MAAMC,gBAAgBL;IACtB,oDAAoD;IACpDI,MAAML,IAAI,CAACO,SAAS,OAAGT,mBAAAA,EAAaC,iBAAiBC,IAAI,EAAEM,eAAeD,MAAML,IAAI,CAACO,SAAS;IAC9F,OAAOF;AACT,EAAE"}
@@ -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;;;;;;;;;;;;iEAEuB,QAAQ;kCAEW,wBAAqB;qCAClB,2BAAwB;8CACrB,qCAAkC;+CAEpC,qCAAkC;qCACpC,kCAAkC;AAMvE,MAAMM,gBAAAA,WAAAA,GAAyDN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,YAAQT,2CAAAA,EAA0BO,OAAOC;IAC/C,MAAME,oBAAgBP,4DAAAA,EAA8BM;QAEpDP,6DAAAA,EAAgCO;QAChCL,gDAAAA,EAA4B,mCAAmCK;IAE/D,WAAOR,iDAAAA,EAA6BQ,OAAOC;AAC7C,GAAG;AAEHL,cAAcM,WAAW,GAAG"}
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;;;;;;;;;;;;iEAEuB,QAAQ;kCAEW,wBAAqB;qCAClB,2BAAwB;8CACrB,qCAAkC;+CAEpC,qCAAkC;qCACpC,kCAAkC;AAMvE,MAAMM,gBAAAA,WAAAA,GAAyDN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,YAAQT,2CAAAA,EAA0BO,OAAOC;IAC/C,MAAME,oBAAgBP,4DAAAA,EAA8BM;QAEpDP,6DAAAA,EAAgCO;QAChCL,gDAAAA,EAA4B,mCAAmCK;IAE/D,WAAOR,iDAAAA,EAA6BQ,OAAOC;AAC7C,GAAG;AAEHL,cAAcM,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/RatingDisplay/RatingDisplay.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { RatingItemContextValue } from '../RatingItem/RatingItem.types';\n\nexport type RatingDisplaySlots = {\n root: NonNullable<Slot<'div'>>;\n valueText?: Slot<'span'>;\n countText?: Slot<'span'>;\n};\n\n/**\n * RatingDisplay Props\n */\nexport type RatingDisplayProps = ComponentProps<RatingDisplaySlots> & {\n /**\n * Color of the rating items (stars).\n * @default neutral\n */\n color?: 'brand' | 'marigold' | 'neutral';\n /**\n * Renders a single filled star, with the value written next to it.\n * @default false\n */\n compact?: boolean;\n /**\n * The number of ratings represented by the rating value.\n * This will be formatted with a thousands separator (if applicable) and displayed next to the value.\n */\n count?: number;\n /**\n * The icon used for rating items.\n * @default StarFilled\n */\n icon?: React.ElementType;\n /**\n * The max value of the rating. This controls the number of rating items displayed.\n * Must be a whole number greater than 1.\n * @default 5\n */\n max?: number;\n /**\n * Sets the size of the RatingDisplay items.\n * @default medium\n */\n size?: 'small' | 'medium' | 'large' | 'extra-large';\n /**\n * The value of the rating\n */\n value?: number;\n};\n\n/**\n * RatingDisplay base props — excludes design props (color, size).\n */\nexport type RatingDisplayBaseProps = Omit<RatingDisplayProps, 'color' | 'size'>;\n\n/**\n * State used in rendering RatingDisplay\n */\nexport type RatingDisplayState = ComponentState<RatingDisplaySlots> &\n Required<Pick<RatingDisplayProps, 'color' | 'compact' | 'icon' | 'max' | 'size'>> &\n Pick<RatingDisplayProps, 'value'>;\n\n/**\n * RatingDisplay base state — excludes design props (color, size).\n */\nexport type RatingDisplayBaseState = Omit<RatingDisplayState, 'color' | 'size' | 'icon'> &\n Pick<RatingDisplayProps, 'icon'>;\n\nexport type RatingDisplayContextValues = { ratingItem: RatingItemContextValue };\n"],"names":[],"mappings":""}
1
+ {"version":3,"sources":["../../../src/components/RatingDisplay/RatingDisplay.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { RatingItemContextValue } from '../RatingItem/RatingItem.types';\n\nexport type RatingDisplaySlots = {\n root: NonNullable<Slot<'div'>>;\n valueText?: Slot<'span'>;\n countText?: Slot<'span'>;\n};\n\n/**\n * RatingDisplay Props\n */\nexport type RatingDisplayProps = ComponentProps<RatingDisplaySlots> & {\n /**\n * Color of the rating items (stars).\n * @default neutral\n */\n color?: 'brand' | 'marigold' | 'neutral';\n /**\n * Renders a single filled star, with the value written next to it.\n * @default false\n */\n compact?: boolean;\n /**\n * The number of ratings represented by the rating value.\n * This will be formatted with a thousands separator (if applicable) and displayed next to the value.\n */\n count?: number;\n /**\n * The icon used for rating items.\n * @default StarFilled\n */\n icon?: React.ElementType;\n /**\n * The max value of the rating. This controls the number of rating items displayed.\n * Must be a whole number greater than 1.\n * @default 5\n */\n max?: number;\n /**\n * Sets the size of the RatingDisplay items.\n * @default medium\n */\n size?: 'small' | 'medium' | 'large' | 'extra-large';\n /**\n * The value of the rating\n */\n value?: number;\n};\n\n/**\n * RatingDisplay base props — excludes design props (color, size).\n */\nexport type RatingDisplayBaseProps = Omit<RatingDisplayProps, 'color' | 'size'>;\n\n/**\n * State used in rendering RatingDisplay\n */\nexport type RatingDisplayState = ComponentState<RatingDisplaySlots> &\n Required<Pick<RatingDisplayProps, 'color' | 'compact' | 'icon' | 'max' | 'size'>> &\n Pick<RatingDisplayProps, 'value'>;\n\n/**\n * RatingDisplay base state — excludes design props (color, size).\n */\nexport type RatingDisplayBaseState = Omit<RatingDisplayState, 'color' | 'size' | 'icon'> &\n Pick<RatingDisplayProps, 'icon'>;\n\nexport type RatingDisplayContextValues = { ratingItem: RatingItemContextValue };\n"],"names":[],"mappings":""}
@@ -5,29 +5,29 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- RatingDisplay: function() {
12
+ get RatingDisplay () {
13
13
  return _RatingDisplay.RatingDisplay;
14
14
  },
15
- ratingDisplayClassNames: function() {
15
+ get ratingDisplayClassNames () {
16
16
  return _useRatingDisplayStylesstyles.ratingDisplayClassNames;
17
17
  },
18
- renderRatingDisplay_unstable: function() {
18
+ get renderRatingDisplay_unstable () {
19
19
  return _renderRatingDisplay.renderRatingDisplay_unstable;
20
20
  },
21
- useRatingDisplayBase_unstable: function() {
21
+ get useRatingDisplayBase_unstable () {
22
22
  return _useRatingDisplay.useRatingDisplayBase_unstable;
23
23
  },
24
- useRatingDisplayContextValues: function() {
24
+ get useRatingDisplayContextValues () {
25
25
  return _useRatingDisplayContextValues.useRatingDisplayContextValues;
26
26
  },
27
- useRatingDisplayStyles_unstable: function() {
27
+ get useRatingDisplayStyles_unstable () {
28
28
  return _useRatingDisplayStylesstyles.useRatingDisplayStyles_unstable;
29
29
  },
30
- useRatingDisplay_unstable: function() {
30
+ get useRatingDisplay_unstable () {
31
31
  return _useRatingDisplay.useRatingDisplay_unstable;
32
32
  }
33
33
  });
@@ -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":";;;;;;;;;;;IAASA;2CAAa;;IAWbI;oEAAuB;;;eAFvBH,iDAA4B;;;eACDE,+CAA6B;;;eAExDG,4DAA6B;;;eADJD,6DAA+B;;;eADxDH,2CAAyB;;;+BAVJ,qBAAkB;qCASH,2BAAwB;kCACI,wBAAqB;8CACrB,qCAAkC;+CAC7D,qCAAkC"}
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":";;;;;;;;;;;;eAASA,4BAAa;;;eAWbI,qDAAuB;;;eAFvBH,iDAA4B;;;eACDE,+CAA6B;;;eAExDG,4DAA6B;;;eADJD,6DAA+B;;;eADxDH,2CAAyB;;;+BAVJ,qBAAkB;qCASH,2BAAwB;kCACI,wBAAqB;8CACrB,qCAAkC;+CAC7D,qCAAkC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/RatingDisplay/renderRatingDisplay.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 { RatingDisplayBaseState, RatingDisplaySlots, RatingDisplayContextValues } from './RatingDisplay.types';\nimport { RatingItemProvider } from '../../contexts/RatingItemContext';\n\n/**\n * Render the final JSX of RatingDisplay\n */\nexport const renderRatingDisplay_unstable = (\n state: RatingDisplayBaseState,\n contextValues: RatingDisplayContextValues,\n): JSXElement => {\n assertSlots<RatingDisplaySlots>(state);\n\n return (\n <RatingItemProvider value={contextValues.ratingItem}>\n <state.root>\n {state.root.children}\n {state.valueText && <state.valueText />}\n {state.countText && <state.countText />}\n </state.root>\n </RatingItemProvider>\n );\n};\n"],"names":["assertSlots","RatingItemProvider","renderRatingDisplay_unstable","state","contextValues","value","ratingItem","root","children","valueText","countText"],"mappings":";;;;+BAWaE;;;;;;4BAVb,iCAAiD;gCAErB,4BAA4B;mCAGrB,sCAAmC;AAK/D,qCAAqC,CAC1CC,OACAC;QAEAJ,2BAAAA,EAAgCG;IAEhC,OAAA,WAAA,OACE,eAAA,EAACF,qCAAAA,EAAAA;QAAmBI,OAAOD,cAAcE,UAAU;kBACjD,WAAA,OAAA,gBAAA,EAACH,MAAMI,IAAI,EAAA;;gBACRJ,MAAMI,IAAI,CAACC,QAAQ;gBACnBL,MAAMM,SAAS,IAAA,WAAA,OAAI,eAAA,EAACN,MAAMM,SAAS,EAAA,CAAA;gBACnCN,MAAMO,SAAS,IAAA,WAAA,OAAI,eAAA,EAACP,MAAMO,SAAS,EAAA,CAAA;;;;AAI5C,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/RatingDisplay/renderRatingDisplay.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 { RatingDisplayBaseState, RatingDisplaySlots, RatingDisplayContextValues } from './RatingDisplay.types';\nimport { RatingItemProvider } from '../../contexts/RatingItemContext';\n\n/**\n * Render the final JSX of RatingDisplay\n */\nexport const renderRatingDisplay_unstable = (\n state: RatingDisplayBaseState,\n contextValues: RatingDisplayContextValues,\n): JSXElement => {\n assertSlots<RatingDisplaySlots>(state);\n\n return (\n <RatingItemProvider value={contextValues.ratingItem}>\n <state.root>\n {state.root.children}\n {state.valueText && <state.valueText />}\n {state.countText && <state.countText />}\n </state.root>\n </RatingItemProvider>\n );\n};\n"],"names":["assertSlots","RatingItemProvider","renderRatingDisplay_unstable","state","contextValues","value","ratingItem","root","children","valueText","countText"],"mappings":";;;;+BAWaE;;;;;;;gCAVb,gDAAiD,GAEjD,SAASF,WAAW,QAAQ,4BAA4B;mCAGrB,sCAAmC;AAK/D,qCAAqC,CAC1CG,OACAC;QAEAJ,2BAAAA,EAAgCG;IAEhC,OAAA,WAAA,OACE,eAAA,EAACF,qCAAAA,EAAAA;QAAmBI,OAAOD,cAAcE,UAAU;kBACjD,WAAA,OAAA,gBAAA,EAACH,MAAMI,IAAI,EAAA;;gBACRJ,MAAMI,IAAI,CAACC,QAAQ;gBACnBL,MAAMM,SAAS,IAAA,WAAA,OAAI,eAAA,EAACN,MAAMM,SAAS,EAAA,CAAA;gBACnCN,MAAMO,SAAS,IAAA,WAAA,OAAI,eAAA,EAACP,MAAMO,SAAS,EAAA,CAAA;;;;AAI5C,EAAE"}
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
6
6
  function _export(target, all) {
7
7
  for(var name in all)Object.defineProperty(target, name, {
8
8
  enumerable: true,
9
- get: all[name]
9
+ get: Object.getOwnPropertyDescriptor(all, name).get
10
10
  });
11
11
  }
12
12
  _export(exports, {
13
- useRatingDisplayBase_unstable: function() {
13
+ get useRatingDisplayBase_unstable () {
14
14
  return useRatingDisplayBase_unstable;
15
15
  },
16
- useRatingDisplay_unstable: function() {
16
+ get useRatingDisplay_unstable () {
17
17
  return useRatingDisplay_unstable;
18
18
  }
19
19
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/RatingDisplay/useRatingDisplay.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot, useId } from '@fluentui/react-utilities';\nimport type {\n RatingDisplayBaseProps,\n RatingDisplayBaseState,\n RatingDisplayProps,\n RatingDisplayState,\n} from './RatingDisplay.types';\nimport { StarFilled } from '@fluentui/react-icons';\nimport { RatingItem } from '../RatingItem/RatingItem';\n\n/**\n * Create the state required to render RatingDisplay.\n *\n * The returned state can be modified with hooks such as useRatingDisplayStyles_unstable,\n * before being passed to renderRatingDisplay_unstable.\n *\n * @param props - props from this instance of RatingDisplay\n * @param ref - reference to root HTMLDivElement of RatingDisplay\n */\nexport const useRatingDisplay_unstable = (\n props: RatingDisplayProps,\n ref: React.Ref<HTMLDivElement>,\n): RatingDisplayState => {\n const { color = 'neutral', size = 'medium', icon = StarFilled, ...baseProps } = props;\n const state = useRatingDisplayBase_unstable({ icon, ...baseProps }, ref);\n\n const { compact, max } = state;\n\n const rootChildren = React.useMemo(() => {\n return compact ? (\n <RatingItem value={1} key={1} aria-hidden={true} />\n ) : (\n Array.from(Array(max), (_, i) => <RatingItem value={i + 1} key={i + 1} aria-hidden={true} />)\n );\n }, [compact, max]);\n\n return {\n ...state,\n root: {\n children: rootChildren,\n ...state.root,\n },\n icon,\n color,\n size,\n };\n};\n\n/**\n * Base hook for RatingDisplay component. Manages state related to ARIA img role,\n * aria-labelledby composition from valueText/countText IDs, slot structure, and\n * compact/full display modes — without design props (color, size).\n *\n * @param props - props from this instance of RatingDisplay (without color, size)\n * @param ref - reference to root HTMLDivElement of RatingDisplay\n */\nexport const useRatingDisplayBase_unstable = (\n props: RatingDisplayBaseProps,\n ref: React.Ref<HTMLDivElement>,\n): RatingDisplayBaseState => {\n const { count, compact = false, icon, max = 5, value } = props;\n\n const valueTextId = useId('rating-value-');\n const countTextId = useId('rating-count-');\n\n const state: RatingDisplayBaseState = {\n compact,\n icon,\n max,\n value,\n components: {\n root: 'div',\n valueText: 'span',\n countText: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'img',\n ...props,\n }),\n { elementType: 'div' },\n ),\n valueText: slot.optional(props.valueText, {\n renderByDefault: value !== undefined,\n defaultProps: { children: value, id: valueTextId, 'aria-hidden': true },\n elementType: 'span',\n }),\n countText: slot.optional(props.countText, {\n renderByDefault: count !== undefined,\n defaultProps: { children: count?.toLocaleString(), id: countTextId, 'aria-hidden': true },\n elementType: 'span',\n }),\n };\n if (!state.root['aria-label'] && !state.root['aria-labelledby']) {\n state.root['aria-labelledby'] = [state.valueText?.id, state.countText?.id].filter(Boolean).join(' ');\n }\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","slot","useId","StarFilled","RatingItem","useRatingDisplay_unstable","props","ref","color","size","icon","baseProps","state","useRatingDisplayBase_unstable","compact","max","rootChildren","useMemo","value","key","aria-hidden","Array","from","_","i","root","children","count","valueTextId","countTextId","components","valueText","countText","always","role","elementType","optional","renderByDefault","undefined","defaultProps","id","toLocaleString","filter","Boolean","join"],"mappings":"AAAA;;;;;;;;;;;;iCA2Dac;eAAAA;;IArCAR,yBAAAA;;;;;iEApBU,QAAQ;gCACuB,4BAA4B;4BAOvD,wBAAwB;4BACxB,8BAA2B;AAW/C,kCAAkC,CACvCC,OACAC;IAEA,MAAM,EAAEC,QAAQ,SAAS,EAAEC,OAAO,QAAQ,EAAEC,OAAOP,sBAAU,EAAE,GAAGQ,WAAW,GAAGL;IAChF,MAAMM,QAAQC,8BAA8B;QAAEH;QAAM,GAAGC,SAAS;IAAC,GAAGJ;IAEpE,MAAM,EAAEO,OAAO,EAAEC,GAAG,EAAE,GAAGH;IAEzB,MAAMI,eAAejB,OAAMkB,OAAO,CAAC;QACjC,OAAOH,UAAAA,WAAAA,GACL,OAAA,aAAA,CAACV,sBAAAA,EAAAA;YAAWc,OAAO;YAAGC,KAAK;YAAGC,eAAa;aAE3CC,MAAMC,IAAI,CAACD,MAAMN,MAAM,CAACQ,GAAGC,IAAAA,WAAAA,GAAM,OAAA,aAAA,CAACpB,sBAAAA,EAAAA;gBAAWc,OAAOM,IAAI;gBAAGL,KAAKK,IAAI;gBAAGJ,eAAa;;IAExF,GAAG;QAACN;QAASC;KAAI;IAEjB,OAAO;QACL,GAAGH,KAAK;QACRa,MAAM;YACJC,UAAUV;YACV,GAAGJ,MAAMa,IAAI;QACf;QACAf;QACAF;QACAC;IACF;AACF,EAAE;AAUK,sCAAsC,CAC3CH,OACAC;IAEA,MAAM,EAAEoB,KAAK,EAAEb,UAAU,KAAK,EAAEJ,IAAI,EAAEK,MAAM,CAAC,EAAEG,KAAK,EAAE,GAAGZ;IAEzD,MAAMsB,kBAAc1B,qBAAAA,EAAM;IAC1B,MAAM2B,kBAAc3B,qBAAAA,EAAM;IAE1B,MAAMU,QAAgC;QACpCE;QACAJ;QACAK;QACAG;QACAY,YAAY;YACVL,MAAM;YACNM,WAAW;YACXC,WAAW;QACb;QACAP,MAAMxB,oBAAAA,CAAKgC,MAAM,CACfjC,4CAAAA,EAAyB,OAAO;YAC9BO;YACA2B,MAAM;YACN,GAAG5B,KAAK;QACV,IACA;YAAE6B,aAAa;QAAM;QAEvBJ,WAAW9B,oBAAAA,CAAKmC,QAAQ,CAAC9B,MAAMyB,SAAS,EAAE;YACxCM,iBAAiBnB,UAAUoB;YAC3BC,cAAc;gBAAEb,UAAUR;gBAAOsB,IAAIZ;gBAAa,eAAe;YAAK;YACtEO,aAAa;QACf;QACAH,WAAW/B,oBAAAA,CAAKmC,QAAQ,CAAC9B,MAAM0B,SAAS,EAAE;YACxCK,iBAAiBV,UAAUW;YAC3BC,cAAc;gBAAEb,QAAQ,EAAEC,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOc,cAAc;gBAAID,IAAIX;gBAAa,eAAe;YAAK;YACxFM,aAAa;QACf;IACF;IACA,IAAI,CAACvB,MAAMa,IAAI,CAAC,aAAa,IAAI,CAACb,MAAMa,IAAI,CAAC,kBAAkB,EAAE;YAC9Bb,kBAAqBA;QAAtDA,MAAMa,IAAI,CAAC,kBAAkB,GAAG;aAACb,mBAAAA,MAAMmB,SAAAA,AAAS,MAAA,QAAfnB,qBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,iBAAiB4B,EAAE;aAAE5B,mBAAAA,MAAMoB,SAAAA,AAAS,MAAA,QAAfpB,qBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,iBAAiB4B,EAAE;SAAC,CAACE,MAAM,CAACC,SAASC,IAAI,CAAC;IAClG;IACA,OAAOhC;AACT,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/RatingDisplay/useRatingDisplay.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot, useId } from '@fluentui/react-utilities';\nimport type {\n RatingDisplayBaseProps,\n RatingDisplayBaseState,\n RatingDisplayProps,\n RatingDisplayState,\n} from './RatingDisplay.types';\nimport { StarFilled } from '@fluentui/react-icons';\nimport { RatingItem } from '../RatingItem/RatingItem';\n\n/**\n * Create the state required to render RatingDisplay.\n *\n * The returned state can be modified with hooks such as useRatingDisplayStyles_unstable,\n * before being passed to renderRatingDisplay_unstable.\n *\n * @param props - props from this instance of RatingDisplay\n * @param ref - reference to root HTMLDivElement of RatingDisplay\n */\nexport const useRatingDisplay_unstable = (\n props: RatingDisplayProps,\n ref: React.Ref<HTMLDivElement>,\n): RatingDisplayState => {\n const { color = 'neutral', size = 'medium', icon = StarFilled, ...baseProps } = props;\n const state = useRatingDisplayBase_unstable({ icon, ...baseProps }, ref);\n\n const { compact, max } = state;\n\n const rootChildren = React.useMemo(() => {\n return compact ? (\n <RatingItem value={1} key={1} aria-hidden={true} />\n ) : (\n Array.from(Array(max), (_, i) => <RatingItem value={i + 1} key={i + 1} aria-hidden={true} />)\n );\n }, [compact, max]);\n\n return {\n ...state,\n root: {\n children: rootChildren,\n ...state.root,\n },\n icon,\n color,\n size,\n };\n};\n\n/**\n * Base hook for RatingDisplay component. Manages state related to ARIA img role,\n * aria-labelledby composition from valueText/countText IDs, slot structure, and\n * compact/full display modes — without design props (color, size).\n *\n * @param props - props from this instance of RatingDisplay (without color, size)\n * @param ref - reference to root HTMLDivElement of RatingDisplay\n */\nexport const useRatingDisplayBase_unstable = (\n props: RatingDisplayBaseProps,\n ref: React.Ref<HTMLDivElement>,\n): RatingDisplayBaseState => {\n const { count, compact = false, icon, max = 5, value } = props;\n\n const valueTextId = useId('rating-value-');\n const countTextId = useId('rating-count-');\n\n const state: RatingDisplayBaseState = {\n compact,\n icon,\n max,\n value,\n components: {\n root: 'div',\n valueText: 'span',\n countText: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'img',\n ...props,\n }),\n { elementType: 'div' },\n ),\n valueText: slot.optional(props.valueText, {\n renderByDefault: value !== undefined,\n defaultProps: { children: value, id: valueTextId, 'aria-hidden': true },\n elementType: 'span',\n }),\n countText: slot.optional(props.countText, {\n renderByDefault: count !== undefined,\n defaultProps: { children: count?.toLocaleString(), id: countTextId, 'aria-hidden': true },\n elementType: 'span',\n }),\n };\n if (!state.root['aria-label'] && !state.root['aria-labelledby']) {\n state.root['aria-labelledby'] = [state.valueText?.id, state.countText?.id].filter(Boolean).join(' ');\n }\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","slot","useId","StarFilled","RatingItem","useRatingDisplay_unstable","props","ref","color","size","icon","baseProps","state","useRatingDisplayBase_unstable","compact","max","rootChildren","useMemo","value","key","aria-hidden","Array","from","_","i","root","children","count","valueTextId","countTextId","components","valueText","countText","always","role","elementType","optional","renderByDefault","undefined","defaultProps","id","toLocaleString","filter","Boolean","join"],"mappings":"AAAA;;;;;;;;;;;;QA2Dac;;;QArCAR;;;;;iEApBU,QAAQ;gCACuB,4BAA4B;4BAOvD,wBAAwB;4BACxB,8BAA2B;AAW/C,kCAAkC,CACvCC,OACAC;IAEA,MAAM,EAAEC,QAAQ,SAAS,EAAEC,OAAO,QAAQ,EAAEC,OAAOP,sBAAU,EAAE,GAAGQ,WAAW,GAAGL;IAChF,MAAMM,QAAQC,8BAA8B;QAAEH;QAAM,GAAGC,SAAS;IAAC,GAAGJ;IAEpE,MAAM,EAAEO,OAAO,EAAEC,GAAG,EAAE,GAAGH;IAEzB,MAAMI,eAAejB,OAAMkB,OAAO,CAAC;QACjC,OAAOH,UAAAA,WAAAA,GACL,OAAA,aAAA,CAACV,sBAAAA,EAAAA;YAAWc,OAAO;YAAGC,KAAK;YAAGC,eAAa;aAE3CC,MAAMC,IAAI,CAACD,MAAMN,MAAM,CAACQ,GAAGC,IAAAA,WAAAA,GAAM,OAAA,aAAA,CAACpB,sBAAAA,EAAAA;gBAAWc,OAAOM,IAAI;gBAAGL,KAAKK,IAAI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AA,AAAS,MAAA,QAAfnB,qBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,iBAAiB4B,EAAE;aAAE5B,mBAAAA,MAAMoB,SAAAA,AAAS,MAAA,QAAfpB,qBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,iBAAiB4B,EAAE;SAAC,CAACE,MAAM,CAACC,SAASC,IAAI,CAAC;IAClG;IACA,OAAOhC;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/RatingDisplay/useRatingDisplayContextValues.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { RatingDisplayContextValues, RatingDisplayState } from './RatingDisplay.types';\nimport type { RatingItemContextValue } from '../RatingItem/RatingItem.types';\n\nexport const useRatingDisplayContextValues = (state: RatingDisplayState): RatingDisplayContextValues => {\n const { color, compact, icon, size, value } = state;\n\n const ratingItem = React.useMemo<RatingItemContextValue>(\n () => ({\n color,\n compact,\n iconFilled: icon,\n iconOutline: icon,\n interactive: false,\n step: 0.5,\n size,\n value,\n }),\n [color, compact, icon, size, value],\n );\n\n return { ratingItem };\n};\n"],"names":["React","useRatingDisplayContextValues","state","color","compact","icon","size","value","ratingItem","useMemo","iconFilled","iconOutline","interactive","step"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;AAIxB,MAAMC,gCAAgC,CAACC;IAC5C,MAAM,EAAEC,KAAK,EAAEC,OAAO,EAAEC,IAAI,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGL;IAE9C,MAAMM,aAAaR,OAAMS,OAAO,CAC9B,IAAO,CAAA;YACLN;YACAC;YACAM,YAAYL;YACZM,aAAaN;YACbO,aAAa;YACbC,MAAM;YACNP;YACAC;SACF,CAAA,EACA;QAACJ;QAAOC;QAASC;QAAMC;QAAMC;KAAM;IAGrC,OAAO;QAAEC;IAAW;AACtB,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/RatingDisplay/useRatingDisplayContextValues.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { RatingDisplayContextValues, RatingDisplayState } from './RatingDisplay.types';\nimport type { RatingItemContextValue } from '../RatingItem/RatingItem.types';\n\nexport const useRatingDisplayContextValues = (state: RatingDisplayState): RatingDisplayContextValues => {\n const { color, compact, icon, size, value } = state;\n\n const ratingItem = React.useMemo<RatingItemContextValue>(\n () => ({\n color,\n compact,\n iconFilled: icon,\n iconOutline: icon,\n interactive: false,\n step: 0.5,\n size,\n value,\n }),\n [color, compact, icon, size, value],\n );\n\n return { ratingItem };\n};\n"],"names":["React","useRatingDisplayContextValues","state","color","compact","icon","size","value","ratingItem","useMemo","iconFilled","iconOutline","interactive","step"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;AAIxB,MAAMC,gCAAgC,CAACC;IAC5C,MAAM,EAAEC,KAAK,EAAEC,OAAO,EAAEC,IAAI,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGL;IAE9C,MAAMM,aAAaR,OAAMS,OAAO,CAC9B,IAAO,CAAA;YACLN;YACAC;YACAM,YAAYL;YACZM,aAAaN;YACbO,aAAa;YACbC,MAAM;YACNP;YACAC;SACF,CAAA,EACA;QAACJ;QAAOC;QAASC;QAAMC;QAAMC;KAAM;IAGrC,OAAO;QAAEC;IAAW;AACtB,EAAE"}
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
6
6
  function _export(target, all) {
7
7
  for(var name in all)Object.defineProperty(target, name, {
8
8
  enumerable: true,
9
- get: all[name]
9
+ get: Object.getOwnPropertyDescriptor(all, name).get
10
10
  });
11
11
  }
12
12
  _export(exports, {
13
- ratingDisplayClassNames: function() {
13
+ get ratingDisplayClassNames () {
14
14
  return ratingDisplayClassNames;
15
15
  },
16
- useRatingDisplayStyles_unstable: function() {
16
+ get useRatingDisplayStyles_unstable () {
17
17
  return useRatingDisplayStyles_unstable;
18
18
  }
19
19
  });