@castlabs/ui 7.6.0 → 7.6.2

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": "7.6.0",
3
+ "version": "7.6.2",
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.",
@@ -117,6 +117,7 @@
117
117
  line-height: 1;
118
118
  padding: 0;
119
119
  text-decoration: underline;
120
+ text-decoration-thickness: px(1);
120
121
  }
121
122
  }
122
123
  }
@@ -14,6 +14,7 @@
14
14
  &:hover {
15
15
  color: var(--cl-color-text);
16
16
  text-decoration: underline;
17
+ text-decoration-thickness: px(1);
17
18
  }
18
19
  }
19
20
 
@@ -1,7 +1,5 @@
1
1
  @use '../../styles/global' as *;
2
2
 
3
- // $badge-color-fg: $color-ci-white;
4
- // $badge-color-bg: $color-dark;
5
3
  $badge-padding: px(4) px(8);
6
4
  $badge-min-height: 1.642857143em; // 23px @ 14pt
7
5
 
@@ -12,9 +10,14 @@ $badge-min-height: 1.642857143em; // 23px @ 14pt
12
10
  }
13
11
 
14
12
  %cl-badge {
15
- @include cl-colors-secondary;
13
+ @include cl-colors-ci;
14
+ @include cl-colors-admin;
16
15
  @extend %cl-p-tag;
17
16
 
17
+ #{'--cl-color-background'}: $color-ci-steel;
18
+ #{'--cl-color-border'}: $color-ci-steel;
19
+ #{'--cl-color-text'}: $color-ci-eggshell;
20
+ #{'--cl-color-accent'}: $color-ci-eggshell;
18
21
  background-color: var(--cl-color-background);
19
22
  border: $brand-line-width solid var(--cl-color-border);
20
23
  border-radius: $brand-border-radius;
@@ -26,14 +29,6 @@ $badge-min-height: 1.642857143em; // 23px @ 14pt
26
29
  text-transform: uppercase;
27
30
  white-space: nowrap;
28
31
 
29
- &:not([class*='cl-color-']) {
30
- // default color
31
- #{'--cl-color-background'}: $color-ci-steel;
32
- #{'--cl-color-border'}: $color-ci-steel;
33
- #{'--cl-color-text'}: $color-ci-eggshell;
34
- #{'--cl-color-accent'}: $color-ci-eggshell;
35
- }
36
-
37
32
  &.cl-badge-sm {
38
33
  @include cl-badge-small;
39
34
  }
@@ -18,6 +18,7 @@
18
18
 
19
19
  &:hover {
20
20
  text-decoration: underline;
21
+ text-decoration-thickness: px(1);
21
22
  }
22
23
  }
23
24
  }
@@ -59,6 +59,7 @@
59
59
 
60
60
  border-radius: $brand-border-radius !important; // overrule BS
61
61
  cursor: not-allowed;
62
+ max-height: 36px;
62
63
  min-width: 36px;
63
64
  padding: $spacing-tiny;
64
65
  pointer-events: none;
@@ -90,3 +91,40 @@
90
91
  }
91
92
  }
92
93
  }
94
+
95
+ .cl-pagination-autosize {
96
+ // for use by simple code that can’t hide bubbles by itself
97
+ // will hide all but the first, last and +/-5 bubbles around the .active one
98
+ .page-item {
99
+ display: none;
100
+
101
+ &:first-of-type,
102
+ &.active,
103
+ &.disabled,
104
+ &:last-of-type {
105
+ display: list-item;
106
+ }
107
+
108
+ @include media-breakpoint-up(md) {
109
+ &.active {
110
+ display: list-item;
111
+
112
+ + .page-item,
113
+ + .page-item + .page-item,
114
+ + .page-item + .page-item + .page-item,
115
+ + .page-item + .page-item + .page-item + .page-item,
116
+ + .page-item + .page-item + .page-item + .page-item + .page-item {
117
+ display: list-item;
118
+ }
119
+ }
120
+
121
+ &:has(+ .active),
122
+ &:has(+ * + .active),
123
+ &:has(+ * + * + .active),
124
+ &:has(+ * + * + * + .active),
125
+ &:has(+ * + * + * + * + .active) {
126
+ display: list-item;
127
+ }
128
+ }
129
+ }
130
+ }
@@ -6,6 +6,6 @@
6
6
 
7
7
  &,
8
8
  + .cl-section {
9
- margin-top: 0 !important; // do not merge form-sections with other sections
9
+ margin-top: 0 !important; // don’t merge form-sections with other sections
10
10
  }
11
11
  }
@@ -20,9 +20,11 @@
20
20
  &:hover * {
21
21
  color: $color-hover;
22
22
  text-decoration-color: $color-hover;
23
+ text-decoration-thickness: px(1);
23
24
  }
24
25
  }
25
26
 
26
27
  .cl-copy-text {
27
28
  text-decoration: underline;
29
+ text-decoration-thickness: px(1);
28
30
  }
@@ -15,7 +15,7 @@ main a {
15
15
  }
16
16
 
17
17
  .cl-a-btn {
18
- // a link that is more an embedded button, e.g. in table actions
18
+ // a link that’s more an embedded button, e.g. in table actions
19
19
  @extend %cl-a-btn;
20
20
  }
21
21
 
@@ -144,7 +144,41 @@ $color-opacity-active: 0.8;
144
144
  }
145
145
  }
146
146
 
