@zag-js/number-input 1.47.0 → 1.49.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/dist/cursor.d.mts +8 -10
- package/dist/cursor.d.ts +8 -10
- package/dist/cursor.js +65 -104
- package/dist/cursor.mjs +59 -77
- package/dist/index.d.mts +6 -9
- package/dist/index.d.ts +6 -9
- package/dist/index.js +12 -38
- package/dist/index.mjs +2 -7
- package/dist/number-input.anatomy.d.mts +2 -6
- package/dist/number-input.anatomy.d.ts +2 -6
- package/dist/number-input.anatomy.js +8 -42
- package/dist/number-input.anatomy.mjs +4 -16
- package/dist/number-input.connect.d.mts +3 -8
- package/dist/number-input.connect.d.ts +3 -8
- package/dist/number-input.connect.js +309 -310
- package/dist/number-input.connect.mjs +302 -283
- package/dist/number-input.dom.d.mts +28 -32
- package/dist/number-input.dom.d.ts +28 -32
- package/dist/number-input.dom.js +96 -137
- package/dist/number-input.dom.mjs +76 -96
- package/dist/number-input.machine.d.mts +2 -8
- package/dist/number-input.machine.d.ts +2 -8
- package/dist/number-input.machine.js +493 -460
- package/dist/number-input.machine.mjs +486 -439
- package/dist/number-input.props.d.mts +3 -9
- package/dist/number-input.props.d.ts +3 -9
- package/dist/number-input.props.js +41 -65
- package/dist/number-input.props.mjs +35 -38
- package/dist/number-input.translations.d.mts +3 -8
- package/dist/number-input.translations.d.ts +3 -8
- package/dist/number-input.translations.js +8 -31
- package/dist/number-input.translations.mjs +4 -6
- package/dist/number-input.types.d.mts +302 -300
- package/dist/number-input.types.d.ts +302 -300
- package/dist/number-input.types.js +4 -18
- package/dist/number-input.types.mjs +1 -0
- package/dist/number-input.utils.d.mts +9 -12
- package/dist/number-input.utils.d.ts +9 -12
- package/dist/number-input.utils.js +28 -57
- package/dist/number-input.utils.mjs +20 -28
- package/package.json +8 -8
|
@@ -1,289 +1,308 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
ariaAttr,
|
|
4
|
-
dataAttr,
|
|
5
|
-
getEventPoint,
|
|
6
|
-
getEventStepValue,
|
|
7
|
-
getWindow,
|
|
8
|
-
isComposingEvent,
|
|
9
|
-
isLeftClick,
|
|
10
|
-
isModifierKey,
|
|
11
|
-
raf,
|
|
12
|
-
setCaretToEnd
|
|
13
|
-
} from "@zag-js/dom-query";
|
|
1
|
+
import { ariaAttr, dataAttr, getEventPoint, getEventStepValue, getWindow, isComposingEvent, isLeftClick, isModifierKey, raf, setCaretToEnd } from "@zag-js/dom-query";
|
|
14
2
|
import { mergeWithDefault, roundToDpr } from "@zag-js/utils";
|
|
15
3
|
import { recordCursor } from "./cursor.mjs";
|
|
16
4
|
import { parts } from "./number-input.anatomy.mjs";
|
|
17
|
-
import
|
|
5
|
+
import { getDecrementTriggerId, getIncrementTriggerId, getInputEl, getInputId, getLabelId, getRootId, getScrubberId } from "./number-input.dom.mjs";
|
|
18
6
|
import { defaultTranslations } from "./number-input.translations.mjs";
|
|
7
|
+
// src/number-input.connect.ts
|
|
19
8
|
function connect(service, normalize) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
9
|
+
const { state, send, prop, scope, computed } = service;
|
|
10
|
+
const focused = state.hasTag("focus");
|
|
11
|
+
const disabled = computed("isDisabled");
|
|
12
|
+
const readOnly = !!prop("readOnly");
|
|
13
|
+
const required = !!prop("required");
|
|
14
|
+
const scrubbing = state.matches("scrubbing");
|
|
15
|
+
const empty = computed("isValueEmpty");
|
|
16
|
+
const invalid = prop("invalid") !== void 0 ? !!prop("invalid") : computed("isOutOfRange");
|
|
17
|
+
const isIncrementDisabled = disabled || !computed("canIncrement") || readOnly;
|
|
18
|
+
const isDecrementDisabled = disabled || !computed("canDecrement") || readOnly;
|
|
19
|
+
const translations = mergeWithDefault(defaultTranslations, prop("translations"));
|
|
20
|
+
return {
|
|
21
|
+
focused,
|
|
22
|
+
invalid,
|
|
23
|
+
empty,
|
|
24
|
+
value: computed("formattedValue"),
|
|
25
|
+
valueAsNumber: computed("valueAsNumber"),
|
|
26
|
+
setValue(value) {
|
|
27
|
+
send({
|
|
28
|
+
type: "VALUE.SET",
|
|
29
|
+
value
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
clearValue() {
|
|
33
|
+
send({ type: "VALUE.CLEAR" });
|
|
34
|
+
},
|
|
35
|
+
increment() {
|
|
36
|
+
send({ type: "VALUE.INCREMENT" });
|
|
37
|
+
},
|
|
38
|
+
decrement() {
|
|
39
|
+
send({ type: "VALUE.DECREMENT" });
|
|
40
|
+
},
|
|
41
|
+
setToMax() {
|
|
42
|
+
send({
|
|
43
|
+
type: "VALUE.SET",
|
|
44
|
+
value: prop("max")
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
setToMin() {
|
|
48
|
+
send({
|
|
49
|
+
type: "VALUE.SET",
|
|
50
|
+
value: prop("min")
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
focus() {
|
|
54
|
+
getInputEl(scope)?.focus();
|
|
55
|
+
},
|
|
56
|
+
getRootProps() {
|
|
57
|
+
return normalize.element({
|
|
58
|
+
id: getRootId(scope),
|
|
59
|
+
...parts.root.attrs,
|
|
60
|
+
dir: prop("dir"),
|
|
61
|
+
"data-disabled": dataAttr(disabled),
|
|
62
|
+
"data-focus": dataAttr(focused),
|
|
63
|
+
"data-invalid": dataAttr(invalid),
|
|
64
|
+
"data-scrubbing": dataAttr(scrubbing)
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
getLabelProps() {
|
|
68
|
+
return normalize.label({
|
|
69
|
+
...parts.label.attrs,
|
|
70
|
+
dir: prop("dir"),
|
|
71
|
+
"data-disabled": dataAttr(disabled),
|
|
72
|
+
"data-focus": dataAttr(focused),
|
|
73
|
+
"data-invalid": dataAttr(invalid),
|
|
74
|
+
"data-required": dataAttr(required),
|
|
75
|
+
"data-scrubbing": dataAttr(scrubbing),
|
|
76
|
+
id: getLabelId(scope),
|
|
77
|
+
htmlFor: getInputId(scope),
|
|
78
|
+
onClick() {
|
|
79
|
+
raf(() => {
|
|
80
|
+
setCaretToEnd(getInputEl(scope));
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
getControlProps() {
|
|
86
|
+
return normalize.element({
|
|
87
|
+
...parts.control.attrs,
|
|
88
|
+
dir: prop("dir"),
|
|
89
|
+
role: "group",
|
|
90
|
+
"aria-disabled": disabled,
|
|
91
|
+
"data-focus": dataAttr(focused),
|
|
92
|
+
"data-disabled": dataAttr(disabled),
|
|
93
|
+
"data-invalid": dataAttr(invalid),
|
|
94
|
+
"data-scrubbing": dataAttr(scrubbing),
|
|
95
|
+
"aria-invalid": ariaAttr(invalid)
|
|
96
|
+
});
|
|
97
|
+
},
|
|
98
|
+
getValueTextProps() {
|
|
99
|
+
return normalize.element({
|
|
100
|
+
...parts.valueText.attrs,
|
|
101
|
+
dir: prop("dir"),
|
|
102
|
+
"data-disabled": dataAttr(disabled),
|
|
103
|
+
"data-invalid": dataAttr(invalid),
|
|
104
|
+
"data-focus": dataAttr(focused),
|
|
105
|
+
"data-scrubbing": dataAttr(scrubbing)
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
getInputProps() {
|
|
109
|
+
return normalize.input({
|
|
110
|
+
...parts.input.attrs,
|
|
111
|
+
dir: prop("dir"),
|
|
112
|
+
name: prop("name"),
|
|
113
|
+
form: prop("form"),
|
|
114
|
+
id: getInputId(scope),
|
|
115
|
+
role: "spinbutton",
|
|
116
|
+
defaultValue: computed("formattedValue"),
|
|
117
|
+
pattern: prop("formatOptions") ? void 0 : prop("pattern"),
|
|
118
|
+
inputMode: prop("inputMode"),
|
|
119
|
+
"aria-invalid": ariaAttr(invalid),
|
|
120
|
+
"data-invalid": dataAttr(invalid),
|
|
121
|
+
disabled,
|
|
122
|
+
"data-disabled": dataAttr(disabled),
|
|
123
|
+
readOnly,
|
|
124
|
+
required: prop("required"),
|
|
125
|
+
autoComplete: "off",
|
|
126
|
+
autoCorrect: "off",
|
|
127
|
+
spellCheck: "false",
|
|
128
|
+
type: "text",
|
|
129
|
+
"aria-roledescription": "numberfield",
|
|
130
|
+
"aria-valuemin": prop("min"),
|
|
131
|
+
"aria-valuemax": prop("max"),
|
|
132
|
+
"aria-valuenow": Number.isNaN(computed("valueAsNumber")) ? void 0 : computed("valueAsNumber"),
|
|
133
|
+
"aria-valuetext": computed("valueText"),
|
|
134
|
+
"data-scrubbing": dataAttr(scrubbing),
|
|
135
|
+
onFocus() {
|
|
136
|
+
send({ type: "INPUT.FOCUS" });
|
|
137
|
+
},
|
|
138
|
+
onBlur() {
|
|
139
|
+
send({ type: "INPUT.BLUR" });
|
|
140
|
+
},
|
|
141
|
+
onInput(event) {
|
|
142
|
+
const selection = recordCursor(event.currentTarget, scope);
|
|
143
|
+
send({
|
|
144
|
+
type: "INPUT.CHANGE",
|
|
145
|
+
target: event.currentTarget,
|
|
146
|
+
hint: "set",
|
|
147
|
+
selection
|
|
148
|
+
});
|
|
149
|
+
},
|
|
150
|
+
onBeforeInput(event) {
|
|
151
|
+
try {
|
|
152
|
+
const { selectionStart, selectionEnd, value } = event.currentTarget;
|
|
153
|
+
const nextValue = value.slice(0, selectionStart) + (event.data ?? "") + value.slice(selectionEnd);
|
|
154
|
+
if (!computed("parser").isValidPartialNumber(nextValue)) event.preventDefault();
|
|
155
|
+
} catch {}
|
|
156
|
+
},
|
|
157
|
+
onKeyDown(event) {
|
|
158
|
+
if (event.defaultPrevented) return;
|
|
159
|
+
if (readOnly) return;
|
|
160
|
+
if (isComposingEvent(event)) return;
|
|
161
|
+
const step = getEventStepValue(event, {
|
|
162
|
+
step: prop("step"),
|
|
163
|
+
largeStep: prop("largeStep"),
|
|
164
|
+
smallStep: prop("smallStep")
|
|
165
|
+
});
|
|
166
|
+
(0, {
|
|
167
|
+
ArrowUp() {
|
|
168
|
+
send({
|
|
169
|
+
type: "INPUT.ARROW_UP",
|
|
170
|
+
step
|
|
171
|
+
});
|
|
172
|
+
event.preventDefault();
|
|
173
|
+
},
|
|
174
|
+
ArrowDown() {
|
|
175
|
+
send({
|
|
176
|
+
type: "INPUT.ARROW_DOWN",
|
|
177
|
+
step
|
|
178
|
+
});
|
|
179
|
+
event.preventDefault();
|
|
180
|
+
},
|
|
181
|
+
Home() {
|
|
182
|
+
if (isModifierKey(event)) return;
|
|
183
|
+
send({ type: "INPUT.HOME" });
|
|
184
|
+
event.preventDefault();
|
|
185
|
+
},
|
|
186
|
+
End() {
|
|
187
|
+
if (isModifierKey(event)) return;
|
|
188
|
+
send({ type: "INPUT.END" });
|
|
189
|
+
event.preventDefault();
|
|
190
|
+
},
|
|
191
|
+
Enter(event) {
|
|
192
|
+
const selection = recordCursor(event.currentTarget, scope);
|
|
193
|
+
send({
|
|
194
|
+
type: "INPUT.ENTER",
|
|
195
|
+
selection
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}[event.key])?.(event);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
},
|
|
202
|
+
getDecrementTriggerProps() {
|
|
203
|
+
return normalize.button({
|
|
204
|
+
...parts.decrementTrigger.attrs,
|
|
205
|
+
dir: prop("dir"),
|
|
206
|
+
id: getDecrementTriggerId(scope),
|
|
207
|
+
disabled: isDecrementDisabled,
|
|
208
|
+
"data-disabled": dataAttr(isDecrementDisabled),
|
|
209
|
+
"aria-label": translations.decrementLabel,
|
|
210
|
+
type: "button",
|
|
211
|
+
tabIndex: -1,
|
|
212
|
+
"aria-controls": getInputId(scope),
|
|
213
|
+
"data-scrubbing": dataAttr(scrubbing),
|
|
214
|
+
onPointerDown(event) {
|
|
215
|
+
if (isDecrementDisabled) return;
|
|
216
|
+
if (!isLeftClick(event)) return;
|
|
217
|
+
send({
|
|
218
|
+
type: "TRIGGER.PRESS_DOWN",
|
|
219
|
+
hint: "decrement",
|
|
220
|
+
pointerType: event.pointerType
|
|
221
|
+
});
|
|
222
|
+
if (event.pointerType === "mouse") event.preventDefault();
|
|
223
|
+
if (event.pointerType === "touch") event.currentTarget?.focus({ preventScroll: true });
|
|
224
|
+
},
|
|
225
|
+
onPointerUp(event) {
|
|
226
|
+
send({
|
|
227
|
+
type: "TRIGGER.PRESS_UP",
|
|
228
|
+
hint: "decrement",
|
|
229
|
+
pointerType: event.pointerType
|
|
230
|
+
});
|
|
231
|
+
},
|
|
232
|
+
onPointerLeave() {
|
|
233
|
+
if (isDecrementDisabled) return;
|
|
234
|
+
send({
|
|
235
|
+
type: "TRIGGER.PRESS_UP",
|
|
236
|
+
hint: "decrement"
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
},
|
|
241
|
+
getIncrementTriggerProps() {
|
|
242
|
+
return normalize.button({
|
|
243
|
+
...parts.incrementTrigger.attrs,
|
|
244
|
+
dir: prop("dir"),
|
|
245
|
+
id: getIncrementTriggerId(scope),
|
|
246
|
+
disabled: isIncrementDisabled,
|
|
247
|
+
"data-disabled": dataAttr(isIncrementDisabled),
|
|
248
|
+
"aria-label": translations.incrementLabel,
|
|
249
|
+
type: "button",
|
|
250
|
+
tabIndex: -1,
|
|
251
|
+
"aria-controls": getInputId(scope),
|
|
252
|
+
"data-scrubbing": dataAttr(scrubbing),
|
|
253
|
+
onPointerDown(event) {
|
|
254
|
+
if (isIncrementDisabled || !isLeftClick(event)) return;
|
|
255
|
+
send({
|
|
256
|
+
type: "TRIGGER.PRESS_DOWN",
|
|
257
|
+
hint: "increment",
|
|
258
|
+
pointerType: event.pointerType
|
|
259
|
+
});
|
|
260
|
+
if (event.pointerType === "mouse") event.preventDefault();
|
|
261
|
+
if (event.pointerType === "touch") event.currentTarget?.focus({ preventScroll: true });
|
|
262
|
+
},
|
|
263
|
+
onPointerUp(event) {
|
|
264
|
+
send({
|
|
265
|
+
type: "TRIGGER.PRESS_UP",
|
|
266
|
+
hint: "increment",
|
|
267
|
+
pointerType: event.pointerType
|
|
268
|
+
});
|
|
269
|
+
},
|
|
270
|
+
onPointerLeave(event) {
|
|
271
|
+
send({
|
|
272
|
+
type: "TRIGGER.PRESS_UP",
|
|
273
|
+
hint: "increment",
|
|
274
|
+
pointerType: event.pointerType
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
},
|
|
279
|
+
getScrubberProps() {
|
|
280
|
+
return normalize.element({
|
|
281
|
+
...parts.scrubber.attrs,
|
|
282
|
+
dir: prop("dir"),
|
|
283
|
+
"data-disabled": dataAttr(disabled),
|
|
284
|
+
id: getScrubberId(scope),
|
|
285
|
+
role: "presentation",
|
|
286
|
+
"data-scrubbing": dataAttr(scrubbing),
|
|
287
|
+
onMouseDown(event) {
|
|
288
|
+
if (disabled) return;
|
|
289
|
+
if (!isLeftClick(event)) return;
|
|
290
|
+
const point = getEventPoint(event);
|
|
291
|
+
const dpr = getWindow(event.currentTarget).devicePixelRatio;
|
|
292
|
+
point.x = point.x - roundToDpr(7.5, dpr);
|
|
293
|
+
point.y = point.y - roundToDpr(7.5, dpr);
|
|
294
|
+
send({
|
|
295
|
+
type: "SCRUBBER.PRESS_DOWN",
|
|
296
|
+
point
|
|
297
|
+
});
|
|
298
|
+
event.preventDefault();
|
|
299
|
+
raf(() => {
|
|
300
|
+
setCaretToEnd(getInputEl(scope));
|
|
301
|
+
});
|
|
302
|
+
},
|
|
303
|
+
style: { cursor: disabled ? void 0 : "ew-resize" }
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
};
|
|
286
307
|
}
|
|
287
|
-
export {
|
|
288
|
-
connect
|
|
289
|
-
};
|
|
308
|
+
export { connect };
|