@fluentui/react-radio 9.1.3 → 9.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +115 -1
  3. package/CHANGELOG.md +34 -2
  4. package/lib/Radio.js.map +1 -1
  5. package/lib/RadioGroup.js.map +1 -1
  6. package/lib/RadioGroupField.js.map +1 -1
  7. package/lib/components/Radio/Radio.js.map +1 -1
  8. package/lib/components/Radio/Radio.types.js +1 -1
  9. package/lib/components/Radio/Radio.types.js.map +1 -1
  10. package/lib/components/Radio/index.js.map +1 -1
  11. package/lib/components/Radio/renderRadio.js +1 -9
  12. package/lib/components/Radio/renderRadio.js.map +1 -1
  13. package/lib/components/Radio/useRadio.js +5 -3
  14. package/lib/components/Radio/useRadio.js.map +1 -1
  15. package/lib/components/Radio/useRadioStyles.js.map +1 -1
  16. package/lib/components/RadioGroup/RadioGroup.js.map +1 -1
  17. package/lib/components/RadioGroup/RadioGroup.types.js +1 -1
  18. package/lib/components/RadioGroup/RadioGroup.types.js.map +1 -1
  19. package/lib/components/RadioGroup/index.js.map +1 -1
  20. package/lib/components/RadioGroup/renderRadioGroup.js +1 -3
  21. package/lib/components/RadioGroup/renderRadioGroup.js.map +1 -1
  22. package/lib/components/RadioGroup/useRadioGroup.js +1 -0
  23. package/lib/components/RadioGroup/useRadioGroup.js.map +1 -1
  24. package/lib/components/RadioGroup/useRadioGroupStyles.js.map +1 -1
  25. package/lib/components/RadioGroupField/RadioGroupField.js +1 -2
  26. package/lib/components/RadioGroupField/RadioGroupField.js.map +1 -1
  27. package/lib/components/RadioGroupField/index.js.map +1 -1
  28. package/lib/contexts/RadioGroupContext.js.map +1 -1
  29. package/lib/contexts/index.js.map +1 -1
  30. package/lib/contexts/useRadioGroupContextValues.js.map +1 -1
  31. package/lib/index.js.map +1 -1
  32. package/lib-commonjs/Radio.js +5 -4
  33. package/lib-commonjs/Radio.js.map +1 -1
  34. package/lib-commonjs/RadioGroup.js +5 -4
  35. package/lib-commonjs/RadioGroup.js.map +1 -1
  36. package/lib-commonjs/RadioGroupField.js +5 -4
  37. package/lib-commonjs/RadioGroupField.js.map +1 -1
  38. package/lib-commonjs/components/Radio/Radio.js +19 -20
  39. package/lib-commonjs/components/Radio/Radio.js.map +1 -1
  40. package/lib-commonjs/components/Radio/Radio.types.js +5 -2
  41. package/lib-commonjs/components/Radio/Radio.types.js.map +1 -1
  42. package/lib-commonjs/components/Radio/index.js +9 -8
  43. package/lib-commonjs/components/Radio/index.js.map +1 -1
  44. package/lib-commonjs/components/Radio/renderRadio.js +13 -24
  45. package/lib-commonjs/components/Radio/renderRadio.js.map +1 -1
  46. package/lib-commonjs/components/Radio/useRadio.js +83 -91
  47. package/lib-commonjs/components/Radio/useRadio.js.map +1 -1
  48. package/lib-commonjs/components/Radio/useRadioStyles.js +139 -65
  49. package/lib-commonjs/components/Radio/useRadioStyles.js.map +1 -1
  50. package/lib-commonjs/components/RadioGroup/RadioGroup.js +21 -22
  51. package/lib-commonjs/components/RadioGroup/RadioGroup.js.map +1 -1
  52. package/lib-commonjs/components/RadioGroup/RadioGroup.types.js +5 -2
  53. package/lib-commonjs/components/RadioGroup/RadioGroup.types.js.map +1 -1
  54. package/lib-commonjs/components/RadioGroup/index.js +9 -8
  55. package/lib-commonjs/components/RadioGroup/index.js.map +1 -1
  56. package/lib-commonjs/components/RadioGroup/renderRadioGroup.js +16 -21
  57. package/lib-commonjs/components/RadioGroup/renderRadioGroup.js.map +1 -1
  58. package/lib-commonjs/components/RadioGroup/useRadioGroup.js +40 -50
  59. package/lib-commonjs/components/RadioGroup/useRadioGroup.js.map +1 -1
  60. package/lib-commonjs/components/RadioGroup/useRadioGroupStyles.js +32 -23
  61. package/lib-commonjs/components/RadioGroup/useRadioGroupStyles.js.map +1 -1
  62. package/lib-commonjs/components/RadioGroupField/RadioGroupField.js +17 -11
  63. package/lib-commonjs/components/RadioGroupField/RadioGroupField.js.map +1 -1
  64. package/lib-commonjs/components/RadioGroupField/index.js +5 -4
  65. package/lib-commonjs/components/RadioGroupField/index.js.map +1 -1
  66. package/lib-commonjs/contexts/RadioGroupContext.js +17 -11
  67. package/lib-commonjs/contexts/RadioGroupContext.js.map +1 -1
  68. package/lib-commonjs/contexts/index.js +6 -5
  69. package/lib-commonjs/contexts/index.js.map +1 -1
  70. package/lib-commonjs/contexts/useRadioGroupContextValues.js +20 -25
  71. package/lib-commonjs/contexts/useRadioGroupContextValues.js.map +1 -1
  72. package/lib-commonjs/index.js +31 -99
  73. package/lib-commonjs/index.js.map +1 -1
  74. package/package.json +13 -12
  75. package/lib-amd/Radio.js +0 -6
  76. package/lib-amd/Radio.js.map +0 -1
  77. package/lib-amd/RadioGroup.js +0 -6
  78. package/lib-amd/RadioGroup.js.map +0 -1
  79. package/lib-amd/RadioGroupField.js +0 -6
  80. package/lib-amd/RadioGroupField.js.map +0 -1
  81. package/lib-amd/components/Radio/Radio.js +0 -17
  82. package/lib-amd/components/Radio/Radio.js.map +0 -1
  83. package/lib-amd/components/Radio/Radio.types.js +0 -5
  84. package/lib-amd/components/Radio/Radio.types.js.map +0 -1
  85. package/lib-amd/components/Radio/index.js +0 -10
  86. package/lib-amd/components/Radio/index.js.map +0 -1
  87. package/lib-amd/components/Radio/renderRadio.js +0 -17
  88. package/lib-amd/components/Radio/renderRadio.js.map +0 -1
  89. package/lib-amd/components/Radio/useRadio.js +0 -65
  90. package/lib-amd/components/Radio/useRadio.js.map +0 -1
  91. package/lib-amd/components/Radio/useRadioStyles.js +0 -158
  92. package/lib-amd/components/Radio/useRadioStyles.js.map +0 -1
  93. package/lib-amd/components/RadioGroup/RadioGroup.js +0 -18
  94. package/lib-amd/components/RadioGroup/RadioGroup.js.map +0 -1
  95. package/lib-amd/components/RadioGroup/RadioGroup.types.js +0 -5
  96. package/lib-amd/components/RadioGroup/RadioGroup.types.js.map +0 -1
  97. package/lib-amd/components/RadioGroup/index.js +0 -10
  98. package/lib-amd/components/RadioGroup/index.js.map +0 -1
  99. package/lib-amd/components/RadioGroup/renderRadioGroup.js +0 -15
  100. package/lib-amd/components/RadioGroup/renderRadioGroup.js.map +0 -1
  101. package/lib-amd/components/RadioGroup/useRadioGroup.js +0 -38
  102. package/lib-amd/components/RadioGroup/useRadioGroup.js.map +0 -1
  103. package/lib-amd/components/RadioGroup/useRadioGroupStyles.js +0 -26
  104. package/lib-amd/components/RadioGroup/useRadioGroupStyles.js.map +0 -1
  105. package/lib-amd/components/RadioGroupField/RadioGroupField.js +0 -10
  106. package/lib-amd/components/RadioGroupField/RadioGroupField.js.map +0 -1
  107. package/lib-amd/components/RadioGroupField/index.js +0 -6
  108. package/lib-amd/components/RadioGroupField/index.js.map +0 -1
  109. package/lib-amd/contexts/RadioGroupContext.js +0 -19
  110. package/lib-amd/contexts/RadioGroupContext.js.map +0 -1
  111. package/lib-amd/contexts/index.js +0 -7
  112. package/lib-amd/contexts/index.js.map +0 -1
  113. package/lib-amd/contexts/useRadioGroupContextValues.js +0 -19
  114. package/lib-amd/contexts/useRadioGroupContextValues.js.map +0 -1
  115. package/lib-amd/index.js +0 -21
  116. package/lib-amd/index.js.map +0 -1
@@ -1,79 +1,153 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ radioClassNames: ()=>radioClassNames,
13
+ useRadioStyles_unstable: ()=>useRadioStyles_unstable
5
14
  });
