@momentum-design/components 0.57.0 → 0.58.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
@@ -11,6 +11,7 @@ import Chip from './components/chip';
11
11
  import Coachmark from './components/coachmark';
12
12
  import StaticCheckbox from './components/staticcheckbox';
13
13
  import StaticRadio from './components/staticradio';
14
+ import StaticToggle from './components/statictoggle';
14
15
  import Divider from './components/divider';
15
16
  import FilterChip from './components/filterchip';
16
17
  import FormfieldGroup from './components/formfieldgroup';
@@ -51,6 +52,6 @@ import type { SpinnerSize, SpinnerVariant } from './components/spinner/spinner.t
51
52
  import type { TextType } from './components/text/text.types';
52
53
  import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
53
54
  import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES } from './components/button/button.constants';
54
- 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, Linksimple, };
55
+ 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, StaticToggle, Textarea, ToggleTip, Tooltip, Searchfield, Brandvisual, Appheader, Select, TabList, Progressspinner, Linksimple, };
55
56
  export type { TextType, SpinnerSize, SpinnerVariant, PopoverPlacement, BadgeType, IconButtonSize, PillButtonSize, ButtonVariant, ButtonColor, };
56
57
  export { inMemoryCache, webAPIIconsCache, BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES };
package/dist/index.js CHANGED
@@ -12,6 +12,7 @@ import Chip from './components/chip';
12
12
  import Coachmark from './components/coachmark';
13
13
  import StaticCheckbox from './components/staticcheckbox';
14
14
  import StaticRadio from './components/staticradio';
15
+ import StaticToggle from './components/statictoggle';
15
16
  import Divider from './components/divider';
16
17
  import FilterChip from './components/filterchip';
17
18
  import FormfieldGroup from './components/formfieldgroup';
@@ -49,6 +50,6 @@ import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
49
50
  // Constants / Utils Imports
50
51
  import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES, } from './components/button/button.constants';
51
52
  // Components Exports
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, ToggleTip, Tooltip, Searchfield, Brandvisual, Appheader, Select, TabList, Progressspinner, Linksimple, };
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, StaticToggle, Textarea, ToggleTip, Tooltip, Searchfield, Brandvisual, Appheader, Select, TabList, Progressspinner, Linksimple, };
53
54
  // Constants / Utils Exports
54
55
  export { inMemoryCache, webAPIIconsCache, BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES };
@@ -2,10 +2,10 @@ export { default as AlertChip } from './alertchip';
2
2
  export { default as Appheader } from './appheader';
3
3
  export { default as Avatar } from './avatar';
4
4
  export { default as AvatarButton } from './avatarbutton';
5
+ export { default as Badge } from './badge';
5
6
  export { default as Brandvisual } from './brandvisual';
6
7
  export { default as Bullet } from './bullet';
7
8
  export { default as Button } from './button';
8
- export { default as Badge } from './badge';
9
9
  export { default as Buttonsimple } from './buttonsimple';
10
10
  export { default as Checkbox } from './checkbox';
11
11
  export { default as Chip } from './chip';
@@ -37,6 +37,7 @@ export { default as Select } from './select';
37
37
  export { default as Spinner } from './spinner';
38
38
  export { default as StaticCheckbox } from './staticcheckbox';
39
39
  export { default as StaticRadio } from './staticradio';
40
+ export { default as StaticToggle } from './statictoggle';
40
41
  export { default as Tab } from './tab';
41
42
  export { default as TabList } from './tablist';
42
43
  export { default as Text } from './text';
@@ -2,10 +2,10 @@ export { default as AlertChip } from './alertchip';
2
2
  export { default as Appheader } from './appheader';
3
3
  export { default as Avatar } from './avatar';
4
4
  export { default as AvatarButton } from './avatarbutton';
5
+ export { default as Badge } from './badge';
5
6
  export { default as Brandvisual } from './brandvisual';
6
7
  export { default as Bullet } from './bullet';
7
8
  export { default as Button } from './button';
8
- export { default as Badge } from './badge';
9
9
  export { default as Buttonsimple } from './buttonsimple';
10
10
  export { default as Checkbox } from './checkbox';
