@fluentui/react-radio 9.2.25 → 9.2.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/CHANGELOG.md +31 -2
  2. package/lib/Radio.js.map +1 -1
  3. package/lib/RadioGroup.js.map +1 -1
  4. package/lib/components/Radio/Radio.js.map +1 -1
  5. package/lib/components/Radio/Radio.types.js.map +1 -1
  6. package/lib/components/Radio/index.js.map +1 -1
  7. package/lib/components/Radio/renderRadio.js.map +1 -1
  8. package/lib/components/Radio/useRadio.js.map +1 -1
  9. package/lib/components/RadioGroup/RadioGroup.js.map +1 -1
  10. package/lib/components/RadioGroup/RadioGroup.types.js.map +1 -1
  11. package/lib/components/RadioGroup/index.js.map +1 -1
  12. package/lib/components/RadioGroup/renderRadioGroup.js.map +1 -1
  13. package/lib/components/RadioGroup/useRadioGroup.js.map +1 -1
  14. package/lib/contexts/RadioGroupContext.js.map +1 -1
  15. package/lib/contexts/index.js.map +1 -1
  16. package/lib/contexts/useRadioGroupContextValues.js.map +1 -1
  17. package/lib/index.js.map +1 -1
  18. package/lib-commonjs/Radio.js.map +1 -1
  19. package/lib-commonjs/RadioGroup.js.map +1 -1
  20. package/lib-commonjs/components/Radio/Radio.js.map +1 -1
  21. package/lib-commonjs/components/Radio/Radio.types.js.map +1 -1
  22. package/lib-commonjs/components/Radio/index.js.map +1 -1
  23. package/lib-commonjs/components/Radio/renderRadio.js.map +1 -1
  24. package/lib-commonjs/components/Radio/useRadio.js.map +1 -1
  25. package/lib-commonjs/components/Radio/useRadioStyles.styles.js.map +1 -1
  26. package/lib-commonjs/components/RadioGroup/RadioGroup.js.map +1 -1
  27. package/lib-commonjs/components/RadioGroup/RadioGroup.types.js.map +1 -1
  28. package/lib-commonjs/components/RadioGroup/index.js.map +1 -1
  29. package/lib-commonjs/components/RadioGroup/renderRadioGroup.js.map +1 -1
  30. package/lib-commonjs/components/RadioGroup/useRadioGroup.js.map +1 -1
  31. package/lib-commonjs/components/RadioGroup/useRadioGroupStyles.styles.js.map +1 -1
  32. package/lib-commonjs/contexts/RadioGroupContext.js.map +1 -1
  33. package/lib-commonjs/contexts/index.js.map +1 -1
  34. package/lib-commonjs/contexts/useRadioGroupContextValues.js.map +1 -1
  35. package/lib-commonjs/index.js +21 -21
  36. package/lib-commonjs/index.js.map +1 -1
  37. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -1,12 +1,41 @@
1
1
  # Change Log - @fluentui/react-radio
2
2
 
