@material/web 1.0.0-pre.14 → 1.0.0-pre.15

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 (258) hide show
  1. package/README.md +5 -5
  2. package/all.d.ts +4 -8
  3. package/all.js +4 -8
  4. package/all.js.map +1 -1
  5. package/button/{_tonal-button.scss → _filled-tonal-button.scss} +1 -1
  6. package/button/{tonal-button.d.ts → filled-tonal-button.d.ts} +3 -3
  7. package/button/{tonal-button.js → filled-tonal-button.js} +9 -9
  8. package/button/filled-tonal-button.js.map +1 -0
  9. package/button/internal/{_tonal-button.scss → _filled-tonal-button.scss} +7 -7
  10. package/button/internal/_shared.scss +12 -7
  11. package/button/internal/_touch-target.scss +5 -1
  12. package/button/internal/button.d.ts +6 -10
  13. package/button/internal/button.js +10 -43
  14. package/button/internal/button.js.map +1 -1
  15. package/button/internal/elevated-styles.css.js +1 -1
  16. package/button/internal/elevated-styles.css.js.map +1 -1
  17. package/button/internal/filled-styles.css.js +1 -1
  18. package/button/internal/filled-styles.css.js.map +1 -1
  19. package/button/internal/{tonal-button.d.ts → filled-tonal-button.d.ts} +2 -2
  20. package/button/internal/{tonal-button.js → filled-tonal-button.js} +3 -3
  21. package/button/internal/filled-tonal-button.js.map +1 -0
  22. package/button/internal/filled-tonal-styles.css.js +9 -0
  23. package/button/internal/filled-tonal-styles.css.js.map +1 -0
  24. package/button/internal/{tonal-styles.scss → filled-tonal-styles.scss} +2 -2
  25. package/button/internal/outlined-styles.css.js +1 -1
  26. package/button/internal/outlined-styles.css.js.map +1 -1
  27. package/button/internal/shared-styles.css.js +1 -1
  28. package/button/internal/shared-styles.css.js.map +1 -1
  29. package/button/internal/text-styles.css.js +1 -1
  30. package/button/internal/text-styles.css.js.map +1 -1
  31. package/checkbox/internal/_checkbox.scss +22 -78
  32. package/checkbox/internal/checkbox-styles.css.js +1 -1
  33. package/checkbox/internal/checkbox-styles.css.js.map +1 -1
  34. package/checkbox/internal/checkbox.d.ts +77 -6
  35. package/checkbox/internal/checkbox.js +123 -14
  36. package/checkbox/internal/checkbox.js.map +1 -1
  37. package/chips/internal/_shared.scss +8 -0
  38. package/chips/internal/chip-set.js +1 -3
  39. package/chips/internal/chip-set.js.map +1 -1
  40. package/chips/internal/chip.js +1 -3
  41. package/chips/internal/chip.js.map +1 -1
  42. package/chips/internal/filter-chip.d.ts +1 -0
  43. package/chips/internal/filter-chip.js +12 -6
  44. package/chips/internal/filter-chip.js.map +1 -1
  45. package/chips/internal/shared-styles.css.js +1 -1
  46. package/chips/internal/shared-styles.css.js.map +1 -1
  47. package/common.d.ts +2 -6
  48. package/common.js +2 -6
  49. package/common.js.map +1 -1
  50. package/dialog/harness.d.ts +1 -6
  51. package/dialog/harness.js +2 -43
  52. package/dialog/harness.js.map +1 -1
  53. package/dialog/internal/_dialog.scss +165 -281
  54. package/dialog/internal/animations.d.ts +47 -0
  55. package/dialog/internal/animations.js +117 -0
  56. package/dialog/internal/animations.js.map +1 -0
  57. package/dialog/internal/dialog-styles.css.js +1 -1
  58. package/dialog/internal/dialog-styles.css.js.map +1 -1
  59. package/dialog/internal/dialog.d.ts +76 -169
  60. package/dialog/internal/dialog.js +251 -475
  61. package/dialog/internal/dialog.js.map +1 -1
  62. package/fab/internal/_fab.scss +4 -0
  63. package/fab/internal/_shared.scss +12 -0
  64. package/fab/internal/fab-styles.css.js +1 -1
  65. package/fab/internal/fab-styles.css.js.map +1 -1
  66. package/fab/internal/shared-styles.css.js +1 -1
  67. package/fab/internal/shared-styles.css.js.map +1 -1
  68. package/fab/internal/shared.d.ts +0 -4
  69. package/fab/internal/shared.js +3 -13
  70. package/fab/internal/shared.js.map +1 -1
  71. package/focus/internal/_focus-ring.scss +52 -48
  72. package/focus/internal/focus-ring-styles.css.js +1 -1
  73. package/focus/internal/focus-ring-styles.css.js.map +1 -1
  74. package/focus/internal/focus-ring.d.ts +2 -1
  75. package/focus/internal/focus-ring.js +10 -0
  76. package/focus/internal/focus-ring.js.map +1 -1
  77. package/icon/internal/_icon.scss +18 -17
  78. package/icon/internal/icon-styles.css.js +1 -1
  79. package/icon/internal/icon-styles.css.js.map +1 -1
  80. package/icon/internal/icon.d.ts +1 -0
  81. package/icon/internal/icon.js +9 -0
  82. package/icon/internal/icon.js.map +1 -1
  83. package/iconbutton/{_standard-icon-button.scss → _icon-button.scss} +1 -1
  84. package/iconbutton/{standard-icon-button.d.ts → icon-button.d.ts} +2 -2
  85. package/iconbutton/{standard-icon-button.js → icon-button.js} +7 -7
  86. package/iconbutton/icon-button.js.map +1 -0
  87. package/iconbutton/internal/_filled-icon-button.scss +8 -6
  88. package/iconbutton/internal/_filled-tonal-icon-button.scss +8 -6
  89. package/iconbutton/internal/{_standard-icon-button.scss → _icon-button.scss} +8 -8
  90. package/iconbutton/internal/_outlined-icon-button.scss +14 -14
  91. package/iconbutton/internal/_shared.scss +6 -9
  92. package/iconbutton/internal/filled-styles.css.js +1 -1
  93. package/iconbutton/internal/filled-styles.css.js.map +1 -1
  94. package/iconbutton/internal/filled-tonal-styles.css.js +1 -1
  95. package/iconbutton/internal/filled-tonal-styles.css.js.map +1 -1
  96. package/iconbutton/internal/icon-button.d.ts +10 -1
  97. package/iconbutton/internal/icon-button.js +17 -2
  98. package/iconbutton/internal/icon-button.js.map +1 -1
  99. package/iconbutton/internal/outlined-styles.css.js +1 -1
  100. package/iconbutton/internal/outlined-styles.css.js.map +1 -1
  101. package/iconbutton/internal/shared-styles.css.js +1 -1
  102. package/iconbutton/internal/shared-styles.css.js.map +1 -1
  103. package/iconbutton/internal/standard-styles.css.js +1 -1
  104. package/iconbutton/internal/standard-styles.css.js.map +1 -1
  105. package/iconbutton/internal/standard-styles.scss +2 -2
  106. package/internal/aria/delegate.d.ts +1 -1
  107. package/internal/aria/delegate.js +1 -1
  108. package/internal/aria/delegate.js.map +1 -1
  109. package/internal/controller/element-internals.d.ts +35 -0
  110. package/internal/controller/element-internals.js +24 -0
  111. package/internal/controller/element-internals.js.map +1 -0
  112. package/internal/controller/form-submitter.d.ts +60 -0
  113. package/internal/controller/form-submitter.js +69 -0
  114. package/internal/controller/form-submitter.js.map +1 -0
  115. package/labs/navigationbar/internal/navigation-bar.js +1 -3
  116. package/labs/navigationbar/internal/navigation-bar.js.map +1 -1
  117. package/labs/navigationdrawer/internal/navigation-drawer-modal.js +1 -3
  118. package/labs/navigationdrawer/internal/navigation-drawer-modal.js.map +1 -1
  119. package/labs/navigationdrawer/internal/navigation-drawer.js +1 -3
  120. package/labs/navigationdrawer/internal/navigation-drawer.js.map +1 -1
  121. package/labs/navigationtab/internal/navigation-tab.js +1 -3
  122. package/labs/navigationtab/internal/navigation-tab.js.map +1 -1
  123. package/labs/segmentedbutton/internal/outlined-styles.css.js +1 -1
  124. package/labs/segmentedbutton/internal/outlined-styles.css.js.map +1 -1
  125. package/labs/segmentedbutton/internal/segmented-button.js +1 -3
  126. package/labs/segmentedbutton/internal/segmented-button.js.map +1 -1
  127. package/labs/segmentedbuttonset/internal/outlined-styles.css.js +1 -1
  128. package/labs/segmentedbuttonset/internal/outlined-styles.css.js.map +1 -1
  129. package/labs/segmentedbuttonset/internal/segmented-button-set.js +1 -3
  130. package/labs/segmentedbuttonset/internal/segmented-button-set.js.map +1 -1
  131. package/list/internal/list.d.ts +2 -2
  132. package/list/internal/list.js +1 -3
  133. package/list/internal/list.js.map +1 -1
  134. package/list/internal/listitem/_list-item.scss +20 -54
  135. package/list/internal/listitem/list-item-styles.css.js +1 -1
  136. package/list/internal/listitem/list-item-styles.css.js.map +1 -1
  137. package/list/internal/listitem/list-item.d.ts +15 -3
  138. package/list/internal/listitem/list-item.js +43 -10
  139. package/list/internal/listitem/list-item.js.map +1 -1
  140. package/menu/internal/menu.js +3 -4
  141. package/menu/internal/menu.js.map +1 -1
  142. package/menu/internal/menuitem/_menu-item.scss +1 -1
  143. package/menu/internal/menuitem/forced-colors-styles.css.js +1 -1
  144. package/menu/internal/menuitem/forced-colors-styles.css.js.map +1 -1
  145. package/menu/internal/menuitem/forced-colors-styles.scss +1 -1
  146. package/menu/internal/menuitem/menu-item-styles.css.js +1 -1
  147. package/menu/internal/menuitem/menu-item-styles.css.js.map +1 -1
  148. package/menu/internal/menuitem/menu-item.d.ts +9 -0
  149. package/menu/internal/menuitem/menu-item.js +18 -4
  150. package/menu/internal/menuitem/menu-item.js.map +1 -1
  151. package/menu/internal/shared.d.ts +45 -38
  152. package/menu/internal/shared.js +29 -40
  153. package/menu/internal/shared.js.map +1 -1
  154. package/menu/internal/submenuitem/sub-menu-item.d.ts +22 -12
  155. package/menu/internal/submenuitem/sub-menu-item.js +39 -24
  156. package/menu/internal/submenuitem/sub-menu-item.js.map +1 -1
  157. package/menu/menu-item.d.ts +1 -1
  158. package/menu/menu-item.js +0 -1
  159. package/menu/menu-item.js.map +1 -1
  160. package/menu/menu.d.ts +1 -1
  161. package/menu/menu.js +0 -1
  162. package/menu/menu.js.map +1 -1
  163. package/menu/sub-menu-item.d.ts +1 -1
  164. package/menu/sub-menu-item.js +0 -1
  165. package/menu/sub-menu-item.js.map +1 -1
  166. package/package.json +1 -3
  167. package/progress/internal/progress.js +1 -3
  168. package/progress/internal/progress.js.map +1 -1
  169. package/radio/internal/_radio.scss +38 -24
  170. package/radio/internal/forced-colors-styles.css.js +1 -1
  171. package/radio/internal/forced-colors-styles.css.js.map +1 -1
  172. package/radio/internal/forced-colors-styles.scss +4 -4
  173. package/radio/internal/radio-styles.css.js +1 -1
  174. package/radio/internal/radio-styles.css.js.map +1 -1
  175. package/radio/internal/radio.js +7 -6
  176. package/radio/internal/radio.js.map +1 -1
  177. package/select/internal/_filled-select.scss +2 -2
  178. package/select/internal/_outlined-select.scss +2 -2
  179. package/select/internal/_shared.scss +30 -0
  180. package/select/internal/filled-select-styles.css.js +1 -1
  181. package/select/internal/filled-select-styles.css.js.map +1 -1
  182. package/select/internal/outlined-select-styles.css.js +1 -1
  183. package/select/internal/outlined-select-styles.css.js.map +1 -1
  184. package/select/internal/select.d.ts +0 -5
  185. package/select/internal/select.js +11 -16
  186. package/select/internal/select.js.map +1 -1
  187. package/select/internal/selectoption/select-option.d.ts +5 -6
  188. package/select/internal/selectoption/select-option.js +8 -9
  189. package/select/internal/selectoption/select-option.js.map +1 -1
  190. package/select/internal/shared-styles.css.js +1 -1
  191. package/select/internal/shared-styles.css.js.map +1 -1
  192. package/select/internal/shared.d.ts +5 -9
  193. package/select/internal/shared.js +13 -11
  194. package/select/internal/shared.js.map +1 -1
  195. package/slider/internal/slider.js +1 -3
  196. package/slider/internal/slider.js.map +1 -1
  197. package/switch/internal/_handle.scss +12 -12
  198. package/switch/internal/_icon.scss +8 -8
  199. package/switch/internal/_track.scss +10 -10
  200. package/switch/internal/forced-colors-styles.css.js +1 -1
  201. package/switch/internal/forced-colors-styles.css.js.map +1 -1
  202. package/switch/internal/forced-colors-styles.scss +12 -12
  203. package/switch/internal/switch-styles.css.js +1 -1
  204. package/switch/internal/switch-styles.css.js.map +1 -1
  205. package/switch/internal/switch.js +1 -3
  206. package/switch/internal/switch.js.map +1 -1
  207. package/tabs/internal/_tab.scss +1 -1
  208. package/tabs/internal/_tabs.scss +1 -0
  209. package/tabs/internal/tab.d.ts +3 -9
  210. package/tabs/internal/tab.js +4 -7
  211. package/tabs/internal/tab.js.map +1 -1
  212. package/tabs/internal/tabs.d.ts +1 -4
  213. package/tabs/internal/tabs.js +5 -10
  214. package/tabs/internal/tabs.js.map +1 -1
  215. package/textfield/harness.js +4 -0
  216. package/textfield/harness.js.map +1 -1
  217. package/textfield/internal/text-field.js +1 -4
  218. package/textfield/internal/text-field.js.map +1 -1
  219. package/tokens/_index.scss +1 -0
  220. package/tokens/_md-comp-checkbox.scss +16 -16
  221. package/tokens/_md-comp-dialog.scss +2 -1
  222. package/tokens/_md-comp-elevated-button.scss +14 -12
  223. package/tokens/_md-comp-filled-button.scss +14 -12
  224. package/tokens/_md-comp-filled-icon-button.scss +23 -8
  225. package/tokens/_md-comp-filled-select.scss +19 -1
  226. package/tokens/_md-comp-filled-tonal-button.scss +14 -12
  227. package/tokens/_md-comp-filled-tonal-icon-button.scss +23 -8
  228. package/tokens/_md-comp-icon-button.scss +24 -11
  229. package/tokens/_md-comp-icon.scss +32 -0
  230. package/tokens/_md-comp-outlined-button.scss +14 -12
  231. package/tokens/_md-comp-outlined-icon-button.scss +26 -12
  232. package/tokens/_md-comp-outlined-segmented-button.scss +2 -2
  233. package/tokens/_md-comp-radio-button.scss +20 -9
  234. package/tokens/_md-comp-switch.scss +66 -32
  235. package/tokens/_md-comp-text-button.scss +14 -12
  236. package/button/internal/tonal-button.js.map +0 -1
  237. package/button/internal/tonal-styles.css.js +0 -9
  238. package/button/internal/tonal-styles.css.js.map +0 -1
  239. package/button/tonal-button.js.map +0 -1
  240. package/dialog/internal/_tokens.scss +0 -66
  241. package/icon/internal/_md-comp-icon.scss +0 -18
  242. package/iconbutton/standard-icon-button.js.map +0 -1
  243. package/list/internal/listitemlink/list-item-link-only.d.ts +0 -23
  244. package/list/internal/listitemlink/list-item-link-only.js +0 -36
  245. package/list/internal/listitemlink/list-item-link-only.js.map +0 -1
  246. package/list/internal/listitemlink/list-item-link.d.ts +0 -18
  247. package/list/internal/listitemlink/list-item-link.js +0 -42
  248. package/list/internal/listitemlink/list-item-link.js.map +0 -1
  249. package/list/list-item-link.d.ts +0 -53
  250. package/list/list-item-link.js +0 -57
  251. package/list/list-item-link.js.map +0 -1
  252. package/menu/internal/menuitemlink/menu-item-link.d.ts +0 -23
  253. package/menu/internal/menuitemlink/menu-item-link.js +0 -49
  254. package/menu/internal/menuitemlink/menu-item-link.js.map +0 -1
  255. package/menu/menu-item-link.d.ts +0 -33
  256. package/menu/menu-item-link.js +0 -38
  257. package/menu/menu-item-link.js.map +0 -1
  258. /package/button/internal/{tonal-styles.css.d.ts → filled-tonal-styles.css.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"select-option.js","sourceRoot":"","sources":["select-option.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAGH,OA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C;aACjD;iBAAM;gBACL,IAAI,CAAC,aAAa,CAAC,IAAI,uBAAuB,EAAE,CAAC,CAAC;aACnD;SACF;IACH,CAAC;CACF;AA5Ca;IAAX,QAAQ,EAAE;6CAAY;AAKmB;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;gDAAkB","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {PropertyValues} from 'lit';\nimport {property} from 'lit/decorators.js';\n\nimport {ListItemRole, MenuItemEl} from '../../../menu/internal/menuitem/menu-item.js';\nimport {RequestDeselectionEvent, RequestSelectionEvent, SelectOption} from '../shared.js';\n\n/**\n * @fires close-menu {CloseMenuEvent} Closes the encapsulating menu on\n * @fires request-selection {RequestSelectionEvent} Requests the parent\n * md-select to select this element (and deselect others if single-selection)\n * when `selected` changed to `true`.\n * @fires request-deselection {RequestDeselectionEvent} Requests the parent\n * md-select to deselect this element when `selected` changed to `false`.\n */\nexport class SelectOptionEl extends MenuItemEl implements SelectOption {\n /**\n * Form value of the option.\n */\n @property() value = '';\n\n /**\n * Whether or not this option is selected.\n */\n @property({type: Boolean, reflect: true}) selected = false;\n\n override readonly type: ListItemRole = 'option';\n\n override willUpdate(changed: PropertyValues<this>) {\n if (changed.has('selected')) {\n // Synchronize selected -> active but not the other way around because\n // active is used for keyboard navigation and doesn't mean the option\n // should be selected if active.\n this.active = this.selected;\n this.ariaSelected = this.selected ? 'true' : 'false';\n // By default active = true focuses the element. We want to prevent that\n // in this case because we set active = this.selected and that may mess\n // around with menu's restore focus function once the menu closes.\n this.focusOnActivation = false;\n }\n\n super.willUpdate(changed);\n }\n\n override updated(changed: PropertyValues<this>) {\n super.updated(changed);\n // Restore the active = true focusing behavior which happens in\n // super.updated() if it was turned off.\n this.focusOnActivation = true;\n\n // Do not dispatch event on first update / boot-up.\n if (changed.has('selected') && changed.get('selected') !== undefined) {\n // This section is really useful for when the user sets selected on the\n // option programmatically. Most other cases (click and keyboard) are\n // handled by md-select because it needs to coordinate the\n // single-selection behavior.\n if (this.selected) {\n this.dispatchEvent(new RequestSelectionEvent());\n } else {\n this.dispatchEvent(new RequestDeselectionEvent());\n }\n }\n }\n}\n"]}
