@castlabs/ui 7.22.0 → 7.23.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.22.0",
3
+ "version": "7.23.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,42 +42,42 @@
42
42
  "simplebar": "6.3.3"
43
43
  },
44
44
  "optionalDependencies": {
45
- "@rollup/rollup-linux-x64-gnu": "4.61.0"
45
+ "@rollup/rollup-linux-x64-gnu": "4.62.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@castlabs/ui-editor": "file:../castlabs-ui-editor",
49
49
  "@tsconfig/node22": "22.0.5",
50
50
  "@types/jsdom": "28.0.3",
51
- "@types/node": "25.9.1",
51
+ "@types/node": "26.0.0",
52
52
  "@vitejs/plugin-vue": "6.0.7",
53
- "@vitest/eslint-plugin": "1.6.19",
53
+ "@vitest/eslint-plugin": "1.6.20",
54
54
  "@vue/eslint-config-prettier": "10.2.0",
55
- "@vue/eslint-config-typescript": "14.7.0",
56
- "@vue/test-utils": "2.4.10",
55
+ "@vue/eslint-config-typescript": "14.8.0",
56
+ "@vue/test-utils": "2.4.11",
57
57
  "@vue/tsconfig": "0.9.1",
58
58
  "core-js": "3.49.0",
59
59
  "dree": "5.1.5",
60
60
  "eslint-plugin-import": "2.32.0",
61
- "eslint-plugin-n": "18.0.1",
61
+ "eslint-plugin-n": "18.1.0",
62
62
  "eslint-plugin-promise": "7.3.0",
63
- "eslint-plugin-vue": "10.9.1",
63
+ "eslint-plugin-vue": "10.9.2",
64
64
  "eslint": "9.39.4",
65
65
  "gulp-concat": "2.6.1",
66
66
  "gulp-replace": "1.1.4",
67
67
  "gulp": "5.0.1",
68
68
  "jsdom": "29.1.1",
69
69
  "npm-run-all": "4.1.5",
70
- "sass": "1.100.0",
70
+ "sass": "1.101.0",
71
71
  "stylelint-config-sass-guidelines": "13.0.0",
72
72
  "stylelint-config-standard-vue": "1.0.0",
73
73
  "stylelint-config-standard": "40.0.0",
74
74
  "stylelint-order": "8.1.1",
75
- "stylelint-scss": "7.1.1",
75
+ "stylelint-scss": "7.2.0",
76
76
  "typescript": "6.0.3",
77
77
  "vite": "8.0.16",
78
- "vitest": "4.1.8",
79
- "vue-tsc": "3.3.3",
80
- "vue": "3.5.35"
78
+ "vitest": "4.1.9",
79
+ "vue-tsc": "3.3.5",
80
+ "vue": "3.5.38"
81
81
  },
82
82
  "overrides": {
83
83
  "glob": "^13"
@@ -15,8 +15,8 @@
15
15
 
16
16
  > [type='range'] {
17
17
  border-radius: $brand-border-radius !important;
18
- margin-bottom: $spacing-tiny;
19
- margin-top: $spacing-tiny;
18
+ margin-bottom: $spacing-tiny - px(1); // shift a bit to align with -/+ icons
19
+ margin-top: $spacing-tiny + px(1);
20
20
 
21
21
  + [type='range'] {
22
22
  margin-left: $spacing-tiny;
@@ -31,6 +31,19 @@
31
31
  margin-left: $spacing-small;
32
32
  }
33
33
 
34
+ > .cl-btn-quickaction {
35
+ &.disabled,
36
+ &:disabled {
37
+ opacity: 0.5;
38
+ visibility: visible; // always visible
39
+
40
+ &:hover {
41
+ color: $color-ci-steel;
42
+ cursor: not-allowed;
43
+ }
44
+ }
45
+ }
46
+
34
47
  > .btn {
35
48
  flex-shrink: 0;
36
49
  }
@@ -136,5 +136,18 @@
136
136
  &:focus-visible {
137
137
  @include cl-color-focus-outline(var(--cl-color-focus), 2px);
138
138
  }
139
+
140
+ &:disabled,
141
+ &.disabled {
142
+ background: $color-bar;
143
+
144
+ &::-webkit-slider-thumb {
145
+ background: $color-ci-steel;
146
+ }
147
+
148
+ &::-moz-range-thumb {
149
+ background: $color-ci-steel;
150
+ }
151
+ }
139
152
  }
140
153
  }
@@ -19,11 +19,15 @@
19
19
  text-wrap: nowrap;
20
20
  width: fit-content;
21
21
 
22
- th,
23
- td {
22
+ th {
24
23
  overflow: hidden;
25
24
  text-overflow: ellipsis;
26
25
  }
26
+
27
+ td {
28
+ overflow: hidden;
29
+ text-overflow: '...';
30
+ }
27
31
  }
28
32
 
29
33
  .cl-table-data {
@@ -12,6 +12,8 @@
12
12
  80%
13
13
  );
14
14
 
15
+ text-overflow: ellipsis;
16
+
15
17
  @include media-breakpoint-down($grid-table-responsive) {
16
18
  table:not(.cl-table-nonresponsive) & {
17
19
  width: 100%;
@@ -15,6 +15,7 @@
15
15
 
16
16
  overflow-wrap: unset;
17
17
  text-align: end;
18
+ text-overflow: ellipsis;
18
19
  }
19
20
  }
20
21
  }
@@ -13,6 +13,7 @@
13
13
  );
14
14
 
15
15
  overflow-wrap: unset;
16
+ text-overflow: ellipsis;
16
17
  width: 2.5em;
