@mirohq/design-system-base-input 0.1.0-forms.2 → 0.1.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.
- package/dist/main.js +476 -46
- package/dist/main.js.map +1 -1
- package/dist/module.js +471 -46
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +136 -64
- package/package.json +20 -1
package/dist/main.js
CHANGED
|
@@ -2,70 +2,500 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var designSystemUtils = require('@mirohq/design-system-utils');
|
|
8
|
+
var designSystemUsePress = require('@mirohq/design-system-use-press');
|
|
9
|
+
var interactions = require('@react-aria/interactions');
|
|
10
|
+
var utils = require('@react-aria/utils');
|
|
11
|
+
var designSystemPrimitive = require('@mirohq/design-system-primitive');
|
|
12
|
+
var designSystemStitches = require('@mirohq/design-system-stitches');
|
|
13
|
+
var designSystemIcons = require('@mirohq/design-system-icons');
|
|
14
|
+
var designSystemBaseTextField = require('@mirohq/design-system-base-text-field');
|
|
15
|
+
var designSystemBaseButton = require('@mirohq/design-system-base-button');
|
|
16
|
+
var designSystemStyles = require('@mirohq/design-system-styles');
|
|
17
|
+
var designSystemUseAriaDisabled = require('@mirohq/design-system-use-aria-disabled');
|
|
18
|
+
var designSystemTooltip = require('@mirohq/design-system-tooltip');
|
|
19
|
+
var designSystemBaseIcon = require('@mirohq/design-system-base-icon');
|
|
20
|
+
var designSystemUseLayoutEffect = require('@mirohq/design-system-use-layout-effect');
|
|
21
|
+
|
|
22
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
23
|
+
|
|
24
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
25
|
+
|
|
26
|
+
const StyledIconSlot = designSystemStitches.styled(designSystemPrimitive.Primitive.div, {
|
|
27
|
+
order: 1,
|
|
28
|
+
alignContent: "center",
|
|
29
|
+
display: "flex",
|
|
30
|
+
justifyContent: "center",
|
|
31
|
+
color: "$icon-neutrals-subtle",
|
|
32
|
+
"& svg, & img": {
|
|
33
|
+
pointerEvents: "none"
|
|
34
|
+
},
|
|
35
|
+
variants: {
|
|
36
|
+
disabled: {
|
|
37
|
+
true: {
|
|
38
|
+
"& svg": {
|
|
39
|
+
color: "$icon-neutrals-disabled"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const StyledActionButton = designSystemStitches.styled(designSystemBaseButton.BaseButton, {
|
|
47
|
+
backgroundColor: "transparent",
|
|
48
|
+
color: "$icon-neutrals-subtle",
|
|
49
|
+
display: "flex",
|
|
50
|
+
justifyContent: "center",
|
|
51
|
+
order: 3,
|
|
52
|
+
padding: "6px",
|
|
53
|
+
square: "$7",
|
|
54
|
+
"& svg:not([data-icon-component]), & img:not([data-icon-component])": {
|
|
55
|
+
square: "$icon-200",
|
|
56
|
+
"--svg-stroke-width": "$stroke-width$thin"
|
|
57
|
+
},
|
|
58
|
+
...designSystemStyles.focus.css({
|
|
59
|
+
boxShadow: "$focus-small"
|
|
60
|
+
}),
|
|
61
|
+
"&:hover": {
|
|
62
|
+
backgroundColor: "$background-neutrals-subtle-hover"
|
|
63
|
+
},
|
|
64
|
+
"&:active, &[data-pressed]": {
|
|
65
|
+
backgroundColor: "$background-neutrals-subtle-active"
|
|
66
|
+
},
|
|
67
|
+
variants: {
|
|
68
|
+
readOnlyAppearance: {
|
|
69
|
+
true: {
|
|
70
|
+
"& svg[data-icon-component], & img[data-icon-component]": {
|
|
71
|
+
color: "$icon-neutrals-subtle"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
disableAppearance: {
|
|
76
|
+
true: {
|
|
77
|
+
color: "$icon-neutrals-disabled"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
const StyledIconExclamationPointCircle = designSystemStitches.styled(
|
|
84
|
+
designSystemIcons.IconExclamationPointCircle,
|
|
85
|
+
{
|
|
86
|
+
color: "$icon-danger"
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
const StyledIconCheckMark = designSystemStitches.styled(designSystemIcons.IconCheckMark, {
|
|
90
|
+
color: "$icon-success"
|
|
91
|
+
});
|
|
92
|
+
const StyledValidityBox = designSystemStitches.styled(designSystemPrimitive.Primitive.div, {
|
|
93
|
+
order: 3,
|
|
94
|
+
display: "flex",
|
|
95
|
+
alignItems: "center",
|
|
96
|
+
padding: "6px"
|
|
97
|
+
});
|
|
98
|
+
const StyledBaseInput = designSystemStitches.styled("div", {
|
|
99
|
+
position: "relative",
|
|
100
|
+
alignItems: "center",
|
|
101
|
+
display: "inline-flex",
|
|
102
|
+
height: "max-content",
|
|
103
|
+
boxSizing: "border-box",
|
|
104
|
+
width: "100%",
|
|
105
|
+
...designSystemBaseTextField.styles.variants.idle,
|
|
6
106
|
variants: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
borderRadius: "$50",
|
|
11
|
-
fontSize: "$200",
|
|
12
|
-
lineHeight: "1.5"
|
|
107
|
+
hovered: {
|
|
108
|
+
true: {},
|
|
109
|
+
false: {}
|
|
13
110
|
},
|
|
14
111
|
focused: {
|
|
15
|
-
|
|
16
|
-
|
|
112
|
+
true: designSystemBaseTextField.styles.variants.focused,
|
|
113
|
+
false: {}
|
|
17
114
|
},
|
|
18
|
-
|
|
19
|
-
|
|
115
|
+
valid: {
|
|
116
|
+
true: {},
|
|
117
|
+
false: {}
|
|
20
118
|
},
|
|
21
119
|
readOnly: {
|
|
22
|
-
|
|
23
|
-
|
|
120
|
+
true: designSystemBaseTextField.styles.variants.readOnly,
|
|
121
|
+
false: {}
|
|
24
122
|
},
|
|
25
123
|
disabled: {
|
|
26
|
-
|
|
124
|
+
true: designSystemBaseTextField.styles.variants.disabled,
|
|
125
|
+
false: {}
|
|
27
126
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
focused: {
|
|
33
|
-
borderColor: "$border-danger",
|
|
34
|
-
boxShadow: "$focus-controls-error"
|
|
35
|
-
},
|
|
36
|
-
hovered: {
|
|
37
|
-
borderColor: "$border-danger-hover"
|
|
38
|
-
}
|
|
127
|
+
ariaDisabled: {
|
|
128
|
+
true: designSystemBaseTextField.styles.variants.disabled,
|
|
129
|
+
false: {}
|
|
39
130
|
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
131
|
+
size: {
|
|
132
|
+
large: {
|
|
133
|
+
height: "$10",
|
|
134
|
+
padding: "0 $100 ",
|
|
135
|
+
["& ".concat(StyledIconSlot)]: {
|
|
136
|
+
paddingRight: "$50"
|
|
137
|
+
},
|
|
138
|
+
["& ".concat(StyledActionButton, ", & ").concat(StyledValidityBox)]: {
|
|
139
|
+
marginLeft: "$50"
|
|
140
|
+
},
|
|
141
|
+
["& ".concat(StyledValidityBox)]: {
|
|
142
|
+
paddingRight: "6px"
|
|
143
|
+
}
|
|
47
144
|
},
|
|
48
|
-
|
|
49
|
-
|
|
145
|
+
"x-large": {
|
|
146
|
+
height: "$12",
|
|
147
|
+
padding: "0 $150",
|
|
148
|
+
["& ".concat(StyledIconSlot)]: {
|
|
149
|
+
paddingRight: "$100"
|
|
150
|
+
},
|
|
151
|
+
["& ".concat(StyledActionButton, ", & ").concat(StyledValidityBox)]: {
|
|
152
|
+
marginLeft: "$100"
|
|
153
|
+
},
|
|
154
|
+
["& ".concat(StyledValidityBox)]: {
|
|
155
|
+
paddingRight: "6px"
|
|
156
|
+
}
|
|
50
157
|
}
|
|
51
158
|
}
|
|
52
159
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
160
|
+
compoundVariants: [
|
|
161
|
+
/** Idle states */
|
|
162
|
+
{
|
|
163
|
+
valid: false,
|
|
164
|
+
readOnly: false,
|
|
165
|
+
disabled: false,
|
|
166
|
+
ariaDisabled: false,
|
|
167
|
+
css: designSystemBaseTextField.styles.variants.invalid.idle
|
|
56
168
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
169
|
+
{
|
|
170
|
+
valid: true,
|
|
171
|
+
readOnly: false,
|
|
172
|
+
disabled: false,
|
|
173
|
+
ariaDisabled: false,
|
|
174
|
+
css: designSystemBaseTextField.styles.variants.valid.idle
|
|
175
|
+
},
|
|
176
|
+
/** Focus States */
|
|
177
|
+
{
|
|
178
|
+
focused: true,
|
|
179
|
+
readOnly: false,
|
|
180
|
+
css: {
|
|
181
|
+
borderColor: designSystemBaseTextField.styles.variants.focused.borderColor
|
|
65
182
|
}
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
focused: true,
|
|
186
|
+
readOnly: false,
|
|
187
|
+
valid: false,
|
|
188
|
+
disabled: false,
|
|
189
|
+
ariaDisabled: false,
|
|
190
|
+
css: designSystemBaseTextField.styles.variants.invalid.focused
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
focused: true,
|
|
194
|
+
readOnly: false,
|
|
195
|
+
valid: true,
|
|
196
|
+
disabled: false,
|
|
197
|
+
ariaDisabled: false,
|
|
198
|
+
css: designSystemBaseTextField.styles.variants.valid.focused
|
|
199
|
+
},
|
|
200
|
+
/** Hover states */
|
|
201
|
+
{
|
|
202
|
+
hovered: true,
|
|
203
|
+
disabled: false,
|
|
204
|
+
ariaDisabled: false,
|
|
205
|
+
readOnly: false,
|
|
206
|
+
css: designSystemBaseTextField.styles.variants.hovered
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
hovered: true,
|
|
210
|
+
focused: false,
|
|
211
|
+
valid: false,
|
|
212
|
+
readOnly: false,
|
|
213
|
+
disabled: false,
|
|
214
|
+
ariaDisabled: false,
|
|
215
|
+
css: designSystemBaseTextField.styles.variants.invalid.hovered
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
hovered: true,
|
|
219
|
+
focused: false,
|
|
220
|
+
valid: true,
|
|
221
|
+
readOnly: false,
|
|
222
|
+
disabled: false,
|
|
223
|
+
ariaDisabled: false,
|
|
224
|
+
css: designSystemBaseTextField.styles.variants.valid.hovered
|
|
66
225
|
}
|
|
226
|
+
],
|
|
227
|
+
defaultVariants: {
|
|
228
|
+
size: "large"
|
|
67
229
|
}
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
const disabledAndReadonlySelectors = ':read-only, :disabled, [aria-disabled="true"], [data-disabled]';
|
|
233
|
+
const StyledInput = designSystemStitches.styled(designSystemPrimitive.Primitive.input, {
|
|
234
|
+
all: "unset",
|
|
235
|
+
background: "transparent",
|
|
236
|
+
color: "$text-neutrals",
|
|
237
|
+
width: "100%",
|
|
238
|
+
borderRadius: "$50",
|
|
239
|
+
order: 2,
|
|
240
|
+
padding: "0 $50",
|
|
241
|
+
height: "100%",
|
|
242
|
+
"&::placeholder": {
|
|
243
|
+
fontStyle: "italic"
|
|
244
|
+
},
|
|
245
|
+
["&:not(".concat(disabledAndReadonlySelectors, ")::placeholder")]: designSystemBaseTextField.styles.base.placeholder,
|
|
246
|
+
"&:read-only": {
|
|
247
|
+
color: designSystemBaseTextField.styles.variants.readOnly.color
|
|
248
|
+
},
|
|
249
|
+
"&:disabled, &[aria-disabled=true], &[data-disabled]": designSystemBaseTextField.styles.base.disabled
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
const InputContext = React.createContext({});
|
|
253
|
+
const InputProvider = ({
|
|
254
|
+
children,
|
|
255
|
+
disabled,
|
|
256
|
+
"aria-disabled": ariaDisabled,
|
|
257
|
+
readOnly,
|
|
258
|
+
required,
|
|
259
|
+
valid,
|
|
260
|
+
...restProps
|
|
261
|
+
}) => {
|
|
262
|
+
const actionButtonRef = React.useRef(null);
|
|
263
|
+
const inputRef = React.useRef(null);
|
|
264
|
+
const [focused, setFocused] = React.useState(false);
|
|
265
|
+
const [hovered, setHovered] = React.useState(false);
|
|
266
|
+
const [hasIconSlot, setHasIconSlot] = React.useState(false);
|
|
267
|
+
const editable = !designSystemUtils.booleanify(disabled) && !designSystemUtils.booleanify(ariaDisabled) && !designSystemUtils.booleanify(readOnly);
|
|
268
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
269
|
+
InputContext.Provider,
|
|
270
|
+
{
|
|
271
|
+
value: {
|
|
272
|
+
...restProps,
|
|
273
|
+
setFocused,
|
|
274
|
+
setHovered,
|
|
275
|
+
setHasIconSlot,
|
|
276
|
+
hasIconSlot,
|
|
277
|
+
hovered,
|
|
278
|
+
focused,
|
|
279
|
+
disabled,
|
|
280
|
+
"aria-disabled": ariaDisabled,
|
|
281
|
+
readOnly,
|
|
282
|
+
editable,
|
|
283
|
+
inputRef,
|
|
284
|
+
actionButtonRef,
|
|
285
|
+
required,
|
|
286
|
+
valid
|
|
287
|
+
},
|
|
288
|
+
children
|
|
289
|
+
}
|
|
290
|
+
);
|
|
68
291
|
};
|
|
292
|
+
const useInputContext = () => React.useContext(InputContext);
|
|
293
|
+
|
|
294
|
+
const Input = React__default["default"].forwardRef(
|
|
295
|
+
({
|
|
296
|
+
id,
|
|
297
|
+
"aria-describedby": ariaDescribedBy,
|
|
298
|
+
"aria-invalid": ariaInvalid,
|
|
299
|
+
...restProps
|
|
300
|
+
}, forwardRef) => {
|
|
301
|
+
const {
|
|
302
|
+
"aria-disabled": ariaDisabled,
|
|
303
|
+
disabled,
|
|
304
|
+
setFocused,
|
|
305
|
+
inputRef,
|
|
306
|
+
required,
|
|
307
|
+
readOnly,
|
|
308
|
+
onChange
|
|
309
|
+
} = useInputContext();
|
|
310
|
+
const { onBlur, onFocus, ...elementProps } = designSystemUseAriaDisabled.useAriaDisabled({
|
|
311
|
+
...restProps,
|
|
312
|
+
ariaDisabled
|
|
313
|
+
});
|
|
314
|
+
const onFocusHandler = React__default["default"].useCallback(
|
|
315
|
+
(e) => {
|
|
316
|
+
setFocused(true);
|
|
317
|
+
onFocus == null ? void 0 : onFocus(e);
|
|
318
|
+
},
|
|
319
|
+
[setFocused, onFocus]
|
|
320
|
+
);
|
|
321
|
+
const onBlurHandler = React__default["default"].useCallback(
|
|
322
|
+
(e) => {
|
|
323
|
+
setFocused(false);
|
|
324
|
+
onBlur == null ? void 0 : onBlur(e);
|
|
325
|
+
},
|
|
326
|
+
[setFocused, onBlur]
|
|
327
|
+
);
|
|
328
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
329
|
+
StyledInput,
|
|
330
|
+
{
|
|
331
|
+
...elementProps,
|
|
332
|
+
id,
|
|
333
|
+
readOnly,
|
|
334
|
+
"aria-describedby": ariaDescribedBy,
|
|
335
|
+
"aria-invalid": ariaInvalid,
|
|
336
|
+
disabled: disabled === true || void 0,
|
|
337
|
+
required: required === true || void 0,
|
|
338
|
+
onFocus: onFocusHandler,
|
|
339
|
+
onBlur: onBlurHandler,
|
|
340
|
+
onChange,
|
|
341
|
+
ref: designSystemUtils.mergeRefs([inputRef, forwardRef])
|
|
342
|
+
}
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
);
|
|
346
|
+
|
|
347
|
+
const ActionButton = React__default["default"].forwardRef(({ "aria-label": ariaLabel, label, children, ...restProps }, forwardRef) => {
|
|
348
|
+
const {
|
|
349
|
+
valid,
|
|
350
|
+
hovered,
|
|
351
|
+
editable,
|
|
352
|
+
"aria-disabled": ariaDisabled,
|
|
353
|
+
disabled,
|
|
354
|
+
readOnly,
|
|
355
|
+
actionButtonRef
|
|
356
|
+
} = useInputContext();
|
|
357
|
+
const showInputSlot = valid === void 0 || designSystemUtils.booleanify(hovered);
|
|
358
|
+
let formattedChildren = children;
|
|
359
|
+
formattedChildren = designSystemUtils.addPropsToChildren(children, designSystemBaseIcon.isIconComponent, {
|
|
360
|
+
"aria-hidden": true
|
|
361
|
+
});
|
|
362
|
+
const hasPressEvent = Object.keys(restProps).some(
|
|
363
|
+
(key) => key.startsWith("onPress")
|
|
364
|
+
);
|
|
365
|
+
const customDisabled = restProps.disabled;
|
|
366
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: showInputSlot && /* @__PURE__ */ jsxRuntime.jsxs(designSystemTooltip.Tooltip, { children: [
|
|
367
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystemTooltip.Tooltip.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
368
|
+
StyledActionButton,
|
|
369
|
+
{
|
|
370
|
+
type: "button",
|
|
371
|
+
...restProps,
|
|
372
|
+
"aria-label": ariaLabel != null ? ariaLabel : label,
|
|
373
|
+
disabled: hasPressEvent ? customDisabled : customDisabled != null ? customDisabled : !editable,
|
|
374
|
+
disableAppearance: hasPressEvent ? !designSystemUtils.booleanify(readOnly) && customDisabled : designSystemUtils.booleanify(disabled != null ? disabled : ariaDisabled),
|
|
375
|
+
readOnlyAppearance: readOnly,
|
|
376
|
+
ref: designSystemUtils.mergeRefs([forwardRef, actionButtonRef]),
|
|
377
|
+
children: formattedChildren
|
|
378
|
+
}
|
|
379
|
+
) }),
|
|
380
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystemTooltip.Tooltip.Content, { children: label })
|
|
381
|
+
] }) });
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
const IconSlot = React__default["default"].forwardRef(({ children, ...restProps }, forwardRef) => {
|
|
385
|
+
const {
|
|
386
|
+
"aria-disabled": ariaDisabled,
|
|
387
|
+
disabled,
|
|
388
|
+
setHasIconSlot
|
|
389
|
+
} = useInputContext();
|
|
390
|
+
const formattedChildren = designSystemUtils.addPropsToChildren(children, designSystemBaseIcon.isIconComponent, {
|
|
391
|
+
size: "small",
|
|
392
|
+
weight: "thin",
|
|
393
|
+
"aria-hidden": true
|
|
394
|
+
});
|
|
395
|
+
designSystemUseLayoutEffect.useLayoutEffect(() => {
|
|
396
|
+
setHasIconSlot(true);
|
|
397
|
+
return () => setHasIconSlot(false);
|
|
398
|
+
}, [setHasIconSlot]);
|
|
399
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
400
|
+
StyledIconSlot,
|
|
401
|
+
{
|
|
402
|
+
...restProps,
|
|
403
|
+
disabled: designSystemUtils.booleanify(disabled != null ? disabled : ariaDisabled),
|
|
404
|
+
ref: forwardRef,
|
|
405
|
+
children: formattedChildren
|
|
406
|
+
}
|
|
407
|
+
);
|
|
408
|
+
});
|
|
409
|
+
IconSlot.displayName = "IconSlot";
|
|
410
|
+
|
|
411
|
+
const Root = React__default["default"].forwardRef(({ children, size, ...restProps }, forwardRef) => {
|
|
412
|
+
const ref = React.useRef(null);
|
|
413
|
+
const {
|
|
414
|
+
valid,
|
|
415
|
+
"aria-disabled": ariaDisabled,
|
|
416
|
+
disabled,
|
|
417
|
+
readOnly,
|
|
418
|
+
focused,
|
|
419
|
+
setHovered,
|
|
420
|
+
inputRef,
|
|
421
|
+
actionButtonRef,
|
|
422
|
+
setFocused
|
|
423
|
+
} = useInputContext();
|
|
424
|
+
const { hoverProps, isHovered: hovered } = interactions.useHover({
|
|
425
|
+
onHoverChange: setHovered
|
|
426
|
+
});
|
|
427
|
+
const { pressProps } = designSystemUsePress.usePress({
|
|
428
|
+
onPressStart: (e) => {
|
|
429
|
+
const { target } = e.originalEvent;
|
|
430
|
+
const shouldPrevent = document.activeElement === inputRef.current && target !== inputRef.current;
|
|
431
|
+
if (shouldPrevent) {
|
|
432
|
+
e.originalEvent.preventDefault();
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
onPressEnd: (e) => {
|
|
436
|
+
var _a, _b;
|
|
437
|
+
const { target } = e.originalEvent;
|
|
438
|
+
const isActionButton = target === actionButtonRef.current || ((_a = actionButtonRef.current) == null ? void 0 : _a.contains(target)) === true;
|
|
439
|
+
const shouldFocusInput = !isActionButton && !designSystemUtils.booleanify(disabled) && !designSystemUtils.booleanify(focused);
|
|
440
|
+
if (shouldFocusInput) {
|
|
441
|
+
(_b = inputRef.current) == null ? void 0 : _b.focus();
|
|
442
|
+
setFocused(true);
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
preventFocusOnPress: "auto"
|
|
446
|
+
});
|
|
447
|
+
const ariaDisabledOrDisabled = designSystemUtils.booleanify(ariaDisabled) || designSystemUtils.booleanify(disabled);
|
|
448
|
+
const showValidityIcon = !designSystemUtils.booleanify(readOnly) && !ariaDisabledOrDisabled && !hovered && !focused && valid !== void 0;
|
|
449
|
+
const ValidIcon = valid === true ? StyledIconCheckMark : StyledIconExclamationPointCircle;
|
|
450
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
451
|
+
StyledBaseInput,
|
|
452
|
+
{
|
|
453
|
+
...utils.mergeProps(restProps, hoverProps, pressProps),
|
|
454
|
+
"data-invalid": designSystemUtils.booleanishAttrValue(valid === false),
|
|
455
|
+
"data-valid": designSystemUtils.booleanishAttrValue(valid === true),
|
|
456
|
+
"data-form-element": "input",
|
|
457
|
+
ref: designSystemUtils.mergeRefs([ref, forwardRef]),
|
|
458
|
+
size,
|
|
459
|
+
hovered,
|
|
460
|
+
focused,
|
|
461
|
+
valid,
|
|
462
|
+
disabled: designSystemUtils.booleanify(disabled),
|
|
463
|
+
ariaDisabled: designSystemUtils.booleanify(ariaDisabled),
|
|
464
|
+
readOnly: designSystemUtils.booleanify(readOnly),
|
|
465
|
+
"data-testid": process.env.NODE_ENV === "test" ? "input-container" : void 0,
|
|
466
|
+
children: [
|
|
467
|
+
children,
|
|
468
|
+
showValidityIcon && /* @__PURE__ */ jsxRuntime.jsx(StyledValidityBox, { children: /* @__PURE__ */ jsxRuntime.jsx(ValidIcon, { size: "small", weight: "thin" }) })
|
|
469
|
+
]
|
|
470
|
+
}
|
|
471
|
+
);
|
|
472
|
+
});
|
|
473
|
+
const BaseInput = React__default["default"].forwardRef(
|
|
474
|
+
({
|
|
475
|
+
"aria-disabled": ariaDisabled,
|
|
476
|
+
disabled,
|
|
477
|
+
valid,
|
|
478
|
+
readOnly,
|
|
479
|
+
required,
|
|
480
|
+
onChange,
|
|
481
|
+
...restProps
|
|
482
|
+
}, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
483
|
+
InputProvider,
|
|
484
|
+
{
|
|
485
|
+
valid,
|
|
486
|
+
disabled,
|
|
487
|
+
"aria-disabled": ariaDisabled,
|
|
488
|
+
readOnly,
|
|
489
|
+
required,
|
|
490
|
+
onChange,
|
|
491
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Root, { ...restProps, ref: forwardRef })
|
|
492
|
+
}
|
|
493
|
+
)
|
|
494
|
+
);
|
|
495
|
+
BaseInput.Input = Input;
|
|
496
|
+
BaseInput.ActionButton = ActionButton;
|
|
497
|
+
BaseInput.IconSlot = IconSlot;
|
|
69
498
|
|
|
70
|
-
exports.
|
|
499
|
+
exports.BaseInput = BaseInput;
|
|
500
|
+
exports.useInputContext = useInputContext;
|
|
71
501
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sources":["../src/styles.ts"],"sourcesContent":["export const styles = {\n variants: {\n idle: {\n background: '$background-neutrals-container',\n border: '1px solid $border-neutrals',\n borderRadius: '$50',\n fontSize: '$200',\n lineHeight: '1.5',\n },\n focused: {\n boxShadow: '$focus-controls',\n borderColor: '$border-neutrals',\n },\n hovered: {\n borderColor: '$border-primary-hover',\n },\n readOnly: {\n background: '$background-neutrals-disabled',\n color: '$text-neutrals-subtle',\n },\n disabled: {\n background: '$background-neutrals-disabled',\n },\n invalid: {\n idle: {\n borderColor: '$border-danger',\n },\n focused: {\n borderColor: '$border-danger',\n boxShadow: '$focus-controls-error',\n },\n hovered: {\n borderColor: '$border-danger-hover',\n },\n },\n valid: {\n idle: {\n borderColor: '$border-success',\n },\n focused: {\n borderColor: '$border-success',\n boxShadow: '$focus-controls-success',\n },\n hovered: {\n borderColor: '$border-success-hover',\n },\n },\n },\n base: {\n placeholder: {\n color: '$text-neutrals-subtle',\n },\n disabled: {\n caretColor: 'transparent',\n '&, &::placeholder': {\n color: '$text-neutrals-disabled',\n '-webkit-text-fill-color': '$colors$text-neutrals-disabled',\n },\n '&:selection': {\n background: 'transparent',\n },\n },\n },\n}\n"],"names":[],"mappings":";;;;AAAO,MAAM,MAAS,GAAA;AAAA,EACpB,QAAU,EAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,UAAY,EAAA,gCAAA;AAAA,MACZ,MAAQ,EAAA,4BAAA;AAAA,MACR,YAAc,EAAA,KAAA;AAAA,MACd,QAAU,EAAA,MAAA;AAAA,MACV,UAAY,EAAA,KAAA;AAAA,KACd;AAAA,IACA,OAAS,EAAA;AAAA,MACP,SAAW,EAAA,iBAAA;AAAA,MACX,WAAa,EAAA,kBAAA;AAAA,KACf;AAAA,IACA,OAAS,EAAA;AAAA,MACP,WAAa,EAAA,uBAAA;AAAA,KACf;AAAA,IACA,QAAU,EAAA;AAAA,MACR,UAAY,EAAA,+BAAA;AAAA,MACZ,KAAO,EAAA,uBAAA;AAAA,KACT;AAAA,IACA,QAAU,EAAA;AAAA,MACR,UAAY,EAAA,+BAAA;AAAA,KACd;AAAA,IACA,OAAS,EAAA;AAAA,MACP,IAAM,EAAA;AAAA,QACJ,WAAa,EAAA,gBAAA;AAAA,OACf;AAAA,MACA,OAAS,EAAA;AAAA,QACP,WAAa,EAAA,gBAAA;AAAA,QACb,SAAW,EAAA,uBAAA;AAAA,OACb;AAAA,MACA,OAAS,EAAA;AAAA,QACP,WAAa,EAAA,sBAAA;AAAA,OACf;AAAA,KACF;AAAA,IACA,KAAO,EAAA;AAAA,MACL,IAAM,EAAA;AAAA,QACJ,WAAa,EAAA,iBAAA;AAAA,OACf;AAAA,MACA,OAAS,EAAA;AAAA,QACP,WAAa,EAAA,iBAAA;AAAA,QACb,SAAW,EAAA,yBAAA;AAAA,OACb;AAAA,MACA,OAAS,EAAA;AAAA,QACP,WAAa,EAAA,uBAAA;AAAA,OACf;AAAA,KACF;AAAA,GACF;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,WAAa,EAAA;AAAA,MACX,KAAO,EAAA,uBAAA;AAAA,KACT;AAAA,IACA,QAAU,EAAA;AAAA,MACR,UAAY,EAAA,aAAA;AAAA,MACZ,mBAAqB,EAAA;AAAA,QACnB,KAAO,EAAA,yBAAA;AAAA,QACP,yBAA2B,EAAA,gCAAA;AAAA,OAC7B;AAAA,MACA,aAAe,EAAA;AAAA,QACb,UAAY,EAAA,aAAA;AAAA,OACd;AAAA,KACF;AAAA,GACF;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"main.js","sources":["../src/partials/icon-slot.styled.tsx","../src/partials/action-button.styled.tsx","../src/base-input.styled.tsx","../src/partials/input.styled.tsx","../src/hooks/use-input-context.tsx","../src/partials/input.tsx","../src/partials/action-button.tsx","../src/partials/icon-slot.tsx","../src/base-input.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledIconSlot = styled(Primitive.div, {\n order: 1,\n alignContent: 'center',\n display: 'flex',\n justifyContent: 'center',\n color: '$icon-neutrals-subtle',\n\n '& svg, & img': {\n pointerEvents: 'none',\n },\n\n variants: {\n disabled: {\n true: {\n '& svg': {\n color: '$icon-neutrals-disabled',\n },\n },\n },\n },\n})\n\nexport type StyledIconSlotProps = ComponentPropsWithRef<typeof StyledIconSlot>\n","import { styled } from '@mirohq/design-system-stitches'\nimport { BaseButton } from '@mirohq/design-system-base-button'\nimport { focus } from '@mirohq/design-system-styles'\nimport type { ComponentPropsWithRef } from 'react'\n\nexport const StyledActionButton = styled(BaseButton, {\n backgroundColor: 'transparent',\n color: '$icon-neutrals-subtle',\n display: 'flex',\n justifyContent: 'center',\n order: 3,\n padding: '6px',\n square: '$7',\n\n '& svg:not([data-icon-component]), & img:not([data-icon-component])': {\n square: '$icon-200',\n '--svg-stroke-width': '$stroke-width$thin',\n },\n\n ...focus.css({\n boxShadow: '$focus-small',\n }),\n\n '&:hover': {\n backgroundColor: '$background-neutrals-subtle-hover',\n },\n\n '&:active, &[data-pressed]': {\n backgroundColor: '$background-neutrals-subtle-active',\n },\n\n variants: {\n readOnlyAppearance: {\n true: {\n '& svg[data-icon-component], & img[data-icon-component]': {\n color: '$icon-neutrals-subtle',\n },\n },\n },\n disableAppearance: {\n true: {\n color: '$icon-neutrals-disabled',\n },\n },\n },\n})\n\nexport type StyledActionButtonProps = ComponentPropsWithRef<\n typeof StyledActionButton\n>\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { ComponentPropsWithRef } from 'react'\nimport {\n IconExclamationPointCircle,\n IconCheckMark,\n} from '@mirohq/design-system-icons'\nimport { styles as textFieldStyles } from '@mirohq/design-system-base-text-field'\n\nimport { StyledIconSlot } from './partials/icon-slot.styled'\nimport { StyledActionButton } from './partials/action-button.styled'\n\nexport const StyledIconExclamationPointCircle = styled(\n IconExclamationPointCircle,\n {\n color: '$icon-danger',\n }\n)\n\nexport const StyledIconCheckMark = styled(IconCheckMark, {\n color: '$icon-success',\n})\n\nexport const StyledValidityBox = styled(Primitive.div, {\n order: 3,\n display: 'flex',\n alignItems: 'center',\n padding: '6px',\n})\n\nexport const StyledBaseInput = styled('div', {\n position: 'relative',\n alignItems: 'center',\n display: 'inline-flex',\n height: 'max-content',\n boxSizing: 'border-box',\n width: '100%',\n ...textFieldStyles.variants.idle,\n\n variants: {\n hovered: {\n true: {},\n false: {},\n },\n focused: {\n true: textFieldStyles.variants.focused,\n false: {},\n },\n valid: {\n true: {},\n false: {},\n },\n readOnly: {\n true: textFieldStyles.variants.readOnly,\n false: {},\n },\n disabled: {\n true: textFieldStyles.variants.disabled,\n false: {},\n },\n ariaDisabled: {\n true: textFieldStyles.variants.disabled,\n false: {},\n },\n size: {\n large: {\n height: '$10',\n padding: '0 $100 ',\n [`& ${StyledIconSlot}`]: {\n paddingRight: '$50',\n },\n [`& ${StyledActionButton}, & ${StyledValidityBox}`]: {\n marginLeft: '$50',\n },\n [`& ${StyledValidityBox}`]: {\n paddingRight: '6px',\n },\n },\n 'x-large': {\n height: '$12',\n padding: '0 $150',\n [`& ${StyledIconSlot}`]: {\n paddingRight: '$100',\n },\n [`& ${StyledActionButton}, & ${StyledValidityBox}`]: {\n marginLeft: '$100',\n },\n [`& ${StyledValidityBox}`]: {\n paddingRight: '6px',\n },\n },\n },\n },\n compoundVariants: [\n /** Idle states */\n {\n valid: false,\n readOnly: false,\n disabled: false,\n ariaDisabled: false,\n css: textFieldStyles.variants.invalid.idle,\n },\n {\n valid: true,\n readOnly: false,\n disabled: false,\n ariaDisabled: false,\n css: textFieldStyles.variants.valid.idle,\n },\n /** Focus States */\n {\n focused: true,\n readOnly: false,\n css: {\n borderColor: textFieldStyles.variants.focused.borderColor,\n },\n },\n {\n focused: true,\n readOnly: false,\n valid: false,\n disabled: false,\n ariaDisabled: false,\n css: textFieldStyles.variants.invalid.focused,\n },\n {\n focused: true,\n readOnly: false,\n valid: true,\n disabled: false,\n ariaDisabled: false,\n css: textFieldStyles.variants.valid.focused,\n },\n /** Hover states */\n {\n hovered: true,\n disabled: false,\n ariaDisabled: false,\n readOnly: false,\n css: textFieldStyles.variants.hovered,\n },\n {\n hovered: true,\n focused: false,\n valid: false,\n readOnly: false,\n disabled: false,\n ariaDisabled: false,\n css: textFieldStyles.variants.invalid.hovered,\n },\n {\n hovered: true,\n focused: false,\n valid: true,\n readOnly: false,\n disabled: false,\n ariaDisabled: false,\n css: textFieldStyles.variants.valid.hovered,\n },\n ],\n defaultVariants: {\n size: 'large',\n },\n})\n\nexport type StyledBaseInputProps = ComponentPropsWithRef<typeof StyledBaseInput>\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { ComponentPropsWithRef } from 'react'\nimport { styles as textFieldStyles } from '@mirohq/design-system-base-text-field'\n\nconst disabledAndReadonlySelectors =\n ':read-only, :disabled, [aria-disabled=\"true\"], [data-disabled]'\n\nexport const StyledInput = styled(Primitive.input, {\n all: 'unset',\n background: 'transparent',\n color: '$text-neutrals',\n width: '100%',\n borderRadius: '$50',\n order: 2,\n padding: '0 $50',\n height: '100%',\n\n '&::placeholder': {\n fontStyle: 'italic',\n },\n\n [`&:not(${disabledAndReadonlySelectors})::placeholder`]:\n textFieldStyles.base.placeholder,\n\n '&:read-only': {\n color: textFieldStyles.variants.readOnly.color,\n },\n\n '&:disabled, &[aria-disabled=true], &[data-disabled]':\n textFieldStyles.base.disabled,\n})\n\nexport type StyledInputProps = ComponentPropsWithRef<typeof StyledInput>\n","import React, { createContext, useContext, useState, useRef } from 'react'\nimport type { PropsWithChildren } from 'react'\nimport { booleanify } from '@mirohq/design-system-utils'\nimport type { FormElementProps } from '@mirohq/design-system-base-form'\n\ninterface InputProps extends FormElementProps {\n onChange?: React.ChangeEventHandler<HTMLInputElement>\n}\n\ninterface InputContextProps extends InputProps {\n focused: boolean\n setFocused: React.Dispatch<React.SetStateAction<boolean>>\n hovered: boolean\n setHovered: React.Dispatch<React.SetStateAction<boolean>>\n hasIconSlot: boolean\n setHasIconSlot: React.Dispatch<React.SetStateAction<boolean>>\n actionButtonRef: React.RefObject<HTMLAnchorElement | HTMLButtonElement>\n inputRef: React.RefObject<HTMLInputElement>\n editable: boolean\n}\n\nexport type InputProviderProps = InputProps\n\nconst InputContext = createContext<InputContextProps>({} as any)\n\nexport const InputProvider = ({\n children,\n disabled,\n 'aria-disabled': ariaDisabled,\n readOnly,\n required,\n valid,\n ...restProps\n}: PropsWithChildren<InputProviderProps>): JSX.Element => {\n const actionButtonRef = useRef<HTMLAnchorElement | HTMLButtonElement>(null)\n const inputRef = useRef<HTMLInputElement>(null)\n const [focused, setFocused] = useState(false)\n const [hovered, setHovered] = useState(false)\n const [hasIconSlot, setHasIconSlot] = useState(false)\n const editable =\n !booleanify(disabled) && !booleanify(ariaDisabled) && !booleanify(readOnly)\n\n return (\n <InputContext.Provider\n value={{\n ...restProps,\n setFocused,\n setHovered,\n setHasIconSlot,\n hasIconSlot,\n hovered,\n focused,\n disabled,\n 'aria-disabled': ariaDisabled,\n readOnly,\n editable,\n inputRef,\n actionButtonRef,\n required,\n valid,\n }}\n >\n {children}\n </InputContext.Provider>\n )\n}\n\nexport const useInputContext = (): InputContextProps => useContext(InputContext)\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { mergeRefs } from '@mirohq/design-system-utils'\nimport { useAriaDisabled } from '@mirohq/design-system-use-aria-disabled'\n\nimport { StyledInput } from './input.styled'\nimport type { StyledInputProps } from './input.styled'\nimport { useInputContext } from '../hooks/use-input-context'\n\nexport type InputProps = Omit<\n StyledInputProps,\n // these props should be set in the root\n 'aria-disabled' | 'disabled' | 'readOnly' | 'required' | 'onChange'\n>\n\nexport const Input = React.forwardRef<\n ElementRef<typeof StyledInput>,\n InputProps\n>(\n (\n {\n id,\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n ...restProps\n },\n forwardRef\n ) => {\n const {\n 'aria-disabled': ariaDisabled,\n disabled,\n setFocused,\n inputRef,\n required,\n readOnly,\n onChange,\n } = useInputContext()\n\n const { onBlur, onFocus, ...elementProps } = useAriaDisabled({\n ...restProps,\n ariaDisabled,\n })\n\n const onFocusHandler = React.useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setFocused(true)\n onFocus?.(e)\n },\n [setFocused, onFocus]\n )\n const onBlurHandler = React.useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n setFocused(false)\n onBlur?.(e)\n },\n [setFocused, onBlur]\n )\n\n return (\n <StyledInput\n {...elementProps}\n id={id}\n readOnly={readOnly}\n aria-describedby={ariaDescribedBy}\n aria-invalid={ariaInvalid}\n disabled={disabled === true || undefined}\n required={required === true || undefined}\n onFocus={onFocusHandler}\n onBlur={onBlurHandler}\n onChange={onChange}\n ref={mergeRefs([inputRef, forwardRef])}\n />\n )\n }\n)\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport {\n mergeRefs,\n booleanify,\n addPropsToChildren,\n} from '@mirohq/design-system-utils'\nimport { Tooltip } from '@mirohq/design-system-tooltip'\nimport { isIconComponent } from '@mirohq/design-system-base-icon'\n\nimport { StyledActionButton } from './action-button.styled'\nimport type { StyledActionButtonProps } from './action-button.styled'\nimport { useInputContext } from '../hooks/use-input-context'\n\nexport type ActionButtonProps = StyledActionButtonProps & {\n label: string\n}\n\nexport const ActionButton = React.forwardRef<\n ElementRef<typeof StyledActionButton>,\n ActionButtonProps\n>(({ 'aria-label': ariaLabel, label, children, ...restProps }, forwardRef) => {\n const {\n valid,\n hovered,\n editable,\n 'aria-disabled': ariaDisabled,\n disabled,\n readOnly,\n actionButtonRef,\n } = useInputContext()\n\n const showInputSlot = valid === undefined || booleanify(hovered)\n\n let formattedChildren = children\n\n formattedChildren = addPropsToChildren(children, isIconComponent, {\n 'aria-hidden': true,\n })\n\n const hasPressEvent = Object.keys(restProps).some(key =>\n key.startsWith('onPress')\n )\n const customDisabled = restProps.disabled\n\n return (\n <>\n {showInputSlot && (\n <Tooltip>\n <Tooltip.Trigger asChild>\n <StyledActionButton\n type='button'\n {...restProps}\n aria-label={ariaLabel ?? label}\n disabled={\n hasPressEvent ? customDisabled : customDisabled ?? !editable\n }\n disableAppearance={\n hasPressEvent\n ? !booleanify(readOnly) && customDisabled\n : booleanify(disabled ?? ariaDisabled)\n }\n readOnlyAppearance={readOnly}\n ref={mergeRefs([forwardRef, actionButtonRef])}\n >\n {formattedChildren}\n </StyledActionButton>\n </Tooltip.Trigger>\n <Tooltip.Content>{label}</Tooltip.Content>\n </Tooltip>\n )}\n </>\n )\n})\n","import React from 'react'\nimport { addPropsToChildren, booleanify } from '@mirohq/design-system-utils'\nimport { isIconComponent } from '@mirohq/design-system-base-icon'\nimport type { ElementRef } from 'react'\nimport { useLayoutEffect } from '@mirohq/design-system-use-layout-effect'\n\nimport { StyledIconSlot } from './icon-slot.styled'\nimport { useInputContext } from '../hooks/use-input-context'\nimport type { StyledIconSlotProps } from './icon-slot.styled'\n\nexport interface IconSlotProps extends StyledIconSlotProps {}\n\nexport const IconSlot = React.forwardRef<\n ElementRef<typeof StyledIconSlot>,\n StyledIconSlotProps\n>(({ children, ...restProps }, forwardRef) => {\n const {\n 'aria-disabled': ariaDisabled,\n disabled,\n setHasIconSlot,\n } = useInputContext()\n const formattedChildren = addPropsToChildren(children, isIconComponent, {\n size: 'small',\n weight: 'thin',\n 'aria-hidden': true,\n })\n\n useLayoutEffect(() => {\n setHasIconSlot(true)\n return () => setHasIconSlot(false)\n }, [setHasIconSlot])\n\n return (\n <StyledIconSlot\n {...restProps}\n disabled={booleanify(disabled ?? ariaDisabled)}\n ref={forwardRef}\n >\n {formattedChildren}\n </StyledIconSlot>\n )\n})\n\nIconSlot.displayName = 'IconSlot'\n","import React, { useRef } from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\nimport {\n booleanify,\n booleanishAttrValue,\n mergeRefs,\n} from '@mirohq/design-system-utils'\nimport { usePress } from '@mirohq/design-system-use-press'\nimport { useHover } from '@react-aria/interactions'\nimport { mergeProps } from '@react-aria/utils'\n\nimport type { StyledBaseInputProps } from './base-input.styled'\nimport {\n StyledBaseInput,\n StyledValidityBox,\n StyledIconExclamationPointCircle,\n StyledIconCheckMark,\n} from './base-input.styled'\nimport { Input } from './partials/input'\nimport type { InputProviderProps } from './hooks/use-input-context'\nimport { InputProvider, useInputContext } from './hooks/use-input-context'\nimport { ActionButton } from './partials/action-button'\nimport { IconSlot } from './partials/icon-slot'\n\ntype BaseInputRootProps = Omit<\n StyledBaseInputProps,\n // these props come from useInputContext, we don't pass it to BaseInput directly\n | 'hovered'\n | 'focused'\n | 'valid'\n | 'readOnly'\n | 'disabled'\n | 'ariaDisabled'\n // these shouldn't be applied to div\n | 'value'\n | 'defaultValue'\n | 'placeholder'\n>\n\nconst Root = React.forwardRef<\n ElementRef<typeof StyledBaseInput>,\n BaseInputRootProps\n>(({ children, size, ...restProps }, forwardRef) => {\n const ref = useRef<HTMLDivElement>(null)\n const {\n valid,\n 'aria-disabled': ariaDisabled,\n disabled,\n readOnly,\n focused,\n setHovered,\n inputRef,\n actionButtonRef,\n setFocused,\n } = useInputContext()\n const { hoverProps, isHovered: hovered } = useHover({\n onHoverChange: setHovered,\n })\n\n const { pressProps } = usePress({\n onPressStart: e => {\n const { target } = e.originalEvent as PointerEvent\n\n const shouldPrevent =\n document.activeElement === inputRef.current &&\n target !== inputRef.current // to not stop text selection\n\n // to not lose focus on container click\n if (shouldPrevent) {\n e.originalEvent.preventDefault()\n }\n },\n onPressEnd: e => {\n const { target } = e.originalEvent as PointerEvent\n\n const isActionButton =\n target === actionButtonRef.current ||\n actionButtonRef.current?.contains(target as Node) === true\n\n const shouldFocusInput =\n !isActionButton && !booleanify(disabled) && !booleanify(focused)\n\n if (shouldFocusInput) {\n inputRef.current?.focus()\n setFocused(true)\n }\n },\n preventFocusOnPress: 'auto',\n })\n\n const ariaDisabledOrDisabled =\n booleanify(ariaDisabled) || booleanify(disabled)\n\n // validity\n const showValidityIcon =\n !booleanify(readOnly) &&\n !ariaDisabledOrDisabled &&\n !hovered &&\n !focused &&\n valid !== undefined\n const ValidIcon =\n valid === true ? StyledIconCheckMark : StyledIconExclamationPointCircle\n\n return (\n <StyledBaseInput\n {...mergeProps(restProps, hoverProps, pressProps)}\n data-invalid={booleanishAttrValue(valid === false)}\n data-valid={booleanishAttrValue(valid === true)}\n data-form-element='input'\n ref={mergeRefs([ref, forwardRef])}\n size={size}\n hovered={hovered}\n focused={focused}\n valid={valid}\n disabled={booleanify(disabled)}\n ariaDisabled={booleanify(ariaDisabled)}\n readOnly={booleanify(readOnly)}\n data-testid={\n process.env.NODE_ENV === 'test' ? 'input-container' : undefined\n }\n >\n {children}\n {showValidityIcon && (\n <StyledValidityBox>\n <ValidIcon size='small' weight='thin' />\n </StyledValidityBox>\n )}\n </StyledBaseInput>\n )\n})\n\nexport type BaseInputProps = BaseInputRootProps & InputProviderProps\n\nexport const BaseInput = React.forwardRef<\n ElementRef<typeof StyledBaseInput>,\n BaseInputProps\n>(\n (\n {\n 'aria-disabled': ariaDisabled,\n disabled,\n valid,\n readOnly,\n required,\n onChange,\n ...restProps\n },\n forwardRef\n ) => (\n <InputProvider\n valid={valid}\n disabled={disabled}\n aria-disabled={ariaDisabled}\n readOnly={readOnly}\n required={required}\n onChange={onChange}\n >\n <Root {...restProps} ref={forwardRef} />\n </InputProvider>\n )\n) as ForwardRefExoticComponent<BaseInputProps> & Partials\n\n// Partials\n// -----------------------------------------------------------------------------\nexport interface Partials {\n Input: typeof Input\n ActionButton: typeof ActionButton\n IconSlot: typeof IconSlot\n}\n\nBaseInput.Input = Input\nBaseInput.ActionButton = ActionButton\nBaseInput.IconSlot = IconSlot\n"],"names":["styled","Primitive","BaseButton","focus","IconExclamationPointCircle","IconCheckMark","textFieldStyles","createContext","useRef","useState","booleanify","jsx","useContext","React","useAriaDisabled","mergeRefs","addPropsToChildren","isIconComponent","Fragment","jsxs","Tooltip","useLayoutEffect","useHover","usePress","mergeProps","booleanishAttrValue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIa,MAAA,cAAA,GAAiBA,2BAAO,CAAAC,+BAAA,CAAU,GAAK,EAAA;AAAA,EAClD,KAAO,EAAA,CAAA;AAAA,EACP,YAAc,EAAA,QAAA;AAAA,EACd,OAAS,EAAA,MAAA;AAAA,EACT,cAAgB,EAAA,QAAA;AAAA,EAChB,KAAO,EAAA,uBAAA;AAAA,EAEP,cAAgB,EAAA;AAAA,IACd,aAAe,EAAA,MAAA;AAAA,GACjB;AAAA,EAEA,QAAU,EAAA;AAAA,IACR,QAAU,EAAA;AAAA,MACR,IAAM,EAAA;AAAA,QACJ,OAA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