1
+ {"version":3,"file":"select-option.js","sourceRoot":"","sources":["select-option.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAGH,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAe,UAAU,EAAC,MAAM,8CAA8C,CAAC;AACtF,OAAO,EAAC,6BAA6B,EAAE,2BAA2B,EAAe,MAAM,cAAc,CAAC;AAEtG;;;;;;GAMG;AACH,MAAM,OAAO,cAAe,SAAQ,UAAU;IAA9C;;QACE;;WAEG;QACS,UAAK,GAAG,EAAE,CAAC;QAEvB;;WAEG;QACuC,aAAQ,GAAG,KAAK,CAAC;QAEzC,SAAI,GAAiB,QAAQ,CAAC;IAqClD,CAAC;IAnCU,UAAU,CAAC,OAA6B;QAC/C,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;YAC3B,sEAAsE;YACtE,qEAAqE;YACrE,gCAAgC;YAChC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC;YAC5B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;YACrD,wEAAwE;YACxE,uEAAuE;YACvE,kEAAkE;YAClE,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;SAChC;QAED,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IAEQ,OAAO,CAAC,OAA6B;QAC5C,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACvB,+DAA+D;QAC/D,wCAAwC;QACxC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAE9B,mDAAmD;QACnD,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,SAAS,EAAE;YACpE,uEAAuE;YACvE,qEAAqE;YACrE,0DAA0D;YAC1D,6BAA6B;YAC7B,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACjB,IAAI,CAAC,aAAa,CAAC,2BAA2B,EAAE,CAAC,CAAC;aACnD;iBAAM;gBACL,IAAI,CAAC,aAAa,CAAC,6BAA6B,EAAE,CAAC,CAAC;aACrD;SACF;IACH,CAAC;CACF;AA5Ca;IAAX,QAAQ,EAAE;6CAAY;AAKmB;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;gDAAkB","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {PropertyValues} from 'lit';\nimport {property} from 'lit/decorators.js';\n\nimport {ListItemRole, MenuItemEl} from '../../../menu/internal/menuitem/menu-item.js';\nimport {createRequestDeselectionEvent, createRequestSelectionEvent, SelectOption} from '../shared.js';\n\n/**\n * @fires close-menu Closes the encapsulating menu on\n * @fires request-selection Requests the parent md-select to select this element\n * (and deselect others if single-selection) when `selected` changed to `true`.\n * @fires request-deselection Requests the parent md-select to deselect this\n * element when `selected` changed to `false`.\n */\nexport class SelectOptionEl extends MenuItemEl implements SelectOption {\n /**\n * Form value of the option.\n */\n @property() value = '';\n\n /**\n * Whether or not this option is selected.\n */\n @property({type: Boolean, reflect: true}) selected = false;\n\n override readonly type: ListItemRole = 'option';\n\n override willUpdate(changed: PropertyValues<this>) {\n if (changed.has('selected')) {\n // Synchronize selected -> active but not the other way around because\n // active is used for keyboard navigation and doesn't mean the option\n // should be selected if active.\n this.active = this.selected;\n this.ariaSelected = this.selected ? 'true' : 'false';\n // By default active = true focuses the element. We want to prevent that\n // in this case because we set active = this.selected and that may mess\n // around with menu's restore focus function once the menu closes.\n this.focusOnActivation = false;\n }\n\n super.willUpdate(changed);\n }\n\n override updated(changed: PropertyValues<this>) {\n super.updated(changed);\n // Restore the active = true focusing behavior which happens in\n // super.updated() if it was turned off.\n this.focusOnActivation = true;\n\n // Do not dispatch event on first update / boot-up.\n if (changed.has('selected') && changed.get('selected') !== undefined) {\n // This section is really useful for when the user sets selected on the\n // option programmatically. Most other cases (click and keyboard) are\n // handled by md-select because it needs to coordinate the\n // single-selection behavior.\n if (this.selected) {\n this.dispatchEvent(createRequestSelectionEvent());\n } else {\n this.dispatchEvent(createRequestDeselectionEvent());\n }\n }\n }\n}\n"]}
@@ -4,6 +4,6 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { css } from 'lit';
7
- export const styles = css `:host{color:unset;min-width:210px}.field{cursor:default;outline:none}.select{position:relative}.field,.select,md-menu{min-width:inherit;width:inherit;max-width:inherit}.field,.select{width:100%}:host{display:inline-flex}:host([disabled]){pointer-events:none}/*# sourceMappingURL=shared-styles.css.map */
7
+ export const styles = css `:host{color:unset;min-width:210px}.field{cursor:default;outline:none}.select{position:relative}.icon.trailing svg,.icon ::slotted(*){fill:currentColor}.icon ::slotted(*){width:inherit;height:inherit;font-size:inherit}.icon slot{display:flex;height:100%;width:100%;align-items:center;justify-content:center}.icon.trailing :is(.up,.down){opacity:0;transition:opacity 75ms linear 75ms}.select:not(.open) .down,.select.open .up{opacity:1}.field,.select,md-menu{min-width:inherit;width:inherit;max-width:inherit}.field,.select{width:100%}:host{display:inline-flex}:host([disabled]){pointer-events:none}/*# sourceMappingURL=shared-styles.css.map */
8
8
  `;
9
9
  //# sourceMappingURL=shared-styles.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared-styles.css.js","sourceRoot":"","sources":["shared-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`:host{color:unset;min-width:210px}.field{cursor:default;outline:none}.select{position:relative}.field,.select,md-menu{min-width:inherit;width:inherit;max-width:inherit}.field,.select{width:100%}:host{display:inline-flex}:host([disabled]){pointer-events:none}/*# sourceMappingURL=shared-styles.css.map */\n`;\n "]}
1
+ {"version":3,"file":"shared-styles.css.js","sourceRoot":"","sources":["shared-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`:host{color:unset;min-width:210px}.field{cursor:default;outline:none}.select{position:relative}.icon.trailing svg,.icon ::slotted(*){fill:currentColor}.icon ::slotted(*){width:inherit;height:inherit;font-size:inherit}.icon slot{display:flex;height:100%;width:100%;align-items:center;justify-content:center}.icon.trailing :is(.up,.down){opacity:0;transition:opacity 75ms linear 75ms}.select:not(.open) .down,.select.open .up{opacity:1}.field,.select,md-menu{min-width:inherit;width:inherit;max-width:inherit}.field,.select{width:100%}:host{display:inline-flex}:host([disabled]){pointer-events:none}/*# sourceMappingURL=shared-styles.css.map */\n`;\n "]}
@@ -36,17 +36,13 @@ export type SelectOptionRecord = [SelectOption, number];
36
36
  */
37
37
  export declare function getSelectedItems(items: SelectOption[]): SelectOptionRecord[];
38
38
  /**
39
- * An event fired by a SelectOption to request selection from md-select.
39
+ * Creates an event fired by a SelectOption to request selection from md-select.
40
40
  * Typically fired after `selected` changes from `false` to `true`.
41
41
  */
42
- export declare class RequestSelectionEvent extends Event {
43
- constructor();
44
- }
42
+ export declare function createRequestSelectionEvent(): Event;
45
43
  /**
46
- * An event fired by a SelectOption to request deselection from md-select.
47
- * Typically fired after `selected` changes from `true` to `false`.
44
+ * Creates an event fired by a SelectOption to request deselection from
45
+ * md-select. Typically fired after `selected` changes from `true` to `false`.
48
46
  */
49
- export declare class RequestDeselectionEvent extends Event {
50
- constructor();
51
- }
47
+ export declare function createRequestDeselectionEvent(): Event;
52
48
  export {};
@@ -21,21 +21,23 @@ export function getSelectedItems(items) {
21
21
  return selectedItemRecords;
22
22
  }
23
23
  /**
24
- * An event fired by a SelectOption to request selection from md-select.
24
+ * Creates an event fired by a SelectOption to request selection from md-select.
25
25
  * Typically fired after `selected` changes from `false` to `true`.
26
26
  */
27
- export class RequestSelectionEvent extends Event {
28
- constructor() {
29
- super('request-selection', { bubbles: true, composed: true });
30
- }
27
+ export function createRequestSelectionEvent() {
28
+ return new Event('request-selection', {
29
+ bubbles: true,
30
+ composed: true,
31
+ });
31
32
  }
32
33
  /**
33
- * An event fired by a SelectOption to request deselection from md-select.
34
- * Typically fired after `selected` changes from `true` to `false`.
34
+ * Creates an event fired by a SelectOption to request deselection from
35
+ * md-select. Typically fired after `selected` changes from `true` to `false`.
35
36
  */
36
- export class RequestDeselectionEvent extends Event {
37
- constructor() {
38
- super('request-deselection', { bubbles: true, composed: true });
39
- }
37
+ export function createRequestDeselectionEvent() {
38
+ return new Event('request-deselection', {
39
+ bubbles: true,
40
+ composed: true,
41
+ });
40
42
  }
41
43
  //# sourceMappingURL=shared.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js","sourceRoot":"","sources":["shared.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA8BH;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAqB;IACpD,MAAM,mBAAmB,GAAyB,EAAE,CAAC;IAErD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,mBAAmB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;SACrC;KACF;IAED,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAED;;;GAGG;AACH,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC9C;QACE,KAAK,CAAC,mBAAmB,EAAE,EAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC;IAC9D,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,OAAO,uBAAwB,SAAQ,KAAK;IAChD;QACE,KAAK,CAAC,qBAAqB,EAAE,EAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC;IAChE,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {MenuItem} from '../../menu/internal/shared.js';\n\n/**\n * The interface specific to a Select Option\n */\ninterface SelectOptionSelf {\n /**\n * The form value associated with the Select Option. (Note: the visual portion\n * of the SelectOption is the headline defined in ListItem)\n */\n value: string;\n /**\n * Whether or not the SelectOption is selected.\n */\n selected: boolean;\n}\n\n/**\n * The interface to implement for a select option. Additionally, the element\n * must have `md-list-item` and `md-menu-item` attributes on the host.\n */\nexport type SelectOption = SelectOptionSelf&MenuItem;\n\n/**\n * A type that describes a SelectOption and its index.\n */\nexport type SelectOptionRecord = [SelectOption, number];\n\n/**\n * Given a list of select options, this function will return an array of\n * SelectOptionRecords that are selected.\n * \n * @return An array of SelectOptionRecords describing the options that are\n * selected.\n */\nexport function getSelectedItems(items: SelectOption[]) {\n const selectedItemRecords: SelectOptionRecord[] = [];\n\n for (let i = 0; i < items.length; i++) {\n const item = items[i];\n if (item.selected) {\n selectedItemRecords.push([item, i]);\n }\n }\n\n return selectedItemRecords;\n}\n\n/**\n * An event fired by a SelectOption to request selection from md-select.\n * Typically fired after `selected` changes from `false` to `true`.\n */\nexport class RequestSelectionEvent extends Event {\n constructor() {\n super('request-selection', {bubbles: true, composed: true});\n }\n}\n\n/**\n * An event fired by a SelectOption to request deselection from md-select.\n * Typically fired after `selected` changes from `true` to `false`.\n */\nexport class RequestDeselectionEvent extends Event {\n constructor() {\n super('request-deselection', {bubbles: true, composed: true});\n }\n}\n"]}
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["shared.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA8BH;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAqB;IACpD,MAAM,mBAAmB,GAAyB,EAAE,CAAC;IAErD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,mBAAmB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;SACrC;KACF;IAED,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,2BAA2B;IACzC,OAAO,IAAI,KAAK,CAAC,mBAAmB,EAAE;QACpC,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,IAAI;KACf,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,6BAA6B;IAC3C,OAAO,IAAI,KAAK,CAAC,qBAAqB,EAAE;QACtC,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,IAAI;KACf,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {MenuItem} from '../../menu/internal/shared.js';\n\n/**\n * The interface specific to a Select Option\n */\ninterface SelectOptionSelf {\n /**\n * The form value associated with the Select Option. (Note: the visual portion\n * of the SelectOption is the headline defined in ListItem)\n */\n value: string;\n /**\n * Whether or not the SelectOption is selected.\n */\n selected: boolean;\n}\n\n/**\n * The interface to implement for a select option. Additionally, the element\n * must have `md-list-item` and `md-menu-item` attributes on the host.\n */\nexport type SelectOption = SelectOptionSelf&MenuItem;\n\n/**\n * A type that describes a SelectOption and its index.\n */\nexport type SelectOptionRecord = [SelectOption, number];\n\n/**\n * Given a list of select options, this function will return an array of\n * SelectOptionRecords that are selected.\n *\n * @return An array of SelectOptionRecords describing the options that are\n * selected.\n */\nexport function getSelectedItems(items: SelectOption[]) {\n const selectedItemRecords: SelectOptionRecord[] = [];\n\n for (let i = 0; i < items.length; i++) {\n const item = items[i];\n if (item.selected) {\n selectedItemRecords.push([item, i]);\n }\n }\n\n return selectedItemRecords;\n}\n\n/**\n * Creates an event fired by a SelectOption to request selection from md-select.\n * Typically fired after `selected` changes from `false` to `true`.\n */\nexport function createRequestSelectionEvent() {\n return new Event('request-selection', {\n bubbles: true,\n composed: true,\n });\n}\n\n/**\n * Creates an event fired by a SelectOption to request deselection from\n * md-select. Typically fired after `selected` changes from `true` to `false`.\n */\nexport function createRequestDeselectionEvent() {\n return new Event('request-deselection', {\n bubbles: true,\n composed: true,\n });\n}\n"]}
@@ -3,7 +3,6 @@
3
3
  * Copyright 2023 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- var _a;
7
6
  import { __decorate } from "tslib";
8
7
  import '../../elevation/elevation.js';
9
8
  import '../../focus/md-focus-ring.js';
@@ -515,9 +514,8 @@ export class Slider extends LitElement {
515
514
  this.range = false;
516
515
  }
517
516
  }
518
- _a = Slider;
519
517
  (() => {
520
- requestUpdateOnAriaChange(_a);
518
+ requestUpdateOnAriaChange(Slider);
521
519
  })();
522
520
  /** @nocollapse */
523
521
  Slider.shadowRootOptions = { ...LitElement.shadowRootOptions, delegatesFocus: true };
@@ -1 +1 @@
1
- {"version":3,"file":"slider.js","sourceRoot":"","sources":["slider.ts"],"names":[],"mappings":"AAAA;;;;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AAK,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG;QACxD,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../elevation/elevation.js';\nimport '../../focus/md-focus-ring.js';\nimport '../../ripple/ripple.js';\n\nimport {html, isServer, LitElement, nothing, PropertyValues} from 'lit';\nimport {property, query, queryAsync, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {styleMap} from 'lit/directives/style-map.js';\nimport {when} from 'lit/directives/when.js';\n\nimport {ARIAMixinStrict} from '../../internal/aria/aria.js';\nimport {requestUpdateOnAriaChange} from '../../internal/aria/delegate.js';\nimport {dispatchActivationClick, isActivationClick, redispatchEvent} from '../../internal/controller/events.js';\nimport {MdRipple} from '../../ripple/ripple.js';\n\n// Disable warning for classMap with destructuring\n// tslint:disable:quoted-properties-on-dictionary\n\n\n/**\n * Slider component.\n */\nexport class Slider extends LitElement {\n static {\n requestUpdateOnAriaChange(this);\n }\n\n /** @nocollapse */\n static override shadowRootOptions:\n ShadowRootInit = {...LitElement.shadowRootOptions, delegatesFocus: true};\n\n /** @nocollapse */\n static formAssociated = true;\n\n /**\n * Whether or not the slider is disabled.\n */\n @property({type: Boolean, reflect: true}) disabled = false;\n\n /**\n * The slider minimum value\n */\n @property({type: Number}) min = 0;\n\n /**\n * The slider maximum value\n */\n @property({type: Number}) max = 100;\n\n /**\n * The slider value displayed when range is false.\n */\n @property({type: Number}) value?: number;\n\n /**\n * The slider start value displayed when range is true.\n */\n @property({type: Number, attribute: 'value-start'}) valueStart?: number;\n\n /**\n * The slider end value displayed when range is true.\n */\n @property({type: Number, attribute: 'value-end'}) valueEnd?: number;\n\n /**\n * An optional label for the slider's value displayed when range is\n * false; if not set, the label is the value itself.\n */\n @property({attribute: 'value-label'}) valueLabel?: string;\n\n /**\n * An optional label for the slider's start value displayed when\n * range is true; if not set, the label is the valueStart itself.\n */\n @property({attribute: 'value-label-start'}) valueLabelStart?: string;\n\n /**\n * An optional label for the slider's end value displayed when\n * range is true; if not set, the label is the valueEnd itself.\n */\n @property({attribute: 'value-label-end'}) valueLabelEnd?: string;\n\n /**\n * Aria label for the slider's start value displayed when\n * range is true.\n */\n @property({attribute: 'aria-label-start'}) ariaLabelStart?: string;\n\n /**\n * Aria label for the slider's end value displayed when\n * range is true.\n */\n @property({attribute: 'aria-label-end'}) ariaLabelEnd?: string;\n\n /**\n * The step between values.\n */\n @property({type: Number}) step = 1;\n\n /**\n * Whether or not to show tick marks.\n */\n @property({type: Boolean}) ticks = false;\n\n /**\n * Whether or not to show a value label when activated.\n */\n @property({type: Boolean}) labeled = false;\n\n /**\n * Whether or not to show a value range. When false, the slider displays\n * a slideable handle for the value property; when true, it displays\n * slideable handles for the valueStart and valueEnd properties.\n */\n @property({type: Boolean}) range = false;\n\n /**\n * The HTML name to use in form submission.\n */\n get name() {\n return this.getAttribute('name') ?? '';\n }\n set name(name: string) {\n this.setAttribute('name', name);\n }\n\n /**\n * The HTML name to use in form submission for a range slider's starting\n * value. Use `name` instead if both the start and end values should use the\n * same name.\n */\n get nameStart() {\n return this.getAttribute('name-start') ?? this.name;\n }\n set nameStart(name: string) {\n this.setAttribute('name-start', name);\n }\n\n /**\n * The HTML name to use in form submission for a range slider's ending value.\n * Use `name` instead if both the start and end values should use the same\n * name.\n */\n get nameEnd() {\n return this.getAttribute('name-end') ?? this.nameStart;\n }\n set nameEnd(name: string) {\n this.setAttribute('name-end', name);\n }\n\n /**\n * The associated form element with which this element's value will submit.\n */\n get form() {\n return this.internals.form;\n }\n\n /**\n * The labels this element is associated with.\n */\n get labels() {\n return this.internals.labels;\n }\n\n @query('input.start') private readonly inputStart!: HTMLInputElement|null;\n @query('.handle.start') private readonly handleStart!: HTMLDivElement|null;\n @queryAsync('md-ripple.start')\n private readonly rippleStart!: Promise<MdRipple|null>;\n\n @query('input.end') private readonly inputEnd!: HTMLInputElement|null;\n @query('.handle.end') private readonly handleEnd!: HTMLDivElement|null;\n @queryAsync('md-ripple.end')\n private readonly rippleEnd!: Promise<MdRipple|null>;\n\n\n // handle hover/pressed states are set manually since the handle\n // does not receive pointer events so that the native inputs are\n // interaction targets.\n @state() private handleStartHover = false;\n @state() private handleEndHover = false;\n\n @state() private startOnTop = false;\n @state() private handlesOverlapping = false;\n\n @state() private renderValueStart?: number;\n @state() private renderValueEnd?: number;\n\n // used in synthetic events generated to control ripple hover state.\n private ripplePointerId = 1;\n\n // flag to prvent processing of re-dispatched input event.\n private isRedisptchingEvent = false;\n\n private action?: Action;\n\n private readonly internals =\n (this as HTMLElement /* needed for closure */).attachInternals();\n\n constructor() {\n super();\n if (!isServer) {\n this.addEventListener('click', (event: MouseEvent) => {\n if (!isActivationClick(event) || !this.inputEnd) {\n return;\n }\n this.focus();\n dispatchActivationClick(this.inputEnd);\n });\n }\n }\n\n override focus() {\n this.inputEnd?.focus();\n }\n\n protected override willUpdate(changed: PropertyValues) {\n this.renderValueStart = changed.has('valueStart') ?\n this.valueStart :\n this.inputStart?.valueAsNumber;\n const endValueChanged =\n (changed.has('valueEnd') && this.range) || changed.has('value');\n this.renderValueEnd = endValueChanged ?\n (this.range ? this.valueEnd : this.value) :\n this.inputEnd?.valueAsNumber;\n // manually handle ripple hover state since the handle is pointer events\n // none.\n if (changed.get('handleStartHover') !== undefined) {\n this.toggleRippleHover(this.rippleStart, this.handleStartHover);\n } else if (changed.get('handleEndHover') !== undefined) {\n this.toggleRippleHover(this.rippleEnd, this.handleEndHover);\n }\n }\n\n protected override update(changed: PropertyValues<Slider>) {\n if (changed.has('value') || changed.has('range') ||\n changed.has('valueStart') || changed.has('valueEnd')) {\n if (this.range) {\n const data = new FormData();\n data.append(this.nameStart, String(this.valueStart));\n data.append(this.nameEnd, String(this.valueEnd));\n this.internals.setFormValue(data);\n } else {\n this.internals.setFormValue(String(this.value));\n }\n }\n\n super.update(changed);\n }\n\n protected override updated(changed: PropertyValues) {\n // Validate input rendered value and re-render if necessary. This ensures\n // the rendred handle stays in sync with the input thumb which is used for\n // interaction. These can get out of sync if a supplied value does not\n // map to an exactly stepped value between min and max.\n if (this.range) {\n this.renderValueStart = this.inputStart!.valueAsNumber;\n }\n this.renderValueEnd = this.inputEnd!.valueAsNumber;\n // update values if they are unset\n // when using a range, default to equi-distant between\n // min - valueStart - valueEnd - max\n if (this.range) {\n const segment = (this.max - this.min) / 3;\n if (this.valueStart === undefined) {\n this.inputStart!.valueAsNumber = this.min + segment;\n // read actual value from input\n const v = this.inputStart!.valueAsNumber;\n this.valueStart = this.renderValueStart = v;\n }\n if (this.valueEnd === undefined) {\n this.inputEnd!.valueAsNumber = this.min + 2 * segment;\n // read actual value from input\n const v = this.inputEnd!.valueAsNumber;\n this.valueEnd = this.renderValueEnd = v;\n }\n } else {\n this.value ??= this.renderValueEnd;\n }\n if (changed.has('range') || changed.has('renderValueStart') ||\n changed.has('renderValueEnd') || this.isUpdatePending) {\n this.handlesOverlapping = isOverlapping(this.handleStart, this.handleEnd);\n }\n // called to finish the update imediately;\n // note, this is a no-op unless an update is scheduled\n this.performUpdate();\n }\n\n protected override render() {\n const step = this.step === 0 ? 1 : this.step;\n const range = Math.max(this.max - this.min, step);\n const startFraction = this.range ?\n (((this.renderValueStart ?? this.min) - this.min) / range) :\n 0;\n const endFraction = ((this.renderValueEnd ?? this.min) - this.min) / range;\n const containerStyles = {\n // for clipping inputs and active track.\n '--slider-start-fraction': String(startFraction),\n '--slider-end-fraction': String(endFraction),\n // for generating tick marks\n '--slider-tick-count': String(range / step),\n };\n const containerClasses = {ranged: this.range};\n\n // optional label values to show in place of the value.\n const labelStart = this.valueLabelStart ?? String(this.renderValueStart);\n const labelEnd = (this.range ? this.valueLabelEnd : this.valueLabel) ??\n String(this.renderValueEnd);\n\n const inputStartProps = {\n start: true,\n value: this.renderValueStart,\n label: labelStart\n };\n\n const inputEndProps = {\n start: false,\n value: this.renderValueEnd,\n label: labelEnd\n };\n\n const handleStartProps = {\n start: true,\n hover: this.handleStartHover,\n label: labelStart\n };\n\n const handleEndProps = {\n start: false,\n hover: this.handleEndHover,\n label: labelEnd\n };\n\n const handleContainerClasses = {\n hover: this.handleStartHover || this.handleEndHover\n };\n\n return html`\n <div\n class=\"container ${classMap(containerClasses)}\"\n style=${styleMap(containerStyles)}\n >\n ${when(this.range, () => this.renderInput(inputStartProps))}\n ${this.renderInput(inputEndProps)}\n ${this.renderTrack()}\n <div class=\"handleContainerPadded\">\n <div class=\"handleContainerBlock\">\n <div class=\"handleContainer ${classMap(handleContainerClasses)}\">\n ${when(this.range, () => this.renderHandle(handleStartProps))}\n ${this.renderHandle(handleEndProps)}\n </div>\n </div>\n </div>\n </div>`;\n }\n\n private renderTrack() {\n const trackClasses = {'tickmarks': this.ticks};\n return html`<div class=\"track ${classMap(trackClasses)}\"></div>`;\n }\n\n private renderLabel(value: string) {\n return html`<div class=\"label\">\n <span class=\"labelContent\" part=\"label\">${value}</span>\n </div>`;\n }\n\n private renderHandle({start, hover, label}:\n {start: boolean, hover: boolean, label: string}) {\n const onTop = !this.disabled && start === this.startOnTop;\n const isOverlapping = !this.disabled && this.handlesOverlapping;\n const name = start ? 'start' : 'end';\n return html`<div class=\"handle ${classMap({\n [name]: true,\n hover,\n onTop,\n isOverlapping\n })}\">\n <div class=\"handleNub\"><md-elevation></md-elevation></div>\n ${when(this.labeled, () => this.renderLabel(label))}\n <md-focus-ring part=\"focus-ring\" for=${name}></md-focus-ring>\n <md-ripple for=${name} class=${name} ?disabled=${\n this.disabled}></md-ripple>\n </div>`;\n }\n\n private renderInput({start, value, label}:\n {start: boolean; value?: number; label: string;}) {\n const name = start ? `start` : `end`;\n // when ranged, ensure announcement includes value info.\n // Needed for closure conformance\n let {ariaLabel} = this as ARIAMixinStrict;\n const {range, ariaLabelStart, ariaLabelEnd} = this;\n if (range) {\n ariaLabel = (start ? ariaLabelStart : ariaLabelEnd) ?? null;\n }\n return html`<input type=\"range\"\n class=\"${classMap({\n start,\n end: !start\n })}\"\n @focus=${this.handleFocus}\n @pointerdown=${this.handleDown}\n @pointerup=${this.handleUp}\n @pointerenter=${this.handleEnter}\n @pointermove=${this.handleMove}\n @pointerleave=${this.handleLeave}\n @keydown=${this.handleKeydown}\n @keyup=${this.handleKeyup}\n @input=${this.handleInput}\n @change=${this.handleChange}\n id=${name}\n .disabled=${this.disabled}\n .min=${String(this.min)}\n .max=${String(this.max)}\n .step=${String(this.step)}\n .value=${String(value)}\n .tabIndex=${start ? 1 : 0}\n aria-label=${ariaLabel || nothing}\n aria-valuetext=${label}>`;\n }\n\n private async toggleRippleHover(\n ripple: Promise<MdRipple|null>, hovering: boolean) {\n const rippleEl = await ripple;\n if (!rippleEl) {\n return;\n }\n // TODO(b/269799771): improve slider ripple connection\n if (hovering) {\n rippleEl.handlePointerenter(new PointerEvent(\n 'pointerenter', {isPrimary: true, pointerId: this.ripplePointerId}));\n } else {\n rippleEl.handlePointerleave(new PointerEvent(\n 'pointerleave', {isPrimary: true, pointerId: this.ripplePointerId}));\n }\n }\n\n private handleFocus(event: Event) {\n this.updateOnTop(event.target as HTMLInputElement);\n }\n\n private startAction(event: Event) {\n const target = event.target as HTMLInputElement;\n const fixed =\n (target === this.inputStart) ? this.inputEnd! : this.inputStart!;\n this.action = {\n canFlip: event.type === 'pointerdown',\n flipped: false,\n target,\n fixed,\n values: new Map(\n [[target, target.valueAsNumber], [fixed, fixed?.valueAsNumber]])\n };\n }\n\n private finishAction(event: Event) {\n this.action = undefined;\n }\n\n private handleKeydown(event: KeyboardEvent) {\n this.startAction(event);\n }\n\n private handleKeyup(event: KeyboardEvent) {\n this.finishAction(event);\n }\n\n private handleDown(event: PointerEvent) {\n this.startAction(event);\n this.ripplePointerId = event.pointerId;\n const isStart = event.target as HTMLInputElement === this.inputStart;\n // Since handle moves to pointer on down and there may not be a move,\n // it needs to be considered hovered..\n this.handleStartHover =\n !this.disabled && isStart && Boolean(this.handleStart);\n this.handleEndHover = !this.disabled && !isStart && Boolean(this.handleEnd);\n }\n\n private async handleUp(event: PointerEvent) {\n const {target, values, flipped} = this.action ?? {};\n // Async here for Firefox because input can be after pointerup\n // when value is calmped.\n await new Promise(requestAnimationFrame);\n if (target !== undefined) {\n // Ensure Safari focuses input so label renders.\n // Ensure any flipped input is focused so the tab order is right.\n target.focus();\n // When action is flipped, change must be fired manually since the\n // real event target did not change.\n if (flipped && target.valueAsNumber !== values!.get(target)!) {\n target.dispatchEvent(new Event('change', {bubbles: true}));\n }\n }\n this.finishAction(event);\n }\n\n /**\n * The move handler tracks handle hovering to facilitate proper ripple\n * behavior on the slider handle. This is needed because user interaction with\n * the native input is leveraged to position the handle. Because the separate\n * displayed handle element has pointer events disabled (to allow interaction\n * with the input) and the input's handle is a pseudo-element, neither can be\n * the ripple's interactive element. Therefore the input is the ripple's\n * interactive element and has a `ripple` directive; however the ripple\n * is gated on the handle being hovered. In addition, because the ripple\n * hover state is being specially handled, it must be triggered independent\n * of the directive. This is done based on the hover state when the\n * slider is updated.\n */\n private handleMove(event: PointerEvent) {\n this.handleStartHover = !this.disabled && inBounds(event, this.handleStart);\n this.handleEndHover = !this.disabled && inBounds(event, this.handleEnd);\n }\n\n private handleEnter(event: PointerEvent) {\n this.handleMove(event);\n }\n\n private handleLeave() {\n this.handleStartHover = false;\n this.handleEndHover = false;\n }\n\n private updateOnTop(input: HTMLInputElement) {\n this.startOnTop = input.classList.contains('start');\n }\n\n private needsClamping() {\n const {target, fixed} = this.action!;\n const isStart = target === this.inputStart;\n return isStart ? target.valueAsNumber > fixed.valueAsNumber :\n target.valueAsNumber < fixed.valueAsNumber;\n }\n\n // if start/end start coincident and the first drag input would e.g. move\n // start > end, avoid clamping and \"flip\" to use the other input\n // as the action target.\n private isActionFlipped() {\n const action = this.action!;\n const {target, fixed, values} = action;\n if (action.canFlip) {\n const coincident = values.get(target) === values.get(fixed);\n if (coincident && this.needsClamping()) {\n action.canFlip = false;\n action.flipped = true;\n action.target = fixed;\n action.fixed = target;\n }\n }\n return action.flipped;\n }\n\n // when flipped, apply the drag input to the flipped target and reset\n // the actual target.\n private flipAction() {\n const {target, fixed, values} = this.action!;\n const changed = target.valueAsNumber !== fixed.valueAsNumber;\n target.valueAsNumber = fixed.valueAsNumber;\n fixed.valueAsNumber = values.get(fixed)!;\n return changed;\n }\n\n // clamp such that start does not move beyond end and visa versa.\n private clampAction() {\n if (!this.needsClamping()) {\n return false;\n }\n const {target, fixed} = this.action!;\n target.valueAsNumber = fixed.valueAsNumber;\n return true;\n }\n\n private handleInput(event: InputEvent) {\n // avoid processing a re-dispatched event\n if (this.isRedisptchingEvent) {\n return;\n }\n let stopPropagation = false, redispatch = false;\n if (this.range) {\n if (this.isActionFlipped()) {\n stopPropagation = true;\n redispatch = this.flipAction();\n }\n if (this.clampAction()) {\n stopPropagation = true;\n redispatch = false;\n }\n }\n const {target} = this.action!;\n this.updateOnTop(target);\n // update value only on interaction\n if (this.range) {\n this.valueStart = this.inputStart!.valueAsNumber;\n this.valueEnd = this.inputEnd!.valueAsNumber;\n } else {\n this.value = this.inputEnd!.valueAsNumber;\n }\n // control external visibility of input event\n if (stopPropagation) {\n event.stopPropagation();\n }\n // ensure event path is correct when flipped.\n if (redispatch) {\n this.isRedisptchingEvent = true;\n redispatchEvent(target, event);\n this.isRedisptchingEvent = false;\n }\n }\n\n private handleChange(event: Event) {\n // prevent keyboard triggered changes from dispatching for\n // clamped values; note, this only occurs for keyboard\n const changeTarget = event.target as HTMLInputElement;\n const {target, values} = this.action ?? {};\n const squelch =\n (target && (target.valueAsNumber === values!.get(changeTarget)!));\n if (!squelch) {\n redispatchEvent(this, event);\n }\n // ensure keyboard triggered change clears action.\n this.finishAction(event);\n }\n\n /** @private */\n formResetCallback() {\n if (this.range) {\n const valueStart = this.getAttribute('value-start');\n this.valueStart = valueStart !== null ? Number(valueStart) : undefined;\n const valueEnd = this.getAttribute('value-end');\n this.valueEnd = valueEnd !== null ? Number(valueEnd) : undefined;\n return;\n }\n const value = this.getAttribute('value');\n this.value = value !== null ? Number(value) : undefined;\n }\n\n /** @private */\n formStateRestoreCallback(state: string|Array<[string, string]>|null) {\n if (Array.isArray(state)) {\n const [[, valueStart], [, valueEnd]] = state;\n this.valueStart = Number(valueStart);\n this.valueEnd = Number(valueEnd);\n this.range = true;\n return;\n }\n\n this.value = Number(state);\n this.range = false;\n }\n}\n\nfunction inBounds({x, y}: PointerEvent, element?: HTMLElement|null) {\n if (!element) {\n return false;\n }\n const {top, left, bottom, right} = element.getBoundingClientRect();\n return x >= left && x <= right && y >= top && y <= bottom;\n}\n\nfunction isOverlapping(elA: Element|null, elB: Element|null) {\n if (!(elA && elB)) {\n return false;\n }\n const a = elA.getBoundingClientRect();\n const b = elB.getBoundingClientRect();\n return !(\n a.top > b.bottom || a.right < b.left || a.bottom < b.top ||\n a.left > b.right);\n}\n\ninterface Action {\n canFlip: boolean;\n flipped: boolean;\n target: HTMLInputElement;\n fixed: HTMLInputElement;\n values: Map<HTMLInputElement|undefined, number|undefined>;\n}\n"]}
1
+ {"version":3,"file":"slider.js","sourceRoot":"","sources":["slider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,8BAA8B,CAAC;AACtC,OAAO,8BAA8B,CAAC;AACtC,OAAO,wBAAwB,CAAC;AAEhC,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAiB,MAAM,KAAK,CAAC;AACxE,OAAO,EAAC,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAC,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAC,QAAQ,EAAC,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAC,IAAI,EAAC,MAAM,wBAAwB,CAAC;AAG5C,OAAO,EAAC,yBAAyB,EAAC,MAAM,iCAAiC,CAAC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,EAAE;kDAAoC;AAEnC;IAAR,KAAK,EAAE;gDAAmC;AAClC;IAAR,KAAK,EAAE;8CAAiC;AAkd3C,SAAS,QAAQ,CAAC,EAAC,CAAC,EAAE,CAAC,EAAe,EAAE,OAA0B;IAChE,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,KAAK,CAAC;KACd;IACD,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAC,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;IACnE,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,MAAM,CAAC;AAC5D,CAAC;AAED,SAAS,aAAa,CAAC,GAAiB,EAAE,GAAiB;IACzD,IAAI,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,EAAE;QACjB,OAAO,KAAK,CAAC;KACd;IACD,MAAM,CAAC,GAAG,GAAG,CAAC,qBAAqB,EAAE,CAAC;IACtC,MAAM,CAAC,GAAG,GAAG,CAAC,qBAAqB,EAAE,CAAC;IACtC,OAAO,CAAC,CACJ,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG;QACxD,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport '../../elevation/elevation.js';\nimport '../../focus/md-focus-ring.js';\nimport '../../ripple/ripple.js';\n\nimport {html, isServer, LitElement, nothing, PropertyValues} from 'lit';\nimport {property, query, queryAsync, state} from 'lit/decorators.js';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {styleMap} from 'lit/directives/style-map.js';\nimport {when} from 'lit/directives/when.js';\n\nimport {ARIAMixinStrict} from '../../internal/aria/aria.js';\nimport {requestUpdateOnAriaChange} from '../../internal/aria/delegate.js';\nimport {dispatchActivationClick, isActivationClick, redispatchEvent} from '../../internal/controller/events.js';\nimport {MdRipple} from '../../ripple/ripple.js';\n\n// Disable warning for classMap with destructuring\n// tslint:disable:quoted-properties-on-dictionary\n\n\n/**\n * Slider component.\n */\nexport class Slider extends LitElement {\n static {\n requestUpdateOnAriaChange(Slider);\n }\n\n /** @nocollapse */\n static override shadowRootOptions:\n ShadowRootInit = {...LitElement.shadowRootOptions, delegatesFocus: true};\n\n /** @nocollapse */\n static formAssociated = true;\n\n /**\n * Whether or not the slider is disabled.\n */\n @property({type: Boolean, reflect: true}) disabled = false;\n\n /**\n * The slider minimum value\n */\n @property({type: Number}) min = 0;\n\n /**\n * The slider maximum value\n */\n @property({type: Number}) max = 100;\n\n /**\n * The slider value displayed when range is false.\n */\n @property({type: Number}) value?: number;\n\n /**\n * The slider start value displayed when range is true.\n */\n @property({type: Number, attribute: 'value-start'}) valueStart?: number;\n\n /**\n * The slider end value displayed when range is true.\n */\n @property({type: Number, attribute: 'value-end'}) valueEnd?: number;\n\n /**\n * An optional label for the slider's value displayed when range is\n * false; if not set, the label is the value itself.\n */\n @property({attribute: 'value-label'}) valueLabel?: string;\n\n /**\n * An optional label for the slider's start value displayed when\n * range is true; if not set, the label is the valueStart itself.\n */\n @property({attribute: 'value-label-start'}) valueLabelStart?: string;\n\n /**\n * An optional label for the slider's end value displayed when\n * range is true; if not set, the label is the valueEnd itself.\n */\n @property({attribute: 'value-label-end'}) valueLabelEnd?: string;\n\n /**\n * Aria label for the slider's start value displayed when\n * range is true.\n */\n @property({attribute: 'aria-label-start'}) ariaLabelStart?: string;\n\n /**\n * Aria label for the slider's end value displayed when\n * range is true.\n */\n @property({attribute: 'aria-label-end'}) ariaLabelEnd?: string;\n\n /**\n * The step between values.\n */\n @property({type: Number}) step = 1;\n\n /**\n * Whether or not to show tick marks.\n */\n @property({type: Boolean}) ticks = false;\n\n /**\n * Whether or not to show a value label when activated.\n */\n @property({type: Boolean}) labeled = false;\n\n /**\n * Whether or not to show a value range. When false, the slider displays\n * a slideable handle for the value property; when true, it displays\n * slideable handles for the valueStart and valueEnd properties.\n */\n @property({type: Boolean}) range = false;\n\n /**\n * The HTML name to use in form submission.\n */\n get name() {\n return this.getAttribute('name') ?? '';\n }\n set name(name: string) {\n this.setAttribute('name', name);\n }\n\n /**\n * The HTML name to use in form submission for a range slider's starting\n * value. Use `name` instead if both the start and end values should use the\n * same name.\n */\n get nameStart() {\n return this.getAttribute('name-start') ?? this.name;\n }\n set nameStart(name: string) {\n this.setAttribute('name-start', name);\n }\n\n /**\n * The HTML name to use in form submission for a range slider's ending value.\n * Use `name` instead if both the start and end values should use the same\n * name.\n */\n get nameEnd() {\n return this.getAttribute('name-end') ?? this.nameStart;\n }\n set nameEnd(name: string) {\n this.setAttribute('name-end', name);\n }\n\n /**\n * The associated form element with which this element's value will submit.\n */\n get form() {\n return this.internals.form;\n }\n\n /**\n * The labels this element is associated with.\n */\n get labels() {\n return this.internals.labels;\n }\n\n @query('input.start') private readonly inputStart!: HTMLInputElement|null;\n @query('.handle.start') private readonly handleStart!: HTMLDivElement|null;\n @queryAsync('md-ripple.start')\n private readonly rippleStart!: Promise<MdRipple|null>;\n\n @query('input.end') private readonly inputEnd!: HTMLInputElement|null;\n @query('.handle.end') private readonly handleEnd!: HTMLDivElement|null;\n @queryAsync('md-ripple.end')\n private readonly rippleEnd!: Promise<MdRipple|null>;\n\n\n // handle hover/pressed states are set manually since the handle\n // does not receive pointer events so that the native inputs are\n // interaction targets.\n @state() private handleStartHover = false;\n @state() private handleEndHover = false;\n\n @state() private startOnTop = false;\n @state() private handlesOverlapping = false;\n\n @state() private renderValueStart?: number;\n @state() private renderValueEnd?: number;\n\n // used in synthetic events generated to control ripple hover state.\n private ripplePointerId = 1;\n\n // flag to prvent processing of re-dispatched input event.\n private isRedisptchingEvent = false;\n\n private action?: Action;\n\n private readonly internals =\n (this as HTMLElement /* needed for closure */).attachInternals();\n\n constructor() {\n super();\n if (!isServer) {\n this.addEventListener('click', (event: MouseEvent) => {\n if (!isActivationClick(event) || !this.inputEnd) {\n return;\n }\n this.focus();\n dispatchActivationClick(this.inputEnd);\n });\n }\n }\n\n override focus() {\n this.inputEnd?.focus();\n }\n\n protected override willUpdate(changed: PropertyValues) {\n this.renderValueStart = changed.has('valueStart') ?\n this.valueStart :\n this.inputStart?.valueAsNumber;\n const endValueChanged =\n (changed.has('valueEnd') && this.range) || changed.has('value');\n this.renderValueEnd = endValueChanged ?\n (this.range ? this.valueEnd : this.value) :\n this.inputEnd?.valueAsNumber;\n // manually handle ripple hover state since the handle is pointer events\n // none.\n if (changed.get('handleStartHover') !== undefined) {\n this.toggleRippleHover(this.rippleStart, this.handleStartHover);\n } else if (changed.get('handleEndHover') !== undefined) {\n this.toggleRippleHover(this.rippleEnd, this.handleEndHover);\n }\n }\n\n protected override update(changed: PropertyValues<Slider>) {\n if (changed.has('value') || changed.has('range') ||\n changed.has('valueStart') || changed.has('valueEnd')) {\n if (this.range) {\n const data = new FormData();\n data.append(this.nameStart, String(this.valueStart));\n data.append(this.nameEnd, String(this.valueEnd));\n this.internals.setFormValue(data);\n } else {\n this.internals.setFormValue(String(this.value));\n }\n }\n\n super.update(changed);\n }\n\n protected override updated(changed: PropertyValues) {\n // Validate input rendered value and re-render if necessary. This ensures\n // the rendred handle stays in sync with the input thumb which is used for\n // interaction. These can get out of sync if a supplied value does not\n // map to an exactly stepped value between min and max.\n if (this.range) {\n this.renderValueStart = this.inputStart!.valueAsNumber;\n }\n this.renderValueEnd = this.inputEnd!.valueAsNumber;\n // update values if they are unset\n // when using a range, default to equi-distant between\n // min - valueStart - valueEnd - max\n if (this.range) {\n const segment = (this.max - this.min) / 3;\n if (this.valueStart === undefined) {\n this.inputStart!.valueAsNumber = this.min + segment;\n // read actual value from input\n const v = this.inputStart!.valueAsNumber;\n this.valueStart = this.renderValueStart = v;\n }\n if (this.valueEnd === undefined) {\n this.inputEnd!.valueAsNumber = this.min + 2 * segment;\n // read actual value from input\n const v = this.inputEnd!.valueAsNumber;\n this.valueEnd = this.renderValueEnd = v;\n }\n } else {\n this.value ??= this.renderValueEnd;\n }\n if (changed.has('range') || changed.has('renderValueStart') ||\n changed.has('renderValueEnd') || this.isUpdatePending) {\n this.handlesOverlapping = isOverlapping(this.handleStart, this.handleEnd);\n }\n // called to finish the update imediately;\n // note, this is a no-op unless an update is scheduled\n this.performUpdate();\n }\n\n protected override render() {\n const step = this.step === 0 ? 1 : this.step;\n const range = Math.max(this.max - this.min, step);\n const startFraction = this.range ?\n (((this.renderValueStart ?? this.min) - this.min) / range) :\n 0;\n const endFraction = ((this.renderValueEnd ?? this.min) - this.min) / range;\n const containerStyles = {\n // for clipping inputs and active track.\n '--slider-start-fraction': String(startFraction),\n '--slider-end-fraction': String(endFraction),\n // for generating tick marks\n '--slider-tick-count': String(range / step),\n };\n const containerClasses = {ranged: this.range};\n\n // optional label values to show in place of the value.\n const labelStart = this.valueLabelStart ?? String(this.renderValueStart);\n const labelEnd = (this.range ? this.valueLabelEnd : this.valueLabel) ??\n String(this.renderValueEnd);\n\n const inputStartProps = {\n start: true,\n value: this.renderValueStart,\n label: labelStart\n };\n\n const inputEndProps = {\n start: false,\n value: this.renderValueEnd,\n label: labelEnd\n };\n\n const handleStartProps = {\n start: true,\n hover: this.handleStartHover,\n label: labelStart\n };\n\n const handleEndProps = {\n start: false,\n hover: this.handleEndHover,\n label: labelEnd\n };\n\n const handleContainerClasses = {\n hover: this.handleStartHover || this.handleEndHover\n };\n\n return html`\n <div\n class=\"container ${classMap(containerClasses)}\"\n style=${styleMap(containerStyles)}\n >\n ${when(this.range, () => this.renderInput(inputStartProps))}\n ${this.renderInput(inputEndProps)}\n ${this.renderTrack()}\n <div class=\"handleContainerPadded\">\n <div class=\"handleContainerBlock\">\n <div class=\"handleContainer ${classMap(handleContainerClasses)}\">\n ${when(this.range, () => this.renderHandle(handleStartProps))}\n ${this.renderHandle(handleEndProps)}\n </div>\n </div>\n </div>\n </div>`;\n }\n\n private renderTrack() {\n const trackClasses = {'tickmarks': this.ticks};\n return html`<div class=\"track ${classMap(trackClasses)}\"></div>`;\n }\n\n private renderLabel(value: string) {\n return html`<div class=\"label\">\n <span class=\"labelContent\" part=\"label\">${value}</span>\n </div>`;\n }\n\n private renderHandle({start, hover, label}:\n {start: boolean, hover: boolean, label: string}) {\n const onTop = !this.disabled && start === this.startOnTop;\n const isOverlapping = !this.disabled && this.handlesOverlapping;\n const name = start ? 'start' : 'end';\n return html`<div class=\"handle ${classMap({\n [name]: true,\n hover,\n onTop,\n isOverlapping\n })}\">\n <div class=\"handleNub\"><md-elevation></md-elevation></div>\n ${when(this.labeled, () => this.renderLabel(label))}\n <md-focus-ring part=\"focus-ring\" for=${name}></md-focus-ring>\n <md-ripple for=${name} class=${name} ?disabled=${\n this.disabled}></md-ripple>\n </div>`;\n }\n\n private renderInput({start, value, label}:\n {start: boolean; value?: number; label: string;}) {\n const name = start ? `start` : `end`;\n // when ranged, ensure announcement includes value info.\n // Needed for closure conformance\n let {ariaLabel} = this as ARIAMixinStrict;\n const {range, ariaLabelStart, ariaLabelEnd} = this;\n if (range) {\n ariaLabel = (start ? ariaLabelStart : ariaLabelEnd) ?? null;\n }\n return html`<input type=\"range\"\n class=\"${classMap({\n start,\n end: !start\n })}\"\n @focus=${this.handleFocus}\n @pointerdown=${this.handleDown}\n @pointerup=${this.handleUp}\n @pointerenter=${this.handleEnter}\n @pointermove=${this.handleMove}\n @pointerleave=${this.handleLeave}\n @keydown=${this.handleKeydown}\n @keyup=${this.handleKeyup}\n @input=${this.handleInput}\n @change=${this.handleChange}\n id=${name}\n .disabled=${this.disabled}\n .min=${String(this.min)}\n .max=${String(this.max)}\n .step=${String(this.step)}\n .value=${String(value)}\n .tabIndex=${start ? 1 : 0}\n aria-label=${ariaLabel || nothing}\n aria-valuetext=${label}>`;\n }\n\n private async toggleRippleHover(\n ripple: Promise<MdRipple|null>, hovering: boolean) {\n const rippleEl = await ripple;\n if (!rippleEl) {\n return;\n }\n // TODO(b/269799771): improve slider ripple connection\n if (hovering) {\n rippleEl.handlePointerenter(new PointerEvent(\n 'pointerenter', {isPrimary: true, pointerId: this.ripplePointerId}));\n } else {\n rippleEl.handlePointerleave(new PointerEvent(\n 'pointerleave', {isPrimary: true, pointerId: this.ripplePointerId}));\n }\n }\n\n private handleFocus(event: Event) {\n this.updateOnTop(event.target as HTMLInputElement);\n }\n\n private startAction(event: Event) {\n const target = event.target as HTMLInputElement;\n const fixed =\n (target === this.inputStart) ? this.inputEnd! : this.inputStart!;\n this.action = {\n canFlip: event.type === 'pointerdown',\n flipped: false,\n target,\n fixed,\n values: new Map(\n [[target, target.valueAsNumber], [fixed, fixed?.valueAsNumber]])\n };\n }\n\n private finishAction(event: Event) {\n this.action = undefined;\n }\n\n private handleKeydown(event: KeyboardEvent) {\n this.startAction(event);\n }\n\n private handleKeyup(event: KeyboardEvent) {\n this.finishAction(event);\n }\n\n private handleDown(event: PointerEvent) {\n this.startAction(event);\n this.ripplePointerId = event.pointerId;\n const isStart = event.target as HTMLInputElement === this.inputStart;\n // Since handle moves to pointer on down and there may not be a move,\n // it needs to be considered hovered..\n this.handleStartHover =\n !this.disabled && isStart && Boolean(this.handleStart);\n this.handleEndHover = !this.disabled && !isStart && Boolean(this.handleEnd);\n }\n\n private async handleUp(event: PointerEvent) {\n const {target, values, flipped} = this.action ?? {};\n // Async here for Firefox because input can be after pointerup\n // when value is calmped.\n await new Promise(requestAnimationFrame);\n if (target !== undefined) {\n // Ensure Safari focuses input so label renders.\n // Ensure any flipped input is focused so the tab order is right.\n target.focus();\n // When action is flipped, change must be fired manually since the\n // real event target did not change.\n if (flipped && target.valueAsNumber !== values!.get(target)!) {\n target.dispatchEvent(new Event('change', {bubbles: true}));\n }\n }\n this.finishAction(event);\n }\n\n /**\n * The move handler tracks handle hovering to facilitate proper ripple\n * behavior on the slider handle. This is needed because user interaction with\n * the native input is leveraged to position the handle. Because the separate\n * displayed handle element has pointer events disabled (to allow interaction\n * with the input) and the input's handle is a pseudo-element, neither can be\n * the ripple's interactive element. Therefore the input is the ripple's\n * interactive element and has a `ripple` directive; however the ripple\n * is gated on the handle being hovered. In addition, because the ripple\n * hover state is being specially handled, it must be triggered independent\n * of the directive. This is done based on the hover state when the\n * slider is updated.\n */\n private handleMove(event: PointerEvent) {\n this.handleStartHover = !this.disabled && inBounds(event, this.handleStart);\n this.handleEndHover = !this.disabled && inBounds(event, this.handleEnd);\n }\n\n private handleEnter(event: PointerEvent) {\n this.handleMove(event);\n }\n\n private handleLeave() {\n this.handleStartHover = false;\n this.handleEndHover = false;\n }\n\n private updateOnTop(input: HTMLInputElement) {\n this.startOnTop = input.classList.contains('start');\n }\n\n private needsClamping() {\n const {target, fixed} = this.action!;\n const isStart = target === this.inputStart;\n return isStart ? target.valueAsNumber > fixed.valueAsNumber :\n target.valueAsNumber < fixed.valueAsNumber;\n }\n\n // if start/end start coincident and the first drag input would e.g. move\n // start > end, avoid clamping and \"flip\" to use the other input\n // as the action target.\n private isActionFlipped() {\n const action = this.action!;\n const {target, fixed, values} = action;\n if (action.canFlip) {\n const coincident = values.get(target) === values.get(fixed);\n if (coincident && this.needsClamping()) {\n action.canFlip = false;\n action.flipped = true;\n action.target = fixed;\n action.fixed = target;\n }\n }\n return action.flipped;\n }\n\n // when flipped, apply the drag input to the flipped target and reset\n // the actual target.\n private flipAction() {\n const {target, fixed, values} = this.action!;\n const changed = target.valueAsNumber !== fixed.valueAsNumber;\n target.valueAsNumber = fixed.valueAsNumber;\n fixed.valueAsNumber = values.get(fixed)!;\n return changed;\n }\n\n // clamp such that start does not move beyond end and visa versa.\n private clampAction() {\n if (!this.needsClamping()) {\n return false;\n }\n const {target, fixed} = this.action!;\n target.valueAsNumber = fixed.valueAsNumber;\n return true;\n }\n\n private handleInput(event: InputEvent) {\n // avoid processing a re-dispatched event\n if (this.isRedisptchingEvent) {\n return;\n }\n let stopPropagation = false, redispatch = false;\n if (this.range) {\n if (this.isActionFlipped()) {\n stopPropagation = true;\n redispatch = this.flipAction();\n }\n if (this.clampAction()) {\n stopPropagation = true;\n redispatch = false;\n }\n }\n const {target} = this.action!;\n this.updateOnTop(target);\n // update value only on interaction\n if (this.range) {\n this.valueStart = this.inputStart!.valueAsNumber;\n this.valueEnd = this.inputEnd!.valueAsNumber;\n } else {\n this.value = this.inputEnd!.valueAsNumber;\n }\n // control external visibility of input event\n if (stopPropagation) {\n event.stopPropagation();\n }\n // ensure event path is correct when flipped.\n if (redispatch) {\n this.isRedisptchingEvent = true;\n redispatchEvent(target, event);\n this.isRedisptchingEvent = false;\n }\n }\n\n private handleChange(event: Event) {\n // prevent keyboard triggered changes from dispatching for\n // clamped values; note, this only occurs for keyboard\n const changeTarget = event.target as HTMLInputElement;\n const {target, values} = this.action ?? {};\n const squelch =\n (target && (target.valueAsNumber === values!.get(changeTarget)!));\n if (!squelch) {\n redispatchEvent(this, event);\n }\n // ensure keyboard triggered change clears action.\n this.finishAction(event);\n }\n\n /** @private */\n formResetCallback() {\n if (this.range) {\n const valueStart = this.getAttribute('value-start');\n this.valueStart = valueStart !== null ? Number(valueStart) : undefined;\n const valueEnd = this.getAttribute('value-end');\n this.valueEnd = valueEnd !== null ? Number(valueEnd) : undefined;\n return;\n }\n const value = this.getAttribute('value');\n this.value = value !== null ? Number(value) : undefined;\n }\n\n /** @private */\n formStateRestoreCallback(state: string|Array<[string, string]>|null) {\n if (Array.isArray(state)) {\n const [[, valueStart], [, valueEnd]] = state;\n this.valueStart = Number(valueStart);\n this.valueEnd = Number(valueEnd);\n this.range = true;\n return;\n }\n\n this.value = Number(state);\n this.range = false;\n }\n}\n\nfunction inBounds({x, y}: PointerEvent, element?: HTMLElement|null) {\n if (!element) {\n return false;\n }\n const {top, left, bottom, right} = element.getBoundingClientRect();\n return x >= left && x <= right && y >= top && y <= bottom;\n}\n\nfunction isOverlapping(elA: Element|null, elB: Element|null) {\n if (!(elA && elB)) {\n return false;\n }\n const a = elA.getBoundingClientRect();\n const b = elB.getBoundingClientRect();\n return !(\n a.top > b.bottom || a.right < b.left || a.bottom < b.top ||\n a.left > b.right);\n}\n\ninterface Action {\n canFlip: boolean;\n flipped: boolean;\n target: HTMLInputElement;\n fixed: HTMLInputElement;\n values: Map<HTMLInputElement|undefined, number|undefined>;\n}\n"]}
@@ -43,8 +43,8 @@ $_easing-standard: map.get($_md-sys-motion, 'easing-standard');
43
43
  border-start-end-radius: var(--_handle-shape-start-end);
