vue-pane 0.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 +21 -0
- package/README.md +424 -0
- package/dist/src/components/PButton.vue.d.ts +11 -0
- package/dist/src/components/PCheckbox.vue.d.ts +15 -0
- package/dist/src/components/PColor.vue.d.ts +16 -0
- package/dist/src/components/PFolder.vue.d.ts +27 -0
- package/dist/src/components/PGraph.vue.d.ts +10 -0
- package/dist/src/components/PLabel.vue.d.ts +17 -0
- package/dist/src/components/PMonitor.vue.d.ts +8 -0
- package/dist/src/components/PMonitorMulti.vue.d.ts +8 -0
- package/dist/src/components/PNumber.vue.d.ts +18 -0
- package/dist/src/components/PPoint2d.vue.d.ts +26 -0
- package/dist/src/components/PSelect.vue.d.ts +19 -0
- package/dist/src/components/PSeparator.vue.d.ts +3 -0
- package/dist/src/components/PSlider.vue.d.ts +18 -0
- package/dist/src/components/PTab.vue.d.ts +25 -0
- package/dist/src/components/PText.vue.d.ts +15 -0
- package/dist/src/components/PTooltipIcon.vue.d.ts +3 -0
- package/dist/src/components/VPane.vue.d.ts +28 -0
- package/dist/src/composables/useFoldable.d.ts +5 -0
- package/dist/src/composables/usePaneConfig.d.ts +8 -0
- package/dist/src/composables/usePickerFold.d.ts +2 -0
- package/dist/src/composables/useTooltip.d.ts +19 -0
- package/dist/src/index.d.ts +19 -0
- package/dist/vue-pane.css +2 -0
- package/dist/vue-pane.js +3076 -0
- package/dist/vue-pane.umd.cjs +1 -0
- package/package.json +79 -0
- package/src/components/PButton.vue +53 -0
- package/src/components/PCheckbox.vue +37 -0
- package/src/components/PColor.vue +107 -0
- package/src/components/PConfig.vue +10 -0
- package/src/components/PFolder.vue +81 -0
- package/src/components/PGraph.vue +49 -0
- package/src/components/PLabel.vue +50 -0
- package/src/components/PMonitor.vue +28 -0
- package/src/components/PMonitorMulti.vue +30 -0
- package/src/components/PNumber.vue +162 -0
- package/src/components/PPoint2d.vue +191 -0
- package/src/components/PSelect.vue +44 -0
- package/src/components/PSeparator.vue +8 -0
- package/src/components/PSlider.vue +96 -0
- package/src/components/PTab.vue +73 -0
- package/src/components/PText.vue +30 -0
- package/src/components/PTooltipIcon.vue +30 -0
- package/src/components/VPane.vue +61 -0
- package/src/composables/useFoldable.ts +128 -0
- package/src/composables/usePaneConfig.ts +25 -0
- package/src/composables/usePickerFold.ts +46 -0
- package/src/composables/useTooltip.ts +27 -0
- package/src/index.ts +38 -0
- package/src/styles/_vp.scss +12 -0
- package/src/styles/common/_defs.scss +56 -0
- package/src/styles/index.scss +1 -0
- package/src/styles/view/_button.scss +12 -0
- package/src/styles/view/_checkbox.scss +54 -0
- package/src/styles/view/_color.scss +57 -0
- package/src/styles/view/_folder.scss +70 -0
- package/src/styles/view/_graph.scss +11 -0
- package/src/styles/view/_label.scss +37 -0
- package/src/styles/view/_list.scss +17 -0
- package/src/styles/view/_log.scss +13 -0
- package/src/styles/view/_monitor-multi.scss +18 -0
- package/src/styles/view/_number.scss +110 -0
- package/src/styles/view/_point-2d.scss +61 -0
- package/src/styles/view/_root.scss +126 -0
- package/src/styles/view/_separator.scss +15 -0
- package/src/styles/view/_slider.scss +32 -0
- package/src/styles/view/_tab.scss +139 -0
- package/src/styles/view/_text.scss +24 -0
- package/src/styles/view/_tooltip.scss +17 -0
- package/src/styles/view/_views.scss +2 -0
- package/src/styles/view/placeholder/_button.scss +28 -0
- package/src/styles/view/placeholder/_container.scss +80 -0
- package/src/styles/view/placeholder/_folder.scss +102 -0
- package/src/styles/view/placeholder/_input.scss +26 -0
- package/src/styles/view/placeholder/_list.scss +35 -0
- package/src/styles/view/placeholder/_monitor.scss +26 -0
- package/src/styles/view/placeholder/_texts.scss +11 -0
- package/src/styles/view/placeholder/_theme.scss +111 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
@use '../../common/defs';
|
|
2
|
+
|
|
3
|
+
%vp-folder_title {
|
|
4
|
+
background-color: defs.cssVar('container-bg');
|
|
5
|
+
color: defs.cssVar('container-fg');
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
display: block;
|
|
8
|
+
height: calc(#{defs.cssVar('container-unit-size')} + 4px);
|
|
9
|
+
line-height: calc(#{defs.cssVar('container-unit-size')} + 4px);
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
padding-left: defs.cssVar('container-h-padding');
|
|
12
|
+
padding-right: calc(
|
|
13
|
+
2px * 2 + #{defs.cssVar('container-unit-size')} + #{defs.cssVar('container-h-padding')}
|
|
14
|
+
);
|
|
15
|
+
position: relative;
|
|
16
|
+
text-align: left;
|
|
17
|
+
text-overflow: ellipsis;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
width: 100%;
|
|
20
|
+
|
|
21
|
+
// Delay border-radius transition to avoid unwanted clipping
|
|
22
|
+
transition: border-radius defs.$fold-transition-duration ease-in-out
|
|
23
|
+
defs.$fold-transition-duration;
|
|
24
|
+
|
|
25
|
+
&:hover {
|
|
26
|
+
background-color: defs.cssVar('container-bg-hover');
|
|
27
|
+
}
|
|
28
|
+
&:focus {
|
|
29
|
+
background-color: defs.cssVar('container-bg-focus');
|
|
30
|
+
}
|
|
31
|
+
&:active {
|
|
32
|
+
background-color: defs.cssVar('container-bg-active');
|
|
33
|
+
}
|
|
34
|
+
&:disabled {
|
|
35
|
+
opacity: 0.5;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
%vp-folder_mark {
|
|
40
|
+
$size: 6px;
|
|
41
|
+
|
|
42
|
+
background: linear-gradient(
|
|
43
|
+
to left,
|
|
44
|
+
defs.cssVar('container-fg'),
|
|
45
|
+
defs.cssVar('container-fg') 2px,
|
|
46
|
+
transparent 2px,
|
|
47
|
+
transparent 4px,
|
|
48
|
+
defs.cssVar('container-fg') 4px
|
|
49
|
+
);
|
|
50
|
+
border-radius: 2px;
|
|
51
|
+
bottom: 0;
|
|
52
|
+
content: '';
|
|
53
|
+
display: block;
|
|
54
|
+
height: $size;
|
|
55
|
+
right: calc(
|
|
56
|
+
#{defs.cssVar('container-h-padding')} + (
|
|
57
|
+
#{defs.cssVar('container-unit-size')} + 4px - #{$size}
|
|
58
|
+
) / 2 - 2px
|
|
59
|
+
);
|
|
60
|
+
margin: auto;
|
|
61
|
+
opacity: 0.5;
|
|
62
|
+
position: absolute;
|
|
63
|
+
top: 0;
|
|
64
|
+
transform: rotate(90deg);
|
|
65
|
+
transition: transform defs.$fold-transition-duration ease-in-out;
|
|
66
|
+
width: $size;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
%vp-folder_mark-expanded {
|
|
70
|
+
transform: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
%vp-folder_container {
|
|
74
|
+
box-sizing: border-box;
|
|
75
|
+
height: 0;
|
|
76
|
+
opacity: 0;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
padding-bottom: 0;
|
|
79
|
+
padding-top: 0;
|
|
80
|
+
position: relative;
|
|
81
|
+
transition: height defs.$fold-transition-duration ease-in-out,
|
|
82
|
+
opacity defs.$fold-transition-duration linear,
|
|
83
|
+
padding defs.$fold-transition-duration ease-in-out;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
%vp-folder_container-shrinkedCompletely {
|
|
87
|
+
display: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
%vp-folder_container-expanded {
|
|
91
|
+
opacity: 1;
|
|
92
|
+
padding-bottom: defs.cssVar('container-v-padding');
|
|
93
|
+
padding-top: defs.cssVar('container-v-padding');
|
|
94
|
+
|
|
95
|
+
// Allow popup elements (e.g. color picker) to overflow
|
|
96
|
+
overflow: visible;
|
|
97
|
+
|
|
98
|
+
// Delay opacity to avoid showing overflow content during expand
|
|
99
|
+
transition: height defs.$fold-transition-duration ease-in-out,
|
|
100
|
+
opacity defs.$fold-transition-duration linear defs.$fold-transition-duration,
|
|
101
|
+
padding defs.$fold-transition-duration ease-in-out;
|
|
102
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@use '../../common/defs';
|
|
2
|
+
|
|
3
|
+
%vp-input {
|
|
4
|
+
background-color: defs.cssVar('input-bg');
|
|
5
|
+
border-radius: defs.cssVar('blade-border-radius');
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
color: defs.cssVar('input-fg');
|
|
8
|
+
font-family: inherit;
|
|
9
|
+
height: defs.cssVar('container-unit-size');
|
|
10
|
+
line-height: defs.cssVar('container-unit-size');
|
|
11
|
+
min-width: 0;
|
|
12
|
+
width: 100%;
|
|
13
|
+
|
|
14
|
+
&:hover {
|
|
15
|
+
background-color: defs.cssVar('input-bg-hover');
|
|
16
|
+
}
|
|
17
|
+
&:focus {
|
|
18
|
+
background-color: defs.cssVar('input-bg-focus');
|
|
19
|
+
}
|
|
20
|
+
&:active {
|
|
21
|
+
background-color: defs.cssVar('input-bg-active');
|
|
22
|
+
}
|
|
23
|
+
&:disabled {
|
|
24
|
+
opacity: 0.5;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@use './button';
|
|
2
|
+
|
|
3
|
+
%vp-list {
|
|
4
|
+
position: relative;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
%vp-list_select {
|
|
8
|
+
@extend %vp-button;
|
|
9
|
+
|
|
10
|
+
padding: 0 (16px + 2px * 2) 0 4px;
|
|
11
|
+
width: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
%vp-list_arrow {
|
|
15
|
+
bottom: 0;
|
|
16
|
+
margin: auto;
|
|
17
|
+
pointer-events: none;
|
|
18
|
+
position: absolute;
|
|
19
|
+
right: 2px;
|
|
20
|
+
top: 0;
|
|
21
|
+
|
|
22
|
+
svg {
|
|
23
|
+
bottom: 0;
|
|
24
|
+
height: 16px;
|
|
25
|
+
margin: auto;
|
|
26
|
+
position: absolute;
|
|
27
|
+
right: 0;
|
|
28
|
+
top: 0;
|
|
29
|
+
width: 16px;
|
|
30
|
+
|
|
31
|
+
path {
|
|
32
|
+
fill: currentColor;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@use '../../common/defs';
|
|
2
|
+
|
|
3
|
+
%vp-monitor {
|
|
4
|
+
background-color: defs.cssVar('monitor-bg');
|
|
5
|
+
border-radius: defs.cssVar('blade-border-radius');
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
color: defs.cssVar('monitor-fg');
|
|
8
|
+
height: defs.cssVar('container-unit-size');
|
|
9
|
+
scrollbar-color: currentColor transparent;
|
|
10
|
+
scrollbar-width: thin;
|
|
11
|
+
width: 100%;
|
|
12
|
+
|
|
13
|
+
&::-webkit-scrollbar {
|
|
14
|
+
height: 8px;
|
|
15
|
+
width: 8px;
|
|
16
|
+
}
|
|
17
|
+
&::-webkit-scrollbar-corner {
|
|
18
|
+
background-color: transparent;
|
|
19
|
+
}
|
|
20
|
+
&::-webkit-scrollbar-thumb {
|
|
21
|
+
background-clip: padding-box;
|
|
22
|
+
background-color: currentColor;
|
|
23
|
+
border: transparent solid 2px;
|
|
24
|
+
border-radius: 4px;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
@use 'sass:color';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use '../../common/defs';
|
|
4
|
+
|
|
5
|
+
@mixin themeVariable($key, $ex-name, $value) {
|
|
6
|
+
$in-name: map.get(defs.$css-vars, $key);
|
|
7
|
+
@if $in-name == null {
|
|
8
|
+
@error 'Short CSS variable for \'#{$key}\' not found.';
|
|
9
|
+
}
|
|
10
|
+
--#{$in-name}: var(--#{defs.$prefix}-#{$ex-name}, #{$value});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
%vp-theming {
|
|
14
|
+
$base-hue: 230;
|
|
15
|
+
$color-exdark: hsl($base-hue, 7%, 0%);
|
|
16
|
+
$color-dark: hsl($base-hue, 7%, 17%);
|
|
17
|
+
$color-light: hsl($base-hue, 7%, 70%);
|
|
18
|
+
$color-exlight: hsl($base-hue, 7%, 75%);
|
|
19
|
+
$bg-color: $color-dark;
|
|
20
|
+
$fg-color: $color-exlight;
|
|
21
|
+
|
|
22
|
+
// Base
|
|
23
|
+
@include themeVariable('base-bg', 'base-background-color', $bg-color);
|
|
24
|
+
@include themeVariable('base-border-radius', 'base-border-radius', 6px);
|
|
25
|
+
@include themeVariable(
|
|
26
|
+
'base-font',
|
|
27
|
+
'base-font-family',
|
|
28
|
+
('Roboto Mono', 'Source Code Pro', Menlo, Courier, monospace)
|
|
29
|
+
);
|
|
30
|
+
@include themeVariable('base-shadow', 'base-shadow-color', rgba(black, 0.2));
|
|
31
|
+
|
|
32
|
+
// Blade
|
|
33
|
+
@include themeVariable('blade-border-radius', 'blade-border-radius', 2px);
|
|
34
|
+
@include themeVariable('blade-h-padding', 'blade-horizontal-padding', 4px);
|
|
35
|
+
@include themeVariable('blade-value-width', 'blade-value-width', 160px);
|
|
36
|
+
|
|
37
|
+
// Button
|
|
38
|
+
@include themeVariable('button-bg', 'button-background-color', $color-light);
|
|
39
|
+
@include themeVariable(
|
|
40
|
+
'button-bg-active',
|
|
41
|
+
'button-background-color-active',
|
|
42
|
+
color.adjust($color-light, $lightness: 15%)
|
|
43
|
+
);
|
|
44
|
+
@include themeVariable(
|
|
45
|
+
'button-bg-focus',
|
|
46
|
+
'button-background-color-focus',
|
|
47
|
+
color.adjust($color-light, $lightness: 10%)
|
|
48
|
+
);
|
|
49
|
+
@include themeVariable(
|
|
50
|
+
'button-bg-hover',
|
|
51
|
+
'button-background-color-hover',
|
|
52
|
+
color.adjust($color-light, $lightness: 5%)
|
|
53
|
+
);
|
|
54
|
+
@include themeVariable('button-fg', 'button-foreground-color', $bg-color);
|
|
55
|
+
|
|
56
|
+
// Container
|
|
57
|
+
@include themeVariable(
|
|
58
|
+
'container-bg',
|
|
59
|
+
'container-background-color',
|
|
60
|
+
rgba($fg-color, 0.1)
|
|
61
|
+
);
|
|
62
|
+
@include themeVariable(
|
|
63
|
+
'container-bg-active',
|
|
64
|
+
'container-background-color-active',
|
|
65
|
+
rgba($fg-color, 0.25)
|
|
66
|
+
);
|
|
67
|
+
@include themeVariable(
|
|
68
|
+
'container-bg-focus',
|
|
69
|
+
'container-background-color-focus',
|
|
70
|
+
rgba($fg-color, 0.2)
|
|
71
|
+
);
|
|
72
|
+
@include themeVariable(
|
|
73
|
+
'container-bg-hover',
|
|
74
|
+
'container-background-color-hover',
|
|
75
|
+
rgba($fg-color, 0.15)
|
|
76
|
+
);
|
|
77
|
+
@include themeVariable('container-fg', 'container-foreground-color', $fg-color);
|
|
78
|
+
@include themeVariable('container-h-padding', 'container-horizontal-padding', 4px);
|
|
79
|
+
@include themeVariable('container-v-padding', 'container-vertical-padding', 4px);
|
|
80
|
+
@include themeVariable('container-unit-spacing', 'container-unit-spacing', 4px);
|
|
81
|
+
@include themeVariable('container-unit-size', 'container-unit-size', 20px);
|
|
82
|
+
|
|
83
|
+
// Input
|
|
84
|
+
@include themeVariable('input-bg', 'input-background-color', rgba($fg-color, 0.1));
|
|
85
|
+
@include themeVariable(
|
|
86
|
+
'input-bg-active',
|
|
87
|
+
'input-background-color-active',
|
|
88
|
+
rgba($fg-color, 0.25)
|
|
89
|
+
);
|
|
90
|
+
@include themeVariable(
|
|
91
|
+
'input-bg-focus',
|
|
92
|
+
'input-background-color-focus',
|
|
93
|
+
rgba($fg-color, 0.2)
|
|
94
|
+
);
|
|
95
|
+
@include themeVariable(
|
|
96
|
+
'input-bg-hover',
|
|
97
|
+
'input-background-color-hover',
|
|
98
|
+
rgba($fg-color, 0.15)
|
|
99
|
+
);
|
|
100
|
+
@include themeVariable('input-fg', 'input-foreground-color', $fg-color);
|
|
101
|
+
|
|
102
|
+
// Label
|
|
103
|
+
@include themeVariable('label-fg', 'label-foreground-color', rgba($fg-color, 0.7));
|
|
104
|
+
|
|
105
|
+
// Monitor
|
|
106
|
+
@include themeVariable('monitor-bg', 'monitor-background-color', rgba($color-exdark, 0.2));
|
|
107
|
+
@include themeVariable('monitor-fg', 'monitor-foreground-color', rgba($fg-color, 0.7));
|
|
108
|
+
|
|
109
|
+
// Groove
|
|
110
|
+
@include themeVariable('groove-fg', 'groove-foreground-color', rgba($fg-color, 0.1));
|
|
111
|
+
}
|