17
18
 
18
19
  @include media-breakpoint-down($grid-table-responsive) {
@@ -47,3 +47,7 @@
47
47
  }
48
48
  }
49
49
  }
50
+
51
+ .cl-table-data.cl-table-fixed .cl-td-links {
52
+ background: var(--cl-color-background-haze);
53
+ }
@@ -12,5 +12,7 @@
12
12
  0.025em
13
13
  );
14
14
  }
15
+
16
+ text-overflow: ellipsis;
15
17
  }
16
18
  }
@@ -31,11 +31,5 @@
31
31
  padding-bottom: $table-padding-vertical * 0.5;
32
32
  padding-top: $table-padding-vertical * 0.5;
33
33
  }
34
-
35
- td,
36
- th {
37
- padding-left: $table-padding-horizontal * 0.5;
38
- padding-right: $table-padding-horizontal * 0.5;
39
- }
40
34
  }
41
35
  }
@@ -1,3 +1,3 @@
1
1
  :root {
2
- #{'--cl-version'}: 'v7.22.0';
2
+ #{'--cl-version'}: 'v7.23.0';
3
3
  }
@@ -78,6 +78,17 @@ $cl-url-postfix: '' !default;
78
78
 
79
79
  .cl-form [type='range'] {
80
80
  background: $color-ci-steel;
81
+
82
+ &:disabled,
83
+ &.disabled {
84
+ &::-webkit-slider-thumb {
85
+ background: $color-ci-clay;
86
+ }
87
+
88
+ &::-moz-range-thumb {
89
+ background: $color-ci-clay;
90
+ }
91
+ }
81
92
  }
82
93
 
83
94
  .cl-form [type='checkbox'],
@@ -43,20 +43,21 @@ declare module '@castlabs/ui/dist/castlabs-ui.module.js' {
43
43
  order?: string,
44
44
  caseSensitive?: boolean
45
45
  ): object[]
46
- export function clTableSorter (
46
+ export type ClTableSorter<Type> = {
47
+ col: number
48
+ order: 'ASC' | 'DESC' | 'NONE'
49
+ set: (col: number, order: string) => void
50
+ get: (col: number) => string
51
+ sorted: Type[]
52
+ sorter: () => any
53
+ sort: (col?: number, order?: string) => 'ASC' | 'DESC' | 'NONE'
54
+ }
55
+ export function clTableSorter<Type> (
47
56
  sort: (col: number, order: 'ASC' | 'DESC') => { sorted: object[], sortedOrder: 'ASC' | 'DESC' },
48
57
  initialCol?: number,
49
58
  initialOrder?: string
50
- ): any
51
- export function clTableSorterObjects<Type> (dataCallback: () => Type[], keys: string[], initialCol?: number, pageNoCallback?: () => number, pageSizeCallback?: () => number): {
52
- col: number,
53
- order: 'ASC' | 'DESC' | 'NONE',
54
- set: (col: number, order: string) => void,
55
- get: (col: number) => string,
56
- sorted: Type[],
57
- sorter: () => any,
58
- sort: (col?: number, order?: string) => 'ASC' | 'DESC' | 'NONE',
59
- }
59
+ ): ClTableSorter<Type>
60
+ export function clTableSorterObjects<Type> (dataCallback: () => Type[], keys: string[], initialCol?: number, pageNoCallback?: () => number, pageSizeCallback?: () => number): ClTableSorter<Type>
60
61
  export function clDebounce (callback: any, ms?: number, key?: string): void
61
62
  export function clSanitizeId (id: string): string
62
63
 
package/types/index.d.ts CHANGED
@@ -102,20 +102,26 @@ export function clSort (
102
102
  order?: string,
103
103
  caseSensitive?: boolean
104
104
  ): object[]
105
- export function clTableSorter (
106
- sort: (col: number, order: 'ASC' | 'DESC') => { sorted: object[], sortedOrder: 'ASC' | 'DESC' },
107
- initialCol?: number,
108
- initialOrder?: string
109
- ): any
110
- export function clTableSorterObjects<Type> (dataCallback: () => Type[], keys: string[], initialCol?: number, pageNoCallback?: () => number, pageSizeCallback?: () => number): {
105
+ export type ClTableSorter<Type> = {
111
106
  col: number
112
107
  order: 'ASC' | 'DESC' | 'NONE'
113
108
  set: (col: number, order: string) => void
114
109
  get: (col: number) => string
115
110
  sorted: Type[]
116
- sorter: () => any
111
+ sorter: (col: number, order: string) => {
112
+ sorted: Type[]
113
+ sortOrder: 'ASC' | 'DESC' | 'NONE'
114
+ }
117
115
  sort: (col?: number, order?: string) => 'ASC' | 'DESC' | 'NONE'
118
116
  }
117
+
118
+ export function clTableSorter<Type> (
119
+ sort: (col: number, order: 'ASC' | 'DESC') => { sorted: object[], sortedOrder: 'ASC' | 'DESC' },
120
+ initialCol?: number,
121
+ initialOrder?: string
122
+ ): ClTableSorter<Type>
123
+
124
+ export function clTableSorterObjects<Type> (dataCallback: () => Type[], keys: string[], initialCol?: number, pageNoCallback?: () => number, pageSizeCallback?: () => number): ClTableSorter<Type>
119
125
  export function clDebounce (callback: any, ms?: number, key?: string): void
120
126
  export function clSanitizeId (id: string): string
121
127
 
@@ -1 +0,0 @@
1
- <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='#a0a0a0' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m2 5 6 6 6-6'/></svg>