44
44
  border-end-end-radius: var(--_handle-shape-end-end);
45
45
  border-end-start-radius: var(--_handle-shape-end-start);
46
- height: var(--_unselected-handle-height);
47
- width: var(--_unselected-handle-width);
46
+ height: var(--_handle-height);
47
+ width: var(--_handle-width);
48
48
 
49
49
  transform-origin: center;
50
50
  transition-property: height, width;
@@ -108,24 +108,24 @@ $_easing-standard: map.get($_md-sys-motion, 'easing-standard');
108
108
  }
109
109
 
110
110
  .switch--unselected .handle::before {
111
- background-color: var(--_unselected-handle-color);
111
+ background-color: var(--_handle-color);
112
112
  }
113
113
 
114
114
  .switch--unselected:hover .handle::before {
115
- background-color: var(--_unselected-hover-handle-color);
115
+ background-color: var(--_hover-handle-color);
116
116
  }
117
117
 
118
118
  .switch--unselected:focus-within .handle::before {
119
- background-color: var(--_unselected-focus-handle-color);
119
+ background-color: var(--_focus-handle-color);
120
120
  }
121
121
 
122
122
  .switch--unselected:active .handle::before {
123
- background-color: var(--_unselected-pressed-handle-color);
123
+ background-color: var(--_pressed-handle-color);
124
124
  }
