@shortfuse/materialdesignweb 0.4.0 → 0.5.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/.browserslistrc +2 -1
- package/.eslintrc.json +59 -8
- package/.stylelintrc.json +94 -49
- package/CHANGELOG.md +12 -0
- package/README.md +1 -3
- package/adapters/datatable/column.js +27 -54
- package/adapters/datatable/index.js +69 -81
- package/adapters/dom/index.js +32 -47
- package/adapters/search/index.js +107 -133
- package/components/appbar/_spec.scss +77 -137
- package/components/banner/_spec.scss +28 -63
- package/components/bottomnav/_spec.scss +46 -54
- package/components/bottomnav/index.js +15 -20
- package/components/bottomnav/item.js +4 -5
- package/components/button/README.md +1 -1
- package/components/button/_spec.scss +43 -42
- package/components/button/_theme.scss +27 -50
- package/components/card/_spec.scss +61 -69
- package/components/chip/_spec.scss +21 -44
- package/components/chip/_theme.scss +79 -151
- package/components/chip/index.js +6 -4
- package/components/datatable/_spec.scss +36 -99
- package/components/datatable/_theme.scss +98 -124
- package/components/datatable/cell.js +1 -2
- package/components/datatable/columnheader.js +1 -2
- package/components/datatable/index.js +33 -47
- package/components/datatable/row.js +4 -5
- package/components/dialog/_spec.scss +53 -63
- package/components/dialog/_theme.scss +7 -0
- package/components/dialog/index.js +62 -88
- package/components/divider/_spec.scss +6 -8
- package/components/elevation/_spec.scss +1 -1
- package/components/fab/_spec.scss +30 -42
- package/components/fab/index.js +4 -8
- package/components/grid/_spec.scss +68 -211
- package/components/layout/_mixins.scss +0 -22
- package/components/layout/_spec.scss +267 -363
- package/components/layout/_theme.scss +10 -35
- package/components/layout/index.js +40 -50
- package/components/list/_spec.scss +57 -91
- package/components/list/_theme.scss +75 -84
- package/components/list/content.js +9 -13
- package/components/list/index.js +34 -38
- package/components/list/item.js +8 -11
- package/components/list/secondary.js +8 -9
- package/components/menu/_spec.scss +134 -167
- package/components/menu/index.js +45 -61
- package/components/menu/item.js +11 -19
- package/components/progress/_spec.scss +43 -34
- package/components/selection/_spec.scss +123 -133
- package/components/selection/_theme.scss +88 -120
- package/components/selection/index.js +9 -15
- package/components/selection/input.js +3 -5
- package/components/selection/radiogroup.js +8 -15
- package/components/slider/_spec.scss +23 -28
- package/components/snackbar/_spec.scss +17 -62
- package/components/snackbar/index.js +15 -21
- package/components/tab/_spec.scss +35 -50
- package/components/tab/content.js +33 -28
- package/components/tab/index.js +30 -33
- package/components/tab/item.js +4 -5
- package/components/tab/list.js +22 -36
- package/components/textfield/README.md +2 -2
- package/components/textfield/_spec.scss +241 -287
- package/components/textfield/_theme.scss +197 -232
- package/components/textfield/index.js +8 -16
- package/components/tooltip/_spec.scss +23 -26
- package/components/type/_spec.scss +19 -16
- package/core/_breakpoint.scss +33 -33
- package/core/_elevation.scss +40 -0
- package/core/_length.scss +0 -1
- package/core/_platform.scss +0 -22
- package/core/_type.scss +7 -6
- package/core/aria/button.js +4 -5
- package/core/aria/keyboard.js +1 -2
- package/core/aria/rovingtabindex.js +14 -17
- package/core/aria/tab.js +1 -2
- package/core/dom.js +18 -109
- package/core/overlay/_spec.scss +5 -8
- package/core/overlay/_theme.scss +126 -150
- package/core/overlay/index.js +19 -32
- package/core/ripple/_spec.scss +16 -17
- package/core/ripple/_theme.scss +13 -33
- package/core/ripple/index.js +36 -44
- package/core/theme/_aliases.scss +15 -0
- package/core/theme/_config.scss +8 -2
- package/core/theme/_functions.scss +22 -0
- package/core/theme/_palettes.scss +0 -1
- package/core/{color → theme}/_spec.scss +0 -0
- package/core/theme/_theme.scss +268 -0
- package/core/theme/index.scss +4 -0
- package/core/transition/index.js +73 -76
- package/docs/_flex.scss +7 -1
- package/docs/_menuoptions.js +2 -2
- package/docs/_partials/_appbar.eta +12 -14
- package/docs/_partials/_header.eta +41 -44
- package/docs/_sample-utils.js +15 -20
- package/docs/docs.scss +123 -87
- package/docs/framework.scss +26 -0
- package/docs/index.eta +2 -6
- package/docs/index.js +7 -0
- package/docs/pages/appbar.eta +22 -28
- package/docs/pages/bottomnav.js +17 -14
- package/docs/pages/button.js +10 -10
- package/docs/pages/card.js +20 -22
- package/docs/pages/chip.js +11 -13
- package/docs/pages/color.js +35 -36
- package/docs/pages/datatable.js +11 -15
- package/docs/pages/dialog.eta +9 -11
- package/docs/pages/dialog.js +6 -9
- package/docs/pages/dom.js +6 -9
- package/docs/pages/elevation.eta +10 -10
- package/docs/pages/fab.js +2 -3
- package/docs/pages/grid.js +5 -5
- package/docs/pages/list.js +1 -2
- package/docs/pages/menu.eta +17 -19
- package/docs/pages/menu.js +7 -11
- package/docs/pages/overlay.js +1 -2
- package/docs/pages/progress.eta +2 -2
- package/docs/pages/progress.js +1 -1
- package/docs/pages/ripple.js +1 -2
- package/docs/pages/search.eta +20 -24
- package/docs/pages/search.js +24 -41
- package/docs/pages/selection.eta +2 -6
- package/docs/pages/selection.js +3 -4
- package/docs/pages/snackbar.js +3 -4
- package/docs/pages/tab.eta +61 -75
- package/docs/pages/tab.js +16 -15
- package/docs/pages/textfield.eta +9 -8
- package/docs/pages/textfield.js +26 -23
- package/docs/pages/tooltip.eta +10 -12
- package/docs/pages/transition.js +5 -7
- package/docs/postrender.js +7 -5
- package/docs/pwa/pwa.eta +14 -16
- package/docs/pwa/pwa.js +19 -27
- package/docs/pwa/pwa.scss +12 -7
- package/docs/themes/theme-colored.scss +9 -11
- package/docs/themes/theme-default.scss +0 -14
- package/index.scss +27 -0
- package/jsconfig.json +7 -3
- package/package.json +26 -15
- package/tsconfig.json +16 -0
- package/{webpack.config.cjs → webpack.config.js} +105 -58
- package/components/template/_theme.scss +0 -27
- package/components/textfield/_mixins.scss +0 -52
- package/core/color/_theme.scss +0 -390
- package/core/color/index.scss +0 -2
- package/core/theme/_mixins.scss +0 -172
- package/core/theme/_variables.scss +0 -24
- package/docs/_mixins.pug +0 -155
- package/docs/pages/appbar.pug +0 -78
- package/docs/pages/bottomnav.pug +0 -137
- package/docs/pages/button.pug +0 -121
- package/docs/pages/card.pug +0 -74
- package/docs/pages/chip.pug +0 -91
- package/docs/pages/color.pug +0 -121
- package/docs/pages/datatable.pug +0 -283
- package/docs/pages/dialog.pug +0 -132
- package/docs/pages/dom.pug +0 -22
- package/docs/pages/elevation.pug +0 -25
- package/docs/pages/fab.pug +0 -66
- package/docs/pages/grid.pug +0 -95
- package/docs/pages/layout.pug +0 -7
- package/docs/pages/list.pug +0 -326
- package/docs/pages/menu.pug +0 -205
- package/docs/pages/overlay.pug +0 -55
- package/docs/pages/progress.pug +0 -16
- package/docs/pages/ripple.pug +0 -21
- package/docs/pages/search.pug +0 -165
- package/docs/pages/selection.pug +0 -74
- package/docs/pages/slider.pug +0 -17
- package/docs/pages/snackbar.pug +0 -60
- package/docs/pages/tab.pug +0 -304
- package/docs/pages/textfield.pug +0 -360
- package/docs/pages/tooltip.pug +0 -78
- package/docs/pages/transition.pug +0 -76
- package/docs/pages/type.pug +0 -29
- package/docs/pwa/_dialogs.pug +0 -96
- package/docs/pwa/_menus.pug +0 -11
- package/docs/pwa/pwa.pug +0 -325
- package/docs/spec.scss +0 -26
- package/docs/themes/_component-themes.scss +0 -26
- package/docs/themes/theme-colored-fallbacks.scss +0 -17
- package/docs/themes/theme-default-fallbacks.scss +0 -17
|
@@ -1,28 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
1
|
+
/** eslint-env node */
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import { readdirSync, statSync } from 'node:fs';
|
|
4
|
+
import { join as joinPath, dirname as parseDirname, resolve as resolvePath } from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const isProduction = (process.env.NODE_ENV === 'production');
|
|
7
|
+
import * as eta from 'eta';
|
|
8
|
+
import sass from 'sass';
|
|
9
|
+
import TerserPlugin from 'terser-webpack-plugin';
|
|
10
|
+
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
|
|
12
11
|
|
|
13
12
|
/** @typedef {import('webpack').Configuration} WebpackConfiguration */
|
|
13
|
+
/** @typedef {import('webpack-dev-server').Configuration} DevServerConfiguration */
|
|
14
|
+
|
|
15
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
16
|
+
const __dirname = parseDirname(fileURLToPath(import.meta.url));
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @param {Record<string,string[]>} object
|
|
20
|
+
* @param {string} key
|
|
21
|
+
* @param {string} entry
|
|
22
|
+
* @return {void}
|
|
23
|
+
*/
|
|
24
|
+
function addEntry(object, key, entry) {
|
|
25
|
+
if (!object[key]) {
|
|
26
|
+
object[key] = [entry];
|
|
27
|
+
} else if (!object[key].includes(entry)) {
|
|
28
|
+
object[key].push(entry);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
14
31
|
|
|
15
32
|
/**
|
|
16
33
|
* @param {Object<string,string>} env
|
|
17
34
|
* @return {Object}
|
|
18
35
|
*/
|
|
19
36
|
function getComponentsConfig(env) {
|
|
37
|
+
const isProduction = env.prod != null || (process.env.NODE_ENV === 'production');
|
|
20
38
|
const DEST = (isProduction ? 'dist/full' : 'test/full');
|
|
21
39
|
return {
|
|
22
40
|
entry: {
|
|
23
41
|
materialdesignweb: [
|
|
24
|
-
|
|
25
|
-
|
|
42
|
+
resolvePath(__dirname, './index.js'),
|
|
43
|
+
resolvePath(__dirname, './index.scss'),
|
|
26
44
|
],
|
|
27
45
|
},
|
|
28
46
|
mode: process.env.NODE_ENV || 'development',
|
|
@@ -32,7 +50,7 @@ function getComponentsConfig(env) {
|
|
|
32
50
|
},
|
|
33
51
|
output: {
|
|
34
52
|
filename: 'materialdesignweb.min.js',
|
|
35
|
-
path:
|
|
53
|
+
path: resolvePath(__dirname, DEST),
|
|
36
54
|
},
|
|
37
55
|
plugins: [
|
|
38
56
|
new BundleAnalyzerPlugin({
|
|
@@ -78,7 +96,9 @@ function getComponentsConfig(env) {
|
|
|
78
96
|
* @param {Object<string,string>} env
|
|
79
97
|
* @return {WebpackConfiguration}
|
|
80
98
|
*/
|
|
81
|
-
function getDocsConfig(env) {
|
|
99
|
+
export default function getDocsConfig(env) {
|
|
100
|
+
const isProduction = env.prod != null || (process.env.NODE_ENV === 'production');
|
|
101
|
+
const DEST = (isProduction ? 'dist/docs' : 'test/docs');
|
|
82
102
|
const plugins = [
|
|
83
103
|
new BundleAnalyzerPlugin({
|
|
84
104
|
analyzerMode: 'static',
|
|
@@ -88,40 +108,64 @@ function getDocsConfig(env) {
|
|
|
88
108
|
logLevel: 'error',
|
|
89
109
|
}),
|
|
90
110
|
];
|
|
91
|
-
/** @type {
|
|
111
|
+
/** @type {Record<string, string[]>} */
|
|
92
112
|
const entries = {};
|
|
93
|
-
['.', 'pwa', 'pages', 'themes']
|
|
94
|
-
|
|
113
|
+
for (const folder of ['.', 'pwa', 'pages', 'themes']) {
|
|
114
|
+
const folderPath = joinPath('./docs', folder);
|
|
115
|
+
for (const filename of readdirSync(folderPath)) {
|
|
95
116
|
if (filename[0] === '_') {
|
|
96
|
-
|
|
117
|
+
continue;
|
|
97
118
|
}
|
|
98
|
-
if (filename.endsWith('.pug'))
|
|
99
|
-
if (
|
|
100
|
-
|
|
119
|
+
if (filename.endsWith('.pug')) continue;
|
|
120
|
+
if (statSync(joinPath(folderPath, filename)).isDirectory()) {
|
|
121
|
+
continue;
|
|
101
122
|
}
|
|
102
|
-
const noExt = filename.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
const
|
|
123
|
+
const noExt = filename.slice(0, filename.lastIndexOf('.'));
|
|
124
|
+
const fullPath = resolvePath(folderPath, filename);
|
|
125
|
+
addEntry(entries, `${noExt}`, fullPath);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const etaLoader = {
|
|
130
|
+
loader: 'html-loader',
|
|
131
|
+
options: {
|
|
132
|
+
minimize: {
|
|
133
|
+
collapseBooleanAttributes: true,
|
|
134
|
+
minifyCSS: true,
|
|
135
|
+
removeAttributeQuotes: true,
|
|
136
|
+
removeComments: true,
|
|
137
|
+
},
|
|
138
|
+
sources: false,
|
|
139
|
+
preprocessor(content, loaderContext) {
|
|
140
|
+
return eta.render(content, {}, {
|
|
141
|
+
cache: false,
|
|
142
|
+
filename: loaderContext.resourcePath,
|
|
143
|
+
plugins: [{
|
|
144
|
+
processTemplate: (str, config) => {
|
|
145
|
+
loaderContext.addDependency(config.filename);
|
|
146
|
+
return str;
|
|
147
|
+
},
|
|
148
|
+
}],
|
|
149
|
+
});
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
};
|
|
109
153
|
|
|
110
|
-
let port = parseInt(env.port ?? process.env.port, 10);
|
|
154
|
+
let port = Number.parseInt(env.port ?? process.env.port, 10);
|
|
111
155
|
if (Number.isNaN(port)) {
|
|
112
156
|
port = 8080;
|
|
113
157
|
}
|
|
114
158
|
|
|
115
|
-
/** @type {WebpackConfiguration} */
|
|
159
|
+
/** @type {WebpackConfiguration & {devServer: DevServerConfiguration}} */
|
|
116
160
|
const webpackConfig = {
|
|
117
161
|
entry: entries,
|
|
118
|
-
context:
|
|
162
|
+
context: resolvePath(__dirname, 'docs'),
|
|
119
163
|
devtool: isProduction ? 'source-map' : 'nosources-source-map',
|
|
120
|
-
mode:
|
|
164
|
+
mode: isProduction ? 'production' : 'development',
|
|
121
165
|
devServer: {
|
|
122
166
|
host: '0.0.0.0',
|
|
123
167
|
port,
|
|
124
|
-
// static:
|
|
168
|
+
// static: resolvePath(__dirname, DEST),
|
|
125
169
|
compress: true,
|
|
126
170
|
hot: false,
|
|
127
171
|
liveReload: false,
|
|
@@ -130,16 +174,21 @@ function getDocsConfig(env) {
|
|
|
130
174
|
output: {
|
|
131
175
|
filename: '[name].min.js',
|
|
132
176
|
chunkFilename: '[name].min.js',
|
|
133
|
-
path:
|
|
177
|
+
path: resolvePath(__dirname, DEST),
|
|
178
|
+
clean: true,
|
|
134
179
|
},
|
|
135
180
|
optimization: {
|
|
181
|
+
minimize: isProduction,
|
|
182
|
+
minimizer: [new TerserPlugin({
|
|
183
|
+
extractComments: false,
|
|
184
|
+
})],
|
|
136
185
|
usedExports: true,
|
|
137
186
|
splitChunks: {
|
|
138
187
|
chunks: 'all',
|
|
139
188
|
cacheGroups: {
|
|
140
189
|
framework: {
|
|
141
190
|
test(module, chunks) {
|
|
142
|
-
if (module && module.resource && module.resource
|
|
191
|
+
if (module && module.resource && /prerender/.test(module.resource)) {
|
|
143
192
|
return false;
|
|
144
193
|
}
|
|
145
194
|
/** @type {import('webpack').ChunkGraph} */
|
|
@@ -148,10 +197,10 @@ function getDocsConfig(env) {
|
|
|
148
197
|
if (chunkGraph && [...chunkGraph.getModuleChunksIterable(module)]?.some((chunk) => chunk.name.match(/prerender/))) {
|
|
149
198
|
return false;
|
|
150
199
|
}
|
|
151
|
-
if (module && module.resource &&
|
|
200
|
+
if (module && module.resource && /[/\\]docs[/\\]/.test(module.resource)) {
|
|
152
201
|
return false;
|
|
153
202
|
}
|
|
154
|
-
if (module && module.resource &&
|
|
203
|
+
if (module && module.resource && /[/\\](components|core|adapters)[/\\]/.test(module.resource)) {
|
|
155
204
|
return true;
|
|
156
205
|
}
|
|
157
206
|
return false;
|
|
@@ -165,7 +214,7 @@ function getDocsConfig(env) {
|
|
|
165
214
|
},
|
|
166
215
|
default: {
|
|
167
216
|
test(module, chunks) {
|
|
168
|
-
if (module && module.resource && module.resource
|
|
217
|
+
if (module && module.resource && /prerender/.test(module.resource)) {
|
|
169
218
|
return false;
|
|
170
219
|
}
|
|
171
220
|
/** @type {import('webpack').ChunkGraph} */
|
|
@@ -173,7 +222,7 @@ function getDocsConfig(env) {
|
|
|
173
222
|
if (chunkGraph && [...chunkGraph.getModuleChunksIterable(module)]?.some((chunk) => chunk.name.match(/prerender/))) {
|
|
174
223
|
return false;
|
|
175
224
|
}
|
|
176
|
-
if (module && module.resource &&
|
|
225
|
+
if (module && module.resource && /[/\\]docs[/\\]/.test(module.resource)) {
|
|
177
226
|
return true;
|
|
178
227
|
}
|
|
179
228
|
return false;
|
|
@@ -191,19 +240,30 @@ function getDocsConfig(env) {
|
|
|
191
240
|
module: {
|
|
192
241
|
rules: [{
|
|
193
242
|
test: /\.js$/,
|
|
243
|
+
resolve: { fullySpecified: false },
|
|
194
244
|
exclude: /(node_modules|bower_components)/,
|
|
195
|
-
use: [
|
|
196
|
-
'babel-loader
|
|
197
|
-
|
|
245
|
+
use: [{
|
|
246
|
+
loader: 'babel-loader',
|
|
247
|
+
options: {
|
|
248
|
+
presets: ['@babel/preset-env'],
|
|
249
|
+
plugins: [
|
|
250
|
+
'@babel/plugin-proposal-optional-chaining',
|
|
251
|
+
'@babel/plugin-proposal-class-properties',
|
|
252
|
+
'@babel/plugin-proposal-private-methods',
|
|
253
|
+
'@babel/plugin-proposal-private-property-in-object',
|
|
254
|
+
],
|
|
255
|
+
},
|
|
256
|
+
}],
|
|
198
257
|
}, {
|
|
199
258
|
test: /\.scss$/,
|
|
200
259
|
use: [
|
|
201
260
|
'file-loader?name=[name].min.css',
|
|
202
261
|
'extract-loader',
|
|
203
|
-
'css-loader',
|
|
262
|
+
{ loader: 'css-loader', options: { sourceMap: false } },
|
|
204
263
|
{
|
|
205
264
|
loader: 'postcss-loader',
|
|
206
265
|
options: {
|
|
266
|
+
sourceMap: false,
|
|
207
267
|
postcssOptions: {
|
|
208
268
|
plugins: ['cssnano'],
|
|
209
269
|
},
|
|
@@ -212,6 +272,7 @@ function getDocsConfig(env) {
|
|
|
212
272
|
{
|
|
213
273
|
loader: 'sass-loader',
|
|
214
274
|
options: {
|
|
275
|
+
sourceMap: false,
|
|
215
276
|
implementation: sass,
|
|
216
277
|
},
|
|
217
278
|
},
|
|
@@ -221,19 +282,7 @@ function getDocsConfig(env) {
|
|
|
221
282
|
use: [
|
|
222
283
|
'file-loader?&name=[name].html',
|
|
223
284
|
'extract-loader',
|
|
224
|
-
|
|
225
|
-
loader: 'html-loader',
|
|
226
|
-
options: {
|
|
227
|
-
minimize: {
|
|
228
|
-
collapseBooleanAttributes: true,
|
|
229
|
-
minifyCSS: true,
|
|
230
|
-
},
|
|
231
|
-
attributes: false,
|
|
232
|
-
preprocessor(content, loaderContext) {
|
|
233
|
-
return eta.render(content, {}, { filename: loaderContext.resourcePath });
|
|
234
|
-
},
|
|
235
|
-
},
|
|
236
|
-
},
|
|
285
|
+
etaLoader,
|
|
237
286
|
],
|
|
238
287
|
}],
|
|
239
288
|
},
|
|
@@ -246,12 +295,10 @@ function getDocsConfig(env) {
|
|
|
246
295
|
* @param {Object<string,string>} env
|
|
247
296
|
* @return {WebpackConfiguration}
|
|
248
297
|
*/
|
|
249
|
-
function makeWebPackConfig(env = {}) {
|
|
298
|
+
export function makeWebPackConfig(env = {}) {
|
|
250
299
|
const target = env.target || process.env.target;
|
|
251
300
|
if (target === 'docs') {
|
|
252
301
|
return getDocsConfig(env);
|
|
253
302
|
}
|
|
254
303
|
return getComponentsConfig(env);
|
|
255
304
|
}
|
|
256
|
-
|
|
257
|
-
module.exports = makeWebPackConfig;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
@use '../../core/theme/_mixins.scss' as theme;
|
|
2
|
-
|
|
3
|
-
$themeValues: (
|
|
4
|
-
text-color: (('foreground-light', 0.87), ('foreground-dark', 1.00)),
|
|
5
|
-
border-color: (('primary', '700', 0.87), ('primary', '200', 1.0)),
|
|
6
|
-
) !default;
|
|
7
|
-
|
|
8
|
-
@function getThemeValue($key, $type) {
|
|
9
|
-
@return theme.getThemeValue('template', $themeValues, $key, $type);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
@mixin addThemeRules($theme: null) {
|
|
13
|
-
.mdw-template[mdw-surface] {
|
|
14
|
-
border-color: templateThemeValue('border-color', null);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@include theme.addComponentFallbackRules('light') {
|
|
19
|
-
@include addThemeRules('light');
|
|
20
|
-
}
|
|
21
|
-
@include theme.addComponentFallbackRules('dark') {
|
|
22
|
-
@include addThemeRules('dark');
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@include theme.addComponentCSSVariableRules('template', $themeValues) {
|
|
26
|
-
@include addThemeRules();
|
|
27
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
@use '../../core/_type.scss' as type;
|
|
2
|
-
|
|
3
|
-
@mixin centerLabel {
|
|
4
|
-
.mdw-textfield__label {
|
|
5
|
-
@include type.addRules('subtitle');
|
|
6
|
-
|
|
7
|
-
top: 50%;
|
|
8
|
-
|
|
9
|
-
transform: translateY(-50%);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.mdw-textfield__outline-gap {
|
|
13
|
-
&::before,
|
|
14
|
-
:root[dir="rtl"] &::after {
|
|
15
|
-
right: 50%;
|
|
16
|
-
left: 0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&::after,
|
|
20
|
-
:root[dir="rtl"] &::before {
|
|
21
|
-
right: 0;
|
|
22
|
-
left: 50%;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@mixin floatLabel {
|
|
28
|
-
.mdw-textfield__label {
|
|
29
|
-
@include type.addRules('caption');
|
|
30
|
-
top: 0;
|
|
31
|
-
|
|
32
|
-
transform: translateY(0);
|
|
33
|
-
|
|
34
|
-
.mdw-textfield[mdw-outlined] & {
|
|
35
|
-
transform: translateY(-50%);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.mdw-textfield__outline-gap {
|
|
40
|
-
&::before,
|
|
41
|
-
:root[dir="rtl"] &::after {
|
|
42
|
-
right: 100%;
|
|
43
|
-
left: 0;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&::after,
|
|
47
|
-
:root[dir="rtl"] &::before {
|
|
48
|
-
right: 0;
|
|
49
|
-
left: 100%;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|