@castlabs/ui 7.10.0 → 7.12.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.10.0",
3
+ "version": "7.12.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.53.3"
45
+ "@rollup/rollup-linux-x64-gnu": "4.57.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": "27.0.0",
51
51
  "@types/node": "24.10.1",
52
- "@vitejs/plugin-vue": "6.0.2",
53
- "@vitest/eslint-plugin": "1.4.3",
52
+ "@vitejs/plugin-vue": "6.0.3",
53
+ "@vitest/eslint-plugin": "1.6.6",
54
54
  "@vue/eslint-config-prettier": "10.2.0",
55
55
  "@vue/eslint-config-typescript": "14.6.0",
56
56
  "@vue/test-utils": "2.4.6",
57
57
  "@vue/tsconfig": "0.8.1",
58
- "core-js": "3.47.0",
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.1",
61
+ "eslint-plugin-n": "17.23.2",
62
62
  "eslint-plugin-promise": "7.2.1",
63
- "eslint-plugin-vue": "10.5.1",
64
- "eslint": "9.39.1",
63
+ "eslint-plugin-vue": "10.7.0",
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.2.0",
68
+ "jsdom": "27.4.0",
69
69
  "npm-run-all": "4.1.5",
70
- "sass": "1.94.2",
70
+ "sass": "1.97.3",
71
71
  "stylelint-config-sass-guidelines": "12.1.0",
72
72
  "stylelint-config-standard-vue": "1.0.0",
73
73
  "stylelint-config-standard": "39.0.1",
74
- "stylelint-order": "7.0.0",
75
- "stylelint-scss": "6.12.1",
74
+ "stylelint-order": "7.0.1",
75
+ "stylelint-scss": "7.0.0",
76
76
  "typescript": "5.9.3",
77
- "vite": "7.2.4",
78
- "vitest": "4.0.12",
79
- "vue-tsc": "3.1.4",
80
- "vue": "3.5.24"
77
+ "vite": "7.3.1",
78
+ "vitest": "4.0.18",
79
+ "vue-tsc": "3.2.4",
80
+ "vue": "3.5.27"
81
81
  }
82
82
  }
@@ -62,6 +62,30 @@
62
62
  width: auto;
63
63
  }
64
64
 
65
+ &:disabled,
66
+ &.disabled {
67
+ #{'--cl-color-text'}: $color-disabled;
68
+ #{'--cl-color-input-border'}: $color-disabled;
69
+ color: $color-disabled;
70
+
71
+ .form-label,
72
+ .valid-feedback,
73
+ + .valid-feedback,
74
+ + * + .valid-feedback,
75
+ .invalid-feedback,
76
+ + .invalid-feedback,
77
+ + * + .invalid-feedback {
78
+ color: $color-disabled;
79
+ }
80
+
81
+ textarea,
82
+ input,
83
+ select {
84
+ color: $color-disabled;
85
+ cursor: not-allowed;
86
+ }
87
+ }
88
+
65
89
  @include media-breakpoint-down(sm) {
66
90
  flex-direction: column;
67
91
 
@@ -17,37 +17,21 @@
17
17
 
18
18
  &:disabled,
19
19
  &.disabled {
20
- opacity: 0.5;
21
-
22
- // reset disabled element properties so fieldset-opacity does not disable twice
23
- [type='text'],
24
- [type='password'],
25
- [type='url'],
26
- [type='date'],
27
- [type='email'],
28
- [type='number'],
29
- [type='date'],
30
- [type='time'],
31
- [type='datetime-local'],
32
- textarea,
33
- select {
34
- @extend %form-field-box;
35
- @extend %form-field-typography-sans;
36
-
37
- cursor: not-allowed;
38
- }
20
+ #{'--cl-color-input-border'}: $color-disabled;
21
+ #{'--cl-color-text'}: $color-disabled;
22
+ color: $color-disabled;
39
23
 
40
24
  .form-label,
41
25
  .valid-feedback,
42
- .form-check .form-check-input:disabled ~ .form-check-label {
43
- color: $color-text;
26
+ .invalid-feedback {
27
+ color: $color-disabled;
44
28
  }
45
29
 
46
- [type='checkbox'],
47
- [type='radio'] {
48
- + label {
49
- opacity: 0.5 !important;
50
- }
30
+ textarea,
31
+ input,
32
+ select {
33
+ color: $color-disabled;
34
+ cursor: not-allowed;
51
35
  }
52
36
  }
53
37
  }
@@ -68,7 +68,80 @@ $sidenav-color-text-minor: $color-ci-ash;
68
68
  }
69
69
  }
70
70
 
