@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,111 @@
|
|
|
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 "../../common/mixins";
|
|
6
|
+
@import "common";
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
Form groups
|
|
10
|
+
|
|
11
|
+
Markup:
|
|
12
|
+
<div class="#{$ns}-form-group {{.modifier}}">
|
|
13
|
+
<label class="#{$ns}-label" for="form-group-input">
|
|
14
|
+
Label
|
|
15
|
+
<span class="#{$ns}-text-muted">(required)</span>
|
|
16
|
+
</label>
|
|
17
|
+
<div class="#{$ns}-form-content">
|
|
18
|
+
<div class="#{$ns}-input-group {{.modifier}}">
|
|
19
|
+
<span class="#{$ns}-icon #{$ns}-icon-calendar"></span>
|
|
20
|
+
<input id="form-group-input" type="text" {{:modifier}} class="#{$ns}-input"
|
|
21
|
+
style="width: 200px;" placeholder="Placeholder text" dir="auto" />
|
|
22
|
+
</div>
|
|
23
|
+
<div class="#{$ns}-form-helper-text">Please enter a value</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
:disabled - Disable the input.
|
|
28
|
+
.#{$ns}-disabled - Disabled styles. Input must be disabled separately via attribute.
|
|
29
|
+
.#{$ns}-inline - Label and content appear side by side.
|
|
30
|
+
.#{$ns}-intent-primary - Apply intent to form group and input separately.
|
|
31
|
+
|
|
32
|
+
Styleguide form-group
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
.#{$ns}-form-group {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
margin: 0 0 ($pt-grid-size * 1.5);
|
|
39
|
+
|
|
40
|
+
label.#{$ns}-label {
|
|
41
|
+
margin-bottom: $pt-grid-size * 0.5;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.#{$ns}-control {
|
|
45
|
+
margin-top: ($pt-input-height - $control-indicator-size) * 0.5;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.#{$ns}-form-helper-text {
|
|
49
|
+
color: $pt-text-color-muted;
|
|
50
|
+
font-size: $pt-font-size-small;
|
|
51
|
+
margin-top: $pt-grid-size * 0.5;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// stylelint-disable-next-line order/declaration-block-order
|
|
55
|
+
@each $intent, $color in $pt-intent-text-colors {
|
|
56
|
+
&.#{$ns}-intent-#{$intent} {
|
|
57
|
+
.#{$ns}-form-helper-text {
|
|
58
|
+
color: $color;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.#{$ns}-inline {
|
|
64
|
+
align-items: flex-start;
|
|
65
|
+
flex-direction: row;
|
|
66
|
+
|
|
67
|
+
&.#{$ns}-large label.#{$ns}-label {
|
|
68
|
+
line-height: $pt-input-height-large;
|
|
69
|
+
margin: 0 $pt-grid-size 0 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
label.#{$ns}-label {
|
|
73
|
+
line-height: $pt-input-height;
|
|
74
|
+
margin: 0 $pt-grid-size 0 0;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&.#{$ns}-disabled {
|
|
79
|
+
.#{$ns}-label,
|
|
80
|
+
.#{$ns}-text-muted,
|
|
81
|
+
.#{$ns}-form-helper-text {
|
|
82
|
+
// disabled state always overrides over styles
|
|
83
|
+
// stylelint-disable-next-line declaration-no-important
|
|
84
|
+
color: $pt-text-color-disabled !important;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.#{$ns}-dark & {
|
|
89
|
+
@each $intent, $color in $pt-dark-intent-text-colors {
|
|
90
|
+
&.#{$ns}-intent-#{$intent} {
|
|
91
|
+
.#{$ns}-form-helper-text {
|
|
92
|
+
color: $color;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.#{$ns}-form-helper-text {
|
|
98
|
+
color: $pt-dark-text-color-muted;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&.#{$ns}-disabled {
|
|
102
|
+
.#{$ns}-label,
|
|
103
|
+
.#{$ns}-text-muted,
|
|
104
|
+
.#{$ns}-form-helper-text {
|
|
105
|
+
// disabled state always overrides over styles
|
|
106
|
+
// stylelint-disable-next-line declaration-no-important
|
|
107
|
+
color: $pt-dark-text-color-disabled !important;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright 2015 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
// NOTE: this partial file is imported once here so form components can just use it.
|
|
5
|
+
// multiple @imports of shared/forms from different files causes placeholder @extends to
|
|
6
|
+
// output CSS multiple times which breaks textbox padding.
|
|
7
|
+
@import "./common";
|
|
8
|
+
|
|
9
|
+
@import "./control-group";
|
|
10
|
+
@import "./controls";
|
|
11
|
+
@import "./file-input";
|
|
12
|
+
@import "./form-group";
|
|
13
|
+
@import "./input-group";
|
|
14
|
+
@import "./input";
|
|
15
|
+
@import "./label";
|
|
16
|
+
@import "./numeric-input";
|
|
17
|
+
|
|
18
|
+
form {
|
|
19
|
+
display: block;
|
|
20
|
+
}
|
|
@@ -0,0 +1,247 @@
|
|
|
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 "../button/common";
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
Input groups
|
|
9
|
+
|
|
10
|
+
Markup:
|
|
11
|
+
<div class="#{$ns}-input-group {{.modifier}}">
|
|
12
|
+
<span class="#{$ns}-icon #{$ns}-icon-filter"></span>
|
|
13
|
+
<input type="text" class="#{$ns}-input" {{:modifier}} placeholder="Filter histogram..." />
|
|
14
|
+
</div>
|
|
15
|
+
<div class="#{$ns}-input-group {{.modifier}}">
|
|
16
|
+
<input type="password" class="#{$ns}-input" {{:modifier}} placeholder="Enter your password..." />
|
|
17
|
+
<button class="#{$ns}-button #{$ns}-minimal #{$ns}-intent-warning #{$ns}-icon-lock" {{:modifier}}></button>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="#{$ns}-input-group {{.modifier}}">
|
|
20
|
+
<span class="#{$ns}-icon #{$ns}-icon-search"></span>
|
|
21
|
+
<input type="text" class="#{$ns}-input" {{:modifier}} placeholder="Search" />
|
|
22
|
+
<button class="#{$ns}-button #{$ns}-minimal #{$ns}-intent-primary #{$ns}-icon-arrow-right" {{:modifier}}></button>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
:disabled - Disabled input. Must be added separately to the <code><input></code> and <code><button></code>. Also add <code>.#{$ns}-disabled</code> to <code>.#{$ns}-input-group</code> for icon coloring (not shown below).
|
|
26
|
+
.#{$ns}-round - Rounded caps. Button will also be rounded.
|
|
27
|
+
.#{$ns}-large - Large group. Children will adjust size accordingly.
|
|
28
|
+
.#{$ns}-small - Small group. Children will adjust size accordingly.
|
|
29
|
+
.#{$ns}-intent-primary - Primary intent. (All 4 intents are supported.)
|
|
30
|
+
.#{$ns}-fill - Take up full width of parent element.
|
|
31
|
+
|
|
32
|
+
Styleguide input-group
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
// 3px space between small button and regular input
|
|
36
|
+
$input-button-height: $pt-button-height-small !default;
|
|
37
|
+
// 5px space between regular button and large input
|
|
38
|
+
$input-button-height-large: $pt-button-height !default;
|
|
39
|
+
// 1px space between regular button and small input
|
|
40
|
+
$input-button-height-small: $pt-button-height-smaller !default;
|
|
41
|
+
|
|
42
|
+
.#{$ns}-input-group {
|
|
43
|
+
display: block;
|
|
44
|
+
position: relative;
|
|
45
|
+
|
|
46
|
+
.#{$ns}-input {
|
|
47
|
+
// explicit position prevents shadow clipping https://github.com/palantir/blueprint/pull/490#issuecomment-273342170
|
|
48
|
+
position: relative;
|
|
49
|
+
width: 100%;
|
|
50
|
+
|
|
51
|
+
// add space if there's something before or after the input
|
|
52
|
+
&:not(:first-child) {
|
|
53
|
+
padding-left: $pt-input-height;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:not(:last-child) {
|
|
57
|
+
padding-right: $pt-input-height;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.#{$ns}-input-action,
|
|
62
|
+
> .#{$ns}-input-left-container,
|
|
63
|
+
> .#{$ns}-button,
|
|
64
|
+
> .#{$ns}-icon {
|
|
65
|
+
position: absolute;
|
|
66
|
+
top: 0;
|
|
67
|
+
|
|
68
|
+
// glue it to the end it appears on
|
|
69
|
+
&:first-child {
|
|
70
|
+
left: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&:last-child {
|
|
74
|
+
right: 0;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.#{$ns}-button {
|
|
79
|
+
@include pt-button-height($input-button-height);
|
|
80
|
+
margin: ($pt-input-height - $input-button-height) * 0.5;
|
|
81
|
+
padding: $button-padding-small;
|
|
82
|
+
|
|
83
|
+
// icons CSS API support
|
|
84
|
+
&:empty { padding: 0; }
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// bump icon or left content up so it sits above input
|
|
88
|
+
> .#{$ns}-input-left-container,
|
|
89
|
+
> .#{$ns}-icon {
|
|
90
|
+
z-index: 1;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// direct descendant to exclude icons in buttons
|
|
94
|
+
> .#{$ns}-input-left-container > .#{$ns}-icon,
|
|
95
|
+
> .#{$ns}-icon {
|
|
96
|
+
color: $pt-icon-color;
|
|
97
|
+
|
|
98
|
+
&:empty {
|
|
99
|
+
@include pt-icon($pt-icon-size-standard);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// adjusting the margin of spinners in input groups
|
|
104
|
+
// we have to avoid targetting buttons that contain a spinner
|
|
105
|
+
> .#{$ns}-input-left-container > .#{$ns}-icon,
|
|
106
|
+
> .#{$ns}-icon,
|
|
107
|
+
.#{$ns}-input-action > .#{$ns}-spinner {
|
|
108
|
+
margin: ($pt-input-height - $pt-icon-size-standard) * 0.5;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.#{$ns}-tag {
|
|
112
|
+
margin: $pt-grid-size * 0.5;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// all buttons go gray in default state and assume their native colors only when hovered
|
|
116
|
+
// or when input is focused. this prevents distracting colors in the UI.
|
|
117
|
+
.#{$ns}-input:not(:focus) + .#{$ns}-button,
|
|
118
|
+
.#{$ns}-input:not(:focus) + .#{$ns}-input-action .#{$ns}-button {
|
|
119
|
+
&.#{$ns}-minimal:not(:hover):not(:focus) {
|
|
120
|
+
color: $pt-text-color-muted;
|
|
121
|
+
|
|
122
|
+
// same goes for dark
|
|
123
|
+
// stylelint-disable-next-line selector-max-compound-selectors
|
|
124
|
+
.#{$ns}-dark & {
|
|
125
|
+
color: $pt-dark-text-color-muted;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
#{$icon-classes} {
|
|
129
|
+
color: $pt-icon-color;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&.#{$ns}-minimal:disabled {
|
|
134
|
+
// override more specific selector above
|
|
135
|
+
// stylelint-disable declaration-no-important
|
|
136
|
+
color: $pt-icon-color-disabled !important;
|
|
137
|
+
|
|
138
|
+
#{$icon-classes} {
|
|
139
|
+
color: $pt-icon-color-disabled !important;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// this class echoes `input:disabled` on the child input, but each action must individually be disabled
|
|
145
|
+
&.#{$ns}-disabled {
|
|
146
|
+
// note that enabled buttons inside this input group are still clickable
|
|
147
|
+
cursor: not-allowed;
|
|
148
|
+
|
|
149
|
+
.#{$ns}-icon {
|
|
150
|
+
color: $pt-icon-color-disabled;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&.#{$ns}-large {
|
|
155
|
+
.#{$ns}-button {
|
|
156
|
+
@include pt-button-height($input-button-height-large);
|
|
157
|
+
margin: ($pt-input-height-large - $input-button-height-large) * 0.5;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
> .#{$ns}-input-left-container > .#{$ns}-icon,
|
|
161
|
+
> .#{$ns}-icon,
|
|
162
|
+
.#{$ns}-input-action > .#{$ns}-spinner {
|
|
163
|
+
margin: ($pt-input-height-large - $pt-icon-size-standard) * 0.5;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.#{$ns}-input {
|
|
167
|
+
@include pt-input-large();
|
|
168
|
+
|
|
169
|
+
&:not(:first-child) {
|
|
170
|
+
padding-left: $pt-button-height-large;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&:not(:last-child) {
|
|
174
|
+
padding-right: $pt-button-height-large;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&.#{$ns}-small {
|
|
180
|
+
.#{$ns}-button {
|
|
181
|
+
@include pt-button-height($pt-button-height-smaller);
|
|
182
|
+
margin: ($pt-input-height-small - $pt-button-height-smaller) * 0.5;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.#{$ns}-tag {
|
|
186
|
+
@include pt-button-height($pt-button-height-smaller);
|
|
187
|
+
margin: ($pt-input-height-small - $pt-button-height-smaller) * 0.5;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
> .#{$ns}-input-left-container > .#{$ns}-icon,
|
|
191
|
+
> .#{$ns}-icon,
|
|
192
|
+
.#{$ns}-input-action > .#{$ns}-spinner {
|
|
193
|
+
margin: ($pt-input-height-small - $pt-icon-size-standard) * 0.5;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.#{$ns}-input {
|
|
197
|
+
@include pt-input-small();
|
|
198
|
+
|
|
199
|
+
&:not(:first-child) {
|
|
200
|
+
padding-left: $pt-icon-size-standard + $input-small-padding;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
&:not(:last-child) {
|
|
204
|
+
padding-right: $pt-icon-size-standard + $input-small-padding;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
&.#{$ns}-fill {
|
|
210
|
+
flex: 1 1 auto;
|
|
211
|
+
width: 100%;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&.#{$ns}-round {
|
|
215
|
+
.#{$ns}-button,
|
|
216
|
+
.#{$ns}-input,
|
|
217
|
+
.#{$ns}-tag {
|
|
218
|
+
border-radius: $pt-input-height;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.#{$ns}-dark & {
|
|
223
|
+
.#{$ns}-icon {
|
|
224
|
+
color: $pt-dark-icon-color;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
&.#{$ns}-disabled .#{$ns}-icon {
|
|
228
|
+
color: $pt-dark-icon-color-disabled;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@each $intent, $color in $pt-intent-colors {
|
|
233
|
+
&.#{$ns}-intent-#{$intent} {
|
|
234
|
+
.#{$ns}-input {
|
|
235
|
+
@include pt-input-intent($color);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
> .#{$ns}-icon {
|
|
239
|
+
color: map-get($pt-intent-text-colors, $intent);
|
|
240
|
+
|
|
241
|
+
.#{$ns}-dark & {
|
|
242
|
+
color: map-get($pt-dark-intent-text-colors, $intent);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
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
|
+
Text inputs
|
|
8
|
+
|
|
9
|
+
Markup:
|
|
10
|
+
<input class="#{$ns}-input {{.modifier}}" {{:modifier}} type="text" placeholder="Text input" dir="auto" />
|
|
11
|
+
|
|
12
|
+
:disabled - Disabled
|
|
13
|
+
:readonly - Readonly
|
|
14
|
+
.#{$ns}-round - Rounded ends
|
|
15
|
+
.#{$ns}-large - Larger size
|
|
16
|
+
.#{$ns}-small - Small size
|
|
17
|
+
.#{$ns}-intent-primary - Primary intent
|
|
18
|
+
.#{$ns}-intent-success - Success intent
|
|
19
|
+
.#{$ns}-intent-warning - Warning intent
|
|
20
|
+
.#{$ns}-intent-danger - Danger intent
|
|
21
|
+
.#{$ns}-fill - Take up full width of parent element
|
|
22
|
+
|
|
23
|
+
Styleguide input
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
.#{$ns}-input {
|
|
27
|
+
@include pt-input();
|
|
28
|
+
|
|
29
|
+
&.#{$ns}-large {
|
|
30
|
+
@include pt-input-large();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&.#{$ns}-small {
|
|
34
|
+
@include pt-input-small();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.#{$ns}-fill {
|
|
38
|
+
flex: 1 1 auto;
|
|
39
|
+
width: 100%;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.#{$ns}-dark & {
|
|
43
|
+
@include pt-dark-input();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@each $intent, $color in $pt-intent-colors {
|
|
47
|
+
&.#{$ns}-intent-#{$intent} {
|
|
48
|
+
@include pt-input-intent($color);
|
|
49
|
+
|
|
50
|
+
.#{$ns}-dark & {
|
|
51
|
+
@include pt-dark-input-intent($color);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&::-ms-clear {
|
|
57
|
+
display: none;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/*
|
|
62
|
+
Search inputs
|
|
63
|
+
|
|
64
|
+
Markup:
|
|
65
|
+
<div class="#{$ns}-input-group {{.modifier}}">
|
|
66
|
+
<span class="#{$ns}-icon #{$ns}-icon-search"></span>
|
|
67
|
+
<input class="#{$ns}-input" {{:modifier}} type="search" placeholder="Search input" dir="auto" />
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
:disabled - Disabled. Also add <code>.#{$ns}-disabled</code> to <code>.#{$ns}-input-group</code> for icon coloring (not shown below).
|
|
71
|
+
.#{$ns}-large - Large
|
|
72
|
+
.#{$ns}-small - Small
|
|
73
|
+
|
|
74
|
+
Styleguide input-search
|
|
75
|
+
*/
|
|
76
|
+
|
|
77
|
+
/*
|
|
78
|
+
Textareas
|
|
79
|
+
|
|
80
|
+
Markup:
|
|
81
|
+
<textarea class="#{$ns}-input {{.modifier}}" {{:modifier}} dir="auto"></textarea>
|
|
82
|
+
|
|
83
|
+
:disabled - Disabled
|
|
84
|
+
:readonly - Readonly
|
|
85
|
+
.#{$ns}-large - Larger font size
|
|
86
|
+
.#{$ns}-small - Small font size
|
|
87
|
+
.#{$ns}-intent-primary - Primary intent
|
|
88
|
+
.#{$ns}-intent-danger - Danger intent
|
|
89
|
+
.#{$ns}-fill - Take up full width of parent element
|
|
90
|
+
|
|
91
|
+
Styleguide textarea
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
// stylelint-disable-next-line selector-no-qualifying-type
|
|
95
|
+
textarea.#{$ns}-input {
|
|
96
|
+
max-width: 100%;
|
|
97
|
+
padding: $input-padding-horizontal;
|
|
98
|
+
|
|
99
|
+
&,
|
|
100
|
+
&.#{$ns}-large,
|
|
101
|
+
&.#{$ns}-small {
|
|
102
|
+
// override input styles for these modifiers.
|
|
103
|
+
// line-height is needed to center text on <input> but not on multiline <textarea>
|
|
104
|
+
height: auto;
|
|
105
|
+
line-height: inherit;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&.#{$ns}-small {
|
|
109
|
+
padding: $input-small-padding;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.#{$ns}-dark & {
|
|
113
|
+
@include pt-dark-input();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
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
|
+
Labels
|
|
8
|
+
|
|
9
|
+
Markup:
|
|
10
|
+
<div>
|
|
11
|
+
<label class="#{$ns}-label {{.modifier}}">
|
|
12
|
+
Label A
|
|
13
|
+
<span class="#{$ns}-text-muted">(optional)</span>
|
|
14
|
+
<input {{:modifier}} class="#{$ns}-input" style="width: 200px;" type="text" placeholder="Text input" dir="auto" />
|
|
15
|
+
</label>
|
|
16
|
+
<label class="#{$ns}-label {{.modifier}}">
|
|
17
|
+
Label B
|
|
18
|
+
<div class="#{$ns}-input-group {{.modifier}}">
|
|
19
|
+
<span class="#{$ns}-icon #{$ns}-icon-calendar"></span>
|
|
20
|
+
<input {{:modifier}} class="#{$ns}-input" style="width: 200px;" type="text" placeholder="Input group" dir="auto" />
|
|
21
|
+
</div>
|
|
22
|
+
</label>
|
|
23
|
+
<label class="#{$ns}-label {{.modifier}}">
|
|
24
|
+
Label C
|
|
25
|
+
<div class="#{$ns}-select {{.modifier}}">
|
|
26
|
+
<select {{:modifier}}>
|
|
27
|
+
<option selected>Choose an item...</option>
|
|
28
|
+
<option value="1">One</option>
|
|
29
|
+
</select>
|
|
30
|
+
</div>
|
|
31
|
+
</label>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
:disabled - Disable the input.
|
|
35
|
+
.#{$ns}-disabled - Disabled styles. Input must be disabled separately via attribute.
|
|
36
|
+
.#{$ns}-inline - Label and content appear side by side.
|
|
37
|
+
|
|
38
|
+
Styleguide label
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
label.#{$ns}-label {
|
|
42
|
+
display: block;
|
|
43
|
+
margin-bottom: ($pt-grid-size * 1.5);
|
|
44
|
+
margin-top: 0;
|
|
45
|
+
|
|
46
|
+
.#{$ns}-html-select,
|
|
47
|
+
.#{$ns}-input,
|
|
48
|
+
.#{$ns}-select,
|
|
49
|
+
.#{$ns}-slider,
|
|
50
|
+
.#{$ns}-popover-wrapper {
|
|
51
|
+
display: block;
|
|
52
|
+
margin-top: $pt-grid-size * 0.5;
|
|
53
|
+
text-transform: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.#{$ns}-button-group {
|
|
57
|
+
margin-top: $pt-grid-size * 0.5;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.#{$ns}-select select,
|
|
61
|
+
.#{$ns}-html-select select {
|
|
62
|
+
font-weight: 400;
|
|
63
|
+
vertical-align: top;
|
|
64
|
+
width: 100%;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.#{$ns}-disabled {
|
|
68
|
+
&,
|
|
69
|
+
.#{$ns}-text-muted {
|
|
70
|
+
color: $pt-text-color-disabled;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&.#{$ns}-inline {
|
|
75
|
+
line-height: $pt-input-height;
|
|
76
|
+
|
|
77
|
+
.#{$ns}-html-select,
|
|
78
|
+
.#{$ns}-input,
|
|
79
|
+
.#{$ns}-input-group,
|
|
80
|
+
.#{$ns}-select,
|
|
81
|
+
.#{$ns}-popover-wrapper {
|
|
82
|
+
display: inline-block;
|
|
83
|
+
margin: 0 0 0 ($pt-grid-size * 0.5);
|
|
84
|
+
vertical-align: top;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.#{$ns}-button-group {
|
|
88
|
+
margin: 0 0 0 ($pt-grid-size * 0.5);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.#{$ns}-input-group .#{$ns}-input {
|
|
92
|
+
margin-left: 0;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&.#{$ns}-large {
|
|
96
|
+
line-height: $pt-input-height-large;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&:not(.#{$ns}-inline) .#{$ns}-popover-target {
|
|
101
|
+
display: block;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.#{$ns}-dark & {
|
|
105
|
+
color: $pt-dark-heading-color;
|
|
106
|
+
|
|
107
|
+
&.#{$ns}-disabled {
|
|
108
|
+
&,
|
|
109
|
+
.#{$ns}-text-muted {
|
|
110
|
+
color: $pt-dark-text-color-disabled;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
@import "../../common/variables";
|
|
3
|
+
@import "./common";
|
|
4
|
+
|
|
5
|
+
.#{$ns}-numeric-input {
|
|
6
|
+
|
|
7
|
+
// we need a very-specific selector here to override specificicty of selectors defined elsewhere.
|
|
8
|
+
.#{$ns}-button-group.#{$ns}-vertical > .#{$ns}-button {
|
|
9
|
+
// let the buttons shrink to equal heights
|
|
10
|
+
flex: 1 1 ($pt-button-height * 0.5 - 1);
|
|
11
|
+
min-height: 0;
|
|
12
|
+
padding: 0;
|
|
13
|
+
width: $pt-button-height;
|
|
14
|
+
|
|
15
|
+
&:first-child {
|
|
16
|
+
border-radius: 0 $pt-border-radius 0 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:last-child {
|
|
20
|
+
border-radius: 0 0 $pt-border-radius 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// fix button border radii when the buttons are on the left
|
|
25
|
+
.#{$ns}-button-group.#{$ns}-vertical {
|
|
26
|
+
&:first-child > .#{$ns}-button {
|
|
27
|
+
&:first-child {
|
|
28
|
+
border-radius: $pt-border-radius 0 0 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:last-child {
|
|
32
|
+
border-radius: 0 0 0 $pt-border-radius;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.#{$ns}-large .#{$ns}-button-group.#{$ns}-vertical > .#{$ns}-button {
|
|
38
|
+
width: $pt-button-height-large;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Copyright 2016 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
|
|
3
|
+
@import "../../common/variables";
|
|
4
|
+
@import "../../common/mixins";
|
|
5
|
+
|
|
6
|
+
.#{$ns}-key-combo {
|
|
7
|
+
@include pt-flex-container(row, $pt-grid-size * 0.5);
|
|
8
|
+
align-items: center;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.#{$ns}-hotkey-dialog {
|
|
12
|
+
padding-bottom: 0;
|
|
13
|
+
top: $pt-grid-size * 4;
|
|
14
|
+
|
|
15
|
+
.#{$ns}-dialog-body {
|
|
16
|
+
margin: 0;
|
|
17
|
+
padding: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.#{$ns}-hotkey-label {
|
|
21
|
+
flex-grow: 1;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.#{$ns}-hotkey-column {
|
|
26
|
+
margin: auto;
|
|
27
|
+
max-height: 80vh;
|
|
28
|
+
overflow-y: auto;
|
|
29
|
+
padding: $pt-grid-size * 3;
|
|
30
|
+
|
|
31
|
+
.#{$ns}-heading {
|
|
32
|
+
margin-bottom: $pt-grid-size * 2;
|
|
33
|
+
|
|
34
|
+
&:not(:first-child) {
|
|
35
|
+
margin-top: $pt-grid-size * 4;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.#{$ns}-hotkey {
|
|
41
|
+
align-items: center;
|
|
42
|
+
display: flex;
|
|
43
|
+
justify-content: space-between;
|
|
44
|
+
margin-left: 0;
|
|
45
|
+
margin-right: 0;
|
|
46
|
+
|
|
47
|
+
&:not(:last-child) {
|
|
48
|
+
margin-bottom: $pt-grid-size;
|
|
49
|
+
}
|
|
50
|
+
}
|