@omicronenergy/oscd-ui 0.0.7 → 0.0.8

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 (801) hide show
  1. package/README.md +13 -13
  2. package/dist/about/Catalog.stories.js +305 -0
  3. package/{app-bar → dist/app-bar}/OscdAppBar.js +23 -23
  4. package/dist/app-bar/OscdAppBar.stories.js +83 -0
  5. package/dist/button/OscdElevatedButton.js +53 -0
  6. package/dist/button/OscdElevatedButton.spec.js +36 -0
  7. package/dist/button/OscdElevatedButton.stories.js +20 -0
  8. package/dist/button/OscdFilledButton.js +51 -0
  9. package/dist/button/OscdFilledButton.spec.js +36 -0
  10. package/dist/button/OscdFilledButton.stories.js +20 -0
  11. package/dist/button/OscdFilledTonalButton.js +52 -0
  12. package/dist/button/OscdFilledTonalButton.spec.js +36 -0
  13. package/dist/button/OscdFilledTonalButton.stories.js +20 -0
  14. package/dist/button/OscdOutlinedButton.js +46 -0
  15. package/dist/button/OscdOutlinedButton.spec.js +36 -0
  16. package/dist/button/OscdOutlinedButton.stories.js +20 -0
  17. package/dist/button/OscdTextButton.js +44 -0
  18. package/dist/button/OscdTextButton.spec.js +36 -0
  19. package/dist/button/OscdTextButton.stories.js +20 -0
  20. package/dist/button/oscd-elevated-button.js +9 -0
  21. package/dist/button/oscd-filled-button.js +9 -0
  22. package/dist/button/oscd-filled-tonal-button.js +9 -0
  23. package/dist/button/oscd-outlined-button.js +9 -0
  24. package/dist/button/oscd-text-button.js +9 -0
  25. package/dist/checkbox/OscdCheckbox.js +36 -0
  26. package/dist/checkbox/OscdCheckbox.spec.js +38 -0
  27. package/dist/checkbox/OscdCheckbox.stories.js +20 -0
  28. package/dist/checkbox/oscd-checkbox.js +9 -0
  29. package/dist/chips/OscdAssistChip.js +36 -0
  30. package/dist/chips/OscdAssistChip.spec.js +36 -0
  31. package/dist/chips/OscdAssistChip.stories.js +20 -0
  32. package/dist/chips/OscdChipSet.js +18 -0
  33. package/dist/chips/OscdChipSet.spec.js +38 -0
  34. package/dist/chips/OscdChipSet.stories.js +20 -0
  35. package/dist/chips/OscdFilterChip.js +42 -0
  36. package/dist/chips/OscdFilterChip.spec.js +36 -0
  37. package/dist/chips/OscdFilterChip.stories.js +20 -0
  38. package/dist/chips/OscdInputChip.js +38 -0
  39. package/dist/chips/OscdInputChip.spec.js +36 -0
  40. package/dist/chips/OscdInputChip.stories.js +20 -0
  41. package/dist/chips/OscdSuggestionChip.js +38 -0
  42. package/dist/chips/OscdSuggestionChip.spec.js +36 -0
  43. package/dist/chips/OscdSuggestionChip.stories.js +20 -0
  44. package/dist/chips/oscd-assist-chip.js +9 -0
  45. package/dist/chips/oscd-chip-set.js +9 -0
  46. package/dist/chips/oscd-filter-chip.js +9 -0
  47. package/dist/chips/oscd-input-chip.js +9 -0
  48. package/dist/chips/oscd-suggestion-chip.js +9 -0
  49. package/{dialog → dist/dialog}/OscdDialog.js +12 -13
  50. package/dist/dialog/OscdDialog.spec.js +38 -0
  51. package/dist/dialog/OscdDialog.stories.js +20 -0
  52. package/dist/dialog/oscd-dialog.js +9 -0
  53. package/dist/divider/OscdDivider.js +21 -0
  54. package/dist/divider/OscdDivider.spec.js +38 -0
  55. package/dist/divider/OscdDivider.stories.js +20 -0
  56. package/dist/divider/oscd-divider.js +9 -0
  57. package/dist/elevation/OscdElevation.js +20 -0
  58. package/dist/elevation/OscdElevation.spec.js +36 -0
  59. package/dist/elevation/OscdElevation.stories.js +20 -0
  60. package/dist/elevation/oscd-elevation.js +9 -0
  61. package/dist/fab/OscdBrandedFab.js +68 -0
  62. package/dist/fab/OscdBrandedFab.spec.js +36 -0
  63. package/dist/fab/OscdBrandedFab.stories.js +20 -0
  64. package/dist/fab/OscdFab.js +58 -0
  65. package/dist/fab/OscdFab.spec.js +38 -0
  66. package/dist/fab/OscdFab.stories.js +20 -0
  67. package/dist/fab/oscd-branded-fab.js +9 -0
  68. package/dist/fab/oscd-fab.js +9 -0
  69. package/dist/field/OscdFilledField.js +18 -0
  70. package/dist/field/OscdFilledField.spec.js +36 -0
  71. package/dist/field/OscdFilledField.stories.js +20 -0
  72. package/dist/field/OscdOutlinedField.js +18 -0
  73. package/dist/field/OscdOutlinedField.spec.js +36 -0
  74. package/dist/field/OscdOutlinedField.stories.js +20 -0
  75. package/dist/field/oscd-filled-field.js +9 -0
  76. package/dist/field/oscd-outlined-field.js +9 -0
  77. package/dist/focus/OscdFocusRing.js +18 -0
  78. package/dist/focus/OscdFocusRing.spec.js +36 -0
  79. package/dist/focus/OscdFocusRing.stories.js +20 -0
  80. package/dist/focus/oscd-focus-ring.js +9 -0
  81. package/dist/icon/OscdIcon.js +17 -0
  82. package/dist/icon/OscdIcon.spec.js +38 -0
  83. package/dist/icon/OscdIcon.stories.js +20 -0
  84. package/dist/icon/oscd-icon.js +9 -0
  85. package/dist/iconbutton/OscdFilledIconButton.js +49 -0
  86. package/dist/iconbutton/OscdFilledIconButton.spec.js +36 -0
  87. package/dist/iconbutton/OscdFilledIconButton.stories.js +20 -0
  88. package/dist/iconbutton/OscdFilledTonalIconButton.js +49 -0
  89. package/dist/iconbutton/OscdFilledTonalIconButton.spec.js +40 -0
  90. package/dist/iconbutton/OscdFilledTonalIconButton.stories.js +20 -0
  91. package/dist/iconbutton/OscdIconButton.js +48 -0
  92. package/dist/iconbutton/OscdIconButton.spec.js +36 -0
  93. package/dist/iconbutton/OscdIconButton.stories.js +20 -0
  94. package/dist/iconbutton/OscdOutlinedIconButton.js +48 -0
  95. package/dist/iconbutton/OscdOutlinedIconButton.spec.js +38 -0
  96. package/dist/iconbutton/OscdOutlinedIconButton.stories.js +20 -0
  97. package/dist/iconbutton/oscd-filled-icon-button.js +9 -0
  98. package/dist/iconbutton/oscd-filled-tonal-icon-button.js +9 -0
  99. package/dist/iconbutton/oscd-icon-button.js +9 -0
  100. package/dist/iconbutton/oscd-outlined-icon-button.js +9 -0
  101. package/dist/labs/badge/OscdBadge.js +16 -0
  102. package/dist/labs/badge/OscdBadge.spec.js +38 -0
  103. package/dist/labs/badge/OscdBadge.stories.js +20 -0
  104. package/dist/labs/badge/oscd-badge.js +9 -0
  105. package/dist/labs/card/OscdElevatedCard.js +27 -0
  106. package/dist/labs/card/OscdElevatedCard.spec.js +36 -0
  107. package/dist/labs/card/OscdElevatedCard.stories.js +20 -0
  108. package/dist/labs/card/OscdFilledCard.js +27 -0
  109. package/dist/labs/card/OscdFilledCard.spec.js +36 -0
  110. package/dist/labs/card/OscdFilledCard.stories.js +20 -0
  111. package/dist/labs/card/OscdOutlinedCard.js +27 -0
  112. package/dist/labs/card/OscdOutlinedCard.spec.js +36 -0
  113. package/dist/labs/card/OscdOutlinedCard.stories.js +20 -0
  114. package/dist/labs/card/oscd-elevated-card.js +9 -0
  115. package/dist/labs/card/oscd-filled-card.js +9 -0
  116. package/dist/labs/card/oscd-outlined-card.js +9 -0
  117. package/dist/labs/item/OscdItem.js +71 -0
  118. package/dist/labs/item/OscdItem.spec.js +38 -0
  119. package/dist/labs/item/OscdItem.stories.js +20 -0
  120. package/dist/labs/item/oscd-item.js +9 -0
  121. package/dist/labs/navigationbar/OscdNavigationBar.js +26 -0
  122. package/dist/labs/navigationbar/OscdNavigationBar.spec.js +44 -0
  123. package/dist/labs/navigationbar/OscdNavigationBar.stories.js +20 -0
  124. package/dist/labs/navigationbar/oscd-navigation-bar.js +9 -0
  125. package/dist/labs/navigationtab/OscdNavigationTab.js +30 -0
  126. package/dist/labs/navigationtab/OscdNavigationTab.spec.js +36 -0
  127. package/dist/labs/navigationtab/OscdNavigationTab.stories.js +20 -0
  128. package/dist/labs/navigationtab/oscd-navigation-tab.js +9 -0
  129. package/dist/labs/segmentedbutton/OscdOutlinedSegmentedButton.js +31 -0
  130. package/dist/labs/segmentedbutton/OscdOutlinedSegmentedButton.spec.js +40 -0
  131. package/dist/labs/segmentedbutton/OscdOutlinedSegmentedButton.stories.js +24 -0
  132. package/dist/labs/segmentedbutton/oscd-outlined-segmented-button.js +9 -0
  133. package/dist/labs/segmentedbuttonset/OscdOutlinedSegmentedButtonSet.js +19 -0
  134. package/dist/labs/segmentedbuttonset/OscdOutlinedSegmentedButtonSet.spec.js +40 -0
  135. package/dist/labs/segmentedbuttonset/OscdOutlinedSegmentedButtonSet.stories.js +35 -0
  136. package/dist/labs/segmentedbuttonset/oscd-outlined-segmented-button-set.js +9 -0
  137. package/{list/OscdList.d.ts → dist/list/OscdList.js} +10 -14
  138. package/dist/list/OscdList.spec.js +38 -0
  139. package/dist/list/OscdList.stories.js +20 -0
  140. package/{list/OscdListItem.d.ts → dist/list/OscdListItem.js} +20 -13
  141. package/dist/list/OscdListItem.spec.js +36 -0
  142. package/dist/list/OscdListItem.stories.js +20 -0
  143. package/dist/list/oscd-list-item.js +9 -0
  144. package/dist/list/oscd-list.js +9 -0
  145. package/{menu/OscdMenu.d.ts → dist/menu/OscdMenu.js} +21 -12
  146. package/dist/menu/OscdMenu.spec.js +38 -0
  147. package/dist/menu/OscdMenu.stories.js +20 -0
  148. package/dist/menu/OscdMenuItem.js +40 -0
  149. package/dist/menu/OscdMenuItem.spec.js +36 -0
  150. package/dist/menu/OscdMenuItem.stories.js +20 -0
  151. package/dist/menu/OscdSubMenu.js +59 -0
  152. package/dist/menu/OscdSubMenu.spec.js +38 -0
  153. package/dist/menu/OscdSubMenu.stories.js +20 -0
  154. package/dist/menu/oscd-menu-item.js +9 -0
  155. package/dist/menu/oscd-menu.js +9 -0
  156. package/dist/menu/oscd-sub-menu.js +9 -0
  157. package/dist/navigation-drawer/OscdNavigationDrawer.js +48 -0
  158. package/dist/navigation-drawer/OscdNavigationDrawer.stories.js +98 -0
  159. package/{navigation-drawer → dist/navigation-drawer}/OscdNavigationDrawerHeader.js +6 -6
  160. package/dist/navigation-drawer/OscdNavigationDrawerHeader.stories.js +41 -0
  161. package/dist/progress/OscdCircularProgress.js +24 -0
  162. package/dist/progress/OscdCircularProgress.spec.js +36 -0
  163. package/dist/progress/OscdCircularProgress.stories.js +15 -0
  164. package/dist/progress/OscdLinearProgress.js +23 -0
  165. package/dist/progress/OscdLinearProgress.spec.js +36 -0
  166. package/dist/progress/OscdLinearProgress.stories.js +15 -0
  167. package/dist/progress/oscd-circular-progress.js +9 -0
  168. package/dist/progress/oscd-linear-progress.js +9 -0
  169. package/dist/radio/OscdRadio.js +39 -0
  170. package/dist/radio/OscdRadio.spec.js +38 -0
  171. package/dist/radio/OscdRadio.stories.js +45 -0
  172. package/dist/radio/oscd-radio.js +9 -0
  173. package/{ripple/oscd-ripple.d.ts → dist/ripple/OscdRipple.js} +9 -14
  174. package/dist/ripple/OscdRipple.spec.js +38 -0
  175. package/dist/ripple/OscdRipple.stories.js +20 -0
  176. package/dist/ripple/oscd-ripple.js +9 -0
  177. package/dist/select/OscdFilledSelect.js +54 -0
  178. package/dist/select/OscdFilledSelect.spec.js +36 -0
  179. package/dist/select/OscdFilledSelect.stories.js +21 -0
  180. package/dist/select/OscdOutlinedSelect.js +54 -0
  181. package/dist/select/OscdOutlinedSelect.spec.js +36 -0
  182. package/dist/select/OscdOutlinedSelect.stories.js +21 -0
  183. package/dist/select/OscdSelectOption.js +55 -0
  184. package/dist/select/OscdSelectOption.spec.js +36 -0
  185. package/dist/select/OscdSelectOption.stories.js +22 -0
  186. package/dist/select/oscd-filled-select.js +9 -0
  187. package/dist/select/oscd-outlined-select.js +9 -0
  188. package/dist/select/oscd-select-option.js +9 -0
  189. package/dist/slider/OscdSlider.js +43 -0
  190. package/dist/slider/OscdSlider.spec.js +38 -0
  191. package/dist/slider/OscdSlider.stories.js +20 -0
  192. package/dist/slider/oscd-slider.js +9 -0
  193. package/dist/switch/OscdSwitch.js +33 -0
  194. package/dist/switch/OscdSwitch.spec.js +38 -0
  195. package/dist/switch/OscdSwitch.stories.js +20 -0
  196. package/dist/switch/oscd-switch.js +9 -0
  197. package/dist/tabs/OscdPrimaryTab.js +34 -0
  198. package/dist/tabs/OscdPrimaryTab.spec.js +36 -0
  199. package/dist/tabs/OscdPrimaryTab.stories.js +25 -0
  200. package/dist/tabs/OscdSecondaryTab.js +34 -0
  201. package/dist/tabs/OscdSecondaryTab.spec.js +36 -0
  202. package/dist/tabs/OscdSecondaryTab.stories.js +24 -0
  203. package/dist/tabs/OscdTabs.js +29 -0
  204. package/dist/tabs/OscdTabs.spec.js +38 -0
  205. package/dist/tabs/OscdTabs.stories.js +39 -0
  206. package/dist/tabs/oscd-primary-tab.js +9 -0
  207. package/dist/tabs/oscd-secondary-tab.js +9 -0
  208. package/dist/tabs/oscd-tabs.js +9 -0
  209. package/{textfield → dist/textfield}/OscdFilledTextField.js +12 -10
  210. package/dist/textfield/OscdFilledTextField.spec.js +36 -0
  211. package/dist/textfield/OscdFilledTextField.stories.js +20 -0
  212. package/dist/textfield/OscdOutlinedTextField.js +35 -0
  213. package/dist/textfield/OscdOutlinedTextField.spec.js +36 -0
  214. package/dist/textfield/OscdOutlinedTextField.stories.js +20 -0
  215. package/dist/textfield/oscd-filled-text-field.js +9 -0
  216. package/dist/textfield/oscd-outlined-text-field.js +9 -0
  217. package/{utils → dist/utils}/storybook/getStorybookHelpers.js +9 -5
  218. package/dist/utils/storybook/getStorybookMeta.js +49 -0
  219. package/dist/utils/storybook/story-overrides/button-overrides.js +28 -0
  220. package/dist/utils/storybook/story-overrides/card-overrides.js +35 -0
  221. package/dist/utils/storybook/story-overrides/checkbox-overrides.js +27 -0
  222. package/dist/utils/storybook/story-overrides/chip-overrides.js +41 -0
  223. package/dist/utils/storybook/story-overrides/dialog-overrides.js +43 -0
  224. package/dist/utils/storybook/story-overrides/divider-overrides.js +19 -0
  225. package/dist/utils/storybook/story-overrides/elevation-overrides.js +38 -0
  226. package/dist/utils/storybook/story-overrides/fab-overrides.js +90 -0
  227. package/dist/utils/storybook/story-overrides/icon-buttons-overrides.js +32 -0
  228. package/dist/utils/storybook/story-overrides/icon-overrides.js +23 -0
  229. package/dist/utils/storybook/story-overrides/list-overrides.js +43 -0
  230. package/dist/utils/storybook/story-overrides/menu-overrides.js +75 -0
  231. package/dist/utils/storybook/story-overrides/story-overrides.js +29 -0
  232. package/dist/utils/storybook/story-overrides/text-field-overrides.js +52 -0
  233. package/package.json +138 -89
  234. package/app-bar/OscdAppBar.d.ts +0 -47
  235. package/app-bar/OscdAppBar.js.map +0 -1
  236. package/app-bar/oscd-app-bar.d.ts +0 -12
  237. package/app-bar/oscd-app-bar.js.map +0 -1
  238. package/button/OscdFilledButton.d.ts +0 -38
  239. package/button/OscdFilledButton.js +0 -45
  240. package/button/OscdFilledButton.js.map +0 -1
  241. package/button/OscdFilledButton.spec.d.ts +0 -6
  242. package/button/OscdFilledButton.spec.js +0 -79
  243. package/button/OscdFilledButton.spec.js.map +0 -1
  244. package/button/OscdOutlinedButton.d.ts +0 -40
  245. package/button/OscdOutlinedButton.js +0 -37
  246. package/button/OscdOutlinedButton.js.map +0 -1
  247. package/button/OscdTextButton.d.ts +0 -38
  248. package/button/OscdTextButton.js +0 -35
  249. package/button/OscdTextButton.js.map +0 -1
  250. package/button/oscd-filled-button.d.ts +0 -7
  251. package/button/oscd-filled-button.js +0 -4
  252. package/button/oscd-filled-button.js.map +0 -1
  253. package/button/oscd-outlined-button.d.ts +0 -12
  254. package/button/oscd-outlined-button.js +0 -9
  255. package/button/oscd-outlined-button.js.map +0 -1
  256. package/button/oscd-text-button.d.ts +0 -12
  257. package/button/oscd-text-button.js +0 -9
  258. package/button/oscd-text-button.js.map +0 -1
  259. package/dialog/OscdDialog.d.ts +0 -42
  260. package/dialog/OscdDialog.js.map +0 -1
  261. package/dialog/oscd-dialog.d.ts +0 -7
  262. package/dialog/oscd-dialog.js +0 -4
  263. package/dialog/oscd-dialog.js.map +0 -1
  264. package/divider/OscdDivider.d.ts +0 -26
  265. package/divider/OscdDivider.js +0 -22
  266. package/divider/OscdDivider.js.map +0 -1
  267. package/divider/oscd-divider.d.ts +0 -7
  268. package/divider/oscd-divider.js +0 -4
  269. package/divider/oscd-divider.js.map +0 -1
  270. package/elevation/OscdElevation.d.ts +0 -23
  271. package/elevation/OscdElevation.js +0 -19
  272. package/elevation/OscdElevation.js.map +0 -1
  273. package/elevation/_elevation.scss +0 -6
  274. package/elevation/internal/_elevation.scss +0 -176
  275. package/elevation/internal/elevation-styles.css +0 -1
  276. package/elevation/internal/elevation-styles.css.map +0 -1
  277. package/elevation/internal/elevation-styles.d.ts +0 -1
  278. package/elevation/internal/elevation-styles.js +0 -10
  279. package/elevation/internal/elevation-styles.js.map +0 -1
  280. package/elevation/internal/elevation-styles.scss +0 -10
  281. package/elevation/internal/elevation.d.ts +0 -13
  282. package/elevation/internal/elevation.js +0 -21
  283. package/elevation/internal/elevation.js.map +0 -1
  284. package/elevation/oscd-elevation.d.ts +0 -12
  285. package/elevation/oscd-elevation.js +0 -9
  286. package/elevation/oscd-elevation.js.map +0 -1
  287. package/field/OscdFilledField.d.ts +0 -21
  288. package/field/OscdFilledField.js +0 -18
  289. package/field/OscdFilledField.js.map +0 -1
  290. package/field/OscdOutlinedField.d.ts +0 -23
  291. package/field/OscdOutlinedField.js +0 -20
  292. package/field/OscdOutlinedField.js.map +0 -1
  293. package/field/oscd-filled-field.d.ts +0 -7
  294. package/field/oscd-filled-field.js +0 -4
  295. package/field/oscd-filled-field.js.map +0 -1
  296. package/field/oscd-outlined-field.d.ts +0 -7
  297. package/field/oscd-outlined-field.js +0 -4
  298. package/field/oscd-outlined-field.js.map +0 -1
  299. package/focus/OscdFocusRing.d.ts +0 -5
  300. package/focus/OscdFocusRing.js +0 -6
  301. package/focus/OscdFocusRing.js.map +0 -1
  302. package/focus/_focus-ring.scss +0 -6
  303. package/focus/internal/_focus-ring.scss +0 -113
  304. package/focus/internal/focus-ring-styles.css +0 -1
  305. package/focus/internal/focus-ring-styles.css.map +0 -1
  306. package/focus/internal/focus-ring-styles.d.ts +0 -1
  307. package/focus/internal/focus-ring-styles.js +0 -10
  308. package/focus/internal/focus-ring-styles.js.map +0 -1
  309. package/focus/internal/focus-ring-styles.scss +0 -10
  310. package/focus/internal/focus-ring.d.ts +0 -39
  311. package/focus/internal/focus-ring.js +0 -101
  312. package/focus/internal/focus-ring.js.map +0 -1
  313. package/focus/oscd-focus-ring.d.ts +0 -21
  314. package/focus/oscd-focus-ring.js +0 -23
  315. package/focus/oscd-focus-ring.js.map +0 -1
  316. package/icon/OscdIcon.d.ts +0 -24
  317. package/icon/OscdIcon.js +0 -20
  318. package/icon/OscdIcon.js.map +0 -1
  319. package/icon/oscd-icon.d.ts +0 -7
  320. package/icon/oscd-icon.js +0 -4
  321. package/icon/oscd-icon.js.map +0 -1
  322. package/iconbutton/OscdFilledIconButton.d.ts +0 -39
  323. package/iconbutton/OscdFilledIconButton.js +0 -37
  324. package/iconbutton/OscdFilledIconButton.js.map +0 -1
  325. package/iconbutton/OscdFilledTonalIconButton.d.ts +0 -39
  326. package/iconbutton/OscdFilledTonalIconButton.js +0 -37
  327. package/iconbutton/OscdFilledTonalIconButton.js.map +0 -1
  328. package/iconbutton/OscdIconButton.d.ts +0 -38
  329. package/iconbutton/OscdIconButton.js +0 -36
  330. package/iconbutton/OscdIconButton.js.map +0 -1
  331. package/iconbutton/OscdOutlinedIconButton.d.ts +0 -38
  332. package/iconbutton/OscdOutlinedIconButton.js +0 -36
  333. package/iconbutton/OscdOutlinedIconButton.js.map +0 -1
  334. package/iconbutton/oscd-filled-icon-button.d.ts +0 -7
  335. package/iconbutton/oscd-filled-icon-button.js +0 -4
  336. package/iconbutton/oscd-filled-icon-button.js.map +0 -1
  337. package/iconbutton/oscd-filled-tonal-icon-button.d.ts +0 -7
  338. package/iconbutton/oscd-filled-tonal-icon-button.js +0 -4
  339. package/iconbutton/oscd-filled-tonal-icon-button.js.map +0 -1
  340. package/iconbutton/oscd-icon-button.d.ts +0 -7
  341. package/iconbutton/oscd-icon-button.js +0 -4
  342. package/iconbutton/oscd-icon-button.js.map +0 -1
  343. package/iconbutton/oscd-outlined-icon-button.d.ts +0 -7
  344. package/iconbutton/oscd-outlined-icon-button.js +0 -4
  345. package/iconbutton/oscd-outlined-icon-button.js.map +0 -1
  346. package/internal/aria/aria.d.ts +0 -103
  347. package/internal/aria/aria.js +0 -81
  348. package/internal/aria/aria.js.map +0 -1
  349. package/internal/aria/delegate.d.ts +0 -54
  350. package/internal/aria/delegate.js +0 -176
  351. package/internal/aria/delegate.js.map +0 -1
  352. package/internal/controller/attachable-controller.d.ts +0 -114
  353. package/internal/controller/attachable-controller.js +0 -121
  354. package/internal/controller/attachable-controller.js.map +0 -1
  355. package/internal/controller/form-submitter.d.ts +0 -70
  356. package/internal/controller/form-submitter.js +0 -69
  357. package/internal/controller/form-submitter.js.map +0 -1
  358. package/internal/controller/is-rtl.d.ts +0 -14
  359. package/internal/controller/is-rtl.js +0 -18
  360. package/internal/controller/is-rtl.js.map +0 -1
  361. package/internal/controller/string-converter.d.ts +0 -9
  362. package/internal/controller/string-converter.js +0 -14
  363. package/internal/controller/string-converter.js.map +0 -1
  364. package/internal/events/dispatch-hooks.d.ts +0 -85
  365. package/internal/events/dispatch-hooks.js +0 -151
  366. package/internal/events/dispatch-hooks.js.map +0 -1
  367. package/internal/events/form-label-activation.d.ts +0 -55
  368. package/internal/events/form-label-activation.js +0 -96
  369. package/internal/events/form-label-activation.js.map +0 -1
  370. package/internal/events/redispatch-event.d.ts +0 -27
  371. package/internal/events/redispatch-event.js +0 -40
  372. package/internal/events/redispatch-event.js.map +0 -1
  373. package/internal/motion/_animation.scss +0 -33
  374. package/internal/motion/animation.d.ts +0 -80
  375. package/internal/motion/animation.js +0 -101
  376. package/internal/motion/animation.js.map +0 -1
  377. package/internal/sass/_string-ext.scss +0 -195
  378. package/internal/sass/_var.scss +0 -237
  379. package/labs/badge/OscdBadge.d.ts +0 -14
  380. package/labs/badge/OscdBadge.js +0 -15
  381. package/labs/badge/OscdBadge.js.map +0 -1
  382. package/labs/badge/_badge.scss +0 -6
  383. package/labs/badge/internal/_badge.scss +0 -76
  384. package/labs/badge/internal/badge-styles.css +0 -1
  385. package/labs/badge/internal/badge-styles.css.map +0 -1
  386. package/labs/badge/internal/badge-styles.d.ts +0 -1
  387. package/labs/badge/internal/badge-styles.js +0 -10
  388. package/labs/badge/internal/badge-styles.js.map +0 -1
  389. package/labs/badge/internal/badge-styles.scss +0 -10
  390. package/labs/badge/internal/badge.d.ts +0 -13
  391. package/labs/badge/internal/badge.js +0 -28
  392. package/labs/badge/internal/badge.js.map +0 -1
  393. package/labs/badge/oscd-badge.d.ts +0 -19
  394. package/labs/badge/oscd-badge.js +0 -21
  395. package/labs/badge/oscd-badge.js.map +0 -1
  396. package/labs/behaviors/constraint-validation.d.ts +0 -133
  397. package/labs/behaviors/constraint-validation.js +0 -131
  398. package/labs/behaviors/constraint-validation.js.map +0 -1
  399. package/labs/behaviors/element-internals.d.ts +0 -45
  400. package/labs/behaviors/element-internals.js +0 -46
  401. package/labs/behaviors/element-internals.js.map +0 -1
  402. package/labs/behaviors/focusable.d.ts +0 -39
  403. package/labs/behaviors/focusable.js +0 -87
  404. package/labs/behaviors/focusable.js.map +0 -1
  405. package/labs/behaviors/form-associated.d.ts +0 -199
  406. package/labs/behaviors/form-associated.js +0 -175
  407. package/labs/behaviors/form-associated.js.map +0 -1
  408. package/labs/behaviors/mixin.d.ts +0 -54
  409. package/labs/behaviors/mixin.js +0 -7
  410. package/labs/behaviors/mixin.js.map +0 -1
  411. package/labs/behaviors/on-report-validity.d.ts +0 -71
  412. package/labs/behaviors/on-report-validity.js +0 -289
  413. package/labs/behaviors/on-report-validity.js.map +0 -1
  414. package/labs/behaviors/validators/checkbox-validator.d.ts +0 -35
  415. package/labs/behaviors/validators/checkbox-validator.js +0 -34
  416. package/labs/behaviors/validators/checkbox-validator.js.map +0 -1
  417. package/labs/behaviors/validators/radio-validator.d.ts +0 -38
  418. package/labs/behaviors/validators/radio-validator.js +0 -67
  419. package/labs/behaviors/validators/radio-validator.js.map +0 -1
  420. package/labs/behaviors/validators/select-validator.d.ts +0 -35
  421. package/labs/behaviors/validators/select-validator.js +0 -35
  422. package/labs/behaviors/validators/select-validator.js.map +0 -1
  423. package/labs/behaviors/validators/text-field-validator.d.ts +0 -110
  424. package/labs/behaviors/validators/text-field-validator.js +0 -156
  425. package/labs/behaviors/validators/text-field-validator.js.map +0 -1
  426. package/labs/behaviors/validators/validator.d.ts +0 -96
  427. package/labs/behaviors/validators/validator.js +0 -73
  428. package/labs/behaviors/validators/validator.js.map +0 -1
  429. package/labs/card/OscdElevatedCard.d.ts +0 -20
  430. package/labs/card/OscdElevatedCard.js +0 -23
  431. package/labs/card/OscdElevatedCard.js.map +0 -1
  432. package/labs/card/OscdFilledCard.d.ts +0 -20
  433. package/labs/card/OscdFilledCard.js +0 -23
  434. package/labs/card/OscdFilledCard.js.map +0 -1
  435. package/labs/card/OscdOutlinedCard.d.ts +0 -20
  436. package/labs/card/OscdOutlinedCard.js +0 -23
  437. package/labs/card/OscdOutlinedCard.js.map +0 -1
  438. package/labs/card/_elevated-card.scss +0 -6
  439. package/labs/card/_filled-card.scss +0 -6
  440. package/labs/card/_outlined-card.scss +0 -6
  441. package/labs/card/demo/demo.d.ts +0 -7
  442. package/labs/card/demo/demo.js +0 -13
  443. package/labs/card/demo/demo.js.map +0 -1
  444. package/labs/card/demo/stories.d.ts +0 -15
  445. package/labs/card/demo/stories.js +0 -104
  446. package/labs/card/demo/stories.js.map +0 -1
  447. package/labs/card/internal/_elevated-card.scss +0 -35
  448. package/labs/card/internal/_filled-card.scss +0 -35
  449. package/labs/card/internal/_outlined-card.scss +0 -40
  450. package/labs/card/internal/_shared.scss +0 -62
  451. package/labs/card/internal/card.d.ts +0 -12
  452. package/labs/card/internal/card.js +0 -21
  453. package/labs/card/internal/card.js.map +0 -1
  454. package/labs/card/internal/elevated-styles.css +0 -1
  455. package/labs/card/internal/elevated-styles.css.map +0 -1
  456. package/labs/card/internal/elevated-styles.d.ts +0 -1
  457. package/labs/card/internal/elevated-styles.js +0 -10
  458. package/labs/card/internal/elevated-styles.js.map +0 -1
  459. package/labs/card/internal/elevated-styles.scss +0 -10
  460. package/labs/card/internal/filled-styles.css +0 -1
  461. package/labs/card/internal/filled-styles.css.map +0 -1
  462. package/labs/card/internal/filled-styles.d.ts +0 -1
  463. package/labs/card/internal/filled-styles.js +0 -10
  464. package/labs/card/internal/filled-styles.js.map +0 -1
  465. package/labs/card/internal/filled-styles.scss +0 -10
  466. package/labs/card/internal/outlined-styles.css +0 -1
  467. package/labs/card/internal/outlined-styles.css.map +0 -1
  468. package/labs/card/internal/outlined-styles.d.ts +0 -1
  469. package/labs/card/internal/outlined-styles.js +0 -10
  470. package/labs/card/internal/outlined-styles.js.map +0 -1
  471. package/labs/card/internal/outlined-styles.scss +0 -10
  472. package/labs/card/internal/shared-styles.css +0 -1
  473. package/labs/card/internal/shared-styles.css.map +0 -1
  474. package/labs/card/internal/shared-styles.d.ts +0 -1
  475. package/labs/card/internal/shared-styles.js +0 -10
  476. package/labs/card/internal/shared-styles.js.map +0 -1
  477. package/labs/card/internal/shared-styles.scss +0 -10
  478. package/labs/card/oscd-elevated-card.d.ts +0 -20
  479. package/labs/card/oscd-elevated-card.js +0 -23
  480. package/labs/card/oscd-elevated-card.js.map +0 -1
  481. package/labs/card/oscd-filled-card.d.ts +0 -25
  482. package/labs/card/oscd-filled-card.js +0 -28
  483. package/labs/card/oscd-filled-card.js.map +0 -1
  484. package/labs/card/oscd-outlined-card.d.ts +0 -20
  485. package/labs/card/oscd-outlined-card.js +0 -23
  486. package/labs/card/oscd-outlined-card.js.map +0 -1
  487. package/list/OscdList.js +0 -44
  488. package/list/OscdList.js.map +0 -1
  489. package/list/OscdListItem.js +0 -90
  490. package/list/OscdListItem.js.map +0 -1
  491. package/list/oscd-list-item.d.ts +0 -7
  492. package/list/oscd-list-item.js +0 -4
  493. package/list/oscd-list-item.js.map +0 -1
  494. package/list/oscd-list.d.ts +0 -7
  495. package/list/oscd-list.js +0 -4
  496. package/list/oscd-list.js.map +0 -1
  497. package/menu/OscdMenu.js +0 -62
  498. package/menu/OscdMenu.js.map +0 -1
  499. package/menu/OscdMenuItem.d.ts +0 -32
  500. package/menu/OscdMenuItem.js +0 -26
  501. package/menu/OscdMenuItem.js.map +0 -1
  502. package/menu/oscd-menu-item.d.ts +0 -7
  503. package/menu/oscd-menu-item.js +0 -4
  504. package/menu/oscd-menu-item.js.map +0 -1
  505. package/menu/oscd-menu.d.ts +0 -7
  506. package/menu/oscd-menu.js +0 -4
  507. package/menu/oscd-menu.js.map +0 -1
  508. package/navigation-drawer/OscdNavigationDrawer.d.ts +0 -21
  509. package/navigation-drawer/OscdNavigationDrawer.js +0 -43
  510. package/navigation-drawer/OscdNavigationDrawer.js.map +0 -1
  511. package/navigation-drawer/OscdNavigationDrawerHeader.d.ts +0 -15
  512. package/navigation-drawer/OscdNavigationDrawerHeader.js.map +0 -1
  513. package/navigation-drawer/oscd-navigation-drawer-header.d.ts +0 -7
  514. package/navigation-drawer/oscd-navigation-drawer-header.js.map +0 -1
  515. package/navigation-drawer/oscd-navigation-drawer.d.ts +0 -7
  516. package/navigation-drawer/oscd-navigation-drawer.js.map +0 -1
  517. package/radio/OscdRadio.d.ts +0 -31
  518. package/radio/OscdRadio.js +0 -27
  519. package/radio/OscdRadio.js.map +0 -1
  520. package/radio/demo/demo.d.ts +0 -7
  521. package/radio/demo/demo.js +0 -14
  522. package/radio/demo/demo.js.map +0 -1
  523. package/radio/demo/stories.d.ts +0 -13
  524. package/radio/demo/stories.js +0 -97
  525. package/radio/demo/stories.js.map +0 -1
  526. package/radio/internal/_radio.scss +0 -198
  527. package/radio/internal/radio-styles.css +0 -1
  528. package/radio/internal/radio-styles.css.map +0 -1
  529. package/radio/internal/radio-styles.d.ts +0 -1
  530. package/radio/internal/radio-styles.js +0 -10
  531. package/radio/internal/radio-styles.js.map +0 -1
  532. package/radio/internal/radio-styles.scss +0 -10
  533. package/radio/internal/radio.d.ts +0 -59
  534. package/radio/internal/radio.js +0 -175
  535. package/radio/internal/radio.js.map +0 -1
  536. package/radio/internal/single-selection-controller.d.ts +0 -80
  537. package/radio/internal/single-selection-controller.js +0 -199
  538. package/radio/internal/single-selection-controller.js.map +0 -1
  539. package/radio/oscd-radio.d.ts +0 -32
  540. package/radio/oscd-radio.js +0 -34
  541. package/radio/oscd-radio.js.map +0 -1
  542. package/ripple/OscdRipple.d.ts +0 -5
  543. package/ripple/OscdRipple.js +0 -6
  544. package/ripple/OscdRipple.js.map +0 -1
  545. package/ripple/_ripple.scss +0 -6
  546. package/ripple/internal/_ripple.scss +0 -92
  547. package/ripple/internal/ripple-styles.css +0 -1
  548. package/ripple/internal/ripple-styles.css.map +0 -1
  549. package/ripple/internal/ripple-styles.d.ts +0 -1
  550. package/ripple/internal/ripple-styles.js +0 -10
  551. package/ripple/internal/ripple-styles.js.map +0 -1
  552. package/ripple/internal/ripple-styles.scss +0 -10
  553. package/ripple/internal/ripple.d.ts +0 -76
  554. package/ripple/internal/ripple.js +0 -425
  555. package/ripple/internal/ripple.js.map +0 -1
  556. package/ripple/oscd-ripple.js +0 -31
  557. package/ripple/oscd-ripple.js.map +0 -1
  558. package/select/OscdFilledSelect.d.ts +0 -42
  559. package/select/OscdFilledSelect.js +0 -39
  560. package/select/OscdFilledSelect.js.map +0 -1
  561. package/select/OscdOutlinedSelect.d.ts +0 -42
  562. package/select/OscdOutlinedSelect.js +0 -39
  563. package/select/OscdOutlinedSelect.js.map +0 -1
  564. package/select/OscdSelectOption.d.ts +0 -46
  565. package/select/OscdSelectOption.js +0 -41
  566. package/select/OscdSelectOption.js.map +0 -1
  567. package/select/oscd-filled-select.d.ts +0 -7
  568. package/select/oscd-filled-select.js +0 -4
  569. package/select/oscd-filled-select.js.map +0 -1
  570. package/select/oscd-outlined-select.d.ts +0 -7
  571. package/select/oscd-outlined-select.js +0 -4
  572. package/select/oscd-outlined-select.js.map +0 -1
  573. package/select/oscd-select-option.d.ts +0 -7
  574. package/select/oscd-select-option.js +0 -4
  575. package/select/oscd-select-option.js.map +0 -1
  576. package/tabs/OscdPrimaryTab.d.ts +0 -22
  577. package/tabs/OscdPrimaryTab.js +0 -19
  578. package/tabs/OscdPrimaryTab.js.map +0 -1
  579. package/tabs/OscdSecondaryTab.d.ts +0 -22
  580. package/tabs/OscdSecondaryTab.js +0 -19
  581. package/tabs/OscdSecondaryTab.js.map +0 -1
  582. package/tabs/OscdTabs.d.ts +0 -22
  583. package/tabs/OscdTabs.js +0 -18
  584. package/tabs/OscdTabs.js.map +0 -1
  585. package/tabs/oscd-primary-tab.d.ts +0 -7
  586. package/tabs/oscd-primary-tab.js +0 -4
  587. package/tabs/oscd-primary-tab.js.map +0 -1
  588. package/tabs/oscd-secondary-tab.d.ts +0 -7
  589. package/tabs/oscd-secondary-tab.js +0 -4
  590. package/tabs/oscd-secondary-tab.js.map +0 -1
  591. package/tabs/oscd-tabs.d.ts +0 -7
  592. package/tabs/oscd-tabs.js +0 -4
  593. package/tabs/oscd-tabs.js.map +0 -1
  594. package/textfield/OscdFilledTextField.d.ts +0 -30
  595. package/textfield/OscdFilledTextField.js.map +0 -1
  596. package/textfield/OscdOutlinedTextField.d.ts +0 -28
  597. package/textfield/OscdOutlinedTextField.js +0 -31
  598. package/textfield/OscdOutlinedTextField.js.map +0 -1
  599. package/textfield/oscd-filled-text-field.d.ts +0 -7
  600. package/textfield/oscd-filled-text-field.js +0 -4
  601. package/textfield/oscd-filled-text-field.js.map +0 -1
  602. package/textfield/oscd-outlined-text-field.d.ts +0 -7
  603. package/textfield/oscd-outlined-text-field.js +0 -4
  604. package/textfield/oscd-outlined-text-field.js.map +0 -1
  605. package/tokens/_index.scss +0 -66
  606. package/tokens/_md-comp-assist-chip.scss +0 -153
  607. package/tokens/_md-comp-badge.scss +0 -39
  608. package/tokens/_md-comp-checkbox.scss +0 -156
  609. package/tokens/_md-comp-circular-progress.scss +0 -79
  610. package/tokens/_md-comp-dialog.scss +0 -112
  611. package/tokens/_md-comp-divider.scss +0 -43
  612. package/tokens/_md-comp-elevated-button.scss +0 -143
  613. package/tokens/_md-comp-elevated-card.scss +0 -80
  614. package/tokens/_md-comp-elevation.scss +0 -48
  615. package/tokens/_md-comp-fab-branded.scss +0 -155
  616. package/tokens/_md-comp-fab.scss +0 -296
  617. package/tokens/_md-comp-filled-button.scss +0 -143
  618. package/tokens/_md-comp-filled-card.scss +0 -80
  619. package/tokens/_md-comp-filled-field.scss +0 -293
  620. package/tokens/_md-comp-filled-icon-button.scss +0 -119
  621. package/tokens/_md-comp-filled-select.scss +0 -198
  622. package/tokens/_md-comp-filled-text-field.scss +0 -200
  623. package/tokens/_md-comp-filled-tonal-button.scss +0 -143
  624. package/tokens/_md-comp-filled-tonal-icon-button.scss +0 -123
  625. package/tokens/_md-comp-filter-chip.scss +0 -265
  626. package/tokens/_md-comp-focus-ring.scss +0 -78
  627. package/tokens/_md-comp-full-screen-dialog.scss +0 -25
  628. package/tokens/_md-comp-icon-button.scss +0 -94
  629. package/tokens/_md-comp-icon.scss +0 -46
  630. package/tokens/_md-comp-input-chip.scss +0 -247
  631. package/tokens/_md-comp-item.scss +0 -88
  632. package/tokens/_md-comp-linear-progress.scss +0 -64
  633. package/tokens/_md-comp-list-item.scss +0 -173
  634. package/tokens/_md-comp-list.scss +0 -44
  635. package/tokens/_md-comp-menu-item.scss +0 -125
  636. package/tokens/_md-comp-menu.scss +0 -59
  637. package/tokens/_md-comp-navigation-bar.scss +0 -44
  638. package/tokens/_md-comp-navigation-drawer.scss +0 -44
  639. package/tokens/_md-comp-outlined-button.scss +0 -139
  640. package/tokens/_md-comp-outlined-card.scss +0 -86
  641. package/tokens/_md-comp-outlined-field.scss +0 -268
  642. package/tokens/_md-comp-outlined-icon-button.scss +0 -117
  643. package/tokens/_md-comp-outlined-segmented-button.scss +0 -123
  644. package/tokens/_md-comp-outlined-select.scss +0 -186
  645. package/tokens/_md-comp-outlined-text-field.scss +0 -187
  646. package/tokens/_md-comp-primary-tab.scss +0 -160
  647. package/tokens/_md-comp-radio.scss +0 -86
  648. package/tokens/_md-comp-ripple.scss +0 -48
  649. package/tokens/_md-comp-secondary-tab.scss +0 -158
  650. package/tokens/_md-comp-slider.scss +0 -117
  651. package/tokens/_md-comp-suggestion-chip.scss +0 -157
  652. package/tokens/_md-comp-switch.scss +0 -187
  653. package/tokens/_md-comp-test-table.scss +0 -43
  654. package/tokens/_md-comp-text-button.scss +0 -132
  655. package/tokens/_md-ref-palette.scss +0 -112
  656. package/tokens/_md-ref-typeface.scss +0 -46
  657. package/tokens/_md-sys-color.scss +0 -119
  658. package/tokens/_md-sys-elevation.scss +0 -31
  659. package/tokens/_md-sys-motion.scss +0 -12
  660. package/tokens/_md-sys-shape.scss +0 -102
  661. package/tokens/_md-sys-state.scss +0 -12
  662. package/tokens/_md-sys-typescale.scss +0 -149
  663. package/tokens/internal/_shape.scss +0 -93
  664. package/tokens/internal/_validate.scss +0 -109
  665. package/tokens/v0_192/_index.scss +0 -107
  666. package/tokens/v0_192/_md-comp-assist-chip.scss +0 -111
  667. package/tokens/v0_192/_md-comp-badge.scss +0 -61
  668. package/tokens/v0_192/_md-comp-banner.scss +0 -76
  669. package/tokens/v0_192/_md-comp-bottom-app-bar.scss +0 -36
  670. package/tokens/v0_192/_md-comp-carousel-item.scss +0 -66
  671. package/tokens/v0_192/_md-comp-checkbox.scss +0 -129
  672. package/tokens/v0_192/_md-comp-circular-progress-indicator.scss +0 -41
  673. package/tokens/v0_192/_md-comp-data-table.scss +0 -99
  674. package/tokens/v0_192/_md-comp-date-input-modal.scss +0 -90
  675. package/tokens/v0_192/_md-comp-date-picker-docked.scss +0 -247
  676. package/tokens/v0_192/_md-comp-date-picker-modal.scss +0 -306
  677. package/tokens/v0_192/_md-comp-dialog.scss +0 -124
  678. package/tokens/v0_192/_md-comp-divider.scss +0 -28
  679. package/tokens/v0_192/_md-comp-elevated-button.scss +0 -92
  680. package/tokens/v0_192/_md-comp-elevated-card.scss +0 -60
  681. package/tokens/v0_192/_md-comp-extended-fab-branded.scss +0 -89
  682. package/tokens/v0_192/_md-comp-extended-fab-primary.scss +0 -97
  683. package/tokens/v0_192/_md-comp-extended-fab-secondary.scss +0 -98
  684. package/tokens/v0_192/_md-comp-extended-fab-surface.scss +0 -93
  685. package/tokens/v0_192/_md-comp-extended-fab-tertiary.scss +0 -98
  686. package/tokens/v0_192/_md-comp-fab-branded-large.scss +0 -63
  687. package/tokens/v0_192/_md-comp-fab-branded.scss +0 -63
  688. package/tokens/v0_192/_md-comp-fab-primary-large.scss +0 -68
  689. package/tokens/v0_192/_md-comp-fab-primary-small.scss +0 -68
  690. package/tokens/v0_192/_md-comp-fab-primary.scss +0 -68
  691. package/tokens/v0_192/_md-comp-fab-secondary-large.scss +0 -69
  692. package/tokens/v0_192/_md-comp-fab-secondary-small.scss +0 -69
  693. package/tokens/v0_192/_md-comp-fab-secondary.scss +0 -69
  694. package/tokens/v0_192/_md-comp-fab-surface-large.scss +0 -67
  695. package/tokens/v0_192/_md-comp-fab-surface-small.scss +0 -67
  696. package/tokens/v0_192/_md-comp-fab-surface.scss +0 -67
  697. package/tokens/v0_192/_md-comp-fab-tertiary-large.scss +0 -69
  698. package/tokens/v0_192/_md-comp-fab-tertiary-small.scss +0 -69
  699. package/tokens/v0_192/_md-comp-fab-tertiary.scss +0 -69
  700. package/tokens/v0_192/_md-comp-filled-autocomplete.scss +0 -239
  701. package/tokens/v0_192/_md-comp-filled-button.scss +0 -92
  702. package/tokens/v0_192/_md-comp-filled-card.scss +0 -62
  703. package/tokens/v0_192/_md-comp-filled-icon-button.scss +0 -83
  704. package/tokens/v0_192/_md-comp-filled-menu-button.scss +0 -101
  705. package/tokens/v0_192/_md-comp-filled-select.scss +0 -273
  706. package/tokens/v0_192/_md-comp-filled-text-field.scss +0 -193
  707. package/tokens/v0_192/_md-comp-filled-tonal-button.scss +0 -102
  708. package/tokens/v0_192/_md-comp-filled-tonal-icon-button.scss +0 -90
  709. package/tokens/v0_192/_md-comp-filter-chip.scss +0 -210
  710. package/tokens/v0_192/_md-comp-full-screen-dialog.scss +0 -114
  711. package/tokens/v0_192/_md-comp-icon-button.scss +0 -74
  712. package/tokens/v0_192/_md-comp-input-chip.scss +0 -187
  713. package/tokens/v0_192/_md-comp-linear-progress-indicator.scss +0 -43
  714. package/tokens/v0_192/_md-comp-list.scss +0 -255
  715. package/tokens/v0_192/_md-comp-menu.scss +0 -44
  716. package/tokens/v0_192/_md-comp-navigation-bar.scss +0 -115
  717. package/tokens/v0_192/_md-comp-navigation-drawer.scss +0 -165
  718. package/tokens/v0_192/_md-comp-navigation-rail.scss +0 -119
  719. package/tokens/v0_192/_md-comp-outlined-autocomplete.scss +0 -229
  720. package/tokens/v0_192/_md-comp-outlined-button.scss +0 -87
  721. package/tokens/v0_192/_md-comp-outlined-card.scss +0 -66
  722. package/tokens/v0_192/_md-comp-outlined-icon-button.scss +0 -83
  723. package/tokens/v0_192/_md-comp-outlined-menu-button.scss +0 -97
  724. package/tokens/v0_192/_md-comp-outlined-segmented-button.scss +0 -115
  725. package/tokens/v0_192/_md-comp-outlined-select.scss +0 -263
  726. package/tokens/v0_192/_md-comp-outlined-text-field.scss +0 -174
  727. package/tokens/v0_192/_md-comp-plain-tooltip.scss +0 -58
  728. package/tokens/v0_192/_md-comp-primary-navigation-tab.scss +0 -124
  729. package/tokens/v0_192/_md-comp-radio-button.scss +0 -71
  730. package/tokens/v0_192/_md-comp-rich-tooltip.scss +0 -122
  731. package/tokens/v0_192/_md-comp-scrim.scss +0 -28
  732. package/tokens/v0_192/_md-comp-search-bar.scss +0 -100
  733. package/tokens/v0_192/_md-comp-search-view.scss +0 -94
  734. package/tokens/v0_192/_md-comp-secondary-navigation-tab.scss +0 -87
  735. package/tokens/v0_192/_md-comp-sheet-bottom.scss +0 -46
  736. package/tokens/v0_192/_md-comp-sheet-floating.scss +0 -35
  737. package/tokens/v0_192/_md-comp-sheet-side.scss +0 -94
  738. package/tokens/v0_192/_md-comp-slider.scss +0 -118
  739. package/tokens/v0_192/_md-comp-snackbar.scss +0 -130
  740. package/tokens/v0_192/_md-comp-standard-menu-button.scss +0 -101
  741. package/tokens/v0_192/_md-comp-suggestion-chip.scss +0 -127
  742. package/tokens/v0_192/_md-comp-switch.scss +0 -141
  743. package/tokens/v0_192/_md-comp-text-button.scss +0 -80
  744. package/tokens/v0_192/_md-comp-time-input.scss +0 -220
  745. package/tokens/v0_192/_md-comp-time-picker.scss +0 -267
  746. package/tokens/v0_192/_md-comp-top-app-bar-large.scss +0 -64
  747. package/tokens/v0_192/_md-comp-top-app-bar-medium.scss +0 -64
  748. package/tokens/v0_192/_md-comp-top-app-bar-small-centered.scss +0 -71
  749. package/tokens/v0_192/_md-comp-top-app-bar-small.scss +0 -67
  750. package/tokens/v0_192/_md-ref-palette.scss +0 -109
  751. package/tokens/v0_192/_md-ref-typeface.scss +0 -23
  752. package/tokens/v0_192/_md-sys-color.scss +0 -135
  753. package/tokens/v0_192/_md-sys-elevation.scss +0 -24
  754. package/tokens/v0_192/_md-sys-motion.scss +0 -55
  755. package/tokens/v0_192/_md-sys-shape.scss +0 -33
  756. package/tokens/v0_192/_md-sys-state.scss +0 -22
  757. package/tokens/v0_192/_md-sys-typescale.scss +0 -286
  758. package/tokens/v0_192/index.test.css +0 -1
  759. package/tokens/v0_192/index.test.css.map +0 -1
  760. package/tokens/v0_192/index.test.scss +0 -584
  761. package/tokens/v0_192/lib.test.css +0 -1
  762. package/tokens/v0_192/lib.test.css.map +0 -1
  763. package/tokens/v0_192/lib.test.scss +0 -663
  764. package/utils/storybook/getStorybookHelpers.d.ts +0 -4
  765. package/utils/storybook/getStorybookHelpers.js.map +0 -1
  766. package/utils/storybook/scopedWcDecorator.d.ts +0 -2
  767. package/utils/storybook/scopedWcDecorator.js.map +0 -1
  768. package/utils/storybook/stories/components/knob-ui-components.d.ts +0 -103
  769. package/utils/storybook/stories/components/knob-ui-components.js +0 -414
  770. package/utils/storybook/stories/components/knob-ui-components.js.map +0 -1
  771. package/utils/storybook/stories/components/stories-renderer.d.ts +0 -40
  772. package/utils/storybook/stories/components/stories-renderer.js +0 -204
  773. package/utils/storybook/stories/components/stories-renderer.js.map +0 -1
  774. package/utils/storybook/stories/components/story-knob-panel.d.ts +0 -53
  775. package/utils/storybook/stories/components/story-knob-panel.js +0 -333
  776. package/utils/storybook/stories/components/story-knob-panel.js.map +0 -1
  777. package/utils/storybook/stories/components/story-renderer.d.ts +0 -27
  778. package/utils/storybook/stories/components/story-renderer.js +0 -84
  779. package/utils/storybook/stories/components/story-renderer.js.map +0 -1
  780. package/utils/storybook/stories/index.d.ts +0 -8
  781. package/utils/storybook/stories/index.js +0 -11
  782. package/utils/storybook/stories/index.js.map +0 -1
  783. package/utils/storybook/stories/knobs.d.ts +0 -143
  784. package/utils/storybook/stories/knobs.js +0 -177
  785. package/utils/storybook/stories/knobs.js.map +0 -1
  786. package/utils/storybook/stories/material-collection.d.ts +0 -75
  787. package/utils/storybook/stories/material-collection.js +0 -59
  788. package/utils/storybook/stories/material-collection.js.map +0 -1
  789. package/utils/storybook/stories/story.d.ts +0 -85
  790. package/utils/storybook/stories/story.js +0 -142
  791. package/utils/storybook/stories/story.js.map +0 -1
  792. package/utils/storybook/stories/theme-loader.d.ts +0 -13
  793. package/utils/storybook/stories/theme-loader.js +0 -43
  794. package/utils/storybook/stories/theme-loader.js.map +0 -1
  795. package/utils/storybook/themingDecorator.d.ts +0 -19
  796. package/utils/storybook/themingDecorator.js.map +0 -1
  797. /package/{app-bar → dist/app-bar}/oscd-app-bar.js +0 -0
  798. /package/{navigation-drawer → dist/navigation-drawer}/oscd-navigation-drawer-header.js +0 -0
  799. /package/{navigation-drawer → dist/navigation-drawer}/oscd-navigation-drawer.js +0 -0
  800. /package/{utils → dist/utils}/storybook/scopedWcDecorator.js +0 -0
  801. /package/{utils → dist/utils}/storybook/themingDecorator.js +0 -0