6
- exports.useRadioStyles_unstable = exports.radioClassNames = void 0;
7
- const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
8
- const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
9
- const react_1 = /*#__PURE__*/require("@griffel/react");
10
- exports.radioClassNames = {
11
- root: 'fui-Radio',
12
- indicator: 'fui-Radio__indicator',
13
- input: 'fui-Radio__input',
14
- label: 'fui-Radio__label'
15
+ const _react = require("@griffel/react");
16
+ const radioClassNames = {
17
+ root: 'fui-Radio',
18
+ indicator: 'fui-Radio__indicator',
19
+ input: 'fui-Radio__input',
20
+ label: 'fui-Radio__label'
15
21
  };
16
22
  // The indicator size is used by the indicator and label styles
17
23
  const indicatorSize = '16px';
18
- const useRootBaseClassName = /*#__PURE__*/react_1.__resetStyles("r18vxbm9", "r1631i6s", [".r18vxbm9{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;position:relative;}", ".r18vxbm9:focus{outline-style:none;}", ".r18vxbm9:focus-visible{outline-style:none;}", ".r18vxbm9[data-fui-focus-within]:focus-within{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}", ".r18vxbm9[data-fui-focus-within]:focus-within::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:2px;border-right-width:2px;border-bottom-width:2px;border-left-width:2px;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);top:-2px;bottom:-2px;left:-2px;right:-2px;}", ".r1631i6s{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;position:relative;}", ".r1631i6s:focus{outline-style:none;}", ".r1631i6s:focus-visible{outline-style:none;}", ".r1631i6s[data-fui-focus-within]:focus-within{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}", ".r1631i6s[data-fui-focus-within]:focus-within::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-width:2px;border-left-width:2px;border-bottom-width:2px;border-right-width:2px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);top:-2px;bottom:-2px;right:-2px;left:-2px;}"]);
19
- const useRootStyles = /*#__PURE__*/react_1.__styles({
20
- vertical: {
21
- Beiy3e4: "f1vx9l62",
22
- Bt984gj: "f122n59"
23
- }
24
+ const useRootBaseClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("r18vxbm9", "r1631i6s", [
25
+ ".r18vxbm9{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;position:relative;}",
26
+ ".r18vxbm9:focus{outline-style:none;}",
27
+ ".r18vxbm9:focus-visible{outline-style:none;}",
28
+ ".r18vxbm9[data-fui-focus-within]:focus-within{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}",
29
+ ".r18vxbm9[data-fui-focus-within]:focus-within::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:2px;border-right-width:2px;border-bottom-width:2px;border-left-width:2px;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);top:-2px;bottom:-2px;left:-2px;right:-2px;}",
30
+ ".r1631i6s{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;position:relative;}",
31
+ ".r1631i6s:focus{outline-style:none;}",
32
+ ".r1631i6s:focus-visible{outline-style:none;}",
33
+ ".r1631i6s[data-fui-focus-within]:focus-within{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}",
34
+ ".r1631i6s[data-fui-focus-within]:focus-within::after{content:\"\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-width:2px;border-left-width:2px;border-bottom-width:2px;border-right-width:2px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);top:-2px;bottom:-2px;right:-2px;left:-2px;}"
35
+ ]);
36
+ const useRootStyles = /*#__PURE__*/ (0, _react["__styles"])({
37
+ vertical: {
38
+ Beiy3e4: "f1vx9l62",
39
+ Bt984gj: "f122n59"
40
+ }
24
41
  }, {
25
- d: [".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}"]
42
+ d: [
43
+ ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}",
44
+ ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}"
45
+ ]
26
46
  });
27
- const useInputBaseClassName = /*#__PURE__*/react_1.__resetStyles("r9gx1vl", "r1uk1i2c", [".r9gx1vl{position:absolute;left:0;top:0;width:calc(16px + 2 * var(--spacingHorizontalS));height:100%;box-sizing:border-box;margin:0;opacity:0;}", ".r9gx1vl:enabled{cursor:pointer;}", ".r9gx1vl:enabled~.fui-Radio__label{cursor:pointer;}", ".r9gx1vl:not(:checked)~.fui-Radio__indicator>*{opacity:0;}", ".r9gx1vl:enabled:not(:checked)~.fui-Radio__label{color:var(--colorNeutralForeground3);}", ".r9gx1vl:enabled:not(:checked)~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessible);}", ".r9gx1vl:enabled:not(:checked):hover~.fui-Radio__label{color:var(--colorNeutralForeground2);}", ".r9gx1vl:enabled:not(:checked):hover~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessibleHover);}", ".r9gx1vl:enabled:not(:checked):hover:active~.fui-Radio__label{color:var(--colorNeutralForeground1);}", ".r9gx1vl:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessiblePressed);}", ".r9gx1vl:enabled:checked~.fui-Radio__label{color:var(--colorNeutralForeground1);}", ".r9gx1vl:enabled:checked~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStroke);color:var(--colorCompoundBrandForeground1);}", ".r9gx1vl:enabled:checked:hover~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokeHover);color:var(--colorCompoundBrandForeground1Hover);}", ".r9gx1vl:enabled:checked:hover:active~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokePressed);color:var(--colorCompoundBrandForeground1Pressed);}", ".r9gx1vl:disabled~.fui-Radio__label{color:var(--colorNeutralForegroundDisabled);cursor:default;}", ".r9gx1vl:disabled~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeDisabled);color:var(--colorNeutralForegroundDisabled);}", ".r1uk1i2c{position:absolute;right:0;top:0;width:calc(16px + 2 * var(--spacingHorizontalS));height:100%;box-sizing:border-box;margin:0;opacity:0;}", ".r1uk1i2c:enabled{cursor:pointer;}", ".r1uk1i2c:enabled~.fui-Radio__label{cursor:pointer;}", ".r1uk1i2c:not(:checked)~.fui-Radio__indicator>*{opacity:0;}", ".r1uk1i2c:enabled:not(:checked)~.fui-Radio__label{color:var(--colorNeutralForeground3);}", ".r1uk1i2c:enabled:not(:checked)~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessible);}", ".r1uk1i2c:enabled:not(:checked):hover~.fui-Radio__label{color:var(--colorNeutralForeground2);}", ".r1uk1i2c:enabled:not(:checked):hover~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessibleHover);}", ".r1uk1i2c:enabled:not(:checked):hover:active~.fui-Radio__label{color:var(--colorNeutralForeground1);}", ".r1uk1i2c:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessiblePressed);}", ".r1uk1i2c:enabled:checked~.fui-Radio__label{color:var(--colorNeutralForeground1);}", ".r1uk1i2c:enabled:checked~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStroke);color:var(--colorCompoundBrandForeground1);}", ".r1uk1i2c:enabled:checked:hover~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokeHover);color:var(--colorCompoundBrandForeground1Hover);}", ".r1uk1i2c:enabled:checked:hover:active~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokePressed);color:var(--colorCompoundBrandForeground1Pressed);}", ".r1uk1i2c:disabled~.fui-Radio__label{color:var(--colorNeutralForegroundDisabled);cursor:default;}", ".r1uk1i2c:disabled~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeDisabled);color:var(--colorNeutralForegroundDisabled);}"]);
28
- const useInputStyles = /*#__PURE__*/react_1.__styles({
29
- below: {
30
- a9b677: "fly5x3f",
31
- Bqenvij: "f1je6zif"
32
- }
47
+ const useInputBaseClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("r9gx1vl", "r1uk1i2c", [
48
+ ".r9gx1vl{position:absolute;left:0;top:0;width:calc(16px + 2 * var(--spacingHorizontalS));height:100%;box-sizing:border-box;margin:0;opacity:0;}",
49
+ ".r9gx1vl:enabled{cursor:pointer;}",
50
+ ".r9gx1vl:enabled~.fui-Radio__label{cursor:pointer;}",
51
+ ".r9gx1vl:not(:checked)~.fui-Radio__indicator>*{opacity:0;}",
52
+ ".r9gx1vl:enabled:not(:checked)~.fui-Radio__label{color:var(--colorNeutralForeground3);}",
53
+ ".r9gx1vl:enabled:not(:checked)~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessible);}",
54
+ ".r9gx1vl:enabled:not(:checked):hover~.fui-Radio__label{color:var(--colorNeutralForeground2);}",
55
+ ".r9gx1vl:enabled:not(:checked):hover~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessibleHover);}",
56
+ ".r9gx1vl:enabled:not(:checked):hover:active~.fui-Radio__label{color:var(--colorNeutralForeground1);}",
57
+ ".r9gx1vl:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessiblePressed);}",
58
+ ".r9gx1vl:enabled:checked~.fui-Radio__label{color:var(--colorNeutralForeground1);}",
59
+ ".r9gx1vl:enabled:checked~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStroke);color:var(--colorCompoundBrandForeground1);}",
60
+ ".r9gx1vl:enabled:checked:hover~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokeHover);color:var(--colorCompoundBrandForeground1Hover);}",
61
+ ".r9gx1vl:enabled:checked:hover:active~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokePressed);color:var(--colorCompoundBrandForeground1Pressed);}",
62
+ ".r9gx1vl:disabled~.fui-Radio__label{color:var(--colorNeutralForegroundDisabled);cursor:default;}",
63
+ ".r9gx1vl:disabled~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeDisabled);color:var(--colorNeutralForegroundDisabled);}",
64
+ ".r1uk1i2c{position:absolute;right:0;top:0;width:calc(16px + 2 * var(--spacingHorizontalS));height:100%;box-sizing:border-box;margin:0;opacity:0;}",
65
+ ".r1uk1i2c:enabled{cursor:pointer;}",
66
+ ".r1uk1i2c:enabled~.fui-Radio__label{cursor:pointer;}",
67
+ ".r1uk1i2c:not(:checked)~.fui-Radio__indicator>*{opacity:0;}",
68
+ ".r1uk1i2c:enabled:not(:checked)~.fui-Radio__label{color:var(--colorNeutralForeground3);}",
69
+ ".r1uk1i2c:enabled:not(:checked)~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessible);}",
70
+ ".r1uk1i2c:enabled:not(:checked):hover~.fui-Radio__label{color:var(--colorNeutralForeground2);}",
71
+ ".r1uk1i2c:enabled:not(:checked):hover~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessibleHover);}",
72
+ ".r1uk1i2c:enabled:not(:checked):hover:active~.fui-Radio__label{color:var(--colorNeutralForeground1);}",
73
+ ".r1uk1i2c:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessiblePressed);}",
74
+ ".r1uk1i2c:enabled:checked~.fui-Radio__label{color:var(--colorNeutralForeground1);}",
75
+ ".r1uk1i2c:enabled:checked~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStroke);color:var(--colorCompoundBrandForeground1);}",
76
+ ".r1uk1i2c:enabled:checked:hover~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokeHover);color:var(--colorCompoundBrandForeground1Hover);}",
77
+ ".r1uk1i2c:enabled:checked:hover:active~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokePressed);color:var(--colorCompoundBrandForeground1Pressed);}",
78
+ ".r1uk1i2c:disabled~.fui-Radio__label{color:var(--colorNeutralForegroundDisabled);cursor:default;}",
79
+ ".r1uk1i2c:disabled~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeDisabled);color:var(--colorNeutralForegroundDisabled);}"
80
+ ]);
81
+ const useInputStyles = /*#__PURE__*/ (0, _react["__styles"])({
82
+ below: {
83
+ a9b677: "fly5x3f",
84
+ Bqenvij: "f1je6zif"
85
+ }
33
86
  }, {
34
- d: [".fly5x3f{width:100%;}", ".f1je6zif{height:calc(16px + 2 * var(--spacingVerticalS));}"]
87
+ d: [
88
+ ".fly5x3f{width:100%;}",
89
+ ".f1je6zif{height:calc(16px + 2 * var(--spacingVerticalS));}"
90
+ ]
35
91
  });
36
- const useIndicatorBaseClassName = /*#__PURE__*/react_1.__resetStyles("rid4516", null, [".rid4516{width:16px;height:16px;font-size:12px;box-sizing:border-box;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;overflow:hidden;border:var(--strokeWidthThin) solid;border-radius:var(--borderRadiusCircular);margin:var(--spacingVerticalS) var(--spacingHorizontalS);fill:currentColor;pointer-events:none;}"]);
92
+ const useIndicatorBaseClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("rid4516", null, [
93
+ ".rid4516{width:16px;height:16px;font-size:12px;box-sizing:border-box;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;overflow:hidden;border:var(--strokeWidthThin) solid;border-radius:var(--borderRadiusCircular);margin:var(--spacingVerticalS) var(--spacingHorizontalS);fill:currentColor;pointer-events:none;}"
94
+ ]);
37
95
  // Can't use makeResetStyles here because Label is a component that may itself use makeResetStyles.
38
- const useLabelStyles = /*#__PURE__*/react_1.__styles({
39
- base: {
40
- qb2dma: "f7nlbp4",
41
- z8tnut: "f1kwiid1",
42
- z189sj: ["f1vdfbxk", "f1f5gg8d"],
43
- Byoj8tv: "f5b47ha",
44
- uwmqm3: ["f1f5gg8d", "f1vdfbxk"]
45
- },
46
- after: {
47
- uwmqm3: ["fruq291", "f7x41pl"],
48
- B6of3ja: "fjzwpt6",
49
- jrapky: "fh6j2fo"
50
- },
51
- below: {
52
- z8tnut: "f1ywm7hm",
53
- fsow6f: "f17mccla"
54
- }
96
+ const useLabelStyles = /*#__PURE__*/ (0, _react["__styles"])({
97
+ base: {
98
+ qb2dma: "f7nlbp4",
99
+ z8tnut: "f1kwiid1",
100
+ z189sj: [
101
+ "f1vdfbxk",
102
+ "f1f5gg8d"
103
+ ],
104
+ Byoj8tv: "f5b47ha",
105
+ uwmqm3: [
106
+ "f1f5gg8d",
107
+ "f1vdfbxk"
108
+ ]
109
+ },
110
+ after: {
111
+ uwmqm3: [
112
+ "fruq291",
113
+ "f7x41pl"
114
+ ],
115
+ B6of3ja: "fjzwpt6",
116
+ jrapky: "fh6j2fo"
117
+ },
118
+ below: {
119
+ z8tnut: "f1ywm7hm",
120
+ fsow6f: "f17mccla"
121
+ }
55
122
  }, {
56
- d: [".f7nlbp4{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;}", ".f1kwiid1{padding-top:var(--spacingVerticalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f5b47ha{padding-bottom:var(--spacingVerticalS);}", ".fruq291{padding-left:var(--spacingHorizontalXS);}", ".f7x41pl{padding-right:var(--spacingHorizontalXS);}", ".fjzwpt6{margin-top:calc((16px - var(--lineHeightBase300)) / 2);}", ".fh6j2fo{margin-bottom:calc((16px - var(--lineHeightBase300)) / 2);}", ".f1ywm7hm{padding-top:var(--spacingVerticalXS);}", ".f17mccla{text-align:center;}"]
123
+ d: [
124
+ ".f7nlbp4{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;}",
125
+ ".f1kwiid1{padding-top:var(--spacingVerticalS);}",
126
+ ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}",
127
+ ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}",
128
+ ".f5b47ha{padding-bottom:var(--spacingVerticalS);}",
129
+ ".fruq291{padding-left:var(--spacingHorizontalXS);}",
130
+ ".f7x41pl{padding-right:var(--spacingHorizontalXS);}",
131
+ ".fjzwpt6{margin-top:calc((16px - var(--lineHeightBase300)) / 2);}",
132
+ ".fh6j2fo{margin-bottom:calc((16px - var(--lineHeightBase300)) / 2);}",
133
+ ".f1ywm7hm{padding-top:var(--spacingVerticalXS);}",
134
+ ".f17mccla{text-align:center;}"
135
+ ]
57
136
  });
58
- /**
59
- * Apply styling to the Radio slots based on the state
60
- */
61
- const useRadioStyles_unstable = state => {
62
- const {
63
- labelPosition
64
- } = state;
65
- const rootBaseClassName = useRootBaseClassName();
66
- const rootStyles = useRootStyles();
67
- state.root.className = react_1.mergeClasses(exports.radioClassNames.root, rootBaseClassName, labelPosition === 'below' && rootStyles.vertical, state.root.className);
68
- const inputBaseClassName = useInputBaseClassName();
69
- const inputStyles = useInputStyles();
70
- state.input.className = react_1.mergeClasses(exports.radioClassNames.input, inputBaseClassName, labelPosition === 'below' && inputStyles.below, state.input.className);
71
- const indicatorBaseClassName = useIndicatorBaseClassName();
72
- state.indicator.className = react_1.mergeClasses(exports.radioClassNames.indicator, indicatorBaseClassName, state.indicator.className);
73
- const labelStyles = useLabelStyles();
74
- if (state.label) {
75
- state.label.className = react_1.mergeClasses(exports.radioClassNames.label, labelStyles.base, labelStyles[labelPosition], state.label.className);
76
- }
77
- };
78
- exports.useRadioStyles_unstable = useRadioStyles_unstable;
137
+ const useRadioStyles_unstable = (state)=>{
138
+ const { labelPosition } = state;
139
+ const rootBaseClassName = useRootBaseClassName();
140
+ const rootStyles = useRootStyles();
141
+ state.root.className = (0, _react.mergeClasses)(radioClassNames.root, rootBaseClassName, labelPosition === 'below' && rootStyles.vertical, state.root.className);
142
+ const inputBaseClassName = useInputBaseClassName();
143
+ const inputStyles = useInputStyles();
144
+ state.input.className = (0, _react.mergeClasses)(radioClassNames.input, inputBaseClassName, labelPosition === 'below' && inputStyles.below, state.input.className);
145
+ const indicatorBaseClassName = useIndicatorBaseClassName();
146
+ state.indicator.className = (0, _react.mergeClasses)(radioClassNames.indicator, indicatorBaseClassName, state.indicator.className);
147
+ const labelStyles = useLabelStyles();
148
+ if (state.label) {
149
+ state.label.className = (0, _react.mergeClasses)(radioClassNames.label, labelStyles.base, labelStyles[labelPosition], state.label.className);
150
+ }
151
+ }; //# sourceMappingURL=useRadioStyles.js.map
152
+
79
153
  //# sourceMappingURL=useRadioStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["react_tabster_1","require","react_theme_1","react_1","exports","radioClassNames","root","indicator","input","label","indicatorSize","useRootBaseClassName","__resetStyles","useRootStyles","__styles","vertical","Beiy3e4","Bt984gj","d","useInputBaseClassName","useInputStyles","below","a9b677","Bqenvij","useIndicatorBaseClassName","useLabelStyles","base","qb2dma","z8tnut","z189sj","Byoj8tv","uwmqm3","after","B6of3ja","jrapky","fsow6f","useRadioStyles_unstable","state","labelPosition","rootBaseClassName","rootStyles","className","mergeClasses","inputBaseClassName","inputStyles","indicatorBaseClassName","labelStyles"],"sources":["../src/packages/react-components/react-radio/src/components/Radio/useRadioStyles.ts"],"sourcesContent":["import { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { makeResetStyles, makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { RadioSlots, RadioState } from './Radio.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const radioClassNames: SlotClassNames<RadioSlots> = {\n root: 'fui-Radio',\n indicator: 'fui-Radio__indicator',\n input: 'fui-Radio__input',\n label: 'fui-Radio__label',\n};\n\n// The indicator size is used by the indicator and label styles\nconst indicatorSize = '16px';\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'inline-flex',\n position: 'relative',\n ...createFocusOutlineStyle({ style: {}, selector: 'focus-within' }),\n});\n\nconst useRootStyles = makeStyles({\n vertical: {\n flexDirection: 'column',\n alignItems: 'center',\n },\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\n ':enabled': {\n cursor: 'pointer',\n [`& ~ .${radioClassNames.label}`]: {\n cursor: 'pointer',\n },\n },\n\n // When unchecked, hide the circle icon (child of the indicator)\n [`:not(:checked) ~ .${radioClassNames.indicator} > *`]: {\n opacity: '0',\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 },\n\n ':hover': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground2,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeAccessibleHover,\n },\n },\n\n ':hover:active': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground1,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\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 },\n\n ':hover': {\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorCompoundBrandStrokeHover,\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n },\n\n ':hover:active': {\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorCompoundBrandStrokePressed,\n color: tokens.colorCompoundBrandForeground1Pressed,\n },\n },\n },\n\n // Colors for the disabled state\n ':disabled': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'default',\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n borderColor: tokens.colorNeutralStrokeDisabled,\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n});\n\nconst useInputStyles = makeStyles({\n below: {\n width: '100%',\n height: `calc(${indicatorSize} + 2 * ${tokens.spacingVerticalS})`,\n },\n});\n\nconst useIndicatorBaseClassName = makeResetStyles({\n width: indicatorSize,\n height: indicatorSize,\n fontSize: '12px',\n boxSizing: 'border-box',\n flexShrink: 0,\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n overflow: 'hidden',\n\n border: tokens.strokeWidthThin + ' solid',\n borderRadius: tokens.borderRadiusCircular,\n margin: tokens.spacingVerticalS + ' ' + tokens.spacingHorizontalS,\n fill: 'currentColor',\n pointerEvents: 'none',\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 ...shorthands.padding(tokens.spacingVerticalS, tokens.spacingHorizontalS),\n },\n\n after: {\n paddingLeft: tokens.spacingHorizontalXS,\n\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\n below: {\n paddingTop: tokens.spacingVerticalXS,\n textAlign: 'center',\n },\n});\n\n/**\n * Apply styling to the Radio slots based on the state\n */\nexport const useRadioStyles_unstable = (state: RadioState) => {\n const { labelPosition } = state;\n\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(\n radioClassNames.root,\n rootBaseClassName,\n labelPosition === 'below' && rootStyles.vertical,\n state.root.className,\n );\n\n const inputBaseClassName = useInputBaseClassName();\n const inputStyles = useInputStyles();\n state.input.className = mergeClasses(\n radioClassNames.input,\n inputBaseClassName,\n labelPosition === 'below' && inputStyles.below,\n state.input.className,\n );\n\n const indicatorBaseClassName = useIndicatorBaseClassName();\n state.indicator.className = mergeClasses(\n radioClassNames.indicator,\n indicatorBaseClassName,\n state.indicator.className,\n );\n\n const labelStyles = useLabelStyles();\n if (state.label) {\n state.label.className = mergeClasses(\n radioClassNames.label,\n labelStyles.base,\n labelStyles[labelPosition],\n state.label.className,\n );\n }\n};\n"],"mappings":";;;;;;AAAA,MAAAA,eAAA,gBAAAC,OAAA;AACA,MAAAC,aAAA,gBAAAD,OAAA;AACA,MAAAE,OAAA,gBAAAF,OAAA;AAIaG,OAAA,CAAAC,eAAe,GAA+B;EACzDC,IAAI,EAAE,WAAW;EACjBC,SAAS,EAAE,sBAAsB;EACjCC,KAAK,EAAE,kBAAkB;EACzBC,KAAK,EAAE;CACR;AAED;AACA,MAAMC,aAAa,GAAG,MAAM;AAE5B,MAAMC,oBAAoB,gBAAGR,OAAA,CAAAS,aAAe,guEAI1C;AAEF,MAAMC,aAAa,gBAAGV,OAAA,CAAAW,QAAU;EAAAC,QAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,EAK9B;AAEF,MAAMC,qBAAqB,gBAAGhB,OAAA,CAAAS,aAAe,46GAsF3C;AAEF,MAAMQ,cAAc,gBAAGjB,OAAA,CAAAW,QAAU;EAAAO,KAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;AAAA;EAAAL,CAAA;AAAA,EAK/B;AAEF,MAAMM,yBAAyB,gBAAGrB,OAAA,CAAAS,aAAe,4lBAiB/C;AAEF;AACA,MAAMa,cAAc,gBAAGtB,OAAA,CAAAW,QAAU;EAAAY,IAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;EAAAC,KAAA;IAAAD,MAAA;IAAAE,OAAA;IAAAC,MAAA;EAAA;EAAAb,KAAA;IAAAO,MAAA;IAAAO,MAAA;EAAA;AAAA;EAAAjB,CAAA;AAAA,EAmB/B;AAEF;;;AAGO,MAAMkB,uBAAuB,GAAIC,KAAiB,IAAI;EAC3D,MAAM;IAAEC;EAAa,CAAE,GAAGD,KAAK;EAE/B,MAAME,iBAAiB,GAAG5B,oBAAoB,EAAE;EAChD,MAAM6B,UAAU,GAAG3B,aAAa,EAAE;EAClCwB,KAAK,CAAC/B,IAAI,CAACmC,SAAS,GAAGtC,OAAA,CAAAuC,YAAY,CACjCtC,OAAA,CAAAC,eAAe,CAACC,IAAI,EACpBiC,iBAAiB,EACjBD,aAAa,KAAK,OAAO,IAAIE,UAAU,CAACzB,QAAQ,EAChDsB,KAAK,CAAC/B,IAAI,CAACmC,SAAS,CACrB;EAED,MAAME,kBAAkB,GAAGxB,qBAAqB,EAAE;EAClD,MAAMyB,WAAW,GAAGxB,cAAc,EAAE;EACpCiB,KAAK,CAAC7B,KAAK,CAACiC,SAAS,GAAGtC,OAAA,CAAAuC,YAAY,CAClCtC,OAAA,CAAAC,eAAe,CAACG,KAAK,EACrBmC,kBAAkB,EAClBL,aAAa,KAAK,OAAO,IAAIM,WAAW,CAACvB,KAAK,EAC9CgB,KAAK,CAAC7B,KAAK,CAACiC,SAAS,CACtB;EAED,MAAMI,sBAAsB,GAAGrB,yBAAyB,EAAE;EAC1Da,KAAK,CAAC9B,SAAS,CAACkC,SAAS,GAAGtC,OAAA,CAAAuC,YAAY,CACtCtC,OAAA,CAAAC,eAAe,CAACE,SAAS,EACzBsC,sBAAsB,EACtBR,KAAK,CAAC9B,SAAS,CAACkC,SAAS,CAC1B;EAED,MAAMK,WAAW,GAAGrB,cAAc,EAAE;EACpC,IAAIY,KAAK,CAAC5B,KAAK,EAAE;IACf4B,KAAK,CAAC5B,KAAK,CAACgC,SAAS,GAAGtC,OAAA,CAAAuC,YAAY,CAClCtC,OAAA,CAAAC,eAAe,CAACI,KAAK,EACrBqC,WAAW,CAACpB,IAAI,EAChBoB,WAAW,CAACR,aAAa,CAAC,EAC1BD,KAAK,CAAC5B,KAAK,CAACgC,SAAS,CACtB;;AAEL,CAAC;AArCYrC,OAAA,CAAAgC,uBAAuB,GAAAA,uBAAA"}
1
+ {"version":3,"sources":["../../../lib/components/Radio/useRadioStyles.js"],"sourcesContent":["import { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { __resetStyles, __styles, mergeClasses, shorthands } from '@griffel/react';\nexport const radioClassNames = {\n root: 'fui-Radio',\n indicator: 'fui-Radio__indicator',\n input: 'fui-Radio__input',\n label: 'fui-Radio__label'\n};\n// The indicator size is used by the indicator and label styles\nconst indicatorSize = '16px';\nconst useRootBaseClassName = /*#__PURE__*/__resetStyles(\"r18vxbm9\", \"r1631i6s\", [\".r18vxbm9{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;position:relative;}\", \".r18vxbm9:focus{outline-style:none;}\", \".r18vxbm9:focus-visible{outline-style:none;}\", \".r18vxbm9[data-fui-focus-within]:focus-within{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}\", \".r18vxbm9[data-fui-focus-within]:focus-within::after{content:\\\"\\\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:2px;border-right-width:2px;border-bottom-width:2px;border-left-width:2px;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);top:-2px;bottom:-2px;left:-2px;right:-2px;}\", \".r1631i6s{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;position:relative;}\", \".r1631i6s:focus{outline-style:none;}\", \".r1631i6s:focus-visible{outline-style:none;}\", \".r1631i6s[data-fui-focus-within]:focus-within{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}\", \".r1631i6s[data-fui-focus-within]:focus-within::after{content:\\\"\\\";position:absolute;pointer-events:none;z-index:1;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-width:2px;border-left-width:2px;border-bottom-width:2px;border-right-width:2px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-color:var(--colorStrokeFocus2);border-left-color:var(--colorStrokeFocus2);border-bottom-color:var(--colorStrokeFocus2);border-right-color:var(--colorStrokeFocus2);top:-2px;bottom:-2px;right:-2px;left:-2px;}\"]);\nconst useRootStyles = /*#__PURE__*/__styles({\n vertical: {\n Beiy3e4: \"f1vx9l62\",\n Bt984gj: \"f122n59\"\n }\n}, {\n d: [\".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}\", \".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}\"]\n});\nconst useInputBaseClassName = /*#__PURE__*/__resetStyles(\"r9gx1vl\", \"r1uk1i2c\", [\".r9gx1vl{position:absolute;left:0;top:0;width:calc(16px + 2 * var(--spacingHorizontalS));height:100%;box-sizing:border-box;margin:0;opacity:0;}\", \".r9gx1vl:enabled{cursor:pointer;}\", \".r9gx1vl:enabled~.fui-Radio__label{cursor:pointer;}\", \".r9gx1vl:not(:checked)~.fui-Radio__indicator>*{opacity:0;}\", \".r9gx1vl:enabled:not(:checked)~.fui-Radio__label{color:var(--colorNeutralForeground3);}\", \".r9gx1vl:enabled:not(:checked)~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessible);}\", \".r9gx1vl:enabled:not(:checked):hover~.fui-Radio__label{color:var(--colorNeutralForeground2);}\", \".r9gx1vl:enabled:not(:checked):hover~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessibleHover);}\", \".r9gx1vl:enabled:not(:checked):hover:active~.fui-Radio__label{color:var(--colorNeutralForeground1);}\", \".r9gx1vl:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessiblePressed);}\", \".r9gx1vl:enabled:checked~.fui-Radio__label{color:var(--colorNeutralForeground1);}\", \".r9gx1vl:enabled:checked~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStroke);color:var(--colorCompoundBrandForeground1);}\", \".r9gx1vl:enabled:checked:hover~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokeHover);color:var(--colorCompoundBrandForeground1Hover);}\", \".r9gx1vl:enabled:checked:hover:active~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokePressed);color:var(--colorCompoundBrandForeground1Pressed);}\", \".r9gx1vl:disabled~.fui-Radio__label{color:var(--colorNeutralForegroundDisabled);cursor:default;}\", \".r9gx1vl:disabled~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeDisabled);color:var(--colorNeutralForegroundDisabled);}\", \".r1uk1i2c{position:absolute;right:0;top:0;width:calc(16px + 2 * var(--spacingHorizontalS));height:100%;box-sizing:border-box;margin:0;opacity:0;}\", \".r1uk1i2c:enabled{cursor:pointer;}\", \".r1uk1i2c:enabled~.fui-Radio__label{cursor:pointer;}\", \".r1uk1i2c:not(:checked)~.fui-Radio__indicator>*{opacity:0;}\", \".r1uk1i2c:enabled:not(:checked)~.fui-Radio__label{color:var(--colorNeutralForeground3);}\", \".r1uk1i2c:enabled:not(:checked)~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessible);}\", \".r1uk1i2c:enabled:not(:checked):hover~.fui-Radio__label{color:var(--colorNeutralForeground2);}\", \".r1uk1i2c:enabled:not(:checked):hover~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessibleHover);}\", \".r1uk1i2c:enabled:not(:checked):hover:active~.fui-Radio__label{color:var(--colorNeutralForeground1);}\", \".r1uk1i2c:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessiblePressed);}\", \".r1uk1i2c:enabled:checked~.fui-Radio__label{color:var(--colorNeutralForeground1);}\", \".r1uk1i2c:enabled:checked~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStroke);color:var(--colorCompoundBrandForeground1);}\", \".r1uk1i2c:enabled:checked:hover~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokeHover);color:var(--colorCompoundBrandForeground1Hover);}\", \".r1uk1i2c:enabled:checked:hover:active~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokePressed);color:var(--colorCompoundBrandForeground1Pressed);}\", \".r1uk1i2c:disabled~.fui-Radio__label{color:var(--colorNeutralForegroundDisabled);cursor:default;}\", \".r1uk1i2c:disabled~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeDisabled);color:var(--colorNeutralForegroundDisabled);}\"]);\nconst useInputStyles = /*#__PURE__*/__styles({\n below: {\n a9b677: \"fly5x3f\",\n Bqenvij: \"f1je6zif\"\n }\n}, {\n d: [\".fly5x3f{width:100%;}\", \".f1je6zif{height:calc(16px + 2 * var(--spacingVerticalS));}\"]\n});\nconst useIndicatorBaseClassName = /*#__PURE__*/__resetStyles(\"rid4516\", null, [\".rid4516{width:16px;height:16px;font-size:12px;box-sizing:border-box;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;overflow:hidden;border:var(--strokeWidthThin) solid;border-radius:var(--borderRadiusCircular);margin:var(--spacingVerticalS) var(--spacingHorizontalS);fill:currentColor;pointer-events:none;}\"]);\n// Can't use makeResetStyles here because Label is a component that may itself use makeResetStyles.\nconst useLabelStyles = /*#__PURE__*/__styles({\n base: {\n qb2dma: \"f7nlbp4\",\n z8tnut: \"f1kwiid1\",\n z189sj: [\"f1vdfbxk\", \"f1f5gg8d\"],\n Byoj8tv: \"f5b47ha\",\n uwmqm3: [\"f1f5gg8d\", \"f1vdfbxk\"]\n },\n after: {\n uwmqm3: [\"fruq291\", \"f7x41pl\"],\n B6of3ja: \"fjzwpt6\",\n jrapky: \"fh6j2fo\"\n },\n below: {\n z8tnut: \"f1ywm7hm\",\n fsow6f: \"f17mccla\"\n }\n}, {\n d: [\".f7nlbp4{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;}\", \".f1kwiid1{padding-top:var(--spacingVerticalS);}\", \".f1vdfbxk{padding-right:var(--spacingHorizontalS);}\", \".f1f5gg8d{padding-left:var(--spacingHorizontalS);}\", \".f5b47ha{padding-bottom:var(--spacingVerticalS);}\", \".fruq291{padding-left:var(--spacingHorizontalXS);}\", \".f7x41pl{padding-right:var(--spacingHorizontalXS);}\", \".fjzwpt6{margin-top:calc((16px - var(--lineHeightBase300)) / 2);}\", \".fh6j2fo{margin-bottom:calc((16px - var(--lineHeightBase300)) / 2);}\", \".f1ywm7hm{padding-top:var(--spacingVerticalXS);}\", \".f17mccla{text-align:center;}\"]\n});\n/**\n * Apply styling to the Radio slots based on the state\n */\nexport const useRadioStyles_unstable = state => {\n const {\n labelPosition\n } = state;\n const rootBaseClassName = useRootBaseClassName();\n const rootStyles = useRootStyles();\n state.root.className = mergeClasses(radioClassNames.root, rootBaseClassName, labelPosition === 'below' && rootStyles.vertical, state.root.className);\n const inputBaseClassName = useInputBaseClassName();\n const inputStyles = useInputStyles();\n state.input.className = mergeClasses(radioClassNames.input, inputBaseClassName, labelPosition === 'below' && inputStyles.below, state.input.className);\n const indicatorBaseClassName = useIndicatorBaseClassName();\n state.indicator.className = mergeClasses(radioClassNames.indicator, indicatorBaseClassName, state.indicator.className);\n const labelStyles = useLabelStyles();\n if (state.label) {\n state.label.className = mergeClasses(radioClassNames.label, labelStyles.base, labelStyles[labelPosition], state.label.className);\n }\n};\n//# sourceMappingURL=useRadioStyles.js.map"],"names":["radioClassNames","useRadioStyles_unstable","root","indicator","input","label","indicatorSize","useRootBaseClassName","__resetStyles","useRootStyles","__styles","vertical","Beiy3e4","Bt984gj","d","useInputBaseClassName","useInputStyles","below","a9b677","Bqenvij","useIndicatorBaseClassName","useLabelStyles","base","qb2dma","z8tnut","z189sj","Byoj8tv","uwmqm3","after","B6of3ja","jrapky","fsow6f","state","labelPosition","rootBaseClassName","rootStyles","className","mergeClasses","inputBaseClassName","inputStyles","indicatorBaseClassName","labelStyles"],"mappings":";;;;;;;;;;;IAGaA,eAAe,MAAfA;IAmDAC,uBAAuB,MAAvBA;;uBApDqD;AAC3D,MAAMD,kBAAkB;IAC7BE,MAAM;IACNC,WAAW;IACXC,OAAO;IACPC,OAAO;AACT;AACA,+DAA+D;AAC/D,MAAMC,gBAAgB;AACtB,MAAMC,uBAAuB,WAAW,GAAEC,IAAAA,uBAAa,EAAC,YAAY,YAAY;IAAC;IAAuI;IAAwC;IAAgD;IAA6K;IAAutB;IAAuI;IAAwC;IAAgD;IAA6K;CAAstB;AACtxE,MAAMC,gBAAgB,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IAC1CC,UAAU;QACRC,SAAS;QACTC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAA6F;KAA0G;AAC7M;AACA,MAAMC,wBAAwB,WAAW,GAAEP,IAAAA,uBAAa,EAAC,WAAW,YAAY;IAAC;IAAmJ;IAAqC;IAAuD;IAA8D;IAA2F;IAA2G;IAAiG;IAAsH;IAAwG;IAA+H;IAAqF;IAA4I;IAA4J;IAAuK;IAAoG;IAAwI;IAAqJ;IAAsC;IAAwD;IAA+D;IAA4F;IAA4G;IAAkG;IAAuH;IAAyG;IAAgI;IAAsF;IAA6I;IAA6J;IAAwK;IAAqG;CAAwI;AACn+G,MAAMQ,iBAAiB,WAAW,GAAEN,IAAAA,kBAAQ,EAAC;IAC3CO,OAAO;QACLC,QAAQ;QACRC,SAAS;IACX;AACF,GAAG;IACDL,GAAG;QAAC;QAAyB;KAA8D;AAC7F;AACA,MAAMM,4BAA4B,WAAW,GAAEZ,IAAAA,uBAAa,EAAC,WAAW,IAAI,EAAE;IAAC;CAAwkB;AACvpB,mGAAmG;AACnG,MAAMa,iBAAiB,WAAW,GAAEX,IAAAA,kBAAQ,EAAC;IAC3CY,MAAM;QACJC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAW;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAW;IAClC;IACAC,OAAO;QACLD,QAAQ;YAAC;YAAW;SAAU;QAC9BE,SAAS;QACTC,QAAQ;IACV;IACAb,OAAO;QACLO,QAAQ;QACRO,QAAQ;IACV;AACF,GAAG;IACDjB,GAAG;QAAC;QAAqF;QAAmD;QAAuD;QAAsD;QAAqD;QAAsD;QAAuD;QAAqE;QAAwE;QAAoD;KAAgC;AAC9nB;AAIO,MAAMb,0BAA0B+B,CAAAA,QAAS;IAC9C,MAAM,EACJC,cAAa,EACd,GAAGD;IACJ,MAAME,oBAAoB3B;IAC1B,MAAM4B,aAAa1B;IACnBuB,MAAM9B,IAAI,CAACkC,SAAS,GAAGC,IAAAA,mBAAY,EAACrC,gBAAgBE,IAAI,EAAEgC,mBAAmBD,kBAAkB,WAAWE,WAAWxB,QAAQ,EAAEqB,MAAM9B,IAAI,CAACkC,SAAS;IACnJ,MAAME,qBAAqBvB;IAC3B,MAAMwB,cAAcvB;IACpBgB,MAAM5B,KAAK,CAACgC,SAAS,GAAGC,IAAAA,mBAAY,EAACrC,gBAAgBI,KAAK,EAAEkC,oBAAoBL,kBAAkB,WAAWM,YAAYtB,KAAK,EAAEe,MAAM5B,KAAK,CAACgC,SAAS;IACrJ,MAAMI,yBAAyBpB;IAC/BY,MAAM7B,SAAS,CAACiC,SAAS,GAAGC,IAAAA,mBAAY,EAACrC,gBAAgBG,SAAS,EAAEqC,wBAAwBR,MAAM7B,SAAS,CAACiC,SAAS;IACrH,MAAMK,cAAcpB;IACpB,IAAIW,MAAM3B,KAAK,EAAE;QACf2B,MAAM3B,KAAK,CAAC+B,SAAS,GAAGC,IAAAA,mBAAY,EAACrC,gBAAgBK,KAAK,EAAEoC,YAAYnB,IAAI,EAAEmB,WAAW,CAACR,cAAc,EAAED,MAAM3B,KAAK,CAAC+B,SAAS;IACjI,CAAC;AACH,GACA,0CAA0C"}
@@ -1,27 +1,26 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "RadioGroup", {
6
+ enumerable: true,
7
+ get: ()=>RadioGroup
5
8
  });
6
- exports.RadioGroup = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const renderRadioGroup_1 = /*#__PURE__*/require("./renderRadioGroup");
9
- const useRadioGroup_1 = /*#__PURE__*/require("./useRadioGroup");
10
- const useRadioGroupStyles_1 = /*#__PURE__*/require("./useRadioGroupStyles");
11
- const useRadioGroupContextValues_1 = /*#__PURE__*/require("../../contexts/useRadioGroupContextValues");
12
- const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
13
- /**
14
- * A RadioGroup component presents a set of options where only one option can be selected.
15
- */
16
- exports.RadioGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
17
- const state = useRadioGroup_1.useRadioGroup_unstable(props, ref);
18
- const contextValues = useRadioGroupContextValues_1.useRadioGroupContextValues(state);
19
- useRadioGroupStyles_1.useRadioGroupStyles_unstable(state);
20
- const {
21
- useRadioGroupStyles_unstable: useCustomStyles
22
- } = react_shared_contexts_1.useCustomStyleHooks_unstable();
23
- useCustomStyles(state);
24
- return renderRadioGroup_1.renderRadioGroup_unstable(state, contextValues);
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _renderRadioGroup = require("./renderRadioGroup");
12
+ const _useRadioGroup = require("./useRadioGroup");
13
+ const _useRadioGroupStyles = require("./useRadioGroupStyles");
14
+ const _useRadioGroupContextValues = require("../../contexts/useRadioGroupContextValues");
15
+ const _reactSharedContexts = require("@fluentui/react-shared-contexts");
16
+ const RadioGroup = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
17
+ const state = (0, _useRadioGroup.useRadioGroup_unstable)(props, ref);
18
+ const contextValues = (0, _useRadioGroupContextValues.useRadioGroupContextValues)(state);
19
+ (0, _useRadioGroupStyles.useRadioGroupStyles_unstable)(state);
20
+ const { useRadioGroupStyles_unstable: useCustomStyles } = (0, _reactSharedContexts.useCustomStyleHooks_unstable)();
21
+ useCustomStyles(state);
22
+ return (0, _renderRadioGroup.renderRadioGroup_unstable)(state, contextValues);
25
23
  });
