@momentum-design/components 0.28.1 → 0.28.2
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 +12 -0
- package/dist/browser/index.js.map +2 -2
- package/dist/components/themeprovider/themeprovider.component.d.ts +8 -0
- package/dist/components/themeprovider/themeprovider.component.js +8 -0
- package/dist/components/themeprovider/themeprovider.styles.js +12 -0
- package/dist/custom-elements.json +21 -1
- package/dist/react/themeprovider/index.d.ts +8 -0
- package/dist/react/themeprovider/index.js +8 -0
- package/package.json +1 -1
@@ -24,6 +24,14 @@ import ThemeProviderContext from './themeprovider.context';
|
|
24
24
|
* @cssproperty --mdc-themeprovider-font-weight - Option to override the font weight, default: `400`
|
25
25
|
* @cssproperty --mdc-themeprovider-letter-spacing-adjustment - Option to override the default letter-spacing,
|
26
26
|
* default: `-0.25px` (this is to match the old CiscoSans)
|
27
|
+
* @cssproperty --mdc-themeprovider-font-feature-settings - Option to override the font feature settings,
|
28
|
+
* default: `normal`
|
29
|
+
* @cssproperty --mdc-themeprovider-scrollbar-track-color - Option to override the color of the scrollbar track.
|
30
|
+
* @cssproperty --mdc-themeprovider-scrollbar-thumb-color - Option to override the color of the scrollbar thumb.
|
31
|
+
* @cssproperty --mdc-themeprovider-scrollbar-thumb-hover-color - Option to override the color of the
|
32
|
+
* scrollbar thumb on hover. Applicable only on webkit browsers.
|
33
|
+
* @cssproperty --mdc-themeprovider-scrollbar-thumb-active-color - Option to override the color of the
|
34
|
+
* scrollbar thumb on press. Applicable only on webkit browsers.
|
27
35
|
*/
|
28
36
|
declare class ThemeProvider extends Provider<ThemeProviderContext> {
|
29
37
|
constructor();
|
@@ -35,6 +35,14 @@ import styles from './themeprovider.styles';
|
|
35
35
|
* @cssproperty --mdc-themeprovider-font-weight - Option to override the font weight, default: `400`
|
36
36
|
* @cssproperty --mdc-themeprovider-letter-spacing-adjustment - Option to override the default letter-spacing,
|
37
37
|
* default: `-0.25px` (this is to match the old CiscoSans)
|
38
|
+
* @cssproperty --mdc-themeprovider-font-feature-settings - Option to override the font feature settings,
|
39
|
+
* default: `normal`
|
40
|
+
* @cssproperty --mdc-themeprovider-scrollbar-track-color - Option to override the color of the scrollbar track.
|
41
|
+
* @cssproperty --mdc-themeprovider-scrollbar-thumb-color - Option to override the color of the scrollbar thumb.
|
42
|
+
* @cssproperty --mdc-themeprovider-scrollbar-thumb-hover-color - Option to override the color of the
|
43
|
+
* scrollbar thumb on hover. Applicable only on webkit browsers.
|
44
|
+
* @cssproperty --mdc-themeprovider-scrollbar-thumb-active-color - Option to override the color of the
|
45
|
+
* scrollbar thumb on press. Applicable only on webkit browsers.
|
38
46
|
*/
|
39
47
|
class ThemeProvider extends Provider {
|
40
48
|
constructor() {
|
@@ -9,6 +9,12 @@ const styles = css `
|
|
9
9
|
/* Adjusting font feature settings for accessibility reasons */
|
10
10
|
--mdc-themeprovider-font-feature-settings: "ss02" on;
|
11
11
|
|
12
|
+
/* Custom scrollbar variables */
|
13
|
+
--mdc-themeprovider-scrollbar-track-color: var(--mds-color-theme-background-secondary-normal);
|
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
|
+
|
12
18
|
color: var(--mdc-themeprovider-color-default);
|
13
19
|
font-family: var(--mdc-themeprovider-font-family);
|
14
20
|
font-weight: var(--mdc-themeprovider-font-weight);
|
@@ -16,5 +22,11 @@ const styles = css `
|
|
16
22
|
|
17
23
|
font-feature-settings: var(--mdc-themeprovider-font-feature-settings);
|
18
24
|
}
|
25
|
+
|
26
|
+
/** Scrollbar Theme for Chrome, Edge, and Firefox. This has limited support on other browsers.
|
27
|
+
https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-color for more details */
|
28
|
+
* {
|
29
|
+
scrollbar-color: var(--mdc-themeprovider-scrollbar-thumb-color) var(--mdc-themeprovider-scrollbar-track-color);
|
30
|
+
}
|
19
31
|
`;
|
20
32
|
export default [styles];
|
@@ -8685,6 +8685,26 @@
|
|
8685
8685
|
{
|
8686
8686
|
"description": "Option to override the default letter-spacing, default: `-0.25px` (this is to match the old CiscoSans)",
|
8687
8687
|
"name": "--mdc-themeprovider-letter-spacing-adjustment"
|
8688
|
+
},
|
8689
|
+
{
|
8690
|
+
"description": "Option to override the font feature settings, default: `normal`",
|
8691
|
+
"name": "--mdc-themeprovider-font-feature-settings"
|
8692
|
+
},
|
8693
|
+
{
|
8694
|
+
"description": "Option to override the color of the scrollbar track.",
|
8695
|
+
"name": "--mdc-themeprovider-scrollbar-track-color"
|
8696
|
+
},
|
8697
|
+
{
|
8698
|
+
"description": "Option to override the color of the scrollbar thumb.",
|
8699
|
+
"name": "--mdc-themeprovider-scrollbar-thumb-color"
|
8700
|
+
},
|
8701
|
+
{
|
8702
|
+
"description": "Option to override the color of the scrollbar thumb on hover. Applicable only on webkit browsers.",
|
8703
|
+
"name": "--mdc-themeprovider-scrollbar-thumb-hover-color"
|
8704
|
+
},
|
8705
|
+
{
|
8706
|
+
"description": "Option to override the color of the scrollbar thumb on press. Applicable only on webkit browsers.",
|
8707
|
+
"name": "--mdc-themeprovider-scrollbar-thumb-active-color"
|
8688
8708
|
}
|
8689
8709
|
],
|
8690
8710
|
"slots": [
|
@@ -8744,7 +8764,7 @@
|
|
8744
8764
|
"module": "/src/models"
|
8745
8765
|
},
|
8746
8766
|
"tagName": "mdc-themeprovider",
|
8747
|
-
"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 * 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 */",
|
8767
|
+
"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 * 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: `normal`\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 */",
|
8748
8768
|
"customElement": true
|
8749
8769
|
}
|
8750
8770
|
],
|
@@ -22,6 +22,14 @@ import Component from '../../components/themeprovider';
|
|
22
22
|
* @cssproperty --mdc-themeprovider-font-weight - Option to override the font weight, default: `400`
|
23
23
|
* @cssproperty --mdc-themeprovider-letter-spacing-adjustment - Option to override the default letter-spacing,
|
24
24
|
* default: `-0.25px` (this is to match the old CiscoSans)
|
25
|
+
* @cssproperty --mdc-themeprovider-font-feature-settings - Option to override the font feature settings,
|
26
|
+
* default: `normal`
|
27
|
+
* @cssproperty --mdc-themeprovider-scrollbar-track-color - Option to override the color of the scrollbar track.
|
28
|
+
* @cssproperty --mdc-themeprovider-scrollbar-thumb-color - Option to override the color of the scrollbar thumb.
|
29
|
+
* @cssproperty --mdc-themeprovider-scrollbar-thumb-hover-color - Option to override the color of the
|
30
|
+
* scrollbar thumb on hover. Applicable only on webkit browsers.
|
31
|
+
* @cssproperty --mdc-themeprovider-scrollbar-thumb-active-color - Option to override the color of the
|
32
|
+
* scrollbar thumb on press. Applicable only on webkit browsers.
|
25
33
|
*/
|
26
34
|
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
|
27
35
|
export default reactWrapper;
|
@@ -25,6 +25,14 @@ import { TAG_NAME } from '../../components/themeprovider/themeprovider.constants
|
|
25
25
|
* @cssproperty --mdc-themeprovider-font-weight - Option to override the font weight, default: `400`
|
26
26
|
* @cssproperty --mdc-themeprovider-letter-spacing-adjustment - Option to override the default letter-spacing,
|
27
27
|
* default: `-0.25px` (this is to match the old CiscoSans)
|
28
|
+
* @cssproperty --mdc-themeprovider-font-feature-settings - Option to override the font feature settings,
|
29
|
+
* default: `normal`
|
30
|
+
* @cssproperty --mdc-themeprovider-scrollbar-track-color - Option to override the color of the scrollbar track.
|
31
|
+
* @cssproperty --mdc-themeprovider-scrollbar-thumb-color - Option to override the color of the scrollbar thumb.
|
32
|
+
* @cssproperty --mdc-themeprovider-scrollbar-thumb-hover-color - Option to override the color of the
|
33
|
+
* scrollbar thumb on hover. Applicable only on webkit browsers.
|
34
|
+
* @cssproperty --mdc-themeprovider-scrollbar-thumb-active-color - Option to override the color of the
|
35
|
+
* scrollbar thumb on press. Applicable only on webkit browsers.
|
28
36
|
*/
|
29
37
|
const reactWrapper = createComponent({
|
30
38
|
tagName: TAG_NAME,
|
package/package.json
CHANGED