@@ -1,54 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2023 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { LitElement } from 'lit';
7
- import { MixinBase, MixinReturn } from '../../labs/behaviors/mixin.js';
8
- /**
9
- * Mixes in aria delegation for elements that delegate focus and aria to inner
10
- * shadow root elements.
11
- *
12
- * This mixin fixes invalid aria announcements with shadow roots, caused by
13
- * duplicate aria attributes on both the host and the inner shadow root element.
14
- *
15
- * Note: this mixin **does not yet support** ID reference attributes, such as
16
- * `aria-labelledby` or `aria-controls`.
17
- *
18
- * @example
19
- * ```ts
20
- * class MyButton extends mixinDelegatesAria(LitElement) {
21
- * static shadowRootOptions = {mode: 'open', delegatesFocus: true};
22
- *
23
- * render() {
24
- * return html`
25
- * <button aria-label=${this.ariaLabel || nothing}>
26
- * <slot></slot>
27
- * </button>
28
- * `;
29
- * }
30
- * }
31
- * ```
32
- * ```html
33
- * <my-button aria-label="Plus one">+1</my-button>
34
- * ```
35
- *
36
- * Use `ARIAMixinStrict` for lit analyzer strict types, such as the "role"
37
- * attribute.
38
- *
39
- * @example
40
- * ```ts
41
- * return html`
42
- * <button role=${(this as ARIAMixinStrict).role || nothing}>
43
- * <slot></slot>
44
- * </button>
45
- * `;
46
- * ```
47
- *
48
- * In the future, updates to the Accessibility Object Model (AOM) will provide
49
- * built-in aria delegation features that will replace this mixin.
50
- *
51
- * @param base The class to mix functionality into.
52
- * @return The provided class with aria delegation mixed in.
53
- */
54
- export declare function mixinDelegatesAria<T extends MixinBase<LitElement>>(base: T): MixinReturn<T>;
@@ -1,176 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2023 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { isServer } from 'lit';
7
- import { ARIA_PROPERTIES, ariaPropertyToAttribute, isAriaAttribute, } from './aria.js';
8
- // Private symbols
9
- const privateIgnoreAttributeChangesFor = Symbol('privateIgnoreAttributeChangesFor');
10
- /**
11
- * Mixes in aria delegation for elements that delegate focus and aria to inner
12
- * shadow root elements.
13
- *
14
- * This mixin fixes invalid aria announcements with shadow roots, caused by
15
- * duplicate aria attributes on both the host and the inner shadow root element.
16
- *
17
- * Note: this mixin **does not yet support** ID reference attributes, such as
18
- * `aria-labelledby` or `aria-controls`.
19
- *
20
- * @example
21
- * ```ts
22
- * class MyButton extends mixinDelegatesAria(LitElement) {
23
- * static shadowRootOptions = {mode: 'open', delegatesFocus: true};
24
- *
25
- * render() {
26
- * return html`
27
- * <button aria-label=${this.ariaLabel || nothing}>
28
- * <slot></slot>
29
- * </button>
30
- * `;
31
- * }
32
- * }
33
- * ```
34
- * ```html
35
- * <my-button aria-label="Plus one">+1</my-button>
36
- * ```
37
- *
38
- * Use `ARIAMixinStrict` for lit analyzer strict types, such as the "role"
39
- * attribute.
40
- *
41
- * @example
42
- * ```ts
43
- * return html`
44
- * <button role=${(this as ARIAMixinStrict).role || nothing}>
45
- * <slot></slot>
46
- * </button>
47
- * `;
48
- * ```
49
- *
50
- * In the future, updates to the Accessibility Object Model (AOM) will provide
51
- * built-in aria delegation features that will replace this mixin.
52
- *
53
- * @param base The class to mix functionality into.
54
- * @return The provided class with aria delegation mixed in.
55
- */
56
- export function mixinDelegatesAria(base) {
57
- var _a;
58
- if (isServer) {
59
- // Don't shift attributes when running with lit-ssr. The SSR renderer
60
- // implements a subset of DOM APIs, including the methods this mixin
61
- // overrides, causing errors. We don't need to shift on the server anyway
62
- // since elements will shift attributes immediately once they hydrate.
63
- return base;
64
- }
65
- class WithDelegatesAriaElement extends base {
66
- constructor() {
67
- super(...arguments);
68
- this[_a] = new Set();
69
- }
70
- static { _a = privateIgnoreAttributeChangesFor; }
71
- attributeChangedCallback(name, oldValue, newValue) {
72
- if (!isAriaAttribute(name)) {
73
- super.attributeChangedCallback(name, oldValue, newValue);
74
- return;
75
- }
76
- if (this[privateIgnoreAttributeChangesFor].has(name)) {
77
- return;
78
- }
79
- // Don't trigger another `attributeChangedCallback` once we remove the
80
- // aria attribute from the host. We check the explicit name of the
81
- // attribute to ignore since `attributeChangedCallback` can be called
82
- // multiple times out of an expected order when hydrating an element with
83
- // multiple attributes.
84
- this[privateIgnoreAttributeChangesFor].add(name);
85
- this.removeAttribute(name);
86
- this[privateIgnoreAttributeChangesFor].delete(name);
87
- const dataProperty = ariaAttributeToDataProperty(name);
88
- if (newValue === null) {
89
- delete this.dataset[dataProperty];
90
- }
91
- else {
92
- this.dataset[dataProperty] = newValue;
93
- }
94
- this.requestUpdate(ariaAttributeToDataProperty(name), oldValue);
95
- }
96
- getAttribute(name) {
97
- if (isAriaAttribute(name)) {
98
- return super.getAttribute(ariaAttributeToDataAttribute(name));
99
- }
100
- return super.getAttribute(name);
101
- }
102
- removeAttribute(name) {
103
- super.removeAttribute(name);
104
- if (isAriaAttribute(name)) {
105
- super.removeAttribute(ariaAttributeToDataAttribute(name));
106
- // Since `aria-*` attributes are already removed`, we need to request
107
- // an update because `attributeChangedCallback` will not be called.
108
- this.requestUpdate();
109
- }
110
- }
111
- }
112
- setupDelegatesAriaProperties(WithDelegatesAriaElement);
113
- return WithDelegatesAriaElement;
114
- }
115
- /**
116
- * Overrides the constructor's native `ARIAMixin` properties to ensure that
117
- * aria properties reflect the values that were shifted to a data attribute.
118
- *
119
- * @param ctor The `ReactiveElement` constructor to patch.
120
- */
121
- function setupDelegatesAriaProperties(ctor) {
122
- for (const ariaProperty of ARIA_PROPERTIES) {
123
- // The casing between ariaProperty and the dataProperty may be different.
124
- // ex: aria-haspopup -> ariaHasPopup
125
- const ariaAttribute = ariaPropertyToAttribute(ariaProperty);
126
- // ex: aria-haspopup -> data-aria-haspopup
127
- const dataAttribute = ariaAttributeToDataAttribute(ariaAttribute);
128
- // ex: aria-haspopup -> dataset.ariaHaspopup
129
- const dataProperty = ariaAttributeToDataProperty(ariaAttribute);
130
- // Call `ReactiveElement.createProperty()` so that the `aria-*` and `data-*`
131
- // attributes are added to the `static observedAttributes` array. This
132
- // triggers `attributeChangedCallback` for the delegates aria mixin to
133
- // handle.
134
- ctor.createProperty(ariaProperty, {
135
- attribute: ariaAttribute,
136
- noAccessor: true,
137
- });
138
- ctor.createProperty(Symbol(dataAttribute), {
139
- attribute: dataAttribute,
140
- noAccessor: true,
141
- });
142
- // Re-define the `ARIAMixin` properties to handle data attribute shifting.
143
- // It is safe to use `Object.defineProperty` here because the properties
144
- // are native and not renamed.
145
- // tslint:disable-next-line:ban-unsafe-reflection
146
- Object.defineProperty(ctor.prototype, ariaProperty, {
147
- configurable: true,
148
- enumerable: true,
149
- get() {
150
- return this.dataset[dataProperty] ?? null;
151
- },
152
- set(value) {
153
- const prevValue = this.dataset[dataProperty] ?? null;
154
- if (value === prevValue) {
155
- return;
156
- }
157
- if (value === null) {
158
- delete this.dataset[dataProperty];
159
- }
160
- else {
161
- this.dataset[dataProperty] = value;
162
- }
163
- this.requestUpdate(ariaProperty, prevValue);
164
- },
165
- });
166
- }
167
- }
168
- function ariaAttributeToDataAttribute(ariaAttribute) {
169
- // aria-haspopup -> data-aria-haspopup
170
- return `data-${ariaAttribute}`;
171
- }
172
- function ariaAttributeToDataProperty(ariaAttribute) {
173
- // aria-haspopup -> dataset.ariaHaspopup
174
- return ariaAttribute.replace(/-\w/, dashLetter => dashLetter[1].toUpperCase());
175
- }
176
- //# sourceMappingURL=delegate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delegate.js","sourceRoot":"","sources":["delegate.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { LitElement, ReactiveElement, isServer } from 'lit';\n\nimport { MixinBase, MixinReturn } from '../../labs/behaviors/mixin.js';\nimport {\n ARIA_PROPERTIES,\n ariaPropertyToAttribute,\n isAriaAttribute,\n} from './aria.js';\n\n// Private symbols\nconst privateIgnoreAttributeChangesFor = Symbol(\n 'privateIgnoreAttributeChangesFor',\n);\n\n/**\n * Mixes in aria delegation for elements that delegate focus and aria to inner\n * shadow root elements.\n *\n * This mixin fixes invalid aria announcements with shadow roots, caused by\n * duplicate aria attributes on both the host and the inner shadow root element.\n *\n * Note: this mixin **does not yet support** ID reference attributes, such as\n * `aria-labelledby` or `aria-controls`.\n *\n * @example\n * ```ts\n * class MyButton extends mixinDelegatesAria(LitElement) {\n * static shadowRootOptions = {mode: 'open', delegatesFocus: true};\n *\n * render() {\n * return html`\n * <button aria-label=${this.ariaLabel || nothing}>\n * <slot></slot>\n * </button>\n * `;\n * }\n * }\n * ```\n * ```html\n * <my-button aria-label=\"Plus one\">+1</my-button>\n * ```\n *\n * Use `ARIAMixinStrict` for lit analyzer strict types, such as the \"role\"\n * attribute.\n *\n * @example\n * ```ts\n * return html`\n * <button role=${(this as ARIAMixinStrict).role || nothing}>\n * <slot></slot>\n * </button>\n * `;\n * ```\n *\n * In the future, updates to the Accessibility Object Model (AOM) will provide\n * built-in aria delegation features that will replace this mixin.\n *\n * @param base The class to mix functionality into.\n * @return The provided class with aria delegation mixed in.\n */\nexport function mixinDelegatesAria<T extends MixinBase<LitElement>>(\n base: T,\n): MixinReturn<T> {\n if (isServer) {\n // Don't shift attributes when running with lit-ssr. The SSR renderer\n // implements a subset of DOM APIs, including the methods this mixin\n // overrides, causing errors. We don't need to shift on the server anyway\n // since elements will shift attributes immediately once they hydrate.\n return base;\n }\n\n abstract class WithDelegatesAriaElement extends base {\n [privateIgnoreAttributeChangesFor] = new Set();\n\n override attributeChangedCallback(\n name: string,\n oldValue: string | null,\n newValue: string | null,\n ) {\n if (!isAriaAttribute(name)) {\n super.attributeChangedCallback(name, oldValue, newValue);\n return;\n }\n\n if (this[privateIgnoreAttributeChangesFor].has(name)) {\n return;\n }\n\n // Don't trigger another `attributeChangedCallback` once we remove the\n // aria attribute from the host. We check the explicit name of the\n // attribute to ignore since `attributeChangedCallback` can be called\n // multiple times out of an expected order when hydrating an element with\n // multiple attributes.\n this[privateIgnoreAttributeChangesFor].add(name);\n this.removeAttribute(name);\n this[privateIgnoreAttributeChangesFor].delete(name);\n const dataProperty = ariaAttributeToDataProperty(name);\n if (newValue === null) {\n delete this.dataset[dataProperty];\n } else {\n this.dataset[dataProperty] = newValue;\n }\n\n this.requestUpdate(ariaAttributeToDataProperty(name), oldValue);\n }\n\n override getAttribute(name: string) {\n if (isAriaAttribute(name)) {\n return super.getAttribute(ariaAttributeToDataAttribute(name));\n }\n\n return super.getAttribute(name);\n }\n\n override removeAttribute(name: string) {\n super.removeAttribute(name);\n if (isAriaAttribute(name)) {\n super.removeAttribute(ariaAttributeToDataAttribute(name));\n // Since `aria-*` attributes are already removed`, we need to request\n // an update because `attributeChangedCallback` will not be called.\n this.requestUpdate();\n }\n }\n }\n\n setupDelegatesAriaProperties(\n WithDelegatesAriaElement as unknown as typeof ReactiveElement,\n );\n\n return WithDelegatesAriaElement;\n}\n\n/**\n * Overrides the constructor's native `ARIAMixin` properties to ensure that\n * aria properties reflect the values that were shifted to a data attribute.\n *\n * @param ctor The `ReactiveElement` constructor to patch.\n */\nfunction setupDelegatesAriaProperties(ctor: typeof ReactiveElement) {\n for (const ariaProperty of ARIA_PROPERTIES) {\n // The casing between ariaProperty and the dataProperty may be different.\n // ex: aria-haspopup -> ariaHasPopup\n const ariaAttribute = ariaPropertyToAttribute(ariaProperty);\n // ex: aria-haspopup -> data-aria-haspopup\n const dataAttribute = ariaAttributeToDataAttribute(ariaAttribute);\n // ex: aria-haspopup -> dataset.ariaHaspopup\n const dataProperty = ariaAttributeToDataProperty(ariaAttribute);\n\n // Call `ReactiveElement.createProperty()` so that the `aria-*` and `data-*`\n // attributes are added to the `static observedAttributes` array. This\n // triggers `attributeChangedCallback` for the delegates aria mixin to\n // handle.\n ctor.createProperty(ariaProperty, {\n attribute: ariaAttribute,\n noAccessor: true,\n });\n ctor.createProperty(Symbol(dataAttribute), {\n attribute: dataAttribute,\n noAccessor: true,\n });\n\n // Re-define the `ARIAMixin` properties to handle data attribute shifting.\n // It is safe to use `Object.defineProperty` here because the properties\n // are native and not renamed.\n // tslint:disable-next-line:ban-unsafe-reflection\n Object.defineProperty(ctor.prototype, ariaProperty, {\n configurable: true,\n enumerable: true,\n get(this: ReactiveElement): string | null {\n return this.dataset[dataProperty] ?? null;\n },\n set(this: ReactiveElement, value: string | null): void {\n const prevValue = this.dataset[dataProperty] ?? null;\n if (value === prevValue) {\n return;\n }\n\n if (value === null) {\n delete this.dataset[dataProperty];\n } else {\n this.dataset[dataProperty] = value;\n }\n\n this.requestUpdate(ariaProperty, prevValue);\n },\n });\n }\n}\n\nfunction ariaAttributeToDataAttribute(ariaAttribute: string) {\n // aria-haspopup -> data-aria-haspopup\n return `data-${ariaAttribute}`;\n}\n\nfunction ariaAttributeToDataProperty(ariaAttribute: string) {\n // aria-haspopup -> dataset.ariaHaspopup\n return ariaAttribute.replace(/-\\w/, dashLetter =>\n dashLetter[1].toUpperCase(),\n );\n}\n"]}
@@ -1,114 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2023 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { ReactiveController, ReactiveControllerHost } from 'lit';
7
- /**
8
- * An element that can be attached to an associated controlling element.
9
- */
10
- export interface Attachable {
11
- /**
12
- * Reflects the value of the `for` attribute, which is the ID of the element's
13
- * associated control.
14
- *
15
- * Use this when the elements's associated control is not its parent.
16
- *
17
- * To manually control an element, set its `for` attribute to `""`.
18
- *
19
- * @example
20
- * ```html
21
- * <div class="container">
22
- * <oscd-attachable for="interactive"></oscd-attachable>
23
- * <button id="interactive">Action</button>
24
- * </div>
25
- * ```
26
- *
27
- * @example
28
- * ```html
29
- * <button class="manually-controlled">
30
- * <oscd-attachable for=""></oscd-attachable>
31
- * </button>
32
- * ```
33
- */
34
- htmlFor: string | null;
35
- /**
36
- * Gets or sets the element that controls the visibility of the attachable
37
- * element. It is one of:
38
- *
39
- * - The control referenced by the `for` attribute.
40
- * - The control provided to `element.attach(control)`
41
- * - The element's parent.
42
- * - `null` if the element is not controlled.
43
- */
44
- control: HTMLElement | null;
45
- /**
46
- * Attaches the element to an interactive control.
47
- *
48
- * @param control The element that controls the attachable element.
49
- */
50
- attach(control: HTMLElement): void;
51
- /**
52
- * Detaches the element from its current control.
53
- */
54
- detach(): void;
55
- }
56
- /**
57
- * A key to retrieve an `Attachable` element's `AttachableController` from a
58
- * global `MutationObserver`.
59
- */
60
- declare const ATTACHABLE_CONTROLLER: unique symbol;
61
- /**
62
- * The host of an `AttachableController`. The controller will add itself to
63
- * the host so it can be retrieved in a global `MutationObserver`.
64
- */
65
- interface AttachableControllerHost extends ReactiveControllerHost, HTMLElement {
66
- [ATTACHABLE_CONTROLLER]?: AttachableController;
67
- }
68
- /**
69
- * A controller that provides an implementation for `Attachable` elements.
70
- *
71
- * @example
72
- * ```ts
73
- * class MyElement extends LitElement implements Attachable {
74
- * get control() { return this.attachableController.control; }
75
- *
76
- * private readonly attachableController = new AttachableController(
77
- * this,
78
- * (previousControl, newControl) => {
79
- * previousControl?.removeEventListener('click', this.handleClick);
80
- * newControl?.addEventListener('click', this.handleClick);
81
- * }
82
- * );
83
- *
84
- * // Implement remaining `Attachable` properties/methods that call the
85
- * // controller's properties/methods.
86
- * }
87
- * ```
88
- */
89
- export declare class AttachableController implements ReactiveController, Attachable {
90
- private readonly host;
91
- private readonly onControlChange;
92
- get htmlFor(): string | null;
93
- set htmlFor(htmlFor: string | null);
94
- get control(): HTMLElement | null;
95
- set control(control: HTMLElement | null);
96
- private currentControl;
97
- /**
98
- * Creates a new controller for an `Attachable` element.
99
- *
100
- * @param host The `Attachable` element.
101
- * @param onControlChange A callback with two parameters for the previous and
102
- * next control. An `Attachable` element may perform setup or teardown
103
- * logic whenever the control changes.
104
- */
105
- constructor(host: AttachableControllerHost, onControlChange: (prev: HTMLElement | null, next: HTMLElement | null) => void);
106
- attach(control: HTMLElement): void;
107
- detach(): void;
108
- /** @private */
109
- hostConnected(): void;
110
- /** @private */
111
- hostDisconnected(): void;
112
- private setCurrentControl;
113
- }
114
- export {};
@@ -1,121 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2023 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { isServer } from 'lit';
7
- /**
8
- * A key to retrieve an `Attachable` element's `AttachableController` from a
9
- * global `MutationObserver`.
10
- */
11
- const ATTACHABLE_CONTROLLER = Symbol('attachableController');
12
- let FOR_ATTRIBUTE_OBSERVER;
13
- if (!isServer) {
14
- /**
15
- * A global `MutationObserver` that reacts to `for` attribute changes on
16
- * `Attachable` elements. If the `for` attribute changes, the controller will
17
- * re-attach to the new referenced element.
18
- */
19
- FOR_ATTRIBUTE_OBSERVER = new MutationObserver(records => {
20
- for (const record of records) {
21
- // When a control's `for` attribute changes, inform its
22
- // `AttachableController` to update to a new control.
23
- record.target[ATTACHABLE_CONTROLLER]?.hostConnected();
24
- }
25
- });
26
- }
27
- /**
28
- * A controller that provides an implementation for `Attachable` elements.
29
- *
30
- * @example
31
- * ```ts
32
- * class MyElement extends LitElement implements Attachable {
33
- * get control() { return this.attachableController.control; }
34
- *
35
- * private readonly attachableController = new AttachableController(
36
- * this,
37
- * (previousControl, newControl) => {
38
- * previousControl?.removeEventListener('click', this.handleClick);
39
- * newControl?.addEventListener('click', this.handleClick);
40
- * }
41
- * );
42
- *
43
- * // Implement remaining `Attachable` properties/methods that call the
44
- * // controller's properties/methods.
45
- * }
46
- * ```
47
- */
48
- export class AttachableController {
49
- get htmlFor() {
50
- return this.host.getAttribute('for');
51
- }
52
- set htmlFor(htmlFor) {
53
- if (htmlFor === null) {
54
- this.host.removeAttribute('for');
55
- }
56
- else {
57
- this.host.setAttribute('for', htmlFor);
58
- }
59
- }
60
- get control() {
61
- if (this.host.hasAttribute('for')) {
62
- if (!this.htmlFor || !this.host.isConnected) {
63
- return null;
64
- }
65
- return this.host.getRootNode().querySelector(`#${this.htmlFor}`);
66
- }
67
- return this.currentControl || this.host.parentElement;
68
- }
69
- set control(control) {
70
- if (control) {
71
- this.attach(control);
72
- }
73
- else {
74
- this.detach();
75
- }
76
- }
77
- /**
78
- * Creates a new controller for an `Attachable` element.
79
- *
80
- * @param host The `Attachable` element.
81
- * @param onControlChange A callback with two parameters for the previous and
82
- * next control. An `Attachable` element may perform setup or teardown
83
- * logic whenever the control changes.
84
- */
85
- constructor(host, onControlChange) {
86
- this.host = host;
87
- this.onControlChange = onControlChange;
88
- this.currentControl = null;
89
- host.addController(this);
90
- host[ATTACHABLE_CONTROLLER] = this;
91
- FOR_ATTRIBUTE_OBSERVER?.observe(host, { attributeFilter: ['for'] });
92
- }
93
- attach(control) {
94
- if (control === this.currentControl) {
95
- return;
96
- }
97
- this.setCurrentControl(control);
98
- // When imperatively attaching, remove the `for` attribute so
99
- // that the attached control is used instead of a referenced one.
100
- this.host.removeAttribute('for');
101
- }
102
- detach() {
103
- this.setCurrentControl(null);
104
- // When imperatively detaching, add an empty `for=""` attribute. This will
105
- // ensure the control is `null` rather than the `parentElement`.
106
- this.host.setAttribute('for', '');
107
- }
108
- /** @private */
109
- hostConnected() {
110
- this.setCurrentControl(this.control);
111
- }
112
- /** @private */
113
- hostDisconnected() {
114
- this.setCurrentControl(null);
115
- }
116
- setCurrentControl(control) {
117
- this.onControlChange(this.currentControl, control);
118
- this.currentControl = control;
119
- }
120
- }
121
- //# sourceMappingURL=attachable-controller.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"attachable-controller.js","sourceRoot":"","sources":["attachable-controller.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAA8C,MAAM,KAAK,CAAC;AAuD3E;;;GAGG;AACH,MAAM,qBAAqB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;AAU7D,IAAI,sBAAoD,CAAC;AAEzD,IAAI,CAAC,QAAQ,EAAE,CAAC;IACd;;;;OAIG;IACH,sBAAsB,GAAG,IAAI,gBAAgB,CAAC,OAAO,CAAC,EAAE;QACtD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC7B,uDAAuD;YACvD,qDAAqD;YACpD,MAAM,CAAC,MAAmC,CACzC,qBAAqB,CACtB,EAAE,aAAa,EAAE,CAAC;QACrB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,OAAO,oBAAoB;IAC/B,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAED,IAAI,OAAO,CAAC,OAAsB;QAChC,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YACrB,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QACnC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACzC,CAAC;IACH,CAAC;IAED,IAAI,OAAO;QACT,IAAI,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;YAClC,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;gBAC5C,OAAO,IAAI,CAAC;YACd,CAAC;YAED,OACE,IAAI,CAAC,IAAI,CAAC,WAAW,EACtB,CAAC,aAAa,CAAc,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;QACnD,CAAC;QAED,OAAO,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC;IACxD,CAAC;IACD,IAAI,OAAO,CAAC,OAA2B;QACrC,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,MAAM,EAAE,CAAC;QAChB,CAAC;IACH,CAAC;IAID;;;;;;;OAOG;IACH,YACmB,IAA8B,EAC9B,eAGR;QAJQ,SAAI,GAAJ,IAAI,CAA0B;QAC9B,oBAAe,GAAf,eAAe,CAGvB;QAfH,mBAAc,GAAuB,IAAI,CAAC;QAiBhD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QACzB,IAAI,CAAC,qBAAqB,CAAC,GAAG,IAAI,CAAC;QACnC,sBAAsB,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,eAAe,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACtE,CAAC;IAED,MAAM,CAAC,OAAoB;QACzB,IAAI,OAAO,KAAK,IAAI,CAAC,cAAc,EAAE,CAAC;YACpC,OAAO;QACT,CAAC;QAED,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAChC,6DAA6D;QAC7D,iEAAiE;QACjE,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;QAC7B,0EAA0E;QAC1E,gEAAgE;QAChE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACpC,CAAC;IAED,eAAe;IACf,aAAa;QACX,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;IAED,eAAe;IACf,gBAAgB;QACd,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAEO,iBAAiB,CAAC,OAA2B;QACnD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QACnD,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC;IAChC,CAAC;CACF","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { isServer, ReactiveController, ReactiveControllerHost } from 'lit';\n\n/**\n * An element that can be attached to an associated controlling element.\n */\nexport interface Attachable {\n /**\n * Reflects the value of the `for` attribute, which is the ID of the element's\n * associated control.\n *\n * Use this when the elements's associated control is not its parent.\n *\n * To manually control an element, set its `for` attribute to `\"\"`.\n *\n * @example\n * ```html\n * <div class=\"container\">\n * <oscd-attachable for=\"interactive\"></oscd-attachable>\n * <button id=\"interactive\">Action</button>\n * </div>\n * ```\n *\n * @example\n * ```html\n * <button class=\"manually-controlled\">\n * <oscd-attachable for=\"\"></oscd-attachable>\n * </button>\n * ```\n */\n htmlFor: string | null;\n\n /**\n * Gets or sets the element that controls the visibility of the attachable\n * element. It is one of:\n *\n * - The control referenced by the `for` attribute.\n * - The control provided to `element.attach(control)`\n * - The element's parent.\n * - `null` if the element is not controlled.\n */\n control: HTMLElement | null;\n\n /**\n * Attaches the element to an interactive control.\n *\n * @param control The element that controls the attachable element.\n */\n attach(control: HTMLElement): void;\n\n /**\n * Detaches the element from its current control.\n */\n detach(): void;\n}\n\n/**\n * A key to retrieve an `Attachable` element's `AttachableController` from a\n * global `MutationObserver`.\n */\nconst ATTACHABLE_CONTROLLER = Symbol('attachableController');\n\n/**\n * The host of an `AttachableController`. The controller will add itself to\n * the host so it can be retrieved in a global `MutationObserver`.\n */\ninterface AttachableControllerHost extends ReactiveControllerHost, HTMLElement {\n [ATTACHABLE_CONTROLLER]?: AttachableController;\n}\n\nlet FOR_ATTRIBUTE_OBSERVER: MutationObserver | undefined;\n\nif (!isServer) {\n /**\n * A global `MutationObserver` that reacts to `for` attribute changes on\n * `Attachable` elements. If the `for` attribute changes, the controller will\n * re-attach to the new referenced element.\n */\n FOR_ATTRIBUTE_OBSERVER = new MutationObserver(records => {\n for (const record of records) {\n // When a control's `for` attribute changes, inform its\n // `AttachableController` to update to a new control.\n (record.target as AttachableControllerHost)[\n ATTACHABLE_CONTROLLER\n ]?.hostConnected();\n }\n });\n}\n\n/**\n * A controller that provides an implementation for `Attachable` elements.\n *\n * @example\n * ```ts\n * class MyElement extends LitElement implements Attachable {\n * get control() { return this.attachableController.control; }\n *\n * private readonly attachableController = new AttachableController(\n * this,\n * (previousControl, newControl) => {\n * previousControl?.removeEventListener('click', this.handleClick);\n * newControl?.addEventListener('click', this.handleClick);\n * }\n * );\n *\n * // Implement remaining `Attachable` properties/methods that call the\n * // controller's properties/methods.\n * }\n * ```\n */\nexport class AttachableController implements ReactiveController, Attachable {\n get htmlFor() {\n return this.host.getAttribute('for');\n }\n\n set htmlFor(htmlFor: string | null) {\n if (htmlFor === null) {\n this.host.removeAttribute('for');\n } else {\n this.host.setAttribute('for', htmlFor);\n }\n }\n\n get control() {\n if (this.host.hasAttribute('for')) {\n if (!this.htmlFor || !this.host.isConnected) {\n return null;\n }\n\n return (\n this.host.getRootNode() as Document | ShadowRoot\n ).querySelector<HTMLElement>(`#${this.htmlFor}`);\n }\n\n return this.currentControl || this.host.parentElement;\n }\n set control(control: HTMLElement | null) {\n if (control) {\n this.attach(control);\n } else {\n this.detach();\n }\n }\n\n private currentControl: HTMLElement | null = null;\n\n /**\n * Creates a new controller for an `Attachable` element.\n *\n * @param host The `Attachable` element.\n * @param onControlChange A callback with two parameters for the previous and\n * next control. An `Attachable` element may perform setup or teardown\n * logic whenever the control changes.\n */\n constructor(\n private readonly host: AttachableControllerHost,\n private readonly onControlChange: (\n prev: HTMLElement | null,\n next: HTMLElement | null,\n ) => void,\n ) {\n host.addController(this);\n host[ATTACHABLE_CONTROLLER] = this;\n FOR_ATTRIBUTE_OBSERVER?.observe(host, { attributeFilter: ['for'] });\n }\n\n attach(control: HTMLElement) {\n if (control === this.currentControl) {\n return;\n }\n\n this.setCurrentControl(control);\n // When imperatively attaching, remove the `for` attribute so\n // that the attached control is used instead of a referenced one.\n this.host.removeAttribute('for');\n }\n\n detach() {\n this.setCurrentControl(null);\n // When imperatively detaching, add an empty `for=\"\"` attribute. This will\n // ensure the control is `null` rather than the `parentElement`.\n this.host.setAttribute('for', '');\n }\n\n /** @private */\n hostConnected() {\n this.setCurrentControl(this.control);\n }\n\n /** @private */\n hostDisconnected() {\n this.setCurrentControl(null);\n }\n\n private setCurrentControl(control: HTMLElement | null) {\n this.onControlChange(this.currentControl, control);\n this.currentControl = control;\n }\n}\n"]}
@@ -1,70 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2023 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { ReactiveElement } from 'lit';
7
- import { WithElementInternals } from '../../labs/behaviors/element-internals.js';
8
- /**
9
- * A string indicating the form submission behavior of the element.
10
- *
11
- * - submit: The element submits the form. This is the default value if the
12
- * attribute is not specified, or if it is dynamically changed to an empty or
13
- * invalid value.
14
- * - reset: The element resets the form.
15
- * - button: The element does nothing.
16
- */
17
- export type FormSubmitterType = 'button' | 'submit' | 'reset';
18
- /**
19
- * An element that can submit or reset a `<form>`, similar to
20
- * `<button type="submit">`.
21
- */
22
- export interface FormSubmitter extends ReactiveElement, WithElementInternals {
23
- /**
24
- * A string indicating the form submission behavior of the element.
25
- *
26
- * - submit: The element submits the form. This is the default value if the
27
- * attribute is not specified, or if it is dynamically changed to an empty or
28
- * invalid value.
29
- * - reset: The element resets the form.
30
- * - button: The element does nothing.
31
- */
32
- type: FormSubmitterType;
33
- /**
34
- * The HTML name to use in form submission. When combined with a `value`, the
35
- * submitting button's name/value will be added to the form.
36
- *
37
- * Names must reflect to a `name` attribute for form integration.
38
- */
39
- name: string;
40
- /**
41
- * The value of the button. When combined with a `name`, the submitting
42
- * button's name/value will be added to the form.
43
- */
44
- value: string;
45
- }
46
- type FormSubmitterConstructor = (new () => FormSubmitter) | (abstract new () => FormSubmitter);
47
- /**
48
- * Sets up an element's constructor to enable form submission. The element
49
- * instance should be form associated and have a `type` property.
50
- *
51
- * A click listener is added to each element instance. If the click is not
52
- * default prevented, it will submit the element's form, if any.
53
- *
54
- * @example
55
- * ```ts
56
- * class MyElement extends mixinElementInternals(LitElement) {
57
- * static {
58
- * setupFormSubmitter(MyElement);
59
- * }
60
- *
61
- * static formAssociated = true;
62
- *
63
- * type: FormSubmitterType = 'submit';
64
- * }
65
- * ```
66
- *
67
- * @param ctor The form submitter element's constructor.
68
- */
69
- export declare function setupFormSubmitter(ctor: FormSubmitterConstructor): void;
70
- export {};
@@ -1,69 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2023 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { isServer } from 'lit';
7
- import { internals, } from '../../labs/behaviors/element-internals.js';
8
- /**
9
- * Sets up an element's constructor to enable form submission. The element
10
- * instance should be form associated and have a `type` property.
11
- *
12
- * A click listener is added to each element instance. If the click is not
13
- * default prevented, it will submit the element's form, if any.
14
- *
15
- * @example
16
- * ```ts
17
- * class MyElement extends mixinElementInternals(LitElement) {
18
- * static {
19
- * setupFormSubmitter(MyElement);
20
- * }
21
- *
22
- * static formAssociated = true;
23
- *
24
- * type: FormSubmitterType = 'submit';
25
- * }
26
- * ```
27
- *
28
- * @param ctor The form submitter element's constructor.
29
- */
30
- export function setupFormSubmitter(ctor) {
31
- if (isServer) {
32
- return;
33
- }
34
- ctor.addInitializer(instance => {
35
- const submitter = instance;
36
- submitter.addEventListener('click', async (event) => {
37
- const { type, [internals]: elementInternals } = submitter;
38
- const { form } = elementInternals;
39
- if (!form || type === 'button') {
40
- return;
41
- }
42
- // Wait a full task for event bubbling to complete.
43
- await new Promise(resolve => {
44
- setTimeout(resolve);
45
- });
46
- if (event.defaultPrevented) {
47
- return;
48
- }
49
- if (type === 'reset') {
50
- form.reset();
51
- return;
52
- }
53
- // form.requestSubmit(submitter) does not work with form associated custom
54
- // elements. This patches the dispatched submit event to add the correct
55
- // `submitter`.
56
- // See https://github.com/WICG/webcomponents/issues/814
57
- form.addEventListener('submit', submitEvent => {
58
- Object.defineProperty(submitEvent, 'submitter', {
59
- configurable: true,
60
- enumerable: true,
61
- get: () => submitter,
62
- });
63
- }, { capture: true, once: true });
64
- elementInternals.setFormValue(submitter.value);
65
- form.requestSubmit();
66
- });
67
- });
68
- }
69
- //# sourceMappingURL=form-submitter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form-submitter.js","sourceRoot":"","sources":["form-submitter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAmB,MAAM,KAAK,CAAC;AAEhD,OAAO,EACL,SAAS,GAEV,MAAM,2CAA2C,CAAC;AAgDnD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAA8B;IAC/D,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO;IACT,CAAC;IAEA,IAA0C,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;QACpE,MAAM,SAAS,GAAG,QAAyB,CAAC;QAC5C,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAC,KAAK,EAAC,EAAE;YAChD,MAAM,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE,gBAAgB,EAAE,GAAG,SAAS,CAAC;YAC1D,MAAM,EAAE,IAAI,EAAE,GAAG,gBAAgB,CAAC;YAClC,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAC/B,OAAO;YACT,CAAC;YAED,mDAAmD;YACnD,MAAM,IAAI,OAAO,CAAO,OAAO,CAAC,EAAE;gBAChC,UAAU,CAAC,OAAO,CAAC,CAAC;YACtB,CAAC,CAAC,CAAC;YAEH,IAAI,KAAK,CAAC,gBAAgB,EAAE,CAAC;gBAC3B,OAAO;YACT,CAAC;YAED,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;gBACrB,IAAI,CAAC,KAAK,EAAE,CAAC;gBACb,OAAO;YACT,CAAC;YAED,0EAA0E;YAC1E,wEAAwE;YACxE,eAAe;YACf,uDAAuD;YACvD,IAAI,CAAC,gBAAgB,CACnB,QAAQ,EACR,WAAW,CAAC,EAAE;gBACZ,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE;oBAC9C,YAAY,EAAE,IAAI;oBAClB,UAAU,EAAE,IAAI;oBAChB,GAAG,EAAE,GAAG,EAAE,CAAC,SAAS;iBACrB,CAAC,CAAC;YACL,CAAC,EACD,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAC9B,CAAC;YAEF,gBAAgB,CAAC,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YAC/C,IAAI,CAAC,aAAa,EAAE,CAAC;QACvB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { isServer, ReactiveElement } from 'lit';\n\nimport {\n internals,\n WithElementInternals,\n} from '../../labs/behaviors/element-internals.js';\n\n/**\n * A string indicating the form submission behavior of the element.\n *\n * - submit: The element submits the form. This is the default value if the\n * attribute is not specified, or if it is dynamically changed to an empty or\n * invalid value.\n * - reset: The element resets the form.\n * - button: The element does nothing.\n */\nexport type FormSubmitterType = 'button' | 'submit' | 'reset';\n\n/**\n * An element that can submit or reset a `<form>`, similar to\n * `<button type=\"submit\">`.\n */\nexport interface FormSubmitter extends ReactiveElement, WithElementInternals {\n /**\n * A string indicating the form submission behavior of the element.\n *\n * - submit: The element submits the form. This is the default value if the\n * attribute is not specified, or if it is dynamically changed to an empty or\n * invalid value.\n * - reset: The element resets the form.\n * - button: The element does nothing.\n */\n type: FormSubmitterType;\n\n /**\n * The HTML name to use in form submission. When combined with a `value`, the\n * submitting button's name/value will be added to the form.\n *\n * Names must reflect to a `name` attribute for form integration.\n */\n name: string;\n\n /**\n * The value of the button. When combined with a `name`, the submitting\n * button's name/value will be added to the form.\n */\n value: string;\n}\n\ntype FormSubmitterConstructor =\n | (new () => FormSubmitter)\n | (abstract new () => FormSubmitter);\n\n/**\n * Sets up an element's constructor to enable form submission. The element\n * instance should be form associated and have a `type` property.\n *\n * A click listener is added to each element instance. If the click is not\n * default prevented, it will submit the element's form, if any.\n *\n * @example\n * ```ts\n * class MyElement extends mixinElementInternals(LitElement) {\n * static {\n * setupFormSubmitter(MyElement);\n * }\n *\n * static formAssociated = true;\n *\n * type: FormSubmitterType = 'submit';\n * }\n * ```\n *\n * @param ctor The form submitter element's constructor.\n */\nexport function setupFormSubmitter(ctor: FormSubmitterConstructor) {\n if (isServer) {\n return;\n }\n\n (ctor as unknown as typeof ReactiveElement).addInitializer(instance => {\n const submitter = instance as FormSubmitter;\n submitter.addEventListener('click', async event => {\n const { type, [internals]: elementInternals } = submitter;\n const { form } = elementInternals;\n if (!form || type === 'button') {\n return;\n }\n\n // Wait a full task for event bubbling to complete.\n await new Promise<void>(resolve => {\n setTimeout(resolve);\n });\n\n if (event.defaultPrevented) {\n return;\n }\n\n if (type === 'reset') {\n form.reset();\n return;\n }\n\n // form.requestSubmit(submitter) does not work with form associated custom\n // elements. This patches the dispatched submit event to add the correct\n // `submitter`.\n // See https://github.com/WICG/webcomponents/issues/814\n form.addEventListener(\n 'submit',\n submitEvent => {\n Object.defineProperty(submitEvent, 'submitter', {\n configurable: true,\n enumerable: true,\n get: () => submitter,\n });\n },\n { capture: true, once: true },\n );\n\n elementInternals.setFormValue(submitter.value);\n form.requestSubmit();\n });\n });\n}\n"]}