26
- exports.RadioGroup.displayName = 'RadioGroup';
24
+ RadioGroup.displayName = 'RadioGroup'; //# sourceMappingURL=RadioGroup.js.map
25
+
27
26
  //# sourceMappingURL=RadioGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","renderRadioGroup_1","useRadioGroup_1","useRadioGroupStyles_1","useRadioGroupContextValues_1","react_shared_contexts_1","exports","RadioGroup","forwardRef","props","ref","state","useRadioGroup_unstable","contextValues","useRadioGroupContextValues","useRadioGroupStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderRadioGroup_unstable","displayName"],"sources":["../src/packages/react-components/react-radio/src/components/RadioGroup/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';\nimport { useRadioGroupContextValues } from '../../contexts/useRadioGroupContextValues';\nimport { useCustomStyleHooks_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 const { useRadioGroupStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderRadioGroup_unstable(state, contextValues);\n});\n\nRadioGroup.displayName = 'RadioGroup';\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AAGA,MAAAC,kBAAA,gBAAAD,OAAA;AACA,MAAAE,eAAA,gBAAAF,OAAA;AACA,MAAAG,qBAAA,gBAAAH,OAAA;AACA,MAAAI,4BAAA,gBAAAJ,OAAA;AACA,MAAAK,uBAAA,gBAAAL,OAAA;AAEA;;;AAGaM,OAAA,CAAAC,UAAU,gBAAyCR,KAAK,CAACS,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC9F,MAAMC,KAAK,GAAGT,eAAA,CAAAU,sBAAsB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAChD,MAAMG,aAAa,GAAGT,4BAAA,CAAAU,0BAA0B,CAACH,KAAK,CAAC;EAEvDR,qBAAA,CAAAY,4BAA4B,CAACJ,KAAK,CAAC;EAEnC,MAAM;IAAEI,4BAA4B,EAAEC;EAAe,CAAE,GAAGX,uBAAA,CAAAY,4BAA4B,EAAE;EACxFD,eAAe,CAACL,KAAK,CAAC;EAEtB,OAAOV,kBAAA,CAAAiB,yBAAyB,CAACP,KAAK,EAAEE,aAAa,CAAC;AACxD,CAAC,CAAC;AAEFP,OAAA,CAAAC,UAAU,CAACY,WAAW,GAAG,YAAY"}
