@momentum-design/components 0.54.2 → 0.55.0

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/index.d.ts CHANGED
@@ -40,6 +40,7 @@ import Textarea from './components/textarea';
40
40
  import ThemeProvider from './components/themeprovider';
41
41
  import Toggle from './components/toggle';
42
42
  import Tooltip from './components/tooltip';
43
+ import ToggleTip from './components/toggletip';
43
44
  import VirtualizedList from './components/virtualizedlist';
44
45
  import TabList from './components/tablist';
45
46
  import type { BadgeType } from './components/badge/badge.types';
@@ -49,6 +50,6 @@ import type { SpinnerSize, SpinnerVariant } from './components/spinner/spinner.t
49
50
  import type { TextType } from './components/text/text.types';
50
51
  import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
51
52
  import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES } from './components/button/button.constants';
52
- export { AlertChip, Avatar, AvatarButton, Badge, Bullet, Button, Checkbox, Chip, Coachmark, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Input, InputChip, Link, List, ListItem, Marker, Popover, Presence, Radio, RadioGroup, Spinner, Tab, Text, ThemeProvider, Toggle, VirtualizedList, Option, OptGroup, Progressbar, ScreenreaderAnnouncer, StaticCheckbox, StaticRadio, Textarea, Tooltip, Searchfield, Brandvisual, Appheader, Select, TabList, Progressspinner, };
53
+ export { AlertChip, Avatar, AvatarButton, Badge, Bullet, Button, Checkbox, Chip, Coachmark, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Input, InputChip, Link, List, ListItem, Marker, Popover, Presence, Radio, RadioGroup, Spinner, Tab, Text, ThemeProvider, Toggle, VirtualizedList, Option, OptGroup, Progressbar, ScreenreaderAnnouncer, StaticCheckbox, StaticRadio, Textarea, ToggleTip, Tooltip, Searchfield, Brandvisual, Appheader, Select, TabList, Progressspinner, };
53
54
  export type { TextType, SpinnerSize, SpinnerVariant, PopoverPlacement, BadgeType, IconButtonSize, PillButtonSize, ButtonVariant, ButtonColor, };
54
55
  export { inMemoryCache, webAPIIconsCache, BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES };
package/dist/index.js CHANGED
@@ -41,12 +41,13 @@ import Textarea from './components/textarea';
41
41
  import ThemeProvider from './components/themeprovider';
42
42
  import Toggle from './components/toggle';
43
43
  import Tooltip from './components/tooltip';
44
+ import ToggleTip from './components/toggletip';
44
45
  import VirtualizedList from './components/virtualizedlist';
45
46
  import TabList from './components/tablist';
46
47
  import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
47
48
  // Constants / Utils Imports
48
49
  import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES, } from './components/button/button.constants';
49
50
  // Components Exports
50
- export { AlertChip, Avatar, AvatarButton, Badge, Bullet, Button, Checkbox, Chip, Coachmark, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Input, InputChip, Link, List, ListItem, Marker, Popover, Presence, Radio, RadioGroup, Spinner, Tab, Text, ThemeProvider, Toggle, VirtualizedList, Option, OptGroup, Progressbar, ScreenreaderAnnouncer, StaticCheckbox, StaticRadio, Textarea, Tooltip, Searchfield, Brandvisual, Appheader, Select, TabList, Progressspinner, };
51
+ export { AlertChip, Avatar, AvatarButton, Badge, Bullet, Button, Checkbox, Chip, Coachmark, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Input, InputChip, Link, List, ListItem, Marker, Popover, Presence, Radio, RadioGroup, Spinner, Tab, Text, ThemeProvider, Toggle, VirtualizedList, Option, OptGroup, Progressbar, ScreenreaderAnnouncer, StaticCheckbox, StaticRadio, Textarea, ToggleTip, Tooltip, Searchfield, Brandvisual, Appheader, Select, TabList, Progressspinner, };
51
52
  // Constants / Utils Exports
52
53
  export { inMemoryCache, webAPIIconsCache, BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES };
@@ -1,6 +1,6 @@
1
+ export { default as AlertChip } from './alertchip';
1
2
  export { default as Appheader } from './appheader';
2
3
  export { default as Avatar } from './avatar';
3
- export { default as AlertChip } from './alertchip';
4
4
  export { default as AvatarButton } from './avatarbutton';
5
5
  export { default as Badge } from './badge';
6
6
  export { default as Brandvisual } from './brandvisual';
@@ -42,5 +42,6 @@ export { default as Text } from './text';
42
42
  export { default as Textarea } from './textarea';
43
43
  export { default as ThemeProvider } from './themeprovider';
44
44
  export { default as Toggle } from './toggle';
45
+ export { default as ToggleTip } from './toggletip';
45
46
  export { default as Tooltip } from './tooltip';
46
47
  export { default as VirtualizedList } from './virtualizedlist';
@@ -1,6 +1,6 @@
1
+ export { default as AlertChip } from './alertchip';
1
2
  export { default as Appheader } from './appheader';
2
3
  export { default as Avatar } from './avatar';
3
- export { default as AlertChip } from './alertchip';
4
4
  export { default as AvatarButton } from './avatarbutton';
5
5
  export { default as Badge } from './badge';
6
6
  export { default as Brandvisual } from './brandvisual';