11
11
  export { default as Chip } from './chip';
@@ -37,6 +37,7 @@ export { default as Select } from './select';
37
37
  export { default as Spinner } from './spinner';
38
38
  export { default as StaticCheckbox } from './staticcheckbox';
39
39
  export { default as StaticRadio } from './staticradio';
40
+ export { default as StaticToggle } from './statictoggle';
40
41
  export { default as Tab } from './tab';
41
42
  export { default as TabList } from './tablist';
42
43
  export { default as Text } from './text';
@@ -0,0 +1,30 @@
1
+ import Component from '../../components/statictoggle';
2
+ /**
3
+ * This is a decorative component that is styled to look as a toggle. <br/>
4
+ * It has 3 properties - checked, size and disabled. <br/>
5
+ * We are using the same styling that has been created for the `mdc-toggle` component.
6
+ *
7
+ * @dependency mdc-icon
8
+ *
9
+ * @tagname mdc-statictoggle
10
+ *
11
+ * @slot default - This is a default/unnamed slot
12
+ *
13
+ * @cssproperty --mdc-statictoggle-width - Width of the toggle
14
+ * @cssproperty --mdc-statictoggle-height - Height of the toggle
15
+ * @cssproperty --mdc-statictoggle-width-compact - Width of the toggle when it's size is compact
16
+ * @cssproperty --mdc-statictoggle-height-compact - Height of the toggle when it's size is compact
17
+ * @cssproperty --mdc-statictoggle-border-radius - Border radius of the toggle
18
+ * @cssproperty --mdc-statictoggle-border-radius-compact - Border radius of the toggle when it's size is compact
19
+ * @cssproperty --mdc-statictoggle-border - Border of the toggle
20
+ * @cssproperty --mdc-statictoggle-inactive-rest-color - Background color of the inactive toggle in rest state
21
+ * @cssproperty --mdc-statictoggle-inactive-disabled-color - Background color of the inactive toggle in disabled state
22
+ * @cssproperty --mdc-statictoggle-active-rest-color - Background color of the active toggle in rest state
23
+ * @cssproperty --mdc-statictoggle-active-disabled-color - Background color of the active toggle in disabled state
24
+ * @cssproperty --mdc-statictoggle-icon-color-normal - Color of the icon in normal state
25
+ * @cssproperty --mdc-statictoggle-icon-color-disabled - Color of the icon in disabled state
26
+ * @cssproperty --mdc-statictoggle-icon-background-color-normal - Background color of the icon in normal state
27
+ * @cssproperty --mdc-statictoggle-icon-background-color-disabled - Background color of the icon in disabled state
28
+ */
29
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
30
+ export default reactWrapper;
@@ -0,0 +1,39 @@
1
+ import * as React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import Component from '../../components/statictoggle';
4
+ import { TAG_NAME } from '../../components/statictoggle/statictoggle.constants';
5
+ /**
6
+ * This is a decorative component that is styled to look as a toggle. <br/>
7
+ * It has 3 properties - checked, size and disabled. <br/>
8
+ * We are using the same styling that has been created for the `mdc-toggle` component.
9
+ *
10
+ * @dependency mdc-icon
11
+ *
12
+ * @tagname mdc-statictoggle
13
+ *
14
+ * @slot default - This is a default/unnamed slot
15
+ *
16
+ * @cssproperty --mdc-statictoggle-width - Width of the toggle
17
+ * @cssproperty --mdc-statictoggle-height - Height of the toggle
18
+ * @cssproperty --mdc-statictoggle-width-compact - Width of the toggle when it's size is compact
19
+ * @cssproperty --mdc-statictoggle-height-compact - Height of the toggle when it's size is compact
20
+ * @cssproperty --mdc-statictoggle-border-radius - Border radius of the toggle
21
+ * @cssproperty --mdc-statictoggle-border-radius-compact - Border radius of the toggle when it's size is compact
22
+ * @cssproperty --mdc-statictoggle-border - Border of the toggle
23
+ * @cssproperty --mdc-statictoggle-inactive-rest-color - Background color of the inactive toggle in rest state
24
+ * @cssproperty --mdc-statictoggle-inactive-disabled-color - Background color of the inactive toggle in disabled state
25
+ * @cssproperty --mdc-statictoggle-active-rest-color - Background color of the active toggle in rest state
26
+ * @cssproperty --mdc-statictoggle-active-disabled-color - Background color of the active toggle in disabled state
27
+ * @cssproperty --mdc-statictoggle-icon-color-normal - Color of the icon in normal state
28
+ * @cssproperty --mdc-statictoggle-icon-color-disabled - Color of the icon in disabled state
29
+ * @cssproperty --mdc-statictoggle-icon-background-color-normal - Background color of the icon in normal state
30
+ * @cssproperty --mdc-statictoggle-icon-background-color-disabled - Background color of the icon in disabled state
31
+ */
32
+ const reactWrapper = createComponent({
33
+ tagName: TAG_NAME,
34
+ elementClass: Component,
35
+ react: React,
36
+ events: {},
37
+ displayName: 'StaticToggle',
38
+ });
39
+ export default reactWrapper;
@@ -11,30 +11,26 @@ import Component from '../../components/toggle';
11
11
  * Note: It internally renders a checkbox styled as a toggle switch.
