@castlabs/ui 7.7.0 → 7.9.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": "7.7.0",
3
+ "version": "7.9.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.",
@@ -19,7 +19,7 @@
19
19
  &::after {
20
20
  @include cl-fontawesome('\f05a');
21
21
 
22
- color: $color-ci-steel;
22
+ color: var(--cl-color-icon);
23
23
  left: -$alert-indent;
24
24
  position: absolute;
25
25
  text-align: center;
@@ -88,7 +88,7 @@
88
88
  &::after {
89
89
  @include cl-fontawesome($icon);
90
90
 
91
- color: $color-ci-steel;
91
+ color: var(--cl-color-icon);
92
92
  left: -$alert-indent;
93
93
  position: absolute;
94
94
  text-align: left;
@@ -10,6 +10,7 @@
10
10
 
11
11
  .card {
12
12
  @extend %cl-card;
13
+ @include cl-colors-admin;
13
14
 
14
15
  &[class^='col-'] {
15
16
  padding: 0;
@@ -27,6 +27,15 @@
27
27
  + .valid-feedback {
28
28
  display: none;
29
29
  }
30
+
31
+ .cl-color-brick & {
32
+ border-color: $color-ci-eggshell !important;
33
+
34
+ &::selection {
35
+ background: $color-ci-eggshell;
36
+ color: $color-error;
37
+ }
38
+ }
30
39
  }
31
40
 
32
41
  // --- disabled fields -------------------------------------------------------
@@ -54,8 +54,8 @@
54
54
  }
55
55
 
56
56
  &::placeholder {
57
- color: $color-ci-clay;
58
- opacity: 1;
57
+ color: var(--cl-color-text); // , .5); // $color-ci-clay;
58
+ opacity: 0.5;
59
59
  overflow: visible;
60
60
  }
61
61
  }
@@ -59,7 +59,7 @@
59
59
  margin-top: $spacing-micro;
60
60
 
61
61
  &::before {
62
- color: $color-ci-steel;
62
+ color: var(--cl-color-icon);
63
63
  content: '\f05a';
64
64
  display: inline-block;
65
65
  font-family: 'Font Awesome 5 Free';
@@ -77,6 +77,21 @@
77
77
  color: $color-error; // fontawesome
78
78
  content: '\f057';
79
79
  }
80
+
81
+ .cl-color-petrol &,
82
+ .cl-color-red &,
83
+ .cl-color-berry & {
84
+ color: $color-ci-eggshell;
85
+ }
86
+
87
+ .cl-color-brick &,
88
+ .cl-color-orchid & {
89
+ color: $color-ci-eggshell;
90
+
91
+ &::before {
92
+ color: $color-ci-eggshell; // fontawesome
93
+ }
94
+ }
80
95
  }
81
96
 