1
+ {"version":3,"sources":["../../../lib/components/RadioGroup/RadioGroup.js"],"sourcesContent":["import * as React from 'react';\nimport { renderRadioGroup_unstable } from './renderRadioGroup';\nimport { useRadioGroup_unstable } from './useRadioGroup';\nimport { useRadioGroupStyles_unstable } from './useRadioGroupStyles';\nimport { useRadioGroupContextValues } from '../../contexts/useRadioGroupContextValues';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n/**\n * A RadioGroup component presents a set of options where only one option can be selected.\n */\nexport const RadioGroup = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useRadioGroup_unstable(props, ref);\n const contextValues = useRadioGroupContextValues(state);\n useRadioGroupStyles_unstable(state);\n const {\n useRadioGroupStyles_unstable: useCustomStyles\n } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n return renderRadioGroup_unstable(state, contextValues);\n});\nRadioGroup.displayName = 'RadioGroup';\n//# sourceMappingURL=RadioGroup.js.map"],"names":["RadioGroup","React","forwardRef","props","ref","state","useRadioGroup_unstable","contextValues","useRadioGroupContextValues","useRadioGroupStyles_unstable","useCustomStyles","useCustomStyleHooks_unstable","renderRadioGroup_unstable","displayName"],"mappings":";;;;+BASaA;;aAAAA;;;6DATU;kCACmB;+BACH;qCACM;4CACF;qCACE;AAItC,MAAMA,aAAa,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACtE,MAAMC,QAAQC,IAAAA,qCAAsB,EAACH,OAAOC;IAC5C,MAAMG,gBAAgBC,IAAAA,sDAA0B,EAACH;IACjDI,IAAAA,iDAA4B,EAACJ;IAC7B,MAAM,EACJI,8BAA8BC,gBAAe,EAC9C,GAAGC,IAAAA,iDAA4B;IAChCD,gBAAgBL;IAChB,OAAOO,IAAAA,2CAAyB,EAACP,OAAOE;AAC1C;AACAP,WAAWa,WAAW,GAAG,cACzB,sCAAsC"}
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
5
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
6
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
7
+ //# sourceMappingURL=RadioGroup.types.js.map
8
+
6
9
  //# sourceMappingURL=RadioGroup.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/packages/react-components/react-radio/src/components/RadioGroup/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 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 Partial<Exclude<RadioGroupProps, 'onChange' | 'layout'>>;\n\nexport type RadioGroupContextValue = Pick<\n RadioGroupProps,\n 'name' | 'value' | 'defaultValue' | 'disabled' | 'layout' | 'required'\n>;\n\nexport type RadioGroupContextValues = {\n radioGroup: RadioGroupContextValue;\n};\n"],"mappings":""}
