@fluentui/react-rating 9.74.7-experimental.cli-api.20261006-ccaa611d58.0 → 9.75.0-experimental.css-modules.20261031-810ab07afb.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -10
- package/lib/components/Rating/Rating.js.map +1 -1
- package/lib/components/Rating/Rating.module.css +6 -0
- package/lib/components/Rating/Rating.types.js.map +1 -1
- package/lib/components/Rating/index.js.map +1 -1
- package/lib/components/Rating/renderRating.js +2 -2
- package/lib/components/Rating/renderRating.js.map +1 -1
- package/lib/components/Rating/useRating.js +1 -2
- package/lib/components/Rating/useRating.js.map +1 -1
- package/lib/components/Rating/useRatingContextValues.js.map +1 -1
- package/lib/components/Rating/useRatingStyles.styles.css.js +9 -0
- package/lib/components/Rating/useRatingStyles.styles.css.js.map +1 -0
- package/lib/components/Rating/useRatingStyles.styles.raw.css.js +9 -0
- package/lib/components/Rating/useRatingStyles.styles.raw.css.js.map +1 -0
- package/lib/components/Rating/useRatingStyles.styles.raw.js.map +1 -1
- package/lib/components/RatingDisplay/RatingDisplay.js.map +1 -1
- package/lib/components/RatingDisplay/RatingDisplay.module.css +33 -0
- package/lib/components/RatingDisplay/RatingDisplay.types.js.map +1 -1
- package/lib/components/RatingDisplay/index.js.map +1 -1
- package/lib/components/RatingDisplay/renderRatingDisplay.js +2 -2
- package/lib/components/RatingDisplay/renderRatingDisplay.js.map +1 -1
- package/lib/components/RatingDisplay/useRatingDisplay.js.map +1 -1
- package/lib/components/RatingDisplay/useRatingDisplayContextValues.js.map +1 -1
- package/lib/components/RatingDisplay/useRatingDisplayStyles.styles.css.js +17 -0
- package/lib/components/RatingDisplay/useRatingDisplayStyles.styles.css.js.map +1 -0
- package/lib/components/RatingDisplay/useRatingDisplayStyles.styles.raw.css.js +17 -0
- package/lib/components/RatingDisplay/useRatingDisplayStyles.styles.raw.css.js.map +1 -0
- package/lib/components/RatingDisplay/useRatingDisplayStyles.styles.raw.js.map +1 -1
- package/lib/components/RatingItem/RatingItem.js.map +1 -1
- package/lib/components/RatingItem/RatingItem.module.css +121 -0
- package/lib/components/RatingItem/RatingItem.types.js.map +1 -1
- package/lib/components/RatingItem/index.js.map +1 -1
- package/lib/components/RatingItem/renderRatingItem.js +2 -2
- package/lib/components/RatingItem/renderRatingItem.js.map +1 -1
- package/lib/components/RatingItem/useRatingItem.js +1 -1
- package/lib/components/RatingItem/useRatingItem.js.map +1 -1
- package/lib/components/RatingItem/useRatingItemStyles.styles.css.js +25 -0
- package/lib/components/RatingItem/useRatingItemStyles.styles.css.js.map +1 -0
- package/lib/components/RatingItem/useRatingItemStyles.styles.raw.css.js +25 -0
- package/lib/components/RatingItem/useRatingItemStyles.styles.raw.css.js.map +1 -0
- package/lib/components/RatingItem/useRatingItemStyles.styles.raw.js.map +1 -1
- package/lib/contexts/RatingItemContext.js.map +1 -1
- package/lib/contexts/index.js.map +1 -1
- package/lib-commonjs/Rating.cjs +8 -8
- package/lib-commonjs/RatingDisplay.cjs +8 -8
- package/lib-commonjs/RatingItem.cjs +7 -7
- package/lib-commonjs/components/Rating/Rating.cjs.map +1 -1
- package/lib-commonjs/components/Rating/Rating.module.css +6 -0
- package/lib-commonjs/components/Rating/Rating.types.cjs.map +1 -1
- package/lib-commonjs/components/Rating/index.cjs +8 -8
- package/lib-commonjs/components/Rating/index.cjs.map +1 -1
- package/lib-commonjs/components/Rating/renderRating.cjs.map +1 -1
- package/lib-commonjs/components/Rating/useRating.cjs +4 -5
- package/lib-commonjs/components/Rating/useRating.cjs.map +1 -1
- package/lib-commonjs/components/Rating/useRatingContextValues.cjs.map +1 -1
- package/lib-commonjs/components/Rating/useRatingStyles.styles.cjs +3 -3
- package/lib-commonjs/components/Rating/useRatingStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/Rating/useRatingStyles.styles.css.cjs +28 -0
- package/lib-commonjs/components/Rating/useRatingStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/Rating/useRatingStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/Rating/useRatingStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/Rating/useRatingStyles.styles.raw.css.cjs +28 -0
- package/lib-commonjs/components/Rating/useRatingStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/RatingDisplay/RatingDisplay.cjs.map +1 -1
- package/lib-commonjs/components/RatingDisplay/RatingDisplay.module.css +33 -0
- package/lib-commonjs/components/RatingDisplay/RatingDisplay.types.cjs.map +1 -1
- package/lib-commonjs/components/RatingDisplay/index.cjs +8 -8
- package/lib-commonjs/components/RatingDisplay/index.cjs.map +1 -1
- package/lib-commonjs/components/RatingDisplay/renderRatingDisplay.cjs.map +1 -1
- package/lib-commonjs/components/RatingDisplay/useRatingDisplay.cjs +3 -3
- package/lib-commonjs/components/RatingDisplay/useRatingDisplay.cjs.map +1 -1
- package/lib-commonjs/components/RatingDisplay/useRatingDisplayContextValues.cjs.map +1 -1
- package/lib-commonjs/components/RatingDisplay/useRatingDisplayStyles.styles.cjs +3 -3
- package/lib-commonjs/components/RatingDisplay/useRatingDisplayStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/RatingDisplay/useRatingDisplayStyles.styles.css.cjs +36 -0
- package/lib-commonjs/components/RatingDisplay/useRatingDisplayStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/RatingDisplay/useRatingDisplayStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/RatingDisplay/useRatingDisplayStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/RatingDisplay/useRatingDisplayStyles.styles.raw.css.cjs +36 -0
- package/lib-commonjs/components/RatingDisplay/useRatingDisplayStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/RatingItem/RatingItem.cjs.map +1 -1
- package/lib-commonjs/components/RatingItem/RatingItem.module.css +121 -0
- package/lib-commonjs/components/RatingItem/RatingItem.types.cjs.map +1 -1
- package/lib-commonjs/components/RatingItem/index.cjs +7 -7
- package/lib-commonjs/components/RatingItem/index.cjs.map +1 -1
- package/lib-commonjs/components/RatingItem/renderRatingItem.cjs.map +1 -1
- package/lib-commonjs/components/RatingItem/useRatingItem.cjs +4 -4
- package/lib-commonjs/components/RatingItem/useRatingItem.cjs.map +1 -1
- package/lib-commonjs/components/RatingItem/useRatingItemStyles.styles.cjs +3 -3
- package/lib-commonjs/components/RatingItem/useRatingItemStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/RatingItem/useRatingItemStyles.styles.css.cjs +44 -0
- package/lib-commonjs/components/RatingItem/useRatingItemStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/RatingItem/useRatingItemStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/RatingItem/useRatingItemStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/RatingItem/useRatingItemStyles.styles.raw.css.cjs +44 -0
- package/lib-commonjs/components/RatingItem/useRatingItemStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/contexts/RatingItemContext.cjs +4 -4
- package/lib-commonjs/contexts/RatingItemContext.cjs.map +1 -1
- package/lib-commonjs/contexts/index.cjs +4 -4
- package/lib-commonjs/contexts/index.cjs.map +1 -1
- package/lib-commonjs/index.cjs +23 -23
- package/lib-commonjs/index.cjs.map +1 -1
- package/package.json +13 -13
- package/dist/metadata/api/api-root.json +0 -1
- package/dist/metadata/index.json +0 -1
|
@@ -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
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
useRatingItemBase_unstable
|
|
13
|
+
get useRatingItemBase_unstable () {
|
|
14
14
|
return useRatingItemBase_unstable;
|
|
15
15
|
},
|
|
16
|
-
useRatingItem_unstable
|
|
16
|
+
get useRatingItem_unstable () {
|
|
17
17
|
return useRatingItem_unstable;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -33,11 +33,11 @@ const useRatingItem_unstable = (props, ref)=>{
|
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
35
|
const useRatingItemBase_unstable = (props, ref)=>{
|
|
36
|
+
var _context_hoveredValue;
|
|
36
37
|
const context = (0, _RatingItemContext.useRatingItemContextValue_unstable)();
|
|
37
38
|
const { value = 0 } = props;
|
|
38
39
|
const { itemLabel = defaultItemLabel, iconFilled: IconFilled, iconOutline: IconOutline } = context;
|
|
39
40
|
const ratingValue = Math.round((context.value || 0) * 2) / 2; // round to the nearest 0.5
|
|
40
|
-
var _context_hoveredValue;
|
|
41
41
|
const displayedRatingValue = (_context_hoveredValue = context.hoveredValue) !== null && _context_hoveredValue !== void 0 ? _context_hoveredValue : ratingValue;
|
|
42
42
|
const appearance = context.interactive ? 'outline' : 'filled';
|
|
43
43
|
let iconFillWidth;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/RatingItem/useRatingItem.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot, useMergedRefs } from '@fluentui/react-utilities';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport type { RatingItemBaseProps, RatingItemBaseState, RatingItemProps, RatingItemState } from './RatingItem.types';\nimport { useRatingItemContextValue_unstable } from '../../contexts/RatingItemContext';\n\nconst defaultItemLabel = (num: number) => num + '';\n\n/**\n * Create the state required to render RatingItem.\n *\n * The returned state can be modified with hooks such as useRatingItemStyles_unstable,\n * before being passed to renderRatingItem_unstable.\n *\n * @param props - props from this instance of RatingItem\n * @param ref - reference to root HTMLElement of RatingItem\n */\nexport const useRatingItem_unstable = (props: RatingItemProps, ref: React.Ref<HTMLSpanElement>): RatingItemState => {\n const context = useRatingItemContextValue_unstable();\n const state = useRatingItemBase_unstable(props, ref);\n\n return {\n ...state,\n color: context.color,\n size: context.size,\n };\n};\n\n/**\n * Base hook for RatingItem component. Manages state related to fill width calculation,\n * radio input slots (for ARIA rating interaction), icon slots, and interactive mode —\n * without design props (color, size from context).\n *\n * @param props - props from this instance of RatingItem\n * @param ref - reference to root HTMLElement of RatingItem\n */\nexport const useRatingItemBase_unstable = (\n props: RatingItemBaseProps,\n ref: React.Ref<HTMLSpanElement>,\n): RatingItemBaseState => {\n const context = useRatingItemContextValue_unstable();\n const { value = 0 } = props;\n const { itemLabel = defaultItemLabel, iconFilled: IconFilled, iconOutline: IconOutline } = context;\n\n const ratingValue = Math.round((context.value || 0) * 2) / 2; // round to the nearest 0.5\n\n const displayedRatingValue = context.hoveredValue ?? ratingValue;\n\n const appearance = context.interactive ? 'outline' : 'filled';\n\n let iconFillWidth;\n if (context.compact || displayedRatingValue >= value) {\n iconFillWidth = 1;\n } else if (displayedRatingValue >= value - 0.5) {\n iconFillWidth = 0.5;\n } else {\n iconFillWidth = 0;\n }\n\n const root = slot.always(\n getIntrinsicElementProps('span', {\n ref: useMergedRefs(useFocusWithin<HTMLSpanElement>(), ref),\n ...props,\n }),\n { elementType: 'span' },\n );\n\n let unselectedIcon;\n if (iconFillWidth < 1) {\n unselectedIcon = slot.always(props.unselectedIcon, {\n defaultProps: {\n children: appearance === 'filled' ? <IconFilled /> : <IconOutline />,\n 'aria-hidden': true,\n },\n elementType: 'div',\n });\n }\n\n let selectedIcon;\n if (iconFillWidth > 0) {\n selectedIcon = slot.always(props.selectedIcon, {\n defaultProps: {\n children: <IconFilled />,\n 'aria-hidden': true,\n },\n elementType: 'div',\n });\n }\n\n let halfValueInput;\n if (context.interactive && context.step === 0.5) {\n halfValueInput = slot.always(props.halfValueInput, {\n defaultProps: {\n type: 'radio',\n name: context.name,\n value: value - 0.5,\n checked: ratingValue === value - 0.5,\n 'aria-label': itemLabel(value - 0.5),\n onChange: () => {\n // This empty onChange handler silences an incorrect React warning about not using onChange for a controlled input.\n // The parent Rating component has the real onChange handler to listen to change events from this input.\n },\n },\n elementType: 'input',\n });\n }\n\n let fullValueInput;\n if (context.interactive) {\n fullValueInput = slot.always(props.fullValueInput, {\n defaultProps: {\n type: 'radio',\n name: context.name,\n value,\n checked: ratingValue === value,\n 'aria-label': itemLabel(value),\n onChange: () => {\n // This empty onChange handler silences an incorrect React warning about not using onChange for a controlled input.\n // The parent Rating component has the real onChange handler to listen to change events from this input.\n },\n },\n\n elementType: 'input',\n });\n }\n\n return {\n appearance,\n step: context.step,\n iconFillWidth,\n value,\n components: {\n root: 'span',\n selectedIcon: 'div',\n unselectedIcon: 'div',\n halfValueInput: 'input',\n fullValueInput: 'input',\n },\n root,\n selectedIcon,\n unselectedIcon,\n halfValueInput,\n fullValueInput,\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useMergedRefs","useFocusWithin","useRatingItemContextValue_unstable","defaultItemLabel","num","useRatingItem_unstable","props","ref","context","state","useRatingItemBase_unstable","color","size","value","itemLabel","iconFilled","IconFilled","iconOutline","IconOutline","ratingValue","Math","round","displayedRatingValue","hoveredValue","appearance","interactive","iconFillWidth","compact","root","always","elementType","unselectedIcon","defaultProps","children","selectedIcon","halfValueInput","step","type","name","checked","onChange","fullValueInput","components"],"mappings":"AAAA;;;;;;;;;;;;QAsCaa;;;QAnBAL;;;;;iEAjBU,QAAQ;gCAC+B,4BAA4B;8BAC3D,0BAA0B;mCAEN,sCAAmC;AAEtF,MAAMF,mBAAmB,CAACC,MAAgBA,MAAM;AAWzC,+BAA+B,CAACE,OAAwBC;IAC7D,MAAMC,cAAUN,qDAAAA;IAChB,MAAMO,QAAQC,2BAA2BJ,OAAOC;IAEhD,OAAO;QACL,GAAGE,KAAK;QACRE,OAAOH,QAAQG,KAAK;QACpBC,MAAMJ,QAAQI,IAAI;IACpB;AACF,EAAE;AAUK,mCAAmC,CACxCN,OACAC;QAQ6BC;IAN7B,MAAMA,cAAUN,qDAAAA;IAChB,MAAM,E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IAAI3B,QAAQiB,WAAW,IAAIjB,QAAQ4B,IAAI,KAAK,KAAK;QAC/CD,iBAAiBpC,oBAAAA,CAAK8B,MAAM,CAACvB,MAAM6B,cAAc,EAAE;YACjDH,cAAc;gBACZK,MAAM;gBACNC,MAAM9B,QAAQ8B,IAAI;gBAClBzB,OAAOA,QAAQ;gBACf0B,SAASpB,gBAAgBN,QAAQ;gBACjC,cAAcC,UAAUD,QAAQ;gBAChC2B,UAAU;gBACR,mHAAmH;gBACnH,wGAAwG;gBAC1G;YACF;YACAV,aAAa;QACf;IACF;IAEA,IAAIW;IACJ,IAAIjC,QAAQiB,WAAW,EAAE;QACvBgB,iBAAiB1C,oBAAAA,CAAK8B,MAAM,CAACvB,MAAMmC,cAAc,EAAE;YACjDT,cAAc;gBACZK,MAAM;gBACNC,MAAM9B,QAAQ8B,IAAI;gBAClBzB;gBACA0B,SAASpB,gBAAgBN;gBACzB,cAAcC,UAAUD;gBACxB2B,UAAU;gBACR,mHAAmH;gBACnH,wGAAwG;gBAC1G;YACF;YAEAV,aAAa;QACf;IACF;IAEA,OAAO;QACLN;QACAY,MAAM5B,QAAQ4B,IAAI;QAClBV;QACAb;QACA6B,YAAY;YACVd,MAAM;YACNM,cAAc;YACdH,gBAAgB;YAChBI,gBAAgB;YAChBM,gBAAgB;QAClB;QACAb;QACAM;QACAH;QACAI;QACAM;IACF;AACF,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
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
ratingItemClassNames
|
|
13
|
+
get ratingItemClassNames () {
|
|
14
14
|
return ratingItemClassNames;
|
|
15
15
|
},
|
|
16
|
-
useRatingItemStyles_unstable
|
|
16
|
+
get useRatingItemStyles_unstable () {
|
|
17
17
|
return useRatingItemStyles_unstable;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useRatingItemStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from \"@griffel/react\";\nimport { tokens } from \"@fluentui/react-theme\";\nimport { createFocusOutlineStyle } from \"@fluentui/react-tabster\";\nexport const ratingItemClassNames = {\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 * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n position: 'relative',\n ...createFocusOutlineStyle({\n style: {},\n selector: 'focus-within'\n })\n },\n small: {\n fontSize: '12px',\n width: '12px',\n height: '12px'\n },\n medium: {\n fontSize: '16px',\n width: '16px',\n height: '16px'\n },\n large: {\n fontSize: '20px',\n width: '20px',\n height: '20px'\n },\n 'extra-large': {\n fontSize: '28px',\n width: '28px',\n height: '28px'\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});\nconst useInputStyles = makeStyles({\n lowerHalf: {\n right: '50%'\n },\n upperHalf: {\n left: '50%'\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});\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 * Apply styling to the RatingItem slots based on the state\n */ export const useRatingItemStyles_unstable = (state)=>{\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 // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(ratingItemClassNames.root, styles.root, styles[size], state.root.className);\n if (state.halfValueInput) {\n // eslint-disable-next-line react-hooks/immutability\n state.halfValueInput.className = mergeClasses(ratingItemClassNames.halfValueInput, inputBaseClassName, inputStyles.lowerHalf, state.halfValueInput.className);\n }\n if (state.fullValueInput) {\n // eslint-disable-next-line react-hooks/immutability\n state.fullValueInput.className = mergeClasses(ratingItemClassNames.fullValueInput, inputBaseClassName, state.halfValueInput && inputStyles.upperHalf, state.fullValueInput.className);\n }\n if (state.unselectedIcon) {\n // eslint-disable-next-line react-hooks/immutability\n state.unselectedIcon.className = mergeClasses(ratingItemClassNames.unselectedIcon, indicatorBaseClassName, appearance === 'filled' && indicatorStyles.filled, color === 'brand' && (appearance === 'filled' ? indicatorStyles.brandFilled : indicatorStyles.brand), color === 'marigold' && (appearance === 'filled' ? indicatorStyles.marigoldFilled : indicatorStyles.marigold), iconFillWidth === 0.5 && indicatorStyles.upperHalf, state.unselectedIcon.className);\n }\n if (state.selectedIcon) {\n // eslint-disable-next-line react-hooks/immutability\n state.selectedIcon.className = mergeClasses(ratingItemClassNames.selectedIcon, indicatorBaseClassName, color === 'brand' && indicatorStyles.brand, color === 'marigold' && indicatorStyles.marigold, iconFillWidth === 0.5 && indicatorStyles.lowerHalf, state.selectedIcon.className);\n }\n return state;\n};\n"],"names":["__resetStyles","__styles","mergeClasses","tokens","createFocusOutlineStyle","ratingItemClassNames","root","selectedIcon","unselectedIcon","halfValueInput","fullValueInput","useStyles","qhf8xq","Brovlpu","B486eqv","Bssx7fj","uh7if5","clntm0","Dlk2r6","h6p2u","I6qiy5","yzno9d","By0wis0","B2j2mmj","wigs8","pbfy6t","B0v4ure","Byrf0fs","Bsiemmq","Bwckmig","skfxo0","Iidy0u","B98u21t","Bvwlmkc","jo1ztg","Ba1iezr","Blmvk6g","B24cy0v","Bil7v7r","Br3gin4","nr063g","ghq09","Bbgo44z","Bseh09z","az1dzo","Ba3ybja","B6352mv","vppk2z","Biaj6j7","B2pnrqr","B29w5g4","Bhhzhcn","Bec0n69","small","Be2twd7","a9b677","Bqenvij","medium","large","d","p","f","i","m","useInputBaseClassName","useInputStyles","lowerHalf","j35jbq","upperHalf","oyh7mz","useIndicatorBaseClassName","useIndicatorStyles","l5kjut","uoufgc","v39lw8","Bbwb3tu","Frg6f3","brand","sj55zd","marigold","filled","ojy3ng","B7iucu3","Biw2w6l","brandFilled","marigoldFilled","useRatingItemStyles_unstable","state","color","size","iconFillWidth","appearance","styles","inputBaseClassName","inputStyles","indicatorBaseClassName","indicatorStyles","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAICK,oBAAoB;;;gCAwGY;eAA5BiF;;;uBA3GyC,gBAAgB;AAGnE,6BAA6B;IAChChF,IAAI,EAAE,gBAAgB;IACtBC,YAAY,EAAE,8BAA8B;IAC5CC,cAAc,EAAE,gCAAgC;IAChDC,cAAc,EAAE,gCAAgC;IAChDC,cAAc,EAAE;AACpB,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGV,eAAA,EAAA;IAAAK,IAAA,EAAA;QAAAM,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,O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EW,aAAa,KAAK,GAAG,IAAIM,eAAe,CAAC9B,SAAS,EAAEqB,KAAK,CAAChF,YAAY,CAAC0F,SAAS,CAAC;IAC1R;IACA,OAAOV,KAAK;AAChB,CAAC"}
|
|
1
|
+
{"version":3,"sources":["useRatingItemStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from \"@griffel/react\";\nimport { tokens } from \"@fluentui/react-theme\";\nimport { createFocusOutlineStyle } from \"@fluentui/react-tabster\";\nexport const ratingItemClassNames = {\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 * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n position: 'relative',\n ...createFocusOutlineStyle({\n style: {},\n selector: 'focus-within'\n })\n },\n small: {\n fontSize: '12px',\n width: '12px',\n height: '12px'\n },\n medium: {\n fontSize: '16px',\n width: '16px',\n height: '16px'\n },\n large: {\n fontSize: '20px',\n width: '20px',\n height: '20px'\n },\n 'extra-large': {\n fontSize: '28px',\n width: '28px',\n height: '28px'\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});\nconst useInputStyles = makeStyles({\n lowerHalf: {\n right: '50%'\n },\n upperHalf: {\n left: '50%'\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});\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 * Apply styling to the RatingItem slots based on the state\n */ export const useRatingItemStyles_unstable = (state)=>{\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 // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(ratingItemClassNames.root, styles.root, styles[size], state.root.className);\n if (state.halfValueInput) {\n // eslint-disable-next-line react-hooks/immutability\n state.halfValueInput.className = mergeClasses(ratingItemClassNames.halfValueInput, inputBaseClassName, inputStyles.lowerHalf, state.halfValueInput.className);\n }\n if (state.fullValueInput) {\n // eslint-disable-next-line react-hooks/immutability\n state.fullValueInput.className = mergeClasses(ratingItemClassNames.fullValueInput, inputBaseClassName, state.halfValueInput && inputStyles.upperHalf, state.fullValueInput.className);\n }\n if (state.unselectedIcon) {\n // eslint-disable-next-line react-hooks/immutability\n state.unselectedIcon.className = mergeClasses(ratingItemClassNames.unselectedIcon, indicatorBaseClassName, appearance === 'filled' && indicatorStyles.filled, color === 'brand' && (appearance === 'filled' ? indicatorStyles.brandFilled : indicatorStyles.brand), color === 'marigold' && (appearance === 'filled' ? indicatorStyles.marigoldFilled : indicatorStyles.marigold), iconFillWidth === 0.5 && indicatorStyles.upperHalf, state.unselectedIcon.className);\n }\n if (state.selectedIcon) {\n // eslint-disable-next-line react-hooks/immutability\n state.selectedIcon.className = mergeClasses(ratingItemClassNames.selectedIcon, indicatorBaseClassName, color === 'brand' && indicatorStyles.brand, color === 'marigold' && indicatorStyles.marigold, iconFillWidth === 0.5 && indicatorStyles.lowerHalf, state.selectedIcon.className);\n }\n return state;\n};\n"],"names":["__resetStyles","__styles","mergeClasses","tokens","createFocusOutlineStyle","ratingItemClassNames","root","selectedIcon","unselectedIcon","halfValueInput","fullValueInput","useStyles","qhf8xq","Brovlpu","B486eqv","Bssx7fj","uh7if5","clntm0","Dlk2r6","h6p2u","I6qiy5","yzno9d","By0wis0","B2j2mmj","wigs8","pbfy6t","B0v4ure","Byrf0fs","Bsiemmq","Bwckmig","skfxo0","Iidy0u","B98u21t","Bvwlmkc","jo1ztg","Ba1iezr","Blmvk6g","B24cy0v","Bil7v7r","Br3gin4","nr063g","ghq09","Bbgo44z","Bseh09z","az1dzo","Ba3ybja","B6352mv","vppk2z","Biaj6j7","B2pnrqr","B29w5g4","Bhhzhcn","Bec0n69","small","Be2twd7","a9b677","Bqenvij","medium","large","d","p","f","i","m","useInputBaseClassName","useInputStyles","lowerHalf","j35jbq","upperHalf","oyh7mz","useIndicatorBaseClassName","useIndicatorStyles","l5kjut","uoufgc","v39lw8","Bbwb3tu","Frg6f3","brand","sj55zd","marigold","filled","ojy3ng","B7iucu3","Biw2w6l","brandFilled","marigoldFilled","useRatingItemStyles_unstable","state","color","size","iconFillWidth","appearance","styles","inputBaseClassName","inputStyles","indicatorBaseClassName","indicatorStyles","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;QAICK,oBAAoB;;;QAwGhBiF,4BAA4B;;;;uBA3Ga,gBAAgB;AAGnE,6BAA6B;IAChChF,IAAI,EAAE,gBAAgB;IACtBC,YAAY,EAAE,8BAA8B;IAC5CC,cAAc,EAAE,gCAAgC;IAChDC,cAAc,EAAE,gCAAgC;IAChDC,cAAc,EAAE;AACpB,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGV,eAAA,EAAA;IAAAK,IAAA,EAAA;QAAAM,MAAA,EAAA;Q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,eAAe,CAACjB,QAAQ,EAAEW,aAAa,KAAK,GAAG,IAAIM,eAAe,CAAC9B,SAAS,EAAEqB,KAAK,CAAChF,YAAY,CAAC0F,SAAS,CAAC;IAC1R;IACA,OAAOV,KAAK;AAChB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get ratingItemClassNames () {
|
|
13
|
+
return ratingItemClassNames;
|
|
14
|
+
},
|
|
15
|
+
get useRatingItemStyles_unstable () {
|
|
16
|
+
return useRatingItemStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
const _clsx = require("clsx");
|
|
21
|
+
const _RatingItemmodulecss = /*#__PURE__*/ _interop_require_default._(require("./RatingItem.module.css"));
|
|
22
|
+
const ratingItemClassNames = {
|
|
23
|
+
root: 'fui-RatingItem',
|
|
24
|
+
selectedIcon: 'fui-RatingItem__selectedIcon',
|
|
25
|
+
unselectedIcon: 'fui-RatingItem__unselectedIcon',
|
|
26
|
+
halfValueInput: 'fui-RatingItem__halfValueInput',
|
|
27
|
+
fullValueInput: 'fui-RatingItem__fullValueInput'
|
|
28
|
+
};
|
|
29
|
+
const useRatingItemStyles_unstable = (state)=>{
|
|
30
|
+
state.root.className = (0, _clsx.clsx)(ratingItemClassNames.root, _RatingItemmodulecss.default.root, _RatingItemmodulecss.default[state.size], _RatingItemmodulecss.default[state.color], _RatingItemmodulecss.default[state.appearance], state.halfValueInput && _RatingItemmodulecss.default.half, state.iconFillWidth === 0.5 && _RatingItemmodulecss.default.halfIcon, state.root.className);
|
|
31
|
+
if (state.halfValueInput) {
|
|
32
|
+
state.halfValueInput.className = (0, _clsx.clsx)(ratingItemClassNames.halfValueInput, _RatingItemmodulecss.default.input, _RatingItemmodulecss.default.halfValueInput, state.halfValueInput.className);
|
|
33
|
+
}
|
|
34
|
+
if (state.fullValueInput) {
|
|
35
|
+
state.fullValueInput.className = (0, _clsx.clsx)(ratingItemClassNames.fullValueInput, _RatingItemmodulecss.default.input, _RatingItemmodulecss.default.fullValueInput, state.fullValueInput.className);
|
|
36
|
+
}
|
|
37
|
+
if (state.selectedIcon) {
|
|
38
|
+
state.selectedIcon.className = (0, _clsx.clsx)(ratingItemClassNames.selectedIcon, _RatingItemmodulecss.default.indicator, _RatingItemmodulecss.default.selectedIcon, state.selectedIcon.className);
|
|
39
|
+
}
|
|
40
|
+
if (state.unselectedIcon) {
|
|
41
|
+
state.unselectedIcon.className = (0, _clsx.clsx)(ratingItemClassNames.unselectedIcon, _RatingItemmodulecss.default.indicator, _RatingItemmodulecss.default.unselectedIcon, state.unselectedIcon.className);
|
|
42
|
+
}
|
|
43
|
+
return state;
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/RatingItem/useRatingItemStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { RatingItemSlots, RatingItemState } from './RatingItem.types';\nimport styles from './RatingItem.module.css';\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\nexport const useRatingItemStyles_unstable = (state: RatingItemState): RatingItemState => {\n state.root.className = clsx(\n ratingItemClassNames.root,\n styles.root,\n styles[state.size],\n styles[state.color],\n styles[state.appearance],\n state.halfValueInput && styles.half,\n state.iconFillWidth === 0.5 && styles.halfIcon,\n state.root.className,\n );\n if (state.halfValueInput) {\n state.halfValueInput.className = clsx(\n ratingItemClassNames.halfValueInput,\n styles.input,\n styles.halfValueInput,\n state.halfValueInput.className,\n );\n }\n if (state.fullValueInput) {\n state.fullValueInput.className = clsx(\n ratingItemClassNames.fullValueInput,\n styles.input,\n styles.fullValueInput,\n state.fullValueInput.className,\n );\n }\n if (state.selectedIcon) {\n state.selectedIcon.className = clsx(\n ratingItemClassNames.selectedIcon,\n styles.indicator,\n styles.selectedIcon,\n state.selectedIcon.className,\n );\n }\n if (state.unselectedIcon) {\n state.unselectedIcon.className = clsx(\n ratingItemClassNames.unselectedIcon,\n styles.indicator,\n styles.unselectedIcon,\n state.unselectedIcon.className,\n );\n }\n return state;\n};\n"],"names":["clsx","styles","ratingItemClassNames","root","selectedIcon","unselectedIcon","halfValueInput","fullValueInput","useRatingItemStyles_unstable","state","className","size","color","appearance","half","iconFillWidth","halfIcon","input","indicator"],"mappings":";;;;;;;;;;;QAKaE;;;QAQAM;;;;;sBAbQ,OAAO;8EAGT,0BAA0B;AAEtC,6BAA8D;IACnEL,MAAM;IACNC,cAAc;IACdC,gBAAgB;IAChBC,gBAAgB;IAChBC,gBAAgB;AAClB,EAAE;AAEK,qCAAqC,CAACE;IAC3CA,MAAMN,IAAI,CAACO,SAAS,GAAGV,cAAAA,EACrBE,qBAAqBC,IAAI,EACzBF,4BAAAA,CAAOE,IAAI,EACXF,4BAAM,CAACQ,MAAME,IAAI,CAAC,EAClBV,4BAAM,CAACQ,MAAMG,KAAK,CAAC,EACnBX,4BAAM,CAACQ,MAAMI,UAAU,CAAC,EACxBJ,MAAMH,cAAc,IAAIL,4BAAAA,CAAOa,IAAI,EACnCL,MAAMM,aAAa,KAAK,OAAOd,4BAAAA,CAAOe,QAAQ,EAC9CP,MAAMN,IAAI,CAACO,SAAS;IAEtB,IAAID,MAAMH,cAAc,EAAE;QACxBG,MAAMH,cAAc,CAACI,SAAS,OAAGV,UAAAA,EAC/BE,qBAAqBI,cAAc,EACnCL,4BAAAA,CAAOgB,KAAK,EACZhB,4BAAAA,CAAOK,cAAc,EACrBG,MAAMH,cAAc,CAACI,SAAS;IAElC;IACA,IAAID,MAAMF,cAAc,EAAE;QACxBE,MAAMF,cAAc,CAACG,SAAS,OAAGV,UAAAA,EAC/BE,qBAAqBK,cAAc,EACnCN,4BAAAA,CAAOgB,KAAK,EACZhB,4BAAAA,CAAOM,cAAc,EACrBE,MAAMF,cAAc,CAACG,SAAS;IAElC;IACA,IAAID,MAAML,YAAY,EAAE;QACtBK,MAAML,YAAY,CAACM,SAAS,OAAGV,UAAAA,EAC7BE,qBAAqBE,YAAY,EACjCH,4BAAAA,CAAOiB,SAAS,EAChBjB,4BAAAA,CAAOG,YAAY,EACnBK,MAAML,YAAY,CAACM,SAAS;IAEhC;IACA,IAAID,MAAMJ,cAAc,EAAE;QACxBI,MAAMJ,cAAc,CAACK,SAAS,GAAGV,cAAAA,EAC/BE,qBAAqBG,cAAc,EACnCJ,4BAAAA,CAAOiB,SAAS,EAChBjB,4BAAAA,CAAOI,cAAc,EACrBI,MAAMJ,cAAc,CAACK,SAAS;IAElC;IACA,OAAOD;AACT,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
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
ratingItemClassNames
|
|
13
|
+
get ratingItemClassNames () {
|
|
14
14
|
return ratingItemClassNames;
|
|
15
15
|
},
|
|
16
|
-
useRatingItemStyles_unstable
|
|
16
|
+
get useRatingItemStyles_unstable () {
|
|
17
17
|
return useRatingItemStyles_unstable;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
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;;;;;;;;;;;;QAQaK;;;;eAgHAkD;;;uBAtH6C,iBAAiB;4BAEpD,wBAAwB;8BACP,0BAA0B;AAG3D,6BAA8D;IACnEjD,MAAM;IACNC,cAAc;IACdC,gBAAgB;IAChBC,gBAAgB;IAChBC,gBAAgB;AAClB,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYV,iBAAAA,EAAW;IAC3BK,MAAM;QACJM,UAAU;QACV,OAAGR,qCAAAA,EAAwB;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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BAAAA,EAC7BG,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"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get ratingItemClassNames () {
|
|
13
|
+
return ratingItemClassNames;
|
|
14
|
+
},
|
|
15
|
+
get useRatingItemStyles_unstable () {
|
|
16
|
+
return useRatingItemStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
+
const _clsx = require("clsx");
|
|
21
|
+
const _RatingItemmodulecss = /*#__PURE__*/ _interop_require_default._(require("./RatingItem.module.css"));
|
|
22
|
+
const ratingItemClassNames = {
|
|
23
|
+
root: 'fui-RatingItem',
|
|
24
|
+
selectedIcon: 'fui-RatingItem__selectedIcon',
|
|
25
|
+
unselectedIcon: 'fui-RatingItem__unselectedIcon',
|
|
26
|
+
halfValueInput: 'fui-RatingItem__halfValueInput',
|
|
27
|
+
fullValueInput: 'fui-RatingItem__fullValueInput'
|
|
28
|
+
};
|
|
29
|
+
const useRatingItemStyles_unstable = (state)=>{
|
|
30
|
+
state.root.className = (0, _clsx.clsx)(ratingItemClassNames.root, _RatingItemmodulecss.default.root, _RatingItemmodulecss.default[state.size], _RatingItemmodulecss.default[state.color], _RatingItemmodulecss.default[state.appearance], state.halfValueInput && _RatingItemmodulecss.default.half, state.iconFillWidth === 0.5 && _RatingItemmodulecss.default.halfIcon, state.root.className);
|
|
31
|
+
if (state.halfValueInput) {
|
|
32
|
+
state.halfValueInput.className = (0, _clsx.clsx)(ratingItemClassNames.halfValueInput, _RatingItemmodulecss.default.input, _RatingItemmodulecss.default.halfValueInput, state.halfValueInput.className);
|
|
33
|
+
}
|
|
34
|
+
if (state.fullValueInput) {
|
|
35
|
+
state.fullValueInput.className = (0, _clsx.clsx)(ratingItemClassNames.fullValueInput, _RatingItemmodulecss.default.input, _RatingItemmodulecss.default.fullValueInput, state.fullValueInput.className);
|
|
36
|
+
}
|
|
37
|
+
if (state.selectedIcon) {
|
|
38
|
+
state.selectedIcon.className = (0, _clsx.clsx)(ratingItemClassNames.selectedIcon, _RatingItemmodulecss.default.indicator, _RatingItemmodulecss.default.selectedIcon, state.selectedIcon.className);
|
|
39
|
+
}
|
|
40
|
+
if (state.unselectedIcon) {
|
|
41
|
+
state.unselectedIcon.className = (0, _clsx.clsx)(ratingItemClassNames.unselectedIcon, _RatingItemmodulecss.default.indicator, _RatingItemmodulecss.default.unselectedIcon, state.unselectedIcon.className);
|
|
42
|
+
}
|
|
43
|
+
return state;
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/RatingItem/useRatingItemStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { RatingItemSlots, RatingItemState } from './RatingItem.types';\nimport styles from './RatingItem.module.css';\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\nexport const useRatingItemStyles_unstable = (state: RatingItemState): RatingItemState => {\n state.root.className = clsx(\n ratingItemClassNames.root,\n styles.root,\n styles[state.size],\n styles[state.color],\n styles[state.appearance],\n state.halfValueInput && styles.half,\n state.iconFillWidth === 0.5 && styles.halfIcon,\n state.root.className,\n );\n if (state.halfValueInput) {\n state.halfValueInput.className = clsx(\n ratingItemClassNames.halfValueInput,\n styles.input,\n styles.halfValueInput,\n state.halfValueInput.className,\n );\n }\n if (state.fullValueInput) {\n state.fullValueInput.className = clsx(\n ratingItemClassNames.fullValueInput,\n styles.input,\n styles.fullValueInput,\n state.fullValueInput.className,\n );\n }\n if (state.selectedIcon) {\n state.selectedIcon.className = clsx(\n ratingItemClassNames.selectedIcon,\n styles.indicator,\n styles.selectedIcon,\n state.selectedIcon.className,\n );\n }\n if (state.unselectedIcon) {\n state.unselectedIcon.className = clsx(\n ratingItemClassNames.unselectedIcon,\n styles.indicator,\n styles.unselectedIcon,\n state.unselectedIcon.className,\n );\n }\n return state;\n};\n"],"names":["clsx","styles","ratingItemClassNames","root","selectedIcon","unselectedIcon","halfValueInput","fullValueInput","useRatingItemStyles_unstable","state","className","size","color","appearance","half","iconFillWidth","halfIcon","input","indicator"],"mappings":";;;;;;;;;;;QAKaE;;;QAQAM;;;;;sBAbQ,OAAO;8EAGT,0BAA0B;AAEtC,6BAA8D;IACnEL,MAAM;IACNC,cAAc;IACdC,gBAAgB;IAChBC,gBAAgB;IAChBC,gBAAgB;AAClB,EAAE;AAEK,qCAAqC,CAACE;IAC3CA,MAAMN,IAAI,CAACO,SAAS,GAAGV,cAAAA,EACrBE,qBAAqBC,IAAI,EACzBF,4BAAAA,CAAOE,IAAI,EACXF,4BAAM,CAACQ,MAAME,IAAI,CAAC,EAClBV,4BAAM,CAACQ,MAAMG,KAAK,CAAC,EACnBX,4BAAM,CAACQ,MAAMI,UAAU,CAAC,EACxBJ,MAAMH,cAAc,IAAIL,4BAAAA,CAAOa,IAAI,EACnCL,MAAMM,aAAa,KAAK,OAAOd,4BAAAA,CAAOe,QAAQ,EAC9CP,MAAMN,IAAI,CAACO,SAAS;IAEtB,IAAID,MAAMH,cAAc,EAAE;QACxBG,MAAMH,cAAc,CAACI,SAAS,OAAGV,UAAAA,EAC/BE,qBAAqBI,cAAc,EACnCL,4BAAAA,CAAOgB,KAAK,EACZhB,4BAAAA,CAAOK,cAAc,EACrBG,MAAMH,cAAc,CAACI,SAAS;IAElC;IACA,IAAID,MAAMF,cAAc,EAAE;QACxBE,MAAMF,cAAc,CAACG,SAAS,OAAGV,UAAAA,EAC/BE,qBAAqBK,cAAc,EACnCN,4BAAAA,CAAOgB,KAAK,EACZhB,4BAAAA,CAAOM,cAAc,EACrBE,MAAMF,cAAc,CAACG,SAAS;IAElC;IACA,IAAID,MAAML,YAAY,EAAE;QACtBK,MAAML,YAAY,CAACM,SAAS,OAAGV,UAAAA,EAC7BE,qBAAqBE,YAAY,EACjCH,4BAAAA,CAAOiB,SAAS,EAChBjB,4BAAAA,CAAOG,YAAY,EACnBK,MAAML,YAAY,CAACM,SAAS;IAEhC;IACA,IAAID,MAAMJ,cAAc,EAAE;QACxBI,MAAMJ,cAAc,CAACK,SAAS,GAAGV,cAAAA,EAC/BE,qBAAqBG,cAAc,EACnCJ,4BAAAA,CAAOiB,SAAS,EAChBjB,4BAAAA,CAAOI,cAAc,EACrBI,MAAMJ,cAAc,CAACK,SAAS;IAElC;IACA,OAAOD;AACT,EAAE"}
|
|
@@ -6,17 +6,17 @@ 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
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
RatingItemContext
|
|
13
|
+
get RatingItemContext () {
|
|
14
14
|
return RatingItemContext;
|
|
15
15
|
},
|
|
16
|
-
RatingItemProvider
|
|
16
|
+
get RatingItemProvider () {
|
|
17
17
|
return RatingItemProvider;
|
|
18
18
|
},
|
|
19
|
-
useRatingItemContextValue_unstable
|
|
19
|
+
get useRatingItemContextValue_unstable () {
|
|
20
20
|
return useRatingItemContextValue_unstable;
|
|
21
21
|
}
|
|
22
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
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;;;;;;;;;;;;;;;;;;;;;;;iEAEuB,QAAQ;AAMxB,MAAMC,oBAAAA,WAAAA,GAAoBD,OAAME,aAAa,CAAqCC,WAAW;AACpG,MAAMC,gCAAwD;IAC5DC,OAAO;IACPC,YAAY;IACZC,aAAa;IACbC,MAAM;IACNC,MAAM;AACR;AACO,MAAMC,qBAAqBT,kBAAkBU,QAAQ,CAAC;AAKtD,MAAMC,qCAAqC,IAChDZ,OAAMa,UAAU,CAACZ,sBAAsBG,8BAA8B"}
|
|
@@ -5,17 +5,17 @@ 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
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
RatingItemContext
|
|
12
|
+
get RatingItemContext () {
|
|
13
13
|
return _RatingItemContext.RatingItemContext;
|
|
14
14
|
},
|
|
15
|
-
RatingItemProvider
|
|
15
|
+
get RatingItemProvider () {
|
|
16
16
|
return _RatingItemContext.RatingItemProvider;
|
|
17
17
|
},
|
|
18
|
-
useRatingItemContextValue_unstable
|
|
18
|
+
get useRatingItemContextValue_unstable () {
|
|
19
19
|
return _RatingItemContext.useRatingItemContextValue_unstable;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../src/contexts/index.ts"],"sourcesContent":["export { RatingItemContext, RatingItemProvider, useRatingItemContextValue_unstable } from './RatingItemContext';\n"],"names":["RatingItemContext","RatingItemProvider","useRatingItemContextValue_unstable"],"mappings":";;;;;;;;;;;;eAASA,oCAAiB;;;eAAEC,qCAAkB;;;eAAEC,qDAAkC;;;mCAAQ,yBAAsB"}
|
package/lib-commonjs/index.cjs
CHANGED
|
@@ -5,74 +5,74 @@ 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
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
Rating
|
|
12
|
+
get Rating () {
|
|
13
13
|
return _Rating.Rating;
|
|
14
14
|
},
|
|
15
|
-
RatingDisplay
|
|
15
|
+
get RatingDisplay () {
|
|
16
16
|
return _RatingDisplay.RatingDisplay;
|
|
17
17
|
},
|
|
18
|
-
RatingItem
|
|
18
|
+
get RatingItem () {
|
|
19
19
|
return _RatingItem.RatingItem;
|
|
20
20
|
},
|
|
21
|
-
RatingItemProvider
|
|
21
|
+
get RatingItemProvider () {
|
|
22
22
|
return _index.RatingItemProvider;
|
|
23
23
|
},
|
|
24
|
-
ratingClassNames
|
|
24
|
+
get ratingClassNames () {
|
|
25
25
|
return _Rating.ratingClassNames;
|
|
26
26
|
},
|
|
27
|
-
ratingDisplayClassNames
|
|
27
|
+
get ratingDisplayClassNames () {
|
|
28
28
|
return _RatingDisplay.ratingDisplayClassNames;
|
|
29
29
|
},
|
|
30
|
-
ratingItemClassNames
|
|
30
|
+
get ratingItemClassNames () {
|
|
31
31
|
return _RatingItem.ratingItemClassNames;
|
|
32
32
|
},
|
|
33
|
-
renderRatingDisplay_unstable
|
|
33
|
+
get renderRatingDisplay_unstable () {
|
|
34
34
|
return _RatingDisplay.renderRatingDisplay_unstable;
|
|
35
35
|
},
|
|
36
|
-
renderRatingItem_unstable
|
|
36
|
+
get renderRatingItem_unstable () {
|
|
37
37
|
return _RatingItem.renderRatingItem_unstable;
|
|
38
38
|
},
|
|
39
|
-
renderRating_unstable
|
|
39
|
+
get renderRating_unstable () {
|
|
40
40
|
return _Rating.renderRating_unstable;
|
|
41
41
|
},
|
|
42
|
-
useRatingBase_unstable
|
|
42
|
+
get useRatingBase_unstable () {
|
|
43
43
|
return _Rating.useRatingBase_unstable;
|
|
44
44
|
},
|
|
45
|
-
useRatingContextValues
|
|
45
|
+
get useRatingContextValues () {
|
|
46
46
|
return _Rating.useRatingContextValues;
|
|
47
47
|
},
|
|
48
|
-
useRatingDisplayBase_unstable
|
|
48
|
+
get useRatingDisplayBase_unstable () {
|
|
49
49
|
return _RatingDisplay.useRatingDisplayBase_unstable;
|
|
50
50
|
},
|
|
51
|
-
useRatingDisplayContextValues
|
|
51
|
+
get useRatingDisplayContextValues () {
|
|
52
52
|
return _RatingDisplay.useRatingDisplayContextValues;
|
|
53
53
|
},
|
|
54
|
-
useRatingDisplayStyles_unstable
|
|
54
|
+
get useRatingDisplayStyles_unstable () {
|
|
55
55
|
return _RatingDisplay.useRatingDisplayStyles_unstable;
|
|
56
56
|
},
|
|
57
|
-
useRatingDisplay_unstable
|
|
57
|
+
get useRatingDisplay_unstable () {
|
|
58
58
|
return _RatingDisplay.useRatingDisplay_unstable;
|
|
59
59
|
},
|
|
60
|
-
useRatingItemBase_unstable
|
|
60
|
+
get useRatingItemBase_unstable () {
|
|
61
61
|
return _RatingItem.useRatingItemBase_unstable;
|
|
62
62
|
},
|
|
63
|
-
useRatingItemContextValue_unstable
|
|
63
|
+
get useRatingItemContextValue_unstable () {
|
|
64
64
|
return _index.useRatingItemContextValue_unstable;
|
|
65
65
|
},
|
|
66
|
-
useRatingItemStyles_unstable
|
|
66
|
+
get useRatingItemStyles_unstable () {
|
|
67
67
|
return _RatingItem.useRatingItemStyles_unstable;
|
|
68
68
|
},
|
|
69
|
-
useRatingItem_unstable
|
|
69
|
+
get useRatingItem_unstable () {
|
|
70
70
|
return _RatingItem.useRatingItem_unstable;
|
|
71
71
|
},
|
|
72
|
-
useRatingStyles_unstable
|
|
72
|
+
get useRatingStyles_unstable () {
|
|
73
73
|
return _Rating.useRatingStyles_unstable;
|
|
74
74
|
},
|
|
75
|
-
useRating_unstable
|
|
75
|
+
get useRating_unstable () {
|
|
76
76
|
return _Rating.useRating_unstable;
|
|
77
77
|
}
|
|
78
78
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n Rating,\n ratingClassNames,\n renderRating_unstable,\n useRatingStyles_unstable,\n useRating_unstable,\n useRatingContextValues,\n useRatingBase_unstable,\n} from './Rating';\nexport type {\n RatingProps,\n RatingSlots,\n RatingState,\n RatingOnChangeEventData,\n RatingContextValues,\n RatingBaseProps,\n RatingBaseState,\n} from './Rating';\nexport {\n RatingItem,\n ratingItemClassNames,\n renderRatingItem_unstable,\n useRatingItemStyles_unstable,\n useRatingItem_unstable,\n useRatingItemBase_unstable,\n} from './RatingItem';\nexport type {\n RatingItemProps,\n RatingItemSlots,\n RatingItemState,\n RatingItemBaseProps,\n RatingItemBaseState,\n} from './RatingItem';\nexport { RatingItemProvider, useRatingItemContextValue_unstable } from './contexts/index';\nexport {\n RatingDisplay,\n ratingDisplayClassNames,\n renderRatingDisplay_unstable,\n useRatingDisplayStyles_unstable,\n useRatingDisplay_unstable,\n useRatingDisplayContextValues,\n useRatingDisplayBase_unstable,\n} from './RatingDisplay';\nexport type {\n RatingDisplayProps,\n RatingDisplaySlots,\n RatingDisplayState,\n RatingDisplayContextValues,\n RatingDisplayBaseProps,\n RatingDisplayBaseState,\n} from './RatingDisplay';\n"],"names":["Rating","ratingClassNames","renderRating_unstable","useRatingStyles_unstable","useRating_unstable","useRatingContextValues","useRatingBase_unstable","RatingItem","ratingItemClassNames","renderRatingItem_unstable","useRatingItemStyles_unstable","useRatingItem_unstable","useRatingItemBase_unstable","RatingItemProvider","useRatingItemContextValue_unstable","RatingDisplay","ratingDisplayClassNames","renderRatingDisplay_unstable","useRatingDisplayStyles_unstable","useRatingDisplay_unstable","useRatingDisplayContextValues","useRatingDisplayBase_unstable"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n Rating,\n ratingClassNames,\n renderRating_unstable,\n useRatingStyles_unstable,\n useRating_unstable,\n useRatingContextValues,\n useRatingBase_unstable,\n} from './Rating';\nexport type {\n RatingProps,\n RatingSlots,\n RatingState,\n RatingOnChangeEventData,\n RatingContextValues,\n RatingBaseProps,\n RatingBaseState,\n} from './Rating';\nexport {\n RatingItem,\n ratingItemClassNames,\n renderRatingItem_unstable,\n useRatingItemStyles_unstable,\n useRatingItem_unstable,\n useRatingItemBase_unstable,\n} from './RatingItem';\nexport type {\n RatingItemProps,\n RatingItemSlots,\n RatingItemState,\n RatingItemBaseProps,\n RatingItemBaseState,\n} from './RatingItem';\nexport { RatingItemProvider, useRatingItemContextValue_unstable } from './contexts/index';\nexport {\n RatingDisplay,\n ratingDisplayClassNames,\n renderRatingDisplay_unstable,\n useRatingDisplayStyles_unstable,\n useRatingDisplay_unstable,\n useRatingDisplayContextValues,\n useRatingDisplayBase_unstable,\n} from './RatingDisplay';\nexport type {\n RatingDisplayProps,\n RatingDisplaySlots,\n RatingDisplayState,\n RatingDisplayContextValues,\n RatingDisplayBaseProps,\n RatingDisplayBaseState,\n} from './RatingDisplay';\n"],"names":["Rating","ratingClassNames","renderRating_unstable","useRatingStyles_unstable","useRating_unstable","useRatingContextValues","useRatingBase_unstable","RatingItem","ratingItemClassNames","renderRatingItem_unstable","useRatingItemStyles_unstable","useRatingItem_unstable","useRatingItemBase_unstable","RatingItemProvider","useRatingItemContextValue_unstable","RatingDisplay","ratingDisplayClassNames","renderRatingDisplay_unstable","useRatingDisplayStyles_unstable","useRatingDisplay_unstable","useRatingDisplayContextValues","useRatingDisplayBase_unstable"],"mappings":";;;;;;;;;;;QACEA;6BAAM;;QAkCNe;2CAAa;;QAhBbR;qCAAU;;;eAcHM,yBAAkB;;;eA/BzBZ,wBAAgB;;;eAkChBe,sCAAuB;;;eAhBvBR,gCAAoB;;;eAiBpBS,2CAA4B;;;eAhB5BR,qCAAyB;;;eAlBzBP,6BAAqB;;;eAIrBI,8BAAsB;;;eADtBD,8BAAsB;;;eAmCtBgB,4CAA6B;;;eAD7BD,4CAA6B;;;eAF7BF,8CAA+B;;;eAC/BC,wCAAyB;;;eAfzBP,sCAA0B;;;eASCE,yCAAkC;;;eAX7DJ,wCAA4B;;;eAC5BC,kCAAsB;;;eAnBtBR,gCAAwB;;;eACxBC,0BAAkB;;;wBAGb,cAAW;4BAiBX,kBAAe;uBAQiD,sBAAmB;+BASnF,qBAAkB"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-rating",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
|
|
4
4
|
"description": "Rating component for building web experiences",
|
|
5
5
|
"main": "lib-commonjs/index.cjs",
|
|
6
6
|
"module": "lib/index.js",
|
|
7
7
|
"typings": "./dist/index.d.ts",
|
|
8
|
-
"sideEffects":
|
|
8
|
+
"sideEffects": [
|
|
9
|
+
"**/*.css"
|
|
10
|
+
],
|
|
9
11
|
"repository": {
|
|
10
12
|
"type": "git",
|
|
11
13
|
"url": "https://github.com/microsoft/fluentui"
|
|
@@ -13,13 +15,14 @@
|
|
|
13
15
|
"license": "MIT",
|
|
14
16
|
"dependencies": {
|
|
15
17
|
"@fluentui/react-icons": "^2.0.245",
|
|
16
|
-
"@fluentui/react-jsx-runtime": "9.
|
|
17
|
-
"@fluentui/react-shared-contexts": "9.
|
|
18
|
-
"@fluentui/react-tabster": "9.
|
|
19
|
-
"@fluentui/react-theme": "9.
|
|
20
|
-
"@fluentui/react-utilities": "9.
|
|
18
|
+
"@fluentui/react-jsx-runtime": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
|
|
19
|
+
"@fluentui/react-shared-contexts": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
|
|
20
|
+
"@fluentui/react-tabster": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
|
|
21
|
+
"@fluentui/react-theme": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
|
|
22
|
+
"@fluentui/react-utilities": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
|
|
21
23
|
"@griffel/react": "^1.5.32",
|
|
22
|
-
"@swc/helpers": "^0.5.1"
|
|
24
|
+
"@swc/helpers": "^0.5.1",
|
|
25
|
+
"clsx": "^2.1.1"
|
|
23
26
|
},
|
|
24
27
|
"peerDependencies": {
|
|
25
28
|
"@types/react": ">=16.14.0 <20.0.0",
|
|
@@ -41,7 +44,6 @@
|
|
|
41
44
|
"default": "./lib-commonjs/index.cjs"
|
|
42
45
|
}
|
|
43
46
|
},
|
|
44
|
-
"./metadata.json": "./dist/metadata/index.json",
|
|
45
47
|
"./package.json": "./package.json"
|
|
46
48
|
},
|
|
47
49
|
"beachball": {},
|
|
@@ -50,9 +52,7 @@
|
|
|
50
52
|
"dist/*.d.ts",
|
|
51
53
|
"dist/*.d.cts",
|
|
52
54
|
"lib",
|
|
53
|
-
"lib-commonjs"
|
|
54
|
-
"dist/metadata"
|
|
55
|
+
"lib-commonjs"
|
|
55
56
|
],
|
|
56
|
-
"type": "module"
|
|
57
|
-
"fluentuiCatalog": "./metadata.json"
|
|
57
|
+
"type": "module"
|
|
58
58
|
}
|