@momentum-design/components 0.95.4 → 0.95.6

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;
@@ -1,5 +1,4 @@
1
- import type { CSSResult, PropertyValues, TemplateResult } from 'lit';
2
- import { nothing } from 'lit';
1
+ import { CSSResult, PropertyValues, TemplateResult } from 'lit';
3
2
  import { Component } from '../../models';
4
3
  import type { PopoverPlacement } from '../popover/popover.types';
5
4
  import type { TextType } from '../text/text.types';
@@ -146,7 +145,7 @@ declare class ListItem extends ListItem_base {
146
145
  * @param content - The text content to be displayed within the slot.
147
146
  * @returns A TemplateResult containing a slot with an `mdc-text` element of type BODY_SMALL_REGULAR.
148
147
  */
149
- protected getText(slotName: string, type: TextType, content?: string): TemplateResult | typeof nothing;
148
+ protected getText(slotName: string, type: TextType, content?: string): TemplateResult;
150
149
  /**
151
150
  * Disable or enable all slotted elements in the leading and trailing slots.
152
151
  * This is useful when the list item is disabled, to prevent the user from interacting with the controls.
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { html, nothing } from 'lit';
10
+ import { nothing, html } from 'lit';
11
11
  import { property, queryAssignedElements } from 'lit/decorators.js';
12
12
  import { Component } from '../../models';
13
13
  import { KEYS } from '../../utils/keys';
@@ -176,12 +176,11 @@ class ListItem extends DisabledMixin(TabIndexMixin(Component)) {
176
176
  * @returns A TemplateResult containing a slot with an `mdc-text` element of type BODY_SMALL_REGULAR.
177
177
  */
178
178
  getText(slotName, type, content) {
179
- if (!content) {
180
- return nothing;
181
- }
182
179
  return html `
183
180
  <slot name="${slotName}">
184
- <mdc-text part="${slotName}" type="${type}" tagname="${VALID_TEXT_TAGS.SPAN}">${content}</mdc-text>
181
+ ${content
182
+ ? html `<mdc-text part="${slotName}" type="${type}" tagname="${VALID_TEXT_TAGS.SPAN}">${content}</mdc-text>`
183
+ : nothing}
185
184
  </slot>
186
185
  `;
187
186
  }
@@ -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);
@@ -33284,14 +33284,6 @@
33284
33284
  {
33285
33285
  "description": "Option to override the color of the scrollbar thumb.",
33286
33286
  "name": "--mdc-themeprovider-scrollbar-thumb-color"
33287
- },
33288
- {
33289
- "description": "Option to override the color of the scrollbar thumb on hover. Applicable only on webkit browsers.",
33290
- "name": "--mdc-themeprovider-scrollbar-thumb-hover-color"
33291
- },
33292
- {
33293
- "description": "Option to override the color of the scrollbar thumb on press. Applicable only on webkit browsers.",
33294
- "name": "--mdc-themeprovider-scrollbar-thumb-active-color"
33295
33287
  }
33296
33288
  ],
33297
33289
  "slots": [
@@ -33351,7 +33343,7 @@
33351
33343
  "module": "/src/models"
33352
33344
  },
33353
33345
  "tagName": "mdc-themeprovider",
