@oscarpalmer/oui 0.20.0 → 0.22.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/css/popover.css +9 -9
- package/dist/css/tooltip.css +20 -20
- package/dist/js/focus-trap/embedded.mjs +1 -1
- package/dist/js/focus-trap/standalone.mjs +1 -1
- package/dist/js/index.d.mts +47 -4
- package/dist/js/index.mjs +2537 -5
- 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 +215 -0
- package/dist/js/{floatable.d.mts → internal/floatable.d.mts} +3 -3
- package/dist/js/internal/floatable.mjs +187 -0
- package/dist/js/movable-BKFgoaOl.d.mts +101 -0
- package/dist/js/movable.d.mts +2 -0
- package/dist/js/movable.mjs +152 -0
- package/dist/js/popover.mjs +2 -2
- 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 +98 -100
- package/package.json +28 -18
- package/src/css/mixins.scss +8 -12
- package/src/css/popover.scss +1 -1
- package/src/css/tooltip.scss +22 -22
- 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/internal/floatable.ts +373 -0
- package/src/js/movable.ts +260 -0
- package/src/js/popover.ts +2 -2
- package/src/js/sortable.ts +467 -0
- package/src/js/splitter.ts +1 -4
- package/src/js/tooltip.ts +132 -132
- package/dist/js/floatable.mjs +0 -284
- package/src/js/floatable.ts +0 -590
- /package/src/js/{attributable.ts → internal/attributable.ts} +0 -0
package/dist/css/popover.css
CHANGED
|
@@ -6,23 +6,23 @@
|
|
|
6
6
|
margin: var(--margin-top, 0) 0 0 var(--margin-left, 0);
|
|
7
7
|
pointer-events: all !important;
|
|
8
8
|
}
|
|
9
|
-
:where([oui-popover-content])[
|
|
10
|
-
|
|
9
|
+
:where([oui-popover-content])[oui-position^=above] {
|
|
10
|
+
margin: 0 0 0.5em;
|
|
11
11
|
}
|
|
12
|
-
:where([oui-popover-content])[
|
|
13
|
-
|
|
12
|
+
:where([oui-popover-content])[oui-position^=below] {
|
|
13
|
+
margin: 0.5em 0 0;
|
|
14
14
|
}
|
|
15
|
-
:where([oui-popover-content])[
|
|
16
|
-
|
|
15
|
+
:where([oui-popover-content])[oui-position^=end] {
|
|
16
|
+
margin: 0 0 0 0.5em;
|
|
17
17
|
}
|
|
18
|
-
:where([oui-popover-content])[
|
|
19
|
-
|
|
18
|
+
:where([oui-popover-content])[oui-position^=start] {
|
|
19
|
+
margin: 0 0.5em 0 0;
|
|
20
20
|
}
|
|
21
21
|
:where([oui-popover-content]) {
|
|
22
22
|
padding: 1rem;
|
|
23
23
|
overscroll-behavior: contain;
|
|
24
24
|
background-color: var(--oui-absolute);
|
|
25
|
-
border-radius: 0.
|
|
25
|
+
border-radius: 0.25rem;
|
|
26
26
|
}
|
|
27
27
|
:where([oui-popover-content]):focus {
|
|
28
28
|
outline: none;
|
package/dist/css/tooltip.css
CHANGED
|
@@ -32,17 +32,17 @@ var)) {
|
|
|
32
32
|
margin: var(--margin-top, 0) 0 0 var(--margin-left, 0);
|
|
33
33
|
pointer-events: all !important;
|
|
34
34
|
}
|
|
35
|
-
:where([oui-tooltip-content])[
|
|
36
|
-
|
|
35
|
+
:where([oui-tooltip-content])[oui-position^=above] {
|
|
36
|
+
margin: 0 0 0.5em;
|
|
37
37
|
}
|
|
38
|
-
:where([oui-tooltip-content])[
|
|
39
|
-
|
|
38
|
+
:where([oui-tooltip-content])[oui-position^=below] {
|
|
39
|
+
margin: 0.5em 0 0;
|
|
40
40
|
}
|
|
41
|
-
:where([oui-tooltip-content])[
|
|
42
|
-
|
|
41
|
+
:where([oui-tooltip-content])[oui-position^=end] {
|
|
42
|
+
margin: 0 0 0 0.5em;
|
|
43
43
|
}
|
|
44
|
-
:where([oui-tooltip-content])[
|
|
45
|
-
|
|
44
|
+
:where([oui-tooltip-content])[oui-position^=start] {
|
|
45
|
+
margin: 0 0.5em 0 0;
|
|
46
46
|
}
|
|
47
47
|
:where([oui-tooltip-content]) {
|
|
48
48
|
max-width: 48ch;
|
|
@@ -51,38 +51,38 @@ var)) {
|
|
|
51
51
|
background-color: var(--oui-absolute);
|
|
52
52
|
border-radius: 0.25rem;
|
|
53
53
|
font-size: 0.875rem;
|
|
54
|
+
pointer-events: none;
|
|
54
55
|
transition: opacity 0.125s ease-in-out;
|
|
55
|
-
transition-delay: 0s;
|
|
56
56
|
}
|
|
57
57
|
:where([oui-tooltip-content])::after {
|
|
58
58
|
content: "";
|
|
59
59
|
opacity: 0;
|
|
60
60
|
position: absolute;
|
|
61
61
|
}
|
|
62
|
-
:where([oui-tooltip-content])[position^=above]::after, :where([oui-tooltip-content])[position^=below]::after, :where([oui-tooltip-content])[position^=bottom]::after, :where([oui-tooltip-content])[position^=top]::after {
|
|
62
|
+
:where([oui-tooltip-content])[oui-position^=above]::after, :where([oui-tooltip-content])[oui-position^=below]::after, :where([oui-tooltip-content])[oui-position^=bottom]::after, :where([oui-tooltip-content])[oui-position^=top]::after {
|
|
63
63
|
width: 100%;
|
|
64
|
-
height: 0.
|
|
64
|
+
height: 0.5em;
|
|
65
65
|
}
|
|
66
|
-
:where([oui-tooltip-content])[position^=above]::after, :where([oui-tooltip-content])[position^=top]::after {
|
|
66
|
+
:where([oui-tooltip-content])[oui-position^=above]::after, :where([oui-tooltip-content])[oui-position^=top]::after {
|
|
67
67
|
inset: 100% 0 0;
|
|
68
68
|
}
|
|
69
|
-
:where([oui-tooltip-content])[position^=below]::after, :where([oui-tooltip-content])[position^=bottom]::after {
|
|
70
|
-
inset: -
|
|
69
|
+
:where([oui-tooltip-content])[oui-position^=below]::after, :where([oui-tooltip-content])[oui-position^=bottom]::after {
|
|
70
|
+
inset: -0.5em 0 0;
|
|
71
71
|
}
|
|
72
|
-
:where([oui-tooltip-content])[position^=end]::after, :where([oui-tooltip-content])[position^=left]::after, :where([oui-tooltip-content])[position^=right]::after, :where([oui-tooltip-content])[position^=start]::after {
|
|
73
|
-
width: 0.
|
|
72
|
+
:where([oui-tooltip-content])[oui-position^=end]::after, :where([oui-tooltip-content])[oui-position^=left]::after, :where([oui-tooltip-content])[oui-position^=right]::after, :where([oui-tooltip-content])[oui-position^=start]::after {
|
|
73
|
+
width: 0.5em;
|
|
74
74
|
height: 100%;
|
|
75
75
|
}
|
|
76
|
-
:where([oui-tooltip-content])[position^=end]::after, :where([oui-tooltip-content])[position^=right]::after {
|
|
77
|
-
inset: 0 0 0 -0.
|
|
76
|
+
:where([oui-tooltip-content])[oui-position^=end]::after, :where([oui-tooltip-content])[oui-position^=right]::after {
|
|
77
|
+
inset: 0 0 0 -0.5em;
|
|
78
78
|
}
|
|
79
|
-
:where([oui-tooltip-content])[position^=left]::after, :where([oui-tooltip-content])[position^=start]::after {
|
|
79
|
+
:where([oui-tooltip-content])[oui-position^=left]::after, :where([oui-tooltip-content])[oui-position^=start]::after {
|
|
80
80
|
inset: 0 0 0 100%;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
:where([oui-tooltip-content][oui-tooltip-content-active]) {
|
|
84
84
|
opacity: 1;
|
|
85
|
-
|
|
85
|
+
pointer-events: auto;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { clamp } from "@oscarpalmer/atoms/number";
|
|
1
2
|
import { on } from "@oscarpalmer/toretto/event";
|
|
2
3
|
import { findAncestor } from "@oscarpalmer/toretto/find";
|
|
3
|
-
import { clamp } from "@oscarpalmer/atoms/number";
|
|
4
4
|
import { getFocusable } from "@oscarpalmer/toretto/focusable";
|
|
5
5
|
//#region src/js/focus-trap/embedded.ts
|
|
6
6
|
var FocusTrap = class {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { attributable } from "../attributable.mjs";
|
|
1
|
+
import { attributable } from "../internal/attributable.mjs";
|
|
2
2
|
import { FOCUSTRAPS_ALL, FOCUS_TRAP_SELECTOR, createFocusTrap } from "./embedded.mjs";
|
|
3
3
|
//#region src/js/focus-trap/standalone.ts
|
|
4
4
|
function removeFocusTraps(element) {
|
package/dist/js/index.d.mts
CHANGED
|
@@ -1,4 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
//#region src/js/popover.d.ts
|
|
2
|
+
declare global {
|
|
3
|
+
interface HTMLElementTagNameMap {
|
|
4
|
+
'oui-popover': OuiPopoverElement;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
declare class OuiPopoverElement extends HTMLElement {
|
|
8
|
+
#private;
|
|
9
|
+
constructor();
|
|
10
|
+
close(): void;
|
|
11
|
+
connectedCallback(): void;
|
|
12
|
+
disconnectedCallback(): void;
|
|
13
|
+
hidePopover(): void;
|
|
14
|
+
open(): void;
|
|
15
|
+
showPopover(): void;
|
|
16
|
+
toggle(): void;
|
|
17
|
+
togglePopover(options?: boolean): boolean;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/js/splitter.d.ts
|
|
21
|
+
declare global {
|
|
22
|
+
interface HTMLElementTagNameMap {
|
|
23
|
+
[SELECTOR]: OuiSplitterElement;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
declare class OuiSplitterElement extends HTMLElement {
|
|
27
|
+
#private;
|
|
28
|
+
static readonly observedAttributes: string[];
|
|
29
|
+
get max(): number;
|
|
30
|
+
set max(value: number);
|
|
31
|
+
get min(): number;
|
|
32
|
+
set min(value: number);
|
|
33
|
+
get size(): number;
|
|
34
|
+
set size(value: number);
|
|
35
|
+
get type(): string;
|
|
36
|
+
set type(value: string);
|
|
37
|
+
constructor();
|
|
38
|
+
connectedCallback(): void;
|
|
39
|
+
disconnectedCallback(): void;
|
|
40
|
+
attributeChangedCallback(name: string): void;
|
|
41
|
+
}
|
|
42
|
+
declare const SELECTOR = "oui-splitter";
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/js/tooltip.d.ts
|
|
45
|
+
declare function setTooltipDelay(open?: number, close?: number): void;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { OuiPopoverElement, OuiSplitterElement, setTooltipDelay };
|