@momentum-design/components 0.95.5 → 0.95.7

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.
@@ -47,10 +47,16 @@ const styles = [
47
47
  background-color: var(--mdc-checkbox-disabled-checked-icon-color);
48
48
  }
49
49
 
50
+ :host mdc-staticcheckbox {
51
+ position: relative;
52
+ }
53
+
50
54
  .input {
51
55
  margin: 0;
52
56
  padding: 0;
53
57
  position: absolute;
58
+ top: 0;
59
+ left: 0;
54
60
  opacity: 0.1%;
55
61
  overflow: visible;
56
62
  z-index: 1;
@@ -3,6 +3,8 @@ const styles = css `
3
3
  :host {
4
4
  --mdc-option-icon-width: 1rem;
5
5
 
6
+ flex-shrink: 0;
7
+
6
8
  display: flex;
7
9
  flex-direction: row;
8
10
  align-items: center;
@@ -666,6 +666,11 @@ class Popover extends PreventScrollMixin(FocusTrapMixin(Component)) {
666
666
  middleware.push(flip());
667
667
  }
668
668
  if (this.size) {
669
+ // expose a CSS variable for the available height
670
+ // so that it can be used in other components styles
671
+ const setInternalAvailableHeight = (availableHeight) => {
672
+ this.style.setProperty('--mdc-popover-internal-available-height', `${availableHeight}px`);
673
+ };
669
674
  const popoverContent = this.renderRoot.querySelector('[part="popover-content"]');
670
675
  middleware.push(size({
671
676
  apply({ availableHeight }) {
@@ -675,6 +680,7 @@ class Popover extends PreventScrollMixin(FocusTrapMixin(Component)) {
675
680
  maxHeight: `${availableHeight}px`,
676
681
  overflowY: 'auto',
677
682
  });
683
+ setInternalAvailableHeight(availableHeight);
678
684
  },
679
685
  padding: 50,
680
686
  }));
@@ -37,6 +37,12 @@ const styles = css `
37
37
  width: 100%;
38
38
  position: relative;
39
39
  }
40
+ :host ::slotted(mdc-selectlistbox) {
41
+ display: flex;
42
+ flex-direction: column;
43
+ width: 100%;
44
+ max-height: var(--mdc-popover-internal-available-height);
45
+ }
40
46
  :host::part(base-container) {
41
47
  border-radius: 0.5rem;
42
48
  padding: 5.5px 6px 5.5px 12px;
@@ -42,10 +42,6 @@ import ThemeProviderContext from './themeprovider.context';
42
42
  * default: `"ss02" on`
43
43
  * @cssproperty --mdc-themeprovider-scrollbar-track-color - Option to override the color of the scrollbar track.
44
44
  * @cssproperty --mdc-themeprovider-scrollbar-thumb-color - Option to override the color of the scrollbar thumb.
45
- * @cssproperty --mdc-themeprovider-scrollbar-thumb-hover-color - Option to override the color of the
46
- * scrollbar thumb on hover. Applicable only on webkit browsers.
47
- * @cssproperty --mdc-themeprovider-scrollbar-thumb-active-color - Option to override the color of the
48
- * scrollbar thumb on press. Applicable only on webkit browsers.
49
45
  */
50
46
  declare class ThemeProvider extends Provider<ThemeProviderContext> {
51
47
  constructor();
@@ -53,10 +53,6 @@ import styles from './themeprovider.styles';
53
53
  * default: `"ss02" on`
54
54
  * @cssproperty --mdc-themeprovider-scrollbar-track-color - Option to override the color of the scrollbar track.
55
55
  * @cssproperty --mdc-themeprovider-scrollbar-thumb-color - Option to override the color of the scrollbar thumb.
56
- * @cssproperty --mdc-themeprovider-scrollbar-thumb-hover-color - Option to override the color of the
57
- * scrollbar thumb on hover. Applicable only on webkit browsers.
58
- * @cssproperty --mdc-themeprovider-scrollbar-thumb-active-color - Option to override the color of the
59
- * scrollbar thumb on press. Applicable only on webkit browsers.
60
56
  */
61
57
  class ThemeProvider extends Provider {
62
58
  constructor() {
@@ -10,10 +10,8 @@ const styles = css `
10
10
  --mdc-themeprovider-font-feature-settings: 'ss02' on;
11
11
 
12
12
  /* Custom scrollbar variables */
13
- --mdc-themeprovider-scrollbar-track-color: var(--mds-color-theme-background-secondary-normal);
13
+ --mdc-themeprovider-scrollbar-track-color: transparent;
14
14
  --mdc-themeprovider-scrollbar-thumb-color: var(--mds-color-theme-scrollbar-button-normal);
15
- --mdc-themeprovider-scrollbar-thumb-hover-color: var(--mds-color-theme-scrollbar-button-hover);
16
- --mdc-themeprovider-scrollbar-thumb-active-color: var(--mds-color-theme-scrollbar-button-pressed);
17
15
 
18
16
  color: var(--mdc-themeprovider-color-default);
19
17
  font-family: var(--mdc-themeprovider-font-family);