@castlabs/ui 5.0.0 → 5.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@castlabs/ui",
3
- "version": "5.0.0",
3
+ "version": "5.1.1",
4
4
  "repository": "https://github.com/castlabs/ui-styleguide",
5
5
  "private": false,
6
6
  "description": "A vanilla HTML/CS/JS & Vue.js component library for castLabs.",
@@ -38,7 +38,6 @@ $dropdown-line-height: 1.25em;
38
38
  padding: $spacing-small - $dropdown-border $spacing-small - $dropdown-border;
39
39
  padding-right: $spacing-small * 3; // for chevron
40
40
  position: relative;
41
- white-space: preserve;
42
41
  }
43
42
 
44
43
  &::after {
@@ -59,6 +58,11 @@ $dropdown-line-height: 1.25em;
59
58
  }
60
59
  }
61
60
 
61
+ > span,
62
+ > div {
63
+ white-space: preserve-breaks;
64
+ }
65
+
62
66
  > [class^='cl-badge'] {
63
67
  position: absolute;
64
68
  right: $spacing-small;
@@ -188,7 +192,6 @@ div.cl-dropdown summary {
188
192
  margin-right: 0;
189
193
  padding: $spacing-tiny + $spacing-micro $spacing-small;
190
194
  position: relative;
191
- white-space: preserve;
192
195
  width: 100%;
193
196
  }
194
197
 
@@ -204,6 +207,11 @@ div.cl-dropdown summary {
204
207
  opacity: $color-hover-opacity;
205
208
  }
206
209
 
210
+ > span,
211
+ > div {
212
+ white-space: preserve-breaks;
213
+ }
214
+
207
215
  > [class^='cl-badge'] {
208
216
  position: absolute;
209
217
  right: $spacing-small;
@@ -0,0 +1,21 @@
1
+ ////
2
+ /// @group components
3
+ /// @access public
4
+ ////
5
+
6
+ // This file defines .cl-highlight modifiers for various components
7
+
8
+ $highlight-background: $color-ci-sand;
9
+
10
+ .cl-highlight {
11
+ background-color: $highlight-background;
12
+ }
13
+
14
+ .card-body,
15
+ .card-footer,
16
+ td,
17
+ tr {
18
+ &.cl-highlight {
19
+ background-color: $highlight-background !important; // sass-lint:disable-line no-important
20
+ }
21
+ }
@@ -8,6 +8,7 @@ $table-padding-vertical: 0.5rem;
8
8
  $table-padding-horizontal: 0.5rem;
9
9
  $table-icon-size: 2rem;
10
10
  $table-responsive: sm;
11
+ $table-lineheight: 1.2em;
11
12
 
12
13
  %cl-table-data {
13
14
  border: 0;
@@ -42,6 +43,8 @@ $table-responsive: sm;
42
43
  }
43
44
 
44
45
  tbody {
46
+ line-height: $table-lineheight;
47
+
45
48
  tr {
46
49
  &:nth-child(odd) {
47
50
  background-color: $color-ci-haze;
@@ -108,6 +111,24 @@ $table-responsive: sm;
108
111
  @extend %cl-a-default;
109
112
  }
110
113
 
114
+ // --- badges/bubbles in tables ----------------------------------------------
115
+
116
+ [class^='cl-badge'],
117
+ [class*=' cl-badge'],
118
+ [class^='cl-hashtag'],
119
+ [class*=' cl-hashtag'],
120
+ [class^='cl-plan'],
121
+ [class*=' cl-plan'],
122
+ [class^='cl-role'],
123
+ [class*=' cl-role'] {
124
+ max-height: 1.375em; // ~17px
125
+ min-height: 0;
126
+ padding-bottom: 2px;
127
+ padding-top: 3px;
128
+ position: relative;
129
+ top: -1px;
130
+ }
131
+
111
132
  // --- wrapping long columns -------------------------------------------------
112
133
 
113
134
  @for $col from 1 through 16 {
@@ -119,6 +140,7 @@ $table-responsive: sm;
119
140
  }
120
141
 
121
142
  // --- responsive phone tables -----------------------------------------------
143
+
122
144
  @include media-breakpoint-down($table-responsive) {
123
145
  &:not(.cl-table-nonresponsive) {
124
146
  td,
@@ -1,8 +1,13 @@
1
1
  .cl-table-data {
2
2
  .cl-td-code {
3
- @include typography-font($typography-font-list-monospace, 400, px(15), 1.25, 0.025em, 80%);
4
-
5
- padding-top: 0.6rem;
3
+ @include typography-font(
4
+ $typography-font-list-monospace,
5
+ 400,
6
+ px(15),
7
+ $table-lineheight * 1.066666667,
8
+ 0.025em,
9
+ 80%
10
+ );
6
11
 
7
12
  @include media-breakpoint-down($table-responsive) {
8
13
  table:not(.cl-table-nonresponsive) & {
@@ -1,9 +1,15 @@
1
1
  .cl-table-data {
2
2
  .cl-td-id,
3
3
  .cl-td-uuid {
4
- @include typography-font($typography-font-list-monospace, 400, px(15), 1, 0.025em, 80%);
4
+ @include typography-font(
5
+ $typography-font-list-monospace,
6
+ 400,
7
+ px(15),
8
+ $table-lineheight * 1.066666667,
9
+ 0.025em,
10
+ 80%
11
+ );
5
12
 
6
- padding-top: 0.6rem;
7
13
  width: 2.5em;
8
14
  word-wrap: unset;
9
15
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  %cl-table-data-cel {
4
4
  td {
5
- @include typography-font($typography-font-list-sans, 400, px(16), 1.2em);
5
+ @include typography-font($typography-font-list-sans, 400, px(16), $table-lineheight);
6
6
 
7
7
  padding-bottom: $table-padding-vertical;
8
8
  padding-top: $table-padding-vertical;
@@ -1,5 +1,5 @@
1
1
  ////
2
- /// @group layout
2
+ /// @group components
3
3
  /// @access public
4
4
  ////
5
5
 
@@ -1,5 +1,5 @@
1
1
  ////
2
- /// @group layout
2
+ /// @group components
3
3
  /// @access public
4
4
  ////
5
5
 
@@ -29,6 +29,7 @@ $castlabs-ui-asset-prefix: '..' !default;
29
29
  @import '../components/ClDropdown/style';
30
30
  @import '../components/ClDropzone/style';
31
31
  @import '../components/ClFooter/style';
32
+ @import '../components/ClHighlight/style';
32
33
  @import '../components/ClIcon/style';
33
34
  @import '../components/ClIconotron/style';
34
35
  @import '../components/ClList/style';