33354
- "jsDoc": "/**\n * ThemeProvider component, which sets the passed in themeclass as class.\n * If the themeclass switches, the existing themeclass will be removed as a class\n * and the new themeclass will be added.\n *\n * CSS variables defined in the themeclass will be used for the styling of child dom nodes.\n *\n * Available Momentum theme classes:\n *\n * `mds-theme-stable-darkWebex`, `mds-theme-stable-lightWebex`\n *\n * `mds-theme-stable-darkBronzeWebex`, `mds-theme-stable-lightBronzeWebex`\n *\n * `mds-theme-stable-darkIndigoWebex`, `mds-theme-stable-lightIndigoWebex`\n *\n * `mds-theme-stable-darkJadeWebex`, `mds-theme-stable-lightJadeWebex`\n *\n * `mds-theme-stable-darkLavenderWebex`, `mds-theme-stable-lightLavenderWebex`\n *\n * `mds-theme-stable-darkRoseWebex`, `mds-theme-stable-lightRoseWebex`\n *\n * Themeclass context can be be consumed from Lit child components\n * (see providerUtils.consume for how to consume)\n *\n * ThemeProvider also includes basic font defaults for text.\n *\n * @tagname mdc-themeprovider\n *\n * @slot - children\n *\n * @cssproperty --mdc-themeprovider-color-default - Option to override the default color,\n * default: color-theme-text-primary-normal\n * @cssproperty --mdc-themeprovider-font-family - Option to override the font family,\n * default: `Momentum` (from momentum-design/fonts)\n * @cssproperty --mdc-themeprovider-font-weight - Option to override the font weight, default: `400`\n * @cssproperty --mdc-themeprovider-letter-spacing-adjustment - Option to override the default letter-spacing,\n * default: `-0.25px` (this is to match the old CiscoSans)\n * @cssproperty --mdc-themeprovider-font-feature-settings - Option to override the font feature settings,\n * default: `\"ss02\" on`\n * @cssproperty --mdc-themeprovider-scrollbar-track-color - Option to override the color of the scrollbar track.\n * @cssproperty --mdc-themeprovider-scrollbar-thumb-color - Option to override the color of the scrollbar thumb.\n * @cssproperty --mdc-themeprovider-scrollbar-thumb-hover-color - Option to override the color of the\n * scrollbar thumb on hover. Applicable only on webkit browsers.\n * @cssproperty --mdc-themeprovider-scrollbar-thumb-active-color - Option to override the color of the\n * scrollbar thumb on press. Applicable only on webkit browsers.\n */",
33346
+ "jsDoc": "/**\n * ThemeProvider component, which sets the passed in themeclass as class.\n * If the themeclass switches, the existing themeclass will be removed as a class\n * and the new themeclass will be added.\n *\n * CSS variables defined in the themeclass will be used for the styling of child dom nodes.\n *\n * Available Momentum theme classes:\n *\n * `mds-theme-stable-darkWebex`, `mds-theme-stable-lightWebex`\n *\n * `mds-theme-stable-darkBronzeWebex`, `mds-theme-stable-lightBronzeWebex`\n *\n * `mds-theme-stable-darkIndigoWebex`, `mds-theme-stable-lightIndigoWebex`\n *\n * `mds-theme-stable-darkJadeWebex`, `mds-theme-stable-lightJadeWebex`\n *\n * `mds-theme-stable-darkLavenderWebex`, `mds-theme-stable-lightLavenderWebex`\n *\n * `mds-theme-stable-darkRoseWebex`, `mds-theme-stable-lightRoseWebex`\n *\n * Themeclass context can be be consumed from Lit child components\n * (see providerUtils.consume for how to consume)\n *\n * ThemeProvider also includes basic font defaults for text.\n *\n * @tagname mdc-themeprovider\n *\n * @slot - children\n *\n * @cssproperty --mdc-themeprovider-color-default - Option to override the default color,\n * default: color-theme-text-primary-normal\n * @cssproperty --mdc-themeprovider-font-family - Option to override the font family,\n * default: `Momentum` (from momentum-design/fonts)\n * @cssproperty --mdc-themeprovider-font-weight - Option to override the font weight, default: `400`\n * @cssproperty --mdc-themeprovider-letter-spacing-adjustment - Option to override the default letter-spacing,\n * default: `-0.25px` (this is to match the old CiscoSans)\n * @cssproperty --mdc-themeprovider-font-feature-settings - Option to override the font feature settings,\n * default: `\"ss02\" on`\n * @cssproperty --mdc-themeprovider-scrollbar-track-color - Option to override the color of the scrollbar track.\n * @cssproperty --mdc-themeprovider-scrollbar-thumb-color - Option to override the color of the scrollbar thumb.\n */",
33355
33347
  "customElement": true
33356
33348
  }
33357
33349
  ],
@@ -40,10 +40,6 @@ import Component from '../../components/themeprovider';
40
40
  * default: `"ss02" on`
41
41
  * @cssproperty --mdc-themeprovider-scrollbar-track-color - Option to override the color of the scrollbar track.
42
42
  * @cssproperty --mdc-themeprovider-scrollbar-thumb-color - Option to override the color of the scrollbar thumb.
43
- * @cssproperty --mdc-themeprovider-scrollbar-thumb-hover-color - Option to override the color of the
44
- * scrollbar thumb on hover. Applicable only on webkit browsers.
45
- * @cssproperty --mdc-themeprovider-scrollbar-thumb-active-color - Option to override the color of the
46
- * scrollbar thumb on press. Applicable only on webkit browsers.
47
43
  */
48
44
  declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
49
45
  export default reactWrapper;
@@ -43,10 +43,6 @@ import { TAG_NAME } from '../../components/themeprovider/themeprovider.constants
43
43
  * default: `"ss02" on`
44
44
  * @cssproperty --mdc-themeprovider-scrollbar-track-color - Option to override the color of the scrollbar track.
45
45
  * @cssproperty --mdc-themeprovider-scrollbar-thumb-color - Option to override the color of the scrollbar thumb.
46
- * @cssproperty --mdc-themeprovider-scrollbar-thumb-hover-color - Option to override the color of the
47
- * scrollbar thumb on hover. Applicable only on webkit browsers.
48
- * @cssproperty --mdc-themeprovider-scrollbar-thumb-active-color - Option to override the color of the
49
- * scrollbar thumb on press. Applicable only on webkit browsers.
50
46
  */
51
47
  const reactWrapper = createComponent({
52
48
  tagName: TAG_NAME,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@momentum-design/components",
3
3
  "packageManager": "yarn@3.2.4",
4
- "version": "0.95.4",
4
+ "version": "0.95.6",
5
5
  "engines": {
6
6
  "node": ">=20.0.0",
7
7
  "npm": ">=8.0.0"