@oscarpalmer/oui 0.20.0 → 0.21.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/js/focus-trap/embedded.mjs +1 -1
- package/dist/js/focus-trap/standalone.mjs +1 -1
- package/dist/js/index.d.mts +2 -2
- package/dist/js/index.mjs +4 -2
- package/dist/js/{attributable.d.mts → internal/attributable.d.mts} +1 -1
- package/dist/js/{attributable.mjs → internal/attributable.mjs} +1 -1
- package/dist/js/internal/draggable.d.mts +2 -0
- package/dist/js/internal/draggable.mjs +212 -0
- package/dist/js/{floatable.d.mts → internal/floatable.d.mts} +1 -1
- package/dist/js/{floatable.mjs → internal/floatable.mjs} +1 -1
- package/dist/js/movable-BEo2LbUI.d.mts +101 -0
- package/dist/js/movable.d.mts +2 -0
- package/dist/js/movable.mjs +152 -0
- package/dist/js/popover.mjs +1 -1
- package/dist/js/sortable.d.mts +2 -0
- package/dist/js/sortable.mjs +243 -0
- package/dist/js/splitter.mjs +4 -4
- package/dist/js/tooltip.d.mts +2 -2
- package/dist/js/tooltip.mjs +4 -4
- package/package.json +19 -17
- package/src/js/focus-trap/standalone.ts +1 -1
- package/src/js/index.ts +3 -1
- package/src/js/internal/draggable.ts +515 -0
- package/src/js/{floatable.ts → internal/floatable.ts} +5 -5
- package/src/js/movable.ts +260 -0
- package/src/js/popover.ts +1 -1
- package/src/js/sortable.ts +467 -0
- package/src/js/splitter.ts +1 -4
- package/src/js/tooltip.ts +6 -4
- /package/src/js/{attributable.ts → internal/attributable.ts} +0 -0
package/src/js/splitter.ts
CHANGED
|
@@ -383,10 +383,7 @@ function onObservation(entries: ResizeObserverEntry[]): void {
|
|
|
383
383
|
}
|
|
384
384
|
|
|
385
385
|
function onPointerdown(event: Event): void {
|
|
386
|
-
if (
|
|
387
|
-
(event.type === 'mousedown' && supportsTouch.value) ||
|
|
388
|
-
(event.type === 'touchstart' && !supportsTouch.value)
|
|
389
|
-
) {
|
|
386
|
+
if (supportsTouch.value ? event.type === 'mousedown' : event.type === 'touchstart') {
|
|
390
387
|
return;
|
|
391
388
|
}
|
|
392
389
|
|
package/src/js/tooltip.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {isNullableOrWhitespace} from '@oscarpalmer/atoms/is';
|
|
2
2
|
import {on} from '@oscarpalmer/toretto/event';
|
|
3
3
|
import {findAncestor} from '@oscarpalmer/toretto/find';
|
|
4
|
-
import {attributable} from './attributable';
|
|
5
|
-
import {Floatable} from './floatable';
|
|
4
|
+
import {attributable} from './internal/attributable';
|
|
5
|
+
import {Floatable} from './internal/floatable';
|
|
6
6
|
|
|
7
7
|
type Attributes = {
|
|
8
8
|
ariaDescribedby: string | null;
|
|
@@ -84,6 +84,7 @@ function closeTooltips(next: Tooltip | undefined): void {
|
|
|
84
84
|
requestAnimationFrame(() => {
|
|
85
85
|
active.timer = setTimeout(() => {
|
|
86
86
|
TOOLTIPS_ACTIVE.delete(active);
|
|
87
|
+
|
|
87
88
|
active.floatable?.toggle(false);
|
|
88
89
|
}, delay) as never;
|
|
89
90
|
});
|
|
@@ -243,6 +244,7 @@ function onToggle(event: Event, activate: boolean): void {
|
|
|
243
244
|
|
|
244
245
|
tooltip.timer ??= setTimeout(() => {
|
|
245
246
|
TOOLTIPS_ACTIVE.delete(tooltip);
|
|
247
|
+
|
|
246
248
|
tooltip.floatable.toggle(false);
|
|
247
249
|
}, delay) as never;
|
|
248
250
|
});
|
|
@@ -262,7 +264,7 @@ function reset(anchor: HTMLElement, attributes: Attributes): void {
|
|
|
262
264
|
}
|
|
263
265
|
}
|
|
264
266
|
|
|
265
|
-
function
|
|
267
|
+
function setTooltipDelay(value: number): void {
|
|
266
268
|
delay = typeof value === 'number' && value >= 0 ? value : delay;
|
|
267
269
|
}
|
|
268
270
|
|
|
@@ -304,4 +306,4 @@ on(document, 'touchstart', onActivate);
|
|
|
304
306
|
|
|
305
307
|
//
|
|
306
308
|
|
|
307
|
-
export {
|
|
309
|
+
export {setTooltipDelay};
|
|
File without changes
|