@omicronenergy/oscd-ui 0.0.5 → 0.0.7

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 (578) hide show
  1. package/app-bar/OscdAppBar.d.ts +47 -0
  2. package/app-bar/OscdAppBar.js +152 -0
  3. package/app-bar/OscdAppBar.js.map +1 -0
  4. package/app-bar/oscd-app-bar.d.ts +12 -0
  5. package/app-bar/oscd-app-bar.js +9 -0
  6. package/app-bar/oscd-app-bar.js.map +1 -0
  7. package/button/OscdFilledButton.d.ts +38 -0
  8. package/button/OscdFilledButton.js +45 -0
  9. package/button/OscdFilledButton.js.map +1 -0
  10. package/button/OscdFilledButton.spec.d.ts +6 -0
  11. package/button/OscdFilledButton.spec.js +79 -0
  12. package/button/OscdFilledButton.spec.js.map +1 -0
  13. package/button/OscdOutlinedButton.d.ts +40 -0
  14. package/button/OscdOutlinedButton.js +37 -0
  15. package/button/OscdOutlinedButton.js.map +1 -0
  16. package/button/OscdTextButton.d.ts +38 -0
  17. package/button/OscdTextButton.js +35 -0
  18. package/button/OscdTextButton.js.map +1 -0
  19. package/button/oscd-filled-button.d.ts +7 -0
  20. package/button/oscd-filled-button.js +4 -0
  21. package/button/oscd-filled-button.js.map +1 -0
  22. package/button/oscd-outlined-button.d.ts +12 -0
  23. package/button/oscd-outlined-button.js +9 -0
  24. package/button/oscd-outlined-button.js.map +1 -0
  25. package/button/oscd-text-button.d.ts +12 -0
  26. package/button/oscd-text-button.js +9 -0
  27. package/button/oscd-text-button.js.map +1 -0
  28. package/dialog/OscdDialog.d.ts +42 -0
  29. package/dialog/OscdDialog.js +49 -0
  30. package/dialog/OscdDialog.js.map +1 -0
  31. package/dialog/oscd-dialog.d.ts +7 -0
  32. package/dialog/oscd-dialog.js +4 -0
  33. package/dialog/oscd-dialog.js.map +1 -0
  34. package/divider/OscdDivider.d.ts +26 -0
  35. package/divider/OscdDivider.js +22 -0
  36. package/divider/OscdDivider.js.map +1 -0
  37. package/divider/oscd-divider.d.ts +7 -0
  38. package/divider/oscd-divider.js +4 -0
  39. package/divider/oscd-divider.js.map +1 -0
  40. package/elevation/OscdElevation.d.ts +23 -0
  41. package/elevation/OscdElevation.js +19 -0
  42. package/elevation/OscdElevation.js.map +1 -0
  43. package/elevation/_elevation.scss +6 -0
  44. package/elevation/internal/_elevation.scss +176 -0
  45. package/elevation/internal/elevation-styles.css +1 -0
  46. package/elevation/internal/elevation-styles.css.map +1 -0
  47. package/elevation/internal/elevation-styles.d.ts +1 -0
  48. package/elevation/internal/elevation-styles.js +10 -0
  49. package/elevation/internal/elevation-styles.js.map +1 -0
  50. package/elevation/internal/elevation-styles.scss +10 -0
  51. package/elevation/internal/elevation.d.ts +13 -0
  52. package/elevation/internal/elevation.js +21 -0
  53. package/elevation/internal/elevation.js.map +1 -0
  54. package/elevation/oscd-elevation.d.ts +12 -0
  55. package/elevation/oscd-elevation.js +9 -0
  56. package/elevation/oscd-elevation.js.map +1 -0
  57. package/field/OscdFilledField.d.ts +21 -0
  58. package/field/OscdFilledField.js +18 -0
  59. package/field/OscdFilledField.js.map +1 -0
  60. package/field/OscdOutlinedField.d.ts +23 -0
  61. package/field/OscdOutlinedField.js +20 -0
  62. package/field/OscdOutlinedField.js.map +1 -0
  63. package/field/oscd-filled-field.d.ts +7 -0
  64. package/field/oscd-filled-field.js +4 -0
  65. package/field/oscd-filled-field.js.map +1 -0
  66. package/field/oscd-outlined-field.d.ts +7 -0
  67. package/field/oscd-outlined-field.js +4 -0
  68. package/field/oscd-outlined-field.js.map +1 -0
  69. package/focus/OscdFocusRing.d.ts +5 -0
  70. package/focus/OscdFocusRing.js +6 -0
  71. package/focus/OscdFocusRing.js.map +1 -0
  72. package/focus/_focus-ring.scss +6 -0
  73. package/focus/internal/_focus-ring.scss +113 -0
  74. package/focus/internal/focus-ring-styles.css +1 -0
  75. package/focus/internal/focus-ring-styles.css.map +1 -0
  76. package/focus/internal/focus-ring-styles.d.ts +1 -0
  77. package/focus/internal/focus-ring-styles.js +10 -0
  78. package/focus/internal/focus-ring-styles.js.map +1 -0
  79. package/focus/internal/focus-ring-styles.scss +10 -0
  80. package/focus/internal/focus-ring.d.ts +39 -0
  81. package/focus/internal/focus-ring.js +101 -0
  82. package/focus/internal/focus-ring.js.map +1 -0
  83. package/focus/oscd-focus-ring.d.ts +21 -0
  84. package/focus/oscd-focus-ring.js +23 -0
  85. package/focus/oscd-focus-ring.js.map +1 -0
  86. package/icon/OscdIcon.d.ts +24 -0
  87. package/icon/OscdIcon.js +20 -0
  88. package/icon/OscdIcon.js.map +1 -0
  89. package/icon/oscd-icon.d.ts +7 -0
  90. package/icon/oscd-icon.js +4 -0
  91. package/icon/oscd-icon.js.map +1 -0
  92. package/iconbutton/OscdFilledIconButton.d.ts +39 -0
  93. package/iconbutton/OscdFilledIconButton.js +37 -0
  94. package/iconbutton/OscdFilledIconButton.js.map +1 -0
  95. package/iconbutton/OscdFilledTonalIconButton.d.ts +39 -0
  96. package/iconbutton/OscdFilledTonalIconButton.js +37 -0
  97. package/iconbutton/OscdFilledTonalIconButton.js.map +1 -0
  98. package/iconbutton/OscdIconButton.d.ts +38 -0
  99. package/iconbutton/OscdIconButton.js +36 -0
  100. package/iconbutton/OscdIconButton.js.map +1 -0
  101. package/iconbutton/OscdOutlinedIconButton.d.ts +38 -0
  102. package/iconbutton/OscdOutlinedIconButton.js +36 -0
  103. package/iconbutton/OscdOutlinedIconButton.js.map +1 -0
  104. package/iconbutton/oscd-filled-icon-button.d.ts +7 -0
  105. package/iconbutton/oscd-filled-icon-button.js +4 -0
  106. package/iconbutton/oscd-filled-icon-button.js.map +1 -0
  107. package/iconbutton/oscd-filled-tonal-icon-button.d.ts +7 -0
  108. package/iconbutton/oscd-filled-tonal-icon-button.js +4 -0
  109. package/iconbutton/oscd-filled-tonal-icon-button.js.map +1 -0
  110. package/iconbutton/oscd-icon-button.d.ts +7 -0
  111. package/iconbutton/oscd-icon-button.js +4 -0
  112. package/iconbutton/oscd-icon-button.js.map +1 -0
  113. package/iconbutton/oscd-outlined-icon-button.d.ts +7 -0
  114. package/iconbutton/oscd-outlined-icon-button.js +4 -0
  115. package/iconbutton/oscd-outlined-icon-button.js.map +1 -0
  116. package/internal/aria/aria.d.ts +103 -0
  117. package/internal/aria/aria.js +81 -0
  118. package/internal/aria/aria.js.map +1 -0
  119. package/internal/aria/delegate.d.ts +54 -0
  120. package/internal/aria/delegate.js +176 -0
  121. package/internal/aria/delegate.js.map +1 -0
  122. package/internal/controller/attachable-controller.d.ts +114 -0
  123. package/internal/controller/attachable-controller.js +121 -0
  124. package/internal/controller/attachable-controller.js.map +1 -0
  125. package/internal/controller/form-submitter.d.ts +70 -0
  126. package/internal/controller/form-submitter.js +69 -0
  127. package/internal/controller/form-submitter.js.map +1 -0
  128. package/internal/controller/is-rtl.d.ts +14 -0
  129. package/internal/controller/is-rtl.js +18 -0
  130. package/internal/controller/is-rtl.js.map +1 -0
  131. package/internal/controller/string-converter.d.ts +9 -0
  132. package/internal/controller/string-converter.js +14 -0
  133. package/internal/controller/string-converter.js.map +1 -0
  134. package/internal/events/dispatch-hooks.d.ts +85 -0
  135. package/internal/events/dispatch-hooks.js +151 -0
  136. package/internal/events/dispatch-hooks.js.map +1 -0
  137. package/internal/events/form-label-activation.d.ts +55 -0
  138. package/internal/events/form-label-activation.js +96 -0
  139. package/internal/events/form-label-activation.js.map +1 -0
  140. package/internal/events/redispatch-event.d.ts +27 -0
  141. package/internal/events/redispatch-event.js +40 -0
  142. package/internal/events/redispatch-event.js.map +1 -0
  143. package/internal/motion/_animation.scss +33 -0
  144. package/internal/motion/animation.d.ts +80 -0
  145. package/internal/motion/animation.js +101 -0
  146. package/internal/motion/animation.js.map +1 -0
  147. package/internal/sass/_string-ext.scss +195 -0
  148. package/internal/sass/_var.scss +237 -0
  149. package/labs/badge/OscdBadge.d.ts +14 -0
  150. package/labs/badge/OscdBadge.js +15 -0
  151. package/labs/badge/OscdBadge.js.map +1 -0
  152. package/labs/badge/_badge.scss +6 -0
  153. package/labs/badge/internal/_badge.scss +76 -0
  154. package/labs/badge/internal/badge-styles.css +1 -0
  155. package/labs/badge/internal/badge-styles.css.map +1 -0
  156. package/labs/badge/internal/badge-styles.d.ts +1 -0
  157. package/labs/badge/internal/badge-styles.js +10 -0
  158. package/labs/badge/internal/badge-styles.js.map +1 -0
  159. package/labs/badge/internal/badge-styles.scss +10 -0
  160. package/labs/badge/internal/badge.d.ts +13 -0
  161. package/labs/badge/internal/badge.js +28 -0
  162. package/labs/badge/internal/badge.js.map +1 -0
  163. package/labs/badge/oscd-badge.d.ts +19 -0
  164. package/labs/badge/oscd-badge.js +21 -0
  165. package/labs/badge/oscd-badge.js.map +1 -0
  166. package/labs/behaviors/constraint-validation.d.ts +133 -0
  167. package/labs/behaviors/constraint-validation.js +131 -0
  168. package/labs/behaviors/constraint-validation.js.map +1 -0
  169. package/labs/behaviors/element-internals.d.ts +45 -0
  170. package/labs/behaviors/element-internals.js +46 -0
  171. package/labs/behaviors/element-internals.js.map +1 -0
  172. package/labs/behaviors/focusable.d.ts +39 -0
  173. package/labs/behaviors/focusable.js +87 -0
  174. package/labs/behaviors/focusable.js.map +1 -0
  175. package/labs/behaviors/form-associated.d.ts +199 -0
  176. package/labs/behaviors/form-associated.js +175 -0
  177. package/labs/behaviors/form-associated.js.map +1 -0
  178. package/labs/behaviors/mixin.d.ts +54 -0
  179. package/labs/behaviors/mixin.js +7 -0
  180. package/labs/behaviors/mixin.js.map +1 -0
  181. package/labs/behaviors/on-report-validity.d.ts +71 -0
  182. package/labs/behaviors/on-report-validity.js +289 -0
  183. package/labs/behaviors/on-report-validity.js.map +1 -0
  184. package/labs/behaviors/validators/checkbox-validator.d.ts +35 -0
  185. package/labs/behaviors/validators/checkbox-validator.js +34 -0
  186. package/labs/behaviors/validators/checkbox-validator.js.map +1 -0
  187. package/labs/behaviors/validators/radio-validator.d.ts +38 -0
  188. package/labs/behaviors/validators/radio-validator.js +67 -0
  189. package/labs/behaviors/validators/radio-validator.js.map +1 -0
  190. package/labs/behaviors/validators/select-validator.d.ts +35 -0
  191. package/labs/behaviors/validators/select-validator.js +35 -0
  192. package/labs/behaviors/validators/select-validator.js.map +1 -0
  193. package/labs/behaviors/validators/text-field-validator.d.ts +110 -0
  194. package/labs/behaviors/validators/text-field-validator.js +156 -0
  195. package/labs/behaviors/validators/text-field-validator.js.map +1 -0
  196. package/labs/behaviors/validators/validator.d.ts +96 -0
  197. package/labs/behaviors/validators/validator.js +73 -0
  198. package/labs/behaviors/validators/validator.js.map +1 -0
  199. package/labs/card/OscdElevatedCard.d.ts +20 -0
  200. package/labs/card/OscdElevatedCard.js +23 -0
  201. package/labs/card/OscdElevatedCard.js.map +1 -0
  202. package/labs/card/OscdFilledCard.d.ts +20 -0
  203. package/labs/card/OscdFilledCard.js +23 -0
  204. package/labs/card/OscdFilledCard.js.map +1 -0
  205. package/labs/card/OscdOutlinedCard.d.ts +20 -0
  206. package/labs/card/OscdOutlinedCard.js +23 -0
  207. package/labs/card/OscdOutlinedCard.js.map +1 -0
  208. package/labs/card/_elevated-card.scss +6 -0
  209. package/labs/card/_filled-card.scss +6 -0
  210. package/labs/card/_outlined-card.scss +6 -0
  211. package/labs/card/demo/demo.d.ts +7 -0
  212. package/labs/card/demo/demo.js +13 -0
  213. package/labs/card/demo/demo.js.map +1 -0
  214. package/labs/card/demo/stories.d.ts +15 -0
  215. package/labs/card/demo/stories.js +104 -0
  216. package/labs/card/demo/stories.js.map +1 -0
  217. package/labs/card/internal/_elevated-card.scss +35 -0
  218. package/labs/card/internal/_filled-card.scss +35 -0
  219. package/labs/card/internal/_outlined-card.scss +40 -0
  220. package/labs/card/internal/_shared.scss +62 -0
  221. package/labs/card/internal/card.d.ts +12 -0
  222. package/labs/card/internal/card.js +21 -0
  223. package/labs/card/internal/card.js.map +1 -0
  224. package/labs/card/internal/elevated-styles.css +1 -0
  225. package/labs/card/internal/elevated-styles.css.map +1 -0
  226. package/labs/card/internal/elevated-styles.d.ts +1 -0
  227. package/labs/card/internal/elevated-styles.js +10 -0
  228. package/labs/card/internal/elevated-styles.js.map +1 -0
  229. package/labs/card/internal/elevated-styles.scss +10 -0
  230. package/labs/card/internal/filled-styles.css +1 -0
  231. package/labs/card/internal/filled-styles.css.map +1 -0
  232. package/labs/card/internal/filled-styles.d.ts +1 -0
  233. package/labs/card/internal/filled-styles.js +10 -0
  234. package/labs/card/internal/filled-styles.js.map +1 -0
  235. package/labs/card/internal/filled-styles.scss +10 -0
  236. package/labs/card/internal/outlined-styles.css +1 -0
  237. package/labs/card/internal/outlined-styles.css.map +1 -0
  238. package/labs/card/internal/outlined-styles.d.ts +1 -0
  239. package/labs/card/internal/outlined-styles.js +10 -0
  240. package/labs/card/internal/outlined-styles.js.map +1 -0
  241. package/labs/card/internal/outlined-styles.scss +10 -0
  242. package/labs/card/internal/shared-styles.css +1 -0
  243. package/labs/card/internal/shared-styles.css.map +1 -0
  244. package/labs/card/internal/shared-styles.d.ts +1 -0
  245. package/labs/card/internal/shared-styles.js +10 -0
  246. package/labs/card/internal/shared-styles.js.map +1 -0
  247. package/labs/card/internal/shared-styles.scss +10 -0
  248. package/labs/card/oscd-elevated-card.d.ts +20 -0
  249. package/labs/card/oscd-elevated-card.js +23 -0
  250. package/labs/card/oscd-elevated-card.js.map +1 -0
  251. package/labs/card/oscd-filled-card.d.ts +25 -0
  252. package/labs/card/oscd-filled-card.js +28 -0
  253. package/labs/card/oscd-filled-card.js.map +1 -0
  254. package/labs/card/oscd-outlined-card.d.ts +20 -0
  255. package/labs/card/oscd-outlined-card.js +23 -0
  256. package/labs/card/oscd-outlined-card.js.map +1 -0
  257. package/list/OscdList.d.ts +34 -0
  258. package/list/OscdList.js +44 -0
  259. package/list/OscdList.js.map +1 -0
  260. package/list/OscdListItem.d.ts +56 -0
  261. package/list/OscdListItem.js +90 -0
  262. package/list/OscdListItem.js.map +1 -0
  263. package/list/oscd-list-item.d.ts +7 -0
  264. package/list/oscd-list-item.js +4 -0
  265. package/list/oscd-list-item.js.map +1 -0
  266. package/list/oscd-list.d.ts +7 -0
  267. package/list/oscd-list.js +4 -0
  268. package/list/oscd-list.js.map +1 -0
  269. package/menu/OscdMenu.d.ts +68 -0
  270. package/menu/OscdMenu.js +62 -0
  271. package/menu/OscdMenu.js.map +1 -0
  272. package/menu/OscdMenuItem.d.ts +32 -0
  273. package/menu/OscdMenuItem.js +26 -0
  274. package/menu/OscdMenuItem.js.map +1 -0
  275. package/menu/oscd-menu-item.d.ts +7 -0
  276. package/menu/oscd-menu-item.js +4 -0
  277. package/menu/oscd-menu-item.js.map +1 -0
  278. package/menu/oscd-menu.d.ts +7 -0
  279. package/menu/oscd-menu.js +4 -0
  280. package/menu/oscd-menu.js.map +1 -0
  281. package/navigation-drawer/OscdNavigationDrawer.d.ts +21 -0
  282. package/navigation-drawer/OscdNavigationDrawer.js +43 -0
  283. package/navigation-drawer/OscdNavigationDrawer.js.map +1 -0
  284. package/navigation-drawer/OscdNavigationDrawerHeader.d.ts +15 -0
  285. package/navigation-drawer/OscdNavigationDrawerHeader.js +66 -0
  286. package/navigation-drawer/OscdNavigationDrawerHeader.js.map +1 -0
  287. package/navigation-drawer/oscd-navigation-drawer-header.d.ts +7 -0
  288. package/navigation-drawer/oscd-navigation-drawer-header.js +4 -0
  289. package/navigation-drawer/oscd-navigation-drawer-header.js.map +1 -0
  290. package/navigation-drawer/oscd-navigation-drawer.d.ts +7 -0
  291. package/navigation-drawer/oscd-navigation-drawer.js +4 -0
  292. package/navigation-drawer/oscd-navigation-drawer.js.map +1 -0
  293. package/package.json +79 -107
  294. package/radio/OscdRadio.d.ts +31 -0
  295. package/radio/OscdRadio.js +27 -0
  296. package/radio/OscdRadio.js.map +1 -0
  297. package/radio/demo/demo.d.ts +7 -0
  298. package/radio/demo/demo.js +14 -0
  299. package/radio/demo/demo.js.map +1 -0
  300. package/radio/demo/stories.d.ts +13 -0
  301. package/radio/demo/stories.js +97 -0
  302. package/radio/demo/stories.js.map +1 -0
  303. package/radio/internal/_radio.scss +198 -0
  304. package/radio/internal/radio-styles.css +1 -0
  305. package/radio/internal/radio-styles.css.map +1 -0
  306. package/radio/internal/radio-styles.d.ts +1 -0
  307. package/radio/internal/radio-styles.js +10 -0
  308. package/radio/internal/radio-styles.js.map +1 -0
  309. package/radio/internal/radio-styles.scss +10 -0
  310. package/radio/internal/radio.d.ts +59 -0
  311. package/radio/internal/radio.js +175 -0
  312. package/radio/internal/radio.js.map +1 -0
  313. package/radio/internal/single-selection-controller.d.ts +80 -0
  314. package/radio/internal/single-selection-controller.js +199 -0
  315. package/radio/internal/single-selection-controller.js.map +1 -0
  316. package/radio/oscd-radio.d.ts +32 -0
  317. package/radio/oscd-radio.js +34 -0
  318. package/radio/oscd-radio.js.map +1 -0
  319. package/ripple/OscdRipple.d.ts +5 -0
  320. package/ripple/OscdRipple.js +6 -0
  321. package/ripple/OscdRipple.js.map +1 -0
  322. package/ripple/_ripple.scss +6 -0
  323. package/ripple/internal/_ripple.scss +92 -0
  324. package/ripple/internal/ripple-styles.css +1 -0
  325. package/ripple/internal/ripple-styles.css.map +1 -0
  326. package/ripple/internal/ripple-styles.d.ts +1 -0
  327. package/ripple/internal/ripple-styles.js +10 -0
  328. package/ripple/internal/ripple-styles.js.map +1 -0
  329. package/ripple/internal/ripple-styles.scss +10 -0
  330. package/ripple/internal/ripple.d.ts +76 -0
  331. package/ripple/internal/ripple.js +425 -0
  332. package/ripple/internal/ripple.js.map +1 -0
  333. package/ripple/oscd-ripple.d.ts +29 -0
  334. package/ripple/oscd-ripple.js +31 -0
  335. package/ripple/oscd-ripple.js.map +1 -0
  336. package/select/OscdFilledSelect.d.ts +42 -0
  337. package/select/OscdFilledSelect.js +39 -0
  338. package/select/OscdFilledSelect.js.map +1 -0
  339. package/select/OscdOutlinedSelect.d.ts +42 -0
  340. package/select/OscdOutlinedSelect.js +39 -0
  341. package/select/OscdOutlinedSelect.js.map +1 -0
  342. package/select/OscdSelectOption.d.ts +46 -0
  343. package/select/OscdSelectOption.js +41 -0
  344. package/select/OscdSelectOption.js.map +1 -0
  345. package/select/oscd-filled-select.d.ts +7 -0
  346. package/select/oscd-filled-select.js +4 -0
  347. package/select/oscd-filled-select.js.map +1 -0
  348. package/select/oscd-outlined-select.d.ts +7 -0
  349. package/select/oscd-outlined-select.js +4 -0
  350. package/select/oscd-outlined-select.js.map +1 -0
  351. package/select/oscd-select-option.d.ts +7 -0
  352. package/select/oscd-select-option.js +4 -0
  353. package/select/oscd-select-option.js.map +1 -0
  354. package/tabs/OscdPrimaryTab.d.ts +22 -0
  355. package/tabs/OscdPrimaryTab.js +19 -0
  356. package/tabs/OscdPrimaryTab.js.map +1 -0
  357. package/tabs/OscdSecondaryTab.d.ts +22 -0
  358. package/tabs/OscdSecondaryTab.js +19 -0
  359. package/tabs/OscdSecondaryTab.js.map +1 -0
  360. package/tabs/OscdTabs.d.ts +22 -0
  361. package/tabs/OscdTabs.js +18 -0
  362. package/tabs/OscdTabs.js.map +1 -0
  363. package/tabs/oscd-primary-tab.d.ts +7 -0
  364. package/tabs/oscd-primary-tab.js +4 -0
  365. package/tabs/oscd-primary-tab.js.map +1 -0
  366. package/tabs/oscd-secondary-tab.d.ts +7 -0
  367. package/tabs/oscd-secondary-tab.js +4 -0
  368. package/tabs/oscd-secondary-tab.js.map +1 -0
  369. package/tabs/oscd-tabs.d.ts +7 -0
  370. package/tabs/oscd-tabs.js +4 -0
  371. package/tabs/oscd-tabs.js.map +1 -0
  372. package/textfield/OscdFilledTextField.d.ts +30 -0
  373. package/textfield/OscdFilledTextField.js +33 -0
  374. package/textfield/OscdFilledTextField.js.map +1 -0
  375. package/textfield/OscdOutlinedTextField.d.ts +28 -0
  376. package/textfield/OscdOutlinedTextField.js +31 -0
  377. package/textfield/OscdOutlinedTextField.js.map +1 -0
  378. package/textfield/oscd-filled-text-field.d.ts +7 -0
  379. package/textfield/oscd-filled-text-field.js +4 -0
  380. package/textfield/oscd-filled-text-field.js.map +1 -0
  381. package/textfield/oscd-outlined-text-field.d.ts +7 -0
  382. package/textfield/oscd-outlined-text-field.js +4 -0
  383. package/textfield/oscd-outlined-text-field.js.map +1 -0
  384. package/tokens/_index.scss +66 -0
  385. package/tokens/_md-comp-assist-chip.scss +153 -0
  386. package/tokens/_md-comp-badge.scss +39 -0
  387. package/tokens/_md-comp-checkbox.scss +156 -0
  388. package/tokens/_md-comp-circular-progress.scss +79 -0
  389. package/tokens/_md-comp-dialog.scss +112 -0
  390. package/tokens/_md-comp-divider.scss +43 -0
  391. package/tokens/_md-comp-elevated-button.scss +143 -0
  392. package/tokens/_md-comp-elevated-card.scss +80 -0
  393. package/tokens/_md-comp-elevation.scss +48 -0
  394. package/tokens/_md-comp-fab-branded.scss +155 -0
  395. package/tokens/_md-comp-fab.scss +296 -0
  396. package/tokens/_md-comp-filled-button.scss +143 -0
  397. package/tokens/_md-comp-filled-card.scss +80 -0
  398. package/tokens/_md-comp-filled-field.scss +293 -0
  399. package/tokens/_md-comp-filled-icon-button.scss +119 -0
  400. package/tokens/_md-comp-filled-select.scss +198 -0
  401. package/tokens/_md-comp-filled-text-field.scss +200 -0
  402. package/tokens/_md-comp-filled-tonal-button.scss +143 -0
  403. package/tokens/_md-comp-filled-tonal-icon-button.scss +123 -0
  404. package/tokens/_md-comp-filter-chip.scss +265 -0
  405. package/tokens/_md-comp-focus-ring.scss +78 -0
  406. package/tokens/_md-comp-full-screen-dialog.scss +25 -0
  407. package/tokens/_md-comp-icon-button.scss +94 -0
  408. package/tokens/_md-comp-icon.scss +46 -0
  409. package/tokens/_md-comp-input-chip.scss +247 -0
  410. package/tokens/_md-comp-item.scss +88 -0
  411. package/tokens/_md-comp-linear-progress.scss +64 -0
  412. package/tokens/_md-comp-list-item.scss +173 -0
  413. package/tokens/_md-comp-list.scss +44 -0
  414. package/tokens/_md-comp-menu-item.scss +125 -0
  415. package/tokens/_md-comp-menu.scss +59 -0
  416. package/tokens/_md-comp-navigation-bar.scss +44 -0
  417. package/tokens/_md-comp-navigation-drawer.scss +44 -0
  418. package/tokens/_md-comp-outlined-button.scss +139 -0
  419. package/tokens/_md-comp-outlined-card.scss +86 -0
  420. package/tokens/_md-comp-outlined-field.scss +268 -0
  421. package/tokens/_md-comp-outlined-icon-button.scss +117 -0
  422. package/tokens/_md-comp-outlined-segmented-button.scss +123 -0
  423. package/tokens/_md-comp-outlined-select.scss +186 -0
  424. package/tokens/_md-comp-outlined-text-field.scss +187 -0
  425. package/tokens/_md-comp-primary-tab.scss +160 -0
  426. package/tokens/_md-comp-radio.scss +86 -0
  427. package/tokens/_md-comp-ripple.scss +48 -0
  428. package/tokens/_md-comp-secondary-tab.scss +158 -0
  429. package/tokens/_md-comp-slider.scss +117 -0
  430. package/tokens/_md-comp-suggestion-chip.scss +157 -0
  431. package/tokens/_md-comp-switch.scss +187 -0
  432. package/tokens/_md-comp-test-table.scss +43 -0
  433. package/tokens/_md-comp-text-button.scss +132 -0
  434. package/tokens/_md-ref-palette.scss +112 -0
  435. package/tokens/_md-ref-typeface.scss +46 -0
  436. package/tokens/_md-sys-color.scss +119 -0
  437. package/tokens/_md-sys-elevation.scss +31 -0
  438. package/tokens/_md-sys-motion.scss +12 -0
  439. package/tokens/_md-sys-shape.scss +102 -0
  440. package/tokens/_md-sys-state.scss +12 -0
  441. package/tokens/_md-sys-typescale.scss +149 -0
  442. package/tokens/internal/_shape.scss +93 -0
  443. package/tokens/internal/_validate.scss +109 -0
  444. package/tokens/v0_192/_index.scss +107 -0
  445. package/tokens/v0_192/_md-comp-assist-chip.scss +111 -0
  446. package/tokens/v0_192/_md-comp-badge.scss +61 -0
  447. package/tokens/v0_192/_md-comp-banner.scss +76 -0
  448. package/tokens/v0_192/_md-comp-bottom-app-bar.scss +36 -0
  449. package/tokens/v0_192/_md-comp-carousel-item.scss +66 -0
  450. package/tokens/v0_192/_md-comp-checkbox.scss +129 -0
  451. package/tokens/v0_192/_md-comp-circular-progress-indicator.scss +41 -0
  452. package/tokens/v0_192/_md-comp-data-table.scss +99 -0
  453. package/tokens/v0_192/_md-comp-date-input-modal.scss +90 -0
  454. package/tokens/v0_192/_md-comp-date-picker-docked.scss +247 -0
  455. package/tokens/v0_192/_md-comp-date-picker-modal.scss +306 -0
  456. package/tokens/v0_192/_md-comp-dialog.scss +124 -0
  457. package/tokens/v0_192/_md-comp-divider.scss +28 -0
  458. package/tokens/v0_192/_md-comp-elevated-button.scss +92 -0
  459. package/tokens/v0_192/_md-comp-elevated-card.scss +60 -0
  460. package/tokens/v0_192/_md-comp-extended-fab-branded.scss +89 -0
  461. package/tokens/v0_192/_md-comp-extended-fab-primary.scss +97 -0
  462. package/tokens/v0_192/_md-comp-extended-fab-secondary.scss +98 -0
  463. package/tokens/v0_192/_md-comp-extended-fab-surface.scss +93 -0
  464. package/tokens/v0_192/_md-comp-extended-fab-tertiary.scss +98 -0
  465. package/tokens/v0_192/_md-comp-fab-branded-large.scss +63 -0
  466. package/tokens/v0_192/_md-comp-fab-branded.scss +63 -0
  467. package/tokens/v0_192/_md-comp-fab-primary-large.scss +68 -0
  468. package/tokens/v0_192/_md-comp-fab-primary-small.scss +68 -0
  469. package/tokens/v0_192/_md-comp-fab-primary.scss +68 -0
  470. package/tokens/v0_192/_md-comp-fab-secondary-large.scss +69 -0
  471. package/tokens/v0_192/_md-comp-fab-secondary-small.scss +69 -0
  472. package/tokens/v0_192/_md-comp-fab-secondary.scss +69 -0
  473. package/tokens/v0_192/_md-comp-fab-surface-large.scss +67 -0
  474. package/tokens/v0_192/_md-comp-fab-surface-small.scss +67 -0
  475. package/tokens/v0_192/_md-comp-fab-surface.scss +67 -0
  476. package/tokens/v0_192/_md-comp-fab-tertiary-large.scss +69 -0
  477. package/tokens/v0_192/_md-comp-fab-tertiary-small.scss +69 -0
  478. package/tokens/v0_192/_md-comp-fab-tertiary.scss +69 -0
  479. package/tokens/v0_192/_md-comp-filled-autocomplete.scss +239 -0
  480. package/tokens/v0_192/_md-comp-filled-button.scss +92 -0
  481. package/tokens/v0_192/_md-comp-filled-card.scss +62 -0
  482. package/tokens/v0_192/_md-comp-filled-icon-button.scss +83 -0
  483. package/tokens/v0_192/_md-comp-filled-menu-button.scss +101 -0
  484. package/tokens/v0_192/_md-comp-filled-select.scss +273 -0
  485. package/tokens/v0_192/_md-comp-filled-text-field.scss +193 -0
  486. package/tokens/v0_192/_md-comp-filled-tonal-button.scss +102 -0
  487. package/tokens/v0_192/_md-comp-filled-tonal-icon-button.scss +90 -0
  488. package/tokens/v0_192/_md-comp-filter-chip.scss +210 -0
  489. package/tokens/v0_192/_md-comp-full-screen-dialog.scss +114 -0
  490. package/tokens/v0_192/_md-comp-icon-button.scss +74 -0
  491. package/tokens/v0_192/_md-comp-input-chip.scss +187 -0
  492. package/tokens/v0_192/_md-comp-linear-progress-indicator.scss +43 -0
  493. package/tokens/v0_192/_md-comp-list.scss +255 -0
  494. package/tokens/v0_192/_md-comp-menu.scss +44 -0
  495. package/tokens/v0_192/_md-comp-navigation-bar.scss +115 -0
  496. package/tokens/v0_192/_md-comp-navigation-drawer.scss +165 -0
  497. package/tokens/v0_192/_md-comp-navigation-rail.scss +119 -0
  498. package/tokens/v0_192/_md-comp-outlined-autocomplete.scss +229 -0
  499. package/tokens/v0_192/_md-comp-outlined-button.scss +87 -0
  500. package/tokens/v0_192/_md-comp-outlined-card.scss +66 -0
  501. package/tokens/v0_192/_md-comp-outlined-icon-button.scss +83 -0
  502. package/tokens/v0_192/_md-comp-outlined-menu-button.scss +97 -0
  503. package/tokens/v0_192/_md-comp-outlined-segmented-button.scss +115 -0
  504. package/tokens/v0_192/_md-comp-outlined-select.scss +263 -0
  505. package/tokens/v0_192/_md-comp-outlined-text-field.scss +174 -0
  506. package/tokens/v0_192/_md-comp-plain-tooltip.scss +58 -0
  507. package/tokens/v0_192/_md-comp-primary-navigation-tab.scss +124 -0
  508. package/tokens/v0_192/_md-comp-radio-button.scss +71 -0
  509. package/tokens/v0_192/_md-comp-rich-tooltip.scss +122 -0
  510. package/tokens/v0_192/_md-comp-scrim.scss +28 -0
  511. package/tokens/v0_192/_md-comp-search-bar.scss +100 -0
  512. package/tokens/v0_192/_md-comp-search-view.scss +94 -0
  513. package/tokens/v0_192/_md-comp-secondary-navigation-tab.scss +87 -0
  514. package/tokens/v0_192/_md-comp-sheet-bottom.scss +46 -0
  515. package/tokens/v0_192/_md-comp-sheet-floating.scss +35 -0
  516. package/tokens/v0_192/_md-comp-sheet-side.scss +94 -0
  517. package/tokens/v0_192/_md-comp-slider.scss +118 -0
  518. package/tokens/v0_192/_md-comp-snackbar.scss +130 -0
  519. package/tokens/v0_192/_md-comp-standard-menu-button.scss +101 -0
  520. package/tokens/v0_192/_md-comp-suggestion-chip.scss +127 -0
  521. package/tokens/v0_192/_md-comp-switch.scss +141 -0
  522. package/tokens/v0_192/_md-comp-text-button.scss +80 -0
  523. package/tokens/v0_192/_md-comp-time-input.scss +220 -0
  524. package/tokens/v0_192/_md-comp-time-picker.scss +267 -0
  525. package/tokens/v0_192/_md-comp-top-app-bar-large.scss +64 -0
  526. package/tokens/v0_192/_md-comp-top-app-bar-medium.scss +64 -0
  527. package/tokens/v0_192/_md-comp-top-app-bar-small-centered.scss +71 -0
  528. package/tokens/v0_192/_md-comp-top-app-bar-small.scss +67 -0
  529. package/tokens/v0_192/_md-ref-palette.scss +109 -0
  530. package/tokens/v0_192/_md-ref-typeface.scss +23 -0
  531. package/tokens/v0_192/_md-sys-color.scss +135 -0
  532. package/tokens/v0_192/_md-sys-elevation.scss +24 -0
  533. package/tokens/v0_192/_md-sys-motion.scss +55 -0
  534. package/tokens/v0_192/_md-sys-shape.scss +33 -0
  535. package/tokens/v0_192/_md-sys-state.scss +22 -0
  536. package/tokens/v0_192/_md-sys-typescale.scss +286 -0
  537. package/tokens/v0_192/index.test.css +1 -0
  538. package/tokens/v0_192/index.test.css.map +1 -0
  539. package/tokens/v0_192/index.test.scss +584 -0
  540. package/tokens/v0_192/lib.test.css +1 -0
  541. package/tokens/v0_192/lib.test.css.map +1 -0
  542. package/tokens/v0_192/lib.test.scss +663 -0
  543. package/utils/storybook/getStorybookHelpers.d.ts +4 -0
  544. package/utils/storybook/getStorybookHelpers.js +52 -0
  545. package/utils/storybook/getStorybookHelpers.js.map +1 -0
  546. package/utils/storybook/scopedWcDecorator.d.ts +2 -0
  547. package/utils/storybook/scopedWcDecorator.js +38 -0
  548. package/utils/storybook/scopedWcDecorator.js.map +1 -0
  549. package/utils/storybook/stories/components/knob-ui-components.d.ts +103 -0
  550. package/utils/storybook/stories/components/knob-ui-components.js +414 -0
  551. package/utils/storybook/stories/components/knob-ui-components.js.map +1 -0
  552. package/utils/storybook/stories/components/stories-renderer.d.ts +40 -0
  553. package/utils/storybook/stories/components/stories-renderer.js +204 -0
  554. package/utils/storybook/stories/components/stories-renderer.js.map +1 -0
  555. package/utils/storybook/stories/components/story-knob-panel.d.ts +53 -0
  556. package/utils/storybook/stories/components/story-knob-panel.js +333 -0
  557. package/utils/storybook/stories/components/story-knob-panel.js.map +1 -0
  558. package/utils/storybook/stories/components/story-renderer.d.ts +27 -0
  559. package/utils/storybook/stories/components/story-renderer.js +84 -0
  560. package/utils/storybook/stories/components/story-renderer.js.map +1 -0
  561. package/utils/storybook/stories/index.d.ts +8 -0
  562. package/utils/storybook/stories/index.js +11 -0
  563. package/utils/storybook/stories/index.js.map +1 -0
  564. package/utils/storybook/stories/knobs.d.ts +143 -0
  565. package/utils/storybook/stories/knobs.js +177 -0
  566. package/utils/storybook/stories/knobs.js.map +1 -0
  567. package/utils/storybook/stories/material-collection.d.ts +75 -0
  568. package/utils/storybook/stories/material-collection.js +59 -0
  569. package/utils/storybook/stories/material-collection.js.map +1 -0
  570. package/utils/storybook/stories/story.d.ts +85 -0
  571. package/utils/storybook/stories/story.js +142 -0
  572. package/utils/storybook/stories/story.js.map +1 -0
  573. package/utils/storybook/stories/theme-loader.d.ts +13 -0
  574. package/utils/storybook/stories/theme-loader.js +43 -0
  575. package/utils/storybook/stories/theme-loader.js.map +1 -0
  576. package/utils/storybook/themingDecorator.d.ts +19 -0
  577. package/utils/storybook/themingDecorator.js +100 -0
  578. package/utils/storybook/themingDecorator.js.map +1 -0
