@momentum-design/components 0.1.12 → 0.1.14
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 -7
- package/dist/browser/index.js.map +2 -2
- package/dist/components/iconprovider/iconprovider.component.d.ts +5 -0
- package/dist/components/iconprovider/iconprovider.component.js +5 -0
- package/dist/components/themeprovider/themeprovider.component.d.ts +7 -2
- package/dist/components/themeprovider/themeprovider.component.js +7 -2
- package/dist/components/themeprovider/themeprovider.styles.js +7 -3
- package/dist/custom-elements.json +20 -5
- package/dist/react/iconprovider/index.d.ts +2 -0
- package/dist/react/iconprovider/index.js +2 -0
- package/dist/react/themeprovider/index.d.ts +7 -2
- package/dist/react/themeprovider/index.js +7 -2
- package/package.json +1 -1
@@ -9,9 +9,14 @@ import IconProviderContext from './iconprovider.context';
|
|
9
9
|
* fetched.
|
10
10
|
*
|
11
11
|
* @tagname mdc-iconprovider
|
12
|
+
*
|
13
|
+
* @slot default - children
|
12
14
|
*/
|
13
15
|
declare class IconProvider extends Provider<IconProviderContext> {
|
14
16
|
constructor();
|
17
|
+
/**
|
18
|
+
* Context object of the IconProvider, to be consumed by child components
|
19
|
+
*/
|
15
20
|
static get Context(): {
|
16
21
|
__context__: IconProviderContext;
|
17
22
|
};
|
@@ -14,6 +14,8 @@ const iconprovider_constants_1 = require("./iconprovider.constants");
|
|
14
14
|
* fetched.
|
15
15
|
*
|
16
16
|
* @tagname mdc-iconprovider
|
17
|
+
*
|
18
|
+
* @slot default - children
|
17
19
|
*/
|
18
20
|
class IconProvider extends models_1.Provider {
|
19
21
|
constructor() {
|
@@ -36,6 +38,9 @@ class IconProvider extends models_1.Provider {
|
|
36
38
|
*/
|
37
39
|
this.size = iconprovider_constants_1.DEFAULTS.LENGTH_UNIT_SIZE[iconprovider_constants_1.DEFAULTS.LENGTH_UNIT];
|
38
40
|
}
|
41
|
+
/**
|
42
|
+
* Context object of the IconProvider, to be consumed by child components
|
43
|
+
*/
|
39
44
|
static get Context() {
|
40
45
|
return iconprovider_context_1.default.context;
|
41
46
|
}
|
@@ -17,8 +17,13 @@ import ThemeProviderContext from './themeprovider.context';
|
|
17
17
|
*
|
18
18
|
* @slot default - children
|
19
19
|
*
|
20
|
-
* @cssproperty --mdc-themeprovider-
|
21
|
-
*
|
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-
|
26
|
-
*
|
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;
|
@@ -436,12 +436,19 @@
|
|
436
436
|
"kind": "class",
|
437
437
|
"description": "IconProvider component, which allows to be consumed from sub components\n(see `providerUtils.consume` for how to consume)\n\nBundling icons will be up to the consumer of this component, such\nthat only a url has to be passed in from which the icons will be\nfetched.",
|
438
438
|
"name": "IconProvider",
|
439
|
+
"slots": [
|
440
|
+
{
|
441
|
+
"description": "children",
|
442
|
+
"name": "default"
|
443
|
+
}
|
444
|
+
],
|
439
445
|
"members": [
|
440
446
|
{
|
441
447
|
"kind": "field",
|
442
448
|
"name": "Context",
|
443
449
|
"privacy": "public",
|
444
450
|
"static": true,
|
451
|
+
"description": "Context object of the IconProvider, to be consumed by child components",
|
445
452
|
"readonly": true
|
446
453
|
},
|
447
454
|
{
|
@@ -540,7 +547,7 @@
|
|
540
547
|
"module": "/src/models"
|
541
548
|
},
|
542
549
|
"tagName": "mdc-iconprovider",
|
543
|
-
"jsDoc": "/**\n * IconProvider component, which allows to be consumed from sub components\n * (see `providerUtils.consume` for how to consume)\n *\n * Bundling icons will be up to the consumer of this component, such\n * that only a url has to be passed in from which the icons will be\n * fetched.\n *\n * @tagname mdc-iconprovider\n */",
|
550
|
+
"jsDoc": "/**\n * IconProvider component, which allows to be consumed from sub components\n * (see `providerUtils.consume` for how to consume)\n *\n * Bundling icons will be up to the consumer of this component, such\n * that only a url has to be passed in from which the icons will be\n * fetched.\n *\n * @tagname mdc-iconprovider\n *\n * @slot default - children\n */",
|
544
551
|
"customElement": true
|
545
552
|
}
|
546
553
|
],
|
@@ -626,12 +633,20 @@
|
|
626
633
|
"name": "ThemeProvider",
|
627
634
|
"cssProperties": [
|
628
635
|
{
|
629
|
-
"description": "Option to override the
|
636
|
+
"description": "Option to override the default color, default: color-theme-text-primary-normal",
|
637
|
+
"name": "--mdc-themeprovider-color-default"
|
638
|
+
},
|
639
|
+
{
|
640
|
+
"description": "Option to override the font family, default: `Momentum` (from momentum-design/fonts)",
|
630
641
|
"name": "--mdc-themeprovider-font-family"
|
631
642
|
},
|
632
643
|
{
|
633
|
-
"description": "Option to override the default
|
634
|
-
"name": "--mdc-themeprovider-
|
644
|
+
"description": "Option to override the font weight, default: `400`",
|
645
|
+
"name": "--mdc-themeprovider-font-weight"
|
646
|
+
},
|
647
|
+
{
|
648
|
+
"description": "Option to override the default letter-spacing, default: `-0.25px` (this is to match the old CiscoSans)",
|
649
|
+
"name": "--mdc-themeprovider-letter-spacing-adjustment"
|
635
650
|
}
|
636
651
|
],
|
637
652
|
"slots": [
|
@@ -691,7 +706,7 @@
|
|
691
706
|
"module": "/src/models"
|
692
707
|
},
|
693
708
|
"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-
|
709
|
+
"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
710
|
"customElement": true
|
696
711
|
}
|
697
712
|
],
|
@@ -14,6 +14,8 @@ const iconprovider_constants_1 = require("../../components/iconprovider/iconprov
|
|
14
14
|
* fetched.
|
15
15
|
*
|
16
16
|
* @tagname mdc-iconprovider
|
17
|
+
*
|
18
|
+
* @slot default - children
|
17
19
|
*/
|
18
20
|
const reactWrapper = (0, react_1.createComponent)({
|
19
21
|
tagName: iconprovider_constants_1.TAG_NAME,
|
@@ -15,8 +15,13 @@ import Component from '../../components/themeprovider';
|
|
15
15
|
*
|
16
16
|
* @slot default - children
|
17
17
|
*
|
18
|
-
* @cssproperty --mdc-themeprovider-
|
19
|
-
*
|
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-
|
25
|
-
*
|
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