@shortfuse/materialdesignweb 0.8.0 → 0.9.1

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 (405) hide show
  1. package/README.md +50 -198
  2. package/bin/mdw-css.js +1 -1
  3. package/components/Badge.js +15 -5
  4. package/components/Body.js +7 -0
  5. package/components/BottomAppBar.js +7 -10
  6. package/components/BottomSheet.js +472 -0
  7. package/components/Box.js +11 -49
  8. package/components/Button.js +81 -82
  9. package/components/Card.js +74 -62
  10. package/components/Checkbox.js +15 -25
  11. package/components/CheckboxIcon.js +19 -31
  12. package/components/Chip.js +18 -13
  13. package/components/Dialog.js +70 -100
  14. package/components/DialogActions.js +4 -0
  15. package/components/Display.js +64 -0
  16. package/components/Divider.js +5 -0
  17. package/components/Fab.js +94 -17
  18. package/components/FabContainer.js +57 -0
  19. package/components/FilterChip.js +43 -32
  20. package/components/Grid.js +187 -0
  21. package/components/Headline.js +9 -28
  22. package/components/Icon.js +80 -71
  23. package/components/IconButton.js +77 -120
  24. package/components/Input.js +745 -86
  25. package/components/InputChip.js +193 -0
  26. package/components/Label.js +7 -0
  27. package/components/List.js +11 -5
  28. package/components/ListItem.js +92 -23
  29. package/components/ListOption.js +143 -65
  30. package/components/Listbox.js +57 -17
  31. package/components/Menu.js +39 -27
  32. package/components/MenuItem.js +49 -36
  33. package/components/NavBar.js +66 -21
  34. package/components/NavBarItem.js +5 -0
  35. package/components/NavDrawer.js +33 -16
  36. package/components/NavDrawerItem.js +7 -4
  37. package/components/NavItem.js +61 -34
  38. package/components/NavRail.js +32 -21
  39. package/components/NavRailItem.js +10 -2
  40. package/components/Page.js +119 -0
  41. package/components/Pane.js +24 -0
  42. package/components/Popup.js +23 -8
  43. package/components/Progress.js +25 -5
  44. package/components/Radio.js +8 -7
  45. package/components/RadioIcon.js +24 -15
  46. package/components/Ripple.js +25 -7
  47. package/components/Root.js +225 -0
  48. package/components/Scrim.js +95 -0
  49. package/components/Search.js +30 -25
  50. package/components/SegmentedButton.js +53 -40
  51. package/components/SegmentedButtonGroup.js +15 -12
  52. package/components/Select.js +19 -10
  53. package/components/Shape.js +10 -66
  54. package/components/SideSheet.js +337 -0
  55. package/components/Slider.js +93 -36
  56. package/components/Snackbar.js +52 -20
  57. package/components/SnackbarContainer.js +51 -0
  58. package/components/Surface.js +20 -10
  59. package/components/Switch.js +21 -18
  60. package/components/SwitchIcon.js +62 -33
  61. package/components/Tab.js +78 -38
  62. package/components/TabContent.js +33 -12
  63. package/components/TabList.js +95 -34
  64. package/components/TabPanel.js +10 -1
  65. package/components/Table.js +151 -0
  66. package/components/TextArea.js +48 -16
  67. package/components/Title.js +8 -9
  68. package/components/Tooltip.js +51 -22
  69. package/components/TopAppBar.js +71 -78
  70. package/constants/shapes.js +36 -0
  71. package/constants/typography.js +127 -0
  72. package/core/Composition.js +391 -201
  73. package/core/CompositionAdapter.js +35 -18
  74. package/core/CustomElement.js +634 -254
  75. package/core/css.js +117 -12
  76. package/core/customTypes.js +161 -49
  77. package/core/dom.js +18 -11
  78. package/core/jsonMergePatch.js +27 -11
  79. package/core/observe.js +308 -256
  80. package/core/optimizations.js +9 -9
  81. package/core/template.js +14 -57
  82. package/dist/CustomElement.min.js +2 -0
  83. package/dist/CustomElement.min.js.map +7 -0
  84. package/dist/core/CustomElement.min.js +2 -0
  85. package/dist/core/CustomElement.min.js.map +7 -0
  86. package/dist/index.min.js +85 -115
  87. package/dist/index.min.js.map +4 -4
  88. package/dist/meta.json +1 -1
  89. package/dom/HTMLOptionsCollectionProxy.js +108 -0
  90. package/{theming/themableMixinLoader.js → loaders/palette.js} +4 -3
  91. package/loaders/theme.js +12 -0
  92. package/mixins/AriaReflectorMixin.js +64 -15
  93. package/mixins/AriaToolbarMixin.js +6 -0
  94. package/mixins/ControlMixin.js +79 -33
  95. package/mixins/DelegatesFocusMixin.js +62 -0
  96. package/mixins/DensityMixin.js +7 -3
  97. package/mixins/ElevationMixin.js +61 -0
  98. package/mixins/FlexableMixin.js +87 -39
  99. package/mixins/FormAssociatedMixin.js +76 -10
  100. package/mixins/HyperlinkMixin.js +76 -0
  101. package/mixins/InputMixin.js +227 -32
  102. package/mixins/KeyboardNavMixin.js +11 -7
  103. package/mixins/NavigationListenerMixin.js +33 -0
  104. package/mixins/PopupMixin.js +216 -219
  105. package/mixins/RTLObserverMixin.js +2 -0
  106. package/mixins/ResizeObserverMixin.js +18 -4
  107. package/mixins/RippleMixin.js +11 -7
  108. package/mixins/ScrollListenerMixin.js +14 -2
  109. package/mixins/SemiStickyMixin.js +51 -98
  110. package/mixins/ShapeMaskedMixin.js +125 -0
  111. package/mixins/ShapeMixin.js +30 -203
  112. package/mixins/StateMixin.js +74 -34
  113. package/mixins/TextFieldMixin.js +128 -145
  114. package/mixins/ThemableMixin.js +57 -56
  115. package/mixins/TooltipTriggerMixin.js +305 -359
  116. package/mixins/TouchTargetMixin.js +5 -2
  117. package/mixins/TypographyMixin.js +128 -0
  118. package/package.json +125 -81
  119. package/services/rtl.js +10 -0
  120. package/services/svgAlias.js +17 -0
  121. package/{theming/index.js → services/theme.js} +25 -176
  122. package/types/bin/mdw-css.d.ts +3 -0
  123. package/types/bin/mdw-css.d.ts.map +1 -0
  124. package/types/components/Badge.d.ts +39 -0
  125. package/types/components/Badge.d.ts.map +1 -0
  126. package/types/components/Body.d.ts +29 -0
  127. package/types/components/Body.d.ts.map +1 -0
  128. package/types/components/BottomAppBar.d.ts +72 -0
  129. package/types/components/BottomAppBar.d.ts.map +1 -0
  130. package/types/components/BottomSheet.d.ts +135 -0
  131. package/types/components/BottomSheet.d.ts.map +1 -0
  132. package/types/components/Box.d.ts +16 -0
  133. package/types/components/Box.d.ts.map +1 -0
  134. package/types/components/Button.d.ts +245 -0
  135. package/types/components/Button.d.ts.map +1 -0
  136. package/types/components/Card.d.ts +147 -0
  137. package/types/components/Card.d.ts.map +1 -0
  138. package/types/components/Checkbox.d.ts +207 -0
  139. package/types/components/Checkbox.d.ts.map +1 -0
  140. package/types/components/CheckboxIcon.d.ts +44 -0
  141. package/types/components/CheckboxIcon.d.ts.map +1 -0
  142. package/types/components/Chip.d.ts +248 -0
  143. package/types/components/Chip.d.ts.map +1 -0
  144. package/types/components/Dialog.d.ts +103 -0
  145. package/types/components/Dialog.d.ts.map +1 -0
  146. package/types/components/DialogActions.d.ts +4 -0
  147. package/types/components/DialogActions.d.ts.map +1 -0
  148. package/types/components/Display.d.ts +46 -0
  149. package/types/components/Display.d.ts.map +1 -0
  150. package/types/components/Divider.d.ts +10 -0
  151. package/types/components/Divider.d.ts.map +1 -0
  152. package/types/components/Fab.d.ts +273 -0
  153. package/types/components/Fab.d.ts.map +1 -0
  154. package/types/components/FabContainer.d.ts +10 -0
  155. package/types/components/FabContainer.d.ts.map +1 -0
  156. package/types/components/FilterChip.d.ts +256 -0
  157. package/types/components/FilterChip.d.ts.map +1 -0
  158. package/types/components/Grid.d.ts +38 -0
  159. package/types/components/Grid.d.ts.map +1 -0
  160. package/types/components/Headline.d.ts +46 -0
  161. package/types/components/Headline.d.ts.map +1 -0
  162. package/types/components/Icon.d.ts +55 -0
  163. package/types/components/Icon.d.ts.map +1 -0
  164. package/types/components/IconButton.d.ts +284 -0
  165. package/types/components/IconButton.d.ts.map +1 -0
  166. package/types/components/Input.d.ts +2528 -0
  167. package/types/components/Input.d.ts.map +1 -0
  168. package/types/components/InputChip.d.ts +85 -0
  169. package/types/components/InputChip.d.ts.map +1 -0
  170. package/types/components/Label.d.ts +29 -0
  171. package/types/components/Label.d.ts.map +1 -0
  172. package/types/components/List.d.ts +35 -0
  173. package/types/components/List.d.ts.map +1 -0
  174. package/types/components/ListItem.d.ts +124 -0
  175. package/types/components/ListItem.d.ts.map +1 -0
  176. package/types/components/ListOption.d.ts +158 -0
  177. package/types/components/ListOption.d.ts.map +1 -0
  178. package/types/components/Listbox.d.ts +763 -0
  179. package/types/components/Listbox.d.ts.map +1 -0
  180. package/types/components/Menu.d.ts +130 -0
  181. package/types/components/Menu.d.ts.map +1 -0
  182. package/types/components/MenuItem.d.ts +232 -0
  183. package/types/components/MenuItem.d.ts.map +1 -0
  184. package/types/components/NavBar.d.ts +20 -0
  185. package/types/components/NavBar.d.ts.map +1 -0
  186. package/types/components/NavBarItem.d.ts +97 -0
  187. package/types/components/NavBarItem.d.ts.map +1 -0
  188. package/types/components/NavDrawer.d.ts +107 -0
  189. package/types/components/NavDrawer.d.ts.map +1 -0
  190. package/types/components/NavDrawerItem.d.ts +97 -0
  191. package/types/components/NavDrawerItem.d.ts.map +1 -0
  192. package/types/components/NavItem.d.ts +99 -0
  193. package/types/components/NavItem.d.ts.map +1 -0
  194. package/types/components/NavRail.d.ts +108 -0
  195. package/types/components/NavRail.d.ts.map +1 -0
  196. package/types/components/NavRailItem.d.ts +97 -0
  197. package/types/components/NavRailItem.d.ts.map +1 -0
  198. package/types/components/Page.d.ts +25 -0
  199. package/types/components/Page.d.ts.map +1 -0
  200. package/types/components/Pane.d.ts +44 -0
  201. package/types/components/Pane.d.ts.map +1 -0
  202. package/types/components/Popup.d.ts +78 -0
  203. package/types/components/Popup.d.ts.map +1 -0
  204. package/types/components/Progress.d.ts +21 -0
  205. package/types/components/Progress.d.ts.map +1 -0
  206. package/types/components/Radio.d.ts +201 -0
  207. package/types/components/Radio.d.ts.map +1 -0
  208. package/types/components/RadioIcon.d.ts +46 -0
  209. package/types/components/RadioIcon.d.ts.map +1 -0
  210. package/types/components/Ripple.d.ts +35 -0
  211. package/types/components/Ripple.d.ts.map +1 -0
  212. package/types/components/Root.d.ts +68 -0
  213. package/types/components/Root.d.ts.map +1 -0
  214. package/types/components/Scrim.d.ts +6 -0
  215. package/types/components/Scrim.d.ts.map +1 -0
  216. package/types/components/Search.d.ts +516 -0
  217. package/types/components/Search.d.ts.map +1 -0
  218. package/types/components/SegmentedButton.d.ts +252 -0
  219. package/types/components/SegmentedButton.d.ts.map +1 -0
  220. package/types/components/SegmentedButtonGroup.d.ts +43 -0
  221. package/types/components/SegmentedButtonGroup.d.ts.map +1 -0
  222. package/types/components/Select.d.ts +158 -0
  223. package/types/components/Select.d.ts.map +1 -0
  224. package/types/components/Shape.d.ts +10 -0
  225. package/types/components/Shape.d.ts.map +1 -0
  226. package/types/components/SideSheet.d.ts +111 -0
  227. package/types/components/SideSheet.d.ts.map +1 -0
  228. package/types/components/Slider.d.ts +203 -0
  229. package/types/components/Slider.d.ts.map +1 -0
  230. package/types/components/Snackbar.d.ts +73 -0
  231. package/types/components/Snackbar.d.ts.map +1 -0
  232. package/types/components/SnackbarContainer.d.ts +6 -0
  233. package/types/components/SnackbarContainer.d.ts.map +1 -0
  234. package/types/components/Surface.d.ts +45 -0
  235. package/types/components/Surface.d.ts.map +1 -0
  236. package/types/components/Switch.d.ts +187 -0
  237. package/types/components/Switch.d.ts.map +1 -0
  238. package/types/components/SwitchIcon.d.ts +61 -0
  239. package/types/components/SwitchIcon.d.ts.map +1 -0
  240. package/types/components/Tab.d.ts +139 -0
  241. package/types/components/Tab.d.ts.map +1 -0
  242. package/types/components/TabContent.d.ts +124 -0
  243. package/types/components/TabContent.d.ts.map +1 -0
  244. package/types/components/TabList.d.ts +1111 -0
  245. package/types/components/TabList.d.ts.map +1 -0
  246. package/types/components/TabPanel.d.ts +28 -0
  247. package/types/components/TabPanel.d.ts.map +1 -0
  248. package/types/components/Table.d.ts +25 -0
  249. package/types/components/Table.d.ts.map +1 -0
  250. package/types/components/TextArea.d.ts +201 -0
  251. package/types/components/TextArea.d.ts.map +1 -0
  252. package/types/components/Title.d.ts +46 -0
  253. package/types/components/Title.d.ts.map +1 -0
  254. package/types/components/Tooltip.d.ts +49 -0
  255. package/types/components/Tooltip.d.ts.map +1 -0
  256. package/types/components/TopAppBar.d.ts +129 -0
  257. package/types/components/TopAppBar.d.ts.map +1 -0
  258. package/types/constants/colorKeywords.d.ts +2 -0
  259. package/types/constants/colorKeywords.d.ts.map +1 -0
  260. package/types/constants/shapes.d.ts +38 -0
  261. package/types/constants/shapes.d.ts.map +1 -0
  262. package/types/constants/typography.d.ts +212 -0
  263. package/types/constants/typography.d.ts.map +1 -0
  264. package/types/core/Composition.d.ts +260 -0
  265. package/types/core/Composition.d.ts.map +1 -0
  266. package/types/core/CompositionAdapter.d.ts +114 -0
  267. package/types/core/CompositionAdapter.d.ts.map +1 -0
  268. package/types/core/CustomElement.d.ts +304 -0
  269. package/types/core/CustomElement.d.ts.map +1 -0
  270. package/types/core/css.d.ts +44 -0
  271. package/types/core/css.d.ts.map +1 -0
  272. package/types/core/customTypes.d.ts +22 -0
  273. package/types/core/customTypes.d.ts.map +1 -0
  274. package/types/core/dom.d.ts +32 -0
  275. package/types/core/dom.d.ts.map +1 -0
  276. package/types/core/jsonMergePatch.d.ts +31 -0
  277. package/types/core/jsonMergePatch.d.ts.map +1 -0
  278. package/types/core/observe.d.ts +114 -0
  279. package/types/core/observe.d.ts.map +1 -0
  280. package/types/core/optimizations.d.ts +7 -0
  281. package/types/core/optimizations.d.ts.map +1 -0
  282. package/types/core/template.d.ts +47 -0
  283. package/types/core/template.d.ts.map +1 -0
  284. package/types/core/uid.d.ts +6 -0
  285. package/types/core/uid.d.ts.map +1 -0
  286. package/types/dom/HTMLOptionsCollectionProxy.d.ts +18 -0
  287. package/types/dom/HTMLOptionsCollectionProxy.d.ts.map +1 -0
  288. package/types/index.d.ts +88 -0
  289. package/types/index.d.ts.map +1 -0
  290. package/types/loaders/palette.d.ts +2 -0
  291. package/types/loaders/palette.d.ts.map +1 -0
  292. package/types/loaders/theme.d.ts +2 -0
  293. package/types/loaders/theme.d.ts.map +1 -0
  294. package/types/mixins/AriaReflectorMixin.d.ts +31 -0
  295. package/types/mixins/AriaReflectorMixin.d.ts.map +1 -0
  296. package/types/mixins/AriaToolbarMixin.d.ts +34 -0
  297. package/types/mixins/AriaToolbarMixin.d.ts.map +1 -0
  298. package/types/mixins/ControlMixin.d.ts +124 -0
  299. package/types/mixins/ControlMixin.d.ts.map +1 -0
  300. package/types/mixins/DelegatesFocusMixin.d.ts +13 -0
  301. package/types/mixins/DelegatesFocusMixin.d.ts.map +1 -0
  302. package/types/mixins/DensityMixin.d.ts +8 -0
  303. package/types/mixins/DensityMixin.d.ts.map +1 -0
  304. package/types/mixins/ElevationMixin.d.ts +32 -0
  305. package/types/mixins/ElevationMixin.d.ts.map +1 -0
  306. package/types/mixins/FlexableMixin.d.ts +14 -0
  307. package/types/mixins/FlexableMixin.d.ts.map +1 -0
  308. package/types/mixins/FormAssociatedMixin.d.ts +123 -0
  309. package/types/mixins/FormAssociatedMixin.d.ts.map +1 -0
  310. package/types/mixins/HyperlinkMixin.d.ts +25 -0
  311. package/types/mixins/HyperlinkMixin.d.ts.map +1 -0
  312. package/types/mixins/InputMixin.d.ts +173 -0
  313. package/types/mixins/InputMixin.d.ts.map +1 -0
  314. package/types/mixins/KeyboardNavMixin.d.ts +46 -0
  315. package/types/mixins/KeyboardNavMixin.d.ts.map +1 -0
  316. package/types/mixins/NavigationListenerMixin.d.ts +8 -0
  317. package/types/mixins/NavigationListenerMixin.d.ts.map +1 -0
  318. package/types/mixins/PopupMixin.d.ts +98 -0
  319. package/types/mixins/PopupMixin.d.ts.map +1 -0
  320. package/types/mixins/RTLObserverMixin.d.ts +8 -0
  321. package/types/mixins/RTLObserverMixin.d.ts.map +1 -0
  322. package/types/mixins/ResizeObserverMixin.d.ts +13 -0
  323. package/types/mixins/ResizeObserverMixin.d.ts.map +1 -0
  324. package/types/mixins/RippleMixin.d.ts +94 -0
  325. package/types/mixins/RippleMixin.d.ts.map +1 -0
  326. package/types/mixins/ScrollListenerMixin.d.ts +46 -0
  327. package/types/mixins/ScrollListenerMixin.d.ts.map +1 -0
  328. package/types/mixins/SemiStickyMixin.d.ts +50 -0
  329. package/types/mixins/SemiStickyMixin.d.ts.map +1 -0
  330. package/types/mixins/ShapeMaskedMixin.d.ts +12 -0
  331. package/types/mixins/ShapeMaskedMixin.d.ts.map +1 -0
  332. package/types/mixins/ShapeMixin.d.ts +39 -0
  333. package/types/mixins/ShapeMixin.d.ts.map +1 -0
  334. package/types/mixins/StateMixin.d.ts +29 -0
  335. package/types/mixins/StateMixin.d.ts.map +1 -0
  336. package/types/mixins/TextFieldMixin.d.ts +153 -0
  337. package/types/mixins/TextFieldMixin.d.ts.map +1 -0
  338. package/types/mixins/ThemableMixin.d.ts +10 -0
  339. package/types/mixins/ThemableMixin.d.ts.map +1 -0
  340. package/types/mixins/TooltipTriggerMixin.d.ts +114 -0
  341. package/types/mixins/TooltipTriggerMixin.d.ts.map +1 -0
  342. package/types/mixins/TouchTargetMixin.d.ts +6 -0
  343. package/types/mixins/TouchTargetMixin.d.ts.map +1 -0
  344. package/types/mixins/TypographyMixin.d.ts +20 -0
  345. package/types/mixins/TypographyMixin.d.ts.map +1 -0
  346. package/types/services/rtl.d.ts +3 -0
  347. package/types/services/rtl.d.ts.map +1 -0
  348. package/types/services/svgAlias.d.ts +13 -0
  349. package/types/services/svgAlias.d.ts.map +1 -0
  350. package/types/services/theme.d.ts +45 -0
  351. package/types/services/theme.d.ts.map +1 -0
  352. package/types/utils/cli.d.ts +3 -0
  353. package/types/utils/cli.d.ts.map +1 -0
  354. package/types/utils/function.d.ts +3 -0
  355. package/types/utils/function.d.ts.map +1 -0
  356. package/types/utils/jsx-runtime.d.ts +20 -0
  357. package/types/utils/jsx-runtime.d.ts.map +1 -0
  358. package/types/utils/material-color/blend.d.ts +34 -0
  359. package/types/utils/material-color/blend.d.ts.map +1 -0
  360. package/types/utils/material-color/hct/Cam16.d.ts +142 -0
  361. package/types/utils/material-color/hct/Cam16.d.ts.map +1 -0
  362. package/types/utils/material-color/hct/Hct.d.ts +93 -0
  363. package/types/utils/material-color/hct/Hct.d.ts.map +1 -0
  364. package/types/utils/material-color/hct/ViewingConditions.d.ts +69 -0
  365. package/types/utils/material-color/hct/ViewingConditions.d.ts.map +1 -0
  366. package/types/utils/material-color/hct/hctSolver.d.ts +30 -0
  367. package/types/utils/material-color/hct/hctSolver.d.ts.map +1 -0
  368. package/types/utils/material-color/helper.d.ts +8 -0
  369. package/types/utils/material-color/helper.d.ts.map +1 -0
  370. package/types/utils/material-color/palettes/CorePalette.d.ts +75 -0
  371. package/types/utils/material-color/palettes/CorePalette.d.ts.map +1 -0
  372. package/types/utils/material-color/palettes/TonalPalette.d.ts +38 -0
  373. package/types/utils/material-color/palettes/TonalPalette.d.ts.map +1 -0
  374. package/types/utils/material-color/scheme/Scheme.d.ts +264 -0
  375. package/types/utils/material-color/scheme/Scheme.d.ts.map +1 -0
  376. package/types/utils/material-color/utils/color.d.ts +172 -0
  377. package/types/utils/material-color/utils/color.d.ts.map +1 -0
  378. package/types/utils/material-color/utils/math.d.ts +94 -0
  379. package/types/utils/material-color/utils/math.d.ts.map +1 -0
  380. package/types/utils/pixelmatch.d.ts +22 -0
  381. package/types/utils/pixelmatch.d.ts.map +1 -0
  382. package/types/utils/popup.d.ts +106 -0
  383. package/types/utils/popup.d.ts.map +1 -0
  384. package/types/utils/searchParams.d.ts +3 -0
  385. package/types/utils/searchParams.d.ts.map +1 -0
  386. package/types/utils/svg.d.ts +7 -0
  387. package/types/utils/svg.d.ts.map +1 -0
  388. package/utils/jsx-runtime.js +9 -4
  389. package/utils/material-color/scheme/Scheme.js +1 -1
  390. package/utils/pixelmatch.js +363 -0
  391. package/utils/popup.js +86 -10
  392. package/utils/searchParams.js +22 -0
  393. package/components/Button.md +0 -61
  394. package/components/ExtendedFab.js +0 -32
  395. package/components/Layout.js +0 -504
  396. package/components/Nav.js +0 -38
  397. package/core/DomAdapter.js +0 -586
  398. package/core/ICustomElement.d.ts +0 -291
  399. package/core/ICustomElement.js +0 -1
  400. package/core/test.js +0 -126
  401. package/core/typings.d.ts +0 -142
  402. package/core/typings.js +0 -1
  403. package/mixins/SurfaceMixin.js +0 -127
  404. package/theming/loader.js +0 -22
  405. /package/{utils/color_keywords.js → constants/colorKeywords.js} +0 -0
