@momentum-design/components 0.84.3 → 0.84.4

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.
Files changed (182) hide show
  1. package/README.md +8 -3
  2. package/dist/browser/index.js +2233 -2291
  3. package/dist/browser/index.js.map +4 -4
  4. package/dist/components/alertchip/alertchip.component.d.ts +1 -1
  5. package/dist/components/alertchip/alertchip.component.js +2 -2
  6. package/dist/components/alertchip/alertchip.styles.js +22 -23
  7. package/dist/components/alertchip/alertchip.types.d.ts +1 -1
  8. package/dist/components/animation/animation.component.js +1 -1
  9. package/dist/components/animation/animation.styles.js +8 -5
  10. package/dist/components/appheader/appheader.component.js +12 -13
  11. package/dist/components/appheader/appheader.styles.js +0 -1
  12. package/dist/components/avatar/avatar.component.js +3 -16
  13. package/dist/components/avatar/avatar.constants.d.ts +1 -1
  14. package/dist/components/avatar/avatar.constants.js +1 -1
  15. package/dist/components/avatar/avatar.styles.js +129 -122
  16. package/dist/components/avatar/avatar.types.d.ts +1 -1
  17. package/dist/components/avatar/avatar.utils.d.ts +1 -1
  18. package/dist/components/avatar/avatar.utils.js +1 -1
  19. package/dist/components/avatarbutton/avatarbutton.component.d.ts +2 -2
  20. package/dist/components/avatarbutton/avatarbutton.component.js +2 -2
  21. package/dist/components/avatarbutton/avatarbutton.styles.js +34 -30
  22. package/dist/components/badge/badge.styles.js +9 -7
  23. package/dist/components/brandvisual/brandvisual.component.js +4 -4
  24. package/dist/components/bullet/bullet.component.d.ts +1 -1
  25. package/dist/components/bullet/bullet.component.js +2 -2
  26. package/dist/components/bullet/bullet.styles.js +3 -3
  27. package/dist/components/button/button.component.js +10 -4
  28. package/dist/components/button/button.utils.js +1 -1
  29. package/dist/components/buttongroup/buttongroup.component.js +1 -1
  30. package/dist/components/buttongroup/buttongroup.styles.js +68 -68
  31. package/dist/components/buttonlink/buttonlink.component.d.ts +5 -5
  32. package/dist/components/buttonlink/buttonlink.component.js +9 -9
  33. package/dist/components/buttonsimple/buttonsimple.component.js +2 -2
  34. package/dist/components/buttonsimple/buttonsimple.constants.d.ts +1 -1
  35. package/dist/components/buttonsimple/buttonsimple.constants.js +1 -1
  36. package/dist/components/buttonsimple/buttonsimple.styles.js +62 -57
  37. package/dist/components/card/card.component.d.ts +6 -6
  38. package/dist/components/card/card.component.js +15 -16
  39. package/dist/components/card/card.styles.js +24 -22
  40. package/dist/components/cardbutton/cardbutton.component.js +9 -12
  41. package/dist/components/cardbutton/cardbutton.styles.js +1 -1
  42. package/dist/components/cardcheckbox/cardcheckbox.component.d.ts +6 -6
  43. package/dist/components/cardcheckbox/cardcheckbox.component.js +30 -29
  44. package/dist/components/cardcheckbox/cardcheckbox.styles.js +10 -10
  45. package/dist/components/cardradio/cardradio.component.d.ts +12 -12
  46. package/dist/components/cardradio/cardradio.component.js +27 -30
  47. package/dist/components/cardradio/cardradio.styles.js +8 -8
  48. package/dist/components/checkbox/checkbox.component.js +7 -9
  49. package/dist/components/checkbox/checkbox.styles.js +62 -60
  50. package/dist/components/chip/chip.component.d.ts +1 -1
  51. package/dist/components/chip/chip.component.js +6 -11
  52. package/dist/components/chip/chip.styles.js +4 -2
  53. package/dist/components/dialog/dialog.component.js +28 -29
  54. package/dist/components/dialog/dialog.styles.js +10 -12
  55. package/dist/components/divider/divider.component.js +6 -8
  56. package/dist/components/divider/divider.constants.d.ts +1 -1
  57. package/dist/components/divider/divider.constants.js +1 -1
  58. package/dist/components/divider/divider.styles.js +5 -20
  59. package/dist/components/filterchip/filterchip.styles.js +4 -2
  60. package/dist/components/formfieldgroup/formfieldgroup.component.js +1 -4
  61. package/dist/components/formfieldgroup/formfieldgroup.styles.js +1 -2
  62. package/dist/components/formfieldwrapper/formfieldwrapper.component.js +19 -17
  63. package/dist/components/formfieldwrapper/formfieldwrapper.styles.js +2 -1
  64. package/dist/components/formfieldwrapper/formfieldwrapper.subcomponent.js +4 -4
  65. package/dist/components/icon/icon.component.js +7 -7
  66. package/dist/components/icon/icon.utils.d.ts +1 -1
  67. package/dist/components/icon/icon.utils.js +7 -7
  68. package/dist/components/iconprovider/iconprovider.component.js +7 -7
  69. package/dist/components/input/input.component.d.ts +5 -5
  70. package/dist/components/input/input.component.js +64 -62
  71. package/dist/components/input/input.styles.js +128 -117
  72. package/dist/components/inputchip/inputchip.component.js +14 -19
  73. package/dist/components/inputchip/inputchip.styles.js +5 -3
  74. package/dist/components/link/link.component.d.ts +1 -1
  75. package/dist/components/link/link.component.js +4 -8
  76. package/dist/components/link/link.constants.d.ts +1 -1
  77. package/dist/components/link/link.constants.js +1 -1
  78. package/dist/components/link/link.styles.js +12 -12
  79. package/dist/components/linksimple/linksimple.component.js +2 -4
  80. package/dist/components/linksimple/linksimple.styles.js +59 -57
  81. package/dist/components/list/list.component.js +12 -9
  82. package/dist/components/listitem/listitem.component.js +15 -11
  83. package/dist/components/listitem/listitem.styles.js +11 -6
  84. package/dist/components/marker/marker.component.js +1 -1
  85. package/dist/components/marker/marker.styles.js +2 -2
  86. package/dist/components/menubar/menubar.component.d.ts +19 -19
  87. package/dist/components/menubar/menubar.component.js +19 -19
  88. package/dist/components/menuitem/menuitem.component.js +15 -15
  89. package/dist/components/menuitem/menuitem.styles.js +3 -2
  90. package/dist/components/menuitemcheckbox/menuitemcheckbox.component.d.ts +1 -1
  91. package/dist/components/menuitemcheckbox/menuitemcheckbox.component.js +4 -11
  92. package/dist/components/menuitemradio/menuitemradio.component.js +1 -1
  93. package/dist/components/menupopover/menupopover.component.js +11 -11
  94. package/dist/components/menupopover/menupopover.utils.d.ts +1 -1
  95. package/dist/components/menupopover/menupopover.utils.js +3 -8
  96. package/dist/components/navitem/navitem.component.js +11 -19
  97. package/dist/components/navitem/navitem.styles.js +147 -143
  98. package/dist/components/navitemlist/navitemlist.component.js +2 -2
  99. package/dist/components/optgroup/optgroup.component.js +12 -9
  100. package/dist/components/option/option.component.js +11 -11
  101. package/dist/components/option/option.styles.js +1 -1
  102. package/dist/components/popover/popover.component.js +4 -4
  103. package/dist/components/popover/popover.stack.js +1 -1
  104. package/dist/components/popover/popover.styles.js +0 -1
  105. package/dist/components/popover/popover.utils.js +3 -4
  106. package/dist/components/presence/presence.component.d.ts +4 -4
  107. package/dist/components/presence/presence.component.js +4 -4
  108. package/dist/components/progressbar/progressbar.component.js +3 -4
  109. package/dist/components/progressbar/progressbar.styles.js +77 -71
  110. package/dist/components/progressspinner/progressspiner.utils.js +4 -4
  111. package/dist/components/progressspinner/progressspinner.component.js +38 -37
  112. package/dist/components/progressspinner/progressspinner.styles.js +1 -1
  113. package/dist/components/radio/radio.component.d.ts +41 -41
  114. package/dist/components/radio/radio.component.js +84 -83
  115. package/dist/components/radio/radio.styles.js +77 -75
  116. package/dist/components/radiogroup/radiogroup.component.js +1 -1
  117. package/dist/components/screenreaderannouncer/screenreaderannouncer.component.js +2 -2
  118. package/dist/components/screenreaderannouncer/screenreaderannouncer.styles.js +8 -6
  119. package/dist/components/searchfield/searchfield.component.js +23 -17
  120. package/dist/components/searchfield/searchfield.styles.js +11 -13
  121. package/dist/components/select/select.component.js +20 -23
  122. package/dist/components/select/select.styles.js +9 -9
  123. package/dist/components/sidenavigation/sidenavigation.component.d.ts +6 -6
  124. package/dist/components/sidenavigation/sidenavigation.component.js +39 -29
  125. package/dist/components/sidenavigation/sidenavigation.context.js +5 -5
  126. package/dist/components/sidenavigation/sidenavigation.styles.js +53 -53
  127. package/dist/components/skeleton/skeleton.component.js +1 -4
  128. package/dist/components/skeleton/skeleton.constants.d.ts +1 -1
  129. package/dist/components/skeleton/skeleton.constants.js +1 -1
  130. package/dist/components/skeleton/skeleton.styles.js +4 -4
  131. package/dist/components/spinner/spinner.component.d.ts +7 -7
  132. package/dist/components/spinner/spinner.component.js +9 -9
  133. package/dist/components/spinner/spinner.styles.js +58 -53
  134. package/dist/components/staticcheckbox/staticcheckbox.component.js +10 -8
  135. package/dist/components/staticcheckbox/staticcheckbox.styles.js +52 -51
  136. package/dist/components/staticradio/staticradio.component.d.ts +8 -8
  137. package/dist/components/staticradio/staticradio.component.js +10 -11
  138. package/dist/components/staticradio/staticradio.styles.js +77 -75
  139. package/dist/components/statictoggle/statictoggle.component.d.ts +3 -3
  140. package/dist/components/statictoggle/statictoggle.component.js +3 -3
  141. package/dist/components/statictoggle/statictoggle.styles.js +71 -68
  142. package/dist/components/tab/tab.component.d.ts +1 -1
  143. package/dist/components/tab/tab.component.js +2 -2
  144. package/dist/components/tab/tab.styles.js +247 -245
  145. package/dist/components/tablist/tablist.component.js +11 -15
  146. package/dist/components/tablist/tablist.styles.js +27 -25
  147. package/dist/components/tablist/tablist.types.d.ts +1 -1
  148. package/dist/components/tablist/tablist.utils.js +4 -4
  149. package/dist/components/text/fonts.styles.js +49 -49
  150. package/dist/components/text/text.component.js +21 -11
  151. package/dist/components/text/text.types.d.ts +1 -1
  152. package/dist/components/textarea/textarea.component.d.ts +31 -31
  153. package/dist/components/textarea/textarea.component.js +54 -61
  154. package/dist/components/textarea/textarea.styles.js +123 -122
  155. package/dist/components/themeprovider/themeprovider.component.js +1 -1
  156. package/dist/components/themeprovider/themeprovider.styles.js +4 -4
  157. package/dist/components/toggle/toggle.component.d.ts +35 -35
  158. package/dist/components/toggle/toggle.component.js +62 -63
  159. package/dist/components/toggle/toggle.styles.js +77 -69
  160. package/dist/components/toggletip/toggletip.component.d.ts +7 -7
  161. package/dist/components/toggletip/toggletip.component.js +3 -2
  162. package/dist/components/tooltip/tooltip.component.js +1 -1
  163. package/dist/components/tooltip/tooltip.styles.js +0 -1
  164. package/dist/components/virtualizedlist/virtualizedlist.component.js +6 -14
  165. package/dist/components/virtualizedlist/virtualizedlist.helper.test.d.ts +1 -1
  166. package/dist/components/virtualizedlist/virtualizedlist.helper.test.js +14 -11
  167. package/dist/components/virtualizedlist/virtualizedlist.styles.js +4 -4
  168. package/dist/custom-elements.json +514 -514
  169. package/dist/index.js +1 -0
  170. package/dist/models/component/index.d.ts +1 -1
  171. package/dist/models/index.d.ts +2 -2
  172. package/dist/models/index.js +1 -1
  173. package/dist/react/index.d.ts +4 -4
  174. package/dist/react/index.js +4 -4
  175. package/dist/utils/mixins/ButtonComponentMixin.js +10 -10
  176. package/dist/utils/mixins/CardAndDialogFooterMixin.js +21 -22
  177. package/dist/utils/mixins/FocusTrapMixin.js +12 -12
  178. package/dist/utils/mixins/IconNameMixin.d.ts +1 -1
  179. package/dist/utils/mixins/MenuMixin.js +23 -23
  180. package/dist/utils/mixins/PreventScrollMixin.d.ts +1 -1
  181. package/dist/utils/styles/index.js +12 -12
  182. package/package.json +1 -1
