@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.
Files changed (77) hide show
  1. package/TableOfContents/index.d.ts +3 -0
  2. package/TableOfContents/index.js +45 -6
  3. package/TableOfContents/index.js.map +1 -1
  4. package/package.json +1 -1
  5. package/styles/_blueprint.scss +4 -4
  6. package/styles/blueprint/_variables.scss +3 -1
  7. package/styles/blueprint/select/blueprint-select.scss +8 -0
  8. package/styles/blueprint/select/components/_index.scss +6 -0
  9. package/styles/blueprint/select/components/omnibar/_omnibar.scss +63 -0
  10. package/styles/blueprint/select/components/select/_multi-select.scss +17 -0
  11. package/styles/blueprint/select/components/select/_select.scss +31 -0
  12. package/styles/blueprint/src/_reset.scss +43 -0
  13. package/styles/blueprint/src/_typography.scss +459 -0
  14. package/styles/blueprint/src/accessibility/_focus-states.scss +17 -0
  15. package/styles/blueprint/src/blueprint-hi-contrast.scss +22 -0
  16. package/styles/blueprint/src/blueprint.scss +16 -0
  17. package/styles/blueprint/src/common/_color-aliases.scss +43 -0
  18. package/styles/blueprint/src/common/_colors.scss +116 -0
  19. package/styles/blueprint/src/common/_flex.scss +49 -0
  20. package/styles/blueprint/src/common/_mixins.scss +128 -0
  21. package/styles/blueprint/src/common/_react-transition.scss +117 -0
  22. package/styles/blueprint/src/common/_variables.scss +131 -0
  23. package/styles/blueprint/src/components/_index.scss +38 -0
  24. package/styles/blueprint/src/components/alert/_alert.scss +33 -0
  25. package/styles/blueprint/src/components/breadcrumbs/_breadcrumbs.scss +142 -0
  26. package/styles/blueprint/src/components/button/_button-group.scss +240 -0
  27. package/styles/blueprint/src/components/button/_button.scss +206 -0
  28. package/styles/blueprint/src/components/button/_common.scss +507 -0
  29. package/styles/blueprint/src/components/callout/_callout.scss +99 -0
  30. package/styles/blueprint/src/components/card/_card.scss +91 -0
  31. package/styles/blueprint/src/components/collapse/_collapse.scss +20 -0
  32. package/styles/blueprint/src/components/context-menu/_context-menu.scss +10 -0
  33. package/styles/blueprint/src/components/dialog/_dialog.scss +146 -0
  34. package/styles/blueprint/src/components/divider/_divider.scss +19 -0
  35. package/styles/blueprint/src/components/drawer/_drawer.scss +232 -0
  36. package/styles/blueprint/src/components/editable-text/_editable-text.scss +156 -0
  37. package/styles/blueprint/src/components/forms/_common.scss +239 -0
  38. package/styles/blueprint/src/components/forms/_control-group.scss +276 -0
  39. package/styles/blueprint/src/components/forms/_controls.scss +526 -0
  40. package/styles/blueprint/src/components/forms/_file-input.scss +155 -0
  41. package/styles/blueprint/src/components/forms/_form-group.scss +111 -0
  42. package/styles/blueprint/src/components/forms/_index.scss +20 -0
  43. package/styles/blueprint/src/components/forms/_input-group.scss +247 -0
  44. package/styles/blueprint/src/components/forms/_input.scss +115 -0
  45. package/styles/blueprint/src/components/forms/_label.scss +114 -0
  46. package/styles/blueprint/src/components/forms/_numeric-input.scss +40 -0
  47. package/styles/blueprint/src/components/hotkeys/_hotkeys.scss +50 -0
  48. package/styles/blueprint/src/components/html-select/_common.scss +52 -0
  49. package/styles/blueprint/src/components/html-select/_html-select.scss +104 -0
  50. package/styles/blueprint/src/components/html-table/_html-table.scss +208 -0
  51. package/styles/blueprint/src/components/icon/_icon.scss +79 -0
  52. package/styles/blueprint/src/components/menu/_common.scss +172 -0
  53. package/styles/blueprint/src/components/menu/_menu.scss +197 -0
  54. package/styles/blueprint/src/components/menu/_submenu.scss +41 -0
  55. package/styles/blueprint/src/components/navbar/_navbar.scss +117 -0
  56. package/styles/blueprint/src/components/non-ideal-state/_non-ideal-state.scss +43 -0
  57. package/styles/blueprint/src/components/overflow-list/_overflow-list.scss +13 -0
  58. package/styles/blueprint/src/components/overlay/_overlay.scss +94 -0
  59. package/styles/blueprint/src/components/panel-stack/_panel-stack.scss +103 -0
  60. package/styles/blueprint/src/components/popover/_common.scss +171 -0
  61. package/styles/blueprint/src/components/popover/_popover.scss +127 -0
  62. package/styles/blueprint/src/components/portal/_portal.scss +15 -0
  63. package/styles/blueprint/src/components/progress-bar/_common.scss +9 -0
  64. package/styles/blueprint/src/components/progress-bar/_progress-bar.scss +98 -0
  65. package/styles/blueprint/src/components/skeleton/_common.scss +8 -0
  66. package/styles/blueprint/src/components/skeleton/_skeleton.scss +64 -0
  67. package/styles/blueprint/src/components/slider/_common.scss +48 -0
  68. package/styles/blueprint/src/components/slider/_slider.scss +216 -0
  69. package/styles/blueprint/src/components/spinner/_spinner.scss +65 -0
  70. package/styles/blueprint/src/components/tabs/_tabs.scss +199 -0
  71. package/styles/blueprint/src/components/tag/_common.scss +202 -0
  72. package/styles/blueprint/src/components/tag/_tag.scss +75 -0
  73. package/styles/blueprint/src/components/tag-input/_tag-input.scss +165 -0
  74. package/styles/blueprint/src/components/toast/_toast.scss +203 -0
  75. package/styles/blueprint/src/components/tooltip/_common.scss +11 -0
  76. package/styles/blueprint/src/components/tooltip/_tooltip.scss +61 -0
  77. package/styles/blueprint/src/components/tree/_tree.scss +194 -0