12
12
  *
13
13
  * @dependency mdc-icon
14
+ * @dependency mdc-statictoggle
14
15
  *
15
16
  * @tagname mdc-toggle
16
17
  *
17
18
  * @event change - (React: onChange) Event that gets dispatched when the toggle state changes.
18
19
  * @event focus - (React: onFocus) Event that gets dispatched when the toggle receives focus.
19
20
  *
20
- * @cssproperty --mdc-toggle-width - width of the toggle
21
- * @cssproperty --mdc-toggle-height - height of the toggle
22
- * @cssproperty --mdc-toggle-width-compact - width of the toggle when it's size is compact
23
- * @cssproperty --mdc-toggle-height-compact - height of the toggle when it's size is compact
24
- * @cssproperty --mdc-toggle-border-radius - border radius of the toggle
25
- * @cssproperty --mdc-toggle-border-radius-compact - border radius of the toggle when it's size is compact
26
- * @cssproperty --mdc-toggle-border - border of the toggle
27
- * @cssproperty --mdc-toggle-inactive-rest-color - background color of the inactive toggle in rest state
28
- * @cssproperty --mdc-toggle-inactive-hover-color - background color of the inactive toggle in hover state
29
- * @cssproperty --mdc-toggle-inactive-pressed-color - background color of the inactive toggle in pressed state
30
- * @cssproperty --mdc-toggle-inactive-disabled-color - background color of the inactive toggle in disabled state
31
- * @cssproperty --mdc-toggle-active-rest-color - background color of the active toggle in rest state
32
- * @cssproperty --mdc-toggle-active-hover-color - background color of the active toggle in hover state
33
- * @cssproperty --mdc-toggle-active-pressed-color - background color of the active toggle in pressed state
34
- * @cssproperty --mdc-toggle-active-disabled-color - background color of the active toggle in disabled state
35
- * @cssproperty --mdc-toggle-help-text-color - color of the help text label
36
- * @cssproperty --mdc-toggle-label-color-disabled - color of the toggle label and help text in disabled state
37
- *
21
+ * @cssproperty --mdc-toggle-width - Width of the toggle
22
+ * @cssproperty --mdc-toggle-height - Height of the toggle
23
+ * @cssproperty --mdc-toggle-width-compact - Width of the toggle when it's size is compact
24
+ * @cssproperty --mdc-toggle-height-compact - Height of the toggle when it's size is compact
25
+ * @cssproperty --mdc-toggle-label-lineheight - Line height of the toggle label
26
+ * @cssproperty --mdc-toggle-label-fontsize - Font size of the toggle label
27
+ * @cssproperty --mdc-toggle-label-fontweight - Font weight of the toggle label
28
+ * @cssproperty --mdc-toggle-label-color-disabled - Color of the toggle label and help text in disabled state
29
+ * @cssproperty --mdc-toggle-help-text-color - Color of the help text label
30
+ * @cssproperty --mdc-toggle-active-hover-color - Background color of the active toggle in hover state
31
+ * @cssproperty --mdc-toggle-active-pressed-color - Background color of the active toggle in pressed state
32
+ * @cssproperty --mdc-toggle-inactive-hover-color - Background color of the inactive toggle in hover state
33
+ * @cssproperty --mdc-toggle-inactive-pressed-color - Background color of the inactive toggle in pressed state
38
34
  */