@@ -1,66 +1,71 @@
1
1
  import { css } from 'lit';
2
2
  import { hostFitContentStyles } from '../../utils/styles';
3
- const styles = [hostFitContentStyles, css `
4
- :host {
5
- --mdc-spinner-default-color: var(--mds-color-theme-control-active-normal);
6
- --mdc-spinner-inverted-color: var(--mds-color-theme-inverted-control-active-normal);
7
- --mdc-spinner-button-variant-color: currentColor;
8
- --mdc-spinner-color: var(--mdc-spinner-default-color);
9
- --mdc-spinner-size: 100%;
10
- }
11
-
12
- :host([inverted]) {
13
- --mdc-spinner-color: var(--mdc-spinner-inverted-color);
14
- }
15
-
16
- :host([size="large"]) {
17
- --mdc-spinner-size: 6rem;
18
- }
3
+ const styles = [
4
+ hostFitContentStyles,
5
+ css `
6
+ :host {
7
+ --mdc-spinner-default-color: var(--mds-color-theme-control-active-normal);
8
+ --mdc-spinner-inverted-color: var(--mds-color-theme-inverted-control-active-normal);
9
+ --mdc-spinner-button-variant-color: currentColor;
10
+ --mdc-spinner-color: var(--mdc-spinner-default-color);
11
+ --mdc-spinner-size: 100%;
12
+ }
19
13
 
20
- :host([size="midsize"]) {
21
- --mdc-spinner-size: 3rem;
22
- }
14
+ :host([inverted]) {
15
+ --mdc-spinner-color: var(--mdc-spinner-inverted-color);
16
+ }
23
17
 
24
- :host([size="small"]) {
25
- --mdc-spinner-size: 1.5rem;
26
- }
18
+ :host([size='large']) {
19
+ --mdc-spinner-size: 6rem;
20
+ }
27
21
 
28
- :host([variant="button"]) {
29
- --mdc-spinner-color: var(--mdc-spinner-button-variant-color);
30
- }
22
+ :host([size='midsize']) {
23
+ --mdc-spinner-size: 3rem;
24
+ }
31
25
 
32
- :host::part(container) {
33
- width: var(--mdc-spinner-size);
34
- height: var(--mdc-spinner-size);
35
- animation: rotate 1.5s linear infinite;
36
- }
26
+ :host([size='small']) {
27
+ --mdc-spinner-size: 1.5rem;
28
+ }
37
29
 
38
- :host::part(circle) {
39
- fill: none;
40
- stroke: var(--mdc-spinner-color);
41
- stroke-width: 8%;
42
- stroke-linecap: round;
43
- animation: dash 1.5s ease-in-out infinite;
44
- transform: rotate(-90deg);
45
- transform-origin: center;
46
- }
30
+ :host([variant='button']) {
31
+ --mdc-spinner-color: var(--mdc-spinner-button-variant-color);
32
+ }
47
33
 
48
- @keyframes rotate {
49
- 100% { transform: rotate(360deg); }
50
- }
34
+ :host::part(container) {
35
+ width: var(--mdc-spinner-size);
36
+ height: var(--mdc-spinner-size);
37
+ animation: rotate 1.5s linear infinite;
38
+ }
51
39
 
52
- @keyframes dash {
53
- 0% {
54
- stroke-dasharray: 1, 470;
40
+ :host::part(circle) {
41
+ fill: none;
42
+ stroke: var(--mdc-spinner-color);
43
+ stroke-width: 8%;
44
+ stroke-linecap: round;
45
+ animation: dash 1.5s ease-in-out infinite;
46
+ transform: rotate(-90deg);
47
+ transform-origin: center;
55
48
  }
56
- 50% {
57
- stroke-dasharray: 209, 470;
58
- stroke-dashoffset: -83;
49
+
50
+ @keyframes rotate {
51
+ 100% {
52
+ transform: rotate(360deg);
53
+ }
59
54
  }
60
- 100% {
61
- stroke-dasharray: 209, 470;
62
- stroke-dashoffset: -292;
55
+
56
+ @keyframes dash {
57
+ 0% {
58
+ stroke-dasharray: 1, 470;
59
+ }
60
+ 50% {
61
+ stroke-dasharray: 209, 470;
62
+ stroke-dashoffset: -83;
63
+ }
64
+ 100% {
65
+ stroke-dasharray: 209, 470;
66
+ stroke-dashoffset: -292;
67
+ }
63
68
  }
64
- }
65
- `];
69
+ `,
70
+ ];
66
71
  export default styles;
@@ -52,14 +52,16 @@ class StaticCheckbox extends DisabledMixin(Component) {
52
52
  this.indeterminate = false;
53
53
  }
54
54
  render() {
55
- const checkboxIconContent = (this.checked || this.indeterminate) ? html `
56
- <mdc-icon
57
- class="icon"
58
- name="${this.indeterminate ? ICON_NAME.INDETERMINATE : ICON_NAME.CHECKED}"
59
- size="1"
60
- length-unit="rem"
61
- ></mdc-icon>
62
- ` : nothing;
55
+ const checkboxIconContent = this.checked || this.indeterminate
56
+ ? html `
57
+ <mdc-icon
58
+ class="icon"
59
+ name="${this.indeterminate ? ICON_NAME.INDETERMINATE : ICON_NAME.CHECKED}"
60
+ size="1"
61
+ length-unit="rem"
62
+ ></mdc-icon>
63
+ `
64
+ : nothing;
63
65
  return html `<slot></slot>
64
66
  <div part="icon-container">${checkboxIconContent}</div>`;
65
67
  }
@@ -1,60 +1,61 @@
1
1
  import { css } from 'lit';
2
- const styles = [css `
3
- :host{
4
- margin: 0.125rem 0;
5
- border-radius: 0.125rem;
6
- --mdc-staticcheckbox-border-color: var(--mds-color-theme-outline-button-normal);
7
- --mdc-staticcheckbox-checked-background-color: var(--mds-color-theme-control-active-normal);
8
- --mdc-staticcheckbox-disabled-background-color: var(--mds-color-theme-control-inactive-disabled);
9
- --mdc-staticcheckbox-disabled-icon-color: var(--mds-color-theme-text-primary-disabled);
10
- --mdc-staticcheckbox-icon-background-color: var(--mds-color-theme-control-inactive-normal);
11
- --mdc-staticcheckbox-icon-border-color: var(--mds-color-theme-outline-input-normal);
12
- --mdc-staticcheckbox-icon-color: var(--mds-color-theme-inverted-text-primary-normal);
13
- --mdc-staticcheckbox-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);
14
- --mdc-staticcheckbox-disabled-checked-icon-color: var(--mds-color-theme-control-active-disabled);
15
- }
2
+ const styles = [
3
+ css `
4
+ :host {
5
+ margin: 0.125rem 0;
6
+ border-radius: 0.125rem;
7
+ --mdc-staticcheckbox-border-color: var(--mds-color-theme-outline-button-normal);
8
+ --mdc-staticcheckbox-checked-background-color: var(--mds-color-theme-control-active-normal);
9
+ --mdc-staticcheckbox-disabled-background-color: var(--mds-color-theme-control-inactive-disabled);
10
+ --mdc-staticcheckbox-disabled-icon-color: var(--mds-color-theme-text-primary-disabled);
11
+ --mdc-staticcheckbox-icon-background-color: var(--mds-color-theme-control-inactive-normal);
12
+ --mdc-staticcheckbox-icon-border-color: var(--mds-color-theme-outline-input-normal);
13
+ --mdc-staticcheckbox-icon-color: var(--mds-color-theme-inverted-text-primary-normal);
14
+ --mdc-staticcheckbox-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);
15
+ --mdc-staticcheckbox-disabled-checked-icon-color: var(--mds-color-theme-control-active-disabled);
16
+ }
16
17
 
17
- :host([checked])::part(icon-container),
18
- :host([indeterminate])::part(icon-container) {
19
- background: var(--mdc-staticcheckbox-checked-background-color);
20
- border-color: transparent;
21
- }
18
+ :host([checked])::part(icon-container),
19
+ :host([indeterminate])::part(icon-container) {
20
+ background: var(--mdc-staticcheckbox-checked-background-color);
21
+ border-color: transparent;
22
+ }
23
+
24
+ :host([disabled])::part(icon-container) {
25
+ border-color: var(--mdc-staticcheckbox-disabled-border-color);
26
+ background: var(--mdc-staticcheckbox-disabled-background-color);
27
+ }
22
28
 
23
- :host([disabled])::part(icon-container) {
24
- border-color: var(--mdc-staticcheckbox-disabled-border-color);
25
- background: var(--mdc-staticcheckbox-disabled-background-color);
26
- }
29
+ :host([disabled][checked])::part(icon-container),
30
+ :host([disabled][indeterminate])::part(icon-container) {
31
+ background: var(--mdc-staticcheckbox-disabled-checked-icon-color);
32
+ border: 0.0625rem solid var(--mdc-staticcheckbox-disabled-border-color);
33
+ }
27
34
 
28
- :host([disabled][checked])::part(icon-container),
29
- :host([disabled][indeterminate])::part(icon-container) {
30
- background: var(--mdc-staticcheckbox-disabled-checked-icon-color);
31
- border: 0.0625rem solid var(--mdc-staticcheckbox-disabled-border-color);
32
- }
33
-
34
- :host::part(icon-container) {
35
- display: flex;
36
- align-items: center;
37
- border: 0.0625rem solid var(--mdc-staticcheckbox-icon-border-color);
38
- background: var(--mdc-staticcheckbox-icon-background-color);
39
- width: 1rem;
40
- height: 1rem;
41
- border-radius: 0.125rem;
42
- }
35
+ :host::part(icon-container) {
36
+ display: flex;
37
+ align-items: center;
38
+ border: 0.0625rem solid var(--mdc-staticcheckbox-icon-border-color);
39
+ background: var(--mdc-staticcheckbox-icon-background-color);
40
+ width: 1rem;
41
+ height: 1rem;
42
+ border-radius: 0.125rem;
43
+ }
43
44
 
44
- .icon {
45
- --mdc-icon-fill-color: var(--mdc-staticcheckbox-icon-color);
46
- }
45
+ .icon {
46
+ --mdc-icon-fill-color: var(--mdc-staticcheckbox-icon-color);
47
+ }
47
48
 
48
- :host([disabled]) .icon {
49
- --mdc-icon-fill-color: var(--mdc-staticcheckbox-disabled-icon-color);
50
- }
49
+ :host([disabled]) .icon {
50
+ --mdc-icon-fill-color: var(--mdc-staticcheckbox-disabled-icon-color);
51
+ }
51
52
 
52
- /* High Contrast Mode */
53
- @media (forced-colors: active) {
54
- :host([checked])::part(icon-container)
55
- :host([indeterminate])::part(icon-container) {
56
- border: 0.0625rem solid var(--mdc-staticcheckbox-border-color);
53
+ /* High Contrast Mode */
54
+ @media (forced-colors: active) {
55
+ :host([checked])::part(icon-container) :host([indeterminate])::part(icon-container) {
56
+ border: 0.0625rem solid var(--mdc-staticcheckbox-border-color);
57
+ }
57
58
  }
58
- }
59
- `];
59
+ `,
60
+ ];
60
61
  export default styles;
@@ -24,16 +24,16 @@ declare const StaticRadio_base: import("../../utils/mixins/index.types").Constru
24
24
  */
25
25
  declare class StaticRadio extends StaticRadio_base {
26
26
  /**
27
- * Determines whether the radio is selected or unselected.
28
- *
29
- * @default false
30
- */
27
+ * Determines whether the radio is selected or unselected.
28
+ *
29
+ * @default false
30
+ */
31
31
  checked: boolean;
32
32
  /**
33
- * Determines whether the radio is read-only.
34
- *
35
- * @default false
36
- */
33
+ * Determines whether the radio is read-only.
34
+ *
35
+ * @default false
36
+ */
37
37
  readonly: boolean;
38
38
  render(): import("lit-html").TemplateResult<1>;
39
39
  static styles: Array<CSSResult>;
@@ -10,8 +10,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  import { html } from 'lit';
11
11
  import { property } from 'lit/decorators.js';
12
12
  import { Component } from '../../models';
13
- import styles from './staticradio.styles';
14
13
  import { DisabledMixin } from '../../utils/mixins/DisabledMixin';
14
+ import styles from './staticradio.styles';
15
15
  /**
16
16
  * This is a decorative component that is styled to look as a radio.
17
17
  * It has 2 properties - checked and disabled.
@@ -37,21 +37,20 @@ class StaticRadio extends DisabledMixin(Component) {
37
37
  constructor() {
38
38
  super(...arguments);
39
39
  /**
40
- * Determines whether the radio is selected or unselected.
41
- *
42
- * @default false
43
- */
40
+ * Determines whether the radio is selected or unselected.
41
+ *
42
+ * @default false
43
+ */
44
44
  this.checked = false;
45
45
  /**
46
- * Determines whether the radio is read-only.
47
- *
48
- * @default false
49
- */
46
+ * Determines whether the radio is read-only.
47
+ *
48
+ * @default false
49
+ */
50
50
  this.readonly = false;
51
51
  }
52
52
  render() {
53
- return html `
54
- <slot></slot>
53
+ return html ` <slot></slot>
55
54
  <span part="radio-icon" class="icon"></span>`;
56
55
  }
57
56
  }
@@ -1,86 +1,88 @@
1
1
  import { css } from 'lit';
2
- const styles = [css `
3
- :host{
4
- display: block;
5
- position: relative;
6
- width: 1rem;
7
- height: 1rem;
8
- margin: 0.125rem 0;
9
- border-radius: 50%;
2
+ const styles = [
3
+ css `
4
+ :host {
5
+ display: block;
6
+ position: relative;
7
+ width: 1rem;
8
+ height: 1rem;
9
+ margin: 0.125rem 0;
10
+ border-radius: 50%;
10
11
 
11
- --mdc-staticradio-inner-circle-size: 0.375rem;
12
- --mdc-staticradio-text-disabled-color: var(--mds-color-theme-text-primary-disabled);
13
- --mdc-staticradio-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);
14
- --mdc-staticradio-normal-border-color: var(--mds-color-theme-outline-input-normal);
15
- --mdc-staticradio-inner-circle-normal-background: var(--mds-color-theme-inverted-text-primary-normal);
16
- --mdc-staticradio-inner-circle-disabled-background: var(--mds-color-theme-inverted-text-primary-disabled);
17
- --mdc-staticradio-control-inactive-color: var(--mds-color-theme-control-inactive-normal);
18
- --mdc-staticradio-control-inactive-disabled-background: var(--mds-color-theme-control-inactive-disabled);
19
- --mdc-staticradio-control-active-color: var(--mds-color-theme-control-active-normal);
20
- --mdc-staticradio-control-active-disabled-background: var(--mds-color-theme-control-active-disabled);
21
- }
22
-
23
- .icon:after {
24
- content: "";
25
- position: absolute;
26
- display: none;
27
- }
12
+ --mdc-staticradio-inner-circle-size: 0.375rem;
13
+ --mdc-staticradio-text-disabled-color: var(--mds-color-theme-text-primary-disabled);
14
+ --mdc-staticradio-disabled-border-color: var(--mds-color-theme-outline-primary-disabled);
15
+ --mdc-staticradio-normal-border-color: var(--mds-color-theme-outline-input-normal);
16
+ --mdc-staticradio-inner-circle-normal-background: var(--mds-color-theme-inverted-text-primary-normal);
17
+ --mdc-staticradio-inner-circle-disabled-background: var(--mds-color-theme-inverted-text-primary-disabled);
18
+ --mdc-staticradio-control-inactive-color: var(--mds-color-theme-control-inactive-normal);
19
+ --mdc-staticradio-control-inactive-disabled-background: var(--mds-color-theme-control-inactive-disabled);
20
+ --mdc-staticradio-control-active-color: var(--mds-color-theme-control-active-normal);
21
+ --mdc-staticradio-control-active-disabled-background: var(--mds-color-theme-control-active-disabled);
22
+ }
28
23
 
29
- :host([disabled]) .icon,
30
- :host([disabled][readonly]) .icon {
31
- border-color: var(--mdc-staticradio-disabled-border-color);
32
- background: var(--mdc-staticradio-control-inactive-disabled-background);
33
- }
24
+ .icon:after {
25
+ content: '';
26
+ position: absolute;
27
+ display: none;
28
+ }
34
29
 
35
- :host([disabled][checked]) .icon,
36
- :host([disabled][readonly][checked]) .icon {
37
- border: var(--mdc-staticradio-control-active-disabled-background);
38
- background: var(--mdc-staticradio-control-active-disabled-background);
39
- }
30
+ :host([disabled]) .icon,
31
+ :host([disabled][readonly]) .icon {
32
+ border-color: var(--mdc-staticradio-disabled-border-color);
33
+ background: var(--mdc-staticradio-control-inactive-disabled-background);
34
+ }
40
35
 
41
- :host([disabled][checked]) .icon:after,
42
- :host([disabled][readonly][checked]) .icon:after {
43
- background: var(--mdc-staticradio-inner-circle-disabled-background);
44
- }
36
+ :host([disabled][checked]) .icon,
37
+ :host([disabled][readonly][checked]) .icon {
38
+ border: var(--mdc-staticradio-control-active-disabled-background);
39
+ background: var(--mdc-staticradio-control-active-disabled-background);
40
+ }
45
41
 
46
- .icon {
47
- position: absolute;
48
- top: 0;
49
- left: 0;
50
- width: 1rem;
51
- height: 1rem;
52
- border: 0.0625rem solid var(--mdc-staticradio-normal-border-color);
53
- background-color: var(--mdc-staticradio-control-inactive-color);
54
- border-radius: 50%;
55
- }
42
+ :host([disabled][checked]) .icon:after,
43
+ :host([disabled][readonly][checked]) .icon:after {
44
+ background: var(--mdc-staticradio-inner-circle-disabled-background);
45
+ }
56
46
 
57
- :host([checked]) .icon {
58
- border-color: var(--mdc-staticradio-control-active-color);
59
- background-color: var(--mdc-staticradio-control-active-color);
60
- }
47
+ .icon {
48
+ position: absolute;
49
+ top: 0;
50
+ left: 0;
51
+ width: 1rem;
52
+ height: 1rem;
53
+ border: 0.0625rem solid var(--mdc-staticradio-normal-border-color);
54
+ background-color: var(--mdc-staticradio-control-inactive-color);
55
+ border-radius: 50%;
56
+ }
61
57
 
62
- :host([checked]) .icon:after {
63
- display: block;
64
- top: 50%;
65
- left: 50%;
66
- transform: translate(-50%, -50%);
67
- width: var(--mdc-staticradio-inner-circle-size);
68
- height: var(--mdc-staticradio-inner-circle-size);
69
- border-radius: 50%;
70
- background: var(--mdc-staticradio-inner-circle-normal-background);
71
- }
58
+ :host([checked]) .icon {
59
+ border-color: var(--mdc-staticradio-control-active-color);
60
+ background-color: var(--mdc-staticradio-control-active-color);
61
+ }
72
62
 
73
- :host([readonly]) .icon{
74
- border-color: var(--mdc-staticradio-normal-border-color);
75
- background-color: var(--mdc-staticradio-control-inactive-color);
76
- }
63
+ :host([checked]) .icon:after {
64
+ display: block;
65
+ top: 50%;
66
+ left: 50%;
67
+ transform: translate(-50%, -50%);
68
+ width: var(--mdc-staticradio-inner-circle-size);
69
+ height: var(--mdc-staticradio-inner-circle-size);
70
+ border-radius: 50%;
71
+ background: var(--mdc-staticradio-inner-circle-normal-background);
72
+ }
77
73
 
78
- :host([readonly][checked]) .icon {
79
- border-color: var(--mdc-staticradio-normal-border-color);
80
- }
81
-
82
- :host([readonly][checked]) .icon:after{
83
- background-color: var(--mdc-staticradio-text-disabled-color);
84
- }
85
- `];
74
+ :host([readonly]) .icon {
75
+ border-color: var(--mdc-staticradio-normal-border-color);
76
+ background-color: var(--mdc-staticradio-control-inactive-color);
77
+ }
78
+
79
+ :host([readonly][checked]) .icon {
80
+ border-color: var(--mdc-staticradio-normal-border-color);
81
+ }
82
+
83
+ :host([readonly][checked]) .icon:after {
84
+ background-color: var(--mdc-staticradio-text-disabled-color);
85
+ }
86
+ `,
87
+ ];
86
88
  export default styles;
@@ -31,9 +31,9 @@ declare const StaticToggle_base: import("../../utils/mixins/index.types").Constr
31
31
  */
32
32
  declare class StaticToggle extends StaticToggle_base {
33
33
  /**
34
- * Determines whether the toggle is active or inactive.
35
- * @default false
36
- */
34
+ * Determines whether the toggle is active or inactive.
35
+ * @default false
36
+ */
37
37
  checked: boolean;
38
38
  /**
39
39
  * Determines toggle size in rem (height is specified here).
@@ -44,9 +44,9 @@ class StaticToggle extends DisabledMixin(Component) {
44
44
  constructor() {
45
45
  super(...arguments);
46
46
  /**
47
- * Determines whether the toggle is active or inactive.
48
- * @default false
49
- */
47
+ * Determines whether the toggle is active or inactive.
48
+ * @default false
49
+ */
50
50
  this.checked = false;
51
51
  /**
52
52
  * Determines toggle size in rem (height is specified here).