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.
Files changed (80) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +424 -0
  3. package/dist/src/components/PButton.vue.d.ts +11 -0
  4. package/dist/src/components/PCheckbox.vue.d.ts +15 -0
  5. package/dist/src/components/PColor.vue.d.ts +16 -0
  6. package/dist/src/components/PFolder.vue.d.ts +27 -0
  7. package/dist/src/components/PGraph.vue.d.ts +10 -0
  8. package/dist/src/components/PLabel.vue.d.ts +17 -0
  9. package/dist/src/components/PMonitor.vue.d.ts +8 -0
  10. package/dist/src/components/PMonitorMulti.vue.d.ts +8 -0
  11. package/dist/src/components/PNumber.vue.d.ts +18 -0
  12. package/dist/src/components/PPoint2d.vue.d.ts +26 -0
  13. package/dist/src/components/PSelect.vue.d.ts +19 -0
  14. package/dist/src/components/PSeparator.vue.d.ts +3 -0
  15. package/dist/src/components/PSlider.vue.d.ts +18 -0
  16. package/dist/src/components/PTab.vue.d.ts +25 -0
  17. package/dist/src/components/PText.vue.d.ts +15 -0
  18. package/dist/src/components/PTooltipIcon.vue.d.ts +3 -0
  19. package/dist/src/components/VPane.vue.d.ts +28 -0
  20. package/dist/src/composables/useFoldable.d.ts +5 -0
  21. package/dist/src/composables/usePaneConfig.d.ts +8 -0
  22. package/dist/src/composables/usePickerFold.d.ts +2 -0
  23. package/dist/src/composables/useTooltip.d.ts +19 -0
  24. package/dist/src/index.d.ts +19 -0
  25. package/dist/vue-pane.css +2 -0
  26. package/dist/vue-pane.js +3076 -0
  27. package/dist/vue-pane.umd.cjs +1 -0
  28. package/package.json +79 -0
  29. package/src/components/PButton.vue +53 -0
  30. package/src/components/PCheckbox.vue +37 -0
  31. package/src/components/PColor.vue +107 -0
  32. package/src/components/PConfig.vue +10 -0
  33. package/src/components/PFolder.vue +81 -0
  34. package/src/components/PGraph.vue +49 -0
  35. package/src/components/PLabel.vue +50 -0
  36. package/src/components/PMonitor.vue +28 -0
  37. package/src/components/PMonitorMulti.vue +30 -0
  38. package/src/components/PNumber.vue +162 -0
  39. package/src/components/PPoint2d.vue +191 -0
  40. package/src/components/PSelect.vue +44 -0
  41. package/src/components/PSeparator.vue +8 -0
  42. package/src/components/PSlider.vue +96 -0
  43. package/src/components/PTab.vue +73 -0
  44. package/src/components/PText.vue +30 -0
  45. package/src/components/PTooltipIcon.vue +30 -0
  46. package/src/components/VPane.vue +61 -0
  47. package/src/composables/useFoldable.ts +128 -0
  48. package/src/composables/usePaneConfig.ts +25 -0
  49. package/src/composables/usePickerFold.ts +46 -0
  50. package/src/composables/useTooltip.ts +27 -0
  51. package/src/index.ts +38 -0
  52. package/src/styles/_vp.scss +12 -0
  53. package/src/styles/common/_defs.scss +56 -0
  54. package/src/styles/index.scss +1 -0
  55. package/src/styles/view/_button.scss +12 -0
  56. package/src/styles/view/_checkbox.scss +54 -0
  57. package/src/styles/view/_color.scss +57 -0
  58. package/src/styles/view/_folder.scss +70 -0
  59. package/src/styles/view/_graph.scss +11 -0
  60. package/src/styles/view/_label.scss +37 -0
  61. package/src/styles/view/_list.scss +17 -0
  62. package/src/styles/view/_log.scss +13 -0
  63. package/src/styles/view/_monitor-multi.scss +18 -0
  64. package/src/styles/view/_number.scss +110 -0
  65. package/src/styles/view/_point-2d.scss +61 -0
  66. package/src/styles/view/_root.scss +126 -0
  67. package/src/styles/view/_separator.scss +15 -0
  68. package/src/styles/view/_slider.scss +32 -0
  69. package/src/styles/view/_tab.scss +139 -0
  70. package/src/styles/view/_text.scss +24 -0
  71. package/src/styles/view/_tooltip.scss +17 -0
  72. package/src/styles/view/_views.scss +2 -0
  73. package/src/styles/view/placeholder/_button.scss +28 -0
  74. package/src/styles/view/placeholder/_container.scss +80 -0
  75. package/src/styles/view/placeholder/_folder.scss +102 -0
  76. package/src/styles/view/placeholder/_input.scss +26 -0
  77. package/src/styles/view/placeholder/_list.scss +35 -0
  78. package/src/styles/view/placeholder/_monitor.scss +26 -0
  79. package/src/styles/view/placeholder/_texts.scss +11 -0
  80. package/src/styles/view/placeholder/_theme.scss +111 -0
