@fluentui/react-select 9.0.0-beta.9 → 9.0.1

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 (68) hide show
  1. package/CHANGELOG.json +515 -1
  2. package/CHANGELOG.md +189 -2
  3. package/README.md +1 -5
  4. package/dist/index.d.ts +17 -0
  5. package/lib/Select.js.map +1 -1
  6. package/lib/SelectField.js +2 -0
  7. package/lib/SelectField.js.map +1 -0
  8. package/lib/components/Select/Select.js +0 -1
  9. package/lib/components/Select/Select.js.map +1 -1
  10. package/lib/components/Select/Select.types.js.map +1 -1
  11. package/lib/components/Select/index.js.map +1 -1
  12. package/lib/components/Select/renderSelect.js +6 -4
  13. package/lib/components/Select/renderSelect.js.map +1 -1
  14. package/lib/components/Select/useSelect.js +4 -2
  15. package/lib/components/Select/useSelect.js.map +1 -1
  16. package/lib/components/Select/useSelectStyles.js +223 -194
  17. package/lib/components/Select/useSelectStyles.js.map +1 -1
  18. package/lib/components/SelectField/SelectField.js +8 -0
  19. package/lib/components/SelectField/SelectField.js.map +1 -0
  20. package/lib/components/SelectField/index.js +2 -0
  21. package/lib/components/SelectField/index.js.map +1 -0
  22. package/lib/index.js +2 -0
  23. package/lib/index.js.map +1 -1
  24. package/lib-amd/Select.js +6 -0
  25. package/lib-amd/Select.js.map +1 -0
  26. package/lib-amd/SelectField.js +6 -0
  27. package/lib-amd/SelectField.js.map +1 -0
  28. package/lib-amd/components/Select/Select.js +15 -0
  29. package/lib-amd/components/Select/Select.js.map +1 -0
  30. package/lib-amd/components/Select/Select.types.js +5 -0
  31. package/lib-amd/components/Select/Select.types.js.map +1 -0
  32. package/lib-amd/components/Select/index.js +10 -0
  33. package/lib-amd/components/Select/index.js.map +1 -0
  34. package/lib-amd/components/Select/renderSelect.js +16 -0
  35. package/lib-amd/components/Select/renderSelect.js.map +1 -0
  36. package/lib-amd/components/Select/useSelect.js +51 -0
  37. package/lib-amd/components/Select/useSelect.js.map +1 -0
  38. package/lib-amd/components/Select/useSelectStyles.js +154 -0
  39. package/lib-amd/components/Select/useSelectStyles.js.map +1 -0
  40. package/lib-amd/components/SelectField/SelectField.js +10 -0
  41. package/lib-amd/components/SelectField/SelectField.js.map +1 -0
  42. package/lib-amd/components/SelectField/index.js +6 -0
  43. package/lib-amd/components/SelectField/index.js.map +1 -0
  44. package/lib-amd/index.js +13 -0
  45. package/lib-amd/index.js.map +1 -0
  46. package/lib-commonjs/Select.js +0 -2
  47. package/lib-commonjs/Select.js.map +1 -1
  48. package/lib-commonjs/SelectField.js +8 -0
  49. package/lib-commonjs/SelectField.js.map +1 -0
  50. package/lib-commonjs/components/Select/Select.js +0 -6
  51. package/lib-commonjs/components/Select/Select.js.map +1 -1
  52. package/lib-commonjs/components/Select/Select.types.js.map +1 -1
  53. package/lib-commonjs/components/Select/index.js +0 -6
  54. package/lib-commonjs/components/Select/index.js.map +1 -1
  55. package/lib-commonjs/components/Select/renderSelect.js +6 -8
  56. package/lib-commonjs/components/Select/renderSelect.js.map +1 -1
  57. package/lib-commonjs/components/Select/useSelect.js +4 -7
  58. package/lib-commonjs/components/Select/useSelect.js.map +1 -1
  59. package/lib-commonjs/components/Select/useSelectStyles.js +223 -198
  60. package/lib-commonjs/components/Select/useSelectStyles.js.map +1 -1
  61. package/lib-commonjs/components/SelectField/SelectField.js +14 -0
  62. package/lib-commonjs/components/SelectField/SelectField.js.map +1 -0
  63. package/lib-commonjs/components/SelectField/index.js +8 -0
  64. package/lib-commonjs/components/SelectField/index.js.map +1 -0
  65. package/lib-commonjs/index.js +15 -3
  66. package/lib-commonjs/index.js.map +1 -1
  67. package/package.json +20 -17
  68. package/Spec.md +0 -238
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useSelectStyles_unstable = exports.selectClassNames = void 0;
7
-
8
7
  const react_1 = /*#__PURE__*/require("@griffel/react");
9
-
10
8
  const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
11
-
12
9
  exports.selectClassNames = {
13
10
  root: 'fui-Select',
14
11
  select: 'fui-Select__select',
@@ -18,258 +15,286 @@ const iconSizes = {
18
15
  small: '16px',
19
16
  medium: '20px',
20
17
  large: '24px'
21
- }; // TODO: This 400 style is not in the typography styles.
22
- // May need a design change
23
-
24
- const contentSizes = {
25
- 400: {
26
- fontSize: react_theme_1.tokens.fontSizeBase400,
27
- lineHeight: react_theme_1.tokens.lineHeightBase400
28
- }
29
- }; //TODO: Should fieldHeights be a set of global design tokens or constants?
30
-
18
+ };
19
+ //TODO: Should fieldHeights be a set of global design tokens or constants?
31
20
  const fieldHeights = {
32
21
  small: '24px',
33
22
  medium: '32px',
34
23
  large: '40px'
35
24
  };
25
+ /* Since the <select> element must span the full width and cannot have children,
26
+ * the right padding needs to be calculated from the sum of the following:
27
+ * 1. Field padding-right
28
+ * 2. Icon width
29
+ * 3. Content-icon spacing
30
+ * 4. Content inner padding
31
+ */
32
+ const paddingRight = {
33
+ small: `calc(${react_theme_1.tokens.spacingHorizontalSNudge}
34
+ + ${iconSizes.small}
35
+ + ${react_theme_1.tokens.spacingHorizontalXXS}
36
+ + ${react_theme_1.tokens.spacingHorizontalXXS})`,
37
+ medium: `calc(${react_theme_1.tokens.spacingHorizontalMNudge}
38
+ + ${iconSizes.medium}
39
+ + ${react_theme_1.tokens.spacingHorizontalXXS}
40
+ + ${react_theme_1.tokens.spacingHorizontalXXS})`,
41
+ large: `calc(${react_theme_1.tokens.spacingHorizontalM}
42
+ + ${iconSizes.large}
43
+ + ${react_theme_1.tokens.spacingHorizontalSNudge}
44
+ + ${react_theme_1.tokens.spacingHorizontalSNudge})`
45
+ };
46
+ /* Left padding is calculated from the outer padding + inner content padding values
47
+ * since <select> can't have additional child content or custom inner layout */
48
+ const paddingLeft = {
49
+ small: `calc(${react_theme_1.tokens.spacingHorizontalSNudge} + ${react_theme_1.tokens.spacingHorizontalXXS})`,
50
+ medium: `calc(${react_theme_1.tokens.spacingHorizontalMNudge} + ${react_theme_1.tokens.spacingHorizontalXXS})`,
51
+ large: `calc(${react_theme_1.tokens.spacingHorizontalM} + ${react_theme_1.tokens.spacingHorizontalSNudge})`
52
+ };
36
53
  /* end of shared values */
