@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,171 @@
|
|
|
1
|
+
// Copyright 2015 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@use "sass:math";
|
|
5
|
+
|
|
6
|
+
@import "../../common/variables";
|
|
7
|
+
@import "../../common/react-transition";
|
|
8
|
+
|
|
9
|
+
$popover-background-color: $white !default;
|
|
10
|
+
$dark-popover-background-color: $dark-gray4 !default;
|
|
11
|
+
|
|
12
|
+
// $arrow-offset: amount to shift arrow along edge of popover
|
|
13
|
+
// $arrow-target-offset: amount to shift arrow relative to target (perpendicular to popover edge)
|
|
14
|
+
@mixin popover-sizing($arrow-square-size, $arrow-offset, $arrow-target-offset) {
|
|
15
|
+
// since this is a 45-45-90 triangle, half hypotenuse === side * sqrt(2) / 2 === side / sqrt(2)
|
|
16
|
+
// fun fact: there's no built-in square root function in SASS
|
|
17
|
+
$arrow-diagonal-half-size: math.div($arrow-square-size, 1.41421356);
|
|
18
|
+
// we want the margin to be the size of the part of the arrow that is showing plus
|
|
19
|
+
// a little extra space.
|
|
20
|
+
$content-margin: floor($arrow-diagonal-half-size + $arrow-target-offset);
|
|
21
|
+
// we want to move the arrow out from where it's positioned by the gap amount
|
|
22
|
+
// plus the extra amount of width that is added by its 45 deg rotation.
|
|
23
|
+
$arrow-position: -$arrow-square-size * 0.5 + $arrow-offset;
|
|
24
|
+
// because the 45 deg rotation will make out div stick out a little bit further,
|
|
25
|
+
// we have to slide it over by that amount first and then by the set offset value
|
|
26
|
+
$computed-arrow-offset: ($arrow-diagonal-half-size - $arrow-square-size) * 0.5 + $arrow-offset;
|
|
27
|
+
|
|
28
|
+
.#{$ns}-popover-arrow {
|
|
29
|
+
height: $arrow-square-size;
|
|
30
|
+
position: absolute;
|
|
31
|
+
width: $arrow-square-size;
|
|
32
|
+
|
|
33
|
+
&::before {
|
|
34
|
+
height: floor($arrow-diagonal-half-size - 1);
|
|
35
|
+
margin: ceil(($arrow-square-size - $arrow-diagonal-half-size) * 0.5);
|
|
36
|
+
// - 1 to compenstate for transparent pixel border shadow
|
|
37
|
+
width: floor($arrow-diagonal-half-size - 1);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// shift content away from target edge to make space for the arrow
|
|
42
|
+
.#{$ns}-tether-element-attached-bottom.#{$ns}-tether-target-attached-top > & {
|
|
43
|
+
margin-bottom: $content-margin;
|
|
44
|
+
margin-top: -$content-margin;
|
|
45
|
+
|
|
46
|
+
> .#{$ns}-popover-arrow {
|
|
47
|
+
bottom: $arrow-position;
|
|
48
|
+
|
|
49
|
+
svg {
|
|
50
|
+
transform: rotate(-90deg);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.#{$ns}-tether-element-attached-left.#{$ns}-tether-target-attached-right > & {
|
|
56
|
+
margin-left: $content-margin;
|
|
57
|
+
|
|
58
|
+
> .#{$ns}-popover-arrow {
|
|
59
|
+
left: $arrow-position;
|
|
60
|
+
|
|
61
|
+
svg {
|
|
62
|
+
transform: rotate(0);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.#{$ns}-tether-element-attached-top.#{$ns}-tether-target-attached-bottom > & {
|
|
68
|
+
margin-top: $content-margin;
|
|
69
|
+
|
|
70
|
+
> .#{$ns}-popover-arrow {
|
|
71
|
+
top: $arrow-position;
|
|
72
|
+
|
|
73
|
+
svg {
|
|
74
|
+
transform: rotate(90deg);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.#{$ns}-tether-element-attached-right.#{$ns}-tether-target-attached-left > & {
|
|
80
|
+
// div will expand to the right and parent div won't be repositioned,
|
|
81
|
+
// so we need to use negative left margin to move content.
|
|
82
|
+
margin-left: -$content-margin;
|
|
83
|
+
// we keep the positive right margin for ease of arrow positioning.
|
|
84
|
+
margin-right: $content-margin;
|
|
85
|
+
|
|
86
|
+
> .#{$ns}-popover-arrow {
|
|
87
|
+
right: $arrow-position;
|
|
88
|
+
|
|
89
|
+
svg {
|
|
90
|
+
transform: rotate(180deg);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// "center" and "middle" attachments
|
|
96
|
+
.#{$ns}-tether-element-attached-middle > & > .#{$ns}-popover-arrow {
|
|
97
|
+
top: 50%;
|
|
98
|
+
transform: translateY(-50%);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.#{$ns}-tether-element-attached-center > & > .#{$ns}-popover-arrow {
|
|
102
|
+
right: 50%;
|
|
103
|
+
transform: translateX(50%);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// offset arrow away from corner spots so it appears centered in target
|
|
107
|
+
@each $side in (top, right, left, bottom) {
|
|
108
|
+
// giant selector is 1 character too long :(
|
|
109
|
+
// stylelint-disable-next-line max-line-length
|
|
110
|
+
.#{$ns}-tether-element-attached-#{$side}.#{$ns}-tether-target-attached-#{$side} > & > .#{$ns}-popover-arrow {
|
|
111
|
+
#{$side}: $computed-arrow-offset;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@each $top in (top, middle, bottom) {
|
|
116
|
+
@each $left in (left, center, right) {
|
|
117
|
+
.#{$ns}-tether-element-attached-#{$top}.#{$ns}-tether-element-attached-#{$left} > & {
|
|
118
|
+
@if ($top == middle) {
|
|
119
|
+
// "middle" is tether's way of saying "top == center"
|
|
120
|
+
transform-origin: center $left;
|
|
121
|
+
} @else {
|
|
122
|
+
transform-origin: $top $left;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// set background and text colors. also set box-shadow if provided (so modifier styles don't have to
|
|
130
|
+
// reassign default shadows).
|
|
131
|
+
@mixin popover-appearance(
|
|
132
|
+
$background-color,
|
|
133
|
+
$text-color,
|
|
134
|
+
$shadows,
|
|
135
|
+
$arrow-drop-shadow-opacity,
|
|
136
|
+
$arrow-border-shadow-opacity
|
|
137
|
+
) {
|
|
138
|
+
box-shadow: $shadows;
|
|
139
|
+
|
|
140
|
+
.#{$ns}-popover-content {
|
|
141
|
+
background: $background-color;
|
|
142
|
+
color: $text-color;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.#{$ns}-popover-arrow::before {
|
|
146
|
+
box-shadow: 1px 1px 6px rgba($black, $arrow-drop-shadow-opacity);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.#{$ns}-popover-arrow-border {
|
|
150
|
+
fill: $black;
|
|
151
|
+
fill-opacity: $arrow-border-shadow-opacity;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.#{$ns}-popover-arrow-fill {
|
|
155
|
+
fill: $background-color;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
@mixin fade-transition() {
|
|
160
|
+
@include react-transition("#{$ns}-popover", (opacity: 0 1), $before: "&");
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@mixin scale-transition() {
|
|
164
|
+
@include react-transition(
|
|
165
|
+
"#{$ns}-popover",
|
|
166
|
+
(transform: scale(0.3) scale(1)),
|
|
167
|
+
$duration: $pt-transition-duration * 3,
|
|
168
|
+
$easing: $pt-transition-ease-bounce,
|
|
169
|
+
$after: "> &"
|
|
170
|
+
);
|
|
171
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// Copyright 2015 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@import "./common";
|
|
5
|
+
|
|
6
|
+
$popover-width: $pt-grid-size * 35 !default;
|
|
7
|
+
|
|
8
|
+
.#{$ns}-popover {
|
|
9
|
+
@include popover-sizing(
|
|
10
|
+
$arrow-square-size: 30px,
|
|
11
|
+
$arrow-offset: 4px,
|
|
12
|
+
$arrow-target-offset: -4px
|
|
13
|
+
);
|
|
14
|
+
@include popover-appearance(
|
|
15
|
+
$popover-background-color,
|
|
16
|
+
inherit,
|
|
17
|
+
$pt-popover-box-shadow,
|
|
18
|
+
$pt-drop-shadow-opacity,
|
|
19
|
+
$pt-border-shadow-opacity
|
|
20
|
+
);
|
|
21
|
+
@include scale-transition();
|
|
22
|
+
border-radius: $pt-border-radius;
|
|
23
|
+
display: inline-block;
|
|
24
|
+
z-index: $pt-z-index-overlay;
|
|
25
|
+
|
|
26
|
+
.#{$ns}-popover-content {
|
|
27
|
+
border-radius: $pt-border-radius;
|
|
28
|
+
position: relative;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&.#{$ns}-popover-content-sizing {
|
|
32
|
+
.#{$ns}-popover-content {
|
|
33
|
+
max-width: $popover-width;
|
|
34
|
+
padding: $pt-grid-size * 2;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// only inline popovers get a width if this class is applied.
|
|
38
|
+
// note that an inline overlay will be an immediate next sibling
|
|
39
|
+
// of the popover target as of Blueprint 2.0.
|
|
40
|
+
.#{$ns}-popover-target + .#{$ns}-overlay & {
|
|
41
|
+
width: $popover-width;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&.#{$ns}-minimal {
|
|
46
|
+
// popovers with no obvious trigger will never have margin because the arrow
|
|
47
|
+
// is hidden so it is safe to remove in all cases always
|
|
48
|
+
margin: 0 !important; // stylelint-disable-line declaration-no-important
|
|
49
|
+
|
|
50
|
+
.#{$ns}-popover-arrow {
|
|
51
|
+
display: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.#{$ns}-popover {
|
|
55
|
+
@include react-transition(
|
|
56
|
+
"#{$ns}-popover",
|
|
57
|
+
(transform: scale(1) scale(1)),
|
|
58
|
+
$duration: $pt-transition-duration,
|
|
59
|
+
$after: "> &"
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&.#{$ns}-dark,
|
|
65
|
+
.#{$ns}-dark & {
|
|
66
|
+
@include popover-appearance(
|
|
67
|
+
$dark-popover-background-color,
|
|
68
|
+
inherit,
|
|
69
|
+
$pt-dark-popover-box-shadow,
|
|
70
|
+
$pt-dark-drop-shadow-opacity,
|
|
71
|
+
$pt-dark-border-shadow-opacity
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// the box-shadow under the arrow SVG paths
|
|
77
|
+
.#{$ns}-popover-arrow::before {
|
|
78
|
+
border-radius: $pt-border-radius - 1;
|
|
79
|
+
content: "";
|
|
80
|
+
display: block;
|
|
81
|
+
position: absolute;
|
|
82
|
+
transform: rotate(45deg);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// remove arrow when popover is pinned inside its container
|
|
86
|
+
.#{$ns}-tether-pinned .#{$ns}-popover-arrow {
|
|
87
|
+
display: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.#{$ns}-popover-backdrop {
|
|
91
|
+
background: rgba($white, 0);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.#{$ns}-transition-container {
|
|
95
|
+
@include fade-transition();
|
|
96
|
+
|
|
97
|
+
// ensure element size exactly equals its children, no edge-case 4px spacing!
|
|
98
|
+
// (try removing this property with Slider content in example)
|
|
99
|
+
display: flex;
|
|
100
|
+
z-index: $pt-z-index-overlay;
|
|
101
|
+
|
|
102
|
+
&:focus {
|
|
103
|
+
outline: none;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// popover content should ignore pointer events during a popover's exit transition
|
|
107
|
+
&.#{$ns}-popover-leave .#{$ns}-popover-content {
|
|
108
|
+
pointer-events: none;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Popper.js applies this attribute when the target fully leaves boundaries
|
|
112
|
+
&[data-x-out-of-boundaries] {
|
|
113
|
+
display: none;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
span.#{$ns}-popover-target {
|
|
118
|
+
// avoid `inline` elements as they won't account for padding etc
|
|
119
|
+
display: inline-block;
|
|
120
|
+
|
|
121
|
+
// this is important for span tag as default inline display height only includes text.
|
|
122
|
+
// div tag can be used for display: block, which works fine.
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.#{$ns}-popover-wrapper.#{$ns}-fill {
|
|
126
|
+
width: 100%;
|
|
127
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright 2016 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
.#{$ns}-portal {
|
|
5
|
+
left: 0;
|
|
6
|
+
// take the portal out of the document flow to prevent browsers from autoscrolling to the bottom
|
|
7
|
+
// of the document (where portals are appended) when programmatically focusing within a portal
|
|
8
|
+
// child element. also, don't use `fixed`, because then Tether'd elements won't reposition
|
|
9
|
+
// themselves properly as the document scrolls.
|
|
10
|
+
position: absolute;
|
|
11
|
+
// ensure content won't be horizontally scrunched
|
|
12
|
+
right: 0;
|
|
13
|
+
// ensure content still offsets from the top of the document
|
|
14
|
+
top: 0;
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Copyright 2017 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@import "../../common/variables";
|
|
5
|
+
|
|
6
|
+
$progress-track-color: rgba($gray1, 0.2) !default;
|
|
7
|
+
$progress-head-color: rgba($gray1, 0.8) !default;
|
|
8
|
+
$dark-progress-track-color: rgba($black, 0.5) !default;
|
|
9
|
+
$dark-progress-head-color: $gray3 !default;
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
Progress bars
|
|
9
|
+
|
|
10
|
+
Markup:
|
|
11
|
+
<div class="#{$ns}-progress-bar {{.modifier}}">
|
|
12
|
+
<div class="#{$ns}-progress-meter" style="width: 25%"></div>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="#{$ns}-progress-bar #{$ns}-intent-primary {{.modifier}}">
|
|
15
|
+
<div class="#{$ns}-progress-meter" style="width: 50%"></div>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="#{$ns}-progress-bar #{$ns}-intent-success {{.modifier}}">
|
|
18
|
+
<div class="#{$ns}-progress-meter" style="width: 75%"></div>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="#{$ns}-progress-bar #{$ns}-intent-danger {{.modifier}}">
|
|
21
|
+
<div class="#{$ns}-progress-meter" style="width: 100%"></div>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
.#{$ns}-no-stripes - No stripes
|
|
25
|
+
.#{$ns}-no-animation - No animation
|
|
26
|
+
|
|
27
|
+
Styleguide progress-bar
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
$progress-bar-stripes-color: rgba($white, 0.2) !default;
|
|
31
|
+
|
|
32
|
+
$progress-bar-height: round($pt-grid-size * 0.8) !default;
|
|
33
|
+
$progress-bar-stripes-size: $pt-grid-size * 3 !default;
|
|
34
|
+
$progress-bar-border-radius: $pt-grid-size * 4 !default;
|
|
35
|
+
|
|
36
|
+
$progress-bar-gradient: linear-gradient(
|
|
37
|
+
-45deg,
|
|
38
|
+
$progress-bar-stripes-color 25%,
|
|
39
|
+
transparent 25%,
|
|
40
|
+
transparent 50%,
|
|
41
|
+
$progress-bar-stripes-color 50%,
|
|
42
|
+
$progress-bar-stripes-color 75%,
|
|
43
|
+
transparent 75%
|
|
44
|
+
) !default;
|
|
45
|
+
|
|
46
|
+
@keyframes linear-progress-bar-stripes {
|
|
47
|
+
from {
|
|
48
|
+
background-position: 0 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
to {
|
|
52
|
+
background-position: $progress-bar-stripes-size 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.#{$ns}-progress-bar {
|
|
57
|
+
background: $progress-track-color;
|
|
58
|
+
border-radius: $progress-bar-border-radius;
|
|
59
|
+
display: block;
|
|
60
|
+
height: $progress-bar-height;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
position: relative;
|
|
63
|
+
width: 100%;
|
|
64
|
+
|
|
65
|
+
.#{$ns}-progress-meter {
|
|
66
|
+
background: $progress-bar-gradient;
|
|
67
|
+
background-color: $progress-head-color;
|
|
68
|
+
background-size: $progress-bar-stripes-size $progress-bar-stripes-size;
|
|
69
|
+
border-radius: $progress-bar-border-radius;
|
|
70
|
+
height: 100%;
|
|
71
|
+
position: absolute;
|
|
72
|
+
transition: width ($pt-transition-duration * 2) $pt-transition-ease;
|
|
73
|
+
// initial state is a full bar, a la "indeterminate"
|
|
74
|
+
width: 100%;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&:not(.#{$ns}-no-animation):not(.#{$ns}-no-stripes) .#{$ns}-progress-meter {
|
|
78
|
+
animation: linear-progress-bar-stripes ($pt-transition-duration * 3) linear infinite reverse;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&.#{$ns}-no-stripes .#{$ns}-progress-meter {
|
|
82
|
+
background-image: none;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.#{$ns}-dark .#{$ns}-progress-bar {
|
|
87
|
+
background: $dark-progress-track-color;
|
|
88
|
+
|
|
89
|
+
.#{$ns}-progress-meter {
|
|
90
|
+
background-color: $dark-progress-head-color;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@each $intent, $color in $pt-intent-colors {
|
|
95
|
+
.#{$ns}-progress-bar.#{$ns}-intent-#{$intent} .#{$ns}-progress-meter {
|
|
96
|
+
background-color: $color;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Copyright 2017 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
|
|
3
|
+
@import "../../common/variables";
|
|
4
|
+
|
|
5
|
+
$skeleton-animation:
|
|
6
|
+
($pt-transition-duration * 10) linear infinite alternate skeleton-glow !default;
|
|
7
|
+
$skeleton-color-start: rgba($light-gray1, 0.2) !default;
|
|
8
|
+
$skeleton-color-end: rgba($gray1, 0.2) !default;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// Copyright 2016 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@import "./common";
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
Skeletons
|
|
8
|
+
|
|
9
|
+
Markup:
|
|
10
|
+
<div class="#{$ns}-card">
|
|
11
|
+
<h5 class="#{$ns}-heading"><a class="{{.modifier}}" href="#" tabindex="-1">Card heading</a></h5>
|
|
12
|
+
<p class="{{.modifier}}">
|
|
13
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque eget tortor felis.
|
|
14
|
+
Fusce dapibus metus in dapibus mollis. Quisque eget ex diam.
|
|
15
|
+
</p>
|
|
16
|
+
<button type="button" class="#{$ns}-button #{$ns}-icon-add {{.modifier}}" tabindex="-1">Submit</button>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
.#{$ns}-skeleton - Render this element as a skeleton, an outline of its true self.
|
|
20
|
+
|
|
21
|
+
Styleguide skeleton
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
@keyframes skeleton-glow {
|
|
25
|
+
from {
|
|
26
|
+
background: $skeleton-color-start;
|
|
27
|
+
border-color: $skeleton-color-start;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
to {
|
|
31
|
+
background: $skeleton-color-end;
|
|
32
|
+
border-color: $skeleton-color-end;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// This class hides content with a glowing, rounded rectangle.
|
|
37
|
+
// CSS properties that should always override consumer values use the "!important" rule.
|
|
38
|
+
/* stylelint-disable declaration-no-important */
|
|
39
|
+
.#{$ns}-skeleton {
|
|
40
|
+
animation: $skeleton-animation;
|
|
41
|
+
|
|
42
|
+
// do not !important this for Firefox support
|
|
43
|
+
background: $skeleton-color-start;
|
|
44
|
+
|
|
45
|
+
// Prevent background color from extending to the border and overlappping
|
|
46
|
+
background-clip: padding-box !important;
|
|
47
|
+
border-color: $skeleton-color-start !important;
|
|
48
|
+
border-radius: 2px;
|
|
49
|
+
box-shadow: none !important;
|
|
50
|
+
|
|
51
|
+
// Transparent text will occupy space but be invisible to the user
|
|
52
|
+
color: transparent !important;
|
|
53
|
+
cursor: default;
|
|
54
|
+
pointer-events: none;
|
|
55
|
+
user-select: none;
|
|
56
|
+
|
|
57
|
+
// Make pseudo-elements (CSS icons) and children invisible
|
|
58
|
+
&::before,
|
|
59
|
+
&::after,
|
|
60
|
+
* {
|
|
61
|
+
visibility: hidden !important;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/* stylelint-enable declaration-no-important */
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Copyright 2016 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@import "../../common/variables";
|
|
5
|
+
@import "~@blueprintjs/icons/src/icons";
|
|
6
|
+
@import "../../common/mixins";
|
|
7
|
+
@import "../button/common";
|
|
8
|
+
|
|
9
|
+
@mixin slider-orientation($size, $vertical: false) {
|
|
10
|
+
$slider-min-size: $pt-grid-size * 15;
|
|
11
|
+
|
|
12
|
+
@if $vertical == false {
|
|
13
|
+
height: $size;
|
|
14
|
+
min-width: $slider-min-size;
|
|
15
|
+
width: 100%;
|
|
16
|
+
} @else {
|
|
17
|
+
// define the same rules for both vertical as for horizontal to ensure all
|
|
18
|
+
// horizontal rules are fully overridden.
|
|
19
|
+
height: $slider-min-size;
|
|
20
|
+
min-width: $size;
|
|
21
|
+
width: $size;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@mixin slider-track-orientation($handle-size, $track-size, $vertical: false) {
|
|
26
|
+
$slider-track-offset: ($handle-size - $track-size) * 0.5;
|
|
27
|
+
|
|
28
|
+
@if $vertical == false {
|
|
29
|
+
height: $track-size;
|
|
30
|
+
left: 0;
|
|
31
|
+
right: 0;
|
|
32
|
+
top: $slider-track-offset;
|
|
33
|
+
} @else {
|
|
34
|
+
bottom: 0;
|
|
35
|
+
height: auto; // override the non-vertical rule above
|
|
36
|
+
left: $slider-track-offset;
|
|
37
|
+
top: 0;
|
|
38
|
+
width: $track-size;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@mixin slider-label-orientation($label-offset, $vertical: false) {
|
|
43
|
+
@if $vertical == false {
|
|
44
|
+
transform: translate(-50%, $label-offset);
|
|
45
|
+
} @else {
|
|
46
|
+
transform: translate($label-offset, 50%);
|
|
47
|
+
}
|
|
48
|
+
}
|