@castlabs/ui 7.0.1 → 7.0.3

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 (40) hide show
  1. package/dist/castlabs-ui.common.js +4 -4
  2. package/dist/castlabs-ui.common.js.map +1 -1
  3. package/dist/castlabs-ui.css +2 -2
  4. package/dist/castlabs-ui.umd.js +7 -7
  5. package/dist/castlabs-ui.umd.js.map +1 -1
  6. package/package.json +1 -1
  7. package/src/components/ClAlert/style.scss +0 -4
  8. package/src/components/ClBadge/style.variables.scss +9 -7
  9. package/src/components/ClButton/style.scss +5 -3
  10. package/src/components/ClCard/style.scss +1 -0
  11. package/src/components/ClCard/style.variables.scss +1 -1
  12. package/src/components/ClDropdown/style.scss +10 -9
  13. package/src/components/ClDropzone/style.scss +1 -1
  14. package/src/components/ClFooter/style.scss +1 -0
  15. package/src/components/ClList/style.variables.scss +1 -2
  16. package/src/components/ClPagination/style.scss +1 -1
  17. package/src/components/ClTabs/style.scss +6 -0
  18. package/src/components/ClToggle/style.scss +6 -1
  19. package/src/components/ClTooltip/style.scss +44 -0
  20. package/src/components/form/ClField/style.scss +1 -2
  21. package/src/components/form/ClFieldCheck/style.scss +2 -4
  22. package/src/components/form/ClFieldFile/style.scss +5 -4
  23. package/src/components/form/ClFieldGroup/style.scss +60 -38
  24. package/src/components/form/ClFieldInput/style.scss +2 -9
  25. package/src/components/form/ClFieldSelect/style.scss +1 -1
  26. package/src/components/form/ClForm/style.scss +1 -1
  27. package/src/components/modal/ClModal/style.scss +1 -1
  28. package/src/components/navigation/ClNavSide/ClNavDrawer/style.scss +21 -17
  29. package/src/components/navigation/ClNavTop/style.scss +2 -1
  30. package/src/components/table/ClTable/style.variables.scss +2 -14
  31. package/src/components/table/ClTableCel/Audit/style.scss +1 -1
  32. package/src/components/table/ClTableCel/Boolean/style.scss +1 -1
  33. package/src/components/text/ClLinkExternal/style.scss +3 -1
  34. package/src/components/widget/ClCookieBanner/style.scss +9 -2
  35. package/src/styles/abstracts/color.scss +27 -8
  36. package/src/styles/components/button.variables.scss +2 -2
  37. package/src/styles/components/form.variables.scss +6 -6
  38. package/src/styles/layout/typography.scss +1 -0
  39. package/src/styles/layout/typography.variables.scss +2 -2
  40. package/src/styles/vendors/castlabs.scss +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@castlabs/ui",
3
- "version": "7.0.1",
3
+ "version": "7.0.3",
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.",
@@ -36,10 +36,6 @@
36
36
  color: $color-attention;
37
37
  content: '\f057';
38
38
  }
39
-
40
- a {
41
- color: $color-attention;
42
- }
43
39
  }
44
40
 
