@zag-js/pin-input 0.1.14 → 0.1.15
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/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -225,17 +225,17 @@ function connect(state, send, normalize) {
|
|
|
225
225
|
placeholder: focusedIndex === index ? "" : state.context.placeholder,
|
|
226
226
|
onChange(event) {
|
|
227
227
|
const evt = getNativeEvent(event);
|
|
228
|
-
if (evt.isComposing)
|
|
229
|
-
return;
|
|
230
228
|
const { value } = event.currentTarget;
|
|
231
229
|
if (evt.inputType === "insertFromPaste" || value.length > 2) {
|
|
232
230
|
send({ type: "PASTE", value });
|
|
233
231
|
event.preventDefault();
|
|
234
232
|
return;
|
|
235
233
|
}
|
|
236
|
-
if (evt.inputType === "
|
|
237
|
-
send(
|
|
234
|
+
if (evt.inputType === "deleteContentBackward") {
|
|
235
|
+
send("BACKSPACE");
|
|
236
|
+
return;
|
|
238
237
|
}
|
|
238
|
+
send({ type: "INPUT", value });
|
|
239
239
|
},
|
|
240
240
|
onKeyDown(event) {
|
|
241
241
|
const evt = getNativeEvent(event);
|
package/dist/index.mjs
CHANGED
|
@@ -198,17 +198,17 @@ function connect(state, send, normalize) {
|
|
|
198
198
|
placeholder: focusedIndex === index ? "" : state.context.placeholder,
|
|
199
199
|
onChange(event) {
|
|
200
200
|
const evt = getNativeEvent(event);
|
|
201
|
-
if (evt.isComposing)
|
|
202
|
-
return;
|
|
203
201
|
const { value } = event.currentTarget;
|
|
204
202
|
if (evt.inputType === "insertFromPaste" || value.length > 2) {
|
|
205
203
|
send({ type: "PASTE", value });
|
|
206
204
|
event.preventDefault();
|
|
207
205
|
return;
|
|
208
206
|
}
|
|
209
|
-
if (evt.inputType === "
|
|
210
|
-
send(
|
|
207
|
+
if (evt.inputType === "deleteContentBackward") {
|
|
208
|
+
send("BACKSPACE");
|
|
209
|
+
return;
|
|
211
210
|
}
|
|
211
|
+
send({ type: "INPUT", value });
|
|
212
212
|
},
|
|
213
213
|
onKeyDown(event) {
|
|
214
214
|
const evt = getNativeEvent(event);
|