@castlabs/ui 7.13.0 → 7.15.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.13.0",
3
+ "version": "7.15.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.",
@@ -42,41 +42,41 @@
42
42
  "simplebar": "6.3.3"
43
43
  },
44
44
  "optionalDependencies": {
45
- "@rollup/rollup-linux-x64-gnu": "4.57.0"
45
+ "@rollup/rollup-linux-x64-gnu": "4.59.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@castlabs/ui-editor": "file:../castlabs-ui-editor",
49
49
  "@tsconfig/node22": "22.0.5",
50
- "@types/jsdom": "27.0.0",
51
- "@types/node": "24.10.1",
52
- "@vitejs/plugin-vue": "6.0.3",
53
- "@vitest/eslint-plugin": "1.6.6",
50
+ "@types/jsdom": "28.0.0",
51
+ "@types/node": "25.3.0",
52
+ "@vitejs/plugin-vue": "6.0.4",
53
+ "@vitest/eslint-plugin": "1.6.9",
54
54
  "@vue/eslint-config-prettier": "10.2.0",
55
- "@vue/eslint-config-typescript": "14.6.0",
55
+ "@vue/eslint-config-typescript": "14.7.0",
56
56
  "@vue/test-utils": "2.4.6",
57
57
  "@vue/tsconfig": "0.8.1",
58
58
  "core-js": "3.48.0",
59
59
  "dree": "5.1.5",
60
60
  "eslint-plugin-import": "2.32.0",
61
- "eslint-plugin-n": "17.23.2",
61
+ "eslint-plugin-n": "17.24.0",
62
62
  "eslint-plugin-promise": "7.2.1",
63
- "eslint-plugin-vue": "10.7.0",
63
+ "eslint-plugin-vue": "10.8.0",
64
64
  "eslint": "9.39.2",
65
65
  "gulp-concat": "2.6.1",
66
66
  "gulp-replace": "1.1.4",
67
67
  "gulp": "5.0.1",
68
- "jsdom": "27.4.0",
68
+ "jsdom": "28.1.0",
69
69
  "npm-run-all": "4.1.5",
70
70
  "sass": "1.97.3",
71
- "stylelint-config-sass-guidelines": "12.1.0",
71
+ "stylelint-config-sass-guidelines": "13.0.0",
72
72
  "stylelint-config-standard-vue": "1.0.0",
73
- "stylelint-config-standard": "39.0.1",
73
+ "stylelint-config-standard": "40.0.0",
74
74
  "stylelint-order": "7.0.1",
75
75
  "stylelint-scss": "7.0.0",
76
76
  "typescript": "5.9.3",
77
77
  "vite": "7.3.1",
78
78
  "vitest": "4.0.18",
79
- "vue-tsc": "3.2.4",
80
- "vue": "3.5.27"
79
+ "vue-tsc": "3.2.5",
80
+ "vue": "3.5.29"
81
81
  }
82
82
  }
@@ -7,6 +7,12 @@
7
7
 
8
8
  @use '../../styles/global' as *;
9
9
 
10
+ %cl-list-tight {
11
+ li {
12
+ margin-top: $spacing-tiny;
13
+ }
14
+ }
15
+
10
16
  %cl-list {
11
17
  @include cl-accent;
12
18
 
@@ -32,6 +38,10 @@
32
38
  }
33
39
  }
34
40
 
41
+ &.cl-tight {
42
+ @extend %cl-list-tight;
43
+ }
44
+
35
45
  &.cl-list-none {
36
46
  margin-left: 0;
37
47
 
@@ -410,6 +410,12 @@ $sidenav-color-text-minor: $color-ci-ash;
410
410
  padding: $spacing-tiny $spacing-small;
411
411
  position: relative;
412
412
 
413
+ @include media-breakpoint-up(md) {
414
+ // reduce nav item heigt a bit on larger screens
415
+ padding-bottom: $spacing-tiny - px(1);
416
+ padding-top: $spacing-tiny - px(1);
417
+ }
418
+
413
419
  &::after {
414
420
  // we use a block item, not a border, so content does not jump
415
421
  background-color: $color-ci-red;
@@ -430,6 +436,13 @@ $sidenav-color-text-minor: $color-ci-ash;
430
436
  }
431
437
  }