125
125
 
126
126
  .switch--unselected:disabled .handle::before {
127
- background-color: var(--_disabled-unselected-handle-color);
128
- opacity: var(--_disabled-unselected-handle-opacity);
127
+ background-color: var(--_disabled-handle-color);
128
+ opacity: var(--_disabled-handle-opacity);
129
129
  }
130
130
 
131
131
  md-ripple {
@@ -149,10 +149,10 @@ $_easing-standard: map.get($_md-sys-motion, 'easing-standard');
149
149
  .switch--unselected md-ripple {
150
150
  @include ripple.theme(
151
151
  (
152
- 'hover-color': var(--_unselected-hover-state-layer-color),
153
- 'pressed-color': var(--_unselected-pressed-state-layer-color),
154
- 'hover-opacity': var(--_unselected-hover-state-layer-opacity),
155
- 'pressed-opacity': var(--_unselected-pressed-state-layer-opacity),
152
+ 'hover-color': var(--_hover-state-layer-color),
153
+ 'pressed-color': var(--_pressed-state-layer-color),
154
+ 'hover-opacity': var(--_hover-state-layer-opacity),
155
+ 'pressed-opacity': var(--_pressed-state-layer-opacity),
156
156
  )
157
157
  );
158
158
  }
@@ -45,26 +45,26 @@ $_easing-standard: map.get($_md-sys-motion, 'easing-standard');
45
45
  }