@@ -42,5 +42,6 @@ export { default as Text } from './text';
42
42
  export { default as Textarea } from './textarea';
43
43
  export { default as ThemeProvider } from './themeprovider';
44
44
  export { default as Toggle } from './toggle';
45
+ export { default as ToggleTip } from './toggletip';
45
46
  export { default as Tooltip } from './tooltip';
46
47
  export { default as VirtualizedList } from './virtualizedlist';
@@ -0,0 +1,44 @@
1
+ import { type EventName } from '@lit/react';
2
+ import Component from '../../components/toggletip';
3
+ /**
4
+ * A toggletip is triggered by clicking a trigger element.
5
+ *
6
+ * It can contain interactive content and can be closed by
7
+ * clicking outside the toggletip or pressing the escape key.
8
+ *
9
+ * It can have optional close button to close the toggletip.
10
+ *
11
+ * Toggletip component uses `mdc-screenreaderannouncer` internally to
12
+ * announce the toggletip text content with screen readers when the toggletip is shown.
13
+ *
14
+ * `screenreader-announcer-identity` attribute can be used to provide ID of an element
15
+ * in DOM to which announcement elements are added. If not set, a visually hidden
16
+ * div element is created in DOM to which announcement elements are added.
17
+ *
18
+ * Please refer to the `mdc-screenreaderannouncer` component for more details.
19
+ *
20
+ * @dependency mdc-screenreaderannouncer
21
+ * @dependency mdc-button
22
+ *
23
+ * @tagname mdc-toggletip
24
+ *
25
+ * @event shown - (React: onShown) This event is dispatched when the toggletip is shown
26
+ * @event hidden - (React: onHidden) This event is dispatched when the toggletip is hidden
27
+ * @event created - (React: onCreated) This event is dispatched when the toggletip is created (added to the DOM)
28
+ * @event destroyed - (React: onDestroyed) This event is dispatched when the toggletip
29
+ * is destroyed (removed from the DOM)
30
+ *
31
+ * @cssproperty --mdc-toggletip-max-width - The maximum width of the toggletip.
32
+ * @cssproperty --mdc-toggletip-text-color - The text color of the toggletip.
33
+ * @cssproperty --mdc-toggletip-text-color-contrast - The text color of the toggletip
34
+ * when the color is contrast.
35
+ *
36
+ * @slot - Default slot for the toggletip content
37
+ */
38
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
39
+ onShown: EventName<Event>;
40
+ onHidden: EventName<Event>;
41
+ onCreated: EventName<Event>;
42
+ onDestroyed: EventName<Event>;
43
+ }>;
44
+ export default reactWrapper;
@@ -0,0 +1,52 @@
1
+ import * as React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import Component from '../../components/toggletip';
4
+ import { TAG_NAME } from '../../components/toggletip/toggletip.constants';
5
+ /**
6
+ * A toggletip is triggered by clicking a trigger element.
7
+ *
8
+ * It can contain interactive content and can be closed by
9
+ * clicking outside the toggletip or pressing the escape key.
10
+ *
11
+ * It can have optional close button to close the toggletip.
12
+ *
13
+ * Toggletip component uses `mdc-screenreaderannouncer` internally to
14
+ * announce the toggletip text content with screen readers when the toggletip is shown.
15
+ *
16
+ * `screenreader-announcer-identity` attribute can be used to provide ID of an element
17
+ * in DOM to which announcement elements are added. If not set, a visually hidden
18
+ * div element is created in DOM to which announcement elements are added.
19
+ *
20
+ * Please refer to the `mdc-screenreaderannouncer` component for more details.
21
+ *
22
+ * @dependency mdc-screenreaderannouncer
23
+ * @dependency mdc-button
24
+ *
25
+ * @tagname mdc-toggletip
26
+ *
27
+ * @event shown - (React: onShown) This event is dispatched when the toggletip is shown
28
+ * @event hidden - (React: onHidden) This event is dispatched when the toggletip is hidden
29
+ * @event created - (React: onCreated) This event is dispatched when the toggletip is created (added to the DOM)
30
+ * @event destroyed - (React: onDestroyed) This event is dispatched when the toggletip
31
+ * is destroyed (removed from the DOM)
32
+ *
33
+ * @cssproperty --mdc-toggletip-max-width - The maximum width of the toggletip.
34
+ * @cssproperty --mdc-toggletip-text-color - The text color of the toggletip.
35
+ * @cssproperty --mdc-toggletip-text-color-contrast - The text color of the toggletip
36
+ * when the color is contrast.
37
+ *
38
+ * @slot - Default slot for the toggletip content
39
+ */
40
+ const reactWrapper = createComponent({
41
+ tagName: TAG_NAME,
42
+ elementClass: Component,
43
+ react: React,
44
+ events: {
45
+ onShown: 'shown',
46
+ onHidden: 'hidden',
47
+ onCreated: 'created',
48
+ onDestroyed: 'destroyed',
49
+ },
50
+ displayName: 'ToggleTip',
51
+ });
52
+ export default reactWrapper;
package/package.json CHANGED
@@ -39,5 +39,5 @@
39
39
  "lit": "^3.2.0",
40
40
  "uuid": "^11.0.5"
41
41
  },
42
- "version": "0.54.2"
42
+ "version": "0.55.0"
43
43
  }