432
438
 
439
+ @for $depth from 1 through 5 {
440
+ .cl-nav-item-level-#{$depth},
441
+ .cl-nav-item-level-#{$depth}.active {
442
+ padding-left: $spacing-small * $depth;
443
+ }
444
+ }
445
+
433
446
  .cl-dropdown {
434
447
  // service drawer
435
448
  #{'--cl-color-text'}: $color-ci-eggshell;
@@ -66,7 +66,8 @@ $sidenav-z-index: $layer-z-sidenav;
66
66
  span {
67
67
  &:not(:first-child) {
68
68
  &::before {
69
- content: ' › ';
69
+ color: $color-ci-clay;
70
+ content: ' / ';
70
71
  }
71
72
 
72
73
  @include media-breakpoint-down(sm) {
@@ -0,0 +1,10 @@
1
+ @use '../../../styles/global' as *;
2
+
3
+ .cl-section-details {
4
+ #{'--cl-color-code'}: $color-ci-steel;
5
+ #{'--cl-color-text'}: $color-ci-steel;
6
+
7
+ .col-12 {
8
+ margin-top: 0 !important;
9
+ }
10
+ }
@@ -1,10 +1,13 @@
1
1
  @use '../../../../styles/global' as *;
2
2
 
3
3
  .cl-table-data {
4
+ $bg-color: var(--cl-color-background);
5
+ $bg: linear-gradient(90deg, transparent 0, $bg-color $spacing-tiny, $bg-color 100%);
6
+
4
7
  .cl-th-links {
5
8
  @extend %cl-p-label;
6
9
 
7
- background-color: transparent;
10
+ background: $bg;
8
11
  position: sticky;
9
12
  right: 0;
10
13
  text-align: end;
@@ -17,15 +20,12 @@
17
20
  }
18
21
 
19
22
  .cl-td-links {
23
+ background: $bg;
20
24
  overflow-wrap: unset;
21
25
  position: sticky;
22
26
  right: 0;
23
27
  white-space: nowrap;
24
28
 
25
- // a {
26
- // @extend %cl-a-text;
27
- // }
28
-
29
29
  :not(:first-child) {
30
30
  margin-left: $spacing-tiny;
31
31
 
@@ -25,4 +25,17 @@
25
25
  td:not(:last-child) {
26
26
  border-right: $brand-line-width dotted var(--cl-color-line);
27
27
  }
28
+
29
+ &.cl-tight {
30
+ td {
31
+ padding-bottom: $table-padding-vertical * 0.5;
32
+ padding-top: $table-padding-vertical * 0.5;
33
+ }
34
+
35
+ td,
36
+ th {
37
+ padding-left: $table-padding-horizontal * 0.5;
38
+ padding-right: $table-padding-horizontal * 0.5;
39
+ }
40
+ }
28
41
  }
@@ -1,7 +1,7 @@
1
1
  @use '../../../styles/global' as *;
2
2
 
3
3
  .cl-cookie-banner {
4
- bottom: $spacing-large;
4
+ bottom: $spacing-large + $spacing-small;
5
5
  // box-shadow: 1px 1px 2px 1px $color-black-25a;
6
6
  left: 50%;
7
7
  opacity: 1;
@@ -11,3 +11,58 @@
11
11
  margin: 0;
12
12
  }
13
13
  }
14
+
15
+ // --- .cl-page-fullscreen variant ---------------------------------------------
16
+
17
+ .cl-page-fullscreen {
18
+ display: flex;
19
+ flex-direction: column;
20
+ height: calc(100vh - $header-nav-height);
21
+ overflow: hidden; // no scrolling
22
+
23
+ main:has(&) + footer {
24
+ // hide footer in .cl-page-fullscreen pages (but footer sits outside main)
25
+ display: none;
26
+ }
27
+
28
+ section:first-child {
29
+ flex: 0 0 auto;
30
+ margin-top: 0;
31
+ }
32
+
33
+ section:not(:first-child) {
34
+ flex: 1 1 auto;
35
+ margin-top: 0;
36
+ overflow-y: scroll;
37
+ }
38
+ }
39
+
40
+ .cl-section-fullscreen {
41
+ height: 100%;
42
+
43
+ .container,
44
+ .container-fluid,
45
+ .row,
46
+ .col-12,
47
+ .cl-table-scroll {
48
+ height: 100%;
49
+ margin-bottom: 0 !important;
50
+ margin-top: 0 !important;
51
+ padding-bottom: 0 !important;
52
+ padding-top: 0 !important;
53
+ }
54
+
55
+ table {
56
+ display: block;
57
+ max-height: 100%;
58
+ max-width: 100%;
59
+ overflow: scroll auto;
60
+ }
61
+
62
+ th {
63
+ background: $color-ci-haze !important;
64
+ position: sticky;
65
+ top: 0;
66
+ z-index: 1;
67
+ }
68
+ }
@@ -210,6 +210,7 @@ $color-opacity-active: 0.8;
210
210
  #{'--cl-color-active'}: $color-ci-berry;
211
211
  #{'--cl-color-background'}: $color-ci-eggshell;
212
212
  #{'--cl-color-border'}: $color-ci-night;
213
+ #{'--cl-color-code'}: $color-ci-petrol;
213
214
  #{'--cl-color-disabled-background'}: $color-disabled;
214
215
  #{'--cl-color-disabled-border'}: $color-disabled;
215
216
  #{'--cl-color-disabled-text'}: $color-ci-eggshell;
@@ -244,6 +245,7 @@ $color-opacity-active: 0.8;
244
245
  %cl-color-text-light {
245
246
  // for backgrounds that require 'white' text
246
247
  #{'--cl-color-accent'}: $color-ci-eggshell;
248
+ #{'--cl-color-code'}: $color-ci-eggshell;
247
249
  #{'--cl-color-focus'}: $color-ci-eggshell;
248
250
  #{'--cl-color-icon'}: $color-ci-eggshell;
249
251
  #{'--cl-color-input-background'}: transparent;
@@ -256,6 +258,7 @@ $color-opacity-active: 0.8;
256
258
  %cl-color-text-dark {
257
259
  // for backgrounds that require 'black' text
258
260
  #{'--cl-color-accent'}: $color-ci-night;
261
+ #{'--cl-color-code'}: $color-ci-petrol;
259
262
  #{'--cl-color-focus'}: $color-ci-night;
260
263
  #{'--cl-color-icon'}: $color-ci-night;
261
264
  #{'--cl-color-input-background'}: transparent;
@@ -22,12 +22,20 @@ $grid-table-responsive: sm;
22
22
 
23
23
  @function breakpoint-min($breakpoint) {
24
24
  $min: map.get($grid-breakpoints, $breakpoint);
25
- @return if($min != 0, $min, null);
25
+ @if $min != 0 {
26
+ @return $min;
27
+ } @else {
28
+ @return null;
29
+ }
26
30
  }
27
31
 
28
32
  @function breakpoint-max($breakpoint) {
29
33
  $max: map.get($grid-breakpoints, $breakpoint);
30
- @return if($max and $max > 0, $max - 0.02, null);
34
+ @if max and $max > 0 {
35
+ @return $max - 0.02;
36
+ } @else {
37
+ @return null;
38
+ }
31
39
  }
32
40
 
33
41
  @function breakpoint-next($breakpoint, $breakpoint-names: map.keys($grid-breakpoints)) {
@@ -35,7 +43,11 @@ $grid-table-responsive: sm;
35
43
  @if not $n {
36
44
  @error 'breakpoint `#{$breakpoint}` not found in `#{$grid-breakpoints}`';
37
45
  }
38
- @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
46
+ @if $n < length($breakpoint-names) {
47
+ @return nth($breakpoint-names, $n + 1);
48
+ } @else {
49
+ @return null;
50
+ }
39
51
  }
40
52
 
41
53
  @mixin media-breakpoint-up($breakpoint) {
@@ -487,14 +487,13 @@ $typography-responsive-scale: 0.8;
487
487
  %cl-p-pre-box {
488
488
  @extend %cl-p-pre;
489
489
 
490
- border: $brand-line-width solid var(--cl-color-text);
490
+ background-color: $color-ci-haze;
491
491
  border-radius: $brand-border-radius;
492
- clip-path: inset(-1px round 22px);
492
+ clip-path: inset(0 round $brand-border-radius);
493
493
  font-size: px(15);
494
494
  line-height: 1.4;
495
495
  margin-top: $spacing-small;
496
496
  padding: $spacing-small;
497
- padding-bottom: 0.95rem; // fix for overlapping scrollbar/clip
498
497
  }
499
498
 
500
499
  %cl-p-tag {
@@ -16,9 +16,6 @@ $cl-url-postfix: '' !default;
16
16
  background-size: contain;
17
17
  display: inline-block;
18
18
  height: 1em * 2;
19
- margin-bottom: -1em;
20
- position: relative;
21
- top: -0.4em;
22
19
  width: 2.95em * 2;
23
20
  }
24
21
 
@@ -29,9 +26,6 @@ $cl-url-postfix: '' !default;
29
26
  background-size: contain;
30
27
  display: inline-block;
31
28
  height: 1em * 2;
32
- margin-bottom: -1em;
33
- position: relative;
34
- top: -0.4em;
35
29
  width: 2.95em * 2;
36
30
  }
37
31
 
@@ -1,3 +1,3 @@
1
1
  :root {
2
- #{'--cl-version'}: 'v7.13.0';
2
+ #{'--cl-version'}: 'v7.15.0';
3
3
  }
@@ -193,7 +193,6 @@ main {
193
193
  // --- code & monospace --------------------------------------------------------
194
194
 
195
195
  kbd,
196
- code,
197
196
  samp {
198
197
  @extend %cl-p-pre;
199
198
 
@@ -201,14 +200,24 @@ main {
201
200
  }
202
201
 
203
202
  code {
203
+ @extend %cl-p-pre;
204
+
205
+ color: var(--cl-color-text);
204
206
  margin-left: 0.1em;
205
207
  margin-right: 0.1em;
206
208
  }
207
209
 
210
+ p code,
211
+ li code {
212
+ color: var(--cl-color-code);
213
+ }
214
+
208
215
  pre {
209
216
  @extend %cl-p-pre-box;
210
217
  @include cl-color-focus-outline;
211
218
 
219
+ color: var(--cl-color-text);
220
+
212
221
  code {
213
222
  padding: 0;
214
223
  }
@@ -75,6 +75,7 @@ $castlabs-ui-asset-postfix: '' !default;
75
75
  @use '../components/navigation/ClNavSide/ClNavSideMenu/style' as *;
76
76
  @use '../components/navigation/ClNavSide/style' as *;
77
77
  @use '../components/navigation/ClNavTop/style' as *;
78
+ @use '../components/section/ClSectionDetails/style' as *;
78
79
  @use '../components/section/ClSectionForm/style' as *;
79
80
  @use '../components/section/ClSectionHeadline/style' as *;
80
81
  @use '../components/section/ClSectionMainSide/style' as *;
@@ -25,6 +25,7 @@ declare module '@castlabs/ui/dist/castlabs-ui.module.js' {
25
25
  export function clFormatDate (date: Date): string
26
26
  export function clFormatTimeUTC (date: Date): string
27
27
  export function clFormatDateTimeUTC (date: Date, seconds?: boolean): string
28
+ export function clFormatDateTimeTabularUTC (date: Date, year?:boolean, month?:boolean, day?:boolean, time?:boolean, seconds?:boolean): string
28
29
  export function clFormatDuration (from: Date, until: Date, seconds?: boolean, ms?: boolean): string
29
30
  export function clFormatPeriod (date: Date): string
30
31
  export function clFormatNumber (amount: number, decimalPlaces?: number): string
package/types/index.d.ts CHANGED
@@ -1,8 +1,5 @@
1
1
  import type { App, DefineComponent } from 'vue'
2
2
 
3
- import * as CONST from '../src/utils/const'
4
- import * as CS from '../src/utils/cs'
5
-
6
3
  declare function install (Vue: App): void
7
4
  export default install
8
5
 
@@ -26,6 +23,7 @@ export const ClNavSide: DefineComponent
26
23
  export const ClNavTop: DefineComponent
27
24
  export const ClPage: DefineComponent
28
25
  export const ClPagination: DefineComponent
26
+ export const ClSectionDetails: DefineComponent
29
27
  export const ClSectionForm: DefineComponent
30
28
  export const ClSectionHeadline: DefineComponent
31
29
  export const ClSectionMain: DefineComponent
@@ -85,6 +83,7 @@ export function clFormatFilesize (bytes: number): string
85
83
  export function clFormatDate (date: Date): string
86
84
  export function clFormatTimeUTC (date: Date): string
87
85
  export function clFormatDateTimeUTC (date: Date, seconds?: boolean): string
86
+ export function clFormatDateTimeTabularUTC (date: Date, year?:boolean, month?:boolean, day?:boolean, time?:boolean, seconds?:boolean): string
88
87
  export function clFormatDuration (from: Date, until: Date, seconds?: boolean, ms?: boolean): string
89
88
  export function clFormatPeriod (date: Date): string
90
89
  export function clFormatNumber (amount: number, decimalPlaces?: number): string
@@ -253,7 +252,45 @@ export function csGetNav (
253
252
  export function csFilterMemberships (memberships: CsMembership[], rid?: string, sid?: string): CsMembership[]
254
253
  export function csGetAccountUrl(env: string): string
255
254
 
256
- // --- consts ----------------------------------------------------------------
255
+ // --- utils/const.js ----------------------------------------------------------------
256
+
257
+ export const CONST: {
258
+ COLOR: Record<string, string>
259
+ SPACING: Record<string, string>
260
+ }
261
+
262
+ // --- utils/cs.js ----------------------------------------------------------------
263
+
264
+ type CsApp = {
265
+ id: string
266
+ subtitle: string
267
+ title: string
268
+ services: string[]
269
+ roles: string[]
270
+ urlManage: (env: string, oid: string) => string
271
+ urlPlan: (env: string, oid: string) => string
272
+ sidenav: boolean
273
+ }
274
+
275
+ type CsNavEntry = {
276
+ id: string
277
+ title: string
278
+ subtitle: string
279
+ url: string
280
+ locked: boolean,
281
+ disabled: boolean,
282
+ badge: string | undefined
283
+ }
284
+
285
+ export const CS: {
286
+ SERVICE: Record<string, string>
287
+ ROLE: Record<string, string>
288
+ STATE: Record<string, number | null>
289
+ LICENSE_STATE: Record<string, number | null>
290
+ PLAN: Record<string, number | null>
291
+ APPS: Record<string, CsApp>
292
+ }
257
293
 
258
- export const CONST
259
- export const CS
294
+ export function csGetNav (memberships: CsMembership[], oid: string, env: string): CsNavEntry[]
295
+ export function csFilterMemberships (memberships: CsMembership[], rid: string, sid: string): CsMembership[]
296
+ export function csGetAccountUrl (env: string): string