46
46
 
47
47
  .icon--off {
48
- width: var(--_unselected-icon-size);
49
- height: var(--_unselected-icon-size);
50
- fill: var(--_unselected-icon-color);
48
+ width: var(--_icon-size);
49
+ height: var(--_icon-size);
50
+ fill: var(--_icon-color);
51
51
  }
52
52
 
53
53
  .switch--unselected:hover .icon--off {
54
- fill: var(--_unselected-hover-icon-color);
54
+ fill: var(--_hover-icon-color);
55
55
  }
56
56
 
57
57
  .switch--unselected:focus-within .icon--off {
58
- fill: var(--_unselected-focus-icon-color);
58
+ fill: var(--_focus-icon-color);
59
59
  }
60
60
 
61
61
  .switch--unselected:active .icon--off {
62
- fill: var(--_unselected-pressed-icon-color);
62
+ fill: var(--_pressed-icon-color);
63
63
  }
64
64
 
65
65
  .switch--unselected:disabled .icon--off {
66
- fill: var(--_disabled-unselected-icon-color);
67
- opacity: var(--_disabled-unselected-icon-opacity);
66
+ fill: var(--_disabled-icon-color);
67
+ opacity: var(--_disabled-icon-opacity);
68
68
  }
69
69
 
70
70
  .icon--on {
@@ -63,29 +63,29 @@
63
63
  }
