@plastic-js/tsumiki 0.1.87 → 0.1.89
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.
|
@@ -53,7 +53,6 @@ var sheetClass = css({
|
|
|
53
53
|
},
|
|
54
54
|
"&[data-dragging]": {
|
|
55
55
|
transition: "none",
|
|
56
|
-
animation: "none",
|
|
57
56
|
willChange: "transform"
|
|
58
57
|
},
|
|
59
58
|
"&::after": {
|
|
@@ -188,7 +187,12 @@ var BottomSheet = (props) => {
|
|
|
188
187
|
velocity = 0;
|
|
189
188
|
currentDy = 0;
|
|
190
189
|
dragActive = true;
|
|
191
|
-
if (sheetEl)
|
|
190
|
+
if (sheetEl) {
|
|
191
|
+
sheetEl.getAnimations().forEach((a) => {
|
|
192
|
+
a.cancel();
|
|
193
|
+
});
|
|
194
|
+
sheetEl.dataset.dragging = "";
|
|
195
|
+
}
|
|
192
196
|
};
|
|
193
197
|
const onGrabberPointerMove = (e) => {
|
|
194
198
|
if (!dragActive) return;
|
package/dist/components/Input.js
CHANGED
|
@@ -188,10 +188,18 @@ var Input = (props = {}) => {
|
|
|
188
188
|
if (!isPassword) return read(local.type);
|
|
189
189
|
return showPassword() ? "text" : "password";
|
|
190
190
|
};
|
|
191
|
+
const isAffixInteractive = (target) => {
|
|
192
|
+
return !!(target && target.closest && target.closest("button, a, input, select, textarea, label, [contenteditable]"));
|
|
193
|
+
};
|
|
194
|
+
const handleAffixMouseDown = (e) => {
|
|
195
|
+
if (effectiveDisabled()) return;
|
|
196
|
+
if (isAffixInteractive(e.target)) return;
|
|
197
|
+
e.preventDefault();
|
|
198
|
+
inputEl?.focus();
|
|
199
|
+
};
|
|
191
200
|
const handleAffixPointerUp = (e) => {
|
|
192
201
|
if (effectiveDisabled()) return;
|
|
193
|
-
|
|
194
|
-
if (target && target.closest && target.closest("button, a, input, select, textarea, label, [contenteditable]")) return;
|
|
202
|
+
if (isAffixInteractive(e.target)) return;
|
|
195
203
|
inputEl?.focus();
|
|
196
204
|
};
|
|
197
205
|
const renderAffix = (content) => {
|
|
@@ -200,6 +208,7 @@ var Input = (props = {}) => {
|
|
|
200
208
|
const _el0 = _tmpl.cloneNode(true);
|
|
201
209
|
insert(_el0, () => content);
|
|
202
210
|
setProp(_el0, "className", () => affixClass);
|
|
211
|
+
setProp(_el0, "onMouseDown", () => handleAffixMouseDown);
|
|
203
212
|
setProp(_el0, "onPointerUp", () => handleAffixPointerUp);
|
|
204
213
|
return _el0;
|
|
205
214
|
};
|