147
- @mixin cl-colors-secondary {
147
+ @mixin cl-colors-ci {
148
+ &.cl-color-night {
149
+ @extend %cl-color-night;
150
+ }
151
+
152
+ &.cl-color-eggshell {
153
+ @extend %cl-color-eggshell;
154
+ }
155
+
156
+ &.cl-color-red {
157
+ @extend %cl-color-red;
158
+ }
159
+
160
+ &.cl-color-sky {
161
+ @extend %cl-color-sky;
162
+ }
163
+
164
+ &.cl-color-berry {
165
+ @extend %cl-color-berry;
166
+ }
167
+
168
+ &.cl-color-petrol {
169
+ @extend %cl-color-petrol;
170
+ }
171
+
172
+ &.cl-color-ash {
173
+ @extend %cl-color-ash;
174
+ }
175
+
176
+ &.cl-color-clay {
177
+ @extend %cl-color-clay;
178
+ }
179
+ }
180
+
181
+ @mixin cl-colors-admin {
148
182
  &.cl-color-brick {
149
183
  @extend %cl-color-brick;
150
184
  }
@@ -22,11 +22,11 @@
22
22
  padding: math.div($spacing, 2) $spacing-tiny math.div($spacing, 2) $spacing-tiny;
23
23
 
24
24
  > *:first-child {
25
- margin-top: 0; // do not apply top spacing to first element in a cel
25
+ margin-top: 0; // don’t apply top spacing to first element in a cel
26
26
  }
27
27
 
28
28
  > *:last-child {
29
- margin-bottom: 0; // do not apply bottom spacing to last element in a cel
29
+ margin-bottom: 0; // don’t apply bottom spacing to last element in a cel
30
30
  }
31
31
  }
32
32
  }
@@ -83,6 +83,7 @@ $typography-monospace-line-height: 1.375;
83
83
  color: $color;
84
84
  display: inline;
85
85
  text-decoration: underline $color-underline;
86
+ text-decoration-thickness: px(1);
86
87
 
87
88
  &:hover {
88
89
  color: $color-hover;
@@ -162,7 +163,7 @@ $typography-monospace-line-height: 1.375;
162
163
  }
163
164
 
164
165
  %cl-a-btn {
165
- // a link that is more an embedded button
166
+ // a link that’s more an embedded button
166
167
  @include typography-link;
167
168
 
168
169
  background-color: transparent;
@@ -225,7 +225,7 @@ $cl-url-postfix: '' !default;
225
225
  }
226
226
 
227
227
  /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
228
- readers do not read off random characters that represent icons */
228
+ readers don’t read off random characters that represent icons */
229
229
  .fa-500px::before {
230
230
  content: '\f26e';
231
231
  }
@@ -7,7 +7,7 @@
7
7
 
8
8
  @use '../global' as *;
9
9
 
10
- // note: order of selectors in this file are important. do not move colors around or
10
+ // note: order of selectors in this file are important. don’t move colors around or
11
11
  // .cl-color-* overrides might not work
12
12
 
13
13
  :root {
@@ -126,6 +126,7 @@ div {
126
126
  &[class*='cl-color-text-'] {
127
127
  color: var(--cl-color-text);
128
128
  text-decoration-color: var(--cl-color-text);
129
+ text-decoration-thickness: px(1);
129
130
  }
130
131
  }
131
132
 
@@ -19,7 +19,7 @@
19
19
 
20
20
  .container .containe,
21
21
  .container-fluid .container {
22
- // nested containers should not limit themselves
22
+ // nested containers shouldn’t limit themselves
23
23
  margin-left: 0;
24
24
  margin-right: 0;
25
25
  max-width: 100%;
@@ -92,7 +92,7 @@ main {
92
92
  #{'--bs-gutter-x'}: $grid-spacing;
93
93
 
94
94
  > [class^='col-'] {
95
- margin-top: $grid-spacing; // columns add top padding as first content line won't
95
+ margin-top: $grid-spacing; // columns add top padding as first content line wont
96
96
  }
97
97
  }
98
98
  }
@@ -45,6 +45,10 @@
45
45
  opacity: 0.5;
46
46
  }
47
47
 
48
+ .cl-strong {
49
+ font-weight: 700;
50
+ }
51
+
48
52
  h1.cl-faded,
49
53
  .cl-h1.cl-faded,
50
54
  h2.cl-faded,
@@ -177,7 +177,7 @@ main {
177
177
  overflow-wrap: anywhere;
178
178
  }
179
179
 
180
- b, // <b> defined just for fallback - don't use!
180
+ b, // <b> defined just for fallback - dont use!
181
181
  strong {
182
182
  font-weight: 600;
183
183
  }
@@ -250,7 +250,7 @@ hr {
250
250
  }
251
251
  }
252
252
 
253
- // --- redefine bs utilities we use so we don't need to pull the whole set -----
253
+ // --- redefine bs utilities we use so we dont need to pull the whole set -----
254
254
 
255
255
  @each $bp, $px in $grid-breakpoints {
256
256
  .text-#{$bp}-start {
package/types/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import type { App, DefineComponent } from 'vue'
3
3
  declare function install (Vue: App): void
4
4
  export default install
5
5
 
6
- export function castlabsUi (Vue: App): void
6
+ export function clUi (Vue: App): void
7
7
 
8
8
  export const ClAlert: DefineComponent
9
9
  export const ClBackCancelOk: DefineComponent
@@ -136,6 +136,7 @@ export function clMatch (string: string, expression?: string, caseSensitive?: bo
136
136
 
137
137
  // --- utils/vitest ------------------------------------------------------------
138
138
 
139
+ export const FLECTIONS: RegExp[]
139
140
  export function clGetAllComponents(): object
140
141
  export function clGetAllPlugins(): [{ install: (app: any) => void }]
141
142
  export function clPatch (source: any, patches: any): object