71
+ .cl-nav-account {
72
+ #{'--cl-color-background'}: $color-ci-night;
73
+ #{'--cl-color-text'}: $color-ci-eggshell;
74
+ #{'--cl-color-focus'}: rgba($color-ci-eggshell, 0.75);
75
+ background-color: var(--cl-color-background);
76
+ color: var(--cl-color-text);
77
+ display: flex;
78
+ flex-direction: column;
79
+ font-size: px(16);
80
+ justify-content: center;
81
+ line-height: 1;
82
+ min-height: $header-nav-height;
83
+ overflow: hidden;
84
+ padding: $spacing-micro 0 $spacing-micro $spacing-small + $spacing-medium + $spacing-micro;
85
+ position: relative;
86
+ text-decoration: none;
87
+ white-space: nowrap;
88
+
89
+ &::after {
90
+ // fade-out gradient
91
+ $bg: var(--cl-color-background);
92
+
93
+ background-image: linear-gradient(to right, transparent, $bg, $bg);
94
+ content: '';
95
+ display: block;
96
+ height: 100%;
97
+ position: absolute;
98
+ right: 0;
99
+ top: 0;
100
+ width: 1rem;
101
+ }
102
+
103
+ &::before {
104
+ @include cl-fontawesome('\f2bd');
105
+
106
+ color: var(--cl-color-text);
107
+ font-size: px(22);
108
+ left: $spacing-small;
109
+ line-height: 1;
110
+ position: absolute;
111
+ top: px(12);
112
+ }
113
+
114
+ p {
115
+ font-weight: 500;
116
+ margin-top: 0.1em;
117
+ }
118
+
119
+ .cl-p-small {
120
+ color: $color-ci-clay;
121
+ letter-spacing: 0;
122
+ margin-top: -0.05em;
123
+ overflow-wrap: normal;
124
+ padding-left: 0.025em;
125
+ transform: scaleX(0.85);
126
+ transform-origin: left;
127
+ }
128
+
129
+ i {
130
+ #{'--cl-color-text'}: $color-ci-clay;
131
+ background-color: var(--cl-color-background);
132
+ box-shadow: 0 0 2px 6px var(--cl-color-background);
133
+ color: var(--cl-color-text);
134
+ font-size: 22px;
135
+ padding-right: $spacing-tiny;
136
+ position: absolute;
137
+ right: $spacing-tiny;
138
+ z-index: 1;
139
+ }
140
+ }
141
+
71
142
  .cl-nav-user {
143
+ // DEPRECATED
144
+
72
145
  // ------------------------------------------------------------
73
146
  @extend %cl-p-nav;
74
147
 
@@ -131,75 +131,75 @@ div {
131
131
  }
132
132
 
133
133
  .cl-color-text-red {
134
- #{'--cl-color-text'}: $color-ci-red;
135
- #{'--cl-color-link'}: $color-ci-red;
134
+ #{'--cl-color-text'}: $color-ci-red !important;
135
+ #{'--cl-color-link'}: $color-ci-red !important;
136
136
  }
137
137
 
138
138
  .cl-color-text-sky {
139
- #{'--cl-color-text'}: $color-ci-sky;
140
- #{'--cl-color-link'}: $color-ci-sky;
139
+ #{'--cl-color-text'}: $color-ci-sky !important;
140
+ #{'--cl-color-link'}: $color-ci-sky !important;
141
141
  }
142
142
 
143
143
  .cl-color-text-night {
144
- #{'--cl-color-text'}: $color-ci-night;
145
- #{'--cl-color-link'}: $color-ci-night;
144
+ #{'--cl-color-text'}: $color-ci-night !important;
145
+ #{'--cl-color-link'}: $color-ci-night !important;
146
146
  }
147
147
 
148
148
  .cl-color-text-eggshell {
149
- #{'--cl-color-text'}: $color-ci-eggshell;
150
- #{'--cl-color-link'}: $color-ci-eggshell;
149
+ #{'--cl-color-text'}: $color-ci-eggshell !important;
150
+ #{'--cl-color-link'}: $color-ci-eggshell !important;
151
151
  }
152
152
 
153
153
  .cl-color-text-clay {
154
- #{'--cl-color-text'}: $color-ci-clay;
154
+ #{'--cl-color-text'}: $color-ci-clay !important;
155
155
  }
156
156
 
157
157
  .cl-color-text-ash {
158
- #{'--cl-color-text'}: $color-ci-ash;
159
- #{'--cl-color-link'}: $color-ci-ash;
158
+ #{'--cl-color-text'}: $color-ci-ash !important;
159
+ #{'--cl-color-link'}: $color-ci-ash !important;
160
160
  }
161
161
 
162
162
  .cl-color-text-petrol {
163
- #{'--cl-color-text'}: $color-ci-petrol;
164
- #{'--cl-color-link'}: $color-ci-petrol;
163
+ #{'--cl-color-text'}: $color-ci-petrol !important;
164
+ #{'--cl-color-link'}: $color-ci-petrol !important;
165
165
  }
166
166
 
167
167
  .cl-color-text-berry {
168
- #{'--cl-color-text'}: $color-ci-berry;
169
- #{'--cl-color-link'}: $color-ci-berry;
168
+ #{'--cl-color-text'}: $color-ci-berry !important;
169
+ #{'--cl-color-link'}: $color-ci-berry !important;
170
170
  }
171
171
 
172
172
  .cl-color-text-none {
173
- #{'--cl-color-text'}: transparent;
174
- #{'--cl-color-link'}: transparent;
173
+ #{'--cl-color-text'}: transparent !important;
174
+ #{'--cl-color-link'}: transparent !important;
175
175
  }
176
176
 
177
177
  .cl-color-text-brick {
178
- #{'--cl-color-text'}: $color-ci-brick;
179
- #{'--cl-color-link'}: $color-ci-brick;
178
+ #{'--cl-color-text'}: $color-ci-brick !important;
179
+ #{'--cl-color-link'}: $color-ci-brick !important;
180
180
  }
181
181
 
182
182
  .cl-color-text-honey {
183
- #{'--cl-color-text'}: $color-ci-honey;
184
- #{'--cl-color-link'}: $color-ci-honey;
183
+ #{'--cl-color-text'}: $color-ci-honey !important;
184
+ #{'--cl-color-link'}: $color-ci-honey !important;
185
185
  }
186
186
 
187
187
  .cl-color-text-leaf {
188
- #{'--cl-color-text'}: $color-ci-leaf;
189
- #{'--cl-color-link'}: $color-ci-leaf;
188
+ #{'--cl-color-text'}: $color-ci-leaf !important;
189
+ #{'--cl-color-link'}: $color-ci-leaf !important;
190
190
  }
191
191
 
192
192
  .cl-color-text-sea {
193
- #{'--cl-color-text'}: $color-ci-sea;
194
- #{'--cl-color-link'}: $color-ci-sea;
193
+ #{'--cl-color-text'}: $color-ci-sea !important;
194
+ #{'--cl-color-link'}: $color-ci-sea !important;
195
195
  }
196
196
 
197
197
  .cl-color-text-orchid {
198
- #{'--cl-color-text'}: $color-ci-orchid;
199
- #{'--cl-color-link'}: $color-ci-orchid;
198
+ #{'--cl-color-text'}: $color-ci-orchid !important;
199
+ #{'--cl-color-link'}: $color-ci-orchid !important;
200
200
  }
201
201
 
202
202
  .cl-color-text-steel {
203
- #{'--cl-color-text'}: $color-ci-steel;
204
- #{'--cl-color-link'}: $color-ci-steel;
203
+ #{'--cl-color-text'}: $color-ci-steel !important;
204
+ #{'--cl-color-link'}: $color-ci-steel !important;
205
205
  }
@@ -1,3 +1,3 @@
1
1
  :root {
2
- #{'--cl-version'}: 'v7.10.0';
2
+ #{'--cl-version'}: 'v7.12.0';
3
3
  }
@@ -1,5 +1,7 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
 
3
+ // this contains general non-vue types
4
+
3
5
  declare module '@castlabs/ui/dist/castlabs-ui.module.js' {
4
6
  export function clScrollToId (id: string, smooth?: boolean): void
5
7
 
@@ -18,9 +20,6 @@ declare module '@castlabs/ui/dist/castlabs-ui.module.js' {
18
20
  export function clFormIsValidAsync (id: string): Promise<boolean>
19
21
  export function clFormFieldFocusFirstInvalid (id: string): void
20
22
  export function clFormAutofocus (id: string): void
21
- export function clRefClField (ref: unknown): any
22
- export function clRefClFieldGroup (ref: unknown): any
23
- export function clRefHTMLElement (ref: unknown): HTMLElement
24
23
 
25
24
  export function clFormatFilesize (bytes: number): string
26
25
  export function clFormatDate (date: Date): string
package/types/index.d.ts CHANGED
@@ -80,9 +80,6 @@ export function clFormIsValid (id: string): boolean
80
80
  export function clFormIsValidAsync (id: string): Promise<boolean>
81
81
  export function clFormFieldFocusFirstInvalid (id: string): void
82
82
  export function clFormAutofocus (id: string): void
83
- export function clRefClField (ref: unknown): typeof ClField
84
- export function clRefClFieldGroup (ref: unknown): typeof ClFieldGroup
85
- export function clRefHTMLElement (ref: unknown): HTMLElement
86
83
 
87
84
  export function clFormatFilesize (bytes: number): string
88
85
  export function clFormatDate (date: Date): string
@@ -138,6 +135,13 @@ export function clReloadStore (component: any, forced?: any[], optional?: any[],
138
135
 
139
136
  export function clMatch (string: string, expression?: string, caseSensitive?: boolean): boolean
140
137
 
138
+ // --- utils/vue ---------------------------------------------------------------
139
+
140
+ export function clRefClField (ref: unknown): typeof ClField
141
+ export function clRefClFieldGroup (ref: unknown): typeof ClFieldGroup
142
+ export function clRefFocus (ref: unknown): void
143
+ export function clRefHTMLElement (ref: unknown): HTMLElement
144
+
141
145
  // --- utils/vitest ------------------------------------------------------------
142
146
 
143
147
  export const FLECTIONS: RegExp[]