45
41
  &.cl-alert-warning {
@@ -44,17 +44,19 @@ $badge-baseline-shift: 0.055555em; // 1px @ 14pt
44
44
  %cl-badge-derived {
45
45
  @extend %cl-badge;
46
46
 
47
+ border: 0;
47
48
  content: ' ';
48
- padding-left: $spacing-tiny;
49
- padding-right: 0;
50
- width: 3em;
49
+ padding: 0 0 0 $spacing-tiny;
51
50
 
52
- + * {
53
- margin-left: -1.75em;
51
+ > .cl-badge {
52
+ margin-left: -1em;
54
53
  }
55
54
 
56
- &.cl-badge-sm + * {
57
- margin-left: -2em;
55
+ > .cl-badge.cl-badge-sm,
56
+ > .cl-plan,
57
+ > .cl-role,
58
+ > .cl-hashtag {
59
+ margin-left: -1.25em;
58
60
  }
59
61
 
60
62
  &::before {
@@ -11,7 +11,7 @@
11
11
  @extend %cl-p-nav;
12
12
  @include cl-button;
13
13
  @include cl-button-color;
14
- @include cl-button-focus-outline(var(--cl-color-text));
14
+ @include cl-button-focus-outline;
15
15
 
16
16
  &.cl-btn-icon {
17
17
  min-width: 2.1em;
@@ -48,8 +48,10 @@
48
48
  @extend %cl-a-btn;
49
49
 
50
50
  @include typography-link($color-text, $color-ci-red, 0);
51
+ @include cl-color-focus-outline(var(--cl-color-focus), 2px);
51
52
 
52
53
  border: 0;
54
+ border-radius: 0;
53
55
  font-weight: 500;
54
56
  line-height: 1;
55
57
  margin-left: $spacing-tiny;
@@ -68,7 +70,7 @@
68
70
 
69
71
  .cl-btn-ghost {
70
72
  // an accessible, invisible button that can trigger clicks
71
- @include cl-button-focus-outline($color-text);
73
+ @include cl-button-focus-outline;
72
74
 
73
75
  background: transparent;
74
76
  border: 0;
@@ -129,7 +131,7 @@
129
131
 
130
132
  // --- responsive tweaks -------------------------------------------------------
131
133
 
132
- .btn:not(.cl-btn-quickaction) {
134
+ .btn:not([class*='cl-btn-']) {
133
135
  @include media-breakpoint-down(sm) {
134
136
  width: 100%;
135
137
  }
@@ -46,6 +46,7 @@ details.card {
46
46
 
47
47
  &:focus {
48
48
  @include cl-color-focus-outline;
49
+
49
50
  border-radius: $brand-border-radius;
50
51
  }
51
52
  }
@@ -197,7 +197,7 @@ $card-spacing-tight: $spacing-small;
197
197
 
198
198
  .card-header {
199
199
  @extend %cl-h4;
200
- @include cl-button-focus-outline(var(--cl-color-text));
200
+ @include cl-button-focus-outline;
201
201
 
202
202
  color: var(--cl-color-text);
203
203
  }
@@ -8,7 +8,7 @@
8
8
 
9
9
  $dropdown-border: 0.125rem; // a 2px border to add so there is space for the outline
10
10
  $dropdown-color-chevron: rgba($color-ci-white, 0.5);
11
- $dropdown-color-chevron-bright: rgba($color-ci-silver, 0.5);
11
+ $dropdown-color-chevron-bright: rgba($color-ci-clay, 0.5);
12
12
  $dropdown-line-height: 1.25em;
13
13
 
14
14
  .cl-dropdown {
@@ -22,7 +22,7 @@ $dropdown-line-height: 1.25em;
22
22
  summary {
23
23
  @extend %cl-p-nav;
24
24
 
25
- @include cl-color-focus-outline(var(--cl-color-text));
25
+ @include cl-color-focus-outline;
26
26
 
27
27
  border: $dropdown-border solid var(--cl-color-background); // border need so that outline is not behind ::after
28
28
  color: var(--cl-color-text);
@@ -44,12 +44,13 @@ $dropdown-line-height: 1.25em;
44
44
  box-shadow: -8px 0 4px var(--cl-color-background);
45
45
  color: $dropdown-color-chevron-bright;
46
46
  display: flex;
47
- height: 100%;
47
+ font-size: px(18);
48
+ height: calc(100% - 8px);
48
49
  justify-content: flex-start;
49
50
  position: absolute;
50
- right: 0;
51
- top: 0;
52
- width: $spacing-small * 2;
51
+ right: 4px;
52
+ top: 4px;
53
+ width: calc($spacing-small * 2 - 2px);
53
54
  }
54
55
 
55
56
  > span,
@@ -76,7 +77,7 @@ $dropdown-line-height: 1.25em;
76
77
  padding-bottom: $spacing-tiny;
77
78
 
78
79
  summary {
79
- border-bottom: 2px solid $color-ci-white;
80
+ border-bottom: $brand-line-width solid $color-ci-white;
80
81
  margin-bottom: $spacing-tiny;
81
82
 
82
83
  &::after {
@@ -144,7 +145,7 @@ div.cl-dropdown summary {
144
145
  }
145
146
 
146
147
  .cl-dropdown-arrow {
147
- background-color: $color-ci-haze;
148
+ background-color: $color-ci-eggshell;
148
149
  content: '';
149
150
  display: inline-block;
150
151
  height: 1rem;
@@ -164,7 +165,7 @@ div.cl-dropdown summary {
164
165
  @extend %cl-p-nav;
165
166
 
166
167
  @include typography-link(var(--cl-color-text), var(--cl-color-text), 0);
167
- @include cl-color-focus-outline(var(--cl-color-text));
168
+ @include cl-color-focus-outline;
168
169
 
169
170
  display: block;
170
171
  line-height: $dropdown-line-height;
@@ -2,7 +2,7 @@
2
2
  border: px(2) dashed $color-ci-clay;
3
3
  border-radius: $brand-border-radius;
4
4
  cursor: pointer;
5
- padding: $spacing-tiny;
5
+ padding: $spacing-tiny $spacing-small;
6
6
  text-align: center;
7
7
 
8
8
  i {
@@ -13,6 +13,7 @@
13
13
 
14
14
  a {
15
15
  @include typography-link(var(--cl-color-text), $color-ci-red, 0);
16
+ @include cl-color-focus-outline(var(--cl-color-focus), 2px);
16
17
 
17
18
  &:hover {
18
19
  text-decoration: underline;
@@ -94,9 +94,8 @@ $list-dt-width: 14rem;
94
94
 
95
95
  %cl-dl {
96
96
  dt {
97
- @extend %cl-p-form-label;
98
-
99
97
  display: block;
98
+ font-weight: 500;
100
99
  }
101
100
 
102
101
  dd {
@@ -25,7 +25,7 @@
25
25
  .page-link {
26
26
  @include cl-button;
27
27
  @include cl-button-color;
28
- @include cl-button-focus-outline(var(--cl-color-text));
28
+ @include cl-button-focus-outline;
29
29
 
30
30
  border-radius: $brand-border-radius !important; // overrule BS
31
31
  font-size: px(14);
@@ -73,6 +73,12 @@
73
73
  }
74
74
 
75
75
  @for $i from 1 through 16 {
76
+ .cl-tab-#{$i}:focus ~ ul {
77
+ .cl-tab-#{$i} label {
78
+ @include cl-color-focus-outline-raw;
79
+ }
80
+ }
81
+
76
82
  .cl-tab-#{$i}:checked ~ ul {
77
83
  .cl-tab-#{$i} {
78
84
  border-color: $color-selected;
@@ -6,7 +6,7 @@
6
6
  // This file defines castlabs toggle/checkboxes.
7
7
 
8
8
  .cl-toggle-checkbox {
9
- @include cl-button-focus-outline(var(--cl-color-text));
9
+ @include cl-button-focus-outline;
10
10
 
11
11
  // hide checkbox but keep it tab-able
12
12
  display: inline-block;
@@ -34,9 +34,14 @@
34
34
  }
35
35
  }
36
36
 
37
+ &:focus + .cl-badge {
38
+ @include cl-color-focus-outline-raw;
39
+ }
40
+
37
41
  &:not(:checked) + .cl-badge {
38
42
  background-color: transparent;
39
43
  color: var(--cl-color-background);
44
+ #{'--cl-color-focus'}: rgba($color-ci-night, 0.5);
40
45
 
41
46
  i:nth-of-type(1) {
42
47
  display: none;
@@ -28,4 +28,48 @@
28
28
  color: var(--cl-color-text);
29
29
  }
30
30
  }
31
+
32
+ &.cl-tooltip-primary, // deprecated legacy name
33
+ &.cl-tooltip-red {
34
+ #{'--cl-color-background'}: $color-ci-red;
35
+ #{'--cl-color-text'}: $color-ci-eggshell;
36
+ }
37
+
38
+ &.cl-tooltip-secondary, // deprecated legacy name
39
+ &.cl-tooltip-sky {
40
+ #{'--cl-color-background'}: $color-ci-sky;
41
+ #{'--cl-color-text'}: $color-ci-night;
42
+ }
43
+
44
+ &.cl-tooltip-dark, // deprecated legacy name
45
+ &.cl-tooltip-night {
46
+ #{'--cl-color-background'}: $color-ci-night;
47
+ #{'--cl-color-text'}: $color-ci-eggshell;
48
+ }
49
+
50
+ &.cl-tooltip-light, // deprecated legacy name
51
+ &.cl-tooltip-clay {
52
+ #{'--cl-color-background'}: $color-ci-clay;
53
+ #{'--cl-color-text'}: $color-ci-night;
54
+ }
55
+
56
+ &.cl-tooltip-eggshell {
57
+ #{'--cl-color-background'}: $color-ci-eggshell;
58
+ #{'--cl-color-text'}: $color-ci-night;
59
+ }
60
+
61
+ &.cl-tooltip-ash {
62
+ #{'--cl-color-background'}: $color-ci-ash;
63
+ #{'--cl-color-text'}: $color-ci-eggshell;
64
+ }
65
+
66
+ &.cl-tooltip-berry {
67
+ #{'--cl-color-background'}: $color-ci-berry;
68
+ #{'--cl-color-text'}: $color-ci-eggshell;
69
+ }
70
+
71
+ &.cl-tooltip-petrol {
72
+ #{'--cl-color-background'}: $color-ci-petrol;
73
+ #{'--cl-color-text'}: $color-ci-eggshell;
74
+ }
31
75
  }
@@ -8,8 +8,7 @@
8
8
 
9
9
  [invalid],
10
10
  .invalid {
11
- border-color: $color-attention;
12
- // color: $color-attention;
11
+ border-color: $color-attention !important;
13
12
 
14
13
  + * + .invalid-feedback,
15
14
  + .invalid-feedback {
@@ -17,10 +17,6 @@ $form-check-background: $color-ci-eggshell;
17
17
  margin-top: $spacing-tiny + $spacing-micro;
18
18
  }
19
19
 
20
- .form-check-label {
21
- padding-top: px(1);
22
- }
23
-
24
20
  .form-check-input {
25
21
  margin-left: -$spacing-medium;
26
22
  margin-right: $spacing-micro;
@@ -29,6 +25,7 @@ $form-check-background: $color-ci-eggshell;
29
25
  &[type='checkbox'] {
30
26
  border: $form-field-border;
31
27
  border-radius: px(4);
28
+ margin-top: 0.2em;
32
29
 
33
30
  &:checked {
34
31
  background-color: $color-selected;
@@ -52,6 +49,7 @@ $form-check-background: $color-ci-eggshell;
52
49
 
53
50
  &[type='radio'] {
54
51
  border: $form-field-border;
52
+ margin-top: 0.2em;
55
53
 
56
54
  &:checked {
57
55
  background-color: $color-selected;
@@ -10,7 +10,7 @@
10
10
  @extend %form-field-box;
11
11
  @extend %form-field-typography-sans;
12
12
 
13
- @include form-focus;
13
+ @include cl-form-focus;
14
14
 
15
15
  &.cl-file {
16
16
  border: 0;
@@ -22,12 +22,13 @@
22
22
  }
23
23
 
24
24
  &:focus + .cl-file-companion {
25
- @include form-focus-embed();
25
+ @include cl-form-focus-embed();
26
+ @include cl-color-focus-outline-raw;
26
27
  }
27
28
 
28
29
  &[invalid]:focus + .cl-file-companion,
29
30
  &.invalid:focus + .cl-file-companion {
30
- border-color: $color-ci-silver;
31
+ border-color: $color-ci-clay;
31
32
  }
32
33
 
33
34
  .form-label + & {
@@ -61,7 +62,7 @@
61
62
  @extend %form-field-box;
62
63
  @extend %form-field-typography-sans;
63
64
 
64
- @include form-focus;
65
+ @include cl-form-focus;
65
66
 
66
67
  letter-spacing: 0;
67
68
  text-transform: none;
@@ -30,19 +30,21 @@
30
30
  z-index: 1; // needed so the focused element's border is always on top
31
31
  }
32
32
 
33
- &:not(.btn) + * {
34
- // trick to share one ][ border between 2 inputs
35
- &:not(.btn) {
36
- border-left-width: 0;
37
-
38
- &:focus,
39
- &.invalid:focus {
40
- box-shadow: -$brand-line-width 0 0 $color-focus !important; // sass-lint:disable-line no-important
33
+ @include media-breakpoint-up(sm) {
34
+ &:not(.btn) + * {
35
+ // trick to share one ][ border between 2 inputs
36
+ &:not(.btn) {
37
+ border-left-width: 0;
38
+
39
+ &:focus,
40
+ &.invalid:focus {
41
+ box-shadow: -$brand-line-width 0 0 $color-focus !important; // sass-lint:disable-line no-important
42
+ }
41
43
  }
42
- }
43
44
 
44
- &.invalid {
45
- box-shadow: -$brand-line-width 0 0 $color-attention !important; // sass-lint:disable-line no-important
45
+ &.invalid {
46
+ box-shadow: -$brand-line-width 0 0 $color-attention !important; // sass-lint:disable-line no-important
47
+ }
46
48
  }
47
49
  }
48
50
  }
@@ -62,38 +64,58 @@
62
64
  width: auto;
63
65
  }
64
66
 
65
- // --- un-round left sides ------------------------------------------------------
66
- .input-group-text .form-control {
67
- border-bottom-left-radius: $brand-border-radius;
68
- border-top-left-radius: $brand-border-radius;
69
- }
67
+ @include media-breakpoint-down(sm) {
68
+ flex-direction: column;
70
69
 
71
- .input-group-text + .form-control,
72
- .form-control + .form-control,
73
- .form-control + p + .form-control,
74
- .form-control + p + p + .form-control {
75
- border-bottom-left-radius: 0;
76
- border-top-left-radius: 0;
77
- }
70
+ > * {
71
+ width: 100% !important;
78
72
 
79
- // --- un-round right sides ------------------------------------------------------
80
- .input-group-text:first-child,
81
- .form-control:first-child {
82
- border-bottom-right-radius: 0;
83
- border-top-right-radius: 0;
84
- }
73
+ &:not(:first-child) {
74
+ margin-top: $spacing-tiny;
75
+ }
85
76
 
86
- .form-control + .form-control,
87
- .form-control + p + .form-control,
88
- .form-control + p + p + .form-control {
89
- border-bottom-right-radius: 0;
90
- border-top-right-radius: 0;
77
+ &.btn {
78
+ font-size: 0.75em;
79
+ margin-left: 0 !important;
80
+ }
81
+ }
91
82
  }
92
83
 
93
- > .cl-last-child,
94
- > :last-child {
95
- border-bottom-right-radius: $brand-border-radius !important;
96
- border-top-right-radius: $brand-border-radius !important;
84
+ @include media-breakpoint-up(sm) {
85
+ > .input-group-text,
86
+ > .form-control {
87
+ border-radius: 0;
88
+
89
+ &:first-of-type {
90
+ border-bottom-left-radius: $brand-border-radius;
91
+ border-top-left-radius: $brand-border-radius;
92
+ }
93
+
94
+ &:last-of-type {
95
+ border-bottom-right-radius: $brand-border-radius;
96
+ border-top-right-radius: $brand-border-radius;
97
+ }
98
+ }
99
+
100
+ .input-group-text + .form-control,
101
+ .form-control + .form-control,
102
+ .form-control + p + .form-control,
103
+ .form-control + p + p + .form-control {
104
+ border-bottom-left-radius: 0;
105
+ border-top-left-radius: 0;
106
+ }
107
+
108
+ .input-group-text:has(+ .form-control),
109
+ .form-control:has(+ .form-control),
110
+ .form-control:has(+ p + .form-control),
111
+ .form-control:has(+ p + p + .form-control) {
112
+ border-bottom-right-radius: 0;
113
+ border-top-right-radius: 0;
114
+
115
+ &:not(.btn) {
116
+ border-right-color: $color-ci-clay;
117
+ }
118
+ }
97
119
  }
98
120
  }
99
121
  }
@@ -36,7 +36,7 @@
36
36
  @extend %form-field-box;
37
37
  @extend %form-field-typography-monospace;
38
38
 
39
- @include form-focus;
39
+ @include cl-form-focus;
40
40
 
41
41
  &.form-control-plaintext {
42
42
  background-color: transparent;
@@ -79,7 +79,6 @@
79
79
 
80
80
  [type='range'] {
81
81
  $color-bullet: $color-ci-night;
82
- $color-bullet-focus: $color-ci-berry;
83
82
 
84
83
  appearance: none;
85
84
  background: $color-ci-clay;
@@ -110,13 +109,7 @@
110
109
  }
111
110
 
112
111
  &:focus {
113
- &::-webkit-slider-thumb {
114
- background: $color-bullet-focus;
115
- }
116
-
117
- &::-moz-range-thumb {
118
- background: $color-bullet-focus;
119
- }
112
+ @include cl-color-focus-outline(var(--cl-color-focus), 2px);
120
113
  }
121
114
  }
122
115
  }
@@ -16,7 +16,7 @@
16
16
  @extend %form-field-box;
17
17
  @extend %form-field-typography-monospace;
18
18
 
19
- @include form-focus;
19
+ @include cl-form-focus;
20
20
 
21
21
  display: block;
22
22
 
@@ -57,7 +57,7 @@
57
57
  margin-top: $spacing-micro;
58
58
 
59
59
  &::before {
60
- color: $color-ci-silver;
60
+ color: $color-ci-clay;
61
61
  content: '\f05a';
62
62
  display: inline-block;
63
63
  font-family: 'Font Awesome 5 Free';
@@ -13,7 +13,7 @@
13
13
  display: none;
14
14
  height: 100vh;
15
15
  left: 0;
16
- padding: 2rem 0;
16
+ padding: 2rem $spacing-tiny;
17
17
  position: fixed;
18
18
  top: 0;
19
19
  width: 100%;