@descope/web-components-ui 1.0.252 → 1.0.254
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/cjs/index.cjs.js +87 -10
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +87 -10
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/descope-button-index-js.js +1 -1
- package/dist/umd/descope-combo-box-index-js.js +1 -1
- package/dist/umd/descope-multi-select-combo-box-index-js.js +1 -1
- package/dist/umd/descope-text-area-index-js.js +1 -1
- package/package.json +1 -1
- package/src/components/descope-button/ButtonClass.js +2 -1
- package/src/components/descope-combo-box/ComboBoxClass.js +18 -3
- package/src/components/descope-multi-select-combo-box/MultiSelectComboBoxClass.js +42 -3
- package/src/components/descope-text-area/TextAreaClass.js +1 -0
- package/src/theme/components/button.js +7 -0
- package/src/theme/components/comboBox.js +3 -1
- package/src/theme/components/multiSelectComboBox.js +4 -2
- package/src/theme/components/textArea.js +5 -0
- package/src/theme/components/textField.js +5 -0
package/dist/cjs/index.cjs.js
CHANGED
@@ -2433,6 +2433,7 @@ const resetStyles = `
|
|
2433
2433
|
}
|
2434
2434
|
vaadin-button::part(label) {
|
2435
2435
|
padding: 0;
|
2436
|
+
width: 100%;
|
2436
2437
|
}
|
2437
2438
|
vaadin-button::part(prefix) {
|
2438
2439
|
margin-left: 0;
|
@@ -2444,7 +2445,6 @@ const iconStyles = `
|
|
2444
2445
|
vaadin-button::part(prefix),
|
2445
2446
|
vaadin-button::part(label) {
|
2446
2447
|
display: flex;
|
2447
|
-
justify-content: center;
|
2448
2448
|
align-items: center;
|
2449
2449
|
}
|
2450
2450
|
`;
|
@@ -2485,6 +2485,7 @@ const ButtonClass = compose(
|
|
2485
2485
|
labelTextColor: { property: 'color' },
|
2486
2486
|
labelTextDecoration: { ...label$a, property: 'text-decoration' },
|
2487
2487
|
labelSpacing: { ...label$a, property: 'gap' },
|
2488
|
+
textAlign: { ...label$a, property: 'justify-content' },
|
2488
2489
|
},
|
2489
2490
|
}),
|
2490
2491
|
clickableMixin,
|
@@ -2581,6 +2582,13 @@ const button = {
|
|
2581
2582
|
|
2582
2583
|
[compVars$4.labelSpacing]: '0.25em',
|
2583
2584
|
|
2585
|
+
[compVars$4.textAlign]: 'center', // default text align center
|
2586
|
+
textAlign: {
|
2587
|
+
right: { [compVars$4.textAlign]: 'right' },
|
2588
|
+
left: { [compVars$4.textAlign]: 'left' },
|
2589
|
+
center: { [compVars$4.textAlign]: 'center' },
|
2590
|
+
},
|
2591
|
+
|
2584
2592
|
[compVars$4.verticalPadding]: '1em',
|
2585
2593
|
|
2586
2594
|
[compVars$4.outlineWidth]: globals.border.sm,
|
@@ -3012,6 +3020,11 @@ const textField = {
|
|
3012
3020
|
[vars$u.inputBackgroundColor]: refs.backgroundColor,
|
3013
3021
|
[vars$u.inputHeight]: refs.inputHeight,
|
3014
3022
|
[vars$u.inputHorizontalPadding]: refs.horizontalPadding,
|
3023
|
+
textAlign: {
|
3024
|
+
right: { [vars$u.inputTextAlign]: 'right' },
|
3025
|
+
left: { [vars$u.inputTextAlign]: 'left' },
|
3026
|
+
center: { [vars$u.inputTextAlign]: 'center' },
|
3027
|
+
},
|
3015
3028
|
};
|
3016
3029
|
|
3017
3030
|
var textField$1 = /*#__PURE__*/Object.freeze({
|
@@ -3406,6 +3419,7 @@ const TextAreaClass = compose(
|
|
3406
3419
|
inputOutlineWidth: { ...inputField$4, property: 'outline-width' },
|
3407
3420
|
inputResizeType: { ...textArea$2, property: 'resize' },
|
3408
3421
|
inputMinHeight: { ...textArea$2, property: 'min-height' },
|
3422
|
+
inputTextAlign: { ...textArea$2, property: 'text-align' },
|
3409
3423
|
},
|
3410
3424
|
}),
|
3411
3425
|
draggableMixin,
|
@@ -3461,6 +3475,11 @@ const textArea = {
|
|
3461
3475
|
[vars$q.inputOutlineOffset]: refs.outlineOffset,
|
3462
3476
|
[vars$q.inputResizeType]: 'vertical',
|
3463
3477
|
[vars$q.inputMinHeight]: '5em',
|
3478
|
+
textAlign: {
|
3479
|
+
right: { [vars$q.inputTextAlign]: 'right' },
|
3480
|
+
left: { [vars$q.inputTextAlign]: 'left' },
|
3481
|
+
center: { [vars$q.inputTextAlign]: 'center' },
|
3482
|
+
},
|
3464
3483
|
|
3465
3484
|
_disabled: {
|
3466
3485
|
[vars$q.inputBackgroundColor]: globalRefs$f.colors.surface.light,
|
@@ -5268,6 +5287,7 @@ const {
|
|
5268
5287
|
inputElement: inputElement$1,
|
5269
5288
|
placeholder: placeholder$1,
|
5270
5289
|
toggle: toggle$1,
|
5290
|
+
clearButton: clearButton$1,
|
5271
5291
|
label: label$5,
|
5272
5292
|
requiredIndicator: requiredIndicator$5,
|
5273
5293
|
helperText: helperText$4,
|
@@ -5278,6 +5298,7 @@ const {
|
|
5278
5298
|
inputElement: { selector: 'input' },
|
5279
5299
|
placeholder: { selector: '> input:placeholder-shown' },
|
5280
5300
|
toggle: { selector: '::part(toggle-button)' },
|
5301
|
+
clearButton: { selector: '::part(clear-button)' },
|
5281
5302
|
label: { selector: '::part(label)' },
|
5282
5303
|
requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
|
5283
5304
|
helperText: { selector: '::part(helper-text)' },
|
@@ -5306,9 +5327,18 @@ const ComboBoxClass = compose(
|
|
5306
5327
|
labelRequiredIndicator: { ...requiredIndicator$5, property: 'content' },
|
5307
5328
|
inputValueTextColor: { ...inputField$3, property: 'color' },
|
5308
5329
|
inputPlaceholderTextColor: { ...placeholder$1, property: 'color' },
|
5309
|
-
inputDropdownButtonCursor:
|
5310
|
-
|
5311
|
-
|
5330
|
+
inputDropdownButtonCursor: [
|
5331
|
+
{ ...toggle$1, property: 'cursor' },
|
5332
|
+
{ ...clearButton$1, property: 'cursor' },
|
5333
|
+
],
|
5334
|
+
inputDropdownButtonColor: [
|
5335
|
+
{ ...toggle$1, property: 'color' },
|
5336
|
+
{ ...clearButton$1, property: 'color' },
|
5337
|
+
],
|
5338
|
+
inputDropdownButtonSize: [
|
5339
|
+
{ ...toggle$1, property: 'font-size' },
|
5340
|
+
{ ...clearButton$1, property: 'font-size' },
|
5341
|
+
],
|
5312
5342
|
inputDropdownButtonOffset: [
|
5313
5343
|
{ ...toggle$1, property: 'margin-right' },
|
5314
5344
|
{ ...toggle$1, property: 'margin-left' },
|
@@ -5327,6 +5357,9 @@ const ComboBoxClass = compose(
|
|
5327
5357
|
// for that to work, because ComboBox is not available
|
5328
5358
|
// at this time.
|
5329
5359
|
overlayBackground: { property: () => ComboBoxClass.cssVarList.overlay.backgroundColor },
|
5360
|
+
overlayTextColor: {
|
5361
|
+
property: () => ComboBoxClass.cssVarList.overlay.textColor,
|
5362
|
+
},
|
5330
5363
|
overlayBorder: { property: () => ComboBoxClass.cssVarList.overlay.border },
|
5331
5364
|
overlayFontSize: { property: () => ComboBoxClass.cssVarList.overlay.fontSize },
|
5332
5365
|
overlayFontFamily: { property: () => ComboBoxClass.cssVarList.overlay.fontFamily },
|
@@ -5350,6 +5383,7 @@ const ComboBoxClass = compose(
|
|
5350
5383
|
margin: { selector: 'vaadin-combo-box-overlay' },
|
5351
5384
|
cursor: { selector: 'vaadin-combo-box-item' },
|
5352
5385
|
fontFamily: { selector: 'vaadin-combo-box-item' },
|
5386
|
+
textColor: { selector: 'vaadin-combo-box-item', property: 'color' },
|
5353
5387
|
fontSize: { selector: 'vaadin-combo-box-item' },
|
5354
5388
|
itemBoxShadow: { selector: 'vaadin-combo-box-item', property: 'box-shadow' },
|
5355
5389
|
itemPaddingInlineStart: {
|
@@ -5434,7 +5468,7 @@ const comboBox = {
|
|
5434
5468
|
[vars$e.inputBackgroundColor]: refs.backgroundColor,
|
5435
5469
|
[vars$e.inputHorizontalPadding]: refs.horizontalPadding,
|
5436
5470
|
[vars$e.inputHeight]: refs.inputHeight,
|
5437
|
-
[vars$e.inputDropdownButtonColor]: globalRefs$7.colors.surface.
|
5471
|
+
[vars$e.inputDropdownButtonColor]: globalRefs$7.colors.surface.main,
|
5438
5472
|
[vars$e.inputDropdownButtonCursor]: 'pointer',
|
5439
5473
|
[vars$e.inputDropdownButtonSize]: refs.toggleButtonSize,
|
5440
5474
|
[vars$e.inputDropdownButtonOffset]: globalRefs$7.spacing.xs,
|
@@ -5450,6 +5484,8 @@ const comboBox = {
|
|
5450
5484
|
[vars$e.overlayFontFamily]: refs.fontFamily,
|
5451
5485
|
[vars$e.overlayCursor]: 'pointer',
|
5452
5486
|
[vars$e.overlayItemBoxShadow]: 'none',
|
5487
|
+
[vars$e.overlayBackground]: refs.backgroundColor,
|
5488
|
+
[vars$e.overlayTextColor]: refs.valueTextColor,
|
5453
5489
|
|
5454
5490
|
// Overlay direct theme:
|
5455
5491
|
[vars$e.overlay.minHeight]: '400px',
|
@@ -8938,6 +8974,10 @@ const componentName$3 = getComponentName('multi-select-combo-box');
|
|
8938
8974
|
|
8939
8975
|
const multiSelectComboBoxMixin = (superclass) =>
|
8940
8976
|
class MultiSelectComboBoxMixinClass extends superclass {
|
8977
|
+
static get observedAttributes() {
|
8978
|
+
return ['readonly'];
|
8979
|
+
}
|
8980
|
+
|
8941
8981
|
// eslint-disable-next-line class-methods-use-this
|
8942
8982
|
#renderItem = ({ displayName, value, label }) => {
|
8943
8983
|
return `<span data-name="${label}" data-id="${value}">${displayName || label}</span>`;
|
@@ -9259,6 +9299,26 @@ const multiSelectComboBoxMixin = (superclass) =>
|
|
9259
9299
|
get value() {
|
9260
9300
|
return this.#value;
|
9261
9301
|
}
|
9302
|
+
|
9303
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
9304
|
+
super.attributeChangedCallback?.(attrName, oldValue, newValue);
|
9305
|
+
|
9306
|
+
if (attrName === 'readonly') {
|
9307
|
+
this.onReadOnlyChange(newValue !== null && newValue === 'true');
|
9308
|
+
}
|
9309
|
+
}
|
9310
|
+
|
9311
|
+
onReadOnlyChange(val) {
|
9312
|
+
if (val) {
|
9313
|
+
this.baseElement?.shadowRoot
|
9314
|
+
?.querySelector('vaadin-multi-select-combo-box-internal')
|
9315
|
+
?.setAttribute('inert', val);
|
9316
|
+
} else {
|
9317
|
+
this.baseElement?.shadowRoot
|
9318
|
+
?.querySelector('vaadin-multi-select-combo-box-internal')
|
9319
|
+
?.removeAttribute('inert');
|
9320
|
+
}
|
9321
|
+
}
|
9262
9322
|
};
|
9263
9323
|
|
9264
9324
|
const {
|
@@ -9267,6 +9327,7 @@ const {
|
|
9267
9327
|
inputElement,
|
9268
9328
|
placeholder,
|
9269
9329
|
toggle,
|
9330
|
+
clearButton,
|
9270
9331
|
label,
|
9271
9332
|
requiredIndicator,
|
9272
9333
|
helperText,
|
@@ -9281,6 +9342,7 @@ const {
|
|
9281
9342
|
inputElement: { selector: 'input' },
|
9282
9343
|
placeholder: { selector: '> input:placeholder-shown' },
|
9283
9344
|
toggle: { selector: '::part(toggle-button)' },
|
9345
|
+
clearButton: { selector: '::part(clear-button)' },
|
9284
9346
|
label: { selector: '::part(label)' },
|
9285
9347
|
requiredIndicator: { selector: '[required]::part(required-indicator)::after' },
|
9286
9348
|
helperText: { selector: '::part(helper-text)' },
|
@@ -9318,9 +9380,18 @@ const MultiSelectComboBoxClass = compose(
|
|
9318
9380
|
labelRequiredIndicator: { ...requiredIndicator, property: 'content' },
|
9319
9381
|
inputValueTextColor: { ...inputField, property: 'color' },
|
9320
9382
|
inputPlaceholderTextColor: { ...placeholder, property: 'color' },
|
9321
|
-
inputDropdownButtonCursor:
|
9322
|
-
|
9323
|
-
|
9383
|
+
inputDropdownButtonCursor: [
|
9384
|
+
{ ...toggle, property: 'cursor' },
|
9385
|
+
{ ...clearButton, property: 'cursor' },
|
9386
|
+
],
|
9387
|
+
inputDropdownButtonColor: [
|
9388
|
+
{ ...toggle, property: 'color' },
|
9389
|
+
{ ...clearButton, property: 'color' },
|
9390
|
+
],
|
9391
|
+
inputDropdownButtonSize: [
|
9392
|
+
{ ...toggle, property: 'font-size' },
|
9393
|
+
{ ...clearButton, property: 'font-size' },
|
9394
|
+
],
|
9324
9395
|
inputDropdownButtonOffset: [
|
9325
9396
|
{ ...toggle, property: 'margin-right' },
|
9326
9397
|
{ ...toggle, property: 'margin-left' },
|
@@ -9352,6 +9423,9 @@ const MultiSelectComboBoxClass = compose(
|
|
9352
9423
|
overlayBackground: {
|
9353
9424
|
property: () => MultiSelectComboBoxClass.cssVarList.overlay.backgroundColor,
|
9354
9425
|
},
|
9426
|
+
overlayTextColor: {
|
9427
|
+
property: () => MultiSelectComboBoxClass.cssVarList.overlay.textColor,
|
9428
|
+
},
|
9355
9429
|
overlayBorder: { property: () => MultiSelectComboBoxClass.cssVarList.overlay.border },
|
9356
9430
|
overlayFontSize: { property: () => MultiSelectComboBoxClass.cssVarList.overlay.fontSize },
|
9357
9431
|
overlayFontFamily: { property: () => MultiSelectComboBoxClass.cssVarList.overlay.fontFamily },
|
@@ -9377,6 +9451,7 @@ const MultiSelectComboBoxClass = compose(
|
|
9377
9451
|
margin: { selector: 'vaadin-multi-select-combo-box-overlay' },
|
9378
9452
|
cursor: { selector: 'vaadin-multi-select-combo-box-item' },
|
9379
9453
|
fontFamily: { selector: 'vaadin-multi-select-combo-box-item' },
|
9454
|
+
textColor: { selector: 'vaadin-multi-select-combo-box-item', property: 'color' },
|
9380
9455
|
fontSize: { selector: 'vaadin-multi-select-combo-box-item' },
|
9381
9456
|
itemBoxShadow: { selector: 'vaadin-multi-select-combo-box-item', property: 'box-shadow' },
|
9382
9457
|
itemPaddingInlineStart: {
|
@@ -9493,14 +9568,14 @@ const multiSelectComboBox = {
|
|
9493
9568
|
[vars$2.inputHorizontalPadding]: refs.horizontalPadding,
|
9494
9569
|
[vars$2.inputVerticalPadding]: refs.verticalPadding,
|
9495
9570
|
[vars$2.inputHeight]: refs.inputHeight,
|
9496
|
-
[vars$2.inputDropdownButtonColor]: globalRefs$1.colors.surface.
|
9571
|
+
[vars$2.inputDropdownButtonColor]: globalRefs$1.colors.surface.main,
|
9497
9572
|
[vars$2.inputDropdownButtonCursor]: 'pointer',
|
9498
9573
|
[vars$2.inputDropdownButtonSize]: refs.toggleButtonSize,
|
9499
9574
|
[vars$2.inputDropdownButtonOffset]: globalRefs$1.spacing.xs,
|
9500
9575
|
[vars$2.overlayItemPaddingInlineStart]: globalRefs$1.spacing.xs,
|
9501
9576
|
[vars$2.overlayItemPaddingInlineEnd]: globalRefs$1.spacing.lg,
|
9502
9577
|
[vars$2.chipFontSize]: refs.chipFontSize,
|
9503
|
-
[vars$2.chipTextColor]:
|
9578
|
+
[vars$2.chipTextColor]: globalRefs$1.colors.surface.contrast,
|
9504
9579
|
[vars$2.chipBackgroundColor]: globalRefs$1.colors.surface.main,
|
9505
9580
|
|
9506
9581
|
_readonly: {
|
@@ -9512,6 +9587,8 @@ const multiSelectComboBox = {
|
|
9512
9587
|
[vars$2.overlayFontFamily]: refs.fontFamily,
|
9513
9588
|
[vars$2.overlayCursor]: 'pointer',
|
9514
9589
|
[vars$2.overlayItemBoxShadow]: 'none',
|
9590
|
+
[vars$2.overlayBackground]: refs.backgroundColor,
|
9591
|
+
[vars$2.overlayTextColor]: refs.valueTextColor,
|
9515
9592
|
|
9516
9593
|
// Overlay direct theme:
|
9517
9594
|
[vars$2.overlay.minHeight]: '400px',
|