@fluentui/react-switch 9.0.0-nightly.d730088d7f.0 → 9.0.0-rc.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/CHANGELOG.json +658 -29
  2. package/CHANGELOG.md +209 -43
  3. package/MIGRATION.md +89 -22
  4. package/Spec.md +179 -84
  5. package/dist/index.d.ts +107 -0
  6. package/{lib → dist}/tsdoc-metadata.json +0 -0
  7. package/lib/Switch.js.map +1 -1
  8. package/lib/components/Switch/Switch.js +8 -8
  9. package/lib/components/Switch/Switch.js.map +1 -1
  10. package/lib/components/Switch/Switch.types.js.map +1 -1
  11. package/lib/components/Switch/index.js.map +1 -1
  12. package/lib/components/Switch/renderSwitch.js +15 -9
  13. package/lib/components/Switch/renderSwitch.js.map +1 -1
  14. package/lib/components/Switch/useSwitch.js +70 -54
  15. package/lib/components/Switch/useSwitch.js.map +1 -1
  16. package/lib/components/Switch/useSwitchStyles.js +156 -248
  17. package/lib/components/Switch/useSwitchStyles.js.map +1 -1
  18. package/lib/index.js +2 -1
  19. package/lib/index.js.map +1 -1
  20. package/lib-commonjs/Switch.js +1 -1
  21. package/lib-commonjs/Switch.js.map +1 -1
  22. package/lib-commonjs/components/Switch/Switch.js +9 -9
  23. package/lib-commonjs/components/Switch/Switch.js.map +1 -1
  24. package/lib-commonjs/components/Switch/Switch.types.js.map +1 -1
  25. package/lib-commonjs/components/Switch/index.js +1 -1
  26. package/lib-commonjs/components/Switch/index.js.map +1 -1
  27. package/lib-commonjs/components/Switch/renderSwitch.js +19 -15
  28. package/lib-commonjs/components/Switch/renderSwitch.js.map +1 -1
  29. package/lib-commonjs/components/Switch/useSwitch.js +73 -56
  30. package/lib-commonjs/components/Switch/useSwitch.js.map +1 -1
  31. package/lib-commonjs/components/Switch/useSwitchStyles.js +161 -252
  32. package/lib-commonjs/components/Switch/useSwitchStyles.js.map +1 -1
  33. package/lib-commonjs/index.js +39 -2
  34. package/lib-commonjs/index.js.map +1 -1
  35. package/package.json +21 -27
  36. package/dist/react-switch.d.ts +0 -92
  37. package/lib/Switch.d.ts +0 -1
  38. package/lib/common/isConformant.d.ts +0 -4
  39. package/lib/common/isConformant.js +0 -12
  40. package/lib/common/isConformant.js.map +0 -1
  41. package/lib/components/Switch/Switch.d.ts +0 -6
  42. package/lib/components/Switch/Switch.types.d.ts +0 -58
  43. package/lib/components/Switch/index.d.ts +0 -5
  44. package/lib/components/Switch/renderSwitch.d.ts +0 -5
  45. package/lib/components/Switch/useSwitch.d.ts +0 -10
  46. package/lib/components/Switch/useSwitchState.d.ts +0 -2
  47. package/lib/components/Switch/useSwitchState.js +0 -152
  48. package/lib/components/Switch/useSwitchState.js.map +0 -1
  49. package/lib/components/Switch/useSwitchStyles.d.ts +0 -5
  50. package/lib/index.d.ts +0 -2
  51. package/lib-commonjs/Switch.d.ts +0 -1
  52. package/lib-commonjs/common/isConformant.d.ts +0 -4
  53. package/lib-commonjs/common/isConformant.js +0 -23
  54. package/lib-commonjs/common/isConformant.js.map +0 -1
  55. package/lib-commonjs/components/Switch/Switch.d.ts +0 -6
  56. package/lib-commonjs/components/Switch/Switch.types.d.ts +0 -58
  57. package/lib-commonjs/components/Switch/index.d.ts +0 -5
  58. package/lib-commonjs/components/Switch/renderSwitch.d.ts +0 -5
  59. package/lib-commonjs/components/Switch/useSwitch.d.ts +0 -10
  60. package/lib-commonjs/components/Switch/useSwitchState.d.ts +0 -2
  61. package/lib-commonjs/components/Switch/useSwitchState.js +0 -164
  62. package/lib-commonjs/components/Switch/useSwitchState.js.map +0 -1
  63. package/lib-commonjs/components/Switch/useSwitchStyles.d.ts +0 -5
  64. package/lib-commonjs/index.d.ts +0 -2
@@ -1,47 +1,33 @@
1
- import { __styles, mergeClasses } from '@fluentui/react-make-styles';
2
1
  import { createFocusOutlineStyle } from '@fluentui/react-tabster';
3
- var rootClassName = 'ms-Switch-root';
4
- var trackClassName = 'ms-Switch-track';
5
- var thumbClassName = 'ms-Switch-thumb';
2
+ import { tokens } from '@fluentui/react-theme';
3
+ import { __styles, mergeClasses, shorthands } from '@griffel/react';
4
+ export const switchClassNames = {
5
+ root: 'fui-Switch',
6
+ indicator: 'fui-Switch__indicator',
7
+ input: 'fui-Switch__input',
8
+ label: 'fui-Switch__label'
9
+ };
6
10
  /**
7
- * Styles for the root slot
11
+ * @deprecated Use `switchClassNames.root` instead.
8
12
  */
9
13
 