@@ -0,0 +1,18 @@
1
+ @use '../vp';
2
+
3
+ .vp-monitor-multi {
4
+ &__value {
5
+ @extend %vp-monitor;
6
+
7
+ display: block;
8
+ height: calc(#{vp.cssVar('container-unit-size')} * 3);
9
+ line-height: vp.cssVar('container-unit-size');
10
+ padding-left: vp.cssVar('blade-h-padding');
11
+ padding-right: vp.cssVar('blade-h-padding');
12
+ resize: none;
13
+ white-space: pre;
14
+ }
15
+ &.#{vp.$disabled} &__value {
16
+ opacity: 0.5;
17
+ }
18
+ }
@@ -0,0 +1,110 @@
1
+ @use 'sass:math';
2
+ @use '../vp';
3
+
4
+ .vp-text {
5
+ $knob-bounds-width: 12px;
6
+ $knob-visual-width: 2px;
7
+
8
+ &--number &__input {
9
+ text-align: right;
10
+ }
11
+ &--dragging &__input {
12
+ opacity: 0.3;
13
+ }
14
+ &__knob {
15
+ cursor: ew-resize;
16
+ height: 100%;
17
+ left: calc(
18
+ #{vp.cssVar('blade-h-padding')} - #{math.div(
19
+ $knob-bounds-width - $knob-visual-width,
20
+ 2
21
+ )}
22
+ );
23
+ position: absolute;
24
+ top: 0;
25
+ width: $knob-bounds-width;
26
+
27
+ &::before {
28
+ background-color: vp.cssVar('input-fg');
29
+ border-radius: math.div($knob-visual-width, 2);
30
+ bottom: 0;
31
+ content: '';
32
+ height: calc(#{vp.cssVar('container-unit-size')} - 4px);
33
+ left: 50%;
34
+ margin-bottom: auto;
35
+ margin-left: math.div(-$knob-visual-width, 2);
36
+ margin-top: auto;
37
+ opacity: 0.1;
38
+ position: absolute;
39
+ top: 0;
40
+ transition: border-radius 0.1s, height 0.1s, transform 0.1s, width 0.1s;
41
+ width: $knob-visual-width;
42
+ }
43
+ }
44
+ &__knob:hover::before,
45
+ &--dragging &__knob::before {
46
+ opacity: 1;
47
+ }
48
+ &--dragging &__knob::before {
49
+ border-radius: 50%;
50
+ height: 4px;
51
+ transform: translateX(math.div($knob-visual-width - 4px, 2));
52
+ width: 4px;
53
+ }
54
+ &__guide {
55
+ bottom: 0;
56
+ display: block;
57
+ height: 8px;
58
+ left: 50%;
59
+ margin: auto;
60
+ overflow: visible;
61
+ pointer-events: none;
62
+ position: absolute;
63
+ top: 0;
64
+ visibility: hidden;
65
+ width: 100%;
66
+ }
67
+ &--dragging &__guide {
68
+ visibility: visible;
69
+ }
70
+ &__guide-body {
71
+ fill: none;
72
+ stroke: vp.cssVar('input-fg');
73
+ stroke-dasharray: 1;
74
+ }
75
+ &__guide-head {
76
+ fill: none;
77
+ stroke: vp.cssVar('input-fg');
78
+ }
79
+ &__drag-tooltip {
80
+ background-color: vp.cssVar('container-fg');
81
+ border-radius: vp.cssVar('blade-border-radius');
82
+ color: vp.cssVar('base-bg');
83
+ font-family: vp.cssVar('base-font'), sans-serif;
84
+ font-size: 11px;
85
+ line-height: 1.5;
86
+ margin-left: math.div($knob-bounds-width, 2);
87
+ padding: 2px 4px;
88
+ pointer-events: none;
89
+ position: absolute;
90
+ transform: translate(-50%, calc(-100% - 4px));
91
+ visibility: hidden;
92
+ white-space: nowrap;
93
+
94
+ &::after {
95
+ border-color: vp.cssVar('container-fg') transparent transparent transparent;
96
+ border-style: solid;
97
+ border-width: 3px 2px 0;
98
+ content: '';
99
+ height: 0;
100
+ left: 50%;
101
+ margin-left: -2px;
102
+ position: absolute;
103
+ top: 100%;
104
+ width: 0;
105
+ }
106
+ }
107
+ &--dragging &__drag-tooltip {
108
+ visibility: visible;
109
+ }
110
+ }
@@ -0,0 +1,61 @@
1
+ @use 'sass:math';
2
+ @use '../vp';
3
+
4
+ .vp-point-2d {
5
+ position: relative;
6
+ &__header { display: flex; }
7
+ &__btn {
8
+ @extend %vp-button;
9
+
10
+ height: vp.cssVar('container-unit-size');
11
+ margin-right: 4px;
12
+ position: relative;
13
+ width: vp.cssVar('container-unit-size');
14
+
15
+ svg {
16
+ display: block;
17
+ height: 16px;
18
+ left: 50%;
19
+ margin-left: math.div(-16px, 2);
20
+ margin-top: math.div(-16px, 2);
21
+ position: absolute;
22
+ top: 50%;
23
+ width: 16px;
24
+
25
+ path { stroke: currentColor; stroke-width: 2; fill: none; }
26
+ circle { fill: currentColor; }
27
+ }
28
+ }
29
+ &__inputs { flex: 1; }
30
+ &__picker-panel {
31
+ height: 0;
32
+ margin-top: 0;
33
+ opacity: 0;
34
+ overflow: hidden;
35
+ transition: height vp.$fold-transition-duration ease-in-out,
36
+ opacity vp.$fold-transition-duration linear,
37
+ margin-top vp.$fold-transition-duration ease-in-out;
38
+ }
39
+ &#{&}--expanded &__picker-panel {
40
+ margin-top: vp.cssVar('container-unit-spacing');
41
+ opacity: 1;
42
+ }
43
+ &#{&}--expanded#{&}--complete &__picker-panel {
44
+ overflow: visible;
45
+ }
46
+ &__picker-wrap { position: relative; }
47
+ &__canvas {
48
+ background-color: vp.cssVar('input-bg');
49
+ border-radius: vp.cssVar('blade-border-radius');
50
+ cursor: crosshair;
51
+ display: block;
52
+ width: 100%;
53
+ }
54
+ &__crosshair-h, &__crosshair-v {
55
+ background-color: rgba(white, 0.5);
56
+ pointer-events: none;
57
+ position: absolute;
58
+ }
59
+ &__crosshair-h { height: 1px; left: 0; right: 0; }
60
+ &__crosshair-v { bottom: 0; top: 0; width: 1px; }
61
+ }
@@ -0,0 +1,126 @@
1
+ @use '../vp';
2
+
3
+ :root {
4
+ @extend %vp-theming;
5
+ }
6
+
7
+ // Resets for form elements inside any vp container, including teleported
8
+ // overlays. :where() zeroes the container's specificity
9
+ :where(.vp-pane, .vp-color__popup) {
10
+ button, input, select, textarea {
11
+ appearance: none;
12
+ background-color: transparent;
13
+ border-width: 0;
14
+ font-family: inherit;
15
+ font-size: inherit;
16
+ font-weight: inherit;
17
+ margin: 0;
18
+ outline: none;
19
+ padding: 0;
20
+ }
21
+ }
22
+
23
+ .vp-pane {
24
+ @extend %vp-theming;
25
+
26
+ background-color: vp.cssVar('base-bg');
27
+ border-radius: vp.cssVar('base-border-radius');
28
+ box-shadow: 0 2px 4px vp.cssVar('base-shadow');
29
+ font-family: vp.cssVar('base-font');
30
+ font-size: 11px;
31
+ font-weight: 500;
32
+ line-height: 1;
33
+ text-align: left;
34
+
35
+ &__title {
36
+ @extend %vp-folder_title;
37
+
38
+ border-radius: vp.cssVar('base-border-radius');
39
+ padding-left: calc(
40
+ 2px * 2 + #{vp.cssVar('container-h-padding')}
41
+ );
42
+ }
43
+ &#{&}--expanded &__title {
44
+ border-bottom-left-radius: 0;
45
+ border-bottom-right-radius: 0;
46
+ transition-delay: 0s;
47
+ transition-duration: 0s;
48
+ }
49
+ &--no-title > &__title {
50
+ display: none;
51
+ }
52
+ &__chevron {
53
+ @extend %vp-folder_mark;
54
+ }
55
+ &__title:disabled &__chevron {
56
+ display: none;
57
+ }
58
+ &#{&}--expanded &__chevron {
59
+ @extend %vp-folder_mark-expanded;
60
+ }
61
+ &__content {
62
+ @extend %vp-folder_container;
63
+ @extend %vp-container_children;
64
+ }
65
+ &#{&}--expanded &__content {
66
+ @extend %vp-folder_container-expanded;
67
+ }
68
+ &#{&}--complete:not(#{&}--expanded) &__content {
69
+ @extend %vp-folder_container-shrinkedCompletely;
70
+ }
71
+
72
+ // Last folder in root — rounded bottom corners
73
+ &__content {
74
+ & > .vp-folder:last-child > .vp-folder__content {
75
+ border-bottom-left-radius: vp.cssVar('base-border-radius');
76
+ border-bottom-right-radius: vp.cssVar('base-border-radius');
77
+ }
78
+ & > .vp-folder:last-child > .vp-folder__indent {
79
+ border-bottom-left-radius: vp.cssVar('base-border-radius');
80
+ }
81
+ & > .vp-folder:last-child:not(.vp-folder--expanded) > .vp-folder__title {
82
+ border-bottom-left-radius: vp.cssVar('base-border-radius');
83
+ border-bottom-right-radius: vp.cssVar('base-border-radius');
84
+ }
85
+ & > .vp-folder:last-child.vp-folder--expanded > .vp-folder__title {
86
+ transition-delay: 0s;
87
+ transition-duration: 0s;
88
+ }
89
+ // Last folder at any depth — rounded bottom-right corner when collapsed
90
+ & .vp-folder:not(:has(~ .vp-folder)):not(.vp-folder--expanded) > .vp-folder__title {
91
+ border-bottom-right-radius: vp.cssVar('base-border-radius');
92
+ }
93
+ // Last tab in root — rounded bottom corners
94
+ & > .vp-tab:last-child > .vp-tab__content {
95
+ border-bottom-left-radius: vp.cssVar('base-border-radius');
96
+ border-bottom-right-radius: vp.cssVar('base-border-radius');
97
+ }
98
+ & > .vp-tab:last-child > .vp-tab__indent {
99
+ border-bottom-left-radius: vp.cssVar('base-border-radius');
100
+ }
101
+ }
102
+ // First folder/tab when pane has no title
103
+ &--no-title &__content {
104
+ & > .vp-folder:first-child {
105
+ margin-top: calc(-1 * #{vp.cssVar('container-v-padding')});
106
+
107
+ & > .vp-folder__title {
108
+ border-top-left-radius: vp.cssVar('base-border-radius');
109
+ border-top-right-radius: vp.cssVar('base-border-radius');
110
+ }
111
+ }
112
+ & > .vp-tab:first-child {
113
+ margin-top: calc(-1 * #{vp.cssVar('container-v-padding')});
114
+
115
+ & > .vp-tab__title-bar {
116
+ border-top-left-radius: vp.cssVar('base-border-radius');
117
+ border-top-right-radius: vp.cssVar('base-border-radius');
118
+ }
119
+ }
120
+ }
121
+
122
+ &.#{vp.$disabled},
123
+ .#{vp.$disabled} {
124
+ pointer-events: none;
125
+ }
126
+ }
@@ -0,0 +1,15 @@
1
+ @use '../vp';
2
+
3
+ .vp-separator {
4
+ &__rule {
5
+ background-color: vp.cssVar('groove-fg');
6
+ border-width: 0;
7
+ display: block;
8
+ height: vp.$separator-width;
9
+ margin: 0;
10
+ width: 100%;
11
+ }
12
+ &.#{vp.$disabled} &__rule {
13
+ opacity: 0.5;
14
+ }
15
+ }
@@ -0,0 +1,32 @@
1
+ @use 'sass:math';
2
+ @use '../vp';
3
+
4
+ .vp-slider {
5
+ &.vp--disabled { opacity: 0.5; }
6
+ &__track {
7
+ box-sizing: border-box; cursor: pointer;
8
+ height: vp.cssVar('container-unit-size');
9
+ margin: 0 math.div(vp.$slider-knob-size, 2);
10
+ outline: none; position: relative;
11
+ &::before {
12
+ background-color: vp.cssVar('input-bg'); border-radius: 1px;
13
+ content: ''; display: block; height: 2px; inset: 0; margin: auto; position: absolute;
14
+ }
15
+ }
16
+ &__knob {
17
+ height: 100%; left: 0; position: absolute; top: 0;
18
+ &::before {
19
+ background-color: vp.cssVar('input-fg'); border-radius: 1px;
20
+ content: ''; display: block; height: 2px; inset: 0; margin-bottom: auto; margin-top: auto; position: absolute;
21
+ }
22
+ &::after {
23
+ background-color: vp.cssVar('button-bg'); border-radius: vp.cssVar('blade-border-radius');
24
+ bottom: 0; content: ''; display: block; height: vp.$slider-knob-size;
25
+ margin-bottom: auto; margin-top: auto; position: absolute;
26
+ right: math.div(-1 * vp.$slider-knob-size, 2); top: 0; width: vp.$slider-knob-size;
27
+ }
28
+ }
29
+ &__track:hover &__knob::after { background-color: vp.cssVar('button-bg-hover'); }
30
+ &__track:focus &__knob::after { background-color: vp.cssVar('button-bg-focus'); }
31
+ &__track:active &__knob::after { background-color: vp.cssVar('button-bg-active'); }
32
+ }
@@ -0,0 +1,139 @@
1
+ @use '../vp';
2
+
3
+ .vp-tab {
4
+ position: relative;
5
+
6
+ &__title-bar {
7
+ align-items: flex-end;
8
+ color: vp.cssVar('container-bg');
9
+ display: flex;
10
+ overflow: hidden;
11
+ position: relative;
12
+
13
+ &:hover {
14
+ color: vp.cssVar('container-bg-hover');
15
+ }
16
+ &:has(*:focus) {
17
+ color: vp.cssVar('container-bg-focus');
18
+ }
19
+ &:has(*:active) {
20
+ color: vp.cssVar('container-bg-active');
21
+ }
22
+
23
+ // Bottom border line
24
+ &::before {
25
+ background-color: currentColor;
26
+ bottom: 0;
27
+ content: '';
28
+ height: 2px;
29
+ left: 0;
30
+ pointer-events: none;
31
+ position: absolute;
32
+ right: 0;
33
+ }
34
+ }
35
+
36
+ &.#{vp.$disabled} &__title-bar::before {
37
+ opacity: 0.5;
38
+ }
39
+
40
+ &__indent {
41
+ bottom: 0;
42
+ color: vp.cssVar('container-bg');
43
+ left: 0;
44
+ overflow: hidden;
45
+ position: absolute;
46
+ top: calc(#{vp.cssVar('container-unit-size')} + 4px);
47
+ width: max(vp.cssVar('base-border-radius'), 4px);
48
+
49
+ &::before {
50
+ background-color: currentColor;
51
+ bottom: 0;
52
+ content: '';
53
+ left: 0;
54
+ position: absolute;
55
+ top: 0;
56
+ width: 4px;
57
+ }
58
+ }
59
+
60
+ &__title-bar:hover + &__indent {
61
+ color: vp.cssVar('container-bg-hover');
62
+ }
63
+ &__title-bar:has(*:focus) + &__indent {
64
+ color: vp.cssVar('container-bg-focus');
65
+ }
66
+ &__title-bar:has(*:active) + &__indent {
67
+ color: vp.cssVar('container-bg-active');
68
+ }
69
+ &.#{vp.$disabled} > &__indent {
70
+ opacity: 0.5;
71
+ }
72
+ }
73
+
74
+ .vp-tab-item {
75
+ flex: 1;
76
+ min-width: 0;
77
+ position: relative;
78
+
79
+ & + & {
80
+ margin-left: 2px;
81
+ }
82
+
83
+ &__btn {
84
+ cursor: pointer;
85
+ display: block;
86
+ padding-left: calc(#{vp.cssVar('container-h-padding')} + 4px);
87
+ padding-right: calc(#{vp.cssVar('container-h-padding')} + 4px);
88
+ position: relative;
89
+ width: 100%;
90
+
91
+ &:disabled {
92
+ opacity: 0.5;
93
+ }
94
+
95
+ // Tab background — inset leaves 2px at bottom for the title-bar border to show through
96
+ &::before {
97
+ background-color: vp.cssVar('container-bg');
98
+ content: '';
99
+ inset: 0 0 2px;
100
+ pointer-events: none;
101
+ position: absolute;
102
+ }
103
+ &:hover::before {
104
+ background-color: vp.cssVar('container-bg-hover');
105
+ }
106
+ &:focus::before {
107
+ background-color: vp.cssVar('container-bg-focus');
108
+ }
109
+ &:active::before {
110
+ background-color: vp.cssVar('container-bg-active');
111
+ }
112
+ }
113
+
114
+ &__label {
115
+ color: vp.cssVar('container-fg');
116
+ height: calc(#{vp.cssVar('container-unit-size')} + 4px);
117
+ line-height: calc(#{vp.cssVar('container-unit-size')} + 4px);
118
+ opacity: 0.5;
119
+ overflow: hidden;
120
+ position: relative;
121
+ text-overflow: ellipsis;
122
+ white-space: nowrap;
123
+ }
124
+
125
+ &--selected &__label {
126
+ opacity: 1;
127
+ }
128
+ }
129
+
130
+ .vp-tab-page {
131
+ &__content {
132
+ @extend %vp-container_children;
133
+ @extend %vp-container_subcontainers;
134
+
135
+ padding-bottom: vp.cssVar('container-v-padding');
136
+ padding-left: 4px;
137
+ padding-top: vp.cssVar('container-v-padding');
138
+ }
139
+ }
@@ -0,0 +1,24 @@
1
+ @use '../vp';
2
+
3
+ .vp-text {
4
+ position: relative;
5
+
6
+ &__input {
7
+ @extend %vp-input;
8
+
9
+ padding-left: vp.cssVar('blade-h-padding');
10
+ padding-right: vp.cssVar('blade-h-padding');
11
+ }
12
+ // Array position variants
13
+ &--first &__input {
14
+ border-bottom-right-radius: 0;
15
+ border-top-right-radius: 0;
16
+ }
17
+ &--middle &__input {
18
+ border-radius: 0;
19
+ }
20
+ &--last &__input {
21
+ border-bottom-left-radius: 0;
22
+ border-top-left-radius: 0;
23
+ }
24
+ }
@@ -0,0 +1,17 @@
1
+ @use '../vp';
2
+
3
+ .vp-tooltip {
4
+ background-color: #{vp.cssVar('base-bg')};
5
+ background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
6
+ border-radius: vp.cssVar('blade-border-radius');
7
+ box-shadow: vp.cssVar('base-shadow');
8
+ color: vp.cssVar('container-fg');
9
+ font-family: vp.cssVar('base-font'), sans-serif;
10
+ font-size: 11px;
11
+ line-height: 1.5;
12
+ max-width: 200px;
13
+ padding: 4px 8px;
14
+ pointer-events: none;
15
+ white-space: pre-wrap;
16
+ z-index: vp.$z-index-picker;
17
+ }
@@ -0,0 +1,2 @@
1
+ @forward './root';
2
+ @forward './tooltip';
@@ -0,0 +1,28 @@
1
+ @use '../../common/defs';
2
+
3
+ %vp-button {
4
+ background-color: defs.cssVar('button-bg');
5
+ border-radius: defs.cssVar('blade-border-radius');
6
+ color: defs.cssVar('button-fg');
7
+ cursor: pointer;
8
+ display: block;
9
+ font-weight: bold;
10
+ height: defs.cssVar('container-unit-size');
11
+ line-height: defs.cssVar('container-unit-size');
12
+ overflow: hidden;
13
+ text-overflow: ellipsis;
14
+ white-space: nowrap;
15
+
16
+ &:hover {
17
+ background-color: defs.cssVar('button-bg-hover');
18
+ }
19
+ &:focus {
20
+ background-color: defs.cssVar('button-bg-focus');
21
+ }
22
+ &:active {
23
+ background-color: defs.cssVar('button-bg-active');
24
+ }
25
+ &:disabled {
26
+ opacity: 0.5;
27
+ }
28
+ }
@@ -0,0 +1,80 @@
1
+ @use '../../common/defs';
2
+
3
+ %vp-container_children {
4
+ // Negative bottom margin on last container cancels the parent's padding-bottom
5
+ & > .vp-container:last-child {
6
+ margin-bottom: calc(-1 * #{defs.cssVar('container-v-padding')});
7
+ }
8
+
9
+ // Bottom left radius of last folder
10
+ & > .vp-folder:last-child .vp-folder__content {
11
+ border-bottom-left-radius: 0;
12
+ }
13
+
14
+ & > .vp-folder:last-child .vp-folder__title {
15
+ border-bottom-left-radius: 0;
16
+ }
17
+
18
+ // Spacing between two blades
19
+ & > *:not(:first-child) {
20
+ margin-top: defs.cssVar('container-unit-spacing');
21
+ }
22
+
23
+ // Top spacing of folder and separator
24
+ & > .vp-separator:not(:first-child),
25
+ & > .vp-container:not(:first-child) {
26
+ margin-top: defs.cssVar('container-v-padding');
27
+ }
28
+
29
+ // Bottom spacing of separator and containers
30
+ & > .vp-separator + *,
31
+ & > .vp-container + * {
32
+ margin-top: defs.cssVar('container-v-padding');
33
+ }
34
+
35
+ // Spacing between two containers and separators
36
+ & > .vp-separator + .vp-separator,
37
+ & > .vp-container + .vp-container {
38
+ margin-top: 0;
39
+ }
40
+ }
41
+
42
+ %vp-container_subcontainers {
43
+ // Left spacing of subcontainers
44
+ & > .vp-container {
45
+ margin-left: 4px;
46
+ }
47
+
48
+ // Left border radius of subfolder
49
+ & > .vp-folder > .vp-folder__title {
50
+ border-top-left-radius: defs.cssVar('blade-border-radius');
51
+ border-bottom-left-radius: defs.cssVar('blade-border-radius');
52
+ }
53
+
54
+ & > .vp-folder.vp-folder--expanded > .vp-folder__title {
55
+ border-bottom-left-radius: 0;
56
+ }
57
+
58
+ & .vp-folder > .vp-folder__content {
59
+ border-bottom-left-radius: defs.cssVar('blade-border-radius');
60
+ }
61
+
62
+ // Top left border radius of subfolder after container
63
+ & > .vp-container + .vp-folder > .vp-folder__title {
64
+ border-top-left-radius: 0;
65
+ }
66
+
67
+ // Top left border radius of subtab after container
68
+ & > .vp-container + .vp-tab > .vp-tab__title-bar {
69
+ border-top-left-radius: 0;
70
+ }
71
+
72
+ // Left border radius of subtab
73
+ & > .vp-tab > .vp-tab__title-bar {
74
+ border-top-left-radius: defs.cssVar('blade-border-radius');
75
+ }
76
+
77
+ & .vp-tab > .vp-tab__content {
78
+ border-bottom-left-radius: defs.cssVar('blade-border-radius');
79
+ }
80
+ }