64
64
 
65
65
  .switch--unselected .track::before {
66
- background-color: var(--_unselected-track-color);
67
- border-color: var(--_unselected-track-outline-color);
66
+ background-color: var(--_track-color);
67
+ border-color: var(--_track-outline-color);
68
68
  border-style: solid;
69
69
  border-width: var(--_track-outline-width);
70
70
  }
71
71
 
72
72
  .switch--unselected:hover .track::before {
73
- background-color: var(--_unselected-hover-track-color);
74
- border-color: var(--_unselected-hover-track-outline-color);
73
+ background-color: var(--_hover-track-color);
74
+ border-color: var(--_hover-track-outline-color);
75
75
  }
76
76
 
77
77
  .switch--unselected:focus-visible .track::before {
78
- background-color: var(--_unselected-focus-track-color);
79
- border-color: var(--_unselected-focus-track-outline-color);
78
+ background-color: var(--_focus-track-color);
79
+ border-color: var(--_focus-track-outline-color);
80
80
  }
81
81
 
82
82
  .switch--unselected:active .track::before {
83
- background-color: var(--_unselected-pressed-track-color);
84
- border-color: var(--_unselected-pressed-track-outline-color);
83
+ background-color: var(--_pressed-track-color);
84
+ border-color: var(--_pressed-track-outline-color);
85
85
  }
86
86
 
87
87
  .switch--unselected:disabled .track::before {
88
- background-color: var(--_disabled-unselected-track-color);
89
- border-color: var(--_disabled-unselected-track-outline-color);
88
+ background-color: var(--_disabled-track-color);
89
+ border-color: var(--_disabled-track-outline-color);
90
90
  }
91
91
  }
