@fluentui/react-radio 9.1.16 → 9.1.17
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +52 -1
- package/CHANGELOG.md +17 -2
- package/lib/Radio.js +0 -1
- package/lib/Radio.js.map +1 -1
- package/lib/RadioGroup.js +0 -1
- package/lib/RadioGroup.js.map +1 -1
- package/lib/components/Radio/Radio.js +5 -7
- package/lib/components/Radio/Radio.js.map +1 -1
- package/lib/components/Radio/Radio.types.js +0 -1
- package/lib/components/Radio/Radio.types.js.map +1 -1
- package/lib/components/Radio/index.js +0 -1
- package/lib/components/Radio/index.js.map +1 -1
- package/lib/components/Radio/renderRadio.js +4 -9
- package/lib/components/Radio/renderRadio.js.map +1 -1
- package/lib/components/Radio/useRadio.js +64 -71
- package/lib/components/Radio/useRadio.js.map +1 -1
- package/lib/components/Radio/useRadioStyles.styles.js +1 -1
- package/lib/components/Radio/useRadioStyles.styles.js.map +1 -1
- package/lib/components/RadioGroup/RadioGroup.js +6 -8
- package/lib/components/RadioGroup/RadioGroup.js.map +1 -1
- package/lib/components/RadioGroup/RadioGroup.types.js +0 -1
- package/lib/components/RadioGroup/RadioGroup.types.js.map +1 -1
- package/lib/components/RadioGroup/index.js +0 -1
- package/lib/components/RadioGroup/index.js.map +1 -1
- package/lib/components/RadioGroup/renderRadioGroup.js +6 -11
- package/lib/components/RadioGroup/renderRadioGroup.js.map +1 -1
- package/lib/components/RadioGroup/useRadioGroup.js +32 -39
- package/lib/components/RadioGroup/useRadioGroup.js.map +1 -1
- package/lib/components/RadioGroup/useRadioGroupStyles.styles.js.map +1 -1
- package/lib/contexts/RadioGroupContext.js +3 -7
- package/lib/contexts/RadioGroupContext.js.map +1 -1
- package/lib/contexts/index.js +0 -1
- package/lib/contexts/index.js.map +1 -1
- package/lib/contexts/useRadioGroupContextValues.js +23 -23
- package/lib/contexts/useRadioGroupContextValues.js.map +1 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Radio.js +0 -3
- package/lib-commonjs/Radio.js.map +1 -1
- package/lib-commonjs/RadioGroup.js +0 -3
- package/lib-commonjs/RadioGroup.js.map +1 -1
- package/lib-commonjs/components/Radio/Radio.js +1 -3
- package/lib-commonjs/components/Radio/Radio.js.map +1 -1
- package/lib-commonjs/components/Radio/Radio.types.js +0 -3
- package/lib-commonjs/components/Radio/Radio.types.js.map +1 -1
- package/lib-commonjs/components/Radio/index.js +0 -3
- package/lib-commonjs/components/Radio/index.js.map +1 -1
- package/lib-commonjs/components/Radio/renderRadio.js +1 -3
- package/lib-commonjs/components/Radio/renderRadio.js.map +1 -1
- package/lib-commonjs/components/Radio/useRadio.js +1 -3
- package/lib-commonjs/components/Radio/useRadio.js.map +1 -1
- package/lib-commonjs/components/Radio/useRadioStyles.styles.js +11 -13
- package/lib-commonjs/components/Radio/useRadioStyles.styles.js.map +1 -1
- package/lib-commonjs/components/RadioGroup/RadioGroup.js +1 -3
- package/lib-commonjs/components/RadioGroup/RadioGroup.js.map +1 -1
- package/lib-commonjs/components/RadioGroup/RadioGroup.types.js +0 -3
- package/lib-commonjs/components/RadioGroup/RadioGroup.types.js.map +1 -1
- package/lib-commonjs/components/RadioGroup/index.js +0 -3
- package/lib-commonjs/components/RadioGroup/index.js.map +1 -1
- package/lib-commonjs/components/RadioGroup/renderRadioGroup.js +1 -3
- package/lib-commonjs/components/RadioGroup/renderRadioGroup.js.map +1 -1
- package/lib-commonjs/components/RadioGroup/useRadioGroup.js +1 -3
- package/lib-commonjs/components/RadioGroup/useRadioGroup.js.map +1 -1
- package/lib-commonjs/components/RadioGroup/useRadioGroupStyles.styles.js +0 -2
- package/lib-commonjs/components/RadioGroup/useRadioGroupStyles.styles.js.map +1 -1
- package/lib-commonjs/contexts/RadioGroupContext.js +1 -3
- package/lib-commonjs/contexts/RadioGroupContext.js.map +1 -1
- package/lib-commonjs/contexts/index.js +0 -3
- package/lib-commonjs/contexts/index.js.map +1 -1
- package/lib-commonjs/contexts/useRadioGroupContextValues.js +1 -3
- package/lib-commonjs/contexts/useRadioGroupContextValues.js.map +1 -1
- package/lib-commonjs/index.js +0 -3
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +8 -8
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["useRadioGroup.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getNativeElementProps, isHTMLElement, useEventCallback, useId } from '@fluentui/react-utilities';\n/**\n * Create the state required to render RadioGroup.\n *\n * The returned state can be modified with hooks such as useRadioGroupStyles_unstable,\n * before being passed to renderRadioGroup_unstable.\n *\n * @param props - props from this instance of RadioGroup\n * @param ref - reference to root HTMLElement of RadioGroup\n */ export const useRadioGroup_unstable = (props, ref)=>{\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props);\n const generatedName = useId('radiogroup-');\n const { name =generatedName , value , defaultValue , disabled , layout ='vertical' , onChange , required } = props;\n return {\n layout,\n name,\n value,\n defaultValue,\n disabled,\n required,\n components: {\n root: 'div'\n },\n root: {\n ref,\n role: 'radiogroup',\n ...getNativeElementProps('div', props, /*excludedPropNames:*/ [\n 'onChange',\n 'name'\n ]),\n onChange: useEventCallback((ev)=>{\n if (onChange && isHTMLElement(ev.target, {\n constructorName: 'HTMLInputElement'\n }) && ev.target.type === 'radio') {\n onChange(ev, {\n value: ev.target.value\n });\n }\n })\n }\n };\n};\n"],"names":["useRadioGroup_unstable","props","ref","useFieldControlProps_unstable","generatedName","useId","name","value","defaultValue","disabled","layout","onChange","required","components","root","role","getNativeElementProps","useEventCallback","ev","isHTMLElement","target","constructorName","type"],"mappings":";;;;+BAWiBA;;aAAAA;;;6DAXM;4BACuB;gCACgC;AASnE,MAAMA,yBAAyB,CAACC,OAAOC,MAAM;IACpD,+CAA+C;IAC/CD,QAAQE,IAAAA,yCAA6B,EAACF;IACtC,MAAMG,gBAAgBC,IAAAA,qBAAK,EAAC;IAC5B,MAAM,EAAEC,MAAMF,cAAa,EAAGG,MAAK,EAAGC,aAAY,EAAGC,SAAQ,EAAGC,QAAQ,WAAU,EAAGC,SAAQ,EAAGC,SAAQ,EAAG,GAAGX;IAC9G,OAAO;QACHS;QACAJ;QACAC;QACAC;QACAC;QACAG;QACAC,YAAY;YACRC,MAAM;QACV;QACAA,MAAM;YACFZ;YACAa,MAAM;YACN,GAAGC,IAAAA,qCAAqB,EAAC,OAAOf,OAAO,oBAAoB,GAAG;gBAC1D;gBACA;aACH,CAAC;YACFU,UAAUM,IAAAA,gCAAgB,EAAC,CAACC,KAAK;gBAC7B,IAAIP,YAAYQ,IAAAA,6BAAa,EAACD,GAAGE,MAAM,EAAE;oBACrCC,iBAAiB;gBACrB,MAAMH,GAAGE,MAAM,CAACE,IAAI,KAAK,SAAS;oBAC9BX,SAASO,IAAI;wBACTX,OAAOW,GAAGE,MAAM,CAACb,KAAK;oBAC1B;gBACJ,CAAC;YACL;QACJ;IACJ;AACJ"}
|
@@ -35,5 +35,3 @@ const useRadioGroupStyles_unstable = (state)=>{
|
|
35
35
|
const styles = useStyles();
|
36
36
|
state.root.className = (0, _react.mergeClasses)(radioGroupClassNames.root, styles.root, state.layout === 'vertical' && styles.vertical, state.root.className);
|
37
37
|
}; //# sourceMappingURL=useRadioGroupStyles.styles.js.map
|
38
|
-
|
39
|
-
//# sourceMappingURL=useRadioGroupStyles.styles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["useRadioGroupStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses } from '@griffel/react';\nexport const radioGroupClassNames = {\n root: 'fui-RadioGroup'\n};\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"f22iagw\",\n Bt984gj: \"f6jr5hl\"\n },\n vertical: {\n Beiy3e4: \"f1vx9l62\"\n }\n}, {\n d: [\".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}\", \".f6jr5hl{-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}\", \".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}\"]\n});\n/**\n * Apply styling to the RadioGroup slots based on the state\n */\nexport const useRadioGroupStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(radioGroupClassNames.root, styles.root, state.layout === 'vertical' && styles.vertical, state.root.className);\n};\n//# sourceMappingURL=useRadioGroupStyles.styles.js.map"],"names":["radioGroupClassNames","useRadioGroupStyles_unstable","root","useStyles","__styles","mc9l5x","Bt984gj","vertical","Beiy3e4","d","state","styles","className","mergeClasses","layout"],"mappings":";;;;;;;;;;;IACaA,oBAAoB,MAApBA;IAiBAC,4BAA4B,MAA5BA;;uBAlB0B;AAChC,MAAMD,uBAAuB;IAClCE,MAAM;AACR;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCF,MAAM;QACJG,QAAQ;QACRC,SAAS;IACX;IACAC,UAAU;QACRC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAAwF;QAA2H;KAA4F;AACrT;AAIO,MAAMR,+BAA+BS,CAAAA,QAAS;IACnD,MAAMC,SAASR;IACfO,MAAMR,IAAI,CAACU,SAAS,GAAGC,IAAAA,mBAAY,EAACb,qBAAqBE,IAAI,EAAES,OAAOT,IAAI,EAAEQ,MAAMI,MAAM,KAAK,cAAcH,OAAOJ,QAAQ,EAAEG,MAAMR,IAAI,CAACU,SAAS;AAClJ,GACA,sDAAsD"}
|
@@ -20,6 +20,4 @@ const RadioGroupContext = /*#__PURE__*/ _react.createContext(undefined);
|
|
20
20
|
const radioGroupContextDefaultValue = {};
|
21
21
|
const RadioGroupProvider = RadioGroupContext.Provider;
|
22
22
|
const useRadioGroupContextValue_unstable = ()=>_react.useContext(RadioGroupContext) || radioGroupContextDefaultValue;
|
23
|
-
const useRadioGroupContext_unstable = (selector)=>selector(useRadioGroupContextValue_unstable());
|
24
|
-
|
25
|
-
//# sourceMappingURL=RadioGroupContext.js.map
|
23
|
+
const useRadioGroupContext_unstable = (selector)=>selector(useRadioGroupContextValue_unstable());
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["RadioGroupContext.js"],"sourcesContent":["import * as React from 'react';\n/**\n * RadioGroupContext is provided by RadioGroup, and is consumed by Radio to determine default values of some props.\n */ export const RadioGroupContext = React.createContext(undefined);\nconst radioGroupContextDefaultValue = {};\nexport const RadioGroupProvider = RadioGroupContext.Provider;\n/**\n * Get the value of the RadioGroupContext.\n */ export const useRadioGroupContextValue_unstable = ()=>React.useContext(RadioGroupContext) || radioGroupContextDefaultValue;\n/**\n * @deprecated Use useRadioGroupContextValue_unstable instead.\n * RadioGroupContext is no longer a selector context, and no longer benefits from having a selector.\n */ export const useRadioGroupContext_unstable = (selector)=>selector(useRadioGroupContextValue_unstable());\n"],"names":["RadioGroupContext","RadioGroupProvider","useRadioGroupContextValue_unstable","useRadioGroupContext_unstable","React","createContext","undefined","radioGroupContextDefaultValue","Provider","useContext","selector"],"mappings":";;;;;;;;;;;IAGiBA,iBAAiB,MAAjBA;IAEJC,kBAAkB,MAAlBA;IAGIC,kCAAkC,MAAlCA;IAIAC,6BAA6B,MAA7BA;;;6DAZM;AAGZ,MAAMH,kCAAoBI,OAAMC,aAAa,CAACC;AACzD,MAAMC,gCAAgC,CAAC;AAChC,MAAMN,qBAAqBD,kBAAkBQ,QAAQ;AAGjD,MAAMN,qCAAqC,IAAIE,OAAMK,UAAU,CAACT,sBAAsBO;AAItF,MAAMJ,gCAAgC,CAACO,WAAWA,SAASR"}
|
@@ -5,6 +5,3 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
|
6
6
|
_exportStar(require("./RadioGroupContext"), exports);
|
7
7
|
_exportStar(require("./useRadioGroupContextValues"), exports);
|
8
|
-
//# sourceMappingURL=index.js.map
|
9
|
-
|
10
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './RadioGroupContext';\nexport * from './useRadioGroupContextValues';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["useRadioGroupContextValues.js"],"sourcesContent":["import * as React from 'react';\nexport const useRadioGroupContextValues = (state)=>{\n const { name , value , defaultValue , disabled , layout , required } = state;\n const ariaDescribedBy = state.root['aria-describedby'];\n const radioGroup = React.useMemo(()=>({\n name,\n value,\n defaultValue,\n disabled,\n layout,\n required,\n 'aria-describedby': ariaDescribedBy\n }), [\n name,\n value,\n defaultValue,\n disabled,\n layout,\n required,\n ariaDescribedBy\n ]);\n return {\n radioGroup\n };\n};\n"],"names":["useRadioGroupContextValues","state","name","value","defaultValue","disabled","layout","required","ariaDescribedBy","root","radioGroup","React","useMemo"],"mappings":";;;;+BACaA;;aAAAA;;;6DADU;AAChB,MAAMA,6BAA6B,CAACC,QAAQ;IAC/C,MAAM,EAAEC,KAAI,EAAGC,MAAK,EAAGC,aAAY,EAAGC,SAAQ,EAAGC,OAAM,EAAGC,SAAQ,EAAG,GAAGN;IACxE,MAAMO,kBAAkBP,MAAMQ,IAAI,CAAC,mBAAmB;IACtD,MAAMC,aAAaC,OAAMC,OAAO,CAAC,IAAK,CAAA;YAC9BV;YACAC;YACAC;YACAC;YACAC;YACAC;YACA,oBAAoBC;QACxB,CAAA,GAAI;QACJN;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;KACH;IACD,OAAO;QACHE;IACJ;AACJ"}
|
package/lib-commonjs/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export { RadioGroup, radioGroupClassNames, renderRadioGroup_unstable, useRadioGroupStyles_unstable, useRadioGroup_unstable } from './RadioGroup';\nexport { Radio, radioClassNames, renderRadio_unstable, useRadioStyles_unstable, useRadio_unstable } from './Radio';\nexport { RadioGroupProvider, useRadioGroupContextValues, useRadioGroupContext_unstable, useRadioGroupContextValue_unstable } from './contexts/index';\n"],"names":["RadioGroup","radioGroupClassNames","renderRadioGroup_unstable","useRadioGroupStyles_unstable","useRadioGroup_unstable","Radio","radioClassNames","renderRadio_unstable","useRadioStyles_unstable","useRadio_unstable","RadioGroupProvider","useRadioGroupContextValues","useRadioGroupContext_unstable","useRadioGroupContextValue_unstable"],"mappings":";;;;;;;;;;;IAASA,UAAU,MAAVA,sBAAU;IAAEC,oBAAoB,MAApBA,gCAAoB;IAAEC,yBAAyB,MAAzBA,qCAAyB;IAAEC,4BAA4B,MAA5BA,wCAA4B;IAAEC,sBAAsB,MAAtBA,kCAAsB;IACjHC,KAAK,MAALA,YAAK;IAAEC,eAAe,MAAfA,sBAAe;IAAEC,oBAAoB,MAApBA,2BAAoB;IAAEC,uBAAuB,MAAvBA,8BAAuB;IAAEC,iBAAiB,MAAjBA,wBAAiB;IACxFC,kBAAkB,MAAlBA,yBAAkB;IAAEC,0BAA0B,MAA1BA,iCAA0B;IAAEC,6BAA6B,MAA7BA,oCAA6B;IAAEC,kCAAkC,MAAlCA,yCAAkC;;4BAFQ;uBACzB;uBACyB"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-radio",
|
3
|
-
"version": "9.1.
|
3
|
+
"version": "9.1.17",
|
4
4
|
"description": "Fluent UI Radio component",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -28,20 +28,20 @@
|
|
28
28
|
"devDependencies": {
|
29
29
|
"@fluentui/eslint-plugin": "*",
|
30
30
|
"@fluentui/react-conformance": "*",
|
31
|
-
"@fluentui/react-conformance-griffel": "9.0.0-beta.
|
31
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.22",
|
32
32
|
"@fluentui/scripts-api-extractor": "*",
|
33
33
|
"@fluentui/scripts-tasks": "*"
|
34
34
|
},
|
35
35
|
"dependencies": {
|
36
|
-
"@fluentui/react-field": "^9.1.
|
36
|
+
"@fluentui/react-field": "^9.1.6",
|
37
37
|
"@fluentui/react-icons": "^2.0.196",
|
38
|
-
"@fluentui/react-jsx-runtime": "9.0.0-alpha.
|
39
|
-
"@fluentui/react-label": "^9.1.
|
38
|
+
"@fluentui/react-jsx-runtime": "9.0.0-alpha.6",
|
39
|
+
"@fluentui/react-label": "^9.1.15",
|
40
40
|
"@fluentui/react-shared-contexts": "^9.5.0",
|
41
|
-
"@fluentui/react-tabster": "^9.7.
|
41
|
+
"@fluentui/react-tabster": "^9.7.5",
|
42
42
|
"@fluentui/react-theme": "^9.1.8",
|
43
|
-
"@fluentui/react-utilities": "^9.9.
|
44
|
-
"@griffel/react": "^1.5.
|
43
|
+
"@fluentui/react-utilities": "^9.9.2",
|
44
|
+
"@griffel/react": "^1.5.7",
|
45
45
|
"@swc/helpers": "^0.4.14"
|
46
46
|
},
|
47
47
|
"peerDependencies": {
|