mdui 1.0.2 → 2.0.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/LICENSE +1 -1
- 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
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import 'mdui.jq/es/methods/each';
|
|
2
|
-
declare module 'mdui.jq/es/JQ' {
|
|
3
|
-
interface JQ<T = HTMLElement> {
|
|
4
|
-
/**
|
|
5
|
-
* 设置当前元素的 transition-duration 属性
|
|
6
|
-
* @param duration 可以是带单位的值;若不带单位,则自动添加 `ms` 作为单位
|
|
7
|
-
* @example
|
|
8
|
-
```js
|
|
9
|
-
$('.box').transition('300ms');
|
|
10
|
-
$('.box').transition(300);
|
|
11
|
-
```
|
|
12
|
-
*/
|
|
13
|
-
transition(duration: string | number): this;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import $ from 'mdui.jq/es/$';
|
|
2
|
-
import { isNumber } from 'mdui.jq/es/utils';
|
|
3
|
-
import 'mdui.jq/es/methods/each';
|
|
4
|
-
$.fn.transition = function (duration) {
|
|
5
|
-
if (isNumber(duration)) {
|
|
6
|
-
duration = `${duration}ms`;
|
|
7
|
-
}
|
|
8
|
-
return this.each(function () {
|
|
9
|
-
this.style.webkitTransitionDuration = duration;
|
|
10
|
-
this.style.transitionDuration = duration;
|
|
11
|
-
});
|
|
12
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import 'mdui.jq/es/methods/on';
|
|
2
|
-
import 'mdui.jq/es/methods/off';
|
|
3
|
-
declare module 'mdui.jq/es/JQ' {
|
|
4
|
-
interface JQ<T = HTMLElement> {
|
|
5
|
-
/**
|
|
6
|
-
* 在当前元素上添加 transitionend 事件回调
|
|
7
|
-
* @param callback 回调函数的参数为 `transitionend` 事件对象;`this` 指向当前元素
|
|
8
|
-
* @example
|
|
9
|
-
```js
|
|
10
|
-
$('.box').transitionEnd(function() {
|
|
11
|
-
alert('.box 元素的 transitionend 事件已触发');
|
|
12
|
-
});
|
|
13
|
-
```
|
|
14
|
-
*/
|
|
15
|
-
transitionEnd(callback: (this: T, e: Event) => void): this;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import $ from 'mdui.jq/es/$';
|
|
2
|
-
import each from 'mdui.jq/es/functions/each';
|
|
3
|
-
import 'mdui.jq/es/methods/on';
|
|
4
|
-
import 'mdui.jq/es/methods/off';
|
|
5
|
-
$.fn.transitionEnd = function (callback) {
|
|
6
|
-
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
7
|
-
const that = this;
|
|
8
|
-
const events = ['webkitTransitionEnd', 'transitionend'];
|
|
9
|
-
function fireCallback(e) {
|
|
10
|
-
if (e.target !== this) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
callback.call(this, e);
|
|
15
|
-
each(events, (_, event) => {
|
|
16
|
-
that.off(event, fireCallback);
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
each(events, (_, event) => {
|
|
20
|
-
that.on(event, fireCallback);
|
|
21
|
-
});
|
|
22
|
-
return this;
|
|
23
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
declare module 'mdui.jq/es/interfaces/JQStatic' {
|
|
2
|
-
interface JQStatic {
|
|
3
|
-
/**
|
|
4
|
-
* 生成一个全局唯一的 ID
|
|
5
|
-
* @param name 当该参数值对应的 guid 不存在时,会生成一个新的 guid,并返回;当该参数对应的 guid 已存在,则直接返回已有 guid
|
|
6
|
-
* @example
|
|
7
|
-
```js
|
|
8
|
-
$.guid();
|
|
9
|
-
```
|
|
10
|
-
* @example
|
|
11
|
-
```js
|
|
12
|
-
$.guid('test');
|
|
13
|
-
```
|
|
14
|
-
*/
|
|
15
|
-
guid(name?: string): string;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import $ from 'mdui.jq/es/$';
|
|
2
|
-
import { isUndefined } from 'mdui.jq/es/utils';
|
|
3
|
-
const GUID = {};
|
|
4
|
-
$.guid = function (name) {
|
|
5
|
-
if (!isUndefined(name) && !isUndefined(GUID[name])) {
|
|
6
|
-
return GUID[name];
|
|
7
|
-
}
|
|
8
|
-
function s4() {
|
|
9
|
-
return Math.floor((1 + Math.random()) * 0x10000)
|
|
10
|
-
.toString(16)
|
|
11
|
-
.substring(1);
|
|
12
|
-
}
|
|
13
|
-
const guid = '_' +
|
|
14
|
-
s4() +
|
|
15
|
-
s4() +
|
|
16
|
-
'-' +
|
|
17
|
-
s4() +
|
|
18
|
-
'-' +
|
|
19
|
-
s4() +
|
|
20
|
-
'-' +
|
|
21
|
-
s4() +
|
|
22
|
-
'-' +
|
|
23
|
-
s4() +
|
|
24
|
-
s4() +
|
|
25
|
-
s4();
|
|
26
|
-
if (!isUndefined(name)) {
|
|
27
|
-
GUID[name] = guid;
|
|
28
|
-
}
|
|
29
|
-
return guid;
|
|
30
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import 'mdui.jq/es/methods/data';
|
|
2
|
-
import 'mdui.jq/es/methods/removeClass';
|
|
3
|
-
import 'mdui.jq/es/methods/remove';
|
|
4
|
-
import '../methods/transitionEnd';
|
|
5
|
-
declare module 'mdui.jq/es/interfaces/JQStatic' {
|
|
6
|
-
interface JQStatic {
|
|
7
|
-
/**
|
|
8
|
-
* 隐藏遮罩层
|
|
9
|
-
*
|
|
10
|
-
* 如果调用了多次 $.showOverlay() 来显示遮罩层,则也需要调用相同次数的 $.hideOverlay() 才能隐藏遮罩层。可以通过传入参数 true 来强制隐藏遮罩层。
|
|
11
|
-
* @param force 是否强制隐藏遮罩
|
|
12
|
-
* @example
|
|
13
|
-
```js
|
|
14
|
-
$.hideOverlay();
|
|
15
|
-
```
|
|
16
|
-
* @example
|
|
17
|
-
```js
|
|
18
|
-
$.hideOverlay(true);
|
|
19
|
-
```
|
|
20
|
-
*/
|
|
21
|
-
hideOverlay(force?: boolean): void;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import $ from 'mdui.jq/es/$';
|
|
2
|
-
import 'mdui.jq/es/methods/data';
|
|
3
|
-
import 'mdui.jq/es/methods/removeClass';
|
|
4
|
-
import 'mdui.jq/es/methods/remove';
|
|
5
|
-
import '../methods/transitionEnd';
|
|
6
|
-
$.hideOverlay = function (force = false) {
|
|
7
|
-
const $overlay = $('.mdui-overlay');
|
|
8
|
-
if (!$overlay.length) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
let level = force ? 1 : $overlay.data('_overlay_level');
|
|
12
|
-
if (level > 1) {
|
|
13
|
-
$overlay.data('_overlay_level', --level);
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
$overlay
|
|
17
|
-
.data('_overlay_level', 0)
|
|
18
|
-
.removeClass('mdui-overlay-show')
|
|
19
|
-
.data('_overlay_is_deleted', true)
|
|
20
|
-
.transitionEnd(() => {
|
|
21
|
-
if ($overlay.data('_overlay_is_deleted')) {
|
|
22
|
-
$overlay.remove();
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import 'mdui.jq/es/methods/addClass';
|
|
2
|
-
import 'mdui.jq/es/methods/data';
|
|
3
|
-
import 'mdui.jq/es/methods/width';
|
|
4
|
-
declare module 'mdui.jq/es/interfaces/JQStatic' {
|
|
5
|
-
interface JQStatic {
|
|
6
|
-
/**
|
|
7
|
-
* 锁定屏页面,禁止页面滚动
|
|
8
|
-
* @example
|
|
9
|
-
```js
|
|
10
|
-
$.lockScreen();
|
|
11
|
-
```
|
|
12
|
-
*/
|
|
13
|
-
lockScreen(): void;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import $ from 'mdui.jq/es/$';
|
|
2
|
-
import 'mdui.jq/es/methods/addClass';
|
|
3
|
-
import 'mdui.jq/es/methods/data';
|
|
4
|
-
import 'mdui.jq/es/methods/width';
|
|
5
|
-
$.lockScreen = function () {
|
|
6
|
-
const $body = $('body');
|
|
7
|
-
// 不直接把 body 设为 box-sizing: border-box,避免污染全局样式
|
|
8
|
-
const newBodyWidth = $body.width();
|
|
9
|
-
let level = $body.data('_lockscreen_level') || 0;
|
|
10
|
-
$body
|
|
11
|
-
.addClass('mdui-locked')
|
|
12
|
-
.width(newBodyWidth)
|
|
13
|
-
.data('_lockscreen_level', ++level);
|
|
14
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { JQ } from 'mdui.jq/es/JQ';
|
|
2
|
-
import 'mdui.jq/es/methods/data';
|
|
3
|
-
import 'mdui.jq/es/methods/css';
|
|
4
|
-
import 'mdui.jq/es/methods/appendTo';
|
|
5
|
-
import 'mdui.jq/es/methods/addClass';
|
|
6
|
-
import '../methods/reflow';
|
|
7
|
-
declare module 'mdui.jq/es/interfaces/JQStatic' {
|
|
8
|
-
interface JQStatic {
|
|
9
|
-
/**
|
|
10
|
-
* 创建并显示遮罩,返回遮罩层的 JQ 对象
|
|
11
|
-
* @param zIndex 遮罩层的 `z-index` 值,默认为 `2000`
|
|
12
|
-
* @example
|
|
13
|
-
```js
|
|
14
|
-
$.showOverlay();
|
|
15
|
-
```
|
|
16
|
-
* @example
|
|
17
|
-
```js
|
|
18
|
-
$.showOverlay(3000);
|
|
19
|
-
```
|
|
20
|
-
*/
|
|
21
|
-
showOverlay(zIndex?: number): JQ;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import $ from 'mdui.jq/es/$';
|
|
2
|
-
import { isUndefined } from 'mdui.jq/es/utils';
|
|
3
|
-
import 'mdui.jq/es/methods/data';
|
|
4
|
-
import 'mdui.jq/es/methods/css';
|
|
5
|
-
import 'mdui.jq/es/methods/appendTo';
|
|
6
|
-
import 'mdui.jq/es/methods/addClass';
|
|
7
|
-
import '../methods/reflow';
|
|
8
|
-
$.showOverlay = function (zIndex) {
|
|
9
|
-
let $overlay = $('.mdui-overlay');
|
|
10
|
-
if ($overlay.length) {
|
|
11
|
-
$overlay.data('_overlay_is_deleted', false);
|
|
12
|
-
if (!isUndefined(zIndex)) {
|
|
13
|
-
$overlay.css('z-index', zIndex);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
if (isUndefined(zIndex)) {
|
|
18
|
-
zIndex = 2000;
|
|
19
|
-
}
|
|
20
|
-
$overlay = $('<div class="mdui-overlay">')
|
|
21
|
-
.appendTo(document.body)
|
|
22
|
-
.reflow()
|
|
23
|
-
.css('z-index', zIndex);
|
|
24
|
-
}
|
|
25
|
-
let level = $overlay.data('_overlay_level') || 0;
|
|
26
|
-
return $overlay.data('_overlay_level', ++level).addClass('mdui-overlay-show');
|
|
27
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
declare module 'mdui.jq/es/interfaces/JQStatic' {
|
|
2
|
-
interface JQStatic {
|
|
3
|
-
/**
|
|
4
|
-
* 函数节流
|
|
5
|
-
* @param fn 执行的函数
|
|
6
|
-
* @param delay 最多多少毫秒执行一次
|
|
7
|
-
* @example
|
|
8
|
-
```js
|
|
9
|
-
$.throttle(function () {
|
|
10
|
-
console.log('这个函数最多 100ms 执行一次');
|
|
11
|
-
}, 100)
|
|
12
|
-
```
|
|
13
|
-
*/
|
|
14
|
-
throttle(fn: () => void, delay: number): () => void;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import $ from 'mdui.jq/es/$';
|
|
2
|
-
import { isNull } from 'mdui.jq/es/utils';
|
|
3
|
-
$.throttle = function (fn, delay = 16) {
|
|
4
|
-
let timer = null;
|
|
5
|
-
return function (...args) {
|
|
6
|
-
if (isNull(timer)) {
|
|
7
|
-
timer = setTimeout(() => {
|
|
8
|
-
fn.apply(this, args);
|
|
9
|
-
timer = null;
|
|
10
|
-
}, delay);
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import 'mdui.jq/es/methods/data';
|
|
2
|
-
import 'mdui.jq/es/methods/removeClass';
|
|
3
|
-
import 'mdui.jq/es/methods/width';
|
|
4
|
-
declare module 'mdui.jq/es/interfaces/JQStatic' {
|
|
5
|
-
interface JQStatic {
|
|
6
|
-
/**
|
|
7
|
-
* 解除页面锁定
|
|
8
|
-
*
|
|
9
|
-
* 如果调用了多次 $.lockScreen() 来显示遮罩层,则也需要调用相同次数的 $.unlockScreen() 才能隐藏遮罩层。可以通过传入参数 true 来强制隐藏遮罩层。
|
|
10
|
-
* @param force 是否强制解除锁定
|
|
11
|
-
* @example
|
|
12
|
-
```js
|
|
13
|
-
$.unlockScreen();
|
|
14
|
-
```
|
|
15
|
-
* @example
|
|
16
|
-
```js
|
|
17
|
-
$.unlockScreen(true);
|
|
18
|
-
```
|
|
19
|
-
*/
|
|
20
|
-
unlockScreen(force?: boolean): void;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import $ from 'mdui.jq/es/$';
|
|
2
|
-
import 'mdui.jq/es/methods/data';
|
|
3
|
-
import 'mdui.jq/es/methods/removeClass';
|
|
4
|
-
import 'mdui.jq/es/methods/width';
|
|
5
|
-
$.unlockScreen = function (force = false) {
|
|
6
|
-
const $body = $('body');
|
|
7
|
-
let level = force ? 1 : $body.data('_lockscreen_level');
|
|
8
|
-
if (level > 1) {
|
|
9
|
-
$body.data('_lockscreen_level', --level);
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
$body.data('_lockscreen_level', 0).removeClass('mdui-locked').width('');
|
|
13
|
-
};
|
package/es/mdui.d.ts
DELETED
package/es/mdui.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { JQ } from 'mdui.jq/es/JQ';
|
|
2
|
-
import PlainObject from 'mdui.jq/es/interfaces/PlainObject';
|
|
3
|
-
import 'mdui.jq/es/methods/trigger';
|
|
4
|
-
/**
|
|
5
|
-
* 触发组件上的事件
|
|
6
|
-
* @param eventName 事件名
|
|
7
|
-
* @param componentName 组件名
|
|
8
|
-
* @param target 在该元素上触发事件
|
|
9
|
-
* @param instance 组件实例
|
|
10
|
-
* @param parameters 事件参数
|
|
11
|
-
*/
|
|
12
|
-
declare function componentEvent(eventName: string, componentName: string, target: HTMLElement | HTMLElement[] | JQ, instance?: any, parameters?: PlainObject): void;
|
|
13
|
-
export { componentEvent };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import $ from 'mdui.jq/es/$';
|
|
2
|
-
import 'mdui.jq/es/methods/trigger';
|
|
3
|
-
/**
|
|
4
|
-
* 触发组件上的事件
|
|
5
|
-
* @param eventName 事件名
|
|
6
|
-
* @param componentName 组件名
|
|
7
|
-
* @param target 在该元素上触发事件
|
|
8
|
-
* @param instance 组件实例
|
|
9
|
-
* @param parameters 事件参数
|
|
10
|
-
*/
|
|
11
|
-
function componentEvent(eventName, componentName, target, instance, parameters) {
|
|
12
|
-
if (!parameters) {
|
|
13
|
-
parameters = {};
|
|
14
|
-
}
|
|
15
|
-
// @ts-ignore
|
|
16
|
-
parameters.inst = instance;
|
|
17
|
-
const fullEventName = `${eventName}.mdui.${componentName}`;
|
|
18
|
-
// jQuery 事件
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
if (typeof jQuery !== 'undefined') {
|
|
21
|
-
// @ts-ignore
|
|
22
|
-
jQuery(target).trigger(fullEventName, parameters);
|
|
23
|
-
}
|
|
24
|
-
const $target = $(target);
|
|
25
|
-
// mdui.jq 事件
|
|
26
|
-
$target.trigger(fullEventName, parameters);
|
|
27
|
-
const eventParams = {
|
|
28
|
-
bubbles: true,
|
|
29
|
-
cancelable: true,
|
|
30
|
-
detail: parameters,
|
|
31
|
-
};
|
|
32
|
-
const eventObject = new CustomEvent(fullEventName, eventParams);
|
|
33
|
-
// @ts-ignore
|
|
34
|
-
eventObject._detail = parameters;
|
|
35
|
-
$target[0].dispatchEvent(eventObject);
|
|
36
|
-
}
|
|
37
|
-
export { componentEvent };
|
package/es/utils/dom.d.ts
DELETED
package/es/utils/dom.js
DELETED
package/es/utils/mutation.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import PlainObject from 'mdui.jq/es/interfaces/PlainObject';
|
|
2
|
-
declare type TYPE_API_INIT = (this: HTMLElement, i: number, element: HTMLElement) => void;
|
|
3
|
-
/**
|
|
4
|
-
* CSS 选择器和初始化函数组成的对象
|
|
5
|
-
*/
|
|
6
|
-
declare const entries: PlainObject<TYPE_API_INIT>;
|
|
7
|
-
/**
|
|
8
|
-
* 注册并执行初始化函数
|
|
9
|
-
* @param selector CSS 选择器
|
|
10
|
-
* @param apiInit 初始化函数
|
|
11
|
-
* @param i 元素索引
|
|
12
|
-
* @param element 元素
|
|
13
|
-
*/
|
|
14
|
-
declare function mutation(selector: string, apiInit: TYPE_API_INIT, i: number, element: HTMLElement): void;
|
|
15
|
-
export { TYPE_API_INIT, entries, mutation };
|
package/es/utils/mutation.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import data from 'mdui.jq/es/functions/data';
|
|
2
|
-
/**
|
|
3
|
-
* CSS 选择器和初始化函数组成的对象
|
|
4
|
-
*/
|
|
5
|
-
const entries = {};
|
|
6
|
-
/**
|
|
7
|
-
* 注册并执行初始化函数
|
|
8
|
-
* @param selector CSS 选择器
|
|
9
|
-
* @param apiInit 初始化函数
|
|
10
|
-
* @param i 元素索引
|
|
11
|
-
* @param element 元素
|
|
12
|
-
*/
|
|
13
|
-
function mutation(selector, apiInit, i, element) {
|
|
14
|
-
let selectors = data(element, '_mdui_mutation');
|
|
15
|
-
if (!selectors) {
|
|
16
|
-
selectors = [];
|
|
17
|
-
data(element, '_mdui_mutation', selectors);
|
|
18
|
-
}
|
|
19
|
-
if (selectors.indexOf(selector) === -1) {
|
|
20
|
-
selectors.push(selector);
|
|
21
|
-
apiInit.call(element, i, element);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
export { entries, mutation };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import 'mdui.jq/es/methods/attr';
|
|
2
|
-
import PlainObject from 'mdui.jq/es/interfaces/PlainObject';
|
|
3
|
-
/**
|
|
4
|
-
* 解析 DATA API 参数
|
|
5
|
-
* @param element 元素
|
|
6
|
-
* @param name 属性名
|
|
7
|
-
*/
|
|
8
|
-
declare function parseOptions(element: HTMLElement, name: string): PlainObject;
|
|
9
|
-
export { parseOptions };
|
package/es/utils/parseOptions.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import $ from 'mdui.jq/es/$';
|
|
2
|
-
import 'mdui.jq/es/methods/attr';
|
|
3
|
-
/**
|
|
4
|
-
* 解析 DATA API 参数
|
|
5
|
-
* @param element 元素
|
|
6
|
-
* @param name 属性名
|
|
7
|
-
*/
|
|
8
|
-
function parseOptions(element, name) {
|
|
9
|
-
const attr = $(element).attr(name);
|
|
10
|
-
if (!attr) {
|
|
11
|
-
return {};
|
|
12
|
-
}
|
|
13
|
-
return new Function('', `var json = ${attr}; return JSON.parse(JSON.stringify(json));`)();
|
|
14
|
-
}
|
|
15
|
-
export { parseOptions };
|
package/es/utils/queue.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
declare type Func = () => any;
|
|
2
|
-
/**
|
|
3
|
-
* 根据队列名,获取队列中所有函数
|
|
4
|
-
* @param name 队列名
|
|
5
|
-
*/
|
|
6
|
-
declare function queue(name: string): Func[];
|
|
7
|
-
/**
|
|
8
|
-
* 写入队列
|
|
9
|
-
* @param name 队列名
|
|
10
|
-
* @param func 函数
|
|
11
|
-
*/
|
|
12
|
-
declare function queue(name: string, func: Func): void;
|
|
13
|
-
/**
|
|
14
|
-
* 从队列中移除第一个函数,并执行该函数
|
|
15
|
-
* @param name 队列满
|
|
16
|
-
*/
|
|
17
|
-
declare function dequeue(name: string): void;
|
|
18
|
-
export { queue, dequeue };
|
package/es/utils/queue.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { isUndefined } from 'mdui.jq/es/utils';
|
|
2
|
-
const container = {};
|
|
3
|
-
function queue(name, func) {
|
|
4
|
-
if (isUndefined(container[name])) {
|
|
5
|
-
container[name] = [];
|
|
6
|
-
}
|
|
7
|
-
if (isUndefined(func)) {
|
|
8
|
-
return container[name];
|
|
9
|
-
}
|
|
10
|
-
container[name].push(func);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* 从队列中移除第一个函数,并执行该函数
|
|
14
|
-
* @param name 队列满
|
|
15
|
-
*/
|
|
16
|
-
function dequeue(name) {
|
|
17
|
-
if (isUndefined(container[name])) {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
if (!container[name].length) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
const func = container[name].shift();
|
|
24
|
-
func();
|
|
25
|
-
}
|
|
26
|
-
export { queue, dequeue };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* touch 事件后的 500ms 内禁用 mousedown 事件
|
|
3
|
-
*
|
|
4
|
-
* 不支持触控的屏幕上事件顺序为 mousedown -> mouseup -> click
|
|
5
|
-
* 支持触控的屏幕上事件顺序为 touchstart -> touchend -> mousedown -> mouseup -> click
|
|
6
|
-
*
|
|
7
|
-
* 在每一个事件中都使用 TouchHandler.isAllow(event) 判断事件是否可执行
|
|
8
|
-
* 在 touchstart 和 touchmove、touchend、touchcancel
|
|
9
|
-
*
|
|
10
|
-
* (function () {
|
|
11
|
-
* $document
|
|
12
|
-
* .on(start, function (e) {
|
|
13
|
-
* if (!isAllow(e)) {
|
|
14
|
-
* return;
|
|
15
|
-
* }
|
|
16
|
-
* register(e);
|
|
17
|
-
* console.log(e.type);
|
|
18
|
-
* })
|
|
19
|
-
* .on(move, function (e) {
|
|
20
|
-
* if (!isAllow(e)) {
|
|
21
|
-
* return;
|
|
22
|
-
* }
|
|
23
|
-
* console.log(e.type);
|
|
24
|
-
* })
|
|
25
|
-
* .on(end, function (e) {
|
|
26
|
-
* if (!isAllow(e)) {
|
|
27
|
-
* return;
|
|
28
|
-
* }
|
|
29
|
-
* console.log(e.type);
|
|
30
|
-
* })
|
|
31
|
-
* .on(unlock, register);
|
|
32
|
-
* })();
|
|
33
|
-
*/
|
|
34
|
-
declare const startEvent = "touchstart mousedown";
|
|
35
|
-
declare const moveEvent = "touchmove mousemove";
|
|
36
|
-
declare const endEvent = "touchend mouseup";
|
|
37
|
-
declare const cancelEvent = "touchcancel mouseleave";
|
|
38
|
-
declare const unlockEvent = "touchend touchmove touchcancel";
|
|
39
|
-
/**
|
|
40
|
-
* 该事件是否被允许,在执行事件前调用该方法判断事件是否可以执行
|
|
41
|
-
* 若已触发 touch 事件,则阻止之后的鼠标事件
|
|
42
|
-
* @param event
|
|
43
|
-
*/
|
|
44
|
-
declare function isAllow(event: Event): boolean;
|
|
45
|
-
/**
|
|
46
|
-
* 在 touchstart 和 touchmove、touchend、touchcancel 事件中调用该方法注册事件
|
|
47
|
-
* @param event
|
|
48
|
-
*/
|
|
49
|
-
declare function register(event: Event): void;
|
|
50
|
-
export { startEvent, moveEvent, endEvent, cancelEvent, unlockEvent, isAllow, register, };
|
package/es/utils/touchHandler.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* touch 事件后的 500ms 内禁用 mousedown 事件
|
|
3
|
-
*
|
|
4
|
-
* 不支持触控的屏幕上事件顺序为 mousedown -> mouseup -> click
|
|
5
|
-
* 支持触控的屏幕上事件顺序为 touchstart -> touchend -> mousedown -> mouseup -> click
|
|
6
|
-
*
|
|
7
|
-
* 在每一个事件中都使用 TouchHandler.isAllow(event) 判断事件是否可执行
|
|
8
|
-
* 在 touchstart 和 touchmove、touchend、touchcancel
|
|
9
|
-
*
|
|
10
|
-
* (function () {
|
|
11
|
-
* $document
|
|
12
|
-
* .on(start, function (e) {
|
|
13
|
-
* if (!isAllow(e)) {
|
|
14
|
-
* return;
|
|
15
|
-
* }
|
|
16
|
-
* register(e);
|
|
17
|
-
* console.log(e.type);
|
|
18
|
-
* })
|
|
19
|
-
* .on(move, function (e) {
|
|
20
|
-
* if (!isAllow(e)) {
|
|
21
|
-
* return;
|
|
22
|
-
* }
|
|
23
|
-
* console.log(e.type);
|
|
24
|
-
* })
|
|
25
|
-
* .on(end, function (e) {
|
|
26
|
-
* if (!isAllow(e)) {
|
|
27
|
-
* return;
|
|
28
|
-
* }
|
|
29
|
-
* console.log(e.type);
|
|
30
|
-
* })
|
|
31
|
-
* .on(unlock, register);
|
|
32
|
-
* })();
|
|
33
|
-
*/
|
|
34
|
-
const startEvent = 'touchstart mousedown';
|
|
35
|
-
const moveEvent = 'touchmove mousemove';
|
|
36
|
-
const endEvent = 'touchend mouseup';
|
|
37
|
-
const cancelEvent = 'touchcancel mouseleave';
|
|
38
|
-
const unlockEvent = 'touchend touchmove touchcancel';
|
|
39
|
-
let touches = 0;
|
|
40
|
-
/**
|
|
41
|
-
* 该事件是否被允许,在执行事件前调用该方法判断事件是否可以执行
|
|
42
|
-
* 若已触发 touch 事件,则阻止之后的鼠标事件
|
|
43
|
-
* @param event
|
|
44
|
-
*/
|
|
45
|
-
function isAllow(event) {
|
|
46
|
-
return !(touches &&
|
|
47
|
-
[
|
|
48
|
-
'mousedown',
|
|
49
|
-
'mouseup',
|
|
50
|
-
'mousemove',
|
|
51
|
-
'click',
|
|
52
|
-
'mouseover',
|
|
53
|
-
'mouseout',
|
|
54
|
-
'mouseenter',
|
|
55
|
-
'mouseleave',
|
|
56
|
-
].indexOf(event.type) > -1);
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* 在 touchstart 和 touchmove、touchend、touchcancel 事件中调用该方法注册事件
|
|
60
|
-
* @param event
|
|
61
|
-
*/
|
|
62
|
-
function register(event) {
|
|
63
|
-
if (event.type === 'touchstart') {
|
|
64
|
-
// 触发了 touch 事件
|
|
65
|
-
touches += 1;
|
|
66
|
-
}
|
|
67
|
-
else if (['touchmove', 'touchend', 'touchcancel'].indexOf(event.type) > -1) {
|
|
68
|
-
// touch 事件结束 500ms 后解除对鼠标事件的阻止
|
|
69
|
-
setTimeout(function () {
|
|
70
|
-
if (touches) {
|
|
71
|
-
touches -= 1;
|
|
72
|
-
}
|
|
73
|
-
}, 500);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
export { startEvent, moveEvent, endEvent, cancelEvent, unlockEvent, isAllow, register, };
|