@castlabs/ui 4.23.0 → 4.24.0

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.0",
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;
@@ -57,6 +57,13 @@ $dropdown-color-chevron-bright: rgba($color-ci-silver, 0.5);
57
57
  width: $spacing-small * 2;
58
58
  }
59
59
  }
60
+
61
+ > [class^='cl-badge'] {
62
+ position: absolute;
63
+ right: $spacing-small;
64
+ top: $spacing-tiny + $spacing-micro;
65
+ z-index: 1;
66
+ }
60
67
  }
61
68
 
62
69
  > summary::marker,
@@ -81,7 +88,7 @@ $dropdown-color-chevron-bright: rgba($color-ci-silver, 0.5);
81
88
  font-size: px(14);
82
89
  font-weight: 400;
83
90
  letter-spacing: 0;
84
- margin-top: $spacing-tiny;
91
+ margin-top: px(5);
85
92
  opacity: $color-hover-opacity;
86
93
  }
87
94
 
@@ -175,9 +182,10 @@ div.cl-dropdown summary {
175
182
 
176
183
  & {
177
184
  display: block;
185
+ line-height: $dropdown-line-height;
178
186
  margin-left: 0;
179
187
  margin-right: 0;
180
- padding: $spacing-small;
188
+ padding: $spacing-tiny + $spacing-micro $spacing-small;
181
189
  position: relative;
182
190
  width: 100%;
183
191
  }
@@ -185,6 +193,20 @@ div.cl-dropdown summary {
185
193
  &:hover {
186
194
  background-color: $color-ci-white;
187
195
  }
196
+
197
+ .cl-subentry {
198
+ font-size: px(14);
199
+ font-weight: 400;
200
+ letter-spacing: 0;
201
+ margin-top: px(5);
202
+ opacity: $color-hover-opacity;
203
+ }
204
+
205
+ > [class^='cl-badge'] {
206
+ position: absolute;
207
+ right: $spacing-small;
208
+ top: $spacing-tiny + $spacing-micro;
209
+ }
188
210
  }
189
211
 
190
212
  .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