@fluentui/react-input 9.75.0-experimental.css-modules.20261031-810ab07afb.0 → 9.75.1-experimental.positioning-engine.20261103-19efe125d1.0
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.
- package/CHANGELOG.md +9 -9
- package/README.md +0 -11
- package/lib/components/Input/useInputStyles.styles.js +4 -4
- package/lib/components/Input/useInputStyles.styles.js.map +1 -1
- package/lib/components/Input/useInputStyles.styles.raw.js +3 -3
- package/lib/components/Input/useInputStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/Input/useInputStyles.styles.cjs +7 -7
- package/lib-commonjs/components/Input/useInputStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/Input/useInputStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/Input/useInputStyles.styles.raw.cjs.map +1 -1
- package/package.json +8 -11
- package/lib/components/Input/Input.module.css +0 -305
- package/lib/components/Input/useInputStyles.styles.css.js +0 -20
- package/lib/components/Input/useInputStyles.styles.css.js.map +0 -1
- package/lib/components/Input/useInputStyles.styles.raw.css.js +0 -20
- package/lib/components/Input/useInputStyles.styles.raw.css.js.map +0 -1
- package/lib-commonjs/components/Input/Input.module.css +0 -305
- package/lib-commonjs/components/Input/useInputStyles.styles.css.cjs +0 -39
- package/lib-commonjs/components/Input/useInputStyles.styles.css.cjs.map +0 -1
- package/lib-commonjs/components/Input/useInputStyles.styles.raw.css.cjs +0 -39
- package/lib-commonjs/components/Input/useInputStyles.styles.raw.css.cjs.map +0 -1
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
@layer fluentui {
|
|
2
|
-
.root {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
flex-wrap: nowrap;
|
|
6
|
-
gap: var(--spacingHorizontalXXS);
|
|
7
|
-
border-radius: var(--borderRadiusMedium);
|
|
8
|
-
position: relative;
|
|
9
|
-
box-sizing: border-box;
|
|
10
|
-
vertical-align: middle;
|
|
11
|
-
min-height: var(--spacingVerticalXXXL);
|
|
12
|
-
font-family: var(--fontFamilyBase);
|
|
13
|
-
font-size: var(--fontSizeBase300);
|
|
14
|
-
font-weight: var(--fontWeightRegular);
|
|
15
|
-
line-height: var(--lineHeightBase300);
|
|
16
|
-
background-color: var(--colorNeutralBackground1);
|
|
17
|
-
border: var(--strokeWidthThin) solid var(--colorNeutralStroke1);
|
|
18
|
-
border-bottom-color: var(--colorNeutralStrokeAccessible);
|
|
19
|
-
&::after {
|
|
20
|
-
box-sizing: border-box;
|
|
21
|
-
content: '';
|
|
22
|
-
position: absolute;
|
|
23
|
-
inset-inline-start: calc(0px - var(--strokeWidthThin));
|
|
24
|
-
bottom: calc(0px - var(--strokeWidthThin));
|
|
25
|
-
inset-inline-end: calc(0px - var(--strokeWidthThin));
|
|
26
|
-
height: max(var(--strokeWidthThick), var(--borderRadiusMedium));
|
|
27
|
-
border-bottom-left-radius: var(--borderRadiusMedium);
|
|
28
|
-
border-bottom-right-radius: var(--borderRadiusMedium);
|
|
29
|
-
border-bottom: var(--strokeWidthThick) solid var(--colorCompoundBrandStroke);
|
|
30
|
-
clip-path: inset(calc(100% - var(--strokeWidthThick)) 0 0 0);
|
|
31
|
-
transform: scaleX(0);
|
|
32
|
-
transition-property: transform;
|
|
33
|
-
transition-duration: var(--durationUltraFast);
|
|
34
|
-
transition-delay: var(--curveAccelerateMid);
|
|
35
|
-
@media screen and (prefers-reduced-motion: reduce) {
|
|
36
|
-
transition-duration: 0.01ms;
|
|
37
|
-
transition-delay: 0.01ms;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&:focus-within::after {
|
|
42
|
-
transform: scaleX(1);
|
|
43
|
-
transition-property: transform;
|
|
44
|
-
transition-duration: var(--durationNormal);
|
|
45
|
-
transition-delay: var(--curveDecelerateMid);
|
|
46
|
-
@media screen and (prefers-reduced-motion: reduce) {
|
|
47
|
-
transition-duration: 0.01ms;
|
|
48
|
-
transition-delay: 0.01ms;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&:focus-within:active::after {
|
|
53
|
-
border-bottom-color: var(--colorCompoundBrandStrokePressed);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&:focus-within {
|
|
57
|
-
outline: var(--strokeWidthThick) solid transparent;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.root:where(.small) {
|
|
62
|
-
min-height: var(--spacingHorizontalXXL);
|
|
63
|
-
font-family: var(--fontFamilyBase);
|
|
64
|
-
font-size: var(--fontSizeBase200);
|
|
65
|
-
font-weight: var(--fontWeightRegular);
|
|
66
|
-
line-height: var(--lineHeightBase200);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.root:where(.large) {
|
|
70
|
-
min-height: calc(var(--spacingVerticalXXL) + var(--spacingVerticalL));
|
|
71
|
-
font-family: var(--fontFamilyBase);
|
|
72
|
-
font-size: var(--fontSizeBase400);
|
|
73
|
-
font-weight: var(--fontWeightRegular);
|
|
74
|
-
line-height: var(--lineHeightBase400);
|
|
75
|
-
gap: var(--spacingHorizontalSNudge);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.root:where(.underline) {
|
|
79
|
-
background-color: var(--colorTransparentBackground);
|
|
80
|
-
border-radius: 0;
|
|
81
|
-
border-top-style: none;
|
|
82
|
-
border-inline-end-style: none;
|
|
83
|
-
border-inline-start-style: none;
|
|
84
|
-
&::after {
|
|
85
|
-
inset-inline-start: 0;
|
|
86
|
-
inset-inline-end: 0;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.root:where(.filled-darker) {
|
|
91
|
-
background-color: var(--colorNeutralBackground3);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.root:where(.filled-lighter) {
|
|
95
|
-
background-color: var(--colorNeutralBackground1);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.root:where(.filled-darker-shadow) {
|
|
99
|
-
background-color: var(--colorNeutralBackground3);
|
|
100
|
-
box-shadow: var(--shadow2);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.root:where(.filled-lighter-shadow) {
|
|
104
|
-
background-color: var(--colorNeutralBackground1);
|
|
105
|
-
box-shadow: var(--shadow2);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.root:where(.outline:not(.disabled)) {
|
|
109
|
-
&:hover {
|
|
110
|
-
border-top-color: var(--colorNeutralStroke1Hover);
|
|
111
|
-
border-right-color: var(--colorNeutralStroke1Hover);
|
|
112
|
-
border-bottom-color: var(--colorNeutralStrokeAccessibleHover);
|
|
113
|
-
border-left-color: var(--colorNeutralStroke1Hover);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
&:active,
|
|
117
|
-
&:focus-within {
|
|
118
|
-
border-top-color: var(--colorNeutralStroke1Pressed);
|
|
119
|
-
border-right-color: var(--colorNeutralStroke1Pressed);
|
|
120
|
-
border-bottom-color: var(--colorNeutralStrokeAccessiblePressed);
|
|
121
|
-
border-left-color: var(--colorNeutralStroke1Pressed);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.root:where(.underline:not(.disabled)) {
|
|
126
|
-
&:hover {
|
|
127
|
-
border-bottom-color: var(--colorNeutralStrokeAccessibleHover);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
&:active,
|
|
131
|
-
&:focus-within {
|
|
132
|
-
border-bottom-color: var(--colorNeutralStrokeAccessiblePressed);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
&::after {
|
|
136
|
-
border-radius: 0;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.root:where(.filled:not(.disabled)) {
|
|
141
|
-
&:hover,
|
|
142
|
-
&:focus-within {
|
|
143
|
-
border-top-color: var(--colorTransparentStrokeInteractive);
|
|
144
|
-
border-right-color: var(--colorTransparentStrokeInteractive);
|
|
145
|
-
border-bottom-color: var(--colorTransparentStrokeInteractive);
|
|
146
|
-
border-left-color: var(--colorTransparentStrokeInteractive);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.root:where(.filled) {
|
|
151
|
-
border-top-color: var(--colorTransparentStroke);
|
|
152
|
-
border-right-color: var(--colorTransparentStroke);
|
|
153
|
-
border-bottom-color: var(--colorTransparentStroke);
|
|
154
|
-
border-left-color: var(--colorTransparentStroke);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.root:where(.invalid:not(.disabled)) {
|
|
158
|
-
&:not(:focus-within),
|
|
159
|
-
&:hover:not(:focus-within) {
|
|
160
|
-
border-top-color: var(--colorPaletteRedBorder2);
|
|
161
|
-
border-right-color: var(--colorPaletteRedBorder2);
|
|
162
|
-
border-bottom-color: var(--colorPaletteRedBorder2);
|
|
163
|
-
border-left-color: var(--colorPaletteRedBorder2);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.root:where(.disabled) {
|
|
168
|
-
cursor: not-allowed;
|
|
169
|
-
background-color: var(--colorTransparentBackground);
|
|
170
|
-
border-top-color: var(--colorNeutralStrokeDisabled);
|
|
171
|
-
border-right-color: var(--colorNeutralStrokeDisabled);
|
|
172
|
-
border-bottom-color: var(--colorNeutralStrokeDisabled);
|
|
173
|
-
border-left-color: var(--colorNeutralStrokeDisabled);
|
|
174
|
-
&::after {
|
|
175
|
-
content: unset;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
&:focus-within {
|
|
179
|
-
outline-style: none;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
@media (forced-colors: active) {
|
|
183
|
-
border-top-color: GrayText;
|
|
184
|
-
border-right-color: GrayText;
|
|
185
|
-
border-bottom-color: GrayText;
|
|
186
|
-
border-left-color: GrayText;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.root:where(.small.withContentBefore) {
|
|
191
|
-
padding-inline-start: var(--spacingHorizontalSNudge);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.root:where(.small.withContentAfter) {
|
|
195
|
-
padding-inline-end: var(--spacingHorizontalSNudge);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.root:where(.medium.withContentBefore) {
|
|
199
|
-
padding-inline-start: var(--spacingHorizontalMNudge);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.root:where(.medium.withContentAfter) {
|
|
203
|
-
padding-inline-end: var(--spacingHorizontalMNudge);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.root:where(.large.withContentBefore) {
|
|
207
|
-
padding-inline-start: var(--spacingHorizontalM);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.root:where(.large.withContentAfter) {
|
|
211
|
-
padding-inline-end: var(--spacingHorizontalM);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.input {
|
|
215
|
-
align-self: stretch;
|
|
216
|
-
box-sizing: border-box;
|
|
217
|
-
flex-grow: 1;
|
|
218
|
-
min-width: 0;
|
|
219
|
-
border-style: none;
|
|
220
|
-
padding: 0 var(--spacingHorizontalM);
|
|
221
|
-
color: var(--colorNeutralForeground1);
|
|
222
|
-
background-color: transparent;
|
|
223
|
-
outline-style: none;
|
|
224
|
-
font-family: inherit;
|
|
225
|
-
font-size: inherit;
|
|
226
|
-
font-weight: inherit;
|
|
227
|
-
line-height: inherit;
|
|
228
|
-
&::placeholder {
|
|
229
|
-
color: var(--colorNeutralForeground4);
|
|
230
|
-
opacity: 1;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
:where(.small) > .input {
|
|
235
|
-
padding-inline-start: var(--spacingHorizontalS);
|
|
236
|
-
padding-inline-end: var(--spacingHorizontalS);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
:where(.large) > .input {
|
|
240
|
-
padding-inline-start: calc(var(--spacingHorizontalM) + var(--spacingHorizontalSNudge));
|
|
241
|
-
padding-inline-end: calc(var(--spacingHorizontalM) + var(--spacingHorizontalSNudge));
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
:where(.disabled) > .input {
|
|
245
|
-
color: var(--colorNeutralForegroundDisabled);
|
|
246
|
-
background-color: var(--colorTransparentBackground);
|
|
247
|
-
cursor: not-allowed;
|
|
248
|
-
&::placeholder {
|
|
249
|
-
color: var(--colorNeutralForegroundDisabled);
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
:where(.small.withContentBefore) > .input {
|
|
254
|
-
padding-inline-start: var(--spacingHorizontalXXS);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
:where(.small.withContentAfter) > .input {
|
|
258
|
-
padding-inline-end: var(--spacingHorizontalXXS);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
:where(.medium.withContentBefore) > .input {
|
|
262
|
-
padding-inline-start: var(--spacingHorizontalXXS);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
:where(.medium.withContentAfter) > .input {
|
|
266
|
-
padding-inline-end: var(--spacingHorizontalXXS);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
:where(.large.withContentBefore) > .input {
|
|
270
|
-
padding-inline-start: var(--spacingHorizontalSNudge);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
:where(.large.withContentAfter) > .input {
|
|
274
|
-
padding-inline-end: var(--spacingHorizontalSNudge);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
.contentBefore,
|
|
278
|
-
.contentAfter {
|
|
279
|
-
box-sizing: border-box;
|
|
280
|
-
color: var(--colorNeutralForeground3);
|
|
281
|
-
display: flex;
|
|
282
|
-
& > svg {
|
|
283
|
-
font-size: var(--fontSizeBase500);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
:where(.disabled) > .contentBefore,
|
|
288
|
-
:where(.disabled) > .contentAfter {
|
|
289
|
-
color: var(--colorNeutralForegroundDisabled);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
:where(.small) > .contentBefore,
|
|
293
|
-
:where(.small) > .contentAfter {
|
|
294
|
-
& > svg {
|
|
295
|
-
font-size: var(--fontSizeBase400);
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
:where(.large) > .contentBefore,
|
|
300
|
-
:where(.large) > .contentAfter {
|
|
301
|
-
& > svg {
|
|
302
|
-
font-size: var(--fontSizeBase600);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
get inputClassNames () {
|
|
13
|
-
return inputClassNames;
|
|
14
|
-
},
|
|
15
|
-
get useInputStyles_unstable () {
|
|
16
|
-
return useInputStyles_unstable;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
-
const _clsx = require("clsx");
|
|
21
|
-
const _Inputmodulecss = /*#__PURE__*/ _interop_require_default._(require("./Input.module.css"));
|
|
22
|
-
const inputClassNames = {
|
|
23
|
-
root: 'fui-Input',
|
|
24
|
-
input: 'fui-Input__input',
|
|
25
|
-
contentBefore: 'fui-Input__contentBefore',
|
|
26
|
-
contentAfter: 'fui-Input__contentAfter'
|
|
27
|
-
};
|
|
28
|
-
const useInputStyles_unstable = (state)=>{
|
|
29
|
-
const { size, appearance } = state;
|
|
30
|
-
state.root.className = (0, _clsx.clsx)(inputClassNames.root, _Inputmodulecss.default.root, _Inputmodulecss.default[size], _Inputmodulecss.default[appearance], appearance.startsWith('filled') && _Inputmodulecss.default.filled, state.input.disabled && _Inputmodulecss.default.disabled, `${state.input['aria-invalid']}` === 'true' && _Inputmodulecss.default.invalid, state.contentBefore && _Inputmodulecss.default.withContentBefore, state.contentAfter && _Inputmodulecss.default.withContentAfter, state.root.className);
|
|
31
|
-
state.input.className = (0, _clsx.clsx)(inputClassNames.input, _Inputmodulecss.default.input, state.input.className);
|
|
32
|
-
if (state.contentBefore) {
|
|
33
|
-
state.contentBefore.className = (0, _clsx.clsx)(inputClassNames.contentBefore, _Inputmodulecss.default.contentBefore, state.contentBefore.className);
|
|
34
|
-
}
|
|
35
|
-
if (state.contentAfter) {
|
|
36
|
-
state.contentAfter.className = (0, _clsx.clsx)(inputClassNames.contentAfter, _Inputmodulecss.default.contentAfter, state.contentAfter.className);
|
|
37
|
-
}
|
|
38
|
-
return state;
|
|
39
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Input/useInputStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { InputSlots, InputState } from './Input.types';\nimport styles from './Input.module.css';\n\nexport const inputClassNames: SlotClassNames<InputSlots> = {\n root: 'fui-Input',\n input: 'fui-Input__input',\n contentBefore: 'fui-Input__contentBefore',\n contentAfter: 'fui-Input__contentAfter',\n};\n\nexport const useInputStyles_unstable = (state: InputState): InputState => {\n const { size, appearance } = state;\n state.root.className = clsx(\n inputClassNames.root,\n styles.root,\n styles[size],\n styles[appearance],\n appearance.startsWith('filled') && styles.filled,\n state.input.disabled && styles.disabled,\n `${state.input['aria-invalid']}` === 'true' && styles.invalid,\n state.contentBefore && styles.withContentBefore,\n state.contentAfter && styles.withContentAfter,\n state.root.className,\n );\n state.input.className = clsx(inputClassNames.input, styles.input, state.input.className);\n if (state.contentBefore) {\n state.contentBefore.className = clsx(\n inputClassNames.contentBefore,\n styles.contentBefore,\n state.contentBefore.className,\n );\n }\n if (state.contentAfter) {\n state.contentAfter.className = clsx(\n inputClassNames.contentAfter,\n styles.contentAfter,\n state.contentAfter.className,\n );\n }\n\n return state;\n};\n"],"names":["clsx","styles","inputClassNames","root","input","contentBefore","contentAfter","useInputStyles_unstable","state","size","appearance","className","startsWith","filled","disabled","invalid","withContentBefore","withContentAfter"],"mappings":";;;;;;;;;;;QAKaE;;;QAOAK;;;;;sBAZQ,OAAO;yEAGT,qBAAqB;AAEjC,wBAAoD;IACzDJ,MAAM;IACNC,OAAO;IACPC,eAAe;IACfC,cAAc;AAChB,EAAE;AAEK,gCAAgC,CAACE;IACtC,MAAM,EAAEC,IAAI,EAAEC,UAAU,EAAE,GAAGF;IAC7BA,MAAML,IAAI,CAACQ,SAAS,OAAGX,UAAAA,EACrBE,gBAAgBC,IAAI,EACpBF,uBAAAA,CAAOE,IAAI,EACXF,uBAAM,CAACQ,KAAK,EACZR,uBAAM,CAACS,WAAW,EAClBA,WAAWE,UAAU,CAAC,aAAaX,uBAAAA,CAAOY,MAAM,EAChDL,MAAMJ,KAAK,CAACU,QAAQ,IAAIb,uBAAAA,CAAOa,QAAQ,EACvC,GAAGN,MAAMJ,KAAK,CAAC,eAAe,EAAE,KAAK,UAAUH,uBAAAA,CAAOc,OAAO,EAC7DP,MAAMH,aAAa,IAAIJ,uBAAAA,CAAOe,iBAAiB,EAC/CR,MAAMF,YAAY,IAAIL,uBAAAA,CAAOgB,gBAAgB,EAC7CT,MAAML,IAAI,CAACQ,SAAS;IAEtBH,MAAMJ,KAAK,CAACO,SAAS,OAAGX,UAAAA,EAAKE,gBAAgBE,KAAK,EAAEH,uBAAAA,CAAOG,KAAK,EAAEI,MAAMJ,KAAK,CAACO,SAAS;IACvF,IAAIH,MAAMH,aAAa,EAAE;QACvBG,MAAMH,aAAa,CAACM,SAAS,OAAGX,UAAAA,EAC9BE,gBAAgBG,aAAa,EAC7BJ,uBAAAA,CAAOI,aAAa,EACpBG,MAAMH,aAAa,CAACM,SAAS;IAEjC;IACA,IAAIH,MAAMF,YAAY,EAAE;QACtBE,MAAMF,YAAY,CAACK,SAAS,OAAGX,UAAAA,EAC7BE,gBAAgBI,YAAY,EAC5BL,uBAAAA,CAAOK,YAAY,EACnBE,MAAMF,YAAY,CAACK,SAAS;IAEhC;IAEA,OAAOH;AACT,EAAE"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
get inputClassNames () {
|
|
13
|
-
return inputClassNames;
|
|
14
|
-
},
|
|
15
|
-
get useInputStyles_unstable () {
|
|
16
|
-
return useInputStyles_unstable;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
20
|
-
const _clsx = require("clsx");
|
|
21
|
-
const _Inputmodulecss = /*#__PURE__*/ _interop_require_default._(require("./Input.module.css"));
|
|
22
|
-
const inputClassNames = {
|
|
23
|
-
root: 'fui-Input',
|
|
24
|
-
input: 'fui-Input__input',
|
|
25
|
-
contentBefore: 'fui-Input__contentBefore',
|
|
26
|
-
contentAfter: 'fui-Input__contentAfter'
|
|
27
|
-
};
|
|
28
|
-
const useInputStyles_unstable = (state)=>{
|
|
29
|
-
const { size, appearance } = state;
|
|
30
|
-
state.root.className = (0, _clsx.clsx)(inputClassNames.root, _Inputmodulecss.default.root, _Inputmodulecss.default[size], _Inputmodulecss.default[appearance], appearance.startsWith('filled') && _Inputmodulecss.default.filled, state.input.disabled && _Inputmodulecss.default.disabled, `${state.input['aria-invalid']}` === 'true' && _Inputmodulecss.default.invalid, state.contentBefore && _Inputmodulecss.default.withContentBefore, state.contentAfter && _Inputmodulecss.default.withContentAfter, state.root.className);
|
|
31
|
-
state.input.className = (0, _clsx.clsx)(inputClassNames.input, _Inputmodulecss.default.input, state.input.className);
|
|
32
|
-
if (state.contentBefore) {
|
|
33
|
-
state.contentBefore.className = (0, _clsx.clsx)(inputClassNames.contentBefore, _Inputmodulecss.default.contentBefore, state.contentBefore.className);
|
|
34
|
-
}
|
|
35
|
-
if (state.contentAfter) {
|
|
36
|
-
state.contentAfter.className = (0, _clsx.clsx)(inputClassNames.contentAfter, _Inputmodulecss.default.contentAfter, state.contentAfter.className);
|
|
37
|
-
}
|
|
38
|
-
return state;
|
|
39
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Input/useInputStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { InputSlots, InputState } from './Input.types';\nimport styles from './Input.module.css';\n\nexport const inputClassNames: SlotClassNames<InputSlots> = {\n root: 'fui-Input',\n input: 'fui-Input__input',\n contentBefore: 'fui-Input__contentBefore',\n contentAfter: 'fui-Input__contentAfter',\n};\n\nexport const useInputStyles_unstable = (state: InputState): InputState => {\n const { size, appearance } = state;\n state.root.className = clsx(\n inputClassNames.root,\n styles.root,\n styles[size],\n styles[appearance],\n appearance.startsWith('filled') && styles.filled,\n state.input.disabled && styles.disabled,\n `${state.input['aria-invalid']}` === 'true' && styles.invalid,\n state.contentBefore && styles.withContentBefore,\n state.contentAfter && styles.withContentAfter,\n state.root.className,\n );\n state.input.className = clsx(inputClassNames.input, styles.input, state.input.className);\n if (state.contentBefore) {\n state.contentBefore.className = clsx(\n inputClassNames.contentBefore,\n styles.contentBefore,\n state.contentBefore.className,\n );\n }\n if (state.contentAfter) {\n state.contentAfter.className = clsx(\n inputClassNames.contentAfter,\n styles.contentAfter,\n state.contentAfter.className,\n );\n }\n\n return state;\n};\n"],"names":["clsx","styles","inputClassNames","root","input","contentBefore","contentAfter","useInputStyles_unstable","state","size","appearance","className","startsWith","filled","disabled","invalid","withContentBefore","withContentAfter"],"mappings":";;;;;;;;;;;QAKaE;;;QAOAK;;;;;sBAZQ,OAAO;yEAGT,qBAAqB;AAEjC,wBAAoD;IACzDJ,MAAM;IACNC,OAAO;IACPC,eAAe;IACfC,cAAc;AAChB,EAAE;AAEK,gCAAgC,CAACE;IACtC,MAAM,EAAEC,IAAI,EAAEC,UAAU,EAAE,GAAGF;IAC7BA,MAAML,IAAI,CAACQ,SAAS,OAAGX,UAAAA,EACrBE,gBAAgBC,IAAI,EACpBF,uBAAAA,CAAOE,IAAI,EACXF,uBAAM,CAACQ,KAAK,EACZR,uBAAM,CAACS,WAAW,EAClBA,WAAWE,UAAU,CAAC,aAAaX,uBAAAA,CAAOY,MAAM,EAChDL,MAAMJ,KAAK,CAACU,QAAQ,IAAIb,uBAAAA,CAAOa,QAAQ,EACvC,GAAGN,MAAMJ,KAAK,CAAC,eAAe,EAAE,KAAK,UAAUH,uBAAAA,CAAOc,OAAO,EAC7DP,MAAMH,aAAa,IAAIJ,uBAAAA,CAAOe,iBAAiB,EAC/CR,MAAMF,YAAY,IAAIL,uBAAAA,CAAOgB,gBAAgB,EAC7CT,MAAML,IAAI,CAACQ,SAAS;IAEtBH,MAAMJ,KAAK,CAACO,SAAS,OAAGX,UAAAA,EAAKE,gBAAgBE,KAAK,EAAEH,uBAAAA,CAAOG,KAAK,EAAEI,MAAMJ,KAAK,CAACO,SAAS;IACvF,IAAIH,MAAMH,aAAa,EAAE;QACvBG,MAAMH,aAAa,CAACM,SAAS,OAAGX,UAAAA,EAC9BE,gBAAgBG,aAAa,EAC7BJ,uBAAAA,CAAOI,aAAa,EACpBG,MAAMH,aAAa,CAACM,SAAS;IAEjC;IACA,IAAIH,MAAMF,YAAY,EAAE;QACtBE,MAAMF,YAAY,CAACK,SAAS,OAAGX,UAAAA,EAC7BE,gBAAgBI,YAAY,EAC5BL,uBAAAA,CAAOK,YAAY,EACnBE,MAAMF,YAAY,CAACK,SAAS;IAEhC;IAEA,OAAOH;AACT,EAAE"}
|