1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | @use 'sass:math';
|
24 | @use 'sass:color';
|
25 | @use '@material/density/variables' as density-variables;
|
26 | @use '@material/floating-label/variables' as floating-label-variables;
|
27 | @use '@material/notched-outline/variables' as notched-outline-variables;
|
28 | @use '@material/theme/theme-color';
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 | @function get-outlined-label-position-y($text-field-height) {
|
37 | @return math.div($text-field-height, 2) +
|
38 | math.div(notched-outline-variables.$label-box-height, 2);
|
39 | }
|
40 |
|
41 | $error: error !default;
|
42 | $disabled-border: rgba(theme-color.prop-value(on-surface), 0.06) !default;
|
43 | $disabled-icon: rgba(theme-color.prop-value(on-surface), 0.3) !default;
|
44 | $bottom-line-hover: rgba(theme-color.prop-value(on-surface), 0.87) !default;
|
45 | $bottom-line-idle: rgba(theme-color.prop-value(on-surface), 0.42) !default;
|
46 | $label: rgba(theme-color.prop-value(on-surface), 0.6) !default;
|
47 |
|
48 | $ink-color: rgba(theme-color.prop-value(on-surface), 0.87) !default;
|
49 | $helper-text-color: rgba(theme-color.prop-value(on-surface), 0.6) !default;
|
50 | $icon-color: rgba(theme-color.prop-value(on-surface), 0.54) !default;
|
51 | $focused-label-color: rgba(theme-color.prop-value(primary), 0.87) !default;
|
52 | $placeholder-ink-color: rgba(theme-color.prop-value(on-surface), 0.54) !default;
|
53 | $affix-color: rgba(theme-color.prop-value(on-surface), 0.6) !default;
|
54 |
|
55 | $disabled-label-color: rgba(theme-color.prop-value(on-surface), 0.38) !default;
|
56 | $disabled-ink-color: rgba(theme-color.prop-value(on-surface), 0.38) !default;
|
57 | $disabled-placeholder-ink-color: rgba(
|
58 | theme-color.prop-value(on-surface),
|
59 | 0.38
|
60 | ) !default;
|
61 | $disabled-helper-text-color: rgba(
|
62 | theme-color.prop-value(on-surface),
|
63 | 0.38
|
64 | ) !default;
|
65 | $disabled-affix-color: rgba(theme-color.prop-value(on-surface), 0.38) !default;
|
66 |
|
67 | $background: color.mix(
|
68 | theme-color.prop-value(on-surface),
|
69 | theme-color.prop-value(surface),
|
70 | 4%
|
71 | ) !default;
|
72 | $disabled-background: color.mix(
|
73 | theme-color.prop-value(on-surface),
|
74 | theme-color.prop-value(surface),
|
75 | 2%
|
76 | ) !default;
|
77 | $secondary-text: rgba(theme-color.prop-value(on-surface), 0.6) !default;
|
78 |
|
79 | $outlined-idle-border: rgba(theme-color.prop-value(on-surface), 0.38) !default;
|
80 | $outlined-disabled-border: rgba(
|
81 | theme-color.prop-value(on-surface),
|
82 | 0.06
|
83 | ) !default;
|
84 | $outlined-hover-border: rgba(theme-color.prop-value(on-surface), 0.87) !default;
|
85 |
|
86 | $textarea-border: rgba(theme-color.prop-value(on-surface), 0.73) !default;
|
87 | $textarea-background: rgba(theme-color.prop-value(surface), 1) !default;
|
88 | $textarea-disabled-border-color: rgba(
|
89 | theme-color.prop-value(on-surface),
|
90 | 0.26
|
91 | ) !default;
|
92 |
|
93 |
|
94 | $textarea-disabled-background: rgba(249, 249, 249, 1) !default;
|
95 |
|
96 | $ripple-target: '.mdc-text-field__ripple';
|
97 | $outlined-stroke-width: 2px !default;
|
98 | $height: 56px !default;
|
99 | $minimum-height: 40px !default;
|
100 | $minimum-height-for-filled-label: 52px !default;
|
101 | $maximum-height: $height !default;
|
102 | $padding-horizontal: 16px !default;
|
103 | $density-scale: density-variables.$default-scale !default;
|
104 | $density-config: (
|
105 | height: (
|
106 | default: $height,
|
107 | maximum: $maximum-height,
|
108 | minimum: $minimum-height,
|
109 | ),
|
110 | ) !default;
|
111 | $shape-radius: small !default;
|
112 | $label-position-y: floating-label-variables.$position-y !default;
|
113 | $label-offset: 16px !default;
|
114 |
|
115 |
|
116 |
|
117 |
|
118 | $outlined-label-position-y: get-outlined-label-position-y($height) !default;
|
119 | $outlined-with-leading-icon-label-position-x: 32px !default;
|
120 | $textarea-outlined-label-position-y: 24.75px !default;
|
121 | $textarea-filled-label-position-y: 10.25px !default;
|
122 | $helper-line-padding: 16px !default;
|
123 | $filled-baseline-top: 40px !default;
|
124 | $input-height: 28px !default;
|
125 | $textarea-label-top: 19px !default;
|
126 | $textarea-outlined-label-top: $textarea-label-top -
|
127 | notched-outline-variables.$border-width !default;
|
128 | $textarea-line-height: 1.5rem !default;
|
129 | $textarea-input-handle-margin: 1px !default;
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 | $textarea-outlined-input-margin-top: 16px !default;
|
137 | $textarea-outlined-input-margin-bottom: 16px !default;
|
138 | $textarea-outlined-density-config: (
|
139 | margin-top: (
|
140 | default: $textarea-outlined-input-margin-top,
|
141 | maximum: $textarea-outlined-input-margin-top,
|
142 | minimum: $textarea-outlined-input-margin-top - 8,
|
143 | ),
|
144 | margin-bottom: (
|
145 | default: $textarea-outlined-input-margin-bottom,
|
146 | maximum: $textarea-outlined-input-margin-bottom,
|
147 | minimum: $textarea-outlined-input-margin-bottom - 8,
|
148 | ),
|
149 | ) !default;
|
150 | $textarea-outlined-label-density-config: (
|
151 | top: (
|
152 | default: $textarea-outlined-label-top,
|
153 | maximum: $textarea-outlined-label-top,
|
154 | minimum: $textarea-outlined-label-top - 8,
|
155 | ),
|
156 | ) !default;
|
157 | $textarea-filled-input-margin-top: 23px !default;
|
158 | $textarea-filled-input-margin-bottom: 9px !default;
|
159 | $textarea-filled-density-config: (
|
160 | margin-bottom: (
|
161 | default: $textarea-filled-input-margin-bottom,
|
162 | maximum: $textarea-filled-input-margin-bottom,
|
163 | minimum: $textarea-filled-input-margin-bottom - 4,
|
164 | ),
|
165 | ) !default;
|
166 | $textarea-filled-label-density-config: (
|
167 | top: (
|
168 | default: $textarea-label-top,
|
169 | maximum: $textarea-label-top,
|
170 | minimum: $textarea-label-top - 2,
|
171 | ),
|
172 | ) !default;
|
173 | $textarea-filled-no-label-input-margin-top: 16px !default;
|
174 | $textarea-filled-no-label-input-margin-bottom: 16px !default;
|
175 | $textarea-filled-no-label-density-config: (
|
176 | margin-top: (
|
177 | default: $textarea-filled-no-label-input-margin-top,
|
178 | maximum: $textarea-filled-no-label-input-margin-top,
|
179 | minimum: $textarea-filled-no-label-input-margin-top - 8,
|
180 | ),
|
181 | margin-bottom: (
|
182 | default: $textarea-filled-no-label-input-margin-bottom,
|
183 | maximum: $textarea-filled-no-label-input-margin-bottom,
|
184 | minimum: $textarea-filled-no-label-input-margin-bottom - 8,
|
185 | ),
|
186 | ) !default;
|
187 | $textarea-internal-counter-input-margin-bottom: 2px !default;
|
188 | $textarea-internal-counter-baseline-bottom: 16px !default;
|
189 |
|
190 |
|
191 | $prefix-padding: 2px !default;
|
192 | $prefix-end-aligned-padding: 12px !default;
|
193 | $suffix-padding: 12px !default;
|
194 | $suffix-end-aligned-padding: 2px !default;
|