39
35
  declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
40
36
  onChange: EventName<Event>;
@@ -13,30 +13,26 @@ import { TAG_NAME } from '../../components/toggle/toggle.constants';
13
13
  * Note: It internally renders a checkbox styled as a toggle switch.
14
14
  *
15
15
  * @dependency mdc-icon
16
+ * @dependency mdc-statictoggle
16
17
  *
17
18
  * @tagname mdc-toggle
18
19
  *
19
20
  * @event change - (React: onChange) Event that gets dispatched when the toggle state changes.
20
21
  * @event focus - (React: onFocus) Event that gets dispatched when the toggle receives focus.
21
22
  *
22
- * @cssproperty --mdc-toggle-width - width of the toggle
23
- * @cssproperty --mdc-toggle-height - height of the toggle
24
- * @cssproperty --mdc-toggle-width-compact - width of the toggle when it's size is compact
25
- * @cssproperty --mdc-toggle-height-compact - height of the toggle when it's size is compact
26
- * @cssproperty --mdc-toggle-border-radius - border radius of the toggle
27
- * @cssproperty --mdc-toggle-border-radius-compact - border radius of the toggle when it's size is compact
28
- * @cssproperty --mdc-toggle-border - border of the toggle
29
- * @cssproperty --mdc-toggle-inactive-rest-color - background color of the inactive toggle in rest state
30
- * @cssproperty --mdc-toggle-inactive-hover-color - background color of the inactive toggle in hover state
31
- * @cssproperty --mdc-toggle-inactive-pressed-color - background color of the inactive toggle in pressed state
32
- * @cssproperty --mdc-toggle-inactive-disabled-color - background color of the inactive toggle in disabled state
33
- * @cssproperty --mdc-toggle-active-rest-color - background color of the active toggle in rest state
34
- * @cssproperty --mdc-toggle-active-hover-color - background color of the active toggle in hover state
35
- * @cssproperty --mdc-toggle-active-pressed-color - background color of the active toggle in pressed state
36
- * @cssproperty --mdc-toggle-active-disabled-color - background color of the active toggle in disabled state
37
- * @cssproperty --mdc-toggle-help-text-color - color of the help text label
38
- * @cssproperty --mdc-toggle-label-color-disabled - color of the toggle label and help text in disabled state
39
- *
23
+ * @cssproperty --mdc-toggle-width - Width of the toggle
24
+ * @cssproperty --mdc-toggle-height - Height of the toggle
25
+ * @cssproperty --mdc-toggle-width-compact - Width of the toggle when it's size is compact
26
+ * @cssproperty --mdc-toggle-height-compact - Height of the toggle when it's size is compact
27
+ * @cssproperty --mdc-toggle-label-lineheight - Line height of the toggle label
28
+ * @cssproperty --mdc-toggle-label-fontsize - Font size of the toggle label
29
+ * @cssproperty --mdc-toggle-label-fontweight - Font weight of the toggle label
30
+ * @cssproperty --mdc-toggle-label-color-disabled - Color of the toggle label and help text in disabled state
31
+ * @cssproperty --mdc-toggle-help-text-color - Color of the help text label
32
+ * @cssproperty --mdc-toggle-active-hover-color - Background color of the active toggle in hover state
33
+ * @cssproperty --mdc-toggle-active-pressed-color - Background color of the active toggle in pressed state
34
+ * @cssproperty --mdc-toggle-inactive-hover-color - Background color of the inactive toggle in hover state
35
+ * @cssproperty --mdc-toggle-inactive-pressed-color - Background color of the inactive toggle in pressed state
40
36
  */
41
37
  const reactWrapper = createComponent({
42
38
  tagName: TAG_NAME,
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.57.0"
42
+ "version": "0.58.0"
43
43
  }