1
+ {"version":3,"sources":["../../../lib/components/RadioGroup/RadioGroup.types.js"],"sourcesContent":["import * as React from 'react';\n//# sourceMappingURL=RadioGroup.types.js.map"],"names":[],"mappings":";;;;;6DAAuB;CACvB,4CAA4C"}
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
5
4
  });
6
- const tslib_1 = /*#__PURE__*/require("tslib");
7
- tslib_1.__exportStar(require("./RadioGroup"), exports);
8
- tslib_1.__exportStar(require("./RadioGroup.types"), exports);
9
- tslib_1.__exportStar(require("./renderRadioGroup"), exports);
10
- tslib_1.__exportStar(require("./useRadioGroup"), exports);
11
- tslib_1.__exportStar(require("./useRadioGroupStyles"), exports);
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./RadioGroup"), exports);
7
+ _exportStar(require("./RadioGroup.types"), exports);
8
+ _exportStar(require("./renderRadioGroup"), exports);
9
+ _exportStar(require("./useRadioGroup"), exports);
10
+ _exportStar(require("./useRadioGroupStyles"), exports);
11
+ //# sourceMappingURL=index.js.map
12
+
12
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../src/packages/react-components/react-radio/src/components/RadioGroup/index.ts"],"sourcesContent":["export * from './RadioGroup';\nexport * from './RadioGroup.types';\nexport * from './renderRadioGroup';\nexport * from './useRadioGroup';\nexport * from './useRadioGroupStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,kBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,wBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,wBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,qBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,2BAAAC,OAAA"}
1
+ {"version":3,"sources":["../../../lib/components/RadioGroup/index.js"],"sourcesContent":["export * from './RadioGroup';\nexport * from './RadioGroup.types';\nexport * from './renderRadioGroup';\nexport * from './useRadioGroup';\nexport * from './useRadioGroupStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
@@ -1,25 +1,20 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderRadioGroup_unstable", {
6
+ enumerable: true,
7
+ get: ()=>renderRadioGroup_unstable
5
8
  });