@@ -4,6 +4,6 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { css } from 'lit';
7
- export const styles = css `@media(forced-colors: active){:host{--md-switch-disabled-selected-icon-color: GrayText;--md-switch-disabled-selected-icon-opacity: 1;--md-switch-disabled-selected-track-color: GrayText;--md-switch-disabled-track-opacity: 1;--md-switch-disabled-unselected-handle-color: GrayText;--md-switch-disabled-unselected-handle-opacity: 1;--md-switch-disabled-unselected-icon-color: Canvas;--md-switch-disabled-unselected-icon-opacity: 1;--md-switch-selected-focus-track-color: ButtonText;--md-switch-selected-hover-track-color: ButtonText;--md-switch-selected-icon-color: ButtonText;--md-switch-selected-hover-icon-color: ButtonText;--md-switch-selected-focus-icon-color: ButtonText;--md-switch-selected-pressed-icon-color: ButtonText;--md-switch-selected-pressed-track-color: ButtonText;--md-switch-selected-track-color: ButtonText;--md-switch-unselected-focus-handle-color: ButtonText;--md-switch-unselected-handle-color: ButtonText;--md-switch-unselected-hover-handle-color: ButtonText;--md-switch-unselected-icon-color: Canvas;--md-switch-unselected-hover-icon-color: Canvas;--md-switch-unselected-focus-icon-color: Canvas;--md-switch-unselected-pressed-icon-color: Canvas;--md-switch-unselected-pressed-handle-color: ButtonText}}/*# sourceMappingURL=forced-colors-styles.css.map */
7
+ export const styles = css `@media(forced-colors: active){:host{--md-switch-disabled-selected-icon-color: GrayText;--md-switch-disabled-selected-icon-opacity: 1;--md-switch-disabled-selected-track-color: GrayText;--md-switch-disabled-track-opacity: 1;--md-switch-disabled-handle-color: GrayText;--md-switch-disabled-handle-opacity: 1;--md-switch-disabled-icon-color: Canvas;--md-switch-disabled-icon-opacity: 1;--md-switch-selected-focus-track-color: ButtonText;--md-switch-selected-hover-track-color: ButtonText;--md-switch-selected-icon-color: ButtonText;--md-switch-selected-hover-icon-color: ButtonText;--md-switch-selected-focus-icon-color: ButtonText;--md-switch-selected-pressed-icon-color: ButtonText;--md-switch-selected-pressed-track-color: ButtonText;--md-switch-selected-track-color: ButtonText;--md-switch-focus-handle-color: ButtonText;--md-switch-handle-color: ButtonText;--md-switch-hover-handle-color: ButtonText;--md-switch-icon-color: Canvas;--md-switch-hover-icon-color: Canvas;--md-switch-focus-icon-color: Canvas;--md-switch-pressed-icon-color: Canvas;--md-switch-pressed-handle-color: ButtonText}}/*# sourceMappingURL=forced-colors-styles.css.map */
8
8
  `;
9
9
  //# sourceMappingURL=forced-colors-styles.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"forced-colors-styles.css.js","sourceRoot":"","sources":["forced-colors-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`@media(forced-colors: active){:host{--md-switch-disabled-selected-icon-color: GrayText;--md-switch-disabled-selected-icon-opacity: 1;--md-switch-disabled-selected-track-color: GrayText;--md-switch-disabled-track-opacity: 1;--md-switch-disabled-unselected-handle-color: GrayText;--md-switch-disabled-unselected-handle-opacity: 1;--md-switch-disabled-unselected-icon-color: Canvas;--md-switch-disabled-unselected-icon-opacity: 1;--md-switch-selected-focus-track-color: ButtonText;--md-switch-selected-hover-track-color: ButtonText;--md-switch-selected-icon-color: ButtonText;--md-switch-selected-hover-icon-color: ButtonText;--md-switch-selected-focus-icon-color: ButtonText;--md-switch-selected-pressed-icon-color: ButtonText;--md-switch-selected-pressed-track-color: ButtonText;--md-switch-selected-track-color: ButtonText;--md-switch-unselected-focus-handle-color: ButtonText;--md-switch-unselected-handle-color: ButtonText;--md-switch-unselected-hover-handle-color: ButtonText;--md-switch-unselected-icon-color: Canvas;--md-switch-unselected-hover-icon-color: Canvas;--md-switch-unselected-focus-icon-color: Canvas;--md-switch-unselected-pressed-icon-color: Canvas;--md-switch-unselected-pressed-handle-color: ButtonText}}/*# sourceMappingURL=forced-colors-styles.css.map */\n`;\n "]}
1
+ {"version":3,"file":"forced-colors-styles.css.js","sourceRoot":"","sources":["forced-colors-styles.css.ts"],"names":[],"mappings":"AAAA;;;;IAII;AACH,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AACxB,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;CACzB,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n import {css} from 'lit';\n export const styles = css`@media(forced-colors: active){:host{--md-switch-disabled-selected-icon-color: GrayText;--md-switch-disabled-selected-icon-opacity: 1;--md-switch-disabled-selected-track-color: GrayText;--md-switch-disabled-track-opacity: 1;--md-switch-disabled-handle-color: GrayText;--md-switch-disabled-handle-opacity: 1;--md-switch-disabled-icon-color: Canvas;--md-switch-disabled-icon-opacity: 1;--md-switch-selected-focus-track-color: ButtonText;--md-switch-selected-hover-track-color: ButtonText;--md-switch-selected-icon-color: ButtonText;--md-switch-selected-hover-icon-color: ButtonText;--md-switch-selected-focus-icon-color: ButtonText;--md-switch-selected-pressed-icon-color: ButtonText;--md-switch-selected-pressed-track-color: ButtonText;--md-switch-selected-track-color: ButtonText;--md-switch-focus-handle-color: ButtonText;--md-switch-handle-color: ButtonText;--md-switch-hover-handle-color: ButtonText;--md-switch-icon-color: Canvas;--md-switch-hover-icon-color: Canvas;--md-switch-focus-icon-color: Canvas;--md-switch-pressed-icon-color: Canvas;--md-switch-pressed-handle-color: ButtonText}}/*# sourceMappingURL=forced-colors-styles.css.map */\n`;\n "]}
@@ -15,10 +15,10 @@
15
15
  'disabled-selected-icon-opacity': 1,
16
16
  'disabled-selected-track-color': GrayText,
17
17
  'disabled-track-opacity': 1,
18
- 'disabled-unselected-handle-color': GrayText,
19
- 'disabled-unselected-handle-opacity': 1,
20
- 'disabled-unselected-icon-color': Canvas,
21
- 'disabled-unselected-icon-opacity': 1,
18
+ 'disabled-handle-color': GrayText,
19
+ 'disabled-handle-opacity': 1,
20
+ 'disabled-icon-color': Canvas,
21
+ 'disabled-icon-opacity': 1,
22
22
  'selected-focus-track-color': ButtonText,
23
23
  'selected-hover-track-color': ButtonText,
24
24
  'selected-icon-color': ButtonText,
@@ -27,14 +27,14 @@
27
27
  'selected-pressed-icon-color': ButtonText,
28
28
  'selected-pressed-track-color': ButtonText,
29
29
  'selected-track-color': ButtonText,
30
- 'unselected-focus-handle-color': ButtonText,
31
- 'unselected-handle-color': ButtonText,
32
- 'unselected-hover-handle-color': ButtonText,
33
- 'unselected-icon-color': Canvas,
34
- 'unselected-hover-icon-color': Canvas,
35
- 'unselected-focus-icon-color': Canvas,
36
- 'unselected-pressed-icon-color': Canvas,
37
- 'unselected-pressed-handle-color': ButtonText,
30
+ 'focus-handle-color': ButtonText,
31
+ 'handle-color': ButtonText,
32
+ 'hover-handle-color': ButtonText,
33
+ 'icon-color': Canvas,
34
+ 'hover-icon-color': Canvas,
35
+ 'focus-icon-color': Canvas,
36
+ 'pressed-icon-color': Canvas,
37
+ 'pressed-handle-color': ButtonText,
38
38
  )
39
39
  );
40
40
  }
@@ -4,6 +4,6 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { css } from 'lit';
7
- export const styles = css `:host{--_disabled-selected-handle-color: var(--md-switch-disabled-selected-handle-color, var(--md-sys-color-surface, #fef7ff));--_disabled-selected-handle-opacity: var(--md-switch-disabled-selected-handle-opacity, 1);--_disabled-selected-icon-color: var(--md-switch-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-selected-icon-opacity: var(--md-switch-disabled-selected-icon-opacity, 0.38);--_disabled-selected-track-color: var(--md-switch-disabled-selected-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-track-opacity: var(--md-switch-disabled-track-opacity, 0.12);--_disabled-unselected-handle-color: var(--md-switch-disabled-unselected-handle-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-unselected-handle-opacity: var(--md-switch-disabled-unselected-handle-opacity, 0.38);--_disabled-unselected-icon-color: var(--md-switch-disabled-unselected-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_disabled-unselected-icon-opacity: var(--md-switch-disabled-unselected-icon-opacity, 0.38);--_disabled-unselected-track-color: var(--md-switch-disabled-unselected-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_disabled-unselected-track-outline-color: var(--md-switch-disabled-unselected-track-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_handle-shape: var(--md-switch-handle-shape, 9999px);--_pressed-handle-height: var(--md-switch-pressed-handle-height, 28px);--_pressed-handle-width: var(--md-switch-pressed-handle-width, 28px);--_selected-focus-handle-color: var(--md-switch-selected-focus-handle-color, var(--md-sys-color-primary-container, #eaddff));--_selected-focus-icon-color: var(--md-switch-selected-focus-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_selected-focus-track-color: var(--md-switch-selected-focus-track-color, var(--md-sys-color-primary, #6750a4));--_selected-handle-color: var(--md-switch-selected-handle-color, var(--md-sys-color-on-primary, #fff));--_selected-handle-height: var(--md-switch-selected-handle-height, 24px);--_selected-handle-width: var(--md-switch-selected-handle-width, 24px);--_selected-hover-handle-color: var(--md-switch-selected-hover-handle-color, var(--md-sys-color-primary-container, #eaddff));--_selected-hover-icon-color: var(--md-switch-selected-hover-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_selected-hover-state-layer-color: var(--md-switch-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-state-layer-opacity: var(--md-switch-selected-hover-state-layer-opacity, 0.08);--_selected-hover-track-color: var(--md-switch-selected-hover-track-color, var(--md-sys-color-primary, #6750a4));--_selected-icon-color: var(--md-switch-selected-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_selected-icon-size: var(--md-switch-selected-icon-size, 16px);--_selected-pressed-handle-color: var(--md-switch-selected-pressed-handle-color, var(--md-sys-color-primary-container, #eaddff));--_selected-pressed-icon-color: var(--md-switch-selected-pressed-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_selected-pressed-state-layer-color: var(--md-switch-selected-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-state-layer-opacity: var(--md-switch-selected-pressed-state-layer-opacity, 0.12);--_selected-pressed-track-color: var(--md-switch-selected-pressed-track-color, var(--md-sys-color-primary, #6750a4));--_selected-track-color: var(--md-switch-selected-track-color, var(--md-sys-color-primary, #6750a4));--_state-layer-shape: var(--md-switch-state-layer-shape, 9999px);--_state-layer-size: var(--md-switch-state-layer-size, 40px);--_track-height: var(--md-switch-track-height, 32px);--_track-outline-width: var(--md-switch-track-outline-width, 2px);--_track-shape: var(--md-switch-track-shape, 9999px);--_track-width: var(--md-switch-track-width, 52px);--_unselected-focus-handle-color: var(--md-switch-unselected-focus-handle-color, var(--md-sys-color-on-surface-variant, #49454f));--_unselected-focus-icon-color: var(--md-switch-unselected-focus-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_unselected-focus-track-color: var(--md-switch-unselected-focus-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_unselected-focus-track-outline-color: var(--md-switch-unselected-focus-track-outline-color, var(--md-sys-color-outline, #79747e));--_unselected-handle-color: var(--md-switch-unselected-handle-color, var(--md-sys-color-outline, #79747e));--_unselected-handle-height: var(--md-switch-unselected-handle-height, 16px);--_unselected-handle-width: var(--md-switch-unselected-handle-width, 16px);--_unselected-hover-handle-color: var(--md-switch-unselected-hover-handle-color, var(--md-sys-color-on-surface-variant, #49454f));--_unselected-hover-icon-color: var(--md-switch-unselected-hover-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_unselected-hover-state-layer-color: var(--md-switch-unselected-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_unselected-hover-state-layer-opacity: var(--md-switch-unselected-hover-state-layer-opacity, 0.08);--_unselected-hover-track-color: var(--md-switch-unselected-hover-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_unselected-hover-track-outline-color: var(--md-switch-unselected-hover-track-outline-color, var(--md-sys-color-outline, #79747e));--_unselected-icon-color: var(--md-switch-unselected-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_unselected-icon-size: var(--md-switch-unselected-icon-size, 16px);--_unselected-pressed-handle-color: var(--md-switch-unselected-pressed-handle-color, var(--md-sys-color-on-surface-variant, #49454f));--_unselected-pressed-icon-color: var(--md-switch-unselected-pressed-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_unselected-pressed-state-layer-color: var(--md-switch-unselected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_unselected-pressed-state-layer-opacity: var(--md-switch-unselected-pressed-state-layer-opacity, 0.12);--_unselected-pressed-track-color: var(--md-switch-unselected-pressed-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_unselected-pressed-track-outline-color: var(--md-switch-unselected-pressed-track-outline-color, var(--md-sys-color-outline, #79747e));--_unselected-track-color: var(--md-switch-unselected-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_unselected-track-outline-color: var(--md-switch-unselected-track-outline-color, var(--md-sys-color-outline, #79747e));--_with-icon-handle-height: var(--md-switch-with-icon-handle-height, 24px);--_with-icon-handle-width: var(--md-switch-with-icon-handle-width, 24px);--_handle-shape-start-start: var( --md-switch-handle-shape-start-start, var(--_handle-shape) );--_handle-shape-start-end: var( --md-switch-handle-shape-start-end, var(--_handle-shape) );--_handle-shape-end-end: var( --md-switch-handle-shape-end-end, var(--_handle-shape) );--_handle-shape-end-start: var( --md-switch-handle-shape-end-start, var(--_handle-shape) );--_track-shape-start-start: var( --md-switch-track-shape-start-start, var(--_track-shape) );--_track-shape-start-end: var( --md-switch-track-shape-start-end, var(--_track-shape) );--_track-shape-end-end: var( --md-switch-track-shape-end-end, var(--_track-shape) );--_track-shape-end-start: var( --md-switch-track-shape-end-start, var(--_track-shape) );display:inline-flex;outline:none;vertical-align:top;-webkit-tap-highlight-color:rgba(0,0,0,0)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_track-shape-start-start);--md-focus-ring-shape-start-end: var(--_track-shape-start-end);--md-focus-ring-shape-end-end: var(--_track-shape-end-end);--md-focus-ring-shape-end-start: var(--_track-shape-end-start)}.switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;padding:0;position:relative;width:var(--_track-width);height:var(--_track-height);border-start-start-radius:var(--_track-shape-start-start);border-start-end-radius:var(--_track-shape-start-end);border-end-end-radius:var(--_track-shape-end-end);border-end-start-radius:var(--_track-shape-end-start)}.touch{position:absolute;height:48px;width:48px}.switch:disabled{cursor:default;pointer-events:none}.switch:disabled .track{background-color:rgba(0,0,0,0);border-color:rgba(0,0,0,0)}.switch:disabled .track::before{background-clip:content-box}.switch--selected:disabled .track{background-clip:border-box}.track{position:absolute;width:100%;height:100%;box-sizing:border-box;border-radius:inherit;display:flex;justify-content:center;align-items:center}.track::before{content:"";display:flex;position:absolute;height:100%;width:100%;border-radius:inherit;box-sizing:border-box;transition-property:opacity,background-color;transition-timing-function:linear;transition-duration:67ms}.switch:disabled .track::before,.switch:disabled .track::after{transition:none;opacity:var(--_disabled-track-opacity)}.switch--selected .track::before{background-color:var(--_selected-track-color)}.switch--selected:hover .track::before{background-color:var(--_selected-hover-track-color)}.switch--selected:focus-within .track::before{background-color:var(--_selected-focus-track-color)}.switch--selected:active .track::before{background-color:var(--_selected-pressed-track-color)}.switch--selected:disabled .track::before{background-color:var(--_disabled-selected-track-color)}.switch--unselected .track::before{background-color:var(--_unselected-track-color);border-color:var(--_unselected-track-outline-color);border-style:solid;border-width:var(--_track-outline-width)}.switch--unselected:hover .track::before{background-color:var(--_unselected-hover-track-color);border-color:var(--_unselected-hover-track-outline-color)}.switch--unselected:focus-visible .track::before{background-color:var(--_unselected-focus-track-color);border-color:var(--_unselected-focus-track-outline-color)}.switch--unselected:active .track::before{background-color:var(--_unselected-pressed-track-color);border-color:var(--_unselected-pressed-track-outline-color)}.switch--unselected:disabled .track::before{background-color:var(--_disabled-unselected-track-color);border-color:var(--_disabled-unselected-track-outline-color)}.handle-container{display:grid;place-items:center;position:relative;transition:margin 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275)}.switch--selected .handle-container{margin-inline-start:calc(var(--_track-width) - var(--_track-height))}.switch--unselected .handle-container{margin-inline-end:calc(var(--_track-width) - var(--_track-height))}.switch:disabled .handle-container{transition:none}.handle{border-start-start-radius:var(--_handle-shape-start-start);border-start-end-radius:var(--_handle-shape-start-end);border-end-end-radius:var(--_handle-shape-end-end);border-end-start-radius:var(--_handle-shape-end-start);height:var(--_unselected-handle-height);width:var(--_unselected-handle-width);transform-origin:center;transition-property:height,width;transition-duration:250ms,250ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1),cubic-bezier(0.2, 0, 0, 1);z-index:0}.handle::before{content:"";display:flex;inset:0;position:absolute;border-radius:inherit;box-sizing:border-box;transition:background-color 67ms linear}.switch:disabled .handle,.switch:disabled .handle::before{transition:none}.switch--selected .handle{height:var(--_selected-handle-height);width:var(--_selected-handle-width)}.handle.with-icon{height:var(--_with-icon-handle-height);width:var(--_with-icon-handle-width)}.switch--selected:enabled:active .handle,.switch--unselected:enabled:active .handle{height:var(--_pressed-handle-height);width:var(--_pressed-handle-width);transition-timing-function:linear;transition-duration:100ms}.switch--selected .handle::before{background-color:var(--_selected-handle-color)}.switch--selected:hover .handle::before{background-color:var(--_selected-hover-handle-color)}.switch--selected:focus-within .handle::before{background-color:var(--_selected-focus-handle-color)}.switch--selected:active .handle::before{background-color:var(--_selected-pressed-handle-color)}.switch--selected:disabled .handle::before{background-color:var(--_disabled-selected-handle-color);opacity:var(--_disabled-selected-handle-opacity)}.switch--unselected .handle::before{background-color:var(--_unselected-handle-color)}.switch--unselected:hover .handle::before{background-color:var(--_unselected-hover-handle-color)}.switch--unselected:focus-within .handle::before{background-color:var(--_unselected-focus-handle-color)}.switch--unselected:active .handle::before{background-color:var(--_unselected-pressed-handle-color)}.switch--unselected:disabled .handle::before{background-color:var(--_disabled-unselected-handle-color);opacity:var(--_disabled-unselected-handle-opacity)}md-ripple{border-radius:var(--_state-layer-shape);height:var(--_state-layer-size);inset:unset;width:var(--_state-layer-size)}.switch--selected md-ripple{--md-ripple-hover-color: var(--_selected-hover-state-layer-color);--md-ripple-pressed-color: var(--_selected-pressed-state-layer-color);--md-ripple-hover-opacity: var(--_selected-hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_selected-pressed-state-layer-opacity)}.switch--unselected md-ripple{--md-ripple-hover-color: var(--_unselected-hover-state-layer-color);--md-ripple-pressed-color: var(--_unselected-pressed-state-layer-color);--md-ripple-hover-opacity: var(--_unselected-hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_unselected-pressed-state-layer-opacity)}.icons{position:relative;height:100%;width:100%}.icon{position:absolute;inset:0;margin:auto;transition:fill 67ms linear,opacity 33ms linear,transform 167ms cubic-bezier(0.2, 0, 0, 1);opacity:0}.switch:disabled .icon{transition:none}.switch--selected .icon--on,.switch--unselected .icon--off{opacity:1}.switch--unselected .handle:not(.with-icon) .icon--on{transform:rotate(-45deg)}.icon--off{width:var(--_unselected-icon-size);height:var(--_unselected-icon-size);fill:var(--_unselected-icon-color)}.switch--unselected:hover .icon--off{fill:var(--_unselected-hover-icon-color)}.switch--unselected:focus-within .icon--off{fill:var(--_unselected-focus-icon-color)}.switch--unselected:active .icon--off{fill:var(--_unselected-pressed-icon-color)}.switch--unselected:disabled .icon--off{fill:var(--_disabled-unselected-icon-color);opacity:var(--_disabled-unselected-icon-opacity)}.icon--on{width:var(--_selected-icon-size);height:var(--_selected-icon-size);fill:var(--_selected-icon-color)}.switch--selected:hover .icon--on{fill:var(--_selected-hover-icon-color)}.switch--selected:focus-within .icon--on{fill:var(--_selected-focus-icon-color)}.switch--selected:active .icon--on{fill:var(--_selected-pressed-icon-color)}.switch--selected:disabled .icon--on{fill:var(--_disabled-selected-icon-color);opacity:var(--_disabled-selected-icon-opacity)}/*# sourceMappingURL=switch-styles.css.map */
7
+ export const styles = css `:host{--_disabled-selected-handle-color: var(--md-switch-disabled-selected-handle-color, var(--md-sys-color-surface, #fef7ff));--_disabled-selected-handle-opacity: var(--md-switch-disabled-selected-handle-opacity, 1);--_disabled-selected-icon-color: var(--md-switch-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-selected-icon-opacity: var(--md-switch-disabled-selected-icon-opacity, 0.38);--_disabled-selected-track-color: var(--md-switch-disabled-selected-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-track-opacity: var(--md-switch-disabled-track-opacity, 0.12);--_handle-shape: var(--md-switch-handle-shape, 9999px);--_pressed-handle-height: var(--md-switch-pressed-handle-height, 28px);--_pressed-handle-width: var(--md-switch-pressed-handle-width, 28px);--_selected-focus-handle-color: var(--md-switch-selected-focus-handle-color, var(--md-sys-color-primary-container, #eaddff));--_selected-focus-icon-color: var(--md-switch-selected-focus-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_selected-focus-track-color: var(--md-switch-selected-focus-track-color, var(--md-sys-color-primary, #6750a4));--_selected-handle-color: var(--md-switch-selected-handle-color, var(--md-sys-color-on-primary, #fff));--_selected-handle-height: var(--md-switch-selected-handle-height, 24px);--_selected-handle-width: var(--md-switch-selected-handle-width, 24px);--_selected-hover-handle-color: var(--md-switch-selected-hover-handle-color, var(--md-sys-color-primary-container, #eaddff));--_selected-hover-icon-color: var(--md-switch-selected-hover-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_selected-hover-state-layer-color: var(--md-switch-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-state-layer-opacity: var(--md-switch-selected-hover-state-layer-opacity, 0.08);--_selected-hover-track-color: var(--md-switch-selected-hover-track-color, var(--md-sys-color-primary, #6750a4));--_selected-icon-color: var(--md-switch-selected-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_selected-icon-size: var(--md-switch-selected-icon-size, 16px);--_selected-pressed-handle-color: var(--md-switch-selected-pressed-handle-color, var(--md-sys-color-primary-container, #eaddff));--_selected-pressed-icon-color: var(--md-switch-selected-pressed-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_selected-pressed-state-layer-color: var(--md-switch-selected-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-state-layer-opacity: var(--md-switch-selected-pressed-state-layer-opacity, 0.12);--_selected-pressed-track-color: var(--md-switch-selected-pressed-track-color, var(--md-sys-color-primary, #6750a4));--_selected-track-color: var(--md-switch-selected-track-color, var(--md-sys-color-primary, #6750a4));--_state-layer-shape: var(--md-switch-state-layer-shape, 9999px);--_state-layer-size: var(--md-switch-state-layer-size, 40px);--_track-height: var(--md-switch-track-height, 32px);--_track-outline-width: var(--md-switch-track-outline-width, 2px);--_track-shape: var(--md-switch-track-shape, 9999px);--_track-width: var(--md-switch-track-width, 52px);--_with-icon-handle-height: var(--md-switch-with-icon-handle-height, 24px);--_with-icon-handle-width: var(--md-switch-with-icon-handle-width, 24px);--_disabled-handle-color: var(--md-switch-disabled-handle-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-handle-opacity: var(--md-switch-disabled-handle-opacity, 0.38);--_disabled-icon-color: var(--md-switch-disabled-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_disabled-icon-opacity: var(--md-switch-disabled-icon-opacity, 0.38);--_disabled-track-color: var(--md-switch-disabled-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_disabled-track-outline-color: var(--md-switch-disabled-track-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-handle-color: var(--md-switch-focus-handle-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-icon-color: var(--md-switch-focus-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_focus-track-color: var(--md-switch-focus-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_focus-track-outline-color: var(--md-switch-focus-track-outline-color, var(--md-sys-color-outline, #79747e));--_handle-color: var(--md-switch-handle-color, var(--md-sys-color-outline, #79747e));--_handle-height: var(--md-switch-handle-height, 16px);--_handle-width: var(--md-switch-handle-width, 16px);--_hover-handle-color: var(--md-switch-hover-handle-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-icon-color: var(--md-switch-hover-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_hover-state-layer-color: var(--md-switch-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-switch-hover-state-layer-opacity, 0.08);--_hover-track-color: var(--md-switch-hover-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_hover-track-outline-color: var(--md-switch-hover-track-outline-color, var(--md-sys-color-outline, #79747e));--_icon-color: var(--md-switch-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_icon-size: var(--md-switch-icon-size, 16px);--_pressed-handle-color: var(--md-switch-pressed-handle-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-switch-pressed-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_pressed-state-layer-color: var(--md-switch-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-opacity: var(--md-switch-pressed-state-layer-opacity, 0.12);--_pressed-track-color: var(--md-switch-pressed-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_pressed-track-outline-color: var(--md-switch-pressed-track-outline-color, var(--md-sys-color-outline, #79747e));--_track-color: var(--md-switch-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_track-outline-color: var(--md-switch-track-outline-color, var(--md-sys-color-outline, #79747e));--_handle-shape-start-start: var( --md-switch-handle-shape-start-start, var(--_handle-shape) );--_handle-shape-start-end: var( --md-switch-handle-shape-start-end, var(--_handle-shape) );--_handle-shape-end-end: var( --md-switch-handle-shape-end-end, var(--_handle-shape) );--_handle-shape-end-start: var( --md-switch-handle-shape-end-start, var(--_handle-shape) );--_track-shape-start-start: var( --md-switch-track-shape-start-start, var(--_track-shape) );--_track-shape-start-end: var( --md-switch-track-shape-start-end, var(--_track-shape) );--_track-shape-end-end: var( --md-switch-track-shape-end-end, var(--_track-shape) );--_track-shape-end-start: var( --md-switch-track-shape-end-start, var(--_track-shape) );display:inline-flex;outline:none;vertical-align:top;-webkit-tap-highlight-color:rgba(0,0,0,0)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_track-shape-start-start);--md-focus-ring-shape-start-end: var(--_track-shape-start-end);--md-focus-ring-shape-end-end: var(--_track-shape-end-end);--md-focus-ring-shape-end-start: var(--_track-shape-end-start)}.switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;padding:0;position:relative;width:var(--_track-width);height:var(--_track-height);border-start-start-radius:var(--_track-shape-start-start);border-start-end-radius:var(--_track-shape-start-end);border-end-end-radius:var(--_track-shape-end-end);border-end-start-radius:var(--_track-shape-end-start)}.touch{position:absolute;height:48px;width:48px}.switch:disabled{cursor:default;pointer-events:none}.switch:disabled .track{background-color:rgba(0,0,0,0);border-color:rgba(0,0,0,0)}.switch:disabled .track::before{background-clip:content-box}.switch--selected:disabled .track{background-clip:border-box}.track{position:absolute;width:100%;height:100%;box-sizing:border-box;border-radius:inherit;display:flex;justify-content:center;align-items:center}.track::before{content:"";display:flex;position:absolute;height:100%;width:100%;border-radius:inherit;box-sizing:border-box;transition-property:opacity,background-color;transition-timing-function:linear;transition-duration:67ms}.switch:disabled .track::before,.switch:disabled .track::after{transition:none;opacity:var(--_disabled-track-opacity)}.switch--selected .track::before{background-color:var(--_selected-track-color)}.switch--selected:hover .track::before{background-color:var(--_selected-hover-track-color)}.switch--selected:focus-within .track::before{background-color:var(--_selected-focus-track-color)}.switch--selected:active .track::before{background-color:var(--_selected-pressed-track-color)}.switch--selected:disabled .track::before{background-color:var(--_disabled-selected-track-color)}.switch--unselected .track::before{background-color:var(--_track-color);border-color:var(--_track-outline-color);border-style:solid;border-width:var(--_track-outline-width)}.switch--unselected:hover .track::before{background-color:var(--_hover-track-color);border-color:var(--_hover-track-outline-color)}.switch--unselected:focus-visible .track::before{background-color:var(--_focus-track-color);border-color:var(--_focus-track-outline-color)}.switch--unselected:active .track::before{background-color:var(--_pressed-track-color);border-color:var(--_pressed-track-outline-color)}.switch--unselected:disabled .track::before{background-color:var(--_disabled-track-color);border-color:var(--_disabled-track-outline-color)}.handle-container{display:grid;place-items:center;position:relative;transition:margin 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275)}.switch--selected .handle-container{margin-inline-start:calc(var(--_track-width) - var(--_track-height))}.switch--unselected .handle-container{margin-inline-end:calc(var(--_track-width) - var(--_track-height))}.switch:disabled .handle-container{transition:none}.handle{border-start-start-radius:var(--_handle-shape-start-start);border-start-end-radius:var(--_handle-shape-start-end);border-end-end-radius:var(--_handle-shape-end-end);border-end-start-radius:var(--_handle-shape-end-start);height:var(--_handle-height);width:var(--_handle-width);transform-origin:center;transition-property:height,width;transition-duration:250ms,250ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1),cubic-bezier(0.2, 0, 0, 1);z-index:0}.handle::before{content:"";display:flex;inset:0;position:absolute;border-radius:inherit;box-sizing:border-box;transition:background-color 67ms linear}.switch:disabled .handle,.switch:disabled .handle::before{transition:none}.switch--selected .handle{height:var(--_selected-handle-height);width:var(--_selected-handle-width)}.handle.with-icon{height:var(--_with-icon-handle-height);width:var(--_with-icon-handle-width)}.switch--selected:enabled:active .handle,.switch--unselected:enabled:active .handle{height:var(--_pressed-handle-height);width:var(--_pressed-handle-width);transition-timing-function:linear;transition-duration:100ms}.switch--selected .handle::before{background-color:var(--_selected-handle-color)}.switch--selected:hover .handle::before{background-color:var(--_selected-hover-handle-color)}.switch--selected:focus-within .handle::before{background-color:var(--_selected-focus-handle-color)}.switch--selected:active .handle::before{background-color:var(--_selected-pressed-handle-color)}.switch--selected:disabled .handle::before{background-color:var(--_disabled-selected-handle-color);opacity:var(--_disabled-selected-handle-opacity)}.switch--unselected .handle::before{background-color:var(--_handle-color)}.switch--unselected:hover .handle::before{background-color:var(--_hover-handle-color)}.switch--unselected:focus-within .handle::before{background-color:var(--_focus-handle-color)}.switch--unselected:active .handle::before{background-color:var(--_pressed-handle-color)}.switch--unselected:disabled .handle::before{background-color:var(--_disabled-handle-color);opacity:var(--_disabled-handle-opacity)}md-ripple{border-radius:var(--_state-layer-shape);height:var(--_state-layer-size);inset:unset;width:var(--_state-layer-size)}.switch--selected md-ripple{--md-ripple-hover-color: var(--_selected-hover-state-layer-color);--md-ripple-pressed-color: var(--_selected-pressed-state-layer-color);--md-ripple-hover-opacity: var(--_selected-hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_selected-pressed-state-layer-opacity)}.switch--unselected md-ripple{--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.icons{position:relative;height:100%;width:100%}.icon{position:absolute;inset:0;margin:auto;transition:fill 67ms linear,opacity 33ms linear,transform 167ms cubic-bezier(0.2, 0, 0, 1);opacity:0}.switch:disabled .icon{transition:none}.switch--selected .icon--on,.switch--unselected .icon--off{opacity:1}.switch--unselected .handle:not(.with-icon) .icon--on{transform:rotate(-45deg)}.icon--off{width:var(--_icon-size);height:var(--_icon-size);fill:var(--_icon-color)}.switch--unselected:hover .icon--off{fill:var(--_hover-icon-color)}.switch--unselected:focus-within .icon--off{fill:var(--_focus-icon-color)}.switch--unselected:active .icon--off{fill:var(--_pressed-icon-color)}.switch--unselected:disabled .icon--off{fill:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.icon--on{width:var(--_selected-icon-size);height:var(--_selected-icon-size);fill:var(--_selected-icon-color)}.switch--selected:hover .icon--on{fill:var(--_selected-hover-icon-color)}.switch--selected:focus-within .icon--on{fill:var(--_selected-focus-icon-color)}.switch--selected:active .icon--on{fill:var(--_selected-pressed-icon-color)}.switch--selected:disabled .icon--on{fill:var(--_disabled-selected-icon-color);opacity:var(--_disabled-selected-icon-opacity)}/*# sourceMappingURL=switch-styles.css.map */
8
8
  `;
9
9
  //# sourceMappingURL=switch-styles.css.js.map