3
- This log was last generated on Mon, 01 Jul 2024 20:25:41 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 23 Jul 2024 20:09:20 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.2.27](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.2.27)
8
+
9
+ Tue, 23 Jul 2024 20:09:20 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.2.26..@fluentui/react-radio_v9.2.27)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-field to v9.1.71 ([PR #32067](https://github.com/microsoft/fluentui/pull/32067) by beachball)
15
+ - Bump @fluentui/react-jsx-runtime to v9.0.42 ([PR #32067](https://github.com/microsoft/fluentui/pull/32067) by beachball)
16
+ - Bump @fluentui/react-label to v9.1.74 ([PR #32067](https://github.com/microsoft/fluentui/pull/32067) by beachball)
17
+ - Bump @fluentui/react-shared-contexts to v9.20.0 ([PR #32067](https://github.com/microsoft/fluentui/pull/32067) by beachball)
18
+ - Bump @fluentui/react-tabster to v9.22.3 ([PR #32067](https://github.com/microsoft/fluentui/pull/32067) by beachball)
19
+ - Bump @fluentui/react-utilities to v9.18.13 ([PR #32067](https://github.com/microsoft/fluentui/pull/32067) by beachball)
20
+
21
+ ## [9.2.26](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.2.26)
22
+
23
+ Mon, 15 Jul 2024 17:25:43 GMT
24
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.2.25..@fluentui/react-radio_v9.2.26)
25
+
26
+ ### Patches
27
+
28
+ - fix: revert incorectly set npm versions in all packages ([PR #31937](https://github.com/microsoft/fluentui/pull/31937) by martinhochel@microsoft.com)
29
+ - Bump @fluentui/react-field to v9.1.70 ([PR #31998](https://github.com/microsoft/fluentui/pull/31998) by beachball)
30
+ - Bump @fluentui/react-jsx-runtime to v9.0.41 ([PR #31998](https://github.com/microsoft/fluentui/pull/31998) by beachball)
31
+ - Bump @fluentui/react-label to v9.1.73 ([PR #31998](https://github.com/microsoft/fluentui/pull/31998) by beachball)
32
+ - Bump @fluentui/react-shared-contexts to v9.19.1 ([PR #31998](https://github.com/microsoft/fluentui/pull/31998) by beachball)
33
+ - Bump @fluentui/react-tabster to v9.22.2 ([PR #31998](https://github.com/microsoft/fluentui/pull/31998) by beachball)
34
+ - Bump @fluentui/react-utilities to v9.18.12 ([PR #31998](https://github.com/microsoft/fluentui/pull/31998) by beachball)
35
+
7
36
  ## [9.2.25](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.2.25)
8
37
 
9
- Mon, 01 Jul 2024 20:25:41 GMT
38
+ Mon, 01 Jul 2024 20:30:28 GMT
10
39
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.2.24..@fluentui/react-radio_v9.2.25)
11
40
 
12
41
  ### Patches
package/lib/Radio.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["Radio.ts"],"sourcesContent":["export * from './components/Radio/index';\n"],"names":[],"mappings":"AAAA,cAAc,2BAA2B"}
1
+ {"version":3,"sources":["Radio.ts"],"sourcesContent":["export * from './components/Radio/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,2BAA2B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["RadioGroup.ts"],"sourcesContent":["export * from './components/RadioGroup/index';\n"],"names":[],"mappings":"AAAA,cAAc,gCAAgC"}
1
+ {"version":3,"sources":["RadioGroup.ts"],"sourcesContent":["export * from './components/RadioGroup/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,gCAAgC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Radio.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { RadioProps } from './Radio.types';\nimport { renderRadio_unstable } from './renderRadio';\nimport { useRadio_unstable } from './useRadio';\nimport { useRadioStyles_unstable } from './useRadioStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Radio component is a wrapper for a radio button with a label.\n */\nexport const Radio: ForwardRefComponent<RadioProps> = React.forwardRef((props, ref) => {\n const state = useRadio_unstable(props, ref);\n\n useRadioStyles_unstable(state);\n\n useCustomStyleHook_unstable('useRadioStyles_unstable')(state);\n\n return renderRadio_unstable(state);\n});\n\nRadio.displayName = 'Radio';\n"],"names":["React","renderRadio_unstable","useRadio_unstable","useRadioStyles_unstable","useCustomStyleHook_unstable","Radio","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,uBAAuB,QAAQ,0BAA0B;AAClE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,sBAAyCL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7E,MAAMC,QAAQP,kBAAkBK,OAAOC;IAEvCL,wBAAwBM;IAExBL,4BAA4B,2BAA2BK;IAEvD,OAAOR,qBAAqBQ;AAC9B,GAAG;AAEHJ,MAAMK,WAAW,GAAG"}
1
+ {"version":3,"sources":["Radio.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { RadioProps } from './Radio.types';\nimport { renderRadio_unstable } from './renderRadio';\nimport { useRadio_unstable } from './useRadio';\nimport { useRadioStyles_unstable } from './useRadioStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Radio component is a wrapper for a radio button with a label.\n */\nexport const Radio: ForwardRefComponent<RadioProps> = React.forwardRef((props, ref) => {\n const state = useRadio_unstable(props, ref);\n\n useRadioStyles_unstable(state);\n\n useCustomStyleHook_unstable('useRadioStyles_unstable')(state);\n\n return renderRadio_unstable(state);\n});\n\nRadio.displayName = 'Radio';\n"],"names":["React","renderRadio_unstable","useRadio_unstable","useRadioStyles_unstable","useCustomStyleHook_unstable","Radio","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,iBAAiB,QAAQ,aAAa;AAC/C,SAASC,uBAAuB,QAAQ,0BAA0B;AAClE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,sBAAyCL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7E,MAAMC,QAAQP,kBAAkBK,OAAOC;IAEvCL,wBAAwBM;IAExBL,4BAA4B,2BAA2BK;IAEvD,OAAOR,qBAAqBQ;AAC9B,GAAG;AAEHJ,MAAMK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Radio.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { Label } from '@fluentui/react-label';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type RadioSlots = {\n /**\n * The root element of the Radio.\n *\n * The root slot receives the `className` and `style` specified directly on the `<Radio>`.\n * All other native props will be applied to the primary slot: `input`\n */\n root: NonNullable<Slot<'span'>>;\n\n /**\n * The Radio's label.\n */\n label: Slot<typeof Label>;\n\n /**\n * Hidden input that handles the radio's functionality.\n *\n * This is the PRIMARY slot: all native properties specified directly on `<Radio>` will be applied to this slot,\n * except `className` and `style`, which remain on the root slot.\n */\n input: NonNullable<Slot<'input'>>;\n\n /**\n * A circle outline, with a filled circle icon inside when the Radio is checked.\n */\n indicator: NonNullable<Slot<'div'>>;\n};\n\n/**\n * Radio Props\n */\nexport type RadioProps = Omit<ComponentProps<Partial<RadioSlots>, 'input'>, 'onChange' | 'size'> & {\n /**\n * The value of the RadioGroup when this Radio item is selected.\n */\n value?: string;\n\n /**\n * The position of the label relative to the radio indicator.\n *\n * This defaults to `after` unless the Radio is inside a RadioGroup with `layout=\"horizontalStacked\"`,\n * in which case it defaults to `below`.\n *\n * @defaultvalue after\n */\n labelPosition?: 'after' | 'below';\n\n /**\n * Disable this Radio item.\n */\n disabled?: boolean;\n\n /**\n * Callback when this Radio is selected in its group.\n *\n * **Note:** `onChange` is NOT called when this Radio is deselected.\n * Use RadioGroup's `onChange` event to determine when the selection in the group changes.\n */\n // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onChange?: (ev: React.ChangeEvent<HTMLInputElement>, data: RadioOnChangeData) => void;\n};\n\n/**\n * Data for the onChange event for Radio.\n */\nexport type RadioOnChangeData = {\n /**\n * The value prop of this Radio item.\n */\n value: string;\n};\n\n/**\n * State used in rendering Radio\n */\nexport type RadioState = ComponentState<RadioSlots> & Required<Pick<RadioProps, 'labelPosition'>>;\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
1
+ {"version":3,"sources":["Radio.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { Label } from '@fluentui/react-label';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type RadioSlots = {\n /**\n * The root element of the Radio.\n *\n * The root slot receives the `className` and `style` specified directly on the `<Radio>`.\n * All other native props will be applied to the primary slot: `input`\n */\n root: NonNullable<Slot<'span'>>;\n\n /**\n * The Radio's label.\n */\n label: Slot<typeof Label>;\n\n /**\n * Hidden input that handles the radio's functionality.\n *\n * This is the PRIMARY slot: all native properties specified directly on `<Radio>` will be applied to this slot,\n * except `className` and `style`, which remain on the root slot.\n */\n input: NonNullable<Slot<'input'>>;\n\n /**\n * A circle outline, with a filled circle icon inside when the Radio is checked.\n */\n indicator: NonNullable<Slot<'div'>>;\n};\n\n/**\n * Radio Props\n */\nexport type RadioProps = Omit<ComponentProps<Partial<RadioSlots>, 'input'>, 'onChange' | 'size'> & {\n /**\n * The value of the RadioGroup when this Radio item is selected.\n */\n value?: string;\n\n /**\n * The position of the label relative to the radio indicator.\n *\n * This defaults to `after` unless the Radio is inside a RadioGroup with `layout=\"horizontalStacked\"`,\n * in which case it defaults to `below`.\n *\n * @defaultvalue after\n */\n labelPosition?: 'after' | 'below';\n\n /**\n * Disable this Radio item.\n */\n disabled?: boolean;\n\n /**\n * Callback when this Radio is selected in its group.\n *\n * **Note:** `onChange` is NOT called when this Radio is deselected.\n * Use RadioGroup's `onChange` event to determine when the selection in the group changes.\n */\n // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onChange?: (ev: React.ChangeEvent<HTMLInputElement>, data: RadioOnChangeData) => void;\n};\n\n/**\n * Data for the onChange event for Radio.\n */\nexport type RadioOnChangeData = {\n /**\n * The value prop of this Radio item.\n */\n value: string;\n};\n\n/**\n * State used in rendering Radio\n */\nexport type RadioState = ComponentState<RadioSlots> & Required<Pick<RadioProps, 'labelPosition'>>;\n"],"names":["React"],"rangeMappings":"","mappings":"AAAA,YAAYA,WAAW,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Radio';\nexport * from './Radio.types';\nexport * from './renderRadio';\nexport * from './useRadio';\nexport * from './useRadioStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,gBAAgB;AAC9B,cAAc,gBAAgB;AAC9B,cAAc,aAAa;AAC3B,cAAc,0BAA0B"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Radio';\nexport * from './Radio.types';\nexport * from './renderRadio';\nexport * from './useRadio';\nexport * from './useRadioStyles.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,gBAAgB;AAC9B,cAAc,gBAAgB;AAC9B,cAAc,aAAa;AAC3B,cAAc,0BAA0B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderRadio.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { RadioSlots, RadioState } from './Radio.types';\n\n/**\n * Render the final JSX of Radio\n */\nexport const renderRadio_unstable = (state: RadioState) => {\n assertSlots<RadioSlots>(state);\n\n return (\n <state.root>\n <state.input />\n <state.indicator />\n {state.label && <state.label />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderRadio_unstable","state","root","input","indicator","label"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,uBAAuB,CAACC;IACnCF,YAAwBE;IAExB,qBACE,MAACA,MAAMC,IAAI;;0BACT,KAACD,MAAME,KAAK;0BACZ,KAACF,MAAMG,SAAS;YACfH,MAAMI,KAAK,kBAAI,KAACJ,MAAMI,KAAK;;;AAGlC,EAAE"}
1
+ {"version":3,"sources":["renderRadio.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { RadioSlots, RadioState } from './Radio.types';\n\n/**\n * Render the final JSX of Radio\n */\nexport const renderRadio_unstable = (state: RadioState) => {\n assertSlots<RadioSlots>(state);\n\n return (\n <state.root>\n <state.input />\n <state.indicator />\n {state.label && <state.label />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderRadio_unstable","state","root","input","indicator","label"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,uBAAuB,CAACC;IACnCF,YAAwBE;IAExB,qBACE,MAACA,MAAMC,IAAI;;0BACT,KAACD,MAAME,KAAK;0BACZ,KAACF,MAAMG,SAAS;YACfH,MAAMI,KAAK,kBAAI,KAACJ,MAAMI,KAAK;;;AAGlC,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useRadio.tsx"],"sourcesContent":["import * as React from 'react';\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';\nimport type { RadioProps, RadioState } from './Radio.types';\n\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 */\nexport const useRadio_unstable = (props: RadioProps, ref: React.Ref<HTMLInputElement>): RadioState => {\n const group = useRadioGroupContextValue_unstable();\n\n const {\n name = group.name,\n checked = group.value !== undefined ? group.value === props.value : undefined,\n defaultChecked = group.defaultValue !== undefined ? group.defaultValue === props.value : undefined,\n labelPosition = group.layout === 'horizontal-stacked' ? 'below' : 'after',\n disabled = group.disabled,\n required = group.required,\n 'aria-describedby': ariaDescribedBy = group['aria-describedby'],\n onChange,\n } = props;\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['checked', 'defaultChecked', 'onChange'],\n });\n\n const root = slot.always(props.root, {\n defaultProps: {\n ref: useFocusWithin<HTMLSpanElement>(),\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 => onChange?.(ev, { value: ev.currentTarget.value }));\n const label = slot.optional(props.label, {\n defaultProps: { htmlFor: input.id, disabled: input.disabled },\n elementType: Label,\n });\n const indicator = slot.always(props.indicator, {\n defaultProps: { 'aria-hidden': true },\n elementType: 'div',\n });\n return {\n labelPosition,\n components: { root: 'span', input: 'input', label: Label, indicator: 'div' },\n root,\n input,\n label,\n indicator,\n };\n};\n"],"names":["React","Label","getPartitionedNativeProps","mergeCallbacks","useId","slot","useRadioGroupContextValue_unstable","useFocusWithin","useRadio_unstable","props","ref","group","name","checked","value","undefined","defaultChecked","defaultValue","labelPosition","layout","disabled","required","ariaDescribedBy","onChange","nativeProps","primarySlotTagName","excludedPropNames","root","always","defaultProps","elementType","input","type","id","primary","ev","currentTarget","label","optional","htmlFor","indicator","components"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,yBAAyB,EAAEC,cAAc,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AACnG,SAASC,kCAAkC,QAAQ,mCAAmC;AACtF,SAASC,cAAc,QAAQ,0BAA0B;AAGzD;;;;;;;;CAQC,GACD,OAAO,MAAMC,oBAAoB,CAACC,OAAmBC;IACnD,MAAMC,QAAQL;IAEd,MAAM,EACJM,OAAOD,MAAMC,IAAI,EACjBC,UAAUF,MAAMG,KAAK,KAAKC,YAAYJ,MAAMG,KAAK,KAAKL,MAAMK,KAAK,GAAGC,SAAS,EAC7EC,iBAAiBL,MAAMM,YAAY,KAAKF,YAAYJ,MAAMM,YAAY,KAAKR,MAAMK,KAAK,GAAGC,SAAS,EAClGG,gBAAgBP,MAAMQ,MAAM,KAAK,uBAAuB,UAAU,OAAO,EACzEC,WAAWT,MAAMS,QAAQ,EACzBC,WAAWV,MAAMU,QAAQ,EACzB,oBAAoBC,kBAAkBX,KAAK,CAAC,mBAAmB,EAC/DY,QAAQ,EACT,GAAGd;IAEJ,MAAMe,cAActB,0BAA0B;QAC5CO;QACAgB,oBAAoB;QACpBC,mBAAmB;YAAC;YAAW;YAAkB;SAAW;IAC9D;IAEA,MAAMC,OAAOtB,KAAKuB,MAAM,CAACnB,MAAMkB,IAAI,EAAE;QACnCE,cAAc;YACZnB,KAAKH;YACL,GAAGiB,YAAYG,IAAI;QACrB;QACAG,aAAa;IACf;IACA,MAAMC,QAAQ1B,KAAKuB,MAAM,CAACnB,MAAMsB,KAAK,EAAE;QACrCF,cAAc;YACZnB;YACAsB,MAAM;YACNC,IAAI7B,MAAM,UAAUoB,YAAYU,OAAO,CAACD,EAAE;YAC1CrB;YACAC;YACAG;YACAI;YACAC;YACA,oBAAoBC;YACpB,GAAGE,YAAYU,OAAO;QACxB;QACAJ,aAAa;IACf;IACAC,MAAMR,QAAQ,GAAGpB,eAAe4B,MAAMR,QAAQ,EAAEY,CAAAA,KAAMZ,qBAAAA,+BAAAA,SAAWY,IAAI;YAAErB,OAAOqB,GAAGC,aAAa,CAACtB,KAAK;QAAC;IACrG,MAAMuB,QAAQhC,KAAKiC,QAAQ,CAAC7B,MAAM4B,KAAK,EAAE;QACvCR,cAAc;YAAEU,SAASR,MAAME,EAAE;YAAEb,UAAUW,MAAMX,QAAQ;QAAC;QAC5DU,aAAa7B;IACf;IACA,MAAMuC,YAAYnC,KAAKuB,MAAM,CAACnB,MAAM+B,SAAS,EAAE;QAC7CX,cAAc;YAAE,eAAe;QAAK;QACpCC,aAAa;IACf;IACA,OAAO;QACLZ;QACAuB,YAAY;YAAEd,MAAM;YAAQI,OAAO;YAASM,OAAOpC;YAAOuC,WAAW;QAAM;QAC3Eb;QACAI;QACAM;QACAG;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["useRadio.tsx"],"sourcesContent":["import * as React from 'react';\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';\nimport type { RadioProps, RadioState } from './Radio.types';\n\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 */\nexport const useRadio_unstable = (props: RadioProps, ref: React.Ref<HTMLInputElement>): RadioState => {\n const group = useRadioGroupContextValue_unstable();\n\n const {\n name = group.name,\n checked = group.value !== undefined ? group.value === props.value : undefined,\n defaultChecked = group.defaultValue !== undefined ? group.defaultValue === props.value : undefined,\n labelPosition = group.layout === 'horizontal-stacked' ? 'below' : 'after',\n disabled = group.disabled,\n required = group.required,\n 'aria-describedby': ariaDescribedBy = group['aria-describedby'],\n onChange,\n } = props;\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['checked', 'defaultChecked', 'onChange'],\n });\n\n const root = slot.always(props.root, {\n defaultProps: {\n ref: useFocusWithin<HTMLSpanElement>(),\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 => onChange?.(ev, { value: ev.currentTarget.value }));\n const label = slot.optional(props.label, {\n defaultProps: { htmlFor: input.id, disabled: input.disabled },\n elementType: Label,\n });\n const indicator = slot.always(props.indicator, {\n defaultProps: { 'aria-hidden': true },\n elementType: 'div',\n });\n return {\n labelPosition,\n components: { root: 'span', input: 'input', label: Label, indicator: 'div' },\n root,\n input,\n label,\n indicator,\n };\n};\n"],"names":["React","Label","getPartitionedNativeProps","mergeCallbacks","useId","slot","useRadioGroupContextValue_unstable","useFocusWithin","useRadio_unstable","props","ref","group","name","checked","value","undefined","defaultChecked","defaultValue","labelPosition","layout","disabled","required","ariaDescribedBy","onChange","nativeProps","primarySlotTagName","excludedPropNames","root","always","defaultProps","elementType","input","type","id","primary","ev","currentTarget","label","optional","htmlFor","indicator","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,yBAAyB,EAAEC,cAAc,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AACnG,SAASC,kCAAkC,QAAQ,mCAAmC;AACtF,SAASC,cAAc,QAAQ,0BAA0B;AAGzD;;;;;;;;CAQC,GACD,OAAO,MAAMC,oBAAoB,CAACC,OAAmBC;IACnD,MAAMC,QAAQL;IAEd,MAAM,EACJM,OAAOD,MAAMC,IAAI,EACjBC,UAAUF,MAAMG,KAAK,KAAKC,YAAYJ,MAAMG,KAAK,KAAKL,MAAMK,KAAK,GAAGC,SAAS,EAC7EC,iBAAiBL,MAAMM,YAAY,KAAKF,YAAYJ,MAAMM,YAAY,KAAKR,MAAMK,KAAK,GAAGC,SAAS,EAClGG,gBAAgBP,MAAMQ,MAAM,KAAK,uBAAuB,UAAU,OAAO,EACzEC,WAAWT,MAAMS,QAAQ,EACzBC,WAAWV,MAAMU,QAAQ,EACzB,oBAAoBC,kBAAkBX,KAAK,CAAC,mBAAmB,EAC/DY,QAAQ,EACT,GAAGd;IAEJ,MAAMe,cAActB,0BAA0B;QAC5CO;QACAgB,oBAAoB;QACpBC,mBAAmB;YAAC;YAAW;YAAkB;SAAW;IAC9D;IAEA,MAAMC,OAAOtB,KAAKuB,MAAM,CAACnB,MAAMkB,IAAI,EAAE;QACnCE,cAAc;YACZnB,KAAKH;YACL,GAAGiB,YAAYG,IAAI;QACrB;QACAG,aAAa;IACf;IACA,MAAMC,QAAQ1B,KAAKuB,MAAM,CAACnB,MAAMsB,KAAK,EAAE;QACrCF,cAAc;YACZnB;YACAsB,MAAM;YACNC,IAAI7B,MAAM,UAAUoB,YAAYU,OAAO,CAACD,EAAE;YAC1CrB;YACAC;YACAG;YACAI;YACAC;YACA,oBAAoBC;YACpB,GAAGE,YAAYU,OAAO;QACxB;QACAJ,aAAa;IACf;IACAC,MAAMR,QAAQ,GAAGpB,eAAe4B,MAAMR,QAAQ,EAAEY,CAAAA,KAAMZ,qBAAAA,+BAAAA,SAAWY,IAAI;YAAErB,OAAOqB,GAAGC,aAAa,CAACtB,KAAK;QAAC;IACrG,MAAMuB,QAAQhC,KAAKiC,QAAQ,CAAC7B,MAAM4B,KAAK,EAAE;QACvCR,cAAc;YAAEU,SAASR,MAAME,EAAE;YAAEb,UAAUW,MAAMX,QAAQ;QAAC;QAC5DU,aAAa7B;IACf;IACA,MAAMuC,YAAYnC,KAAKuB,MAAM,CAACnB,MAAM+B,SAAS,EAAE;QAC7CX,cAAc;YAAE,eAAe;QAAK;QACpCC,aAAa;IACf;IACA,OAAO;QACLZ;QACAuB,YAAY;YAAEd,MAAM;YAAQI,OAAO;YAASM,OAAOpC;YAAOuC,WAAW;QAAM;QAC3Eb;QACAI;QACAM;QACAG;IACF;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["RadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { RadioGroupProps } from './RadioGroup.types';\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/**\n * A RadioGroup component presents a set of options where only one option can be selected.\n */\nexport const RadioGroup: ForwardRefComponent<RadioGroupProps> = React.forwardRef((props, ref) => {\n const state = useRadioGroup_unstable(props, ref);\n const contextValues = useRadioGroupContextValues(state);\n\n useRadioGroupStyles_unstable(state);\n\n useCustomStyleHook_unstable('useRadioGroupStyles_unstable')(state);\n\n return renderRadioGroup_unstable(state, contextValues);\n});\n\nRadioGroup.displayName = 'RadioGroup';\n"],"names":["React","renderRadioGroup_unstable","useRadioGroup_unstable","useRadioGroupStyles_unstable","useRadioGroupContextValues","useCustomStyleHook_unstable","RadioGroup","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,4BAA4B,QAAQ,+BAA+B;AAC5E,SAASC,0BAA0B,QAAQ,4CAA4C;AACvF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,2BAAmDN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQR,uBAAuBM,OAAOC;IAC5C,MAAME,gBAAgBP,2BAA2BM;IAEjDP,6BAA6BO;IAE7BL,4BAA4B,gCAAgCK;IAE5D,OAAOT,0BAA0BS,OAAOC;AAC1C,GAAG;AAEHL,WAAWM,WAAW,GAAG"}
1
+ {"version":3,"sources":["RadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { RadioGroupProps } from './RadioGroup.types';\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/**\n * A RadioGroup component presents a set of options where only one option can be selected.\n */\nexport const RadioGroup: ForwardRefComponent<RadioGroupProps> = React.forwardRef((props, ref) => {\n const state = useRadioGroup_unstable(props, ref);\n const contextValues = useRadioGroupContextValues(state);\n\n useRadioGroupStyles_unstable(state);\n\n useCustomStyleHook_unstable('useRadioGroupStyles_unstable')(state);\n\n return renderRadioGroup_unstable(state, contextValues);\n});\n\nRadioGroup.displayName = 'RadioGroup';\n"],"names":["React","renderRadioGroup_unstable","useRadioGroup_unstable","useRadioGroupStyles_unstable","useRadioGroupContextValues","useCustomStyleHook_unstable","RadioGroup","forwardRef","props","ref","state","contextValues","displayName"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,4BAA4B,QAAQ,+BAA+B;AAC5E,SAASC,0BAA0B,QAAQ,4CAA4C;AACvF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,2BAAmDN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQR,uBAAuBM,OAAOC;IAC5C,MAAME,gBAAgBP,2BAA2BM;IAEjDP,6BAA6BO;IAE7BL,4BAA4B,gCAAgCK;IAE5D,OAAOT,0BAA0BS,OAAOC;AAC1C,GAAG;AAEHL,WAAWM,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["RadioGroup.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type RadioGroupSlots = {\n /**\n * The radio group root.\n */\n root: NonNullable<Slot<'div'>>;\n};\n\nexport type RadioGroupProps = Omit<ComponentProps<Partial<RadioGroupSlots>>, 'onChange'> & {\n /**\n * The name of this radio group. This name is applied to all Radio items inside this group.\n *\n * If no name is provided, one will be generated so that all of the Radio items have the same name.\n */\n name?: string;\n\n /**\n * The selected Radio item in this group.\n *\n * This should be the `value` prop of one of the Radio items inside this group.\n */\n value?: string;\n\n /**\n * The default selected Radio item in this group.\n *\n * This should be the `value` prop of one of the Radio items inside this group.\n */\n defaultValue?: string;\n\n /**\n * Callback when the selected Radio item changes.\n */\n // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onChange?: (ev: React.FormEvent<HTMLDivElement>, data: RadioGroupOnChangeData) => void;\n\n /**\n * How the radio items are laid out in the group.\n *\n * @default vertical\n */\n layout?: 'vertical' | 'horizontal' | 'horizontal-stacked';\n\n /**\n * Disable all Radio items in this group.\n */\n disabled?: boolean;\n\n /**\n * Require a selection in this group. Adds the `required` prop to all child Radio items.\n */\n required?: boolean;\n};\n\n/**\n * Data for the onChange event for RadioGroup.\n */\nexport type RadioGroupOnChangeData = {\n /**\n * The value of the newly selected Radio item.\n */\n value: string;\n};\n\n/**\n * State used in rendering RadioGroup\n */\nexport type RadioGroupState = ComponentState<RadioGroupSlots> &\n Required<Pick<RadioGroupProps, 'layout'>> &\n Pick<RadioGroupProps, 'name' | 'value' | 'defaultValue' | 'disabled' | 'layout' | 'required'>;\n\nexport type RadioGroupContextValue = Pick<\n RadioGroupProps,\n 'name' | 'value' | 'defaultValue' | 'disabled' | 'layout' | 'required' | 'aria-describedby'\n>;\n\nexport type RadioGroupContextValues = {\n radioGroup: RadioGroupContextValue;\n};\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
1
+ {"version":3,"sources":["RadioGroup.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type RadioGroupSlots = {\n /**\n * The radio group root.\n */\n root: NonNullable<Slot<'div'>>;\n};\n\nexport type RadioGroupProps = Omit<ComponentProps<Partial<RadioGroupSlots>>, 'onChange'> & {\n /**\n * The name of this radio group. This name is applied to all Radio items inside this group.\n *\n * If no name is provided, one will be generated so that all of the Radio items have the same name.\n */\n name?: string;\n\n /**\n * The selected Radio item in this group.\n *\n * This should be the `value` prop of one of the Radio items inside this group.\n */\n value?: string;\n\n /**\n * The default selected Radio item in this group.\n *\n * This should be the `value` prop of one of the Radio items inside this group.\n */\n defaultValue?: string;\n\n /**\n * Callback when the selected Radio item changes.\n */\n // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onChange?: (ev: React.FormEvent<HTMLDivElement>, data: RadioGroupOnChangeData) => void;\n\n /**\n * How the radio items are laid out in the group.\n *\n * @default vertical\n */\n layout?: 'vertical' | 'horizontal' | 'horizontal-stacked';\n\n /**\n * Disable all Radio items in this group.\n */\n disabled?: boolean;\n\n /**\n * Require a selection in this group. Adds the `required` prop to all child Radio items.\n */\n required?: boolean;\n};\n\n/**\n * Data for the onChange event for RadioGroup.\n */\nexport type RadioGroupOnChangeData = {\n /**\n * The value of the newly selected Radio item.\n */\n value: string;\n};\n\n/**\n * State used in rendering RadioGroup\n */\nexport type RadioGroupState = ComponentState<RadioGroupSlots> &\n Required<Pick<RadioGroupProps, 'layout'>> &\n Pick<RadioGroupProps, 'name' | 'value' | 'defaultValue' | 'disabled' | 'layout' | 'required'>;\n\nexport type RadioGroupContextValue = Pick<\n RadioGroupProps,\n 'name' | 'value' | 'defaultValue' | 'disabled' | 'layout' | 'required' | 'aria-describedby'\n>;\n\nexport type RadioGroupContextValues = {\n radioGroup: RadioGroupContextValue;\n};\n"],"names":["React"],"rangeMappings":"","mappings":"AAAA,YAAYA,WAAW,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './RadioGroup';\nexport * from './RadioGroup.types';\nexport * from './renderRadioGroup';\nexport * from './useRadioGroup';\nexport * from './useRadioGroupStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,kBAAkB;AAChC,cAAc,+BAA+B"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './RadioGroup';\nexport * from './RadioGroup.types';\nexport * from './renderRadioGroup';\nexport * from './useRadioGroup';\nexport * from './useRadioGroupStyles.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,kBAAkB;AAChC,cAAc,+BAA+B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderRadioGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { RadioGroupContext } from '../../contexts/RadioGroupContext';\nimport { RadioGroupContextValues, RadioGroupSlots, RadioGroupState } from './RadioGroup.types';\n\n/**\n * Render the final JSX of RadioGroup\n */\nexport const renderRadioGroup_unstable = (state: RadioGroupState, contextValues: RadioGroupContextValues) => {\n assertSlots<RadioGroupSlots>(state);\n\n return (\n <RadioGroupContext.Provider value={contextValues.radioGroup}>\n <state.root />\n </RadioGroupContext.Provider>\n );\n};\n"],"names":["assertSlots","RadioGroupContext","renderRadioGroup_unstable","state","contextValues","Provider","value","radioGroup","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AACxD,SAASC,iBAAiB,QAAQ,mCAAmC;AAGrE;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CAACC,OAAwBC;IAChEJ,YAA6BG;IAE7B,qBACE,KAACF,kBAAkBI,QAAQ;QAACC,OAAOF,cAAcG,UAAU;kBACzD,cAAA,KAACJ,MAAMK,IAAI;;AAGjB,EAAE"}
1
+ {"version":3,"sources":["renderRadioGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { RadioGroupContext } from '../../contexts/RadioGroupContext';\nimport { RadioGroupContextValues, RadioGroupSlots, RadioGroupState } from './RadioGroup.types';\n\n/**\n * Render the final JSX of RadioGroup\n */\nexport const renderRadioGroup_unstable = (state: RadioGroupState, contextValues: RadioGroupContextValues) => {\n assertSlots<RadioGroupSlots>(state);\n\n return (\n <RadioGroupContext.Provider value={contextValues.radioGroup}>\n <state.root />\n </RadioGroupContext.Provider>\n );\n};\n"],"names":["assertSlots","RadioGroupContext","renderRadioGroup_unstable","state","contextValues","Provider","value","radioGroup","root"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AACxD,SAASC,iBAAiB,QAAQ,mCAAmC;AAGrE;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CAACC,OAAwBC;IAChEJ,YAA6BG;IAE7B,qBACE,KAACF,kBAAkBI,QAAQ;QAACC,OAAOF,cAAcG,UAAU;kBACzD,cAAA,KAACJ,MAAMK,IAAI;;AAGjB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useRadioGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getIntrinsicElementProps, isHTMLElement, useEventCallback, useId, slot } from '@fluentui/react-utilities';\nimport { RadioGroupProps, RadioGroupState } from './RadioGroup.types';\n\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 */\nexport const useRadioGroup_unstable = (props: RadioGroupProps, ref: React.Ref<HTMLDivElement>): RadioGroupState => {\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props);\n\n const generatedName = useId('radiogroup-');\n\n const { name = generatedName, value, defaultValue, disabled, layout = 'vertical', onChange, required } = props;\n\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(getIntrinsicElementProps('div', props, /*excludedPropNames:*/ ['onChange', 'name']), {\n elementType: 'div',\n }),\n onChange: useEventCallback(ev => {\n if (\n onChange &&\n isHTMLElement(ev.target, { constructorName: 'HTMLInputElement' }) &&\n ev.target.type === 'radio'\n ) {\n onChange(ev, { value: ev.target.value });\n }\n }),\n },\n };\n};\n"],"names":["React","useFieldControlProps_unstable","getIntrinsicElementProps","isHTMLElement","useEventCallback","useId","slot","useRadioGroup_unstable","props","ref","generatedName","name","value","defaultValue","disabled","layout","onChange","required","components","root","role","always","elementType","ev","target","constructorName","type"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,wBAAwB,EAAEC,aAAa,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AAGnH;;;;;;;;CAQC,GACD,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC;IAC7D,+CAA+C;IAC/CD,QAAQP,8BAA8BO;IAEtC,MAAME,gBAAgBL,MAAM;IAE5B,MAAM,EAAEM,OAAOD,aAAa,EAAEE,KAAK,EAAEC,YAAY,EAAEC,QAAQ,EAAEC,SAAS,UAAU,EAAEC,QAAQ,EAAEC,QAAQ,EAAE,GAAGT;IAEzG,OAAO;QACLO;QACAJ;QACAC;QACAC;QACAC;QACAG;QACAC,YAAY;YACVC,MAAM;QACR;QACAA,MAAM;YACJV;YACAW,MAAM;YACN,GAAGd,KAAKe,MAAM,CAACnB,yBAAyB,OAAOM,OAAO,oBAAoB,GAAG;gBAAC;gBAAY;aAAO,GAAG;gBAClGc,aAAa;YACf,EAAE;YACFN,UAAUZ,iBAAiBmB,CAAAA;gBACzB,IACEP,YACAb,cAAcoB,GAAGC,MAAM,EAAE;oBAAEC,iBAAiB;gBAAmB,MAC/DF,GAAGC,MAAM,CAACE,IAAI,KAAK,SACnB;oBACAV,SAASO,IAAI;wBAAEX,OAAOW,GAAGC,MAAM,CAACZ,KAAK;oBAAC;gBACxC;YACF;QACF;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["useRadioGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getIntrinsicElementProps, isHTMLElement, useEventCallback, useId, slot } from '@fluentui/react-utilities';\nimport { RadioGroupProps, RadioGroupState } from './RadioGroup.types';\n\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 */\nexport const useRadioGroup_unstable = (props: RadioGroupProps, ref: React.Ref<HTMLDivElement>): RadioGroupState => {\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props);\n\n const generatedName = useId('radiogroup-');\n\n const { name = generatedName, value, defaultValue, disabled, layout = 'vertical', onChange, required } = props;\n\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(getIntrinsicElementProps('div', props, /*excludedPropNames:*/ ['onChange', 'name']), {\n elementType: 'div',\n }),\n onChange: useEventCallback(ev => {\n if (\n onChange &&\n isHTMLElement(ev.target, { constructorName: 'HTMLInputElement' }) &&\n ev.target.type === 'radio'\n ) {\n onChange(ev, { value: ev.target.value });\n }\n }),\n },\n };\n};\n"],"names":["React","useFieldControlProps_unstable","getIntrinsicElementProps","isHTMLElement","useEventCallback","useId","slot","useRadioGroup_unstable","props","ref","generatedName","name","value","defaultValue","disabled","layout","onChange","required","components","root","role","always","elementType","ev","target","constructorName","type"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,wBAAwB,EAAEC,aAAa,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AAGnH;;;;;;;;CAQC,GACD,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC;IAC7D,+CAA+C;IAC/CD,QAAQP,8BAA8BO;IAEtC,MAAME,gBAAgBL,MAAM;IAE5B,MAAM,EAAEM,OAAOD,aAAa,EAAEE,KAAK,EAAEC,YAAY,EAAEC,QAAQ,EAAEC,SAAS,UAAU,EAAEC,QAAQ,EAAEC,QAAQ,EAAE,GAAGT;IAEzG,OAAO;QACLO;QACAJ;QACAC;QACAC;QACAC;QACAG;QACAC,YAAY;YACVC,MAAM;QACR;QACAA,MAAM;YACJV;YACAW,MAAM;YACN,GAAGd,KAAKe,MAAM,CAACnB,yBAAyB,OAAOM,OAAO,oBAAoB,GAAG;gBAAC;gBAAY;aAAO,GAAG;gBAClGc,aAAa;YACf,EAAE;YACFN,UAAUZ,iBAAiBmB,CAAAA;gBACzB,IACEP,YACAb,cAAcoB,GAAGC,MAAM,EAAE;oBAAEC,iBAAiB;gBAAmB,MAC/DF,GAAGC,MAAM,CAACE,IAAI,KAAK,SACnB;oBACAV,SAASO,IAAI;wBAAEX,OAAOW,GAAGC,MAAM,CAACZ,KAAK;oBAAC;gBACxC;YACF;QACF;IACF;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["RadioGroupContext.ts"],"sourcesContent":["import * as React from 'react';\n\nimport type { RadioGroupContextValue } from '../RadioGroup';\n\n/**\n * RadioGroupContext is provided by RadioGroup, and is consumed by Radio to determine default values of some props.\n */\nexport const RadioGroupContext = React.createContext<RadioGroupContextValue | undefined>(undefined);\n\nconst radioGroupContextDefaultValue: RadioGroupContextValue = {};\n\nexport const RadioGroupProvider = RadioGroupContext.Provider;\n\n/**\n * Get the value of the RadioGroupContext.\n */\nexport const useRadioGroupContextValue_unstable = () =>\n React.useContext(RadioGroupContext) || radioGroupContextDefaultValue;\n\n/**\n * @deprecated Use useRadioGroupContextValue_unstable instead.\n * RadioGroupContext is no longer a selector context, and no longer benefits from having a selector.\n */\nexport const useRadioGroupContext_unstable = <T>(selector: (ctx: RadioGroupContextValue) => T): T =>\n selector(useRadioGroupContextValue_unstable());\n"],"names":["React","RadioGroupContext","createContext","undefined","radioGroupContextDefaultValue","RadioGroupProvider","Provider","useRadioGroupContextValue_unstable","useContext","useRadioGroupContext_unstable","selector"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAI/B;;CAEC,GACD,OAAO,MAAMC,oBAAoBD,MAAME,aAAa,CAAqCC,WAAW;AAEpG,MAAMC,gCAAwD,CAAC;AAE/D,OAAO,MAAMC,qBAAqBJ,kBAAkBK,QAAQ,CAAC;AAE7D;;CAEC,GACD,OAAO,MAAMC,qCAAqC,IAChDP,MAAMQ,UAAU,CAACP,sBAAsBG,8BAA8B;AAEvE;;;CAGC,GACD,OAAO,MAAMK,gCAAgC,CAAIC,WAC/CA,SAASH,sCAAsC"}
1
+ {"version":3,"sources":["RadioGroupContext.ts"],"sourcesContent":["import * as React from 'react';\n\nimport type { RadioGroupContextValue } from '../RadioGroup';\n\n/**\n * RadioGroupContext is provided by RadioGroup, and is consumed by Radio to determine default values of some props.\n */\nexport const RadioGroupContext = React.createContext<RadioGroupContextValue | undefined>(undefined);\n\nconst radioGroupContextDefaultValue: RadioGroupContextValue = {};\n\nexport const RadioGroupProvider = RadioGroupContext.Provider;\n\n/**\n * Get the value of the RadioGroupContext.\n */\nexport const useRadioGroupContextValue_unstable = () =>\n React.useContext(RadioGroupContext) || radioGroupContextDefaultValue;\n\n/**\n * @deprecated Use useRadioGroupContextValue_unstable instead.\n * RadioGroupContext is no longer a selector context, and no longer benefits from having a selector.\n */\nexport const useRadioGroupContext_unstable = <T>(selector: (ctx: RadioGroupContextValue) => T): T =>\n selector(useRadioGroupContextValue_unstable());\n"],"names":["React","RadioGroupContext","createContext","undefined","radioGroupContextDefaultValue","RadioGroupProvider","Provider","useRadioGroupContextValue_unstable","useContext","useRadioGroupContext_unstable","selector"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAI/B;;CAEC,GACD,OAAO,MAAMC,oBAAoBD,MAAME,aAAa,CAAqCC,WAAW;AAEpG,MAAMC,gCAAwD,CAAC;AAE/D,OAAO,MAAMC,qBAAqBJ,kBAAkBK,QAAQ,CAAC;AAE7D;;CAEC,GACD,OAAO,MAAMC,qCAAqC,IAChDP,MAAMQ,UAAU,CAACP,sBAAsBG,8BAA8B;AAEvE;;;CAGC,GACD,OAAO,MAAMK,gCAAgC,CAAIC,WAC/CA,SAASH,sCAAsC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './RadioGroupContext';\nexport * from './useRadioGroupContextValues';\n"],"names":[],"mappings":"AAAA,cAAc,sBAAsB;AACpC,cAAc,+BAA+B"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './RadioGroupContext';\nexport * from './useRadioGroupContextValues';\n"],"names":[],"rangeMappings":";","mappings":"AAAA,cAAc,sBAAsB;AACpC,cAAc,+BAA+B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useRadioGroupContextValues.ts"],"sourcesContent":["import * as React from 'react';\n\nimport type { RadioGroupContextValue, RadioGroupContextValues, RadioGroupState } from '../RadioGroup';\n\nexport const useRadioGroupContextValues = (state: RadioGroupState): RadioGroupContextValues => {\n const { name, value, defaultValue, disabled, layout, required } = state;\n const ariaDescribedBy = state.root['aria-describedby'];\n\n const radioGroup = React.useMemo<RadioGroupContextValue>(\n () => ({\n name,\n value,\n defaultValue,\n disabled,\n layout,\n required,\n 'aria-describedby': ariaDescribedBy,\n }),\n [name, value, defaultValue, disabled, layout, required, ariaDescribedBy],\n );\n\n return { radioGroup };\n};\n"],"names":["React","useRadioGroupContextValues","state","name","value","defaultValue","disabled","layout","required","ariaDescribedBy","root","radioGroup","useMemo"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAI/B,OAAO,MAAMC,6BAA6B,CAACC;IACzC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAEC,YAAY,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,QAAQ,EAAE,GAAGN;IAClE,MAAMO,kBAAkBP,MAAMQ,IAAI,CAAC,mBAAmB;IAEtD,MAAMC,aAAaX,MAAMY,OAAO,CAC9B,IAAO,CAAA;YACLT;YACAC;YACAC;YACAC;YACAC;YACAC;YACA,oBAAoBC;QACtB,CAAA,GACA;QAACN;QAAMC;QAAOC;QAAcC;QAAUC;QAAQC;QAAUC;KAAgB;IAG1E,OAAO;QAAEE;IAAW;AACtB,EAAE"}
1
+ {"version":3,"sources":["useRadioGroupContextValues.ts"],"sourcesContent":["import * as React from 'react';\n\nimport type { RadioGroupContextValue, RadioGroupContextValues, RadioGroupState } from '../RadioGroup';\n\nexport const useRadioGroupContextValues = (state: RadioGroupState): RadioGroupContextValues => {\n const { name, value, defaultValue, disabled, layout, required } = state;\n const ariaDescribedBy = state.root['aria-describedby'];\n\n const radioGroup = React.useMemo<RadioGroupContextValue>(\n () => ({\n name,\n value,\n defaultValue,\n disabled,\n layout,\n required,\n 'aria-describedby': ariaDescribedBy,\n }),\n [name, value, defaultValue, disabled, layout, required, ariaDescribedBy],\n );\n\n return { radioGroup };\n};\n"],"names":["React","useRadioGroupContextValues","state","name","value","defaultValue","disabled","layout","required","ariaDescribedBy","root","radioGroup","useMemo"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAI/B,OAAO,MAAMC,6BAA6B,CAACC;IACzC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAEC,YAAY,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,QAAQ,EAAE,GAAGN;IAClE,MAAMO,kBAAkBP,MAAMQ,IAAI,CAAC,mBAAmB;IAEtD,MAAMC,aAAaX,MAAMY,OAAO,CAC9B,IAAO,CAAA;YACLT;YACAC;YACAC;YACAC;YACAC;YACAC;YACA,oBAAoBC;QACtB,CAAA,GACA;QAACN;QAAMC;QAAOC;QAAcC;QAAUC;QAAQC;QAAUC;KAAgB;IAG1E,OAAO;QAAEE;IAAW;AACtB,EAAE"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export {\n RadioGroup,\n radioGroupClassNames,\n renderRadioGroup_unstable,\n useRadioGroupStyles_unstable,\n useRadioGroup_unstable,\n} from './RadioGroup';\nexport type {\n RadioGroupContextValue,\n RadioGroupContextValues,\n RadioGroupOnChangeData,\n RadioGroupProps,\n RadioGroupSlots,\n RadioGroupState,\n} from './RadioGroup';\nexport { Radio, radioClassNames, renderRadio_unstable, useRadioStyles_unstable, useRadio_unstable } from './Radio';\nexport type { RadioProps, RadioSlots, RadioState, RadioOnChangeData } from './Radio';\nexport {\n RadioGroupProvider,\n useRadioGroupContextValues,\n useRadioGroupContext_unstable, // eslint-disable-line deprecation/deprecation\n useRadioGroupContextValue_unstable,\n} 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":"AAAA,SACEA,UAAU,EACVC,oBAAoB,EACpBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,sBAAsB,QACjB,eAAe;AAStB,SAASC,KAAK,EAAEC,eAAe,EAAEC,oBAAoB,EAAEC,uBAAuB,EAAEC,iBAAiB,QAAQ,UAAU;AAEnH,SACEC,kBAAkB,EAClBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,kCAAkC,QAC7B,mBAAmB"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export {\n RadioGroup,\n radioGroupClassNames,\n renderRadioGroup_unstable,\n useRadioGroupStyles_unstable,\n useRadioGroup_unstable,\n} from './RadioGroup';\nexport type {\n RadioGroupContextValue,\n RadioGroupContextValues,\n RadioGroupOnChangeData,\n RadioGroupProps,\n RadioGroupSlots,\n RadioGroupState,\n} from './RadioGroup';\nexport { Radio, radioClassNames, renderRadio_unstable, useRadioStyles_unstable, useRadio_unstable } from './Radio';\nexport type { RadioProps, RadioSlots, RadioState, RadioOnChangeData } from './Radio';\nexport {\n RadioGroupProvider,\n useRadioGroupContextValues,\n useRadioGroupContext_unstable, // eslint-disable-line deprecation/deprecation\n useRadioGroupContextValue_unstable,\n} 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"],"rangeMappings":";;","mappings":"AAAA,SACEA,UAAU,EACVC,oBAAoB,EACpBC,yBAAyB,EACzBC,4BAA4B,EAC5BC,sBAAsB,QACjB,eAAe;AAStB,SAASC,KAAK,EAAEC,eAAe,EAAEC,oBAAoB,EAAEC,uBAAuB,EAAEC,iBAAiB,QAAQ,UAAU;AAEnH,SACEC,kBAAkB,EAClBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,kCAAkC,QAC7B,mBAAmB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Radio.js"],"sourcesContent":["export * from './components/Radio/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
1
+ {"version":3,"sources":["Radio.ts"],"sourcesContent":["export * from './components/Radio/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
@@ -1 +1 @@
1
- {"version":3,"sources":["RadioGroup.js"],"sourcesContent":["export * from './components/RadioGroup/index';\n"],"names":[],"mappings":";;;;;uBAAc"}
1
+ {"version":3,"sources":["RadioGroup.ts"],"sourcesContent":["export * from './components/RadioGroup/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Radio.js"],"sourcesContent":["import * as React from 'react';\nimport { renderRadio_unstable } from './renderRadio';\nimport { useRadio_unstable } from './useRadio';\nimport { useRadioStyles_unstable } from './useRadioStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Radio component is a wrapper for a radio button with a label.\n */ export const Radio = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useRadio_unstable(props, ref);\n useRadioStyles_unstable(state);\n useCustomStyleHook_unstable('useRadioStyles_unstable')(state);\n return renderRadio_unstable(state);\n});\nRadio.displayName = 'Radio';\n"],"names":["Radio","React","forwardRef","props","ref","state","useRadio_unstable","useRadioStyles_unstable","useCustomStyleHook_unstable","renderRadio_unstable","displayName"],"mappings":";;;;+BAOiBA;;;eAAAA;;;;iEAPM;6BACc;0BACH;sCACM;qCACI;AAGjC,MAAMA,QAAQ,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC5D,MAAMC,QAAQC,IAAAA,2BAAiB,EAACH,OAAOC;IACvCG,IAAAA,6CAAuB,EAACF;IACxBG,IAAAA,gDAA2B,EAAC,2BAA2BH;IACvD,OAAOI,IAAAA,iCAAoB,EAACJ;AAChC;AACAL,MAAMU,WAAW,GAAG"}
1
+ {"version":3,"sources":["Radio.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { RadioProps } from './Radio.types';\nimport { renderRadio_unstable } from './renderRadio';\nimport { useRadio_unstable } from './useRadio';\nimport { useRadioStyles_unstable } from './useRadioStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Radio component is a wrapper for a radio button with a label.\n */\nexport const Radio: ForwardRefComponent<RadioProps> = React.forwardRef((props, ref) => {\n const state = useRadio_unstable(props, ref);\n\n useRadioStyles_unstable(state);\n\n useCustomStyleHook_unstable('useRadioStyles_unstable')(state);\n\n return renderRadio_unstable(state);\n});\n\nRadio.displayName = 'Radio';\n"],"names":["Radio","React","forwardRef","props","ref","state","useRadio_unstable","useRadioStyles_unstable","useCustomStyleHook_unstable","renderRadio_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;6BAGc;0BACH;sCACM;qCACI;AAKrC,MAAMA,QAAAA,WAAAA,GAAyCC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7E,MAAMC,QAAQC,IAAAA,2BAAAA,EAAkBH,OAAOC;IAEvCG,IAAAA,6CAAAA,EAAwBF;IAExBG,IAAAA,gDAAAA,EAA4B,2BAA2BH;IAEvD,OAAOI,IAAAA,iCAAAA,EAAqBJ;AAC9B;AAEAL,MAAMU,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Radio.types.js"],"sourcesContent":["import * as React from 'react';\n"],"names":[],"mappings":";;;;;iEAAuB"}
1
+ {"version":3,"sources":["Radio.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { Label } from '@fluentui/react-label';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type RadioSlots = {\n /**\n * The root element of the Radio.\n *\n * The root slot receives the `className` and `style` specified directly on the `<Radio>`.\n * All other native props will be applied to the primary slot: `input`\n */\n root: NonNullable<Slot<'span'>>;\n\n /**\n * The Radio's label.\n */\n label: Slot<typeof Label>;\n\n /**\n * Hidden input that handles the radio's functionality.\n *\n * This is the PRIMARY slot: all native properties specified directly on `<Radio>` will be applied to this slot,\n * except `className` and `style`, which remain on the root slot.\n */\n input: NonNullable<Slot<'input'>>;\n\n /**\n * A circle outline, with a filled circle icon inside when the Radio is checked.\n */\n indicator: NonNullable<Slot<'div'>>;\n};\n\n/**\n * Radio Props\n */\nexport type RadioProps = Omit<ComponentProps<Partial<RadioSlots>, 'input'>, 'onChange' | 'size'> & {\n /**\n * The value of the RadioGroup when this Radio item is selected.\n */\n value?: string;\n\n /**\n * The position of the label relative to the radio indicator.\n *\n * This defaults to `after` unless the Radio is inside a RadioGroup with `layout=\"horizontalStacked\"`,\n * in which case it defaults to `below`.\n *\n * @defaultvalue after\n */\n labelPosition?: 'after' | 'below';\n\n /**\n * Disable this Radio item.\n */\n disabled?: boolean;\n\n /**\n * Callback when this Radio is selected in its group.\n *\n * **Note:** `onChange` is NOT called when this Radio is deselected.\n * Use RadioGroup's `onChange` event to determine when the selection in the group changes.\n */\n // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onChange?: (ev: React.ChangeEvent<HTMLInputElement>, data: RadioOnChangeData) => void;\n};\n\n/**\n * Data for the onChange event for Radio.\n */\nexport type RadioOnChangeData = {\n /**\n * The value prop of this Radio item.\n */\n value: string;\n};\n\n/**\n * State used in rendering Radio\n */\nexport type RadioState = ComponentState<RadioSlots> & Required<Pick<RadioProps, 'labelPosition'>>;\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './Radio';\nexport * from './Radio.types';\nexport * from './renderRadio';\nexport * from './useRadio';\nexport * from './useRadioStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Radio';\nexport * from './Radio.types';\nexport * from './renderRadio';\nexport * from './useRadio';\nexport * from './useRadioStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderRadio.js"],"sourcesContent":[" import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of Radio\n */ export const renderRadio_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsxs(state.root, {\n children: [\n /*#__PURE__*/ _jsx(state.input, {}),\n /*#__PURE__*/ _jsx(state.indicator, {}),\n state.label && /*#__PURE__*/ _jsx(state.label, {})\n ]\n });\n};\n"],"names":["renderRadio_unstable","state","assertSlots","_jsxs","root","children","_jsx","input","indicator","label"],"mappings":";;;;+BAIiBA;;;eAAAA;;;4BAJ4B;gCACjB;AAGjB,MAAMA,uBAAuB,CAACC;IACrCC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,gBAAK,EAACF,MAAMG,IAAI,EAAE;QACnCC,UAAU;YACN,WAAW,GAAGC,IAAAA,eAAI,EAACL,MAAMM,KAAK,EAAE,CAAC;YACjC,WAAW,GAAGD,IAAAA,eAAI,EAACL,MAAMO,SAAS,EAAE,CAAC;YACrCP,MAAMQ,KAAK,IAAI,WAAW,GAAGH,IAAAA,eAAI,EAACL,MAAMQ,KAAK,EAAE,CAAC;SACnD;IACL;AACJ"}
1
+ {"version":3,"sources":["renderRadio.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { RadioSlots, RadioState } from './Radio.types';\n\n/**\n * Render the final JSX of Radio\n */\nexport const renderRadio_unstable = (state: RadioState) => {\n assertSlots<RadioSlots>(state);\n\n return (\n <state.root>\n <state.input />\n <state.indicator />\n {state.label && <state.label />}\n </state.root>\n );\n};\n"],"names":["renderRadio_unstable","state","assertSlots","_jsxs","root","_jsx","input","indicator","label"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAE4B;AAMrB,MAAMA,uBAAuB,CAACC;IACnCC,IAAAA,2BAAAA,EAAwBD;IAExB,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;0BACTC,IAAAA,eAAA,EAACJ,MAAMK,KAAK,EAAA,CAAA;0BACZD,IAAAA,eAAA,EAACJ,MAAMM,SAAS,EAAA,CAAA;YACfN,MAAMO,KAAK,IAAA,WAAA,GAAIH,IAAAA,eAAA,EAACJ,MAAMO,KAAK,EAAA,CAAA;;;AAGlC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useRadio.js"],"sourcesContent":["import * as React from 'react';\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)=>onChange === null || onChange === void 0 ? void 0 : onChange(ev, {\n value: ev.currentTarget.value\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 },\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","currentTarget","label","optional","htmlFor","Label","indicator","components"],"mappings":";;;;+BAaiBA;;;eAAAA;;;;iEAbM;4BACD;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,KAAKjB,aAAa,QAAQA,aAAa,KAAK,IAAI,KAAK,IAAIA,SAASiB,IAAI;YAC/G1B,OAAO0B,GAAGC,aAAa,CAAC3B,KAAK;QACjC;IACJ,MAAM4B,QAAQb,oBAAI,CAACc,QAAQ,CAACnC,MAAMkC,KAAK,EAAE;QACrCX,cAAc;YACVa,SAASV,MAAME,EAAE;YACjBhB,UAAUc,MAAMd,QAAQ;QAC5B;QACAa,aAAaY,iBAAK;IACtB;IACA,MAAMC,YAAYjB,oBAAI,CAACC,MAAM,CAACtB,MAAMsC,SAAS,EAAE;QAC3Cf,cAAc;YACV,eAAe;QACnB;QACAE,aAAa;IACjB;IACA,OAAO;QACHf;QACA6B,YAAY;YACRnB,MAAM;YACNM,OAAO;YACPQ,OAAOG,iBAAK;YACZC,WAAW;QACf;QACAlB;QACAM;QACAQ;QACAI;IACJ;AACJ"}
1
+ {"version":3,"sources":["useRadio.tsx"],"sourcesContent":["import * as React from 'react';\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';\nimport type { RadioProps, RadioState } from './Radio.types';\n\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 */\nexport const useRadio_unstable = (props: RadioProps, ref: React.Ref<HTMLInputElement>): RadioState => {\n const group = useRadioGroupContextValue_unstable();\n\n const {\n name = group.name,\n checked = group.value !== undefined ? group.value === props.value : undefined,\n defaultChecked = group.defaultValue !== undefined ? group.defaultValue === props.value : undefined,\n labelPosition = group.layout === 'horizontal-stacked' ? 'below' : 'after',\n disabled = group.disabled,\n required = group.required,\n 'aria-describedby': ariaDescribedBy = group['aria-describedby'],\n onChange,\n } = props;\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['checked', 'defaultChecked', 'onChange'],\n });\n\n const root = slot.always(props.root, {\n defaultProps: {\n ref: useFocusWithin<HTMLSpanElement>(),\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 => onChange?.(ev, { value: ev.currentTarget.value }));\n const label = slot.optional(props.label, {\n defaultProps: { htmlFor: input.id, disabled: input.disabled },\n elementType: Label,\n });\n const indicator = slot.always(props.indicator, {\n defaultProps: { 'aria-hidden': true },\n elementType: 'div',\n });\n return {\n labelPosition,\n components: { root: 'span', input: 'input', label: Label, indicator: 'div' },\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","currentTarget","label","optional","htmlFor","Label","indicator","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAgBaA;;;eAAAA;;;;iEAhBU;4BACD;gCACiD;mCACpB;8BACpB;AAYxB,MAAMA,oBAAoB,CAACC,OAAmBC;IACnD,MAAMC,QAAQC,IAAAA,qDAAAA;IAEd,MAAM,EACJC,OAAOF,MAAME,IAAI,EACjBC,UAAUH,MAAMI,KAAK,KAAKC,YAAYL,MAAMI,KAAK,KAAKN,MAAMM,KAAK,GAAGC,SAAS,EAC7EC,iBAAiBN,MAAMO,YAAY,KAAKF,YAAYL,MAAMO,YAAY,KAAKT,MAAMM,KAAK,GAAGC,SAAS,EAClGG,gBAAgBR,MAAMS,MAAM,KAAK,uBAAuB,UAAU,OAAO,EACzEC,WAAWV,MAAMU,QAAQ,EACzBC,WAAWX,MAAMW,QAAQ,EACzB,oBAAoBC,kBAAkBZ,KAAK,CAAC,mBAAmB,EAC/Da,QAAQ,EACT,GAAGf;IAEJ,MAAMgB,cAAcC,IAAAA,yCAAAA,EAA0B;QAC5CjB;QACAkB,oBAAoB;QACpBC,mBAAmB;YAAC;YAAW;YAAkB;SAAW;IAC9D;IAEA,MAAMC,OAAOC,oBAAAA,CAAKC,MAAM,CAACtB,MAAMoB,IAAI,EAAE;QACnCG,cAAc;YACZtB,KAAKuB,IAAAA,4BAAAA;YACL,GAAGR,YAAYI,IAAI;QACrB;QACAK,aAAa;IACf;IACA,MAAMC,QAAQL,oBAAAA,CAAKC,MAAM,CAACtB,MAAM0B,KAAK,EAAE;QACrCH,cAAc;YACZtB;YACA0B,MAAM;YACNC,IAAIC,IAAAA,qBAAAA,EAAM,UAAUb,YAAYc,OAAO,CAACF,EAAE;YAC1CxB;YACAC;YACAG;YACAI;YACAC;YACA,oBAAoBC;YACpB,GAAGE,YAAYc,OAAO;QACxB;QACAL,aAAa;IACf;IACAC,MAAMX,QAAQ,GAAGgB,IAAAA,8BAAAA,EAAeL,MAAMX,QAAQ,EAAEiB,CAAAA,KAAMjB,aAAAA,QAAAA,aAAAA,KAAAA,IAAAA,KAAAA,IAAAA,SAAWiB,IAAI;YAAE1B,OAAO0B,GAAGC,aAAa,CAAC3B,KAAK;QAAC;IACrG,MAAM4B,QAAQb,oBAAAA,CAAKc,QAAQ,CAACnC,MAAMkC,KAAK,EAAE;QACvCX,cAAc;YAAEa,SAASV,MAAME,EAAE;YAAEhB,UAAUc,MAAMd,QAAQ;QAAC;QAC5Da,aAAaY,iBAAAA;IACf;IACA,MAAMC,YAAYjB,oBAAAA,CAAKC,MAAM,CAACtB,MAAMsC,SAAS,EAAE;QAC7Cf,cAAc;YAAE,eAAe;QAAK;QACpCE,aAAa;IACf;IACA,OAAO;QACLf;QACA6B,YAAY;YAAEnB,MAAM;YAAQM,OAAO;YAASQ,OAAOG,iBAAAA;YAAOC,WAAW;QAAM;QAC3ElB;QACAM;QACAQ;QACAI;IACF;AACF"}
@@ -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 } 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(\"r1siqwd8\", \"rmnplyc\", {\n r: [\".r1siqwd8{display:inline-flex;position:relative;}\", \".r1siqwd8:focus{outline-style:none;}\", \".r1siqwd8:focus-visible{outline-style:none;}\", \".r1siqwd8[data-fui-focus-within]:focus-within{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}\", \".r1siqwd8[data-fui-focus-within]:focus-within::after{content:\\\"\\\";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}\", \".rmnplyc{display:inline-flex;position:relative;}\", \".rmnplyc:focus{outline-style:none;}\", \".rmnplyc:focus-visible{outline-style:none;}\", \".rmnplyc[data-fui-focus-within]:focus-within{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}\", \".rmnplyc[data-fui-focus-within]:focus-within::after{content:\\\"\\\";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}\"],\n s: [\"@media (forced-colors: active){.r1siqwd8[data-fui-focus-within]:focus-within::after{border-top-color:Highlight;border-right-color:Highlight;border-bottom-color:Highlight;border-left-color:Highlight;}}\", \"@media (forced-colors: active){.rmnplyc[data-fui-focus-within]:focus-within::after{border-top-color:Highlight;border-left-color:Highlight;border-bottom-color:Highlight;border-right-color:Highlight;}}\"]\n});\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(\"rg1upok\", \"rzwdzb4\", {\n r: [\".rg1upok{position:absolute;left:0;top:0;width:calc(16px + 2 * var(--spacingHorizontalS));height:100%;box-sizing:border-box;margin:0;opacity:0;}\", \".rg1upok:enabled{cursor:pointer;}\", \".rg1upok:enabled~.fui-Radio__label{cursor:pointer;}\", \".rg1upok:enabled:not(:checked)~.fui-Radio__label{color:var(--colorNeutralForeground3);}\", \".rg1upok:enabled:not(:checked)~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessible);}\", \".rg1upok:enabled:not(:checked):hover~.fui-Radio__label{color:var(--colorNeutralForeground2);}\", \".rg1upok:enabled:not(:checked):hover~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessibleHover);}\", \".rg1upok:enabled:not(:checked):hover:active~.fui-Radio__label{color:var(--colorNeutralForeground1);}\", \".rg1upok:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessiblePressed);}\", \".rg1upok:enabled:checked~.fui-Radio__label{color:var(--colorNeutralForeground1);}\", \".rg1upok:enabled:checked~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStroke);color:var(--colorCompoundBrandForeground1);}\", \".rg1upok:enabled:checked:hover~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokeHover);color:var(--colorCompoundBrandForeground1Hover);}\", \".rg1upok:enabled:checked:hover:active~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokePressed);color:var(--colorCompoundBrandForeground1Pressed);}\", \".rg1upok:disabled~.fui-Radio__label{color:var(--colorNeutralForegroundDisabled);cursor:default;}\", \".rg1upok:disabled~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeDisabled);color:var(--colorNeutralForegroundDisabled);}\", \".rzwdzb4{position:absolute;right:0;top:0;width:calc(16px + 2 * var(--spacingHorizontalS));height:100%;box-sizing:border-box;margin:0;opacity:0;}\", \".rzwdzb4:enabled{cursor:pointer;}\", \".rzwdzb4:enabled~.fui-Radio__label{cursor:pointer;}\", \".rzwdzb4:enabled:not(:checked)~.fui-Radio__label{color:var(--colorNeutralForeground3);}\", \".rzwdzb4:enabled:not(:checked)~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessible);}\", \".rzwdzb4:enabled:not(:checked):hover~.fui-Radio__label{color:var(--colorNeutralForeground2);}\", \".rzwdzb4:enabled:not(:checked):hover~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessibleHover);}\", \".rzwdzb4:enabled:not(:checked):hover:active~.fui-Radio__label{color:var(--colorNeutralForeground1);}\", \".rzwdzb4:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessiblePressed);}\", \".rzwdzb4:enabled:checked~.fui-Radio__label{color:var(--colorNeutralForeground1);}\", \".rzwdzb4:enabled:checked~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStroke);color:var(--colorCompoundBrandForeground1);}\", \".rzwdzb4:enabled:checked:hover~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokeHover);color:var(--colorCompoundBrandForeground1Hover);}\", \".rzwdzb4:enabled:checked:hover:active~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokePressed);color:var(--colorCompoundBrandForeground1Pressed);}\", \".rzwdzb4:disabled~.fui-Radio__label{color:var(--colorNeutralForegroundDisabled);cursor:default;}\", \".rzwdzb4:disabled~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeDisabled);color:var(--colorNeutralForegroundDisabled);}\"],\n s: [\"@media (forced-colors: active){.rg1upok:enabled:not(:checked)~.fui-Radio__indicator{border-color:ButtonBorder;}}\", \"@media (forced-colors: active){.rg1upok:enabled:checked~.fui-Radio__indicator{border-color:Highlight;color:Highlight;}.rg1upok:enabled:checked~.fui-Radio__indicator::after{background-color:Highlight;}}\", \"@media (forced-colors: active){.rg1upok:disabled~.fui-Radio__label{color:GrayText;}}\", \"@media (forced-colors: active){.rg1upok:disabled~.fui-Radio__indicator{border-color:GrayText;color:GrayText;}.rg1upok:disabled~.fui-Radio__indicator::after{background-color:GrayText;}}\", \"@media (forced-colors: active){.rzwdzb4:enabled:not(:checked)~.fui-Radio__indicator{border-color:ButtonBorder;}}\", \"@media (forced-colors: active){.rzwdzb4:enabled:checked~.fui-Radio__indicator{border-color:Highlight;color:Highlight;}.rzwdzb4:enabled:checked~.fui-Radio__indicator::after{background-color:Highlight;}}\", \"@media (forced-colors: active){.rzwdzb4:disabled~.fui-Radio__label{color:GrayText;}}\", \"@media (forced-colors: active){.rzwdzb4:disabled~.fui-Radio__indicator{border-color:GrayText;color:GrayText;}.rzwdzb4:disabled~.fui-Radio__indicator::after{background-color:GrayText;}}\"]\n});\nconst useInputStyles = /*#__PURE__*/__styles({\n below: {\n a9b677: \"fly5x3f\",\n Bqenvij: \"f1je6zif\"\n },\n defaultIndicator: {\n Blbys7f: \"f9ma1gx\"\n },\n customIndicator: {\n Bj53wkj: \"f12zxao0\"\n }\n}, {\n d: [\".fly5x3f{width:100%;}\", \".f1je6zif{height:calc(16px + 2 * var(--spacingVerticalS));}\", \".f9ma1gx:checked~.fui-Radio__indicator::after{content:\\\"\\\";}\", \".f12zxao0:not(:checked)~.fui-Radio__indicator>*{opacity:0;}\"]\n});\nconst useIndicatorBaseClassName = /*#__PURE__*/__resetStyles(\"rwtekvw\", null, [\".rwtekvw{position:relative;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;}\", \".rwtekvw::after{position:absolute;width:16px;height:16px;border-radius:var(--borderRadiusCircular);transform:scale(0.625);background-color:currentColor;}\"]);\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 Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: \"f1f5q0n8\"\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;}\", [\".f1f5q0n8{padding:var(--spacingVerticalS) var(--spacingHorizontalS);}\", {\n p: -1\n }], \".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 'use no memo';\n\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.indicator.children ? inputStyles.customIndicator : inputStyles.defaultIndicator, 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 return state;\n};\n//# sourceMappingURL=useRadioStyles.styles.js.map"],"names":["radioClassNames","useRadioStyles_unstable","root","indicator","input","label","indicatorSize","useRootBaseClassName","__resetStyles","r","s","useRootStyles","__styles","vertical","Beiy3e4","Bt984gj","d","useInputBaseClassName","useInputStyles","below","a9b677","Bqenvij","defaultIndicator","Blbys7f","customIndicator","Bj53wkj","useIndicatorBaseClassName","useLabelStyles","base","qb2dma","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","after","B6of3ja","jrapky","fsow6f","p","state","labelPosition","rootBaseClassName","rootStyles","className","mergeClasses","inputBaseClassName","inputStyles","children","indicatorBaseClassName","labelStyles"],"mappings":";;;;;;;;;;;IAGaA,eAAe;eAAfA;;IAkEAC,uBAAuB;eAAvBA;;;uBAnEyC;AAC/C,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,WAAW;IAC7EC,GAAG;QAAC;QAAqD;QAAwC;QAAgD;QAA6K;QAA2R;QAAoD;QAAuC;QAA+C;QAA4K;KAAyR;IACxqCC,GAAG;QAAC;QAA4M;KAA0M;AAC5Z;AACA,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,GAAET,IAAAA,oBAAa,EAAC,WAAW,WAAW;IAC7EC,GAAG;QAAC;QAAmJ;QAAqC;QAAuD;QAA2F;QAA2G;QAAiG;QAAsH;QAAwG;QAA+H;QAAqF;QAA4I;QAA4J;QAAuK;QAAoG;QAAwI;QAAoJ;QAAqC;QAAuD;QAA2F;QAA2G;QAAiG;QAAsH;QAAwG;QAA+H;QAAqF;QAA4I;QAA4J;QAAuK;QAAoG;KAAuI;IAC1wGC,GAAG;QAAC;QAAoH;QAA6M;QAAwF;QAA4L;QAAoH;QAA6M;QAAwF;KAA2L;AAC/qC;AACA,MAAMQ,iBAAiB,WAAW,GAAEN,IAAAA,eAAQ,EAAC;IAC3CO,OAAO;QACLC,QAAQ;QACRC,SAAS;IACX;IACAC,kBAAkB;QAChBC,SAAS;IACX;IACAC,iBAAiB;QACfC,SAAS;IACX;AACF,GAAG;IACDT,GAAG;QAAC;QAAyB;QAA+D;QAAgE;KAA8D;AAC5N;AACA,MAAMU,4BAA4B,WAAW,GAAElB,IAAAA,oBAAa,EAAC,WAAW,MAAM;IAAC;IAA8V;CAA4J;AACzkB,mGAAmG;AACnG,MAAMmB,iBAAiB,WAAW,GAAEf,IAAAA,eAAQ,EAAC;IAC3CgB,MAAM;QACJC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;IACX;IACAC,OAAO;QACLJ,QAAQ;YAAC;YAAW;SAAU;QAC9BK,SAAS;QACTC,QAAQ;IACV;IACAlB,OAAO;QACLc,QAAQ;QACRK,QAAQ;IACV;AACF,GAAG;IACDtB,GAAG;QAAC;QAAgC;YAAC;YAAyE;gBAC5GuB,GAAG,CAAC;YACN;SAAE;QAAE;QAAsD;QAAuD;QAAqE;QAAwE;QAAoD;KAAgC;AACpV;AAIO,MAAMtC,0BAA0BuC,CAAAA;IACrC;IAEA,MAAM,EACJC,aAAa,EACd,GAAGD;IACJ,MAAME,oBAAoBnC;IAC1B,MAAMoC,aAAahC;IACnB6B,MAAMtC,IAAI,CAAC0C,SAAS,GAAGC,IAAAA,mBAAY,EAAC7C,gBAAgBE,IAAI,EAAEwC,mBAAmBD,kBAAkB,WAAWE,WAAW9B,QAAQ,EAAE2B,MAAMtC,IAAI,CAAC0C,SAAS;IACnJ,MAAME,qBAAqB7B;IAC3B,MAAM8B,cAAc7B;IACpBsB,MAAMpC,KAAK,CAACwC,SAAS,GAAGC,IAAAA,mBAAY,EAAC7C,gBAAgBI,KAAK,EAAE0C,oBAAoBL,kBAAkB,WAAWM,YAAY5B,KAAK,EAAEqB,MAAMrC,SAAS,CAAC6C,QAAQ,GAAGD,YAAYvB,eAAe,GAAGuB,YAAYzB,gBAAgB,EAAEkB,MAAMpC,KAAK,CAACwC,SAAS;IAC5O,MAAMK,yBAAyBvB;IAC/Bc,MAAMrC,SAAS,CAACyC,SAAS,GAAGC,IAAAA,mBAAY,EAAC7C,gBAAgBG,SAAS,EAAE8C,wBAAwBT,MAAMrC,SAAS,CAACyC,SAAS;IACrH,MAAMM,cAAcvB;IACpB,IAAIa,MAAMnC,KAAK,EAAE;QACfmC,MAAMnC,KAAK,CAACuC,SAAS,GAAGC,IAAAA,mBAAY,EAAC7C,gBAAgBK,KAAK,EAAE6C,YAAYtB,IAAI,EAAEsB,WAAW,CAACT,cAAc,EAAED,MAAMnC,KAAK,CAACuC,SAAS;IACjI;IACA,OAAOJ;AACT,GACA,iDAAiD"}
1
+ {"version":3,"sources":["useRadioStyles.styles.js"],"sourcesContent":["import { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { makeResetStyles, makeStyles, mergeClasses } 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 = makeResetStyles({\n display: 'inline-flex',\n position: 'relative',\n ...createFocusOutlineStyle({\n style: {},\n selector: 'focus-within'\n })\n});\nconst useRootStyles = makeStyles({\n vertical: {\n flexDirection: 'column',\n alignItems: 'center'\n }\n});\nconst useInputBaseClassName = makeResetStyles({\n position: 'absolute',\n left: 0,\n top: 0,\n width: `calc(${indicatorSize} + 2 * ${tokens.spacingHorizontalS})`,\n height: '100%',\n boxSizing: 'border-box',\n margin: 0,\n opacity: 0,\n ':enabled': {\n cursor: 'pointer',\n [`& ~ .${radioClassNames.label}`]: {\n cursor: 'pointer'\n }\n },\n // Colors for the unchecked state\n ':enabled:not(:checked)': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground3\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeAccessible,\n '@media (forced-colors: active)': {\n borderColor: 'ButtonBorder'\n }\n },\n ':hover': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground2\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeAccessibleHover\n }\n },\n ':hover:active': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground1\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeAccessiblePressed\n }\n }\n },\n // Colors for the checked state\n ':enabled:checked': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground1\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorCompoundBrandStroke,\n color: tokens.colorCompoundBrandForeground1,\n '@media (forced-colors: active)': {\n borderColor: 'Highlight',\n color: 'Highlight',\n '::after': {\n backgroundColor: 'Highlight'\n }\n }\n },\n ':hover': {\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorCompoundBrandStrokeHover,\n color: tokens.colorCompoundBrandForeground1Hover\n }\n },\n ':hover:active': {\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorCompoundBrandStrokePressed,\n color: tokens.colorCompoundBrandForeground1Pressed\n }\n }\n },\n // Colors for the disabled state\n ':disabled': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'default',\n '@media (forced-colors: active)': {\n color: 'GrayText'\n }\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeDisabled,\n color: tokens.colorNeutralForegroundDisabled,\n '@media (forced-colors: active)': {\n borderColor: 'GrayText',\n color: 'GrayText',\n '::after': {\n backgroundColor: 'GrayText'\n }\n }\n }\n }\n});\nconst useInputStyles = makeStyles({\n below: {\n width: '100%',\n height: `calc(${indicatorSize} + 2 * ${tokens.spacingVerticalS})`\n },\n // If the indicator has no children, use the ::after pseudo-element for the checked state\n defaultIndicator: {\n [`:checked ~ .${radioClassNames.indicator}::after`]: {\n content: '\"\"'\n }\n },\n // If the indicator has a child, hide it until the radio is checked\n customIndicator: {\n [`:not(:checked) ~ .${radioClassNames.indicator} > *`]: {\n opacity: '0'\n }\n }\n});\nconst useIndicatorBaseClassName = makeResetStyles({\n position: 'relative',\n width: indicatorSize,\n height: indicatorSize,\n fontSize: '12px',\n boxSizing: 'border-box',\n flexShrink: 0,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n overflow: 'hidden',\n border: tokens.strokeWidthThin + ' solid',\n borderRadius: tokens.borderRadiusCircular,\n margin: tokens.spacingVerticalS + ' ' + tokens.spacingHorizontalS,\n fill: 'currentColor',\n pointerEvents: 'none',\n '::after': {\n position: 'absolute',\n width: indicatorSize,\n height: indicatorSize,\n borderRadius: tokens.borderRadiusCircular,\n // Use a transform to avoid pixel rounding errors at 125% DPI\n // https://github.com/microsoft/fluentui/issues/30025\n transform: 'scale(0.625)',\n backgroundColor: 'currentColor'\n }\n});\n// Can't use makeResetStyles here because Label is a component that may itself use makeResetStyles.\nconst useLabelStyles = makeStyles({\n base: {\n alignSelf: 'center',\n padding: `${tokens.spacingVerticalS} ${tokens.spacingHorizontalS}`\n },\n after: {\n paddingLeft: tokens.spacingHorizontalXS,\n // Use a (negative) margin to account for the difference between the indicator's height and the label's line height.\n // This prevents the label from expanding the height of the Radio, but preserves line height if the label wraps.\n marginTop: `calc((${indicatorSize} - ${tokens.lineHeightBase300}) / 2)`,\n marginBottom: `calc((${indicatorSize} - ${tokens.lineHeightBase300}) / 2)`\n },\n below: {\n paddingTop: tokens.spacingVerticalXS,\n textAlign: 'center'\n }\n});\n/**\n * Apply styling to the Radio slots based on the state\n */ export const useRadioStyles_unstable = (state)=>{\n 'use no memo';\n const { labelPosition } = 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.indicator.children ? inputStyles.customIndicator : inputStyles.defaultIndicator, 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 return state;\n};\n"],"names":["radioClassNames","useRadioStyles_unstable","root","indicator","input","label","indicatorSize","useRootBaseClassName","__resetStyles","r","s","useRootStyles","__styles","vertical","Beiy3e4","Bt984gj","d","useInputBaseClassName","useInputStyles","below","a9b677","Bqenvij","defaultIndicator","Blbys7f","customIndicator","Bj53wkj","useIndicatorBaseClassName","useLabelStyles","base","qb2dma","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","after","B6of3ja","jrapky","fsow6f","p","state","labelPosition","rootBaseClassName","rootStyles","className","mergeClasses","inputBaseClassName","inputStyles","children","indicatorBaseClassName","labelStyles"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAGaA,eAAe;eAAfA;;IAqLIC,uBAAuB;eAAvBA;;;uBAtLyC;AACnD,MAAMD,kBAAkB;IAC3BE,MAAM;IACNC,WAAW;IACXC,OAAO;IACPC,OAAO;AACX;AACA,+DAAA;AACA,MAAMC,gBAAgB;AACtB,MAAMC,uBAAoB,WAAA,GAAGC,IAAAA,oBAAA,EAAA,YAAA,WAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;IAAAC,GAAA;QAAA;QAAA;KAAA;AAAA;AAQ7B,MAAMC,gBAAa,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAC,UAAA;QAAAC,SAAA;QAAAC,SAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;KAAA;AAAA;AAMtB,MAAMC,wBAAqB,WAAA,GAAGT,IAAAA,oBAAA,EAAA,WAAA,WAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AA8F9B,MAAMQ,iBAAc,WAAA,GAAGN,IAAAA,eAAA,EAAA;IAAAO,OAAA;QAAAC,QAAA;QAAAC,SAAA;IAAA;IAAAC,kBAAA;QAAAC,SAAA;IAAA;IAAAC,iBAAA;QAAAC,SAAA;IAAA;AAAA,GAAA;IAAAT,GAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAkBvB,MAAMU,4BAAyB,WAAA,GAAGlB,IAAAA,oBAAA,EAAA,WAAA,MAAA;IAAA;IAAA;CA0BjC;AACD,mGAAA;AACA,MAAMmB,iBAAc,WAAA,GAAGf,IAAAA,eAAA,EAAA;IAAAgB,MAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;IAAA;IAAAC,OAAA;QAAAJ,QAAA;YAAA;YAAA;SAAA;QAAAK,SAAA;QAAAC,QAAA;IAAA;IAAAlB,OAAA;QAAAc,QAAA;QAAAK,QAAA;IAAA;AAAA,GAAA;IAAAtB,GAAA;QAAA;QAAA;YAAA;YAAA;gBAAAuB,GAAA,CAAA;YAAA;SAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAmBZ,MAAMtC,0BAA2BuC,CAAAA;IACxC;IACA,MAAM,EAAEC,aAAAA,EAAe,GAAGD;IAC1B,MAAME,oBAAoBnC;IAC1B,MAAMoC,aAAahC;IACnB6B,MAAMtC,IAAI,CAAC0C,SAAS,GAAGC,IAAAA,mBAAY,EAAC7C,gBAAgBE,IAAI,EAAEwC,mBAAmBD,kBAAkB,WAAWE,WAAW9B,QAAQ,EAAE2B,MAAMtC,IAAI,CAAC0C,SAAS;IACnJ,MAAME,qBAAqB7B;IAC3B,MAAM8B,cAAc7B;IACpBsB,MAAMpC,KAAK,CAACwC,SAAS,GAAGC,IAAAA,mBAAY,EAAC7C,gBAAgBI,KAAK,EAAE0C,oBAAoBL,kBAAkB,WAAWM,YAAY5B,KAAK,EAAEqB,MAAMrC,SAAS,CAAC6C,QAAQ,GAAGD,YAAYvB,eAAe,GAAGuB,YAAYzB,gBAAgB,EAAEkB,MAAMpC,KAAK,CAACwC,SAAS;IAC5O,MAAMK,yBAAyBvB;IAC/Bc,MAAMrC,SAAS,CAACyC,SAAS,GAAGC,IAAAA,mBAAY,EAAC7C,gBAAgBG,SAAS,EAAE8C,wBAAwBT,MAAMrC,SAAS,CAACyC,SAAS;IACrH,MAAMM,cAAcvB;IACpB,IAAIa,MAAMnC,KAAK,EAAE;QACbmC,MAAMnC,KAAK,CAACuC,SAAS,GAAGC,IAAAA,mBAAY,EAAC7C,gBAAgBK,KAAK,EAAE6C,YAAYtB,IAAI,EAAEsB,WAAW,CAACT,cAAc,EAAED,MAAMnC,KAAK,CAACuC,SAAS;IACnI;IACA,OAAOJ;AACX"}
@@ -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;;;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"}
1
+ {"version":3,"sources":["RadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { RadioGroupProps } from './RadioGroup.types';\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/**\n * A RadioGroup component presents a set of options where only one option can be selected.\n */\nexport const RadioGroup: ForwardRefComponent<RadioGroupProps> = React.forwardRef((props, ref) => {\n const state = useRadioGroup_unstable(props, ref);\n const contextValues = useRadioGroupContextValues(state);\n\n useRadioGroupStyles_unstable(state);\n\n useCustomStyleHook_unstable('useRadioGroupStyles_unstable')(state);\n\n return renderRadioGroup_unstable(state, contextValues);\n});\n\nRadioGroup.displayName = 'RadioGroup';\n"],"names":["RadioGroup","React","forwardRef","props","ref","state","useRadioGroup_unstable","contextValues","useRadioGroupContextValues","useRadioGroupStyles_unstable","useCustomStyleHook_unstable","renderRadioGroup_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;kCAGmB;+BACH;2CACM;4CACF;qCACC;AAKrC,MAAMA,aAAAA,WAAAA,GAAmDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQC,IAAAA,qCAAAA,EAAuBH,OAAOC;IAC5C,MAAMG,gBAAgBC,IAAAA,sDAAAA,EAA2BH;IAEjDI,IAAAA,uDAAAA,EAA6BJ;IAE7BK,IAAAA,gDAAAA,EAA4B,gCAAgCL;IAE5D,OAAOM,IAAAA,2CAAAA,EAA0BN,OAAOE;AAC1C;AAEAP,WAAWY,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["RadioGroup.types.js"],"sourcesContent":["import * as React from 'react';\n"],"names":[],"mappings":";;;;;iEAAuB"}
1
+ {"version":3,"sources":["RadioGroup.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type RadioGroupSlots = {\n /**\n * The radio group root.\n */\n root: NonNullable<Slot<'div'>>;\n};\n\nexport type RadioGroupProps = Omit<ComponentProps<Partial<RadioGroupSlots>>, 'onChange'> & {\n /**\n * The name of this radio group. This name is applied to all Radio items inside this group.\n *\n * If no name is provided, one will be generated so that all of the Radio items have the same name.\n */\n name?: string;\n\n /**\n * The selected Radio item in this group.\n *\n * This should be the `value` prop of one of the Radio items inside this group.\n */\n value?: string;\n\n /**\n * The default selected Radio item in this group.\n *\n * This should be the `value` prop of one of the Radio items inside this group.\n */\n defaultValue?: string;\n\n /**\n * Callback when the selected Radio item changes.\n */\n // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onChange?: (ev: React.FormEvent<HTMLDivElement>, data: RadioGroupOnChangeData) => void;\n\n /**\n * How the radio items are laid out in the group.\n *\n * @default vertical\n */\n layout?: 'vertical' | 'horizontal' | 'horizontal-stacked';\n\n /**\n * Disable all Radio items in this group.\n */\n disabled?: boolean;\n\n /**\n * Require a selection in this group. Adds the `required` prop to all child Radio items.\n */\n required?: boolean;\n};\n\n/**\n * Data for the onChange event for RadioGroup.\n */\nexport type RadioGroupOnChangeData = {\n /**\n * The value of the newly selected Radio item.\n */\n value: string;\n};\n\n/**\n * State used in rendering RadioGroup\n */\nexport type RadioGroupState = ComponentState<RadioGroupSlots> &\n Required<Pick<RadioGroupProps, 'layout'>> &\n Pick<RadioGroupProps, 'name' | 'value' | 'defaultValue' | 'disabled' | 'layout' | 'required'>;\n\nexport type RadioGroupContextValue = Pick<\n RadioGroupProps,\n 'name' | 'value' | 'defaultValue' | 'disabled' | 'layout' | 'required' | 'aria-describedby'\n>;\n\nexport type RadioGroupContextValues = {\n radioGroup: RadioGroupContextValue;\n};\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
@@ -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":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './RadioGroup';\nexport * from './RadioGroup.types';\nexport * from './renderRadioGroup';\nexport * from './useRadioGroup';\nexport * from './useRadioGroupStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderRadioGroup.js"],"sourcesContent":[" 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":";;;;+BAKiBA;;;eAAAA;;;4BALa;gCACF;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"}
1
+ {"version":3,"sources":["renderRadioGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { RadioGroupContext } from '../../contexts/RadioGroupContext';\nimport { RadioGroupContextValues, RadioGroupSlots, RadioGroupState } from './RadioGroup.types';\n\n/**\n * Render the final JSX of RadioGroup\n */\nexport const renderRadioGroup_unstable = (state: RadioGroupState, contextValues: RadioGroupContextValues) => {\n assertSlots<RadioGroupSlots>(state);\n\n return (\n <RadioGroupContext.Provider value={contextValues.radioGroup}>\n <state.root />\n </RadioGroupContext.Provider>\n );\n};\n"],"names":["renderRadioGroup_unstable","state","contextValues","assertSlots","_jsx","RadioGroupContext","Provider","value","radioGroup","root"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUaA;;;eAAAA;;;4BATb;gCAE4B;mCACM;AAM3B,MAAMA,4BAA4B,CAACC,OAAwBC;IAChEC,IAAAA,2BAAAA,EAA6BF;IAE7B,OAAA,WAAA,GACEG,IAAAA,eAAA,EAACC,oCAAAA,CAAkBC,QAAQ,EAAA;QAACC,OAAOL,cAAcM,UAAU;kBACzD,WAAA,GAAAJ,IAAAA,eAAA,EAACH,MAAMQ,IAAI,EAAA,CAAA;;AAGjB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useRadioGroup.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getIntrinsicElementProps, 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(getIntrinsicElementProps('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","getIntrinsicElementProps","elementType","useEventCallback","ev","isHTMLElement","target","constructorName","type"],"mappings":";;;;+BAWiBA;;;eAAAA;;;;iEAXM;4BACuB;gCACyC;AAS5E,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,wCAAwB,EAAC,OAAOjB,OAAO,oBAAoB,GAAG;gBACzE;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"}
1
+ {"version":3,"sources":["useRadioGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getIntrinsicElementProps, isHTMLElement, useEventCallback, useId, slot } from '@fluentui/react-utilities';\nimport { RadioGroupProps, RadioGroupState } from './RadioGroup.types';\n\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 */\nexport const useRadioGroup_unstable = (props: RadioGroupProps, ref: React.Ref<HTMLDivElement>): RadioGroupState => {\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props);\n\n const generatedName = useId('radiogroup-');\n\n const { name = generatedName, value, defaultValue, disabled, layout = 'vertical', onChange, required } = props;\n\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(getIntrinsicElementProps('div', props, /*excludedPropNames:*/ ['onChange', 'name']), {\n elementType: 'div',\n }),\n onChange: useEventCallback(ev => {\n if (\n onChange &&\n isHTMLElement(ev.target, { constructorName: 'HTMLInputElement' }) &&\n ev.target.type === 'radio'\n ) {\n onChange(ev, { value: ev.target.value });\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","getIntrinsicElementProps","elementType","useEventCallback","ev","isHTMLElement","target","constructorName","type"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAcaA;;;eAAAA;;;;iEAdU;4BACuB;gCACyC;AAYhF,MAAMA,yBAAyB,CAACC,OAAwBC;IAC7D,+CAA+C;IAC/CD,QAAQE,IAAAA,yCAAAA,EAA8BF;IAEtC,MAAMG,gBAAgBC,IAAAA,qBAAAA,EAAM;IAE5B,MAAM,EAAEC,OAAOF,aAAa,EAAEG,KAAK,EAAEC,YAAY,EAAEC,QAAQ,EAAEC,SAAS,UAAU,EAAEC,QAAQ,EAAEC,QAAQ,EAAE,GAAGX;IAEzG,OAAO;QACLS;QACAJ;QACAC;QACAC;QACAC;QACAG;QACAC,YAAY;YACVC,MAAM;QACR;QACAA,MAAM;YACJZ;YACAa,MAAM;YACN,GAAGC,oBAAAA,CAAKC,MAAM,CAACC,IAAAA,wCAAAA,EAAyB,OAAOjB,OAAO,oBAAoB,GAAG;gBAAC;gBAAY;aAAO,GAAG;gBAClGkB,aAAa;YACf,EAAE;YACFR,UAAUS,IAAAA,gCAAAA,EAAiBC,CAAAA;gBACzB,IACEV,YACAW,IAAAA,6BAAAA,EAAcD,GAAGE,MAAM,EAAE;oBAAEC,iBAAiB;gBAAmB,MAC/DH,GAAGE,MAAM,CAACE,IAAI,KAAK,SACnB;oBACAd,SAASU,IAAI;wBAAEd,OAAOc,GAAGE,MAAM,CAAChB,KAAK;oBAAC;gBACxC;YACF;QACF;IACF;AACF"}
@@ -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 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(radioGroupClassNames.root, styles.root, state.layout === 'vertical' && styles.vertical, state.root.className);\n return state;\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;IAEA,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;IAChJ,OAAOF;AACT,GACA,sDAAsD"}
1
+ {"version":3,"sources":["useRadioGroupStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nexport const radioGroupClassNames = {\n root: 'fui-RadioGroup'\n};\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'flex-start'\n },\n vertical: {\n flexDirection: 'column'\n }\n});\n/**\n * Apply styling to the RadioGroup slots based on the state\n */ export const useRadioGroupStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n state.root.className = mergeClasses(radioGroupClassNames.root, styles.root, state.layout === 'vertical' && styles.vertical, state.root.className);\n return state;\n};\n"],"names":["radioGroupClassNames","useRadioGroupStyles_unstable","root","useStyles","__styles","mc9l5x","Bt984gj","vertical","Beiy3e4","d","state","styles","className","mergeClasses","layout"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACaA,oBAAoB;eAApBA;;IAcIC,4BAA4B;eAA5BA;;;uBAfwB;AAClC,MAAMD,uBAAuB;IAChCE,MAAM;AACV;AACA,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAF,MAAA;QAAAG,QAAA;QAAAC,SAAA;IAAA;IAAAC,UAAA;QAAAC,SAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAWP,MAAMR,+BAAgCS,CAAAA;IAC7C;IACA,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;IAChJ,OAAOF;AACX"}
@@ -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;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"}
1
+ {"version":3,"sources":["RadioGroupContext.ts"],"sourcesContent":["import * as React from 'react';\n\nimport type { RadioGroupContextValue } from '../RadioGroup';\n\n/**\n * RadioGroupContext is provided by RadioGroup, and is consumed by Radio to determine default values of some props.\n */\nexport const RadioGroupContext = React.createContext<RadioGroupContextValue | undefined>(undefined);\n\nconst radioGroupContextDefaultValue: RadioGroupContextValue = {};\n\nexport const RadioGroupProvider = RadioGroupContext.Provider;\n\n/**\n * Get the value of the RadioGroupContext.\n */\nexport const useRadioGroupContextValue_unstable = () =>\n React.useContext(RadioGroupContext) || radioGroupContextDefaultValue;\n\n/**\n * @deprecated Use useRadioGroupContextValue_unstable instead.\n * RadioGroupContext is no longer a selector context, and no longer benefits from having a selector.\n */\nexport const useRadioGroupContext_unstable = <T>(selector: (ctx: RadioGroupContextValue) => T): T =>\n selector(useRadioGroupContextValue_unstable());\n"],"names":["RadioGroupContext","RadioGroupProvider","useRadioGroupContextValue_unstable","useRadioGroupContext_unstable","React","createContext","undefined","radioGroupContextDefaultValue","Provider","useContext","selector"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAOaA,iBAAAA;eAAAA;;IAIAC,kBAAAA;eAAAA;;IAKAC,kCAAAA;eAAAA;;IAOAC,6BAAAA;eAAAA;;;;iEAvBU;AAOhB,MAAMH,kCAAoBI,OAAMC,aAAa,CAAqCC;AAEzF,MAAMC,gCAAwD,CAAC;AAExD,MAAMN,qBAAqBD,kBAAkBQ,QAAQ;AAKrD,MAAMN,qCAAqC,IAChDE,OAAMK,UAAU,CAACT,sBAAsBO;AAMlC,MAAMJ,gCAAgC,CAAIO,WAC/CA,SAASR"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './RadioGroupContext';\nexport * from './useRadioGroupContextValues';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './RadioGroupContext';\nexport * from './useRadioGroupContextValues';\n"],"names":[],"rangeMappings":";;;;;;","mappings":";;;;;uBAAc;uBACA"}
@@ -1 +1 @@
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"}
1
+ {"version":3,"sources":["useRadioGroupContextValues.ts"],"sourcesContent":["import * as React from 'react';\n\nimport type { RadioGroupContextValue, RadioGroupContextValues, RadioGroupState } from '../RadioGroup';\n\nexport const useRadioGroupContextValues = (state: RadioGroupState): RadioGroupContextValues => {\n const { name, value, defaultValue, disabled, layout, required } = state;\n const ariaDescribedBy = state.root['aria-describedby'];\n\n const radioGroup = React.useMemo<RadioGroupContextValue>(\n () => ({\n name,\n value,\n defaultValue,\n disabled,\n layout,\n required,\n 'aria-describedby': ariaDescribedBy,\n }),\n [name, value, defaultValue, disabled, layout, required, ariaDescribedBy],\n );\n\n return { radioGroup };\n};\n"],"names":["useRadioGroupContextValues","state","name","value","defaultValue","disabled","layout","required","ariaDescribedBy","root","radioGroup","React","useMemo"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAIaA;;;eAAAA;;;;iEAJU;AAIhB,MAAMA,6BAA6B,CAACC;IACzC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAEC,YAAY,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,QAAQ,EAAE,GAAGN;IAClE,MAAMO,kBAAkBP,MAAMQ,IAAI,CAAC,mBAAmB;IAEtD,MAAMC,aAAaC,OAAMC,OAAO,CAC9B,IAAO,CAAA;YACLV;YACAC;YACAC;YACAC;YACAC;YACAC;YACA,oBAAoBC;QACtB,CAAA,GACA;QAACN;QAAMC;QAAOC;QAAcC;QAAUC;QAAQC;QAAUC;KAAgB;IAG1E,OAAO;QAAEE;IAAW;AACtB"}
@@ -9,47 +9,47 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
+ Radio: function() {
13
+ return _Radio.Radio;
14
+ },
12
15
  RadioGroup: function() {
13
16
  return _RadioGroup.RadioGroup;
14
17
  },
18
+ RadioGroupProvider: function() {
19
+ return _index.RadioGroupProvider;
20
+ },
21
+ radioClassNames: function() {
22
+ return _Radio.radioClassNames;
23
+ },
15
24
  radioGroupClassNames: function() {
16
25
  return _RadioGroup.radioGroupClassNames;
17
26
  },
18
27
  renderRadioGroup_unstable: function() {
19
28
  return _RadioGroup.renderRadioGroup_unstable;
20
29
  },
30
+ renderRadio_unstable: function() {
31
+ return _Radio.renderRadio_unstable;
32
+ },
33
+ useRadioGroupContextValue_unstable: function() {
34
+ return _index.useRadioGroupContextValue_unstable;
35
+ },
36
+ useRadioGroupContextValues: function() {
37
+ return _index.useRadioGroupContextValues;
38
+ },
39
+ useRadioGroupContext_unstable: function() {
40
+ return _index.useRadioGroupContext_unstable;
41
+ },
21
42
  useRadioGroupStyles_unstable: function() {
22
43
  return _RadioGroup.useRadioGroupStyles_unstable;
23
44
  },
24
45
  useRadioGroup_unstable: function() {
25
46
  return _RadioGroup.useRadioGroup_unstable;
26
47
  },
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
48
  useRadioStyles_unstable: function() {
37
49
  return _Radio.useRadioStyles_unstable;
38
50
  },
39
51
  useRadio_unstable: function() {
40
52
  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
53
  }
54
54
  });
55
55
  const _RadioGroup = require("./RadioGroup");
@@ -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;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"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export {\n RadioGroup,\n radioGroupClassNames,\n renderRadioGroup_unstable,\n useRadioGroupStyles_unstable,\n useRadioGroup_unstable,\n} from './RadioGroup';\nexport type {\n RadioGroupContextValue,\n RadioGroupContextValues,\n RadioGroupOnChangeData,\n RadioGroupProps,\n RadioGroupSlots,\n RadioGroupState,\n} from './RadioGroup';\nexport { Radio, radioClassNames, renderRadio_unstable, useRadioStyles_unstable, useRadio_unstable } from './Radio';\nexport type { RadioProps, RadioSlots, RadioState, RadioOnChangeData } from './Radio';\nexport {\n RadioGroupProvider,\n useRadioGroupContextValues,\n useRadioGroupContext_unstable, // eslint-disable-line deprecation/deprecation\n useRadioGroupContextValue_unstable,\n} from './contexts/index';\n"],"names":["Radio","RadioGroup","RadioGroupProvider","radioClassNames","radioGroupClassNames","renderRadioGroup_unstable","renderRadio_unstable","useRadioGroupContextValue_unstable","useRadioGroupContextValues","useRadioGroupContext_unstable","useRadioGroupStyles_unstable","useRadioGroup_unstable","useRadioStyles_unstable","useRadio_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAeSA,KAAK;eAALA,YAAK;;IAdZC,UAAU;eAAVA,sBAAU;;IAiBVC,kBAAkB;eAAlBA,yBAAkB;;IAHJC,eAAe;eAAfA,sBAAe;;IAb7BC,oBAAoB;eAApBA,gCAAoB;;IACpBC,yBAAyB;eAAzBA,qCAAyB;;IAYMC,oBAAoB;eAApBA,2BAAoB;;IAMnDC,kCAAkC;eAAlCA,yCAAkC;;IAFlCC,0BAA0B;eAA1BA,iCAA0B;;IAC1BC,6BAA6B;eAA7BA,oCAA6B;;IAhB7BC,4BAA4B;eAA5BA,wCAA4B;;IAC5BC,sBAAsB;eAAtBA,kCAAsB;;IAU+BC,uBAAuB;eAAvBA,8BAAuB;;IAAEC,iBAAiB;eAAjBA,wBAAiB;;;4BAT1F;uBASkG;uBAOlG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-radio",
3
- "version": "9.2.25",
3
+ "version": "9.2.27",
4
4
  "description": "Fluent UI Radio component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -32,13 +32,13 @@
32
32
  "@fluentui/scripts-tasks": "*"
33
33
  },
34
34
  "dependencies": {
35
- "@fluentui/react-field": "^9.1.69",
36
- "@fluentui/react-jsx-runtime": "^9.0.40",
37
- "@fluentui/react-label": "^9.1.72",
38
- "@fluentui/react-shared-contexts": "^9.19.0",
39
- "@fluentui/react-tabster": "^9.22.1",
35
+ "@fluentui/react-field": "^9.1.71",
36
+ "@fluentui/react-jsx-runtime": "^9.0.42",
37
+ "@fluentui/react-label": "^9.1.74",
38
+ "@fluentui/react-shared-contexts": "^9.20.0",
39
+ "@fluentui/react-tabster": "^9.22.3",
40
40
  "@fluentui/react-theme": "^9.1.19",
41
- "@fluentui/react-utilities": "^9.18.11",
41
+ "@fluentui/react-utilities": "^9.18.13",
42
42
  "@griffel/react": "^1.5.22",
43
43
  "@swc/helpers": "^0.5.1"
44
44
  },