@@ -1,7 +1,9 @@
1
1
  /* https://html.spec.whatwg.org/multipage/form-control-infrastructure.html */
2
2
 
3
3
  import { cloneAttributeCallback } from '../core/CustomElement.js';
4
+ import { FIREFOX_VERSION, SAFARI_VERSION } from '../core/dom.js';
4
5
 
6
+ import DelegatesFocusMixin from './DelegatesFocusMixin.js';
5
7
  import FormAssociatedMixin from './FormAssociatedMixin.js';
6
8
 
7
9
  /** @typedef {import('../core/CustomElement.js').default} CustomElement */
@@ -11,21 +13,33 @@ import FormAssociatedMixin from './FormAssociatedMixin.js';
11
13
  /** @typedef {HTMLInputElement|HTMLTextAreaElement|HTMLSelectElement} HTMLControlElement */
12
14
 
13
15
  /**
16
+ * Adds form-control behavior and wiring to an internal control element.
14
17
  * @param {ReturnType<import('./StateMixin.js').default>} Base
15
18
  */
16
19
  export default function ControlMixin(Base) {
17
20
  return Base
18
21
  .mixin(FormAssociatedMixin)
22
+ .mixin(DelegatesFocusMixin)
19
23
  .observe({
24
+ /** Optional aria-label applied to the internal control (string). */
20
25
  ariaLabel: 'string',
26
+ /** Internal cached slot text used as fallback label when aria-label is absent. */
27
+ _slotInnerText: 'string',
21
28
  })
22
29
  .set({
23
- delegatesFocus: true,
24
30
  focusableOnDisabled: false,
25
31
  controlTagName: 'input',
26
32
  controlVoidElement: true,
33
+ _slotMutationObserver: null,
27
34
  })
28
35
  .methods({
36
+ /**
37
+ * Default behavior can be overridden
38
+ * @param {string} value
39
+ */
40
+ _onControlValue(value) {
41
+ this._value = value;
42
+ },
29
43
  onValueChangingContentAttribute() {
30
44
  const control = /** @type {HTMLControlElement} */ (this.refs.control);
31
45
 
@@ -36,7 +50,7 @@ export default function ControlMixin(Base) {
36
50
  control.setAttribute('value', ''); // Chrome needs to know to reset
37
51
  }
38
52
  // Changing control attribute may change the value (eg: min/max)
39
- this._value = control.value;
53
+ this._onControlValue(control.value);
40
54
  },
41
55
  /** @type {HTMLElement['focus']} */
42
56
  focus(...options) {
@@ -44,20 +58,16 @@ export default function ControlMixin(Base) {
44
58
  },
45
59
  /** Redirect click requests to control itself */
46
60
  click() {
47
- console.log('ControlMixin: Click');
61
+ if (this.disabledState) return;
48
62
  this.refs.control.click();
49
63
  },
50
64
  })
51
65
  .define({
52
66
  stateTargetElement() { return this.refs.control; },
53
- form() { return this.elementInternals.form; },
54
- validity() { return this.elementInternals.validity; },
55
- validationMessage() { return this.elementInternals.validationMessage; },
56
- willValidate() { return this.elementInternals.willValidate; },
57
- labels() { return this.elementInternals.labels; },
58
67
  })
59
68
  .methods({
60
69
  checkValidity() {
70
+ if (!this.willValidate) return true;
61
71
  const control = /** @type {HTMLControlElement} */ (this.refs.control);
62
72
  const validityState = control.checkValidity();
63
73
  /** @type {Partial<ValidityState>} */
@@ -95,21 +105,30 @@ export default function ControlMixin(Base) {
95
105
  this.refs.control,
96
106
  );
97
107
  },
108
+ })
109
+ .observe({
110
+ _computedAriaLabel({ ariaLabel, _slotInnerText }) {
111
+ return ariaLabel?.trim() || _slotInnerText?.trim() || null;
112
+ },
113
+ })
114
+ .expressions({
115
+ _computedAriaLabelledby({ _computedAriaLabel }) {
116
+ return _computedAriaLabel ? null : 'slot';
117
+ },
118
+ })
98
119
 
120
+ .recompose(({ template, html, element }) => {
121
+ template.append(html`
122
+ <${element.controlTagName} id=control
123
+ aria-label={_computedAriaLabel}
124
+ aria-labelledby={_computedAriaLabelledby}
125
+ part=control
126
+ form-disabled={disabledState}
127
+ type={type}
128
+ >${element.controlVoidElement ? '' : `</${element.controlTagName}>`}
129
+ `);
99
130
  })
100
131
  .on({
101
- // Wait until controlTagName is settled before templating
102
- composed({ template, html }) {
103
- template.append(html`
104
- <${this.controlTagName} id=control
105
- aria-labelledby=${({ ariaLabel }) => (ariaLabel ? null : 'slot')}
106
- part=control
107
- aria-label={ariaLabel}
108
- form-disabled={disabledState}
109
- type={type}
110
- >${this.controlVoidElement ? '' : `</${this.controlTagName}>`}
111
- `);
112
- },
113
132
  disabledStateChanged(oldValue, newValue) {
114
133
  const control = /** @type {HTMLControlElement} */ (this.refs.control);
115
134
  control.setAttribute('aria-disabled', `${newValue}`);
@@ -122,9 +141,17 @@ export default function ControlMixin(Base) {
122
141
  }
123
142
  }
124
143
  },
144
+ readOnlyChanged(oldValue, newValue) {
145
+ const control = /** @type {HTMLControlElement} */ (this.refs.control);
146
+ if (this.type === 'checkbox') {
147
+ control.setAttribute('aria-readonly', newValue ? 'true' : 'false');
148
+ } else {
149
+ control.removeAttribute('aria-readonly');
150
+ }
151
+ },
125
152
  constructed() {
126
153
  const control = /** @type {HTMLControlElement} */ (this.refs.control);
127
- this._value = control.value;
154
+ this._onControlValue(control.value);
128
155
  },
129
156
  connected() {
130
157
  // Expose this element as focusable
@@ -141,11 +168,14 @@ export default function ControlMixin(Base) {
141
168
  })
142
169
  .childEvents({
143
170
  control: {
144
- invalid() {
145
- console.debug('ControlMixin: invalid', this);
171
+ click(e) {
172
+ if ((this.type === 'checkbox' && this.readOnly)
173
+ || (this.focusableOnDisabled && this.disabledState)) {
174
+ e.preventDefault();
175
+ e.stopImmediatePropagation();
176
+ }
146
177
  },
147
178
  input({ currentTarget }) {
148
- console.debug('ControlMixin: input');
149
179
  const control = /** @type {HTMLControlElement} */ (currentTarget);
150
180
  if (this.validity.valid) {
151
181
  // Track internally
@@ -155,18 +185,37 @@ export default function ControlMixin(Base) {
155
185
  // Perform check in case user has validated
156
186
  this.checkValidity();
157
187
  }
158
- this._value = control.value;
188
+ this._onControlValue(control.value);
159
189
  },
160
190
  change({ currentTarget }) {
161
- console.debug('ControlMixin: change');
162
191
  const control = /** @type {HTMLControlElement} */ (currentTarget);
163
192
  this._valueDirty = true;
164
- this._value = control.value;
193
+ this._onControlValue(control.value);
165
194
  this.checkValidity();
166
- // Change event is NOT composed. Needs to escape shadow DOM
167
- this.dispatchEvent(new Event('change', { bubbles: true }));
168
195
  },
169
196
  },
197
+ slot: (FIREFOX_VERSION < 116 || SAFARI_VERSION) ? {
198
+ slotchange({ currentTarget }) {
199
+ // Firefox and Safari will not apply label from slots.
200
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1826194
201
+ // https://commits.webkit.org/263644@main
202
+ // https://bugs.webkit.org/show_bug.cgi?id=260772
203
+ this._slotInnerText = this.textContent;
204
+ if (!this._slotMutationObserver) {
205
+ this._slotMutationObserver = new MutationObserver(() => {
206
+ this._slotInnerText = this.textContent;
207
+ });
208
+ this._slotMutationObserver.observe(currentTarget, { characterData: true });
209
+ }
210
+ },
211
+ } : {},
212
+ })
213
+ .rootEvents({
214
+ change(event) {
215
+ // Change event is NOT composed. Needs to escape shadow DOM
216
+ // @ts-ignore skip constructor cast
217
+ this.dispatchEvent(new event.constructor(event.type, event));
218
+ },
170
219
  })
171
220
  .css`
172
221
  :host {
@@ -206,15 +255,12 @@ export default function ControlMixin(Base) {
206
255
 
207
256
  cursor: auto;
208
257
  outline: none;
209
-
210
- pointer-events: auto;
211
-
212
258
  transform: translateX(-50%) translateY(-50%);
213
259
 
214
260
  /* Safari and Chrome will emit two click events if not at top of stack */
215
261
  /* Allows up to 3 other layers (eg: ripple, outline) */
216
262
  z-index: 4;
217
-
263
+
218
264
  background-color: transparent;
219
265
 
220
266
  border-radius: 0;
@@ -0,0 +1,62 @@
1
+ import { CHROME_VERSION, isFocused } from '../core/dom.js';
2
+
3
+ /**
4
+ * Enables focus delegation to an internal focus target and manages tabindex behavior.
5
+ * @param {typeof import('../core/CustomElement.js').default} Base
6
+ */
7
+ /**
8
+ * Adds delegated focus behavior to the element's internals for keyboard navigation.
9
+ * @param {typeof import('../core/CustomElement.js').default} Base
10
+ */
11
+ export default function DelegatesFocusMixin(Base) {
12
+ return Base
13
+ .set({
14
+ /** When true, the element delegates focus to an internal focus target. */
15
+ delegatesFocus: true,
16
+ })
17
+ .extend(CHROME_VERSION >= 111
18
+ ? (BaseClass) => BaseClass
19
+ : (BaseClass) => class extends BaseClass {
20
+ get tabIndex() {
21
+ return super.tabIndex;
22
+ }
23
+
24
+ set tabIndex(value) {
25
+ if (value === super.tabIndex && value !== -1) {
26
+ // Non -1 value already set
27
+ return;
28
+ }
29
+
30
+ if (this.delegatesFocus && isFocused(this)) {
31
+ if (this.getAttribute('tabindex') === value.toString()) {
32
+ // Skip if possible
33
+ return;
34
+ }
35
+
36
+ // Chrome blurs on tabindex changes with delegatesFocus
37
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=1346606
38
+ /** @type {EventListener} */
39
+ const listener = (e) => {
40
+ e.stopImmediatePropagation();
41
+ e.stopPropagation();
42
+ if (e.type === 'blur') {
43
+ console.warn('Chromium bug 1346606: Tabindex change caused blur. Giving focusing back.', this);
44
+ this.focus();
45
+ } else {
46
+ console.warn(`Chromium bug 1346606: Blocking ${e.type} event.`, this);
47
+ }
48
+ };
49
+ for (const type of ['blur', 'focus', 'focusout', 'focusin']) {
50
+ this.addEventListener(type, listener, { capture: true, once: true });
51
+ }
52
+ super.tabIndex = value;
53
+ for (const type of ['blur', 'focus', 'focusout', 'focusin']) {
54
+ this.removeEventListener(type, listener, { capture: true });
55
+ }
56
+ return;
57
+ }
58
+
59
+ super.tabIndex = value;
60
+ }
61
+ });
62
+ }
@@ -1,7 +1,11 @@
1
- /** @param {typeof import('../core/CustomElement.js').default} Base */
1
+ /**
2
+ * Adds a `density` property to control component spacing and compactness.
3
+ * @param {typeof import('../core/CustomElement.js').default} Base
4
+ */
2
5
  export default function DensityMixin(Base) {
3
6
  return Base
4
7
  .observe({
8
+ /** Density level affecting spacing and compactness. Integer from -4 (dense) to 4 (spacious). */
5
9
  density: 'integer',
6
10
  })
7
11
  .css`
@@ -14,11 +18,11 @@ export default function DensityMixin(Base) {
14
18
 
15
19
  :host([density="-1"]) { --mdw-density: -1; }
16
20
  :host([density="-2"]) { --mdw-density: -2; }
17
- :host([density="-3"]) { --mdw-density: -2; }
21
+ :host([density="-3"]) { --mdw-density: -3; }
18
22
  :host([density="-4"]) { --mdw-density: -4; }
19
23
  :host([density="1"]) { --mdw-density: 1; }
20
24
  :host([density="2"]) { --mdw-density: 2; }
21
25
  :host([density="3"]) { --mdw-density: 3; }
22
- :host([density="4"]) { --mdw-density: 3; }
26
+ :host([density="4"]) { --mdw-density: 4; }
23
27
  `;
24
28
  }
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Adds CSS properties for elevation via shadows or underlighting.
3
+ * @param {ReturnType<import('./StateMixin.js').default> & ReturnType<import('./ThemableMixin.js').default>} Base
4
+ */
5
+ export default function ElevationMixin(Base) {
6
+ return Base
7
+ .css`:host {
8
+
9
+ /** Reference Properties */
10
+ /*
11
+ --mdw-surface__box-shadow__1__umbra: 0px 1px 2px 0px rgba(var(--mdw-color__shadow), 0.30);
12
+ --mdw-surface__box-shadow__2__umbra: 0px 1px 2px 0px rgba(var(--mdw-color__shadow), 0.30);
13
+ --mdw-surface__box-shadow__3__umbra: 0px 1px 3px 0px rgba(var(--mdw-color__shadow), 0.30);
14
+ --mdw-surface__box-shadow__4__umbra: 0px 2px 3px 0px rgba(var(--mdw-color__shadow), 0.30);
15
+ --mdw-surface__box-shadow__5__umbra: 0px 4px 4px 0px rgba(var(--mdw-color__shadow), 0.30);
16
+
17
+ --mdw-surface__filter__0__umbra: drop-shadow(0px 1px 1px rgba(var(--mdw-color__shadow), 0));
18
+ --mdw-surface__filter__1__umbra: drop-shadow(0px 1px 1px rgba(var(--mdw-color__shadow), 0.30));
19
+ --mdw-surface__filter__2__umbra: drop-shadow(0px 1px 1px rgba(var(--mdw-color__shadow), 0.30));
20
+ --mdw-surface__filter__3__umbra: drop-shadow(0px 1px 1.5px rgba(var(--mdw-color__shadow), 0.30));
21
+ --mdw-surface__filter__4__umbra: drop-shadow(0px 2px 1.5px rgba(var(--mdw-color__shadow), 0.30));
22
+ --mdw-surface__filter__5__umbra: drop-shadow(0px 4px 2px rgba(var(--mdw-color__shadow), 0.30));
23
+
24
+ --mdw-surface__box-shadow__1__penumbra: 0px 1px 3px 1px rgba(var(--mdw-color__shadow), 0.15);
25
+ --mdw-surface__box-shadow__2__penumbra: 0px 2px 6px 2px rgba(var(--mdw-color__shadow), 0.15);
26
+ --mdw-surface__box-shadow__3__penumbra: 0px 4px 8px 3px rgba(var(--mdw-color__shadow), 0.15);
27
+ --mdw-surface__box-shadow__4__penumbra: 0px 6px 10px 4px rgba(var(--mdw-color__shadow), 0.15);
28
+ --mdw-surface__box-shadow__5__penumbra: 0px 8px 12px 6px rgba(var(--mdw-color__shadow), 0.15);
29
+
30
+ --mdw-elevation__filter__0__penumbra: drop-shadow(0px 1px 2.5px rgba(var(--mdw-color__shadow), 0));
31
+ --mdw-elevation__filter__1__penumbra: drop-shadow(0px 1px 2.5px rgba(var(--mdw-color__shadow), 0.25));
32
+ --mdw-elevation__filter__2__penumbra: drop-shadow(0px 2px 5px rgba(var(--mdw-color__shadow), 0.25));
33
+ --mdw-elevation__filter__3__penumbra: drop-shadow(0px 4px 7px rgba(var(--mdw-color__shadow), 0.263));
34
+ --mdw-elevation__filter__4__penumbra: drop-shadow(0px 6px 9px rgba(var(--mdw-color__shadow), 0.27));
35
+ --mdw-elevation__filter__5__penumbra: drop-shadow(0px 8px 12px rgba(var(--mdw-color__shadow), 0.30));
36
+
37
+ --mdw-elevation__filter__0: var(--mdw-surface__shadow__0__umbra) var(--mdw-surface__shadow__0__penumbra);
38
+ --mdw-elevation__filter__1: var(--mdw-surface__shadow__1__umbra) var(--mdw-surface__shadow__1__penumbra);
39
+ --mdw-elevation__filter__2: var(--mdw-surface__shadow__2__umbra) var(--mdw-surface__shadow__2__penumbra);
40
+ --mdw-elevation__filter__3: var(--mdw-surface__shadow__3__umbra) var(--mdw-surface__shadow__3__penumbra);
41
+ --mdw-elevation__filter__4: var(--mdw-surface__shadow__4__umbra) var(--mdw-surface__shadow__4__penumbra);
42
+ --mdw-elevation__filter__5: var(--mdw-surface__shadow__5__umbra) var(--mdw-surface__shadow__5__penumbra);
43
+ */
44
+
45
+ --mdw-elevation__rgb: var(--mdw-color__shadow);
46
+
47
+ --mdw-elevation__box-shadow__0: 0px 1px 1px 0px rgba(var(--mdw-elevation__rgb), 0.00), 0px 0px 1px 1px rgba(var(--mdw-elevation__rgb), 0.00);
48
+ --mdw-elevation__box-shadow__1: 0px 1px 2px 0px rgba(var(--mdw-elevation__rgb), 0.30), 0px 1px 3px 1px rgba(var(--mdw-elevation__rgb), 0.15);
49
+ --mdw-elevation__box-shadow__2: 0px 1px 2px 0px rgba(var(--mdw-elevation__rgb), 0.30), 0px 2px 6px 2px rgba(var(--mdw-elevation__rgb), 0.15);
50
+ --mdw-elevation__box-shadow__3: 0px 1px 3px 0px rgba(var(--mdw-elevation__rgb), 0.30), 0px 4px 8px 3px rgba(var(--mdw-elevation__rgb), 0.15);
51
+ --mdw-elevation__box-shadow__4: 0px 2px 3px 0px rgba(var(--mdw-elevation__rgb), 0.30), 0px 6px 10px 4px rgba(var(--mdw-elevation__rgb), 0.15);
52
+ --mdw-elevation__box-shadow__5: 0px 4px 4px 0px rgba(var(--mdw-elevation__rgb), 0.30), 0px 8px 12px 6px rgba(var(--mdw-elevation__rgb), 0.15);
53
+
54
+ --mdw-elevation__drop-shadow__0: drop-shadow(0px 1px 001px rgba(var(--mdw-elevation__rgb),000)) drop-shadow(0px 1px 2.5px rgba(var(--mdw-elevation__rgb),00000));
55
+ --mdw-elevation__drop-shadow__1: drop-shadow(0px 1px 001px rgba(var(--mdw-elevation__rgb),0.3)) drop-shadow(0px 1px 2.5px rgba(var(--mdw-elevation__rgb),0.250));
56
+ --mdw-elevation__drop-shadow__2: drop-shadow(0px 1px 001px rgba(var(--mdw-elevation__rgb),0.3)) drop-shadow(0px 2px 005px rgba(var(--mdw-elevation__rgb),0.250));
57
+ --mdw-elevation__drop-shadow__3: drop-shadow(0px 1px 1.5px rgba(var(--mdw-elevation__rgb),0.3)) drop-shadow(0px 4px 007px rgba(var(--mdw-elevation__rgb),0.263));
58
+ --mdw-elevation__drop-shadow__4: drop-shadow(0px 2px 1.5px rgba(var(--mdw-elevation__rgb),0.3)) drop-shadow(0px 6px 009px rgba(var(--mdw-elevation__rgb),0.270));
59
+ --mdw-elevation__drop-shadow__5: drop-shadow(0px 4px 2.0px rgba(var(--mdw-elevation__rgb),0.3)) drop-shadow(0px 8px 012px rgba(var(--mdw-elevation__rgb),0.300));
60
+ }`;
61
+ }
@@ -1,109 +1,157 @@
1
1
  /**
2
+ * Layout helper mixin providing flexible box utilities (gap, padding, axis).
2
3
  * @param {typeof import('../core/CustomElement.js').default} Base
3
4
  */
4
5
  export default function FlexableMixin(Base) {
5
6
  return Base
6
7
  .observe({
7
- flex: {
8
- type: 'string',
9
- empty: 'row',
10
- /** @type {'row'|'column'} */
11
- value: 'row',
12
- },
8
+ /** Set `display: block` on the host (boolean) */
9
+ block: 'boolean',
10
+ /** Use inline flex layout: `display: inline-flex` (boolean) */
11
+ inline: 'boolean',
12
+ /** Switch main axis to horizontal: `flex-direction: row` (boolean) */
13
+ row: 'boolean',
14
+ /**
15
+ * Main-axis alignment / justification.
16
+ * Allowed: 'start'|'center'|'end'|'between'|'around'|'stretch'|'baseline'.
17
+ * Default: 'start'.
18
+ */
13
19
  x: {
14
20
  type: 'string',
15
21
  empty: 'start',
16
- /** @type {'start'|'center'|'end'|'between'|'around'|'stretch'} */
22
+ /** @type {'start'|'center'|'end'|'between'|'around'|'stretch'|'baseline'} */
17
23
  value: 'start',
18
24
  },
25
+ /**
26
+ * Cross-axis alignment / alignment of items.
27
+ * Same allowed values as `x`. Default: 'start'.
28
+ */
19
29
  y: {
20
30
  type: 'string',
21
31
  empty: 'start',
22
- /** @type {'start'|'center'|'end'|'between'|'around'|'stretch'} */
32
+ /** @type {'start'|'center'|'end'|'between'|'around'|'stretch'|'baseline'} */
23
33
  value: 'start',
24
34
  },
35
+ /** Gap between children. Accepts preset numeric strings (e.g. '8') mapped to px, or floats. */
25
36
  gap: 'float',
26
- padding: 'float',
37
+ /** Padding preset or numeric value (e.g. 'pane', '8', '16'). */
38
+ padding: 'string',
27
39
  })
28
40
  .css`
29
41
  /* https://css-tricks.com/snippets/css/a-guide-to-flexbox/ */
30
42
 
31
43
  :host{
44
+ display: flex;
45
+ flex-direction: column;
46
+
32
47
  box-sizing: border-box;
48
+
33
49
  }
34
50
 
35
- :host([flex]) {
36
- display:flex;
51
+ :host(:is([inline])) {
52
+ display: inline-flex;
37
53
  }
38
54
 
39
- :host([flex="column"]) {
40
- flex-direction: column;
55
+ :host(:is([block])) {
56
+ display: block;
57
+ }
58
+
59
+
60
+ :host(:is([inline][block])) {
61
+ display: inline-block;
62
+ }
63
+
64
+ :host(:is([row])) {
65
+ flex-direction: row;
41
66
  }
42
67
 
43
- :host(:where([flex][y="start"], [flex="column"][x="start"])) {
68
+ :host(:is([row][y="start"], [x="start"]:not([row]))) {
44
69
  align-items: flex-start;
45
70
  }
46
71
 
47
- :host(:where([flex][y="end"], [flex="column"][x="end"])) {
72
+ :host(:is([row][y="end"], [x="end"]:not([row]))) {
48
73
  align-items: flex-end;
49
74
  }
50
75
 
51
- :host(:where([flex][y="center"], [flex="column"][x="center"])) {
76
+ :host(:is([row][y="center"], [x="center"]:not([row]))) {
52
77
  align-items: center;
53
78
  }
54
79
 
55
- :host(:where([flex][y="between"], [flex="column"][x="between"])) {
80
+ :host(:is([row][y="between"], [x="between"]:not([row]))) {
56
81
  align-items: space-between;
57
82
  }
58
83
 
59
- :host(:where([flex][y="around"], [flex="column"][x="around"])) {
84
+ :host(:is([row][y="around"], [x="around"]:not([row]))) {
60
85
  align-items: space-around;
61
86
  }
62
87
 
63
- :host(:where([flex][y="stretch"], [flex="column"][x="stretch"])) {
88
+ :host(:is([row][y="baseline"], [x="baseline"]:not([row]))) {
89
+ align-items: baseline;
90
+ }
91
+
92
+ :host(:is([row][y="stretch"], [x="stretch"]:not([row]))) {
64
93
  align-items: stretch;
65
94
  }
66
95
 
67
- :host(:where([flex][x="start"], [flex="column"][y="start"])) {
96
+ :host(:is([row][x="start"], [y="start"]:not([row]))) {
68
97
  justify-content: flex-start;
69
98
  }
70
99
 
71
- :host(:where([flex][x="end"], [flex="column"][y="end"])) {
100
+ :host(:is([row][x="end"], [y="end"]:not([row]))) {
72
101
  justify-content: flex-end;
73
102
  }
74
103
 
75
- :host(:where([flex][x="center"], [flex="column"][y="center"])) {
104
+ :host(:is([row][x="center"], [y="center"]:not([row]))) {
76
105
  justify-content: center;
77
106
  }
78
107
 
79
- :host(:where([flex][x="between"], [flex="column"][y="between"])) {
108
+ :host(:is([row][x="between"], [y="between"]:not([row]))) {
80
109
  justify-content: space-between;
81
110
  }
82
111
 
83
- :host(:where([flex][x="stretch"], [flex="column"][y="stretch"])) {
112
+ :host(:is([row][x="stretch"], [y="stretch"]:not([row]))) {
84
113
  justify-content: stretch;
85
114
  }
86
115
 
87
- :host([wrap]) {
116
+ :host(:is([wrap])) {
88
117
  flex-wrap: wrap;
89
118
  }
90
119
 
91
- :host([wrap="reverse"]) {
120
+ :host(:is([wrap="reverse"])) {
92
121
  flex-wrap: wrap-reverse;
93
122
  }
94
123
 
95
- :host([gap="4"]) {gap: 4px;}
96
- :host([gap="8"]) {gap: 8px;}
97
- :host([gap="12"]) {gap: 12px;}
98
- :host([gap="16"]) {gap: 16px;}
99
- :host([gap="20"]) {gap: 20px;}
100
- :host([gap="24"]) {gap: 24px;}
101
-
102
- :host([padding="4"]) {padding: 4px;}
103
- :host([padding="8"]) {padding: 8px;}
104
- :host([padding="12"]) {padding: 12px;}
105
- :host([padding="16"]) {padding: 16px;}
106
- :host([padding="20"]) {padding: 20px;}
107
- :host([padding="24"]) {padding: 24px;}
124
+ :host(:is([gap])) {gap: 0;}
125
+ :host(:is([gap="4"])) {gap: 4px;}
126
+ :host(:is([gap="8"])) {gap: 8px;}
127
+ :host(:is([gap="12"])) {gap: 12px;}
128
+ :host(:is([gap="16"])) {gap: 16px;}
129
+ :host(:is([gap="20"])) {gap: 20px;}
130
+ :host(:is([gap="24"])) {gap: 24px;}
131
+
132
+ :host(:is([padding])) {padding: 0;}
133
+ :host(:is([padding="pane"])) { padding-inline: var(--mdw-pane__padding-inline, 0) }
134
+ :host(:is([padding="4"])) {padding: 4px;}
135
+ :host(:is([padding="8"])) {padding: 8px;}
136
+ :host(:is([padding="12"])) {padding: 12px;}
137
+ :host(:is([padding="16"])) {padding: 16px;}
138
+ :host(:is([padding="20"])) {padding: 20px;}
139
+ :host(:is([padding="24"])) {padding: 24px;}
140
+ :host(:is([padding-x])) {padding-inline: 0;}
141
+ :host(:is([padding-x="4"])) {padding-inline: 4px;}
142
+ :host(:is([padding-x="8"])) {padding-inline: 8px;}
143
+ :host(:is([padding-x="12"])) {padding-inline: 12px;}
144
+ :host(:is([padding-x="16"])) {padding-inline: 16px;}
145
+ :host(:is([padding-x="20"])) {padding-inline: 20px;}
146
+ :host(:is([padding-x="24"])) {padding-inline: 24px;}
147
+ :host(:is([padding-y])) {padding-block: 0;}
148
+ :host(:is([padding-y="4"])) {padding-block: 4px;}
149
+ :host(:is([padding-y="8"])) {padding-block: 8px;}
150
+ :host(:is([padding-y="12"])) {padding-block: 12px;}
151
+ :host(:is([padding-y="16"])) {padding-block: 16px;}
152
+ :host(:is([padding-y="20"])) {padding-block: 20px;}
153
+ :host(:is([padding-y="24"])) {padding-block: 24px;}
154
+
155
+
108
156
  `;
109
157
  }