@momentum-design/components 0.127.4 → 0.127.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.
- package/dist/browser/index.js +211 -209
- package/dist/browser/index.js.map +4 -4
- package/dist/components/announcementdialog/announcementdialog.component.d.ts +3 -1
- package/dist/components/announcementdialog/announcementdialog.component.js +18 -8
- package/dist/components/banner/banner.component.d.ts +1 -0
- package/dist/components/banner/banner.component.js +6 -2
- package/dist/components/banner/banner.constants.d.ts +1 -1
- package/dist/components/banner/banner.constants.js +1 -1
- package/dist/components/banner/banner.styles.js +3 -4
- package/dist/components/dialog/dialog.component.d.ts +12 -1
- package/dist/components/dialog/dialog.component.js +27 -5
- package/dist/custom-elements.json +1417 -1409
- package/dist/react/banner/index.d.ts +1 -0
- package/dist/react/banner/index.js +1 -0
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +4 -4
- package/dist/utils/provider/index.d.ts +16 -5
- package/dist/utils/provider/index.js +11 -1
- package/package.json +1 -1
|
@@ -31,6 +31,7 @@ import Component from '../../components/banner';
|
|
|
31
31
|
*
|
|
32
32
|
* @cssproperty --mdc-banner-background-color - Background color of the banner.
|
|
33
33
|
* @cssproperty --mdc-banner-border-color - Border color of the banner.
|
|
34
|
+
* @cssproperty --mdc-banner-border-width - Border width of the banner.
|
|
34
35
|
* @cssproperty --mdc-banner-icon-color - Color of the icon in the banner.
|
|
35
36
|
* @cssproperty --mdc-banner-elevation - Elevation/shadow of the banner.
|
|
36
37
|
* @cssproperty --mdc-banner-padding - Padding inside the banner.
|
|
@@ -34,6 +34,7 @@ import { TAG_NAME } from '../../components/banner/banner.constants';
|
|
|
34
34
|
*
|
|
35
35
|
* @cssproperty --mdc-banner-background-color - Background color of the banner.
|
|
36
36
|
* @cssproperty --mdc-banner-border-color - Border color of the banner.
|
|
37
|
+
* @cssproperty --mdc-banner-border-width - Border width of the banner.
|
|
37
38
|
* @cssproperty --mdc-banner-icon-color - Color of the icon in the banner.
|
|
38
39
|
* @cssproperty --mdc-banner-elevation - Elevation/shadow of the banner.
|
|
39
40
|
* @cssproperty --mdc-banner-padding - Padding inside the banner.
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as Accordion } from './accordion';
|
|
2
|
-
export { default as AccordionGroup } from './accordiongroup';
|
|
3
2
|
export { default as AccordionButton } from './accordionbutton';
|
|
3
|
+
export { default as AccordionGroup } from './accordiongroup';
|
|
4
4
|
export { default as AlertChip } from './alertchip';
|
|
5
5
|
export { default as Animation } from './animation';
|
|
6
6
|
export { default as AnnouncementDialog } from './announcementdialog';
|
|
@@ -14,9 +14,9 @@ export { default as Bullet } from './bullet';
|
|
|
14
14
|
export { default as Button } from './button';
|
|
15
15
|
export { default as ButtonGroup } from './buttongroup';
|
|
16
16
|
export { default as ButtonLink } from './buttonlink';
|
|
17
|
-
export { default as Buttonsimple } from './buttonsimple';
|
|
18
|
-
export { default as Card } from './card';
|
|
19
17
|
export { default as CardButton } from './cardbutton';
|
|
18
|
+
export { default as Card } from './card';
|
|
19
|
+
export { default as Buttonsimple } from './buttonsimple';
|
|
20
20
|
export { default as CardCheckbox } from './cardcheckbox';
|
|
21
21
|
export { default as CardRadio } from './cardradio';
|
|
22
22
|
export { default as Checkbox } from './checkbox';
|
|
@@ -81,8 +81,8 @@ export { default as TabList } from './tablist';
|
|
|
81
81
|
export { default as Text } from './text';
|
|
82
82
|
export { default as Textarea } from './textarea';
|
|
83
83
|
export { default as ThemeProvider } from './themeprovider';
|
|
84
|
-
export { default as Toast } from './toast';
|
|
85
84
|
export { default as Toggle } from './toggle';
|
|
85
|
+
export { default as Toast } from './toast';
|
|
86
86
|
export { default as ToggleTip } from './toggletip';
|
|
87
87
|
export { default as Tooltip } from './tooltip';
|
|
88
88
|
export { default as Typewriter } from './typewriter';
|
package/dist/react/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as Accordion } from './accordion';
|
|
2
|
-
export { default as AccordionGroup } from './accordiongroup';
|
|
3
2
|
export { default as AccordionButton } from './accordionbutton';
|
|
3
|
+
export { default as AccordionGroup } from './accordiongroup';
|
|
4
4
|
export { default as AlertChip } from './alertchip';
|
|
5
5
|
export { default as Animation } from './animation';
|
|
6
6
|
export { default as AnnouncementDialog } from './announcementdialog';
|
|
@@ -14,9 +14,9 @@ export { default as Bullet } from './bullet';
|
|
|
14
14
|
export { default as Button } from './button';
|
|
15
15
|
export { default as ButtonGroup } from './buttongroup';
|
|
16
16
|
export { default as ButtonLink } from './buttonlink';
|
|
17
|
-
export { default as Buttonsimple } from './buttonsimple';
|
|
18
|
-
export { default as Card } from './card';
|
|
19
17
|
export { default as CardButton } from './cardbutton';
|
|
18
|
+
export { default as Card } from './card';
|
|
19
|
+
export { default as Buttonsimple } from './buttonsimple';
|
|
20
20
|
export { default as CardCheckbox } from './cardcheckbox';
|
|
21
21
|
export { default as CardRadio } from './cardradio';
|
|
22
22
|
export { default as Checkbox } from './checkbox';
|
|
@@ -81,8 +81,8 @@ export { default as TabList } from './tablist';
|
|
|
81
81
|
export { default as Text } from './text';
|
|
82
82
|
export { default as Textarea } from './textarea';
|
|
83
83
|
export { default as ThemeProvider } from './themeprovider';
|
|
84
|
-
export { default as Toast } from './toast';
|
|
85
84
|
export { default as Toggle } from './toggle';
|
|
85
|
+
export { default as Toast } from './toast';
|
|
86
86
|
export { default as ToggleTip } from './toggletip';
|
|
87
87
|
export { default as Tooltip } from './tooltip';
|
|
88
88
|
export { default as Typewriter } from './typewriter';
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
type
|
|
1
|
+
import type { ReactiveElement } from 'lit';
|
|
2
|
+
import { type Context, ContextConsumer } from '@lit/context';
|
|
3
|
+
import type { Options } from '@lit/context/lib/controllers/context-consumer';
|
|
4
|
+
type ConsumeOptions<C extends Context<unknown, unknown>> = Options<C> & {
|
|
4
5
|
host: ReactiveElement;
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* List of properties which need update when context changes
|
|
8
|
+
*
|
|
9
|
+
* For example a property getter depends on the context value and the property must be reflected to attribute.
|
|
10
|
+
*
|
|
11
|
+
* Background: Lit does not track dependencies between context consumers and properties, so
|
|
12
|
+
* we need to manually request an update for those properties.
|
|
13
|
+
*
|
|
14
|
+
* You can do it in the `updated` lifecycle method as well, but it will trigger an extra update cycle.
|
|
15
|
+
* While this approach will batch the updates with the context update cycle (which happens anyway).
|
|
16
|
+
*/
|
|
17
|
+
syncProperties?: string[];
|
|
7
18
|
};
|
|
8
19
|
declare const providerUtils: {
|
|
9
20
|
consume: <C extends Context<unknown, unknown>>(options: ConsumeOptions<C>) => ContextConsumer<C, ReactiveElement>;
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import { ContextConsumer } from '@lit/context';
|
|
2
2
|
const consume = (options) => {
|
|
3
|
-
const { host, context, subscribe } = options;
|
|
3
|
+
const { host, context, subscribe, callback, syncProperties } = options;
|
|
4
|
+
const contextCallback = (callback || syncProperties) &&
|
|
5
|
+
((value) => {
|
|
6
|
+
if (syncProperties) {
|
|
7
|
+
syncProperties.forEach(prop => {
|
|
8
|
+
host.requestUpdate(prop);
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
callback === null || callback === void 0 ? void 0 : callback(value);
|
|
12
|
+
});
|
|
4
13
|
return new ContextConsumer(host, {
|
|
5
14
|
context,
|
|
15
|
+
callback: contextCallback,
|
|
6
16
|
subscribe: subscribe !== null && subscribe !== void 0 ? subscribe : true,
|
|
7
17
|
});
|
|
8
18
|
};
|