@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,216 @@
|
|
|
1
|
+
// Copyright 2016 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@import "../tooltip/common";
|
|
5
|
+
@import "./common";
|
|
6
|
+
|
|
7
|
+
$handle-size: $pt-icon-size-standard !default;
|
|
8
|
+
$track-size: $handle-size - $pt-grid-size !default;
|
|
9
|
+
$label-offset: $handle-size + 4px !default;
|
|
10
|
+
|
|
11
|
+
// retain legacy variable aliases so as to not break consumers
|
|
12
|
+
$handle-height: $handle-size !default;
|
|
13
|
+
$track-height: $track-size !default;
|
|
14
|
+
|
|
15
|
+
.#{$ns}-slider {
|
|
16
|
+
@include slider-orientation($pt-input-height-large, $vertical: false);
|
|
17
|
+
cursor: default;
|
|
18
|
+
outline: none;
|
|
19
|
+
position: relative;
|
|
20
|
+
user-select: none;
|
|
21
|
+
|
|
22
|
+
&:hover {
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:active {
|
|
27
|
+
cursor: grabbing;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&.#{$ns}-disabled {
|
|
31
|
+
cursor: not-allowed;
|
|
32
|
+
opacity: 0.5;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&.#{$ns}-slider-unlabeled {
|
|
36
|
+
height: $handle-size;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.#{$ns}-slider-track,
|
|
41
|
+
.#{$ns}-slider-progress {
|
|
42
|
+
@include slider-track-orientation($handle-size, $track-size, $vertical: false);
|
|
43
|
+
position: absolute;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.#{$ns}-slider-track {
|
|
47
|
+
border-radius: $pt-border-radius;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.#{$ns}-slider-progress {
|
|
52
|
+
background: rgba($gray1, 0.2);
|
|
53
|
+
|
|
54
|
+
.#{$ns}-dark & {
|
|
55
|
+
background: rgba($black, 0.5);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@each $intent, $color in $pt-intent-colors {
|
|
59
|
+
&.#{$ns}-intent-#{$intent} {
|
|
60
|
+
background-color: $color;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.#{$ns}-slider-handle {
|
|
66
|
+
@include pt-button();
|
|
67
|
+
border-radius: $pt-border-radius;
|
|
68
|
+
box-shadow: $button-box-shadow-overlay;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
height: $handle-size;
|
|
71
|
+
left: 0;
|
|
72
|
+
position: absolute;
|
|
73
|
+
top: 0;
|
|
74
|
+
width: $handle-size;
|
|
75
|
+
|
|
76
|
+
// ensure target handle's label always covers neighbors
|
|
77
|
+
&:focus {
|
|
78
|
+
z-index: 1;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&:hover {
|
|
82
|
+
@include pt-button-hover();
|
|
83
|
+
box-shadow: $button-box-shadow-overlay;
|
|
84
|
+
cursor: grab;
|
|
85
|
+
z-index: 2;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&.#{$ns}-active {
|
|
89
|
+
@include pt-button-active();
|
|
90
|
+
box-shadow: $button-box-shadow-overlay-active;
|
|
91
|
+
cursor: grabbing;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.#{$ns}-disabled & {
|
|
95
|
+
background: $gray5;
|
|
96
|
+
box-shadow: none;
|
|
97
|
+
// easy way to avoid lots of special cases to ignore mouse states when disabled:
|
|
98
|
+
pointer-events: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.#{$ns}-dark & {
|
|
102
|
+
@include pt-dark-button();
|
|
103
|
+
|
|
104
|
+
&,
|
|
105
|
+
&:hover {
|
|
106
|
+
background-color: $dark-gray5;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&.#{$ns}-active {
|
|
110
|
+
background-color: $dark-gray3;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.#{$ns}-dark .#{$ns}-disabled & {
|
|
115
|
+
background: $gray1;
|
|
116
|
+
border-color: $gray1;
|
|
117
|
+
box-shadow: none;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.#{$ns}-slider-label {
|
|
121
|
+
background: $tooltip-background-color;
|
|
122
|
+
border-radius: $pt-border-radius;
|
|
123
|
+
box-shadow: $pt-tooltip-box-shadow;
|
|
124
|
+
color: $tooltip-text-color;
|
|
125
|
+
margin-left: $handle-size * 0.5;
|
|
126
|
+
|
|
127
|
+
.#{$ns}-dark & {
|
|
128
|
+
background: $dark-tooltip-background-color;
|
|
129
|
+
box-shadow: $pt-dark-tooltip-box-shadow;
|
|
130
|
+
color: $dark-tooltip-text-color;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.#{$ns}-disabled & {
|
|
134
|
+
box-shadow: none;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&.#{$ns}-start,
|
|
139
|
+
&.#{$ns}-end {
|
|
140
|
+
width: $handle-size * 0.5;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&.#{$ns}-start {
|
|
144
|
+
border-bottom-right-radius: 0;
|
|
145
|
+
border-top-right-radius: 0;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&.#{$ns}-end {
|
|
149
|
+
border-bottom-left-radius: 0;
|
|
150
|
+
border-top-left-radius: 0;
|
|
151
|
+
margin-left: $handle-size * 0.5;
|
|
152
|
+
|
|
153
|
+
.#{$ns}-slider-label {
|
|
154
|
+
margin-left: 0;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.#{$ns}-slider-label {
|
|
160
|
+
@include slider-label-orientation($label-offset);
|
|
161
|
+
display: inline-block;
|
|
162
|
+
font-size: $pt-font-size-small;
|
|
163
|
+
line-height: 1;
|
|
164
|
+
padding: ($pt-grid-size * 0.2) ($pt-grid-size * 0.5);
|
|
165
|
+
position: absolute;
|
|
166
|
+
vertical-align: top;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.#{$ns}-slider.#{$ns}-vertical {
|
|
170
|
+
@include slider-orientation($pt-input-height-large, $vertical: true);
|
|
171
|
+
|
|
172
|
+
.#{$ns}-slider-track,
|
|
173
|
+
.#{$ns}-slider-progress {
|
|
174
|
+
@include slider-track-orientation($handle-size, $track-size, $vertical: true);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.#{$ns}-slider-progress {
|
|
178
|
+
top: auto;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.#{$ns}-slider-label {
|
|
182
|
+
@include slider-label-orientation($label-offset, $vertical: true);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.#{$ns}-slider-handle {
|
|
186
|
+
top: auto;
|
|
187
|
+
|
|
188
|
+
.#{$ns}-slider-label {
|
|
189
|
+
margin-left: 0;
|
|
190
|
+
margin-top: -$handle-size * 0.5;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
&.#{$ns}-end,
|
|
194
|
+
&.#{$ns}-start {
|
|
195
|
+
height: $handle-size * 0.5;
|
|
196
|
+
margin-left: 0;
|
|
197
|
+
width: $handle-size;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
&.#{$ns}-start {
|
|
201
|
+
border-bottom-right-radius: $pt-border-radius;
|
|
202
|
+
border-top-left-radius: 0;
|
|
203
|
+
|
|
204
|
+
.#{$ns}-slider-label {
|
|
205
|
+
transform: translate($label-offset);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
&.#{$ns}-end {
|
|
210
|
+
border-bottom-left-radius: 0;
|
|
211
|
+
border-bottom-right-radius: 0;
|
|
212
|
+
border-top-left-radius: $pt-border-radius;
|
|
213
|
+
margin-bottom: $handle-size * 0.5;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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 "../progress-bar/common";
|
|
6
|
+
|
|
7
|
+
@keyframes pt-spinner-animation {
|
|
8
|
+
from { transform: rotate(0deg); }
|
|
9
|
+
to { transform: rotate(360deg); }
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.#{$ns}-spinner {
|
|
13
|
+
align-items: center;
|
|
14
|
+
// center animation container inside parent element to isolate layout
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
|
|
18
|
+
// allow paths to overflow container -- critical for edges of circles!
|
|
19
|
+
overflow: visible;
|
|
20
|
+
vertical-align: middle;
|
|
21
|
+
|
|
22
|
+
svg {
|
|
23
|
+
display: block;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
path {
|
|
27
|
+
fill-opacity: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.#{$ns}-spinner-head {
|
|
31
|
+
stroke: $progress-head-color;
|
|
32
|
+
stroke-linecap: round;
|
|
33
|
+
transform-origin: center;
|
|
34
|
+
transition: stroke-dashoffset ($pt-transition-duration * 2) $pt-transition-ease;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.#{$ns}-spinner-track {
|
|
38
|
+
stroke: $progress-track-color;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// put the animation on a child HTML element to isolate it from display of parent
|
|
43
|
+
.#{$ns}-spinner-animation {
|
|
44
|
+
animation: pt-spinner-animation ($pt-transition-duration * 5) linear infinite;
|
|
45
|
+
|
|
46
|
+
.#{$ns}-no-spin > & {
|
|
47
|
+
animation: none;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.#{$ns}-dark .#{$ns}-spinner {
|
|
52
|
+
.#{$ns}-spinner-head {
|
|
53
|
+
stroke: $dark-progress-head-color;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.#{$ns}-spinner-track {
|
|
57
|
+
stroke: $dark-progress-track-color;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@each $intent, $color in $pt-intent-colors {
|
|
62
|
+
.#{$ns}-spinner.#{$ns}-intent-#{$intent} .#{$ns}-spinner-head {
|
|
63
|
+
stroke: $color;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
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
|
+
|
|
7
|
+
/*
|
|
8
|
+
Tabs
|
|
9
|
+
|
|
10
|
+
Markup:
|
|
11
|
+
<div class="#{$ns}-tabs">
|
|
12
|
+
<ul class="#{$ns}-tab-list {{.modifier}}" role="tablist">
|
|
13
|
+
<li class="#{$ns}-tab" role="tab" aria-selected="true">Selected tab</li>
|
|
14
|
+
<li class="#{$ns}-tab" role="tab">Another tab</li>
|
|
15
|
+
<li class="#{$ns}-tab" role="tab" aria-disabled="true">Disabled tab</li>
|
|
16
|
+
</ul>
|
|
17
|
+
<div class="#{$ns}-tab-panel" role="tabpanel">Selected panel</div>
|
|
18
|
+
<div class="#{$ns}-tab-panel" role="tabpanel" aria-hidden="true">Another panel</div>
|
|
19
|
+
<div class="#{$ns}-tab-panel" role="tabpanel" aria-hidden="true">Disabled panel</div>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
.#{$ns}-large - Large tabs
|
|
23
|
+
|
|
24
|
+
Styleguide tabs
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
$tab-color-selected: $pt-link-color !default;
|
|
28
|
+
$dark-tab-color-selected: $pt-dark-link-color !default;
|
|
29
|
+
|
|
30
|
+
$tab-indicator-width: 3px !default;
|
|
31
|
+
|
|
32
|
+
.#{$ns}-tabs.#{$ns}-vertical {
|
|
33
|
+
display: flex;
|
|
34
|
+
|
|
35
|
+
// include '>' to ensure we're only modifying
|
|
36
|
+
// these tabs, not tabs that might be further
|
|
37
|
+
// down the DOM hierarchy (i.e. tabs in tabs)
|
|
38
|
+
> .#{$ns}-tab-list {
|
|
39
|
+
align-items: flex-start;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
|
|
42
|
+
.#{$ns}-tab {
|
|
43
|
+
border-radius: $pt-border-radius;
|
|
44
|
+
padding: 0 $pt-grid-size;
|
|
45
|
+
width: 100%;
|
|
46
|
+
|
|
47
|
+
&[aria-selected="true"] {
|
|
48
|
+
background-color: rgba($pt-intent-primary, 0.2);
|
|
49
|
+
box-shadow: none;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.#{$ns}-tab-indicator-wrapper .#{$ns}-tab-indicator {
|
|
54
|
+
background-color: rgba($pt-intent-primary, 0.2);
|
|
55
|
+
border-radius: $pt-border-radius;
|
|
56
|
+
bottom: 0;
|
|
57
|
+
height: auto;
|
|
58
|
+
left: 0;
|
|
59
|
+
right: 0;
|
|
60
|
+
top: 0;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// same consideration here: avoid styling any
|
|
65
|
+
// other tabs that might be contained in this
|
|
66
|
+
// vertical tab component
|
|
67
|
+
> .#{$ns}-tab-panel {
|
|
68
|
+
margin-top: 0;
|
|
69
|
+
padding-left: $pt-grid-size * 2;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.#{$ns}-tab-list {
|
|
74
|
+
align-items: flex-end;
|
|
75
|
+
border: none;
|
|
76
|
+
display: flex;
|
|
77
|
+
flex: 0 0 auto;
|
|
78
|
+
list-style: none;
|
|
79
|
+
margin: 0;
|
|
80
|
+
padding: 0;
|
|
81
|
+
position: relative;
|
|
82
|
+
|
|
83
|
+
// this is fine.
|
|
84
|
+
// stylelint-disable-next-line selector-no-universal
|
|
85
|
+
> *:not(:last-child) {
|
|
86
|
+
margin-right: $pt-grid-size * 2;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.#{$ns}-tab {
|
|
91
|
+
@include overflow-ellipsis();
|
|
92
|
+
color: $pt-text-color;
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
flex: 0 0 auto;
|
|
95
|
+
font-size: $pt-font-size;
|
|
96
|
+
line-height: $pt-button-height;
|
|
97
|
+
max-width: 100%;
|
|
98
|
+
position: relative;
|
|
99
|
+
vertical-align: top;
|
|
100
|
+
|
|
101
|
+
// support for links in tab titles #363
|
|
102
|
+
a {
|
|
103
|
+
color: inherit;
|
|
104
|
+
display: block;
|
|
105
|
+
text-decoration: none;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.#{$ns}-tab-indicator-wrapper ~ & {
|
|
109
|
+
// these properties are only for static markup, therefore
|
|
110
|
+
// we never want them if there's a tab indicator
|
|
111
|
+
// stylelint-disable declaration-no-important
|
|
112
|
+
background-color: transparent !important;
|
|
113
|
+
box-shadow: none !important;
|
|
114
|
+
// stylelint-enable declaration-no-important
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&[aria-disabled="true"] {
|
|
118
|
+
color: $pt-text-color-disabled;
|
|
119
|
+
cursor: not-allowed;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&[aria-selected="true"] {
|
|
123
|
+
border-radius: 0;
|
|
124
|
+
box-shadow: inset 0 (-$tab-indicator-width) 0 $tab-color-selected;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&[aria-selected="true"],
|
|
128
|
+
&:not([aria-disabled="true"]):hover {
|
|
129
|
+
color: $tab-color-selected;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&:focus {
|
|
133
|
+
-moz-outline-radius: 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.#{$ns}-large > & {
|
|
137
|
+
font-size: $pt-font-size-large;
|
|
138
|
+
line-height: $pt-button-height-large;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.#{$ns}-tab-panel {
|
|
143
|
+
margin-top: $pt-grid-size * 2;
|
|
144
|
+
|
|
145
|
+
&[aria-hidden="true"] {
|
|
146
|
+
display: none;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.#{$ns}-tab-indicator-wrapper {
|
|
151
|
+
left: 0;
|
|
152
|
+
pointer-events: none;
|
|
153
|
+
position: absolute;
|
|
154
|
+
top: 0;
|
|
155
|
+
transform: translateX(0), translateY(0);
|
|
156
|
+
transition: height, transform, width;
|
|
157
|
+
transition-duration: $pt-transition-duration * 2;
|
|
158
|
+
transition-timing-function: $pt-transition-ease;
|
|
159
|
+
|
|
160
|
+
.#{$ns}-tab-indicator {
|
|
161
|
+
background-color: $tab-color-selected;
|
|
162
|
+
bottom: 0;
|
|
163
|
+
height: $tab-indicator-width;
|
|
164
|
+
left: 0;
|
|
165
|
+
position: absolute;
|
|
166
|
+
right: 0;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&.#{$ns}-no-animation {
|
|
170
|
+
transition: none;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.#{$ns}-dark {
|
|
175
|
+
.#{$ns}-tab {
|
|
176
|
+
color: $pt-dark-text-color;
|
|
177
|
+
|
|
178
|
+
&[aria-disabled="true"] {
|
|
179
|
+
color: $pt-dark-text-color-disabled;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&[aria-selected="true"] {
|
|
183
|
+
box-shadow: inset 0 (-$tab-indicator-width) 0 $dark-tab-color-selected;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
&[aria-selected="true"],
|
|
187
|
+
&:not([aria-disabled="true"]):hover {
|
|
188
|
+
color: $dark-tab-color-selected;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.#{$ns}-tab-indicator {
|
|
193
|
+
background-color: $dark-tab-color-selected;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.#{$ns}-flex-expander {
|
|
198
|
+
flex: 1 1;
|
|
199
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
// Copyright 2015 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
$tag-default-color: $gray1 !default;
|
|
5
|
+
$dark-tag-default-color: $gray5 !default;
|
|
6
|
+
|
|
7
|
+
$tag-height: $pt-grid-size * 2 !default;
|
|
8
|
+
$tag-line-height: $pt-icon-size-standard !default;
|
|
9
|
+
$tag-padding-top: ($tag-height - $tag-line-height) * 0.5 !default;
|
|
10
|
+
$tag-padding: $tag-padding-top * 3 !default;
|
|
11
|
+
$tag-margin: ($pt-input-height - $tag-height) * 0.5 !default;
|
|
12
|
+
|
|
13
|
+
$tag-height-large: $pt-grid-size * 3 !default;
|
|
14
|
+
$tag-line-height-large: $pt-icon-size-large !default;
|
|
15
|
+
$tag-padding-large: ($tag-height-large - $tag-line-height-large) !default;
|
|
16
|
+
|
|
17
|
+
$tag-icon-spacing: ($tag-height - 12px) * 0.5 !default;
|
|
18
|
+
$tag-icon-spacing-large: ($tag-height-large - $pt-icon-size-standard) * 0.5 !default;
|
|
19
|
+
|
|
20
|
+
$tag-round-adjustment: 2px !default;
|
|
21
|
+
|
|
22
|
+
@mixin pt-tag() {
|
|
23
|
+
@include pt-tag-interactive($tag-default-color, 1);
|
|
24
|
+
@include pt-flex-container(row, $tag-icon-spacing, inline);
|
|
25
|
+
align-items: center;
|
|
26
|
+
background-color: $tag-default-color;
|
|
27
|
+
border: none;
|
|
28
|
+
border-radius: $pt-border-radius;
|
|
29
|
+
box-shadow: none;
|
|
30
|
+
color: $pt-dark-text-color;
|
|
31
|
+
font-size: $pt-font-size-small;
|
|
32
|
+
line-height: $tag-line-height;
|
|
33
|
+
max-width: 100%;
|
|
34
|
+
min-height: $tag-height;
|
|
35
|
+
min-width: $tag-height;
|
|
36
|
+
padding: $tag-padding-top $tag-padding;
|
|
37
|
+
|
|
38
|
+
position: relative;
|
|
39
|
+
|
|
40
|
+
&:focus {
|
|
41
|
+
@include focus-outline(0);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.#{$ns}-round {
|
|
45
|
+
border-radius: $tag-height-large;
|
|
46
|
+
padding-left: $tag-padding + $tag-round-adjustment;
|
|
47
|
+
// optical adjustment for rounded tags
|
|
48
|
+
padding-right: $tag-padding + $tag-round-adjustment;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.#{$ns}-dark & {
|
|
52
|
+
@include pt-tag-interactive($dark-tag-default-color, 1);
|
|
53
|
+
|
|
54
|
+
background-color: $dark-tag-default-color;
|
|
55
|
+
color: $pt-text-color;
|
|
56
|
+
|
|
57
|
+
> #{$icon-classes} {
|
|
58
|
+
fill: currentColor;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
> #{$icon-classes} {
|
|
63
|
+
fill: $white;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@mixin pt-tag-large() {
|
|
68
|
+
@include pt-flex-margin(row, $tag-icon-spacing-large);
|
|
69
|
+
font-size: $pt-font-size;
|
|
70
|
+
line-height: $tag-line-height-large;
|
|
71
|
+
min-height: $tag-height-large;
|
|
72
|
+
min-width: $tag-height-large;
|
|
73
|
+
padding: ($tag-padding-large * 0.5) $tag-padding-large;
|
|
74
|
+
|
|
75
|
+
&.#{$ns}-round {
|
|
76
|
+
padding-left: $tag-padding-large + $tag-round-adjustment;
|
|
77
|
+
// optical adjustment for rounded tags
|
|
78
|
+
padding-right: $tag-padding-large + $tag-round-adjustment;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@mixin pt-tag-intent($background-color, $text-color: $white) {
|
|
83
|
+
@include pt-tag-interactive($background-color, 1);
|
|
84
|
+
|
|
85
|
+
background: $background-color;
|
|
86
|
+
color: $text-color;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@mixin pt-tag-minimal() {
|
|
90
|
+
> #{$icon-classes} {
|
|
91
|
+
fill: $pt-icon-color;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&:not([class*="#{$ns}-intent-"]) {
|
|
95
|
+
@include pt-tag-minimal-interactive($tag-default-color, 0.2);
|
|
96
|
+
|
|
97
|
+
background-color: rgba($gray3, 0.2);
|
|
98
|
+
color: $pt-text-color;
|
|
99
|
+
|
|
100
|
+
.#{$ns}-dark & {
|
|
101
|
+
@include pt-tag-minimal-interactive($dark-tag-default-color, 0.2);
|
|
102
|
+
|
|
103
|
+
color: $pt-dark-text-color;
|
|
104
|
+
|
|
105
|
+
> #{$icon-classes} {
|
|
106
|
+
fill: $pt-dark-icon-color;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@mixin pt-tag-minimal-intent($background-color, $text-color, $dark-text-color) {
|
|
113
|
+
@include pt-tag-minimal-interactive($background-color, 0.15);
|
|
114
|
+
|
|
115
|
+
background-color: rgba($background-color, 0.15);
|
|
116
|
+
color: $text-color;
|
|
117
|
+
|
|
118
|
+
> #{$icon-classes} {
|
|
119
|
+
fill: $background-color;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.#{$ns}-dark & {
|
|
123
|
+
@include pt-tag-minimal-interactive($background-color, 0.25);
|
|
124
|
+
|
|
125
|
+
background-color: rgba($background-color, 0.25);
|
|
126
|
+
color: $dark-text-color;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@mixin pt-tag-interactive($background-color, $opacity) {
|
|
131
|
+
&.#{$ns}-interactive {
|
|
132
|
+
cursor: pointer;
|
|
133
|
+
|
|
134
|
+
&:hover {
|
|
135
|
+
background-color: rgba($background-color, $opacity - 0.15);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&.#{$ns}-active,
|
|
139
|
+
&:active {
|
|
140
|
+
background-color: rgba($background-color, $opacity - 0.3);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@mixin pt-tag-minimal-interactive($background-color, $opacity) {
|
|
146
|
+
&.#{$ns}-interactive {
|
|
147
|
+
cursor: pointer;
|
|
148
|
+
|
|
149
|
+
&:hover {
|
|
150
|
+
background-color: rgba($background-color, $opacity + 0.1);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&.#{$ns}-active,
|
|
154
|
+
&:active {
|
|
155
|
+
background-color: rgba($background-color, $opacity + 0.2);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@mixin pt-tag-remove() {
|
|
161
|
+
background: none;
|
|
162
|
+
border: none;
|
|
163
|
+
color: inherit;
|
|
164
|
+
cursor: pointer;
|
|
165
|
+
display: flex;
|
|
166
|
+
margin-bottom: -$tag-padding-top;
|
|
167
|
+
// stylelint-disable-next-line declaration-no-important
|
|
168
|
+
margin-right: -$tag-padding !important;
|
|
169
|
+
// top/bottom to allow for padding to enlarge click area,
|
|
170
|
+
// right to tuck remove button into padding space.
|
|
171
|
+
margin-top: -$tag-padding-top;
|
|
172
|
+
opacity: 0.5;
|
|
173
|
+
padding: $tag-padding-top;
|
|
174
|
+
padding-left: 0;
|
|
175
|
+
|
|
176
|
+
&:hover {
|
|
177
|
+
background: none;
|
|
178
|
+
opacity: 0.8;
|
|
179
|
+
text-decoration: none;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&:active {
|
|
183
|
+
opacity: 1;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// CSS API support
|
|
187
|
+
&:empty::before {
|
|
188
|
+
@include pt-icon();
|
|
189
|
+
content: $pt-icon-small-cross;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.#{$ns}-large & {
|
|
193
|
+
// stylelint-disable-next-line declaration-no-important
|
|
194
|
+
margin-right: -$tag-padding-large !important;
|
|
195
|
+
padding: ($tag-height-large - $pt-icon-size-large) * 0.5;
|
|
196
|
+
padding-left: 0;
|
|
197
|
+
|
|
198
|
+
&:empty::before {
|
|
199
|
+
@include pt-icon-sized($pt-icon-size-large);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|