@fluentui/react-radio 9.1.35 → 9.1.36
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +64 -1
- package/CHANGELOG.md +19 -2
- package/lib/components/Radio/Radio.js.map +1 -1
- package/lib/components/Radio/renderRadio.js +8 -2
- package/lib/components/Radio/renderRadio.js.map +1 -1
- package/lib/components/Radio/useRadio.js +3 -2
- package/lib/components/Radio/useRadio.js.map +1 -1
- package/lib/components/Radio/useRadioStyles.styles.js.map +1 -1
- package/lib/components/RadioGroup/RadioGroup.js.map +1 -1
- package/lib/components/RadioGroup/renderRadioGroup.js +5 -4
- package/lib/components/RadioGroup/renderRadioGroup.js.map +1 -1
- package/lib/components/RadioGroup/useRadioGroup.js +1 -1
- package/lib/components/RadioGroup/useRadioGroup.js.map +1 -1
- package/lib/contexts/useRadioGroupContextValues.js +1 -1
- package/lib/contexts/useRadioGroupContextValues.js.map +1 -1
- package/lib-commonjs/Radio.js +2 -2
- package/lib-commonjs/Radio.js.map +1 -1
- package/lib-commonjs/RadioGroup.js +2 -2
- package/lib-commonjs/RadioGroup.js.map +1 -1
- package/lib-commonjs/components/Radio/Radio.js +9 -7
- package/lib-commonjs/components/Radio/Radio.js.map +1 -1
- package/lib-commonjs/components/Radio/Radio.types.js +2 -2
- package/lib-commonjs/components/Radio/Radio.types.js.map +1 -1
- package/lib-commonjs/components/Radio/index.js +6 -6
- package/lib-commonjs/components/Radio/index.js.map +1 -1
- package/lib-commonjs/components/Radio/renderRadio.js +14 -6
- package/lib-commonjs/components/Radio/renderRadio.js.map +1 -1
- package/lib-commonjs/components/Radio/useRadio.js +25 -22
- package/lib-commonjs/components/Radio/useRadio.js.map +1 -1
- package/lib-commonjs/components/Radio/useRadioStyles.styles.js +13 -9
- package/lib-commonjs/components/Radio/useRadioStyles.styles.js.map +1 -1
- package/lib-commonjs/components/RadioGroup/RadioGroup.js +9 -7
- package/lib-commonjs/components/RadioGroup/RadioGroup.js.map +1 -1
- package/lib-commonjs/components/RadioGroup/RadioGroup.types.js +2 -2
- package/lib-commonjs/components/RadioGroup/RadioGroup.types.js.map +1 -1
- package/lib-commonjs/components/RadioGroup/index.js +6 -6
- package/lib-commonjs/components/RadioGroup/index.js.map +1 -1
- package/lib-commonjs/components/RadioGroup/renderRadioGroup.js +12 -9
- package/lib-commonjs/components/RadioGroup/renderRadioGroup.js.map +1 -1
- package/lib-commonjs/components/RadioGroup/useRadioGroup.js +13 -11
- package/lib-commonjs/components/RadioGroup/useRadioGroup.js.map +1 -1
- package/lib-commonjs/components/RadioGroup/useRadioGroupStyles.styles.js +7 -3
- package/lib-commonjs/components/RadioGroup/useRadioGroupStyles.styles.js.map +1 -1
- package/lib-commonjs/contexts/RadioGroupContext.js +14 -6
- package/lib-commonjs/contexts/RadioGroupContext.js.map +1 -1
- package/lib-commonjs/contexts/index.js +3 -3
- package/lib-commonjs/contexts/index.js.map +1 -1
- package/lib-commonjs/contexts/useRadioGroupContextValues.js +6 -4
- package/lib-commonjs/contexts/useRadioGroupContextValues.js.map +1 -1
- package/lib-commonjs/index.js +44 -16
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +13 -13
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useRadio.js"],"sourcesContent":["import * as React from 'react';\nimport { CircleFilled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getPartitionedNativeProps, mergeCallbacks, useId, slot } from '@fluentui/react-utilities';\nimport { useRadioGroupContextValue_unstable } from '../../contexts/RadioGroupContext';\nimport { useFocusWithin } from '@fluentui/react-tabster';\n/**\n * Create the state required to render Radio.\n *\n * The returned state can be modified with hooks such as useRadioStyles_unstable,\n * before being passed to renderRadio_unstable.\n *\n * @param props - props from this instance of Radio\n * @param ref - reference to `<input>` element of Radio\n */ export const useRadio_unstable = (props, ref)=>{\n const group = useRadioGroupContextValue_unstable();\n const { name =group.name
|
1
|
+
{"version":3,"sources":["useRadio.js"],"sourcesContent":["import * as React from 'react';\nimport { CircleFilled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getPartitionedNativeProps, mergeCallbacks, useId, slot } from '@fluentui/react-utilities';\nimport { useRadioGroupContextValue_unstable } from '../../contexts/RadioGroupContext';\nimport { useFocusWithin } from '@fluentui/react-tabster';\n/**\n * Create the state required to render Radio.\n *\n * The returned state can be modified with hooks such as useRadioStyles_unstable,\n * before being passed to renderRadio_unstable.\n *\n * @param props - props from this instance of Radio\n * @param ref - reference to `<input>` element of Radio\n */ export const useRadio_unstable = (props, ref)=>{\n const group = useRadioGroupContextValue_unstable();\n const { name = group.name, checked = group.value !== undefined ? group.value === props.value : undefined, defaultChecked = group.defaultValue !== undefined ? group.defaultValue === props.value : undefined, labelPosition = group.layout === 'horizontal-stacked' ? 'below' : 'after', disabled = group.disabled, required = group.required, 'aria-describedby': ariaDescribedBy = group['aria-describedby'], onChange } = props;\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: [\n 'checked',\n 'defaultChecked',\n 'onChange'\n ]\n });\n const root = slot.always(props.root, {\n defaultProps: {\n ref: useFocusWithin(),\n ...nativeProps.root\n },\n elementType: 'span'\n });\n const input = slot.always(props.input, {\n defaultProps: {\n ref,\n type: 'radio',\n id: useId('radio-', nativeProps.primary.id),\n name,\n checked,\n defaultChecked,\n disabled,\n required,\n 'aria-describedby': ariaDescribedBy,\n ...nativeProps.primary\n },\n elementType: 'input'\n });\n input.onChange = mergeCallbacks(input.onChange, (ev)=>{\n var _onChange;\n return (_onChange = onChange) === null || _onChange === void 0 ? void 0 : _onChange(ev, {\n value: ev.currentTarget.value\n });\n });\n const label = slot.optional(props.label, {\n defaultProps: {\n htmlFor: input.id,\n disabled: input.disabled\n },\n elementType: Label\n });\n const indicator = slot.always(props.indicator, {\n defaultProps: {\n 'aria-hidden': true,\n children: /*#__PURE__*/ React.createElement(CircleFilled, null)\n },\n elementType: 'div'\n });\n return {\n labelPosition,\n components: {\n root: 'span',\n input: 'input',\n label: Label,\n indicator: 'div'\n },\n root,\n input,\n label,\n indicator\n };\n};\n"],"names":["useRadio_unstable","props","ref","group","useRadioGroupContextValue_unstable","name","checked","value","undefined","defaultChecked","defaultValue","labelPosition","layout","disabled","required","ariaDescribedBy","onChange","nativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","root","slot","always","defaultProps","useFocusWithin","elementType","input","type","id","useId","primary","mergeCallbacks","ev","_onChange","currentTarget","label","optional","htmlFor","Label","indicator","children","React","createElement","CircleFilled","components"],"mappings":";;;;+BAciBA;;;eAAAA;;;;iEAdM;4BACM;4BACP;gCACiD;mCACpB;8BACpB;AASpB,MAAMA,oBAAoB,CAACC,OAAOC;IACzC,MAAMC,QAAQC,IAAAA,qDAAkC;IAChD,MAAM,EAAEC,OAAOF,MAAME,IAAI,EAAEC,UAAUH,MAAMI,KAAK,KAAKC,YAAYL,MAAMI,KAAK,KAAKN,MAAMM,KAAK,GAAGC,SAAS,EAAEC,iBAAiBN,MAAMO,YAAY,KAAKF,YAAYL,MAAMO,YAAY,KAAKT,MAAMM,KAAK,GAAGC,SAAS,EAAEG,gBAAgBR,MAAMS,MAAM,KAAK,uBAAuB,UAAU,OAAO,EAAEC,WAAWV,MAAMU,QAAQ,EAAEC,WAAWX,MAAMW,QAAQ,EAAE,oBAAoBC,kBAAkBZ,KAAK,CAAC,mBAAmB,EAAEa,QAAQ,EAAE,GAAGf;IAC7Z,MAAMgB,cAAcC,IAAAA,yCAAyB,EAAC;QAC1CjB;QACAkB,oBAAoB;QACpBC,mBAAmB;YACf;YACA;YACA;SACH;IACL;IACA,MAAMC,OAAOC,oBAAI,CAACC,MAAM,CAACtB,MAAMoB,IAAI,EAAE;QACjCG,cAAc;YACVtB,KAAKuB,IAAAA,4BAAc;YACnB,GAAGR,YAAYI,IAAI;QACvB;QACAK,aAAa;IACjB;IACA,MAAMC,QAAQL,oBAAI,CAACC,MAAM,CAACtB,MAAM0B,KAAK,EAAE;QACnCH,cAAc;YACVtB;YACA0B,MAAM;YACNC,IAAIC,IAAAA,qBAAK,EAAC,UAAUb,YAAYc,OAAO,CAACF,EAAE;YAC1CxB;YACAC;YACAG;YACAI;YACAC;YACA,oBAAoBC;YACpB,GAAGE,YAAYc,OAAO;QAC1B;QACAL,aAAa;IACjB;IACAC,MAAMX,QAAQ,GAAGgB,IAAAA,8BAAc,EAACL,MAAMX,QAAQ,EAAE,CAACiB;QAC7C,IAAIC;QACJ,OAAO,AAACA,CAAAA,YAAYlB,QAAO,MAAO,QAAQkB,cAAc,KAAK,IAAI,KAAK,IAAIA,UAAUD,IAAI;YACpF1B,OAAO0B,GAAGE,aAAa,CAAC5B,KAAK;QACjC;IACJ;IACA,MAAM6B,QAAQd,oBAAI,CAACe,QAAQ,CAACpC,MAAMmC,KAAK,EAAE;QACrCZ,cAAc;YACVc,SAASX,MAAME,EAAE;YACjBhB,UAAUc,MAAMd,QAAQ;QAC5B;QACAa,aAAaa,iBAAK;IACtB;IACA,MAAMC,YAAYlB,oBAAI,CAACC,MAAM,CAACtB,MAAMuC,SAAS,EAAE;QAC3ChB,cAAc;YACV,eAAe;YACfiB,UAAU,WAAW,GAAGC,OAAMC,aAAa,CAACC,wBAAY,EAAE;QAC9D;QACAlB,aAAa;IACjB;IACA,OAAO;QACHf;QACAkC,YAAY;YACRxB,MAAM;YACNM,OAAO;YACPS,OAAOG,iBAAK;YACZC,WAAW;QACf;QACAnB;QACAM;QACAS;QACAI;IACJ;AACJ"}
|
@@ -9,8 +9,12 @@ function _export(target, all) {
|
|
9
9
|
});
|
10
10
|
}
|
11
11
|
_export(exports, {
|
12
|
-
radioClassNames: ()
|
13
|
-
|
12
|
+
radioClassNames: function() {
|
13
|
+
return radioClassNames;
|
14
|
+
},
|
15
|
+
useRadioStyles_unstable: function() {
|
16
|
+
return useRadioStyles_unstable;
|
17
|
+
}
|
14
18
|
});
|
15
19
|
const _react = require("@griffel/react");
|
16
20
|
const radioClassNames = {
|
@@ -21,7 +25,7 @@ const radioClassNames = {
|
|
21
25
|
};
|
22
26
|
// The indicator size is used by the indicator and label styles
|
23
27
|
const indicatorSize = '16px';
|
24
|
-
const useRootBaseClassName = /*#__PURE__*/ (0, _react
|
28
|
+
const useRootBaseClassName = /*#__PURE__*/ (0, _react.__resetStyles)("r12l4eqc", "r18esy0c", [
|
25
29
|
".r12l4eqc{display:inline-flex;position:relative;}",
|
26
30
|
".r12l4eqc:focus{outline-style:none;}",
|
27
31
|
".r12l4eqc:focus-visible{outline-style:none;}",
|
@@ -33,7 +37,7 @@ const useRootBaseClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("r12l4eq
|
|
33
37
|
".r18esy0c[data-fui-focus-within]:focus-within{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}",
|
34
38
|
".r18esy0c[data-fui-focus-within]:focus-within::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-width:2px;border-left-width:2px;border-bottom-width:2px;border-right-width:2px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}"
|
35
39
|
]);
|
36
|
-
const useRootStyles = /*#__PURE__*/ (0, _react
|
40
|
+
const useRootStyles = /*#__PURE__*/ (0, _react.__styles)({
|
37
41
|
vertical: {
|
38
42
|
Beiy3e4: "f1vx9l62",
|
39
43
|
Bt984gj: "f122n59"
|
@@ -44,7 +48,7 @@ const useRootStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
|
44
48
|
".f122n59{align-items:center;}"
|
45
49
|
]
|
46
50
|
});
|
47
|
-
const useInputBaseClassName = /*#__PURE__*/ (0, _react
|
51
|
+
const useInputBaseClassName = /*#__PURE__*/ (0, _react.__resetStyles)("r9gx1vl", "r1uk1i2c", [
|
48
52
|
".r9gx1vl{position:absolute;left:0;top:0;width:calc(16px + 2 * var(--spacingHorizontalS));height:100%;box-sizing:border-box;margin:0;opacity:0;}",
|
49
53
|
".r9gx1vl:enabled{cursor:pointer;}",
|
50
54
|
".r9gx1vl:enabled~.fui-Radio__label{cursor:pointer;}",
|
@@ -78,7 +82,7 @@ const useInputBaseClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("r9gx1v
|
|
78
82
|
".r1uk1i2c:disabled~.fui-Radio__label{color:var(--colorNeutralForegroundDisabled);cursor:default;}",
|
79
83
|
".r1uk1i2c:disabled~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeDisabled);color:var(--colorNeutralForegroundDisabled);}"
|
80
84
|
]);
|
81
|
-
const useInputStyles = /*#__PURE__*/ (0, _react
|
85
|
+
const useInputStyles = /*#__PURE__*/ (0, _react.__styles)({
|
82
86
|
below: {
|
83
87
|
a9b677: "fly5x3f",
|
84
88
|
Bqenvij: "f1je6zif"
|
@@ -89,11 +93,11 @@ const useInputStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
|
89
93
|
".f1je6zif{height:calc(16px + 2 * var(--spacingVerticalS));}"
|
90
94
|
]
|
91
95
|
});
|
92
|
-
const useIndicatorBaseClassName = /*#__PURE__*/ (0, _react
|
96
|
+
const useIndicatorBaseClassName = /*#__PURE__*/ (0, _react.__resetStyles)("rid4516", null, [
|
93
97
|
".rid4516{width:16px;height:16px;font-size:12px;box-sizing:border-box;flex-shrink:0;display:flex;align-items:center;justify-content:center;overflow:hidden;border:var(--strokeWidthThin) solid;border-radius:var(--borderRadiusCircular);margin:var(--spacingVerticalS) var(--spacingHorizontalS);fill:currentColor;pointer-events:none;}"
|
94
98
|
]);
|
95
99
|
// Can't use makeResetStyles here because Label is a component that may itself use makeResetStyles.
|
96
|
-
const useLabelStyles = /*#__PURE__*/ (0, _react
|
100
|
+
const useLabelStyles = /*#__PURE__*/ (0, _react.__styles)({
|
97
101
|
base: {
|
98
102
|
qb2dma: "f7nlbp4",
|
99
103
|
z8tnut: "f1kwiid1",
|
@@ -135,7 +139,7 @@ const useLabelStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
|
135
139
|
]
|
136
140
|
});
|
137
141
|
const useRadioStyles_unstable = (state)=>{
|
138
|
-
const { labelPosition
|
142
|
+
const { labelPosition } = state;
|
139
143
|
const rootBaseClassName = useRootBaseClassName();
|
140
144
|
const rootStyles = useRootStyles();
|
141
145
|
state.root.className = (0, _react.mergeClasses)(radioClassNames.root, rootBaseClassName, labelPosition === 'below' && rootStyles.vertical, state.root.className);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useRadioStyles.styles.js"],"sourcesContent":["import { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { __resetStyles, __styles, mergeClasses, shorthands } from '@griffel/react';\nexport const radioClassNames = {\n root: 'fui-Radio',\n indicator: 'fui-Radio__indicator',\n input: 'fui-Radio__input',\n label: 'fui-Radio__label'\n};\n// The indicator size is used by the indicator and label styles\nconst indicatorSize = '16px';\nconst useRootBaseClassName = /*#__PURE__*/__resetStyles(\"r12l4eqc\", \"r18esy0c\", [\".r12l4eqc{display:inline-flex;position:relative;}\", \".r12l4eqc:focus{outline-style:none;}\", \".r12l4eqc:focus-visible{outline-style:none;}\", \".r12l4eqc[data-fui-focus-within]:focus-within{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}\", \".r12l4eqc[data-fui-focus-within]:focus-within::after{content:\\\"\\\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:2px;border-right-width:2px;border-bottom-width:2px;border-left-width:2px;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}\", \".r18esy0c{display:inline-flex;position:relative;}\", \".r18esy0c:focus{outline-style:none;}\", \".r18esy0c:focus-visible{outline-style:none;}\", \".r18esy0c[data-fui-focus-within]:focus-within{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}\", \".r18esy0c[data-fui-focus-within]:focus-within::after{content:\\\"\\\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-width:2px;border-left-width:2px;border-bottom-width:2px;border-right-width:2px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}\"]);\nconst useRootStyles = /*#__PURE__*/__styles({\n vertical: {\n Beiy3e4: \"f1vx9l62\",\n Bt984gj: \"f122n59\"\n }\n}, {\n d: [\".f1vx9l62{flex-direction:column;}\", \".f122n59{align-items:center;}\"]\n});\nconst useInputBaseClassName = /*#__PURE__*/__resetStyles(\"r9gx1vl\", \"r1uk1i2c\", [\".r9gx1vl{position:absolute;left:0;top:0;width:calc(16px + 2 * var(--spacingHorizontalS));height:100%;box-sizing:border-box;margin:0;opacity:0;}\", \".r9gx1vl:enabled{cursor:pointer;}\", \".r9gx1vl:enabled~.fui-Radio__label{cursor:pointer;}\", \".r9gx1vl:not(:checked)~.fui-Radio__indicator>*{opacity:0;}\", \".r9gx1vl:enabled:not(:checked)~.fui-Radio__label{color:var(--colorNeutralForeground3);}\", \".r9gx1vl:enabled:not(:checked)~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessible);}\", \".r9gx1vl:enabled:not(:checked):hover~.fui-Radio__label{color:var(--colorNeutralForeground2);}\", \".r9gx1vl:enabled:not(:checked):hover~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessibleHover);}\", \".r9gx1vl:enabled:not(:checked):hover:active~.fui-Radio__label{color:var(--colorNeutralForeground1);}\", \".r9gx1vl:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessiblePressed);}\", \".r9gx1vl:enabled:checked~.fui-Radio__label{color:var(--colorNeutralForeground1);}\", \".r9gx1vl:enabled:checked~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStroke);color:var(--colorCompoundBrandForeground1);}\", \".r9gx1vl:enabled:checked:hover~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokeHover);color:var(--colorCompoundBrandForeground1Hover);}\", \".r9gx1vl:enabled:checked:hover:active~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokePressed);color:var(--colorCompoundBrandForeground1Pressed);}\", \".r9gx1vl:disabled~.fui-Radio__label{color:var(--colorNeutralForegroundDisabled);cursor:default;}\", \".r9gx1vl:disabled~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeDisabled);color:var(--colorNeutralForegroundDisabled);}\", \".r1uk1i2c{position:absolute;right:0;top:0;width:calc(16px + 2 * var(--spacingHorizontalS));height:100%;box-sizing:border-box;margin:0;opacity:0;}\", \".r1uk1i2c:enabled{cursor:pointer;}\", \".r1uk1i2c:enabled~.fui-Radio__label{cursor:pointer;}\", \".r1uk1i2c:not(:checked)~.fui-Radio__indicator>*{opacity:0;}\", \".r1uk1i2c:enabled:not(:checked)~.fui-Radio__label{color:var(--colorNeutralForeground3);}\", \".r1uk1i2c:enabled:not(:checked)~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessible);}\", \".r1uk1i2c:enabled:not(:checked):hover~.fui-Radio__label{color:var(--colorNeutralForeground2);}\", \".r1uk1i2c:enabled:not(:checked):hover~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessibleHover);}\", \".r1uk1i2c:enabled:not(:checked):hover:active~.fui-Radio__label{color:var(--colorNeutralForeground1);}\", \".r1uk1i2c:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessiblePressed);}\", \".r1uk1i2c:enabled:checked~.fui-Radio__label{color:var(--colorNeutralForeground1);}\", \".r1uk1i2c:enabled:checked~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStroke);color:var(--colorCompoundBrandForeground1);}\", \".r1uk1i2c:enabled:checked:hover~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokeHover);color:var(--colorCompoundBrandForeground1Hover);}\", \".r1uk1i2c:enabled:checked:hover:active~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokePressed);color:var(--colorCompoundBrandForeground1Pressed);}\", \".r1uk1i2c:disabled~.fui-Radio__label{color:var(--colorNeutralForegroundDisabled);cursor:default;}\", \".r1uk1i2c:disabled~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeDisabled);color:var(--colorNeutralForegroundDisabled);}\"]);\nconst useInputStyles = /*#__PURE__*/__styles({\n below: {\n a9b677: \"fly5x3f\",\n Bqenvij: \"f1je6zif\"\n }\n}, {\n d: [\".fly5x3f{width:100%;}\", \".f1je6zif{height:calc(16px + 2 * var(--spacingVerticalS));}\"]\n});\nconst useIndicatorBaseClassName = /*#__PURE__*/__resetStyles(\"rid4516\", null, [\".rid4516{width:16px;height:16px;font-size:12px;box-sizing:border-box;flex-shrink:0;display:flex;align-items:center;justify-content:center;overflow:hidden;border:var(--strokeWidthThin) solid;border-radius:var(--borderRadiusCircular);margin:var(--spacingVerticalS) var(--spacingHorizontalS);fill:currentColor;pointer-events:none;}\"]);\n// Can't use makeResetStyles here because Label is a component that may itself use makeResetStyles.\nconst useLabelStyles = /*#__PURE__*/__styles({\n base: {\n qb2dma: \"f7nlbp4\",\n z8tnut: \"f1kwiid1\",\n z189sj: [\"f1vdfbxk\", \"f1f5gg8d\"],\n Byoj8tv: \"f5b47ha\",\n uwmqm3: [\"f1f5gg8d\", \"f1vdfbxk\"]\n },\n after: {\n uwmqm3: [\"fruq291\", \"f7x41pl\"],\n B6of3ja: \"fjzwpt6\",\n jrapky: \"fh6j2fo\"\n },\n below: {\n z8tnut: \"f1ywm7hm\",\n fsow6f: \"f17mccla\"\n }\n}, {\n d: [\".f7nlbp4{align-self:center;}\", \".f1kwiid1{padding-top:var(--spacingVerticalS);}\", \".f1vdfbxk{padding-right:var(--spacingHorizontalS);}\", \".f1f5gg8d{padding-left:var(--spacingHorizontalS);}\", \".f5b47ha{padding-bottom:var(--spacingVerticalS);}\", \".fruq291{padding-left:var(--spacingHorizontalXS);}\", \".f7x41pl{padding-right:var(--spacingHorizontalXS);}\", \".fjzwpt6{margin-top:calc((16px - var(--lineHeightBase300)) / 2);}\", \".fh6j2fo{margin-bottom:calc((16px - var(--lineHeightBase300)) / 2);}\", \".f1ywm7hm{padding-top:var(--spacingVerticalXS);}\", \".f17mccla{text-align:center;}\"]\n});\n/**\n * Apply styling to the Radio slots based on the state\n */\nexport const useRadioStyles_unstable = state => {\n const {\n labelPosition\n } = state;\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(radioClassNames.root, rootBaseClassName, labelPosition === 'below' && rootStyles.vertical, state.root.className);\n const inputBaseClassName = useInputBaseClassName();\n const inputStyles = useInputStyles();\n state.input.className = mergeClasses(radioClassNames.input, inputBaseClassName, labelPosition === 'below' && inputStyles.below, state.input.className);\n const indicatorBaseClassName = useIndicatorBaseClassName();\n state.indicator.className = mergeClasses(radioClassNames.indicator, indicatorBaseClassName, state.indicator.className);\n const labelStyles = useLabelStyles();\n if (state.label) {\n state.label.className = mergeClasses(radioClassNames.label, labelStyles.base, labelStyles[labelPosition], state.label.className);\n }\n};\n//# sourceMappingURL=useRadioStyles.styles.js.map"],"names":["radioClassNames","useRadioStyles_unstable","root","indicator","input","label","indicatorSize","useRootBaseClassName","__resetStyles","useRootStyles","__styles","vertical","Beiy3e4","Bt984gj","d","useInputBaseClassName","useInputStyles","below","a9b677","Bqenvij","useIndicatorBaseClassName","useLabelStyles","base","qb2dma","z8tnut","z189sj","Byoj8tv","uwmqm3","after","B6of3ja","jrapky","fsow6f","state","labelPosition","rootBaseClassName","rootStyles","className","mergeClasses","inputBaseClassName","inputStyles","indicatorBaseClassName","labelStyles"],"mappings":";;;;;;;;;;;IAGaA,eAAe,MAAfA;IAmDAC,uBAAuB,MAAvBA;;uBApDqD;AAC3D,MAAMD,kBAAkB;IAC7BE,MAAM;IACNC,WAAW;IACXC,OAAO;IACPC,OAAO;AACT;AACA,+DAA+D;AAC/D,MAAMC,gBAAgB;AACtB,MAAMC,uBAAuB,WAAW,GAAEC,IAAAA,uBAAa,EAAC,YAAY,YAAY;IAAC;IAAqD;IAAwC;IAAgD;IAA6K;IAA+vB;IAAqD;IAAwC;IAAgD;IAA6K;CAA8vB;AAClsE,MAAMC,gBAAgB,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IAC1CC,UAAU;QACRC,SAAS;QACTC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAAqC;KAAgC;AAC3E;AACA,MAAMC,wBAAwB,WAAW,GAAEP,IAAAA,uBAAa,EAAC,WAAW,YAAY;IAAC;IAAmJ;IAAqC;IAAuD;IAA8D;IAA2F;IAA2G;IAAiG;IAAsH;IAAwG;IAA+H;IAAqF;IAA4I;IAA4J;IAAuK;IAAoG;IAAwI;IAAqJ;IAAsC;IAAwD;IAA+D;IAA4F;IAA4G;IAAkG;IAAuH;IAAyG;IAAgI;IAAsF;IAA6I;IAA6J;IAAwK;IAAqG;CAAwI;AACn+G,MAAMQ,iBAAiB,WAAW,GAAEN,IAAAA,kBAAQ,EAAC;IAC3CO,OAAO;QACLC,QAAQ;QACRC,SAAS;IACX;AACF,GAAG;IACDL,GAAG;QAAC;QAAyB;KAA8D;AAC7F;AACA,MAAMM,4BAA4B,WAAW,GAAEZ,IAAAA,uBAAa,EAAC,WAAW,IAAI,EAAE;IAAC;CAA2U;AAC1Z,mGAAmG;AACnG,MAAMa,iBAAiB,WAAW,GAAEX,IAAAA,kBAAQ,EAAC;IAC3CY,MAAM;QACJC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAW;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAW;IAClC;IACAC,OAAO;QACLD,QAAQ;YAAC;YAAW;SAAU;QAC9BE,SAAS;QACTC,QAAQ;IACV;IACAb,OAAO;QACLO,QAAQ;QACRO,QAAQ;IACV;AACF,GAAG;IACDjB,GAAG;QAAC;QAAgC;QAAmD;QAAuD;QAAsD;QAAqD;QAAsD;QAAuD;QAAqE;QAAwE;QAAoD;KAAgC;AACzkB;AAIO,MAAMb,0BAA0B+B,CAAAA,QAAS;IAC9C,MAAM,EACJC,cAAa,EACd,GAAGD;IACJ,MAAME,oBAAoB3B;IAC1B,MAAM4B,aAAa1B;IACnBuB,MAAM9B,IAAI,CAACkC,SAAS,GAAGC,IAAAA,mBAAY,EAACrC,gBAAgBE,IAAI,EAAEgC,mBAAmBD,kBAAkB,WAAWE,WAAWxB,QAAQ,EAAEqB,MAAM9B,IAAI,CAACkC,SAAS;IACnJ,MAAME,qBAAqBvB;IAC3B,MAAMwB,cAAcvB;IACpBgB,MAAM5B,KAAK,CAACgC,SAAS,GAAGC,IAAAA,mBAAY,EAACrC,gBAAgBI,KAAK,EAAEkC,oBAAoBL,kBAAkB,WAAWM,YAAYtB,KAAK,EAAEe,MAAM5B,KAAK,CAACgC,SAAS;IACrJ,MAAMI,yBAAyBpB;IAC/BY,MAAM7B,SAAS,CAACiC,SAAS,GAAGC,IAAAA,mBAAY,EAACrC,gBAAgBG,SAAS,EAAEqC,wBAAwBR,MAAM7B,SAAS,CAACiC,SAAS;IACrH,MAAMK,cAAcpB;IACpB,IAAIW,MAAM3B,KAAK,EAAE;QACf2B,MAAM3B,KAAK,CAAC+B,SAAS,GAAGC,IAAAA,mBAAY,EAACrC,gBAAgBK,KAAK,EAAEoC,YAAYnB,IAAI,EAAEmB,WAAW,CAACR,cAAc,EAAED,MAAM3B,KAAK,CAAC+B,SAAS;IACjI,CAAC;AACH,GACA,iDAAiD"}
|
1
|
+
{"version":3,"sources":["useRadioStyles.styles.js"],"sourcesContent":["import { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { __resetStyles, __styles, mergeClasses, shorthands } from '@griffel/react';\nexport const radioClassNames = {\n root: 'fui-Radio',\n indicator: 'fui-Radio__indicator',\n input: 'fui-Radio__input',\n label: 'fui-Radio__label'\n};\n// The indicator size is used by the indicator and label styles\nconst indicatorSize = '16px';\nconst useRootBaseClassName = /*#__PURE__*/__resetStyles(\"r12l4eqc\", \"r18esy0c\", [\".r12l4eqc{display:inline-flex;position:relative;}\", \".r12l4eqc:focus{outline-style:none;}\", \".r12l4eqc:focus-visible{outline-style:none;}\", \".r12l4eqc[data-fui-focus-within]:focus-within{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}\", \".r12l4eqc[data-fui-focus-within]:focus-within::after{content:\\\"\\\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:2px;border-right-width:2px;border-bottom-width:2px;border-left-width:2px;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}\", \".r18esy0c{display:inline-flex;position:relative;}\", \".r18esy0c:focus{outline-style:none;}\", \".r18esy0c:focus-visible{outline-style:none;}\", \".r18esy0c[data-fui-focus-within]:focus-within{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}\", \".r18esy0c[data-fui-focus-within]:focus-within::after{content:\\\"\\\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-width:2px;border-left-width:2px;border-bottom-width:2px;border-right-width:2px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}\"]);\nconst useRootStyles = /*#__PURE__*/__styles({\n vertical: {\n Beiy3e4: \"f1vx9l62\",\n Bt984gj: \"f122n59\"\n }\n}, {\n d: [\".f1vx9l62{flex-direction:column;}\", \".f122n59{align-items:center;}\"]\n});\nconst useInputBaseClassName = /*#__PURE__*/__resetStyles(\"r9gx1vl\", \"r1uk1i2c\", [\".r9gx1vl{position:absolute;left:0;top:0;width:calc(16px + 2 * var(--spacingHorizontalS));height:100%;box-sizing:border-box;margin:0;opacity:0;}\", \".r9gx1vl:enabled{cursor:pointer;}\", \".r9gx1vl:enabled~.fui-Radio__label{cursor:pointer;}\", \".r9gx1vl:not(:checked)~.fui-Radio__indicator>*{opacity:0;}\", \".r9gx1vl:enabled:not(:checked)~.fui-Radio__label{color:var(--colorNeutralForeground3);}\", \".r9gx1vl:enabled:not(:checked)~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessible);}\", \".r9gx1vl:enabled:not(:checked):hover~.fui-Radio__label{color:var(--colorNeutralForeground2);}\", \".r9gx1vl:enabled:not(:checked):hover~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessibleHover);}\", \".r9gx1vl:enabled:not(:checked):hover:active~.fui-Radio__label{color:var(--colorNeutralForeground1);}\", \".r9gx1vl:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessiblePressed);}\", \".r9gx1vl:enabled:checked~.fui-Radio__label{color:var(--colorNeutralForeground1);}\", \".r9gx1vl:enabled:checked~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStroke);color:var(--colorCompoundBrandForeground1);}\", \".r9gx1vl:enabled:checked:hover~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokeHover);color:var(--colorCompoundBrandForeground1Hover);}\", \".r9gx1vl:enabled:checked:hover:active~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokePressed);color:var(--colorCompoundBrandForeground1Pressed);}\", \".r9gx1vl:disabled~.fui-Radio__label{color:var(--colorNeutralForegroundDisabled);cursor:default;}\", \".r9gx1vl:disabled~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeDisabled);color:var(--colorNeutralForegroundDisabled);}\", \".r1uk1i2c{position:absolute;right:0;top:0;width:calc(16px + 2 * var(--spacingHorizontalS));height:100%;box-sizing:border-box;margin:0;opacity:0;}\", \".r1uk1i2c:enabled{cursor:pointer;}\", \".r1uk1i2c:enabled~.fui-Radio__label{cursor:pointer;}\", \".r1uk1i2c:not(:checked)~.fui-Radio__indicator>*{opacity:0;}\", \".r1uk1i2c:enabled:not(:checked)~.fui-Radio__label{color:var(--colorNeutralForeground3);}\", \".r1uk1i2c:enabled:not(:checked)~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessible);}\", \".r1uk1i2c:enabled:not(:checked):hover~.fui-Radio__label{color:var(--colorNeutralForeground2);}\", \".r1uk1i2c:enabled:not(:checked):hover~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessibleHover);}\", \".r1uk1i2c:enabled:not(:checked):hover:active~.fui-Radio__label{color:var(--colorNeutralForeground1);}\", \".r1uk1i2c:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessiblePressed);}\", \".r1uk1i2c:enabled:checked~.fui-Radio__label{color:var(--colorNeutralForeground1);}\", \".r1uk1i2c:enabled:checked~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStroke);color:var(--colorCompoundBrandForeground1);}\", \".r1uk1i2c:enabled:checked:hover~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokeHover);color:var(--colorCompoundBrandForeground1Hover);}\", \".r1uk1i2c:enabled:checked:hover:active~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokePressed);color:var(--colorCompoundBrandForeground1Pressed);}\", \".r1uk1i2c:disabled~.fui-Radio__label{color:var(--colorNeutralForegroundDisabled);cursor:default;}\", \".r1uk1i2c:disabled~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeDisabled);color:var(--colorNeutralForegroundDisabled);}\"]);\nconst useInputStyles = /*#__PURE__*/__styles({\n below: {\n a9b677: \"fly5x3f\",\n Bqenvij: \"f1je6zif\"\n }\n}, {\n d: [\".fly5x3f{width:100%;}\", \".f1je6zif{height:calc(16px + 2 * var(--spacingVerticalS));}\"]\n});\nconst useIndicatorBaseClassName = /*#__PURE__*/__resetStyles(\"rid4516\", null, [\".rid4516{width:16px;height:16px;font-size:12px;box-sizing:border-box;flex-shrink:0;display:flex;align-items:center;justify-content:center;overflow:hidden;border:var(--strokeWidthThin) solid;border-radius:var(--borderRadiusCircular);margin:var(--spacingVerticalS) var(--spacingHorizontalS);fill:currentColor;pointer-events:none;}\"]);\n// Can't use makeResetStyles here because Label is a component that may itself use makeResetStyles.\nconst useLabelStyles = /*#__PURE__*/__styles({\n base: {\n qb2dma: \"f7nlbp4\",\n z8tnut: \"f1kwiid1\",\n z189sj: [\"f1vdfbxk\", \"f1f5gg8d\"],\n Byoj8tv: \"f5b47ha\",\n uwmqm3: [\"f1f5gg8d\", \"f1vdfbxk\"]\n },\n after: {\n uwmqm3: [\"fruq291\", \"f7x41pl\"],\n B6of3ja: \"fjzwpt6\",\n jrapky: \"fh6j2fo\"\n },\n below: {\n z8tnut: \"f1ywm7hm\",\n fsow6f: \"f17mccla\"\n }\n}, {\n d: [\".f7nlbp4{align-self:center;}\", \".f1kwiid1{padding-top:var(--spacingVerticalS);}\", \".f1vdfbxk{padding-right:var(--spacingHorizontalS);}\", \".f1f5gg8d{padding-left:var(--spacingHorizontalS);}\", \".f5b47ha{padding-bottom:var(--spacingVerticalS);}\", \".fruq291{padding-left:var(--spacingHorizontalXS);}\", \".f7x41pl{padding-right:var(--spacingHorizontalXS);}\", \".fjzwpt6{margin-top:calc((16px - var(--lineHeightBase300)) / 2);}\", \".fh6j2fo{margin-bottom:calc((16px - var(--lineHeightBase300)) / 2);}\", \".f1ywm7hm{padding-top:var(--spacingVerticalXS);}\", \".f17mccla{text-align:center;}\"]\n});\n/**\n * Apply styling to the Radio slots based on the state\n */\nexport const useRadioStyles_unstable = state => {\n const {\n labelPosition\n } = state;\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(radioClassNames.root, rootBaseClassName, labelPosition === 'below' && rootStyles.vertical, state.root.className);\n const inputBaseClassName = useInputBaseClassName();\n const inputStyles = useInputStyles();\n state.input.className = mergeClasses(radioClassNames.input, inputBaseClassName, labelPosition === 'below' && inputStyles.below, state.input.className);\n const indicatorBaseClassName = useIndicatorBaseClassName();\n state.indicator.className = mergeClasses(radioClassNames.indicator, indicatorBaseClassName, state.indicator.className);\n const labelStyles = useLabelStyles();\n if (state.label) {\n state.label.className = mergeClasses(radioClassNames.label, labelStyles.base, labelStyles[labelPosition], state.label.className);\n }\n};\n//# sourceMappingURL=useRadioStyles.styles.js.map"],"names":["radioClassNames","useRadioStyles_unstable","root","indicator","input","label","indicatorSize","useRootBaseClassName","__resetStyles","useRootStyles","__styles","vertical","Beiy3e4","Bt984gj","d","useInputBaseClassName","useInputStyles","below","a9b677","Bqenvij","useIndicatorBaseClassName","useLabelStyles","base","qb2dma","z8tnut","z189sj","Byoj8tv","uwmqm3","after","B6of3ja","jrapky","fsow6f","state","labelPosition","rootBaseClassName","rootStyles","className","mergeClasses","inputBaseClassName","inputStyles","indicatorBaseClassName","labelStyles"],"mappings":";;;;;;;;;;;IAGaA,eAAe;eAAfA;;IAmDAC,uBAAuB;eAAvBA;;;uBApDqD;AAC3D,MAAMD,kBAAkB;IAC7BE,MAAM;IACNC,WAAW;IACXC,OAAO;IACPC,OAAO;AACT;AACA,+DAA+D;AAC/D,MAAMC,gBAAgB;AACtB,MAAMC,uBAAuB,WAAW,GAAEC,IAAAA,oBAAa,EAAC,YAAY,YAAY;IAAC;IAAqD;IAAwC;IAAgD;IAA6K;IAA+vB;IAAqD;IAAwC;IAAgD;IAA6K;CAA8vB;AAClsE,MAAMC,gBAAgB,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IAC1CC,UAAU;QACRC,SAAS;QACTC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAAqC;KAAgC;AAC3E;AACA,MAAMC,wBAAwB,WAAW,GAAEP,IAAAA,oBAAa,EAAC,WAAW,YAAY;IAAC;IAAmJ;IAAqC;IAAuD;IAA8D;IAA2F;IAA2G;IAAiG;IAAsH;IAAwG;IAA+H;IAAqF;IAA4I;IAA4J;IAAuK;IAAoG;IAAwI;IAAqJ;IAAsC;IAAwD;IAA+D;IAA4F;IAA4G;IAAkG;IAAuH;IAAyG;IAAgI;IAAsF;IAA6I;IAA6J;IAAwK;IAAqG;CAAwI;AACn+G,MAAMQ,iBAAiB,WAAW,GAAEN,IAAAA,eAAQ,EAAC;IAC3CO,OAAO;QACLC,QAAQ;QACRC,SAAS;IACX;AACF,GAAG;IACDL,GAAG;QAAC;QAAyB;KAA8D;AAC7F;AACA,MAAMM,4BAA4B,WAAW,GAAEZ,IAAAA,oBAAa,EAAC,WAAW,MAAM;IAAC;CAA2U;AAC1Z,mGAAmG;AACnG,MAAMa,iBAAiB,WAAW,GAAEX,IAAAA,eAAQ,EAAC;IAC3CY,MAAM;QACJC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAW;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAW;IAClC;IACAC,OAAO;QACLD,QAAQ;YAAC;YAAW;SAAU;QAC9BE,SAAS;QACTC,QAAQ;IACV;IACAb,OAAO;QACLO,QAAQ;QACRO,QAAQ;IACV;AACF,GAAG;IACDjB,GAAG;QAAC;QAAgC;QAAmD;QAAuD;QAAsD;QAAqD;QAAsD;QAAuD;QAAqE;QAAwE;QAAoD;KAAgC;AACzkB;AAIO,MAAMb,0BAA0B+B,CAAAA;IACrC,MAAM,EACJC,aAAa,EACd,GAAGD;IACJ,MAAME,oBAAoB3B;IAC1B,MAAM4B,aAAa1B;IACnBuB,MAAM9B,IAAI,CAACkC,SAAS,GAAGC,IAAAA,mBAAY,EAACrC,gBAAgBE,IAAI,EAAEgC,mBAAmBD,kBAAkB,WAAWE,WAAWxB,QAAQ,EAAEqB,MAAM9B,IAAI,CAACkC,SAAS;IACnJ,MAAME,qBAAqBvB;IAC3B,MAAMwB,cAAcvB;IACpBgB,MAAM5B,KAAK,CAACgC,SAAS,GAAGC,IAAAA,mBAAY,EAACrC,gBAAgBI,KAAK,EAAEkC,oBAAoBL,kBAAkB,WAAWM,YAAYtB,KAAK,EAAEe,MAAM5B,KAAK,CAACgC,SAAS;IACrJ,MAAMI,yBAAyBpB;IAC/BY,MAAM7B,SAAS,CAACiC,SAAS,GAAGC,IAAAA,mBAAY,EAACrC,gBAAgBG,SAAS,EAAEqC,wBAAwBR,MAAM7B,SAAS,CAACiC,SAAS;IACrH,MAAMK,cAAcpB;IACpB,IAAIW,MAAM3B,KAAK,EAAE;QACf2B,MAAM3B,KAAK,CAAC+B,SAAS,GAAGC,IAAAA,mBAAY,EAACrC,gBAAgBK,KAAK,EAAEoC,YAAYnB,IAAI,EAAEmB,WAAW,CAACR,cAAc,EAAED,MAAM3B,KAAK,CAAC+B,SAAS;IACjI;AACF,GACA,iDAAiD"}
|
@@ -4,20 +4,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "RadioGroup", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return RadioGroup;
|
9
|
+
}
|
8
10
|
});
|
9
|
-
const
|
10
|
-
const _react = /*#__PURE__*/
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
11
13
|
const _renderRadioGroup = require("./renderRadioGroup");
|
12
14
|
const _useRadioGroup = require("./useRadioGroup");
|
13
|
-
const
|
15
|
+
const _useRadioGroupStylesstyles = require("./useRadioGroupStyles.styles");
|
14
16
|
const _useRadioGroupContextValues = require("../../contexts/useRadioGroupContextValues");
|
15
|
-
const
|
17
|
+
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
16
18
|
const RadioGroup = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
17
19
|
const state = (0, _useRadioGroup.useRadioGroup_unstable)(props, ref);
|
18
20
|
const contextValues = (0, _useRadioGroupContextValues.useRadioGroupContextValues)(state);
|
19
|
-
(0,
|
20
|
-
(0,
|
21
|
+
(0, _useRadioGroupStylesstyles.useRadioGroupStyles_unstable)(state);
|
22
|
+
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useRadioGroupStyles_unstable')(state);
|
21
23
|
return (0, _renderRadioGroup.renderRadioGroup_unstable)(state, contextValues);
|
22
24
|
});
|
23
25
|
RadioGroup.displayName = 'RadioGroup';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["RadioGroup.js"],"sourcesContent":["import * as React from 'react';\nimport { renderRadioGroup_unstable } from './renderRadioGroup';\nimport { useRadioGroup_unstable } from './useRadioGroup';\nimport { useRadioGroupStyles_unstable } from './useRadioGroupStyles.styles';\nimport { useRadioGroupContextValues } from '../../contexts/useRadioGroupContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * A RadioGroup component presents a set of options where only one option can be selected.\n */ export const RadioGroup = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useRadioGroup_unstable(props, ref);\n const contextValues = useRadioGroupContextValues(state);\n useRadioGroupStyles_unstable(state);\n useCustomStyleHook_unstable('useRadioGroupStyles_unstable')(state);\n return renderRadioGroup_unstable(state, contextValues);\n});\nRadioGroup.displayName = 'RadioGroup';\n"],"names":["RadioGroup","React","forwardRef","props","ref","state","useRadioGroup_unstable","contextValues","useRadioGroupContextValues","useRadioGroupStyles_unstable","useCustomStyleHook_unstable","renderRadioGroup_unstable","displayName"],"mappings":";;;;+BAQiBA
|
1
|
+
{"version":3,"sources":["RadioGroup.js"],"sourcesContent":["import * as React from 'react';\nimport { renderRadioGroup_unstable } from './renderRadioGroup';\nimport { useRadioGroup_unstable } from './useRadioGroup';\nimport { useRadioGroupStyles_unstable } from './useRadioGroupStyles.styles';\nimport { useRadioGroupContextValues } from '../../contexts/useRadioGroupContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * A RadioGroup component presents a set of options where only one option can be selected.\n */ export const RadioGroup = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useRadioGroup_unstable(props, ref);\n const contextValues = useRadioGroupContextValues(state);\n useRadioGroupStyles_unstable(state);\n useCustomStyleHook_unstable('useRadioGroupStyles_unstable')(state);\n return renderRadioGroup_unstable(state, contextValues);\n});\nRadioGroup.displayName = 'RadioGroup';\n"],"names":["RadioGroup","React","forwardRef","props","ref","state","useRadioGroup_unstable","contextValues","useRadioGroupContextValues","useRadioGroupStyles_unstable","useCustomStyleHook_unstable","renderRadioGroup_unstable","displayName"],"mappings":";;;;+BAQiBA;;;eAAAA;;;;iEARM;kCACmB;+BACH;2CACM;4CACF;qCACC;AAGjC,MAAMA,aAAa,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACjE,MAAMC,QAAQC,IAAAA,qCAAsB,EAACH,OAAOC;IAC5C,MAAMG,gBAAgBC,IAAAA,sDAA0B,EAACH;IACjDI,IAAAA,uDAA4B,EAACJ;IAC7BK,IAAAA,gDAA2B,EAAC,gCAAgCL;IAC5D,OAAOM,IAAAA,2CAAyB,EAACN,OAAOE;AAC5C;AACAP,WAAWY,WAAW,GAAG"}
|
@@ -2,5 +2,5 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
3
3
|
value: true
|
4
4
|
});
|
5
|
-
const
|
6
|
-
const _react = /*#__PURE__*/
|
5
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
6
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["RadioGroup.types.js"],"sourcesContent":["import * as React from 'react';\n"],"names":[],"mappings":";;;;;
|
1
|
+
{"version":3,"sources":["RadioGroup.types.js"],"sourcesContent":["import * as React from 'react';\n"],"names":[],"mappings":";;;;;iEAAuB"}
|
@@ -2,9 +2,9 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
3
3
|
value: true
|
4
4
|
});
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
6
|
+
_export_star._(require("./RadioGroup"), exports);
|
7
|
+
_export_star._(require("./RadioGroup.types"), exports);
|
8
|
+
_export_star._(require("./renderRadioGroup"), exports);
|
9
|
+
_export_star._(require("./useRadioGroup"), exports);
|
10
|
+
_export_star._(require("./useRadioGroupStyles.styles"), exports);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './RadioGroup';\nexport * from './RadioGroup.types';\nexport * from './renderRadioGroup';\nexport * from './useRadioGroup';\nexport * from './useRadioGroupStyles.styles';\n"],"names":[],"mappings":";;;;;
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './RadioGroup';\nexport * from './RadioGroup.types';\nexport * from './renderRadioGroup';\nexport * from './useRadioGroup';\nexport * from './useRadioGroupStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
@@ -1,17 +1,20 @@
|
|
1
|
-
/** @jsxRuntime
|
1
|
+
/** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ "use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
3
3
|
value: true
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "renderRadioGroup_unstable", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return renderRadioGroup_unstable;
|
9
|
+
}
|
8
10
|
});
|
9
|
-
const
|
10
|
-
const
|
11
|
-
const
|
11
|
+
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
|
12
|
+
const _reactutilities = require("@fluentui/react-utilities");
|
13
|
+
const _RadioGroupContext = require("../../contexts/RadioGroupContext");
|
12
14
|
const renderRadioGroup_unstable = (state, contextValues)=>{
|
13
|
-
(0,
|
14
|
-
return /*#__PURE__*/ (0,
|
15
|
-
value: contextValues.radioGroup
|
16
|
-
|
15
|
+
(0, _reactutilities.assertSlots)(state);
|
16
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_RadioGroupContext.RadioGroupContext.Provider, {
|
17
|
+
value: contextValues.radioGroup,
|
18
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {})
|
19
|
+
});
|
17
20
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["renderRadioGroup.js"],"sourcesContent":["/** @jsxRuntime
|
1
|
+
{"version":3,"sources":["renderRadioGroup.js"],"sourcesContent":["/** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { RadioGroupContext } from '../../contexts/RadioGroupContext';\n/**\n * Render the final JSX of RadioGroup\n */ export const renderRadioGroup_unstable = (state, contextValues)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsx(RadioGroupContext.Provider, {\n value: contextValues.radioGroup,\n children: /*#__PURE__*/ _jsx(state.root, {})\n });\n};\n"],"names":["renderRadioGroup_unstable","state","contextValues","assertSlots","_jsx","RadioGroupContext","Provider","value","radioGroup","children","root"],"mappings":"AAAA,0BAA0B,GAAG,iDAAiD;;;;+BAK7DA;;;eAAAA;;;4BAL4F;gCACjF;mCACM;AAGvB,MAAMA,4BAA4B,CAACC,OAAOC;IACjDC,IAAAA,2BAAW,EAACF;IACZ,OAAO,WAAW,GAAGG,IAAAA,eAAI,EAACC,oCAAiB,CAACC,QAAQ,EAAE;QAClDC,OAAOL,cAAcM,UAAU;QAC/BC,UAAU,WAAW,GAAGL,IAAAA,eAAI,EAACH,MAAMS,IAAI,EAAE,CAAC;IAC9C;AACJ"}
|
@@ -4,17 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "useRadioGroup_unstable", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return useRadioGroup_unstable;
|
9
|
+
}
|
8
10
|
});
|
9
|
-
const
|
10
|
-
const _react = /*#__PURE__*/
|
11
|
-
const
|
12
|
-
const
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
13
|
+
const _reactfield = require("@fluentui/react-field");
|
14
|
+
const _reactutilities = require("@fluentui/react-utilities");
|
13
15
|
const useRadioGroup_unstable = (props, ref)=>{
|
14
16
|
// Merge props from surrounding <Field>, if any
|
15
|
-
props = (0,
|
16
|
-
const generatedName = (0,
|
17
|
-
const { name =generatedName
|
17
|
+
props = (0, _reactfield.useFieldControlProps_unstable)(props);
|
18
|
+
const generatedName = (0, _reactutilities.useId)('radiogroup-');
|
19
|
+
const { name = generatedName, value, defaultValue, disabled, layout = 'vertical', onChange, required } = props;
|
18
20
|
return {
|
19
21
|
layout,
|
20
22
|
name,
|
@@ -28,14 +30,14 @@ const useRadioGroup_unstable = (props, ref)=>{
|
|
28
30
|
root: {
|
29
31
|
ref,
|
30
32
|
role: 'radiogroup',
|
31
|
-
...
|
33
|
+
..._reactutilities.slot.always((0, _reactutilities.getNativeElementProps)('div', props, /*excludedPropNames:*/ [
|
32
34
|
'onChange',
|
33
35
|
'name'
|
34
36
|
]), {
|
35
37
|
elementType: 'div'
|
36
38
|
}),
|
37
|
-
onChange: (0,
|
38
|
-
if (onChange && (0,
|
39
|
+
onChange: (0, _reactutilities.useEventCallback)((ev)=>{
|
40
|
+
if (onChange && (0, _reactutilities.isHTMLElement)(ev.target, {
|
39
41
|
constructorName: 'HTMLInputElement'
|
40
42
|
}) && ev.target.type === 'radio') {
|
41
43
|
onChange(ev, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useRadioGroup.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getNativeElementProps, isHTMLElement, useEventCallback, useId, slot } 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
|
1
|
+
{"version":3,"sources":["useRadioGroup.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getNativeElementProps, isHTMLElement, useEventCallback, useId, slot } 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 ...slot.always(getNativeElementProps('div', props, /*excludedPropNames:*/ [\n 'onChange',\n 'name'\n ]), {\n elementType: 'div'\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","slot","always","getNativeElementProps","elementType","useEventCallback","ev","isHTMLElement","target","constructorName","type"],"mappings":";;;;+BAWiBA;;;eAAAA;;;;iEAXM;4BACuB;gCACsC;AASzE,MAAMA,yBAAyB,CAACC,OAAOC;IAC9C,+CAA+C;IAC/CD,QAAQE,IAAAA,yCAA6B,EAACF;IACtC,MAAMG,gBAAgBC,IAAAA,qBAAK,EAAC;IAC5B,MAAM,EAAEC,OAAOF,aAAa,EAAEG,KAAK,EAAEC,YAAY,EAAEC,QAAQ,EAAEC,SAAS,UAAU,EAAEC,QAAQ,EAAEC,QAAQ,EAAE,GAAGX;IACzG,OAAO;QACHS;QACAJ;QACAC;QACAC;QACAC;QACAG;QACAC,YAAY;YACRC,MAAM;QACV;QACAA,MAAM;YACFZ;YACAa,MAAM;YACN,GAAGC,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAOjB,OAAO,oBAAoB,GAAG;gBACtE;gBACA;aACH,GAAG;gBACAkB,aAAa;YACjB,EAAE;YACFR,UAAUS,IAAAA,gCAAgB,EAAC,CAACC;gBACxB,IAAIV,YAAYW,IAAAA,6BAAa,EAACD,GAAGE,MAAM,EAAE;oBACrCC,iBAAiB;gBACrB,MAAMH,GAAGE,MAAM,CAACE,IAAI,KAAK,SAAS;oBAC9Bd,SAASU,IAAI;wBACTd,OAAOc,GAAGE,MAAM,CAAChB,KAAK;oBAC1B;gBACJ;YACJ;QACJ;IACJ;AACJ"}
|
@@ -9,14 +9,18 @@ function _export(target, all) {
|
|
9
9
|
});
|
10
10
|
}
|
11
11
|
_export(exports, {
|
12
|
-
radioGroupClassNames: ()
|
13
|
-
|
12
|
+
radioGroupClassNames: function() {
|
13
|
+
return radioGroupClassNames;
|
14
|
+
},
|
15
|
+
useRadioGroupStyles_unstable: function() {
|
16
|
+
return useRadioGroupStyles_unstable;
|
17
|
+
}
|
14
18
|
});
|
15
19
|
const _react = require("@griffel/react");
|
16
20
|
const radioGroupClassNames = {
|
17
21
|
root: 'fui-RadioGroup'
|
18
22
|
};
|
19
|
-
const useStyles = /*#__PURE__*/ (0, _react
|
23
|
+
const useStyles = /*#__PURE__*/ (0, _react.__styles)({
|
20
24
|
root: {
|
21
25
|
mc9l5x: "f22iagw",
|
22
26
|
Bt984gj: "f6jr5hl"
|
@@ -1 +1 @@
|
|
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:flex;}\", \".f6jr5hl{align-items:flex-start;}\", \".f1vx9l62{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
|
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:flex;}\", \".f6jr5hl{align-items:flex-start;}\", \".f1vx9l62{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;eAApBA;;IAiBAC,4BAA4B;eAA5BA;;;uBAlB0B;AAChC,MAAMD,uBAAuB;IAClCE,MAAM;AACR;AACA,MAAMC,YAAY,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IACtCF,MAAM;QACJG,QAAQ;QACRC,SAAS;IACX;IACAC,UAAU;QACRC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAA2B;QAAqC;KAAoC;AAC1G;AAIO,MAAMR,+BAA+BS,CAAAA;IAC1C,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"}
|
@@ -9,13 +9,21 @@ function _export(target, all) {
|
|
9
9
|
});
|
10
10
|
}
|
11
11
|
_export(exports, {
|
12
|
-
RadioGroupContext: ()
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
RadioGroupContext: function() {
|
13
|
+
return RadioGroupContext;
|
14
|
+
},
|
15
|
+
RadioGroupProvider: function() {
|
16
|
+
return RadioGroupProvider;
|
17
|
+
},
|
18
|
+
useRadioGroupContextValue_unstable: function() {
|
19
|
+
return useRadioGroupContextValue_unstable;
|
20
|
+
},
|
21
|
+
useRadioGroupContext_unstable: function() {
|
22
|
+
return useRadioGroupContext_unstable;
|
23
|
+
}
|
16
24
|
});
|
17
|
-
const
|
18
|
-
const _react = /*#__PURE__*/
|
25
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
26
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
19
27
|
const RadioGroupContext = /*#__PURE__*/ _react.createContext(undefined);
|
20
28
|
const radioGroupContextDefaultValue = {};
|
21
29
|
const RadioGroupProvider = RadioGroupContext.Provider;
|
@@ -1 +1 @@
|
|
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
|
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;eAAjBA;;IAEJC,kBAAkB;eAAlBA;;IAGIC,kCAAkC;eAAlCA;;IAIAC,6BAA6B;eAA7BA;;;;iEAZM;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"}
|
@@ -2,6 +2,6 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
3
3
|
value: true
|
4
4
|
});
|
5
|
-
const
|
6
|
-
|
7
|
-
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
6
|
+
_export_star._(require("./RadioGroupContext"), exports);
|
7
|
+
_export_star._(require("./useRadioGroupContextValues"), exports);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './RadioGroupContext';\nexport * from './useRadioGroupContextValues';\n"],"names":[],"mappings":";;;;;
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './RadioGroupContext';\nexport * from './useRadioGroupContextValues';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA"}
|
@@ -4,12 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
});
|
5
5
|
Object.defineProperty(exports, "useRadioGroupContextValues", {
|
6
6
|
enumerable: true,
|
7
|
-
get: ()
|
7
|
+
get: function() {
|
8
|
+
return useRadioGroupContextValues;
|
9
|
+
}
|
8
10
|
});
|
9
|
-
const
|
10
|
-
const _react = /*#__PURE__*/
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
11
13
|
const useRadioGroupContextValues = (state)=>{
|
12
|
-
const { name
|
14
|
+
const { name, value, defaultValue, disabled, layout, required } = state;
|
13
15
|
const ariaDescribedBy = state.root['aria-describedby'];
|
14
16
|
const radioGroup = _react.useMemo(()=>({
|
15
17
|
name,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useRadioGroupContextValues.js"],"sourcesContent":["import * as React from 'react';\nexport const useRadioGroupContextValues = (state)=>{\n const { name
|
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;;;eAAAA;;;;iEADU;AAChB,MAAMA,6BAA6B,CAACC;IACvC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAEC,YAAY,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,QAAQ,EAAE,GAAGN;IAClE,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
@@ -9,21 +9,49 @@ function _export(target, all) {
|
|
9
9
|
});
|
10
10
|
}
|
11
11
|
_export(exports, {
|
12
|
-
RadioGroup: ()
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
12
|
+
RadioGroup: function() {
|
13
|
+
return _RadioGroup.RadioGroup;
|
14
|
+
},
|
15
|
+
radioGroupClassNames: function() {
|
16
|
+
return _RadioGroup.radioGroupClassNames;
|
17
|
+
},
|
18
|
+
renderRadioGroup_unstable: function() {
|
19
|
+
return _RadioGroup.renderRadioGroup_unstable;
|
20
|
+
},
|
21
|
+
useRadioGroupStyles_unstable: function() {
|
22
|
+
return _RadioGroup.useRadioGroupStyles_unstable;
|
23
|
+
},
|
24
|
+
useRadioGroup_unstable: function() {
|
25
|
+
return _RadioGroup.useRadioGroup_unstable;
|
26
|
+
},
|
27
|
+
Radio: function() {
|
28
|
+
return _Radio.Radio;
|
29
|
+
},
|
30
|
+
radioClassNames: function() {
|
31
|
+
return _Radio.radioClassNames;
|
32
|
+
},
|
33
|
+
renderRadio_unstable: function() {
|
34
|
+
return _Radio.renderRadio_unstable;
|
35
|
+
},
|
36
|
+
useRadioStyles_unstable: function() {
|
37
|
+
return _Radio.useRadioStyles_unstable;
|
38
|
+
},
|
39
|
+
useRadio_unstable: function() {
|
40
|
+
return _Radio.useRadio_unstable;
|
41
|
+
},
|
42
|
+
RadioGroupProvider: function() {
|
43
|
+
return _index.RadioGroupProvider;
|
44
|
+
},
|
45
|
+
useRadioGroupContextValues: function() {
|
46
|
+
return _index.useRadioGroupContextValues;
|
47
|
+
},
|
48
|
+
useRadioGroupContext_unstable: function() {
|
49
|
+
return _index.useRadioGroupContext_unstable;
|
50
|
+
},
|
51
|
+
useRadioGroupContextValue_unstable: function() {
|
52
|
+
return _index.useRadioGroupContextValue_unstable;
|
53
|
+
}
|
26
54
|
});
|
27
|
-
const
|
28
|
-
const
|
55
|
+
const _RadioGroup = require("./RadioGroup");
|
56
|
+
const _Radio = require("./Radio");
|
29
57
|
const _index = require("./contexts/index");
|
@@ -1 +1 @@
|
|
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,
|
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;eAAVA,sBAAU;;IAAEC,oBAAoB;eAApBA,gCAAoB;;IAAEC,yBAAyB;eAAzBA,qCAAyB;;IAAEC,4BAA4B;eAA5BA,wCAA4B;;IAAEC,sBAAsB;eAAtBA,kCAAsB;;IACjHC,KAAK;eAALA,YAAK;;IAAEC,eAAe;eAAfA,sBAAe;;IAAEC,oBAAoB;eAApBA,2BAAoB;;IAAEC,uBAAuB;eAAvBA,8BAAuB;;IAAEC,iBAAiB;eAAjBA,wBAAiB;;IACxFC,kBAAkB;eAAlBA,yBAAkB;;IAAEC,0BAA0B;eAA1BA,iCAA0B;;IAAEC,6BAA6B;eAA7BA,oCAA6B;;IAAEC,kCAAkC;eAAlCA,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.36",
|
4
4
|
"description": "Fluent UI Radio component",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -33,22 +33,22 @@
|
|
33
33
|
"@fluentui/scripts-tasks": "*"
|
34
34
|
},
|
35
35
|
"dependencies": {
|
36
|
-
"@fluentui/react-field": "^9.1.
|
36
|
+
"@fluentui/react-field": "^9.1.23",
|
37
37
|
"@fluentui/react-icons": "^2.0.207",
|
38
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
39
|
-
"@fluentui/react-label": "^9.1.
|
40
|
-
"@fluentui/react-shared-contexts": "^9.7.
|
41
|
-
"@fluentui/react-tabster": "^9.12.
|
42
|
-
"@fluentui/react-theme": "^9.1.
|
43
|
-
"@fluentui/react-utilities": "^9.13.
|
38
|
+
"@fluentui/react-jsx-runtime": "^9.0.4",
|
39
|
+
"@fluentui/react-label": "^9.1.31",
|
40
|
+
"@fluentui/react-shared-contexts": "^9.7.3",
|
41
|
+
"@fluentui/react-tabster": "^9.12.6",
|
42
|
+
"@fluentui/react-theme": "^9.1.12",
|
43
|
+
"@fluentui/react-utilities": "^9.13.1",
|
44
44
|
"@griffel/react": "^1.5.14",
|
45
|
-
"@swc/helpers": "^0.
|
45
|
+
"@swc/helpers": "^0.5.1"
|
46
46
|
},
|
47
47
|
"peerDependencies": {
|
48
|
-
"@types/react": ">=16.
|
49
|
-
"@types/react-dom": ">=16.
|
50
|
-
"react": ">=16.
|
51
|
-
"react-dom": ">=16.
|
48
|
+
"@types/react": ">=16.14.0 <19.0.0",
|
49
|
+
"@types/react-dom": ">=16.14.0 <19.0.0",
|
50
|
+
"react": ">=16.14.0 <19.0.0",
|
51
|
+
"react-dom": ">=16.14.0 <19.0.0",
|
52
52
|
"scheduler": "^0.19.0 || ^0.20.0"
|
53
53
|
},
|
54
54
|
"beachball": {
|