10
- var useRootStyles = /*#__PURE__*/__styles({
11
- "root": {
12
- "B64q66w": "frxo1y7",
13
- "yvbau0": "fe5s2ct",
14
- "k3w5al": "f1n6k660",
15
- "mt6sm6": "f17m95gg",
16
- "Bjtifd4": "fp7zjh8",
14
+ export const switchClassName = switchClassNames.root; // Thumb and track sizes used by the component.
15
+
16
+ const spaceBetweenThumbAndTrack = 2;
17
+ const thumbSize = 14;
18
+ const trackHeight = 20;
19
+ const trackWidth = 40;
20
+
21
+ const useRootStyles = /*#__PURE__*/__styles({
22
+ "base": {
23
+ "Bt984gj": "f6jr5hl",
24
+ "B7ck84d": "f1ewtqcl",
25
+ "mc9l5x": "ftuwxu6",
26
+ "z8tnut": "f1kwiid1",
27
+ "z189sj": ["f1vdfbxk", "f1f5gg8d"],
28
+ "Byoj8tv": "f5b47ha",
29
+ "uwmqm3": ["f1f5gg8d", "f1vdfbxk"],
17
30
  "qhf8xq": "f10pi13n",
18
- "a9b677": "fnceurk",
19
- "Bqenvij": "f15da5dy",
20
- "mc9l5x": "f14t3ns0",
21
- "famaaq": "f1xqy1su",
22
- "lpbzjs": "f1sdsnyy",
23
- "ha4doy": "f1qdqbpl"
24
- },
25
- "unchecked": {
26
- "Blms9gb": "f5twets",
27
- "B786czj": "f1dad01o",
28
- "Bjuc0nl": ["f687y2r", "f1edjd92"],
29
- "B5yqodl": "f1f3tlu1",
30
- "kjlpdb": ["f1edjd92", "f687y2r"]
31
- },
32
- "checked": {
33
- "B4o7b9o": "fnm6wgb",
34
- "puz9ln": "fi8bwd9"
35
- },
36
- "enabled": {
37
- "H36rlo": "felqjlh",
38
- "Bceei9c": "f1k6fduh"
39
- },
40
- "disabled": {
41
- "Bceei9c": "fdrzuqr",
42
- "Bkecrkj": "f1aehjj5"
43
- },
44
- "focusIndicator": {
45
31
  "B486eqv": "f2hkw1w",
46
32
  "vchsgm": "fbiesyy",
47
33
  "ozrjjd": ["fq2kn9", "f1jxwnad"],
@@ -50,7 +36,6 @@ var useRootStyles = /*#__PURE__*/__styles({
50
36
  "B8vm7ur": "f12sql3b",
51
37
  "f4hv8x": "f1i4q40k",
52
38
  "Gpan81": "fcrbge9",
53
- "z7afg": "ft464mn",
54
39
  "rsjj6t": "fskqmiq",
55
40
  "E86f5s": "f1kbdjx9",
56
41
  "f5nhos": ["fw1d893", "fpuz8dn"],
@@ -60,247 +45,170 @@ var useRootStyles = /*#__PURE__*/__styles({
60
45
  "B8gmrwi": ["f16hf5f2", "f1qhqcal"],
61
46
  "Byq6oy9": "fyyqeim",
62
47
  "Bdy2j38": ["f1qhqcal", "f16hf5f2"],
63
- "Bugh3ej": "f18xdlq9",
48
+ "Bi8bqab": ["f1aneyfs", "f15nmyc0"],
49
+ "kq6z4e": ["f15nmyc0", "f1aneyfs"],
50
+ "l5tc3q": ["f3cpy5b", "f13v6kgv"],
51
+ "d1z3ck": ["f13v6kgv", "f3cpy5b"],
64
52
  "epcuuz": "filx0we",
65
53
  "Ba33l6n": ["f1horip2", "fgnx9ah"],
66
54
  "va7z1g": "fkii2tb",
67
55
  "Bmi6mq9": ["fgnx9ah", "f1horip2"],
68
- "Bjkpy09": "f1rh66yx",
69
- "Jxg1p8": "f19ibq92",
70
- "Bc94xmo": ["fc3tncn", "f1veb610"],
71
- "Bj23z95": ["f1veb610", "fc3tncn"]
56
+ "Bjkpy09": "f1unftzx",
57
+ "Jxg1p8": "f8rjbh6",
58
+ "Bc94xmo": ["fxfgh6q", "f8l10fm"],
59
+ "Bj23z95": ["f8l10fm", "fxfgh6q"]
60
+ },
61
+ "vertical": {
62
+ "Beiy3e4": "f1vx9l62",
63
+ "z8tnut": "f1ywm7hm"
72
64
  }
73
65
  }, {
74
- "d": [".frxo1y7{--switch-width:40px;}", ".fe5s2ct{--switch-height:20px;}", ".f1n6k660{--switch-thumb-size:14px;}", ".f17m95gg{--switch-checked-opacity:0;}", ".fp7zjh8{--switch-unchecked-opacity:0;}", ".f10pi13n{position:relative;}", ".fnceurk{width:var(--switch-width);}", ".f15da5dy{height:var(--switch-height);}", ".f14t3ns0{display:inline-block;}", ".f1xqy1su{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}", ".f1sdsnyy{touch-action:none;}", ".f1qdqbpl{vertical-align:bottom;}", ".felqjlh{-webkit-tap-highlight-color:rgba(0,0,0,0);}", ".f1k6fduh{cursor:pointer;}", ".fdrzuqr{cursor:not-allowed;}", ".f1aehjj5{pointer-events:none;}", "[data-keyboard-nav] .fbiesyy:focus-within{border-top-color:transparent;}", "[data-keyboard-nav] .fq2kn9:focus-within{border-right-color:transparent;}", "[data-keyboard-nav] .f1jxwnad:focus-within{border-left-color:transparent;}", "[data-keyboard-nav] .f1il7mou:focus-within{border-bottom-color:transparent;}", "[data-keyboard-nav] .f12sql3b:focus-within:after{content:\"\";}", "[data-keyboard-nav] .f1i4q40k:focus-within:after{position:absolute;}", "[data-keyboard-nav] .fcrbge9:focus-within:after{pointer-events:none;}", "[data-keyboard-nav] .ft464mn:focus-within:after{box-sizing:outline-box;}", "[data-keyboard-nav] .fskqmiq:focus-within:after{z-index:1;}", "[data-keyboard-nav] .f1kbdjx9:focus-within:after{border-top-style:solid;}", "[data-keyboard-nav] .fw1d893:focus-within:after{border-right-style:solid;}", "[data-keyboard-nav] .fpuz8dn:focus-within:after{border-left-style:solid;}", "[data-keyboard-nav] .f14hlsw1:focus-within:after{border-bottom-style:solid;}", "[data-keyboard-nav] .f1bkt4b4:focus-within:after{border-top-width:2px;}", "[data-keyboard-nav] .f16hf5f2:focus-within:after{border-right-width:2px;}", "[data-keyboard-nav] .f1qhqcal:focus-within:after{border-left-width:2px;}", "[data-keyboard-nav] .fyyqeim:focus-within:after{border-bottom-width:2px;}", "[data-keyboard-nav] .f18xdlq9:focus-within:after{border-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .filx0we:focus-within:after{border-top-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1horip2:focus-within:after{border-right-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .fgnx9ah:focus-within:after{border-left-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .fkii2tb:focus-within:after{border-bottom-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1rh66yx:focus-within:after{top:calc(0px - 2px - 8px);}", "[data-keyboard-nav] .f19ibq92:focus-within:after{bottom:calc(0px - 2px - 8px);}", "[data-keyboard-nav] .fc3tncn:focus-within:after{left:calc(0px - 2px - 8px);}", "[data-keyboard-nav] .f1veb610:focus-within:after{right:calc(0px - 2px - 8px);}"],
75
- "h": [".f5twets:hover .ms-Switch-thumb:before{background:var(--colorNeutralStrokeAccessibleHover);}", ".f1dad01o:hover .ms-Switch-track:before{border-top-color:var(--colorNeutralStrokeAccessibleHover);}", ".f687y2r:hover .ms-Switch-track:before{border-right-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1edjd92:hover .ms-Switch-track:before{border-left-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1f3tlu1:hover .ms-Switch-track:before{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}", ".fnm6wgb:hover .ms-Switch-track:after{background:var(--colorBrandBackgroundHover);}"],
76
- "a": [".fi8bwd9:active .ms-Switch-track:after{background:var(--colorBrandBackgroundPressed);}"],
66
+ "d": [".f6jr5hl{-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}", ".f1ewtqcl{box-sizing:border-box;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f1kwiid1{padding-top:var(--spacingVerticalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f5b47ha{padding-bottom:var(--spacingVerticalS);}", ".f10pi13n{position:relative;}", "[data-keyboard-nav] .fbiesyy:focus-within{border-top-color:transparent;}", "[data-keyboard-nav] .fq2kn9:focus-within{border-right-color:transparent;}", "[data-keyboard-nav] .f1jxwnad:focus-within{border-left-color:transparent;}", "[data-keyboard-nav] .f1il7mou:focus-within{border-bottom-color:transparent;}", "[data-keyboard-nav] .f12sql3b:focus-within:after{content:\"\";}", "[data-keyboard-nav] .f1i4q40k:focus-within:after{position:absolute;}", "[data-keyboard-nav] .fcrbge9:focus-within:after{pointer-events:none;}", "[data-keyboard-nav] .fskqmiq:focus-within:after{z-index:1;}", "[data-keyboard-nav] .f1kbdjx9:focus-within:after{border-top-style:solid;}", "[data-keyboard-nav] .fw1d893:focus-within:after{border-right-style:solid;}", "[data-keyboard-nav] .fpuz8dn:focus-within:after{border-left-style:solid;}", "[data-keyboard-nav] .f14hlsw1:focus-within:after{border-bottom-style:solid;}", "[data-keyboard-nav] .f1bkt4b4:focus-within:after{border-top-width:2px;}", "[data-keyboard-nav] .f16hf5f2:focus-within:after{border-right-width:2px;}", "[data-keyboard-nav] .f1qhqcal:focus-within:after{border-left-width:2px;}", "[data-keyboard-nav] .fyyqeim:focus-within:after{border-bottom-width:2px;}", "[data-keyboard-nav] .f1aneyfs:focus-within:after{border-bottom-right-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .f15nmyc0:focus-within:after{border-bottom-left-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .f3cpy5b:focus-within:after{border-top-right-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .f13v6kgv:focus-within:after{border-top-left-radius:var(--borderRadiusMedium);}", "[data-keyboard-nav] .filx0we:focus-within:after{border-top-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1horip2:focus-within:after{border-right-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .fgnx9ah:focus-within:after{border-left-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .fkii2tb:focus-within:after{border-bottom-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1unftzx:focus-within:after{top:-2px;}", "[data-keyboard-nav] .f8rjbh6:focus-within:after{bottom:-2px;}", "[data-keyboard-nav] .fxfgh6q:focus-within:after{left:-2px;}", "[data-keyboard-nav] .f8l10fm:focus-within:after{right:-2px;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f1ywm7hm{padding-top:var(--spacingVerticalXS);}"],
77
67
  "i": [".f2hkw1w:focus-visible{outline-style:none;}"]
78
68
  });
79
- /**
80
- * Styles for the track slot
81
- */
82
69
 
83
-
84
- var useTrackStyles = /*#__PURE__*/__styles({
85
- "track": {
86
- "qhf8xq": "f1euv43f",
87
- "a9b677": "fly5x3f",
88
- "Bqenvij": "f1l02sjl",
89
- "Bi2q7bf": "f11zxivh",
90
- "lpbzjs": "f1sdsnyy",
70
+ const useIndicatorStyles = /*#__PURE__*/__styles({
71
+ "base": {
72
+ "Bbmb7ep": ["f8fbkgy", "f1nfllo7"],
73
+ "Beyfa6y": ["f1nfllo7", "f8fbkgy"],
74
+ "B7oj6ja": ["f1djnp8u", "f1s8kh49"],
75
+ "Btl43ni": ["f1s8kh49", "f1djnp8u"],
76
+ "icvyot": "fzkkow9",
77
+ "vrafjx": ["fcdblym", "fjik90z"],
78
+ "oivjwe": "fg706s2",
79
+ "wvpqe5": ["fjik90z", "fcdblym"],
80
+ "B4j52fo": "f5ogflp",
81
+ "Bekrc4i": ["f1hqa2wf", "finvdd3"],
82
+ "Bn0qgzm": "f1f09k3d",
83
+ "ibv6hh": ["finvdd3", "f1hqa2wf"],
84
+ "B7ck84d": "f1ewtqcl",
85
+ "Bkfmm31": "f1w9h62z",
86
+ "Bnnss6s": "fi64zpg",
87
+ "Be2twd7": "f4ybsrx",
88
+ "Bqenvij": "fjamq6b",
91
89
  "Bkecrkj": "f1aehjj5",
92
- "xx9plb": "fxf9f1y",
93
- "Bf8kmfk": "frdto5n",
94
- "Byque4d": ["f8g0ba1", "ff0gctb"],
95
- "Bj2wrql": "f3zr33r",
96
- "qd6xl9": ["ff0gctb", "f8g0ba1"],
97
- "Bmqnesq": "f170vdtw",
98
- "zf3lio": "f1jua1m0",
99
- "rurcny": "f99sooz",
100
- "ngabwx": "f1uhpfti",
101
- "Hdbjpj": "f11ef69",
102
- "u6d25": "f1yuyem3",
103
- "jc51t6": ["f1bp8q63", "f1oarbwq"],
104
- "Bj55yzk": "f13gddrr",
105
- "cnmfks": ["f1oarbwq", "f1bp8q63"],
106
- "oqd9ik": "ffdc0f3",
107
- "c4kunb": "fsn1tsw",
108
- "Bs6t6z0": "f77y9vx",
109
- "Bmyypfa": "frd86tk"
110
- },
111
- "unchecked": {
112
- "dj0dih": "f199l62q",
113
- "D4ky5z": ["f1pa2qi2", "f1ooiv2t"],
114
- "k1i1uq": "fyqop9u",
115
- "Bcasopp": ["f1ooiv2t", "f1pa2qi2"],
116
- "Bdixowu": "f1bwkb58",
117
- "cqycoz": ["fiio4mc", "fc8z0qo"],
118
- "Epwjcz": "f1m5ya7j",
119
- "Bwdktmn": ["fc8z0qo", "fiio4mc"],
120
- "ijj6k": "f1gqzwee",
121
- "I89eb": ["f149mt9j", "fs3bzhx"],
122
- "Bp1vogq": "f14z72z2",
123
- "Bohd3ja": ["fs3bzhx", "f149mt9j"],
124
- "B4zgs9e": "f1ntlsrl"
125
- },
126
- "checked": {
127
- "Bpudnjh": "f1lhwn2z",
128
- "rskduk": "f1so6udy",
129
- "Dctjco": ["f1faxgr0", "f1wf3et7"],
130
- "J4s2b0": "f124kgxn",
131
- "svcy3r": ["f1wf3et7", "f1faxgr0"]
132
- },
133
- "disabledUnchecked": {
134
- "dj0dih": "f199l62q",
135
- "D4ky5z": ["f1pa2qi2", "f1ooiv2t"],
136
- "k1i1uq": "fyqop9u",
137
- "Bcasopp": ["f1ooiv2t", "f1pa2qi2"],
138
- "Bdixowu": "f1bwkb58",
139
- "cqycoz": ["fiio4mc", "fc8z0qo"],
140
- "Epwjcz": "f1m5ya7j",
141
- "Bwdktmn": ["fc8z0qo", "fiio4mc"],
142
- "ijj6k": "fntj282",
143
- "I89eb": ["fzta9nb", "f17m9iy5"],
144
- "Bp1vogq": "f1k4exvn",
145
- "Bohd3ja": ["f17m9iy5", "fzta9nb"]
146
- },
147
- "disabledChecked": {
148
- "Bouo9z4": "f1l5cenb",
149
- "Bjz4wo8": ["f1jvubu3", "f1q1uvzd"],
150
- "B3zxwmv": "f2fxry3",
151
- "exdlgl": ["f1q1uvzd", "f1jvubu3"],
152
- "rskduk": "f1iq3fds",
153
- "Dctjco": ["f1r2jemi", "f11olovk"],
154
- "J4s2b0": "fd0py6g",
155
- "svcy3r": ["f11olovk", "f1r2jemi"],
156
- "F7kzw7": "f2uxs13",
157
- "B13j16c": ["f11zx3qq", "fqewq1t"],
158
- "Bk8j60v": "fmewjpk",
159
- "Bpbi4o9": ["fqewq1t", "f11zx3qq"],
160
- "Bpudnjh": "fq2pbzm"
90
+ "B3o57yi": "f1bnoopa",
91
+ "Bkqvd7p": "f1e1a42z",
92
+ "Bmy1vo4": "fo99fu7",
93
+ "a9b677": "feqmc2u",
94
+ "Hkqiji": "f1wkgtgk",
95
+ "Bgrs90m": "f17f8g0y",
96
+ "B0zx559": "f1uwej41"
161
97
  }
162
98
  }, {
163
- "d": [".f1euv43f{position:absolute;}", ".fly5x3f{width:100%;}", ".f1l02sjl{height:100%;}", ".f11zxivh{-webkit-transition:background .1s cubic-bezier(0.33, 0.0, 0.67, 1);transition:background .1s cubic-bezier(0.33, 0.0, 0.67, 1);}", ".f1sdsnyy{touch-action:none;}", ".f1aehjj5{pointer-events:none;}", ".fxf9f1y:before{position:absolute;}", ".frdto5n:before{top:0px;}", ".f8g0ba1:before{left:0px;}", ".ff0gctb:before{right:0px;}", ".f3zr33r:before{bottom:0px;}", ".f170vdtw:before{box-sizing:border-box;}", ".f1jua1m0:before{border-radius:999px;}", ".f99sooz:before{content:'';}", ".f1uhpfti:before{opacity:var(--switch-unchecked-opacity);}", ".f11ef69:after{position:absolute;}", ".f1yuyem3:after{top:0px;}", ".f1bp8q63:after{left:0px;}", ".f1oarbwq:after{right:0px;}", ".f13gddrr:after{bottom:0px;}", ".ffdc0f3:after{box-sizing:border-box;}", ".fsn1tsw:after{border-radius:999px;}", ".f77y9vx:after{content:'';}", ".frd86tk:after{opacity:var(--switch-checked-opacity);}", ".f199l62q:before{border-top-width:1px;}", ".f1pa2qi2:before{border-right-width:1px;}", ".f1ooiv2t:before{border-left-width:1px;}", ".fyqop9u:before{border-bottom-width:1px;}", ".f1bwkb58:before{border-top-style:solid;}", ".fiio4mc:before{border-right-style:solid;}", ".fc8z0qo:before{border-left-style:solid;}", ".f1m5ya7j:before{border-bottom-style:solid;}", ".f1gqzwee:before{border-top-color:var(--colorNeutralStrokeAccessible);}", ".f149mt9j:before{border-right-color:var(--colorNeutralStrokeAccessible);}", ".fs3bzhx:before{border-left-color:var(--colorNeutralStrokeAccessible);}", ".f14z72z2:before{border-bottom-color:var(--colorNeutralStrokeAccessible);}", ".f1ntlsrl:before{background:none;}", ".f1lhwn2z:after{background:var(--colorBrandBackground);}", ".f1so6udy:after{border-top-style:none;}", ".f1faxgr0:after{border-right-style:none;}", ".f1wf3et7:after{border-left-style:none;}", ".f124kgxn:after{border-bottom-style:none;}", ".fntj282:before{border-top-color:var(--colorNeutralStrokeDisabled);}", ".fzta9nb:before{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f17m9iy5:before{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f1k4exvn:before{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".f1l5cenb:after{border-top-width:1px;}", ".f1jvubu3:after{border-right-width:1px;}", ".f1q1uvzd:after{border-left-width:1px;}", ".f2fxry3:after{border-bottom-width:1px;}", ".f1iq3fds:after{border-top-style:solid;}", ".f1r2jemi:after{border-right-style:solid;}", ".f11olovk:after{border-left-style:solid;}", ".fd0py6g:after{border-bottom-style:solid;}", ".f2uxs13:after{border-top-color:var(--colorTransparentStrokeDisabled);}", ".f11zx3qq:after{border-right-color:var(--colorTransparentStrokeDisabled);}", ".fqewq1t:after{border-left-color:var(--colorTransparentStrokeDisabled);}", ".fmewjpk:after{border-bottom-color:var(--colorTransparentStrokeDisabled);}", ".fq2pbzm:after{background:var(--colorNeutralBackgroundDisabled);}"]
99
+ "d": [".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);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".f5ogflp{border-top-width:1px;}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".f1f09k3d{border-bottom-width:1px;}", ".f1ewtqcl{box-sizing:border-box;}", ".f1w9h62z{fill:currentColor;}", ".fi64zpg{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".f4ybsrx{font-size:16px;}", ".fjamq6b{height:20px;}", ".f1aehjj5{pointer-events:none;}", ".f1bnoopa{transition-duration:200ms;}", ".f1e1a42z{transition-timing-function:cubic-bezier(0.33, 0, 0.67, 1);}", ".fo99fu7{transition-property:background,border,color;}", ".feqmc2u{width:40px;}", ".f1wkgtgk>*{transition-duration:200ms;}", ".f17f8g0y>*{transition-timing-function:cubic-bezier(0.33, 0, 0.67, 1);}", ".f1uwej41>*{transition-property:transform;}"]
164
100
  });
165
- /**
166
- * Styles for the thumb wrapper slot
167
- */
168
-
169
101
 
170
- var useThumbWrapperStyles = /*#__PURE__*/__styles({
171
- "thumbWrapper": {
102
+ const useInputStyles = /*#__PURE__*/__styles({
103
+ "base": {
104
+ "B7ck84d": "f1ewtqcl",
105
+ "Bceei9c": "f1k6fduh",
106
+ "Bqenvij": "f1l02sjl",
107
+ "oyh7mz": ["f1vgc2s3", "f1e31b4d"],
108
+ "B6of3ja": "f1hu3pq6",
109
+ "t21cq0": ["f11qmguv", "f1tyq0we"],
110
+ "jrapky": "f19f4twv",
111
+ "Frg6f3": ["f1tyq0we", "f11qmguv"],
112
+ "abs64n": "fk73vx1",
172
113
  "qhf8xq": "f1euv43f",
173
114
  "Bhzewxz": "f15twtuk",
174
- "B5kzvoi": "f1yab3r1",
175
- "oyh7mz": ["fhpx7ww", "f1kctpth"],
176
- "j35jbq": ["f1kctpth", "fhpx7ww"],
177
- "lpbzjs": "f1sdsnyy",
178
- "Bkecrkj": "f1aehjj5"
115
+ "a9b677": "fly5x3f",
116
+ "fv8x6k": ["f1owqbgs", "f1a7g3i4"],
117
+ "ezr58z": "fvxnmui",
118
+ "Blezdol": "f1cxq9o1",
119
+ "B8f96ig": "f1ks1zsm",
120
+ "po7uxr": "fiqfi0i",
121
+ "inq7wv": "f9aagkg",
122
+ "Cdugon": ["fgv8l18", "f1p3jmxb"],
123
+ "ptsei1": "f11yi64e",
124
+ "bl04ud": ["f1p3jmxb", "fgv8l18"],
125
+ "Bu7dm46": "fthrly9",
126
+ "Gwwlnz": "fhdp2ht",
127
+ "wb1her": "f1rzj6jj",
128
+ "Bmieemq": ["f1jywl1l", "f13d626x"],
129
+ "Bdgjgzg": "f1ivtmze",
130
+ "B05cvx7": ["f13d626x", "f1jywl1l"],
131
+ "Bx4eqiv": "f1uvnr57",
132
+ "xhnoxe": "frhcydi",
133
+ "Hnmc4c": ["f1pvt3n7", "f14i0clv"],
134
+ "By8gkvz": "fq9gcw4",
135
+ "lekrm4": ["f14i0clv", "f1pvt3n7"],
136
+ "Bei91sp": "fft44l1",
137
+ "Bksztz9": "fwlrvmy",
138
+ "h3gz1v": "f1c4gun2",
139
+ "Cw6427": ["flhgtcm", "fx1zdd8"],
140
+ "Bpbd9g9": "fayrp2e",
141
+ "ssulyh": ["fx1zdd8", "flhgtcm"],
142
+ "vq7rp1": "f1vk2knj",
143
+ "ynrfiu": "firogjh",
144
+ "Bf5tpyt": ["f1crd6p1", "for8100"],
145
+ "Brhic7g": "f1v5j4zb",
146
+ "Cqvc5u": ["for8100", "f1crd6p1"],
147
+ "B4e80u0": "f1rt7qcq",
148
+ "Bwj41i9": "fxvotg6",
149
+ "B2iiaa1": ["fk9ur30", "f3u5smv"],
150
+ "Bejmxmv": "fdtj07x",
151
+ "rqauf5": ["f3u5smv", "fk9ur30"],
152
+ "wo5z87": "fv5mb1o",
153
+ "B50joxe": ["f1i2l8ou", "fxj1kmv"],
154
+ "Bmuizf1": "fku528b",
155
+ "f4urji": ["fxj1kmv", "f1i2l8ou"],
156
+ "Bxiq1ly": "fabcpc0",
157
+ "vbmdq8": "f17xwy6w",
158
+ "u4vbwo": ["fipwscc", "fab39iv"],
159
+ "Bfjga03": "f1th5z1l",
160
+ "F0s3py": ["fab39iv", "fipwscc"]
161
+ },
162
+ "highContrast": {
163
+ "Bskmvfo": "f19h63kc",
164
+ "zhypoe": "ffutfdj",
165
+ "Bb6xxwe": ["f72m8yo", "f1ud47z9"],
166
+ "o89t22": "f15xfkur",
167
+ "B7qxyha": ["f1ud47z9", "f72m8yo"],
168
+ "Bhmcd6p": "f1jaqqzs"
179
169
  }
180
170
  }, {
181
- "d": [".f1euv43f{position:absolute;}", ".f15twtuk{top:0;}", ".f1yab3r1{bottom:0;}", ".fhpx7ww{left:calc(var(--switch-thumb-size) * .7);}", ".f1kctpth{right:calc(var(--switch-thumb-size) * .7);}", ".f1sdsnyy{touch-action:none;}", ".f1aehjj5{pointer-events:none;}"]
171
+ "d": [".f1ewtqcl{box-sizing:border-box;}", ".f1k6fduh{cursor:pointer;}", ".f1l02sjl{height:100%;}", ".f1vgc2s3{left:0;}", ".f1e31b4d{right:0;}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".fk73vx1{opacity:0;}", ".f1euv43f{position:absolute;}", ".f15twtuk{top:0;}", ".fly5x3f{width:100%;}", ".f1owqbgs:checked~.fui-Switch__indicator>*{-webkit-transform:translateX(22px);-moz-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px);}", ".f1a7g3i4:checked~.fui-Switch__indicator>*{-webkit-transform:translateX(-22px);-moz-transform:translateX(-22px);-ms-transform:translateX(-22px);transform:translateX(-22px);}", ".fvxnmui:disabled{cursor:default;}", ".f1cxq9o1:disabled~.fui-Switch__indicator{color:var(--colorNeutralForegroundDisabled);}", ".f1ks1zsm:disabled~.fui-Switch__label{color:var(--colorNeutralForegroundDisabled);}", ".fiqfi0i:enabled:not(:checked)~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessible);}", ".f9aagkg:enabled:not(:checked)~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeAccessible);}", ".fgv8l18:enabled:not(:checked)~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeAccessible);}", ".f1p3jmxb:enabled:not(:checked)~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeAccessible);}", ".f11yi64e:enabled:not(:checked)~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeAccessible);}", ".fthrly9:enabled:not(:checked)~.fui-Switch__label{color:var(--colorNeutralForeground1);}", ".fhdp2ht:enabled:not(:checked):hover~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessibleHover);}", ".f1rzj6jj:enabled:not(:checked):hover~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1jywl1l:enabled:not(:checked):hover~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeAccessibleHover);}", ".f13d626x:enabled:not(:checked):hover~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1ivtmze:enabled:not(:checked):hover~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1uvnr57:enabled:not(:checked):hover:active~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessiblePressed);}", ".frhcydi:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f1pvt3n7:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f14i0clv:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeAccessiblePressed);}", ".fq9gcw4:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}", ".fft44l1:enabled:checked~.fui-Switch__indicator{background-color:var(--colorBrandBackground);}", ".fwlrvmy:enabled:checked~.fui-Switch__indicator{color:var(--colorNeutralForegroundOnBrand);}", ".f1c4gun2:enabled:checked~.fui-Switch__indicator{border-top-color:var(--colorTransparentStroke);}", ".flhgtcm:enabled:checked~.fui-Switch__indicator{border-right-color:var(--colorTransparentStroke);}", ".fx1zdd8:enabled:checked~.fui-Switch__indicator{border-left-color:var(--colorTransparentStroke);}", ".fayrp2e:enabled:checked~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStroke);}", ".f1vk2knj:enabled:checked:hover~.fui-Switch__indicator{background-color:var(--colorBrandBackgroundHover);}", ".firogjh:enabled:checked:hover~.fui-Switch__indicator{border-top-color:var(--colorTransparentStrokeInteractive);}", ".f1crd6p1:enabled:checked:hover~.fui-Switch__indicator{border-right-color:var(--colorTransparentStrokeInteractive);}", ".for8100:enabled:checked:hover~.fui-Switch__indicator{border-left-color:var(--colorTransparentStrokeInteractive);}", ".f1v5j4zb:enabled:checked:hover~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".f1rt7qcq:enabled:checked:hover:active~.fui-Switch__indicator{background-color:var(--colorBrandBackgroundPressed);}", ".fxvotg6:enabled:checked:hover:active~.fui-Switch__indicator{border-top-color:var(--colorTransparentStrokeInteractive);}", ".fk9ur30:enabled:checked:hover:active~.fui-Switch__indicator{border-right-color:var(--colorTransparentStrokeInteractive);}", ".f3u5smv:enabled:checked:hover:active~.fui-Switch__indicator{border-left-color:var(--colorTransparentStrokeInteractive);}", ".fdtj07x:enabled:checked:hover:active~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".fv5mb1o:disabled:not(:checked)~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f1i2l8ou:disabled:not(:checked)~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fxj1kmv:disabled:not(:checked)~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeDisabled);}", ".fku528b:disabled:not(:checked)~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".fabcpc0:disabled:checked~.fui-Switch__indicator{background-color:var(--colorNeutralBackgroundDisabled);}", ".f17xwy6w:disabled:checked~.fui-Switch__indicator{border-top-color:var(--colorTransparentStrokeDisabled);}", ".fipwscc:disabled:checked~.fui-Switch__indicator{border-right-color:var(--colorTransparentStrokeDisabled);}", ".fab39iv:disabled:checked~.fui-Switch__indicator{border-left-color:var(--colorTransparentStrokeDisabled);}", ".f1th5z1l:disabled:checked~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStrokeDisabled);}"],
172
+ "t": ["@media (forced-colors: active){.f19h63kc:disabled~.fui-Switch__indicator{color:GrayText;}}", "@media (forced-colors: active){.ffutfdj:disabled~.fui-Switch__indicator{border-top-color:GrayText;}}", "@media (forced-colors: active){.f72m8yo:disabled~.fui-Switch__indicator{border-right-color:GrayText;}.f1ud47z9:disabled~.fui-Switch__indicator{border-left-color:GrayText;}}", "@media (forced-colors: active){.f15xfkur:disabled~.fui-Switch__indicator{border-bottom-color:GrayText;}}", "@media (forced-colors: active){.f1ud47z9:disabled~.fui-Switch__indicator{border-left-color:GrayText;}.f72m8yo:disabled~.fui-Switch__indicator{border-right-color:GrayText;}}", "@media (forced-colors: active){.f1jaqqzs:disabled~.fui-Switch__label{color:GrayText;}}"]
182
173
  });
