@shortfuse/materialdesignweb 0.2.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 +188 -30
- package/.stylelintrc.json +643 -2
- package/.vscode/launch.json +20 -5
- package/.vscode/settings.json +3 -0
- package/CHANGELOG.md +36 -0
- package/README.md +82 -2
- package/adapters/datatable/column.js +176 -0
- package/adapters/datatable/index.js +253 -437
- package/adapters/dom/index.js +586 -0
- package/adapters/list/index.js +36 -113
- package/adapters/search/index.js +153 -180
- package/components/appbar/_spec.scss +165 -0
- package/components/appbar/_theme.scss +0 -0
- package/components/appbar/index.scss +2 -0
- package/components/banner/_spec.scss +83 -0
- package/components/banner/_theme.scss +0 -0
- package/components/banner/index.scss +2 -0
- package/components/bottomnav/README.md +4 -4
- package/components/bottomnav/_spec.scss +149 -0
- package/components/bottomnav/_theme.scss +0 -0
- package/components/bottomnav/index.js +100 -120
- package/components/bottomnav/index.scss +2 -0
- package/components/bottomnav/item.js +88 -0
- package/components/button/README.md +16 -22
- package/components/button/_spec.scss +162 -0
- package/components/button/_theme.scss +42 -0
- package/components/button/index.eta +32 -0
- package/components/button/index.js +37 -48
- package/components/button/index.pug +18 -0
- package/components/button/index.scss +2 -0
- package/components/card/_spec.scss +241 -0
- package/components/card/_theme.scss +0 -0
- package/components/card/index.scss +2 -0
- package/components/chip/_spec.scss +111 -0
- package/components/chip/_theme.scss +105 -0
- package/components/chip/index.js +23 -0
- package/components/chip/index.scss +2 -0
- package/components/chip/item.js +20 -0
- package/components/datatable/_spec.scss +225 -0
- package/components/datatable/_theme.scss +128 -0
- package/components/datatable/cell.js +44 -0
- package/components/datatable/columnheader.js +46 -0
- package/components/datatable/index.js +339 -443
- package/components/datatable/index.scss +2 -0
- package/components/datatable/row.js +48 -0
- package/components/datatable/rowheader.js +18 -0
- package/components/dialog/_spec.scss +203 -0
- package/components/dialog/_theme.scss +7 -0
- package/components/dialog/index.js +512 -437
- package/components/dialog/index.scss +2 -0
- package/components/divider/_spec.scss +11 -0
- package/components/divider/_theme.scss +0 -0
- package/components/divider/index.scss +2 -0
- package/components/elevation/_spec.scss +9 -0
- package/components/elevation/_theme.scss +0 -0
- package/components/elevation/index.scss +2 -0
- package/components/fab/{style.scss → _spec.scss} +104 -79
- package/components/fab/_theme.scss +0 -0
- package/components/fab/index.js +85 -79
- package/components/fab/index.scss +2 -0
- package/components/grid/_spec.scss +169 -0
- package/components/grid/_theme.scss +0 -0
- package/components/grid/index.scss +2 -0
- package/components/layout/_mixins.scss +11 -0
- package/components/layout/_spec.scss +916 -0
- package/components/layout/_theme.scss +19 -0
- package/components/layout/index.js +454 -0
- package/components/layout/index.scss +2 -0
- package/components/list/_spec.scss +363 -0
- package/components/list/_theme.scss +102 -0
- package/components/list/content.js +106 -0
- package/components/list/index.js +234 -79
- package/components/list/index.scss +2 -0
- package/components/list/item.js +167 -0
- package/components/list/secondary.js +45 -0
- package/components/menu/_spec.scss +329 -0
- package/components/menu/_theme.scss +0 -0
- package/components/menu/index.js +636 -651
- package/components/menu/index.scss +2 -0
- package/components/menu/item.js +231 -0
- package/components/progress/_spec.scss +156 -0
- package/components/progress/_theme.scss +0 -0
- package/components/progress/index.js +29 -13
- package/components/progress/index.scss +2 -0
- package/components/selection/_spec.scss +376 -0
- package/components/selection/_theme.scss +134 -0
- package/components/selection/index.eta +60 -0
- package/components/selection/index.js +70 -0
- package/components/selection/index.pug +30 -0
- package/components/selection/index.scss +2 -0
- package/components/selection/input.js +54 -0
- package/components/selection/radiogroup.js +40 -0
- package/components/slider/{style.scss → _spec.scss} +31 -34
- package/components/slider/_theme.scss +0 -0
- package/components/slider/index.scss +2 -0
- package/components/snackbar/_spec.scss +150 -0
- package/components/snackbar/_theme.scss +0 -0
- package/components/snackbar/index.js +293 -206
- package/components/snackbar/index.scss +2 -0
- package/components/tab/_spec.scss +220 -0
- package/components/tab/_theme.scss +0 -0
- package/components/tab/content.js +210 -0
- package/components/tab/index.js +229 -213
- package/components/tab/index.scss +2 -0
- package/components/tab/item.js +88 -0
- package/components/tab/list.js +196 -0
- package/components/tab/panel.js +54 -0
- package/components/textfield/README.md +4 -4
- package/components/textfield/_spec.scss +763 -0
- package/components/textfield/_theme.scss +264 -0
- package/components/textfield/index.eta +74 -0
- package/components/textfield/index.js +132 -138
- package/components/textfield/index.pug +30 -0
- package/components/textfield/index.scss +2 -0
- package/components/tooltip/_spec.scss +185 -0
- package/components/tooltip/_theme.scss +0 -0
- package/components/tooltip/index.scss +2 -0
- package/components/type/_spec.scss +227 -0
- package/components/type/_theme.scss +0 -0
- package/components/type/index.scss +2 -0
- package/core/_breakpoint.scss +189 -0
- package/core/_elevation.scss +78 -0
- package/core/_length.scss +8 -0
- package/core/_motion.scss +31 -0
- package/core/_platform.scss +12 -0
- package/core/_type.scss +128 -0
- package/core/aria/attributes.js +141 -0
- package/core/aria/button.js +49 -0
- package/core/aria/keyboard.js +92 -0
- package/core/aria/rovingtabindex.js +175 -0
- package/core/aria/tab.js +59 -0
- package/core/document/index.js +39 -0
- package/core/dom.js +180 -0
- package/core/overlay/_spec.scss +28 -0
- package/core/overlay/_theme.scss +147 -0
- package/core/overlay/index.js +95 -0
- package/core/overlay/index.scss +2 -0
- package/core/ripple/_spec.scss +196 -0
- package/core/ripple/_theme.scss +20 -0
- package/core/ripple/index.js +286 -0
- package/core/ripple/index.scss +2 -0
- package/core/theme/_aliases.scss +15 -0
- package/core/theme/_config.scss +8 -0
- package/core/theme/_functions.scss +22 -0
- package/{components/theming/palettes.scss → core/theme/_palettes.scss} +173 -151
- package/core/theme/_spec.scss +0 -0
- package/core/theme/_theme.scss +268 -0
- package/core/theme/index.js +50 -0
- package/core/theme/index.scss +4 -0
- package/core/throttler.js +42 -0
- package/core/transition/index.js +465 -0
- package/docs/_flex.scss +28 -0
- package/docs/_menuoptions.js +183 -0
- package/docs/_partials/_androidnavbar.eta +5 -0
- package/docs/_partials/_androidstatusbar.eta +13 -0
- package/docs/_partials/_appbar.eta +27 -0
- package/docs/_partials/_buttontest.eta +31 -0
- package/docs/_partials/_header.eta +146 -0
- package/docs/_partials/_navlistitem.eta +16 -0
- package/docs/_partials/_target.eta +1 -0
- package/docs/_sample-utils.js +88 -0
- package/docs/{src/storage.js → _storage.js} +0 -0
- package/docs/docs.scss +331 -0
- package/docs/framework.scss +26 -0
- package/docs/index.eta +12 -0
- package/docs/index.js +7 -0
- package/docs/pages/appbar.eta +108 -0
- package/docs/pages/appbar.js +0 -0
- package/docs/pages/bottomnav.eta +188 -0
- package/docs/pages/bottomnav.js +118 -0
- package/docs/pages/button.eta +124 -0
- package/docs/pages/button.js +224 -0
- package/docs/pages/card.eta +90 -0
- package/docs/pages/card.js +175 -0
- package/docs/pages/chip.eta +122 -0
- package/docs/pages/chip.js +80 -0
- package/docs/pages/color.eta +143 -0
- package/docs/pages/color.js +261 -0
- package/docs/pages/datatable.eta +323 -0
- package/docs/pages/datatable.js +160 -0
- package/docs/pages/dialog.eta +184 -0
- package/docs/{src/components → pages}/dialog.js +35 -48
- package/docs/pages/dom.eta +26 -0
- package/docs/pages/dom.js +140 -0
- package/docs/pages/elevation.eta +35 -0
- package/docs/pages/elevation.js +0 -0
- package/docs/pages/fab.eta +99 -0
- package/docs/{src/components → pages}/fab.js +6 -13
- package/docs/pages/grid.eta +135 -0
- package/docs/pages/grid.js +128 -0
- package/docs/pages/layout.eta +8 -0
- package/docs/pages/layout.js +0 -0
- package/docs/pages/list.eta +465 -0
- package/docs/pages/list.js +8 -0
- package/docs/pages/menu.eta +274 -0
- package/docs/{src/components → pages}/menu.js +26 -42
- package/docs/pages/overlay.eta +69 -0
- package/docs/pages/overlay.js +3 -0
- package/docs/pages/progress.eta +23 -0
- package/docs/{src/components → pages}/progress.js +2 -4
- package/docs/pages/ripple.eta +27 -0
- package/docs/pages/ripple.js +3 -0
- package/docs/pages/search.eta +242 -0
- package/docs/pages/search.js +226 -0
- package/docs/pages/selection.eta +107 -0
- package/docs/pages/selection.js +12 -0
- package/docs/pages/slider.eta +23 -0
- package/docs/pages/slider.js +0 -0
- package/docs/pages/snackbar.eta +83 -0
- package/docs/{src/components → pages}/snackbar.js +31 -36
- package/docs/pages/tab.eta +407 -0
- package/docs/pages/tab.js +152 -0
- package/docs/pages/textfield.eta +487 -0
- package/docs/{src/components → pages}/textfield.js +41 -45
- package/docs/pages/tooltip.eta +92 -0
- package/docs/pages/tooltip.js +0 -0
- package/docs/pages/transition.eta +117 -0
- package/docs/pages/transition.js +52 -0
- package/docs/pages/type.eta +31 -0
- package/docs/pages/type.js +0 -0
- package/docs/postrender.js +41 -0
- package/docs/prerender.js +16 -0
- package/docs/pwa/_dialogs.eta +143 -0
- package/docs/pwa/_menus.eta +16 -0
- package/docs/pwa/pwa-prerender.js +3 -0
- package/docs/pwa/pwa.eta +478 -0
- package/docs/pwa/pwa.js +298 -0
- package/docs/pwa/pwa.scss +31 -0
- package/docs/themes/theme-colored.scss +15 -0
- package/docs/themes/theme-default.scss +3 -0
- package/index.scss +27 -0
- package/jsconfig.json +8 -2
- package/package.json +54 -27
- package/scripts/deploy-docs.sh +9 -0
- package/templates/index.eta +2 -0
- package/templates/index.pug +3 -0
- package/tsconfig.json +16 -0
- package/utils/function.js +3 -0
- package/webpack.config.js +224 -68
- package/_index.scss +0 -4
- package/components/all-components.scss +0 -21
- package/components/bottomnav/style.scss +0 -190
- package/components/bottomnav/theming.scss +0 -76
- package/components/button/style.scss +0 -315
- package/components/button/theming.scss +0 -134
- package/components/card/style.scss +0 -175
- package/components/card/theming.scss +0 -43
- package/components/common/dom.js +0 -51
- package/components/common/functions.scss +0 -174
- package/components/common/mixins.scss +0 -122
- package/components/common/motion.scss +0 -36
- package/components/common/type.scss +0 -104
- package/components/common/variables.scss +0 -46
- package/components/datatable/style.scss +0 -257
- package/components/datatable/theming.scss +0 -119
- package/components/dialog/style.scss +0 -159
- package/components/dialog/theming.scss +0 -29
- package/components/divider/style.scss +0 -7
- package/components/divider/theming.scss +0 -20
- package/components/elevation/style.scss +0 -32
- package/components/layout/style.scss +0 -223
- package/components/list/style.scss +0 -358
- package/components/list/theming.scss +0 -83
- package/components/menu/style.scss +0 -280
- package/components/menu/theming.scss +0 -80
- package/components/navdrawer/index.js +0 -200
- package/components/navdrawer/style.scss +0 -595
- package/components/navdrawer/theming.scss +0 -62
- package/components/progress/style.scss +0 -136
- package/components/ripple/index.js +0 -63
- package/components/ripple/ripple.scss +0 -122
- package/components/selection/style.scss +0 -320
- package/components/selection/theming.scss +0 -98
- package/components/snackbar/style.scss +0 -212
- package/components/switch/style.scss +0 -3
- package/components/tab/style.scss +0 -275
- package/components/tab/theming.scss +0 -34
- package/components/template/theming.scss +0 -31
- package/components/textfield/style.scss +0 -795
- package/components/textfield/theming.scss +0 -256
- package/components/theming/globals.scss +0 -25
- package/components/theming/theming.scss +0 -559
- package/components/toolbar/style.scss +0 -190
- package/components/toolbar/theming.scss +0 -32
- package/components/tooltip/style.scss +0 -135
- package/components/type/style.scss +0 -167
- package/components/type/theming.scss +0 -25
- package/docs/bottomnav.html +0 -1
- package/docs/bottomnav.min.js +0 -2
- package/docs/bottomnav.min.js.map +0 -1
- package/docs/button.html +0 -1
- package/docs/button.min.js +0 -2
- package/docs/button.min.js.map +0 -1
- package/docs/card.html +0 -1
- package/docs/card.min.js +0 -2
- package/docs/card.min.js.map +0 -1
- package/docs/components.min.css +0 -1
- package/docs/components.min.js +0 -2
- package/docs/components.min.js.map +0 -1
- package/docs/datatable.html +0 -1
- package/docs/datatable.min.js +0 -2
- package/docs/datatable.min.js.map +0 -1
- package/docs/dialog.html +0 -1
- package/docs/dialog.min.js +0 -2
- package/docs/dialog.min.js.map +0 -1
- package/docs/docs.min.css +0 -1
- package/docs/docs.min.js +0 -2
- package/docs/docs.min.js.map +0 -1
- package/docs/elevation.html +0 -1
- package/docs/elevation.min.js +0 -2
- package/docs/elevation.min.js.map +0 -1
- package/docs/fab.html +0 -1
- package/docs/fab.min.js +0 -2
- package/docs/fab.min.js.map +0 -1
- package/docs/index.html +0 -1
- package/docs/index.min.js +0 -2
- package/docs/index.min.js.map +0 -1
- package/docs/layout.html +0 -1
- package/docs/layout.min.js +0 -2
- package/docs/layout.min.js.map +0 -1
- package/docs/list.html +0 -1
- package/docs/list.min.js +0 -2
- package/docs/list.min.js.map +0 -1
- package/docs/menu.html +0 -1
- package/docs/menu.min.js +0 -2
- package/docs/menu.min.js.map +0 -1
- package/docs/navdrawer.html +0 -1
- package/docs/navdrawer.min.js +0 -2
- package/docs/navdrawer.min.js.map +0 -1
- package/docs/prerender.min.js +0 -2
- package/docs/prerender.min.js.map +0 -1
- package/docs/progress.html +0 -1
- package/docs/progress.min.js +0 -2
- package/docs/progress.min.js.map +0 -1
- package/docs/search.html +0 -1
- package/docs/search.min.js +0 -2
- package/docs/search.min.js.map +0 -1
- package/docs/selection.html +0 -1
- package/docs/selection.min.js +0 -2
- package/docs/selection.min.js.map +0 -1
- package/docs/slider.html +0 -1
- package/docs/slider.min.js +0 -2
- package/docs/slider.min.js.map +0 -1
- package/docs/snackbar.html +0 -1
- package/docs/snackbar.min.js +0 -2
- package/docs/snackbar.min.js.map +0 -1
- package/docs/src/components/bottomnav.js +0 -16
- package/docs/src/components/bottomnav.pug +0 -112
- package/docs/src/components/button.js +0 -156
- package/docs/src/components/button.pug +0 -194
- package/docs/src/components/card.js +0 -136
- package/docs/src/components/card.pug +0 -133
- package/docs/src/components/datatable.js +0 -183
- package/docs/src/components/datatable.pug +0 -324
- package/docs/src/components/dialog.pug +0 -138
- package/docs/src/components/elevation.js +0 -3
- package/docs/src/components/elevation.pug +0 -17
- package/docs/src/components/fab.pug +0 -84
- package/docs/src/components/layout.js +0 -116
- package/docs/src/components/layout.pug +0 -104
- package/docs/src/components/list.js +0 -15
- package/docs/src/components/list.pug +0 -293
- package/docs/src/components/menu.pug +0 -292
- package/docs/src/components/navdrawer.js +0 -112
- package/docs/src/components/navdrawer.pug +0 -113
- package/docs/src/components/progress.pug +0 -17
- package/docs/src/components/search.js +0 -206
- package/docs/src/components/search.pug +0 -149
- package/docs/src/components/selection.js +0 -6
- package/docs/src/components/selection.pug +0 -116
- package/docs/src/components/slider.js +0 -3
- package/docs/src/components/slider.pug +0 -19
- package/docs/src/components/snackbar.pug +0 -145
- package/docs/src/components/tab.js +0 -137
- package/docs/src/components/tab.pug +0 -329
- package/docs/src/components/textfield.pug +0 -416
- package/docs/src/components/toolbar.js +0 -6
- package/docs/src/components/toolbar.pug +0 -86
- package/docs/src/components/tooltip.js +0 -6
- package/docs/src/components/tooltip.pug +0 -76
- package/docs/src/components/type.js +0 -6
- package/docs/src/components/type.pug +0 -34
- package/docs/src/components.scss +0 -1
- package/docs/src/docs.scss +0 -284
- package/docs/src/index.js +0 -3
- package/docs/src/index.pug +0 -6
- package/docs/src/menuoptions.js +0 -136
- package/docs/src/mixins.pug +0 -139
- package/docs/src/prerender.js +0 -26
- package/docs/src/sample-utils.js +0 -108
- package/docs/src/targetHandler.js +0 -50
- package/docs/src/theming.ie11.scss +0 -18
- package/docs/src/theming.scss +0 -18
- package/docs/tab.html +0 -1
- package/docs/tab.min.js +0 -2
- package/docs/tab.min.js.map +0 -1
- package/docs/textfield.html +0 -2
- package/docs/textfield.min.js +0 -2
- package/docs/textfield.min.js.map +0 -1
- package/docs/theming.ie11.min.css +0 -1
- package/docs/theming.ie11.min.js +0 -2
- package/docs/theming.ie11.min.js.map +0 -1
- package/docs/theming.min.css +0 -1
- package/docs/theming.min.js +0 -2
- package/docs/theming.min.js.map +0 -1
- package/docs/toolbar.html +0 -1
- package/docs/toolbar.min.js +0 -2
- package/docs/toolbar.min.js.map +0 -1
- package/docs/tooltip.html +0 -1
- package/docs/tooltip.min.js +0 -2
- package/docs/tooltip.min.js.map +0 -1
- package/docs/type.html +0 -1
- package/docs/type.min.js +0 -2
- package/docs/type.min.js.map +0 -1
- package/index.js +0 -16
package/webpack.config.js
CHANGED
|
@@ -1,26 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
const cssnano = require('cssnano');
|
|
4
|
-
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
|
1
|
+
/** eslint-env node */
|
|
5
2
|
|
|
6
|
-
|
|
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';
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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';
|
|
11
|
+
|
|
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
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @param {Object<string,string>} env
|
|
34
|
+
* @return {Object}
|
|
35
|
+
*/
|
|
36
|
+
function getComponentsConfig(env) {
|
|
37
|
+
const isProduction = env.prod != null || (process.env.NODE_ENV === 'production');
|
|
38
|
+
const DEST = (isProduction ? 'dist/full' : 'test/full');
|
|
11
39
|
return {
|
|
12
40
|
entry: {
|
|
13
41
|
materialdesignweb: [
|
|
14
|
-
|
|
15
|
-
|
|
42
|
+
resolvePath(__dirname, './index.js'),
|
|
43
|
+
resolvePath(__dirname, './index.scss'),
|
|
16
44
|
],
|
|
17
45
|
},
|
|
18
46
|
mode: process.env.NODE_ENV || 'development',
|
|
19
|
-
devtool:
|
|
47
|
+
devtool: 'nosources-source-map',
|
|
48
|
+
optimization: {
|
|
49
|
+
usedExports: false,
|
|
50
|
+
},
|
|
20
51
|
output: {
|
|
21
|
-
filename: '
|
|
22
|
-
path:
|
|
52
|
+
filename: 'materialdesignweb.min.js',
|
|
53
|
+
path: resolvePath(__dirname, DEST),
|
|
23
54
|
},
|
|
55
|
+
plugins: [
|
|
56
|
+
new BundleAnalyzerPlugin({
|
|
57
|
+
analyzerMode: 'static',
|
|
58
|
+
openAnalyzer: false,
|
|
59
|
+
generateStatsFile: false,
|
|
60
|
+
defaultSizes: 'gzip',
|
|
61
|
+
logLevel: 'error',
|
|
62
|
+
}),
|
|
63
|
+
],
|
|
24
64
|
module: {
|
|
25
65
|
rules: [{
|
|
26
66
|
test: /\.js$/,
|
|
@@ -36,113 +76,229 @@ function getComponentsConfig() {
|
|
|
36
76
|
}, {
|
|
37
77
|
test: /\.scss$/,
|
|
38
78
|
use: [
|
|
39
|
-
'file-loader?name=
|
|
79
|
+
'file-loader?name=materialdesignweb.min.css',
|
|
40
80
|
'extract-loader',
|
|
41
81
|
'css-loader?import=false',
|
|
82
|
+
'clean-css-loader?{"level":{2:{"restructureRules":true}}}',
|
|
42
83
|
{
|
|
43
|
-
loader: '
|
|
84
|
+
loader: 'sass-loader',
|
|
44
85
|
options: {
|
|
45
|
-
|
|
46
|
-
cssnano(),
|
|
47
|
-
],
|
|
86
|
+
implementation: sass,
|
|
48
87
|
},
|
|
49
88
|
},
|
|
50
|
-
'sass-loader',
|
|
51
89
|
],
|
|
52
90
|
}],
|
|
53
91
|
},
|
|
54
|
-
plugins: [
|
|
55
|
-
new UglifyJSPlugin(),
|
|
56
|
-
],
|
|
57
92
|
};
|
|
58
93
|
}
|
|
59
94
|
|
|
60
|
-
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
95
|
+
/**
|
|
96
|
+
* @param {Object<string,string>} env
|
|
97
|
+
* @return {WebpackConfiguration}
|
|
98
|
+
*/
|
|
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');
|
|
102
|
+
const plugins = [
|
|
103
|
+
new BundleAnalyzerPlugin({
|
|
104
|
+
analyzerMode: 'static',
|
|
105
|
+
openAnalyzer: false,
|
|
106
|
+
generateStatsFile: false,
|
|
107
|
+
defaultSizes: 'gzip',
|
|
108
|
+
logLevel: 'error',
|
|
109
|
+
}),
|
|
110
|
+
];
|
|
111
|
+
/** @type {Record<string, string[]>} */
|
|
112
|
+
const entries = {};
|
|
113
|
+
for (const folder of ['.', 'pwa', 'pages', 'themes']) {
|
|
114
|
+
const folderPath = joinPath('./docs', folder);
|
|
115
|
+
for (const filename of readdirSync(folderPath)) {
|
|
116
|
+
if (filename[0] === '_') {
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
if (filename.endsWith('.pug')) continue;
|
|
120
|
+
if (statSync(joinPath(folderPath, filename)).isDirectory()) {
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
const noExt = filename.slice(0, filename.lastIndexOf('.'));
|
|
124
|
+
const fullPath = resolvePath(folderPath, filename);
|
|
125
|
+
addEntry(entries, `${noExt}`, fullPath);
|
|
126
|
+
}
|
|
65
127
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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
|
+
},
|
|
73
152
|
};
|
|
74
|
-
fs.readdirSync('./docs/src/components/')
|
|
75
|
-
.forEach((filename) => {
|
|
76
|
-
const noExt = filename.substring(0, filename.lastIndexOf('.'));
|
|
77
|
-
if (!entries[`${noExt}`]) {
|
|
78
|
-
entries[`${noExt}`] = [];
|
|
79
|
-
}
|
|
80
|
-
entries[`${noExt}`].push(`./docs/src/components/${filename}`);
|
|
81
|
-
});
|
|
82
153
|
|
|
83
|
-
|
|
84
|
-
|
|
154
|
+
let port = Number.parseInt(env.port ?? process.env.port, 10);
|
|
155
|
+
if (Number.isNaN(port)) {
|
|
156
|
+
port = 8080;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/** @type {WebpackConfiguration & {devServer: DevServerConfiguration}} */
|
|
160
|
+
const webpackConfig = {
|
|
85
161
|
entry: entries,
|
|
162
|
+
context: resolvePath(__dirname, 'docs'),
|
|
86
163
|
devtool: isProduction ? 'source-map' : 'nosources-source-map',
|
|
87
|
-
mode:
|
|
164
|
+
mode: isProduction ? 'production' : 'development',
|
|
88
165
|
devServer: {
|
|
89
|
-
|
|
166
|
+
host: '0.0.0.0',
|
|
167
|
+
port,
|
|
168
|
+
// static: resolvePath(__dirname, DEST),
|
|
169
|
+
compress: true,
|
|
170
|
+
hot: false,
|
|
171
|
+
liveReload: false,
|
|
172
|
+
client: false,
|
|
90
173
|
},
|
|
91
174
|
output: {
|
|
92
175
|
filename: '[name].min.js',
|
|
93
|
-
|
|
176
|
+
chunkFilename: '[name].min.js',
|
|
177
|
+
path: resolvePath(__dirname, DEST),
|
|
178
|
+
clean: true,
|
|
179
|
+
},
|
|
180
|
+
optimization: {
|
|
181
|
+
minimize: isProduction,
|
|
182
|
+
minimizer: [new TerserPlugin({
|
|
183
|
+
extractComments: false,
|
|
184
|
+
})],
|
|
185
|
+
usedExports: true,
|
|
186
|
+
splitChunks: {
|
|
187
|
+
chunks: 'all',
|
|
188
|
+
cacheGroups: {
|
|
189
|
+
framework: {
|
|
190
|
+
test(module, chunks) {
|
|
191
|
+
if (module && module.resource && /prerender/.test(module.resource)) {
|
|
192
|
+
return false;
|
|
193
|
+
}
|
|
194
|
+
/** @type {import('webpack').ChunkGraph} */
|
|
195
|
+
const { chunkGraph } = chunks;
|
|
196
|
+
|
|
197
|
+
if (chunkGraph && [...chunkGraph.getModuleChunksIterable(module)]?.some((chunk) => chunk.name.match(/prerender/))) {
|
|
198
|
+
return false;
|
|
199
|
+
}
|
|
200
|
+
if (module && module.resource && /[/\\]docs[/\\]/.test(module.resource)) {
|
|
201
|
+
return false;
|
|
202
|
+
}
|
|
203
|
+
if (module && module.resource && /[/\\](components|core|adapters)[/\\]/.test(module.resource)) {
|
|
204
|
+
return true;
|
|
205
|
+
}
|
|
206
|
+
return false;
|
|
207
|
+
},
|
|
208
|
+
name: 'entire-framework',
|
|
209
|
+
minSize: 0,
|
|
210
|
+
minChunks: 1,
|
|
211
|
+
priority: 20,
|
|
212
|
+
chunks: 'all',
|
|
213
|
+
reuseExistingChunk: true,
|
|
214
|
+
},
|
|
215
|
+
default: {
|
|
216
|
+
test(module, chunks) {
|
|
217
|
+
if (module && module.resource && /prerender/.test(module.resource)) {
|
|
218
|
+
return false;
|
|
219
|
+
}
|
|
220
|
+
/** @type {import('webpack').ChunkGraph} */
|
|
221
|
+
const { chunkGraph } = chunks;
|
|
222
|
+
if (chunkGraph && [...chunkGraph.getModuleChunksIterable(module)]?.some((chunk) => chunk.name.match(/prerender/))) {
|
|
223
|
+
return false;
|
|
224
|
+
}
|
|
225
|
+
if (module && module.resource && /[/\\]docs[/\\]/.test(module.resource)) {
|
|
226
|
+
return true;
|
|
227
|
+
}
|
|
228
|
+
return false;
|
|
229
|
+
},
|
|
230
|
+
name: 'docs.common',
|
|
231
|
+
minSize: 0,
|
|
232
|
+
minChunks: 2,
|
|
233
|
+
priority: 0,
|
|
234
|
+
chunks: 'all',
|
|
235
|
+
reuseExistingChunk: true,
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
},
|
|
94
239
|
},
|
|
95
240
|
module: {
|
|
96
241
|
rules: [{
|
|
97
242
|
test: /\.js$/,
|
|
243
|
+
resolve: { fullySpecified: false },
|
|
98
244
|
exclude: /(node_modules|bower_components)/,
|
|
99
|
-
use: {
|
|
245
|
+
use: [{
|
|
100
246
|
loader: 'babel-loader',
|
|
101
247
|
options: {
|
|
102
|
-
presets: [
|
|
103
|
-
|
|
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',
|
|
104
254
|
],
|
|
105
255
|
},
|
|
106
|
-
},
|
|
256
|
+
}],
|
|
107
257
|
}, {
|
|
108
258
|
test: /\.scss$/,
|
|
109
259
|
use: [
|
|
110
260
|
'file-loader?name=[name].min.css',
|
|
111
261
|
'extract-loader',
|
|
112
|
-
'css-loader
|
|
262
|
+
{ loader: 'css-loader', options: { sourceMap: false } },
|
|
113
263
|
{
|
|
114
264
|
loader: 'postcss-loader',
|
|
115
265
|
options: {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
266
|
+
sourceMap: false,
|
|
267
|
+
postcssOptions: {
|
|
268
|
+
plugins: ['cssnano'],
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
loader: 'sass-loader',
|
|
274
|
+
options: {
|
|
275
|
+
sourceMap: false,
|
|
276
|
+
implementation: sass,
|
|
119
277
|
},
|
|
120
278
|
},
|
|
121
|
-
'sass-loader',
|
|
122
279
|
],
|
|
123
280
|
}, {
|
|
124
|
-
test: /\.
|
|
281
|
+
test: /\.eta$/,
|
|
125
282
|
use: [
|
|
126
|
-
'file-loader
|
|
283
|
+
'file-loader?&name=[name].html',
|
|
127
284
|
'extract-loader',
|
|
128
|
-
|
|
129
|
-
'pug-html-loader',
|
|
285
|
+
etaLoader,
|
|
130
286
|
],
|
|
131
287
|
}],
|
|
132
288
|
},
|
|
133
289
|
plugins,
|
|
134
290
|
};
|
|
291
|
+
return webpackConfig;
|
|
135
292
|
}
|
|
136
293
|
|
|
137
294
|
/**
|
|
138
|
-
* @param {Object} env
|
|
139
|
-
* @return {
|
|
295
|
+
* @param {Object<string,string>} env
|
|
296
|
+
* @return {WebpackConfiguration}
|
|
140
297
|
*/
|
|
141
|
-
function makeWebPackConfig(env = {}) {
|
|
142
|
-
|
|
143
|
-
|
|
298
|
+
export function makeWebPackConfig(env = {}) {
|
|
299
|
+
const target = env.target || process.env.target;
|
|
300
|
+
if (target === 'docs') {
|
|
301
|
+
return getDocsConfig(env);
|
|
144
302
|
}
|
|
145
|
-
return getComponentsConfig();
|
|
303
|
+
return getComponentsConfig(env);
|
|
146
304
|
}
|
|
147
|
-
|
|
148
|
-
module.exports = makeWebPackConfig;
|
package/_index.scss
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
@import './bottomnav/style.scss';
|
|
2
|
-
@import './button/style.scss';
|
|
3
|
-
@import './card/style.scss';
|
|
4
|
-
@import './datatable/style.scss';
|
|
5
|
-
@import './dialog/style.scss';
|
|
6
|
-
@import './divider/style.scss';
|
|
7
|
-
@import './elevation/style.scss';
|
|
8
|
-
@import './fab/style.scss';
|
|
9
|
-
@import './menu/style.scss';
|
|
10
|
-
@import './navdrawer/style.scss';
|
|
11
|
-
@import './layout/style.scss';
|
|
12
|
-
@import './list/style.scss';
|
|
13
|
-
@import './progress/style.scss';
|
|
14
|
-
@import './selection/style.scss';
|
|
15
|
-
@import './slider/style.scss';
|
|
16
|
-
@import './snackbar/style.scss';
|
|
17
|
-
@import './tab/style.scss';
|
|
18
|
-
@import './textfield/style.scss';
|
|
19
|
-
@import './toolbar/style.scss';
|
|
20
|
-
@import './tooltip/style.scss';
|
|
21
|
-
@import './type/style.scss';
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
// https://material.io/design/components/bottom-navigation.html#specs
|
|
2
|
-
|
|
3
|
-
@import '../ripple/ripple.scss';
|
|
4
|
-
@import '../common/functions.scss';
|
|
5
|
-
@import '../common/motion.scss';
|
|
6
|
-
@import '../common/variables.scss';
|
|
7
|
-
@import '../common//type.scss';
|
|
8
|
-
|
|
9
|
-
.mdw-bottomnav {
|
|
10
|
-
position: relative;
|
|
11
|
-
width: 100%;
|
|
12
|
-
min-height: dp(56);
|
|
13
|
-
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: row;
|
|
16
|
-
align-items: center;
|
|
17
|
-
justify-content: center;
|
|
18
|
-
|
|
19
|
-
box-shadow: elevation(8);
|
|
20
|
-
overflow: hidden;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.mdw-bottomnav__item {
|
|
24
|
-
position: relative;
|
|
25
|
-
min-width: dp(80);
|
|
26
|
-
max-width: dp(168);
|
|
27
|
-
margin: 0;
|
|
28
|
-
padding: 0;
|
|
29
|
-
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-direction: column;
|
|
32
|
-
flex: 1;
|
|
33
|
-
align-items: center;
|
|
34
|
-
justify-content: flex-start;
|
|
35
|
-
|
|
36
|
-
border-radius: 0;
|
|
37
|
-
box-shadow: none;
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
overflow: visible;
|
|
40
|
-
-moz-user-select: none;
|
|
41
|
-
-ms-user-select: none;
|
|
42
|
-
-webkit-user-select: none;
|
|
43
|
-
user-select: none;
|
|
44
|
-
-webkit-tap-highlight-color: transparent;
|
|
45
|
-
z-index: 0;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
> .mdw-ripple {
|
|
49
|
-
@include mdw-ripple__container;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
& > .mdw-ripple > .mdw-ripple__inner,
|
|
53
|
-
&::after {
|
|
54
|
-
@include mdw-ripple__inner;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
& > .mdw-ripple:active > .mdw-ripple__inner,
|
|
58
|
-
&:active::after {
|
|
59
|
-
@include mdw-ripple__active;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&[mdw-ripple] {
|
|
63
|
-
overflow: visible;
|
|
64
|
-
&::after {
|
|
65
|
-
// If using custom ripple, destroy ::after object
|
|
66
|
-
content: none;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.mdw-bottomnav__icon {
|
|
72
|
-
position: absolute;
|
|
73
|
-
top: 0;
|
|
74
|
-
left: 50%;
|
|
75
|
-
margin: 0;
|
|
76
|
-
margin-left: dp(-12);
|
|
77
|
-
padding: 0;
|
|
78
|
-
|
|
79
|
-
pointer-events: none;
|
|
80
|
-
transform: translateY(dp(8));
|
|
81
|
-
transition-property: transform, color;
|
|
82
|
-
transition-duration: 200ms;
|
|
83
|
-
transition-timing-function: $motion-easing-standard;
|
|
84
|
-
|
|
85
|
-
&:last-child {
|
|
86
|
-
// No label
|
|
87
|
-
transform: translateY(dp(16));
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.mdw-bottomnav__item[mdw-badge]::before {
|
|
92
|
-
content: attr(mdw-badge);
|
|
93
|
-
position: absolute;
|
|
94
|
-
top: 0;
|
|
95
|
-
left: 50%;
|
|
96
|
-
margin-left: dp(4);
|
|
97
|
-
padding: dp(2);
|
|
98
|
-
min-width: dp(8);
|
|
99
|
-
min-height: dp(8);
|
|
100
|
-
border-radius: dp(8);
|
|
101
|
-
box-sizing: border-box;
|
|
102
|
-
|
|
103
|
-
font-size: dp(10);
|
|
104
|
-
font-weight: $font-weight-regular;
|
|
105
|
-
letter-spacing: normal;
|
|
106
|
-
line-height: dp(12);
|
|
107
|
-
|
|
108
|
-
transition-property: transform;
|
|
109
|
-
transition-duration: 200ms;
|
|
110
|
-
transition-timing-function: $motion-easing-standard;
|
|
111
|
-
transform: translateY(dp(8));
|
|
112
|
-
|
|
113
|
-
z-index: 1;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.mdw-bottomnav__item[data-mdw-badge]::before {
|
|
117
|
-
content: attr(data-mdw-badge);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.mdw-bottomnav__label {
|
|
121
|
-
@include type-rules('caption');
|
|
122
|
-
@include baseline-top(56-12);
|
|
123
|
-
@include baseline-bottom(8);
|
|
124
|
-
|
|
125
|
-
// Overriding 12dp for baseline bottom with 8dp for oversized and textwrapped
|
|
126
|
-
// Baseline top will ensure baseline-bottom is 12dp for standard layouts
|
|
127
|
-
|
|
128
|
-
max-width: 100%;
|
|
129
|
-
box-sizing: border-box;
|
|
130
|
-
padding: 0 dp(12);
|
|
131
|
-
pointer-events: none;
|
|
132
|
-
transition-property: transform, opacity, color;
|
|
133
|
-
transition-duration: 200ms;
|
|
134
|
-
transition-timing-function: $motion-easing-standard;
|
|
135
|
-
text-align: center;
|
|
136
|
-
|
|
137
|
-
word-break: break-all;
|
|
138
|
-
word-break: break-word;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.mdw-bottomnav__input {
|
|
142
|
-
display: inline-block;
|
|
143
|
-
height: 0;
|
|
144
|
-
width: 0;
|
|
145
|
-
margin: 0;
|
|
146
|
-
padding: 0;
|
|
147
|
-
|
|
148
|
-
outline: none;
|
|
149
|
-
pointer-events: none;
|
|
150
|
-
-moz-appearance: none;
|
|
151
|
-
-webkit-appearance: none;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.mdw-bottomnav[mdw-shifting] {
|
|
155
|
-
.mdw-bottomnav__icon,
|
|
156
|
-
.mdw-bottomnav__item::before {
|
|
157
|
-
transform: translateY(dp(16));
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.mdw-bottomnav__label {
|
|
161
|
-
opacity: 0;
|
|
162
|
-
transform: translateY(dp(8));
|
|
163
|
-
}
|
|
164
|
-
.mdw-bottomnav__input:checked ~ .mdw-bottomnav__label,
|
|
165
|
-
.mdw-bottomnav__item[mdw-selected] > .mdw-bottomnav__label,
|
|
166
|
-
.mdw-bottomnav__input:checked + .mdw-bottomnav__item > .mdw-bottomnav__label {
|
|
167
|
-
opacity: 1;
|
|
168
|
-
transform: translateY(0);
|
|
169
|
-
}
|
|
170
|
-
.mdw-bottomnav__input:checked ~ .mdw-bottomnav__icon,
|
|
171
|
-
.mdw-bottomnav__item[mdw-selected] > .mdw-bottomnav__icon,
|
|
172
|
-
.mdw-bottomnav__input:checked + .mdw-bottomnav__item > .mdw-bottomnav__icon {
|
|
173
|
-
transform: translateY(dp(8));
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.mdw-bottomnav__item[mdw-selected]::before,
|
|
177
|
-
.mdw-bottomnav__input:checked + .mdw-bottomnav__item::before {
|
|
178
|
-
transform: translateY(dp(8));
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.mdw-bottomnav[mdw-theme-color] {
|
|
183
|
-
.mdw-bottomnav__item {
|
|
184
|
-
color: inherit;
|
|
185
|
-
& > .mdw-ripple > .mdw-ripple__inner,
|
|
186
|
-
&:after {
|
|
187
|
-
color: inherit;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
@import '../common/functions.scss';
|
|
2
|
-
@import '../common/mixins.scss';
|
|
3
|
-
|
|
4
|
-
$bottomnavColors: (
|
|
5
|
-
active-color: (inherit, inherit),
|
|
6
|
-
filled-active-color: (inherit, (#fff, 1.0)),
|
|
7
|
-
inactive-color: ((#000, 0.54), (#fff, 0.50)),
|
|
8
|
-
ripple-color: ( #000, #fff),
|
|
9
|
-
ripple-opacity: (0.12, 0.30, 0.20),
|
|
10
|
-
badge-background: (('warn', '500', 1.00), ('warn', '500', 1.00)),
|
|
11
|
-
badge-foreground: (#fff, #fff),
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
@function bottomnavThemeValue($key, $type, $theme) {
|
|
15
|
-
@return themeValue('bottomnav', $bottomnavColors, $key, $type, $theme);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@mixin bottomnavThemeVariables($color, $lightness) {
|
|
19
|
-
@include themeVariables('bottomnav', $bottomnavColors, $color, $lightness);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@mixin internalBottomnavContrastRules($type, $theme: null) {
|
|
23
|
-
@at-root {
|
|
24
|
-
#{&}.mdw-bottomnav[mdw-theme-fill]:not([mdw-theme-color]) {
|
|
25
|
-
input:checked ~ .mdw-bottomnav__icon,
|
|
26
|
-
input:checked ~ .mdw-bottomnav__label,
|
|
27
|
-
.mdw-bottomnav__item[mdw-selected] > .mdw-bottomnav__icon,
|
|
28
|
-
.mdw-bottomnav__item[mdw-selected] > .mdw-bottomnav__label,
|
|
29
|
-
input:checked + .mdw-bottomnav__item > .mdw-bottomnav__icon,
|
|
30
|
-
input:checked + .mdw-bottomnav__item > .mdw-bottomnav__label {
|
|
31
|
-
color: bottomnavThemeValue("filled-active-color", $type, $theme);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Vary by contrast
|
|
38
|
-
@mixin bottomnavContrastRules($type: 'var', $theme: null) {
|
|
39
|
-
@include internalBottomnavContrastRules($type, $theme);
|
|
40
|
-
@if ($type != 'var') {
|
|
41
|
-
:not([mdw-theme-fill]) {
|
|
42
|
-
@include internalBottomnavContrastRules($type, $theme);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
.mdw-bottomnav__icon,
|
|
46
|
-
.mdw-bottomnav__label {
|
|
47
|
-
color: bottomnavThemeValue("inactive-color", $type, $theme);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
input:checked ~ .mdw-bottomnav__icon,
|
|
51
|
-
input:checked ~ .mdw-bottomnav__label,
|
|
52
|
-
.mdw-bottomnav__item[mdw-selected] > .mdw-bottomnav__icon,
|
|
53
|
-
.mdw-bottomnav__item[mdw-selected] > .mdw-bottomnav__label,
|
|
54
|
-
input:checked + .mdw-bottomnav__item > .mdw-bottomnav__icon,
|
|
55
|
-
input:checked + .mdw-bottomnav__item > .mdw-bottomnav__label {
|
|
56
|
-
color: bottomnavThemeValue("active-color", $type, $theme);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.mdw-bottomnav__item {
|
|
60
|
-
& > .mdw-ripple > .mdw-ripple__inner,
|
|
61
|
-
&::after {
|
|
62
|
-
opacity: bottomnavThemeValue("ripple-opacity", $type, $theme);
|
|
63
|
-
color: bottomnavThemeValue("ripple-color", $type, $theme);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Varies by theme
|
|
69
|
-
@mixin bottomnavThemeRules($theme: null) {
|
|
70
|
-
.mdw-bottomnav__item {
|
|
71
|
-
&::before {
|
|
72
|
-
background-color: bottomnavThemeValue("badge-background", null, $theme);
|
|
73
|
-
color: bottomnavThemeValue("badge-foreground", null, $theme);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|