6
- exports.renderRadioGroup_unstable = void 0;
7
- const React = /*#__PURE__*/require("react");
8
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
- const RadioGroupContext_1 = /*#__PURE__*/require("../../contexts/RadioGroupContext");
10
- /**
11
- * Render the final JSX of RadioGroup
12
- */
13
- const renderRadioGroup_unstable = (state, contextValues) => {
14
- const {
15
- slots,
16
- slotProps
17
- } = react_utilities_1.getSlots(state);
18
- return React.createElement(RadioGroupContext_1.RadioGroupContext.Provider, {
19
- value: contextValues.radioGroup
20
- }, React.createElement(slots.root, {
21
- ...slotProps.root
22
- }));
23
- };
24
- exports.renderRadioGroup_unstable = renderRadioGroup_unstable;
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
12
+ const _radioGroupContext = require("../../contexts/RadioGroupContext");
13
+ const renderRadioGroup_unstable = (state, contextValues)=>{
14
+ const { slots , slotProps } = (0, _reactUtilities.getSlots)(state);
15
+ return /*#__PURE__*/ _react.createElement(_radioGroupContext.RadioGroupContext.Provider, {
16
+ value: contextValues.radioGroup
17
+ }, /*#__PURE__*/ _react.createElement(slots.root, slotProps.root));
18
+ }; //# sourceMappingURL=renderRadioGroup.js.map
19
+
25
20
  //# sourceMappingURL=renderRadioGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","require","react_utilities_1","RadioGroupContext_1","renderRadioGroup_unstable","state","contextValues","slots","slotProps","getSlots","createElement","RadioGroupContext","Provider","value","radioGroup","root","exports"],"sources":["../src/packages/react-components/react-radio/src/components/RadioGroup/renderRadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } 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 const { slots, slotProps } = getSlots<RadioGroupSlots>(state);\n\n return (\n <RadioGroupContext.Provider value={contextValues.radioGroup}>\n <slots.root {...slotProps.root} />\n </RadioGroupContext.Provider>\n );\n};\n"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AACA,MAAAE,mBAAA,gBAAAF,OAAA;AAGA;;;AAGO,MAAMG,yBAAyB,GAAGA,CAACC,KAAsB,EAAEC,aAAsC,KAAI;EAC1G,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGN,iBAAA,CAAAO,QAAQ,CAAkBJ,KAAK,CAAC;EAE7D,OACEL,KAAA,CAAAU,aAAA,CAACP,mBAAA,CAAAQ,iBAAiB,CAACC,QAAQ;IAACC,KAAK,EAAEP,aAAa,CAACQ;EAAU,GACzDd,KAAA,CAAAU,aAAA,CAACH,KAAK,CAACQ,IAAI;IAAA,GAAKP,SAAS,CAACO;EAAI,EAAI,CACP;AAEjC,CAAC;AARYC,OAAA,CAAAZ,yBAAyB,GAAAA,yBAAA"}
