@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,146 @@
|
|
|
1
|
+
// Copyright 2015 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@import "~@blueprintjs/icons/src/icons";
|
|
5
|
+
@import "../../common/mixins";
|
|
6
|
+
@import "../../common/react-transition";
|
|
7
|
+
@import "../../common/variables";
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
Dialog
|
|
11
|
+
|
|
12
|
+
Markup:
|
|
13
|
+
<!-- this container element fills its parent and centers the .#{$ns}-dialog within it -->
|
|
14
|
+
<div class="#{$ns}-dialog-container">
|
|
15
|
+
<div class="#{$ns}-dialog">
|
|
16
|
+
<div class="#{$ns}-dialog-header">
|
|
17
|
+
<span class="#{$ns}-icon-large #{$ns}-icon-inbox"></span>
|
|
18
|
+
<h4 class="#{$ns}-heading">Dialog header</h4>
|
|
19
|
+
<button aria-label="Close" class="#{$ns}-dialog-close-button #{$ns}-button #{$ns}-minimal #{$ns}-icon-cross"></button>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="#{$ns}-dialog-body">
|
|
22
|
+
This dialog hasn't been wired up with any open or close interactions.
|
|
23
|
+
It's just an example of markup and styles.
|
|
24
|
+
</div>
|
|
25
|
+
<div class="#{$ns}-dialog-footer">
|
|
26
|
+
<div class="#{$ns}-dialog-footer-actions">
|
|
27
|
+
<button type="button" class="#{$ns}-button">Secondary button</button>
|
|
28
|
+
<button type="submit" class="#{$ns}-button #{$ns}-intent-primary">Primary button</button>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
Styleguide dialog
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
$dialog-border-radius: $pt-border-radius * 2 !default;
|
|
38
|
+
$dialog-margin: ($pt-grid-size * 3) 0 !default;
|
|
39
|
+
$dialog-padding: $pt-grid-size * 2 !default;
|
|
40
|
+
|
|
41
|
+
.#{$ns}-dialog-container {
|
|
42
|
+
$dialog-transition-props: (
|
|
43
|
+
opacity: (0, 1),
|
|
44
|
+
transform: (scale(0.5), scale(1))
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
@include react-transition(
|
|
48
|
+
"#{$ns}-overlay",
|
|
49
|
+
$dialog-transition-props,
|
|
50
|
+
$duration: $pt-transition-duration * 3,
|
|
51
|
+
$easing: $pt-transition-ease-bounce,
|
|
52
|
+
$before: "&",
|
|
53
|
+
$after: "> .#{$ns}-dialog"
|
|
54
|
+
);
|
|
55
|
+
align-items: center;
|
|
56
|
+
display: flex;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
min-height: 100%;
|
|
59
|
+
pointer-events: none;
|
|
60
|
+
user-select: none;
|
|
61
|
+
width: 100%;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.#{$ns}-dialog {
|
|
65
|
+
background: $light-gray4;
|
|
66
|
+
border-radius: $dialog-border-radius;
|
|
67
|
+
box-shadow: $pt-dialog-box-shadow;
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
margin: $dialog-margin;
|
|
71
|
+
padding-bottom: $pt-grid-size * 2;
|
|
72
|
+
pointer-events: all;
|
|
73
|
+
user-select: text;
|
|
74
|
+
width: $pt-grid-size * 50;
|
|
75
|
+
|
|
76
|
+
&:focus {
|
|
77
|
+
outline: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&.#{$ns}-dark,
|
|
81
|
+
.#{$ns}-dark & {
|
|
82
|
+
background: $pt-dark-app-background-color;
|
|
83
|
+
box-shadow: $pt-dark-dialog-box-shadow;
|
|
84
|
+
color: $pt-dark-text-color;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.#{$ns}-dialog-header {
|
|
89
|
+
align-items: center;
|
|
90
|
+
background: $white;
|
|
91
|
+
border-radius: $dialog-border-radius $dialog-border-radius 0 0;
|
|
92
|
+
box-shadow: 0 1px 0 $pt-divider-black;
|
|
93
|
+
display: flex;
|
|
94
|
+
flex: 0 0 auto;
|
|
95
|
+
min-height: $pt-icon-size-large + $dialog-padding;
|
|
96
|
+
padding-left: $dialog-padding;
|
|
97
|
+
padding-right: $dialog-padding * 0.25;
|
|
98
|
+
|
|
99
|
+
.#{$ns}-icon-large,
|
|
100
|
+
.#{$ns}-icon {
|
|
101
|
+
color: $pt-icon-color;
|
|
102
|
+
flex: 0 0 auto;
|
|
103
|
+
margin-right: $dialog-padding * 0.5;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.#{$ns}-heading {
|
|
107
|
+
@include overflow-ellipsis();
|
|
108
|
+
flex: 1 1 auto;
|
|
109
|
+
line-height: inherit;
|
|
110
|
+
margin: 0;
|
|
111
|
+
|
|
112
|
+
&:last-child {
|
|
113
|
+
margin-right: $dialog-padding;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.#{$ns}-dark & {
|
|
118
|
+
background: $dark-gray4;
|
|
119
|
+
box-shadow: 0 1px 0 $pt-dark-divider-black;
|
|
120
|
+
|
|
121
|
+
.#{$ns}-icon-large,
|
|
122
|
+
.#{$ns}-icon {
|
|
123
|
+
color: $pt-dark-icon-color;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.#{$ns}-dialog-body {
|
|
129
|
+
flex: 1 1 auto;
|
|
130
|
+
line-height: $pt-grid-size * 1.8;
|
|
131
|
+
margin: $dialog-padding;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.#{$ns}-dialog-footer {
|
|
135
|
+
flex: 0 0 auto;
|
|
136
|
+
margin: 0 $dialog-padding;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.#{$ns}-dialog-footer-actions {
|
|
140
|
+
display: flex;
|
|
141
|
+
justify-content: flex-end;
|
|
142
|
+
|
|
143
|
+
.#{$ns}-button {
|
|
144
|
+
margin-left: $pt-grid-size;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright 2018 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@import "../../common/variables";
|
|
5
|
+
|
|
6
|
+
$divider-margin: $pt-grid-size * 0.5 !default;
|
|
7
|
+
|
|
8
|
+
.#{$ns}-divider {
|
|
9
|
+
border-bottom: 1px solid $pt-divider-black;
|
|
10
|
+
// since the element is empty, it will occupy minimal space and only show
|
|
11
|
+
// the appropriate border based on direction of container.
|
|
12
|
+
border-right: 1px solid $pt-divider-black;
|
|
13
|
+
margin: $divider-margin;
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
.#{$ns}-dark & {
|
|
17
|
+
border-color: $pt-dark-divider-black;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
// Copyright 2018 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@import "~@blueprintjs/icons/src/icons";
|
|
5
|
+
@import "../../common/mixins";
|
|
6
|
+
@import "../../common/react-transition";
|
|
7
|
+
@import "../../common/variables";
|
|
8
|
+
|
|
9
|
+
$drawer-margin: ($pt-grid-size * 3) 0 !default;
|
|
10
|
+
$drawer-padding: $pt-grid-size * 2 !default;
|
|
11
|
+
|
|
12
|
+
$drawer-default-size: 50%;
|
|
13
|
+
|
|
14
|
+
$drawer-background-color: $white !default;
|
|
15
|
+
$dark-drawer-background-color: $dark-gray4 !default;
|
|
16
|
+
|
|
17
|
+
.#{$ns}-drawer {
|
|
18
|
+
background: $drawer-background-color;
|
|
19
|
+
box-shadow: $pt-elevation-shadow-4;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
margin: 0;
|
|
23
|
+
padding: 0;
|
|
24
|
+
|
|
25
|
+
&:focus {
|
|
26
|
+
outline: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.#{$ns}-position-top {
|
|
30
|
+
@include react-transition-phase(
|
|
31
|
+
"#{$ns}-overlay",
|
|
32
|
+
"enter",
|
|
33
|
+
(transform: (translateY(-100%), translateY(0))),
|
|
34
|
+
$pt-transition-duration * 2,
|
|
35
|
+
$pt-transition-ease,
|
|
36
|
+
$before: "&"
|
|
37
|
+
);
|
|
38
|
+
@include react-transition-phase(
|
|
39
|
+
"#{$ns}-overlay",
|
|
40
|
+
"exit",
|
|
41
|
+
(transform: (translateY(-100%), translateY(0))),
|
|
42
|
+
$pt-transition-duration,
|
|
43
|
+
$before: "&"
|
|
44
|
+
);
|
|
45
|
+
height: $drawer-default-size;
|
|
46
|
+
left: 0;
|
|
47
|
+
right: 0;
|
|
48
|
+
|
|
49
|
+
top: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&.#{$ns}-position-bottom {
|
|
53
|
+
@include react-transition-phase(
|
|
54
|
+
"#{$ns}-overlay",
|
|
55
|
+
"enter",
|
|
56
|
+
(transform: (translateY(100%), translateY(0))),
|
|
57
|
+
$pt-transition-duration * 2,
|
|
58
|
+
$pt-transition-ease,
|
|
59
|
+
$before: "&"
|
|
60
|
+
);
|
|
61
|
+
@include react-transition-phase(
|
|
62
|
+
"#{$ns}-overlay",
|
|
63
|
+
"exit",
|
|
64
|
+
(transform: (translateY(100%), translateY(0))),
|
|
65
|
+
$pt-transition-duration,
|
|
66
|
+
$before: "&"
|
|
67
|
+
);
|
|
68
|
+
bottom: 0;
|
|
69
|
+
height: $drawer-default-size;
|
|
70
|
+
left: 0;
|
|
71
|
+
|
|
72
|
+
right: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&.#{$ns}-position-left {
|
|
76
|
+
@include react-transition-phase(
|
|
77
|
+
"#{$ns}-overlay",
|
|
78
|
+
"enter",
|
|
79
|
+
(transform: (translateX(-100%), translateX(0))),
|
|
80
|
+
$pt-transition-duration * 2,
|
|
81
|
+
$pt-transition-ease,
|
|
82
|
+
$before: "&"
|
|
83
|
+
);
|
|
84
|
+
@include react-transition-phase(
|
|
85
|
+
"#{$ns}-overlay",
|
|
86
|
+
"exit",
|
|
87
|
+
(transform: (translateX(-100%), translateX(0))),
|
|
88
|
+
$pt-transition-duration,
|
|
89
|
+
$before: "&"
|
|
90
|
+
);
|
|
91
|
+
bottom: 0;
|
|
92
|
+
left: 0;
|
|
93
|
+
|
|
94
|
+
top: 0;
|
|
95
|
+
width: $drawer-default-size;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&.#{$ns}-position-right {
|
|
99
|
+
@include react-transition-phase(
|
|
100
|
+
"#{$ns}-overlay",
|
|
101
|
+
"enter",
|
|
102
|
+
(transform: (translateX(100%), translateX(0))),
|
|
103
|
+
$pt-transition-duration * 2,
|
|
104
|
+
$pt-transition-ease,
|
|
105
|
+
$before: "&"
|
|
106
|
+
);
|
|
107
|
+
@include react-transition-phase(
|
|
108
|
+
"#{$ns}-overlay",
|
|
109
|
+
"exit",
|
|
110
|
+
(transform: (translateX(100%), translateX(0))),
|
|
111
|
+
$pt-transition-duration,
|
|
112
|
+
$before: "&"
|
|
113
|
+
);
|
|
114
|
+
bottom: 0;
|
|
115
|
+
right: 0;
|
|
116
|
+
|
|
117
|
+
top: 0;
|
|
118
|
+
width: $drawer-default-size;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&:not(.#{$ns}-position-top):not(.#{$ns}-position-bottom):not(.#{$ns}-position-left):not(
|
|
122
|
+
.#{$ns}-position-right) {
|
|
123
|
+
&:not(.#{$ns}-vertical) {
|
|
124
|
+
@include react-transition-phase(
|
|
125
|
+
"#{$ns}-overlay",
|
|
126
|
+
"enter",
|
|
127
|
+
(transform: (translateX(100%), translateX(0))),
|
|
128
|
+
$pt-transition-duration * 2,
|
|
129
|
+
$pt-transition-ease,
|
|
130
|
+
$before: "&"
|
|
131
|
+
);
|
|
132
|
+
@include react-transition-phase(
|
|
133
|
+
"#{$ns}-overlay",
|
|
134
|
+
"exit",
|
|
135
|
+
(transform: (translateX(100%), translateX(0))),
|
|
136
|
+
$pt-transition-duration,
|
|
137
|
+
$before: "&"
|
|
138
|
+
);
|
|
139
|
+
bottom: 0;
|
|
140
|
+
right: 0;
|
|
141
|
+
|
|
142
|
+
top: 0;
|
|
143
|
+
width: $drawer-default-size;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&.#{$ns}-vertical {
|
|
147
|
+
@include react-transition-phase(
|
|
148
|
+
"#{$ns}-overlay",
|
|
149
|
+
"enter",
|
|
150
|
+
(transform: (translateY(100%), translateY(0))),
|
|
151
|
+
$pt-transition-duration * 2,
|
|
152
|
+
$pt-transition-ease,
|
|
153
|
+
$before: "&"
|
|
154
|
+
);
|
|
155
|
+
@include react-transition-phase(
|
|
156
|
+
"#{$ns}-overlay",
|
|
157
|
+
"exit",
|
|
158
|
+
(transform: (translateY(100%), translateY(0))),
|
|
159
|
+
$pt-transition-duration,
|
|
160
|
+
$before: "&"
|
|
161
|
+
);
|
|
162
|
+
bottom: 0;
|
|
163
|
+
height: $drawer-default-size;
|
|
164
|
+
left: 0;
|
|
165
|
+
|
|
166
|
+
right: 0;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&.#{$ns}-dark,
|
|
171
|
+
.#{$ns}-dark & {
|
|
172
|
+
background: $dark-drawer-background-color;
|
|
173
|
+
box-shadow: $pt-dark-dialog-box-shadow;
|
|
174
|
+
color: $pt-dark-text-color;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.#{$ns}-drawer-header {
|
|
179
|
+
align-items: center;
|
|
180
|
+
border-radius: 0;
|
|
181
|
+
box-shadow: 0 1px 0 $pt-divider-black;
|
|
182
|
+
display: flex;
|
|
183
|
+
flex: 0 0 auto;
|
|
184
|
+
min-height: $pt-icon-size-large + $drawer-padding;
|
|
185
|
+
padding: $drawer-padding * 0.25;
|
|
186
|
+
padding-left: $drawer-padding;
|
|
187
|
+
position: relative;
|
|
188
|
+
|
|
189
|
+
.#{$ns}-icon-large,
|
|
190
|
+
.#{$ns}-icon {
|
|
191
|
+
color: $pt-icon-color;
|
|
192
|
+
flex: 0 0 auto;
|
|
193
|
+
margin-right: $drawer-padding * 0.5;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.#{$ns}-heading {
|
|
197
|
+
@include overflow-ellipsis();
|
|
198
|
+
flex: 1 1 auto;
|
|
199
|
+
line-height: inherit;
|
|
200
|
+
margin: 0;
|
|
201
|
+
|
|
202
|
+
&:last-child {
|
|
203
|
+
margin-right: $drawer-padding;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.#{$ns}-dark & {
|
|
208
|
+
box-shadow: 0 1px 0 $pt-dark-divider-black;
|
|
209
|
+
|
|
210
|
+
.#{$ns}-icon-large,
|
|
211
|
+
.#{$ns}-icon {
|
|
212
|
+
color: $pt-dark-icon-color;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.#{$ns}-drawer-body {
|
|
218
|
+
flex: 1 1 auto;
|
|
219
|
+
line-height: $pt-grid-size * 1.8;
|
|
220
|
+
overflow: auto;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.#{$ns}-drawer-footer {
|
|
224
|
+
box-shadow: inset 0 1px 0 $pt-divider-black;
|
|
225
|
+
flex: 0 0 auto;
|
|
226
|
+
padding: $drawer-padding*0.5 $drawer-padding;
|
|
227
|
+
position: relative;
|
|
228
|
+
|
|
229
|
+
.#{$ns}-dark & {
|
|
230
|
+
box-shadow: inset 0 1px 0 $pt-dark-divider-black;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
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 "../forms/common";
|
|
6
|
+
|
|
7
|
+
.#{$ns}-editable-text {
|
|
8
|
+
cursor: text;
|
|
9
|
+
display: inline-block;
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
position: relative;
|
|
12
|
+
vertical-align: top;
|
|
13
|
+
white-space: nowrap;
|
|
14
|
+
|
|
15
|
+
// input styles on the ::before
|
|
16
|
+
&::before {
|
|
17
|
+
@include position-all(absolute, -$pt-border-radius);
|
|
18
|
+
border-radius: $pt-border-radius;
|
|
19
|
+
content: "";
|
|
20
|
+
transition: background-color $pt-transition-duration $pt-transition-ease,
|
|
21
|
+
box-shadow $pt-transition-duration $pt-transition-ease;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:hover::before {
|
|
25
|
+
box-shadow: input-transition-shadow($input-shadow-color-focus),
|
|
26
|
+
inset 0 0 0 1px $pt-divider-black;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.#{$ns}-editable-text-editing::before {
|
|
30
|
+
background-color: $input-background-color;
|
|
31
|
+
box-shadow: input-transition-shadow($input-shadow-color-focus, true), $input-box-shadow-focus;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.#{$ns}-disabled::before {
|
|
35
|
+
box-shadow: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@each $intent, $color in $pt-intent-colors {
|
|
39
|
+
&.#{$ns}-intent-#{$intent} {
|
|
40
|
+
.#{$ns}-editable-text-input,
|
|
41
|
+
.#{$ns}-editable-text-content {
|
|
42
|
+
color: $color;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:hover::before {
|
|
46
|
+
box-shadow: input-transition-shadow($color), inset border-shadow(0.4, $color, 1px);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.#{$ns}-editable-text-editing::before {
|
|
50
|
+
box-shadow: input-transition-shadow($color, true), $input-box-shadow-focus;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.#{$ns}-dark & {
|
|
56
|
+
&:hover::before {
|
|
57
|
+
box-shadow: input-transition-shadow($dark-input-shadow-color-focus),
|
|
58
|
+
inset 0 0 0 1px $pt-dark-divider-white;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.#{$ns}-editable-text-editing::before {
|
|
62
|
+
background-color: $dark-input-background-color;
|
|
63
|
+
box-shadow: input-transition-shadow($dark-input-shadow-color-focus, true),
|
|
64
|
+
$pt-dark-input-box-shadow;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.#{$ns}-disabled::before {
|
|
68
|
+
box-shadow: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@each $intent, $color in $pt-dark-intent-text-colors {
|
|
72
|
+
&.#{$ns}-intent-#{$intent} {
|
|
73
|
+
.#{$ns}-editable-text-content {
|
|
74
|
+
color: $color;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&:hover::before {
|
|
78
|
+
box-shadow: input-transition-shadow($color), inset border-shadow(0.4, $color, 1px);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&.#{$ns}-editable-text-editing::before {
|
|
82
|
+
box-shadow: input-transition-shadow($color, true), $pt-dark-input-box-shadow;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.#{$ns}-editable-text-input,
|
|
90
|
+
.#{$ns}-editable-text-content {
|
|
91
|
+
color: inherit;
|
|
92
|
+
display: inherit;
|
|
93
|
+
font: inherit;
|
|
94
|
+
letter-spacing: inherit;
|
|
95
|
+
max-width: inherit;
|
|
96
|
+
// inherit and respect parent bounds and text styles
|
|
97
|
+
min-width: inherit;
|
|
98
|
+
position: relative;
|
|
99
|
+
// prevent user resizing of textarea
|
|
100
|
+
resize: none;
|
|
101
|
+
text-transform: inherit;
|
|
102
|
+
vertical-align: top;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.#{$ns}-editable-text-input {
|
|
106
|
+
@include pt-input-placeholder();
|
|
107
|
+
background: none;
|
|
108
|
+
// reset browser input styles (we're using an input solely because you can type in it)
|
|
109
|
+
border: none;
|
|
110
|
+
box-shadow: none;
|
|
111
|
+
padding: 0;
|
|
112
|
+
// IE11's textarea will otherwise inherit the white-space property from its direct parent
|
|
113
|
+
white-space: pre-wrap;
|
|
114
|
+
width: 100%;
|
|
115
|
+
|
|
116
|
+
&:focus {
|
|
117
|
+
outline: none;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&::-ms-clear {
|
|
121
|
+
display: none;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.#{$ns}-editable-text-content {
|
|
126
|
+
overflow: hidden;
|
|
127
|
+
// magical number to account for slight increase in input width for cursor bar
|
|
128
|
+
padding-right: 2px;
|
|
129
|
+
text-overflow: ellipsis;
|
|
130
|
+
// preserve so trailing whitespace is included in scrollWidth
|
|
131
|
+
white-space: pre;
|
|
132
|
+
|
|
133
|
+
.#{$ns}-editable-text-editing > & {
|
|
134
|
+
left: 0;
|
|
135
|
+
position: absolute;
|
|
136
|
+
visibility: hidden;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.#{$ns}-editable-text-placeholder > & {
|
|
140
|
+
color: $input-placeholder-color;
|
|
141
|
+
|
|
142
|
+
.#{$ns}-dark & {
|
|
143
|
+
color: $dark-input-placeholder-color;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.#{$ns}-editable-text.#{$ns}-multiline {
|
|
149
|
+
display: block;
|
|
150
|
+
|
|
151
|
+
.#{$ns}-editable-text-content {
|
|
152
|
+
overflow: auto;
|
|
153
|
+
white-space: pre-wrap;
|
|
154
|
+
word-wrap: break-word;
|
|
155
|
+
}
|
|
156
|
+
}
|