37
-
38
54
  const useRootStyles = /*#__PURE__*/react_1.__styles({
39
- "base": {
40
- "Bt984gj": "f122n59",
41
- "B7ck84d": "f1ewtqcl",
42
- "mc9l5x": "f22iagw",
43
- "Eh141a": "flvyvdh",
44
- "Bahqtrf": "fk6fouc",
45
- "qhf8xq": "f10pi13n",
46
- "h62rwi": "f7ll8cq",
47
- "B3778ie": ["f1ibwz09", "f1kp91vd"],
48
- "d9w3h3": ["f1kp91vd", "f1ibwz09"],
49
- "Bl18szs": ["f18vqdqu", "f53nyzz"],
50
- "B4j8arr": ["f53nyzz", "f18vqdqu"],
51
- "li1rpt": "f1gw3sf2",
52
- "Bsft5z2": "f13zj6fq",
53
- "Dlnsje": "fhwjr99",
54
- "E3zdtr": "f1mdlcz9",
55
- "By385i5": "fo72kxq",
56
- "Eqx8gd": ["f1n6gb5g", "f15yvnhg"],
57
- "B1piin3": ["f15yvnhg", "f1n6gb5g"],
58
- "b1kco5": "f1yk9hq",
59
- "Ba2ppi3": "fhwpy7i",
60
- "F2fol1": "f14ee0xe",
61
- "lck23g": "f1xhbsuh",
62
- "df92cz": "fv8e3ye",
63
- "I188md": "ftb5wc6",
64
- "umuwi5": "fjw5xc1",
65
- "Blcqepd": "f1xdyd5c",
66
- "nplu4u": "fatpbeo",
67
- "Bioka5o": "fb7uyps",
68
- "H713fs": "f1cmft4k",
69
- "B9ooomg": "f1x58t8o"
55
+ base: {
56
+ Bt984gj: "f122n59",
57
+ B7ck84d: "f1ewtqcl",
58
+ mc9l5x: "f22iagw",
59
+ Eh141a: "flvyvdh",
60
+ Bahqtrf: "fk6fouc",
61
+ qhf8xq: "f10pi13n",
62
+ h62rwi: "f7ll8cq",
63
+ B3778ie: ["f1ibwz09", "f1kp91vd"],
64
+ d9w3h3: ["f1kp91vd", "f1ibwz09"],
65
+ Bl18szs: ["f18vqdqu", "f53nyzz"],
66
+ B4j8arr: ["f53nyzz", "f18vqdqu"],
67
+ li1rpt: "f1gw3sf2",
68
+ Bsft5z2: "f13zj6fq",
69
+ Dlnsje: "fhwjr99",
70
+ E3zdtr: "f1mdlcz9",
71
+ By385i5: "fo72kxq",
72
+ Eqx8gd: ["f1n6gb5g", "f15yvnhg"],
73
+ B1piin3: ["f15yvnhg", "f1n6gb5g"],
74
+ b1kco5: "f1yk9hq",
75
+ Ba2ppi3: "fhwpy7i",
76
+ F2fol1: "f14ee0xe",
77
+ lck23g: "f1xhbsuh",
78
+ df92cz: "fv8e3ye",
79
+ I188md: "ftb5wc6",
80
+ umuwi5: "fjw5xc1",
81
+ Blcqepd: "f1xdyd5c",
82
+ nplu4u: "fatpbeo",
83
+ Bioka5o: "fb7uyps",
84
+ H713fs: "f1cmft4k",
85
+ B9ooomg: "f1x58t8o"
70
86
  }
71
87
  }, {
72
- "d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f1ewtqcl{box-sizing:border-box;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".flvyvdh{-webkit-box-flex-wrap:nowrap;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f10pi13n{position:relative;}", ".f7ll8cq::after{background-image:linear-gradient(\n 0deg,\n var(--colorCompoundBrandStroke) 0%,\n var(--colorCompoundBrandStroke) 50%,\n transparent 50%,\n transparent 100%\n );}", ".f1ibwz09::after{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f1kp91vd::after{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f18vqdqu::after{border-top-right-radius:0;}", ".f53nyzz::after{border-top-left-radius:0;}", ".f1gw3sf2::after{box-sizing:border-box;}", ".f13zj6fq::after{content:\"\";}", ".fhwjr99::after{height:var(--borderRadiusMedium);}", ".f1mdlcz9::after{position:absolute;}", ".fo72kxq::after{bottom:0;}", ".f1n6gb5g::after{left:0;}", ".f15yvnhg::after{right:0;}", ".f1yk9hq::after{-webkit-transform:scaleX(0);-moz-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);}", ".fhwpy7i::after{transition-property:transform;}", ".f14ee0xe::after{transition-duration:var(--durationUltraFast);}", ".f1xhbsuh::after{transition-delay:var(--curveAccelerateMid);}"],
73
- "m": [["@media screen and (prefers-reduced-motion: reduce){.fv8e3ye::after{transition-duration:0.01ms;}}", {
74
- "m": "screen and (prefers-reduced-motion: reduce)"
88
+ d: [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f1ewtqcl{box-sizing:border-box;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".flvyvdh{-webkit-box-flex-wrap:nowrap;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f10pi13n{position:relative;}", ".f7ll8cq::after{background-image:linear-gradient(\n 0deg,\n var(--colorCompoundBrandStroke) 0%,\n var(--colorCompoundBrandStroke) 50%,\n transparent 50%,\n transparent 100%\n );}", ".f1ibwz09::after{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f1kp91vd::after{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f18vqdqu::after{border-top-right-radius:0;}", ".f53nyzz::after{border-top-left-radius:0;}", ".f1gw3sf2::after{box-sizing:border-box;}", ".f13zj6fq::after{content:\"\";}", ".fhwjr99::after{height:var(--borderRadiusMedium);}", ".f1mdlcz9::after{position:absolute;}", ".fo72kxq::after{bottom:0;}", ".f1n6gb5g::after{left:0;}", ".f15yvnhg::after{right:0;}", ".f1yk9hq::after{-webkit-transform:scaleX(0);-moz-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);}", ".fhwpy7i::after{transition-property:transform;}", ".f14ee0xe::after{transition-duration:var(--durationUltraFast);}", ".f1xhbsuh::after{transition-delay:var(--curveAccelerateMid);}"],
89
+ m: [["@media screen and (prefers-reduced-motion: reduce){.fv8e3ye::after{transition-duration:0.01ms;}}", {
90
+ m: "screen and (prefers-reduced-motion: reduce)"
75
91
  }], ["@media screen and (prefers-reduced-motion: reduce){.ftb5wc6::after{transition-delay:0.01ms;}}", {
76
- "m": "screen and (prefers-reduced-motion: reduce)"
92
+ m: "screen and (prefers-reduced-motion: reduce)"
77
93
  }], ["@media screen and (prefers-reduced-motion: reduce){.f1cmft4k:focus-within::after{transition-duration:0.01ms;}}", {
78
- "m": "screen and (prefers-reduced-motion: reduce)"
94
+ m: "screen and (prefers-reduced-motion: reduce)"
79
95
  }], ["@media screen and (prefers-reduced-motion: reduce){.f1x58t8o:focus-within::after{transition-delay:0.01ms;}}", {
80
- "m": "screen and (prefers-reduced-motion: reduce)"
96
+ m: "screen and (prefers-reduced-motion: reduce)"
81
97
  }]],
82
- "w": [".fjw5xc1:focus-within::after{-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1);}", ".f1xdyd5c:focus-within::after{transition-property:transform;}", ".fatpbeo:focus-within::after{transition-duration:var(--durationNormal);}", ".fb7uyps:focus-within::after{transition-delay:var(--curveDecelerateMid);}"]
98
+ w: [".fjw5xc1:focus-within::after{-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1);}", ".f1xdyd5c:focus-within::after{transition-property:transform;}", ".fatpbeo:focus-within::after{transition-duration:var(--durationNormal);}", ".fb7uyps:focus-within::after{transition-delay:var(--curveDecelerateMid);}"]
83
99
  });
84
-
85
100
  const useSelectStyles = /*#__PURE__*/react_1.__styles({
86
- "base": {
87
- "Bowrso0": "fqrijq1",
88
- "B4j52fo": "f5ogflp",
89
- "Bekrc4i": ["f1hqa2wf", "finvdd3"],
90
- "Bn0qgzm": "f1f09k3d",
91
- "ibv6hh": ["finvdd3", "f1hqa2wf"],
92
- "icvyot": "fzkkow9",
93
- "vrafjx": ["fcdblym", "fjik90z"],
94
- "oivjwe": "fg706s2",
95
- "wvpqe5": ["fjik90z", "fcdblym"],
96
- "g2u3we": "f1p3nwhy",
97
- "h3c5rm": ["f11589ue", "f1pdflbu"],
98
- "B9xav0g": "f1q5o8ev",
99
- "zhjwy3": ["f1pdflbu", "f11589ue"],
100
- "Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
101
- "Beyfa6y": ["f16jpd5f", "f1aa9q02"],
102
- "B7oj6ja": ["f1jar5jt", "fyu767a"],
103
- "Btl43ni": ["fyu767a", "f1jar5jt"],
104
- "E5pizo": "f1couhl3",
105
- "B7ck84d": "f1ewtqcl",
106
- "sj55zd": "f19n0e5",
107
- "Bh6795r": "fqerorx",
108
- "B3aqqti": "fatbyko",
109
- "Brovlpu": "f1grzc83",
110
- "Bxa1mx5": "f19shzzi"
101
+ base: {
102
+ Bowrso0: "fqrijq1",
103
+ B4j52fo: "f5ogflp",
104
+ Bekrc4i: ["f1hqa2wf", "finvdd3"],
105
+ Bn0qgzm: "f1f09k3d",
106
+ ibv6hh: ["finvdd3", "f1hqa2wf"],
107
+ icvyot: "fzkkow9",
108
+ vrafjx: ["fcdblym", "fjik90z"],
109
+ oivjwe: "fg706s2",
110
+ wvpqe5: ["fjik90z", "fcdblym"],
111
+ g2u3we: "f1p3nwhy",
112
+ h3c5rm: ["f11589ue", "f1pdflbu"],
113
+ B9xav0g: "f1q5o8ev",
114
+ zhjwy3: ["f1pdflbu", "f11589ue"],
115
+ Bbmb7ep: ["f1aa9q02", "f16jpd5f"],
116
+ Beyfa6y: ["f16jpd5f", "f1aa9q02"],
117
+ B7oj6ja: ["f1jar5jt", "fyu767a"],
118
+ Btl43ni: ["fyu767a", "f1jar5jt"],
119
+ E5pizo: "f1couhl3",
120
+ B7ck84d: "f1ewtqcl",
121
+ sj55zd: "f19n0e5",
122
+ Bceei9c: "f1k6fduh",
123
+ Bh6795r: "fqerorx",
124
+ B2u0y6b: "f6dzj5z",
125
+ Byoj8tv: "f1qch9an",
126
+ z8tnut: "f1g0x7ka",
127
+ B3aqqti: "fatbyko",
128
+ Brovlpu: "f1grzc83",
129
+ Bxa1mx5: "f19shzzi"
111
130
  },
112
- "disabled": {
113
- "De3pzq": "f1c21dwh",
114
- "B4j52fo": "f5ogflp",
115
- "Bekrc4i": ["f1hqa2wf", "finvdd3"],
116
- "Bn0qgzm": "f1f09k3d",
117
- "ibv6hh": ["finvdd3", "f1hqa2wf"],
118
- "icvyot": "fzkkow9",
119
- "vrafjx": ["fcdblym", "fjik90z"],
120
- "oivjwe": "fg706s2",
121
- "wvpqe5": ["fjik90z", "fcdblym"],
122
- "g2u3we": "f1jj8ep1",
123
- "h3c5rm": ["f15xbau", "fy0fskl"],
124
- "B9xav0g": "f4ikngz",
125
- "zhjwy3": ["fy0fskl", "f15xbau"],
126
- "sj55zd": "f1s2aq7o",
127
- "Bceei9c": "fdrzuqr",
128
- "Bjwas2f": "fg455y9",
129
- "Bn1d65q": ["f1rvyvqg", "f14g86mu"],
130
- "Bxeuatn": "f1cwzwz",
131
- "n51gp8": ["f14g86mu", "f1rvyvqg"]
131
+ disabled: {
132
+ De3pzq: "f1c21dwh",
133
+ g2u3we: "f1jj8ep1",
134
+ h3c5rm: ["f15xbau", "fy0fskl"],
135
+ B9xav0g: "f4ikngz",
136
+ zhjwy3: ["fy0fskl", "f15xbau"],
137
+ sj55zd: "f1s2aq7o",
138
+ Bceei9c: "fdrzuqr",
139
+ Bjwas2f: "fg455y9",
140
+ Bn1d65q: ["f1rvyvqg", "f14g86mu"],
141
+ Bxeuatn: "f1cwzwz",
142
+ n51gp8: ["f14g86mu", "f1rvyvqg"]
132
143
  },
133
- "small": {
134
- "Bqenvij": "frvgh55",
135
- "z8tnut": "f1g0x7ka",
136
- "z189sj": ["fdw0yi8", "fk8j09s"],
137
- "Byoj8tv": "f1qch9an",
138
- "uwmqm3": ["fk8j09s", "fdw0yi8"],
139
- "Bahqtrf": "fk6fouc",
140
- "Be2twd7": "fy9rknc",
141
- "Bhrd7zp": "figsok6",
142
- "Bg96gwp": "fwrc4pm"
144
+ disabledUnderline: {
145
+ g2u3we: "fgig46g",
146
+ h3c5rm: ["f1mxt3zg", "fziff3p"],
147
+ B9xav0g: "f4ikngz",
148
+ zhjwy3: ["fziff3p", "f1mxt3zg"]
143
149
  },
144
- "medium": {
145
- "Bqenvij": "f1d2rq10",
146
- "z8tnut": "f1g0x7ka",
147
- "z189sj": ["f11gcy0p", "f1ng84yb"],
148
- "Byoj8tv": "f1qch9an",
149
- "uwmqm3": ["f1ng84yb", "f11gcy0p"],
150
- "Bahqtrf": "fk6fouc",
151
- "Be2twd7": "fkhj508",
152
- "Bhrd7zp": "figsok6",
153
- "Bg96gwp": "f1i3iumi"
150
+ small: {
151
+ Bqenvij: "frvgh55",
152
+ uwmqm3: ["f1xile11", "fqznh8f"],
153
+ z189sj: ["fiqd4sw", "f11fkzut"],
154
+ Bahqtrf: "fk6fouc",
155
+ Be2twd7: "fy9rknc",
156
+ Bhrd7zp: "figsok6",
157
+ Bg96gwp: "fwrc4pm"
154
158
  },
155
- "large": {
156
- "Bqenvij": "fbhnoac",
157
- "z8tnut": "f1g0x7ka",
158
- "z189sj": ["fw5db7e", "f1uw59to"],
159
- "Byoj8tv": "f1qch9an",
160
- "uwmqm3": ["f1uw59to", "fw5db7e"],
161
- "Be2twd7": "fod5ikn",
162
- "Bg96gwp": "faaz57k"
159
+ medium: {
160
+ Bqenvij: "f1d2rq10",
161
+ uwmqm3: ["f1e60jzv", "f135dnwl"],
162
+ z189sj: ["f154vowv", "flqamny"],
163
+ Bahqtrf: "fk6fouc",
164
+ Be2twd7: "fkhj508",
165
+ Bhrd7zp: "figsok6",
166
+ Bg96gwp: "f1i3iumi"
163
167
  },
164
- "outline": {
165
- "De3pzq": "fxugw4r",
166
- "B4j52fo": "f5ogflp",
167
- "Bekrc4i": ["f1hqa2wf", "finvdd3"],
168
- "Bn0qgzm": "f1f09k3d",
169
- "ibv6hh": ["finvdd3", "f1hqa2wf"],
170
- "icvyot": "fzkkow9",
171
- "vrafjx": ["fcdblym", "fjik90z"],
172
- "oivjwe": "fg706s2",
173
- "wvpqe5": ["fjik90z", "fcdblym"],
174
- "g2u3we": "fj3muxo",
175
- "h3c5rm": ["f1akhkt", "f1lxtadh"],
176
- "B9xav0g": "f1c1zstj",
177
- "zhjwy3": ["f1lxtadh", "f1akhkt"]
168
+ large: {
169
+ Bqenvij: "fbhnoac",
170
+ uwmqm3: ["fnphzt9", "flt1dlf"],
171
+ z189sj: ["f1xi5ia2", "f1xi1l47"],
172
+ Bahqtrf: "fk6fouc",
173
+ Be2twd7: "fod5ikn",
174
+ Bhrd7zp: "figsok6",
175
+ Bg96gwp: "faaz57k"
178
176
  },
179
- "underline": {
180
- "De3pzq": "f1c21dwh",
181
- "Bn0qgzm": "f1f09k3d",
182
- "oivjwe": "fg706s2",
183
- "B9xav0g": "f1c1zstj",
184
- "Bbmb7ep": ["f1krrbdw", "f1deotkl"],
185
- "Beyfa6y": ["f1deotkl", "f1krrbdw"],
186
- "B7oj6ja": ["f10ostut", "f1ozlkrg"],
187
- "Btl43ni": ["f1ozlkrg", "f10ostut"]
177
+ outline: {
178
+ De3pzq: "fxugw4r",
179
+ B4j52fo: "f5ogflp",
180
+ Bekrc4i: ["f1hqa2wf", "finvdd3"],
181
+ Bn0qgzm: "f1f09k3d",
182
+ ibv6hh: ["finvdd3", "f1hqa2wf"],
183
+ icvyot: "fzkkow9",
184
+ vrafjx: ["fcdblym", "fjik90z"],
185
+ oivjwe: "fg706s2",
186
+ wvpqe5: ["fjik90z", "fcdblym"],
187
+ g2u3we: "fj3muxo",
188
+ h3c5rm: ["f1akhkt", "f1lxtadh"],
189
+ B9xav0g: "f1c1zstj",
190
+ zhjwy3: ["f1lxtadh", "f1akhkt"]
191
+ },
192
+ outlineInteractive: {
193
+ Bgoe8wy: "fvcxoqz",
194
+ Bwzppfd: ["f1ub3y4t", "f1m52nbi"],
195
+ oetu4i: "flmw63s",
196
+ gg5e9n: ["f1m52nbi", "f1ub3y4t"],
197
+ B6oc9vd: "fvs00aa",
198
+ ak43y8: ["f1assf6x", "f4ruux4"],
199
+ wmxk5l: "fqhmt4z",
200
+ B50zh58: ["f4ruux4", "f1assf6x"]
201
+ },
202
+ underline: {
203
+ De3pzq: "f1c21dwh",
204
+ Bn0qgzm: "f1f09k3d",
205
+ oivjwe: "fg706s2",
206
+ B9xav0g: "f1c1zstj",
207
+ Bbmb7ep: ["f1krrbdw", "f1deotkl"],
208
+ Beyfa6y: ["f1deotkl", "f1krrbdw"],
209
+ B7oj6ja: ["f10ostut", "f1ozlkrg"],
210
+ Btl43ni: ["f1ozlkrg", "f10ostut"]
188
211
  },
189
212
  "filled-lighter": {
190
- "De3pzq": "fxugw4r"
213
+ De3pzq: "fxugw4r"
191
214
  },
192
215
  "filled-darker": {
193
- "De3pzq": "f16xq7d1"
216
+ De3pzq: "f16xq7d1"
217
+ },
218
+ invalid: {
219
+ tvckwq: "fs4k3qj",
220
+ gk2u95: ["fcee079", "fmyw78r"],
221
+ hhx65j: "f1fgmyf4",
222
+ Bxowmz0: ["fmyw78r", "fcee079"]
223
+ },
224
+ invalidUnderline: {
225
+ hhx65j: "f1fgmyf4"
194
226
  }
195
227
  }, {
196
- "d": [".fqrijq1{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;}", ".f5ogflp{border-top-width:1px;}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".f1f09k3d{border-bottom-width:1px;}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".f1p3nwhy{border-top-color:transparent;}", ".f11589ue{border-right-color:transparent;}", ".f1pdflbu{border-left-color:transparent;}", ".f1q5o8ev{border-bottom-color:transparent;}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f1couhl3{box-shadow:none;}", ".f1ewtqcl{box-sizing:border-box;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".f1jj8ep1{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f15xbau{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fy0fskl{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f4ikngz{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".fdrzuqr{cursor:not-allowed;}", ".frvgh55{height:24px;}", ".f1g0x7ka{padding-top:0;}", ".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}", ".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}", ".f1qch9an{padding-bottom:0;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".f1d2rq10{height:32px;}", ".f11gcy0p{padding-right:var(--spacingHorizontalMNudge);}", ".f1ng84yb{padding-left:var(--spacingHorizontalMNudge);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".fbhnoac{height:40px;}", ".fw5db7e{padding-right:var(--spacingHorizontalM);}", ".f1uw59to{padding-left:var(--spacingHorizontalM);}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".fj3muxo{border-top-color:var(--colorNeutralStroke1);}", ".f1akhkt{border-right-color:var(--colorNeutralStroke1);}", ".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}", ".f1c1zstj{border-bottom-color:var(--colorNeutralStrokeAccessible);}", ".f1krrbdw{border-bottom-right-radius:0;}", ".f1deotkl{border-bottom-left-radius:0;}", ".f10ostut{border-top-right-radius:0;}", ".f1ozlkrg{border-top-left-radius:0;}", ".f16xq7d1{background-color:var(--colorNeutralBackground3);}"],
197
- "f": [".fatbyko:focus{outline-width:2px;}", ".f1grzc83:focus{outline-style:solid;}", ".f19shzzi:focus{outline-color:transparent;}"],
198
- "m": [["@media (forced-colors: active){.fg455y9{border-top-color:GrayText;}}", {
199
- "m": "(forced-colors: active)"
228
+ d: [".fqrijq1{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;}", ".f5ogflp{border-top-width:1px;}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".f1f09k3d{border-bottom-width:1px;}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".f1p3nwhy{border-top-color:transparent;}", ".f11589ue{border-right-color:transparent;}", ".f1pdflbu{border-left-color:transparent;}", ".f1q5o8ev{border-bottom-color:transparent;}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f1couhl3{box-shadow:none;}", ".f1ewtqcl{box-sizing:border-box;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f1k6fduh{cursor:pointer;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f6dzj5z{max-width:100%;}", ".f1qch9an{padding-bottom:0;}", ".f1g0x7ka{padding-top:0;}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".f1jj8ep1{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f15xbau{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fy0fskl{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f4ikngz{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".fdrzuqr{cursor:not-allowed;}", ".fgig46g{border-top-color:var(--colorTransparentStrokeDisabled);}", ".f1mxt3zg{border-right-color:var(--colorTransparentStrokeDisabled);}", ".fziff3p{border-left-color:var(--colorTransparentStrokeDisabled);}", ".frvgh55{height:24px;}", ".f1xile11{padding-left:calc(var(--spacingHorizontalSNudge) + var(--spacingHorizontalXXS));}", ".fqznh8f{padding-right:calc(var(--spacingHorizontalSNudge) + var(--spacingHorizontalXXS));}", ".fiqd4sw{padding-right:calc(var(--spacingHorizontalSNudge)\n + 16px\n + var(--spacingHorizontalXXS)\n + var(--spacingHorizontalXXS));}", ".f11fkzut{padding-left:calc(var(--spacingHorizontalSNudge)\n + 16px\n + var(--spacingHorizontalXXS)\n + var(--spacingHorizontalXXS));}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".f1d2rq10{height:32px;}", ".f1e60jzv{padding-left:calc(var(--spacingHorizontalMNudge) + var(--spacingHorizontalXXS));}", ".f135dnwl{padding-right:calc(var(--spacingHorizontalMNudge) + var(--spacingHorizontalXXS));}", ".f154vowv{padding-right:calc(var(--spacingHorizontalMNudge)\n + 20px\n + var(--spacingHorizontalXXS)\n + var(--spacingHorizontalXXS));}", ".flqamny{padding-left:calc(var(--spacingHorizontalMNudge)\n + 20px\n + var(--spacingHorizontalXXS)\n + var(--spacingHorizontalXXS));}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".fbhnoac{height:40px;}", ".fnphzt9{padding-left:calc(var(--spacingHorizontalM) + var(--spacingHorizontalSNudge));}", ".flt1dlf{padding-right:calc(var(--spacingHorizontalM) + var(--spacingHorizontalSNudge));}", ".f1xi5ia2{padding-right:calc(var(--spacingHorizontalM)\n + 24px\n + var(--spacingHorizontalSNudge)\n + var(--spacingHorizontalSNudge));}", ".f1xi1l47{padding-left:calc(var(--spacingHorizontalM)\n + 24px\n + var(--spacingHorizontalSNudge)\n + var(--spacingHorizontalSNudge));}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".fj3muxo{border-top-color:var(--colorNeutralStroke1);}", ".f1akhkt{border-right-color:var(--colorNeutralStroke1);}", ".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}", ".f1c1zstj{border-bottom-color:var(--colorNeutralStrokeAccessible);}", ".f1krrbdw{border-bottom-right-radius:0;}", ".f1deotkl{border-bottom-left-radius:0;}", ".f10ostut{border-top-right-radius:0;}", ".f1ozlkrg{border-top-left-radius:0;}", ".f16xq7d1{background-color:var(--colorNeutralBackground3);}", ".fs4k3qj:not(:focus-within),.fs4k3qj:hover:not(:focus-within){border-top-color:var(--colorPaletteRedBorder2);}", ".fcee079:not(:focus-within),.fcee079:hover:not(:focus-within){border-right-color:var(--colorPaletteRedBorder2);}", ".fmyw78r:not(:focus-within),.fmyw78r:hover:not(:focus-within){border-left-color:var(--colorPaletteRedBorder2);}", ".f1fgmyf4:not(:focus-within),.f1fgmyf4:hover:not(:focus-within){border-bottom-color:var(--colorPaletteRedBorder2);}"],
229
+ f: [".fatbyko:focus{outline-width:2px;}", ".f1grzc83:focus{outline-style:solid;}", ".f19shzzi:focus{outline-color:transparent;}"],
230
+ m: [["@media (forced-colors: active){.fg455y9{border-top-color:GrayText;}}", {
231
+ m: "(forced-colors: active)"
200
232
  }], ["@media (forced-colors: active){.f1rvyvqg{border-right-color:GrayText;}.f14g86mu{border-left-color:GrayText;}}", {
201
- "m": "(forced-colors: active)"
233
+ m: "(forced-colors: active)"
202
234
  }], ["@media (forced-colors: active){.f1cwzwz{border-bottom-color:GrayText;}}", {
203
- "m": "(forced-colors: active)"
235
+ m: "(forced-colors: active)"
204
236
  }], ["@media (forced-colors: active){.f14g86mu{border-left-color:GrayText;}.f1rvyvqg{border-right-color:GrayText;}}", {
205
- "m": "(forced-colors: active)"
206
- }]]
237
+ m: "(forced-colors: active)"
238
+ }]],
239
+ h: [".fvcxoqz:hover{border-top-color:var(--colorNeutralStroke1Hover);}", ".f1ub3y4t:hover{border-right-color:var(--colorNeutralStroke1Hover);}", ".f1m52nbi:hover{border-left-color:var(--colorNeutralStroke1Hover);}", ".flmw63s:hover{border-bottom-color:var(--colorNeutralStrokeAccessible);}"],
240
+ a: [".fvs00aa:active{border-top-color:var(--colorNeutralStroke1Pressed);}", ".f1assf6x:active{border-right-color:var(--colorNeutralStroke1Pressed);}", ".f4ruux4:active{border-left-color:var(--colorNeutralStroke1Pressed);}", ".fqhmt4z:active{border-bottom-color:var(--colorNeutralStrokeAccessible);}"]
207
241
  });
208
-
209
242
  const useIconStyles = /*#__PURE__*/react_1.__styles({
210
- "icon": {
211
- "B7ck84d": "f1ewtqcl",
212
- "sj55zd": "fxkbij4",
213
- "mc9l5x": "ftgm304",
214
- "qhf8xq": "f1euv43f",
215
- "j35jbq": ["fnyteob", "f1enpzzf"],
216
- "Bkecrkj": "f1aehjj5",
217
- "Bo70h7d": "fvc9v3g"
243
+ icon: {
244
+ B7ck84d: "f1ewtqcl",
245
+ sj55zd: "fxkbij4",
246
+ mc9l5x: "ftgm304",
247
+ qhf8xq: "f1euv43f",
248
+ Bkecrkj: "f1aehjj5",
249
+ Bo70h7d: "fvc9v3g"
218
250
  },
219
- "disabled": {
220
- "sj55zd": "f1s2aq7o",
221
- "Bbusuzp": "f1dcs8yz"
251
+ disabled: {
252
+ sj55zd: "f1s2aq7o",
253
+ Bbusuzp: "f1dcs8yz"
222
254
  },
223
- "small": {
224
- "Be2twd7": "f4ybsrx",
225
- "Bqenvij": "fd461yt",
226
- "z189sj": ["fdw0yi8", "fk8j09s"],
227
- "uwmqm3": ["fgiv446", "ffczdla"],
228
- "a9b677": "fjw5fx7"
255
+ small: {
256
+ Be2twd7: "f4ybsrx",
257
+ Bqenvij: "fd461yt",
258
+ j35jbq: ["f13lnp83", "f1i5nn0v"],
259
+ a9b677: "fjw5fx7"
229
260
  },
230
- "medium": {
231
- "Be2twd7": "fe5j1ua",
232
- "Bqenvij": "fjamq6b",
233
- "z189sj": ["fw5db7e", "f1uw59to"],
234
- "uwmqm3": ["fgiv446", "ffczdla"],
235
- "a9b677": "f64fuq3"
261
+ medium: {
262
+ Be2twd7: "fe5j1ua",
263
+ Bqenvij: "fjamq6b",
264
+ j35jbq: ["fnyteob", "f1enpzzf"],
265
+ a9b677: "f64fuq3"
236
266
  },
237
- "large": {
238
- "Be2twd7": "f1rt2boy",
239
- "Bqenvij": "frvgh55",
240
- "z189sj": ["fw5db7e", "f1uw59to"],
241
- "uwmqm3": ["fk8j09s", "fdw0yi8"],
242
- "a9b677": "fq4mcun"
267
+ large: {
268
+ Be2twd7: "f1rt2boy",
269
+ Bqenvij: "frvgh55",
270
+ j35jbq: ["f8b87gs", "fedtrts"],
271
+ a9b677: "fq4mcun"
243
272
  }
244
273
  }, {
245
- "d": [".f1ewtqcl{box-sizing:border-box;}", ".fxkbij4{color:var(--colorNeutralStrokeAccessible);}", ".ftgm304{display:block;}", ".f1euv43f{position:absolute;}", ".fnyteob{right:var(--spacingHorizontalMNudge);}", ".f1enpzzf{left:var(--spacingHorizontalMNudge);}", ".f1aehjj5{pointer-events:none;}", ".fvc9v3g svg{display:block;}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".f4ybsrx{font-size:16px;}", ".fd461yt{height:16px;}", ".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}", ".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}", ".fgiv446{padding-left:var(--spacingHorizontalXXS);}", ".ffczdla{padding-right:var(--spacingHorizontalXXS);}", ".fjw5fx7{width:16px;}", ".fe5j1ua{font-size:20px;}", ".fjamq6b{height:20px;}", ".fw5db7e{padding-right:var(--spacingHorizontalM);}", ".f1uw59to{padding-left:var(--spacingHorizontalM);}", ".f64fuq3{width:20px;}", ".f1rt2boy{font-size:24px;}", ".frvgh55{height:24px;}", ".fq4mcun{width:24px;}"],
246
- "m": [["@media (forced-colors: active){.f1dcs8yz{color:GrayText;}}", {
247
- "m": "(forced-colors: active)"
274
+ d: [".f1ewtqcl{box-sizing:border-box;}", ".fxkbij4{color:var(--colorNeutralStrokeAccessible);}", ".ftgm304{display:block;}", ".f1euv43f{position:absolute;}", ".f1aehjj5{pointer-events:none;}", ".fvc9v3g svg{display:block;}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".f4ybsrx{font-size:16px;}", ".fd461yt{height:16px;}", ".f13lnp83{right:var(--spacingHorizontalSNudge);}", ".f1i5nn0v{left:var(--spacingHorizontalSNudge);}", ".fjw5fx7{width:16px;}", ".fe5j1ua{font-size:20px;}", ".fjamq6b{height:20px;}", ".fnyteob{right:var(--spacingHorizontalMNudge);}", ".f1enpzzf{left:var(--spacingHorizontalMNudge);}", ".f64fuq3{width:20px;}", ".f1rt2boy{font-size:24px;}", ".frvgh55{height:24px;}", ".f8b87gs{right:var(--spacingHorizontalM);}", ".fedtrts{left:var(--spacingHorizontalM);}", ".fq4mcun{width:24px;}"],
275
+ m: [["@media (forced-colors: active){.f1dcs8yz{color:GrayText;}}", {
276
+ m: "(forced-colors: active)"
248
277
  }]]
249
278
  });
250
279
  /**
251
280
  * Apply styling to the Select slots based on the state
252
281
  */
253
-
254
-
255
282
  const useSelectStyles_unstable = state => {
256
283
  const {
257
284
  size,
258
285
  appearance
259
286
  } = state;
260
287
  const disabled = state.select.disabled;
288
+ const invalid = `${state.select['aria-invalid']}` === 'true';
261
289
  const iconStyles = useIconStyles();
262
290
  const rootStyles = useRootStyles();
263
291
  const selectStyles = useSelectStyles();
264
292
  state.root.className = react_1.mergeClasses(exports.selectClassNames.root, rootStyles.base, state.root.className);
265
- state.select.className = react_1.mergeClasses(exports.selectClassNames.select, selectStyles.base, selectStyles[size], selectStyles[appearance], disabled && selectStyles.disabled, state.select.className);
266
-
293
+ state.select.className = react_1.mergeClasses(exports.selectClassNames.select, selectStyles.base, selectStyles[size], selectStyles[appearance], !disabled && appearance === 'outline' && selectStyles.outlineInteractive, !disabled && invalid && appearance !== 'underline' && selectStyles.invalid, !disabled && invalid && appearance === 'underline' && selectStyles.invalidUnderline, disabled && selectStyles.disabled, disabled && appearance === 'underline' && selectStyles.disabledUnderline, state.select.className);
267
294
  if (state.icon) {
268
295
  state.icon.className = react_1.mergeClasses(exports.selectClassNames.icon, iconStyles.icon, disabled && iconStyles.disabled, iconStyles[size], state.icon.className);
269
296
  }
270
-
271
297
  return state;
272
298
  };
273
-
274
299
  exports.useSelectStyles_unstable = useSelectStyles_unstable;
275
300
  //# sourceMappingURL=useSelectStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Select/useSelectStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAIa,OAAA,CAAA,gBAAA,GAAgD;EAC3D,IAAI,EAAE,YADqD;EAE3D,MAAM,EAAE,oBAFmD;EAG3D,IAAI,EAAE;AAHqD,CAAhD;AAMb,MAAM,SAAS,GAAG;EAChB,KAAK,EAAE,MADS;EAEhB,MAAM,EAAE,MAFQ;EAGhB,KAAK,EAAE;AAHS,CAAlB,C,CAMA;AACA;;AACA,MAAM,YAAY,GAAG;EACnB,KAAK;IACH,QAAQ,EAAE,aAAA,CAAA,MAAA,CAAO,eADd;IAEH,UAAU,EAAE,aAAA,CAAA,MAAA,CAAO;EAFhB;A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K,CAAC,IAAN,CAAW,SALU,CAAvB;EAOD;;EAED,OAAO,KAAP;AACD,CA9BM;;AAAM,OAAA,CAAA,wBAAA,GAAwB,wBAAxB","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SelectSlots, SelectState } from './Select.types';\n\nexport const selectClassNames: SlotClassNames<SelectSlots> = {\n root: 'fui-Select',\n select: 'fui-Select__select',\n icon: 'fui-Select__icon',\n};\n\nconst iconSizes = {\n small: '16px',\n medium: '20px',\n large: '24px',\n};\n\n// TODO: This 400 style is not in the typography styles.\n// May need a design change\nconst contentSizes = {\n 400: {\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n },\n};\n\n//TODO: Should fieldHeights be a set of global design tokens or constants?\nconst fieldHeights = {\n small: '24px',\n medium: '32px',\n large: '40px',\n};\n\n/* end of shared values */\n\nconst useRootStyles = makeStyles({\n base: {\n alignItems: 'center',\n boxSizing: 'border-box',\n display: 'flex',\n flexWrap: 'nowrap',\n fontFamily: tokens.fontFamilyBase,\n position: 'relative',\n\n '&::after': {\n backgroundImage: `linear-gradient(\n 0deg,\n ${tokens.colorCompoundBrandStroke} 0%,\n ${tokens.colorCompoundBrandStroke} 50%,\n transparent 50%,\n transparent 100%\n )`,\n ...shorthands.borderRadius(0, 0, tokens.borderRadiusMedium, tokens.borderRadiusMedium),\n boxSizing: 'border-box',\n content: '\"\"',\n height: tokens.borderRadiusMedium,\n position: 'absolute',\n bottom: '0',\n left: '0',\n right: '0',\n transform: 'scaleX(0)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationUltraFast,\n transitionDelay: tokens.curveAccelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n\n '&:focus-within::after': {\n transform: 'scaleX(1)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationNormal,\n transitionDelay: tokens.curveDecelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n },\n});\n\nconst useSelectStyles = makeStyles({\n base: {\n appearance: 'none',\n ...shorthands.border('1px', 'solid', 'transparent'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n boxShadow: 'none',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n flexGrow: 1,\n\n ':focus': {\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: 'transparent',\n },\n },\n disabled: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.border('1px', 'solid', tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n },\n },\n small: {\n height: fieldHeights.small,\n ...shorthands.padding('0', tokens.spacingHorizontalSNudge),\n ...typographyStyles.caption1,\n },\n medium: {\n height: fieldHeights.medium,\n ...shorthands.padding('0', tokens.spacingHorizontalMNudge),\n ...typographyStyles.body1,\n },\n large: {\n height: fieldHeights.large,\n ...shorthands.padding('0', tokens.spacingHorizontalM),\n ...contentSizes[400],\n },\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n ...shorthands.border('1px', 'solid', tokens.colorNeutralStroke1),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n underline: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderBottom('1px', 'solid', tokens.colorNeutralStrokeAccessible),\n ...shorthands.borderRadius(0),\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n },\n});\n\nconst useIconStyles = makeStyles({\n icon: {\n boxSizing: 'border-box',\n color: tokens.colorNeutralStrokeAccessible,\n display: 'block',\n position: 'absolute',\n right: tokens.spacingHorizontalMNudge,\n pointerEvents: 'none',\n\n // the SVG must have display: block for accurate positioning\n // otherwise an extra inline space is inserted after the svg element\n '& svg': {\n display: 'block',\n },\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n small: {\n fontSize: iconSizes.small,\n height: iconSizes.small,\n paddingRight: tokens.spacingHorizontalSNudge,\n paddingLeft: tokens.spacingHorizontalXXS,\n width: iconSizes.small,\n },\n medium: {\n fontSize: iconSizes.medium,\n height: iconSizes.medium,\n paddingRight: tokens.spacingHorizontalM,\n paddingLeft: tokens.spacingHorizontalXXS,\n width: iconSizes.medium,\n },\n large: {\n fontSize: iconSizes.large,\n height: iconSizes.large,\n paddingRight: tokens.spacingHorizontalM,\n paddingLeft: tokens.spacingHorizontalSNudge,\n width: iconSizes.large,\n },\n});\n\n/**\n * Apply styling to the Select slots based on the state\n */\nexport const useSelectStyles_unstable = (state: SelectState): SelectState => {\n const { size, appearance } = state;\n const disabled = state.select.disabled;\n\n const iconStyles = useIconStyles();\n const rootStyles = useRootStyles();\n const selectStyles = useSelectStyles();\n\n state.root.className = mergeClasses(selectClassNames.root, rootStyles.base, state.root.className);\n\n state.select.className = mergeClasses(\n selectClassNames.select,\n selectStyles.base,\n selectStyles[size],\n selectStyles[appearance],\n disabled && selectStyles.disabled,\n state.select.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n selectClassNames.icon,\n iconStyles.icon,\n disabled && iconStyles.disabled,\n iconStyles[size],\n state.icon.className,\n );\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AAIaA,wBAAgB,GAAgC;EAC3DC,IAAI,EAAE,YAAY;EAClBC,MAAM,EAAE,oBAAoB;EAC5BC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,GAAG;EAChBC,KAAK,EAAE,MAAM;EACbC,MAAM,EAAE,MAAM;EACdC,KAAK,EAAE;CACR;AAED;AACA,MAA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CAAC;AAnCYrB,gCAAwB","names":["exports","root","select","icon","iconSizes","small","medium","large","fieldHeights","paddingRight","react_theme_1","spacingHorizontalSNudge","spacingHorizontalXXS","spacingHorizontalMNudge","spacingHorizontalM","paddingLeft","useRootStyles","react_1","useSelectStyles","useIconStyles","useSelectStyles_unstable","state","size","appearance","disabled","invalid","iconStyles","rootStyles","selectStyles","className","base","outlineInteractive","invalidUnderline","disabledUnderline"],"sourceRoot":"../src/","sources":["packages/react-components/react-select/src/components/Select/useSelectStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SelectSlots, SelectState } from './Select.types';\n\nexport const selectClassNames: SlotClassNames<SelectSlots> = {\n root: 'fui-Select',\n select: 'fui-Select__select',\n icon: 'fui-Select__icon',\n};\n\nconst iconSizes = {\n small: '16px',\n medium: '20px',\n large: '24px',\n};\n\n//TODO: Should fieldHeights be a set of global design tokens or constants?\nconst fieldHeights = {\n small: '24px',\n medium: '32px',\n large: '40px',\n};\n\n/* Since the <select> element must span the full width and cannot have children,\n * the right padding needs to be calculated from the sum of the following:\n * 1. Field padding-right\n * 2. Icon width\n * 3. Content-icon spacing\n * 4. Content inner padding\n */\nconst paddingRight = {\n small: `calc(${tokens.spacingHorizontalSNudge}\n + ${iconSizes.small}\n + ${tokens.spacingHorizontalXXS}\n + ${tokens.spacingHorizontalXXS})`,\n medium: `calc(${tokens.spacingHorizontalMNudge}\n + ${iconSizes.medium}\n + ${tokens.spacingHorizontalXXS}\n + ${tokens.spacingHorizontalXXS})`,\n large: `calc(${tokens.spacingHorizontalM}\n + ${iconSizes.large}\n + ${tokens.spacingHorizontalSNudge}\n + ${tokens.spacingHorizontalSNudge})`,\n};\n\n/* Left padding is calculated from the outer padding + inner content padding values\n * since <select> can't have additional child content or custom inner layout */\nconst paddingLeft = {\n small: `calc(${tokens.spacingHorizontalSNudge} + ${tokens.spacingHorizontalXXS})`,\n medium: `calc(${tokens.spacingHorizontalMNudge} + ${tokens.spacingHorizontalXXS})`,\n large: `calc(${tokens.spacingHorizontalM} + ${tokens.spacingHorizontalSNudge})`,\n};\n\n/* end of shared values */\n\nconst useRootStyles = makeStyles({\n base: {\n alignItems: 'center',\n boxSizing: 'border-box',\n display: 'flex',\n flexWrap: 'nowrap',\n fontFamily: tokens.fontFamilyBase,\n position: 'relative',\n\n '&::after': {\n backgroundImage: `linear-gradient(\n 0deg,\n ${tokens.colorCompoundBrandStroke} 0%,\n ${tokens.colorCompoundBrandStroke} 50%,\n transparent 50%,\n transparent 100%\n )`,\n ...shorthands.borderRadius(0, 0, tokens.borderRadiusMedium, tokens.borderRadiusMedium),\n boxSizing: 'border-box',\n content: '\"\"',\n height: tokens.borderRadiusMedium,\n position: 'absolute',\n bottom: '0',\n left: '0',\n right: '0',\n transform: 'scaleX(0)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationUltraFast,\n transitionDelay: tokens.curveAccelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n\n '&:focus-within::after': {\n transform: 'scaleX(1)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationNormal,\n transitionDelay: tokens.curveDecelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n },\n});\n\nconst useSelectStyles = makeStyles({\n base: {\n appearance: 'none',\n ...shorthands.border('1px', 'solid', 'transparent'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n boxShadow: 'none',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n cursor: 'pointer',\n flexGrow: 1,\n maxWidth: '100%',\n paddingBottom: 0,\n paddingTop: 0,\n\n ':focus': {\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: 'transparent',\n },\n },\n disabled: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n },\n },\n disabledUnderline: {\n ...shorthands.borderColor(\n tokens.colorTransparentStrokeDisabled,\n tokens.colorTransparentStrokeDisabled,\n tokens.colorNeutralStrokeDisabled,\n ),\n },\n\n small: {\n height: fieldHeights.small,\n paddingLeft: paddingLeft.small,\n paddingRight: paddingRight.small,\n ...typographyStyles.caption1,\n },\n medium: {\n height: fieldHeights.medium,\n paddingLeft: paddingLeft.medium,\n paddingRight: paddingRight.medium,\n ...typographyStyles.body1,\n },\n large: {\n height: fieldHeights.large,\n paddingLeft: paddingLeft.large,\n paddingRight: paddingRight.large,\n ...typographyStyles.body2,\n },\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n ...shorthands.border('1px', 'solid', tokens.colorNeutralStroke1),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n outlineInteractive: {\n '&:hover': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n\n '&:active': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n },\n underline: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderBottom('1px', 'solid', tokens.colorNeutralStrokeAccessible),\n ...shorthands.borderRadius(0),\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n },\n invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2),\n },\n },\n invalidUnderline: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n borderBottomColor: tokens.colorPaletteRedBorder2,\n },\n },\n});\n\nconst useIconStyles = makeStyles({\n icon: {\n boxSizing: 'border-box',\n color: tokens.colorNeutralStrokeAccessible,\n display: 'block',\n position: 'absolute',\n pointerEvents: 'none',\n\n // the SVG must have display: block for accurate positioning\n // otherwise an extra inline space is inserted after the svg element\n '& svg': {\n display: 'block',\n },\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n small: {\n fontSize: iconSizes.small,\n height: iconSizes.small,\n right: tokens.spacingHorizontalSNudge,\n width: iconSizes.small,\n },\n medium: {\n fontSize: iconSizes.medium,\n height: iconSizes.medium,\n right: tokens.spacingHorizontalMNudge,\n width: iconSizes.medium,\n },\n large: {\n fontSize: iconSizes.large,\n height: iconSizes.large,\n right: tokens.spacingHorizontalM,\n width: iconSizes.large,\n },\n});\n\n/**\n * Apply styling to the Select slots based on the state\n */\nexport const useSelectStyles_unstable = (state: SelectState): SelectState => {\n const { size, appearance } = state;\n const disabled = state.select.disabled;\n const invalid = `${state.select['aria-invalid']}` === 'true';\n\n const iconStyles = useIconStyles();\n const rootStyles = useRootStyles();\n const selectStyles = useSelectStyles();\n\n state.root.className = mergeClasses(selectClassNames.root, rootStyles.base, state.root.className);\n\n state.select.className = mergeClasses(\n selectClassNames.select,\n selectStyles.base,\n selectStyles[size],\n selectStyles[appearance],\n !disabled && appearance === 'outline' && selectStyles.outlineInteractive,\n !disabled && invalid && appearance !== 'underline' && selectStyles.invalid,\n !disabled && invalid && appearance === 'underline' && selectStyles.invalidUnderline,\n disabled && selectStyles.disabled,\n disabled && appearance === 'underline' && selectStyles.disabledUnderline,\n state.select.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n selectClassNames.icon,\n iconStyles.icon,\n disabled && iconStyles.disabled,\n iconStyles[size],\n state.icon.className,\n );\n }\n\n return state;\n};\n"]}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SelectField = exports.selectFieldClassNames = void 0;
7
+ /* eslint-disable deprecation/deprecation */
8
+ const react_field_1 = /*#__PURE__*/require("@fluentui/react-field");
9
+ const Select_1 = /*#__PURE__*/require("../../Select");
10
+ /** @deprecated Use Field with Select: `<Field><Select /></Field>` */
11
+ exports.selectFieldClassNames = /*#__PURE__*/react_field_1.getDeprecatedFieldClassNames(Select_1.selectClassNames.root);
12
+ /** @deprecated Use Field with Select: `<Field><Select /></Field>` */
13
+ exports.SelectField = /*#__PURE__*/react_field_1.makeDeprecatedField(Select_1.Select);
14
+ //# sourceMappingURL=SelectField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AAEA;AAIA;AACaA,6BAAqB,gBAAGC,0CAA4B,CAACC,yBAAgB,CAACC,IAAI,CAAC;AACxF;AACaH,mBAAW,gBAA0CC,iCAAmB,CAACC,eAAM,CAAC","names":["exports","react_field_1","Select_1","root"],"sourceRoot":"../src/","sources":["packages/react-components/react-select/src/components/SelectField/SelectField.tsx"],"sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport { DeprecatedFieldProps, getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { Select, selectClassNames, SelectProps } from '../../Select';\n\n/** @deprecated Use Field with Select: `<Field><Select /></Field>` */\nexport type SelectFieldProps = DeprecatedFieldProps<SelectProps>;\n/** @deprecated Use Field with Select: `<Field><Select /></Field>` */\nexport const selectFieldClassNames = getDeprecatedFieldClassNames(selectClassNames.root);\n/** @deprecated Use Field with Select: `<Field><Select /></Field>` */\nexport const SelectField: ForwardRefComponent<SelectFieldProps> = makeDeprecatedField(Select);\n"]}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ const tslib_1 = /*#__PURE__*/require("tslib");
7
+ tslib_1.__exportStar(require("./SelectField"), exports);
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-select/src/components/SelectField/index.ts"],"sourcesContent":["export * from './SelectField';\n"]}