@@ -0,0 +1,425 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { __decorate } from "tslib";
7
+ import { html, isServer, LitElement } from 'lit';
8
+ import { property, query, state } from 'lit/decorators.js';
9
+ import { classMap } from 'lit/directives/class-map.js';
10
+ import { AttachableController, } from '../../internal/controller/attachable-controller.js';
11
+ import { EASING } from '../../internal/motion/animation.js';
12
+ const PRESS_GROW_MS = 450;
13
+ const MINIMUM_PRESS_MS = 225;
14
+ const INITIAL_ORIGIN_SCALE = 0.2;
15
+ const PADDING = 10;
16
+ const SOFT_EDGE_MINIMUM_SIZE = 75;
17
+ const SOFT_EDGE_CONTAINER_RATIO = 0.35;
18
+ const PRESS_PSEUDO = '::after';
19
+ const ANIMATION_FILL = 'forwards';
20
+ /**
21
+ * Interaction states for the ripple.
22
+ *
23
+ * On Touch:
24
+ * - `INACTIVE -> TOUCH_DELAY -> WAITING_FOR_CLICK -> INACTIVE`
25
+ * - `INACTIVE -> TOUCH_DELAY -> HOLDING -> WAITING_FOR_CLICK -> INACTIVE`
26
+ *
27
+ * On Mouse or Pen:
28
+ * - `INACTIVE -> WAITING_FOR_CLICK -> INACTIVE`
29
+ */
30
+ var State;
31
+ (function (State) {
32
+ /**
33
+ * Initial state of the control, no touch in progress.
34
+ *
35
+ * Transitions:
36
+ * - on touch down: transition to `TOUCH_DELAY`.
37
+ * - on mouse down: transition to `WAITING_FOR_CLICK`.
38
+ */
39
+ State[State["INACTIVE"] = 0] = "INACTIVE";
40
+ /**
41
+ * Touch down has been received, waiting to determine if it's a swipe or
42
+ * scroll.
43
+ *
44
+ * Transitions:
45
+ * - on touch up: begin press; transition to `WAITING_FOR_CLICK`.
46
+ * - on cancel: transition to `INACTIVE`.
47
+ * - after `TOUCH_DELAY_MS`: begin press; transition to `HOLDING`.
48
+ */
49
+ State[State["TOUCH_DELAY"] = 1] = "TOUCH_DELAY";
50
+ /**
51
+ * A touch has been deemed to be a press
52
+ *
53
+ * Transitions:
54
+ * - on up: transition to `WAITING_FOR_CLICK`.
55
+ */
56
+ State[State["HOLDING"] = 2] = "HOLDING";
57
+ /**
58
+ * The user touch has finished, transition into rest state.
59
+ *
60
+ * Transitions:
61
+ * - on click end press; transition to `INACTIVE`.
62
+ */
63
+ State[State["WAITING_FOR_CLICK"] = 3] = "WAITING_FOR_CLICK";
64
+ })(State || (State = {}));
65
+ /**
66
+ * Events that the ripple listens to.
67
+ */
68
+ const EVENTS = [
69
+ 'click',
70
+ 'contextmenu',
71
+ 'pointercancel',
72
+ 'pointerdown',
73
+ 'pointerenter',
74
+ 'pointerleave',
75
+ 'pointerup',
76
+ ];
77
+ /**
78
+ * Delay reacting to touch so that we do not show the ripple for a swipe or
79
+ * scroll interaction.
80
+ */
81
+ const TOUCH_DELAY_MS = 150;
82
+ /**
83
+ * Used to detect if HCM is active. Events do not process during HCM when the
84
+ * ripple is not displayed.
85
+ */
86
+ const FORCED_COLORS = isServer
87
+ ? null
88
+ : window.matchMedia('(forced-colors: active)');
89
+ /**
90
+ * A ripple component.
91
+ */
92
+ export class Ripple extends LitElement {
93
+ constructor() {
94
+ super(...arguments);
95
+ /**
96
+ * Disables the ripple.
97
+ */
98
+ this.disabled = false;
99
+ this.hovered = false;
100
+ this.pressed = false;
101
+ this.rippleSize = '';
102
+ this.rippleScale = '';
103
+ this.initialSize = 0;
104
+ this.state = State.INACTIVE;
105
+ this.checkBoundsAfterContextMenu = false;
106
+ this.attachableController = new AttachableController(this, this.onControlChange.bind(this));
107
+ }
108
+ get htmlFor() {
109
+ return this.attachableController.htmlFor;
110
+ }
111
+ set htmlFor(htmlFor) {
112
+ this.attachableController.htmlFor = htmlFor;
113
+ }
114
+ get control() {
115
+ return this.attachableController.control;
116
+ }
117
+ set control(control) {
118
+ this.attachableController.control = control;
119
+ }
120
+ attach(control) {
121
+ this.attachableController.attach(control);
122
+ }
123
+ detach() {
124
+ this.attachableController.detach();
125
+ }
126
+ connectedCallback() {
127
+ super.connectedCallback();
128
+ // Needed for VoiceOver, which will create a "group" if the element is a
129
+ // sibling to other content.
130
+ this.setAttribute('aria-hidden', 'true');
131
+ }
132
+ render() {
133
+ const classes = {
134
+ hovered: this.hovered,
135
+ pressed: this.pressed,
136
+ };
137
+ return html `<div class="surface ${classMap(classes)}"></div>`;
138
+ }
139
+ update(changedProps) {
140
+ if (changedProps.has('disabled') && this.disabled) {
141
+ this.hovered = false;
142
+ this.pressed = false;
143
+ }
144
+ super.update(changedProps);
145
+ }
146
+ /**
147
+ * TODO(b/269799771): make private
148
+ * @private only public for slider
149
+ */
150
+ handlePointerenter(event) {
151
+ if (!this.shouldReactToEvent(event)) {
152
+ return;
153
+ }
154
+ this.hovered = true;
155
+ }
156
+ /**
157
+ * TODO(b/269799771): make private
158
+ * @private only public for slider
159
+ */
160
+ handlePointerleave(event) {
161
+ if (!this.shouldReactToEvent(event)) {
162
+ return;
163
+ }
164
+ this.hovered = false;
165
+ // release a held mouse or pen press that moves outside the element
166
+ if (this.state !== State.INACTIVE) {
167
+ this.endPressAnimation();
168
+ }
169
+ }
170
+ handlePointerup(event) {
171
+ if (!this.shouldReactToEvent(event)) {
172
+ return;
173
+ }
174
+ if (this.state === State.HOLDING) {
175
+ this.state = State.WAITING_FOR_CLICK;
176
+ return;
177
+ }
178
+ if (this.state === State.TOUCH_DELAY) {
179
+ this.state = State.WAITING_FOR_CLICK;
180
+ this.startPressAnimation(this.rippleStartEvent);
181
+ return;
182
+ }
183
+ }
184
+ async handlePointerdown(event) {
185
+ if (!this.shouldReactToEvent(event)) {
186
+ return;
187
+ }
188
+ this.rippleStartEvent = event;
189
+ if (!this.isTouch(event)) {
190
+ this.state = State.WAITING_FOR_CLICK;
191
+ this.startPressAnimation(event);
192
+ return;
193
+ }
194
+ // after a longpress contextmenu event, an extra `pointerdown` can be
195
+ // dispatched to the pressed element. Check that the down is within
196
+ // bounds of the element in this case.
197
+ if (this.checkBoundsAfterContextMenu && !this.inBounds(event)) {
198
+ return;
199
+ }
200
+ this.checkBoundsAfterContextMenu = false;
201
+ // Wait for a hold after touch delay
202
+ this.state = State.TOUCH_DELAY;
203
+ await new Promise(resolve => {
204
+ setTimeout(resolve, TOUCH_DELAY_MS);
205
+ });
206
+ if (this.state !== State.TOUCH_DELAY) {
207
+ return;
208
+ }
209
+ this.state = State.HOLDING;
210
+ this.startPressAnimation(event);
211
+ }
212
+ handleClick() {
213
+ // Click is a MouseEvent in Firefox and Safari, so we cannot use
214
+ // `shouldReactToEvent`
215
+ if (this.disabled) {
216
+ return;
217
+ }
218
+ if (this.state === State.WAITING_FOR_CLICK) {
219
+ this.endPressAnimation();
220
+ return;
221
+ }
222
+ if (this.state === State.INACTIVE) {
223
+ // keyboard synthesized click event
224
+ this.startPressAnimation();
225
+ this.endPressAnimation();
226
+ }
227
+ }
228
+ handlePointercancel(event) {
229
+ if (!this.shouldReactToEvent(event)) {
230
+ return;
231
+ }
232
+ this.endPressAnimation();
233
+ }
234
+ handleContextmenu() {
235
+ if (this.disabled) {
236
+ return;
237
+ }
238
+ this.checkBoundsAfterContextMenu = true;
239
+ this.endPressAnimation();
240
+ }
241
+ determineRippleSize() {
242
+ const { height, width } = this.getBoundingClientRect();
243
+ const maxDim = Math.max(height, width);
244
+ const softEdgeSize = Math.max(SOFT_EDGE_CONTAINER_RATIO * maxDim, SOFT_EDGE_MINIMUM_SIZE);
245
+ const initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE);
246
+ const hypotenuse = Math.sqrt(width ** 2 + height ** 2);
247
+ const maxRadius = hypotenuse + PADDING;
248
+ this.initialSize = initialSize;
249
+ this.rippleScale = `${(maxRadius + softEdgeSize) / initialSize}`;
250
+ this.rippleSize = `${initialSize}px`;
251
+ }
252
+ getNormalizedPointerEventCoords(pointerEvent) {
253
+ const { scrollX, scrollY } = window;
254
+ const { left, top } = this.getBoundingClientRect();
255
+ const documentX = scrollX + left;
256
+ const documentY = scrollY + top;
257
+ const { pageX, pageY } = pointerEvent;
258
+ return { x: pageX - documentX, y: pageY - documentY };
259
+ }
260
+ getTranslationCoordinates(positionEvent) {
261
+ const { height, width } = this.getBoundingClientRect();
262
+ // end in the center
263
+ const endPoint = {
264
+ x: (width - this.initialSize) / 2,
265
+ y: (height - this.initialSize) / 2,
266
+ };
267
+ let startPoint;
268
+ if (positionEvent instanceof PointerEvent) {
269
+ startPoint = this.getNormalizedPointerEventCoords(positionEvent);
270
+ }
271
+ else {
272
+ startPoint = {
273
+ x: width / 2,
274
+ y: height / 2,
275
+ };
276
+ }
277
+ // center around start point
278
+ startPoint = {
279
+ x: startPoint.x - this.initialSize / 2,
280
+ y: startPoint.y - this.initialSize / 2,
281
+ };
282
+ return { startPoint, endPoint };
283
+ }
284
+ startPressAnimation(positionEvent) {
285
+ if (!this.mdRoot) {
286
+ return;
287
+ }
288
+ this.pressed = true;
289
+ this.growAnimation?.cancel();
290
+ this.determineRippleSize();
291
+ const { startPoint, endPoint } = this.getTranslationCoordinates(positionEvent);
292
+ const translateStart = `${startPoint.x}px, ${startPoint.y}px`;
293
+ const translateEnd = `${endPoint.x}px, ${endPoint.y}px`;
294
+ this.growAnimation = this.mdRoot.animate({
295
+ top: [0, 0],
296
+ left: [0, 0],
297
+ height: [this.rippleSize, this.rippleSize],
298
+ width: [this.rippleSize, this.rippleSize],
299
+ transform: [
300
+ `translate(${translateStart}) scale(1)`,
301
+ `translate(${translateEnd}) scale(${this.rippleScale})`,
302
+ ],
303
+ }, {
304
+ pseudoElement: PRESS_PSEUDO,
305
+ duration: PRESS_GROW_MS,
306
+ easing: EASING.STANDARD,
307
+ fill: ANIMATION_FILL,
308
+ });
309
+ }
310
+ async endPressAnimation() {
311
+ this.rippleStartEvent = undefined;
312
+ this.state = State.INACTIVE;
313
+ const animation = this.growAnimation;
314
+ let pressAnimationPlayState = Infinity;
315
+ if (typeof animation?.currentTime === 'number') {
316
+ pressAnimationPlayState = animation.currentTime;
317
+ }
318
+ else if (animation?.currentTime) {
319
+ pressAnimationPlayState = animation.currentTime.to('ms').value;
320
+ }
321
+ if (pressAnimationPlayState >= MINIMUM_PRESS_MS) {
322
+ this.pressed = false;
323
+ return;
324
+ }
325
+ await new Promise(resolve => {
326
+ setTimeout(resolve, MINIMUM_PRESS_MS - pressAnimationPlayState);
327
+ });
328
+ if (this.growAnimation !== animation) {
329
+ // A new press animation was started. The old animation was canceled and
330
+ // should not finish the pressed state.
331
+ return;
332
+ }
333
+ this.pressed = false;
334
+ }
335
+ /**
336
+ * Returns `true` if
337
+ * - the ripple element is enabled
338
+ * - the pointer is primary for the input type
339
+ * - the pointer is the pointer that started the interaction, or will start
340
+ * the interaction
341
+ * - the pointer is a touch, or the pointer state has the primary button
342
+ * held, or the pointer is hovering
343
+ */
344
+ shouldReactToEvent(event) {
345
+ if (this.disabled || !event.isPrimary) {
346
+ return false;
347
+ }
348
+ if (this.rippleStartEvent &&
349
+ this.rippleStartEvent.pointerId !== event.pointerId) {
350
+ return false;
351
+ }
352
+ if (event.type === 'pointerenter' || event.type === 'pointerleave') {
353
+ return !this.isTouch(event);
354
+ }
355
+ const isPrimaryButton = event.buttons === 1;
356
+ return this.isTouch(event) || isPrimaryButton;
357
+ }
358
+ /**
359
+ * Check if the event is within the bounds of the element.
360
+ *
361
+ * This is only needed for the "stuck" contextmenu longpress on Chrome.
362
+ */
363
+ inBounds({ x, y }) {
364
+ const { top, left, bottom, right } = this.getBoundingClientRect();
365
+ return x >= left && x <= right && y >= top && y <= bottom;
366
+ }
367
+ // eslint-disable-next-line class-methods-use-this
368
+ isTouch({ pointerType }) {
369
+ return pointerType === 'touch';
370
+ }
371
+ /** @private */
372
+ async handleEvent(event) {
373
+ if (FORCED_COLORS?.matches) {
374
+ // Skip event logic since the ripple is `display: none`.
375
+ return;
376
+ }
377
+ switch (event.type) {
378
+ case 'click':
379
+ this.handleClick();
380
+ break;
381
+ case 'contextmenu':
382
+ this.handleContextmenu();
383
+ break;
384
+ case 'pointercancel':
385
+ this.handlePointercancel(event);
386
+ break;
387
+ case 'pointerdown':
388
+ await this.handlePointerdown(event);
389
+ break;
390
+ case 'pointerenter':
391
+ this.handlePointerenter(event);
392
+ break;
393
+ case 'pointerleave':
394
+ this.handlePointerleave(event);
395
+ break;
396
+ case 'pointerup':
397
+ this.handlePointerup(event);
398
+ break;
399
+ default:
400
+ break;
401
+ }
402
+ }
403
+ onControlChange(prev, next) {
404
+ if (isServer) {
405
+ return;
406
+ }
407
+ for (const event of EVENTS) {
408
+ prev?.removeEventListener(event, this);
409
+ next?.addEventListener(event, this);
410
+ }
411
+ }
412
+ }
413
+ __decorate([
414
+ property({ type: Boolean, reflect: true })
415
+ ], Ripple.prototype, "disabled", void 0);
416
+ __decorate([
417
+ state()
418
+ ], Ripple.prototype, "hovered", void 0);
419
+ __decorate([
420
+ state()
421
+ ], Ripple.prototype, "pressed", void 0);
422
+ __decorate([
423
+ query('.surface')
424
+ ], Ripple.prototype, "mdRoot", void 0);
425
+ //# sourceMappingURL=ripple.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ripple.js","sourceRoot":"","sources":["ripple.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,OAAO,EAEL,oBAAoB,GACrB,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAE5D,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACjC,MAAM,OAA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,CAAC;wCAAkB;AAiB5C;IAAhB,KAAK,EAAE;uCAAyB;AAChB;IAAhB,KAAK,EAAE;uCAAyB;AAEG;IAAnC,KAAK,CAAC,UAAU,CAAC;sCAA8C","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { html, isServer, LitElement, PropertyValues } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport {\n Attachable,\n AttachableController,\n} from '../../internal/controller/attachable-controller.js';\nimport { EASING } from '../../internal/motion/animation.js';\n\nconst PRESS_GROW_MS = 450;\nconst MINIMUM_PRESS_MS = 225;\nconst INITIAL_ORIGIN_SCALE = 0.2;\nconst PADDING = 10;\nconst SOFT_EDGE_MINIMUM_SIZE = 75;\nconst SOFT_EDGE_CONTAINER_RATIO = 0.35;\nconst PRESS_PSEUDO = '::after';\nconst ANIMATION_FILL = 'forwards';\n\n/**\n * Interaction states for the ripple.\n *\n * On Touch:\n * - `INACTIVE -> TOUCH_DELAY -> WAITING_FOR_CLICK -> INACTIVE`\n * - `INACTIVE -> TOUCH_DELAY -> HOLDING -> WAITING_FOR_CLICK -> INACTIVE`\n *\n * On Mouse or Pen:\n * - `INACTIVE -> WAITING_FOR_CLICK -> INACTIVE`\n */\nenum State {\n /**\n * Initial state of the control, no touch in progress.\n *\n * Transitions:\n * - on touch down: transition to `TOUCH_DELAY`.\n * - on mouse down: transition to `WAITING_FOR_CLICK`.\n */\n INACTIVE,\n /**\n * Touch down has been received, waiting to determine if it's a swipe or\n * scroll.\n *\n * Transitions:\n * - on touch up: begin press; transition to `WAITING_FOR_CLICK`.\n * - on cancel: transition to `INACTIVE`.\n * - after `TOUCH_DELAY_MS`: begin press; transition to `HOLDING`.\n */\n TOUCH_DELAY,\n /**\n * A touch has been deemed to be a press\n *\n * Transitions:\n * - on up: transition to `WAITING_FOR_CLICK`.\n */\n HOLDING,\n /**\n * The user touch has finished, transition into rest state.\n *\n * Transitions:\n * - on click end press; transition to `INACTIVE`.\n */\n WAITING_FOR_CLICK,\n}\n\n/**\n * Events that the ripple listens to.\n */\nconst EVENTS = [\n 'click',\n 'contextmenu',\n 'pointercancel',\n 'pointerdown',\n 'pointerenter',\n 'pointerleave',\n 'pointerup',\n];\n\n/**\n * Delay reacting to touch so that we do not show the ripple for a swipe or\n * scroll interaction.\n */\nconst TOUCH_DELAY_MS = 150;\n\n/**\n * Used to detect if HCM is active. Events do not process during HCM when the\n * ripple is not displayed.\n */\nconst FORCED_COLORS = isServer\n ? null\n : window.matchMedia('(forced-colors: active)');\n\n/**\n * A ripple component.\n */\nexport class Ripple extends LitElement implements Attachable {\n /**\n * Disables the ripple.\n */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n get htmlFor() {\n return this.attachableController.htmlFor;\n }\n\n set htmlFor(htmlFor: string | null) {\n this.attachableController.htmlFor = htmlFor;\n }\n\n get control() {\n return this.attachableController.control;\n }\n set control(control: HTMLElement | null) {\n this.attachableController.control = control;\n }\n\n @state() private hovered = false;\n @state() private pressed = false;\n\n @query('.surface') private readonly mdRoot!: HTMLElement | null;\n private rippleSize = '';\n private rippleScale = '';\n private initialSize = 0;\n private growAnimation?: Animation;\n private state = State.INACTIVE;\n private rippleStartEvent?: PointerEvent;\n private checkBoundsAfterContextMenu = false;\n private readonly attachableController = new AttachableController(\n this,\n this.onControlChange.bind(this),\n );\n\n attach(control: HTMLElement) {\n this.attachableController.attach(control);\n }\n\n detach() {\n this.attachableController.detach();\n }\n\n override connectedCallback() {\n super.connectedCallback();\n // Needed for VoiceOver, which will create a \"group\" if the element is a\n // sibling to other content.\n this.setAttribute('aria-hidden', 'true');\n }\n\n protected override render() {\n const classes = {\n hovered: this.hovered,\n pressed: this.pressed,\n };\n\n return html`<div class=\"surface ${classMap(classes)}\"></div>`;\n }\n\n protected override update(changedProps: PropertyValues<Ripple>) {\n if (changedProps.has('disabled') && this.disabled) {\n this.hovered = false;\n this.pressed = false;\n }\n super.update(changedProps);\n }\n\n /**\n * TODO(b/269799771): make private\n * @private only public for slider\n */\n handlePointerenter(event: PointerEvent) {\n if (!this.shouldReactToEvent(event)) {\n return;\n }\n\n this.hovered = true;\n }\n\n /**\n * TODO(b/269799771): make private\n * @private only public for slider\n */\n handlePointerleave(event: PointerEvent) {\n if (!this.shouldReactToEvent(event)) {\n return;\n }\n\n this.hovered = false;\n\n // release a held mouse or pen press that moves outside the element\n if (this.state !== State.INACTIVE) {\n this.endPressAnimation();\n }\n }\n\n private handlePointerup(event: PointerEvent) {\n if (!this.shouldReactToEvent(event)) {\n return;\n }\n\n if (this.state === State.HOLDING) {\n this.state = State.WAITING_FOR_CLICK;\n return;\n }\n\n if (this.state === State.TOUCH_DELAY) {\n this.state = State.WAITING_FOR_CLICK;\n this.startPressAnimation(this.rippleStartEvent);\n return;\n }\n }\n\n private async handlePointerdown(event: PointerEvent) {\n if (!this.shouldReactToEvent(event)) {\n return;\n }\n\n this.rippleStartEvent = event;\n if (!this.isTouch(event)) {\n this.state = State.WAITING_FOR_CLICK;\n this.startPressAnimation(event);\n return;\n }\n\n // after a longpress contextmenu event, an extra `pointerdown` can be\n // dispatched to the pressed element. Check that the down is within\n // bounds of the element in this case.\n if (this.checkBoundsAfterContextMenu && !this.inBounds(event)) {\n return;\n }\n\n this.checkBoundsAfterContextMenu = false;\n\n // Wait for a hold after touch delay\n this.state = State.TOUCH_DELAY;\n await new Promise(resolve => {\n setTimeout(resolve, TOUCH_DELAY_MS);\n });\n\n if (this.state !== State.TOUCH_DELAY) {\n return;\n }\n\n this.state = State.HOLDING;\n this.startPressAnimation(event);\n }\n\n private handleClick() {\n // Click is a MouseEvent in Firefox and Safari, so we cannot use\n // `shouldReactToEvent`\n if (this.disabled) {\n return;\n }\n\n if (this.state === State.WAITING_FOR_CLICK) {\n this.endPressAnimation();\n return;\n }\n\n if (this.state === State.INACTIVE) {\n // keyboard synthesized click event\n this.startPressAnimation();\n this.endPressAnimation();\n }\n }\n\n private handlePointercancel(event: PointerEvent) {\n if (!this.shouldReactToEvent(event)) {\n return;\n }\n\n this.endPressAnimation();\n }\n\n private handleContextmenu() {\n if (this.disabled) {\n return;\n }\n\n this.checkBoundsAfterContextMenu = true;\n this.endPressAnimation();\n }\n\n private determineRippleSize() {\n const { height, width } = this.getBoundingClientRect();\n const maxDim = Math.max(height, width);\n const softEdgeSize = Math.max(\n SOFT_EDGE_CONTAINER_RATIO * maxDim,\n SOFT_EDGE_MINIMUM_SIZE,\n );\n\n const initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE);\n const hypotenuse = Math.sqrt(width ** 2 + height ** 2);\n const maxRadius = hypotenuse + PADDING;\n\n this.initialSize = initialSize;\n this.rippleScale = `${(maxRadius + softEdgeSize) / initialSize}`;\n this.rippleSize = `${initialSize}px`;\n }\n\n private getNormalizedPointerEventCoords(pointerEvent: PointerEvent): {\n x: number;\n y: number;\n } {\n const { scrollX, scrollY } = window;\n const { left, top } = this.getBoundingClientRect();\n const documentX = scrollX + left;\n const documentY = scrollY + top;\n const { pageX, pageY } = pointerEvent;\n return { x: pageX - documentX, y: pageY - documentY };\n }\n\n private getTranslationCoordinates(positionEvent?: Event) {\n const { height, width } = this.getBoundingClientRect();\n // end in the center\n const endPoint = {\n x: (width - this.initialSize) / 2,\n y: (height - this.initialSize) / 2,\n };\n\n let startPoint;\n if (positionEvent instanceof PointerEvent) {\n startPoint = this.getNormalizedPointerEventCoords(positionEvent);\n } else {\n startPoint = {\n x: width / 2,\n y: height / 2,\n };\n }\n\n // center around start point\n startPoint = {\n x: startPoint.x - this.initialSize / 2,\n y: startPoint.y - this.initialSize / 2,\n };\n\n return { startPoint, endPoint };\n }\n\n private startPressAnimation(positionEvent?: Event) {\n if (!this.mdRoot) {\n return;\n }\n\n this.pressed = true;\n this.growAnimation?.cancel();\n this.determineRippleSize();\n const { startPoint, endPoint } =\n this.getTranslationCoordinates(positionEvent);\n const translateStart = `${startPoint.x}px, ${startPoint.y}px`;\n const translateEnd = `${endPoint.x}px, ${endPoint.y}px`;\n\n this.growAnimation = this.mdRoot.animate(\n {\n top: [0, 0],\n left: [0, 0],\n height: [this.rippleSize, this.rippleSize],\n width: [this.rippleSize, this.rippleSize],\n transform: [\n `translate(${translateStart}) scale(1)`,\n `translate(${translateEnd}) scale(${this.rippleScale})`,\n ],\n },\n {\n pseudoElement: PRESS_PSEUDO,\n duration: PRESS_GROW_MS,\n easing: EASING.STANDARD,\n fill: ANIMATION_FILL,\n },\n );\n }\n\n private async endPressAnimation() {\n this.rippleStartEvent = undefined;\n this.state = State.INACTIVE;\n const animation = this.growAnimation;\n let pressAnimationPlayState = Infinity;\n if (typeof animation?.currentTime === 'number') {\n pressAnimationPlayState = animation.currentTime;\n } else if (animation?.currentTime) {\n pressAnimationPlayState = animation.currentTime.to('ms').value;\n }\n\n if (pressAnimationPlayState >= MINIMUM_PRESS_MS) {\n this.pressed = false;\n return;\n }\n\n await new Promise(resolve => {\n setTimeout(resolve, MINIMUM_PRESS_MS - pressAnimationPlayState);\n });\n\n if (this.growAnimation !== animation) {\n // A new press animation was started. The old animation was canceled and\n // should not finish the pressed state.\n return;\n }\n\n this.pressed = false;\n }\n\n /**\n * Returns `true` if\n * - the ripple element is enabled\n * - the pointer is primary for the input type\n * - the pointer is the pointer that started the interaction, or will start\n * the interaction\n * - the pointer is a touch, or the pointer state has the primary button\n * held, or the pointer is hovering\n */\n private shouldReactToEvent(event: PointerEvent) {\n if (this.disabled || !event.isPrimary) {\n return false;\n }\n\n if (\n this.rippleStartEvent &&\n this.rippleStartEvent.pointerId !== event.pointerId\n ) {\n return false;\n }\n\n if (event.type === 'pointerenter' || event.type === 'pointerleave') {\n return !this.isTouch(event);\n }\n\n const isPrimaryButton = event.buttons === 1;\n return this.isTouch(event) || isPrimaryButton;\n }\n\n /**\n * Check if the event is within the bounds of the element.\n *\n * This is only needed for the \"stuck\" contextmenu longpress on Chrome.\n */\n private inBounds({ x, y }: PointerEvent) {\n const { top, left, bottom, right } = this.getBoundingClientRect();\n return x >= left && x <= right && y >= top && y <= bottom;\n }\n\n // eslint-disable-next-line class-methods-use-this\n private isTouch({ pointerType }: PointerEvent) {\n return pointerType === 'touch';\n }\n\n /** @private */\n async handleEvent(event: Event) {\n if (FORCED_COLORS?.matches) {\n // Skip event logic since the ripple is `display: none`.\n return;\n }\n\n switch (event.type) {\n case 'click':\n this.handleClick();\n break;\n case 'contextmenu':\n this.handleContextmenu();\n break;\n case 'pointercancel':\n this.handlePointercancel(event as PointerEvent);\n break;\n case 'pointerdown':\n await this.handlePointerdown(event as PointerEvent);\n break;\n case 'pointerenter':\n this.handlePointerenter(event as PointerEvent);\n break;\n case 'pointerleave':\n this.handlePointerleave(event as PointerEvent);\n break;\n case 'pointerup':\n this.handlePointerup(event as PointerEvent);\n break;\n default:\n break;\n }\n }\n\n private onControlChange(prev: HTMLElement | null, next: HTMLElement | null) {\n if (isServer) {\n return;\n }\n\n for (const event of EVENTS) {\n prev?.removeEventListener(event, this);\n next?.addEventListener(event, this);\n }\n }\n}\n"]}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { CSSResultOrNative } from 'lit';
7
+ import { Ripple } from './internal/ripple.js';
8
+ declare global {
9
+ interface HTMLElementTagNameMap {
10
+ 'oscd-ripple': OscdRipple;
11
+ }
12
+ }
13
+ /**
14
+ * @tagname oscd-ripple
15
+ * @summary Ripples, also known as state layers, are visual indicators used to
16
+ * communicate the status of a component or interactive element.
17
+ *
18
+ * @description A state layer is a semi-transparent covering on an element that
19
+ * indicates its state. State layers provide a systematic approach to
20
+ * visualizing states by using opacity. A layer can be applied to an entire
21
+ * element or in a circular shape and only one state layer can be applied at a
22
+ * given time.
23
+ *
24
+ * @final
25
+ * @suppress {visibility}
26
+ */
27
+ export declare class OscdRipple extends Ripple {
28
+ static styles: CSSResultOrNative[];
29
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { __decorate } from "tslib";
7
+ import { customElement } from 'lit/decorators.js';
8
+ import { Ripple } from './internal/ripple.js';
9
+ import { styles } from './internal/ripple-styles.js';
10
+ /**
11
+ * @tagname oscd-ripple
12
+ * @summary Ripples, also known as state layers, are visual indicators used to
13
+ * communicate the status of a component or interactive element.
14
+ *
15
+ * @description A state layer is a semi-transparent covering on an element that
16
+ * indicates its state. State layers provide a systematic approach to
17
+ * visualizing states by using opacity. A layer can be applied to an entire
18
+ * element or in a circular shape and only one state layer can be applied at a
19
+ * given time.
20
+ *
21
+ * @final
22
+ * @suppress {visibility}
23
+ */
24
+ let OscdRipple = class OscdRipple extends Ripple {
25
+ static { this.styles = [styles]; }
26
+ };
27
+ OscdRipple = __decorate([
28
+ customElement('oscd-ripple')
29
+ ], OscdRipple);
30
+ export { OscdRipple };
31
+ //# sourceMappingURL=oscd-ripple.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oscd-ripple.js","sourceRoot":"","sources":["oscd-ripple.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAQrD;;;;;;;;;;;;;GAaG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,MAAM;aACpB,WAAM,GAAwB,CAAC,MAAM,CAAC,AAAhC,CAAiC;;AAD5C,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAEtB","sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { CSSResultOrNative } from 'lit';\nimport { customElement } from 'lit/decorators.js';\n\nimport { Ripple } from './internal/ripple.js';\nimport { styles } from './internal/ripple-styles.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'oscd-ripple': OscdRipple;\n }\n}\n\n/**\n * @tagname oscd-ripple\n * @summary Ripples, also known as state layers, are visual indicators used to\n * communicate the status of a component or interactive element.\n *\n * @description A state layer is a semi-transparent covering on an element that\n * indicates its state. State layers provide a systematic approach to\n * visualizing states by using opacity. A layer can be applied to an entire\n * element or in a circular shape and only one state layer can be applied at a\n * given time.\n *\n * @final\n * @suppress {visibility}\n */\n@customElement('oscd-ripple')\nexport class OscdRipple extends Ripple {\n static override styles: CSSResultOrNative[] = [styles];\n}\n"]}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * @license
8
+ * Copyright 2025 OMICRON Electronics GmbH
9
+ * SPDX-License-Identifier: Apache-2.0
10
+ */
11
+ import { CSSResultOrNative } from 'lit';
12
+ import { FilledSelect } from '@material/web/select/internal/filled-select.js';
13
+ /**
14
+ * @tag oscd-filled-select
15
+ * @summary
16
+ * Select menus display a list of choices on temporary surfaces and display the
17
+ * currently selected menu item above the menu.
18
+ *
19
+ * The select component allows users to choose a value from a fixed list of
20
+ * available options. Composed of an interactive anchor button and a menu, it is
21
+ * analogous to the native HTML `<select>` element. This is the "filled"
22
+ * variant.
23
+ *
24
+ * @example
25
+ * ```html
26
+ * <oscd-filled-select label="fruits">
27
+ * <!-- An empty selected option will give select an "un-filled" state -->
28
+ * <oscd-select-option selected></oscd-select-option>
29
+ * <oscd-select-option value="apple" headline="Apple"></oscd-select-option>
30
+ * <oscd-select-option value="banana" headline="Banana"></oscd-select-option>
31
+ * <oscd-select-option value="kiwi" headline="Kiwi"></oscd-select-option>
32
+ * <oscd-select-option value="orange" headline="Orange"></oscd-select-option>
33
+ * <oscd-select-option value="tomato" headline="Tomato"></oscd-select-option>
34
+ * </oscd-filled-select>
35
+ * ```
36
+ *
37
+ * @final
38
+ * @suppress {visibility}
39
+ */
40
+ export declare class OscdFilledSelect extends FilledSelect {
41
+ static styles: CSSResultOrNative[];
42
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { FilledSelect } from '@material/web/select/internal/filled-select.js';
7
+ import { styles } from '@material/web/select/internal/filled-select-styles.js';
8
+ import { styles as sharedStyles } from '@material/web/select/internal/shared-styles.js';
9
+ /**
10
+ * @tag oscd-filled-select
11
+ * @summary
12
+ * Select menus display a list of choices on temporary surfaces and display the
13
+ * currently selected menu item above the menu.
14
+ *
15
+ * The select component allows users to choose a value from a fixed list of
16
+ * available options. Composed of an interactive anchor button and a menu, it is
17
+ * analogous to the native HTML `<select>` element. This is the "filled"
18
+ * variant.
19
+ *
20
+ * @example
21
+ * ```html
22
+ * <oscd-filled-select label="fruits">
23
+ * <!-- An empty selected option will give select an "un-filled" state -->
24
+ * <oscd-select-option selected></oscd-select-option>
25
+ * <oscd-select-option value="apple" headline="Apple"></oscd-select-option>
26
+ * <oscd-select-option value="banana" headline="Banana"></oscd-select-option>
27
+ * <oscd-select-option value="kiwi" headline="Kiwi"></oscd-select-option>
28
+ * <oscd-select-option value="orange" headline="Orange"></oscd-select-option>
29
+ * <oscd-select-option value="tomato" headline="Tomato"></oscd-select-option>
30
+ * </oscd-filled-select>
31
+ * ```
32
+ *
33
+ * @final
34
+ * @suppress {visibility}
35
+ */
36
+ export class OscdFilledSelect extends FilledSelect {
37
+ static { this.styles = [sharedStyles, styles]; }
38
+ }
39
+ //# sourceMappingURL=OscdFilledSelect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OscdFilledSelect.js","sourceRoot":"","sources":["OscdFilledSelect.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,uDAAuD,CAAC;AAC/E,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAExF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,OAAO,gBAAiB,SAAQ,YAAY;aAChC,WAAM,GAAwB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @license\n * Copyright 2025 OMICRON Electronics GmbH\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { CSSResultOrNative } from 'lit';\nimport { FilledSelect } from '@material/web/select/internal/filled-select.js';\nimport { styles } from '@material/web/select/internal/filled-select-styles.js';\nimport { styles as sharedStyles } from '@material/web/select/internal/shared-styles.js';\n\n/**\n * @tag oscd-filled-select\n * @summary\n * Select menus display a list of choices on temporary surfaces and display the\n * currently selected menu item above the menu.\n *\n * The select component allows users to choose a value from a fixed list of\n * available options. Composed of an interactive anchor button and a menu, it is\n * analogous to the native HTML `<select>` element. This is the \"filled\"\n * variant.\n *\n * @example\n * ```html\n * <oscd-filled-select label=\"fruits\">\n * <!-- An empty selected option will give select an \"un-filled\" state -->\n * <oscd-select-option selected></oscd-select-option>\n * <oscd-select-option value=\"apple\" headline=\"Apple\"></oscd-select-option>\n * <oscd-select-option value=\"banana\" headline=\"Banana\"></oscd-select-option>\n * <oscd-select-option value=\"kiwi\" headline=\"Kiwi\"></oscd-select-option>\n * <oscd-select-option value=\"orange\" headline=\"Orange\"></oscd-select-option>\n * <oscd-select-option value=\"tomato\" headline=\"Tomato\"></oscd-select-option>\n * </oscd-filled-select>\n * ```\n *\n * @final\n * @suppress {visibility}\n */\nexport class OscdFilledSelect extends FilledSelect {\n static override styles: CSSResultOrNative[] = [sharedStyles, styles];\n}\n"]}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * @license
8
+ * Copyright 2025 OMICRON Electronics GmbH
9
+ * SPDX-License-Identifier: Apache-2.0
10
+ */
11
+ import { CSSResultOrNative } from 'lit';
12
+ import { OutlinedSelect } from '@material/web/select/internal/outlined-select.js';
13
+ /**
14
+ * @tag oscd-outlined-select
15
+ * @summary
16
+ * Select menus display a list of choices on temporary surfaces and display the
17
+ * currently selected menu item above the menu.
18
+ *
19
+ * The select component allows users to choose a value from a fixed list of
20
+ * available options. Composed of an interactive anchor button and a menu, it is
21
+ * analogous to the native HTML `<select>` element. This is the "outlined"
22
+ * variant.
23
+ *
24
+ * @example
25
+ * ```html
26
+ * <oscd-outlined-select label="fruits">
27
+ * <!-- An empty selected option will give select an "un-filled" state -->
28
+ * <oscd-select-option selected></oscd-select-option>
29
+ * <oscd-select-option value="apple" headline="Apple"></oscd-select-option>
30
+ * <oscd-select-option value="banana" headline="Banana"></oscd-select-option>
31
+ * <oscd-select-option value="kiwi" headline="Kiwi"></oscd-select-option>
32
+ * <oscd-select-option value="orange" headline="Orange"></oscd-select-option>
33
+ * <oscd-select-option value="tomato" headline="Tomato"></oscd-select-option>
34
+ * </oscd-outlined-select>
35
+ * ```
36
+ *
37
+ * @final
38
+ * @suppress {visibility}
39
+ */
40
+ export declare class OscdOutlinedSelect extends OutlinedSelect {
41
+ static styles: CSSResultOrNative[];
42
+ }