@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,49 @@
|
|
|
1
|
+
// Copyright 2018 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
// this element becomes a flex container in the given direction.
|
|
5
|
+
// supply `$margin` to put space between each child.
|
|
6
|
+
// supply `$inline: inline` to use `display: flex-inline`.
|
|
7
|
+
// customize `flex: 1 1` child selector with $fill.
|
|
8
|
+
@mixin pt-flex-container($direction: row, $margin: none, $inline: none, $fill: ".#{$ns}-fill") {
|
|
9
|
+
@if $inline == inline or $inline == true {
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
} @else {
|
|
12
|
+
display: flex;
|
|
13
|
+
}
|
|
14
|
+
flex-direction: $direction;
|
|
15
|
+
|
|
16
|
+
> * {
|
|
17
|
+
flex-grow: 0;
|
|
18
|
+
flex-shrink: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
> #{$fill} {
|
|
22
|
+
flex-grow: 1;
|
|
23
|
+
flex-shrink: 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@if $margin != none {
|
|
27
|
+
@include pt-flex-margin($direction, $margin);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// applies margin along axis of direction between every direct child, with no margins on either end.
|
|
32
|
+
// $direction: row | column
|
|
33
|
+
// $margin: margin[-right|-bottom] value
|
|
34
|
+
@mixin pt-flex-margin($direction, $margin) {
|
|
35
|
+
$margin-prop: if($direction == row, margin-right, margin-bottom);
|
|
36
|
+
|
|
37
|
+
// CSS API support
|
|
38
|
+
&::before,
|
|
39
|
+
> * {
|
|
40
|
+
// space after all children
|
|
41
|
+
#{$margin-prop}: $margin;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// remove space after last child
|
|
45
|
+
&:empty::before,
|
|
46
|
+
> :last-child {
|
|
47
|
+
#{$margin-prop}: 0;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
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 "colors";
|
|
7
|
+
@import "flex";
|
|
8
|
+
|
|
9
|
+
$pt-intent-colors: (
|
|
10
|
+
"primary": $pt-intent-primary,
|
|
11
|
+
"success": $pt-intent-success,
|
|
12
|
+
"warning": $pt-intent-warning,
|
|
13
|
+
"danger" : $pt-intent-danger,
|
|
14
|
+
) !default;
|
|
15
|
+
|
|
16
|
+
$pt-intent-text-colors: (
|
|
17
|
+
"primary": $blue2,
|
|
18
|
+
"success": $green2,
|
|
19
|
+
"warning": $orange2,
|
|
20
|
+
"danger" : $red2,
|
|
21
|
+
) !default;
|
|
22
|
+
|
|
23
|
+
$pt-dark-intent-text-colors: (
|
|
24
|
+
"primary": $blue5,
|
|
25
|
+
"success": $green5,
|
|
26
|
+
"warning": $orange5,
|
|
27
|
+
"danger" : $red5,
|
|
28
|
+
) !default;
|
|
29
|
+
|
|
30
|
+
@mixin intent-color($intentName) {
|
|
31
|
+
color: map-get($pt-intent-colors, $intentName);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@mixin position-all($position, $value) {
|
|
35
|
+
bottom: $value;
|
|
36
|
+
left: $value;
|
|
37
|
+
position: $position;
|
|
38
|
+
right: $value;
|
|
39
|
+
top: $value;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@mixin base-typography() {
|
|
43
|
+
font-size: $pt-font-size;
|
|
44
|
+
font-weight: 400;
|
|
45
|
+
letter-spacing: 0;
|
|
46
|
+
line-height: $pt-line-height;
|
|
47
|
+
text-transform: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@mixin running-typography() {
|
|
51
|
+
font-size: $pt-font-size;
|
|
52
|
+
line-height: 1.5;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@mixin heading-typography() {
|
|
56
|
+
color: $pt-heading-color;
|
|
57
|
+
font-weight: 600;
|
|
58
|
+
|
|
59
|
+
.#{$ns}-dark & {
|
|
60
|
+
color: $pt-dark-heading-color;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@mixin monospace-typography() {
|
|
65
|
+
font-family: $pt-font-family-monospace;
|
|
66
|
+
text-transform: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@mixin overflow-ellipsis() {
|
|
70
|
+
overflow: hidden;
|
|
71
|
+
text-overflow: ellipsis;
|
|
72
|
+
white-space: nowrap;
|
|
73
|
+
word-wrap: normal;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@mixin focus-outline($offset: 2px) {
|
|
77
|
+
outline: $pt-outline-color auto 2px;
|
|
78
|
+
outline-offset: $offset;
|
|
79
|
+
-moz-outline-radius: 6px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@function border-shadow($alpha, $color: $black, $size: 1px) {
|
|
83
|
+
@return 0 0 0 $size rgba($color, $alpha);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// returns the padding necessary to center text in a container of the given height.
|
|
87
|
+
// default line-height is that of base typography, 18px assuming 14px font-size.
|
|
88
|
+
@function centered-text($height, $line-height: floor($pt-font-size * $pt-line-height)) {
|
|
89
|
+
@return floor(($height - $line-height) * 0.5);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Removes the unit from a Sass numeric value (if present): `strip-unit(12px) => 12`
|
|
93
|
+
// @see https://css-tricks.com/snippets/sass/strip-unit-function/
|
|
94
|
+
@function strip-unit($number) {
|
|
95
|
+
@if type-of($number) == "number" and not unitless($number) {
|
|
96
|
+
@return math.div($number, $number * 0 + 1);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@return $number;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@mixin force-hardware-acceleration() {
|
|
103
|
+
// CSS animations are typically smoother when they run on the GPU. most browsers trigger GPU
|
|
104
|
+
// ("hardware") acceleration automatically when certain CSS rules are applied (like `transform`).
|
|
105
|
+
//
|
|
106
|
+
// the transform rule below has no visual effect, but it achieves the following:
|
|
107
|
+
// - creates a new stacking context
|
|
108
|
+
// - creates a new containing block for fixed-position descendants
|
|
109
|
+
// - "tricks" the browser into using hardware acceleration
|
|
110
|
+
//
|
|
111
|
+
// `will-change: transform` does the same thing, but it suffers from a Chrome bug that could make
|
|
112
|
+
// the styled element blurry when transform'd (e.g. this happens when a Blueprint Table is in a
|
|
113
|
+
// Popover that animates open). we should move to `will-change` and delete this mixin once that
|
|
114
|
+
// bug is fixed (tracking in issue #859).
|
|
115
|
+
//
|
|
116
|
+
// see the following YouTube video and Chrome bug report for more:
|
|
117
|
+
// - https://www.youtube.com/watch?v=iSvUlSpIbNk
|
|
118
|
+
// - https://bugs.chromium.org/p/chromium/issues/detail?id=596382
|
|
119
|
+
//
|
|
120
|
+
// see this post for more on will-change: https://dev.opera.com/articles/css-will-change-property/
|
|
121
|
+
transform: translateZ(0);
|
|
122
|
+
// will-change: transform;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@mixin new-render-layer() {
|
|
126
|
+
// a semantic rename of the mixin above for when you just want to isolate z-indices
|
|
127
|
+
@include force-hardware-acceleration();
|
|
128
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// Copyright 2016 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
A mixin to generate the classes for a React CSSTransition which animates any number of CSS
|
|
6
|
+
properties at once.
|
|
7
|
+
|
|
8
|
+
Transitioned properties are specificed as a map of property names to lists of (inital value, final
|
|
9
|
+
value). For enter & appear transitions, each property will transition from its initial to its final
|
|
10
|
+
value. For exit transitions, each property will transition in reverse, from final to initial.
|
|
11
|
+
|
|
12
|
+
**Simple example:**
|
|
13
|
+
`@include react-transition("popover", (opacity: 0 1), $before: "&");`
|
|
14
|
+
Transition named "popover" moves opacity from 0 to 1. `"&"` indicates that the
|
|
15
|
+
Transition classes are expected to be applied to this element, where the mixin is invoked.
|
|
16
|
+
|
|
17
|
+
**Params:**
|
|
18
|
+
$name: React transitionName prop
|
|
19
|
+
$properties: map of CSS property to (initial, final) values
|
|
20
|
+
$duration: transition duration
|
|
21
|
+
$easing: transition easing function
|
|
22
|
+
$delay: transition delay
|
|
23
|
+
$before: selector text to insert before transition name (often to select self: &)
|
|
24
|
+
$after: selector text to insert after transiton name (to select children)
|
|
25
|
+
*/
|
|
26
|
+
@mixin react-transition(
|
|
27
|
+
$name,
|
|
28
|
+
$properties,
|
|
29
|
+
$duration: $pt-transition-duration,
|
|
30
|
+
$easing: $pt-transition-ease,
|
|
31
|
+
$delay: 0,
|
|
32
|
+
$before: "",
|
|
33
|
+
$after: ""
|
|
34
|
+
) {
|
|
35
|
+
@include each-prop($properties, 2);
|
|
36
|
+
@include react-transition-phase(
|
|
37
|
+
$name, "enter", $properties,
|
|
38
|
+
$duration, $easing, $delay,
|
|
39
|
+
$before, $after
|
|
40
|
+
);
|
|
41
|
+
@include react-transition-phase(
|
|
42
|
+
$name, "exit", $properties,
|
|
43
|
+
$duration, $easing, $delay,
|
|
44
|
+
$before, $after
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/*
|
|
49
|
+
A mixin to generate the classes for one phase of a React CSSTransition.
|
|
50
|
+
`$phase` must be `appear` or `enter` or `exit`.
|
|
51
|
+
If `enter` phase is given then `appear` phase will be generated at the same time.
|
|
52
|
+
If `exit` phase is given then property values are animated in reverse, from final to initial.
|
|
53
|
+
|
|
54
|
+
**Example:**
|
|
55
|
+
@include react-transition-phase(toast, enter, $enter-translate, $before: "&");
|
|
56
|
+
@include react-transition-phase(toast, leave, $leave-blur, $pt-transition-duration * 3, $before: "&");
|
|
57
|
+
*/
|
|
58
|
+
@mixin react-transition-phase(
|
|
59
|
+
$name,
|
|
60
|
+
$phase,
|
|
61
|
+
$properties,
|
|
62
|
+
$duration: $pt-transition-duration,
|
|
63
|
+
$easing: $pt-transition-ease,
|
|
64
|
+
$delay: 0,
|
|
65
|
+
$before: "",
|
|
66
|
+
$after: ""
|
|
67
|
+
) {
|
|
68
|
+
$start-index: 1;
|
|
69
|
+
$end-index: 2;
|
|
70
|
+
|
|
71
|
+
@if ($phase == "exit") {
|
|
72
|
+
$start-index: 2;
|
|
73
|
+
$end-index: 1;
|
|
74
|
+
} @else if ($phase != "enter" and $phase != "appear") {
|
|
75
|
+
@error "Unknown transition phase: #{$phase}. Expected appear|enter|exit.";
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
#{transition-name($phase, $name, $before, $after)} {
|
|
79
|
+
@include each-prop($properties, $start-index);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
#{transition-name(#{$phase}-active, $name, $before, $after)} {
|
|
83
|
+
@include each-prop($properties, $end-index);
|
|
84
|
+
transition-delay: $delay;
|
|
85
|
+
transition-duration: $duration;
|
|
86
|
+
transition-property: map-keys($properties);
|
|
87
|
+
transition-timing-function: $easing;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/*
|
|
92
|
+
Given map of properties to values, set each property to the value at the given index.
|
|
93
|
+
(remember that sass indices are 1-based).
|
|
94
|
+
|
|
95
|
+
Example: `each-prop((opacity: 0 1), 2)` will print "opacity: 1"
|
|
96
|
+
*/
|
|
97
|
+
@mixin each-prop($properties, $index) {
|
|
98
|
+
@each $prop, $values in $properties {
|
|
99
|
+
#{$prop}: nth($values, $index);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/*
|
|
104
|
+
Format transition class name with all the bits.
|
|
105
|
+
"enter" phase will include "appear" phase in returned name.
|
|
106
|
+
*/
|
|
107
|
+
@function transition-name($phase, $name, $before, $after) {
|
|
108
|
+
$full-name: "#{$before}.#{$name}-#{$phase}#{$after}";
|
|
109
|
+
|
|
110
|
+
@if ($phase == "enter") {
|
|
111
|
+
@return ($full-name, transition-name("appear", $name, $before, $after));
|
|
112
|
+
} @else if ($phase == "enter-active") {
|
|
113
|
+
@return ($full-name, transition-name("appear-active", $name, $before, $after));
|
|
114
|
+
} @else {
|
|
115
|
+
@return $full-name;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
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 "colors";
|
|
7
|
+
@import "mixins";
|
|
8
|
+
|
|
9
|
+
// Namespace appended to the beginning of each CSS class: `.#{$ns}-button`.
|
|
10
|
+
// Do not quote this value, for Less consumers.
|
|
11
|
+
$ns: bp3 !default;
|
|
12
|
+
|
|
13
|
+
// easily the most important variable, so it comes up top
|
|
14
|
+
// (so other variables can use it to define themselves)
|
|
15
|
+
$pt-grid-size: 10px !default;
|
|
16
|
+
|
|
17
|
+
// see https://bitsofco.de/the-new-system-font-stack/
|
|
18
|
+
$pt-font-family: -apple-system,
|
|
19
|
+
"BlinkMacSystemFont",
|
|
20
|
+
"Segoe UI",
|
|
21
|
+
"Roboto",
|
|
22
|
+
"Oxygen",
|
|
23
|
+
"Ubuntu",
|
|
24
|
+
"Cantarell",
|
|
25
|
+
"Open Sans",
|
|
26
|
+
"Helvetica Neue",
|
|
27
|
+
"Icons16", // support inline Palantir icons
|
|
28
|
+
sans-serif !default;
|
|
29
|
+
|
|
30
|
+
$pt-font-family-monospace: monospace !default;
|
|
31
|
+
|
|
32
|
+
$pt-font-size: $pt-grid-size * 1.4 !default;
|
|
33
|
+
$pt-font-size-large: $pt-grid-size * 1.6 !default;
|
|
34
|
+
$pt-font-size-small: $pt-grid-size * 1.2 !default;
|
|
35
|
+
|
|
36
|
+
// a little bit extra to ensure the height comes out to just over 18px (and browser rounds to 18px)
|
|
37
|
+
$pt-line-height: math.div($pt-grid-size * 1.8, $pt-font-size) + 0.0001 !default;
|
|
38
|
+
|
|
39
|
+
// Icon variables
|
|
40
|
+
|
|
41
|
+
$icons16-family: "Icons16" !default;
|
|
42
|
+
$icons20-family: "Icons20" !default;
|
|
43
|
+
|
|
44
|
+
$pt-icon-size-standard: 16px !default;
|
|
45
|
+
$pt-icon-size-large: 20px !default;
|
|
46
|
+
|
|
47
|
+
// Grids & dimensions
|
|
48
|
+
|
|
49
|
+
$pt-border-radius: floor(math.div($pt-grid-size, 3)) !default;
|
|
50
|
+
|
|
51
|
+
// Buttons
|
|
52
|
+
$pt-button-height: $pt-grid-size * 3 !default;
|
|
53
|
+
$pt-button-height-small: $pt-grid-size * 2.4 !default;
|
|
54
|
+
$pt-button-height-smaller: $pt-grid-size * 2 !default;
|
|
55
|
+
$pt-button-height-large: $pt-grid-size * 4 !default;
|
|
56
|
+
|
|
57
|
+
// Inputs
|
|
58
|
+
$pt-input-height: $pt-grid-size * 3 !default;
|
|
59
|
+
$pt-input-height-large: $pt-grid-size * 4 !default;
|
|
60
|
+
$pt-input-height-small: $pt-grid-size * 2.4 !default;
|
|
61
|
+
|
|
62
|
+
// Others
|
|
63
|
+
$pt-navbar-height: $pt-grid-size * 5 !default;
|
|
64
|
+
|
|
65
|
+
// Z-indices
|
|
66
|
+
$pt-z-index-base: 0 !default;
|
|
67
|
+
$pt-z-index-content: $pt-z-index-base + 10 !default;
|
|
68
|
+
$pt-z-index-overlay: $pt-z-index-content + 10 !default;
|
|
69
|
+
|
|
70
|
+
// Shadow opacities
|
|
71
|
+
$pt-border-shadow-opacity: 0.1 !default;
|
|
72
|
+
$pt-drop-shadow-opacity: 0.2 !default;
|
|
73
|
+
$pt-dark-border-shadow-opacity: $pt-border-shadow-opacity * 2 !default;
|
|
74
|
+
$pt-dark-drop-shadow-opacity: $pt-drop-shadow-opacity * 2 !default;
|
|
75
|
+
|
|
76
|
+
// Elevations
|
|
77
|
+
// all shadow lists must be the same length to avoid flicker in transitions.
|
|
78
|
+
$pt-elevation-shadow-0: 0 0 0 1px $pt-divider-black,
|
|
79
|
+
0 0 0 rgba($black, 0),
|
|
80
|
+
0 0 0 rgba($black, 0) !default;
|
|
81
|
+
$pt-elevation-shadow-1: border-shadow($pt-border-shadow-opacity),
|
|
82
|
+
0 0 0 rgba($black, 0),
|
|
83
|
+
0 1px 1px rgba($black, $pt-drop-shadow-opacity) !default;
|
|
84
|
+
$pt-elevation-shadow-2: border-shadow($pt-border-shadow-opacity),
|
|
85
|
+
0 1px 1px rgba($black, $pt-drop-shadow-opacity),
|
|
86
|
+
0 2px 6px rgba($black, $pt-drop-shadow-opacity) !default;
|
|
87
|
+
$pt-elevation-shadow-3: border-shadow($pt-border-shadow-opacity),
|
|
88
|
+
0 2px 4px rgba($black, $pt-drop-shadow-opacity),
|
|
89
|
+
0 8px 24px rgba($black, $pt-drop-shadow-opacity) !default;
|
|
90
|
+
$pt-elevation-shadow-4: border-shadow($pt-border-shadow-opacity),
|
|
91
|
+
0 4px 8px rgba($black, $pt-drop-shadow-opacity),
|
|
92
|
+
0 18px 46px 6px rgba($black, $pt-drop-shadow-opacity) !default;
|
|
93
|
+
|
|
94
|
+
$pt-dark-elevation-shadow-0: 0 0 0 1px $pt-dark-divider-black,
|
|
95
|
+
0 0 0 rgba($black, 0),
|
|
96
|
+
0 0 0 rgba($black, 0) !default;
|
|
97
|
+
$pt-dark-elevation-shadow-1: border-shadow($pt-dark-border-shadow-opacity),
|
|
98
|
+
0 0 0 rgba($black, 0),
|
|
99
|
+
0 1px 1px rgba($black, $pt-dark-drop-shadow-opacity) !default;
|
|
100
|
+
$pt-dark-elevation-shadow-2: border-shadow($pt-dark-border-shadow-opacity),
|
|
101
|
+
0 1px 1px rgba($black, $pt-dark-drop-shadow-opacity),
|
|
102
|
+
0 2px 6px rgba($black, $pt-dark-drop-shadow-opacity) !default;
|
|
103
|
+
$pt-dark-elevation-shadow-3: border-shadow($pt-dark-border-shadow-opacity),
|
|
104
|
+
0 2px 4px rgba($black, $pt-dark-drop-shadow-opacity),
|
|
105
|
+
0 8px 24px rgba($black, $pt-dark-drop-shadow-opacity) !default;
|
|
106
|
+
$pt-dark-elevation-shadow-4: border-shadow($pt-dark-border-shadow-opacity),
|
|
107
|
+
0 4px 8px rgba($black, $pt-dark-drop-shadow-opacity),
|
|
108
|
+
0 18px 46px 6px rgba($black, $pt-dark-drop-shadow-opacity) !default;
|
|
109
|
+
|
|
110
|
+
// Transitions
|
|
111
|
+
$pt-transition-ease: cubic-bezier(0.4, 1, 0.75, 0.9) !default;
|
|
112
|
+
$pt-transition-ease-bounce: cubic-bezier(0.54, 1.12, 0.38, 1.11) !default;
|
|
113
|
+
$pt-transition-duration: 100ms !default;
|
|
114
|
+
|
|
115
|
+
// Light theme styles
|
|
116
|
+
|
|
117
|
+
$pt-input-box-shadow: inset border-shadow(0.15),
|
|
118
|
+
inset 0 1px 1px rgba($black, $pt-drop-shadow-opacity) !default;
|
|
119
|
+
|
|
120
|
+
$pt-dialog-box-shadow: $pt-elevation-shadow-4 !default;
|
|
121
|
+
$pt-popover-box-shadow: $pt-elevation-shadow-3 !default;
|
|
122
|
+
$pt-tooltip-box-shadow: $pt-popover-box-shadow !default;
|
|
123
|
+
|
|
124
|
+
// Dark theme styles
|
|
125
|
+
|
|
126
|
+
$pt-dark-input-box-shadow: inset border-shadow(0.3),
|
|
127
|
+
inset 0 1px 1px rgba($black, $pt-dark-drop-shadow-opacity) !default;
|
|
128
|
+
|
|
129
|
+
$pt-dark-dialog-box-shadow: $pt-dark-elevation-shadow-4 !default;
|
|
130
|
+
$pt-dark-popover-box-shadow: $pt-dark-elevation-shadow-3 !default;
|
|
131
|
+
$pt-dark-tooltip-box-shadow: $pt-dark-popover-box-shadow !default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Copyright 2015 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@import "alert/alert";
|
|
5
|
+
@import "breadcrumbs/breadcrumbs";
|
|
6
|
+
@import "button/button";
|
|
7
|
+
@import "button/button-group";
|
|
8
|
+
@import "callout/callout";
|
|
9
|
+
@import "card/card";
|
|
10
|
+
@import "collapse/collapse";
|
|
11
|
+
@import "context-menu/context-menu";
|
|
12
|
+
@import "divider/divider";
|
|
13
|
+
@import "dialog/dialog";
|
|
14
|
+
@import "drawer/drawer";
|
|
15
|
+
@import "editable-text/editable-text";
|
|
16
|
+
@import "forms/index";
|
|
17
|
+
@import "html-select/html-select";
|
|
18
|
+
@import "html-table/html-table";
|
|
19
|
+
@import "hotkeys/hotkeys";
|
|
20
|
+
@import "icon/icon";
|
|
21
|
+
@import "menu/menu";
|
|
22
|
+
@import "navbar/navbar";
|
|
23
|
+
@import "non-ideal-state/non-ideal-state";
|
|
24
|
+
@import "overflow-list/overflow-list";
|
|
25
|
+
@import "overlay/overlay";
|
|
26
|
+
@import "panel-stack/panel-stack";
|
|
27
|
+
@import "popover/popover";
|
|
28
|
+
@import "portal/portal";
|
|
29
|
+
@import "progress-bar/progress-bar";
|
|
30
|
+
@import "skeleton/skeleton";
|
|
31
|
+
@import "slider/slider";
|
|
32
|
+
@import "spinner/spinner";
|
|
33
|
+
@import "tabs/tabs";
|
|
34
|
+
@import "tag/tag";
|
|
35
|
+
@import "tag-input/tag-input";
|
|
36
|
+
@import "toast/toast";
|
|
37
|
+
@import "tooltip/tooltip";
|
|
38
|
+
@import "tree/tree";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Copyright 2016 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@import "../../common/variables";
|
|
5
|
+
|
|
6
|
+
.#{$ns}-alert {
|
|
7
|
+
max-width: $pt-grid-size * 40;
|
|
8
|
+
padding: $pt-grid-size * 2;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.#{$ns}-alert-body {
|
|
12
|
+
display: flex;
|
|
13
|
+
|
|
14
|
+
.#{$ns}-icon {
|
|
15
|
+
font-size: $pt-icon-size-large * 2;
|
|
16
|
+
margin-right: $pt-grid-size * 2;
|
|
17
|
+
margin-top: 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.#{$ns}-alert-contents {
|
|
22
|
+
word-break: break-word;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.#{$ns}-alert-footer {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: row-reverse;
|
|
28
|
+
margin-top: $pt-grid-size;
|
|
29
|
+
|
|
30
|
+
.#{$ns}-button {
|
|
31
|
+
margin-left: $pt-grid-size;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
// Copyright 2016 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/variables";
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
Breadcrumbs
|
|
9
|
+
|
|
10
|
+
Markup:
|
|
11
|
+
<ul class="#{$ns}-breadcrumbs">
|
|
12
|
+
<li><a class="#{$ns}-breadcrumbs-collapsed" href="#"></a></li>
|
|
13
|
+
<li><a class="#{$ns}-breadcrumb #{$ns}-disabled">Folder one</a></li>
|
|
14
|
+
<li><a class="#{$ns}-breadcrumb" href="#">Folder two</a></li>
|
|
15
|
+
<li><a class="#{$ns}-breadcrumb" href="#">Folder three</a></li>
|
|
16
|
+
<li><span class="#{$ns}-breadcrumb #{$ns}-breadcrumb-current">File</span></li>
|
|
17
|
+
</ul>
|
|
18
|
+
|
|
19
|
+
Styleguide breadcrumbs
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
.#{$ns}-breadcrumbs {
|
|
23
|
+
align-items: center;
|
|
24
|
+
cursor: default;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-wrap: wrap;
|
|
27
|
+
height: $pt-input-height;
|
|
28
|
+
list-style: none;
|
|
29
|
+
// unstyled inline list reset
|
|
30
|
+
margin: 0;
|
|
31
|
+
padding: 0;
|
|
32
|
+
|
|
33
|
+
// descendant selector because nothing should come between ul and li
|
|
34
|
+
> li {
|
|
35
|
+
align-items: center;
|
|
36
|
+
display: flex;
|
|
37
|
+
|
|
38
|
+
&::after {
|
|
39
|
+
background: svg-icon("16px/chevron-right.svg", (path: (fill: $pt-icon-color)));
|
|
40
|
+
content: "";
|
|
41
|
+
display: block;
|
|
42
|
+
height: $pt-icon-size-standard;
|
|
43
|
+
margin: 0 ($pt-grid-size * 0.5);
|
|
44
|
+
width: $pt-icon-size-standard;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:last-of-type::after {
|
|
48
|
+
display: none;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.#{$ns}-breadcrumb,
|
|
54
|
+
.#{$ns}-breadcrumb-current,
|
|
55
|
+
.#{$ns}-breadcrumbs-collapsed {
|
|
56
|
+
align-items: center;
|
|
57
|
+
display: inline-flex;
|
|
58
|
+
font-size: $pt-font-size-large;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.#{$ns}-breadcrumb,
|
|
62
|
+
.#{$ns}-breadcrumbs-collapsed {
|
|
63
|
+
color: $pt-text-color-muted;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.#{$ns}-breadcrumb {
|
|
67
|
+
&:hover {
|
|
68
|
+
text-decoration: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.#{$ns}-disabled {
|
|
72
|
+
color: $pt-text-color-disabled;
|
|
73
|
+
cursor: not-allowed;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.#{$ns}-icon {
|
|
77
|
+
margin-right: $pt-grid-size * 0.5;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.#{$ns}-breadcrumb-current {
|
|
82
|
+
color: inherit;
|
|
83
|
+
font-weight: 600;
|
|
84
|
+
|
|
85
|
+
.#{$ns}-input {
|
|
86
|
+
font-size: inherit;
|
|
87
|
+
font-weight: inherit;
|
|
88
|
+
vertical-align: baseline;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.#{$ns}-breadcrumbs-collapsed {
|
|
93
|
+
background: $light-gray1;
|
|
94
|
+
border: none;
|
|
95
|
+
border-radius: $pt-border-radius;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
margin-right: 2px;
|
|
98
|
+
padding: 1px ($pt-grid-size * 0.5);
|
|
99
|
+
vertical-align: text-bottom;
|
|
100
|
+
|
|
101
|
+
&::before {
|
|
102
|
+
background: svg-icon("16px/more.svg", (circle: (fill: $pt-icon-color))) center no-repeat;
|
|
103
|
+
content: "";
|
|
104
|
+
display: block;
|
|
105
|
+
height: $pt-icon-size-standard;
|
|
106
|
+
width: $pt-icon-size-standard;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&:hover {
|
|
110
|
+
background: $gray5;
|
|
111
|
+
color: $pt-text-color;
|
|
112
|
+
text-decoration: none;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.#{$ns}-dark {
|
|
117
|
+
.#{$ns}-breadcrumb,
|
|
118
|
+
.#{$ns}-breadcrumbs-collapsed {
|
|
119
|
+
color: $pt-dark-text-color-muted;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.#{$ns}-breadcrumbs > li::after {
|
|
123
|
+
color: $pt-dark-icon-color;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.#{$ns}-breadcrumb.#{$ns}-disabled {
|
|
127
|
+
color: $pt-dark-text-color-disabled;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.#{$ns}-breadcrumb-current {
|
|
131
|
+
color: $pt-dark-text-color;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.#{$ns}-breadcrumbs-collapsed {
|
|
135
|
+
background: rgba($black, 0.4);
|
|
136
|
+
|
|
137
|
+
&:hover {
|
|
138
|
+
background: rgba($black, 0.6);
|
|
139
|
+
color: $pt-dark-text-color;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|