@shortfuse/materialdesignweb 0.5.0 → 0.7.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 +155 -77
- package/bin/generate-css.js +12 -0
- package/components/Badge.css +30 -0
- package/components/Badge.js +15 -0
- package/components/Body.css +14 -0
- package/components/Body.js +7 -0
- package/components/BottomAppBar.css +23 -0
- package/components/BottomAppBar.js +25 -0
- package/components/Box.css +31 -0
- package/components/Box.js +24 -0
- package/components/Button.css +146 -0
- package/components/Button.js +95 -0
- package/components/Button.md +61 -0
- package/components/Card.css +109 -0
- package/components/Card.js +82 -0
- package/components/Checkbox.css +77 -0
- package/components/Checkbox.js +59 -0
- package/components/CheckboxIcon.css +89 -0
- package/components/CheckboxIcon.js +41 -0
- package/components/Chip.css +35 -0
- package/components/Chip.js +22 -0
- package/components/Dialog.css +235 -0
- package/components/Dialog.js +327 -0
- package/components/DialogActions.js +13 -0
- package/components/Divider.css +41 -0
- package/components/Divider.js +13 -0
- package/components/ExtendedFab.css +24 -0
- package/components/ExtendedFab.js +11 -0
- package/components/Fab.css +23 -0
- package/components/Fab.js +26 -0
- package/components/FilterChip.css +80 -0
- package/components/FilterChip.js +51 -0
- package/components/Headline.css +14 -0
- package/components/Headline.js +33 -0
- package/components/Icon.css +76 -0
- package/components/Icon.js +174 -0
- package/components/IconButton.css +151 -0
- package/components/IconButton.js +65 -0
- package/components/Input.js +16 -0
- package/components/Label.css +14 -0
- package/components/Label.js +7 -0
- package/components/Layout.css +19 -0
- package/components/Layout.js +12 -0
- package/components/List.css +12 -0
- package/components/List.js +17 -0
- package/components/ListItem.css +224 -0
- package/components/ListItem.js +112 -0
- package/components/ListOption.css +34 -0
- package/components/ListOption.js +122 -0
- package/components/ListSelect.css +9 -0
- package/components/ListSelect.js +206 -0
- package/components/Menu.css +171 -0
- package/components/Menu.js +470 -0
- package/components/MenuItem.css +53 -0
- package/components/MenuItem.js +215 -0
- package/components/Nav.css +17 -0
- package/components/Nav.js +23 -0
- package/components/NavBar.css +34 -0
- package/components/NavBar.js +88 -0
- package/components/NavBarItem.css +41 -0
- package/components/NavBarItem.js +7 -0
- package/components/NavDrawer.css +31 -0
- package/components/NavDrawer.js +13 -0
- package/components/NavDrawerItem.css +42 -0
- package/components/NavDrawerItem.js +12 -0
- package/components/NavItem.css +181 -0
- package/components/NavItem.js +83 -0
- package/components/NavRail.css +47 -0
- package/components/NavRail.js +17 -0
- package/components/NavRailItem.css +25 -0
- package/components/NavRailItem.js +7 -0
- package/components/Option.js +91 -0
- package/components/Outline.css +138 -0
- package/components/Pane.css +261 -0
- package/components/Pane.js +21 -0
- package/components/Progress.css +74 -0
- package/components/Progress.js +67 -0
- package/components/ProgressCircle.css +226 -0
- package/components/ProgressLine.css +155 -0
- package/components/Radio.css +83 -0
- package/components/Radio.js +42 -0
- package/components/RadioIcon.css +73 -0
- package/components/RadioIcon.js +37 -0
- package/components/Ripple.css +74 -0
- package/components/Ripple.js +114 -0
- package/components/SegmentedButton.css +94 -0
- package/components/SegmentedButton.js +49 -0
- package/components/SegmentedButtonGroup.css +12 -0
- package/components/SegmentedButtonGroup.js +44 -0
- package/components/Select.css +52 -0
- package/components/Select.js +71 -0
- package/components/Shape.css +132 -0
- package/components/Shape.js +25 -0
- package/components/Slider.css +306 -0
- package/components/Slider.js +206 -0
- package/components/Snackbar.css +80 -0
- package/components/Snackbar.js +75 -0
- package/components/Surface.css +10 -0
- package/components/Surface.js +23 -0
- package/components/Switch.css +63 -0
- package/components/Switch.js +127 -0
- package/components/SwitchIcon.css +177 -0
- package/components/SwitchIcon.js +89 -0
- package/components/SwitchIconAnimations.css +89 -0
- package/components/Tab.css +85 -0
- package/components/Tab.js +103 -0
- package/components/TabContent.js +151 -0
- package/components/TabList.css +129 -0
- package/components/TabList.js +309 -0
- package/components/TabPanel.js +37 -0
- package/components/TextArea.css +93 -0
- package/components/TextArea.js +229 -0
- package/components/Title.css +14 -0
- package/components/Title.js +15 -0
- package/components/Tooltip.css +40 -0
- package/components/Tooltip.js +22 -0
- package/components/TopAppBar.css +209 -0
- package/components/TopAppBar.js +201 -0
- package/core/Composition.js +988 -0
- package/core/CustomElement.js +844 -0
- package/core/ICustomElement.d.ts +288 -0
- package/core/ICustomElement.js +1 -0
- package/core/css.js +51 -0
- package/core/customTypes.js +125 -0
- package/core/dom.js +56 -154
- package/core/identify.js +40 -0
- package/core/observe.js +410 -0
- package/core/template.js +121 -0
- package/core/typings.d.ts +135 -0
- package/core/typings.js +1 -0
- package/mixins/AriaReflectorMixin.js +42 -0
- package/mixins/AriaToolbarMixin.js +13 -0
- package/mixins/ControlMixin.css +57 -0
- package/mixins/ControlMixin.js +212 -0
- package/mixins/DensityMixin.css +40 -0
- package/mixins/DensityMixin.js +11 -0
- package/mixins/FlexableMixin.css +79 -0
- package/mixins/FlexableMixin.js +32 -0
- package/mixins/FormAssociatedMixin.js +170 -0
- package/mixins/InputMixin.js +335 -0
- package/mixins/KeyboardNavMixin.js +244 -0
- package/mixins/RTLObserverMixin.js +35 -0
- package/mixins/ResizeObserverMixin.js +38 -0
- package/mixins/RippleMixin.css +12 -0
- package/mixins/RippleMixin.js +115 -0
- package/mixins/ScrollListenerMixin.js +100 -0
- package/mixins/ShapeMixin.css +135 -0
- package/mixins/ShapeMixin.js +31 -0
- package/mixins/StateMixin.css +82 -0
- package/mixins/StateMixin.js +114 -0
- package/mixins/SurfaceMixin.css +150 -0
- package/mixins/SurfaceMixin.js +32 -0
- package/mixins/TextFieldMixin.css +657 -0
- package/mixins/TextFieldMixin.js +121 -0
- package/mixins/ThemableMixin.css +204 -0
- package/mixins/ThemableMixin.js +16 -0
- package/mixins/TooltipTriggerMixin.css +27 -0
- package/mixins/TooltipTriggerMixin.js +366 -0
- package/mixins/TouchTargetMixin.css +26 -0
- package/mixins/TouchTargetMixin.js +9 -0
- package/package.json +54 -49
- package/theming/index.js +594 -0
- package/theming/loader.js +24 -0
- package/utils/cli.js +11 -0
- package/utils/color_keywords.js +151 -0
- package/utils/hct/Cam16.js +298 -0
- package/utils/hct/CorePalette.js +84 -0
- package/utils/hct/Hct.js +172 -0
- package/utils/hct/Scheme.js +587 -0
- package/utils/hct/TonalPalette.js +68 -0
- package/utils/hct/ViewingConditions.js +136 -0
- package/utils/hct/blend.js +93 -0
- package/utils/hct/colorUtils.js +302 -0
- package/utils/hct/hctSolver.js +559 -0
- package/utils/hct/helper.js +182 -0
- package/utils/hct/mathUtils.js +153 -0
- package/utils/jsonMergePatch.js +100 -0
- package/utils/jsx-runtime.js +101 -0
- package/utils/popup.js +117 -0
- package/utils/svg.js +129 -0
- package/.browserslistrc +0 -4
- package/.eslintrc.json +0 -204
- package/.stylelintrc.json +0 -645
- package/.vscode/launch.json +0 -31
- package/.vscode/settings.json +0 -3
- package/.vscode/tasks.json +0 -32
- package/CHANGELOG.md +0 -36
- package/CODE_OF_CONDUCT.md +0 -46
- package/adapters/datatable/column.js +0 -176
- package/adapters/datatable/index.js +0 -960
- package/adapters/dom/index.js +0 -586
- package/adapters/list/index.js +0 -69
- package/adapters/search/index.js +0 -495
- package/components/appbar/_spec.scss +0 -165
- package/components/appbar/_theme.scss +0 -0
- package/components/appbar/index.scss +0 -2
- package/components/banner/_spec.scss +0 -83
- package/components/banner/_theme.scss +0 -0
- package/components/banner/index.scss +0 -2
- package/components/bottomnav/README.md +0 -85
- package/components/bottomnav/_spec.scss +0 -149
- package/components/bottomnav/_theme.scss +0 -0
- package/components/bottomnav/index.js +0 -117
- package/components/bottomnav/index.scss +0 -2
- package/components/bottomnav/item.js +0 -88
- package/components/button/README.md +0 -61
- package/components/button/_spec.scss +0 -162
- package/components/button/_theme.scss +0 -42
- package/components/button/index.eta +0 -32
- package/components/button/index.js +0 -43
- package/components/button/index.pug +0 -18
- package/components/button/index.scss +0 -2
- package/components/card/_spec.scss +0 -241
- package/components/card/_theme.scss +0 -0
- package/components/card/index.scss +0 -2
- package/components/chip/_spec.scss +0 -111
- package/components/chip/_theme.scss +0 -105
- package/components/chip/index.js +0 -23
- package/components/chip/index.scss +0 -2
- package/components/chip/item.js +0 -20
- package/components/datatable/_spec.scss +0 -225
- package/components/datatable/_theme.scss +0 -128
- package/components/datatable/cell.js +0 -44
- package/components/datatable/columnheader.js +0 -46
- package/components/datatable/index.js +0 -374
- package/components/datatable/index.scss +0 -2
- package/components/datatable/row.js +0 -48
- package/components/datatable/rowheader.js +0 -18
- package/components/dialog/_spec.scss +0 -203
- package/components/dialog/_theme.scss +0 -7
- package/components/dialog/index.js +0 -601
- package/components/dialog/index.scss +0 -2
- package/components/divider/_spec.scss +0 -11
- package/components/divider/_theme.scss +0 -0
- package/components/divider/index.scss +0 -2
- package/components/elevation/_spec.scss +0 -9
- package/components/elevation/_theme.scss +0 -0
- package/components/elevation/index.scss +0 -2
- package/components/fab/_spec.scss +0 -210
- package/components/fab/_theme.scss +0 -0
- package/components/fab/index.js +0 -99
- package/components/fab/index.scss +0 -2
- package/components/grid/_spec.scss +0 -169
- package/components/grid/_theme.scss +0 -0
- package/components/grid/index.scss +0 -2
- package/components/layout/_mixins.scss +0 -11
- package/components/layout/_spec.scss +0 -916
- package/components/layout/_theme.scss +0 -19
- package/components/layout/index.js +0 -454
- package/components/layout/index.scss +0 -2
- package/components/list/_spec.scss +0 -363
- package/components/list/_theme.scss +0 -102
- package/components/list/content.js +0 -106
- package/components/list/index.js +0 -256
- package/components/list/index.scss +0 -2
- package/components/list/item.js +0 -167
- package/components/list/secondary.js +0 -45
- package/components/menu/_spec.scss +0 -329
- package/components/menu/_theme.scss +0 -0
- package/components/menu/index.js +0 -705
- package/components/menu/index.scss +0 -2
- package/components/menu/item.js +0 -231
- package/components/progress/_spec.scss +0 -156
- package/components/progress/_theme.scss +0 -0
- package/components/progress/index.js +0 -36
- package/components/progress/index.scss +0 -2
- package/components/selection/_spec.scss +0 -376
- package/components/selection/_theme.scss +0 -134
- package/components/selection/index.eta +0 -60
- package/components/selection/index.js +0 -70
- package/components/selection/index.pug +0 -30
- package/components/selection/index.scss +0 -2
- package/components/selection/input.js +0 -54
- package/components/selection/radiogroup.js +0 -40
- package/components/slider/_spec.scss +0 -59
- package/components/slider/_theme.scss +0 -0
- package/components/slider/index.scss +0 -2
- package/components/snackbar/_spec.scss +0 -150
- package/components/snackbar/_theme.scss +0 -0
- package/components/snackbar/index.js +0 -338
- package/components/snackbar/index.scss +0 -2
- package/components/tab/_spec.scss +0 -220
- package/components/tab/_theme.scss +0 -0
- package/components/tab/content.js +0 -210
- package/components/tab/index.js +0 -257
- package/components/tab/index.scss +0 -2
- package/components/tab/item.js +0 -88
- package/components/tab/list.js +0 -196
- package/components/tab/panel.js +0 -54
- package/components/textfield/README.md +0 -179
- package/components/textfield/_spec.scss +0 -763
- package/components/textfield/_theme.scss +0 -264
- package/components/textfield/index.eta +0 -74
- package/components/textfield/index.js +0 -160
- package/components/textfield/index.pug +0 -30
- package/components/textfield/index.scss +0 -2
- package/components/tooltip/_spec.scss +0 -185
- package/components/tooltip/_theme.scss +0 -0
- package/components/tooltip/index.scss +0 -2
- package/components/type/_spec.scss +0 -227
- package/components/type/_theme.scss +0 -0
- package/components/type/index.scss +0 -2
- package/core/_breakpoint.scss +0 -189
- package/core/_elevation.scss +0 -78
- package/core/_length.scss +0 -8
- package/core/_motion.scss +0 -31
- package/core/_platform.scss +0 -12
- package/core/_type.scss +0 -128
- package/core/aria/attributes.js +0 -141
- package/core/aria/button.js +0 -49
- package/core/aria/keyboard.js +0 -92
- package/core/aria/rovingtabindex.js +0 -175
- package/core/aria/tab.js +0 -59
- package/core/document/index.js +0 -39
- package/core/overlay/_spec.scss +0 -28
- package/core/overlay/_theme.scss +0 -147
- package/core/overlay/index.js +0 -95
- package/core/overlay/index.scss +0 -2
- package/core/ripple/_spec.scss +0 -196
- package/core/ripple/_theme.scss +0 -20
- package/core/ripple/index.js +0 -286
- package/core/ripple/index.scss +0 -2
- package/core/theme/_aliases.scss +0 -15
- package/core/theme/_config.scss +0 -8
- package/core/theme/_functions.scss +0 -22
- package/core/theme/_palettes.scss +0 -405
- package/core/theme/_spec.scss +0 -0
- package/core/theme/_theme.scss +0 -268
- package/core/theme/index.js +0 -50
- package/core/theme/index.scss +0 -4
- package/core/throttler.js +0 -42
- package/core/transition/index.js +0 -465
- package/docs/_flex.scss +0 -28
- package/docs/_menuoptions.js +0 -183
- package/docs/_partials/_androidnavbar.eta +0 -5
- package/docs/_partials/_androidstatusbar.eta +0 -13
- package/docs/_partials/_appbar.eta +0 -27
- package/docs/_partials/_buttontest.eta +0 -31
- package/docs/_partials/_header.eta +0 -146
- package/docs/_partials/_navlistitem.eta +0 -16
- package/docs/_partials/_target.eta +0 -1
- package/docs/_sample-utils.js +0 -88
- package/docs/_storage.js +0 -33
- package/docs/docs.scss +0 -331
- package/docs/framework.scss +0 -26
- package/docs/index.eta +0 -12
- package/docs/index.js +0 -7
- package/docs/pages/appbar.eta +0 -108
- package/docs/pages/appbar.js +0 -0
- package/docs/pages/bottomnav.eta +0 -188
- package/docs/pages/bottomnav.js +0 -118
- package/docs/pages/button.eta +0 -124
- package/docs/pages/button.js +0 -224
- package/docs/pages/card.eta +0 -90
- package/docs/pages/card.js +0 -175
- package/docs/pages/chip.eta +0 -122
- package/docs/pages/chip.js +0 -80
- package/docs/pages/color.eta +0 -143
- package/docs/pages/color.js +0 -261
- package/docs/pages/datatable.eta +0 -323
- package/docs/pages/datatable.js +0 -160
- package/docs/pages/dialog.eta +0 -184
- package/docs/pages/dialog.js +0 -174
- package/docs/pages/dom.eta +0 -26
- package/docs/pages/dom.js +0 -140
- package/docs/pages/elevation.eta +0 -35
- package/docs/pages/elevation.js +0 -0
- package/docs/pages/fab.eta +0 -99
- package/docs/pages/fab.js +0 -43
- package/docs/pages/grid.eta +0 -135
- package/docs/pages/grid.js +0 -128
- package/docs/pages/layout.eta +0 -8
- package/docs/pages/layout.js +0 -0
- package/docs/pages/list.eta +0 -465
- package/docs/pages/list.js +0 -8
- package/docs/pages/menu.eta +0 -274
- package/docs/pages/menu.js +0 -213
- package/docs/pages/overlay.eta +0 -69
- package/docs/pages/overlay.js +0 -3
- package/docs/pages/progress.eta +0 -23
- package/docs/pages/progress.js +0 -12
- package/docs/pages/ripple.eta +0 -27
- package/docs/pages/ripple.js +0 -3
- package/docs/pages/search.eta +0 -242
- package/docs/pages/search.js +0 -226
- package/docs/pages/selection.eta +0 -107
- package/docs/pages/selection.js +0 -12
- package/docs/pages/slider.eta +0 -23
- package/docs/pages/slider.js +0 -0
- package/docs/pages/snackbar.eta +0 -83
- package/docs/pages/snackbar.js +0 -157
- package/docs/pages/tab.eta +0 -407
- package/docs/pages/tab.js +0 -152
- package/docs/pages/textfield.eta +0 -487
- package/docs/pages/textfield.js +0 -257
- package/docs/pages/tooltip.eta +0 -92
- package/docs/pages/tooltip.js +0 -0
- package/docs/pages/transition.eta +0 -117
- package/docs/pages/transition.js +0 -52
- package/docs/pages/type.eta +0 -31
- package/docs/pages/type.js +0 -0
- package/docs/postrender.js +0 -41
- package/docs/prerender.js +0 -16
- package/docs/pwa/_dialogs.eta +0 -143
- package/docs/pwa/_menus.eta +0 -16
- package/docs/pwa/pwa-prerender.js +0 -3
- package/docs/pwa/pwa.eta +0 -478
- package/docs/pwa/pwa.js +0 -298
- package/docs/pwa/pwa.scss +0 -31
- package/docs/themes/theme-colored.scss +0 -15
- package/docs/themes/theme-default.scss +0 -3
- package/index.scss +0 -27
- package/jsconfig.json +0 -16
- package/scripts/deploy-docs.sh +0 -9
- package/templates/index.eta +0 -2
- package/templates/index.pug +0 -3
- package/tsconfig.json +0 -16
- package/webpack.config.js +0 -304
|
@@ -1,763 +0,0 @@
|
|
|
1
|
-
// https://material.io/design/components/text-fields.html
|
|
2
|
-
// https://material.io/archive/guidelines/components/text-fields.html
|
|
3
|
-
|
|
4
|
-
@use '../../core/_elevation.scss' as elevation;
|
|
5
|
-
@use '../../core/_length.scss' as *;
|
|
6
|
-
@use '../../core/_motion.scss' as motion;
|
|
7
|
-
@use '../../core/_platform.scss' as platform;
|
|
8
|
-
@use '../../core/_type.scss' as type;
|
|
9
|
-
|
|
10
|
-
$border-line-height: 1px !default;
|
|
11
|
-
$border-line-height__focused: 2px !default;
|
|
12
|
-
|
|
13
|
-
$textarea-padding-horizontal: 16px !default;
|
|
14
|
-
$outline-start-width: 10px !default;
|
|
15
|
-
$outline-end-width: 8px !default;
|
|
16
|
-
|
|
17
|
-
$input-top-alignment: calc(#{dp(8 + 4)} + #{sp(12)} + 0.125em) !default; // Extra 1/8em for font alignment
|
|
18
|
-
$input-bottom-alignment: 8px !default;
|
|
19
|
-
$input-dense-reduction: 8px !default;
|
|
20
|
-
$input-top-alignment-dense: calc(#{dp(8 + 2)} + #{sp(12)} + 0.125em) !default;
|
|
21
|
-
$input-bottom-alignment-dense: 4px !default;
|
|
22
|
-
|
|
23
|
-
// CSS Grid Layout
|
|
24
|
-
// 1 | 2 | 3 | 4 | 5 | 6 | 7
|
|
25
|
-
// -------------------------------------------------------------
|
|
26
|
-
// 1: Gap | | Label ----------------------------------- | Gap
|
|
27
|
-
// 1: Gap | Icon | Prefix | Input | Dropdown Button | Suffix | Gap
|
|
28
|
-
// 1: Border -----------------------------------------------------
|
|
29
|
-
// 2: Gap | | Helper/Error | Gap
|
|
30
|
-
// 2: Dropdown ---------------------------------------------------
|
|
31
|
-
|
|
32
|
-
.mdw-textfield {
|
|
33
|
-
display: grid;
|
|
34
|
-
position: relative;
|
|
35
|
-
align-items: baseline;
|
|
36
|
-
grid-template-columns: 12px auto auto 1fr auto auto 8px;
|
|
37
|
-
grid-template-rows: auto auto;
|
|
38
|
-
|
|
39
|
-
padding: 8px 0;
|
|
40
|
-
|
|
41
|
-
transition-duration: motion.$simpleDuration;
|
|
42
|
-
transition-timing-function: motion.$standardEasing;
|
|
43
|
-
|
|
44
|
-
&[mdw-solo],
|
|
45
|
-
&[mdw-solo][mdw-dense] {
|
|
46
|
-
grid-template-columns: 0 auto auto 1fr auto auto 0;
|
|
47
|
-
|
|
48
|
-
padding: 0;
|
|
49
|
-
|
|
50
|
-
.mdw-textfield__input {
|
|
51
|
-
align-self: center;
|
|
52
|
-
|
|
53
|
-
margin: 0;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.mdw-textfield__border {
|
|
57
|
-
display: none;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&:not([mdw-solo]) {
|
|
62
|
-
@include type.addRules('subtitle');
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.mdw-textfield::before {
|
|
67
|
-
// 8dp margin
|
|
68
|
-
// 12sp label
|
|
69
|
-
// 4dp margin
|
|
70
|
-
// 1em input
|
|
71
|
-
// 16dp margin
|
|
72
|
-
// = 56dp at 16sp
|
|
73
|
-
|
|
74
|
-
content: "";
|
|
75
|
-
|
|
76
|
-
display: inline-block;
|
|
77
|
-
|
|
78
|
-
grid-column: 4;
|
|
79
|
-
grid-row: 1;
|
|
80
|
-
|
|
81
|
-
box-sizing: content-box; // Don't allow global override
|
|
82
|
-
block-size: 1em;
|
|
83
|
-
margin-block: dp(8 + 4) 16px;
|
|
84
|
-
padding-block-start: sp(12);
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.mdw-textfield[mdw-dense]::before {
|
|
89
|
-
margin-block: 8px 12px;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.mdw-textfield[mdw-solo],
|
|
93
|
-
.mdw-textfield[mdw-solo][mdw-dense],
|
|
94
|
-
.mdw-textfield[mdw-outlined] {
|
|
95
|
-
.mdw-textfield__prefix,
|
|
96
|
-
.mdw-textfield__suffix,
|
|
97
|
-
.mdw-textfield__icon {
|
|
98
|
-
align-self: center;
|
|
99
|
-
|
|
100
|
-
margin-block: 0;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
textarea.mdw-textfield__input {
|
|
104
|
-
& ~ .mdw-textfield__prefix,
|
|
105
|
-
& ~ .mdw-textfield__suffix {
|
|
106
|
-
align-self: flex-start;
|
|
107
|
-
|
|
108
|
-
margin-block: 0;
|
|
109
|
-
|
|
110
|
-
transform: translateY(calc((8px + sp(12) + 4px + 1em + 16px) * 0.5)) translateY(-50%);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.mdw-textfield__prefix,
|
|
116
|
-
.mdw-textfield__suffix {
|
|
117
|
-
grid-row: 1;
|
|
118
|
-
|
|
119
|
-
pointer-events: none;
|
|
120
|
-
|
|
121
|
-
transition-duration: motion.$simpleDuration;
|
|
122
|
-
transition-property: color;
|
|
123
|
-
transition-timing-function: motion.$standardEasing;
|
|
124
|
-
will-change: color;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.mdw-textfield__prefix {
|
|
128
|
-
grid-column: 3;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.mdw-textfield__suffix {
|
|
132
|
-
grid-column: 6;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.mdw-textfield__prefix::after,
|
|
136
|
-
.mdw-textfield__suffix::before {
|
|
137
|
-
content: "";
|
|
138
|
-
|
|
139
|
-
display: inline-block;
|
|
140
|
-
|
|
141
|
-
inline-size: 4px;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.mdw-textfield__outline-gap {
|
|
145
|
-
// Using transform would create a new composition layer and cause subpixel rendering issues
|
|
146
|
-
position: absolute;
|
|
147
|
-
inset-block: $border-line-height__focused 0;
|
|
148
|
-
inset-inline: dp(12);
|
|
149
|
-
|
|
150
|
-
grid-column: 2;
|
|
151
|
-
grid-row: 1;
|
|
152
|
-
|
|
153
|
-
margin-block: -$border-line-height__focused #{-$border-line-height};
|
|
154
|
-
|
|
155
|
-
.mdw-textfield[mdw-outlined] & {
|
|
156
|
-
position: relative;
|
|
157
|
-
inset: auto;
|
|
158
|
-
|
|
159
|
-
max-inline-size: calc(100% - 24px);
|
|
160
|
-
margin-block: -$border-line-height;
|
|
161
|
-
|
|
162
|
-
color: inherit;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
&::before,
|
|
166
|
-
&::after {
|
|
167
|
-
content: none;
|
|
168
|
-
|
|
169
|
-
position: absolute;
|
|
170
|
-
inset-block-start: 0;
|
|
171
|
-
|
|
172
|
-
border-block-start-style: solid;
|
|
173
|
-
border-block-start-width: $border-line-height;
|
|
174
|
-
|
|
175
|
-
transition-delay: 1ms;
|
|
176
|
-
transition-duration: motion.$simpleDuration * 0.5;
|
|
177
|
-
transition-property: left, right;
|
|
178
|
-
transition-timing-function: motion.$standardEasing;
|
|
179
|
-
|
|
180
|
-
border-color: inherit;
|
|
181
|
-
|
|
182
|
-
.mdw-textfield[mdw-outlined] & {
|
|
183
|
-
content: "";
|
|
184
|
-
|
|
185
|
-
// Height must exactly match parent to avoid subpixel rendering issues
|
|
186
|
-
inset-block-end: 0;
|
|
187
|
-
|
|
188
|
-
border-block-start-style: solid;
|
|
189
|
-
border-block-end-style: solid;
|
|
190
|
-
|
|
191
|
-
&:not(:focus) {
|
|
192
|
-
border-style: none;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
border-block-start-color: currentColor;
|
|
196
|
-
border-block-end-color: transparent;
|
|
197
|
-
border-radius: 0;
|
|
198
|
-
color: inherit;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.mdw-textfield__border {
|
|
204
|
-
display: flex;
|
|
205
|
-
position: relative;
|
|
206
|
-
align-self: stretch;
|
|
207
|
-
grid-column-start: 1;
|
|
208
|
-
grid-column-end: span 7;
|
|
209
|
-
grid-row: 1;
|
|
210
|
-
|
|
211
|
-
box-sizing: border-box;
|
|
212
|
-
min-inline-size: 100%; // Fixes FireFox Grid bug
|
|
213
|
-
border-block-start-style: none;
|
|
214
|
-
border-block-end-style: solid;
|
|
215
|
-
border-width: $border-line-height;
|
|
216
|
-
border-start-start-radius: 4px;
|
|
217
|
-
border-start-end-radius: 4px;
|
|
218
|
-
border-end-start-radius: 0;
|
|
219
|
-
border-end-end-radius: 0;
|
|
220
|
-
border-inline-start-style: none;
|
|
221
|
-
border-inline-end-style: none;
|
|
222
|
-
|
|
223
|
-
cursor: pointer;
|
|
224
|
-
-webkit-tap-highlight-color: transparent;
|
|
225
|
-
|
|
226
|
-
transition-delay: 1ms;
|
|
227
|
-
transition-duration: motion.$simpleDuration;
|
|
228
|
-
transition-property: color, border-color;
|
|
229
|
-
transition-timing-function: motion.$standardEasing;
|
|
230
|
-
|
|
231
|
-
border-block-start-color: transparent;
|
|
232
|
-
border-block-end-color: currentColor;
|
|
233
|
-
border-inline-start-color: transparent;
|
|
234
|
-
border-inline-end-color: transparent;
|
|
235
|
-
|
|
236
|
-
.mdw-textfield[mdw-outlined] & {
|
|
237
|
-
border-block-start-style: solid;
|
|
238
|
-
border-block-end-style: solid;
|
|
239
|
-
border-end-start-radius: 4px;
|
|
240
|
-
|
|
241
|
-
border-end-end-radius: 4px;
|
|
242
|
-
border-inline-start-style: solid;
|
|
243
|
-
border-inline-end-style: solid;
|
|
244
|
-
|
|
245
|
-
transition: none;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.mdw-textfield__input:focus ~ & {
|
|
249
|
-
pointer-events: none;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.mdw-textfield__input:disabled ~ & {
|
|
253
|
-
cursor: not-allowed;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
&::before,
|
|
257
|
-
&::after {
|
|
258
|
-
content: "";
|
|
259
|
-
|
|
260
|
-
position: absolute;
|
|
261
|
-
inset-block-end: -$border-line-height__focused;
|
|
262
|
-
inset-inline: 0;
|
|
263
|
-
|
|
264
|
-
block-size: 100%;
|
|
265
|
-
border-block-end-style: solid;
|
|
266
|
-
border-width: $border-line-height__focused;
|
|
267
|
-
|
|
268
|
-
transition-delay: 1ms;
|
|
269
|
-
transition-duration: motion.$collapseDuration;
|
|
270
|
-
transition-property: transform;
|
|
271
|
-
transition-timing-function: motion.$accelerateEasing;
|
|
272
|
-
will-change: transform;
|
|
273
|
-
|
|
274
|
-
transform: scaleX(0) translateY(-$border-line-height * 0.5);
|
|
275
|
-
|
|
276
|
-
border-radius: inherit;
|
|
277
|
-
color: transparent;
|
|
278
|
-
|
|
279
|
-
.mdw-textfield[mdw-outlined] & {
|
|
280
|
-
content: "";
|
|
281
|
-
|
|
282
|
-
position: relative;
|
|
283
|
-
inset: auto;
|
|
284
|
-
|
|
285
|
-
transition: none;
|
|
286
|
-
will-change: auto;
|
|
287
|
-
|
|
288
|
-
transform: none;
|
|
289
|
-
|
|
290
|
-
color: inherit;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
.mdw-textfield[mdw-outlined] &::after {
|
|
295
|
-
flex-grow: 1;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
.mdw-textfield[mdw-outlined] &::before {
|
|
299
|
-
min-inline-size: $outline-start-width - $border-line-height;
|
|
300
|
-
margin-block-start: -$border-line-height;
|
|
301
|
-
margin-inline: -$border-line-height 0;
|
|
302
|
-
border-block-start-style: solid;
|
|
303
|
-
border-block-end-style: solid;
|
|
304
|
-
border-width: inherit;
|
|
305
|
-
border-start-start-radius: inherit;
|
|
306
|
-
border-start-end-radius: 0;
|
|
307
|
-
border-end-start-radius: inherit;
|
|
308
|
-
border-end-end-radius: 0;
|
|
309
|
-
border-inline-start-style: solid;
|
|
310
|
-
border-inline-end-style: none;
|
|
311
|
-
|
|
312
|
-
border-block-start-color: currentColor;
|
|
313
|
-
border-block-end-color: transparent;
|
|
314
|
-
border-inline-start-color: currentColor;
|
|
315
|
-
border-inline-end-color: transparent;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
.mdw-textfield[mdw-outlined] &::after {
|
|
319
|
-
min-inline-size: $outline-end-width - $border-line-height;
|
|
320
|
-
margin-block-start: -$border-line-height;
|
|
321
|
-
margin-inline: 0 #{-$border-line-height};
|
|
322
|
-
border-block-start-style: solid;
|
|
323
|
-
border-block-end-style: solid;
|
|
324
|
-
border-width: inherit;
|
|
325
|
-
border-start-start-radius: 0;
|
|
326
|
-
border-start-end-radius: inherit;
|
|
327
|
-
border-end-start-radius: 0;
|
|
328
|
-
border-end-end-radius: inherit;
|
|
329
|
-
border-inline-start-style: none;
|
|
330
|
-
border-inline-end-style: solid;
|
|
331
|
-
|
|
332
|
-
border-block-start-color: currentColor;
|
|
333
|
-
border-block-end-color: transparent;
|
|
334
|
-
border-inline-start-color: transparent;
|
|
335
|
-
border-inline-end-color: currentColor;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
.mdw-textfield__label {
|
|
340
|
-
position: absolute;
|
|
341
|
-
inset-inline: 0;
|
|
342
|
-
align-self: flex-start;
|
|
343
|
-
overflow-x: hidden;
|
|
344
|
-
overflow-y: hidden;
|
|
345
|
-
|
|
346
|
-
margin: 0;
|
|
347
|
-
padding: 0;
|
|
348
|
-
|
|
349
|
-
pointer-events: none; // allow clickthrough
|
|
350
|
-
|
|
351
|
-
transition-duration: motion.$shapeChangeDuration;
|
|
352
|
-
transition-property: top, transform, font-size;
|
|
353
|
-
transition-timing-function: motion.$standardEasing;
|
|
354
|
-
will-change: top, transform, font-size;
|
|
355
|
-
|
|
356
|
-
text-overflow: ellipsis;
|
|
357
|
-
white-space: nowrap;
|
|
358
|
-
|
|
359
|
-
.mdw-textfield[mdw-outlined] & {
|
|
360
|
-
position: relative; // reflow DOM
|
|
361
|
-
|
|
362
|
-
padding: 0 4px;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
&::before {
|
|
366
|
-
// Add upper 8dp from text-top to top for positioning
|
|
367
|
-
// Add lower 8dp from baseline to keep vertically centered
|
|
368
|
-
@include type.addRules('caption');
|
|
369
|
-
content: "";
|
|
370
|
-
|
|
371
|
-
display: inline-block;
|
|
372
|
-
vertical-align: -8px;
|
|
373
|
-
|
|
374
|
-
box-sizing: content-box; // Don't allow global override
|
|
375
|
-
block-size: 1em;
|
|
376
|
-
margin-block-start: 8px;
|
|
377
|
-
padding-block-start: 8px;
|
|
378
|
-
|
|
379
|
-
.mdw-textfield[mdw-outlined] & {
|
|
380
|
-
content: none;
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
.mdw-textfield__signifier {
|
|
386
|
-
align-self: center;
|
|
387
|
-
grid-column: 2;
|
|
388
|
-
grid-row: 1;
|
|
389
|
-
|
|
390
|
-
margin-block: 8px;
|
|
391
|
-
|
|
392
|
-
&::after {
|
|
393
|
-
content: "";
|
|
394
|
-
|
|
395
|
-
display: inline-block;
|
|
396
|
-
|
|
397
|
-
inline-size: 8px;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
& ~ .mdw-textfield__border .mdw-textfield__outline-gap {
|
|
401
|
-
margin-inline: dp(24 + 8) 0;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
.mdw-textfield[mdw-outlined] & ~ .mdw-textfield__border {
|
|
405
|
-
&::before {
|
|
406
|
-
padding-inline: 0 dp(24 + 8);
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
.mdw-textfield__outline-gap {
|
|
410
|
-
max-inline-size: calc(100% - #{dp(24 + 24 + 8)});
|
|
411
|
-
margin-inline-start: 0;
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
.mdw-textfield[mdw-outlined] {
|
|
417
|
-
&,
|
|
418
|
-
&[mdw-dense], {
|
|
419
|
-
.mdw-textfield__input,
|
|
420
|
-
textfield.mdw-textfield__input,
|
|
421
|
-
.mdw-textfield__prefix,
|
|
422
|
-
.mdw-textfield__suffix {
|
|
423
|
-
margin-block: calc(#{sp(6)} + 2px); // Half of label + 2px // Equidistant from border
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
.mdw-textfield__input {
|
|
429
|
-
grid-column-start: 4;
|
|
430
|
-
grid-column-end: span 2;
|
|
431
|
-
grid-row: 1;
|
|
432
|
-
|
|
433
|
-
box-sizing: border-box;
|
|
434
|
-
min-inline-size: 0; // Firefox CSS Grid fix
|
|
435
|
-
inline-size: 100%;
|
|
436
|
-
border: none;
|
|
437
|
-
padding: 0;
|
|
438
|
-
|
|
439
|
-
-moz-appearance: none;
|
|
440
|
-
-webkit-appearance: none;
|
|
441
|
-
appearance: none;
|
|
442
|
-
outline: none;
|
|
443
|
-
-webkit-tap-highlight-color: transparent;
|
|
444
|
-
|
|
445
|
-
z-index: 1;
|
|
446
|
-
|
|
447
|
-
background: none;
|
|
448
|
-
box-shadow: none; // Firefox :invalid styling
|
|
449
|
-
|
|
450
|
-
font-weight: inherit;
|
|
451
|
-
font-size: inherit;
|
|
452
|
-
line-height: inherit;
|
|
453
|
-
font-family: inherit;
|
|
454
|
-
letter-spacing: inherit;
|
|
455
|
-
|
|
456
|
-
.mdw-textfield[mdw-outlined] & {
|
|
457
|
-
align-self: center;
|
|
458
|
-
|
|
459
|
-
margin-block: calc(#{sp(6)} + 2px); // Half of label + 2px // Equidistant from border
|
|
460
|
-
border-inline-start: 2px solid transparent;
|
|
461
|
-
border-inline-end: none;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
&::placeholder {
|
|
465
|
-
transition-delay: 1ms;
|
|
466
|
-
transition-duration: motion.$simpleDuration;
|
|
467
|
-
transition-property: color;
|
|
468
|
-
transition-timing-function: motion.$standardEasing;
|
|
469
|
-
will-change: color;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
&:not(:focus) {
|
|
473
|
-
cursor: pointer;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
&:disabled {
|
|
477
|
-
cursor: not-allowed;
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
.mdw-textfield__input,
|
|
482
|
-
.mdw-textfield__prefix,
|
|
483
|
-
.mdw-textfield__suffix {
|
|
484
|
-
align-self: flex-start;
|
|
485
|
-
|
|
486
|
-
margin-block: $input-top-alignment $input-bottom-alignment;
|
|
487
|
-
|
|
488
|
-
// margin-top: $input-top-alignment-dense;
|
|
489
|
-
// margin-bottom: $input-bottom-alignment-dense;
|
|
490
|
-
.mdw-textfield[mdw-dense] > & {
|
|
491
|
-
// margin-top: $input-top-alignment-dense;
|
|
492
|
-
// margin-bottom: $input-bottom-alignment-dense;
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
textarea.mdw-textfield__input {
|
|
497
|
-
-ms-overflow-style: -ms-autohiding-scrollbar;
|
|
498
|
-
overflow-y: auto;
|
|
499
|
-
-webkit-overflow-scrolling: touch;
|
|
500
|
-
|
|
501
|
-
min-block-size: 1em; // Avoid clipping on resize
|
|
502
|
-
min-inline-size: 100%; // Always fill container horizontally
|
|
503
|
-
max-inline-size: 100%; // Don't allow resize beyond bounds
|
|
504
|
-
inline-size: 100% !important; // Unfortunately required
|
|
505
|
-
margin-block: $input-top-alignment $input-bottom-alignment;
|
|
506
|
-
padding-inline: 0 $textarea-padding-horizontal;
|
|
507
|
-
|
|
508
|
-
// margin-top: $input-top-alignment-dense;
|
|
509
|
-
// margin-bottom: $input-bottom-alignment-dense;
|
|
510
|
-
.mdw-textfield[mdw-dense] > & {
|
|
511
|
-
margin-block: $input-top-alignment-dense $input-bottom-alignment-dense;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
.mdw-textfield[mdw-autosize] > & {
|
|
515
|
-
min-block-size: 1em;
|
|
516
|
-
|
|
517
|
-
resize: none;
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
select.mdw-textfield__input {
|
|
522
|
-
padding-inline: 0 24px;
|
|
523
|
-
|
|
524
|
-
cursor: pointer;
|
|
525
|
-
|
|
526
|
-
option {
|
|
527
|
-
-moz-appearance: none;
|
|
528
|
-
-webkit-appearance: none;
|
|
529
|
-
appearance: none;
|
|
530
|
-
|
|
531
|
-
font-weight: inherit;
|
|
532
|
-
font-size: inherit;
|
|
533
|
-
font-family: inherit;
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
.mdw-textfield__error-text {
|
|
538
|
-
opacity: 0;
|
|
539
|
-
transform: translateY(-25%);
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
.mdw-textfield__helper-text,
|
|
543
|
-
.mdw-textfield__error-text {
|
|
544
|
-
@include type.textTopToTop(4);
|
|
545
|
-
@include type.addRules('caption');
|
|
546
|
-
grid-column: 3;
|
|
547
|
-
grid-column-end: span 4;
|
|
548
|
-
grid-row: 2;
|
|
549
|
-
overflow: hidden;
|
|
550
|
-
|
|
551
|
-
text-overflow: ellipsis;
|
|
552
|
-
white-space: nowrap;
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
.mdw-textfield__icon {
|
|
556
|
-
display: flex;
|
|
557
|
-
align-self: center;
|
|
558
|
-
grid-column: 5;
|
|
559
|
-
grid-row: 1;
|
|
560
|
-
|
|
561
|
-
block-size: 24px;
|
|
562
|
-
inline-size: 24px;
|
|
563
|
-
|
|
564
|
-
&[mdw-dropdown] {
|
|
565
|
-
pointer-events: none;
|
|
566
|
-
|
|
567
|
-
&::after {
|
|
568
|
-
content: "";
|
|
569
|
-
|
|
570
|
-
// Triangle shape
|
|
571
|
-
inline-size: 0;
|
|
572
|
-
margin-block-start: 10px;
|
|
573
|
-
margin-inline: auto;
|
|
574
|
-
border-block-start: 5px solid currentColor;
|
|
575
|
-
border-inline-start: 5px solid transparent;
|
|
576
|
-
border-inline-end: 5px solid transparent;
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
.mdw-textfield__dropdown {
|
|
582
|
-
position: absolute;
|
|
583
|
-
grid-column: 1;
|
|
584
|
-
grid-column-end: span 7;
|
|
585
|
-
grid-row: 2;
|
|
586
|
-
overflow: hidden;
|
|
587
|
-
|
|
588
|
-
max-block-size: 0;
|
|
589
|
-
max-inline-size: 100%;
|
|
590
|
-
inline-size: 100%;
|
|
591
|
-
margin-block: 0 8px;
|
|
592
|
-
|
|
593
|
-
border-start-start-radius: 0;
|
|
594
|
-
border-start-end-radius: 0;
|
|
595
|
-
border-end-start-radius: 4px;
|
|
596
|
-
border-end-end-radius: 4px;
|
|
597
|
-
|
|
598
|
-
transition-duration: motion.$collapseDuration;
|
|
599
|
-
transition-property: box-shadow, max-height;
|
|
600
|
-
transition-timing-function: motion.$accelerateEasing;
|
|
601
|
-
|
|
602
|
-
z-index: 2;
|
|
603
|
-
|
|
604
|
-
box-shadow: none;
|
|
605
|
-
|
|
606
|
-
.mdw-textfield[mdw-outlined] & {
|
|
607
|
-
margin-block-start: 8px;
|
|
608
|
-
|
|
609
|
-
border-start-start-radius: 4px;
|
|
610
|
-
border-start-end-radius: 4px;
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
&:active,
|
|
614
|
-
&[mdw-show],
|
|
615
|
-
input:focus ~ & {
|
|
616
|
-
&:not([mdw-hide]) {
|
|
617
|
-
transition-duration: motion.$expandDuration;
|
|
618
|
-
transition-timing-function: motion.$decelerateEasing;
|
|
619
|
-
|
|
620
|
-
box-shadow: elevation.boxShadow(24);
|
|
621
|
-
|
|
622
|
-
&[mdw-type="list"] {
|
|
623
|
-
max-block-size: 300px;
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
&[mdw-type="list"] {
|
|
629
|
-
-ms-overflow-style: -ms-autohiding-scrollbar;
|
|
630
|
-
overflow-y: auto;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
.mdw-textfield__label {
|
|
636
|
-
@include type.addRules('subtitle');
|
|
637
|
-
|
|
638
|
-
inset-block-start: 50%;
|
|
639
|
-
|
|
640
|
-
transform: translateY(-50%);
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
.mdw-textfield__outline-gap {
|
|
644
|
-
&::before {
|
|
645
|
-
inset-inline: 0 50%;
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
&::after {
|
|
649
|
-
inset-inline: 50% 0;
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
// Floating states:
|
|
654
|
-
// HTMLSelectElement, :focus, :autofill, or has texted (unfocused with placeholder)
|
|
655
|
-
|
|
656
|
-
select.mdw-textfield__input ~ .mdw-textfield__border,
|
|
657
|
-
.mdw-textfield__input:focus ~ .mdw-textfield__border,
|
|
658
|
-
.mdw-textfield__input:-webkit-autofill ~ .mdw-textfield__border,
|
|
659
|
-
.mdw-textfield__input:not(:placeholder-shown):not(:focus) ~ .mdw-textfield__border {
|
|
660
|
-
.mdw-textfield__label {
|
|
661
|
-
@include type.addRules('caption');
|
|
662
|
-
inset-block-start: 0;
|
|
663
|
-
|
|
664
|
-
transform: translateY(0);
|
|
665
|
-
|
|
666
|
-
.mdw-textfield[mdw-outlined] & {
|
|
667
|
-
transform: translateY(-50%);
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
.mdw-textfield__outline-gap {
|
|
672
|
-
&::before {
|
|
673
|
-
inset-inline: 0 100%;
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
&::after {
|
|
677
|
-
inset-inline: 100% 0;
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
// Invalid state
|
|
683
|
-
.mdw-textfield:active > .mdw-textfield__input:not(:disabled),
|
|
684
|
-
.mdw-textfield > .mdw-textfield__input:not(:disabled):focus {
|
|
685
|
-
&:invalid {
|
|
686
|
-
& ~ .mdw-textfield__border .mdw-textfield__outline-gap {
|
|
687
|
-
animation-name: labelShake;
|
|
688
|
-
animation-duration: motion.$shapeChangeDuration;
|
|
689
|
-
animation-timing-function: linear;
|
|
690
|
-
animation-delay: motion.$simpleDuration;
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
// Focus
|
|
696
|
-
.mdw-textfield:not([mdw-outlined]) {
|
|
697
|
-
&:active > .mdw-textfield__input:not(:disabled),
|
|
698
|
-
& > .mdw-textfield__input:not(:disabled):focus {
|
|
699
|
-
& ~ .mdw-textfield__border::before,
|
|
700
|
-
&:invalid ~ .mdw-textfield__border::after {
|
|
701
|
-
transition-duration: motion.$expandDuration;
|
|
702
|
-
transition-timing-function: motion.$decelerateEasing;
|
|
703
|
-
|
|
704
|
-
transform: scaleX(1) translateY(-$border-line-height * 0.5);
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
// Border change on outlined active or focus
|
|
710
|
-
.mdw-textfield[mdw-outlined]:active > .mdw-textfield__input:not(:disabled) ~ .mdw-textfield__border,
|
|
711
|
-
.mdw-textfield[mdw-outlined] > .mdw-textfield__input:not(:disabled):focus ~ .mdw-textfield__border {
|
|
712
|
-
border-width: $border-line-height__focused;
|
|
713
|
-
|
|
714
|
-
&::before {
|
|
715
|
-
min-inline-size: $outline-start-width - $border-line-height__focused;
|
|
716
|
-
margin-block-start: -$border-line-height__focused;
|
|
717
|
-
margin-inline: -$border-line-height__focused 0;
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
&::after {
|
|
721
|
-
min-inline-size: $outline-end-width - $border-line-height__focused;
|
|
722
|
-
margin-block-start: -$border-line-height__focused;
|
|
723
|
-
margin-inline: 0 -$border-line-height__focused;
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
.mdw-textfield__outline-gap {
|
|
727
|
-
margin-block: -$border-line-height__focused;
|
|
728
|
-
|
|
729
|
-
&::before,
|
|
730
|
-
&::after {
|
|
731
|
-
border-block-start-width: $border-line-height__focused;
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
// Invalid
|
|
737
|
-
.mdw-textfield__input:focus:invalid ~ .mdw-textfield__error-text {
|
|
738
|
-
transition-duration: motion.$fadeInDuration;
|
|
739
|
-
transition-property: transform, opacity;
|
|
740
|
-
transition-timing-function: motion.$decelerateEasing;
|
|
741
|
-
will-change: transform, opacity;
|
|
742
|
-
|
|
743
|
-
opacity: 1;
|
|
744
|
-
transform: translateY(0);
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
@keyframes labelShake {
|
|
748
|
-
0% {
|
|
749
|
-
transform: translateX(0);
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
33% {
|
|
753
|
-
transform: translateX(4px);
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
66% {
|
|
757
|
-
transform: translateX(-4px);
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
100% {
|
|
761
|
-
transform: translateX(0);
|
|
762
|
-
}
|
|
763
|
-
}
|