@jolly-pixel/ui 1.0.1 → 2.0.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/LICENSE +44 -44
- package/NOTICE +9 -0
- package/README.md +194 -194
- package/dist/containers/Dialog.js +11 -11
- package/dist/containers/Dialog.styles.js +48 -48
- package/dist/containers/Dock.js +11 -11
- package/dist/containers/Dock.styles.js +351 -351
- package/dist/containers/DockLayout.js +4 -4
- package/dist/containers/Floating.js +23 -23
- package/dist/containers/Floating.styles.js +116 -116
- package/dist/containers/Folder.js +28 -28
- package/dist/containers/Folder.styles.js +221 -221
- package/dist/containers/Pane.js +50 -50
- package/dist/containers/Pane.styles.js +186 -186
- package/dist/containers/Rail.js +18 -18
- package/dist/containers/Tab.js +10 -10
- package/dist/containers/Tabs.js +26 -26
- package/dist/containers/Tabs.styles.js +93 -93
- package/dist/containers/Toolbar.js +25 -25
- package/dist/containers/resize.js +5 -5
- package/dist/controls/Button.js +9 -9
- package/dist/controls/Button.styles.js +79 -79
- package/dist/controls/ButtonGroup.js +28 -28
- package/dist/controls/ButtonGroup.styles.js +98 -98
- package/dist/controls/Checkbox.js +14 -14
- package/dist/controls/Checkbox.styles.js +111 -111
- package/dist/controls/Color.js +51 -51
- package/dist/controls/Color.styles.js +83 -83
- package/dist/controls/ColorPicker.js +104 -104
- package/dist/controls/ColorPicker.styles.js +296 -296
- package/dist/controls/Control.js +33 -33
- package/dist/controls/Control.styles.js +102 -102
- package/dist/controls/Controls.js +11 -11
- package/dist/controls/Controls.styles.js +98 -98
- package/dist/controls/Flags.js +18 -18
- package/dist/controls/Flags.styles.js +59 -59
- package/dist/controls/Number.js +21 -21
- package/dist/controls/Number.styles.js +44 -44
- package/dist/controls/PropertyRow.js +13 -13
- package/dist/controls/PropertyRow.styles.js +105 -105
- package/dist/controls/Range.js +24 -24
- package/dist/controls/Range.styles.js +25 -25
- package/dist/controls/Select.js +23 -23
- package/dist/controls/Select.styles.js +47 -47
- package/dist/controls/Separator.js +11 -11
- package/dist/controls/Separator.styles.js +45 -45
- package/dist/controls/Slider.js +36 -36
- package/dist/controls/Slider.styles.js +161 -161
- package/dist/controls/Text.js +17 -17
- package/dist/data/Tree.d.ts +0 -14
- package/dist/data/Tree.d.ts.map +1 -1
- package/dist/data/Tree.js +90 -120
- package/dist/data/Tree.js.map +1 -1
- package/dist/data/Tree.styles.d.ts.map +1 -1
- package/dist/data/Tree.styles.js +220 -237
- package/dist/data/Tree.styles.js.map +1 -1
- package/dist/data/dropZone.d.ts +0 -10
- package/dist/data/dropZone.d.ts.map +1 -1
- package/dist/data/dropZone.js +0 -10
- package/dist/data/dropZone.js.map +1 -1
- package/dist/data/resolveRename.d.ts +0 -3
- package/dist/data/resolveRename.d.ts.map +1 -1
- package/dist/data/resolveRename.js +0 -3
- package/dist/data/resolveRename.js.map +1 -1
- package/dist/data/resolveReparent.d.ts +0 -7
- package/dist/data/resolveReparent.d.ts.map +1 -1
- package/dist/data/resolveReparent.js +0 -6
- package/dist/data/resolveReparent.js.map +1 -1
- package/dist/data/rowDragSession.d.ts +0 -8
- package/dist/data/rowDragSession.d.ts.map +1 -1
- package/dist/data/rowDragSession.js +0 -6
- package/dist/data/rowDragSession.js.map +1 -1
- package/dist/data/treeNodes.d.ts +0 -6
- package/dist/data/treeNodes.d.ts.map +1 -1
- package/dist/data/treeNodes.js +2 -7
- package/dist/data/treeNodes.js.map +1 -1
- package/dist/feedback/JollyPixelLogo.js +84 -84
- package/dist/feedback/Loading.js +29 -29
- package/dist/feedback/Loading.styles.js +230 -230
- package/dist/feedback/Log.js +8 -8
- package/dist/feedback/Log.styles.js +61 -61
- package/dist/feedback/Progress.js +17 -17
- package/dist/feedback/Progress.styles.js +146 -146
- package/dist/field/JollyField.js +51 -51
- package/dist/field/JollyField.styles.js +429 -429
- package/dist/icon/Icon.js +24 -24
- package/dist/icon/builtins.js +126 -126
- package/dist/interaction/drag/DragSession.js +6 -6
- package/dist/interaction/scrub/ScrubController.js +6 -6
- package/dist/math/AxisController.js +22 -22
- package/dist/math/Point2d.js +12 -12
- package/dist/math/Point2d.styles.js +49 -49
- package/dist/math/Quaternion.js +4 -4
- package/dist/math/Transform.js +40 -40
- package/dist/math/Transform.styles.js +17 -17
- package/dist/math/VectorField.js +4 -4
- package/dist/math/VectorField.styles.js +102 -102
- package/dist/monitors/Graph.js +8 -8
- package/dist/monitors/Graph.styles.js +42 -42
- package/dist/monitors/Monitor.js +5 -5
- package/dist/monitors/Monitor.styles.js +31 -31
- package/dist/peer/Presence.js +33 -33
- package/dist/peer/Presence.styles.js +82 -82
- package/dist/stats/Stats.js +6 -6
- package/dist/stats/Stats.styles.js +54 -54
- package/dist/theme/components/DensityControl.js +16 -16
- package/dist/theme/components/ThemeControl.js +16 -16
- package/dist/theme/components/ThemePreferences.js +18 -18
- package/dist/theme/font.js +9 -9
- package/dist/theme/styles/hiddenStyles.js +4 -4
- package/dist/theme/styles/mixins.js +16 -16
- package/dist/theme/styles/themeStyles.js +4 -4
- package/dist/theme/tokens/density.js +19 -19
- package/dist/theme/tokens/ramps.js +40 -40
- package/dist/theme/tokens/scales.js +56 -56
- package/dist/theme/tokens/semantic.js +184 -184
- package/package.json +6 -5
|
@@ -31,10 +31,10 @@ const kGrabInset = 24;
|
|
|
31
31
|
* single persisted snapshot of that, and any drag that crosses a container.
|
|
32
32
|
*/
|
|
33
33
|
let DockLayout = class DockLayout extends LitElement {
|
|
34
|
-
static styles = css `
|
|
35
|
-
:host {
|
|
36
|
-
display: contents;
|
|
37
|
-
}
|
|
34
|
+
static styles = css `
|
|
35
|
+
:host {
|
|
36
|
+
display: contents;
|
|
37
|
+
}
|
|
38
38
|
`;
|
|
39
39
|
#declared = null;
|
|
40
40
|
#snapshot = emptyLayout();
|
|
@@ -76,29 +76,29 @@ let Floating = class Floating extends LitElement {
|
|
|
76
76
|
this.#managed = this.closest("jolly-dock-layout") !== null;
|
|
77
77
|
}
|
|
78
78
|
render() {
|
|
79
|
-
return html `
|
|
80
|
-
<div
|
|
81
|
-
class="content"
|
|
82
|
-
@jolly-pane-drag=${this.#onPaneDrag}
|
|
83
|
-
@jolly-toggle=${this.#onPaneToggle}
|
|
84
|
-
>
|
|
85
|
-
<slot @slotchange=${this.#onSlotChange}></slot>
|
|
86
|
-
</div>
|
|
87
|
-
<div
|
|
88
|
-
class="resize-handle right"
|
|
89
|
-
part="resize-handle-right"
|
|
90
|
-
aria-label="Resize floating pane width"
|
|
91
|
-
></div>
|
|
92
|
-
<div
|
|
93
|
-
class="resize-handle bottom"
|
|
94
|
-
part="resize-handle-bottom"
|
|
95
|
-
aria-label="Resize floating pane height"
|
|
96
|
-
></div>
|
|
97
|
-
<div
|
|
98
|
-
class="resize-handle corner bottom-right"
|
|
99
|
-
part="resize-handle-corner"
|
|
100
|
-
aria-hidden="true"
|
|
101
|
-
></div>
|
|
79
|
+
return html `
|
|
80
|
+
<div
|
|
81
|
+
class="content"
|
|
82
|
+
@jolly-pane-drag=${this.#onPaneDrag}
|
|
83
|
+
@jolly-toggle=${this.#onPaneToggle}
|
|
84
|
+
>
|
|
85
|
+
<slot @slotchange=${this.#onSlotChange}></slot>
|
|
86
|
+
</div>
|
|
87
|
+
<div
|
|
88
|
+
class="resize-handle right"
|
|
89
|
+
part="resize-handle-right"
|
|
90
|
+
aria-label="Resize floating pane width"
|
|
91
|
+
></div>
|
|
92
|
+
<div
|
|
93
|
+
class="resize-handle bottom"
|
|
94
|
+
part="resize-handle-bottom"
|
|
95
|
+
aria-label="Resize floating pane height"
|
|
96
|
+
></div>
|
|
97
|
+
<div
|
|
98
|
+
class="resize-handle corner bottom-right"
|
|
99
|
+
part="resize-handle-corner"
|
|
100
|
+
aria-hidden="true"
|
|
101
|
+
></div>
|
|
102
102
|
`;
|
|
103
103
|
}
|
|
104
104
|
willUpdate() {
|
|
@@ -3,121 +3,121 @@ import { css } from "lit";
|
|
|
3
3
|
// Import Internal Dependencies
|
|
4
4
|
import { kFallback } from "../theme/styles/fallbacks.js";
|
|
5
5
|
import { focusRing } from "../theme/styles/mixins.js";
|
|
6
|
-
export const floatingStyles = css `
|
|
7
|
-
/*
|
|
8
|
-
* A floating window is a plane and genuinely detached, so it owns both the
|
|
9
|
-
* raised surface and the shadow. The pane it holds paints nothing.
|
|
10
|
-
*/
|
|
11
|
-
:host {
|
|
12
|
-
position: fixed;
|
|
13
|
-
display: block;
|
|
14
|
-
box-sizing: border-box;
|
|
15
|
-
width: 320px;
|
|
16
|
-
height: 360px;
|
|
17
|
-
min-width: 0;
|
|
18
|
-
min-height: 0;
|
|
19
|
-
border-radius: var(--jolly-radius-md, 6px);
|
|
20
|
-
background: var(--jolly-surface-raised, ${kFallback.controlBg});
|
|
21
|
-
box-shadow: var(--jolly-shadow-floating, 0 4px 16px rgb(0 0 0 / 0.3));
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/*
|
|
25
|
-
* A dragged window ghosts as a whole, surface and shadow included, so the
|
|
26
|
-
* dock it is aiming at stays readable underneath it. The pane inside does
|
|
27
|
-
* not dim on its own here: the window is the source being moved.
|
|
28
|
-
*/
|
|
29
|
-
:host([dragging]) {
|
|
30
|
-
opacity: 0.4;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.content {
|
|
34
|
-
width: 100%;
|
|
35
|
-
height: 100%;
|
|
36
|
-
overflow: hidden;
|
|
37
|
-
border-radius: var(--jolly-radius-md, 6px);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
::slotted(jolly-pane) {
|
|
41
|
-
width: 100%;
|
|
42
|
-
height: 100%;
|
|
43
|
-
background: transparent;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.resize-handle {
|
|
47
|
-
position: absolute;
|
|
48
|
-
z-index: 1;
|
|
49
|
-
border: 0;
|
|
50
|
-
background: transparent;
|
|
51
|
-
touch-action: none;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.resize-handle::after {
|
|
55
|
-
position: absolute;
|
|
56
|
-
background: var(--jolly-groove);
|
|
57
|
-
content: "";
|
|
58
|
-
opacity: 0;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.resize-handle:hover::after,
|
|
62
|
-
.resize-handle:focus-visible::after {
|
|
63
|
-
opacity: 1;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/*
|
|
67
|
-
* Inset by the host's own border-radius so the strip (and its hover line)
|
|
68
|
-
* stops before the rounded corner instead of running past the visible
|
|
69
|
-
* surface into the void the radius cuts away. The corner handle below
|
|
70
|
-
* fills the gap this leaves.
|
|
71
|
-
*/
|
|
72
|
-
.resize-handle.right {
|
|
73
|
-
top: var(--jolly-radius-md, 6px);
|
|
74
|
-
right: -4px;
|
|
75
|
-
bottom: var(--jolly-radius-md, 6px);
|
|
76
|
-
width: 8px;
|
|
77
|
-
cursor: ew-resize;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.resize-handle.right::after {
|
|
81
|
-
top: 0;
|
|
82
|
-
bottom: 0;
|
|
83
|
-
left: 3px;
|
|
84
|
-
width: 2px;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.resize-handle.bottom {
|
|
88
|
-
right: var(--jolly-radius-md, 6px);
|
|
89
|
-
bottom: -4px;
|
|
90
|
-
left: var(--jolly-radius-md, 6px);
|
|
91
|
-
height: 8px;
|
|
92
|
-
cursor: ns-resize;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.resize-handle.bottom::after {
|
|
96
|
-
top: 3px;
|
|
97
|
-
right: 0;
|
|
98
|
-
left: 0;
|
|
99
|
-
height: 2px;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.resize-handle.corner {
|
|
103
|
-
right: -4px;
|
|
104
|
-
bottom: -4px;
|
|
105
|
-
width: calc(var(--jolly-radius-md, 6px) + 8px);
|
|
106
|
-
height: calc(var(--jolly-radius-md, 6px) + 8px);
|
|
107
|
-
cursor: nwse-resize;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.resize-handle.corner::after {
|
|
111
|
-
right: 4px;
|
|
112
|
-
bottom: 4px;
|
|
113
|
-
width: 4px;
|
|
114
|
-
height: 4px;
|
|
115
|
-
border-radius: 50%;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.resize-handle:focus-visible {
|
|
119
|
-
${focusRing}
|
|
120
|
-
outline-offset: -2px;
|
|
121
|
-
}
|
|
6
|
+
export const floatingStyles = css `
|
|
7
|
+
/*
|
|
8
|
+
* A floating window is a plane and genuinely detached, so it owns both the
|
|
9
|
+
* raised surface and the shadow. The pane it holds paints nothing.
|
|
10
|
+
*/
|
|
11
|
+
:host {
|
|
12
|
+
position: fixed;
|
|
13
|
+
display: block;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
width: 320px;
|
|
16
|
+
height: 360px;
|
|
17
|
+
min-width: 0;
|
|
18
|
+
min-height: 0;
|
|
19
|
+
border-radius: var(--jolly-radius-md, 6px);
|
|
20
|
+
background: var(--jolly-surface-raised, ${kFallback.controlBg});
|
|
21
|
+
box-shadow: var(--jolly-shadow-floating, 0 4px 16px rgb(0 0 0 / 0.3));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/*
|
|
25
|
+
* A dragged window ghosts as a whole, surface and shadow included, so the
|
|
26
|
+
* dock it is aiming at stays readable underneath it. The pane inside does
|
|
27
|
+
* not dim on its own here: the window is the source being moved.
|
|
28
|
+
*/
|
|
29
|
+
:host([dragging]) {
|
|
30
|
+
opacity: 0.4;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.content {
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 100%;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
border-radius: var(--jolly-radius-md, 6px);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
::slotted(jolly-pane) {
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 100%;
|
|
43
|
+
background: transparent;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.resize-handle {
|
|
47
|
+
position: absolute;
|
|
48
|
+
z-index: 1;
|
|
49
|
+
border: 0;
|
|
50
|
+
background: transparent;
|
|
51
|
+
touch-action: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.resize-handle::after {
|
|
55
|
+
position: absolute;
|
|
56
|
+
background: var(--jolly-groove);
|
|
57
|
+
content: "";
|
|
58
|
+
opacity: 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.resize-handle:hover::after,
|
|
62
|
+
.resize-handle:focus-visible::after {
|
|
63
|
+
opacity: 1;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/*
|
|
67
|
+
* Inset by the host's own border-radius so the strip (and its hover line)
|
|
68
|
+
* stops before the rounded corner instead of running past the visible
|
|
69
|
+
* surface into the void the radius cuts away. The corner handle below
|
|
70
|
+
* fills the gap this leaves.
|
|
71
|
+
*/
|
|
72
|
+
.resize-handle.right {
|
|
73
|
+
top: var(--jolly-radius-md, 6px);
|
|
74
|
+
right: -4px;
|
|
75
|
+
bottom: var(--jolly-radius-md, 6px);
|
|
76
|
+
width: 8px;
|
|
77
|
+
cursor: ew-resize;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.resize-handle.right::after {
|
|
81
|
+
top: 0;
|
|
82
|
+
bottom: 0;
|
|
83
|
+
left: 3px;
|
|
84
|
+
width: 2px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.resize-handle.bottom {
|
|
88
|
+
right: var(--jolly-radius-md, 6px);
|
|
89
|
+
bottom: -4px;
|
|
90
|
+
left: var(--jolly-radius-md, 6px);
|
|
91
|
+
height: 8px;
|
|
92
|
+
cursor: ns-resize;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.resize-handle.bottom::after {
|
|
96
|
+
top: 3px;
|
|
97
|
+
right: 0;
|
|
98
|
+
left: 0;
|
|
99
|
+
height: 2px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.resize-handle.corner {
|
|
103
|
+
right: -4px;
|
|
104
|
+
bottom: -4px;
|
|
105
|
+
width: calc(var(--jolly-radius-md, 6px) + 8px);
|
|
106
|
+
height: calc(var(--jolly-radius-md, 6px) + 8px);
|
|
107
|
+
cursor: nwse-resize;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.resize-handle.corner::after {
|
|
111
|
+
right: 4px;
|
|
112
|
+
bottom: 4px;
|
|
113
|
+
width: 4px;
|
|
114
|
+
height: 4px;
|
|
115
|
+
border-radius: 50%;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.resize-handle:focus-visible {
|
|
119
|
+
${focusRing}
|
|
120
|
+
outline-offset: -2px;
|
|
121
|
+
}
|
|
122
122
|
`;
|
|
123
123
|
//# sourceMappingURL=Floating.styles.js.map
|
|
@@ -67,40 +67,40 @@ let Folder = class Folder extends LitElement {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
render() {
|
|
70
|
-
return html `
|
|
71
|
-
<div class="header" part="header">
|
|
72
|
-
${this.collapsible ? this.#renderToggle() : this.#renderTitle()}
|
|
73
|
-
<slot name="actions"></slot>
|
|
74
|
-
<button
|
|
75
|
-
class="grip"
|
|
76
|
-
type="button"
|
|
77
|
-
aria-label=${`Reorder ${this.label}`}
|
|
78
|
-
aria-pressed=${String(this._reordering)}
|
|
79
|
-
@pointerdown=${this.#onGripPointerDown}
|
|
80
|
-
@keydown=${this.#onGripKeyDown}
|
|
81
|
-
><jolly-icon name="drag" aria-hidden="true"></jolly-icon></button>
|
|
82
|
-
</div>
|
|
83
|
-
<div class="content" part="content">
|
|
84
|
-
<slot></slot>
|
|
85
|
-
</div>
|
|
70
|
+
return html `
|
|
71
|
+
<div class="header" part="header">
|
|
72
|
+
${this.collapsible ? this.#renderToggle() : this.#renderTitle()}
|
|
73
|
+
<slot name="actions"></slot>
|
|
74
|
+
<button
|
|
75
|
+
class="grip"
|
|
76
|
+
type="button"
|
|
77
|
+
aria-label=${`Reorder ${this.label}`}
|
|
78
|
+
aria-pressed=${String(this._reordering)}
|
|
79
|
+
@pointerdown=${this.#onGripPointerDown}
|
|
80
|
+
@keydown=${this.#onGripKeyDown}
|
|
81
|
+
><jolly-icon name="drag" aria-hidden="true"></jolly-icon></button>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="content" part="content">
|
|
84
|
+
<slot></slot>
|
|
85
|
+
</div>
|
|
86
86
|
`;
|
|
87
87
|
}
|
|
88
88
|
#renderToggle() {
|
|
89
|
-
return html `<button
|
|
90
|
-
class="toggle"
|
|
91
|
-
type="button"
|
|
92
|
-
aria-expanded=${String(this.open)}
|
|
93
|
-
@click=${this.#toggle}
|
|
94
|
-
><jolly-icon
|
|
95
|
-
class="chevron"
|
|
96
|
-
name="chevron"
|
|
97
|
-
aria-hidden="true"
|
|
89
|
+
return html `<button
|
|
90
|
+
class="toggle"
|
|
91
|
+
type="button"
|
|
92
|
+
aria-expanded=${String(this.open)}
|
|
93
|
+
@click=${this.#toggle}
|
|
94
|
+
><jolly-icon
|
|
95
|
+
class="chevron"
|
|
96
|
+
name="chevron"
|
|
97
|
+
aria-hidden="true"
|
|
98
98
|
></jolly-icon><span class="label">${this.label}</span></button>`;
|
|
99
99
|
}
|
|
100
100
|
#renderTitle() {
|
|
101
|
-
return html `<div class="title"><span
|
|
102
|
-
class="gutter"
|
|
103
|
-
aria-hidden="true"
|
|
101
|
+
return html `<div class="title"><span
|
|
102
|
+
class="gutter"
|
|
103
|
+
aria-hidden="true"
|
|
104
104
|
></span><span class="label">${this.label}</span></div>`;
|
|
105
105
|
}
|
|
106
106
|
headerRect() {
|