@momentum-design/components 0.1.11 → 0.1.13

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.
@@ -17,8 +17,13 @@ import ThemeProviderContext from './themeprovider.context';
17
17
  *
18
18
  * @slot default - children
19
19
  *
20
- * @cssproperty --mdc-themeprovider-font-family - Option to override the font family
21
- * @cssproperty --mdc-themeprovider-color-default - Option to override the default color
20
+ * @cssproperty --mdc-themeprovider-color-default - Option to override the default color,
21
+ * default: color-theme-text-primary-normal
22
+ * @cssproperty --mdc-themeprovider-font-family - Option to override the font family,
23
+ * default: `Momentum` (from momentum-design/fonts)
24
+ * @cssproperty --mdc-themeprovider-font-weight - Option to override the font weight, default: `400`
25
+ * @cssproperty --mdc-themeprovider-letter-spacing-adjustment - Option to override the default letter-spacing,
26
+ * default: `-0.25px` (this is to match the old CiscoSans)
22
27
  */
23
28
  declare class ThemeProvider extends Provider<ThemeProviderContext> {
24
29
  constructor();
@@ -22,8 +22,13 @@ const themeprovider_styles_1 = tslib_1.__importDefault(require("./themeprovider.
22
22
  *
23
23
  * @slot default - children
24
24
  *
25
- * @cssproperty --mdc-themeprovider-font-family - Option to override the font family
26
- * @cssproperty --mdc-themeprovider-color-default - Option to override the default color
25
+ * @cssproperty --mdc-themeprovider-color-default - Option to override the default color,
26
+ * default: color-theme-text-primary-normal
27
+ * @cssproperty --mdc-themeprovider-font-family - Option to override the font family,
28
+ * default: `Momentum` (from momentum-design/fonts)
29
+ * @cssproperty --mdc-themeprovider-font-weight - Option to override the font weight, default: `400`
30
+ * @cssproperty --mdc-themeprovider-letter-spacing-adjustment - Option to override the default letter-spacing,
31
+ * default: `-0.25px` (this is to match the old CiscoSans)
27
32
  */
28
33
  class ThemeProvider extends models_1.Provider {
29
34
  constructor() {
@@ -1,14 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const lit_1 = require("lit");
4
- // todo: use type tokens once the full set with fallbacks is available
5
4
  const styles = (0, lit_1.css) `
6
5
  :host {
7
- --mdc-themeprovider-font-family: var(--mds-font-family-primary);
8
6
  --mdc-themeprovider-color-default: var(--mds-color-theme-text-primary-normal);
7
+ --mdc-themeprovider-font-family: var(--mds-font-family-primary);
8
+ --mdc-themeprovider-font-weight: 400;
9
+ /* adjusting Inter's letter spacing to better match the old CiscoSans */
10
+ --mdc-themeprovider-letter-spacing-adjustment: -0.25px;
9
11
 
10
- font-family: var(--mdc-themeprovider-font-family);
11
12
  color: var(--mdc-themeprovider-color-default);
13
+ font-family: var(--mdc-themeprovider-font-family);
14
+ font-weight: var(--mdc-themeprovider-font-weight);
15
+ letter-spacing: var(--mdc-themeprovider-letter-spacing-adjustment);
12
16
  }
13
17
  `;
14
18
  exports.default = styles;
@@ -626,12 +626,20 @@
626
626
  "name": "ThemeProvider",
627
627
  "cssProperties": [
628
628
  {
629
- "description": "Option to override the font family",
629
+ "description": "Option to override the default color, default: color-theme-text-primary-normal",
630
+ "name": "--mdc-themeprovider-color-default"
631
+ },
632
+ {
633
+ "description": "Option to override the font family, default: `Momentum` (from momentum-design/fonts)",
630
634
  "name": "--mdc-themeprovider-font-family"
631
635
  },
632
636
  {
633
- "description": "Option to override the default color",
634
- "name": "--mdc-themeprovider-color-default"
637
+ "description": "Option to override the font weight, default: `400`",
638
+ "name": "--mdc-themeprovider-font-weight"
639
+ },
640
+ {
641
+ "description": "Option to override the default letter-spacing, default: `-0.25px` (this is to match the old CiscoSans)",
642
+ "name": "--mdc-themeprovider-letter-spacing-adjustment"
635
643
  }
636
644
  ],
637
645
  "slots": [
@@ -691,7 +699,7 @@
691
699
  "module": "/src/models"
692
700
  },
693
701
  "tagName": "mdc-themeprovider",
694
- "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 default - children\n *\n * @cssproperty --mdc-themeprovider-font-family - Option to override the font family\n * @cssproperty --mdc-themeprovider-color-default - Option to override the default color\n */",
702
+ "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 default - 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 */",
695
703
  "customElement": true
696
704
  }
697
705
  ],
@@ -15,8 +15,13 @@ import Component from '../../components/themeprovider';
15
15
  *
16
16
  * @slot default - children
17
17
  *
18
- * @cssproperty --mdc-themeprovider-font-family - Option to override the font family
19
- * @cssproperty --mdc-themeprovider-color-default - Option to override the default color
18
+ * @cssproperty --mdc-themeprovider-color-default - Option to override the default color,
19
+ * default: color-theme-text-primary-normal
20
+ * @cssproperty --mdc-themeprovider-font-family - Option to override the font family,
21
+ * default: `Momentum` (from momentum-design/fonts)
22
+ * @cssproperty --mdc-themeprovider-font-weight - Option to override the font weight, default: `400`
23
+ * @cssproperty --mdc-themeprovider-letter-spacing-adjustment - Option to override the default letter-spacing,
24
+ * default: `-0.25px` (this is to match the old CiscoSans)
20
25
  */
21
26
  declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
22
27
  export default reactWrapper;
@@ -21,8 +21,13 @@ const themeprovider_constants_1 = require("../../components/themeprovider/themep
21
21
  *
22
22
  * @slot default - children
23
23
  *
24
- * @cssproperty --mdc-themeprovider-font-family - Option to override the font family
25
- * @cssproperty --mdc-themeprovider-color-default - Option to override the default color
24
+ * @cssproperty --mdc-themeprovider-color-default - Option to override the default color,
25
+ * default: color-theme-text-primary-normal
26
+ * @cssproperty --mdc-themeprovider-font-family - Option to override the font family,
27
+ * default: `Momentum` (from momentum-design/fonts)
28
+ * @cssproperty --mdc-themeprovider-font-weight - Option to override the font weight, default: `400`
29
+ * @cssproperty --mdc-themeprovider-letter-spacing-adjustment - Option to override the default letter-spacing,
30
+ * default: `-0.25px` (this is to match the old CiscoSans)
26
31
  */
27
32
  const reactWrapper = (0, react_1.createComponent)({
28
33
  tagName: themeprovider_constants_1.TAG_NAME,
package/package.json CHANGED
@@ -37,5 +37,5 @@
37
37
  "@momentum-design/icons": "*",
38
38
  "@momentum-design/tokens": "*"
39
39
  },
40
- "version": "0.1.11"
40
+ "version": "0.1.13"
41
41
  }