@fluentui/react-radio 9.0.13 → 9.0.15

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,99 @@
2
2
  "name": "@fluentui/react-radio",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 05 Dec 2022 18:25:27 GMT",
5
+ "date": "Wed, 21 Dec 2022 10:17:13 GMT",
6
+ "tag": "@fluentui/react-radio_v9.0.15",
7
+ "version": "9.0.15",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "author": "behowell@microsoft.com",
12
+ "package": "@fluentui/react-radio",
13
+ "commit": "68505ab8eb1b05f45ab09c21b9d66c177d1e50f5",
14
+ "comment": "chore: Add bundle size tests for Fields"
15
+ }
16
+ ],
17
+ "patch": [
18
+ {
19
+ "author": "beachball",
20
+ "package": "@fluentui/react-radio",
21
+ "comment": "Bump @fluentui/react-field to v9.0.0-alpha.12",
22
+ "commit": "66bf89f634cad4a275e957d7a2214c7e73ff8c2e"
23
+ },
24
+ {
25
+ "author": "beachball",
26
+ "package": "@fluentui/react-radio",
27
+ "comment": "Bump @fluentui/react-label to v9.0.14",
28
+ "commit": "66bf89f634cad4a275e957d7a2214c7e73ff8c2e"
29
+ },
30
+ {
31
+ "author": "beachball",
32
+ "package": "@fluentui/react-radio",
33
+ "comment": "Bump @fluentui/react-tabster to v9.3.4",
34
+ "commit": "66bf89f634cad4a275e957d7a2214c7e73ff8c2e"
35
+ },
36
+ {
37
+ "author": "beachball",
38
+ "package": "@fluentui/react-radio",
39
+ "comment": "Bump @fluentui/react-theme to v9.1.5",
40
+ "commit": "66bf89f634cad4a275e957d7a2214c7e73ff8c2e"
41
+ }
42
+ ]
43
+ }
44
+ },
45
+ {
46
+ "date": "Tue, 20 Dec 2022 14:59:28 GMT",
47
+ "tag": "@fluentui/react-radio_v9.0.14",
48
+ "version": "9.0.14",
49
+ "comments": {
50
+ "patch": [
51
+ {
52
+ "author": "behowell@microsoft.com",
53
+ "package": "@fluentui/react-radio",
54
+ "commit": "9c6efea1aea75e3e0d7355a729785ade9af638c5",
55
+ "comment": "chore: Update Radio to use griffel reset styles"
56
+ },
57
+ {
58
+ "author": "beachball",
59
+ "package": "@fluentui/react-radio",
60
+ "comment": "Bump @fluentui/react-context-selector to v9.1.3",
61
+ "commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
62
+ },
63
+ {
64
+ "author": "beachball",
65
+ "package": "@fluentui/react-radio",
66
+ "comment": "Bump @fluentui/react-field to v9.0.0-alpha.11",
67
+ "commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
68
+ },
69
+ {
70
+ "author": "beachball",
71
+ "package": "@fluentui/react-radio",
72
+ "comment": "Bump @fluentui/react-label to v9.0.13",
73
+ "commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
74
+ },
75
+ {
76
+ "author": "beachball",
77
+ "package": "@fluentui/react-radio",
78
+ "comment": "Bump @fluentui/react-tabster to v9.3.3",
79
+ "commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
80
+ },
81
+ {
82
+ "author": "beachball",
83
+ "package": "@fluentui/react-radio",
84
+ "comment": "Bump @fluentui/react-theme to v9.1.4",
85
+ "commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
86
+ },
87
+ {
88
+ "author": "beachball",
89
+ "package": "@fluentui/react-radio",
90
+ "comment": "Bump @fluentui/react-utilities to v9.3.0",
91
+ "commit": "e7530bc179fd0e303448083c76a4af41a0e15322"
92
+ }
93
+ ]
94
+ }
95
+ },
96
+ {
97
+ "date": "Mon, 05 Dec 2022 18:29:29 GMT",
6
98
  "tag": "@fluentui/react-radio_v9.0.13",
7
99
  "version": "9.0.13",
8
100
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,39 @@
1
1
  # Change Log - @fluentui/react-radio
2
2
 
3
- This log was last generated on Mon, 05 Dec 2022 18:25:27 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 21 Dec 2022 10:17:13 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.0.15)
8
+
9
+ Wed, 21 Dec 2022 10:17:13 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.0.14..@fluentui/react-radio_v9.0.15)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-field to v9.0.0-alpha.12 ([commit](https://github.com/microsoft/fluentui/commit/66bf89f634cad4a275e957d7a2214c7e73ff8c2e) by beachball)
15
+ - Bump @fluentui/react-label to v9.0.14 ([commit](https://github.com/microsoft/fluentui/commit/66bf89f634cad4a275e957d7a2214c7e73ff8c2e) by beachball)
16
+ - Bump @fluentui/react-tabster to v9.3.4 ([commit](https://github.com/microsoft/fluentui/commit/66bf89f634cad4a275e957d7a2214c7e73ff8c2e) by beachball)
17
+ - Bump @fluentui/react-theme to v9.1.5 ([commit](https://github.com/microsoft/fluentui/commit/66bf89f634cad4a275e957d7a2214c7e73ff8c2e) by beachball)
18
+
19
+ ## [9.0.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.0.14)
20
+
21
+ Tue, 20 Dec 2022 14:59:28 GMT
22
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.0.13..@fluentui/react-radio_v9.0.14)
23
+
24
+ ### Patches
25
+
26
+ - chore: Update Radio to use griffel reset styles ([PR #25984](https://github.com/microsoft/fluentui/pull/25984) by behowell@microsoft.com)
27
+ - Bump @fluentui/react-context-selector to v9.1.3 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
28
+ - Bump @fluentui/react-field to v9.0.0-alpha.11 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
29
+ - Bump @fluentui/react-label to v9.0.13 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
30
+ - Bump @fluentui/react-tabster to v9.3.3 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
31
+ - Bump @fluentui/react-theme to v9.1.4 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
32
+ - Bump @fluentui/react-utilities to v9.3.0 ([PR #26047](https://github.com/microsoft/fluentui/pull/26047) by beachball)
33
+
7
34
  ## [9.0.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.0.13)
8
35
 
9
- Mon, 05 Dec 2022 18:25:27 GMT
36
+ Mon, 05 Dec 2022 18:29:29 GMT
10
37
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.0.12..@fluentui/react-radio_v9.0.13)
11
38
 
12
39
  ### Patches
@@ -1,6 +1,6 @@
1
1
  import { createFocusOutlineStyle } from '@fluentui/react-tabster';
2
2
  import { tokens } from '@fluentui/react-theme';
3
- import { __styles, mergeClasses, shorthands } from '@griffel/react';
3
+ import { __resetStyles, __styles, mergeClasses, shorthands } from '@griffel/react';
4
4
  export const radioClassNames = {
5
5
  root: 'fui-Radio',
6
6
  indicator: 'fui-Radio__indicator',
@@ -9,156 +9,31 @@ export const radioClassNames = {
9
9
  }; // The indicator size is used by the indicator and label styles
10
10
 
11
11
  const indicatorSize = '16px';
12
- /**
13
- * Styles for the root slot
14
- */
12
+
13
+ const 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;}"]);
15
14
 
16
15
  const useRootStyles = /*#__PURE__*/__styles({
17
- "base": {
18
- "mc9l5x": "ftuwxu6",
19
- "qhf8xq": "f10pi13n"
20
- },
21
16
  "vertical": {
22
17
  "Beiy3e4": "f1vx9l62",
23
18
  "Bt984gj": "f122n59"
24
- },
25
- "focusIndicator": {
26
- "Brovlpu": "ftqa4ok",
27
- "B486eqv": "f2hkw1w",
28
- "Bssx7fj": "f1b1k54r",
29
- "uh7if5": ["f4ne723", "fqqcjud"],
30
- "clntm0": "fh7aioi",
31
- "Dlk2r6": ["fqqcjud", "f4ne723"],
32
- "B2j2mmj": "ffht0p2",
33
- "wigs8": "f1p0ul1q",
34
- "pbfy6t": "f1c901ms",
35
- "B0v4ure": "f1alokd7",
36
- "ghq09": "f78i1la",
37
- "B24cy0v": ["f1kvsw7t", "f1bw8brt"],
38
- "Bwckmig": "f8k7e5g",
39
- "Bvwlmkc": ["f1bw8brt", "f1kvsw7t"],
40
- "Bbgo44z": "f1pmxfrl",
41
- "Bil7v7r": ["fszkfcr", "f1ap5ily"],
42
- "skfxo0": "f57dp0y",
43
- "jo1ztg": ["f1ap5ily", "fszkfcr"],
44
- "Ba3ybja": ["f11dm2qb", "f136rfnd"],
45
- "az1dzo": ["f136rfnd", "f11dm2qb"],
46
- "vppk2z": ["fdsq1qd", "f1khssms"],
47
- "B6352mv": ["f1khssms", "fdsq1qd"],
48
- "nr063g": "fq4eyks",
49
- "Blmvk6g": ["f1ya6x16", "ftuszwa"],
50
- "Bsiemmq": "f1e2iu44",
51
- "B98u21t": ["ftuszwa", "f1ya6x16"],
52
- "B2pnrqr": "f1xkdug0",
53
- "Bhhzhcn": "f1m1ywml",
54
- "Bec0n69": ["f7u4kgv", "f1a36mvi"],
55
- "B29w5g4": ["f1a36mvi", "f7u4kgv"]
56
19
  }
57
20
  }, {
58
- "d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f10pi13n{position:relative;}", ".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;}", ".f1b1k54r[data-fui-focus-within]:focus-within{border-top-color:transparent;}", ".f4ne723[data-fui-focus-within]:focus-within{border-right-color:transparent;}", ".fqqcjud[data-fui-focus-within]:focus-within{border-left-color:transparent;}", ".fh7aioi[data-fui-focus-within]:focus-within{border-bottom-color:transparent;}", ".ffht0p2[data-fui-focus-within]:focus-within::after{content:\"\";}", ".f1p0ul1q[data-fui-focus-within]:focus-within::after{position:absolute;}", ".f1c901ms[data-fui-focus-within]:focus-within::after{pointer-events:none;}", ".f1alokd7[data-fui-focus-within]:focus-within::after{z-index:1;}", ".f78i1la[data-fui-focus-within]:focus-within::after{border-top-style:solid;}", ".f1kvsw7t[data-fui-focus-within]:focus-within::after{border-right-style:solid;}", ".f1bw8brt[data-fui-focus-within]:focus-within::after{border-left-style:solid;}", ".f8k7e5g[data-fui-focus-within]:focus-within::after{border-bottom-style:solid;}", ".f1pmxfrl[data-fui-focus-within]:focus-within::after{border-top-width:2px;}", ".fszkfcr[data-fui-focus-within]:focus-within::after{border-right-width:2px;}", ".f1ap5ily[data-fui-focus-within]:focus-within::after{border-left-width:2px;}", ".f57dp0y[data-fui-focus-within]:focus-within::after{border-bottom-width:2px;}", ".f11dm2qb[data-fui-focus-within]:focus-within::after{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f136rfnd[data-fui-focus-within]:focus-within::after{border-bottom-left-radius:var(--borderRadiusMedium);}", ".fdsq1qd[data-fui-focus-within]:focus-within::after{border-top-right-radius:var(--borderRadiusMedium);}", ".f1khssms[data-fui-focus-within]:focus-within::after{border-top-left-radius:var(--borderRadiusMedium);}", ".fq4eyks[data-fui-focus-within]:focus-within::after{border-top-color:var(--colorStrokeFocus2);}", ".f1ya6x16[data-fui-focus-within]:focus-within::after{border-right-color:var(--colorStrokeFocus2);}", ".ftuszwa[data-fui-focus-within]:focus-within::after{border-left-color:var(--colorStrokeFocus2);}", ".f1e2iu44[data-fui-focus-within]:focus-within::after{border-bottom-color:var(--colorStrokeFocus2);}", ".f1xkdug0[data-fui-focus-within]:focus-within::after{top:-2px;}", ".f1m1ywml[data-fui-focus-within]:focus-within::after{bottom:-2px;}", ".f7u4kgv[data-fui-focus-within]:focus-within::after{left:-2px;}", ".f1a36mvi[data-fui-focus-within]:focus-within::after{right:-2px;}"],
59
- "f": [".ftqa4ok:focus{outline-style:none;}"],
60
- "i": [".f2hkw1w:focus-visible{outline-style:none;}"]
21
+ "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;}"]
61
22
  });
62
23
 
24
+ const 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);}"]);
25
+
63
26
  const useInputStyles = /*#__PURE__*/__styles({
64
- "base": {
65
- "qhf8xq": "f1euv43f",
66
- "oyh7mz": ["f1vgc2s3", "f1e31b4d"],
67
- "Bhzewxz": "f15twtuk",
68
- "a9b677": "fly5x3f",
69
- "Bqenvij": "f1l02sjl",
70
- "B7ck84d": "f1ewtqcl",
71
- "B6of3ja": "f1hu3pq6",
72
- "t21cq0": ["f11qmguv", "f1tyq0we"],
73
- "jrapky": "f19f4twv",
74
- "Frg6f3": ["f1tyq0we", "f11qmguv"],
75
- "abs64n": "fk73vx1",
76
- "By9lhj9": "fg45n87",
77
- "G3n25n": "flqpbns",
78
- "Bojc29n": "fhb1dn5",
79
- "p8xby4": "fiegpko",
80
- "Bmzgt9v": "fdi60kf",
81
- "un08vv": ["fz3jc1r", "f1fwo01y"],
82
- "Bluxpkm": "f1m2gv5u",
83
- "upm9ap": ["f1fwo01y", "fz3jc1r"],
84
- "Bv6ccmg": "ft7ju8s",
85
- "w6pjei": "f1ofw0le",
86
- "drfev3": ["fothmfx", "f13qgzgl"],
87
- "ujr3xk": "fp5vmb3",
88
- "Bib2mth": ["f13qgzgl", "fothmfx"],
89
- "za2ojl": "f1snis2b",
90
- "Bu1fve0": "ff9psms",
91
- "B42z6en": ["f1fg9ko4", "fqj7xkg"],
92
- "mosl6v": "f1vebft2",
93
- "e3wlmb": ["fqj7xkg", "f1fg9ko4"],
94
- "swj8lc": "f1vtc7ej",
95
- "kbzjta": "f1fj62aq",
96
- "Bnazurh": ["fc4i2ph", "f137d5x6"],
97
- "Enz1qu": "f1v2xs8c",
98
- "B4rl0r3": ["f137d5x6", "fc4i2ph"],
99
- "oi7lcb": "f14bpgh5",
100
- "bwebxt": "f1ariq71",
101
- "ax4tcq": ["fu58av6", "f1qj5h2v"],
102
- "z2by79": "fptcwjq",
103
- "Bpz2hdf": ["f1qj5h2v", "fu58av6"],
104
- "Btliz3o": "filss48",
105
- "Bre5bwy": "frtrqgn",
106
- "Bayw8dt": ["f1v1lrlm", "fapcpph"],
107
- "lb5vkw": "f49ptgb",
108
- "yhmu5n": ["fapcpph", "f1v1lrlm"],
109
- "Blcfbx4": "fgnwcez",
110
- "yksgid": "f1l3wt4b",
111
- "B59a1ph": "f16lpvpn",
112
- "B78hamy": "fdubm5j",
113
- "t61w4e": ["f11to73e", "f9u8p8h"],
114
- "Dvncu9": "fw62pkm",
115
- "qbflri": ["f9u8p8h", "f11to73e"],
116
- "Byzt4r9": "fqaqzd4"
117
- },
118
- "after": {
119
- "a9b677": "fwr58v7"
120
- },
121
27
  "below": {
28
+ "a9b677": "fly5x3f",
122
29
  "Bqenvij": "f1je6zif"
123
30
  }
124
31
  }, {
125
- "d": [".f1euv43f{position:absolute;}", ".f1vgc2s3{left:0;}", ".f1e31b4d{right:0;}", ".f15twtuk{top:0;}", ".fly5x3f{width:100%;}", ".f1l02sjl{height:100%;}", ".f1ewtqcl{box-sizing:border-box;}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".fk73vx1{opacity:0;}", ".fg45n87:enabled{cursor:pointer;}", ".flqpbns:enabled~.fui-Radio__label{cursor:pointer;}", ".fhb1dn5:not(:checked)~.fui-Radio__indicator>*{opacity:0;}", ".fiegpko:enabled:not(:checked)~.fui-Radio__label{color:var(--colorNeutralForeground3);}", ".fdi60kf:enabled:not(:checked)~.fui-Radio__indicator{border-top-color:var(--colorNeutralStrokeAccessible);}", ".fz3jc1r:enabled:not(:checked)~.fui-Radio__indicator{border-right-color:var(--colorNeutralStrokeAccessible);}", ".f1fwo01y:enabled:not(:checked)~.fui-Radio__indicator{border-left-color:var(--colorNeutralStrokeAccessible);}", ".f1m2gv5u:enabled:not(:checked)~.fui-Radio__indicator{border-bottom-color:var(--colorNeutralStrokeAccessible);}", ".ft7ju8s:enabled:not(:checked):hover~.fui-Radio__label{color:var(--colorNeutralForeground2);}", ".f1ofw0le:enabled:not(:checked):hover~.fui-Radio__indicator{border-top-color:var(--colorNeutralStrokeAccessibleHover);}", ".fothmfx:enabled:not(:checked):hover~.fui-Radio__indicator{border-right-color:var(--colorNeutralStrokeAccessibleHover);}", ".f13qgzgl:enabled:not(:checked):hover~.fui-Radio__indicator{border-left-color:var(--colorNeutralStrokeAccessibleHover);}", ".fp5vmb3:enabled:not(:checked):hover~.fui-Radio__indicator{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1snis2b:enabled:not(:checked):hover:active~.fui-Radio__label{color:var(--colorNeutralForeground1);}", ".ff9psms:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-top-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f1fg9ko4:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-right-color:var(--colorNeutralStrokeAccessiblePressed);}", ".fqj7xkg:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-left-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f1vebft2:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f1vtc7ej:enabled:checked~.fui-Radio__label{color:var(--colorNeutralForeground1);}", ".f1fj62aq:enabled:checked~.fui-Radio__indicator{border-top-color:var(--colorCompoundBrandStroke);}", ".fc4i2ph:enabled:checked~.fui-Radio__indicator{border-right-color:var(--colorCompoundBrandStroke);}", ".f137d5x6:enabled:checked~.fui-Radio__indicator{border-left-color:var(--colorCompoundBrandStroke);}", ".f1v2xs8c:enabled:checked~.fui-Radio__indicator{border-bottom-color:var(--colorCompoundBrandStroke);}", ".f14bpgh5:enabled:checked~.fui-Radio__indicator{color:var(--colorCompoundBrandForeground1);}", ".f1ariq71:enabled:checked:hover~.fui-Radio__indicator{border-top-color:var(--colorCompoundBrandStrokeHover);}", ".fu58av6:enabled:checked:hover~.fui-Radio__indicator{border-right-color:var(--colorCompoundBrandStrokeHover);}", ".f1qj5h2v:enabled:checked:hover~.fui-Radio__indicator{border-left-color:var(--colorCompoundBrandStrokeHover);}", ".fptcwjq:enabled:checked:hover~.fui-Radio__indicator{border-bottom-color:var(--colorCompoundBrandStrokeHover);}", ".filss48:enabled:checked:hover~.fui-Radio__indicator{color:var(--colorCompoundBrandForeground1Hover);}", ".frtrqgn:enabled:checked:hover:active~.fui-Radio__indicator{border-top-color:var(--colorCompoundBrandStrokePressed);}", ".f1v1lrlm:enabled:checked:hover:active~.fui-Radio__indicator{border-right-color:var(--colorCompoundBrandStrokePressed);}", ".fapcpph:enabled:checked:hover:active~.fui-Radio__indicator{border-left-color:var(--colorCompoundBrandStrokePressed);}", ".f49ptgb:enabled:checked:hover:active~.fui-Radio__indicator{border-bottom-color:var(--colorCompoundBrandStrokePressed);}", ".fgnwcez:enabled:checked:hover:active~.fui-Radio__indicator{color:var(--colorCompoundBrandForeground1Pressed);}", ".f1l3wt4b:disabled~.fui-Radio__label{color:var(--colorNeutralForegroundDisabled);}", ".f16lpvpn:disabled~.fui-Radio__label{cursor:default;}", ".fdubm5j:disabled~.fui-Radio__indicator{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f11to73e:disabled~.fui-Radio__indicator{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f9u8p8h:disabled~.fui-Radio__indicator{border-left-color:var(--colorNeutralStrokeDisabled);}", ".fw62pkm:disabled~.fui-Radio__indicator{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".fqaqzd4:disabled~.fui-Radio__indicator{color:var(--colorNeutralForegroundDisabled);}", ".fwr58v7{width:calc(16px + 2 * var(--spacingHorizontalS));}", ".f1je6zif{height:calc(16px + 2 * var(--spacingVerticalS));}"]
32
+ "d": [".fly5x3f{width:100%;}", ".f1je6zif{height:calc(16px + 2 * var(--spacingVerticalS));}"]
126
33
  });
127
34
 
128
- const useIndicatorStyles = /*#__PURE__*/__styles({
129
- "base": {
130
- "a9b677": "fjw5fx7",
131
- "Bqenvij": "fd461yt",
132
- "Be2twd7": "f1ugzwwg",
133
- "B7ck84d": "f1ewtqcl",
134
- "Bnnss6s": "fi64zpg",
135
- "mc9l5x": "f22iagw",
136
- "Bt984gj": "f122n59",
137
- "Brf1p80": "f4d9j23",
138
- "B68tc82": "f1p9o1ba",
139
- "Bmxbyg5": "f1sil6mw",
140
- "B4j52fo": "f192inf7",
141
- "Bekrc4i": ["f5tn483", "f1ojsxk5"],
142
- "Bn0qgzm": "f1vxd6vx",
143
- "ibv6hh": ["f1ojsxk5", "f5tn483"],
144
- "icvyot": "fzkkow9",
145
- "vrafjx": ["fcdblym", "fjik90z"],
146
- "oivjwe": "fg706s2",
147
- "wvpqe5": ["fjik90z", "fcdblym"],
148
- "Bbmb7ep": ["f8fbkgy", "f1nfllo7"],
149
- "Beyfa6y": ["f1nfllo7", "f8fbkgy"],
150
- "B7oj6ja": ["f1djnp8u", "f1s8kh49"],
151
- "Btl43ni": ["f1s8kh49", "f1djnp8u"],
152
- "B6of3ja": "frnwi6n",
153
- "t21cq0": ["f1vcna3q", "foyynoy"],
154
- "jrapky": "fqcjy3b",
155
- "Frg6f3": ["foyynoy", "f1vcna3q"],
156
- "Bkfmm31": "f1w9h62z",
157
- "Bkecrkj": "f1aehjj5"
158
- }
159
- }, {
160
- "d": [".fjw5fx7{width:16px;}", ".fd461yt{height:16px;}", ".f1ugzwwg{font-size:12px;}", ".f1ewtqcl{box-sizing:border-box;}", ".fi64zpg{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".f8fbkgy{border-bottom-right-radius:var(--borderRadiusCircular);}", ".f1nfllo7{border-bottom-left-radius:var(--borderRadiusCircular);}", ".f1djnp8u{border-top-right-radius:var(--borderRadiusCircular);}", ".f1s8kh49{border-top-left-radius:var(--borderRadiusCircular);}", ".frnwi6n{margin-top:var(--spacingVerticalS);}", ".f1vcna3q{margin-right:var(--spacingHorizontalS);}", ".foyynoy{margin-left:var(--spacingHorizontalS);}", ".fqcjy3b{margin-bottom:var(--spacingVerticalS);}", ".f1w9h62z{fill:currentColor;}", ".f1aehjj5{pointer-events:none;}"]
161
- });
35
+ const 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;}"]); // Can't use makeResetStyles here because Label is a component that may itself use makeResetStyles.
36
+
162
37
 
163
38
  const useLabelStyles = /*#__PURE__*/__styles({
164
39
  "base": {
@@ -189,12 +64,14 @@ export const useRadioStyles_unstable = state => {
189
64
  const {
190
65
  labelPosition
191
66
  } = state;
67
+ const rootBaseClassName = useRootBaseClassName();
192
68
  const rootStyles = useRootStyles();
193
- state.root.className = mergeClasses(radioClassNames.root, rootStyles.base, rootStyles.focusIndicator, labelPosition === 'below' && rootStyles.vertical, state.root.className);
69
+ state.root.className = mergeClasses(radioClassNames.root, rootBaseClassName, labelPosition === 'below' && rootStyles.vertical, state.root.className);
70
+ const inputBaseClassName = useInputBaseClassName();
194
71
  const inputStyles = useInputStyles();
195
- state.input.className = mergeClasses(radioClassNames.input, inputStyles.base, inputStyles[labelPosition], state.input.className);
196
- const indicatorStyles = useIndicatorStyles();
197
- state.indicator.className = mergeClasses(radioClassNames.indicator, indicatorStyles.base, state.indicator.className);
72
+ state.input.className = mergeClasses(radioClassNames.input, inputBaseClassName, labelPosition === 'below' && inputStyles.below, state.input.className);
73
+ const indicatorBaseClassName = useIndicatorBaseClassName();
74
+ state.indicator.className = mergeClasses(radioClassNames.indicator, indicatorBaseClassName, state.indicator.className);
198
75
  const labelStyles = useLabelStyles();
199
76
 
200
77
  if (state.label) {
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-radio/src/components/Radio/useRadioStyles.ts"],"names":[],"mappings":"AAAA,SAAS,uBAAT,QAAwC,yBAAxC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AACA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AAIA,OAAO,MAAM,eAAe,GAA+B;EACzD,IAAI,EAAE,WADmD;EAEzD,SAAS,EAAE,sBAF8C;EAGzD,KAAK,EAAE,kBAHkD;EAIzD,KAAK,EAAE;AAJkD,CAApD,C,CAOP;;AACA,MAAM,aAAa,GAAG,MAAtB;AAEA;;AAEG;;AACH,MAAM,aAAa,gBAAG;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;EAAA;AAAA,EAAtB;;AAcA,MAAM,cAAc,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA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AAY,CAAC,eAAe,CAAC,SAAjB,EAA4B,eAAe,CAAC,IAA5C,EAAkD,KAAK,CAAC,SAAN,CAAgB,SAAlE,CAAxC;EAEA,MAAM,WAAW,GAAG,cAAc,EAAlC;;EACA,IAAI,KAAK,CAAC,KAAV,EAAiB;IACf,KAAK,CAAC,KAAN,CAAY,SAAZ,GAAwB,YAAY,CAClC,eAAe,CAAC,KADkB,EAElC,WAAW,CAAC,IAFsB,EAGlC,WAAW,CAAC,aAAD,CAHuB,EAIlC,KAAK,CAAC,KAAN,CAAY,SAJsB,CAApC;EAMD;AACF,CAhCM","sourcesContent":["import { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { 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\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n base: {\n display: 'inline-flex',\n position: 'relative',\n },\n\n vertical: {\n flexDirection: 'column',\n alignItems: 'center',\n },\n\n focusIndicator: createFocusOutlineStyle({ style: {}, selector: 'focus-within' }),\n});\n\nconst useInputStyles = makeStyles({\n base: {\n position: 'absolute',\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n boxSizing: 'border-box',\n ...shorthands.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 ...shorthands.borderColor(tokens.colorNeutralStrokeAccessible),\n },\n\n ':hover': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground2,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessibleHover),\n },\n },\n\n ':hover:active': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground1,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n ...shorthands.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 ...shorthands.borderColor(tokens.colorCompoundBrandStroke),\n color: tokens.colorCompoundBrandForeground1,\n },\n\n ':hover': {\n [`& ~ .${radioClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStrokeHover),\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n },\n\n ':hover:active': {\n [`& ~ .${radioClassNames.indicator}`]: {\n ...shorthands.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 ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n },\n\n after: {\n width: `calc(${indicatorSize} + 2 * ${tokens.spacingHorizontalS})`,\n },\n below: {\n height: `calc(${indicatorSize} + 2 * ${tokens.spacingVerticalS})`,\n },\n});\n\nconst useIndicatorStyles = makeStyles({\n base: {\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 ...shorthands.overflow('hidden'),\n\n ...shorthands.border(tokens.strokeWidthThin, 'solid'),\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n ...shorthands.margin(tokens.spacingVerticalS, tokens.spacingHorizontalS),\n fill: 'currentColor',\n pointerEvents: 'none',\n },\n});\n\nconst useLabelStyles = makeStyles({\n base: {\n alignSelf: 'center',\n\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 rootStyles = useRootStyles();\n state.root.className = mergeClasses(\n radioClassNames.root,\n rootStyles.base,\n rootStyles.focusIndicator,\n labelPosition === 'below' && rootStyles.vertical,\n state.root.className,\n );\n\n const inputStyles = useInputStyles();\n state.input.className = mergeClasses(\n radioClassNames.input,\n inputStyles.base,\n inputStyles[labelPosition],\n state.input.className,\n );\n\n const indicatorStyles = useIndicatorStyles();\n state.indicator.className = mergeClasses(radioClassNames.indicator, indicatorStyles.base, state.indicator.className);\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"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-radio/src/components/Radio/useRadioStyles.ts"],"names":[],"mappings":"AAAA,SAAS,uBAAT,QAA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,EAGlC,aAAa,KAAK,OAAlB,IAA6B,WAAW,CAAC,KAHP,EAIlC,KAAK,CAAC,KAAN,CAAY,SAJsB,CAApC;EAOA,MAAM,sBAAsB,GAAG,yBAAyB,EAAxD;EACA,KAAK,CAAC,SAAN,CAAgB,SAAhB,GAA4B,YAAY,CACtC,eAAe,CAAC,SADsB,EAEtC,sBAFsC,EAGtC,KAAK,CAAC,SAAN,CAAgB,SAHsB,CAAxC;EAMA,MAAM,WAAW,GAAG,cAAc,EAAlC;;EACA,IAAI,KAAK,CAAC,KAAV,EAAiB;IACf,KAAK,CAAC,KAAN,CAAY,SAAZ,GAAwB,YAAY,CAClC,eAAe,CAAC,KADkB,EAElC,WAAW,CAAC,IAFsB,EAGlC,WAAW,CAAC,aAAD,CAHuB,EAIlC,KAAK,CAAC,KAAN,CAAY,SAJsB,CAApC;EAMD;AACF,CArCM","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"],"sourceRoot":"../src/"}
@@ -11,80 +11,116 @@ define(["require", "exports", "tslib", "@fluentui/react-tabster", "@fluentui/rea
11
11
  };
12
12
  // The indicator size is used by the indicator and label styles
13
13
  var indicatorSize = '16px';
14
- /**
15
- * Styles for the root slot
16
- */
14
+ var useRootBaseClassName = react_1.makeResetStyles(tslib_1.__assign({ display: 'inline-flex', position: 'relative' }, react_tabster_1.createFocusOutlineStyle({ style: {}, selector: 'focus-within' })));
17
15
  var useRootStyles = react_1.makeStyles({
18
- base: {
19
- display: 'inline-flex',
20
- position: 'relative',
21
- },
22
16
  vertical: {
23
17
  flexDirection: 'column',
24
18
  alignItems: 'center',
25
19
  },
26
- focusIndicator: react_tabster_1.createFocusOutlineStyle({ style: {}, selector: 'focus-within' }),
27
20
  });
28
- var useInputStyles = react_1.makeStyles({
29
- base: tslib_1.__assign(tslib_1.__assign({ position: 'absolute', left: 0, top: 0, width: '100%', height: '100%', boxSizing: 'border-box' }, react_1.shorthands.margin(0)), (_a = { opacity: 0, ':enabled': (_b = {
30
- cursor: 'pointer'
31
- },
32
- _b["& ~ ." + exports.radioClassNames.label] = {
33
- cursor: 'pointer',
34
- },
35
- _b) }, _a[":not(:checked) ~ ." + exports.radioClassNames.indicator + " > *"] = {
21
+ var useInputBaseClassName = react_1.makeResetStyles((_a = {
22
+ position: 'absolute',
23
+ left: 0,
24
+ top: 0,
25
+ width: "calc(" + indicatorSize + " + 2 * " + react_theme_1.tokens.spacingHorizontalS + ")",
26
+ height: '100%',
27
+ boxSizing: 'border-box',
28
+ margin: 0,
29
+ opacity: 0,
30
+ ':enabled': (_b = {
31
+ cursor: 'pointer'
32
+ },
33
+ _b["& ~ ." + exports.radioClassNames.label] = {
34
+ cursor: 'pointer',
35
+ },
36
+ _b)
37
+ },
38
+ // When unchecked, hide the circle icon (child of the indicator)
39
+ _a[":not(:checked) ~ ." + exports.radioClassNames.indicator + " > *"] = {
36
40
  opacity: '0',
37
- },
41
+ },
38
42
  // Colors for the unchecked state
39
43
  _a[':enabled:not(:checked)'] = (_c = {},
40
44
  _c["& ~ ." + exports.radioClassNames.label] = {
41
45
  color: react_theme_1.tokens.colorNeutralForeground3,
42
46
  },
43
- _c["& ~ ." + exports.radioClassNames.indicator] = tslib_1.__assign({}, react_1.shorthands.borderColor(react_theme_1.tokens.colorNeutralStrokeAccessible)),
47
+ _c["& ~ ." + exports.radioClassNames.indicator] = {
48
+ borderColor: react_theme_1.tokens.colorNeutralStrokeAccessible,
49
+ },
44
50
  _c[':hover'] = (_d = {},
45
51
  _d["& ~ ." + exports.radioClassNames.label] = {
46
52
  color: react_theme_1.tokens.colorNeutralForeground2,
47
53
  },
48
- _d["& ~ ." + exports.radioClassNames.indicator] = tslib_1.__assign({}, react_1.shorthands.borderColor(react_theme_1.tokens.colorNeutralStrokeAccessibleHover)),
54
+ _d["& ~ ." + exports.radioClassNames.indicator] = {
55
+ borderColor: react_theme_1.tokens.colorNeutralStrokeAccessibleHover,
56
+ },
49
57
  _d),
50
58
  _c[':hover:active'] = (_e = {},
51
59
  _e["& ~ ." + exports.radioClassNames.label] = {
52
60
  color: react_theme_1.tokens.colorNeutralForeground1,
53
61
  },
54
- _e["& ~ ." + exports.radioClassNames.indicator] = tslib_1.__assign({}, react_1.shorthands.borderColor(react_theme_1.tokens.colorNeutralStrokeAccessiblePressed)),
62
+ _e["& ~ ." + exports.radioClassNames.indicator] = {
63
+ borderColor: react_theme_1.tokens.colorNeutralStrokeAccessiblePressed,
64
+ },
55
65
  _e),
56
- _c),
66
+ _c),
57
67
  // Colors for the checked state
58
68
  _a[':enabled:checked'] = (_f = {},
59
69
  _f["& ~ ." + exports.radioClassNames.label] = {
60
70
  color: react_theme_1.tokens.colorNeutralForeground1,
61
71
  },
62
- _f["& ~ ." + exports.radioClassNames.indicator] = tslib_1.__assign(tslib_1.__assign({}, react_1.shorthands.borderColor(react_theme_1.tokens.colorCompoundBrandStroke)), { color: react_theme_1.tokens.colorCompoundBrandForeground1 }),
72
+ _f["& ~ ." + exports.radioClassNames.indicator] = {
73
+ borderColor: react_theme_1.tokens.colorCompoundBrandStroke,
74
+ color: react_theme_1.tokens.colorCompoundBrandForeground1,
75
+ },
63
76
  _f[':hover'] = (_g = {},
64
- _g["& ~ ." + exports.radioClassNames.indicator] = tslib_1.__assign(tslib_1.__assign({}, react_1.shorthands.borderColor(react_theme_1.tokens.colorCompoundBrandStrokeHover)), { color: react_theme_1.tokens.colorCompoundBrandForeground1Hover }),
77
+ _g["& ~ ." + exports.radioClassNames.indicator] = {
78
+ borderColor: react_theme_1.tokens.colorCompoundBrandStrokeHover,
79
+ color: react_theme_1.tokens.colorCompoundBrandForeground1Hover,
80
+ },
65
81
  _g),
66
82
  _f[':hover:active'] = (_h = {},
67
- _h["& ~ ." + exports.radioClassNames.indicator] = tslib_1.__assign(tslib_1.__assign({}, react_1.shorthands.borderColor(react_theme_1.tokens.colorCompoundBrandStrokePressed)), { color: react_theme_1.tokens.colorCompoundBrandForeground1Pressed }),
83
+ _h["& ~ ." + exports.radioClassNames.indicator] = {
84
+ borderColor: react_theme_1.tokens.colorCompoundBrandStrokePressed,
85
+ color: react_theme_1.tokens.colorCompoundBrandForeground1Pressed,
86
+ },
68
87
  _h),
69
- _f),
88
+ _f),
70
89
  // Colors for the disabled state
71
90
  _a[':disabled'] = (_j = {},
72
91
  _j["& ~ ." + exports.radioClassNames.label] = {
73
92
  color: react_theme_1.tokens.colorNeutralForegroundDisabled,
74
93
  cursor: 'default',
75
94
  },
76
- _j["& ~ ." + exports.radioClassNames.indicator] = tslib_1.__assign(tslib_1.__assign({}, react_1.shorthands.borderColor(react_theme_1.tokens.colorNeutralStrokeDisabled)), { color: react_theme_1.tokens.colorNeutralForegroundDisabled }),
77
- _j), _a)),
78
- after: {
79
- width: "calc(" + indicatorSize + " + 2 * " + react_theme_1.tokens.spacingHorizontalS + ")",
80
- },
95
+ _j["& ~ ." + exports.radioClassNames.indicator] = {
96
+ borderColor: react_theme_1.tokens.colorNeutralStrokeDisabled,
97
+ color: react_theme_1.tokens.colorNeutralForegroundDisabled,
98
+ },
99
+ _j),
100
+ _a));
101
+ var useInputStyles = react_1.makeStyles({
81
102
  below: {
103
+ width: '100%',
82
104
  height: "calc(" + indicatorSize + " + 2 * " + react_theme_1.tokens.spacingVerticalS + ")",
83
105
  },
84
106
  });
85
- var useIndicatorStyles = react_1.makeStyles({
86
- base: tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ width: indicatorSize, height: indicatorSize, fontSize: '12px', boxSizing: 'border-box', flexShrink: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' }, react_1.shorthands.overflow('hidden')), react_1.shorthands.border(react_theme_1.tokens.strokeWidthThin, 'solid')), react_1.shorthands.borderRadius(react_theme_1.tokens.borderRadiusCircular)), react_1.shorthands.margin(react_theme_1.tokens.spacingVerticalS, react_theme_1.tokens.spacingHorizontalS)), { fill: 'currentColor', pointerEvents: 'none' }),
107
+ var useIndicatorBaseClassName = react_1.makeResetStyles({
108
+ width: indicatorSize,
109
+ height: indicatorSize,
110
+ fontSize: '12px',
111
+ boxSizing: 'border-box',
112
+ flexShrink: 0,
113
+ display: 'flex',
114
+ alignItems: 'center',
115
+ justifyContent: 'center',
116
+ overflow: 'hidden',
117
+ border: react_theme_1.tokens.strokeWidthThin + ' solid',
118
+ borderRadius: react_theme_1.tokens.borderRadiusCircular,
119
+ margin: react_theme_1.tokens.spacingVerticalS + ' ' + react_theme_1.tokens.spacingHorizontalS,
120
+ fill: 'currentColor',
121
+ pointerEvents: 'none',
87
122
  });
123
+ // Can't use makeResetStyles here because Label is a component that may itself use makeResetStyles.
88
124
  var useLabelStyles = react_1.makeStyles({
89
125
  base: tslib_1.__assign({ alignSelf: 'center' }, react_1.shorthands.padding(react_theme_1.tokens.spacingVerticalS, react_theme_1.tokens.spacingHorizontalS)),
90
126
  after: {
@@ -104,12 +140,14 @@ define(["require", "exports", "tslib", "@fluentui/react-tabster", "@fluentui/rea
104
140
  */
105
141
  var useRadioStyles_unstable = function (state) {
106
142
  var labelPosition = state.labelPosition;
143
+ var rootBaseClassName = useRootBaseClassName();
107
144
  var rootStyles = useRootStyles();
108
- state.root.className = react_1.mergeClasses(exports.radioClassNames.root, rootStyles.base, rootStyles.focusIndicator, labelPosition === 'below' && rootStyles.vertical, state.root.className);
145
+ state.root.className = react_1.mergeClasses(exports.radioClassNames.root, rootBaseClassName, labelPosition === 'below' && rootStyles.vertical, state.root.className);
146
+ var inputBaseClassName = useInputBaseClassName();
109
147
  var inputStyles = useInputStyles();
110
- state.input.className = react_1.mergeClasses(exports.radioClassNames.input, inputStyles.base, inputStyles[labelPosition], state.input.className);
111
- var indicatorStyles = useIndicatorStyles();
112
- state.indicator.className = react_1.mergeClasses(exports.radioClassNames.indicator, indicatorStyles.base, state.indicator.className);
148
+ state.input.className = react_1.mergeClasses(exports.radioClassNames.input, inputBaseClassName, labelPosition === 'below' && inputStyles.below, state.input.className);
149
+ var indicatorBaseClassName = useIndicatorBaseClassName();
150
+ state.indicator.className = react_1.mergeClasses(exports.radioClassNames.indicator, indicatorBaseClassName, state.indicator.className);
113
151
  var labelStyles = useLabelStyles();
114
152
  if (state.label) {
115
153
  state.label.className = react_1.mergeClasses(exports.radioClassNames.label, labelStyles.base, labelStyles[labelPosition], state.label.className);
@@ -1 +1 @@
1
- {"version":3,"file":"useRadioStyles.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-radio/src/components/Radio/useRadioStyles.ts"],"names":[],"mappings":";;;;;IAMa,QAAA,eAAe,GAA+B;QACzD,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,sBAAsB;QACjC,KAAK,EAAE,kBAAkB;QACzB,KAAK,EAAE,kBAAkB;KAC1B,CAAC;IAEF,+DAA+D;IAC/D,IAAM,aAAa,GAAG,MAAM,CAAC;IAE7B;;OAEG;IACH,IAAM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C,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,oBAAY,CACjC,uBAAe,CAAC,IAAI,EACpB,UAAU,CAAC,IAAI,EACf,UAAU,CAAC,cAAc,EACzB,aAAa,KAAK,OAAO,IAAI,UAAU,CAAC,QAAQ,EAChD,KAAK,CAAC,IAAI,CAAC,SAAS,CACrB,CAAC;QAEF,IAAM,WAAW,GAAG,cAAc,EAAE,CAAC;QACrC,KAAK,CAAC,KAAK,CAAC,SAAS,GAAG,oBAAY,CAClC,uBAAe,CAAC,KAAK,EACrB,WAAW,CAAC,IAAI,EAChB,WAAW,CAAC,aAAa,CAAC,EAC1B,KAAK,CAAC,KAAK,CAAC,SAAS,CACtB,CAAC;QAEF,IAAM,eAAe,GAAG,kBAAkB,EAAE,CAAC;QAC7C,KAAK,CAAC,SAAS,CAAC,SAAS,GAAG,oBAAY,CAAC,uBAAe,CAAC,SAAS,EAAE,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAErH,IAAM,WAAW,GAAG,cAAc,EAAE,CAAC;QACrC,IAAI,KAAK,CAAC,KAAK,EAAE;YACf,KAAK,CAAC,KAAK,CAAC,SAAS,GAAG,oBAAY,CAClC,uBAAe,CAAC,KAAK,EACrB,WAAW,CAAC,IAAI,EAChB,WAAW,CAAC,aAAa,CAAC,EAC1B,KAAK,CAAC,KAAK,CAAC,SAAS,CACtB,CAAC;SACH;IACH,CAAC,CAAC;IAhCW,QAAA,uBAAuB,2BAgClC","sourcesContent":["import { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { 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\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n base: {\n display: 'inline-flex',\n position: 'relative',\n },\n\n vertical: {\n flexDirection: 'column',\n alignItems: 'center',\n },\n\n focusIndicator: createFocusOutlineStyle({ style: {}, selector: 'focus-within' }),\n});\n\nconst useInputStyles = makeStyles({\n base: {\n position: 'absolute',\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n boxSizing: 'border-box',\n ...shorthands.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 ...shorthands.borderColor(tokens.colorNeutralStrokeAccessible),\n },\n\n ':hover': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground2,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessibleHover),\n },\n },\n\n ':hover:active': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground1,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n ...shorthands.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 ...shorthands.borderColor(tokens.colorCompoundBrandStroke),\n color: tokens.colorCompoundBrandForeground1,\n },\n\n ':hover': {\n [`& ~ .${radioClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStrokeHover),\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n },\n\n ':hover:active': {\n [`& ~ .${radioClassNames.indicator}`]: {\n ...shorthands.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 ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n },\n\n after: {\n width: `calc(${indicatorSize} + 2 * ${tokens.spacingHorizontalS})`,\n },\n below: {\n height: `calc(${indicatorSize} + 2 * ${tokens.spacingVerticalS})`,\n },\n});\n\nconst useIndicatorStyles = makeStyles({\n base: {\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 ...shorthands.overflow('hidden'),\n\n ...shorthands.border(tokens.strokeWidthThin, 'solid'),\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n ...shorthands.margin(tokens.spacingVerticalS, tokens.spacingHorizontalS),\n fill: 'currentColor',\n pointerEvents: 'none',\n },\n});\n\nconst useLabelStyles = makeStyles({\n base: {\n alignSelf: 'center',\n\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 rootStyles = useRootStyles();\n state.root.className = mergeClasses(\n radioClassNames.root,\n rootStyles.base,\n rootStyles.focusIndicator,\n labelPosition === 'below' && rootStyles.vertical,\n state.root.className,\n );\n\n const inputStyles = useInputStyles();\n state.input.className = mergeClasses(\n radioClassNames.input,\n inputStyles.base,\n inputStyles[labelPosition],\n state.input.className,\n );\n\n const indicatorStyles = useIndicatorStyles();\n state.indicator.className = mergeClasses(radioClassNames.indicator, indicatorStyles.base, state.indicator.className);\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"]}
1
+ {"version":3,"file":"useRadioStyles.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-radio/src/components/Radio/useRadioStyles.ts"],"names":[],"mappings":";;;;;IAMa,QAAA,eAAe,GAA+B;QACzD,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,sBAAsB;QACjC,KAAK,EAAE,kBAAkB;QACzB,KAAK,EAAE,kBAAkB;KAC1B,CAAC;IAEF,+DAA+D;IAC/D,IAAM,aAAa,GAAG,MAAM,CAAC;IAE7B,IAAM,oBAAoB,GAAG,uBAAe,oBAC1C,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,UAAU,IACjB,uCAAuB,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,EACnE,CAAC;IAEH,IAAM,aAAa,GAAG,kBAAU,CAAC;QAC/B,QAAQ,EAAE;YACR,aAAa,EAAE,QAAQ;YACvB,UAAU,EAAE,QAAQ;SACrB;KACF,CAAC,CAAC;IAEH,IAAM,qBAAqB,GAAG,uBAAe;YAC3C,QAAQ,EAAE,UAAU;YACpB,IAAI,EAAE,CAAC;YACP,GAAG,EAAE,CAAC;YACN,KAAK,EAAE,UAAQ,aAAa,eAAU,oBAAM,CAAC,kBAA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GAAG,oBAAY,CACtC,uBAAe,CAAC,SAAS,EACzB,sBAAsB,EACtB,KAAK,CAAC,SAAS,CAAC,SAAS,CAC1B,CAAC;QAEF,IAAM,WAAW,GAAG,cAAc,EAAE,CAAC;QACrC,IAAI,KAAK,CAAC,KAAK,EAAE;YACf,KAAK,CAAC,KAAK,CAAC,SAAS,GAAG,oBAAY,CAClC,uBAAe,CAAC,KAAK,EACrB,WAAW,CAAC,IAAI,EAChB,WAAW,CAAC,aAAa,CAAC,EAC1B,KAAK,CAAC,KAAK,CAAC,SAAS,CACtB,CAAC;SACH;IACH,CAAC,CAAC;IArCW,QAAA,uBAAuB,2BAqClC","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"]}
@@ -19,156 +19,31 @@ exports.radioClassNames = {
19
19
  }; // The indicator size is used by the indicator and label styles
20
20
 
21
21
  const indicatorSize = '16px';
22
- /**
23
- * Styles for the root slot
24
- */
22
+
23
+ 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;}"]);
25
24
 
26
25
  const useRootStyles = /*#__PURE__*/react_1.__styles({
27
- "base": {
28
- "mc9l5x": "ftuwxu6",
29
- "qhf8xq": "f10pi13n"
30
- },
31
26
  "vertical": {
32
27
  "Beiy3e4": "f1vx9l62",
33
28
  "Bt984gj": "f122n59"
34
- },
35
- "focusIndicator": {
36
- "Brovlpu": "ftqa4ok",
37
- "B486eqv": "f2hkw1w",
38
- "Bssx7fj": "f1b1k54r",
39
- "uh7if5": ["f4ne723", "fqqcjud"],
40
- "clntm0": "fh7aioi",
41
- "Dlk2r6": ["fqqcjud", "f4ne723"],
42
- "B2j2mmj": "ffht0p2",
43
- "wigs8": "f1p0ul1q",
44
- "pbfy6t": "f1c901ms",
45
- "B0v4ure": "f1alokd7",
46
- "ghq09": "f78i1la",
47
- "B24cy0v": ["f1kvsw7t", "f1bw8brt"],
48
- "Bwckmig": "f8k7e5g",
49
- "Bvwlmkc": ["f1bw8brt", "f1kvsw7t"],
50
- "Bbgo44z": "f1pmxfrl",
51
- "Bil7v7r": ["fszkfcr", "f1ap5ily"],
52
- "skfxo0": "f57dp0y",
53
- "jo1ztg": ["f1ap5ily", "fszkfcr"],
54
- "Ba3ybja": ["f11dm2qb", "f136rfnd"],
55
- "az1dzo": ["f136rfnd", "f11dm2qb"],
56
- "vppk2z": ["fdsq1qd", "f1khssms"],
57
- "B6352mv": ["f1khssms", "fdsq1qd"],
58
- "nr063g": "fq4eyks",
59
- "Blmvk6g": ["f1ya6x16", "ftuszwa"],
60
- "Bsiemmq": "f1e2iu44",
61
- "B98u21t": ["ftuszwa", "f1ya6x16"],
62
- "B2pnrqr": "f1xkdug0",
63
- "Bhhzhcn": "f1m1ywml",
64
- "Bec0n69": ["f7u4kgv", "f1a36mvi"],
65
- "B29w5g4": ["f1a36mvi", "f7u4kgv"]
66
29
  }
67
30
  }, {
68
- "d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f10pi13n{position:relative;}", ".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;}", ".f1b1k54r[data-fui-focus-within]:focus-within{border-top-color:transparent;}", ".f4ne723[data-fui-focus-within]:focus-within{border-right-color:transparent;}", ".fqqcjud[data-fui-focus-within]:focus-within{border-left-color:transparent;}", ".fh7aioi[data-fui-focus-within]:focus-within{border-bottom-color:transparent;}", ".ffht0p2[data-fui-focus-within]:focus-within::after{content:\"\";}", ".f1p0ul1q[data-fui-focus-within]:focus-within::after{position:absolute;}", ".f1c901ms[data-fui-focus-within]:focus-within::after{pointer-events:none;}", ".f1alokd7[data-fui-focus-within]:focus-within::after{z-index:1;}", ".f78i1la[data-fui-focus-within]:focus-within::after{border-top-style:solid;}", ".f1kvsw7t[data-fui-focus-within]:focus-within::after{border-right-style:solid;}", ".f1bw8brt[data-fui-focus-within]:focus-within::after{border-left-style:solid;}", ".f8k7e5g[data-fui-focus-within]:focus-within::after{border-bottom-style:solid;}", ".f1pmxfrl[data-fui-focus-within]:focus-within::after{border-top-width:2px;}", ".fszkfcr[data-fui-focus-within]:focus-within::after{border-right-width:2px;}", ".f1ap5ily[data-fui-focus-within]:focus-within::after{border-left-width:2px;}", ".f57dp0y[data-fui-focus-within]:focus-within::after{border-bottom-width:2px;}", ".f11dm2qb[data-fui-focus-within]:focus-within::after{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f136rfnd[data-fui-focus-within]:focus-within::after{border-bottom-left-radius:var(--borderRadiusMedium);}", ".fdsq1qd[data-fui-focus-within]:focus-within::after{border-top-right-radius:var(--borderRadiusMedium);}", ".f1khssms[data-fui-focus-within]:focus-within::after{border-top-left-radius:var(--borderRadiusMedium);}", ".fq4eyks[data-fui-focus-within]:focus-within::after{border-top-color:var(--colorStrokeFocus2);}", ".f1ya6x16[data-fui-focus-within]:focus-within::after{border-right-color:var(--colorStrokeFocus2);}", ".ftuszwa[data-fui-focus-within]:focus-within::after{border-left-color:var(--colorStrokeFocus2);}", ".f1e2iu44[data-fui-focus-within]:focus-within::after{border-bottom-color:var(--colorStrokeFocus2);}", ".f1xkdug0[data-fui-focus-within]:focus-within::after{top:-2px;}", ".f1m1ywml[data-fui-focus-within]:focus-within::after{bottom:-2px;}", ".f7u4kgv[data-fui-focus-within]:focus-within::after{left:-2px;}", ".f1a36mvi[data-fui-focus-within]:focus-within::after{right:-2px;}"],
69
- "f": [".ftqa4ok:focus{outline-style:none;}"],
70
- "i": [".f2hkw1w:focus-visible{outline-style:none;}"]
31
+ "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;}"]
71
32
  });
72
33
 
34
+ 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);}"]);
35
+
73
36
  const useInputStyles = /*#__PURE__*/react_1.__styles({
74
- "base": {
75
- "qhf8xq": "f1euv43f",
76
- "oyh7mz": ["f1vgc2s3", "f1e31b4d"],
77
- "Bhzewxz": "f15twtuk",
78
- "a9b677": "fly5x3f",
79
- "Bqenvij": "f1l02sjl",
80
- "B7ck84d": "f1ewtqcl",
81
- "B6of3ja": "f1hu3pq6",
82
- "t21cq0": ["f11qmguv", "f1tyq0we"],
83
- "jrapky": "f19f4twv",
84
- "Frg6f3": ["f1tyq0we", "f11qmguv"],
85
- "abs64n": "fk73vx1",
86
- "By9lhj9": "fg45n87",
87
- "G3n25n": "flqpbns",
88
- "Bojc29n": "fhb1dn5",
89
- "p8xby4": "fiegpko",
90
- "Bmzgt9v": "fdi60kf",
91
- "un08vv": ["fz3jc1r", "f1fwo01y"],
92
- "Bluxpkm": "f1m2gv5u",
93
- "upm9ap": ["f1fwo01y", "fz3jc1r"],
94
- "Bv6ccmg": "ft7ju8s",
95
- "w6pjei": "f1ofw0le",
96
- "drfev3": ["fothmfx", "f13qgzgl"],
97
- "ujr3xk": "fp5vmb3",
98
- "Bib2mth": ["f13qgzgl", "fothmfx"],
99
- "za2ojl": "f1snis2b",
100
- "Bu1fve0": "ff9psms",
101
- "B42z6en": ["f1fg9ko4", "fqj7xkg"],
102
- "mosl6v": "f1vebft2",
103
- "e3wlmb": ["fqj7xkg", "f1fg9ko4"],
104
- "swj8lc": "f1vtc7ej",
105
- "kbzjta": "f1fj62aq",
106
- "Bnazurh": ["fc4i2ph", "f137d5x6"],
107
- "Enz1qu": "f1v2xs8c",
108
- "B4rl0r3": ["f137d5x6", "fc4i2ph"],
109
- "oi7lcb": "f14bpgh5",
110
- "bwebxt": "f1ariq71",
111
- "ax4tcq": ["fu58av6", "f1qj5h2v"],
112
- "z2by79": "fptcwjq",
113
- "Bpz2hdf": ["f1qj5h2v", "fu58av6"],
114
- "Btliz3o": "filss48",
115
- "Bre5bwy": "frtrqgn",
116
- "Bayw8dt": ["f1v1lrlm", "fapcpph"],
117
- "lb5vkw": "f49ptgb",
118
- "yhmu5n": ["fapcpph", "f1v1lrlm"],
119
- "Blcfbx4": "fgnwcez",
120
- "yksgid": "f1l3wt4b",
121
- "B59a1ph": "f16lpvpn",
122
- "B78hamy": "fdubm5j",
123
- "t61w4e": ["f11to73e", "f9u8p8h"],
124
- "Dvncu9": "fw62pkm",
125
- "qbflri": ["f9u8p8h", "f11to73e"],
126
- "Byzt4r9": "fqaqzd4"
127
- },
128
- "after": {
129
- "a9b677": "fwr58v7"
130
- },
131
37
  "below": {
38
+ "a9b677": "fly5x3f",
132
39
  "Bqenvij": "f1je6zif"
133
40
  }
134
41
  }, {
135
- "d": [".f1euv43f{position:absolute;}", ".f1vgc2s3{left:0;}", ".f1e31b4d{right:0;}", ".f15twtuk{top:0;}", ".fly5x3f{width:100%;}", ".f1l02sjl{height:100%;}", ".f1ewtqcl{box-sizing:border-box;}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".fk73vx1{opacity:0;}", ".fg45n87:enabled{cursor:pointer;}", ".flqpbns:enabled~.fui-Radio__label{cursor:pointer;}", ".fhb1dn5:not(:checked)~.fui-Radio__indicator>*{opacity:0;}", ".fiegpko:enabled:not(:checked)~.fui-Radio__label{color:var(--colorNeutralForeground3);}", ".fdi60kf:enabled:not(:checked)~.fui-Radio__indicator{border-top-color:var(--colorNeutralStrokeAccessible);}", ".fz3jc1r:enabled:not(:checked)~.fui-Radio__indicator{border-right-color:var(--colorNeutralStrokeAccessible);}", ".f1fwo01y:enabled:not(:checked)~.fui-Radio__indicator{border-left-color:var(--colorNeutralStrokeAccessible);}", ".f1m2gv5u:enabled:not(:checked)~.fui-Radio__indicator{border-bottom-color:var(--colorNeutralStrokeAccessible);}", ".ft7ju8s:enabled:not(:checked):hover~.fui-Radio__label{color:var(--colorNeutralForeground2);}", ".f1ofw0le:enabled:not(:checked):hover~.fui-Radio__indicator{border-top-color:var(--colorNeutralStrokeAccessibleHover);}", ".fothmfx:enabled:not(:checked):hover~.fui-Radio__indicator{border-right-color:var(--colorNeutralStrokeAccessibleHover);}", ".f13qgzgl:enabled:not(:checked):hover~.fui-Radio__indicator{border-left-color:var(--colorNeutralStrokeAccessibleHover);}", ".fp5vmb3:enabled:not(:checked):hover~.fui-Radio__indicator{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1snis2b:enabled:not(:checked):hover:active~.fui-Radio__label{color:var(--colorNeutralForeground1);}", ".ff9psms:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-top-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f1fg9ko4:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-right-color:var(--colorNeutralStrokeAccessiblePressed);}", ".fqj7xkg:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-left-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f1vebft2:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f1vtc7ej:enabled:checked~.fui-Radio__label{color:var(--colorNeutralForeground1);}", ".f1fj62aq:enabled:checked~.fui-Radio__indicator{border-top-color:var(--colorCompoundBrandStroke);}", ".fc4i2ph:enabled:checked~.fui-Radio__indicator{border-right-color:var(--colorCompoundBrandStroke);}", ".f137d5x6:enabled:checked~.fui-Radio__indicator{border-left-color:var(--colorCompoundBrandStroke);}", ".f1v2xs8c:enabled:checked~.fui-Radio__indicator{border-bottom-color:var(--colorCompoundBrandStroke);}", ".f14bpgh5:enabled:checked~.fui-Radio__indicator{color:var(--colorCompoundBrandForeground1);}", ".f1ariq71:enabled:checked:hover~.fui-Radio__indicator{border-top-color:var(--colorCompoundBrandStrokeHover);}", ".fu58av6:enabled:checked:hover~.fui-Radio__indicator{border-right-color:var(--colorCompoundBrandStrokeHover);}", ".f1qj5h2v:enabled:checked:hover~.fui-Radio__indicator{border-left-color:var(--colorCompoundBrandStrokeHover);}", ".fptcwjq:enabled:checked:hover~.fui-Radio__indicator{border-bottom-color:var(--colorCompoundBrandStrokeHover);}", ".filss48:enabled:checked:hover~.fui-Radio__indicator{color:var(--colorCompoundBrandForeground1Hover);}", ".frtrqgn:enabled:checked:hover:active~.fui-Radio__indicator{border-top-color:var(--colorCompoundBrandStrokePressed);}", ".f1v1lrlm:enabled:checked:hover:active~.fui-Radio__indicator{border-right-color:var(--colorCompoundBrandStrokePressed);}", ".fapcpph:enabled:checked:hover:active~.fui-Radio__indicator{border-left-color:var(--colorCompoundBrandStrokePressed);}", ".f49ptgb:enabled:checked:hover:active~.fui-Radio__indicator{border-bottom-color:var(--colorCompoundBrandStrokePressed);}", ".fgnwcez:enabled:checked:hover:active~.fui-Radio__indicator{color:var(--colorCompoundBrandForeground1Pressed);}", ".f1l3wt4b:disabled~.fui-Radio__label{color:var(--colorNeutralForegroundDisabled);}", ".f16lpvpn:disabled~.fui-Radio__label{cursor:default;}", ".fdubm5j:disabled~.fui-Radio__indicator{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f11to73e:disabled~.fui-Radio__indicator{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f9u8p8h:disabled~.fui-Radio__indicator{border-left-color:var(--colorNeutralStrokeDisabled);}", ".fw62pkm:disabled~.fui-Radio__indicator{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".fqaqzd4:disabled~.fui-Radio__indicator{color:var(--colorNeutralForegroundDisabled);}", ".fwr58v7{width:calc(16px + 2 * var(--spacingHorizontalS));}", ".f1je6zif{height:calc(16px + 2 * var(--spacingVerticalS));}"]
42
+ "d": [".fly5x3f{width:100%;}", ".f1je6zif{height:calc(16px + 2 * var(--spacingVerticalS));}"]
136
43
  });
137
44
 
138
- const useIndicatorStyles = /*#__PURE__*/react_1.__styles({
139
- "base": {
140
- "a9b677": "fjw5fx7",
141
- "Bqenvij": "fd461yt",
142
- "Be2twd7": "f1ugzwwg",
143
- "B7ck84d": "f1ewtqcl",
144
- "Bnnss6s": "fi64zpg",
145
- "mc9l5x": "f22iagw",
146
- "Bt984gj": "f122n59",
147
- "Brf1p80": "f4d9j23",
148
- "B68tc82": "f1p9o1ba",
149
- "Bmxbyg5": "f1sil6mw",
150
- "B4j52fo": "f192inf7",
151
- "Bekrc4i": ["f5tn483", "f1ojsxk5"],
152
- "Bn0qgzm": "f1vxd6vx",
153
- "ibv6hh": ["f1ojsxk5", "f5tn483"],
154
- "icvyot": "fzkkow9",
155
- "vrafjx": ["fcdblym", "fjik90z"],
156
- "oivjwe": "fg706s2",
157
- "wvpqe5": ["fjik90z", "fcdblym"],
158
- "Bbmb7ep": ["f8fbkgy", "f1nfllo7"],
159
- "Beyfa6y": ["f1nfllo7", "f8fbkgy"],
160
- "B7oj6ja": ["f1djnp8u", "f1s8kh49"],
161
- "Btl43ni": ["f1s8kh49", "f1djnp8u"],
162
- "B6of3ja": "frnwi6n",
163
- "t21cq0": ["f1vcna3q", "foyynoy"],
164
- "jrapky": "fqcjy3b",
165
- "Frg6f3": ["foyynoy", "f1vcna3q"],
166
- "Bkfmm31": "f1w9h62z",
167
- "Bkecrkj": "f1aehjj5"
168
- }
169
- }, {
170
- "d": [".fjw5fx7{width:16px;}", ".fd461yt{height:16px;}", ".f1ugzwwg{font-size:12px;}", ".f1ewtqcl{box-sizing:border-box;}", ".fi64zpg{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".f8fbkgy{border-bottom-right-radius:var(--borderRadiusCircular);}", ".f1nfllo7{border-bottom-left-radius:var(--borderRadiusCircular);}", ".f1djnp8u{border-top-right-radius:var(--borderRadiusCircular);}", ".f1s8kh49{border-top-left-radius:var(--borderRadiusCircular);}", ".frnwi6n{margin-top:var(--spacingVerticalS);}", ".f1vcna3q{margin-right:var(--spacingHorizontalS);}", ".foyynoy{margin-left:var(--spacingHorizontalS);}", ".fqcjy3b{margin-bottom:var(--spacingVerticalS);}", ".f1w9h62z{fill:currentColor;}", ".f1aehjj5{pointer-events:none;}"]
171
- });
45
+ 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;}"]); // Can't use makeResetStyles here because Label is a component that may itself use makeResetStyles.
46
+
172
47
 
173
48
  const useLabelStyles = /*#__PURE__*/react_1.__styles({
174
49
  "base": {
@@ -199,12 +74,14 @@ const useRadioStyles_unstable = state => {
199
74
  const {
200
75
  labelPosition
201
76
  } = state;
77
+ const rootBaseClassName = useRootBaseClassName();
202
78
  const rootStyles = useRootStyles();
203
- state.root.className = react_1.mergeClasses(exports.radioClassNames.root, rootStyles.base, rootStyles.focusIndicator, labelPosition === 'below' && rootStyles.vertical, state.root.className);
79
+ state.root.className = react_1.mergeClasses(exports.radioClassNames.root, rootBaseClassName, labelPosition === 'below' && rootStyles.vertical, state.root.className);
80
+ const inputBaseClassName = useInputBaseClassName();
204
81
  const inputStyles = useInputStyles();
205
- state.input.className = react_1.mergeClasses(exports.radioClassNames.input, inputStyles.base, inputStyles[labelPosition], state.input.className);
206
- const indicatorStyles = useIndicatorStyles();
207
- state.indicator.className = react_1.mergeClasses(exports.radioClassNames.indicator, indicatorStyles.base, state.indicator.className);
82
+ state.input.className = react_1.mergeClasses(exports.radioClassNames.input, inputBaseClassName, labelPosition === 'below' && inputStyles.below, state.input.className);
83
+ const indicatorBaseClassName = useIndicatorBaseClassName();
84
+ state.indicator.className = react_1.mergeClasses(exports.radioClassNames.indicator, indicatorBaseClassName, state.indicator.className);
208
85
  const labelStyles = useLabelStyles();
209
86
 
210
87
  if (state.label) {
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-radio/src/components/Radio/useRadioStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAIa,OAAA,CAAA,eAAA,GAA8C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BAAvB","sourcesContent":["import { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { 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\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n base: {\n display: 'inline-flex',\n position: 'relative',\n },\n\n vertical: {\n flexDirection: 'column',\n alignItems: 'center',\n },\n\n focusIndicator: createFocusOutlineStyle({ style: {}, selector: 'focus-within' }),\n});\n\nconst useInputStyles = makeStyles({\n base: {\n position: 'absolute',\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n boxSizing: 'border-box',\n ...shorthands.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 ...shorthands.borderColor(tokens.colorNeutralStrokeAccessible),\n },\n\n ':hover': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground2,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessibleHover),\n },\n },\n\n ':hover:active': {\n [`& ~ .${radioClassNames.label}`]: {\n color: tokens.colorNeutralForeground1,\n },\n [`& ~ .${radioClassNames.indicator}`]: {\n ...shorthands.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 ...shorthands.borderColor(tokens.colorCompoundBrandStroke),\n color: tokens.colorCompoundBrandForeground1,\n },\n\n ':hover': {\n [`& ~ .${radioClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorCompoundBrandStrokeHover),\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n },\n\n ':hover:active': {\n [`& ~ .${radioClassNames.indicator}`]: {\n ...shorthands.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 ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n },\n\n after: {\n width: `calc(${indicatorSize} + 2 * ${tokens.spacingHorizontalS})`,\n },\n below: {\n height: `calc(${indicatorSize} + 2 * ${tokens.spacingVerticalS})`,\n },\n});\n\nconst useIndicatorStyles = makeStyles({\n base: {\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 ...shorthands.overflow('hidden'),\n\n ...shorthands.border(tokens.strokeWidthThin, 'solid'),\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n ...shorthands.margin(tokens.spacingVerticalS, tokens.spacingHorizontalS),\n fill: 'currentColor',\n pointerEvents: 'none',\n },\n});\n\nconst useLabelStyles = makeStyles({\n base: {\n alignSelf: 'center',\n\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 rootStyles = useRootStyles();\n state.root.className = mergeClasses(\n radioClassNames.root,\n rootStyles.base,\n rootStyles.focusIndicator,\n labelPosition === 'below' && rootStyles.vertical,\n state.root.className,\n );\n\n const inputStyles = useInputStyles();\n state.input.className = mergeClasses(\n radioClassNames.input,\n inputStyles.base,\n inputStyles[labelPosition],\n state.input.className,\n );\n\n const indicatorStyles = useIndicatorStyles();\n state.indicator.className = mergeClasses(radioClassNames.indicator, indicatorStyles.base, state.indicator.className);\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"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-radio/src/components/Radio/useRadioStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAIa,OAAA,CAAA,eAAA,GAA8C;EACzD,IAAI,EAAE,WADmD;EAEzD,SAAS,EAAE,sBAF8C;EAGzD,KAAK,EAAE,kBAHkD;EAIzD,KAAK,EAAE;AAJkD,CAA9C,C,CAOb;;AACA,MAAM,aAAa,GAAG,MAAtB;;AAEA,MAAM,oBAAoB,gBAAG,OAAA,cAAA,guE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,OAAA,CAAA,eAAA,CAAgB,SADU,EAE1B,sBAF0B,EAG1B,KAAK,CAAC,SAAN,CAAgB,SAHU,CAA5B;EAMA,MAAM,WAAW,GAAG,cAAc,EAAlC;;EACA,IAAI,KAAK,CAAC,KAAV,EAAiB;IACf,KAAK,CAAC,KAAN,CAAY,SAAZ,GAAwB,OAAA,CAAA,YAAA,CACtB,OAAA,CAAA,eAAA,CAAgB,KADM,EAEtB,WAAW,CAAC,IAFU,EAGtB,WAAW,CAAC,aAAD,CAHW,EAItB,KAAK,CAAC,KAAN,CAAY,SAJU,CAAxB;EAMD;AACF,CArCM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","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"],"sourceRoot":"../src/"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-radio",
3
- "version": "9.0.13",
3
+ "version": "9.0.15",
4
4
  "description": "Fluent UI Radio component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -30,13 +30,13 @@
30
30
  "@fluentui/react-conformance-griffel": "9.0.0-beta.18"
31
31
  },
32
32
  "dependencies": {
33
- "@fluentui/react-context-selector": "^9.1.2",
34
- "@fluentui/react-field": "9.0.0-alpha.10",
33
+ "@fluentui/react-context-selector": "^9.1.3",
34
+ "@fluentui/react-field": "9.0.0-alpha.12",
35
35
  "@fluentui/react-icons": "^2.0.175",
36
- "@fluentui/react-label": "^9.0.12",
37
- "@fluentui/react-tabster": "^9.3.2",
38
- "@fluentui/react-theme": "^9.1.3",
39
- "@fluentui/react-utilities": "^9.2.2",
36
+ "@fluentui/react-label": "^9.0.14",
37
+ "@fluentui/react-tabster": "^9.3.4",
38
+ "@fluentui/react-theme": "^9.1.5",
39
+ "@fluentui/react-utilities": "^9.3.0",
40
40
  "@griffel/react": "^1.4.2",
41
41
  "tslib": "^2.1.0"
42
42
  },