1
+ {"version":3,"sources":["../../../lib/components/RadioGroup/renderRadioGroup.js"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { RadioGroupContext } from '../../contexts/RadioGroupContext';\n/**\n * Render the final JSX of RadioGroup\n */\nexport const renderRadioGroup_unstable = (state, contextValues) => {\n const {\n slots,\n slotProps\n } = getSlots(state);\n return /*#__PURE__*/React.createElement(RadioGroupContext.Provider, {\n value: contextValues.radioGroup\n }, /*#__PURE__*/React.createElement(slots.root, slotProps.root));\n};\n//# sourceMappingURL=renderRadioGroup.js.map"],"names":["renderRadioGroup_unstable","state","contextValues","slots","slotProps","getSlots","React","createElement","RadioGroupContext","Provider","value","radioGroup","root"],"mappings":";;;;+BAMaA;;aAAAA;;;6DANU;gCACE;mCACS;AAI3B,MAAMA,4BAA4B,CAACC,OAAOC,gBAAkB;IACjE,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,wBAAQ,EAACJ;IACb,OAAO,WAAW,GAAEK,OAAMC,aAAa,CAACC,oCAAiB,CAACC,QAAQ,EAAE;QAClEC,OAAOR,cAAcS,UAAU;IACjC,GAAG,WAAW,GAAEL,OAAMC,aAAa,CAACJ,MAAMS,IAAI,EAAER,UAAUQ,IAAI;AAChE,GACA,4CAA4C"}
@@ -1,55 +1,45 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useRadioGroup_unstable", {
6
+ enumerable: true,
7
+ get: ()=>useRadioGroup_unstable
5
8
  });
