@momentum-design/components 0.104.2 → 0.104.3
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/browser/index.js +35 -30
- package/dist/browser/index.js.map +2 -2
- package/dist/components/select/select.component.d.ts +2 -6
- package/dist/components/select/select.component.js +2 -11
- package/dist/components/select/select.styles.js +8 -2
- package/dist/custom-elements.json +1499 -1510
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +4 -4
- package/dist/react/select/index.d.ts +2 -0
- package/dist/react/select/index.js +2 -0
- package/package.json +1 -1
@@ -46,6 +46,8 @@ declare const Select_base: import("../../utils/mixins/index.types").Constructor<
|
|
46
46
|
* @cssproperty --mdc-select-border-color-warning - The border color of the select when in warning state.
|
47
47
|
* @cssproperty --mdc-select-border-color-error - The border color of the select when in error state.
|
48
48
|
* @cssproperty --mdc-select-width - The width of the select.
|
49
|
+
* @cssproperty --mdc-select-listbox-height - The height of the listbox inside the select.
|
50
|
+
* @cssproperty --mdc-select-listbox-width - The width of the listbox inside the select (default: `--mdc-select-width`).
|
49
51
|
*/
|
50
52
|
declare class Select extends Select_base implements AssociatedFormControl {
|
51
53
|
/**
|
@@ -57,12 +59,6 @@ declare class Select extends Select_base implements AssociatedFormControl {
|
|
57
59
|
* @default false
|
58
60
|
*/
|
59
61
|
readonly: boolean;
|
60
|
-
/**
|
61
|
-
* height attribute of the select field. If set,
|
62
|
-
* then a scroll bar will be visible when there more options than the adjusted height.
|
63
|
-
* @default auto
|
64
|
-
*/
|
65
|
-
height: string;
|
66
62
|
/**
|
67
63
|
* The placeholder text which will be shown on the text if provided.
|
68
64
|
*/
|
@@ -62,6 +62,8 @@ import styles from './select.styles';
|
|
62
62
|
* @cssproperty --mdc-select-border-color-warning - The border color of the select when in warning state.
|
63
63
|
* @cssproperty --mdc-select-border-color-error - The border color of the select when in error state.
|
64
64
|
* @cssproperty --mdc-select-width - The width of the select.
|
65
|
+
* @cssproperty --mdc-select-listbox-height - The height of the listbox inside the select.
|
66
|
+
* @cssproperty --mdc-select-listbox-width - The width of the listbox inside the select (default: `--mdc-select-width`).
|
65
67
|
*/
|
66
68
|
class Select extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
|
67
69
|
constructor() {
|
@@ -71,12 +73,6 @@ class Select extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
|
|
71
73
|
* @default false
|
72
74
|
*/
|
73
75
|
this.readonly = false;
|
74
|
-
/**
|
75
|
-
* height attribute of the select field. If set,
|
76
|
-
* then a scroll bar will be visible when there more options than the adjusted height.
|
77
|
-
* @default auto
|
78
|
-
*/
|
79
|
-
this.height = 'auto';
|
80
76
|
/**
|
81
77
|
* The placeholder text which will be shown on the text if provided.
|
82
78
|
*/
|
@@ -563,7 +559,6 @@ class Select extends FormInternalsMixin(DataAriaLabelMixin(FormfieldWrapper)) {
|
|
563
559
|
@closebyoutsideclick="${() => {
|
564
560
|
this.displayPopover = false;
|
565
561
|
}}"
|
566
|
-
style="--mdc-popover-max-width: var(--mdc-select-width); --mdc-popover-max-height: ${this.height};"
|
567
562
|
>
|
568
563
|
<slot @click="${this.handleOptionsClick}"></slot>
|
569
564
|
</mdc-popover>
|
@@ -581,10 +576,6 @@ __decorate([
|
|
581
576
|
property({ type: Boolean }),
|
582
577
|
__metadata("design:type", Object)
|
583
578
|
], Select.prototype, "readonly", void 0);
|
584
|
-
__decorate([
|
585
|
-
property({ type: String }),
|
586
|
-
__metadata("design:type", Object)
|
587
|
-
], Select.prototype, "height", void 0);
|
588
579
|
__decorate([
|
589
580
|
property({ type: String, reflect: true }),
|
590
581
|
__metadata("design:type", String)
|
@@ -15,6 +15,8 @@ const styles = css `
|
|
15
15
|
--mdc-select-border-color-warning: var(--mds-color-theme-text-warning-normal);
|
16
16
|
--mdc-select-border-color-error: var(--mds-color-theme-text-error-normal);
|
17
17
|
--mdc-select-width: 100%;
|
18
|
+
--mdc-select-listbox-width: var(--mdc-select-width);
|
19
|
+
--mdc-select-listbox-height: auto;
|
18
20
|
|
19
21
|
display: flex;
|
20
22
|
flex-direction: column;
|
@@ -79,9 +81,13 @@ const styles = css `
|
|
79
81
|
display: flex;
|
80
82
|
padding: 2px;
|
81
83
|
}
|
84
|
+
|
85
|
+
/* Popover height, width & padding overrides */
|
86
|
+
:host mdc-popover {
|
87
|
+
--mdc-popover-max-width: var(--mdc-select-listbox-width);
|
88
|
+
--mdc-popover-max-height: var(--mdc-select-listbox-height);
|
89
|
+
}
|
82
90
|
:host mdc-popover::part(popover-content) {
|
83
|
-
min-width: auto;
|
84
|
-
width: var(--mdc-select-width);
|
85
91
|
max-height: var(--mdc-popover-max-height);
|
86
92
|
padding: 0.75rem 0.5rem;
|
87
93
|
}
|