@momentum-design/components 0.122.19 → 0.122.20
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 +16 -2
- package/dist/browser/index.js.map +2 -2
- package/dist/components/badge/badge.component.d.ts +2 -0
- package/dist/components/badge/badge.component.js +2 -0
- package/dist/components/badge/badge.styles.js +5 -2
- package/dist/components/navmenuitem/navmenuitem.styles.js +11 -0
- package/dist/custom-elements.json +9 -1
- package/dist/react/badge/index.d.ts +2 -0
- package/dist/react/badge/index.js +2 -0
- package/package.json +1 -1
|
@@ -35,6 +35,8 @@ declare const Badge_base: import("../../utils/mixins/index.types").Constructor<i
|
|
|
35
35
|
* @cssproperty --mdc-badge-error-foreground-color - The foreground color of the error badge.
|
|
36
36
|
* @cssproperty --mdc-badge-error-background-color - The background color of the error badge.
|
|
37
37
|
* @cssproperty --mdc-badge-overlay-background-color - The background color of the badge overlay.
|
|
38
|
+
* @cssproperty --mdc-badge-dot-width - The width of the dot badge. Default is 0.75rem (12px).
|
|
39
|
+
* @cssproperty --mdc-badge-dot-height - The height of the dot badge. Default is 0.75rem (12px).
|
|
38
40
|
*
|
|
39
41
|
* @csspart badge-dot - The dot notification badge.
|
|
40
42
|
* @csspart badge-icon - The icon badge.
|
|
@@ -49,6 +49,8 @@ import styles from './badge.styles';
|
|
|
49
49
|
* @cssproperty --mdc-badge-error-foreground-color - The foreground color of the error badge.
|
|
50
50
|
* @cssproperty --mdc-badge-error-background-color - The background color of the error badge.
|
|
51
51
|
* @cssproperty --mdc-badge-overlay-background-color - The background color of the badge overlay.
|
|
52
|
+
* @cssproperty --mdc-badge-dot-width - The width of the dot badge. Default is 0.75rem (12px).
|
|
53
|
+
* @cssproperty --mdc-badge-dot-height - The height of the dot badge. Default is 0.75rem (12px).
|
|
52
54
|
*
|
|
53
55
|
* @csspart badge-dot - The dot notification badge.
|
|
54
56
|
* @csspart badge-icon - The icon badge.
|
|
@@ -21,6 +21,9 @@ const styles = [
|
|
|
21
21
|
|
|
22
22
|
--mdc-badge-overlay-background-color: var(--mds-color-theme-background-solid-primary-normal);
|
|
23
23
|
|
|
24
|
+
--mdc-badge-dot-width: 0.75rem;
|
|
25
|
+
--mdc-badge-dot-height: 0.75rem;
|
|
26
|
+
|
|
24
27
|
color: var(--mdc-badge-primary-foreground-color);
|
|
25
28
|
}
|
|
26
29
|
:host::part(badge-overlay) {
|
|
@@ -35,8 +38,8 @@ const styles = [
|
|
|
35
38
|
background-color: var(--mdc-badge-primary-background-color);
|
|
36
39
|
}
|
|
37
40
|
:host::part(badge-dot) {
|
|
38
|
-
width:
|
|
39
|
-
height:
|
|
41
|
+
width: var(--mdc-badge-dot-width);
|
|
42
|
+
height: var(--mdc-badge-dot-height);
|
|
40
43
|
border-radius: 50%;
|
|
41
44
|
background-color: var(--mdc-badge-primary-background-color);
|
|
42
45
|
}
|
|
@@ -147,6 +147,17 @@ const styles = [
|
|
|
147
147
|
left: -0.75rem;
|
|
148
148
|
top: 0.875rem;
|
|
149
149
|
}
|
|
150
|
+
|
|
151
|
+
:host mdc-badge {
|
|
152
|
+
--mdc-badge-dot-width: 1rem;
|
|
153
|
+
--mdc-badge-dot-height: 1rem;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@media (forced-colors: active) {
|
|
157
|
+
:host(:not([in-menupopover]))::before {
|
|
158
|
+
background-color: ButtonText;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
150
161
|
`,
|
|
151
162
|
...hostFocusRingStyles(),
|
|
152
163
|
];
|
|
@@ -4389,6 +4389,14 @@
|
|
|
4389
4389
|
{
|
|
4390
4390
|
"description": "The background color of the badge overlay.",
|
|
4391
4391
|
"name": "--mdc-badge-overlay-background-color"
|
|
4392
|
+
},
|
|
4393
|
+
{
|
|
4394
|
+
"description": "The width of the dot badge. Default is 0.75rem (12px).",
|
|
4395
|
+
"name": "--mdc-badge-dot-width"
|
|
4396
|
+
},
|
|
4397
|
+
{
|
|
4398
|
+
"description": "The height of the dot badge. Default is 0.75rem (12px).",
|
|
4399
|
+
"name": "--mdc-badge-dot-height"
|
|
4392
4400
|
}
|
|
4393
4401
|
],
|
|
4394
4402
|
"cssParts": [
|
|
@@ -4654,7 +4662,7 @@
|
|
|
4654
4662
|
"module": "/src/models"
|
|
4655
4663
|
},
|
|
4656
4664
|
"tagName": "mdc-badge",
|
|
4657
|
-
"jsDoc": "/**\n * The `mdc-badge` component is a versatile UI element used to\n * display dot, icons, counters, success, warning and error type badge.\n *\n * Supported badge types:\n * - `dot`: Displays a dot notification badge with a blue color.\n * - `icon`: Displays a badge with a specified icon using the `icon-name` attribute.\n * - `counter`: Displays a badge with a counter value. If the counter exceeds the `max-counter`,\n * it shows `maxCounter+`. The maximum value of the counter is 999 and anything above that will be set to `999+`.\n * - `success`: Displays a success badge with a check circle icon and green color.\n * - `warning`: Displays a warning badge with a warning icon and yellow color.\n * - `error`: Displays a error badge with a error legacy icon and red color.\n *\n * For `icon`, `success`, `warning` and `error` types, the `mdc-icon` component is used to render the icon.\n *\n * For the `counter` type, the `mdc-text` component is used to render the counter value.\n *\n * @dependency mdc-icon\n * @dependency mdc-text\n *\n * @tagname mdc-badge\n *\n * @cssproperty --mdc-badge-primary-foreground-color - The foreground color of the primary badge.\n * @cssproperty --mdc-badge-primary-background-color - The background color of the primary badge.\n * @cssproperty --mdc-badge-secondary-foreground-color - The foreground color of the secondary badge.\n * @cssproperty --mdc-badge-secondary-background-color - The background color of the secondary badge.\n * @cssproperty --mdc-badge-success-foreground-color - The foreground color of the success badge.\n * @cssproperty --mdc-badge-success-background-color - The background color of the success badge.\n * @cssproperty --mdc-badge-warning-foreground-color - The foreground color of the warning badge.\n * @cssproperty --mdc-badge-warning-background-color - The background color of the warning badge.\n * @cssproperty --mdc-badge-error-foreground-color - The foreground color of the error badge.\n * @cssproperty --mdc-badge-error-background-color - The background color of the error badge.\n * @cssproperty --mdc-badge-overlay-background-color - The background color of the badge overlay.\n *\n * @csspart badge-dot - The dot notification badge.\n * @csspart badge-icon - The icon badge.\n * @csspart badge-overlay - The overlay badge.\n * @csspart badge-text - The text badge.\n */",
|
|
4665
|
+
"jsDoc": "/**\n * The `mdc-badge` component is a versatile UI element used to\n * display dot, icons, counters, success, warning and error type badge.\n *\n * Supported badge types:\n * - `dot`: Displays a dot notification badge with a blue color.\n * - `icon`: Displays a badge with a specified icon using the `icon-name` attribute.\n * - `counter`: Displays a badge with a counter value. If the counter exceeds the `max-counter`,\n * it shows `maxCounter+`. The maximum value of the counter is 999 and anything above that will be set to `999+`.\n * - `success`: Displays a success badge with a check circle icon and green color.\n * - `warning`: Displays a warning badge with a warning icon and yellow color.\n * - `error`: Displays a error badge with a error legacy icon and red color.\n *\n * For `icon`, `success`, `warning` and `error` types, the `mdc-icon` component is used to render the icon.\n *\n * For the `counter` type, the `mdc-text` component is used to render the counter value.\n *\n * @dependency mdc-icon\n * @dependency mdc-text\n *\n * @tagname mdc-badge\n *\n * @cssproperty --mdc-badge-primary-foreground-color - The foreground color of the primary badge.\n * @cssproperty --mdc-badge-primary-background-color - The background color of the primary badge.\n * @cssproperty --mdc-badge-secondary-foreground-color - The foreground color of the secondary badge.\n * @cssproperty --mdc-badge-secondary-background-color - The background color of the secondary badge.\n * @cssproperty --mdc-badge-success-foreground-color - The foreground color of the success badge.\n * @cssproperty --mdc-badge-success-background-color - The background color of the success badge.\n * @cssproperty --mdc-badge-warning-foreground-color - The foreground color of the warning badge.\n * @cssproperty --mdc-badge-warning-background-color - The background color of the warning badge.\n * @cssproperty --mdc-badge-error-foreground-color - The foreground color of the error badge.\n * @cssproperty --mdc-badge-error-background-color - The background color of the error badge.\n * @cssproperty --mdc-badge-overlay-background-color - The background color of the badge overlay.\n * @cssproperty --mdc-badge-dot-width - The width of the dot badge. Default is 0.75rem (12px).\n * @cssproperty --mdc-badge-dot-height - The height of the dot badge. Default is 0.75rem (12px).\n *\n * @csspart badge-dot - The dot notification badge.\n * @csspart badge-icon - The icon badge.\n * @csspart badge-overlay - The overlay badge.\n * @csspart badge-text - The text badge.\n */",
|
|
4658
4666
|
"customElement": true
|
|
4659
4667
|
}
|
|
4660
4668
|
],
|
|
@@ -32,6 +32,8 @@ import Component from '../../components/badge';
|
|
|
32
32
|
* @cssproperty --mdc-badge-error-foreground-color - The foreground color of the error badge.
|
|
33
33
|
* @cssproperty --mdc-badge-error-background-color - The background color of the error badge.
|
|
34
34
|
* @cssproperty --mdc-badge-overlay-background-color - The background color of the badge overlay.
|
|
35
|
+
* @cssproperty --mdc-badge-dot-width - The width of the dot badge. Default is 0.75rem (12px).
|
|
36
|
+
* @cssproperty --mdc-badge-dot-height - The height of the dot badge. Default is 0.75rem (12px).
|
|
35
37
|
*
|
|
36
38
|
* @csspart badge-dot - The dot notification badge.
|
|
37
39
|
* @csspart badge-icon - The icon badge.
|
|
@@ -35,6 +35,8 @@ import { TAG_NAME } from '../../components/badge/badge.constants';
|
|
|
35
35
|
* @cssproperty --mdc-badge-error-foreground-color - The foreground color of the error badge.
|
|
36
36
|
* @cssproperty --mdc-badge-error-background-color - The background color of the error badge.
|
|
37
37
|
* @cssproperty --mdc-badge-overlay-background-color - The background color of the badge overlay.
|
|
38
|
+
* @cssproperty --mdc-badge-dot-width - The width of the dot badge. Default is 0.75rem (12px).
|
|
39
|
+
* @cssproperty --mdc-badge-dot-height - The height of the dot badge. Default is 0.75rem (12px).
|
|
38
40
|
*
|
|
39
41
|
* @csspart badge-dot - The dot notification badge.
|
|
40
42
|
* @csspart badge-icon - The icon badge.
|