82
97
  .valid-feedback.valid-feedback-none {
@@ -13,12 +13,18 @@ $sidenav-z-index: $layer-z-sidenav;
13
13
  .cl-nav-top {
14
14
  // first/top line in content area
15
15
  @extend %section-padding;
16
- @extend %cl-color-night;
17
16
 
18
17
  @include spacing-before(0);
19
18
 
20
- background-color: $color-ci-night;
21
- color: $color-ci-eggshell;
19
+ @include cl-colors-ci;
20
+ @include cl-colors-admin;
21
+
22
+ &:not([class*='cl-color-']) {
23
+ @extend %cl-color-night;
24
+ }
25
+
26
+ background-color: var(--cl-color-background);
27
+ color: var(--cl-color-text);
22
28
 
23
29
  .row {
24
30
  #{'--bs-gutter-x'}: $grid-spacing;
@@ -51,7 +57,7 @@ $sidenav-z-index: $layer-z-sidenav;
51
57
  .cl-path {
52
58
  @extend %cl-p-label;
53
59
 
54
- color: $color-ci-eggshell;
60
+ color: var(--cl-color-text);
55
61
  flex-grow: 99;
56
62
  letter-spacing: 0;
57
63
  margin: 0;
@@ -1,7 +1,6 @@
1
1
  @use '../../../styles/global' as *;
2
2
 
3
3
  .cl-section-form {
4
- background-color: $color-ci-haze;
5
4
  padding-top: $spacing-tiny;
6
5
 
7
6
  &,
@@ -206,52 +206,63 @@ $color-opacity-active: 0.8;
206
206
 
207
207
  %cl-color-root {
208
208
  // default colors = outline-night
209
- #{'--cl-color-background'}: $color-ci-eggshell;
210
- #{'--cl-color-border'}: $color-ci-night;
211
- #{'--cl-color-text'}: $color-ci-night;
212
- #{'--cl-color-line'}: $color-line;
213
209
  #{'--cl-color-accent'}: $color-accent;
214
- #{'--cl-color-link'}: $color-link;
215
210
  #{'--cl-color-active'}: $color-ci-berry;
216
- #{'--cl-color-hover'}: $color-hover;
217
- #{'--cl-color-focus'}: $color-ci-night;
211
+ #{'--cl-color-background'}: $color-ci-eggshell;
212
+ #{'--cl-color-border'}: $color-ci-night;
218
213
  #{'--cl-color-disabled-background'}: $color-disabled;
219
214
  #{'--cl-color-disabled-border'}: $color-disabled;
220
215
  #{'--cl-color-disabled-text'}: $color-ci-eggshell;
216
+ #{'--cl-color-focus'}: $color-ci-night;
217
+ #{'--cl-color-hover'}: $color-hover;
218
+ #{'--cl-color-input-background'}: transparent;
219
+ #{'--cl-color-input-border'}: $color-ci-ash;
220
+ #{'--cl-color-line'}: $color-line;
221
+ #{'--cl-color-icon'}: $color-ci-steel;
222
+ #{'--cl-color-link'}: $color-link;
223
+ #{'--cl-color-text'}: $color-ci-night;
221
224
  #{'--cl-opacity-active'}: $color-opacity-active;
222
225
  }
223
226
 
224
227
  %cl-color-night-outline {
225
228
  // order is important: must be first!
229
+ #{'--cl-color-accent'}: $color-accent;
226
230
  #{'--cl-color-background'}: $color-ci-eggshell;
227
231
  #{'--cl-color-border'}: $color-ci-night;
228
- #{'--cl-color-text'}: $color-ci-night;
229
- #{'--cl-color-line'}: $color-line;
230
- #{'--cl-color-accent'}: $color-accent;
231
- #{'--cl-color-link'}: inherit;
232
- #{'--cl-color-focus'}: $color-ci-night;
233
232
  #{'--cl-color-disabled-background'}: transparent;
234
233
  #{'--cl-color-disabled-border'}: $color-disabled;
235
234
  #{'--cl-color-disabled-text'}: $color-disabled;
235
+ #{'--cl-color-focus'}: $color-ci-night;
236
+ #{'--cl-color-input-background'}: transparent;
237
+ #{'--cl-color-input-border'}: $color-ci-ash;
238
+ #{'--cl-color-line'}: $color-line;
239
+ #{'--cl-color-link'}: inherit;
240
+ #{'--cl-color-text'}: $color-ci-night;
236
241
  #{'--cl-opacity-active'}: $color-opacity-active * 0.9;
237
242
  }
238
243
 
239
244
  %cl-color-text-light {
240
245
  // for backgrounds that require 'white' text
241
- #{'--cl-color-text'}: $color-ci-eggshell;
242
- #{'--cl-color-line'}: $color-ci-eggshell;
243
246
  #{'--cl-color-accent'}: $color-ci-eggshell;
244
- #{'--cl-color-link'}: $color-ci-eggshell;
245
247
  #{'--cl-color-focus'}: $color-ci-eggshell;
248
+ #{'--cl-color-icon'}: $color-ci-eggshell;
249
+ #{'--cl-color-input-background'}: transparent;
250
+ #{'--cl-color-input-border'}: $color-ci-eggshell;
251
+ #{'--cl-color-line'}: $color-ci-eggshell;
252
+ #{'--cl-color-link'}: $color-ci-eggshell;
253
+ #{'--cl-color-text'}: $color-ci-eggshell;
246
254
  }
247
255
 
248
256
  %cl-color-text-dark {
249
257
  // for backgrounds that require 'black' text
250
- #{'--cl-color-text'}: $color-ci-night;
251
- #{'--cl-color-line'}: $color-ci-night;
252
258
  #{'--cl-color-accent'}: $color-ci-night;
253
- #{'--cl-color-link'}: $color-ci-night;
254
259
  #{'--cl-color-focus'}: $color-ci-night;
260
+ #{'--cl-color-icon'}: $color-ci-night;
261
+ #{'--cl-color-input-background'}: transparent;
262
+ #{'--cl-color-input-border'}: $color-ci-night;
263
+ #{'--cl-color-line'}: $color-ci-night;
264
+ #{'--cl-color-link'}: $color-ci-night;
265
+ #{'--cl-color-text'}: $color-ci-night;
255
266
  }
256
267
 
257
268
  %cl-color-red {
@@ -263,15 +274,17 @@ $color-opacity-active: 0.8;
263
274
  }
264
275
 
265
276
  %cl-color-red-outline {
266
- #{'--cl-color-border'}: $color-ci-red;
267
- #{'--cl-color-text'}: $color-ci-red;
268
- #{'--cl-color-line'}: $color-line;
269
277
  #{'--cl-color-accent'}: $color-ci-red;
270
- #{'--cl-color-link'}: inherit;
271
- #{'--cl-color-focus'}: $color-ci-red;
278
+ #{'--cl-color-border'}: $color-ci-red;
272
279
  #{'--cl-color-disabled-background'}: transparent;
273
280
  #{'--cl-color-disabled-border'}: $color-disabled;
274
281
  #{'--cl-color-disabled-text'}: $color-disabled;
282
+ #{'--cl-color-focus'}: $color-ci-red;
283
+ #{'--cl-color-input-background'}: transparent;
284
+ #{'--cl-color-input-border'}: $color-ci-ash;
285
+ #{'--cl-color-line'}: $color-line;
286
+ #{'--cl-color-link'}: inherit;
287
+ #{'--cl-color-text'}: $color-ci-red;
275
288
  }
276
289
 
277
290
  %cl-color-sky {
@@ -279,6 +292,7 @@ $color-opacity-active: 0.8;
279
292
 
280
293
  #{'--cl-color-background'}: $color-ci-sky;
281
294
  #{'--cl-color-border'}: $color-ci-sky;
295
+ #{'--cl-color-input-background'}: $color-ci-eggshell;
282
296
  }
283
297
 
284
298
  %cl-color-night {
@@ -289,19 +303,22 @@ $color-opacity-active: 0.8;
289
303
  }
290
304
 
291
305
  %cl-color-eggshell {
306
+ #{'--cl-color-accent'}: $color-accent;
292
307
  #{'--cl-color-background'}: $color-ci-eggshell;
293
308
  #{'--cl-color-border'}: $color-ci-eggshell;
294
- #{'--cl-color-text'}: $color-ci-night;
309
+ #{'--cl-color-focus'}: $color-ci-night;
310
+ #{'--cl-color-input-background'}: transparent;
311
+ #{'--cl-color-input-border'}: $color-ci-ash;
295
312
  #{'--cl-color-line'}: $color-line;
296
- #{'--cl-color-accent'}: $color-accent;
297
313
  #{'--cl-color-link'}: inherit;
298
- #{'--cl-color-focus'}: $color-ci-night;
314
+ #{'--cl-color-text'}: $color-ci-night;
299
315
  }
300
316
 
301
317
  %cl-color-haze {
302
318
  @extend %cl-color-night-outline;
303
319
 
304
320
  #{'--cl-color-background'}: $color-ci-haze;
321
+ #{'--cl-color-input-background'}: $color-ci-eggshell;
305
322
  }
306
323
 
307
324
  %cl-color-clay {
@@ -309,6 +326,7 @@ $color-opacity-active: 0.8;
309
326
 
310
327
  #{'--cl-color-background'}: $color-ci-clay;
311
328
  #{'--cl-color-border'}: $color-ci-clay;
329
+ #{'--cl-color-input-background'}: $color-ci-eggshell;
312
330
  }
313
331
 
314
332
  %cl-color-ash {
@@ -375,44 +393,50 @@ $color-opacity-active: 0.8;
375
393
  }
376
394
 
377
395
  %cl-color-transparent {
396
+ #{'--cl-color-accent'}: var(--cl-color-text);
378
397
  #{'--cl-color-background'}: transparent;
379
398
  #{'--cl-color-border'}: var(--cl-color-text);
380
399
  #{'--cl-color-disabled-background'}: transparent;
381
400
  #{'--cl-color-disabled-border'}: $color-disabled;
382
401
  #{'--cl-color-disabled-text'}: $color-disabled;
383
- #{'--cl-opacity-active'}: $color-opacity-active * 0.9;
402
+ #{'--cl-color-focus'}: var(--cl-color-text);
403
+ #{'--cl-color-input-background'}: transparent;
404
+ #{'--cl-color-input-border'}: var(--cl-color-text);
384
405
  #{'--cl-color-line'}: var(--cl-color-text);
385
- #{'--cl-color-accent'}: var(--cl-color-text);
386
406
  #{'--cl-color-link'}: var(--cl-color-text);
387
- #{'--cl-color-focus'}: var(--cl-color-text);
407
+ #{'--cl-opacity-active'}: $color-opacity-active * 0.9;
388
408
  }
389
409
 
390
410
  %cl-color-disabled {
411
+ #{'--cl-color-accent'}: $color-disabled;
391
412
  #{'--cl-color-background'}: transparent;
392
413
  #{'--cl-color-border'}: $color-disabled;
393
- #{'--cl-color-text'}: $color-disabled;
414
+ #{'--cl-color-focus'}: $color-ci-eggshell;
415
+ #{'--cl-color-input-background'}: transparent;
416
+ #{'--cl-color-input-border'}: $color-disabled;
394
417
  #{'--cl-color-line'}: $color-disabled;
395
- #{'--cl-color-accent'}: $color-disabled;
396
418
  #{'--cl-color-link'}: inherit;
397
- #{'--cl-color-focus'}: $color-ci-eggshell;
419
+ #{'--cl-color-text'}: $color-disabled;
398
420
  }
399
421
 
400
422
  %cl-color-faded {
423
+ #{'--cl-color-accent'}: $color-ci-ash;
401
424
  #{'--cl-color-background'}: transparent;
402
425
  #{'--cl-color-border'}: $color-ci-ash;
403
- #{'--cl-color-text'}: $color-ci-ash;
426
+ #{'--cl-color-focus'}: $color-ci-ash;
427
+ #{'--cl-color-input-background'}: transparent;
428
+ #{'--cl-color-input-border'}: $color-ci-ash;
404
429
  #{'--cl-color-line'}: $color-line;
405
- #{'--cl-color-accent'}: $color-ci-ash;
406
430
  #{'--cl-color-link'}: inherit;
407
- #{'--cl-color-focus'}: $color-ci-ash;
431
+ #{'--cl-color-text'}: $color-ci-ash;
408
432
  }
409
433
 
410
434
  %cl-color-none {
411
435
  #{'--cl-color-background'}: transparent;
412
436
  #{'--cl-color-border'}: transparent;
413
- #{'--cl-color-link'}: $color-ci-eggshell;
414
- #{'--cl-color-focus'}: $color-ci-eggshell;
415
437
  #{'--cl-color-disabled-background'}: transparent;
416
438
  #{'--cl-color-disabled-border'}: transparent;
417
439
  #{'--cl-color-disabled-text'}: $color-disabled;
440
+ #{'--cl-color-focus'}: $color-ci-eggshell;
441
+ #{'--cl-color-link'}: $color-ci-eggshell;
418
442
  }
@@ -14,22 +14,21 @@
14
14
  $form-field-fontsize: px(16);
15
15
  $form-field-line-height: 1.375;
16
16
  $form-field-min-height: px(36);
17
- $form-field-border-color: $color-ci-ash;
18
- $form-field-border: $brand-line-width solid $form-field-border-color;
17
+ $form-field-border: $brand-line-width solid var(--cl-color-input-border);
19
18
  $form-spacing-label-input: px(2);
20
19
 
21
20
  %form-field-box {
22
- background-color: $color-ci-white;
21
+ background-color: var(--cl-color-input-background);
23
22
  border: $form-field-border;
24
23
  border-radius: $brand-border-radius;
25
- color: $color-text;
24
+ color: var(--cl-color-text);
26
25
  min-height: $form-field-min-height;
27
26
  padding: $spacing-micro - 0.0625rem $spacing-tiny + $spacing-micro; // remove .0625rem=1px border each
28
27
  width: 100%;
29
28
 
30
29
  &:disabled,
31
30
  &.disabled {
32
- background-color: $color-ci-haze;
31
+ background-color: var(--cl-color-input-background);
33
32
  border-color: $color-disabled;
34
33
  }
35
34
  }
@@ -43,3 +43,19 @@ a:hover {
43
43
  background-image: none;
44
44
  }
45
45
  }
46
+
47
+ .cl-nav-top {
48
+ // pick proper night/eggshell version based on nav background
49
+ [class*='cl-asset-logo'] {
50
+ background-image: url('#{$cl-url-prefix}castlabs-logo-eggshell.svg#{$cl-url-postfix}');
51
+ }
52
+
53
+ &.cl-color-eggshell,
54
+ &.cl-color-haze,
55
+ &.cl-color-clay,
56
+ &.cl-color-sky {
57
+ [class*='cl-asset-logo'] {
58
+ background-image: url('#{$cl-url-prefix}castlabs-logo.svg#{$cl-url-postfix}');
59
+ }
60
+ }
61
+ }
@@ -0,0 +1,3 @@
1
+ :root {
2
+ #{'--cl-version'}: 'v7.9.0';
3
+ }
@@ -17,6 +17,7 @@ $castlabs-ui-asset-postfix: '' !default;
17
17
  @use 'layout/color';
18
18
  @use 'layout/grid';
19
19
  @use 'layout/helper';
20
+ @use 'layout/meta';
20
21
  @use 'layout/scrollbar';
21
22
  @use 'layout/section';
22
23
  @use 'layout/spacing';
package/types/index.d.ts CHANGED
@@ -17,6 +17,7 @@ export const ClInfo: DefineComponent
17
17
  export const ClMockRouterLink: DefineComponent
18
18
  export const ClModal: DefineComponent
19
19
  export const ClModalConfirm: DefineComponent
20
+ export const ClModalForm: DefineComponent
20
21
  export const ClModalOk: DefineComponent
21
22
  export const ClNavSide: DefineComponent
22
23
  export const ClNavTop: DefineComponent
@@ -163,3 +164,26 @@ export const NAV: {
163
164
  WM: ClService
164
165
  VTK: ClService
165
166
  }
167
+
168
+ // --- utils/const ----------------------------------------------------------------
169
+
170
+ export const CONST: {
171
+ COLOR: {
172
+ ASH: string,
173
+ BERRY: string,
174
+ BRICK: string,
175
+ CLAY: string,
176
+ EGGSHELL: string,
177
+ HAZE: string,
178
+ HONEY: string,
179
+ LEAF: string,
180
+ NIGHT: string,
181
+ ORCHID: string,
182
+ PETROL: string,
183
+ RED: string,
184
+ SAND: string,
185
+ SEA: string,
186
+ SKY: string,
187
+ STEEL: string
188
+ }
189
+ }