183
- /**
184
- * Styles for the thumb slot
185
- */
186
174
 
187
-
188
- var useThumbStyles = /*#__PURE__*/__styles({
189
- "thumb": {
190
- "qhf8xq": "f1euv43f",
191
- "a9b677": "fcjrtee",
192
- "Bqenvij": "fili5n9",
193
- "B7ck84d": "f1ewtqcl",
194
- "Dimara": "f44lkw9",
195
- "Bhzewxz": "f1i1t8d1",
196
- "Bz10aip": ["foouk8k", "fd9rb4b"],
197
- "Bi2q7bf": "f11zxivh",
198
- "lpbzjs": "f1sdsnyy",
199
- "Bkecrkj": "f1aehjj5",
200
- "xx9plb": "fxf9f1y",
201
- "Bf8kmfk": "frdto5n",
202
- "Byque4d": ["f8g0ba1", "ff0gctb"],
203
- "Bj2wrql": "f3zr33r",
204
- "qd6xl9": ["ff0gctb", "f8g0ba1"],
205
- "zf3lio": "fmrqcwg",
206
- "rurcny": "f99sooz",
207
- "ngabwx": "f1uhpfti",
208
- "Hdbjpj": "f11ef69",
209
- "u6d25": "f1yuyem3",
210
- "jc51t6": ["f1bp8q63", "f1oarbwq"],
211
- "Bj55yzk": "f13gddrr",
212
- "cnmfks": ["f1oarbwq", "f1bp8q63"],
213
- "c4kunb": "f1y5o2fm",
214
- "Bs6t6z0": "f77y9vx",
215
- "Bmyypfa": "frd86tk"
175
+ const useLabelStyles = /*#__PURE__*/__styles({
176
+ "base": {
177
+ "famaaq": "f1xqy1su"
216
178
  },
217
- "unchecked": {
218
- "B4zgs9e": "f1imqj0g"
179
+ "above": {
180
+ "jrapky": "f8l5zjj"
219
181
  },
220
- "checked": {
221
- "Bpudnjh": "fe3g45j"
182
+ "after": {
183
+ "Frg6f3": ["f199hnxi", "fkujibs"]
222
184
  },
223
- "disabledUnchecked": {
224
- "dj0dih": "f199l62q",
225
- "D4ky5z": ["f1pa2qi2", "f1ooiv2t"],
226
- "k1i1uq": "fyqop9u",
227
- "Bcasopp": ["f1ooiv2t", "f1pa2qi2"],
228
- "Bdixowu": "f1bwkb58",
229
- "cqycoz": ["fiio4mc", "fc8z0qo"],
230
- "Epwjcz": "f1m5ya7j",
231
- "Bwdktmn": ["fc8z0qo", "fiio4mc"],
232
- "ijj6k": "f1k21dld",
233
- "I89eb": ["f1yueqd5", "f16ep8jm"],
234
- "Bp1vogq": "flh92r5",
235
- "Bohd3ja": ["f16ep8jm", "f1yueqd5"],
236
- "B4zgs9e": "fer8lxq"
237
- },
238
- "disabledChecked": {
239
- "Bpudnjh": "fz051tx"
185
+ "before": {
186
+ "t21cq0": ["fkujibs", "f199hnxi"]
240
187
  }
241
188
  }, {
242
- "d": [".f1euv43f{position:absolute;}", ".fcjrtee{width:var(--switch-thumb-size);}", ".fili5n9{height:var(--switch-thumb-size);}", ".f1ewtqcl{box-sizing:border-box;}", ".f44lkw9{border-radius:var(--borderRadiusCircular);}", ".f1i1t8d1{top:50%;}", ".foouk8k{-webkit-transform:translate(-50%, -50%);-moz-transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%);transform:translate(-50%, -50%);}", ".fd9rb4b{-webkit-transform:translate(50%, -50%);-moz-transform:translate(50%, -50%);-ms-transform:translate(50%, -50%);transform:translate(50%, -50%);}", ".f11zxivh{-webkit-transition:background .1s cubic-bezier(0.33, 0.0, 0.67, 1);transition:background .1s cubic-bezier(0.33, 0.0, 0.67, 1);}", ".f1sdsnyy{touch-action:none;}", ".f1aehjj5{pointer-events:none;}", ".fxf9f1y:before{position:absolute;}", ".frdto5n:before{top:0px;}", ".f8g0ba1:before{left:0px;}", ".ff0gctb:before{right:0px;}", ".f3zr33r:before{bottom:0px;}", ".fmrqcwg:before{border-radius:var(--borderRadiusCircular);}", ".f99sooz:before{content:'';}", ".f1uhpfti:before{opacity:var(--switch-unchecked-opacity);}", ".f11ef69:after{position:absolute;}", ".f1yuyem3:after{top:0px;}", ".f1bp8q63:after{left:0px;}", ".f1oarbwq:after{right:0px;}", ".f13gddrr:after{bottom:0px;}", ".f1y5o2fm:after{border-radius:var(--borderRadiusCircular);}", ".f77y9vx:after{content:'';}", ".frd86tk:after{opacity:var(--switch-checked-opacity);}", ".f1imqj0g:before{background:var(--colorNeutralStrokeAccessible);}", ".fe3g45j:after{background:var(--colorNeutralForegroundOnBrand);}", ".f199l62q:before{border-top-width:1px;}", ".f1pa2qi2:before{border-right-width:1px;}", ".f1ooiv2t:before{border-left-width:1px;}", ".fyqop9u:before{border-bottom-width:1px;}", ".f1bwkb58:before{border-top-style:solid;}", ".fiio4mc:before{border-right-style:solid;}", ".fc8z0qo:before{border-left-style:solid;}", ".f1m5ya7j:before{border-bottom-style:solid;}", ".f1k21dld:before{border-top-color:var(--colorNeutralForegroundDisabled);}", ".f1yueqd5:before{border-right-color:var(--colorNeutralForegroundDisabled);}", ".f16ep8jm:before{border-left-color:var(--colorNeutralForegroundDisabled);}", ".flh92r5:before{border-bottom-color:var(--colorNeutralForegroundDisabled);}", ".fer8lxq:before{background:var(--colorNeutralBackground1);}", ".fz051tx:after{background:var(--colorNeutralForegroundDisabled);}"]
189
+ "d": [".f1xqy1su{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}", ".f8l5zjj{margin-bottom:var(--spacingVerticalXS);}", ".f199hnxi{margin-left:var(--spacingHorizontalM);}", ".fkujibs{margin-right:var(--spacingHorizontalM);}"]
243
190
  });
244
191
  /**
245
- * Styles for the activeRail slot
192
+ * Apply styling to the Switch slots based on the state
246
193
  */
247
194
 
248
195
 
249
- var useActiveRailStyles = /*#__PURE__*/__styles({
250
- "activeRail": {
251
- "qhf8xq": "f1euv43f",
252
- "oyh7mz": ["fhpx7ww", "f1kctpth"],
253
- "j35jbq": ["f1kctpth", "fhpx7ww"]
254
- }
255
- }, {
256
- "d": [".f1euv43f{position:absolute;}", ".fhpx7ww{left:calc(var(--switch-thumb-size) * .7);}", ".f1kctpth{right:calc(var(--switch-thumb-size) * .7);}"]
257
- });
258
- /**
259
- * Styles for the hidden input slot
260
- */
196
+ export const useSwitchStyles_unstable = state => {
197
+ const rootStyles = useRootStyles();
198
+ const indicatorStyles = useIndicatorStyles();
199
+ const inputStyles = useInputStyles();
200
+ const labelStyles = useLabelStyles();
201
+ const {
202
+ labelPosition
203
+ } = state;
204
+ state.root.className = mergeClasses(switchClassNames.root, rootStyles.base, labelPosition === 'above' && rootStyles.vertical, state.root.className);
205
+ state.indicator.className = mergeClasses(switchClassNames.indicator, indicatorStyles.base, state.indicator.className);
206
+ state.input.className = mergeClasses(switchClassNames.input, inputStyles.base, inputStyles.highContrast, state.input.className);
261
207
 
262
-
263
- var useInputStyle = /*#__PURE__*/__styles({
264
- "input": {
265
- "abs64n": "fk73vx1",
266
- "qhf8xq": "f1euv43f",
267
- "z8tnut": "f1g0x7ka",
268
- "z189sj": ["fhxju0i", "f1cnd47f"],
269
- "Byoj8tv": "f1qch9an",
270
- "uwmqm3": ["f1cnd47f", "fhxju0i"],
271
- "B6of3ja": "f1hu3pq6",
272
- "t21cq0": ["f11qmguv", "f1tyq0we"],
273
- "jrapky": "f19f4twv",
274
- "Frg6f3": ["f1tyq0we", "f11qmguv"],
275
- "a9b677": "fly5x3f",
276
- "Bqenvij": "f1l02sjl",
277
- "lpbzjs": "f1sdsnyy",
278
- "Bkecrkj": "f1aehjj5"
208
+ if (state.label) {
209
+ state.label.className = mergeClasses(switchClassNames.label, labelStyles.base, labelStyles[labelPosition], state.label.className);
279
210
  }
280
- }, {
281
- "d": [".fk73vx1{opacity:0;}", ".f1euv43f{position:absolute;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".fly5x3f{width:100%;}", ".f1l02sjl{height:100%;}", ".f1sdsnyy{touch-action:none;}", ".f1aehjj5{pointer-events:none;}"]
282
- });
283
- /**
284
- * Apply styling to the Switch slots based on the state
285
- */
286
-
287
211
 
288
- export var useSwitchStyles = function (state) {
289
- var _a = state.input,
290
- checked = _a.checked,
291
- disabled = _a.disabled;
292
- var rootStyles = useRootStyles();
293
- var trackStyles = useTrackStyles();
294
- var thumbWrapperStyles = useThumbWrapperStyles();
295
- var thumbStyles = useThumbStyles();
296
- var activeRailStyles = useActiveRailStyles();
297
- var inputStyles = useInputStyle();
298
- state.root.className = mergeClasses(rootClassName + (checked ? ' checked' : ''), rootStyles.root, rootStyles.focusIndicator, !disabled && rootStyles.checked, !disabled && rootStyles.unchecked, disabled ? rootStyles.disabled : rootStyles.enabled, state.root.className);
299
- state.track.className = mergeClasses(trackClassName, trackStyles.track, !disabled && trackStyles.checked, !disabled && trackStyles.unchecked, disabled && trackStyles.disabledChecked, disabled && trackStyles.disabledUnchecked, state.track.className);
300
- state.thumbWrapper.className = mergeClasses(thumbWrapperStyles.thumbWrapper, state.thumbWrapper.className);
301
- state.thumb.className = mergeClasses(thumbClassName, thumbStyles.thumb, !disabled && thumbStyles.checked, !disabled && thumbStyles.unchecked, disabled && thumbStyles.disabledChecked, disabled && thumbStyles.disabledUnchecked, state.thumb.className);
302
- state.activeRail.className = mergeClasses(activeRailStyles.activeRail, state.activeRail.className);
303
- state.input.className = mergeClasses(inputStyles.input, state.input.className);
304
212
  return state;
305
213
  };
306
214
  //# sourceMappingURL=useSwitchStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Switch/useSwitchStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,6BAAzC;AACA,SAAS,uBAAT,QAAwC,yBAAxC;AAGA,IAAM,aAAa,GAAG,gBAAtB;AACA,IAAM,cAAc,GAAG,iBAAvB;AACA,IAAM,cAAc,GAAG,iBAAvB;AAEA;;AAEG;;AACH,IAAM,aAAa,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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ApC;AAMD;;AAED,SAAO,KAAP;AACD,CAlCM","sourcesContent":["import { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SwitchSlots, SwitchState } from './Switch.types';\n\nexport const switchClassNames: SlotClassNames<SwitchSlots> = {\n root: 'fui-Switch',\n indicator: 'fui-Switch__indicator',\n input: 'fui-Switch__input',\n label: 'fui-Switch__label',\n};\n\n/**\n * @deprecated Use `switchClassNames.root` instead.\n */\nexport const switchClassName = switchClassNames.root;\n\n// Thumb and track sizes used by the component.\nconst spaceBetweenThumbAndTrack = 2;\nconst thumbSize = 14;\nconst trackHeight = 20;\nconst trackWidth = 40;\n\nconst useRootStyles = makeStyles({\n base: {\n alignItems: 'flex-start',\n boxSizing: 'border-box',\n display: 'inline-flex',\n ...shorthands.padding(tokens.spacingVerticalS, tokens.spacingHorizontalS),\n position: 'relative',\n\n ...createFocusOutlineStyle({ style: {}, selector: 'focus-within' }),\n },\n\n vertical: {\n flexDirection: 'column',\n paddingTop: tokens.spacingVerticalXS,\n },\n});\n\nconst useIndicatorStyles = makeStyles({\n base: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderWidth('1px'),\n boxSizing: 'border-box',\n fill: 'currentColor',\n flexShrink: 0,\n fontSize: `${thumbSize + spaceBetweenThumbAndTrack}px`,\n height: `${trackHeight}px`,\n pointerEvents: 'none',\n transitionDuration: '200ms',\n transitionTimingFunction: 'cubic-bezier(0.33, 0, 0.67, 1)',\n transitionProperty: 'background, border, color',\n width: `${trackWidth}px`,\n\n '> *': {\n transitionDuration: '200ms',\n transitionTimingFunction: 'cubic-bezier(0.33, 0, 0.67, 1)',\n transitionProperty: 'transform',\n },\n },\n});\n\nconst useInputStyles = makeStyles({\n base: {\n boxSizing: 'border-box',\n cursor: 'pointer',\n height: '100%',\n left: 0,\n ...shorthands.margin(0),\n opacity: 0,\n position: 'absolute',\n top: 0,\n width: '100%',\n\n // Checked (both enabled and disabled)\n ':checked': {\n [`& ~ .${switchClassNames.indicator}`]: {\n '> *': {\n transform: `translateX(${trackWidth - thumbSize - spaceBetweenThumbAndTrack * 2}px)`,\n },\n },\n },\n\n // Disabled (both checked and unchecked)\n ':disabled': {\n cursor: 'default',\n\n [`& ~ .${switchClassNames.indicator}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n [`& ~ .${switchClassNames.label}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n\n // Enabled and unchecked\n ':enabled:not(:checked)': {\n [`& ~ .${switchClassNames.indicator}`]: {\n color: tokens.colorNeutralStrokeAccessible,\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessible),\n },\n\n [`& ~ .${switchClassNames.label}`]: {\n color: tokens.colorNeutralForeground1,\n },\n\n ':hover': {\n [`& ~ .${switchClassNames.indicator}`]: {\n color: tokens.colorNeutralStrokeAccessibleHover,\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessibleHover),\n },\n },\n\n ':hover:active': {\n [`& ~ .${switchClassNames.indicator}`]: {\n color: tokens.colorNeutralStrokeAccessiblePressed,\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessiblePressed),\n },\n },\n },\n\n // Enabled and checked\n ':enabled:checked': {\n [`& ~ .${switchClassNames.indicator}`]: {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n\n ':hover': {\n [`& ~ .${switchClassNames.indicator}`]: {\n backgroundColor: tokens.colorBrandBackgroundHover,\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n },\n\n ':hover:active': {\n [`& ~ .${switchClassNames.indicator}`]: {\n backgroundColor: tokens.colorBrandBackgroundPressed,\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n },\n },\n\n // Disabled and unchecked\n ':disabled:not(:checked)': {\n [`& ~ .${switchClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n },\n },\n\n // Disabled and checked\n ':disabled:checked': {\n [`& ~ .${switchClassNames.indicator}`]: {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorTransparentStrokeDisabled),\n },\n },\n },\n\n highContrast: {\n '@media (forced-colors: active)': {\n ':disabled': {\n [`& ~ .${switchClassNames.indicator}`]: {\n color: 'GrayText',\n ...shorthands.borderColor('GrayText'),\n },\n\n [`& ~ .${switchClassNames.label}`]: {\n color: 'GrayText',\n },\n },\n },\n },\n});\n\nconst useLabelStyles = makeStyles({\n base: {\n userSelect: 'none',\n },\n\n above: {\n marginBottom: tokens.spacingVerticalXS,\n },\n after: {\n marginLeft: tokens.spacingHorizontalM,\n },\n before: {\n marginRight: tokens.spacingHorizontalM,\n },\n});\n\n/**\n * Apply styling to the Switch slots based on the state\n */\nexport const useSwitchStyles_unstable = (state: SwitchState): SwitchState => {\n const rootStyles = useRootStyles();\n const indicatorStyles = useIndicatorStyles();\n const inputStyles = useInputStyles();\n const labelStyles = useLabelStyles();\n\n const { labelPosition } = state;\n\n state.root.className = mergeClasses(\n switchClassNames.root,\n rootStyles.base,\n labelPosition === 'above' && rootStyles.vertical,\n state.root.className,\n );\n\n state.indicator.className = mergeClasses(switchClassNames.indicator, indicatorStyles.base, state.indicator.className);\n\n state.input.className = mergeClasses(\n switchClassNames.input,\n inputStyles.base,\n inputStyles.highContrast,\n state.input.className,\n );\n\n if (state.label) {\n state.label.className = mergeClasses(\n switchClassNames.label,\n labelStyles.base,\n labelStyles[labelPosition],\n state.label.className,\n );\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
package/lib/index.js CHANGED
@@ -1,2 +1,3 @@
1
- export * from './Switch';
1
+ export { Switch, renderSwitch_unstable, // eslint-disable-next-line deprecation/deprecation
2
+ switchClassName, switchClassNames, useSwitchStyles_unstable, useSwitch_unstable } from './Switch';
2
3
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC"}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,SACE,MADF,EAEE,qBAFF,EAGE;AACA,eAJF,EAKE,gBALF,EAME,wBANF,EAOE,kBAPF,QAQO,UARP","sourcesContent":["export {\n Switch,\n renderSwitch_unstable,\n // eslint-disable-next-line deprecation/deprecation\n switchClassName,\n switchClassNames,\n useSwitchStyles_unstable,\n useSwitch_unstable,\n} from './Switch';\nexport type { SwitchOnChangeData, SwitchProps, SwitchSlots, SwitchState } from './Switch';\n"],"sourceRoot":"../src/"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var tslib_1 = /*#__PURE__*/require("tslib");
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
8
 
9
9
  tslib_1.__exportStar(require("./components/Switch/index"), exports);
10
10
  //# sourceMappingURL=Switch.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/Switch.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,2BAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["Switch.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,2BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/Switch/index';\n"],"sourceRoot":"../src/"}
@@ -5,22 +5,22 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Switch = void 0;
7
7
 
8
- var React = /*#__PURE__*/require("react");
8
+ const React = /*#__PURE__*/require("react");
9
9
 
10
- var useSwitch_1 = /*#__PURE__*/require("./useSwitch");
10
+ const useSwitch_1 = /*#__PURE__*/require("./useSwitch");
11
11
 
12
- var renderSwitch_1 = /*#__PURE__*/require("./renderSwitch");
12
+ const renderSwitch_1 = /*#__PURE__*/require("./renderSwitch");
13
13
 
14
- var useSwitchStyles_1 = /*#__PURE__*/require("./useSwitchStyles");
14
+ const useSwitchStyles_1 = /*#__PURE__*/require("./useSwitchStyles");
15
15
  /**
16
- * The Switch control enables users to trigger an option on or off through pressing on the component.
16
+ * Switches enable users to trigger an option on or off through pressing the component.
17
17
  */
18
18
 
19
19
 
20
- exports.Switch = /*#__PURE__*/React.forwardRef(function (props, ref) {
21
- var state = useSwitch_1.useSwitch(props, ref);
22
- useSwitchStyles_1.useSwitchStyles(state);
23
- return renderSwitch_1.renderSwitch(state);
20
+ exports.Switch = /*#__PURE__*/React.forwardRef((props, ref) => {
21
+ const state = useSwitch_1.useSwitch_unstable(props, ref);
22
+ useSwitchStyles_1.useSwitchStyles_unstable(state);
23
+ return renderSwitch_1.renderSwitch_unstable(state);
24
24
  });
25
25
  exports.Switch.displayName = 'Switch';
26
26
  //# sourceMappingURL=Switch.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,WAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;;AACA,IAAA,cAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,MAAA,gBAA2C,KAAK,CAAC,UAAN,CAAiB,UAAC,KAAD,EAAQ,GAAR,EAAW;AAClF,MAAM,KAAK,GAAG,WAAA,CAAA,SAAA,CAAU,KAAV,EAAiB,GAAjB,CAAd;AAEA,EAAA,iBAAA,CAAA,eAAA,CAAgB,KAAhB;AAEA,SAAO,cAAA,CAAA,YAAA,CAAa,KAAb,CAAP;AACD,CANuD,CAA3C;AAQb,OAAA,CAAA,MAAA,CAAO,WAAP,GAAqB,QAArB","sourceRoot":""}
1
+ {"version":3,"sources":["components/Switch/Switch.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,WAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,MAAA,gBAA2C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtF,QAAM,KAAK,GAAG,WAAA,CAAA,kBAAA,CAAmB,KAAnB,EAA0B,GAA1B,CAAd;AAEA,EAAA,iBAAA,CAAA,wBAAA,CAAyB,KAAzB;AAEA,SAAO,cAAA,CAAA,qBAAA,CAAsB,KAAtB,CAAP;AACD,CANuD,CAA3C;AAQb,OAAA,CAAA,MAAA,CAAO,WAAP,GAAqB,QAArB","sourcesContent":["import * as React from 'react';\nimport { useSwitch_unstable } from './useSwitch';\nimport { renderSwitch_unstable } from './renderSwitch';\nimport { useSwitchStyles_unstable } from './useSwitchStyles';\nimport type { SwitchProps } from './Switch.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Switches enable users to trigger an option on or off through pressing the component.\n */\nexport const Switch: ForwardRefComponent<SwitchProps> = React.forwardRef((props, ref) => {\n const state = useSwitch_unstable(props, ref);\n\n useSwitchStyles_unstable(state);\n\n return renderSwitch_unstable(state);\n});\n\nSwitch.displayName = 'Switch';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var tslib_1 = /*#__PURE__*/require("tslib");
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
8
 
9
9
  tslib_1.__exportStar(require("./Switch"), exports);
10
10