framework7 7.1.5 → 8.0.0-beta.2
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/components/accordion/accordion.js +2 -16
- package/components/accordion/accordion.less +0 -3
- package/components/actions/actions-class.js +13 -58
- package/components/actions/actions-ios.less +42 -0
- package/components/actions/actions-md.less +12 -0
- package/components/actions/actions-rtl.css +1 -1
- package/components/actions/actions-vars.less +17 -42
- package/components/actions/actions.css +1 -1
- package/components/actions/actions.d.ts +2 -2
- package/components/actions/actions.js +0 -4
- package/components/actions/actions.less +5 -35
- package/components/app/app-class.d.ts +14 -12
- package/components/app/app-class.js +93 -75
- package/components/app/app-ios.less +0 -2
- package/components/app/app-md.less +0 -2
- package/components/app/app-vars.less +13 -96
- package/components/app/app.less +1 -4
- package/components/app/load-module.js +17 -36
- package/components/area-chart/area-chart-class.js +8 -64
- package/components/area-chart/area-chart.js +0 -3
- package/components/area-chart/area-chart.less +0 -3
- package/components/autocomplete/autocomplete-class.js +30 -175
- package/components/autocomplete/autocomplete-ios.less +0 -8
- package/components/autocomplete/autocomplete-rtl.css +1 -1
- package/components/autocomplete/autocomplete-vars.less +8 -22
- package/components/autocomplete/autocomplete.css +1 -1
- package/components/autocomplete/autocomplete.d.ts +1 -3
- package/components/autocomplete/autocomplete.js +1 -6
- package/components/autocomplete/autocomplete.less +6 -18
- package/components/badge/badge-vars.less +3 -6
- package/components/badge/badge.less +1 -3
- package/components/block/block-vars.less +25 -52
- package/components/block/block.less +37 -12
- package/components/breadcrumbs/breadcrumbs-rtl.css +1 -1
- package/components/breadcrumbs/breadcrumbs-vars.less +31 -15
- package/components/breadcrumbs/breadcrumbs.css +1 -1
- package/components/breadcrumbs/breadcrumbs.js +0 -2
- package/components/breadcrumbs/breadcrumbs.less +4 -10
- package/components/button/button-vars.less +42 -43
- package/components/button/button.less +24 -26
- package/components/calendar/calendar-class.js +81 -401
- package/components/calendar/calendar-rtl.css +1 -1
- package/components/calendar/calendar-vars.less +32 -46
- package/components/calendar/calendar.css +1 -1
- package/components/calendar/calendar.js +6 -4
- package/components/calendar/calendar.less +10 -21
- package/components/card/card-rtl.css +1 -1
- package/components/card/card-vars.less +41 -44
- package/components/card/card.css +1 -1
- package/components/card/card.js +0 -108
- package/components/card/card.less +18 -24
- package/components/checkbox/checkbox-rtl.css +1 -1
- package/components/checkbox/checkbox-vars.less +0 -8
- package/components/checkbox/checkbox.css +1 -1
- package/components/checkbox/checkbox.less +32 -3
- package/components/chip/chip-ios.less +3 -0
- package/components/chip/chip-md.less +4 -3
- package/components/chip/chip-rtl.css +1 -1
- package/components/chip/chip-vars.less +17 -20
- package/components/chip/chip.css +1 -1
- package/components/chip/chip.less +16 -21
- package/components/color-picker/color-picker-class.js +27 -158
- package/components/color-picker/color-picker-rtl.css +1 -1
- package/components/color-picker/color-picker.css +1 -1
- package/components/color-picker/color-picker.js +0 -4
- package/components/color-picker/color-picker.less +18 -8
- package/components/color-picker/modules/alpha-slider.js +0 -12
- package/components/color-picker/modules/brightness-slider.js +0 -8
- package/components/color-picker/modules/current-color.js +0 -2
- package/components/color-picker/modules/hex.js +0 -12
- package/components/color-picker/modules/hs-spectrum.js +0 -20
- package/components/color-picker/modules/hsb-sliders.js +0 -18
- package/components/color-picker/modules/hue-slider.js +0 -7
- package/components/color-picker/modules/initial-current-colors.js +0 -7
- package/components/color-picker/modules/palette.js +2 -10
- package/components/color-picker/modules/rgb-bars.js +0 -17
- package/components/color-picker/modules/rgb-sliders.js +0 -17
- package/components/color-picker/modules/sb-spectrum.js +0 -20
- package/components/color-picker/modules/wheel.js +0 -28
- package/components/contacts-list/contacts-list-md.less +4 -3
- package/components/contacts-list/contacts-list-rtl.css +1 -1
- package/components/contacts-list/contacts-list-vars.less +3 -15
- package/components/contacts-list/contacts-list.css +1 -1
- package/components/contacts-list/contacts-list.less +0 -3
- package/components/data-table/data-table-class.js +10 -32
- package/components/data-table/data-table-rtl.css +1 -1
- package/components/data-table/data-table-vars.less +6 -39
- package/components/data-table/data-table.css +1 -1
- package/components/data-table/data-table.js +0 -8
- package/components/data-table/data-table.less +0 -3
- package/components/dialog/dialog-class.js +7 -41
- package/components/dialog/dialog-ios.less +0 -3
- package/components/dialog/dialog-md.less +9 -9
- package/components/dialog/dialog-rtl.css +1 -1
- package/components/dialog/dialog-vars.less +25 -70
- package/components/dialog/dialog.css +1 -1
- package/components/dialog/dialog.d.ts +2 -2
- package/components/dialog/dialog.js +12 -48
- package/components/dialog/dialog.less +8 -4
- package/components/fab/fab-rtl.css +1 -1
- package/components/fab/fab-vars.less +20 -14
- package/components/fab/fab.css +1 -1
- package/components/fab/fab.js +0 -21
- package/components/fab/fab.less +50 -53
- package/components/form/form.d.ts +4 -4
- package/components/form/form.js +58 -94
- package/components/form/form.less +0 -3
- package/components/gauge/gauge-class.js +4 -20
- package/components/gauge/gauge.js +0 -9
- package/components/gauge/gauge.less +0 -3
- package/components/grid/grid-rtl.css +1 -1
- package/components/grid/grid-vars.less +0 -7
- package/components/grid/grid.css +1 -1
- package/components/grid/grid.d.ts +2 -8
- package/components/grid/grid.js +1 -225
- package/components/grid/grid.less +54 -184
- package/components/icon/icon.less +0 -3
- package/components/infinite-scroll/infinite-scroll-rtl.css +1 -1
- package/components/infinite-scroll/infinite-scroll.css +1 -1
- package/components/infinite-scroll/infinite-scroll.js +0 -16
- package/components/infinite-scroll/infinite-scroll.less +0 -3
- package/components/input/input-ios.less +49 -41
- package/components/input/input-md.less +87 -19
- package/components/input/input-rtl.css +1 -1
- package/components/input/input-vars.less +26 -60
- package/components/input/input.css +1 -1
- package/components/input/input.js +8 -67
- package/components/input/input.less +67 -153
- package/components/link/link-vars.less +0 -5
- package/components/link/link.less +3 -3
- package/components/list/list-md.less +0 -7
- package/components/list/list-vars.less +59 -108
- package/components/list/list.less +122 -90
- package/components/list-index/list-index-class.js +12 -69
- package/components/list-index/list-index-rtl.css +1 -1
- package/components/list-index/list-index-vars.less +0 -7
- package/components/list-index/list-index.css +1 -1
- package/components/list-index/list-index.d.ts +1 -3
- package/components/list-index/list-index.js +0 -8
- package/components/list-index/list-index.less +4 -7
- package/components/login-screen/login-screen-class.js +4 -9
- package/components/login-screen/login-screen-rtl.css +1 -1
- package/components/login-screen/login-screen-vars.less +13 -12
- package/components/login-screen/login-screen.css +1 -1
- package/components/login-screen/login-screen.js +0 -4
- package/components/login-screen/login-screen.less +2 -8
- package/components/messagebar/messagebar-class.js +18 -79
- package/components/messagebar/messagebar-ios.less +36 -0
- package/components/messagebar/messagebar-md.less +96 -16
- package/components/messagebar/messagebar-rtl.css +1 -1
- package/components/messagebar/messagebar-vars.less +27 -50
- package/components/messagebar/messagebar.css +1 -1
- package/components/messagebar/messagebar.js +0 -8
- package/components/messagebar/messagebar.less +11 -42
- package/components/messages/messages-class.js +17 -110
- package/components/messages/messages-ios.less +9 -0
- package/components/messages/messages-md.less +63 -28
- package/components/messages/messages-rtl.css +1 -1
- package/components/messages/messages-vars.less +43 -50
- package/components/messages/messages.css +1 -1
- package/components/messages/messages.js +0 -8
- package/components/messages/messages.less +0 -11
- package/components/modal/custom-modal-class.js +4 -14
- package/components/modal/modal-class.js +19 -55
- package/components/modal/modal.js +0 -3
- package/components/navbar/navbar-ios.less +3 -39
- package/components/navbar/navbar-md.less +12 -0
- package/components/navbar/navbar-vars.less +20 -49
- package/components/navbar/navbar.d.ts +0 -2
- package/components/navbar/navbar.js +37 -166
- package/components/navbar/navbar.less +4 -26
- package/components/notification/notification-class.js +4 -39
- package/components/notification/notification-md.less +18 -8
- package/components/notification/notification-rtl.css +1 -1
- package/components/notification/notification-vars.less +15 -54
- package/components/notification/notification.css +1 -1
- package/components/notification/notification.js +0 -2
- package/components/notification/notification.less +0 -3
- package/components/page/page-md.less +40 -10
- package/components/page/page-transitions/circle.less +15 -9
- package/components/page/page-transitions/fade.less +17 -11
- package/components/page/page-transitions/flip.less +9 -4
- package/components/page/page-vars.less +3 -19
- package/components/page/page.less +2 -10
- package/components/panel/panel-class.js +27 -132
- package/components/panel/panel-md.less +9 -0
- package/components/panel/panel-rtl.css +1 -1
- package/components/panel/panel-vars.less +7 -21
- package/components/panel/panel.css +1 -1
- package/components/panel/panel.d.ts +2 -2
- package/components/panel/panel.js +0 -34
- package/components/panel/panel.less +56 -48
- package/components/panel/resizable-panel.js +2 -32
- package/components/panel/swipe-panel.js +16 -71
- package/components/photo-browser/photo-browser-class.js +41 -171
- package/components/photo-browser/photo-browser-rtl.css +1 -1
- package/components/photo-browser/photo-browser-vars.less +0 -3
- package/components/photo-browser/photo-browser.css +1 -1
- package/components/photo-browser/photo-browser.d.ts +2 -4
- package/components/photo-browser/photo-browser.js +1 -6
- package/components/photo-browser/photo-browser.less +0 -4
- package/components/picker/picker-class.js +26 -133
- package/components/picker/picker-column.js +11 -31
- package/components/picker/picker-ios.less +10 -0
- package/components/picker/picker-md.less +6 -0
- package/components/picker/picker-rtl.css +1 -1
- package/components/picker/picker-vars.less +9 -25
- package/components/picker/picker.css +1 -1
- package/components/picker/picker.js +0 -4
- package/components/picker/picker.less +0 -11
- package/components/pie-chart/pie-chart-class.js +8 -31
- package/components/pie-chart/pie-chart.js +0 -3
- package/components/pie-chart/pie-chart.less +0 -3
- package/components/popover/popover-class.js +72 -126
- package/components/popover/popover-ios.less +0 -50
- package/components/popover/popover-rtl.css +1 -1
- package/components/popover/popover-vars.less +6 -23
- package/components/popover/popover.css +1 -1
- package/components/popover/popover.d.ts +2 -0
- package/components/popover/popover.js +1 -12
- package/components/popover/popover.less +62 -5
- package/components/popup/popup-class.js +12 -78
- package/components/popup/popup-rtl.css +1 -1
- package/components/popup/popup-vars.less +7 -9
- package/components/popup/popup.css +1 -1
- package/components/popup/popup.js +0 -4
- package/components/popup/popup.less +4 -4
- package/components/preloader/preloader-ios.less +3 -1
- package/components/preloader/preloader-md.less +5 -1
- package/components/preloader/preloader-rtl.css +1 -1
- package/components/preloader/preloader-vars.less +0 -6
- package/components/preloader/preloader.css +1 -1
- package/components/preloader/preloader.js +8 -25
- package/components/preloader/preloader.less +6 -3
- package/components/progressbar/progressbar-rtl.css +1 -1
- package/components/progressbar/progressbar-vars.less +2 -12
- package/components/progressbar/progressbar.css +1 -1
- package/components/progressbar/progressbar.js +2 -31
- package/components/progressbar/progressbar.less +0 -3
- package/components/pull-to-refresh/pull-to-refresh-class.js +15 -107
- package/components/pull-to-refresh/pull-to-refresh-md.less +2 -1
- package/components/pull-to-refresh/pull-to-refresh-rtl.css +1 -1
- package/components/pull-to-refresh/pull-to-refresh-vars.less +0 -4
- package/components/pull-to-refresh/pull-to-refresh.css +1 -1
- package/components/pull-to-refresh/pull-to-refresh.js +0 -8
- package/components/pull-to-refresh/pull-to-refresh.less +0 -3
- package/components/radio/radio-rtl.css +1 -1
- package/components/radio/radio-vars.less +0 -7
- package/components/radio/radio.css +1 -1
- package/components/radio/radio.less +12 -5
- package/components/range/range-class.js +27 -112
- package/components/range/range-rtl.css +1 -1
- package/components/range/range-vars.less +10 -32
- package/components/range/range.css +1 -1
- package/components/range/range.js +0 -12
- package/components/range/range.less +0 -3
- package/components/searchbar/remove-diacritics.js +0 -4
- package/components/searchbar/searchbar-class.js +17 -138
- package/components/searchbar/searchbar-md.less +41 -16
- package/components/searchbar/searchbar-rtl.css +1 -1
- package/components/searchbar/searchbar-vars.less +25 -76
- package/components/searchbar/searchbar.css +1 -1
- package/components/searchbar/searchbar.d.ts +2 -2
- package/components/searchbar/searchbar.js +0 -15
- package/components/searchbar/searchbar.less +14 -28
- package/components/sheet/sheet-class.js +15 -110
- package/components/sheet/sheet-rtl.css +1 -1
- package/components/sheet/sheet-vars.less +17 -6
- package/components/sheet/sheet.css +1 -1
- package/components/sheet/sheet.js +0 -9
- package/components/sheet/sheet.less +10 -3
- package/components/skeleton/skeleton.less +0 -3
- package/components/smart-select/smart-select-class.js +39 -176
- package/components/smart-select/smart-select.d.ts +3 -3
- package/components/smart-select/smart-select.js +2 -14
- package/components/smart-select/smart-select.less +0 -3
- package/components/sortable/sortable-rtl.css +1 -1
- package/components/sortable/sortable-vars.less +8 -8
- package/components/sortable/sortable.css +1 -1
- package/components/sortable/sortable.js +0 -44
- package/components/sortable/sortable.less +0 -3
- package/components/statusbar/statusbar.js +0 -36
- package/components/statusbar/statusbar.less +0 -3
- package/components/stepper/stepper-class.js +10 -83
- package/components/stepper/stepper-rtl.css +1 -1
- package/components/stepper/stepper-vars.less +12 -24
- package/components/stepper/stepper.css +1 -1
- package/components/stepper/stepper.js +0 -12
- package/components/stepper/stepper.less +12 -23
- package/components/subnavbar/subnavbar-vars.less +3 -18
- package/components/subnavbar/subnavbar.js +0 -3
- package/components/subnavbar/subnavbar.less +1 -11
- package/components/swipeout/swipeout-rtl.css +1 -1
- package/components/swipeout/swipeout-vars.less +7 -6
- package/components/swipeout/swipeout.css +1 -1
- package/components/swipeout/swipeout.js +2 -99
- package/components/swipeout/swipeout.less +2 -7
- package/components/swiper/swiper-rtl.css +1 -1
- package/components/swiper/swiper.css +1 -1
- package/components/swiper/swiper.js +15 -48
- package/components/swiper/swiper.less +0 -15
- package/components/tabs/tabs-rtl.css +1 -1
- package/components/tabs/tabs.css +1 -1
- package/components/tabs/tabs.js +23 -60
- package/components/tabs/tabs.less +1 -3
- package/components/text-editor/text-editor-class.js +16 -102
- package/components/text-editor/text-editor-rtl.css +1 -1
- package/components/text-editor/text-editor-vars.less +12 -16
- package/components/text-editor/text-editor.css +1 -1
- package/components/text-editor/text-editor.js +0 -8
- package/components/text-editor/text-editor.less +0 -6
- package/components/timeline/timeline-rtl.css +1 -1
- package/components/timeline/timeline-vars.less +13 -47
- package/components/timeline/timeline.css +1 -1
- package/components/timeline/timeline.less +2 -9
- package/components/toast/toast-class.js +2 -16
- package/components/toast/toast-rtl.css +1 -1
- package/components/toast/toast-vars.less +5 -9
- package/components/toast/toast.css +1 -1
- package/components/toast/toast.js +0 -3
- package/components/toast/toast.less +0 -3
- package/components/toggle/toggle-class.js +6 -30
- package/components/toggle/toggle-ios.less +5 -1
- package/components/toggle/toggle-md.less +27 -11
- package/components/toggle/toggle-rtl.css +1 -1
- package/components/toggle/toggle-vars.less +19 -21
- package/components/toggle/toggle.css +1 -1
- package/components/toggle/toggle.js +0 -8
- package/components/toggle/toggle.less +0 -4
- package/components/toolbar/toolbar-ios.less +2 -2
- package/components/toolbar/toolbar-md.less +28 -4
- package/components/toolbar/toolbar-vars.less +17 -52
- package/components/toolbar/toolbar.js +5 -43
- package/components/toolbar/toolbar.less +27 -45
- package/components/tooltip/tooltip-class.js +10 -64
- package/components/tooltip/tooltip-rtl.css +1 -1
- package/components/tooltip/tooltip-vars.less +12 -3
- package/components/tooltip/tooltip.css +1 -1
- package/components/tooltip/tooltip.js +0 -15
- package/components/tooltip/tooltip.less +0 -3
- package/components/touch-ripple/touch-ripple-class.js +0 -13
- package/components/touch-ripple/touch-ripple.js +0 -4
- package/components/touch-ripple/touch-ripple.less +1 -5
- package/components/treeview/treeview-rtl.css +1 -1
- package/components/treeview/treeview-vars.less +0 -3
- package/components/treeview/treeview.css +1 -1
- package/components/treeview/treeview.js +2 -11
- package/components/treeview/treeview.less +0 -3
- package/components/typography/typography-rtl.css +1 -1
- package/components/typography/typography.css +1 -1
- package/components/typography/typography.less +25 -3
- package/components/view/resizable-view.js +2 -24
- package/components/view/view-class.js +28 -53
- package/components/view/view.d.ts +0 -14
- package/components/view/view.js +8 -32
- package/components/view/view.less +1 -4
- package/components/virtual-list/virtual-list-class.js +58 -146
- package/components/virtual-list/virtual-list.d.ts +1 -1
- package/components/virtual-list/virtual-list.js +0 -2
- package/components/virtual-list/virtual-list.less +0 -3
- package/framework7-bundle-rtl.css +3064 -6057
- package/framework7-bundle-rtl.min.css +3 -3
- package/framework7-bundle.css +3063 -6059
- package/framework7-bundle.esm.js +4 -10
- package/framework7-bundle.js +6442 -12377
- package/framework7-bundle.js.map +1 -1
- package/framework7-bundle.less +2 -27
- package/framework7-bundle.min.css +3 -3
- package/framework7-bundle.min.js +3 -3
- package/framework7-bundle.min.js.map +1 -1
- package/framework7-lite-bundle.esm.js +4 -10
- package/framework7-lite.esm.js +4 -6
- package/framework7-rtl.css +803 -1591
- package/framework7-rtl.min.css +3 -3
- package/framework7-types.d.ts +1 -32
- package/framework7.css +803 -1594
- package/framework7.d.ts +1 -32
- package/framework7.esm.js +4 -6
- package/framework7.less +2 -23
- package/framework7.min.css +3 -3
- package/less/mixins.less +7 -88
- package/modules/clicks/clicks.js +10 -22
- package/modules/component/$h.js +0 -3
- package/modules/component/$jsx.js +0 -5
- package/modules/component/component-class.js +13 -66
- package/modules/component/component.d.ts +1 -2
- package/modules/component/component.js +0 -8
- package/modules/component/eventslisteners.js +12 -20
- package/modules/component/parse-component.js +18 -20
- package/modules/component/snabbdom/h.js +3 -12
- package/modules/component/snabbdom/helpers/attachto.js +9 -14
- package/modules/component/snabbdom/htmldomapi.js +0 -16
- package/modules/component/snabbdom/modules/attributes.js +7 -11
- package/modules/component/snabbdom/modules/class.js +4 -8
- package/modules/component/snabbdom/modules/dataset.js +3 -7
- package/modules/component/snabbdom/modules/eventlisteners.js +16 -22
- package/modules/component/snabbdom/modules/hero.js +4 -44
- package/modules/component/snabbdom/modules/props.js +5 -9
- package/modules/component/snabbdom/modules/style.js +13 -30
- package/modules/component/snabbdom/snabbdom.bundle.js +0 -6
- package/modules/component/snabbdom/snabbdom.js +13 -72
- package/modules/component/snabbdom/thunk.js +3 -11
- package/modules/component/snabbdom/tovnode.js +1 -6
- package/modules/component/vdom.js +4 -62
- package/modules/demo-module.js +0 -8
- package/modules/device/device.js +6 -11
- package/modules/history/history.js +0 -1
- package/modules/resize/resize.js +8 -11
- package/modules/router/async-component.js +0 -3
- package/modules/router/back.js +86 -275
- package/modules/router/clear-previous-history.js +5 -18
- package/modules/router/component-loader.js +4 -25
- package/modules/router/modal.js +16 -43
- package/modules/router/navigate.js +80 -250
- package/modules/router/process-route-queue.js +0 -12
- package/modules/router/redirect.js +0 -8
- package/modules/router/router-class.js +92 -315
- package/modules/router/router.d.ts +3 -5
- package/modules/router/router.js +0 -3
- package/modules/router/swipe-back.js +35 -139
- package/modules/router/tab.js +14 -43
- package/modules/service-worker/service-worker.js +0 -11
- package/modules/store/create-store.js +10 -29
- package/modules/touch/touch.d.ts +2 -4
- package/modules/touch/touch.js +13 -108
- package/package.json +3 -14
- package/shared/$jsx.js +0 -6
- package/shared/class.js +18 -43
- package/shared/constructor-methods.js +0 -11
- package/shared/events-class.js +0 -17
- package/shared/get-device.js +18 -34
- package/shared/get-support.js +2 -8
- package/shared/history.js +2 -30
- package/shared/material-color-utils.js +728 -0
- package/shared/material-colors.js +75 -0
- package/shared/modal-methods.js +0 -18
- package/shared/utils.d.ts +0 -4
- package/shared/utils.js +191 -71
- package/components/accordion/accordion-aurora.less +0 -2
- package/components/accordion/accordion.lazy.js +0 -1
- package/components/actions/actions-aurora.less +0 -9
- package/components/actions/actions.lazy.js +0 -1
- package/components/app/app-aurora.less +0 -10
- package/components/appbar/appbar-aurora.less +0 -2
- package/components/appbar/appbar-ios.less +0 -2
- package/components/appbar/appbar-md.less +0 -2
- package/components/appbar/appbar-rtl.css +0 -1
- package/components/appbar/appbar-vars.less +0 -28
- package/components/appbar/appbar.css +0 -1
- package/components/appbar/appbar.d.ts +0 -14
- package/components/appbar/appbar.js +0 -3
- package/components/appbar/appbar.lazy.js +0 -1
- package/components/appbar/appbar.less +0 -106
- package/components/area-chart/area-chart-aurora.less +0 -2
- package/components/area-chart/area-chart.lazy.js +0 -1
- package/components/autocomplete/autocomplete-aurora.less +0 -17
- package/components/autocomplete/autocomplete.lazy.js +0 -1
- package/components/badge/badge-aurora.less +0 -2
- package/components/block/block-aurora.less +0 -2
- package/components/breadcrumbs/breadcrumbs-aurora.less +0 -2
- package/components/breadcrumbs/breadcrumbs.lazy.js +0 -1
- package/components/button/button-aurora.less +0 -25
- package/components/calendar/calendar-aurora.less +0 -2
- package/components/calendar/calendar.lazy.js +0 -1
- package/components/card/card-aurora.less +0 -2
- package/components/card/card.lazy.js +0 -1
- package/components/checkbox/checkbox-aurora.less +0 -39
- package/components/checkbox/checkbox.lazy.js +0 -1
- package/components/chip/chip-aurora.less +0 -14
- package/components/chip/chip.lazy.js +0 -1
- package/components/color-picker/color-picker-aurora.less +0 -2
- package/components/color-picker/color-picker.lazy.js +0 -1
- package/components/contacts-list/contacts-list-aurora.less +0 -2
- package/components/contacts-list/contacts-list.lazy.js +0 -1
- package/components/data-table/data-table-aurora.less +0 -64
- package/components/data-table/data-table.lazy.js +0 -1
- package/components/dialog/dialog-aurora.less +0 -112
- package/components/dialog/dialog.lazy.js +0 -1
- package/components/elevation/elevation-aurora.less +0 -2
- package/components/elevation/elevation-ios.less +0 -2
- package/components/elevation/elevation-md.less +0 -2
- package/components/elevation/elevation-rtl.css +0 -1
- package/components/elevation/elevation-vars.less +0 -51
- package/components/elevation/elevation.css +0 -1
- package/components/elevation/elevation.d.ts +0 -14
- package/components/elevation/elevation.js +0 -3
- package/components/elevation/elevation.lazy.js +0 -1
- package/components/elevation/elevation.less +0 -54
- package/components/fab/fab-aurora.less +0 -2
- package/components/fab/fab.lazy.js +0 -1
- package/components/form/form-aurora.less +0 -0
- package/components/form/form.lazy.js +0 -1
- package/components/gauge/gauge-aurora.less +0 -2
- package/components/gauge/gauge.lazy.js +0 -1
- package/components/grid/grid-aurora.less +0 -2
- package/components/grid/grid.lazy.js +0 -1
- package/components/icon/icon-aurora.less +0 -49
- package/components/infinite-scroll/infinite-scroll-aurora.less +0 -6
- package/components/infinite-scroll/infinite-scroll.lazy.js +0 -1
- package/components/input/input-aurora.less +0 -120
- package/components/input/input.lazy.js +0 -1
- package/components/lazy/lazy-aurora.less +0 -2
- package/components/lazy/lazy-ios.less +0 -2
- package/components/lazy/lazy-md.less +0 -2
- package/components/lazy/lazy-rtl.css +0 -1
- package/components/lazy/lazy.css +0 -1
- package/components/lazy/lazy.d.ts +0 -57
- package/components/lazy/lazy.js +0 -283
- package/components/lazy/lazy.lazy.js +0 -1
- package/components/lazy/lazy.less +0 -23
- package/components/link/link-aurora.less +0 -15
- package/components/list/list-aurora.less +0 -25
- package/components/list-index/list-index-aurora.less +0 -21
- package/components/list-index/list-index.lazy.js +0 -1
- package/components/login-screen/login-screen-aurora.less +0 -2
- package/components/login-screen/login-screen.lazy.js +0 -1
- package/components/menu/menu-aurora.less +0 -8
- package/components/menu/menu-ios.less +0 -2
- package/components/menu/menu-md.less +0 -2
- package/components/menu/menu-rtl.css +0 -1
- package/components/menu/menu-vars.less +0 -27
- package/components/menu/menu.css +0 -1
- package/components/menu/menu.d.ts +0 -32
- package/components/menu/menu.js +0 -87
- package/components/menu/menu.lazy.js +0 -1
- package/components/menu/menu.less +0 -232
- package/components/messagebar/messagebar-aurora.less +0 -53
- package/components/messagebar/messagebar.lazy.js +0 -1
- package/components/messages/messages-aurora.less +0 -137
- package/components/messages/messages.lazy.js +0 -1
- package/components/navbar/navbar-aurora.less +0 -70
- package/components/notification/notification-aurora.less +0 -59
- package/components/notification/notification.lazy.js +0 -1
- package/components/page/page-aurora.less +0 -49
- package/components/panel/panel-aurora.less +0 -2
- package/components/panel/panel.lazy.js +0 -1
- package/components/photo-browser/photo-browser-aurora.less +0 -2
- package/components/photo-browser/photo-browser.lazy.js +0 -1
- package/components/picker/picker-aurora.less +0 -2
- package/components/picker/picker.lazy.js +0 -1
- package/components/pie-chart/pie-chart-aurora.less +0 -2
- package/components/pie-chart/pie-chart.lazy.js +0 -1
- package/components/popover/popover-aurora.less +0 -56
- package/components/popover/popover.lazy.js +0 -1
- package/components/popup/popup-aurora.less +0 -2
- package/components/popup/popup.lazy.js +0 -1
- package/components/preloader/preloader-aurora.less +0 -53
- package/components/preloader/preloader.lazy.js +0 -1
- package/components/progressbar/progressbar-aurora.less +0 -72
- package/components/progressbar/progressbar.lazy.js +0 -1
- package/components/pull-to-refresh/pull-to-refresh-aurora.less +0 -122
- package/components/pull-to-refresh/pull-to-refresh.lazy.js +0 -1
- package/components/radio/radio-aurora.less +0 -86
- package/components/radio/radio.lazy.js +0 -1
- package/components/range/range-aurora.less +0 -9
- package/components/range/range.lazy.js +0 -1
- package/components/searchbar/searchbar-aurora.less +0 -86
- package/components/searchbar/searchbar.lazy.js +0 -1
- package/components/sheet/sheet-aurora.less +0 -2
- package/components/sheet/sheet.lazy.js +0 -1
- package/components/skeleton/skeleton-aurora.less +0 -2
- package/components/skeleton/skeleton.lazy.js +0 -1
- package/components/smart-select/smart-select-aurora.less +0 -2
- package/components/smart-select/smart-select.lazy.js +0 -1
- package/components/sortable/sortable-aurora.less +0 -7
- package/components/sortable/sortable.lazy.js +0 -1
- package/components/statusbar/statusbar-aurora.less +0 -2
- package/components/stepper/stepper-aurora.less +0 -32
- package/components/stepper/stepper.lazy.js +0 -1
- package/components/subnavbar/subnavbar-aurora.less +0 -51
- package/components/swipeout/swipeout-aurora.less +0 -2
- package/components/swipeout/swipeout.lazy.js +0 -1
- package/components/swiper/swiper-aurora.less +0 -2
- package/components/swiper/swiper.lazy.js +0 -1
- package/components/tabs/tabs-aurora.less +0 -2
- package/components/tabs/tabs.lazy.js +0 -1
- package/components/text-editor/text-editor-aurora.less +0 -9
- package/components/text-editor/text-editor.lazy.js +0 -1
- package/components/timeline/timeline-aurora.less +0 -7
- package/components/timeline/timeline.lazy.js +0 -1
- package/components/toast/toast-aurora.less +0 -64
- package/components/toast/toast.lazy.js +0 -1
- package/components/toggle/toggle-aurora.less +0 -26
- package/components/toggle/toggle.lazy.js +0 -1
- package/components/toolbar/toolbar-aurora.less +0 -43
- package/components/tooltip/tooltip-aurora.less +0 -2
- package/components/tooltip/tooltip.lazy.js +0 -1
- package/components/touch-ripple/touch-ripple-aurora.less +0 -2
- package/components/treeview/treeview-aurora.less +0 -31
- package/components/treeview/treeview.lazy.js +0 -1
- package/components/typography/typography-aurora.less +0 -2
- package/components/typography/typography.lazy.js +0 -1
- package/components/view/view-aurora.less +0 -2
- package/components/virtual-list/virtual-list-aurora.less +0 -2
- package/components/virtual-list/virtual-list.lazy.js +0 -1
- package/framework7.js +0 -14715
- package/framework7.js.map +0 -1
- package/framework7.min.js +0 -14
- package/framework7.min.js.map +0 -1
- package/modules/request/request.d.ts +0 -15
- package/modules/request/request.js +0 -11
- package/shared/request.d.ts +0 -115
- package/shared/request.js +0 -512
|
@@ -35,8 +35,8 @@ export namespace Actions {
|
|
|
35
35
|
text: string;
|
|
36
36
|
/** HTML string of icon */
|
|
37
37
|
icon?: string;
|
|
38
|
-
/** Enables
|
|
39
|
-
|
|
38
|
+
/** Enables strong button text */
|
|
39
|
+
strong?: boolean;
|
|
40
40
|
/** Button color, one of default colors */
|
|
41
41
|
color?: string;
|
|
42
42
|
/** Button background color, one of default colors */
|
|
@@ -20,7 +20,6 @@ export default {
|
|
|
20
20
|
static: {
|
|
21
21
|
Actions
|
|
22
22
|
},
|
|
23
|
-
|
|
24
23
|
create() {
|
|
25
24
|
const app = this;
|
|
26
25
|
app.actions = ModalMethods({
|
|
@@ -29,13 +28,11 @@ export default {
|
|
|
29
28
|
defaultSelector: '.actions-modal.modal-in'
|
|
30
29
|
});
|
|
31
30
|
},
|
|
32
|
-
|
|
33
31
|
clicks: {
|
|
34
32
|
'.actions-open': function openActions($clickedEl, data) {
|
|
35
33
|
if (data === void 0) {
|
|
36
34
|
data = {};
|
|
37
35
|
}
|
|
38
|
-
|
|
39
36
|
const app = this;
|
|
40
37
|
app.actions.open(data.actions, data.animate, $clickedEl);
|
|
41
38
|
},
|
|
@@ -43,7 +40,6 @@ export default {
|
|
|
43
40
|
if (data === void 0) {
|
|
44
41
|
data = {};
|
|
45
42
|
}
|
|
46
|
-
|
|
47
43
|
const app = this;
|
|
48
44
|
app.actions.close(data.actions, data.animate, $clickedEl);
|
|
49
45
|
}
|
|
@@ -40,11 +40,14 @@
|
|
|
40
40
|
--f7-actions-button-height: var(--f7-actions-button-height-landscape);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
+
.actions-backdrop,
|
|
44
|
+
.actions-modal {
|
|
45
|
+
transition-timing-function: var(--f7-actions-transition-timing-function);
|
|
46
|
+
}
|
|
43
47
|
.actions-group {
|
|
44
48
|
overflow: hidden;
|
|
45
49
|
position: relative;
|
|
46
50
|
margin: var(--f7-actions-group-margin);
|
|
47
|
-
border-radius: var(--f7-actions-border-radius);
|
|
48
51
|
.hairline(bottom, var(--f7-actions-group-border-color));
|
|
49
52
|
transform: translate3d(0, 0, 0);
|
|
50
53
|
&:last-child {
|
|
@@ -61,28 +64,12 @@
|
|
|
61
64
|
position: relative;
|
|
62
65
|
overflow: hidden;
|
|
63
66
|
text-align: var(--f7-actions-button-text-align);
|
|
64
|
-
background: var(--f7-actions-bg-color);
|
|
65
|
-
.ios-translucent-modals(var(--f7-actions-bg-color-rgb));
|
|
66
67
|
.hairline(bottom, var(--f7-actions-button-border-color));
|
|
67
|
-
&:first-child {
|
|
68
|
-
border-radius: var(--f7-actions-border-radius) var(--f7-actions-border-radius) 0 0;
|
|
69
|
-
}
|
|
70
|
-
&:last-child {
|
|
71
|
-
.hairline-remove(bottom);
|
|
72
|
-
border-radius: 0 0 var(--f7-actions-border-radius) var(--f7-actions-border-radius);
|
|
73
|
-
}
|
|
74
|
-
&:first-child:last-child {
|
|
75
|
-
border-radius: var(--f7-actions-border-radius);
|
|
76
|
-
}
|
|
77
68
|
a {
|
|
78
69
|
text-decoration: none;
|
|
79
70
|
color: inherit;
|
|
80
71
|
display: block;
|
|
81
72
|
}
|
|
82
|
-
b,
|
|
83
|
-
&.actions-button-bold {
|
|
84
|
-
font-weight: 600;
|
|
85
|
-
}
|
|
86
73
|
}
|
|
87
74
|
.actions-button {
|
|
88
75
|
cursor: pointer;
|
|
@@ -132,6 +119,7 @@
|
|
|
132
119
|
display: flex;
|
|
133
120
|
align-items: center;
|
|
134
121
|
font-size: var(--f7-actions-label-font-size);
|
|
122
|
+
font-weight: var(--f7-actions-label-font-weight);
|
|
135
123
|
color: var(--f7-actions-label-text-color);
|
|
136
124
|
padding: var(--f7-actions-label-padding);
|
|
137
125
|
justify-content: var(--f7-actions-label-justify-content);
|
|
@@ -145,25 +133,13 @@
|
|
|
145
133
|
display: flex;
|
|
146
134
|
flex-wrap: wrap;
|
|
147
135
|
justify-content: flex-start;
|
|
148
|
-
border-radius: 0;
|
|
149
|
-
background: var(--f7-actions-bg-color);
|
|
150
136
|
margin-top: 0;
|
|
151
|
-
&:first-child {
|
|
152
|
-
border-radius: var(--f7-actions-border-radius) var(--f7-actions-border-radius) 0 0;
|
|
153
|
-
}
|
|
154
|
-
&:last-child {
|
|
155
|
-
border-radius: 0 0 var(--f7-actions-border-radius) var(--f7-actions-border-radius);
|
|
156
|
-
}
|
|
157
|
-
&:first-child:last-child {
|
|
158
|
-
border-radius: var(--f7-actions-border-radius);
|
|
159
|
-
}
|
|
160
137
|
&:not(:last-child) {
|
|
161
138
|
margin-bottom: 0;
|
|
162
139
|
}
|
|
163
140
|
}
|
|
164
141
|
.actions-button,
|
|
165
142
|
.actions-label {
|
|
166
|
-
border-radius: 0 !important;
|
|
167
143
|
background: none;
|
|
168
144
|
}
|
|
169
145
|
.actions-button {
|
|
@@ -195,15 +171,9 @@
|
|
|
195
171
|
font-size: var(--f7-actions-grid-button-font-size);
|
|
196
172
|
}
|
|
197
173
|
}
|
|
198
|
-
.actions-grid .actions-group {
|
|
199
|
-
.ios-translucent-modals(var(--f7-actions-bg-color-rgb));
|
|
200
|
-
}
|
|
201
174
|
.if-ios-theme({
|
|
202
175
|
@import './actions-ios.less';
|
|
203
176
|
});
|
|
204
177
|
.if-md-theme({
|
|
205
178
|
@import './actions-md.less';
|
|
206
179
|
});
|
|
207
|
-
.if-aurora-theme({
|
|
208
|
-
@import './actions-aurora.less';
|
|
209
|
-
});
|
|
@@ -2,7 +2,6 @@ import { Dom7, Dom7Array } from 'dom7';
|
|
|
2
2
|
import { Router } from '../../modules/router/router.js';
|
|
3
3
|
import { DeviceParams, Device } from '../../shared/get-device.js';
|
|
4
4
|
import { Support } from '../../shared/get-support.js';
|
|
5
|
-
import { Request } from '../../shared/request.js';
|
|
6
5
|
import { Utils } from '../../shared/utils.js';
|
|
7
6
|
import {
|
|
8
7
|
ComponentClass,
|
|
@@ -50,14 +49,14 @@ export interface Framework7Parameters {
|
|
|
50
49
|
name?: string;
|
|
51
50
|
/** App version. Can be used by other components.. (default 1.0.0) */
|
|
52
51
|
version?: string;
|
|
53
|
-
/** App theme. Can be ios, md
|
|
52
|
+
/** App theme. Can be ios, md or auto. In case of auto it will use iOS theme for iOS devices and MD theme for all other devices.. (default 'auto') */
|
|
54
53
|
theme?: string;
|
|
55
54
|
/** App language. Can be used by other components. By default equal to the current browser/webview language (i.e. navigator.language).. */
|
|
56
55
|
language?: string;
|
|
57
56
|
/** Array with default routes to all views.. (default []) */
|
|
58
57
|
routes?: Router.RouteParameters[];
|
|
59
|
-
/** Enables
|
|
60
|
-
|
|
58
|
+
/** Enables dark mode, can be `false` (disabled), `true` (enabled) or `auto` (based on system preferences) */
|
|
59
|
+
darkMode?: boolean | string;
|
|
61
60
|
/** Lazy modules path */
|
|
62
61
|
lazyModulesPath?: string;
|
|
63
62
|
/** By default Framework7 will be initialized automatically when you call new Framework7(). If you want to prevent this behavior you can disable it with this option and then initialize it manually with init() when you need it.. (default true) */
|
|
@@ -68,6 +67,8 @@ export interface Framework7Parameters {
|
|
|
68
67
|
iosTranslucentBars?: boolean;
|
|
69
68
|
/** Enable translucent effect (blur background) on modals (Dialog, Popover, Actions) for iOS theme (on iOS devices) (by default enabled) */
|
|
70
69
|
iosTranslucentModals?: boolean;
|
|
70
|
+
/** Object with app colors where `primary` color (key) defines main app color theme */
|
|
71
|
+
colors?: object;
|
|
71
72
|
/** userAgent string. Required for browser/device detection when rendered on server-side */
|
|
72
73
|
userAgent?: string;
|
|
73
74
|
/** Required for current route detection when rendered on server-side */
|
|
@@ -119,7 +120,7 @@ export interface Framework7Plugin {
|
|
|
119
120
|
export interface Framework7Events {
|
|
120
121
|
/** Event will be fired on app initialization. Automatically after new Framework7() or after app.init() if you disabled auto init. */
|
|
121
122
|
init: () => void;
|
|
122
|
-
/** Event will be fired on device preferred color scheme change. It has effect only when `
|
|
123
|
+
/** Event will be fired on device preferred color scheme change. It has effect only when `darkMode` is set to `auto` */
|
|
123
124
|
darkModeChange: (isDark: boolean) => void;
|
|
124
125
|
/** Event will be fired when app goes online */
|
|
125
126
|
online: () => void;
|
|
@@ -146,9 +147,9 @@ interface Framework7 extends Framework7Class<Framework7Events> {
|
|
|
146
147
|
$el: Dom7Array;
|
|
147
148
|
/** Boolean property indicating app is in RTL layout or not */
|
|
148
149
|
rtl: boolean;
|
|
149
|
-
/** Current app theme. Can be md
|
|
150
|
+
/** Current app theme. Can be 'md' or 'ios' */
|
|
150
151
|
theme: string;
|
|
151
|
-
/** Indicates whether the dark mode active or not
|
|
152
|
+
/** Indicates whether the dark mode active or not */
|
|
152
153
|
darkMode: boolean;
|
|
153
154
|
/** Object with app root data passed on intialization */
|
|
154
155
|
data: any;
|
|
@@ -162,10 +163,12 @@ interface Framework7 extends Framework7Class<Framework7Events> {
|
|
|
162
163
|
$: Dom7;
|
|
163
164
|
/** App parameters */
|
|
164
165
|
params: Framework7Parameters;
|
|
165
|
-
/**
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
|
|
166
|
+
/** Object with colors you have passed in params.colors */
|
|
167
|
+
colors: any;
|
|
168
|
+
/** Sets primary color theme */
|
|
169
|
+
setColorTheme(hexColor: string): void;
|
|
170
|
+
/** Enable/disable dark mode, accepts `false`, `true` or `auto` */
|
|
171
|
+
setDarkMode(mode: boolean | string): void;
|
|
169
172
|
/** Initialize app. In case you disabled auto initialization with init: false parameter */
|
|
170
173
|
init(): void;
|
|
171
174
|
/** Load module */
|
|
@@ -184,7 +187,6 @@ declare class Framework7 implements Framework7 {
|
|
|
184
187
|
static getSupport: () => Support;
|
|
185
188
|
static device: Device;
|
|
186
189
|
static support: Support;
|
|
187
|
-
static request: Request;
|
|
188
190
|
static utils: Utils;
|
|
189
191
|
static Events: Events;
|
|
190
192
|
static Component: ComponentClass;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* eslint-disable no-underscore-dangle */
|
|
2
|
+
|
|
2
3
|
import { getWindow, getDocument } from 'ssr-window';
|
|
3
4
|
import { extend, nextFrame } from '../../shared/utils.js';
|
|
4
5
|
import { getDevice } from '../../shared/get-device.js';
|
|
@@ -10,32 +11,31 @@ import ModalMethods from '../../shared/modal-methods.js';
|
|
|
10
11
|
import $ from '../../shared/dom7.js';
|
|
11
12
|
import loadModule from './load-module.js';
|
|
12
13
|
import $jsx from '../../shared/$jsx.js';
|
|
13
|
-
|
|
14
14
|
class Framework7 extends Framework7Class {
|
|
15
15
|
constructor(params) {
|
|
16
16
|
if (params === void 0) {
|
|
17
17
|
params = {};
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
super(params);
|
|
20
|
+
// eslint-disable-next-line
|
|
22
21
|
if (Framework7.instance && typeof window !== 'undefined') {
|
|
23
22
|
throw new Error("Framework7 is already initialized and can't be initialized more than once");
|
|
24
23
|
}
|
|
25
|
-
|
|
26
24
|
const device = getDevice({
|
|
27
25
|
userAgent: params.userAgent || undefined
|
|
28
26
|
});
|
|
29
27
|
const support = getSupport();
|
|
30
|
-
const passedParams = extend({}, params);
|
|
28
|
+
const passedParams = extend({}, params);
|
|
31
29
|
|
|
30
|
+
// App Instance
|
|
32
31
|
const app = this;
|
|
33
32
|
app.device = device;
|
|
34
33
|
app.support = support;
|
|
35
34
|
const w = getWindow();
|
|
36
35
|
const d = getDocument();
|
|
37
|
-
Framework7.instance = app;
|
|
36
|
+
Framework7.instance = app;
|
|
38
37
|
|
|
38
|
+
// Default
|
|
39
39
|
const defaults = {
|
|
40
40
|
version: '1.0.0',
|
|
41
41
|
id: 'io.framework7.myapp',
|
|
@@ -47,17 +47,36 @@ class Framework7 extends Framework7Class {
|
|
|
47
47
|
lazyModulesPath: null,
|
|
48
48
|
initOnDeviceReady: true,
|
|
49
49
|
init: true,
|
|
50
|
-
|
|
50
|
+
darkMode: false,
|
|
51
51
|
iosTranslucentBars: true,
|
|
52
52
|
iosTranslucentModals: true,
|
|
53
53
|
component: undefined,
|
|
54
54
|
componentUrl: undefined,
|
|
55
55
|
userAgent: null,
|
|
56
|
-
url: null
|
|
57
|
-
|
|
56
|
+
url: null,
|
|
57
|
+
colors: {
|
|
58
|
+
primary: '#007aff',
|
|
59
|
+
red: '#ff3b30',
|
|
60
|
+
green: '#4cd964',
|
|
61
|
+
blue: '#2196f3',
|
|
62
|
+
pink: '#ff2d55',
|
|
63
|
+
yellow: '#ffcc00',
|
|
64
|
+
orange: '#ff9500',
|
|
65
|
+
purple: '#9c27b0',
|
|
66
|
+
deeppurple: '#673ab7',
|
|
67
|
+
lightblue: '#5ac8fa',
|
|
68
|
+
teal: '#009688',
|
|
69
|
+
lime: '#cddc39',
|
|
70
|
+
deeporange: '#ff6b22',
|
|
71
|
+
white: '#ffffff',
|
|
72
|
+
black: '#000000'
|
|
73
|
+
}
|
|
74
|
+
};
|
|
58
75
|
|
|
59
|
-
|
|
76
|
+
// Extend defaults with modules params
|
|
77
|
+
app.useModulesParams(defaults);
|
|
60
78
|
|
|
79
|
+
// Extend defaults with passed params
|
|
61
80
|
app.params = extend(defaults, params);
|
|
62
81
|
extend(app, {
|
|
63
82
|
// App Id
|
|
@@ -74,27 +93,30 @@ class Framework7 extends Framework7Class {
|
|
|
74
93
|
theme: function getTheme() {
|
|
75
94
|
if (app.params.theme === 'auto') {
|
|
76
95
|
if (device.ios) return 'ios';
|
|
77
|
-
if (device.desktop && device.electron) return 'aurora';
|
|
78
96
|
return 'md';
|
|
79
97
|
}
|
|
80
|
-
|
|
81
98
|
return app.params.theme;
|
|
82
99
|
}(),
|
|
83
100
|
// Initially passed parameters
|
|
84
101
|
passedParams,
|
|
85
|
-
online: w.navigator.onLine
|
|
102
|
+
online: w.navigator.onLine,
|
|
103
|
+
colors: app.params.colors,
|
|
104
|
+
darkMode: app.params.darkMode
|
|
86
105
|
});
|
|
87
|
-
if (params.store) app.params.store = params.store;
|
|
106
|
+
if (params.store) app.params.store = params.store;
|
|
88
107
|
|
|
108
|
+
// Save Root
|
|
89
109
|
if (app.$el && app.$el[0]) {
|
|
90
110
|
app.$el[0].f7 = app;
|
|
91
|
-
}
|
|
92
|
-
|
|
111
|
+
}
|
|
93
112
|
|
|
94
|
-
|
|
113
|
+
// Install Modules
|
|
114
|
+
app.useModules();
|
|
95
115
|
|
|
96
|
-
|
|
116
|
+
// Init Store
|
|
117
|
+
app.initStore();
|
|
97
118
|
|
|
119
|
+
// Init
|
|
98
120
|
if (app.params.init) {
|
|
99
121
|
if (device.cordova && app.params.initOnDeviceReady) {
|
|
100
122
|
$(d).on('deviceready', () => {
|
|
@@ -103,47 +125,55 @@ class Framework7 extends Framework7Class {
|
|
|
103
125
|
} else {
|
|
104
126
|
app.init();
|
|
105
127
|
}
|
|
106
|
-
}
|
|
107
|
-
|
|
128
|
+
}
|
|
108
129
|
|
|
130
|
+
// Return app instance
|
|
109
131
|
return app;
|
|
110
132
|
}
|
|
111
|
-
|
|
133
|
+
setColorTheme(color) {
|
|
134
|
+
if (!color) return;
|
|
135
|
+
const app = this;
|
|
136
|
+
app.colors.primary = color;
|
|
137
|
+
app.setColors();
|
|
138
|
+
}
|
|
139
|
+
setColors() {
|
|
140
|
+
const app = this;
|
|
141
|
+
const document = getDocument();
|
|
142
|
+
if (!app.colorsStyleEl) {
|
|
143
|
+
app.colorsStyleEl = document.createElement('style');
|
|
144
|
+
document.head.appendChild(app.colorsStyleEl);
|
|
145
|
+
}
|
|
146
|
+
app.colorsStyleEl.textContent = app.utils.colorThemeCSSStyles(app.colors);
|
|
147
|
+
}
|
|
112
148
|
mount(rootEl) {
|
|
113
149
|
const app = this;
|
|
114
150
|
const window = getWindow();
|
|
115
151
|
const document = getDocument();
|
|
116
152
|
const $rootEl = $(rootEl || app.params.el).eq(0);
|
|
117
153
|
app.$el = $rootEl;
|
|
118
|
-
|
|
119
154
|
if (app.$el && app.$el[0]) {
|
|
120
155
|
app.el = app.$el[0];
|
|
121
156
|
app.el.f7 = app;
|
|
122
157
|
app.rtl = $rootEl.css('direction') === 'rtl';
|
|
123
|
-
}
|
|
124
|
-
|
|
158
|
+
}
|
|
125
159
|
|
|
160
|
+
// Auto Dark Mode
|
|
126
161
|
const DARK = '(prefers-color-scheme: dark)';
|
|
127
162
|
const LIGHT = '(prefers-color-scheme: light)';
|
|
128
163
|
app.mq = {};
|
|
129
|
-
|
|
130
164
|
if (window.matchMedia) {
|
|
131
165
|
app.mq.dark = window.matchMedia(DARK);
|
|
132
166
|
app.mq.light = window.matchMedia(LIGHT);
|
|
133
167
|
}
|
|
134
|
-
|
|
135
168
|
app.colorSchemeListener = function colorSchemeListener(_ref) {
|
|
136
169
|
let {
|
|
137
170
|
matches,
|
|
138
171
|
media
|
|
139
172
|
} = _ref;
|
|
140
|
-
|
|
141
173
|
if (!matches) {
|
|
142
174
|
return;
|
|
143
175
|
}
|
|
144
|
-
|
|
145
176
|
const html = document.querySelector('html');
|
|
146
|
-
|
|
147
177
|
if (media === DARK) {
|
|
148
178
|
html.classList.add('dark');
|
|
149
179
|
app.darkMode = true;
|
|
@@ -154,32 +184,26 @@ class Framework7 extends Framework7Class {
|
|
|
154
184
|
app.emit('darkModeChange', false);
|
|
155
185
|
}
|
|
156
186
|
};
|
|
157
|
-
|
|
158
187
|
app.emit('mount');
|
|
159
188
|
}
|
|
160
|
-
|
|
161
189
|
initStore() {
|
|
162
190
|
const app = this;
|
|
163
|
-
|
|
164
191
|
if (typeof app.params.store !== 'undefined' && app.params.store.__store) {
|
|
165
192
|
app.store = app.params.store;
|
|
166
193
|
} else {
|
|
167
194
|
app.store = app.createStore(app.params.store);
|
|
168
195
|
}
|
|
169
196
|
}
|
|
170
|
-
|
|
171
197
|
enableAutoDarkMode() {
|
|
172
198
|
const window = getWindow();
|
|
173
199
|
const document = getDocument();
|
|
174
200
|
if (!window.matchMedia) return;
|
|
175
201
|
const app = this;
|
|
176
202
|
const html = document.querySelector('html');
|
|
177
|
-
|
|
178
203
|
if (app.mq.dark && app.mq.light) {
|
|
179
204
|
app.mq.dark.addListener(app.colorSchemeListener);
|
|
180
205
|
app.mq.light.addListener(app.colorSchemeListener);
|
|
181
206
|
}
|
|
182
|
-
|
|
183
207
|
if (app.mq.dark && app.mq.dark.matches) {
|
|
184
208
|
html.classList.add('dark');
|
|
185
209
|
app.darkMode = true;
|
|
@@ -190,7 +214,6 @@ class Framework7 extends Framework7Class {
|
|
|
190
214
|
app.emit('darkModeChange', false);
|
|
191
215
|
}
|
|
192
216
|
}
|
|
193
|
-
|
|
194
217
|
disableAutoDarkMode() {
|
|
195
218
|
const window = getWindow();
|
|
196
219
|
if (!window.matchMedia) return;
|
|
@@ -198,7 +221,16 @@ class Framework7 extends Framework7Class {
|
|
|
198
221
|
if (app.mq.dark) app.mq.dark.removeListener(app.colorSchemeListener);
|
|
199
222
|
if (app.mq.light) app.mq.light.removeListener(app.colorSchemeListener);
|
|
200
223
|
}
|
|
201
|
-
|
|
224
|
+
setDarkMode(mode) {
|
|
225
|
+
const app = this;
|
|
226
|
+
if (mode === 'auto') {
|
|
227
|
+
app.enableAutoDarkMode();
|
|
228
|
+
} else {
|
|
229
|
+
app.disableAutoDarkMode();
|
|
230
|
+
$('html')[mode ? 'addClass' : 'removeClass']('dark');
|
|
231
|
+
app.darkMode = mode;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
202
234
|
initAppComponent(callback) {
|
|
203
235
|
const app = this;
|
|
204
236
|
app.router.componentLoader(app.params.component, app.params.componentUrl, {
|
|
@@ -213,25 +245,23 @@ class Framework7 extends Framework7Class {
|
|
|
213
245
|
if (callback) callback();
|
|
214
246
|
}, () => {});
|
|
215
247
|
}
|
|
216
|
-
|
|
217
248
|
init(rootEl) {
|
|
218
249
|
const app = this;
|
|
250
|
+
app.setColors();
|
|
219
251
|
app.mount(rootEl);
|
|
220
|
-
|
|
221
252
|
const init = () => {
|
|
222
253
|
if (app.initialized) return;
|
|
223
|
-
app.$el.addClass('framework7-initializing');
|
|
254
|
+
app.$el.addClass('framework7-initializing');
|
|
224
255
|
|
|
256
|
+
// RTL attr
|
|
225
257
|
if (app.rtl) {
|
|
226
258
|
$('html').attr('dir', 'rtl');
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
if (app.params.autoDarkMode) {
|
|
231
|
-
app.enableAutoDarkMode();
|
|
232
|
-
} // Watch for online/offline state
|
|
259
|
+
}
|
|
233
260
|
|
|
261
|
+
// Auto Dark Mode
|
|
262
|
+
app.setDarkMode(app.params.darkMode);
|
|
234
263
|
|
|
264
|
+
// Watch for online/offline state
|
|
235
265
|
const window = getWindow();
|
|
236
266
|
window.addEventListener('offline', () => {
|
|
237
267
|
app.online = false;
|
|
@@ -242,31 +272,31 @@ class Framework7 extends Framework7Class {
|
|
|
242
272
|
app.online = true;
|
|
243
273
|
app.emit('online');
|
|
244
274
|
app.emit('connection', true);
|
|
245
|
-
});
|
|
275
|
+
});
|
|
246
276
|
|
|
247
|
-
|
|
277
|
+
// Root class
|
|
278
|
+
app.$el.addClass('framework7-root');
|
|
248
279
|
|
|
249
|
-
|
|
280
|
+
// Theme class
|
|
281
|
+
$('html').removeClass('ios md').addClass(app.theme);
|
|
250
282
|
|
|
283
|
+
// iOS Translucent
|
|
251
284
|
const device = app.device;
|
|
252
|
-
|
|
253
285
|
if (app.params.iosTranslucentBars && app.theme === 'ios' && device.ios) {
|
|
254
286
|
$('html').addClass('ios-translucent-bars');
|
|
255
287
|
}
|
|
256
|
-
|
|
257
288
|
if (app.params.iosTranslucentModals && app.theme === 'ios' && device.ios) {
|
|
258
289
|
$('html').addClass('ios-translucent-modals');
|
|
259
|
-
}
|
|
260
|
-
|
|
290
|
+
}
|
|
261
291
|
|
|
292
|
+
// Init class
|
|
262
293
|
nextFrame(() => {
|
|
263
294
|
app.$el.removeClass('framework7-initializing');
|
|
264
|
-
});
|
|
265
|
-
|
|
295
|
+
});
|
|
296
|
+
// Emit, init other modules
|
|
266
297
|
app.initialized = true;
|
|
267
298
|
app.emit('init');
|
|
268
299
|
};
|
|
269
|
-
|
|
270
300
|
if (app.params.component || app.params.componentUrl) {
|
|
271
301
|
app.initAppComponent(() => {
|
|
272
302
|
init();
|
|
@@ -274,64 +304,52 @@ class Framework7 extends Framework7Class {
|
|
|
274
304
|
} else {
|
|
275
305
|
init();
|
|
276
306
|
}
|
|
277
|
-
|
|
278
307
|
return app;
|
|
279
|
-
}
|
|
280
|
-
|
|
308
|
+
}
|
|
281
309
|
|
|
310
|
+
// eslint-disable-next-line
|
|
282
311
|
loadModule() {
|
|
283
312
|
return Framework7.loadModule(...arguments);
|
|
284
|
-
}
|
|
285
|
-
|
|
313
|
+
}
|
|
286
314
|
|
|
315
|
+
// eslint-disable-next-line
|
|
287
316
|
loadModules() {
|
|
288
317
|
return Framework7.loadModules(...arguments);
|
|
289
318
|
}
|
|
290
|
-
|
|
291
319
|
getVnodeHooks(hook, id) {
|
|
292
320
|
const app = this;
|
|
293
321
|
if (!app.vnodeHooks || !app.vnodeHooks[hook]) return [];
|
|
294
322
|
return app.vnodeHooks[hook][id] || [];
|
|
295
|
-
}
|
|
296
|
-
|
|
323
|
+
}
|
|
297
324
|
|
|
325
|
+
// eslint-disable-next-line
|
|
298
326
|
get $() {
|
|
299
327
|
return $;
|
|
300
328
|
}
|
|
301
|
-
|
|
302
329
|
static get Dom7() {
|
|
303
330
|
return $;
|
|
304
331
|
}
|
|
305
|
-
|
|
306
332
|
static get $() {
|
|
307
333
|
return $;
|
|
308
334
|
}
|
|
309
|
-
|
|
310
335
|
static get device() {
|
|
311
336
|
return getDevice();
|
|
312
337
|
}
|
|
313
|
-
|
|
314
338
|
static get support() {
|
|
315
339
|
return getSupport();
|
|
316
340
|
}
|
|
317
|
-
|
|
318
341
|
static get Class() {
|
|
319
342
|
return Framework7Class;
|
|
320
343
|
}
|
|
321
|
-
|
|
322
344
|
static get Events() {
|
|
323
345
|
return EventsClass;
|
|
324
346
|
}
|
|
325
|
-
|
|
326
347
|
}
|
|
327
|
-
|
|
328
348
|
Framework7.$jsx = $jsx;
|
|
329
349
|
Framework7.ModalMethods = ModalMethods;
|
|
330
350
|
Framework7.ConstructorMethods = ConstructorMethods;
|
|
331
351
|
Framework7.loadModule = loadModule;
|
|
332
|
-
|
|
333
352
|
Framework7.loadModules = function loadModules(modules) {
|
|
334
353
|
return Promise.all(modules.map(module => Framework7.loadModule(module)));
|
|
335
354
|
};
|
|
336
|
-
|
|
337
355
|
export default Framework7;
|