@descope-ui/descope-combo-box 3.3.5 → 3.5.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/CHANGELOG.md +9 -0
- package/package.json +6 -6
- package/src/component/ComboBoxClass.js +19 -10
- package/src/theme.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [3.5.0](https://github.com/descope/web-components-ui/compare/web-components-ui-3.4.0...web-components-ui-3.5.0) (2026-05-07)
|
|
6
|
+
|
|
7
|
+
## [3.4.0](https://github.com/descope/web-components-ui/compare/web-components-ui-3.3.5...web-components-ui-3.4.0) (2026-05-07)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* add inputs font weight ([#1019](https://github.com/descope/web-components-ui/issues/1019)) ([65d958f](https://github.com/descope/web-components-ui/commit/65d958f4f35ab2d9bd0b25383a629d53ac63ac11))
|
|
13
|
+
|
|
5
14
|
## [3.3.5](https://github.com/descope/web-components-ui/compare/web-components-ui-3.3.4...web-components-ui-3.3.5) (2026-05-06)
|
|
6
15
|
|
|
7
16
|
## [3.3.4](https://github.com/descope/web-components-ui/compare/web-components-ui-3.3.3...web-components-ui-3.3.4) (2026-05-06)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descope-ui/descope-combo-box",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": {
|
|
6
6
|
"import": "./src/component/index.js"
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@playwright/test": "1.58.2",
|
|
17
|
-
"e2e-utils": "3.
|
|
18
|
-
"test-drivers": "3.
|
|
17
|
+
"e2e-utils": "3.5.0",
|
|
18
|
+
"test-drivers": "3.5.0"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@vaadin/combo-box": "24.3.4",
|
|
22
|
-
"@descope-ui/
|
|
23
|
-
"@descope-ui/theme-input-wrapper": "3.
|
|
24
|
-
"@descope-ui/
|
|
22
|
+
"@descope-ui/theme-globals": "3.5.0",
|
|
23
|
+
"@descope-ui/theme-input-wrapper": "3.5.0",
|
|
24
|
+
"@descope-ui/common": "3.5.0"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"link-workspace-packages": false
|
|
@@ -30,7 +30,7 @@ const ComboBoxMixin = (superclass) =>
|
|
|
30
30
|
return ['label-type', 'require-match'];
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
|
|
34
34
|
#renderItem = ({ displayName, value, label }) => {
|
|
35
35
|
return `<span data-name="${label}" data-id="${value}">${
|
|
36
36
|
displayName || label
|
|
@@ -81,7 +81,7 @@ const ComboBoxMixin = (superclass) =>
|
|
|
81
81
|
return data;
|
|
82
82
|
}
|
|
83
83
|
} catch (e) {
|
|
84
|
-
|
|
84
|
+
|
|
85
85
|
console.error(
|
|
86
86
|
'could not parse data string from attribute "data" -',
|
|
87
87
|
e.message,
|
|
@@ -100,14 +100,16 @@ const ComboBoxMixin = (superclass) =>
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
get requireMatch() {
|
|
103
|
-
return
|
|
103
|
+
return (
|
|
104
|
+
this.getAttribute('require-match') === 'true' && !this.allowCustomValue
|
|
105
|
+
);
|
|
104
106
|
}
|
|
105
107
|
|
|
106
|
-
|
|
108
|
+
|
|
107
109
|
isValidDataType(data) {
|
|
108
110
|
const isValid = Array.isArray(data);
|
|
109
111
|
if (!isValid) {
|
|
110
|
-
|
|
112
|
+
|
|
111
113
|
console.error('data must be an array, received:', data);
|
|
112
114
|
}
|
|
113
115
|
|
|
@@ -156,7 +158,7 @@ const ComboBoxMixin = (superclass) =>
|
|
|
156
158
|
}
|
|
157
159
|
}
|
|
158
160
|
|
|
159
|
-
|
|
161
|
+
|
|
160
162
|
customValueTransformFn(val) {
|
|
161
163
|
return val;
|
|
162
164
|
}
|
|
@@ -241,7 +243,7 @@ const ComboBoxMixin = (superclass) =>
|
|
|
241
243
|
// and not via default renderer, which renders only the data-name's value
|
|
242
244
|
// in its own HTML template
|
|
243
245
|
this.baseElement.renderer = (root, combo, model) => {
|
|
244
|
-
|
|
246
|
+
|
|
245
247
|
root.innerHTML = model.item.outerHTML;
|
|
246
248
|
};
|
|
247
249
|
}
|
|
@@ -259,7 +261,9 @@ const ComboBoxMixin = (superclass) =>
|
|
|
259
261
|
const val = this.baseElement.querySelector('input').value;
|
|
260
262
|
|
|
261
263
|
if (val) {
|
|
262
|
-
return this.baseElement.items.some(
|
|
264
|
+
return this.baseElement.items.some(
|
|
265
|
+
(item) => item.dataset.name === val || item.dataset.id === val,
|
|
266
|
+
);
|
|
263
267
|
}
|
|
264
268
|
|
|
265
269
|
return true;
|
|
@@ -268,7 +272,7 @@ const ComboBoxMixin = (superclass) =>
|
|
|
268
272
|
init() {
|
|
269
273
|
super.init?.();
|
|
270
274
|
|
|
271
|
-
|
|
275
|
+
|
|
272
276
|
this.getValidity = function () {
|
|
273
277
|
if (this.requireMatch && !this.isValueMatch()) {
|
|
274
278
|
return {
|
|
@@ -334,7 +338,8 @@ const ComboBoxMixin = (superclass) =>
|
|
|
334
338
|
}
|
|
335
339
|
|
|
336
340
|
handleRequireMatchChange(shouldValidate) {
|
|
337
|
-
this.baseElement.allowCustomValue =
|
|
341
|
+
this.baseElement.allowCustomValue =
|
|
342
|
+
shouldValidate || this.allowCustomValue;
|
|
338
343
|
}
|
|
339
344
|
|
|
340
345
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
@@ -446,6 +451,10 @@ export const ComboBoxClass = compose(
|
|
|
446
451
|
fontFamily: [label, placeholder, inputField, helperText, errorMessage],
|
|
447
452
|
labelFontSize: { ...label, property: 'font-size' },
|
|
448
453
|
labelFontWeight: { ...label, property: 'font-weight' },
|
|
454
|
+
inputValueFontWeight: { ...inputField, property: 'font-weight' },
|
|
455
|
+
inputPlaceholderFontWeight: { ...placeholder, property: 'font-weight' },
|
|
456
|
+
helperTextFontWeight: { ...helperText, property: 'font-weight' },
|
|
457
|
+
errorMessageFontWeight: { ...errorMessage, property: 'font-weight' },
|
|
449
458
|
labelTextColor: [
|
|
450
459
|
{ ...label, property: 'color' },
|
|
451
460
|
{ ...label, property: '-webkit-text-fill-color' },
|
package/src/theme.js
CHANGED
|
@@ -13,6 +13,10 @@ export const comboBox = {
|
|
|
13
13
|
[vars.fontFamily]: refs.fontFamily,
|
|
14
14
|
[vars.labelFontSize]: refs.labelFontSize,
|
|
15
15
|
[vars.labelFontWeight]: refs.labelFontWeight,
|
|
16
|
+
[vars.inputValueFontWeight]: refs.inputValueFontWeight,
|
|
17
|
+
[vars.inputPlaceholderFontWeight]: refs.inputPlaceholderFontWeight,
|
|
18
|
+
[vars.helperTextFontWeight]: refs.helperTextFontWeight,
|
|
19
|
+
[vars.errorMessageFontWeight]: refs.errorMessageFontWeight,
|
|
16
20
|
[vars.labelTextColor]: refs.labelTextColor,
|
|
17
21
|
[vars.errorMessageTextColor]: refs.errorMessageTextColor,
|
|
18
22
|
[vars.inputBorderColor]: refs.borderColor,
|