@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,75 @@
|
|
|
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 "./common";
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
Tags
|
|
9
|
+
|
|
10
|
+
Markup:
|
|
11
|
+
<span class="#{$ns}-tag {{.modifier}}">125</span>
|
|
12
|
+
<span class="#{$ns}-tag {{.modifier}}">Done</span>
|
|
13
|
+
<span class="#{$ns}-tag {{.modifier}}">
|
|
14
|
+
Tracking
|
|
15
|
+
<button class="#{$ns}-tag-remove"></button>
|
|
16
|
+
</span>
|
|
17
|
+
<span class="#{$ns}-tag {{.modifier}}">
|
|
18
|
+
Crushed
|
|
19
|
+
<button class="#{$ns}-tag-remove"></button>
|
|
20
|
+
</span>
|
|
21
|
+
<span class="#{$ns}-tag {{.modifier}}">
|
|
22
|
+
A rather long string of text that wraps to multiple lines
|
|
23
|
+
demonstrates the position of the remove button.
|
|
24
|
+
<button class="#{$ns}-tag-remove"></button>
|
|
25
|
+
</span>
|
|
26
|
+
|
|
27
|
+
.#{$ns}-large - Large
|
|
28
|
+
.#{$ns}-minimal - Minimal appearance
|
|
29
|
+
.#{$ns}-round - Rounded corners, ideal for badges
|
|
30
|
+
.#{$ns}-interactive - Hover and active effects
|
|
31
|
+
.#{$ns}-intent-primary - Primary intent
|
|
32
|
+
.#{$ns}-intent-success - Success intent
|
|
33
|
+
.#{$ns}-intent-warning - Warning intent
|
|
34
|
+
.#{$ns}-intent-danger - Danger intent
|
|
35
|
+
|
|
36
|
+
Styleguide tag
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
.#{$ns}-tag {
|
|
40
|
+
@include pt-tag();
|
|
41
|
+
|
|
42
|
+
&.#{$ns}-large,
|
|
43
|
+
.#{$ns}-large & {
|
|
44
|
+
@include pt-tag-large();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@each $intent, $color in $pt-intent-colors {
|
|
48
|
+
&.#{$ns}-intent-#{$intent} {
|
|
49
|
+
@include pt-tag-intent($color);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&.#{$ns}-fill {
|
|
54
|
+
display: flex;
|
|
55
|
+
width: 100%;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&.#{$ns}-minimal {
|
|
59
|
+
@include pt-tag-minimal();
|
|
60
|
+
|
|
61
|
+
@each $intent, $color in $pt-intent-colors {
|
|
62
|
+
&.#{$ns}-intent-#{$intent} {
|
|
63
|
+
@include pt-tag-minimal-intent(
|
|
64
|
+
$color,
|
|
65
|
+
map-get($pt-intent-text-colors, $intent),
|
|
66
|
+
map-get($pt-dark-intent-text-colors, $intent)
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.#{$ns}-tag-remove {
|
|
74
|
+
@include pt-tag-remove();
|
|
75
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
// Copyright 2017 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@import "../../common/variables";
|
|
5
|
+
@import "../forms/common";
|
|
6
|
+
@import "../tag/common";
|
|
7
|
+
|
|
8
|
+
$tag-input-padding: ($pt-input-height - $tag-height) * 0.5 !default;
|
|
9
|
+
|
|
10
|
+
$tag-input-icon-padding: ($pt-input-height - $pt-icon-size-standard) * 0.5 !default;
|
|
11
|
+
$tag-input-icon-padding-large: ($pt-input-height-large - $pt-icon-size-large) * 0.5 !default;
|
|
12
|
+
|
|
13
|
+
.#{$ns}-tag-input {
|
|
14
|
+
@include pt-flex-container(row, $fill: ".#{$ns}-tag-input-values");
|
|
15
|
+
align-items: flex-start;
|
|
16
|
+
cursor: text;
|
|
17
|
+
height: auto;
|
|
18
|
+
line-height: inherit;
|
|
19
|
+
min-height: $pt-input-height;
|
|
20
|
+
padding-left: $tag-input-padding;
|
|
21
|
+
padding-right: 0;
|
|
22
|
+
|
|
23
|
+
.#{$ns}-tag-input-icon {
|
|
24
|
+
color: $pt-icon-color;
|
|
25
|
+
margin-left: $tag-input-icon-padding - $tag-input-padding;
|
|
26
|
+
margin-right: $tag-input-icon-padding;
|
|
27
|
+
// margins to center icon in one-line input
|
|
28
|
+
margin-top: $tag-input-icon-padding;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.#{$ns}-tag-input-values {
|
|
32
|
+
@include pt-flex-container(row, $tag-input-padding);
|
|
33
|
+
align-items: center;
|
|
34
|
+
// fill vertical height
|
|
35
|
+
align-self: stretch;
|
|
36
|
+
flex-wrap: wrap;
|
|
37
|
+
margin-right: $tag-input-icon-padding;
|
|
38
|
+
margin-top: $tag-input-padding;
|
|
39
|
+
// allow tags to ellipse and not overflow the container
|
|
40
|
+
min-width: 0;
|
|
41
|
+
|
|
42
|
+
// use the larger, conventional input padding when there are no tags and no left icon present.
|
|
43
|
+
// see: https://github.com/palantir/blueprint/issues/2872
|
|
44
|
+
&:first-child .#{$ns}-input-ghost:first-child {
|
|
45
|
+
// recall that some padding-left is already applied on the root component.
|
|
46
|
+
padding-left: $input-padding-horizontal - $tag-input-padding;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
> * {
|
|
50
|
+
margin-bottom: $tag-input-padding;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.#{$ns}-tag {
|
|
55
|
+
// NOTE: in order to wrap long words, you must set explicit width on TagInput,
|
|
56
|
+
// or use .#{$ns}-fill CSS class modifier.
|
|
57
|
+
overflow-wrap: break-word;
|
|
58
|
+
|
|
59
|
+
&.#{$ns}-active {
|
|
60
|
+
@include focus-outline(0);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.#{$ns}-input-ghost {
|
|
65
|
+
// input fills remaining line
|
|
66
|
+
flex: 1 1 auto;
|
|
67
|
+
line-height: $tag-height;
|
|
68
|
+
// essentially a min-width, cuz flex allows it to grow or shrink:
|
|
69
|
+
width: $pt-grid-size * 8;
|
|
70
|
+
|
|
71
|
+
&:disabled,
|
|
72
|
+
&.#{$ns}-disabled {
|
|
73
|
+
cursor: not-allowed;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.#{$ns}-button,
|
|
78
|
+
.#{$ns}-spinner {
|
|
79
|
+
margin: ($pt-input-height - $pt-button-height-small) * 0.5;
|
|
80
|
+
margin-left: 0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.#{$ns}-button {
|
|
84
|
+
@include pt-button-height-small();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&.#{$ns}-large {
|
|
88
|
+
@include pt-flex-margin(row, $tag-input-icon-padding-large);
|
|
89
|
+
height: auto;
|
|
90
|
+
min-height: $pt-input-height-large;
|
|
91
|
+
|
|
92
|
+
.#{$ns}-tag-input-icon {
|
|
93
|
+
margin-left: $tag-input-icon-padding-large - $tag-input-padding;
|
|
94
|
+
margin-top: $tag-input-icon-padding-large;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.#{$ns}-input-ghost {
|
|
98
|
+
line-height: $tag-height-large;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.#{$ns}-button {
|
|
102
|
+
@include pt-button-height-default();
|
|
103
|
+
margin: ($pt-input-height-large - $pt-button-height) * 0.5;
|
|
104
|
+
margin-left: 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.#{$ns}-spinner {
|
|
108
|
+
margin: ($pt-input-height-large - $pt-button-height-small) * 0.5;
|
|
109
|
+
margin-left: 0;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&.#{$ns}-active {
|
|
114
|
+
background-color: $input-background-color;
|
|
115
|
+
box-shadow: input-transition-shadow($input-shadow-color-focus, true), $input-box-shadow-focus;
|
|
116
|
+
|
|
117
|
+
@each $intent, $color in $pt-intent-text-colors {
|
|
118
|
+
&.#{$ns}-intent-#{$intent} {
|
|
119
|
+
box-shadow: input-transition-shadow($color, true), $input-box-shadow-focus;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.#{$ns}-dark &,
|
|
125
|
+
&.#{$ns}-dark {
|
|
126
|
+
.#{$ns}-tag-input-icon {
|
|
127
|
+
color: $pt-dark-icon-color;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.#{$ns}-input-ghost {
|
|
131
|
+
@include pt-dark-input-placeholder();
|
|
132
|
+
|
|
133
|
+
color: $dark-input-color;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&.#{$ns}-active {
|
|
137
|
+
background-color: $dark-input-background-color;
|
|
138
|
+
box-shadow: dark-input-transition-shadow($dark-input-shadow-color-focus, true),
|
|
139
|
+
$pt-dark-input-box-shadow;
|
|
140
|
+
|
|
141
|
+
@each $intent, $color in $pt-intent-text-colors {
|
|
142
|
+
&.#{$ns}-intent-#{$intent} {
|
|
143
|
+
box-shadow: input-transition-shadow($color, true), $pt-dark-input-box-shadow;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// TODO: this is probably a useful modifier that we should pull into core, and use in EditableText
|
|
151
|
+
.#{$ns}-input-ghost {
|
|
152
|
+
@include pt-input-placeholder();
|
|
153
|
+
background: none;
|
|
154
|
+
|
|
155
|
+
// reset browser input styles (we're using an input solely because you can type in it)
|
|
156
|
+
border: none;
|
|
157
|
+
box-shadow: none;
|
|
158
|
+
padding: 0;
|
|
159
|
+
|
|
160
|
+
&:focus {
|
|
161
|
+
// remove focus state too
|
|
162
|
+
// stylelint-disable-next-line declaration-no-important
|
|
163
|
+
outline: none !important;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
@@ -0,0 +1,203 @@
|
|
|
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/react-transition";
|
|
6
|
+
|
|
7
|
+
$toast-height: $pt-button-height-large !default;
|
|
8
|
+
$toast-min-width: $pt-grid-size * 30 !default;
|
|
9
|
+
$toast-max-width: $pt-grid-size * 50 !default;
|
|
10
|
+
$toast-margin: $pt-grid-size * 2 !default;
|
|
11
|
+
|
|
12
|
+
.#{$ns}-toast {
|
|
13
|
+
// toast transition properties
|
|
14
|
+
$enter-translate: (transform: translateY(-$toast-height) translateY(0));
|
|
15
|
+
$leave-blur: (opacity: 0 1, filter: blur($pt-grid-size) blur(0));
|
|
16
|
+
|
|
17
|
+
// new toasts slide in from the top
|
|
18
|
+
@include react-transition-phase(
|
|
19
|
+
"#{$ns}-toast",
|
|
20
|
+
"enter",
|
|
21
|
+
$enter-translate,
|
|
22
|
+
$duration: $pt-transition-duration * 3,
|
|
23
|
+
$easing: $pt-transition-ease-bounce,
|
|
24
|
+
$before: "&"
|
|
25
|
+
);
|
|
26
|
+
@include react-transition-phase(
|
|
27
|
+
"#{$ns}-toast",
|
|
28
|
+
"enter",
|
|
29
|
+
$enter-translate,
|
|
30
|
+
$duration: $pt-transition-duration * 3,
|
|
31
|
+
$easing: $pt-transition-ease-bounce,
|
|
32
|
+
$before: "&",
|
|
33
|
+
$after: "~ &"
|
|
34
|
+
);
|
|
35
|
+
// leaving toasts simply fade away
|
|
36
|
+
@include react-transition-phase(
|
|
37
|
+
"#{$ns}-toast",
|
|
38
|
+
"exit",
|
|
39
|
+
$leave-blur,
|
|
40
|
+
$duration: $pt-transition-duration * 3,
|
|
41
|
+
$before: "&"
|
|
42
|
+
);
|
|
43
|
+
// younger siblings of leaving toasts wait a moment before moving to fill gap
|
|
44
|
+
@include react-transition-phase(
|
|
45
|
+
"#{$ns}-toast",
|
|
46
|
+
"exit",
|
|
47
|
+
$enter-translate,
|
|
48
|
+
$delay: $pt-transition-duration * 0.5,
|
|
49
|
+
$before: "&",
|
|
50
|
+
$after: "~ &"
|
|
51
|
+
);
|
|
52
|
+
align-items: flex-start;
|
|
53
|
+
background-color: $white;
|
|
54
|
+
border-radius: $pt-border-radius;
|
|
55
|
+
box-shadow: $pt-elevation-shadow-3;
|
|
56
|
+
display: flex;
|
|
57
|
+
margin: $toast-margin 0 0;
|
|
58
|
+
max-width: $toast-max-width;
|
|
59
|
+
min-width: $toast-min-width;
|
|
60
|
+
|
|
61
|
+
// toast is interactive even though container isn't
|
|
62
|
+
pointer-events: all;
|
|
63
|
+
|
|
64
|
+
// override inline styles (#367): toasts rely on relative positioning for stacking.
|
|
65
|
+
// stylelint-disable-next-line declaration-no-important
|
|
66
|
+
position: relative !important;
|
|
67
|
+
|
|
68
|
+
.#{$ns}-button-group {
|
|
69
|
+
flex: 0 0 auto;
|
|
70
|
+
padding: ($toast-height - $pt-button-height) * 0.5;
|
|
71
|
+
padding-left: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
> .#{$ns}-icon {
|
|
75
|
+
color: $pt-icon-color;
|
|
76
|
+
margin: ($toast-height - $pt-icon-size-standard) * 0.5;
|
|
77
|
+
margin-right: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&.#{$ns}-dark,
|
|
81
|
+
.#{$ns}-dark & {
|
|
82
|
+
background-color: $dark-gray5;
|
|
83
|
+
box-shadow: $pt-dark-elevation-shadow-3;
|
|
84
|
+
|
|
85
|
+
> .#{$ns}-icon {
|
|
86
|
+
color: $pt-dark-icon-color;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&[class*="#{$ns}-intent-"] {
|
|
91
|
+
a {
|
|
92
|
+
color: rgba($white, 0.7);
|
|
93
|
+
|
|
94
|
+
&:hover {
|
|
95
|
+
color: $white;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
> .#{$ns}-icon {
|
|
100
|
+
color: $white;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// HACKHACK custom colors for buttons on intent background so they always show up nice
|
|
105
|
+
// stylelint-disable declaration-no-important
|
|
106
|
+
&[class*="#{$ns}-intent-"] .#{$ns}-button {
|
|
107
|
+
&,
|
|
108
|
+
&::before,
|
|
109
|
+
.#{$ns}-icon,
|
|
110
|
+
&:active {
|
|
111
|
+
color: rgba($white, 0.7) !important;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&:focus {
|
|
115
|
+
// blue outline color shows poorly on colored bg
|
|
116
|
+
outline-color: rgba($white, 0.5);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&:hover {
|
|
120
|
+
background-color: rgba($white, 0.15) !important;
|
|
121
|
+
color: $white !important;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&:active {
|
|
125
|
+
background-color: rgba($white, 0.3) !important;
|
|
126
|
+
color: $white !important;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&::after {
|
|
130
|
+
background: rgba($white, 0.3) !important;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
// stylelint-enable declaration-no-important
|
|
134
|
+
|
|
135
|
+
// define these last so they override default dark colors above
|
|
136
|
+
@each $intent, $color in $pt-intent-colors {
|
|
137
|
+
&.#{$ns}-intent-#{$intent} {
|
|
138
|
+
background-color: $color;
|
|
139
|
+
color: $white;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.#{$ns}-toast-message {
|
|
145
|
+
flex: 1 1 auto;
|
|
146
|
+
padding: centered-text($toast-height);
|
|
147
|
+
word-break: break-word;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.#{$ns}-toast-container {
|
|
151
|
+
align-items: center;
|
|
152
|
+
// override inline overlay styles (#2626)
|
|
153
|
+
// stylelint-disable-next-line declaration-no-important
|
|
154
|
+
display: flex !important;
|
|
155
|
+
flex-direction: column;
|
|
156
|
+
left: 0;
|
|
157
|
+
// toasts have margin-top so omit it on container
|
|
158
|
+
|
|
159
|
+
// prevent container from scrolling as new toasts enter (from bottom)
|
|
160
|
+
overflow: hidden;
|
|
161
|
+
|
|
162
|
+
// ensure there's enough space for full box-shadow
|
|
163
|
+
padding: 0 $toast-margin $toast-margin;
|
|
164
|
+
|
|
165
|
+
// container will not block clicks on elements behind it
|
|
166
|
+
pointer-events: none;
|
|
167
|
+
|
|
168
|
+
position: fixed;
|
|
169
|
+
right: 0;
|
|
170
|
+
|
|
171
|
+
// #975 ensure toasts are on top of everything (esp dialogs)
|
|
172
|
+
z-index: $pt-z-index-overlay * 2;
|
|
173
|
+
|
|
174
|
+
&.#{$ns}-toast-container-top {
|
|
175
|
+
top: 0;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&.#{$ns}-toast-container-bottom {
|
|
179
|
+
bottom: 0;
|
|
180
|
+
flex-direction: column-reverse;
|
|
181
|
+
top: auto;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&.#{$ns}-toast-container-left {
|
|
185
|
+
align-items: flex-start;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
&.#{$ns}-toast-container-right {
|
|
189
|
+
align-items: flex-end;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.#{$ns}-toast-container-bottom .#{$ns}-toast {
|
|
194
|
+
// minimal diff in react-transition styles so we can avoid calling those mixins again
|
|
195
|
+
&.#{$ns}-toast-enter:not(.#{$ns}-toast-enter-active),
|
|
196
|
+
&.#{$ns}-toast-enter:not(.#{$ns}-toast-enter-active) ~ .#{$ns}-toast,
|
|
197
|
+
&.#{$ns}-toast-appear:not(.#{$ns}-toast-appear-active),
|
|
198
|
+
&.#{$ns}-toast-appear:not(.#{$ns}-toast-appear-active) ~ .#{$ns}-toast,
|
|
199
|
+
&.#{$ns}-toast-exit-active ~ .#{$ns}-toast,
|
|
200
|
+
&.#{$ns}-toast-leave-active ~ .#{$ns}-toast {
|
|
201
|
+
transform: translateY($toast-margin + $toast-height);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Copyright 2016 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
$tooltip-background-color: $dark-gray5 !default;
|
|
5
|
+
$tooltip-text-color: $light-gray5 !default;
|
|
6
|
+
|
|
7
|
+
$dark-tooltip-background-color: $light-gray3 !default;
|
|
8
|
+
$dark-tooltip-text-color: $dark-gray5 !default;
|
|
9
|
+
|
|
10
|
+
$tooltip-padding-vertical: $pt-grid-size !default;
|
|
11
|
+
$tooltip-padding-horizontal: 1.2 * $pt-grid-size !default;
|
|
@@ -0,0 +1,61 @@
|
|
|
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 "../popover/common";
|
|
6
|
+
@import "./common";
|
|
7
|
+
|
|
8
|
+
.#{$ns}-tooltip {
|
|
9
|
+
@include popover-sizing(
|
|
10
|
+
$arrow-square-size: 22px,
|
|
11
|
+
$arrow-offset: 3px,
|
|
12
|
+
$arrow-target-offset: -4px
|
|
13
|
+
);
|
|
14
|
+
@include popover-appearance(
|
|
15
|
+
$tooltip-background-color,
|
|
16
|
+
$tooltip-text-color,
|
|
17
|
+
$pt-tooltip-box-shadow,
|
|
18
|
+
$pt-drop-shadow-opacity,
|
|
19
|
+
$pt-border-shadow-opacity
|
|
20
|
+
);
|
|
21
|
+
// lightweight scale for tooltips
|
|
22
|
+
@include react-transition(
|
|
23
|
+
"#{$ns}-popover",
|
|
24
|
+
(transform: scale(0.8) scale(1)),
|
|
25
|
+
$duration: $pt-transition-duration,
|
|
26
|
+
$after: "> &"
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
.#{$ns}-popover-content {
|
|
30
|
+
padding: $tooltip-padding-vertical $tooltip-padding-horizontal;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&.#{$ns}-dark,
|
|
34
|
+
.#{$ns}-dark & {
|
|
35
|
+
@include popover-appearance(
|
|
36
|
+
$dark-tooltip-background-color,
|
|
37
|
+
$dark-tooltip-text-color,
|
|
38
|
+
$pt-dark-tooltip-box-shadow,
|
|
39
|
+
$pt-dark-drop-shadow-opacity,
|
|
40
|
+
$pt-dark-border-shadow-opacity
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@each $intent, $color in $pt-intent-colors {
|
|
45
|
+
&.#{$ns}-intent-#{$intent} {
|
|
46
|
+
.#{$ns}-popover-content {
|
|
47
|
+
background: $color;
|
|
48
|
+
color: $white;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.#{$ns}-popover-arrow-fill {
|
|
52
|
+
fill: $color;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.#{$ns}-tooltip-indicator {
|
|
59
|
+
border-bottom: dotted 1px;
|
|
60
|
+
cursor: help;
|
|
61
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
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 "../../common/mixins";
|
|
6
|
+
@import "~@blueprintjs/icons/src/icons";
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
Trees
|
|
10
|
+
|
|
11
|
+
Markup:
|
|
12
|
+
<div class="#{$ns}-tree #{$ns}-elevation-0">
|
|
13
|
+
<ul class="#{$ns}-tree-node-list #{$ns}-tree-root">
|
|
14
|
+
<li class="#{$ns}-tree-node #{$ns}-tree-node-expanded">
|
|
15
|
+
<div class="#{$ns}-tree-node-content">
|
|
16
|
+
<span class="#{$ns}-tree-node-caret #{$ns}-tree-node-caret-open #{$ns}-icon-standard"></span>
|
|
17
|
+
<span class="#{$ns}-tree-node-icon #{$ns}-icon-standard #{$ns}-icon-folder-close"></span>
|
|
18
|
+
<span class="#{$ns}-tree-node-label">Label</span>
|
|
19
|
+
<span class="#{$ns}-tree-node-secondary-label">Secondary label</span>
|
|
20
|
+
</div>
|
|
21
|
+
<ul class="#{$ns}-tree-node-list">
|
|
22
|
+
<li class="#{$ns}-tree-node">
|
|
23
|
+
<div class="#{$ns}-tree-node-content">
|
|
24
|
+
<span class="#{$ns}-tree-node-caret-none #{$ns}-icon-standard"></span>
|
|
25
|
+
<span class="#{$ns}-tree-node-icon #{$ns}-icon-standard #{$ns}-icon-document"></span>
|
|
26
|
+
<span class="#{$ns}-tree-node-label">A Document</span>
|
|
27
|
+
</div>
|
|
28
|
+
</li>
|
|
29
|
+
<li class="#{$ns}-tree-node">
|
|
30
|
+
<div class="#{$ns}-tree-node-content">
|
|
31
|
+
<span class="#{$ns}-tree-node-caret-none #{$ns}-icon-standard"></span>
|
|
32
|
+
<span class="#{$ns}-tree-node-icon #{$ns}-icon-standard #{$ns}-icon-document"></span>
|
|
33
|
+
<span class="#{$ns}-tree-node-label">Another Document</span>
|
|
34
|
+
</div>
|
|
35
|
+
</li>
|
|
36
|
+
</ul>
|
|
37
|
+
</li>
|
|
38
|
+
</ul>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
Styleguide tree
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
$tree-row-height: $pt-grid-size * 3 !default;
|
|
45
|
+
$tree-icon-spacing: ($tree-row-height - $pt-icon-size-standard) * 0.5 !default;
|
|
46
|
+
|
|
47
|
+
.#{$ns}-tree {
|
|
48
|
+
#{$icon-classes} {
|
|
49
|
+
color: $pt-icon-color;
|
|
50
|
+
|
|
51
|
+
@each $intent, $colors in $pt-intent-colors {
|
|
52
|
+
&.#{$ns}-intent-#{$intent} {
|
|
53
|
+
@include intent-color($intent);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.#{$ns}-tree-node-list {
|
|
60
|
+
list-style: none;
|
|
61
|
+
margin: 0;
|
|
62
|
+
padding-left: 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.#{$ns}-tree-root {
|
|
66
|
+
background-color: transparent;
|
|
67
|
+
cursor: default;
|
|
68
|
+
padding-left: 0;
|
|
69
|
+
// lets us position hover/selection effects based on the width of the whole tree
|
|
70
|
+
position: relative;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@for $i from 0 through 20 {
|
|
74
|
+
.#{$ns}-tree-node-content-#{$i} {
|
|
75
|
+
padding-left: ($tree-row-height - $tree-icon-spacing) * $i;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.#{$ns}-tree-node-content {
|
|
80
|
+
align-items: center;
|
|
81
|
+
display: flex;
|
|
82
|
+
height: $tree-row-height;
|
|
83
|
+
padding-right: $pt-grid-size * 0.5;
|
|
84
|
+
width: 100%;
|
|
85
|
+
|
|
86
|
+
&:hover {
|
|
87
|
+
background-color: rgba($gray5, 0.4);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.#{$ns}-tree-node-caret,
|
|
92
|
+
.#{$ns}-tree-node-caret-none {
|
|
93
|
+
min-width: $tree-row-height;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.#{$ns}-tree-node-caret {
|
|
97
|
+
@include pt-icon-colors();
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
padding: $tree-icon-spacing;
|
|
100
|
+
transform: rotate(0deg);
|
|
101
|
+
transition: transform ($pt-transition-duration * 2) $pt-transition-ease;
|
|
102
|
+
|
|
103
|
+
&.#{$ns}-tree-node-caret-open {
|
|
104
|
+
transform: rotate(90deg);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// CSS API support
|
|
108
|
+
&.#{$ns}-icon-standard::before {
|
|
109
|
+
content: $pt-icon-chevron-right;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.#{$ns}-tree-node-icon {
|
|
114
|
+
margin-right: $tree-icon-spacing;
|
|
115
|
+
position: relative;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.#{$ns}-tree-node-label {
|
|
119
|
+
@include overflow-ellipsis();
|
|
120
|
+
flex: 1 1 auto;
|
|
121
|
+
position: relative;
|
|
122
|
+
user-select: none;
|
|
123
|
+
|
|
124
|
+
span {
|
|
125
|
+
// prevents spans from interfering with text overflows (e.g. when Tooltips are used in labels)
|
|
126
|
+
display: inline;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.#{$ns}-tree-node-secondary-label {
|
|
131
|
+
padding: 0 ($pt-grid-size * 0.5);
|
|
132
|
+
user-select: none;
|
|
133
|
+
|
|
134
|
+
.#{$ns}-popover-wrapper,
|
|
135
|
+
.#{$ns}-popover-target {
|
|
136
|
+
align-items: center;
|
|
137
|
+
display: flex;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.#{$ns}-tree-node.#{$ns}-disabled {
|
|
142
|
+
.#{$ns}-tree-node-content {
|
|
143
|
+
background-color: inherit;
|
|
144
|
+
color: $pt-text-color-disabled;
|
|
145
|
+
cursor: not-allowed;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.#{$ns}-tree-node-caret,
|
|
149
|
+
.#{$ns}-tree-node-icon {
|
|
150
|
+
color: $pt-text-color-disabled;
|
|
151
|
+
cursor: not-allowed;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.#{$ns}-tree-node.#{$ns}-tree-node-selected > .#{$ns}-tree-node-content {
|
|
156
|
+
background-color: $pt-intent-primary;
|
|
157
|
+
|
|
158
|
+
&,
|
|
159
|
+
#{$icon-classes} {
|
|
160
|
+
color: $white;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.#{$ns}-tree-node-caret {
|
|
164
|
+
&::before {
|
|
165
|
+
color: rgba($white, 0.7);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&:hover::before {
|
|
169
|
+
color: $white;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.#{$ns}-dark {
|
|
175
|
+
.#{$ns}-tree-node-content:hover {
|
|
176
|
+
background-color: rgba($gray1, 0.3);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.#{$ns}-tree {
|
|
180
|
+
#{$icon-classes} {
|
|
181
|
+
color: $pt-dark-icon-color;
|
|
182
|
+
|
|
183
|
+
@each $intent, $colors in $pt-intent-colors {
|
|
184
|
+
&.#{$ns}-intent-#{$intent} {
|
|
185
|
+
@include intent-color($intent);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.#{$ns}-tree-node.#{$ns}-tree-node-selected > .#{$ns}-tree-node-content {
|
|
192
|
+
background-color: $pt-intent-primary;
|
|
193
|
+
}
|
|
194
|
+
}
|