@stoplight/ui-kit 3.0.0-beta.37 → 3.0.0-beta.40
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/TableOfContents/index.d.ts +3 -0
- package/TableOfContents/index.js +45 -6
- package/TableOfContents/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/_blueprint.scss +4 -4
- package/styles/blueprint/_variables.scss +3 -1
- package/styles/blueprint/select/blueprint-select.scss +8 -0
- package/styles/blueprint/select/components/_index.scss +6 -0
- package/styles/blueprint/select/components/omnibar/_omnibar.scss +63 -0
- package/styles/blueprint/select/components/select/_multi-select.scss +17 -0
- package/styles/blueprint/select/components/select/_select.scss +31 -0
- package/styles/blueprint/src/_reset.scss +43 -0
- package/styles/blueprint/src/_typography.scss +459 -0
- package/styles/blueprint/src/accessibility/_focus-states.scss +17 -0
- package/styles/blueprint/src/blueprint-hi-contrast.scss +22 -0
- package/styles/blueprint/src/blueprint.scss +16 -0
- package/styles/blueprint/src/common/_color-aliases.scss +43 -0
- package/styles/blueprint/src/common/_colors.scss +116 -0
- package/styles/blueprint/src/common/_flex.scss +49 -0
- package/styles/blueprint/src/common/_mixins.scss +128 -0
- package/styles/blueprint/src/common/_react-transition.scss +117 -0
- package/styles/blueprint/src/common/_variables.scss +131 -0
- package/styles/blueprint/src/components/_index.scss +38 -0
- package/styles/blueprint/src/components/alert/_alert.scss +33 -0
- package/styles/blueprint/src/components/breadcrumbs/_breadcrumbs.scss +142 -0
- package/styles/blueprint/src/components/button/_button-group.scss +240 -0
- package/styles/blueprint/src/components/button/_button.scss +206 -0
- package/styles/blueprint/src/components/button/_common.scss +507 -0
- package/styles/blueprint/src/components/callout/_callout.scss +99 -0
- package/styles/blueprint/src/components/card/_card.scss +91 -0
- package/styles/blueprint/src/components/collapse/_collapse.scss +20 -0
- package/styles/blueprint/src/components/context-menu/_context-menu.scss +10 -0
- package/styles/blueprint/src/components/dialog/_dialog.scss +146 -0
- package/styles/blueprint/src/components/divider/_divider.scss +19 -0
- package/styles/blueprint/src/components/drawer/_drawer.scss +232 -0
- package/styles/blueprint/src/components/editable-text/_editable-text.scss +156 -0
- package/styles/blueprint/src/components/forms/_common.scss +239 -0
- package/styles/blueprint/src/components/forms/_control-group.scss +276 -0
- package/styles/blueprint/src/components/forms/_controls.scss +526 -0
- package/styles/blueprint/src/components/forms/_file-input.scss +155 -0
- package/styles/blueprint/src/components/forms/_form-group.scss +111 -0
- package/styles/blueprint/src/components/forms/_index.scss +20 -0
- package/styles/blueprint/src/components/forms/_input-group.scss +247 -0
- package/styles/blueprint/src/components/forms/_input.scss +115 -0
- package/styles/blueprint/src/components/forms/_label.scss +114 -0
- package/styles/blueprint/src/components/forms/_numeric-input.scss +40 -0
- package/styles/blueprint/src/components/hotkeys/_hotkeys.scss +50 -0
- package/styles/blueprint/src/components/html-select/_common.scss +52 -0
- package/styles/blueprint/src/components/html-select/_html-select.scss +104 -0
- package/styles/blueprint/src/components/html-table/_html-table.scss +208 -0
- package/styles/blueprint/src/components/icon/_icon.scss +79 -0
- package/styles/blueprint/src/components/menu/_common.scss +172 -0
- package/styles/blueprint/src/components/menu/_menu.scss +197 -0
- package/styles/blueprint/src/components/menu/_submenu.scss +41 -0
- package/styles/blueprint/src/components/navbar/_navbar.scss +117 -0
- package/styles/blueprint/src/components/non-ideal-state/_non-ideal-state.scss +43 -0
- package/styles/blueprint/src/components/overflow-list/_overflow-list.scss +13 -0
- package/styles/blueprint/src/components/overlay/_overlay.scss +94 -0
- package/styles/blueprint/src/components/panel-stack/_panel-stack.scss +103 -0
- package/styles/blueprint/src/components/popover/_common.scss +171 -0
- package/styles/blueprint/src/components/popover/_popover.scss +127 -0
- package/styles/blueprint/src/components/portal/_portal.scss +15 -0
- package/styles/blueprint/src/components/progress-bar/_common.scss +9 -0
- package/styles/blueprint/src/components/progress-bar/_progress-bar.scss +98 -0
- package/styles/blueprint/src/components/skeleton/_common.scss +8 -0
- package/styles/blueprint/src/components/skeleton/_skeleton.scss +64 -0
- package/styles/blueprint/src/components/slider/_common.scss +48 -0
- package/styles/blueprint/src/components/slider/_slider.scss +216 -0
- package/styles/blueprint/src/components/spinner/_spinner.scss +65 -0
- package/styles/blueprint/src/components/tabs/_tabs.scss +199 -0
- package/styles/blueprint/src/components/tag/_common.scss +202 -0
- package/styles/blueprint/src/components/tag/_tag.scss +75 -0
- package/styles/blueprint/src/components/tag-input/_tag-input.scss +165 -0
- package/styles/blueprint/src/components/toast/_toast.scss +203 -0
- package/styles/blueprint/src/components/tooltip/_common.scss +11 -0
- package/styles/blueprint/src/components/tooltip/_tooltip.scss +61 -0
- package/styles/blueprint/src/components/tree/_tree.scss +194 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
// Copyright 2015 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@import "../../common/variables";
|
|
5
|
+
@import "~@blueprintjs/icons/src/icons";
|
|
6
|
+
@import "../../common/mixins";
|
|
7
|
+
|
|
8
|
+
@import "./common";
|
|
9
|
+
@import "./submenu";
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
Menus
|
|
13
|
+
|
|
14
|
+
Markup:
|
|
15
|
+
<ul class="#{$ns}-menu {{.modifier}} #{$ns}-elevation-1">
|
|
16
|
+
<li>
|
|
17
|
+
<a class="#{$ns}-menu-item #{$ns}-icon-people" tabindex="0">Share...</a>
|
|
18
|
+
</li>
|
|
19
|
+
<li>
|
|
20
|
+
<a class="#{$ns}-menu-item #{$ns}-icon-circle-arrow-right" tabindex="0">Move...</a>
|
|
21
|
+
</li>
|
|
22
|
+
<li>
|
|
23
|
+
<a class="#{$ns}-menu-item #{$ns}-icon-edit" tabindex="0">Rename</a>
|
|
24
|
+
</li>
|
|
25
|
+
<li class="#{$ns}-menu-divider"></li>
|
|
26
|
+
<li>
|
|
27
|
+
<a class="#{$ns}-menu-item #{$ns}-icon-trash #{$ns}-intent-danger" tabindex="0">Delete</a>
|
|
28
|
+
</li>
|
|
29
|
+
</ul>
|
|
30
|
+
|
|
31
|
+
.#{$ns}-large - Large size (only supported on <code>.#{$ns}-menu</code>)
|
|
32
|
+
|
|
33
|
+
Styleguide menu
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
.#{$ns}-menu {
|
|
37
|
+
background: $menu-background-color;
|
|
38
|
+
border-radius: $pt-border-radius;
|
|
39
|
+
color: $pt-text-color;
|
|
40
|
+
list-style: none;
|
|
41
|
+
margin: 0;
|
|
42
|
+
min-width: $menu-min-width;
|
|
43
|
+
padding: $half-grid-size;
|
|
44
|
+
text-align: left;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.#{$ns}-menu-divider {
|
|
48
|
+
@include menu-divider();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.#{$ns}-menu-item {
|
|
52
|
+
@include menu-item();
|
|
53
|
+
@include menu-item-intent();
|
|
54
|
+
|
|
55
|
+
&::before {
|
|
56
|
+
// support pt-icon-* classes directly on this element
|
|
57
|
+
@include pt-icon();
|
|
58
|
+
margin-right: $menu-item-padding;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&::before,
|
|
62
|
+
> .#{$ns}-icon {
|
|
63
|
+
color: $pt-icon-color;
|
|
64
|
+
margin-top: ($menu-item-line-height - $pt-icon-size-standard) * 0.5;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.#{$ns}-menu-item-label {
|
|
68
|
+
color: $pt-text-color-muted;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:hover {
|
|
72
|
+
color: inherit;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&.#{$ns}-active,
|
|
76
|
+
&:active {
|
|
77
|
+
background-color: $menu-item-color-active;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// pt-disable always overrides over styles
|
|
81
|
+
// stylelint-disable declaration-no-important
|
|
82
|
+
&.#{$ns}-disabled {
|
|
83
|
+
background-color: inherit !important;
|
|
84
|
+
color: $pt-text-color-disabled !important;
|
|
85
|
+
cursor: not-allowed !important;
|
|
86
|
+
// override global a:focus styles
|
|
87
|
+
outline: none !important;
|
|
88
|
+
|
|
89
|
+
&::before,
|
|
90
|
+
> .#{$ns}-icon,
|
|
91
|
+
.#{$ns}-menu-item-label {
|
|
92
|
+
color: $pt-icon-color-disabled !important;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// stylelint-enable declaration-no-important
|
|
96
|
+
|
|
97
|
+
.#{$ns}-large & {
|
|
98
|
+
@include menu-item-large();
|
|
99
|
+
|
|
100
|
+
.#{$ns}-icon {
|
|
101
|
+
// SVG icons remain standard size when menu is large
|
|
102
|
+
margin-top: ($menu-item-line-height-large - $pt-icon-size-standard) * 0.5;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&::before {
|
|
106
|
+
@include pt-icon($pt-icon-size-large);
|
|
107
|
+
margin-right: $menu-item-padding-large;
|
|
108
|
+
margin-top: ($menu-item-line-height-large - $pt-icon-size-large) * 0.5;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
button.#{$ns}-menu-item {
|
|
114
|
+
background: none;
|
|
115
|
+
border: none;
|
|
116
|
+
text-align: left;
|
|
117
|
+
width: 100%;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/*
|
|
121
|
+
Menu headers
|
|
122
|
+
|
|
123
|
+
Markup:
|
|
124
|
+
<ul class="#{$ns}-menu #{$ns}-elevation-1">
|
|
125
|
+
<li class="#{$ns}-menu-header"><h6 class="#{$ns}-heading">Layouts</h6></li>
|
|
126
|
+
<li><button type="button" class="#{$ns}-menu-item #{$ns}-icon-layout-auto">Auto</button></li>
|
|
127
|
+
<li><button type="button" class="#{$ns}-menu-item #{$ns}-icon-layout-circle">Circle</button></li>
|
|
128
|
+
<li><button type="button" class="#{$ns}-menu-item #{$ns}-icon-layout-grid">Grid</button></li>
|
|
129
|
+
<li class="#{$ns}-menu-header"><h6 class="#{$ns}-heading">Views</h6></li>
|
|
130
|
+
<li><button type="button" class="#{$ns}-menu-item #{$ns}-icon-history">History</button></li>
|
|
131
|
+
<li><button type="button" class="#{$ns}-menu-item #{$ns}-icon-star">Favorites</button></li>
|
|
132
|
+
<li><button type="button" class="#{$ns}-menu-item #{$ns}-icon-envelope">Messages</button></li>
|
|
133
|
+
</ul>
|
|
134
|
+
|
|
135
|
+
Styleguide menu-header
|
|
136
|
+
*/
|
|
137
|
+
|
|
138
|
+
.#{$ns}-menu-header {
|
|
139
|
+
@include menu-header($heading-selector: "> h6");
|
|
140
|
+
|
|
141
|
+
.#{$ns}-large & {
|
|
142
|
+
@include menu-header-large($heading-selector: "> h6");
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// dark theme
|
|
147
|
+
.#{$ns}-dark {
|
|
148
|
+
.#{$ns}-menu {
|
|
149
|
+
background: $dark-menu-background-color;
|
|
150
|
+
color: $pt-dark-text-color;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.#{$ns}-menu-item {
|
|
154
|
+
@include menu-item-intent($pt-dark-intent-text-colors);
|
|
155
|
+
|
|
156
|
+
&::before,
|
|
157
|
+
> .#{$ns}-icon {
|
|
158
|
+
color: $pt-dark-icon-color;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.#{$ns}-menu-item-label {
|
|
162
|
+
color: $pt-dark-text-color-muted;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&.#{$ns}-active,
|
|
166
|
+
&:active {
|
|
167
|
+
background-color: $dark-menu-item-color-active;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// pt-disable always overrides over styles
|
|
171
|
+
// stylelint-disable declaration-no-important
|
|
172
|
+
&.#{$ns}-disabled {
|
|
173
|
+
color: $pt-dark-text-color-disabled !important;
|
|
174
|
+
|
|
175
|
+
&::before,
|
|
176
|
+
> .#{$ns}-icon,
|
|
177
|
+
.#{$ns}-menu-item-label {
|
|
178
|
+
color: $pt-dark-icon-color-disabled !important;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
// stylelint-enable declaration-no-important
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.#{$ns}-menu-divider,
|
|
185
|
+
.#{$ns}-menu-header {
|
|
186
|
+
border-color: $pt-dark-divider-white;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.#{$ns}-menu-header > h6 {
|
|
190
|
+
color: $pt-dark-heading-color;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// #402 support menu inside label
|
|
195
|
+
.#{$ns}-label .#{$ns}-menu {
|
|
196
|
+
margin-top: $pt-grid-size * 0.5;
|
|
197
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Copyright 2016 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@import "../../common/variables";
|
|
5
|
+
@import "~@blueprintjs/icons/src/icons";
|
|
6
|
+
@import "./common";
|
|
7
|
+
|
|
8
|
+
.#{$ns}-submenu {
|
|
9
|
+
> .#{$ns}-popover-wrapper {
|
|
10
|
+
display: block;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.#{$ns}-popover-target {
|
|
14
|
+
display: block;
|
|
15
|
+
|
|
16
|
+
&.#{$ns}-popover-open > .#{$ns}-menu-item {
|
|
17
|
+
// keep a trail of hovered items as submenus are opened
|
|
18
|
+
// stylelint-disable-next-line scss/at-extend-no-missing-placeholder
|
|
19
|
+
@extend .#{$ns}-menu-item, :hover;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&.#{$ns}-popover {
|
|
24
|
+
box-shadow: none;
|
|
25
|
+
// horizontal padding leaves some space from parent menu item, and extends mouse zone
|
|
26
|
+
padding: 0 $half-grid-size;
|
|
27
|
+
|
|
28
|
+
> .#{$ns}-popover-content {
|
|
29
|
+
box-shadow: $pt-popover-box-shadow;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.#{$ns}-dark &,
|
|
33
|
+
&.#{$ns}-dark {
|
|
34
|
+
box-shadow: none;
|
|
35
|
+
|
|
36
|
+
> .#{$ns}-popover-content {
|
|
37
|
+
box-shadow: $pt-dark-popover-box-shadow;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// Copyright 2015 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@import "../../common/variables";
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
Navbars
|
|
8
|
+
|
|
9
|
+
Markup:
|
|
10
|
+
<nav class="#{$ns}-navbar {{.modifier}}">
|
|
11
|
+
<div class="#{$ns}-navbar-group #{$ns}-align-left">
|
|
12
|
+
<div class="#{$ns}-navbar-heading">Blueprint</div>
|
|
13
|
+
<input class="#{$ns}-input" placeholder="Search files..." type="text" />
|
|
14
|
+
</div>
|
|
15
|
+
<div class="#{$ns}-navbar-group #{$ns}-align-right">
|
|
16
|
+
<button class="#{$ns}-button #{$ns}-minimal #{$ns}-icon-home">Home</button>
|
|
17
|
+
<button class="#{$ns}-button #{$ns}-minimal #{$ns}-icon-document">Files</button>
|
|
18
|
+
<span class="#{$ns}-navbar-divider"></span>
|
|
19
|
+
<button class="#{$ns}-button #{$ns}-minimal #{$ns}-icon-user"></button>
|
|
20
|
+
<button class="#{$ns}-button #{$ns}-minimal #{$ns}-icon-notifications"></button>
|
|
21
|
+
<button class="#{$ns}-button #{$ns}-minimal #{$ns}-icon-cog"></button>
|
|
22
|
+
</div>
|
|
23
|
+
</nav>
|
|
24
|
+
|
|
25
|
+
.#{$ns}-dark - Dark theme
|
|
26
|
+
|
|
27
|
+
Styleguide navbar
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
$navbar-padding: $pt-grid-size * 1.5 !default;
|
|
31
|
+
|
|
32
|
+
$navbar-background-color: $white !default;
|
|
33
|
+
$dark-navbar-background-color: $dark-gray5 !default;
|
|
34
|
+
|
|
35
|
+
.#{$ns}-navbar {
|
|
36
|
+
background-color: $navbar-background-color;
|
|
37
|
+
box-shadow: $pt-elevation-shadow-1;
|
|
38
|
+
height: $pt-navbar-height;
|
|
39
|
+
padding: 0 $navbar-padding;
|
|
40
|
+
position: relative;
|
|
41
|
+
width: 100%;
|
|
42
|
+
z-index: $pt-z-index-content;
|
|
43
|
+
|
|
44
|
+
&.#{$ns}-dark,
|
|
45
|
+
.#{$ns}-dark & {
|
|
46
|
+
background-color: $dark-navbar-background-color;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// shadow for dark navbar in light theme apps
|
|
50
|
+
&.#{$ns}-dark {
|
|
51
|
+
box-shadow: inset $pt-dark-elevation-shadow-1;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// shadow for dark navbar in dark theme apps
|
|
55
|
+
.#{$ns}-dark & {
|
|
56
|
+
box-shadow: $pt-dark-elevation-shadow-1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&.#{$ns}-fixed-top {
|
|
60
|
+
left: 0;
|
|
61
|
+
position: fixed;
|
|
62
|
+
right: 0;
|
|
63
|
+
top: 0;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.#{$ns}-navbar-heading {
|
|
68
|
+
font-size: $pt-font-size-large;
|
|
69
|
+
margin-right: $navbar-padding;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.#{$ns}-navbar-group {
|
|
73
|
+
align-items: center;
|
|
74
|
+
display: flex;
|
|
75
|
+
height: $pt-navbar-height;
|
|
76
|
+
|
|
77
|
+
&.#{$ns}-align-left {
|
|
78
|
+
float: left;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&.#{$ns}-align-right {
|
|
82
|
+
float: right;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.#{$ns}-navbar-divider {
|
|
87
|
+
border-left: 1px solid $pt-divider-black;
|
|
88
|
+
height: $pt-navbar-height - $pt-grid-size * 3;
|
|
89
|
+
margin: 0 $pt-grid-size;
|
|
90
|
+
|
|
91
|
+
.#{$ns}-dark & {
|
|
92
|
+
border-left-color: $pt-dark-divider-white;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/*
|
|
97
|
+
Fixed width
|
|
98
|
+
|
|
99
|
+
Markup:
|
|
100
|
+
<nav class="#{$ns}-navbar #{$ns}-dark">
|
|
101
|
+
<div style="margin: 0 auto; width: 480px;"> <!-- ADD ME -->
|
|
102
|
+
<div class="#{$ns}-navbar-group #{$ns}-align-left">
|
|
103
|
+
<div class="#{$ns}-navbar-heading">Blueprint</div>
|
|
104
|
+
</div>
|
|
105
|
+
<div class="#{$ns}-navbar-group #{$ns}-align-right">
|
|
106
|
+
<button class="#{$ns}-button #{$ns}-minimal #{$ns}-icon-home">Home</button>
|
|
107
|
+
<button class="#{$ns}-button #{$ns}-minimal #{$ns}-icon-document">Files</button>
|
|
108
|
+
<span class="#{$ns}-navbar-divider"></span>
|
|
109
|
+
<button class="#{$ns}-button #{$ns}-minimal #{$ns}-icon-user"></button>
|
|
110
|
+
<button class="#{$ns}-button #{$ns}-minimal #{$ns}-icon-notifications"></button>
|
|
111
|
+
<button class="#{$ns}-button #{$ns}-minimal #{$ns}-icon-cog"></button>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
</nav>
|
|
115
|
+
|
|
116
|
+
Styleguide navbar-container
|
|
117
|
+
*/
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Copyright 2016 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@import "../../common/variables";
|
|
5
|
+
@import "../../common/mixins";
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
Non-ideal state
|
|
9
|
+
|
|
10
|
+
Markup:
|
|
11
|
+
<div class="#{$ns}-non-ideal-state">
|
|
12
|
+
<div class="#{$ns}-non-ideal-state-visual">
|
|
13
|
+
<span class="#{$ns}-icon #{$ns}-icon-folder-open"></span>
|
|
14
|
+
</div>
|
|
15
|
+
<h4 class="#{$ns}-heading">This folder is empty</h4>
|
|
16
|
+
<div>Create a new file to populate the folder.</div>
|
|
17
|
+
<button class="#{$ns}-button #{$ns}-intent-primary">Create</button>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
Styleguide non-ideal-state
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
.#{$ns}-non-ideal-state {
|
|
24
|
+
@include pt-flex-container(column, $pt-grid-size * 2);
|
|
25
|
+
align-items: center;
|
|
26
|
+
height: 100%;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
text-align: center;
|
|
29
|
+
width: 100%;
|
|
30
|
+
|
|
31
|
+
> * {
|
|
32
|
+
max-width: $pt-grid-size * 40;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.#{$ns}-non-ideal-state-visual {
|
|
37
|
+
color: $pt-icon-color-disabled;
|
|
38
|
+
font-size: $pt-icon-size-large * 3;
|
|
39
|
+
|
|
40
|
+
.#{$ns}-dark & {
|
|
41
|
+
color: $pt-dark-icon-color-disabled;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright 2018 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
.#{$ns}-overflow-list {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-wrap: nowrap;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.#{$ns}-overflow-list-spacer {
|
|
11
|
+
flex-shrink: 1;
|
|
12
|
+
width: 1px;
|
|
13
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// Copyright 2016 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@import "../../common/variables";
|
|
5
|
+
|
|
6
|
+
$overlay-background-color: rgba($black, 0.7) !default;
|
|
7
|
+
|
|
8
|
+
// restricts scrolling of underlying content while the overlay is open
|
|
9
|
+
body.#{$ns}-overlay-open {
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.#{$ns}-overlay {
|
|
14
|
+
// 0-out all positions so page won't jump when position changes (0s already there)
|
|
15
|
+
@include position-all(static, 0);
|
|
16
|
+
z-index: $pt-z-index-overlay;
|
|
17
|
+
|
|
18
|
+
&:not(.#{$ns}-overlay-open) {
|
|
19
|
+
// because of the 0-position covering the viewport,
|
|
20
|
+
// we must ignore the mouse when not open
|
|
21
|
+
pointer-events: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.#{$ns}-overlay-container {
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
// container covers the entire viewport
|
|
27
|
+
position: fixed;
|
|
28
|
+
|
|
29
|
+
&.#{$ns}-overlay-inline {
|
|
30
|
+
// when rendered inline, we want the overlay to position itself relative to
|
|
31
|
+
// its parent container, not relative to the whole window. thus, we change
|
|
32
|
+
// to position:absolute.
|
|
33
|
+
position: absolute;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.#{$ns}-overlay-scroll-container {
|
|
38
|
+
overflow: auto;
|
|
39
|
+
// scroll container covers the entire viewport
|
|
40
|
+
position: fixed;
|
|
41
|
+
|
|
42
|
+
&.#{$ns}-overlay-inline {
|
|
43
|
+
// when rendered inline, we want the overlay to position itself relative to
|
|
44
|
+
// its parent container, not relative to the whole window. thus, we change
|
|
45
|
+
// to position:absolute.
|
|
46
|
+
position: absolute;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&.#{$ns}-overlay-inline {
|
|
51
|
+
display: inline;
|
|
52
|
+
// inline overlays can overflow container by default (see Dialog & Popover)
|
|
53
|
+
overflow: visible;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// this class is added to each Overlay child so that users won't need to
|
|
58
|
+
// explicitly manage the position mode for inline and non-inline rendering.
|
|
59
|
+
.#{$ns}-overlay-content {
|
|
60
|
+
// default fixed pulls it out of the flow and makes it viewport-relative
|
|
61
|
+
position: fixed;
|
|
62
|
+
z-index: $pt-z-index-overlay;
|
|
63
|
+
|
|
64
|
+
.#{$ns}-overlay-inline &,
|
|
65
|
+
.#{$ns}-overlay-scroll-container & {
|
|
66
|
+
// but inline (or scrollable) overlays want their children to respect
|
|
67
|
+
// the parent positioning context. also allows the content to scroll.
|
|
68
|
+
position: absolute;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// fixed position so the backdrop forecefully covers the whole screen
|
|
73
|
+
.#{$ns}-overlay-backdrop {
|
|
74
|
+
@include position-all(fixed, 0);
|
|
75
|
+
@include react-transition(
|
|
76
|
+
"#{$ns}-overlay",
|
|
77
|
+
(opacity: 0 1),
|
|
78
|
+
$pt-transition-duration * 2,
|
|
79
|
+
$before: "&"
|
|
80
|
+
);
|
|
81
|
+
background-color: $overlay-background-color;
|
|
82
|
+
overflow: auto;
|
|
83
|
+
user-select: none;
|
|
84
|
+
z-index: $pt-z-index-overlay;
|
|
85
|
+
|
|
86
|
+
&:focus {
|
|
87
|
+
outline: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// as mentioned above: when inline, Overlay backdrop must respect parent
|
|
91
|
+
.#{$ns}-overlay-inline & {
|
|
92
|
+
position: absolute;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// Copyright 2018 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@import "../../common/variables";
|
|
5
|
+
@import "~@blueprintjs/core/src/common/react-transition";
|
|
6
|
+
|
|
7
|
+
.#{$ns}-panel-stack {
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
position: relative;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.#{$ns}-panel-stack-header {
|
|
13
|
+
align-items: center;
|
|
14
|
+
box-shadow: 0 1px $pt-divider-black;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-shrink: 0;
|
|
17
|
+
height: $pt-grid-size * 3;
|
|
18
|
+
z-index: 1;
|
|
19
|
+
|
|
20
|
+
.#{$ns}-dark & {
|
|
21
|
+
box-shadow: 0 1px $pt-dark-divider-white;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// two span children act as spacers to keep the title centered.
|
|
25
|
+
> span {
|
|
26
|
+
align-items: stretch;
|
|
27
|
+
display: flex;
|
|
28
|
+
flex: 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.#{$ns}-heading {
|
|
32
|
+
margin: 0 ($pt-grid-size * 0.5);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.#{$ns}-button.#{$ns}-panel-stack-header-back {
|
|
37
|
+
margin-left: $pt-grid-size * 0.5;
|
|
38
|
+
padding-left: 0;
|
|
39
|
+
white-space: nowrap;
|
|
40
|
+
|
|
41
|
+
.#{$ns}-icon {
|
|
42
|
+
// reduce margins around icon so it fits better in tight header
|
|
43
|
+
margin: 0 2px;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.#{$ns}-panel-stack-view {
|
|
48
|
+
@include position-all(absolute, 0);
|
|
49
|
+
|
|
50
|
+
background-color: $white;
|
|
51
|
+
border-right: 1px solid $pt-divider-black;
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
|
|
55
|
+
// border between panels, visible during transition
|
|
56
|
+
margin-right: -1px;
|
|
57
|
+
overflow-y: auto;
|
|
58
|
+
z-index: 1;
|
|
59
|
+
|
|
60
|
+
.#{$ns}-dark & {
|
|
61
|
+
background-color: $dark-gray4;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:nth-last-child(n + 4) {
|
|
65
|
+
display: none;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// PUSH transition: enter from right (100%), existing panel moves off left.
|
|
70
|
+
.#{$ns}-panel-stack-push {
|
|
71
|
+
@include react-transition-phase(
|
|
72
|
+
"#{$ns}-panel-stack",
|
|
73
|
+
"enter",
|
|
74
|
+
(transform: translateX(100%) translate(0%), opacity: 0 1),
|
|
75
|
+
$easing: ease,
|
|
76
|
+
$duration: $pt-transition-duration * 4
|
|
77
|
+
);
|
|
78
|
+
@include react-transition-phase(
|
|
79
|
+
"#{$ns}-panel-stack",
|
|
80
|
+
"exit",
|
|
81
|
+
(transform: translateX(-50%) translate(0%), opacity: 0 1),
|
|
82
|
+
$easing: ease,
|
|
83
|
+
$duration: $pt-transition-duration * 4
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// POP transition: enter from left (-50%), existing panel moves off right.
|
|
88
|
+
.#{$ns}-panel-stack-pop {
|
|
89
|
+
@include react-transition-phase(
|
|
90
|
+
"#{$ns}-panel-stack",
|
|
91
|
+
"enter",
|
|
92
|
+
(transform: translateX(-50%) translate(0%), opacity: 0 1),
|
|
93
|
+
$easing: ease,
|
|
94
|
+
$duration: $pt-transition-duration * 4
|
|
95
|
+
);
|
|
96
|
+
@include react-transition-phase(
|
|
97
|
+
"#{$ns}-panel-stack",
|
|
98
|
+
"exit",
|
|
99
|
+
(transform: translateX(100%) translate(0%), opacity: 0 1),
|
|
100
|
+
$easing: ease,
|
|
101
|
+
$duration: $pt-transition-duration * 4
|
|
102
|
+
);
|
|
103
|
+
}
|