@castlabs/ui 7.21.2 → 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/dist/castlabs-ui.common.js +3 -3
- package/dist/castlabs-ui.common.js.map +1 -1
- package/dist/castlabs-ui.core.js +63 -19
- package/dist/castlabs-ui.css +1 -1
- package/dist/castlabs-ui.module.d.ts +12 -11
- package/dist/castlabs-ui.module.js +63 -19
- package/dist/castlabs-ui.umd.js +4 -4
- package/dist/castlabs-ui.umd.js.map +1 -1
- package/package.json +13 -13
- package/src/components/ClButton/style.scss +1 -1
- package/src/components/form/ClFieldGroup/style.scss +81 -48
- package/src/components/form/ClFieldInput/style.scss +13 -0
- package/src/components/table/ClTable/style.scss +6 -2
- package/src/components/table/ClTableCel/Code/style.scss +2 -0
- package/src/components/table/ClTableCel/Currency/style.scss +1 -0
- package/src/components/table/ClTableCel/ID/style.scss +1 -0
- package/src/components/table/ClTableCel/Links/style.scss +4 -0
- package/src/components/table/ClTableCel/Time/style.scss +2 -0
- package/src/components/table/ClTableCel/style.variables.scss +0 -6
- package/src/components/widget/ClPage/style.scss +27 -0
- package/src/styles/layout/meta.scss +1 -1
- package/src/styles/themes/dark.scss +15 -2
- package/types/castlabs-ui.module.d.ts +12 -11
- package/types/index.d.ts +13 -7
- package/dist/select-disabled-dark.1065ea4c.svg +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@castlabs/ui",
|
|
3
|
-
"version": "7.
|
|
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.
|
|
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": "
|
|
51
|
+
"@types/node": "26.0.0",
|
|
52
52
|
"@vitejs/plugin-vue": "6.0.7",
|
|
53
|
-
"@vitest/eslint-plugin": "1.6.
|
|
53
|
+
"@vitest/eslint-plugin": "1.6.20",
|
|
54
54
|
"@vue/eslint-config-prettier": "10.2.0",
|
|
55
|
-
"@vue/eslint-config-typescript": "14.
|
|
56
|
-
"@vue/test-utils": "2.4.
|
|
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
|
|
61
|
+
"eslint-plugin-n": "18.1.0",
|
|
62
62
|
"eslint-plugin-promise": "7.3.0",
|
|
63
|
-
"eslint-plugin-vue": "10.9.
|
|
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.
|
|
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.
|
|
75
|
+
"stylelint-scss": "7.2.0",
|
|
76
76
|
"typescript": "6.0.3",
|
|
77
77
|
"vite": "8.0.16",
|
|
78
|
-
"vitest": "4.1.
|
|
79
|
-
"vue-tsc": "3.3.
|
|
80
|
-
"vue": "3.5.
|
|
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"
|
|
@@ -13,6 +13,37 @@
|
|
|
13
13
|
margin-left: $spacing-tiny;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
> [type='range'] {
|
|
17
|
+
border-radius: $brand-border-radius !important;
|
|
18
|
+
margin-bottom: $spacing-tiny - px(1); // shift a bit to align with -/+ icons
|
|
19
|
+
margin-top: $spacing-tiny + px(1);
|
|
20
|
+
|
|
21
|
+
+ [type='range'] {
|
|
22
|
+
margin-left: $spacing-tiny;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:has(+ [type='range']) {
|
|
26
|
+
margin-right: $spacing-tiny;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
> :not(.cl-btn-quickaction) + .cl-btn-quickaction {
|
|
31
|
+
margin-left: $spacing-small;
|
|
32
|
+
}
|
|
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
|
+
|
|
16
47
|
> .btn {
|
|
17
48
|
flex-shrink: 0;
|
|
18
49
|
}
|
|
@@ -70,60 +101,62 @@
|
|
|
70
101
|
}
|
|
71
102
|
}
|
|
72
103
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
104
|
+
&:not(.cl-no-wrap) {
|
|
105
|
+
@include media-breakpoint-up(sm) {
|
|
106
|
+
> .form-control,
|
|
107
|
+
> .input-group-text {
|
|
108
|
+
&:has(+ .form-control),
|
|
109
|
+
&:has(+ p + .form-control),
|
|
110
|
+
&:has(+ p + p + .form-control),
|
|
111
|
+
&:has(+ .input-group-text) {
|
|
112
|
+
border-bottom-right-radius: 0;
|
|
113
|
+
border-right-color: $color-ci-clay;
|
|
114
|
+
border-top-right-radius: 0;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
+ .input-group-text,
|
|
118
|
+
+ p + .form-control,
|
|
119
|
+
+ p + p + .form-control,
|
|
120
|
+
+ .form-control {
|
|
121
|
+
border-bottom-left-radius: 0;
|
|
122
|
+
border-left-width: 0; // trick to share one ][ border between 2 inputs
|
|
123
|
+
border-top-left-radius: 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&:has(+ .form-control.invalid),
|
|
127
|
+
&:has(+ .form-control[invalid]),
|
|
128
|
+
&:has(+ p + .form-control.invalid),
|
|
129
|
+
&:has(+ p + .form-control[invalid]),
|
|
130
|
+
&:has(+ p + p + .form-control.invalid),
|
|
131
|
+
&:has(+ p + p + .form-control[invalid]) {
|
|
132
|
+
border-right-color: $color-error;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&:has(+ .form-control:focus),
|
|
136
|
+
&:has(+ .form-control:focus-visible),
|
|
137
|
+
&:has(+ p + .form-control:focus),
|
|
138
|
+
&:has(+ p + .form-control:focus-visible),
|
|
139
|
+
&:has(+ p + p + .form-control:focus),
|
|
140
|
+
&:has(+ p + p + .form-control:focus-visible) {
|
|
141
|
+
border-right-color: $color-focus !important;
|
|
142
|
+
}
|
|
86
143
|
}
|
|
87
144
|
}
|
|
88
|
-
}
|
|
89
145
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
> .input-group-text {
|
|
93
|
-
&:has(+ .form-control),
|
|
94
|
-
&:has(+ p + .form-control),
|
|
95
|
-
&:has(+ p + p + .form-control),
|
|
96
|
-
&:has(+ .input-group-text) {
|
|
97
|
-
border-bottom-right-radius: 0;
|
|
98
|
-
border-right-color: $color-ci-clay;
|
|
99
|
-
border-top-right-radius: 0;
|
|
100
|
-
}
|
|
146
|
+
@include media-breakpoint-down(sm) {
|
|
147
|
+
flex-direction: column;
|
|
101
148
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
+ p + p + .form-control,
|
|
105
|
-
+ .form-control {
|
|
106
|
-
border-bottom-left-radius: 0;
|
|
107
|
-
border-left-width: 0; // trick to share one ][ border between 2 inputs
|
|
108
|
-
border-top-left-radius: 0;
|
|
109
|
-
}
|
|
149
|
+
> * {
|
|
150
|
+
width: 100% !important;
|
|
110
151
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
&:has(+ p + .form-control[invalid]),
|
|
115
|
-
&:has(+ p + p + .form-control.invalid),
|
|
116
|
-
&:has(+ p + p + .form-control[invalid]) {
|
|
117
|
-
border-right-color: $color-error;
|
|
118
|
-
}
|
|
152
|
+
&:not(:first-child) {
|
|
153
|
+
margin-top: $spacing-tiny;
|
|
154
|
+
}
|
|
119
155
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
&:has(+ p + p + .form-control:focus),
|
|
125
|
-
&:has(+ p + p + .form-control:focus-visible) {
|
|
126
|
-
border-right-color: $color-focus !important;
|
|
156
|
+
&.btn {
|
|
157
|
+
font-size: 0.75em;
|
|
158
|
+
margin-left: 0 !important;
|
|
159
|
+
}
|
|
127
160
|
}
|
|
128
161
|
}
|
|
129
162
|
}
|
|
@@ -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
|
}
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
|
|
40
40
|
.cl-section-fullscreen {
|
|
41
41
|
height: 100%;
|
|
42
|
+
padding-bottom: 0;
|
|
42
43
|
|
|
43
44
|
.cl-table-scroll,
|
|
44
45
|
> .container,
|
|
@@ -52,6 +53,10 @@
|
|
|
52
53
|
padding-top: 0 !important;
|
|
53
54
|
}
|
|
54
55
|
|
|
56
|
+
.cl-table-scroll {
|
|
57
|
+
margin-bottom: $spacing-small !important;
|
|
58
|
+
}
|
|
59
|
+
|
|
55
60
|
table {
|
|
56
61
|
display: block;
|
|
57
62
|
max-height: 100%;
|
|
@@ -66,3 +71,25 @@
|
|
|
66
71
|
z-index: 1;
|
|
67
72
|
}
|
|
68
73
|
}
|
|
74
|
+
|
|
75
|
+
.cl-fullscreen-scroller {
|
|
76
|
+
max-height: 100%;
|
|
77
|
+
overflow: scroll;
|
|
78
|
+
|
|
79
|
+
.cl-table-scroll {
|
|
80
|
+
overflow: unset;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
table {
|
|
84
|
+
display: table !important;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.cl-table-data .cl-td-links {
|
|
88
|
+
padding-left: $spacing-small;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.cl-resizer {
|
|
92
|
+
background-color: var(--cl-color-background) !important;
|
|
93
|
+
margin-left: calc(-0.5rem - 2px) !important;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -9,12 +9,14 @@ $cl-url-postfix: '' !default;
|
|
|
9
9
|
.cl-color-haze,
|
|
10
10
|
.cl-section-alternate,
|
|
11
11
|
.card.cl-color-haze {
|
|
12
|
-
#{'--cl-color-icon'}: $color-ci-steel;
|
|
13
12
|
#{'--cl-color-code'}: $color-ci-sky;
|
|
13
|
+
#{'--cl-color-focus'}: $color-ci-steel;
|
|
14
|
+
#{'--cl-color-icon'}: $color-ci-steel;
|
|
14
15
|
#{'--cl-color-input-background'}: $color-ci-night;
|
|
15
16
|
#{'--cl-color-input-border'}: $color-ci-clay;
|
|
16
|
-
#{'--cl-color-
|
|
17
|
+
#{'--cl-color-line'}: $color-ci-steel;
|
|
17
18
|
#{'--cl-color-link'}: $color-ci-eggshell;
|
|
19
|
+
#{'--cl-color-text'}: $color-ci-eggshell;
|
|
18
20
|
#{'--cl-color-text-inverted'}: $color-ci-night;
|
|
19
21
|
|
|
20
22
|
textarea[disabled],
|
|
@@ -76,6 +78,17 @@ $cl-url-postfix: '' !default;
|
|
|
76
78
|
|
|
77
79
|
.cl-form [type='range'] {
|
|
78
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
|
+
}
|
|
79
92
|
}
|
|
80
93
|
|
|
81
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
|
|
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
|
-
):
|
|
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
|
|
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: () =>
|
|
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>
|