6
- exports.useRadioGroup_unstable = void 0;
7
- const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
8
- /**
9
- * Create the state required to render RadioGroup.
10
- *
11
- * The returned state can be modified with hooks such as useRadioGroupStyles_unstable,
12
- * before being passed to renderRadioGroup_unstable.
13
- *
14
- * @param props - props from this instance of RadioGroup
15
- * @param ref - reference to root HTMLElement of RadioGroup
16
- */
17
- const useRadioGroup_unstable = (props, ref) => {
18
- const generatedName = react_utilities_1.useId('radiogroup-');
19
- const {
20
- name = generatedName,
21
- value,
22
- defaultValue,
23
- disabled,
24
- layout = 'vertical',
25
- onChange,
26
- required
27
- } = props;
28
- return {
29
- layout,
30
- name,
31
- value,
32
- defaultValue,
33
- disabled,
34
- required,
35
- components: {
36
- root: 'div'
37
- },
38
- root: {
39
- ref,
40
- role: 'radiogroup',
41
- ...react_utilities_1.getNativeElementProps('div', props, /*excludedPropNames:*/['onChange', 'name']),
42
- onChange: react_utilities_1.useEventCallback(ev => {
43
- if (onChange && react_utilities_1.isHTMLElement(ev.target, {
44
- constructorName: 'HTMLInputElement'
45
- }) && ev.target.type === 'radio') {
46
- onChange(ev, {
47
- value: ev.target.value
48
- });
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
12
+ const useRadioGroup_unstable = (props, ref)=>{
13
+ const generatedName = (0, _reactUtilities.useId)('radiogroup-');
14
+ const { name =generatedName , value , defaultValue , disabled , layout ='vertical' , onChange , required } = props;
15
+ return {
16
+ layout,
17
+ name,
18
+ value,
19
+ defaultValue,
20
+ disabled,
21
+ required,
22
+ components: {
23
+ root: 'div'
24
+ },
25
+ root: {
26
+ ref,
27
+ role: 'radiogroup',
28
+ ...(0, _reactUtilities.getNativeElementProps)('div', props, /*excludedPropNames:*/ [
29
+ 'onChange',
30
+ 'name'
31
+ ]),
32
+ onChange: (0, _reactUtilities.useEventCallback)((ev)=>{
33
+ if (onChange && (0, _reactUtilities.isHTMLElement)(ev.target, {
34
+ constructorName: 'HTMLInputElement'
35
+ }) && ev.target.type === 'radio') {
36
+ onChange(ev, {
37
+ value: ev.target.value
38
+ });
39
+ }
40
+ })
49
41
  }
50
- })
51
- }
52
- };
53
- };
54
- exports.useRadioGroup_unstable = useRadioGroup_unstable;
42
+ };
43
+ }; //# sourceMappingURL=useRadioGroup.js.map
44
+
55
45
  //# sourceMappingURL=useRadioGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["react_utilities_1","require","useRadioGroup_unstable","props","ref","generatedName","useId","name","value","defaultValue","disabled","layout","onChange","required","components","root","role","getNativeElementProps","useEventCallback","ev","isHTMLElement","target","constructorName","type","exports"],"sources":["../src/packages/react-components/react-radio/src/components/RadioGroup/useRadioGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, isHTMLElement, useEventCallback, useId } 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 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 ...getNativeElementProps('div', props, /*excludedPropNames:*/ ['onChange', 'name']),\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"],"mappings":";;;;;;AACA,MAAAA,iBAAA,gBAAAC,OAAA;AAGA;;;;;;;;;AASO,MAAMC,sBAAsB,GAAGA,CAACC,KAAsB,EAAEC,GAA8B,KAAqB;EAChH,MAAMC,aAAa,GAAGL,iBAAA,CAAAM,KAAK,CAAC,aAAa,CAAC;EAE1C,MAAM;IAAEC,IAAI,GAAGF,aAAa;IAAEG,KAAK;IAAEC,YAAY;IAAEC,QAAQ;IAAEC,MAAM,GAAG,UAAU;IAAEC,QAAQ;IAAEC;EAAQ,CAAE,GAAGV,KAAK;EAE9G,OAAO;IACLQ,MAAM;IACNJ,IAAI;IACJC,KAAK;IACLC,YAAY;IACZC,QAAQ;IACRG,QAAQ;IACRC,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAE;MACJX,GAAG;MACHY,IAAI,EAAE,YAAY;MAClB,GAAGhB,iBAAA,CAAAiB,qBAAqB,CAAC,KAAK,EAAEd,KAAK,EAAE,sBAAuB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;MACnFS,QAAQ,EAAEZ,iBAAA,CAAAkB,gBAAgB,CAACC,EAAE,IAAG;QAC9B,IACEP,QAAQ,IACRZ,iBAAA,CAAAoB,aAAa,CAACD,EAAE,CAACE,MAAM,EAAE;UAAEC,eAAe,EAAE;QAAkB,CAAE,CAAC,IACjEH,EAAE,CAACE,MAAM,CAACE,IAAI,KAAK,OAAO,EAC1B;UACAX,QAAQ,CAACO,EAAE,EAAE;YAAEX,KAAK,EAAEW,EAAE,CAACE,MAAM,CAACb;UAAK,CAAE,CAAC;;MAE5C,CAAC;;GAEJ;AACH,CAAC;AA9BYgB,OAAA,CAAAtB,sBAAsB,GAAAA,sBAAA"}
1
+ {"version":3,"sources":["../../../lib/components/RadioGroup/useRadioGroup.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, isHTMLElement, useEventCallback, useId } from '@fluentui/react-utilities';\n/**\n * Create the state required to render RadioGroup.\n *\n * The returned state can be modified with hooks such as useRadioGroupStyles_unstable,\n * before being passed to renderRadioGroup_unstable.\n *\n * @param props - props from this instance of RadioGroup\n * @param ref - reference to root HTMLElement of RadioGroup\n */\nexport const useRadioGroup_unstable = (props, ref) => {\n const generatedName = useId('radiogroup-');\n const {\n name = generatedName,\n value,\n defaultValue,\n disabled,\n layout = 'vertical',\n onChange,\n required\n } = props;\n return {\n layout,\n name,\n value,\n defaultValue,\n disabled,\n required,\n components: {\n root: 'div'\n },\n root: {\n ref,\n role: 'radiogroup',\n ...getNativeElementProps('div', props, /*excludedPropNames:*/['onChange', 'name']),\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//# sourceMappingURL=useRadioGroup.js.map"],"names":["useRadioGroup_unstable","props","ref","generatedName","useId","name","value","defaultValue","disabled","layout","onChange","required","components","root","role","getNativeElementProps","useEventCallback","ev","isHTMLElement","target","constructorName","type"],"mappings":";;;;+BAWaA;;aAAAA;;;6DAXU;gCACuD;AAUvE,MAAMA,yBAAyB,CAACC,OAAOC,MAAQ;IACpD,MAAMC,gBAAgBC,IAAAA,qBAAK,EAAC;IAC5B,MAAM,EACJC,MAAOF,cAAa,EACpBG,MAAK,EACLC,aAAY,EACZC,SAAQ,EACRC,QAAS,WAAU,EACnBC,SAAQ,EACRC,SAAQ,EACT,GAAGV;IACJ,OAAO;QACLQ;QACAJ;QACAC;QACAC;QACAC;QACAG;QACAC,YAAY;YACVC,MAAM;QACR;QACAA,MAAM;YACJX;YACAY,MAAM;YACN,GAAGC,IAAAA,qCAAqB,EAAC,OAAOd,OAAO,oBAAoB,GAAE;gBAAC;gBAAY;aAAO,CAAC;YAClFS,UAAUM,IAAAA,gCAAgB,EAACC,CAAAA,KAAM;gBAC/B,IAAIP,YAAYQ,IAAAA,6BAAa,EAACD,GAAGE,MAAM,EAAE;oBACvCC,iBAAiB;gBACnB,MAAMH,GAAGE,MAAM,CAACE,IAAI,KAAK,SAAS;oBAChCX,SAASO,IAAI;wBACXX,OAAOW,GAAGE,MAAM,CAACb,KAAK;oBACxB;gBACF,CAAC;YACH;QACF;IACF;AACF,GACA,yCAAyC"}