mdui 1.0.2 → 2.0.1
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/LICENSE +21 -21
- package/README.md +49 -70
- package/components/avatar/index.d.ts +49 -0
- package/components/avatar/index.js +55 -0
- package/components/avatar/style.d.ts +1 -0
- package/components/avatar/style.js +2 -0
- package/components/avatar.d.ts +1 -0
- package/components/avatar.js +1 -0
- package/components/badge/index.d.ts +28 -0
- package/components/badge/index.js +41 -0
- package/components/badge/style.d.ts +1 -0
- package/components/badge/style.js +2 -0
- package/components/badge.d.ts +1 -0
- package/components/badge.js +1 -0
- package/components/bottom-app-bar/index.d.ts +60 -0
- package/components/bottom-app-bar/index.js +105 -0
- package/components/bottom-app-bar/style.d.ts +1 -0
- package/components/bottom-app-bar/style.js +2 -0
- package/components/bottom-app-bar.d.ts +1 -0
- package/components/bottom-app-bar.js +1 -0
- package/components/button/button-base-style.d.ts +1 -0
- package/components/button/button-base-style.js +2 -0
- package/components/button/button-base.d.ts +138 -0
- package/components/button/button-base.js +206 -0
- package/components/button/index.d.ts +64 -0
- package/components/button/index.js +110 -0
- package/components/button/style.d.ts +1 -0
- package/components/button/style.js +4 -0
- package/components/button-icon/index.d.ts +66 -0
- package/components/button-icon/index.js +129 -0
- package/components/button-icon/style.d.ts +1 -0
- package/components/button-icon/style.js +4 -0
- package/components/button-icon.d.ts +1 -0
- package/components/button-icon.js +1 -0
- package/components/button.d.ts +1 -0
- package/components/button.js +1 -0
- package/components/card/index.d.ts +49 -0
- package/components/card/index.js +87 -0
- package/components/card/style.d.ts +1 -0
- package/components/card/style.js +2 -0
- package/components/card.d.ts +1 -0
- package/components/card.js +1 -0
- package/components/checkbox/index.d.ts +130 -0
- package/components/checkbox/index.js +257 -0
- package/components/checkbox/style.d.ts +1 -0
- package/components/checkbox/style.js +2 -0
- package/components/checkbox.d.ts +1 -0
- package/components/checkbox.js +1 -0
- package/components/chip/index.d.ts +102 -0
- package/components/chip/index.js +243 -0
- package/components/chip/style.d.ts +1 -0
- package/components/chip/style.js +4 -0
- package/components/chip.d.ts +1 -0
- package/components/chip.js +1 -0
- package/components/circular-progress/index.d.ts +28 -0
- package/components/circular-progress/index.js +61 -0
- package/components/circular-progress/style.d.ts +1 -0
- package/components/circular-progress/style.js +2 -0
- package/components/circular-progress.d.ts +1 -0
- package/components/circular-progress.js +1 -0
- package/components/collapse/collapse-item-style.d.ts +1 -0
- package/components/collapse/collapse-item-style.js +2 -0
- package/components/collapse/collapse-item.d.ts +56 -0
- package/components/collapse/collapse-item.js +126 -0
- package/components/collapse/collapse-style.d.ts +1 -0
- package/components/collapse/collapse-style.js +2 -0
- package/components/collapse/collapse.d.ts +49 -0
- package/components/collapse/collapse.js +175 -0
- package/components/collapse-item.d.ts +1 -0
- package/components/collapse-item.js +1 -0
- package/components/collapse.d.ts +1 -0
- package/components/collapse.js +1 -0
- package/components/dialog/index.d.ts +99 -0
- package/components/dialog/index.js +307 -0
- package/components/dialog/style.d.ts +1 -0
- package/components/dialog/style.js +2 -0
- package/components/dialog.d.ts +1 -0
- package/components/dialog.js +1 -0
- package/components/divider/index.d.ts +30 -0
- package/components/divider/index.js +58 -0
- package/components/divider/style.d.ts +1 -0
- package/components/divider/style.js +2 -0
- package/components/divider.d.ts +1 -0
- package/components/divider.js +1 -0
- package/components/dropdown/index.d.ts +131 -0
- package/components/dropdown/index.js +571 -0
- package/components/dropdown/style.d.ts +1 -0
- package/components/dropdown/style.js +2 -0
- package/components/dropdown.d.ts +1 -0
- package/components/dropdown.js +1 -0
- package/components/fab/index.d.ts +70 -0
- package/components/fab/index.js +144 -0
- package/components/fab/style.d.ts +1 -0
- package/components/fab/style.js +8 -0
- package/components/fab.d.ts +1 -0
- package/components/fab.js +1 -0
- package/components/icon/index.d.ts +29 -0
- package/components/icon/index.js +57 -0
- package/components/icon/style.d.ts +1 -0
- package/components/icon/style.js +2 -0
- package/components/icon.d.ts +1 -0
- package/components/icon.js +1 -0
- package/components/layout/helper.d.ts +67 -0
- package/components/layout/helper.js +212 -0
- package/components/layout/layout-item-base.d.ts +17 -0
- package/components/layout/layout-item-base.js +45 -0
- package/components/layout/layout-item-style.d.ts +1 -0
- package/components/layout/layout-item-style.js +2 -0
- package/components/layout/layout-item.d.ts +37 -0
- package/components/layout/layout-item.js +58 -0
- package/components/layout/layout-main-style.d.ts +1 -0
- package/components/layout/layout-main-style.js +2 -0
- package/components/layout/layout-main.d.ts +27 -0
- package/components/layout/layout-main.js +46 -0
- package/components/layout/layout-style.d.ts +1 -0
- package/components/layout/layout-style.js +2 -0
- package/components/layout/layout.d.ts +28 -0
- package/components/layout/layout.js +43 -0
- package/components/layout-item.d.ts +1 -0
- package/components/layout-item.js +1 -0
- package/components/layout-main.d.ts +1 -0
- package/components/layout-main.js +1 -0
- package/components/layout.d.ts +1 -0
- package/components/layout.js +1 -0
- package/components/linear-progress/index.d.ts +30 -0
- package/components/linear-progress/index.js +48 -0
- package/components/linear-progress/style.d.ts +1 -0
- package/components/linear-progress/style.js +2 -0
- package/components/linear-progress.d.ts +1 -0
- package/components/linear-progress.js +1 -0
- package/components/list/list-item-style.d.ts +1 -0
- package/components/list/list-item-style.js +4 -0
- package/components/list/list-item.d.ts +111 -0
- package/components/list/list-item.js +186 -0
- package/components/list/list-style.d.ts +1 -0
- package/components/list/list-style.js +2 -0
- package/components/list/list-subheader-style.d.ts +1 -0
- package/components/list/list-subheader-style.js +2 -0
- package/components/list/list-subheader.d.ts +24 -0
- package/components/list/list-subheader.js +30 -0
- package/components/list/list.d.ts +24 -0
- package/components/list/list.js +27 -0
- package/components/list-item.d.ts +1 -0
- package/components/list-item.js +1 -0
- package/components/list-subheader.d.ts +1 -0
- package/components/list-subheader.js +1 -0
- package/components/list.d.ts +1 -0
- package/components/list.js +1 -0
- package/components/menu/menu-item-style.d.ts +1 -0
- package/components/menu/menu-item-style.js +2 -0
- package/components/menu/menu-item.d.ts +123 -0
- package/components/menu/menu-item.js +412 -0
- package/components/menu/menu-style.d.ts +1 -0
- package/components/menu/menu-style.js +2 -0
- package/components/menu/menu.d.ts +111 -0
- package/components/menu/menu.js +425 -0
- package/components/menu-item.d.ts +1 -0
- package/components/menu-item.js +1 -0
- package/components/menu.d.ts +1 -0
- package/components/menu.js +1 -0
- package/components/navigation-bar/navigation-bar-item-style.d.ts +1 -0
- package/components/navigation-bar/navigation-bar-item-style.js +2 -0
- package/components/navigation-bar/navigation-bar-item.d.ts +72 -0
- package/components/navigation-bar/navigation-bar-item.js +120 -0
- package/components/navigation-bar/navigation-bar-style.d.ts +1 -0
- package/components/navigation-bar/navigation-bar-style.js +2 -0
- package/components/navigation-bar/navigation-bar.d.ts +78 -0
- package/components/navigation-bar/navigation-bar.js +180 -0
- package/components/navigation-bar-item.d.ts +1 -0
- package/components/navigation-bar-item.js +1 -0
- package/components/navigation-bar.d.ts +1 -0
- package/components/navigation-bar.js +1 -0
- package/components/navigation-drawer/index.d.ts +84 -0
- package/components/navigation-drawer/index.js +365 -0
- package/components/navigation-drawer/style.d.ts +1 -0
- package/components/navigation-drawer/style.js +2 -0
- package/components/navigation-drawer.d.ts +1 -0
- package/components/navigation-drawer.js +1 -0
- package/components/navigation-rail/navigation-rail-item-style.d.ts +1 -0
- package/components/navigation-rail/navigation-rail-item-style.js +2 -0
- package/components/navigation-rail/navigation-rail-item.d.ts +72 -0
- package/components/navigation-rail/navigation-rail-item.js +128 -0
- package/components/navigation-rail/navigation-rail-style.d.ts +1 -0
- package/components/navigation-rail/navigation-rail-style.js +2 -0
- package/components/navigation-rail/navigation-rail.d.ts +87 -0
- package/components/navigation-rail/navigation-rail.js +230 -0
- package/components/navigation-rail-item.d.ts +1 -0
- package/components/navigation-rail-item.js +1 -0
- package/components/navigation-rail.d.ts +1 -0
- package/components/navigation-rail.js +1 -0
- package/components/radio/radio-group-style.d.ts +1 -0
- package/components/radio/radio-group-style.js +2 -0
- package/components/radio/radio-group.d.ts +103 -0
- package/components/radio/radio-group.js +268 -0
- package/components/radio/radio-style.d.ts +1 -0
- package/components/radio/radio-style.js +2 -0
- package/components/radio/radio.d.ts +71 -0
- package/components/radio/radio.js +144 -0
- package/components/radio-group.d.ts +1 -0
- package/components/radio-group.js +1 -0
- package/components/radio.d.ts +1 -0
- package/components/radio.js +1 -0
- package/components/range-slider/index.d.ts +67 -0
- package/components/range-slider/index.js +210 -0
- package/components/range-slider.d.ts +1 -0
- package/components/range-slider.js +1 -0
- package/components/ripple/index.d.ts +44 -0
- package/components/ripple/index.js +173 -0
- package/components/ripple/ripple-mixin.d.ts +28 -0
- package/components/ripple/ripple-mixin.js +258 -0
- package/components/ripple/style.d.ts +1 -0
- package/components/ripple/style.js +2 -0
- package/components/ripple.d.ts +1 -0
- package/components/ripple.js +1 -0
- package/components/segmented-button/segmented-button-group-style.d.ts +1 -0
- package/components/segmented-button/segmented-button-group-style.js +2 -0
- package/components/segmented-button/segmented-button-group.d.ts +125 -0
- package/components/segmented-button/segmented-button-group.js +383 -0
- package/components/segmented-button/segmented-button-style.d.ts +1 -0
- package/components/segmented-button/segmented-button-style.js +4 -0
- package/components/segmented-button/segmented-button.d.ts +73 -0
- package/components/segmented-button/segmented-button.js +160 -0
- package/components/segmented-button-group.d.ts +1 -0
- package/components/segmented-button-group.js +1 -0
- package/components/segmented-button.d.ts +1 -0
- package/components/segmented-button.js +1 -0
- package/components/select/index.d.ts +200 -0
- package/components/select/index.js +390 -0
- package/components/select/style.d.ts +1 -0
- package/components/select/style.js +2 -0
- package/components/select.d.ts +1 -0
- package/components/select.js +1 -0
- package/components/slider/index.d.ts +53 -0
- package/components/slider/index.js +128 -0
- package/components/slider/slider-base-style.d.ts +1 -0
- package/components/slider/slider-base-style.js +2 -0
- package/components/slider/slider-base.d.ts +92 -0
- package/components/slider/slider-base.js +199 -0
- package/components/slider/style.d.ts +1 -0
- package/components/slider/style.js +2 -0
- package/components/slider.d.ts +1 -0
- package/components/slider.js +1 -0
- package/components/snackbar/index.d.ts +98 -0
- package/components/snackbar/index.js +285 -0
- package/components/snackbar/style.d.ts +1 -0
- package/components/snackbar/style.js +2 -0
- package/components/snackbar.d.ts +1 -0
- package/components/snackbar.js +1 -0
- package/components/switch/index.d.ts +123 -0
- package/components/switch/index.js +245 -0
- package/components/switch/style.d.ts +1 -0
- package/components/switch/style.js +2 -0
- package/components/switch.d.ts +1 -0
- package/components/switch.js +1 -0
- package/components/tab-panel.d.ts +1 -0
- package/components/tab-panel.js +1 -0
- package/components/tab.d.ts +1 -0
- package/components/tab.js +1 -0
- package/components/tabs/tab-panel-style.d.ts +1 -0
- package/components/tabs/tab-panel-style.js +2 -0
- package/components/tabs/tab-panel.d.ts +36 -0
- package/components/tabs/tab-panel.js +52 -0
- package/components/tabs/tab-style.d.ts +1 -0
- package/components/tabs/tab-style.js +2 -0
- package/components/tabs/tab.d.ts +69 -0
- package/components/tabs/tab.js +110 -0
- package/components/tabs/tabs-style.d.ts +1 -0
- package/components/tabs/tabs-style.js +2 -0
- package/components/tabs/tabs.d.ts +87 -0
- package/components/tabs/tabs.js +221 -0
- package/components/tabs.d.ts +1 -0
- package/components/tabs.js +1 -0
- package/components/text-field/index.d.ts +400 -0
- package/components/text-field/index.js +752 -0
- package/components/text-field/style.d.ts +1 -0
- package/components/text-field/style.js +2 -0
- package/components/text-field.d.ts +1 -0
- package/components/text-field.js +1 -0
- package/components/tooltip/index.d.ts +140 -0
- package/components/tooltip/index.js +497 -0
- package/components/tooltip/style.d.ts +1 -0
- package/components/tooltip/style.js +2 -0
- package/components/tooltip.d.ts +1 -0
- package/components/tooltip.js +1 -0
- package/components/top-app-bar/top-app-bar-style.d.ts +1 -0
- package/components/top-app-bar/top-app-bar-style.js +2 -0
- package/components/top-app-bar/top-app-bar-title-style.d.ts +1 -0
- package/components/top-app-bar/top-app-bar-title-style.js +2 -0
- package/components/top-app-bar/top-app-bar-title.d.ts +46 -0
- package/components/top-app-bar/top-app-bar-title.js +76 -0
- package/components/top-app-bar/top-app-bar.d.ts +74 -0
- package/components/top-app-bar/top-app-bar.js +178 -0
- package/components/top-app-bar-title.d.ts +1 -0
- package/components/top-app-bar-title.js +1 -0
- package/components/top-app-bar.d.ts +1 -0
- package/components/top-app-bar.js +1 -0
- package/css-data.zh-cn.json +2819 -0
- package/custom-elements.json +28087 -0
- package/functions/alert.d.ts +80 -0
- package/functions/alert.js +59 -0
- package/functions/breakpoint.d.ts +1 -0
- package/functions/breakpoint.js +1 -0
- package/functions/confirm.d.ts +95 -0
- package/functions/confirm.js +68 -0
- package/functions/dialog.d.ts +97 -0
- package/functions/dialog.js +100 -0
- package/functions/getColorFromImage.d.ts +7 -0
- package/functions/getColorFromImage.js +12 -0
- package/functions/getTheme.d.ts +10 -0
- package/functions/getTheme.js +16 -0
- package/functions/observeResize.d.ts +2 -0
- package/functions/observeResize.js +1 -0
- package/functions/prompt.d.ts +110 -0
- package/functions/prompt.js +103 -0
- package/functions/removeColorScheme.d.ts +6 -0
- package/functions/removeColorScheme.js +8 -0
- package/functions/setColorScheme.d.ts +15 -0
- package/functions/setColorScheme.js +15 -0
- package/functions/setTheme.d.ts +10 -0
- package/functions/setTheme.js +16 -0
- package/functions/snackbar.d.ts +91 -0
- package/functions/snackbar.js +84 -0
- package/functions/throttle.d.ts +1 -0
- package/functions/throttle.js +1 -0
- package/functions/utils/colorScheme.d.ts +39 -0
- package/functions/utils/colorScheme.js +133 -0
- package/functions/utils/theme.d.ts +1 -0
- package/html-data.zh-cn.json +6566 -0
- package/jq.d.ts +1 -0
- package/jq.js +1 -0
- package/mdui.css +1 -0
- package/mdui.d.ts +61 -0
- package/mdui.esm.js +22 -0
- package/mdui.global.js +22 -0
- package/mdui.js +61 -0
- package/package.json +39 -68
- package/web-types.zh-cn.json +11728 -0
- package/dist/css/mdui.css +0 -13559
- package/dist/css/mdui.css.map +0 -1
- package/dist/css/mdui.min.css +0 -6
- package/dist/css/mdui.min.css.map +0 -1
- package/dist/fonts/roboto/LICENSE.txt +0 -201
- package/dist/fonts/roboto/Roboto-Black.woff +0 -0
- package/dist/fonts/roboto/Roboto-Black.woff2 +0 -0
- package/dist/fonts/roboto/Roboto-BlackItalic.woff +0 -0
- package/dist/fonts/roboto/Roboto-BlackItalic.woff2 +0 -0
- package/dist/fonts/roboto/Roboto-Bold.woff +0 -0
- package/dist/fonts/roboto/Roboto-Bold.woff2 +0 -0
- package/dist/fonts/roboto/Roboto-BoldItalic.woff +0 -0
- package/dist/fonts/roboto/Roboto-BoldItalic.woff2 +0 -0
- package/dist/fonts/roboto/Roboto-Light.woff +0 -0
- package/dist/fonts/roboto/Roboto-Light.woff2 +0 -0
- package/dist/fonts/roboto/Roboto-LightItalic.woff +0 -0
- package/dist/fonts/roboto/Roboto-LightItalic.woff2 +0 -0
- package/dist/fonts/roboto/Roboto-Medium.woff +0 -0
- package/dist/fonts/roboto/Roboto-Medium.woff2 +0 -0
- package/dist/fonts/roboto/Roboto-MediumItalic.woff +0 -0
- package/dist/fonts/roboto/Roboto-MediumItalic.woff2 +0 -0
- package/dist/fonts/roboto/Roboto-Regular.woff +0 -0
- package/dist/fonts/roboto/Roboto-Regular.woff2 +0 -0
- package/dist/fonts/roboto/Roboto-RegularItalic.woff +0 -0
- package/dist/fonts/roboto/Roboto-RegularItalic.woff2 +0 -0
- package/dist/fonts/roboto/Roboto-Thin.woff +0 -0
- package/dist/fonts/roboto/Roboto-Thin.woff2 +0 -0
- package/dist/fonts/roboto/Roboto-ThinItalic.woff +0 -0
- package/dist/fonts/roboto/Roboto-ThinItalic.woff2 +0 -0
- package/dist/icons/material-icons/LICENSE.txt +0 -393
- package/dist/icons/material-icons/MaterialIcons-Regular.ijmap +0 -1
- package/dist/icons/material-icons/MaterialIcons-Regular.woff +0 -0
- package/dist/icons/material-icons/MaterialIcons-Regular.woff2 +0 -0
- package/dist/js/mdui.esm.js +0 -5976
- package/dist/js/mdui.esm.js.map +0 -1
- package/dist/js/mdui.js +0 -6474
- package/dist/js/mdui.js.map +0 -1
- package/dist/js/mdui.min.js +0 -7
- package/dist/js/mdui.min.js.map +0 -1
- package/es/components/appbar/index.d.ts +0 -2
- package/es/components/appbar/index.js +0 -17
- package/es/components/bottom_nav/index.d.ts +0 -9
- package/es/components/bottom_nav/index.js +0 -38
- package/es/components/collapse/collapseAbstract.d.ts +0 -110
- package/es/components/collapse/collapseAbstract.js +0 -175
- package/es/components/collapse/customAttr.d.ts +0 -2
- package/es/components/collapse/customAttr.js +0 -11
- package/es/components/collapse/index.d.ts +0 -23
- package/es/components/collapse/index.js +0 -8
- package/es/components/dialog/alert.d.ts +0 -44
- package/es/components/dialog/alert.js +0 -42
- package/es/components/dialog/class.d.ts +0 -133
- package/es/components/dialog/class.js +0 -316
- package/es/components/dialog/confirm.d.ts +0 -54
- package/es/components/dialog/confirm.js +0 -55
- package/es/components/dialog/customAttr.d.ts +0 -4
- package/es/components/dialog/customAttr.js +0 -25
- package/es/components/dialog/dialog.d.ts +0 -91
- package/es/components/dialog/dialog.js +0 -101
- package/es/components/dialog/index.d.ts +0 -20
- package/es/components/dialog/index.js +0 -14
- package/es/components/dialog/prompt.d.ts +0 -74
- package/es/components/dialog/prompt.js +0 -109
- package/es/components/drawer/customAttr.d.ts +0 -4
- package/es/components/drawer/customAttr.js +0 -20
- package/es/components/drawer/index.d.ts +0 -111
- package/es/components/drawer/index.js +0 -310
- package/es/components/fab/customAttr.d.ts +0 -1
- package/es/components/fab/customAttr.js +0 -13
- package/es/components/fab/index.d.ts +0 -100
- package/es/components/fab/index.js +0 -144
- package/es/components/headroom/customAttr.d.ts +0 -2
- package/es/components/headroom/customAttr.js +0 -11
- package/es/components/headroom/index.d.ts +0 -120
- package/es/components/headroom/index.js +0 -167
- package/es/components/menu/customAttr.d.ts +0 -3
- package/es/components/menu/customAttr.js +0 -24
- package/es/components/menu/index.d.ts +0 -167
- package/es/components/menu/index.js +0 -512
- package/es/components/panel/customAttr.d.ts +0 -2
- package/es/components/panel/customAttr.js +0 -11
- package/es/components/panel/index.d.ts +0 -23
- package/es/components/panel/index.js +0 -8
- package/es/components/progress/spinner.d.ts +0 -16
- package/es/components/progress/spinner.js +0 -47
- package/es/components/ripple/index.d.ts +0 -25
- package/es/components/ripple/index.js +0 -170
- package/es/components/select/customAttr.d.ts +0 -2
- package/es/components/select/customAttr.js +0 -11
- package/es/components/select/index.d.ts +0 -160
- package/es/components/select/index.js +0 -340
- package/es/components/slider/index.d.ts +0 -28
- package/es/components/slider/index.js +0 -134
- package/es/components/snackbar/index.d.ts +0 -126
- package/es/components/snackbar/index.js +0 -217
- package/es/components/tab/customAttr.d.ts +0 -2
- package/es/components/tab/customAttr.js +0 -11
- package/es/components/tab/index.d.ts +0 -114
- package/es/components/tab/index.js +0 -266
- package/es/components/table/index.d.ts +0 -25
- package/es/components/table/index.js +0 -178
- package/es/components/textfield/index.d.ts +0 -28
- package/es/components/textfield/index.js +0 -147
- package/es/components/tooltip/customAttr.d.ts +0 -3
- package/es/components/tooltip/customAttr.js +0 -20
- package/es/components/tooltip/index.d.ts +0 -123
- package/es/components/tooltip/index.js +0 -251
- package/es/global/mutation.d.ts +0 -23
- package/es/global/mutation.js +0 -14
- package/es/index.d.ts +0 -36
- package/es/index.js +0 -36
- package/es/interfaces/MduiStatic.d.ts +0 -8
- package/es/jq.d.ts +0 -99
- package/es/jq.js +0 -102
- package/es/jq_extends/methods/mutation.d.ts +0 -11
- package/es/jq_extends/methods/mutation.js +0 -19
- package/es/jq_extends/methods/reflow.d.ts +0 -14
- package/es/jq_extends/methods/reflow.js +0 -7
- package/es/jq_extends/methods/transform.d.ts +0 -14
- package/es/jq_extends/methods/transform.js +0 -8
- package/es/jq_extends/methods/transformOrigin.d.ts +0 -14
- package/es/jq_extends/methods/transformOrigin.js +0 -8
- package/es/jq_extends/methods/transition.d.ts +0 -15
- package/es/jq_extends/methods/transition.js +0 -12
- package/es/jq_extends/methods/transitionEnd.d.ts +0 -17
- package/es/jq_extends/methods/transitionEnd.js +0 -23
- package/es/jq_extends/static/guid.d.ts +0 -18
- package/es/jq_extends/static/guid.js +0 -30
- package/es/jq_extends/static/hideOverlay.d.ts +0 -23
- package/es/jq_extends/static/hideOverlay.js +0 -25
- package/es/jq_extends/static/lockScreen.d.ts +0 -15
- package/es/jq_extends/static/lockScreen.js +0 -14
- package/es/jq_extends/static/showOverlay.d.ts +0 -23
- package/es/jq_extends/static/showOverlay.js +0 -27
- package/es/jq_extends/static/throttle.d.ts +0 -17
- package/es/jq_extends/static/throttle.js +0 -13
- package/es/jq_extends/static/unlockScreen.d.ts +0 -22
- package/es/jq_extends/static/unlockScreen.js +0 -13
- package/es/mdui.d.ts +0 -3
- package/es/mdui.js +0 -8
- package/es/utils/componentEvent.d.ts +0 -13
- package/es/utils/componentEvent.js +0 -37
- package/es/utils/dom.d.ts +0 -4
- package/es/utils/dom.js +0 -5
- package/es/utils/mutation.d.ts +0 -15
- package/es/utils/mutation.js +0 -24
- package/es/utils/parseOptions.d.ts +0 -9
- package/es/utils/parseOptions.js +0 -15
- package/es/utils/queue.d.ts +0 -18
- package/es/utils/queue.js +0 -26
- package/es/utils/touchHandler.d.ts +0 -50
- package/es/utils/touchHandler.js +0 -76
- package/src/components/appbar/index.less +0 -110
- package/src/components/appbar/index.ts +0 -19
- package/src/components/bottom_nav/index.less +0 -155
- package/src/components/bottom_nav/index.ts +0 -43
- package/src/components/button/index.less +0 -291
- package/src/components/card/index.less +0 -200
- package/src/components/chip/index.less +0 -97
- package/src/components/collapse/collapseAbstract.ts +0 -270
- package/src/components/collapse/customAttr.ts +0 -13
- package/src/components/collapse/index.less +0 -44
- package/src/components/collapse/index.ts +0 -32
- package/src/components/dialog/alert.less +0 -11
- package/src/components/dialog/alert.ts +0 -111
- package/src/components/dialog/class.ts +0 -432
- package/src/components/dialog/confirm.less +0 -11
- package/src/components/dialog/confirm.ts +0 -140
- package/src/components/dialog/customAttr.ts +0 -41
- package/src/components/dialog/dialog.ts +0 -224
- package/src/components/dialog/index.less +0 -154
- package/src/components/dialog/index.ts +0 -40
- package/src/components/dialog/prompt.less +0 -16
- package/src/components/dialog/prompt.ts +0 -231
- package/src/components/divider/index.less +0 -49
- package/src/components/drawer/customAttr.ts +0 -30
- package/src/components/drawer/index.less +0 -177
- package/src/components/drawer/index.ts +0 -425
- package/src/components/fab/customAttr.ts +0 -23
- package/src/components/fab/index.less +0 -158
- package/src/components/fab/index.ts +0 -232
- package/src/components/grid_list/index.less +0 -126
- package/src/components/headroom/customAttr.ts +0 -13
- package/src/components/headroom/index.less +0 -51
- package/src/components/headroom/index.ts +0 -275
- package/src/components/list/index.less +0 -347
- package/src/components/menu/customAttr.ts +0 -40
- package/src/components/menu/index.less +0 -195
- package/src/components/menu/index.ts +0 -725
- package/src/components/menu/svg/arrow_right_dark.svg +0 -1
- package/src/components/menu/svg/arrow_right_light.svg +0 -1
- package/src/components/panel/customAttr.ts +0 -13
- package/src/components/panel/index.less +0 -191
- package/src/components/panel/index.ts +0 -32
- package/src/components/progress/progress.less +0 -113
- package/src/components/progress/spinner.less +0 -198
- package/src/components/progress/spinner.ts +0 -75
- package/src/components/ripple/index.less +0 -92
- package/src/components/ripple/index.ts +0 -217
- package/src/components/select/customAttr.ts +0 -13
- package/src/components/select/index.less +0 -342
- package/src/components/select/index.ts +0 -478
- package/src/components/select/svg/arrow_down_dark.svg +0 -1
- package/src/components/select/svg/arrow_down_light.svg +0 -1
- package/src/components/select/svg/arrow_up_dark.svg +0 -1
- package/src/components/select/svg/arrow_up_light.svg +0 -1
- package/src/components/selection_control/checkbox.less +0 -226
- package/src/components/selection_control/radio.less +0 -163
- package/src/components/selection_control/switch.less +0 -210
- package/src/components/slider/index.less +0 -340
- package/src/components/slider/index.ts +0 -187
- package/src/components/snackbar/index.less +0 -133
- package/src/components/snackbar/index.ts +0 -367
- package/src/components/subheader/index.less +0 -38
- package/src/components/tab/customAttr.ts +0 -13
- package/src/components/tab/index.less +0 -195
- package/src/components/tab/index.ts +0 -372
- package/src/components/table/index.less +0 -169
- package/src/components/table/index.ts +0 -240
- package/src/components/textfield/index.less +0 -425
- package/src/components/textfield/index.ts +0 -217
- package/src/components/toolbar/index.less +0 -92
- package/src/components/tooltip/customAttr.ts +0 -26
- package/src/components/tooltip/index.less +0 -45
- package/src/components/tooltip/index.ts +0 -361
- package/src/fonts/roboto/LICENSE.txt +0 -201
- package/src/fonts/roboto/Roboto-Black.woff +0 -0
- package/src/fonts/roboto/Roboto-Black.woff2 +0 -0
- package/src/fonts/roboto/Roboto-BlackItalic.woff +0 -0
- package/src/fonts/roboto/Roboto-BlackItalic.woff2 +0 -0
- package/src/fonts/roboto/Roboto-Bold.woff +0 -0
- package/src/fonts/roboto/Roboto-Bold.woff2 +0 -0
- package/src/fonts/roboto/Roboto-BoldItalic.woff +0 -0
- package/src/fonts/roboto/Roboto-BoldItalic.woff2 +0 -0
- package/src/fonts/roboto/Roboto-Light.woff +0 -0
- package/src/fonts/roboto/Roboto-Light.woff2 +0 -0
- package/src/fonts/roboto/Roboto-LightItalic.woff +0 -0
- package/src/fonts/roboto/Roboto-LightItalic.woff2 +0 -0
- package/src/fonts/roboto/Roboto-Medium.woff +0 -0
- package/src/fonts/roboto/Roboto-Medium.woff2 +0 -0
- package/src/fonts/roboto/Roboto-MediumItalic.woff +0 -0
- package/src/fonts/roboto/Roboto-MediumItalic.woff2 +0 -0
- package/src/fonts/roboto/Roboto-Regular.woff +0 -0
- package/src/fonts/roboto/Roboto-Regular.woff2 +0 -0
- package/src/fonts/roboto/Roboto-RegularItalic.woff +0 -0
- package/src/fonts/roboto/Roboto-RegularItalic.woff2 +0 -0
- package/src/fonts/roboto/Roboto-Thin.woff +0 -0
- package/src/fonts/roboto/Roboto-Thin.woff2 +0 -0
- package/src/fonts/roboto/Roboto-ThinItalic.woff +0 -0
- package/src/fonts/roboto/Roboto-ThinItalic.woff2 +0 -0
- package/src/global/mutation.ts +0 -37
- package/src/icons/material-icons/LICENSE.txt +0 -393
- package/src/icons/material-icons/MaterialIcons-Regular.ijmap +0 -1
- package/src/icons/material-icons/MaterialIcons-Regular.woff +0 -0
- package/src/icons/material-icons/MaterialIcons-Regular.woff2 +0 -0
- package/src/index.less +0 -73
- package/src/index.ts +0 -39
- package/src/interfaces/MduiStatic.ts +0 -11
- package/src/jq.ts +0 -104
- package/src/jq_extends/methods/mutation.ts +0 -32
- package/src/jq_extends/methods/reflow.ts +0 -23
- package/src/jq_extends/methods/transform.ts +0 -24
- package/src/jq_extends/methods/transformOrigin.ts +0 -24
- package/src/jq_extends/methods/transition.ts +0 -30
- package/src/jq_extends/methods/transitionEnd.ts +0 -49
- package/src/jq_extends/static/guid.ts +0 -56
- package/src/jq_extends/static/hideOverlay.ts +0 -50
- package/src/jq_extends/static/lockScreen.ts +0 -30
- package/src/jq_extends/static/showOverlay.ts +0 -51
- package/src/jq_extends/static/throttle.ts +0 -32
- package/src/jq_extends/static/unlockScreen.ts +0 -36
- package/src/mdui.ts +0 -12
- package/src/styles/color.less +0 -392
- package/src/styles/global.less +0 -75
- package/src/styles/grid.less +0 -150
- package/src/styles/helper.less +0 -242
- package/src/styles/icon.less +0 -31
- package/src/styles/material-icons.less +0 -36
- package/src/styles/media.less +0 -39
- package/src/styles/mixin/color.less +0 -66
- package/src/styles/mixin/divider.less +0 -30
- package/src/styles/mixin/helper.less +0 -126
- package/src/styles/mixin/icon.less +0 -33
- package/src/styles/mixin/layout-theme.less +0 -14
- package/src/styles/mixin/media.less +0 -11
- package/src/styles/mixin/shadow.less +0 -17
- package/src/styles/mixin/typo.less +0 -149
- package/src/styles/mixin.less +0 -8
- package/src/styles/roboto.less +0 -125
- package/src/styles/shadow.less +0 -20
- package/src/styles/typo-styles.less +0 -91
- package/src/styles/typo.less +0 -338
- package/src/styles/variable/animation.less +0 -5
- package/src/styles/variable/color/amber.less +0 -41
- package/src/styles/variable/color/black.less +0 -16
- package/src/styles/variable/color/blue-grey.less +0 -29
- package/src/styles/variable/color/blue.less +0 -41
- package/src/styles/variable/color/brown.less +0 -29
- package/src/styles/variable/color/cyan.less +0 -41
- package/src/styles/variable/color/deep-orange.less +0 -41
- package/src/styles/variable/color/deep-purple.less +0 -41
- package/src/styles/variable/color/default.less +0 -74
- package/src/styles/variable/color/green.less +0 -41
- package/src/styles/variable/color/grey.less +0 -29
- package/src/styles/variable/color/indigo.less +0 -41
- package/src/styles/variable/color/light-blue.less +0 -41
- package/src/styles/variable/color/light-green.less +0 -41
- package/src/styles/variable/color/lime.less +0 -41
- package/src/styles/variable/color/orange.less +0 -41
- package/src/styles/variable/color/pink.less +0 -41
- package/src/styles/variable/color/purple.less +0 -41
- package/src/styles/variable/color/red.less +0 -41
- package/src/styles/variable/color/teal.less +0 -41
- package/src/styles/variable/color/transparent.less +0 -1
- package/src/styles/variable/color/white.less +0 -16
- package/src/styles/variable/color/yellow.less +0 -41
- package/src/styles/variable/global.less +0 -98
- package/src/styles/variable/shadow.less +0 -103
- package/src/styles/variable.less +0 -26
- package/src/tsconfig.json +0 -12
- package/src/utils/componentEvent.ts +0 -63
- package/src/utils/dom.ts +0 -7
- package/src/utils/mutation.ts +0 -41
- package/src/utils/parseOptions.ts +0 -23
- package/src/utils/queue.ts +0 -51
- package/src/utils/touchHandler.ts +0 -92
- /package/{es/interfaces/MduiStatic.js → functions/utils/theme.js} +0 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html } from 'lit';
|
|
3
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
+
import { createRef, ref } from 'lit/directives/ref.js';
|
|
5
|
+
import cc from 'classcat';
|
|
6
|
+
import { HasSlotController } from '@mdui/shared/controllers/has-slot.js';
|
|
7
|
+
import { watch } from '@mdui/shared/decorators/watch.js';
|
|
8
|
+
import { booleanConverter } from '@mdui/shared/helpers/decorator.js';
|
|
9
|
+
import { delay } from '@mdui/shared/helpers/delay.js';
|
|
10
|
+
import { nothingTemplate } from '@mdui/shared/helpers/template.js';
|
|
11
|
+
import { ButtonBase } from '../button/button-base.js';
|
|
12
|
+
import '../icon.js';
|
|
13
|
+
import { style } from './style.js';
|
|
14
|
+
/**
|
|
15
|
+
* @summary 浮动操作按钮组件
|
|
16
|
+
*
|
|
17
|
+
* ```html
|
|
18
|
+
* <mdui-fab icon="edit"></mdui-fab>
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @event focus - 获得焦点时触发
|
|
22
|
+
* @event blur - 失去焦点时触发
|
|
23
|
+
* @event invalid - 表单字段验证未通过时触发
|
|
24
|
+
*
|
|
25
|
+
* @slot - 文本
|
|
26
|
+
* @slot icon - 图标
|
|
27
|
+
*
|
|
28
|
+
* @csspart button - 内部的 `button` 或 `a` 元素
|
|
29
|
+
* @csspart label - 右侧的文本
|
|
30
|
+
* @csspart icon - 左侧的图标
|
|
31
|
+
* @csspart loading - 加载中状态的 `<mdui-circular-progress>` 元素
|
|
32
|
+
*
|
|
33
|
+
* @cssprop --shape-corner-small - `size="small"` 时,组件的圆角大小。可以指定一个具体的像素值;但更推荐[引用设计令牌](/docs/2/styles/design-tokens#shape-corner)
|
|
34
|
+
* @cssprop --shape-corner-normal - `size="normal"` 时,组件的圆角大小。可以指定一个具体的像素值;但更推荐[引用设计令牌](/docs/2/styles/design-tokens#shape-corner)
|
|
35
|
+
* @cssprop --shape-corner-large - `size="large"` 时,组件的圆角大小。可以指定一个具体的像素值;但更推荐[引用设计令牌](/docs/2/styles/design-tokens#shape-corner)
|
|
36
|
+
*/
|
|
37
|
+
export let Fab = class Fab extends ButtonBase {
|
|
38
|
+
constructor() {
|
|
39
|
+
super(...arguments);
|
|
40
|
+
/**
|
|
41
|
+
* FAB 形状,此组件的不同形状之间只有颜色不一样。可选值为:
|
|
42
|
+
*
|
|
43
|
+
* * `primary`:使用 Primary container 背景色
|
|
44
|
+
* * `surface`:使用 Surface container high 背景色
|
|
45
|
+
* * `secondary`:使用 Secondary container 背景色
|
|
46
|
+
* * `tertiary`:使用 Tertiary container 背景色
|
|
47
|
+
*/
|
|
48
|
+
this.variant = 'primary';
|
|
49
|
+
/**
|
|
50
|
+
* FAB 大小。可选值为:
|
|
51
|
+
* * `normal`:普通大小 FAB
|
|
52
|
+
* * `small`:小型 FAB
|
|
53
|
+
* * `large`:大型 FAB
|
|
54
|
+
*/
|
|
55
|
+
this.size = 'normal';
|
|
56
|
+
/**
|
|
57
|
+
* 是否为展开状态
|
|
58
|
+
*/
|
|
59
|
+
this.extended = false;
|
|
60
|
+
this.rippleRef = createRef();
|
|
61
|
+
this.hasSlotController = new HasSlotController(this, 'icon');
|
|
62
|
+
}
|
|
63
|
+
get rippleElement() {
|
|
64
|
+
return this.rippleRef.value;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* extended 变更时,设置动画
|
|
68
|
+
*/
|
|
69
|
+
async onExtendedChange() {
|
|
70
|
+
const hasUpdated = this.hasUpdated;
|
|
71
|
+
if (!this.extended) {
|
|
72
|
+
this.style.width = '';
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
this.style.width = `${this.scrollWidth}px`;
|
|
76
|
+
}
|
|
77
|
+
await this.updateComplete;
|
|
78
|
+
if (this.extended && !hasUpdated) {
|
|
79
|
+
await delay();
|
|
80
|
+
this.style.width = `${this.scrollWidth}px`;
|
|
81
|
+
}
|
|
82
|
+
if (!hasUpdated) {
|
|
83
|
+
// 延迟设置动画,避免首次渲染时也执行动画
|
|
84
|
+
await delay();
|
|
85
|
+
this.style.transitionProperty = 'box-shadow, width, bottom, transform'; // bottom, transform 在 bottom-app-bar 中用到
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
render() {
|
|
89
|
+
const className = cc({
|
|
90
|
+
button: true,
|
|
91
|
+
'has-icon': this.icon || this.hasSlotController.test('icon'),
|
|
92
|
+
});
|
|
93
|
+
return html `<mdui-ripple ${ref(this.rippleRef)} .noRipple="${this.noRipple}"></mdui-ripple>${this.isButton()
|
|
94
|
+
? this.renderButton({
|
|
95
|
+
className,
|
|
96
|
+
part: 'button',
|
|
97
|
+
content: this.renderInner(),
|
|
98
|
+
})
|
|
99
|
+
: this.disabled || this.loading
|
|
100
|
+
? html `<span part="button" class="_a ${className}">${this.renderInner()}</span>`
|
|
101
|
+
: this.renderAnchor({
|
|
102
|
+
className,
|
|
103
|
+
part: 'button',
|
|
104
|
+
content: this.renderInner(),
|
|
105
|
+
})}`;
|
|
106
|
+
}
|
|
107
|
+
renderLabel() {
|
|
108
|
+
return html `<slot part="label" class="label"></slot>`;
|
|
109
|
+
}
|
|
110
|
+
renderIcon() {
|
|
111
|
+
if (this.loading) {
|
|
112
|
+
return this.renderLoading();
|
|
113
|
+
}
|
|
114
|
+
return html `<slot name="icon" part="icon" class="icon">${this.icon
|
|
115
|
+
? html `<mdui-icon name="${this.icon}"></mdui-icon>`
|
|
116
|
+
: nothingTemplate}</slot>`;
|
|
117
|
+
}
|
|
118
|
+
renderInner() {
|
|
119
|
+
return [this.renderIcon(), this.renderLabel()];
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
Fab.styles = [ButtonBase.styles, style];
|
|
123
|
+
__decorate([
|
|
124
|
+
property({ reflect: true })
|
|
125
|
+
], Fab.prototype, "variant", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
property({ reflect: true })
|
|
128
|
+
], Fab.prototype, "size", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
property({ reflect: true })
|
|
131
|
+
], Fab.prototype, "icon", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
property({
|
|
134
|
+
type: Boolean,
|
|
135
|
+
reflect: true,
|
|
136
|
+
converter: booleanConverter,
|
|
137
|
+
})
|
|
138
|
+
], Fab.prototype, "extended", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
watch('extended')
|
|
141
|
+
], Fab.prototype, "onExtendedChange", null);
|
|
142
|
+
Fab = __decorate([
|
|
143
|
+
customElement('mdui-fab')
|
|
144
|
+
], Fab);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const style: import("lit").CSSResult;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const style = css `:host{--shape-corner-small:var(--mdui-shape-corner-small);--shape-corner-normal:var(--mdui-shape-corner-large);--shape-corner-large:var(--mdui-shape-corner-extra-large);position:relative;display:inline-block;overflow:hidden;text-align:center;border-radius:var(--shape-corner-normal);cursor:pointer;-webkit-tap-highlight-color:transparent;transition-property:box-shadow;transition-timing-function:var(--mdui-motion-easing-emphasized);transition-duration:var(--mdui-motion-duration-medium4);width:3.5rem;height:3.5rem;box-shadow:var(--mdui-elevation-level3);font-size:var(--mdui-typescale-label-large-size);font-weight:var(--mdui-typescale-label-large-weight);letter-spacing:var(--mdui-typescale-label-large-tracking);line-height:var(--mdui-typescale-label-large-line-height)}.button{padding:0 1rem}:host([size=small]) .button{padding:0 .5rem}:host([size=large]) .button{padding:0 1.875rem}:host([lowered]){box-shadow:var(--mdui-elevation-level1)}:host([focus-visible]){box-shadow:var(--mdui-elevation-level3)}:host([lowered][focus-visible]){box-shadow:var(--mdui-elevation-level1)}:host([pressed]){box-shadow:var(--mdui-elevation-level3)}:host([lowered][pressed]){box-shadow:var(--mdui-elevation-level1)}:host([hover]){box-shadow:var(--mdui-elevation-level4)}:host([lowered][hover]){box-shadow:var(--mdui-elevation-level2)}:host([variant=primary]){color:rgb(var(--mdui-color-on-primary-container));background-color:rgb(var(--mdui-color-primary-container));--mdui-comp-ripple-state-layer-color:var(
|
|
3
|
+
--mdui-color-on-primary-container
|
|
4
|
+
)}:host([variant=surface]){color:rgb(var(--mdui-color-primary));background-color:rgb(var(--mdui-color-surface-container-high));--mdui-comp-ripple-state-layer-color:var(--mdui-color-primary)}:host([variant=surface][lowered]){background-color:rgb(var(--mdui-color-surface-container-low))}:host([variant=secondary]){color:rgb(var(--mdui-color-on-secondary-container));background-color:rgb(var(--mdui-color-secondary-container));--mdui-comp-ripple-state-layer-color:var(
|
|
5
|
+
--mdui-color-on-secondary-container
|
|
6
|
+
)}:host([variant=tertiary]){color:rgb(var(--mdui-color-on-tertiary-container));background-color:rgb(var(--mdui-color-tertiary-container));--mdui-comp-ripple-state-layer-color:var(
|
|
7
|
+
--mdui-color-on-tertiary-container
|
|
8
|
+
)}:host([size=small]){border-radius:var(--shape-corner-small);width:2.5rem;height:2.5rem}:host([size=large]){border-radius:var(--shape-corner-large);width:6rem;height:6rem}:host([disabled]),:host([loading]){cursor:default;pointer-events:none}:host([disabled]){color:rgba(var(--mdui-color-on-surface),38%);background-color:rgba(var(--mdui-color-on-surface),12%);box-shadow:var(--mdui-elevation-level0)}:host([extended]){width:auto}.label{display:inline-flex;transition:opacity var(--mdui-motion-duration-short2) var(--mdui-motion-easing-linear) var(--mdui-motion-duration-short2);padding-left:.25rem;padding-right:.25rem}.has-icon .label{margin-left:.5rem}:host([size=small]) .has-icon .label{margin-left:.25rem}:host([size=large]) .has-icon .label{margin-left:1rem}:host(:not([extended])) .label{opacity:0;transition-delay:0s;transition-duration:var(--mdui-motion-duration-short1)}:host([size=large]) .label{font-size:1.5em}.icon{display:inline-flex;font-size:1.71428571em}:host([size=large]) .icon{font-size:2.57142857em}.icon mdui-icon,::slotted([slot=icon]){font-size:inherit}mdui-circular-progress{display:inline-flex;width:1.5rem;height:1.5rem}:host([size=large]) mdui-circular-progress{width:2.25rem;height:2.25rem}:host([disabled]) mdui-circular-progress{stroke:rgba(var(--mdui-color-on-surface),38%)}`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './fab/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './fab/index.js';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import type { TemplateResult, CSSResultGroup } from 'lit';
|
|
3
|
+
/**
|
|
4
|
+
* @summary 图标组件
|
|
5
|
+
*
|
|
6
|
+
* ```html
|
|
7
|
+
* <mdui-icon name="search"></mdui-icon>
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* @slot - `svg` 图标的内容
|
|
11
|
+
*/
|
|
12
|
+
export declare class Icon extends LitElement {
|
|
13
|
+
static styles: CSSResultGroup;
|
|
14
|
+
/**
|
|
15
|
+
* Material Icons 图标名
|
|
16
|
+
*/
|
|
17
|
+
name?: string;
|
|
18
|
+
/**
|
|
19
|
+
* svg 图标的路径
|
|
20
|
+
*/
|
|
21
|
+
src?: string;
|
|
22
|
+
private readonly hasSlotController;
|
|
23
|
+
protected render(): TemplateResult;
|
|
24
|
+
}
|
|
25
|
+
declare global {
|
|
26
|
+
interface HTMLElementTagNameMap {
|
|
27
|
+
'mdui-icon': Icon;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html, LitElement } from 'lit';
|
|
3
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
5
|
+
import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
|
|
6
|
+
import { until } from 'lit/directives/until.js';
|
|
7
|
+
import { ajax } from '@mdui/jq/functions/ajax.js';
|
|
8
|
+
import { HasSlotController } from '@mdui/shared/controllers/has-slot.js';
|
|
9
|
+
import { componentStyle } from '@mdui/shared/lit-styles/component-style.js';
|
|
10
|
+
import { style } from './style.js';
|
|
11
|
+
/**
|
|
12
|
+
* @summary 图标组件
|
|
13
|
+
*
|
|
14
|
+
* ```html
|
|
15
|
+
* <mdui-icon name="search"></mdui-icon>
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @slot - `svg` 图标的内容
|
|
19
|
+
*/
|
|
20
|
+
export let Icon = class Icon extends LitElement {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments);
|
|
23
|
+
this.hasSlotController = new HasSlotController(this, '[default]');
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
const renderDefault = () => {
|
|
27
|
+
if (this.name) {
|
|
28
|
+
const [name, variant] = this.name.split('--');
|
|
29
|
+
const familyMap = new Map([
|
|
30
|
+
['outlined', 'Material Icons Outlined'],
|
|
31
|
+
['filled', 'Material Icons'],
|
|
32
|
+
['rounded', 'Material Icons Round'],
|
|
33
|
+
['sharp', 'Material Icons Sharp'],
|
|
34
|
+
['two-tone', 'Material Icons Two Tone'],
|
|
35
|
+
]);
|
|
36
|
+
return html `<span style="${styleMap({ fontFamily: familyMap.get(variant) })}">${name}</span>`;
|
|
37
|
+
}
|
|
38
|
+
if (this.src) {
|
|
39
|
+
return html `${until(ajax({ url: this.src }).then(unsafeSVG))}`;
|
|
40
|
+
}
|
|
41
|
+
return html ``;
|
|
42
|
+
};
|
|
43
|
+
return this.hasSlotController.test('[default]')
|
|
44
|
+
? html `<slot></slot>`
|
|
45
|
+
: renderDefault();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
Icon.styles = [componentStyle, style];
|
|
49
|
+
__decorate([
|
|
50
|
+
property({ reflect: true })
|
|
51
|
+
], Icon.prototype, "name", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
property({ reflect: true })
|
|
54
|
+
], Icon.prototype, "src", void 0);
|
|
55
|
+
Icon = __decorate([
|
|
56
|
+
customElement('mdui-icon')
|
|
57
|
+
], Icon);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const style: import("lit").CSSResult;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const style = css `:host{display:inline-block;width:1em;height:1em;font-weight:400;font-family:'Material Icons';font-style:normal;line-height:1;direction:ltr;letter-spacing:normal;white-space:nowrap;text-transform:none;word-wrap:normal;-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;-moz-osx-font-smoothing:grayscale;font-size:1.5rem}::slotted(svg),svg{width:100%;height:100%;fill:currentcolor}`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './icon/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './icon/index.js';
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import '@mdui/jq/methods/children.js';
|
|
2
|
+
import '@mdui/jq/methods/css.js';
|
|
3
|
+
import '@mdui/jq/methods/get.js';
|
|
4
|
+
import type { LayoutItemBase } from './layout-item-base.js';
|
|
5
|
+
import type { LayoutMain } from './layout-main.js';
|
|
6
|
+
import type { Layout } from './layout.js';
|
|
7
|
+
export type LayoutPlacement = 'top' | 'left' | 'right' | 'bottom';
|
|
8
|
+
export declare class LayoutManager {
|
|
9
|
+
private $layout;
|
|
10
|
+
private $main?;
|
|
11
|
+
private states;
|
|
12
|
+
private items?;
|
|
13
|
+
constructor(element: Layout);
|
|
14
|
+
/**
|
|
15
|
+
* 注册 `<mdui-layout-main>`
|
|
16
|
+
*/
|
|
17
|
+
registerMain(element: LayoutMain): void;
|
|
18
|
+
/**
|
|
19
|
+
* 取消注册 `<mdui-layout-main>`
|
|
20
|
+
*/
|
|
21
|
+
unregisterMain(): void;
|
|
22
|
+
/**
|
|
23
|
+
* 注册新的 `<mdui-layout-item>`
|
|
24
|
+
*/
|
|
25
|
+
registerItem(element: LayoutItemBase): void;
|
|
26
|
+
/**
|
|
27
|
+
* 取消注册 `<mdui-layout-item>`
|
|
28
|
+
*/
|
|
29
|
+
unregisterItem(element: LayoutItemBase): void;
|
|
30
|
+
/**
|
|
31
|
+
* 获取所有 `<mdui-layout-item>` 元素(按在 DOM 中的顺序)
|
|
32
|
+
*/
|
|
33
|
+
getItems(): LayoutItemBase[];
|
|
34
|
+
/**
|
|
35
|
+
* 获取 `<mdui-layout-main>` 元素
|
|
36
|
+
*/
|
|
37
|
+
getMain(): LayoutMain | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* 获取 `<mdui-layout-item>` 及 `<mdui-layout-main>` 元素
|
|
40
|
+
*/
|
|
41
|
+
getItemsAndMain(): (LayoutItemBase | LayoutMain)[];
|
|
42
|
+
/**
|
|
43
|
+
* 检查指定 `<mdui-layout-item>` 元素是否已注册
|
|
44
|
+
*/
|
|
45
|
+
hasItem(element: LayoutItemBase): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* 更新 `order` 值,更新完后重新计算布局
|
|
48
|
+
*/
|
|
49
|
+
updateOrder(): void;
|
|
50
|
+
/**
|
|
51
|
+
* 重新计算布局
|
|
52
|
+
* @param element 从哪一个元素开始更新;若未传入参数,则将更新所有元素
|
|
53
|
+
* @param size 此次更新中,元素的宽高(仅在此次更新中使用)。若不传则自动计算
|
|
54
|
+
*/
|
|
55
|
+
updateLayout(element?: LayoutItemBase, size?: {
|
|
56
|
+
width?: number;
|
|
57
|
+
height?: number;
|
|
58
|
+
}): void;
|
|
59
|
+
/**
|
|
60
|
+
* 按 order 排序,order 相同时,按在 DOM 中的顺序排序
|
|
61
|
+
*/
|
|
62
|
+
private resort;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* 获取 layout 实例
|
|
66
|
+
*/
|
|
67
|
+
export declare const getLayout: (element: Layout) => LayoutManager;
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { $ } from '@mdui/jq/$.js';
|
|
2
|
+
import '@mdui/jq/methods/children.js';
|
|
3
|
+
import '@mdui/jq/methods/css.js';
|
|
4
|
+
import '@mdui/jq/methods/get.js';
|
|
5
|
+
import { isNodeName } from '@mdui/jq/shared/helper.js';
|
|
6
|
+
import { observeResize } from '@mdui/shared/helpers/observeResize.js';
|
|
7
|
+
export class LayoutManager {
|
|
8
|
+
constructor(element) {
|
|
9
|
+
this.states = [];
|
|
10
|
+
this.$layout = $(element);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 注册 `<mdui-layout-main>`
|
|
14
|
+
*/
|
|
15
|
+
registerMain(element) {
|
|
16
|
+
this.$main = $(element);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 取消注册 `<mdui-layout-main>`
|
|
20
|
+
*/
|
|
21
|
+
unregisterMain() {
|
|
22
|
+
this.$main = undefined;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 注册新的 `<mdui-layout-item>`
|
|
26
|
+
*/
|
|
27
|
+
registerItem(element) {
|
|
28
|
+
const state = { element };
|
|
29
|
+
this.states.push(state);
|
|
30
|
+
// 监听元素尺寸变化
|
|
31
|
+
state.observeResize = observeResize(state.element, () => {
|
|
32
|
+
// drawer 较特殊,在为模态化时,占据的宽度为 0
|
|
33
|
+
if (isNodeName(state.element, 'mdui-navigation-drawer') &&
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
state.element.isModal) {
|
|
36
|
+
this.updateLayout(state.element, { width: 0 });
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
this.updateLayout(state.element);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
this.items = undefined;
|
|
43
|
+
this.resort();
|
|
44
|
+
// 从头更新布局
|
|
45
|
+
this.updateLayout();
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* 取消注册 `<mdui-layout-item>`
|
|
49
|
+
*/
|
|
50
|
+
unregisterItem(element) {
|
|
51
|
+
var _a;
|
|
52
|
+
const index = this.states.findIndex((item) => item.element === element);
|
|
53
|
+
if (index < 0) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
// 取消监听尺寸变化
|
|
57
|
+
const item = this.states[index];
|
|
58
|
+
(_a = item.observeResize) === null || _a === void 0 ? void 0 : _a.unobserve();
|
|
59
|
+
this.items = undefined;
|
|
60
|
+
// 移除一个元素,并从下一个元素开始更新
|
|
61
|
+
this.states.splice(index, 1);
|
|
62
|
+
if (this.states[index]) {
|
|
63
|
+
this.updateLayout(this.states[index].element);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* 获取所有 `<mdui-layout-item>` 元素(按在 DOM 中的顺序)
|
|
68
|
+
*/
|
|
69
|
+
getItems() {
|
|
70
|
+
if (!this.items) {
|
|
71
|
+
this.items = this.$layout
|
|
72
|
+
.children([
|
|
73
|
+
'mdui-navigation-bar',
|
|
74
|
+
'mdui-navigation-drawer',
|
|
75
|
+
'mdui-navigation-rail',
|
|
76
|
+
'mdui-bottom-app-bar',
|
|
77
|
+
'mdui-top-app-bar',
|
|
78
|
+
'mdui-layout-item',
|
|
79
|
+
].join(','))
|
|
80
|
+
.get();
|
|
81
|
+
}
|
|
82
|
+
return this.items;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* 获取 `<mdui-layout-main>` 元素
|
|
86
|
+
*/
|
|
87
|
+
getMain() {
|
|
88
|
+
return this.$main ? this.$main[0] : undefined;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* 获取 `<mdui-layout-item>` 及 `<mdui-layout-main>` 元素
|
|
92
|
+
*/
|
|
93
|
+
getItemsAndMain() {
|
|
94
|
+
return [...this.getItems(), this.getMain()].filter((i) => i);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* 检查指定 `<mdui-layout-item>` 元素是否已注册
|
|
98
|
+
*/
|
|
99
|
+
hasItem(element) {
|
|
100
|
+
return this.getItems().includes(element);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* 更新 `order` 值,更新完后重新计算布局
|
|
104
|
+
*/
|
|
105
|
+
updateOrder() {
|
|
106
|
+
this.resort();
|
|
107
|
+
this.updateLayout();
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* 重新计算布局
|
|
111
|
+
* @param element 从哪一个元素开始更新;若未传入参数,则将更新所有元素
|
|
112
|
+
* @param size 此次更新中,元素的宽高(仅在此次更新中使用)。若不传则自动计算
|
|
113
|
+
*/
|
|
114
|
+
updateLayout(element, size) {
|
|
115
|
+
const state = element
|
|
116
|
+
? {
|
|
117
|
+
element,
|
|
118
|
+
width: size === null || size === void 0 ? void 0 : size.width,
|
|
119
|
+
height: size === null || size === void 0 ? void 0 : size.height,
|
|
120
|
+
}
|
|
121
|
+
: undefined;
|
|
122
|
+
const index = state
|
|
123
|
+
? this.states.findIndex((v) => v.element === state.element)
|
|
124
|
+
: 0;
|
|
125
|
+
if (index < 0) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
Object.assign(this.states[index], state);
|
|
129
|
+
this.states.forEach((currState, currIndex) => {
|
|
130
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
131
|
+
if (currIndex < index) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
// @ts-ignore
|
|
135
|
+
const placement = currState.element.layoutPlacement;
|
|
136
|
+
// 前一个元素
|
|
137
|
+
const prevState = currIndex > 0 ? this.states[currIndex - 1] : undefined;
|
|
138
|
+
const top = (_a = prevState === null || prevState === void 0 ? void 0 : prevState.top) !== null && _a !== void 0 ? _a : 0;
|
|
139
|
+
const right = (_b = prevState === null || prevState === void 0 ? void 0 : prevState.right) !== null && _b !== void 0 ? _b : 0;
|
|
140
|
+
const bottom = (_c = prevState === null || prevState === void 0 ? void 0 : prevState.bottom) !== null && _c !== void 0 ? _c : 0;
|
|
141
|
+
const left = (_d = prevState === null || prevState === void 0 ? void 0 : prevState.left) !== null && _d !== void 0 ? _d : 0;
|
|
142
|
+
Object.assign(currState, { top, right, bottom, left });
|
|
143
|
+
switch (placement) {
|
|
144
|
+
case 'top':
|
|
145
|
+
currState.top += (_e = currState.height) !== null && _e !== void 0 ? _e : currState.element.offsetHeight;
|
|
146
|
+
break;
|
|
147
|
+
case 'right':
|
|
148
|
+
currState.right += (_f = currState.width) !== null && _f !== void 0 ? _f : currState.element.offsetWidth;
|
|
149
|
+
break;
|
|
150
|
+
case 'bottom':
|
|
151
|
+
currState.bottom +=
|
|
152
|
+
(_g = currState.height) !== null && _g !== void 0 ? _g : currState.element.offsetHeight;
|
|
153
|
+
break;
|
|
154
|
+
case 'left':
|
|
155
|
+
currState.left += (_h = currState.width) !== null && _h !== void 0 ? _h : currState.element.offsetWidth;
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
currState.height = currState.width = undefined;
|
|
159
|
+
$(currState.element).css({
|
|
160
|
+
position: 'absolute',
|
|
161
|
+
top: placement === 'bottom' ? null : top,
|
|
162
|
+
right: placement === 'left' ? null : right,
|
|
163
|
+
bottom: placement === 'top' ? null : bottom,
|
|
164
|
+
left: placement === 'right' ? null : left,
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
// 更新完后,设置 layout-main 的 padding
|
|
168
|
+
const lastState = this.states[this.states.length - 1];
|
|
169
|
+
if (this.$main) {
|
|
170
|
+
this.$main.css({
|
|
171
|
+
paddingTop: lastState.top,
|
|
172
|
+
paddingRight: lastState.right,
|
|
173
|
+
paddingBottom: lastState.bottom,
|
|
174
|
+
paddingLeft: lastState.left,
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* 按 order 排序,order 相同时,按在 DOM 中的顺序排序
|
|
180
|
+
*/
|
|
181
|
+
resort() {
|
|
182
|
+
const items = this.getItems();
|
|
183
|
+
this.states.sort((a, b) => {
|
|
184
|
+
var _a, _b;
|
|
185
|
+
const aOrder = (_a = a.element.order) !== null && _a !== void 0 ? _a : 0;
|
|
186
|
+
const bOrder = (_b = b.element.order) !== null && _b !== void 0 ? _b : 0;
|
|
187
|
+
if (aOrder > bOrder) {
|
|
188
|
+
return 1;
|
|
189
|
+
}
|
|
190
|
+
if (aOrder < bOrder) {
|
|
191
|
+
return -1;
|
|
192
|
+
}
|
|
193
|
+
if (items.indexOf(a.element) > items.indexOf(b.element)) {
|
|
194
|
+
return 1;
|
|
195
|
+
}
|
|
196
|
+
if (items.indexOf(a.element) < items.indexOf(b.element)) {
|
|
197
|
+
return -1;
|
|
198
|
+
}
|
|
199
|
+
return 0;
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
const layoutManagerMap = new WeakMap();
|
|
204
|
+
/**
|
|
205
|
+
* 获取 layout 实例
|
|
206
|
+
*/
|
|
207
|
+
export const getLayout = (element) => {
|
|
208
|
+
if (!layoutManagerMap.has(element)) {
|
|
209
|
+
layoutManagerMap.set(element, new LayoutManager(element));
|
|
210
|
+
}
|
|
211
|
+
return layoutManagerMap.get(element);
|
|
212
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import type { LayoutManager, LayoutPlacement } from './helper.js';
|
|
3
|
+
export declare class LayoutItemBase extends LitElement {
|
|
4
|
+
/**
|
|
5
|
+
* 该组件在 [`<mdui-layout>`](/docs/2/components/layout) 中的布局顺序,按从小到大排序。默认为 `0`
|
|
6
|
+
*/
|
|
7
|
+
order?: number;
|
|
8
|
+
protected layoutManager?: LayoutManager;
|
|
9
|
+
protected isParentLayout: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* 当前布局组件所处的位置,父类必须实现该 getter
|
|
12
|
+
*/
|
|
13
|
+
protected get layoutPlacement(): LayoutPlacement;
|
|
14
|
+
private onOrderChange;
|
|
15
|
+
connectedCallback(): void;
|
|
16
|
+
disconnectedCallback(): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
import { property } from 'lit/decorators.js';
|
|
4
|
+
import { isNodeName } from '@mdui/jq/shared/helper.js';
|
|
5
|
+
import { watch } from '@mdui/shared/decorators/watch.js';
|
|
6
|
+
import { getLayout } from './helper.js';
|
|
7
|
+
export class LayoutItemBase extends LitElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
// 父元素是否是 `mdui-layout`
|
|
11
|
+
this.isParentLayout = false;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 当前布局组件所处的位置,父类必须实现该 getter
|
|
15
|
+
*/
|
|
16
|
+
get layoutPlacement() {
|
|
17
|
+
throw new Error('Must implement placement getter!');
|
|
18
|
+
}
|
|
19
|
+
// order 变更时,需要重新调整布局
|
|
20
|
+
onOrderChange() {
|
|
21
|
+
var _a;
|
|
22
|
+
(_a = this.layoutManager) === null || _a === void 0 ? void 0 : _a.updateOrder();
|
|
23
|
+
}
|
|
24
|
+
connectedCallback() {
|
|
25
|
+
super.connectedCallback();
|
|
26
|
+
const parentElement = this.parentElement;
|
|
27
|
+
this.isParentLayout = isNodeName(parentElement, 'mdui-layout');
|
|
28
|
+
if (this.isParentLayout) {
|
|
29
|
+
this.layoutManager = getLayout(parentElement);
|
|
30
|
+
this.layoutManager.registerItem(this);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
disconnectedCallback() {
|
|
34
|
+
super.disconnectedCallback();
|
|
35
|
+
if (this.layoutManager) {
|
|
36
|
+
this.layoutManager.unregisterItem(this);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
__decorate([
|
|
41
|
+
property({ type: Number, reflect: true })
|
|
42
|
+
], LayoutItemBase.prototype, "order", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
watch('order', true)
|
|
45
|
+
], LayoutItemBase.prototype, "onOrderChange", null);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const layoutItemStyle: import("lit").CSSResult;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { CSSResultGroup } from 'lit';
|
|
2
|
+
import { LayoutItemBase } from './layout-item-base.js';
|
|
3
|
+
import type { LayoutPlacement } from './helper.js';
|
|
4
|
+
import type { TemplateResult } from 'lit';
|
|
5
|
+
/**
|
|
6
|
+
* @summary 布局项组件
|
|
7
|
+
*
|
|
8
|
+
* ```html
|
|
9
|
+
* <mdui-layout>
|
|
10
|
+
* ..<mdui-layout-item></mdui-layout-item>
|
|
11
|
+
* ..<mdui-layout-item></mdui-layout-item>
|
|
12
|
+
* ..<mdui-layout-main></mdui-layout-main>
|
|
13
|
+
* </mdui-layout>
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @slot - 可以是任意内容
|
|
17
|
+
*/
|
|
18
|
+
export declare class LayoutItem extends LayoutItemBase {
|
|
19
|
+
static styles: CSSResultGroup;
|
|
20
|
+
/**
|
|
21
|
+
* 该组件所处位置。可选值为:
|
|
22
|
+
*
|
|
23
|
+
* * `top`:位于上方
|
|
24
|
+
* * `bottom`:位于下方
|
|
25
|
+
* * `left`:位于左侧
|
|
26
|
+
* * `right`:位于右侧
|
|
27
|
+
*/
|
|
28
|
+
placement: /*位于上方*/ 'top' | /*位于下方*/ 'bottom' | /*位于左侧*/ 'left' | /*位于右侧*/ 'right';
|
|
29
|
+
protected get layoutPlacement(): LayoutPlacement;
|
|
30
|
+
private onPlacementChange;
|
|
31
|
+
protected render(): TemplateResult;
|
|
32
|
+
}
|
|
33
|
+
declare global {
|
|
34
|
+
interface HTMLElementTagNameMap {
|
|
35
|
+
'mdui-layout-item': LayoutItem;
|
|
36
|
+
}
|
|
37
|
+
}
|