@shortfuse/materialdesignweb 0.7.6 → 0.9.0
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.
- package/README.md +87 -90
- package/bin/mdw-css.js +1 -1
- package/components/Badge.js +14 -7
- package/components/Body.js +3 -0
- package/components/BottomAppBar.js +4 -13
- package/components/BottomSheet.js +424 -0
- package/components/Box.js +20 -28
- package/components/Button.js +85 -79
- package/components/Button.md +9 -9
- package/components/Card.js +60 -72
- package/components/Checkbox.js +33 -42
- package/components/CheckboxIcon.js +11 -29
- package/components/Chip.js +13 -11
- package/components/Dialog.js +214 -394
- package/components/DialogActions.js +2 -2
- package/components/Display.js +55 -0
- package/components/Divider.js +3 -3
- package/components/Fab.js +83 -18
- package/components/FabContainer.js +48 -0
- package/components/FilterChip.js +35 -33
- package/components/Grid.js +176 -0
- package/components/Headline.js +5 -28
- package/components/Icon.js +61 -76
- package/components/IconButton.js +72 -126
- package/components/Input.js +859 -1
- package/components/InputChip.js +161 -0
- package/components/Label.js +3 -0
- package/components/List.js +4 -6
- package/components/ListItem.js +46 -30
- package/components/ListOption.js +86 -53
- package/components/Listbox.js +248 -0
- package/components/Menu.js +69 -528
- package/components/MenuItem.js +33 -36
- package/components/NavBar.js +49 -86
- package/components/NavDrawer.js +16 -15
- package/components/NavDrawerItem.js +4 -5
- package/components/NavItem.js +58 -41
- package/components/NavRail.js +30 -20
- package/components/NavRailItem.js +8 -3
- package/components/Page.js +105 -0
- package/components/Pane.js +11 -274
- package/components/Popup.js +29 -0
- package/components/Progress.js +24 -23
- package/components/Radio.js +40 -36
- package/components/RadioIcon.js +12 -16
- package/components/Ripple.js +13 -10
- package/components/Root.js +209 -0
- package/components/Scrim.js +87 -0
- package/components/Search.js +77 -0
- package/components/SegmentedButton.js +33 -45
- package/components/SegmentedButtonGroup.js +25 -13
- package/components/Select.js +10 -11
- package/components/Shape.js +5 -65
- package/components/SideSheet.js +308 -0
- package/components/Slider.js +108 -78
- package/components/Snackbar.js +26 -21
- package/components/SnackbarContainer.js +42 -0
- package/components/Surface.js +17 -12
- package/components/Switch.js +45 -24
- package/components/SwitchIcon.js +49 -39
- package/components/Tab.js +64 -43
- package/components/TabContent.js +5 -3
- package/components/TabList.js +62 -34
- package/components/TabPanel.js +11 -8
- package/components/Table.js +116 -0
- package/components/TextArea.js +54 -50
- package/components/Title.js +4 -9
- package/components/Tooltip.js +44 -22
- package/components/TopAppBar.js +68 -172
- package/constants/shapes.js +36 -0
- package/constants/typography.js +127 -0
- package/core/Composition.js +1164 -645
- package/core/CompositionAdapter.js +314 -0
- package/core/CustomElement.js +701 -286
- package/core/css.js +121 -15
- package/core/customTypes.js +157 -40
- package/core/dom.js +17 -11
- package/{utils → core}/jsonMergePatch.js +42 -18
- package/core/observe.js +343 -244
- package/core/optimizations.js +23 -0
- package/core/template.js +19 -56
- package/core/uid.js +13 -0
- package/dist/index.min.js +85 -184
- package/dist/index.min.js.map +4 -4
- package/dist/meta.json +1 -1
- package/dom/HTMLOptionsCollectionProxy.js +106 -0
- package/loaders/palette.js +13 -0
- package/loaders/theme.js +12 -0
- package/mixins/AriaReflectorMixin.js +53 -14
- package/mixins/AriaToolbarMixin.js +5 -3
- package/mixins/ControlMixin.js +92 -41
- package/mixins/DelegatesFocusMixin.js +54 -0
- package/mixins/DensityMixin.js +2 -3
- package/mixins/ElevationMixin.js +62 -0
- package/mixins/FlexableMixin.js +67 -39
- package/mixins/FormAssociatedMixin.js +71 -16
- package/mixins/HyperlinkMixin.js +66 -0
- package/mixins/InputMixin.js +205 -39
- package/mixins/KeyboardNavMixin.js +22 -7
- package/mixins/NavigationListenerMixin.js +33 -0
- package/mixins/PopupMixin.js +725 -0
- package/mixins/RTLObserverMixin.js +0 -1
- package/mixins/ResizeObserverMixin.js +16 -5
- package/mixins/RippleMixin.js +11 -10
- package/mixins/ScrollListenerMixin.js +42 -33
- package/mixins/SemiStickyMixin.js +97 -0
- package/mixins/ShapeMaskedMixin.js +117 -0
- package/mixins/ShapeMixin.js +17 -194
- package/mixins/StateMixin.js +80 -39
- package/mixins/TextFieldMixin.js +139 -183
- package/mixins/ThemableMixin.js +71 -161
- package/mixins/TooltipTriggerMixin.js +292 -366
- package/mixins/TouchTargetMixin.js +5 -4
- package/mixins/TypographyMixin.js +121 -0
- package/package.json +111 -71
- package/services/rtl.js +10 -0
- package/services/svgAlias.js +17 -0
- package/{theming/index.js → services/theme.js} +25 -175
- package/types/bin/mdw-css.d.ts +3 -0
- package/types/bin/mdw-css.d.ts.map +1 -0
- package/types/components/Badge.d.ts +39 -0
- package/types/components/Badge.d.ts.map +1 -0
- package/types/components/Body.d.ts +29 -0
- package/types/components/Body.d.ts.map +1 -0
- package/types/components/BottomAppBar.d.ts +73 -0
- package/types/components/BottomAppBar.d.ts.map +1 -0
- package/types/components/BottomSheet.d.ts +109 -0
- package/types/components/BottomSheet.d.ts.map +1 -0
- package/types/components/Box.d.ts +16 -0
- package/types/components/Box.d.ts.map +1 -0
- package/types/components/Button.d.ts +714 -0
- package/types/components/Button.d.ts.map +1 -0
- package/types/components/Card.d.ts +412 -0
- package/types/components/Card.d.ts.map +1 -0
- package/types/components/Checkbox.d.ts +205 -0
- package/types/components/Checkbox.d.ts.map +1 -0
- package/types/components/CheckboxIcon.d.ts +44 -0
- package/types/components/CheckboxIcon.d.ts.map +1 -0
- package/types/components/Chip.d.ts +1425 -0
- package/types/components/Chip.d.ts.map +1 -0
- package/types/components/Dialog.d.ts +286 -0
- package/types/components/Dialog.d.ts.map +1 -0
- package/types/components/DialogActions.d.ts +4 -0
- package/types/components/DialogActions.d.ts.map +1 -0
- package/types/components/Display.d.ts +45 -0
- package/types/components/Display.d.ts.map +1 -0
- package/types/components/Divider.d.ts +10 -0
- package/types/components/Divider.d.ts.map +1 -0
- package/types/components/Fab.d.ts +741 -0
- package/types/components/Fab.d.ts.map +1 -0
- package/types/components/FabContainer.d.ts +10 -0
- package/types/components/FabContainer.d.ts.map +1 -0
- package/types/components/FilterChip.d.ts +4283 -0
- package/types/components/FilterChip.d.ts.map +1 -0
- package/types/components/Grid.d.ts +37 -0
- package/types/components/Grid.d.ts.map +1 -0
- package/types/components/Headline.d.ts +47 -0
- package/types/components/Headline.d.ts.map +1 -0
- package/types/components/Icon.d.ts +103 -0
- package/types/components/Icon.d.ts.map +1 -0
- package/types/components/IconButton.d.ts +1486 -0
- package/types/components/IconButton.d.ts.map +1 -0
- package/types/components/Input.d.ts +51288 -0
- package/types/components/Input.d.ts.map +1 -0
- package/types/components/InputChip.d.ts +243 -0
- package/types/components/InputChip.d.ts.map +1 -0
- package/types/components/Label.d.ts +29 -0
- package/types/components/Label.d.ts.map +1 -0
- package/types/components/List.d.ts +31 -0
- package/types/components/List.d.ts.map +1 -0
- package/types/components/ListItem.d.ts +349 -0
- package/types/components/ListItem.d.ts.map +1 -0
- package/types/components/ListOption.d.ts +1493 -0
- package/types/components/ListOption.d.ts.map +1 -0
- package/types/components/Listbox.d.ts +12012 -0
- package/types/components/Listbox.d.ts.map +1 -0
- package/types/components/Menu.d.ts +119 -0
- package/types/components/Menu.d.ts.map +1 -0
- package/types/components/MenuItem.d.ts +3109 -0
- package/types/components/MenuItem.d.ts.map +1 -0
- package/types/components/NavBar.d.ts +18 -0
- package/types/components/NavBar.d.ts.map +1 -0
- package/types/components/NavBarItem.d.ts +186 -0
- package/types/components/NavBarItem.d.ts.map +1 -0
- package/types/components/NavDrawer.d.ts +108 -0
- package/types/components/NavDrawer.d.ts.map +1 -0
- package/types/components/NavDrawerItem.d.ts +186 -0
- package/types/components/NavDrawerItem.d.ts.map +1 -0
- package/types/components/NavItem.d.ts +190 -0
- package/types/components/NavItem.d.ts.map +1 -0
- package/types/components/NavRail.d.ts +109 -0
- package/types/components/NavRail.d.ts.map +1 -0
- package/types/components/NavRailItem.d.ts +186 -0
- package/types/components/NavRailItem.d.ts.map +1 -0
- package/types/components/Page.d.ts +24 -0
- package/types/components/Page.d.ts.map +1 -0
- package/types/components/Pane.d.ts +44 -0
- package/types/components/Pane.d.ts.map +1 -0
- package/types/components/Popup.d.ts +76 -0
- package/types/components/Popup.d.ts.map +1 -0
- package/types/components/Progress.d.ts +19 -0
- package/types/components/Progress.d.ts.map +1 -0
- package/types/components/Radio.d.ts +199 -0
- package/types/components/Radio.d.ts.map +1 -0
- package/types/components/RadioIcon.d.ts +46 -0
- package/types/components/RadioIcon.d.ts.map +1 -0
- package/types/components/Ripple.d.ts +34 -0
- package/types/components/Ripple.d.ts.map +1 -0
- package/types/components/Root.d.ts +68 -0
- package/types/components/Root.d.ts.map +1 -0
- package/types/components/Scrim.d.ts +6 -0
- package/types/components/Scrim.d.ts.map +1 -0
- package/types/components/Search.d.ts +16 -0
- package/types/components/Search.d.ts.map +1 -0
- package/types/components/SegmentedButton.d.ts +718 -0
- package/types/components/SegmentedButton.d.ts.map +1 -0
- package/types/components/SegmentedButtonGroup.d.ts +44 -0
- package/types/components/SegmentedButtonGroup.d.ts.map +1 -0
- package/types/components/Select.d.ts +1361 -0
- package/types/components/Select.d.ts.map +1 -0
- package/types/components/Shape.d.ts +10 -0
- package/types/components/Shape.d.ts.map +1 -0
- package/types/components/SideSheet.d.ts +106 -0
- package/types/components/SideSheet.d.ts.map +1 -0
- package/types/components/Slider.d.ts +382 -0
- package/types/components/Slider.d.ts.map +1 -0
- package/types/components/Snackbar.d.ts +65 -0
- package/types/components/Snackbar.d.ts.map +1 -0
- package/types/components/SnackbarContainer.d.ts +6 -0
- package/types/components/SnackbarContainer.d.ts.map +1 -0
- package/types/components/Surface.d.ts +45 -0
- package/types/components/Surface.d.ts.map +1 -0
- package/types/components/Switch.d.ts +183 -0
- package/types/components/Switch.d.ts.map +1 -0
- package/types/components/SwitchIcon.d.ts +169 -0
- package/types/components/SwitchIcon.d.ts.map +1 -0
- package/types/components/Tab.d.ts +879 -0
- package/types/components/Tab.d.ts.map +1 -0
- package/types/components/TabContent.d.ts +122 -0
- package/types/components/TabContent.d.ts.map +1 -0
- package/types/components/TabList.d.ts +6266 -0
- package/types/components/TabList.d.ts.map +1 -0
- package/types/components/TabPanel.d.ts +28 -0
- package/types/components/TabPanel.d.ts.map +1 -0
- package/types/components/Table.d.ts +2 -0
- package/types/components/Table.d.ts.map +1 -0
- package/types/components/TextArea.d.ts +1394 -0
- package/types/components/TextArea.d.ts.map +1 -0
- package/types/components/Title.d.ts +47 -0
- package/types/components/Title.d.ts.map +1 -0
- package/types/components/Tooltip.d.ts +49 -0
- package/types/components/Tooltip.d.ts.map +1 -0
- package/types/components/TopAppBar.d.ts +130 -0
- package/types/components/TopAppBar.d.ts.map +1 -0
- package/types/constants/colorKeywords.d.ts +2 -0
- package/types/constants/colorKeywords.d.ts.map +1 -0
- package/types/constants/shapes.d.ts +38 -0
- package/types/constants/shapes.d.ts.map +1 -0
- package/types/constants/typography.d.ts +212 -0
- package/types/constants/typography.d.ts.map +1 -0
- package/types/core/Composition.d.ts +252 -0
- package/types/core/Composition.d.ts.map +1 -0
- package/types/core/CompositionAdapter.d.ts +92 -0
- package/types/core/CompositionAdapter.d.ts.map +1 -0
- package/types/core/CustomElement.d.ts +302 -0
- package/types/core/CustomElement.d.ts.map +1 -0
- package/types/core/css.d.ts +44 -0
- package/types/core/css.d.ts.map +1 -0
- package/types/core/customTypes.d.ts +26 -0
- package/types/core/customTypes.d.ts.map +1 -0
- package/types/core/dom.d.ts +32 -0
- package/types/core/dom.d.ts.map +1 -0
- package/types/core/jsonMergePatch.d.ts +31 -0
- package/types/core/jsonMergePatch.d.ts.map +1 -0
- package/types/core/observe.d.ts +113 -0
- package/types/core/observe.d.ts.map +1 -0
- package/types/core/optimizations.d.ts +7 -0
- package/types/core/optimizations.d.ts.map +1 -0
- package/types/core/template.d.ts +47 -0
- package/types/core/template.d.ts.map +1 -0
- package/types/core/uid.d.ts +6 -0
- package/types/core/uid.d.ts.map +1 -0
- package/types/dom/HTMLOptionsCollectionProxy.d.ts +18 -0
- package/types/dom/HTMLOptionsCollectionProxy.d.ts.map +1 -0
- package/types/index.d.ts +88 -0
- package/types/index.d.ts.map +1 -0
- package/types/loaders/palette.d.ts +2 -0
- package/types/loaders/palette.d.ts.map +1 -0
- package/types/loaders/theme.d.ts +2 -0
- package/types/loaders/theme.d.ts.map +1 -0
- package/types/mixins/AriaReflectorMixin.d.ts +23 -0
- package/types/mixins/AriaReflectorMixin.d.ts.map +1 -0
- package/types/mixins/AriaToolbarMixin.d.ts +32 -0
- package/types/mixins/AriaToolbarMixin.d.ts.map +1 -0
- package/types/mixins/ControlMixin.d.ts +124 -0
- package/types/mixins/ControlMixin.d.ts.map +1 -0
- package/types/mixins/DelegatesFocusMixin.d.ts +5 -0
- package/types/mixins/DelegatesFocusMixin.d.ts.map +1 -0
- package/types/mixins/DensityMixin.d.ts +5 -0
- package/types/mixins/DensityMixin.d.ts.map +1 -0
- package/types/mixins/ElevationMixin.d.ts +33 -0
- package/types/mixins/ElevationMixin.d.ts.map +1 -0
- package/types/mixins/FlexableMixin.d.ts +13 -0
- package/types/mixins/FlexableMixin.d.ts.map +1 -0
- package/types/mixins/FormAssociatedMixin.d.ts +122 -0
- package/types/mixins/FormAssociatedMixin.d.ts.map +1 -0
- package/types/mixins/HyperlinkMixin.d.ts +22 -0
- package/types/mixins/HyperlinkMixin.d.ts.map +1 -0
- package/types/mixins/InputMixin.d.ts +179 -0
- package/types/mixins/InputMixin.d.ts.map +1 -0
- package/types/mixins/KeyboardNavMixin.d.ts +47 -0
- package/types/mixins/KeyboardNavMixin.d.ts.map +1 -0
- package/types/mixins/NavigationListenerMixin.d.ts +8 -0
- package/types/mixins/NavigationListenerMixin.d.ts.map +1 -0
- package/types/mixins/PopupMixin.d.ts +82 -0
- package/types/mixins/PopupMixin.d.ts.map +1 -0
- package/types/mixins/RTLObserverMixin.d.ts +7 -0
- package/types/mixins/RTLObserverMixin.d.ts.map +1 -0
- package/types/mixins/ResizeObserverMixin.d.ts +12 -0
- package/types/mixins/ResizeObserverMixin.d.ts.map +1 -0
- package/types/mixins/RippleMixin.d.ts +92 -0
- package/types/mixins/RippleMixin.d.ts.map +1 -0
- package/types/mixins/ScrollListenerMixin.d.ts +41 -0
- package/types/mixins/ScrollListenerMixin.d.ts.map +1 -0
- package/types/mixins/SemiStickyMixin.d.ts +50 -0
- package/types/mixins/SemiStickyMixin.d.ts.map +1 -0
- package/types/mixins/ShapeMaskedMixin.d.ts +9 -0
- package/types/mixins/ShapeMaskedMixin.d.ts.map +1 -0
- package/types/mixins/ShapeMixin.d.ts +38 -0
- package/types/mixins/ShapeMixin.d.ts.map +1 -0
- package/types/mixins/StateMixin.d.ts +27 -0
- package/types/mixins/StateMixin.d.ts.map +1 -0
- package/types/mixins/TextFieldMixin.d.ts +1354 -0
- package/types/mixins/TextFieldMixin.d.ts.map +1 -0
- package/types/mixins/ThemableMixin.d.ts +9 -0
- package/types/mixins/ThemableMixin.d.ts.map +1 -0
- package/types/mixins/TooltipTriggerMixin.d.ts +106 -0
- package/types/mixins/TooltipTriggerMixin.d.ts.map +1 -0
- package/types/mixins/TouchTargetMixin.d.ts +3 -0
- package/types/mixins/TouchTargetMixin.d.ts.map +1 -0
- package/types/mixins/TypographyMixin.d.ts +17 -0
- package/types/mixins/TypographyMixin.d.ts.map +1 -0
- package/types/services/rtl.d.ts +3 -0
- package/types/services/rtl.d.ts.map +1 -0
- package/types/services/svgAlias.d.ts +13 -0
- package/types/services/svgAlias.d.ts.map +1 -0
- package/types/services/theme.d.ts +45 -0
- package/types/services/theme.d.ts.map +1 -0
- package/types/utils/cli.d.ts +3 -0
- package/types/utils/cli.d.ts.map +1 -0
- package/types/utils/function.d.ts +3 -0
- package/types/utils/function.d.ts.map +1 -0
- package/types/utils/jsx-runtime.d.ts +20 -0
- package/types/utils/jsx-runtime.d.ts.map +1 -0
- package/types/utils/material-color/blend.d.ts +34 -0
- package/types/utils/material-color/blend.d.ts.map +1 -0
- package/types/utils/material-color/hct/Cam16.d.ts +142 -0
- package/types/utils/material-color/hct/Cam16.d.ts.map +1 -0
- package/types/utils/material-color/hct/Hct.d.ts +93 -0
- package/types/utils/material-color/hct/Hct.d.ts.map +1 -0
- package/types/utils/material-color/hct/ViewingConditions.d.ts +69 -0
- package/types/utils/material-color/hct/ViewingConditions.d.ts.map +1 -0
- package/types/utils/material-color/hct/hctSolver.d.ts +30 -0
- package/types/utils/material-color/hct/hctSolver.d.ts.map +1 -0
- package/types/utils/material-color/helper.d.ts +8 -0
- package/types/utils/material-color/helper.d.ts.map +1 -0
- package/types/utils/material-color/palettes/CorePalette.d.ts +75 -0
- package/types/utils/material-color/palettes/CorePalette.d.ts.map +1 -0
- package/types/utils/material-color/palettes/TonalPalette.d.ts +38 -0
- package/types/utils/material-color/palettes/TonalPalette.d.ts.map +1 -0
- package/types/utils/material-color/scheme/Scheme.d.ts +264 -0
- package/types/utils/material-color/scheme/Scheme.d.ts.map +1 -0
- package/types/utils/material-color/utils/color.d.ts +172 -0
- package/types/utils/material-color/utils/color.d.ts.map +1 -0
- package/types/utils/material-color/utils/math.d.ts +94 -0
- package/types/utils/material-color/utils/math.d.ts.map +1 -0
- package/types/utils/pixelmatch.d.ts +22 -0
- package/types/utils/pixelmatch.d.ts.map +1 -0
- package/types/utils/popup.d.ts +106 -0
- package/types/utils/popup.d.ts.map +1 -0
- package/types/utils/searchParams.d.ts +3 -0
- package/types/utils/searchParams.d.ts.map +1 -0
- package/types/utils/svg.d.ts +7 -0
- package/types/utils/svg.d.ts.map +1 -0
- package/utils/{hct → material-color}/blend.js +8 -10
- package/utils/{hct → material-color/hct}/Cam16.js +196 -69
- package/utils/{hct → material-color/hct}/Hct.js +61 -19
- package/utils/{hct → material-color/hct}/ViewingConditions.js +3 -3
- package/utils/{hct → material-color/hct}/hctSolver.js +9 -16
- package/utils/{hct → material-color}/helper.js +11 -18
- package/utils/{hct → material-color/palettes}/CorePalette.js +79 -19
- package/utils/{hct → material-color/palettes}/TonalPalette.js +12 -4
- package/utils/material-color/scheme/Scheme.js +376 -0
- package/utils/{hct/colorUtils.js → material-color/utils/color.js} +61 -1
- package/utils/pixelmatch.js +360 -0
- package/utils/popup.js +127 -30
- package/utils/searchParams.js +19 -0
- package/components/ExtendedFab.js +0 -36
- package/components/Layout.js +0 -35
- package/components/ListSelect.js +0 -220
- package/components/Nav.js +0 -40
- package/components/Option.js +0 -91
- package/core/ICustomElement.d.ts +0 -291
- package/core/ICustomElement.js +0 -1
- package/core/identify.js +0 -40
- package/core/typings.d.ts +0 -136
- package/core/typings.js +0 -1
- package/mixins/SurfaceMixin.js +0 -181
- package/theming/loader.js +0 -22
- package/utils/hct/Scheme.js +0 -587
- /package/{utils/color_keywords.js → constants/colorKeywords.js} +0 -0
- /package/utils/{hct/mathUtils.js → material-color/utils/math.js} +0 -0
package/mixins/ShapeMixin.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export default function ShapeMixin(Base) {
|
|
5
5
|
return Base
|
|
6
|
-
.extend()
|
|
7
6
|
.observe({
|
|
8
7
|
shapeTop: 'boolean',
|
|
9
8
|
shapeBottom: 'boolean',
|
|
@@ -12,36 +11,34 @@ export default function ShapeMixin(Base) {
|
|
|
12
11
|
shapeStyle: 'string',
|
|
13
12
|
outlined: 'boolean',
|
|
14
13
|
})
|
|
15
|
-
.html
|
|
16
|
-
<div id=
|
|
17
|
-
<div id=outline _if={outlined} class=outline disabled={disabledState} focused={focusedState} pressed={pressedState} hovered={hoveredState}>
|
|
18
|
-
<div id=outline-left class="outline-section outline-left"></div>
|
|
19
|
-
<div id=outline-right class="outline-section outline-right"></div>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
14
|
+
.html`
|
|
15
|
+
<div id=outline mdw-if={outlined} class=outline disabled={disabledState} focused={focusedState} pressed={pressedState} hovered={hoveredState}></div>
|
|
22
16
|
`
|
|
23
17
|
.css`
|
|
24
18
|
:host {
|
|
25
19
|
--mdw-shape__size: 0px;
|
|
26
|
-
--mdw-
|
|
27
|
-
--mdw-
|
|
20
|
+
--mdw-shape__ltr: calc(0.5 * var(--mdw-dir, 1) + 0.5); /* 1 if LTR, 0 if RTL */
|
|
21
|
+
--mdw-shape__rtl: calc(-0.5 * var(--mdw-dir, 1) + 0.5); /* 0 if LTR, 1 if RTL */
|
|
22
|
+
|
|
23
|
+
/** By default, fallback to border-radius */
|
|
24
|
+
--mdw-shape__inline-start-deg: calc(var(--mdw-dir, 1) * -90deg);
|
|
25
|
+
|
|
28
26
|
--mdw-shape__size__top-start-size: var(--mdw-shape__size);
|
|
29
27
|
--mdw-shape__size__top-end-size: var(--mdw-shape__size);
|
|
30
28
|
--mdw-shape__size__bottom-start-size: var(--mdw-shape__size);
|
|
31
29
|
--mdw-shape__size__bottom-end-size: var(--mdw-shape__size);
|
|
32
|
-
|
|
33
30
|
/* (1/2n + 1/2)L + (-1/2n + 1/2)R */
|
|
34
|
-
|
|
35
|
-
--mdw-shape__rtl: calc(-0.5 * var(--mdw-dir, 1) + 0.5); /* 0 if LTR, 1 if RTL */
|
|
31
|
+
|
|
36
32
|
--mdw-shape__size__top-left-size: calc((var(--mdw-shape__ltr) * var(--mdw-shape__size__top-start-size)) + (var(--mdw-shape__rtl) * var(--mdw-shape__size__top-end-size)));
|
|
37
33
|
--mdw-shape__size__top-right-size: calc((var(--mdw-shape__rtl) * var(--mdw-shape__size__top-start-size)) + (var(--mdw-shape__ltr) * var(--mdw-shape__size__top-end-size)));
|
|
38
34
|
--mdw-shape__size__bottom-left-size: calc((var(--mdw-shape__ltr) * var(--mdw-shape__size__bottom-start-size)) + (var(--mdw-shape__rtl) * var(--mdw-shape__size__bottom-end-size)));
|
|
39
35
|
--mdw-shape__size__bottom-right-size: calc((var(--mdw-shape__rtl) * var(--mdw-shape__size__bottom-start-size)) + (var(--mdw-shape__ltr) * var(--mdw-shape__size__bottom-end-size)));
|
|
40
|
-
|
|
41
|
-
/** By default, fallback to border-radius */
|
|
42
|
-
--mdw-shape__rounded: 1;
|
|
43
|
-
--mdw-shape__inline-start-deg: calc(var(--mdw-dir, 1) * -90deg);
|
|
44
36
|
z-index: 0;
|
|
37
|
+
|
|
38
|
+
border-start-start-radius: calc(var(--mdw-shape__size__top-start-size));
|
|
39
|
+
border-start-end-radius: calc(var(--mdw-shape__size__top-end-size));
|
|
40
|
+
border-end-start-radius: calc(var(--mdw-shape__size__bottom-start-size));
|
|
41
|
+
border-end-end-radius: calc(var(--mdw-shape__size__bottom-end-size));
|
|
45
42
|
}
|
|
46
43
|
|
|
47
44
|
:host([shape-style="none"]) {
|
|
@@ -79,90 +76,31 @@ export default function ShapeMixin(Base) {
|
|
|
79
76
|
:host([shape-top]) {
|
|
80
77
|
--mdw-shape__size__bottom-start-size: 0px;
|
|
81
78
|
--mdw-shape__size__bottom-end-size: 0px;
|
|
82
|
-
--mdw-shape__mask: linear-gradient(transparent 50%, black 50%);
|
|
83
|
-
|
|
84
79
|
}
|
|
85
80
|
|
|
86
81
|
:host([shape-bottom]) {
|
|
87
82
|
--mdw-shape__size__top-start-size: 0px;
|
|
88
83
|
--mdw-shape__size__top-end-size: 0px;
|
|
89
|
-
--mdw-shape__mask: linear-gradient(black 50%, transparent 50%);
|
|
90
84
|
}
|
|
91
85
|
|
|
92
86
|
:host([shape-start]) {
|
|
93
87
|
--mdw-shape__size__top-end-size: 0px;
|
|
94
88
|
--mdw-shape__size__bottom-end-size: 0px;
|
|
95
|
-
--mdw-shape__mask: linear-gradient(var(--mdw-shape__inline-start-deg), black 50%, transparent 50%);
|
|
96
89
|
}
|
|
97
90
|
|
|
98
91
|
:host([shape-end]) {
|
|
99
92
|
--mdw-shape__size__top-start-size: 0px;
|
|
100
93
|
--mdw-shape__size__bottom-start-size: 0px;
|
|
101
|
-
--mdw-shape__mask: linear-gradient(var(--mdw-shape__inline-start-deg), transparent 50%, black 50%);
|
|
102
94
|
}
|
|
103
95
|
|
|
104
|
-
@supports(-webkit-mask-box-image: none) {
|
|
105
|
-
:host {
|
|
106
|
-
/* Inherit all the way up to :root */
|
|
107
|
-
--mdw-shape__rounded: inherit;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
`
|
|
111
|
-
.css`
|
|
112
|
-
.shape {
|
|
113
|
-
position: absolute;
|
|
114
|
-
inset: 0;
|
|
115
|
-
|
|
116
|
-
overflow: hidden;
|
|
117
|
-
|
|
118
|
-
z-index: -1;
|
|
119
|
-
|
|
120
|
-
background-color: var(--mdw-shape__bg, transparent);
|
|
121
|
-
|
|
122
|
-
border-start-start-radius: calc(var(--mdw-shape__rounded) * var(--mdw-shape__size__top-start-size));
|
|
123
|
-
border-start-end-radius: calc(var(--mdw-shape__rounded) * var(--mdw-shape__size__top-end-size));
|
|
124
|
-
border-end-start-radius: calc(var(--mdw-shape__rounded) * var(--mdw-shape__size__bottom-start-size));
|
|
125
|
-
border-end-end-radius: calc(var(--mdw-shape__rounded) * var(--mdw-shape__size__bottom-end-size));
|
|
126
|
-
|
|
127
|
-
transition-delay: 1ms;
|
|
128
|
-
transition-duration: 200ms;
|
|
129
|
-
transition-property: background-color, color;
|
|
130
|
-
will-change: background-color, color;
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.shape[outlined] {
|
|
135
|
-
background-color: transparent;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.shape[color] {
|
|
139
|
-
background-color: rgb(var(--mdw-bg));
|
|
140
|
-
color: rgb(var(--mdw-ink));
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.shape:is([color="none"], [color="transparent"]) {
|
|
144
|
-
background-color: transparent;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
@supports(-webkit-mask-box-image: none) {
|
|
148
|
-
.shape {
|
|
149
|
-
-webkit-mask-box-image: var(--mdw-shape__mask-border-source)
|
|
150
|
-
8 fill /
|
|
151
|
-
var(--mdw-shape__size)
|
|
152
|
-
stretch;
|
|
153
|
-
|
|
154
|
-
-webkit-mask: var(--mdw-shape__mask);
|
|
155
|
-
|
|
156
|
-
transition-duration: 200ms, 200ms, 200ms;
|
|
157
|
-
transition-property: background-color, color, -webkit-mask-box-image-width;
|
|
158
|
-
will-change: background-color, color, -webkit-mask-box-image;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
96
|
`
|
|
162
97
|
.css`
|
|
163
98
|
.outline {
|
|
164
99
|
position: absolute;
|
|
165
100
|
inset: 0;
|
|
101
|
+
|
|
102
|
+
border-style: solid;
|
|
103
|
+
border-width: 1px;
|
|
166
104
|
|
|
167
105
|
pointer-events: none;
|
|
168
106
|
|
|
@@ -182,120 +120,5 @@ export default function ShapeMixin(Base) {
|
|
|
182
120
|
color: rgba(var(--mdw-color__on-surface), 0.12);
|
|
183
121
|
}
|
|
184
122
|
|
|
185
|
-
.outline::before {
|
|
186
|
-
content: '';
|
|
187
|
-
|
|
188
|
-
position: absolute;
|
|
189
|
-
inset: 0;
|
|
190
|
-
|
|
191
|
-
border-style: solid;
|
|
192
|
-
border-width: 1px;
|
|
193
|
-
|
|
194
|
-
border-radius: inherit;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
@supports(-webkit-mask-box-image: none) {
|
|
198
|
-
.outline::before {
|
|
199
|
-
content: none;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.outline::after {
|
|
203
|
-
content: '';
|
|
204
|
-
|
|
205
|
-
position: absolute;
|
|
206
|
-
inset: 0;
|
|
207
|
-
|
|
208
|
-
-webkit-mask-box-image: var(--mdw-shape__mask-image__edges)
|
|
209
|
-
8 fill /
|
|
210
|
-
auto
|
|
211
|
-
stretch;
|
|
212
|
-
|
|
213
|
-
background-color: currentColor;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.outline-section {
|
|
217
|
-
position: absolute;
|
|
218
|
-
inset: 0;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.outline-section::before,
|
|
222
|
-
.outline-section::after {
|
|
223
|
-
content: "";
|
|
224
|
-
|
|
225
|
-
position: absolute;
|
|
226
|
-
|
|
227
|
-
max-block-size: 50%;
|
|
228
|
-
max-inline-size: 50%;
|
|
229
|
-
|
|
230
|
-
-webkit-mask-repeat: no-repeat;
|
|
231
|
-
-webkit-mask-size: contain;
|
|
232
|
-
|
|
233
|
-
background-color: currentColor;
|
|
234
|
-
|
|
235
|
-
transition-duration: 200ms;
|
|
236
|
-
/* stylelint-disable-next-line liberty/use-logical-spec */
|
|
237
|
-
transition-property: width, height;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.outline-left::before {
|
|
241
|
-
/* stylelint-disable-next-line liberty/use-logical-spec */
|
|
242
|
-
left: calc(-1px * var(--mdw-shape__convex));
|
|
243
|
-
inset-block-start: calc(-1px * var(--mdw-shape__convex));
|
|
244
|
-
|
|
245
|
-
block-size: calc(var(--mdw-shape__size__top-left-size));
|
|
246
|
-
inline-size: calc(var(--mdw-shape__size__top-left-size));
|
|
247
|
-
/* stylelint-disable-next-line liberty/use-logical-spec */
|
|
248
|
-
padding-right: calc(2px * var(--mdw-shape__convex));
|
|
249
|
-
padding-block-end: calc(2px * var(--mdw-shape__convex));
|
|
250
|
-
|
|
251
|
-
-webkit-mask-image: var(--mdw-shape__mask-image__top-left);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.outline-left::after {
|
|
255
|
-
/* stylelint-disable-next-line liberty/use-logical-spec */
|
|
256
|
-
left: calc(-1px * var(--mdw-shape__convex));
|
|
257
|
-
inset-block-end: calc(-1px * var(--mdw-shape__convex));
|
|
258
|
-
|
|
259
|
-
block-size: var(--mdw-shape__size__bottom-left-size);
|
|
260
|
-
inline-size: var(--mdw-shape__size__bottom-left-size);
|
|
261
|
-
/* stylelint-disable-next-line liberty/use-logical-spec */
|
|
262
|
-
padding-right: calc(2px * var(--mdw-shape__convex));
|
|
263
|
-
padding-block-start: calc(2px * var(--mdw-shape__convex));
|
|
264
|
-
|
|
265
|
-
-webkit-mask-image: var(--mdw-shape__mask-image__bottom-left);
|
|
266
|
-
-webkit-mask-position-y: 100%;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.outline-right::before {
|
|
270
|
-
/* stylelint-disable-next-line liberty/use-logical-spec */
|
|
271
|
-
right: calc(-1px * var(--mdw-shape__convex));
|
|
272
|
-
inset-block-start: calc(-1px * var(--mdw-shape__convex));
|
|
273
|
-
|
|
274
|
-
block-size: var(--mdw-shape__size__top-right-size);
|
|
275
|
-
inline-size: var(--mdw-shape__size__top-right-size);
|
|
276
|
-
/* stylelint-disable-next-line liberty/use-logical-spec */
|
|
277
|
-
padding-left: calc(2px * var(--mdw-shape__convex));
|
|
278
|
-
padding-block-end: calc(2px * var(--mdw-shape__convex));
|
|
279
|
-
|
|
280
|
-
-webkit-mask-image: var(--mdw-shape__mask-image__top-right);
|
|
281
|
-
-webkit-mask-position-x: 100%;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.outline-right::after {
|
|
285
|
-
/* stylelint-disable-next-line liberty/use-logical-spec */
|
|
286
|
-
right: calc(-1px * var(--mdw-shape__convex));
|
|
287
|
-
inset-block-end: calc(-1px * var(--mdw-shape__convex));
|
|
288
|
-
|
|
289
|
-
block-size: var(--mdw-shape__size__bottom-right-size);
|
|
290
|
-
inline-size: var(--mdw-shape__size__bottom-right-size);
|
|
291
|
-
/* stylelint-disable-next-line liberty/use-logical-spec */
|
|
292
|
-
padding-left: calc(2px * var(--mdw-shape__convex));
|
|
293
|
-
padding-block-start: calc(2px * var(--mdw-shape__convex));
|
|
294
|
-
|
|
295
|
-
-webkit-mask-image: var(--mdw-shape__mask-image__bottom-right);
|
|
296
|
-
-webkit-mask-position-x: 100%;
|
|
297
|
-
-webkit-mask-position-y: 100%;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
123
|
`;
|
|
301
124
|
}
|
package/mixins/StateMixin.js
CHANGED
|
@@ -7,94 +7,118 @@ let lastInteractionWasTouch = window?.matchMedia?.('(any-pointer: coarse)').matc
|
|
|
7
7
|
*/
|
|
8
8
|
export default function StateMixin(Base) {
|
|
9
9
|
return Base
|
|
10
|
-
.extend()
|
|
11
10
|
.observe({
|
|
12
11
|
disabled: 'boolean',
|
|
12
|
+
/** Force focus state (independent of document) */
|
|
13
|
+
focused: 'boolean',
|
|
14
|
+
/** Force hover state (independent of interaction) */
|
|
15
|
+
hovered: 'boolean',
|
|
16
|
+
/** Force pressed state (independent of interaction) */
|
|
17
|
+
pressed: 'boolean',
|
|
13
18
|
_lastInteraction: {
|
|
14
19
|
/** @type {'mouse'|'touch'|'key'|'pen'|null} */
|
|
15
20
|
value: null,
|
|
16
21
|
},
|
|
17
22
|
_hovered: 'boolean',
|
|
18
23
|
_focused: 'boolean',
|
|
19
|
-
|
|
24
|
+
/** True if focus was synthetic */
|
|
25
|
+
_focusedSynthetic: 'boolean',
|
|
26
|
+
_keyPressed: 'boolean',
|
|
27
|
+
/** True if key was released this event loop. (Used to ignore clicks) */
|
|
28
|
+
_keyReleased: 'boolean',
|
|
29
|
+
_pointerPressed: 'boolean',
|
|
20
30
|
stateLayer: 'boolean',
|
|
21
31
|
})
|
|
22
32
|
.observe({
|
|
23
33
|
disabledState({ disabled }) { return disabled; },
|
|
24
|
-
hoveredState({ _hovered }) { return _hovered; },
|
|
25
|
-
focusedState({ _focused }) { return _focused; },
|
|
26
|
-
pressedState({
|
|
34
|
+
hoveredState({ _hovered, hovered }) { return _hovered || hovered; },
|
|
35
|
+
focusedState({ _focused, focused }) { return _focused || focused; },
|
|
36
|
+
pressedState({ _keyPressed, _pointerPressed, pressed }) { return _keyPressed || _pointerPressed || pressed; },
|
|
27
37
|
touchedState({ _lastInteraction }) {
|
|
28
38
|
return _lastInteraction === 'touch';
|
|
29
39
|
},
|
|
40
|
+
pointedState({ _lastInteraction }) {
|
|
41
|
+
return _lastInteraction === 'mouse' || _lastInteraction === 'pen';
|
|
42
|
+
},
|
|
30
43
|
})
|
|
31
44
|
.define({
|
|
45
|
+
/** @return {HTMLElement} */
|
|
32
46
|
stateTargetElement() { return this; },
|
|
33
47
|
})
|
|
34
|
-
.html
|
|
35
|
-
<div id=state
|
|
48
|
+
.html`
|
|
49
|
+
<div id=state mdw-if={stateLayer}
|
|
36
50
|
disabled={disabledState}
|
|
37
51
|
focused={focusedState}
|
|
38
52
|
hovered={hoveredState}
|
|
39
53
|
pressed={pressedState}
|
|
40
54
|
interaction={_lastInteraction}
|
|
41
55
|
touched={touchedState}
|
|
56
|
+
pointed={pointedState}
|
|
42
57
|
aria-hidden=true></div>
|
|
43
58
|
`
|
|
44
59
|
.events({
|
|
45
60
|
pointerenter(event) {
|
|
61
|
+
if (!event.isTrusted) return;
|
|
46
62
|
if (!event.isPrimary) return;
|
|
47
|
-
this.
|
|
63
|
+
this._pointerPressed = this.stateTargetElement.matches(':active');
|
|
48
64
|
if (event.pointerType === 'touch') return;
|
|
49
65
|
this._hovered = true;
|
|
50
|
-
// Firefox lags a frame before reporting :hover
|
|
51
|
-
// requestAnimationFrame(() => {
|
|
52
|
-
// this._hovered = this.stateTargetElement.matches(':hover');
|
|
53
|
-
// });
|
|
54
66
|
},
|
|
55
67
|
'~pointerdown'(event) {
|
|
68
|
+
if (!event.isTrusted) return;
|
|
56
69
|
if (!event.isPrimary) return;
|
|
57
70
|
this._lastInteraction = /** @type {'touch'|'mouse'|'pen'} */ (event.pointerType);
|
|
58
|
-
this.
|
|
71
|
+
this._pointerPressed = true;
|
|
59
72
|
},
|
|
60
73
|
'~pointerup'(event) {
|
|
74
|
+
if (!event.isTrusted) return;
|
|
61
75
|
if (!event.isPrimary) return;
|
|
62
76
|
this._lastInteraction = /** @type {'touch'|'mouse'|'pen'} */ (event.pointerType);
|
|
63
|
-
this.
|
|
77
|
+
this._pointerPressed = false;
|
|
64
78
|
},
|
|
65
|
-
pointercancel(
|
|
66
|
-
if (!
|
|
67
|
-
|
|
79
|
+
pointercancel(event) {
|
|
80
|
+
if (!event.isTrusted) return;
|
|
81
|
+
if (!event.isPrimary) return;
|
|
82
|
+
this._pointerPressed = this.stateTargetElement.matches(':active');
|
|
68
83
|
},
|
|
69
84
|
pointerleave(event) {
|
|
85
|
+
if (!event.isTrusted) return;
|
|
70
86
|
if (!event.isPrimary) return;
|
|
71
|
-
this.
|
|
87
|
+
this._pointerPressed = false;
|
|
72
88
|
this._hovered = false;
|
|
73
89
|
},
|
|
74
|
-
'~keydown'(
|
|
90
|
+
'~keydown'(event) {
|
|
91
|
+
if (!event.isTrusted) return;
|
|
75
92
|
this._lastInteraction = 'key';
|
|
76
|
-
if (
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
this._pressed = this.stateTargetElement.matches(':active');
|
|
80
|
-
// console.debug('pressed? after one keydown frame', this._pressed);
|
|
81
|
-
});
|
|
93
|
+
if (event.repeat) return;
|
|
94
|
+
if (event.key !== ' ') return;
|
|
95
|
+
this._keyPressed = true;
|
|
82
96
|
},
|
|
83
|
-
'~keyup'() {
|
|
97
|
+
'~keyup'(event) {
|
|
98
|
+
if (!event.isTrusted) return;
|
|
84
99
|
this._lastInteraction = 'key';
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
100
|
+
if (event.key !== ' ') return;
|
|
101
|
+
this._keyPressed = false;
|
|
102
|
+
this._keyReleased = true;
|
|
103
|
+
setTimeout(() => {
|
|
104
|
+
this._keyReleased = false;
|
|
89
105
|
});
|
|
90
106
|
},
|
|
91
|
-
blur() {
|
|
107
|
+
blur(event) {
|
|
108
|
+
if (!event.isTrusted) return;
|
|
92
109
|
this._focused = false;
|
|
110
|
+
this._focusedSynthetic = false;
|
|
111
|
+
this._keyPressed = false;
|
|
112
|
+
this._pointerPressed = false;
|
|
93
113
|
if (!this._lastInteraction) return;
|
|
94
114
|
lastInteractionWasTouch = (this._lastInteraction === 'touch');
|
|
95
|
-
|
|
115
|
+
this._lastInteraction = null;
|
|
96
116
|
},
|
|
97
|
-
focus() {
|
|
117
|
+
focus(event) {
|
|
118
|
+
if (!event.isTrusted) return;
|
|
119
|
+
this._focusedSynthetic = 'sourceCapabilities' in event
|
|
120
|
+
? !event.sourceCapabilities
|
|
121
|
+
: (this._lastInteraction === null && !event.relatedTarget);
|
|
98
122
|
this._focused = true;
|
|
99
123
|
// Element was focused without a mouse or touch event (keyboard or programmatic)
|
|
100
124
|
if (!this._lastInteraction && lastInteractionWasTouch) {
|
|
@@ -105,6 +129,9 @@ export default function StateMixin(Base) {
|
|
|
105
129
|
})
|
|
106
130
|
.on({
|
|
107
131
|
disconnected() {
|
|
132
|
+
this._focused = false;
|
|
133
|
+
this._keyPressed = false;
|
|
134
|
+
this._pointerPressed = false;
|
|
108
135
|
this._lastInteraction = null;
|
|
109
136
|
},
|
|
110
137
|
})
|
|
@@ -128,17 +155,19 @@ export default function StateMixin(Base) {
|
|
|
128
155
|
}
|
|
129
156
|
|
|
130
157
|
#state {
|
|
158
|
+
--mdw-state__opacity: calc(
|
|
159
|
+
var(--mdw-state__hovered-opacity) +
|
|
160
|
+
var(--mdw-state__focused-opacity) +
|
|
161
|
+
var(--mdw-state__pressed-opacity) +
|
|
162
|
+
var(--mdw-state__dragged-opacity)
|
|
163
|
+
);
|
|
164
|
+
|
|
131
165
|
position: absolute;
|
|
132
166
|
inset: 0;
|
|
133
167
|
|
|
134
168
|
pointer-events: none;
|
|
135
169
|
|
|
136
|
-
opacity:
|
|
137
|
-
var(--mdw-state__hovered-opacity) +
|
|
138
|
-
var(--mdw-state__focused-opacity) +
|
|
139
|
-
var(--mdw-state__pressed-opacity) +
|
|
140
|
-
var(--mdw-state__dragged-opacity)
|
|
141
|
-
);
|
|
170
|
+
opacity: var(--mdw-state__opacity);
|
|
142
171
|
/* opacity handled by theme engine */
|
|
143
172
|
background-color: currentColor;
|
|
144
173
|
border-radius: inherit;
|
|
@@ -149,6 +178,18 @@ export default function StateMixin(Base) {
|
|
|
149
178
|
will-change: opacity;
|
|
150
179
|
}
|
|
151
180
|
|
|
181
|
+
/** Reduce RAM usage by not creating stack contexts */
|
|
182
|
+
@supports(background-color: color-mix(in srgb, red calc(100%), red)) {
|
|
183
|
+
#state {
|
|
184
|
+
opacity: 1;
|
|
185
|
+
|
|
186
|
+
background-color: color-mix(in srgb, currentColor calc(100% * var(--mdw-state__opacity)), transparent);
|
|
187
|
+
|
|
188
|
+
transition-property: color, background-color;
|
|
189
|
+
will-change: color, background-color;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
152
193
|
#state[touched] {
|
|
153
194
|
--mdw-state__hovered-opacity: 0;
|
|
154
195
|
--mdw-state__focused-opacity: 0;
|