@@ -0,0 +1,507 @@
1
+ // Copyright 2015 Palantir Technologies, Inc. All rights reserved.
2
+ // Licensed under the Apache License, Version 2.0.
3
+
4
+ @import "../../common/mixins";
5
+ @import "../../common/variables";
6
+ @import "../progress-bar/common";
7
+
8
+ $button-border-width: 1px !default;
9
+ $button-padding: ($pt-grid-size * 0.5) $pt-grid-size !default;
10
+ $button-padding-small: 0 ($pt-grid-size * 0.7) !default;
11
+ $button-padding-large: ($pt-grid-size * 0.5) ($pt-grid-size * 1.5) !default;
12
+ $button-icon-spacing: ($pt-button-height - $pt-icon-size-standard) * 0.5 !default;
13
+ $button-icon-spacing-large: ($pt-button-height-large - $pt-icon-size-large) * 0.5 !default;
14
+
15
+ /*
16
+ CSS `border` property issues:
17
+ - An element can only have one border.
18
+ - Borders can't stack with shadows.
19
+ - Borders modify the size of the element they're applied to.
20
+ - Border positioning requires the extra `box-sizing` property.
21
+
22
+ `box-shadow` doesn't have these issues, we're using it instead of `border`.
23
+ */
24
+ $button-box-shadow:
25
+ inset 0 0 0 $button-border-width rgba($black, 0.2),
26
+ inset 0 (-$button-border-width) 0 rgba($black, 0.1) !default;
27
+ $button-box-shadow-active:
28
+ inset 0 0 0 $button-border-width rgba($black, 0.2),
29
+ inset 0 1px 2px rgba($black, 0.2) !default;
30
+ $button-intent-box-shadow:
31
+ inset 0 0 0 $button-border-width rgba($black, 0.4),
32
+ inset 0 (-$button-border-width) 0 rgba($black, 0.2) !default;
33
+ $button-intent-box-shadow-active:
34
+ inset 0 0 0 $button-border-width rgba($black, 0.4),
35
+ inset 0 1px 2px rgba($black, 0.2) !default;
36
+
37
+ /*
38
+ Overlay shadows are used for default buttons
39
+ floating on top of other elements. This way, the
40
+ shadows blend with the colors beneath it.
41
+ Switches and slider handles both use these variables.
42
+ */
43
+ $button-box-shadow-overlay:
44
+ 0 0 0 $button-border-width rgba($black, 0.2),
45
+ 0 1px 1px rgba($black, 0.2) !default;
46
+ $button-box-shadow-overlay-active:
47
+ 0 0 0 $button-border-width rgba($black, 0.2),
48
+ inset 0 1px 1px rgba($black, 0.1) !default;
49
+
50
+ $dark-button-box-shadow:
51
+ 0 0 0 $button-border-width rgba($black, 0.4) !default;
52
+ $dark-button-box-shadow-active:
53
+ 0 0 0 $button-border-width rgba($black, 0.6),
54
+ inset 0 1px 2px rgba($black, 0.2) !default;
55
+ $dark-button-intent-box-shadow:
56
+ 0 0 0 $button-border-width rgba($black, 0.4) !default;
57
+ $dark-button-intent-box-shadow-active:
58
+ 0 0 0 $button-border-width rgba($black, 0.4),
59
+ inset 0 1px 2px rgba($black, 0.2) !default;
60
+
61
+ $button-gradient: linear-gradient(to bottom, rgba($white, 0.8), rgba($white, 0)) !default;
62
+ $button-intent-gradient: linear-gradient(to bottom, rgba($white, 0.1), rgba($white, 0)) !default;
63
+ $dark-button-gradient: linear-gradient(to bottom, rgba($white, 0.05), rgba($white, 0)) !default;
64
+
65
+ $button-color-disabled: $pt-text-color-disabled !default;
66
+ $button-background-color: $light-gray5 !default;
67
+ $button-background-color-hover: $light-gray4 !default;
68
+ $button-background-color-active: $light-gray2 !default;
69
+ $button-background-color-disabled: rgba($light-gray1, 0.5) !default;
70
+ $button-background-color-active-disabled: rgba($light-gray1, 0.7) !default;
71
+ $button-intent-color-disabled: rgba($white, 0.6);
72
+ $dark-button-color-disabled: $pt-dark-text-color-disabled !default;
73
+ $dark-button-background-color: $dark-gray5 !default;
74
+ $dark-button-background-color-hover: $dark-gray4 !default;
75
+ $dark-button-background-color-active: $dark-gray2 !default;
76
+ $dark-button-background-color-disabled: rgba($dark-gray5, 0.5) !default;
77
+ $dark-button-background-color-active-disabled: rgba($dark-gray5, 0.7) !default;
78
+ $dark-button-intent-color-disabled: rgba($white, 0.3);
79
+
80
+ $minimal-button-divider-width: 1px !default;
81
+ $minimal-button-background-color: none !default;
82
+ $minimal-button-background-color-hover: rgba($gray4, 0.3) !default;
83
+ $minimal-button-background-color-active: rgba($gray2, 0.3) !default;
84
+ $dark-minimal-button-background-color: none !default;
85
+ $dark-minimal-button-background-color-hover: rgba($gray3, 0.15) !default;
86
+ $dark-minimal-button-background-color-active: rgba($gray3, 0.3) !default;
87
+
88
+ $button-outlined-width: 1px !default;
89
+ $button-outlined-border-intent-opacity: 0.6 !default;
90
+ $button-outlined-border-disabled-intent-opacity: 0.2 !default;
91
+
92
+ // "intent": (default, hover, active colors)
93
+ $button-intents: (
94
+ "primary": ($pt-intent-primary, $blue2, $blue1),
95
+ "success": ($pt-intent-success, $green2, $green1),
96
+ "warning": ($pt-intent-warning, $orange2, $orange1),
97
+ "danger": ($pt-intent-danger, $red2, $red1)
98
+ ) !default;
99
+
100
+ @mixin pt-button-base() {
101
+ @include pt-flex-container(row, $button-icon-spacing, $inline: inline);
102
+ align-items: center;
103
+
104
+ border: none;
105
+ border-radius: $pt-border-radius;
106
+ cursor: pointer;
107
+ font-size: $pt-font-size;
108
+ justify-content: center;
109
+ padding: $button-padding;
110
+ text-align: left;
111
+ vertical-align: middle;
112
+ }
113
+
114
+ @mixin pt-button-height($height) {
115
+ min-height: $height;
116
+ min-width: $height;
117
+ }
118
+
119
+ @mixin pt-button-height-large() {
120
+ @include pt-button-height($pt-button-height-large);
121
+ @include pt-flex-margin(row, $button-icon-spacing-large);
122
+ font-size: $pt-font-size-large;
123
+ padding: $button-padding-large;
124
+ }
125
+
126
+ @mixin pt-button-height-default() {
127
+ @include pt-button-height($pt-button-height);
128
+ padding: $button-padding;
129
+ }
130
+
131
+ @mixin pt-button-height-small() {
132
+ @include pt-button-height($pt-button-height-small);
133
+ padding: $button-padding-small;
134
+ }
135
+
136
+ @mixin pt-button() {
137
+ background-color: $button-background-color;
138
+ background-image: $button-gradient;
139
+ box-shadow: $button-box-shadow;
140
+ color: $pt-text-color;
141
+
142
+ &:hover {
143
+ @include pt-button-hover();
144
+ }
145
+
146
+ &:active,
147
+ &.#{$ns}-active {
148
+ @include pt-button-active();
149
+ }
150
+
151
+ &:disabled,
152
+ &.#{$ns}-disabled {
153
+ @include pt-button-disabled();
154
+ }
155
+ }
156
+
157
+ @mixin pt-button-hover() {
158
+ background-clip: padding-box;
159
+ background-color: $button-background-color-hover;
160
+ box-shadow: $button-box-shadow;
161
+ }
162
+
163
+ @mixin pt-button-active() {
164
+ background-color: $button-background-color-active;
165
+ background-image: none;
166
+ box-shadow: $button-box-shadow-active;
167
+ }
168
+
169
+ @mixin pt-button-disabled() {
170
+ background-color: $button-background-color-disabled;
171
+ background-image: none;
172
+ box-shadow: none;
173
+ color: $button-color-disabled;
174
+ cursor: not-allowed;
175
+ outline: none;
176
+
177
+ &.#{$ns}-active,
178
+ &.#{$ns}-active:hover {
179
+ background: $button-background-color-active-disabled;
180
+ }
181
+ }
182
+
183
+ @mixin pt-button-intent($default-color, $hover-color, $active-color) {
184
+ background-color: $default-color;
185
+ background-image: $button-intent-gradient;
186
+ box-shadow: $button-intent-box-shadow;
187
+ color: $white;
188
+
189
+ &:hover,
190
+ &:active,
191
+ &.#{$ns}-active {
192
+ color: $white;
193
+ }
194
+
195
+ &:hover {
196
+ background-color: $hover-color;
197
+ box-shadow: $button-intent-box-shadow;
198
+ }
199
+
200
+ &:active,
201
+ &.#{$ns}-active {
202
+ background-color: $active-color;
203
+ background-image: none;
204
+ box-shadow: $button-intent-box-shadow-active;
205
+ }
206
+
207
+ &:disabled,
208
+ &.#{$ns}-disabled {
209
+ @include pt-button-intent-disabled($default-color);
210
+ }
211
+ }
212
+
213
+ @mixin pt-button-intent-disabled($default-color) {
214
+ background-color: rgba($default-color, 0.5);
215
+ background-image: none;
216
+ border-color: transparent;
217
+ box-shadow: none;
218
+ color: $button-intent-color-disabled;
219
+ }
220
+
221
+ @mixin pt-dark-button() {
222
+ background-color: $dark-button-background-color;
223
+ background-image: $dark-button-gradient;
224
+ box-shadow: $dark-button-box-shadow;
225
+ color: $pt-dark-text-color;
226
+
227
+ &:hover,
228
+ &:active,
229
+ &.#{$ns}-active {
230
+ color: $pt-dark-text-color;
231
+ }
232
+
233
+ &:hover {
234
+ @include pt-dark-button-hover();
235
+ }
236
+
237
+ &:active,
238
+ &.#{$ns}-active {
239
+ @include pt-dark-button-active();
240
+ }
241
+
242
+ &:disabled,
243
+ &.#{$ns}-disabled {
244
+ @include pt-dark-button-disabled();
245
+ }
246
+
247
+ .#{$ns}-button-spinner .#{$ns}-spinner-head {
248
+ background: $dark-progress-track-color;
249
+ stroke: $dark-progress-head-color;
250
+ }
251
+ }
252
+
253
+ @mixin pt-dark-button-hover() {
254
+ background-color: $dark-button-background-color-hover;
255
+ box-shadow: $dark-button-box-shadow;
256
+ }
257
+
258
+ @mixin pt-dark-button-active() {
259
+ background-color: $dark-button-background-color-active;
260
+ background-image: none;
261
+ box-shadow: $dark-button-box-shadow-active;
262
+ }
263
+
264
+ @mixin pt-dark-button-disabled() {
265
+ background-color: $dark-button-background-color-disabled;
266
+ background-image: none;
267
+ box-shadow: none;
268
+ color: $dark-button-color-disabled;
269
+
270
+ &.#{$ns}-active {
271
+ background: $dark-button-background-color-active-disabled;
272
+ }
273
+ }
274
+
275
+ @mixin pt-dark-button-intent() {
276
+ box-shadow: $dark-button-intent-box-shadow;
277
+
278
+ &:hover {
279
+ box-shadow: $dark-button-intent-box-shadow;
280
+ }
281
+
282
+ &:active,
283
+ &.#{$ns}-active {
284
+ box-shadow: $dark-button-intent-box-shadow-active;
285
+ }
286
+
287
+ &:disabled,
288
+ &.#{$ns}-disabled {
289
+ @include pt-dark-button-intent-disabled();
290
+ }
291
+ }
292
+
293
+ @mixin pt-dark-button-intent-disabled() {
294
+ background-image: none;
295
+ box-shadow: none;
296
+ color: $dark-button-intent-color-disabled;
297
+ }
298
+
299
+ @mixin pt-button-minimal() {
300
+ background: $minimal-button-background-color;
301
+ box-shadow: none;
302
+
303
+ &:hover {
304
+ background: $minimal-button-background-color-hover;
305
+ box-shadow: none;
306
+ color: $pt-text-color;
307
+ text-decoration: none;
308
+ }
309
+
310
+ &:active,
311
+ &.#{$ns}-active {
312
+ background: $minimal-button-background-color-active;
313
+ box-shadow: none;
314
+ color: $pt-text-color;
315
+ }
316
+
317
+ &:disabled,
318
+ &:disabled:hover,
319
+ &.#{$ns}-disabled,
320
+ &.#{$ns}-disabled:hover {
321
+ background: none;
322
+ color: $pt-text-color-disabled;
323
+ cursor: not-allowed;
324
+
325
+ &.#{$ns}-active {
326
+ background: $minimal-button-background-color-active;
327
+ }
328
+ }
329
+
330
+ .#{$ns}-dark & {
331
+ @include pt-dark-button-minimal();
332
+ }
333
+
334
+ @each $intent, $colors in $button-intents {
335
+ &.#{$ns}-intent-#{$intent} {
336
+ @include pt-button-minimal-intent(
337
+ map-get($pt-intent-colors, $intent),
338
+ map-get($pt-intent-text-colors, $intent),
339
+ map-get($pt-dark-intent-text-colors, $intent)
340
+ );
341
+ }
342
+ }
343
+ }
344
+
345
+ @mixin pt-dark-button-minimal() {
346
+ background: $dark-minimal-button-background-color;
347
+ box-shadow: none;
348
+ color: inherit;
349
+
350
+ &:hover,
351
+ &:active,
352
+ &.#{$ns}-active {
353
+ background: none;
354
+ box-shadow: none;
355
+ }
356
+
357
+ &:hover {
358
+ background: $dark-minimal-button-background-color-hover;
359
+ }
360
+
361
+ &:active,
362
+ &.#{$ns}-active {
363
+ background: $dark-minimal-button-background-color-active;
364
+ color: $pt-dark-text-color;
365
+ }
366
+
367
+ &:disabled,
368
+ &:disabled:hover,
369
+ &.#{$ns}-disabled,
370
+ &.#{$ns}-disabled:hover {
371
+ background: none;
372
+ color: $pt-dark-text-color-disabled;
373
+ cursor: not-allowed;
374
+
375
+ &.#{$ns}-active {
376
+ background: $dark-minimal-button-background-color-active;
377
+ }
378
+ }
379
+ }
380
+
381
+ @mixin pt-button-minimal-intent($intent-color, $text-color, $dark-text-color) {
382
+ color: $text-color;
383
+
384
+ &:hover,
385
+ &:active,
386
+ &.#{$ns}-active {
387
+ background: none;
388
+ box-shadow: none;
389
+ color: $text-color;
390
+ }
391
+
392
+ &:hover {
393
+ background: rgba($intent-color, 0.15);
394
+ color: $text-color;
395
+ }
396
+
397
+ &:active,
398
+ &.#{$ns}-active {
399
+ background: rgba($intent-color, 0.3);
400
+ color: $text-color;
401
+ }
402
+
403
+ &:disabled,
404
+ &.#{$ns}-disabled {
405
+ background: none;
406
+ color: rgba($text-color, 0.5);
407
+
408
+ &.#{$ns}-active {
409
+ background: rgba($intent-color, 0.3);
410
+ }
411
+ }
412
+
413
+ .#{$ns}-button-spinner .#{$ns}-spinner-head {
414
+ stroke: $text-color;
415
+ }
416
+
417
+ .#{$ns}-dark & {
418
+ color: $dark-text-color;
419
+
420
+ &:hover {
421
+ background: rgba($intent-color, 0.2);
422
+ color: $dark-text-color;
423
+ }
424
+
425
+ &:active,
426
+ &.#{$ns}-active {
427
+ background: rgba($intent-color, 0.3);
428
+ color: $dark-text-color;
429
+ }
430
+
431
+ &:disabled,
432
+ &.#{$ns}-disabled {
433
+ background: none;
434
+ color: rgba($dark-text-color, 0.5);
435
+
436
+ &.#{$ns}-active {
437
+ background: rgba($intent-color, 0.3);
438
+ }
439
+ }
440
+ }
441
+ }
442
+
443
+ @mixin pt-button-minimal-divider() {
444
+ $divider-height: $pt-grid-size * 2;
445
+ background: $pt-divider-black;
446
+
447
+ margin: ($pt-button-height - $divider-height) * 0.5;
448
+ width: $minimal-button-divider-width;
449
+
450
+ .#{$ns}-dark & {
451
+ background: $pt-dark-divider-white;
452
+ }
453
+ }
454
+
455
+ @mixin pt-button-outlined() {
456
+ border: $button-outlined-width solid rgba($pt-text-color, 0.2);
457
+ box-sizing: border-box;
458
+
459
+ &:disabled,
460
+ &.#{$ns}-disabled,
461
+ &:disabled:hover,
462
+ &.#{$ns}-disabled:hover {
463
+ border-color: rgba($pt-text-color-disabled, 0.1);
464
+ }
465
+
466
+ .#{$ns}-dark & {
467
+ @include pt-dark-button-outlined();
468
+ }
469
+
470
+ @each $intent, $colors in $button-intents {
471
+ &.#{$ns}-intent-#{$intent} {
472
+ @include pt-button-outlined-intent(
473
+ map-get($pt-intent-text-colors, $intent),
474
+ map-get($pt-dark-intent-text-colors, $intent)
475
+ );
476
+ }
477
+ }
478
+ }
479
+
480
+ @mixin pt-dark-button-outlined() {
481
+ border-color: rgba($white, 0.4);
482
+
483
+ &:disabled,
484
+ &:disabled:hover,
485
+ &.#{$ns}-disabled,
486
+ &.#{$ns}-disabled:hover {
487
+ border-color: rgba($white, 0.2);
488
+ }
489
+ }
490
+
491
+ @mixin pt-button-outlined-intent($text-color, $dark-text-color) {
492
+ border-color: rgba($text-color, $button-outlined-border-intent-opacity);
493
+
494
+ &:disabled,
495
+ &.#{$ns}-disabled {
496
+ border-color: rgba($text-color, $button-outlined-border-disabled-intent-opacity);
497
+ }
498
+
499
+ .#{$ns}-dark & {
500
+ border-color: rgba($dark-text-color, $button-outlined-border-intent-opacity);
501
+
502
+ &:disabled,
503
+ &.#{$ns}-disabled {
504
+ border-color: rgba($dark-text-color, $button-outlined-border-disabled-intent-opacity);
505
+ }
506
+ }
507
+ }
@@ -0,0 +1,99 @@
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
+ Callout
8
+
9
+ Markup:
10
+ <div class="#{$ns}-callout {{.modifier}}">
11
+ <h4 class="#{$ns}-heading">Callout Heading</h4>
12
+ It's dangerous to go alone! Take this.
13
+ </div>
14
+
15
+ .#{$ns}-intent-primary - Primary intent
16
+ .#{$ns}-intent-success - Success intent
17
+ .#{$ns}-intent-warning - Warning intent
18
+ .#{$ns}-intent-danger - Danger intent
19
+ .#{$ns}-icon-info-sign - With an icon
20
+
21
+ Styleguide callout
22
+ */
23
+
24
+ .#{$ns}-callout {
25
+ @include running-typography();
26
+ background-color: rgba($gray3, 0.15);
27
+ border-radius: $pt-border-radius;
28
+ padding: $pt-grid-size ($pt-grid-size * 1.2) ($pt-grid-size * 0.9);
29
+ position: relative;
30
+ width: 100%;
31
+
32
+ // CSS API support
33
+ &[class*="#{$ns}-icon-"] {
34
+ padding-left: ($pt-grid-size * 2) + $pt-icon-size-large;
35
+
36
+ &::before {
37
+ @include pt-icon($pt-icon-size-large);
38
+ color: $pt-icon-color;
39
+ left: $pt-grid-size;
40
+ position: absolute;
41
+ top: $pt-grid-size;
42
+ }
43
+ }
44
+
45
+ &.#{$ns}-callout-icon {
46
+ padding-left: ($pt-grid-size * 2) + $pt-icon-size-large;
47
+
48
+ > .#{$ns}-icon:first-child {
49
+ color: $pt-icon-color;
50
+ left: $pt-grid-size;
51
+ position: absolute;
52
+ top: $pt-grid-size;
53
+ }
54
+ }
55
+
56
+ .#{$ns}-heading {
57
+ line-height: $pt-icon-size-large;
58
+ margin-bottom: $pt-grid-size * 0.5;
59
+ margin-top: 0;
60
+
61
+ &:last-child {
62
+ margin-bottom: 0;
63
+ }
64
+ }
65
+
66
+ .#{$ns}-dark & {
67
+ background-color: rgba($gray3, 0.2);
68
+
69
+ &[class*="#{$ns}-icon-"]::before {
70
+ color: $pt-dark-icon-color;
71
+ }
72
+ }
73
+
74
+ @each $intent, $color in $pt-intent-colors {
75
+ &.#{$ns}-intent-#{$intent} {
76
+ background-color: rgba($color, 0.15);
77
+
78
+ &[class*="#{$ns}-icon-"]::before,
79
+ > .#{$ns}-icon:first-child,
80
+ .#{$ns}-heading {
81
+ color: map-get($pt-intent-text-colors, $intent);
82
+ }
83
+
84
+ .#{$ns}-dark & {
85
+ background-color: rgba($color, 0.25);
86
+
87
+ &[class*="#{$ns}-icon-"]::before,
88
+ > .#{$ns}-icon:first-child,
89
+ .#{$ns}-heading {
90
+ color: map-get($pt-dark-intent-text-colors, $intent);
91
+ }
92
+ }
93
+ }
94
+ }
95
+
96
+ .#{$ns}-running-text & {
97
+ margin: ($pt-grid-size * 2) 0;
98
+ }
99
+ }
@@ -0,0 +1,91 @@
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
+ Cards
8
+
9
+ Markup:
10
+ <div class="#{$ns}-card {{.modifier}}">
11
+ We build products that make people better at their most important work.
12
+ </div>
13
+
14
+ .#{$ns}-elevation-0 - Ground floor. This level provides just a gentle border shadow.
15
+ .#{$ns}-elevation-1 - First. Subtle drop shadow intended for static containers.
16
+ .#{$ns}-elevation-2 - Second. An even stronger shadow, moving on up.
17
+ .#{$ns}-elevation-3 - Third. For containers overlaying content temporarily.
18
+ .#{$ns}-elevation-4 - Fourth. The strongest shadow, usually for overlay containers on top of backdrops.
19
+ .#{$ns}-interactive - On hover, increase elevation and use pointer cursor.
20
+
21
+ Styleguide card
22
+ */
23
+
24
+ $card-padding: $pt-grid-size * 2 !default;
25
+
26
+ $card-background-color: $white !default;
27
+ $dark-card-background-color: $dark-gray4 !default;
28
+
29
+ $elevation-shadows: (
30
+ $pt-elevation-shadow-0
31
+ $pt-elevation-shadow-1
32
+ $pt-elevation-shadow-2
33
+ $pt-elevation-shadow-3
34
+ $pt-elevation-shadow-4
35
+ );
36
+ $dark-elevation-shadows: (
37
+ $pt-dark-elevation-shadow-0
38
+ $pt-dark-elevation-shadow-1
39
+ $pt-dark-elevation-shadow-2
40
+ $pt-dark-elevation-shadow-3
41
+ $pt-dark-elevation-shadow-4
42
+ );
43
+
44
+ .#{$ns}-card {
45
+ background-color: $card-background-color;
46
+ border-radius: $pt-border-radius;
47
+ box-shadow: $pt-elevation-shadow-0;
48
+ padding: $card-padding;
49
+ transition: transform ($pt-transition-duration * 2) $pt-transition-ease,
50
+ box-shadow ($pt-transition-duration * 2) $pt-transition-ease;
51
+
52
+ &.#{$ns}-dark,
53
+ .#{$ns}-dark & {
54
+ background-color: $dark-card-background-color;
55
+ box-shadow: $pt-dark-elevation-shadow-0;
56
+ }
57
+ }
58
+
59
+ @for $index from 1 through length($elevation-shadows) {
60
+ .#{$ns}-elevation-#{$index - 1} {
61
+ box-shadow: nth($elevation-shadows, $index);
62
+
63
+ &.#{$ns}-dark,
64
+ .#{$ns}-dark & {
65
+ box-shadow: nth($dark-elevation-shadows, $index);
66
+ }
67
+ }
68
+ }
69
+
70
+ .#{$ns}-card.#{$ns}-interactive {
71
+ &:hover {
72
+ box-shadow: $pt-elevation-shadow-3;
73
+ cursor: pointer;
74
+
75
+ &.#{$ns}-dark,
76
+ .#{$ns}-dark & {
77
+ box-shadow: $pt-dark-elevation-shadow-3;
78
+ }
79
+ }
80
+
81
+ &:active {
82
+ box-shadow: $pt-elevation-shadow-1;
83
+ opacity: 0.9;
84
+ transition-duration: 0;
85
+
86
+ &.#{$ns}-dark,
87
+ .#{$ns}-dark & {
88
+ box-shadow: $pt-dark-elevation-shadow-1;
89
+ }
90
+ }
91
+ }
@@ -0,0 +1,20 @@
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
+ $collapse-transition: ($pt-transition-duration * 2) $pt-transition-ease !default;
7
+
8
+ .#{$ns}-collapse {
9
+ height: 0;
10
+ overflow-y: hidden;
11
+ transition: height $collapse-transition;
12
+
13
+ .#{$ns}-collapse-body {
14
+ transition: transform $collapse-transition;
15
+
16
+ &[aria-hidden="true"] {
17
+ display: none;
18
+ }
19
+ }
20
+ }