@castlabs/ui 4.23.0 → 4.24.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": "4.23.0",
3
+ "version": "4.24.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.",
@@ -8,6 +8,7 @@
8
8
  $dropdown-border: 0.125rem; // a 2px border to add so there is space for the outline
9
9
  $dropdown-color-chevron: rgba($color-ci-white, 0.5);
10
10
  $dropdown-color-chevron-bright: rgba($color-ci-silver, 0.5);
11
+ $dropdown-line-height: 1.25em;
11
12
 
12
13
  .cl-dropdown {
13
14
  #{'--element-fg-color'}: $color-text;
@@ -30,7 +31,6 @@ $dropdown-color-chevron-bright: rgba($color-ci-silver, 0.5);
30
31
  border: $dropdown-border solid var(--element-bg-color); // border need so that outline is not behind ::after
31
32
  color: var(--element-fg-color);
32
33
  font-size: px(18);
33
- line-height: 1.25em;
34
34
  list-style: none;
35
35
  margin-left: 0;
36
36
  margin-right: 0;
@@ -38,6 +38,7 @@ $dropdown-color-chevron-bright: rgba($color-ci-silver, 0.5);
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;
41
42
  }
42
43
 
43
44
  &::after {
@@ -57,6 +58,13 @@ $dropdown-color-chevron-bright: rgba($color-ci-silver, 0.5);
57
58
  width: $spacing-small * 2;
58
59
  }
59
60
  }
61
+
62
+ > [class^='cl-badge'] {
63
+ position: absolute;
64
+ right: $spacing-small;
65
+ top: $spacing-tiny + $spacing-micro;
66
+ z-index: 1;
67
+ }
60
68
  }
61
69
 
62
70
  > summary::marker,
@@ -81,7 +89,7 @@ $dropdown-color-chevron-bright: rgba($color-ci-silver, 0.5);
81
89
  font-size: px(14);
82
90
  font-weight: 400;
83
91
  letter-spacing: 0;
84
- margin-top: $spacing-tiny;
92
+ margin-top: px(5);
85
93
  opacity: $color-hover-opacity;
86
94
  }
87
95
 
@@ -175,16 +183,32 @@ div.cl-dropdown summary {
175
183
 
176
184
  & {
177
185
  display: block;
186
+ line-height: $dropdown-line-height;
178
187
  margin-left: 0;
179
188
  margin-right: 0;
180
- padding: $spacing-small;
189
+ padding: $spacing-tiny + $spacing-micro $spacing-small;
181
190
  position: relative;
191
+ white-space: preserve;
182
192
  width: 100%;
183
193
  }
184
194
 
185
195
  &:hover {
186
196
  background-color: $color-ci-white;
187
197
  }
198
+
199
+ .cl-subentry {
200
+ font-size: px(14);
201
+ font-weight: 400;
202
+ letter-spacing: 0;
203
+ margin-top: px(5);
204
+ opacity: $color-hover-opacity;
205
+ }
206
+
207
+ > [class^='cl-badge'] {
208
+ position: absolute;
209
+ right: $spacing-small;
210
+ top: $spacing-tiny + $spacing-micro;
211
+ }
188
212
  }
189
213
 
190
214
  .cl-dropdown-primary {
@@ -29,9 +29,6 @@
29
29
  color: $color-ci-silver;
30
30
  }
31
31
 
32
- fieldset[disabled] input,
33
- fieldset[disabled] textarea,
34
- fieldset[disabled] select,
35
32
  textarea[disabled],
36
33
  input[disabled],
37
34
  select[disabled] {
@@ -12,5 +12,57 @@
12
12
  legend {
13
13
  @extend %p-form-label;
14
14
  }
15
+
16
+ &:disabled,
17
+ &.disabled {
18
+ opacity: 0.5;
19
+
20
+ // reset disabled element properties so fieldset-opacity does not disable twice
21
+ [type='text'],
22
+ [type='password'],
23
+ [type='url'],
24
+ [type='date'],
25
+ [type='email'],
26
+ [type='number'],
27
+ [type='date'],
28
+ [type='time'],
29
+ [type='datetime-local'],
30
+ textarea,
31
+ select {
32
+ @extend %form-field-box;
33
+ @extend %form-field-typography;
34
+
35
+ cursor: not-allowed;
36
+ }
37
+
38
+ .form-label,
39
+ .valid-feedback,
40
+ .form-check .form-check-input:disabled ~ .form-check-label {
41
+ color: $color-text;
42
+ }
43
+
44
+ [type='checkbox'] {
45
+ border-color: $color-ci-dim !important;
46
+
47
+ &:checked {
48
+ background-color: $color-ci-dim;
49
+ }
50
+
51
+ &:indeterminate {
52
+ box-shadow:
53
+ 0 0 0 0.15em $color-white-100 inset,
54
+ 0 0 0 1em $color-ci-dim inset !important;
55
+ }
56
+ }
57
+
58
+ [type='radio'] {
59
+ border-color: $color-ci-dim !important;
60
+
61
+ &:checked {
62
+ background-color: $color-ci-dim;
63
+ border-color: $color-ci-dim;
64
+ }
65
+ }
66
+ }
15
67
  }
16
68
  }
@@ -343,7 +343,8 @@ $sidenav-color-background: $color-ci-haze;
343
343
  & {
344
344
  display: inline-block;
345
345
  line-height: 1.5em;
346
- padding: $spacing-tiny 0 $spacing-tiny $spacing-small;
346
+ padding: $spacing-tiny $spacing-small;
347
+ position: relative;
347
348
  width: 100%;
348
349
  }
349
350
 
@@ -351,16 +352,18 @@ $sidenav-color-background: $color-ci-haze;
351
352
  @extend %p-small;
352
353
 
353
354
  color: $color-ci-dim;
354
- margin-top: 0;
355
+ line-height: 1.4em;
356
+ margin-top: px(3);
355
357
 
356
358
  + .cl-nav-item-info {
357
- margin-top: $spacing-tiny;
359
+ margin-top: $spacing-micro;
358
360
  }
359
361
  }
360
362
 
361
- .badge {
362
- position: relative;
363
- top: -1px;
363
+ > [class^='cl-badge'] {
364
+ position: absolute;
365
+ right: $spacing-small;
366
+ top: $spacing-tiny + $spacing-micro;
364
367
  }
365
368
 
366
369
  &:hover:not(.active) {
@@ -374,7 +377,7 @@ $sidenav-color-background: $color-ci-haze;
374
377
  background-color: $color-ci-white;
375
378
  color: $color-ci-red;
376
379
  display: inline-block;
377
- padding: $spacing-tiny 0 $spacing-tiny $spacing-small;
380
+ padding: $spacing-tiny $spacing-small;
378
381
  position: relative;
379
382
  }
380
383
 
@@ -436,19 +439,23 @@ $sidenav-color-background: $color-ci-haze;
436
439
  }
437
440
  }
438
441
 
442
+ .cl-nav-item-lock,
439
443
  .cl-nav-item-locked {
440
- &:hover {
441
- cursor: not-allowed;
442
- }
443
-
444
- span::after {
444
+ span:first-of-type::after {
445
445
  @include cl-fontawesome('\f023');
446
446
 
447
447
  & {
448
448
  margin-left: $spacing-tiny;
449
449
  opacity: 0.5;
450
- pointer-events: none;
451
450
  top: inherit;
452
451
  }
453
452
  }
454
453
  }
454
+
455
+ .cl-nav-item-locked {
456
+ opacity: 0.5;
457
+
458
+ &:hover {
459
+ cursor: not-allowed;
460
+ }
461
+ }