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
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// eslint-disable-next-line
|
|
2
|
+
import { argbFromHex, hexFromArgb, themeFromSourceColor } from './material-color-utils.js';
|
|
3
|
+
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
// prettier-ignore
|
|
6
|
+
function toRGBA(d) {
|
|
7
|
+
const r = Math.round;
|
|
8
|
+
const l = d.length;
|
|
9
|
+
const rgba = {};
|
|
10
|
+
if (d.slice(0, 3).toLowerCase() === 'rgb') {
|
|
11
|
+
d = d.replace(' ', '').split(',');
|
|
12
|
+
rgba[0] = parseInt(d[0].slice(d[3].toLowerCase() === 'a' ? 5 : 4), 10);
|
|
13
|
+
rgba[1] = parseInt(d[1], 10);
|
|
14
|
+
rgba[2] = parseInt(d[2], 10);
|
|
15
|
+
rgba[3] = d[3] ? parseFloat(d[3]) : -1;
|
|
16
|
+
} else {
|
|
17
|
+
if (l < 6) d = parseInt(String(d[1]) + d[1] + d[2] + d[2] + d[3] + d[3] + (l > 4 ? String(d[4]) + d[4] : ''), 16);else d = parseInt(d.slice(1), 16);
|
|
18
|
+
rgba[0] = d >> 16 & 255;
|
|
19
|
+
rgba[1] = d >> 8 & 255;
|
|
20
|
+
rgba[2] = d & 255;
|
|
21
|
+
rgba[3] = l === 9 || l === 5 ? r((d >> 24 & 255) / 255 * 10000) / 10000 : -1;
|
|
22
|
+
}
|
|
23
|
+
return rgba;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// prettier-ignore
|
|
27
|
+
function blend(from, to, p) {
|
|
28
|
+
if (p === void 0) {
|
|
29
|
+
p = 0.5;
|
|
30
|
+
}
|
|
31
|
+
const r = Math.round;
|
|
32
|
+
from = from.trim();
|
|
33
|
+
to = to.trim();
|
|
34
|
+
const b = p < 0;
|
|
35
|
+
p = b ? p * -1 : p;
|
|
36
|
+
const f = toRGBA(from);
|
|
37
|
+
const t = toRGBA(to);
|
|
38
|
+
if (to[0] === 'r') {
|
|
39
|
+
return 'rgb' + (to[3] === 'a' ? 'a(' : '(') + r((t[0] - f[0]) * p + f[0]) + ',' + r((t[1] - f[1]) * p + f[1]) + ',' + r((t[2] - f[2]) * p + f[2]) + (f[3] < 0 && t[3] < 0 ? '' : ',' + (f[3] > -1 && t[3] > -1 ? r(((t[3] - f[3]) * p + f[3]) * 10000) / 10000 : t[3] < 0 ? f[3] : t[3])) + ')';
|
|
40
|
+
}
|
|
41
|
+
return '#' + (0x100000000 + (f[3] > -1 && t[3] > -1 ? r(((t[3] - f[3]) * p + f[3]) * 255) : t[3] > -1 ? r(t[3] * 255) : f[3] > -1 ? r(f[3] * 255) : 255) * 0x1000000 + r((t[0] - f[0]) * p + f[0]) * 0x10000 + r((t[1] - f[1]) * p + f[1]) * 0x100 + r((t[2] - f[2]) * p + f[2])).toString(16).slice(f[3] > -1 || t[3] > -1 ? 1 : 3);
|
|
42
|
+
}
|
|
43
|
+
/* eslint-enable */
|
|
44
|
+
|
|
45
|
+
export const materialColors = function (hexColor) {
|
|
46
|
+
if (hexColor === void 0) {
|
|
47
|
+
hexColor = '';
|
|
48
|
+
}
|
|
49
|
+
const theme = themeFromSourceColor(argbFromHex(`#${hexColor.replace('#', '')}`));
|
|
50
|
+
[0.05, 0.08, 0.11, 0.12, 0.14].forEach((amount, index) => {
|
|
51
|
+
theme.schemes.light.props[`surface${index + 1}`] = argbFromHex(blend(hexFromArgb(theme.schemes.light.props.surface), hexFromArgb(theme.schemes.light.props.primary), amount));
|
|
52
|
+
theme.schemes.dark.props[`surface${index + 1}`] = argbFromHex(blend(hexFromArgb(theme.schemes.dark.props.surface), hexFromArgb(theme.schemes.dark.props.primary), amount));
|
|
53
|
+
});
|
|
54
|
+
const name = n => {
|
|
55
|
+
return n.split('').map(char => char.toUpperCase() === char && char !== '-' && char !== '7' ? `-${char.toLowerCase()}` : char).join('');
|
|
56
|
+
};
|
|
57
|
+
const shouldSkip = prop => {
|
|
58
|
+
const skip = ['tertiary', 'shadow', 'scrim', 'error', 'background'];
|
|
59
|
+
return skip.filter(v => prop.toLowerCase().includes(v)).length > 0;
|
|
60
|
+
};
|
|
61
|
+
const light = {};
|
|
62
|
+
const dark = {};
|
|
63
|
+
Object.keys(theme.schemes.light.props).forEach(prop => {
|
|
64
|
+
if (shouldSkip(prop)) return;
|
|
65
|
+
light[name(`--f7-md-${prop}`)] = hexFromArgb(theme.schemes.light.props[prop]);
|
|
66
|
+
});
|
|
67
|
+
Object.keys(theme.schemes.dark.props).forEach(prop => {
|
|
68
|
+
if (shouldSkip(prop)) return;
|
|
69
|
+
dark[name(`--f7-md-${prop}`)] = hexFromArgb(theme.schemes.dark.props[prop]);
|
|
70
|
+
});
|
|
71
|
+
return {
|
|
72
|
+
light,
|
|
73
|
+
dark
|
|
74
|
+
};
|
|
75
|
+
};
|
package/shared/modal-methods.js
CHANGED
|
@@ -5,7 +5,6 @@ export default function ModalMethods(parameters) {
|
|
|
5
5
|
if (parameters === void 0) {
|
|
6
6
|
parameters = {};
|
|
7
7
|
}
|
|
8
|
-
|
|
9
8
|
const {
|
|
10
9
|
defaultSelector,
|
|
11
10
|
constructor: Constructor,
|
|
@@ -19,29 +18,23 @@ export default function ModalMethods(parameters) {
|
|
|
19
18
|
}), {
|
|
20
19
|
open(el, animate, targetEl) {
|
|
21
20
|
let $el = $(el);
|
|
22
|
-
|
|
23
21
|
if ($el.length > 1 && targetEl) {
|
|
24
22
|
// check if same modal in other page
|
|
25
23
|
const $targetPage = $(targetEl).parents('.page');
|
|
26
|
-
|
|
27
24
|
if ($targetPage.length) {
|
|
28
25
|
$el.each(modalEl => {
|
|
29
26
|
const $modalEl = $(modalEl);
|
|
30
|
-
|
|
31
27
|
if ($modalEl.parents($targetPage)[0] === $targetPage[0]) {
|
|
32
28
|
$el = $modalEl;
|
|
33
29
|
}
|
|
34
30
|
});
|
|
35
31
|
}
|
|
36
32
|
}
|
|
37
|
-
|
|
38
33
|
if ($el.length > 1) {
|
|
39
34
|
$el = $el.eq($el.length - 1);
|
|
40
35
|
}
|
|
41
|
-
|
|
42
36
|
if (!$el.length) return undefined;
|
|
43
37
|
let instance = $el[0].f7Modal;
|
|
44
|
-
|
|
45
38
|
if (!instance) {
|
|
46
39
|
const params = $el.dataset();
|
|
47
40
|
instance = new Constructor(app, {
|
|
@@ -49,39 +42,30 @@ export default function ModalMethods(parameters) {
|
|
|
49
42
|
...params
|
|
50
43
|
});
|
|
51
44
|
}
|
|
52
|
-
|
|
53
45
|
return instance.open(animate);
|
|
54
46
|
},
|
|
55
|
-
|
|
56
47
|
close(el, animate, targetEl) {
|
|
57
48
|
if (el === void 0) {
|
|
58
49
|
el = defaultSelector;
|
|
59
50
|
}
|
|
60
|
-
|
|
61
51
|
let $el = $(el);
|
|
62
52
|
if (!$el.length) return undefined;
|
|
63
|
-
|
|
64
53
|
if ($el.length > 1) {
|
|
65
54
|
// check if close link (targetEl) in this modal
|
|
66
55
|
let $parentEl;
|
|
67
|
-
|
|
68
56
|
if (targetEl) {
|
|
69
57
|
const $targetEl = $(targetEl);
|
|
70
|
-
|
|
71
58
|
if ($targetEl.length) {
|
|
72
59
|
$parentEl = $targetEl.parents($el);
|
|
73
60
|
}
|
|
74
61
|
}
|
|
75
|
-
|
|
76
62
|
if ($parentEl && $parentEl.length > 0) {
|
|
77
63
|
$el = $parentEl;
|
|
78
64
|
} else {
|
|
79
65
|
$el = $el.eq($el.length - 1);
|
|
80
66
|
}
|
|
81
67
|
}
|
|
82
|
-
|
|
83
68
|
let instance = $el[0].f7Modal;
|
|
84
|
-
|
|
85
69
|
if (!instance) {
|
|
86
70
|
const params = $el.dataset();
|
|
87
71
|
instance = new Constructor(app, {
|
|
@@ -89,10 +73,8 @@ export default function ModalMethods(parameters) {
|
|
|
89
73
|
...params
|
|
90
74
|
});
|
|
91
75
|
}
|
|
92
|
-
|
|
93
76
|
return instance.close(animate);
|
|
94
77
|
}
|
|
95
|
-
|
|
96
78
|
});
|
|
97
79
|
return methods;
|
|
98
80
|
}
|
package/shared/utils.d.ts
CHANGED
|
@@ -24,8 +24,6 @@ export const id: (mask: string, map: string) => string;
|
|
|
24
24
|
export const mdPreloaderContent: () => string;
|
|
25
25
|
/** Returns preloader inner content for iOS theme */
|
|
26
26
|
export const iosPreloaderContent: () => string;
|
|
27
|
-
/** Returns preloader inner content for Aurora theme */
|
|
28
|
-
export const auroraPreloaderContent: () => string;
|
|
29
27
|
/** Deletes object properties */
|
|
30
28
|
export const deleteProps: (obj: object) => void;
|
|
31
29
|
/** */
|
|
@@ -71,8 +69,6 @@ export interface Utils {
|
|
|
71
69
|
mdPreloaderContent: () => string;
|
|
72
70
|
/** Returns preloader inner content for iOS theme */
|
|
73
71
|
iosPreloaderContent: () => string;
|
|
74
|
-
/** Returns preloader inner content for Aurora theme */
|
|
75
|
-
auroraPreloaderContent: () => string;
|
|
76
72
|
/** Deletes object properties */
|
|
77
73
|
deleteProps: (obj: object) => void;
|
|
78
74
|
/** */
|
package/shared/utils.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getWindow } from 'ssr-window';
|
|
2
|
+
import { materialColors } from './material-colors.js';
|
|
2
3
|
let uniqueNum = 0;
|
|
3
4
|
export function uniqueNumber() {
|
|
4
5
|
uniqueNum += 1;
|
|
@@ -8,11 +9,9 @@ export function id(mask, map) {
|
|
|
8
9
|
if (mask === void 0) {
|
|
9
10
|
mask = 'xxxxxxxxxx';
|
|
10
11
|
}
|
|
11
|
-
|
|
12
12
|
if (map === void 0) {
|
|
13
13
|
map = '0123456789abcdef';
|
|
14
14
|
}
|
|
15
|
-
|
|
16
15
|
const length = map.length;
|
|
17
16
|
return mask.replace(/x/g, () => map[Math.floor(Math.random() * length)]);
|
|
18
17
|
}
|
|
@@ -28,11 +27,6 @@ export const iosPreloaderContent = `
|
|
|
28
27
|
${[0, 1, 2, 3, 4, 5, 6, 7].map(() => '<span class="preloader-inner-line"></span>').join('')}
|
|
29
28
|
</span>
|
|
30
29
|
`.trim();
|
|
31
|
-
export const auroraPreloaderContent = `
|
|
32
|
-
<span class="preloader-inner">
|
|
33
|
-
<span class="preloader-inner-circle"></span>
|
|
34
|
-
</span>
|
|
35
|
-
`;
|
|
36
30
|
export function eventNameToColonCase(eventName) {
|
|
37
31
|
let hasColon;
|
|
38
32
|
return eventName.split('').map((char, index) => {
|
|
@@ -40,7 +34,6 @@ export function eventNameToColonCase(eventName) {
|
|
|
40
34
|
hasColon = true;
|
|
41
35
|
return `:${char.toLowerCase()}`;
|
|
42
36
|
}
|
|
43
|
-
|
|
44
37
|
return char.toLowerCase();
|
|
45
38
|
}).join('');
|
|
46
39
|
}
|
|
@@ -49,12 +42,13 @@ export function deleteProps(obj) {
|
|
|
49
42
|
Object.keys(object).forEach(key => {
|
|
50
43
|
try {
|
|
51
44
|
object[key] = null;
|
|
52
|
-
} catch (e) {
|
|
45
|
+
} catch (e) {
|
|
46
|
+
// no setter for object
|
|
53
47
|
}
|
|
54
|
-
|
|
55
48
|
try {
|
|
56
49
|
delete object[key];
|
|
57
|
-
} catch (e) {
|
|
50
|
+
} catch (e) {
|
|
51
|
+
// something got wrong
|
|
58
52
|
}
|
|
59
53
|
});
|
|
60
54
|
}
|
|
@@ -70,7 +64,6 @@ export function nextTick(callback, delay) {
|
|
|
70
64
|
if (delay === void 0) {
|
|
71
65
|
delay = 0;
|
|
72
66
|
}
|
|
73
|
-
|
|
74
67
|
return setTimeout(callback, delay);
|
|
75
68
|
}
|
|
76
69
|
export function nextFrame(callback) {
|
|
@@ -89,96 +82,81 @@ export function parseUrlQuery(url) {
|
|
|
89
82
|
let params;
|
|
90
83
|
let param;
|
|
91
84
|
let length;
|
|
92
|
-
|
|
93
85
|
if (typeof urlToParse === 'string' && urlToParse.length) {
|
|
94
86
|
urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\S*\?/, '') : '';
|
|
95
87
|
params = urlToParse.split('&').filter(paramsPart => paramsPart !== '');
|
|
96
88
|
length = params.length;
|
|
97
|
-
|
|
98
89
|
for (i = 0; i < length; i += 1) {
|
|
99
90
|
param = params[i].replace(/#\S+/g, '').split('=');
|
|
100
91
|
query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param.slice(1).join('=')) || '';
|
|
101
92
|
}
|
|
102
93
|
}
|
|
103
|
-
|
|
104
94
|
return query;
|
|
105
95
|
}
|
|
106
96
|
export function getTranslate(el, axis) {
|
|
107
97
|
if (axis === void 0) {
|
|
108
98
|
axis = 'x';
|
|
109
99
|
}
|
|
110
|
-
|
|
111
100
|
const window = getWindow();
|
|
112
101
|
let matrix;
|
|
113
102
|
let curTransform;
|
|
114
103
|
let transformMatrix;
|
|
115
104
|
const curStyle = window.getComputedStyle(el, null);
|
|
116
|
-
|
|
117
105
|
if (window.WebKitCSSMatrix) {
|
|
118
106
|
curTransform = curStyle.transform || curStyle.webkitTransform;
|
|
119
|
-
|
|
120
107
|
if (curTransform.split(',').length > 6) {
|
|
121
108
|
curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', ');
|
|
122
|
-
}
|
|
109
|
+
}
|
|
110
|
+
// Some old versions of Webkit choke when 'none' is passed; pass
|
|
123
111
|
// empty string instead in this case
|
|
124
|
-
|
|
125
|
-
|
|
126
112
|
transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);
|
|
127
113
|
} else {
|
|
128
114
|
transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');
|
|
129
115
|
matrix = transformMatrix.toString().split(',');
|
|
130
116
|
}
|
|
131
|
-
|
|
132
117
|
if (axis === 'x') {
|
|
133
118
|
// Latest Chrome and webkits Fix
|
|
134
|
-
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;
|
|
135
|
-
|
|
119
|
+
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;
|
|
120
|
+
// Crazy IE10 Matrix
|
|
121
|
+
else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);
|
|
122
|
+
// Normal Browsers
|
|
136
123
|
else curTransform = parseFloat(matrix[4]);
|
|
137
124
|
}
|
|
138
|
-
|
|
139
125
|
if (axis === 'y') {
|
|
140
126
|
// Latest Chrome and webkits Fix
|
|
141
|
-
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;
|
|
142
|
-
|
|
127
|
+
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;
|
|
128
|
+
// Crazy IE10 Matrix
|
|
129
|
+
else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);
|
|
130
|
+
// Normal Browsers
|
|
143
131
|
else curTransform = parseFloat(matrix[5]);
|
|
144
132
|
}
|
|
145
|
-
|
|
146
133
|
return curTransform || 0;
|
|
147
134
|
}
|
|
148
135
|
export function serializeObject(obj, parents) {
|
|
149
136
|
if (parents === void 0) {
|
|
150
137
|
parents = [];
|
|
151
138
|
}
|
|
152
|
-
|
|
153
139
|
if (typeof obj === 'string') return obj;
|
|
154
140
|
const resultArray = [];
|
|
155
141
|
const separator = '&';
|
|
156
142
|
let newParents;
|
|
157
|
-
|
|
158
143
|
function varName(name) {
|
|
159
144
|
if (parents.length > 0) {
|
|
160
145
|
let parentParts = '';
|
|
161
|
-
|
|
162
146
|
for (let j = 0; j < parents.length; j += 1) {
|
|
163
147
|
if (j === 0) parentParts += parents[j];else parentParts += `[${encodeURIComponent(parents[j])}]`;
|
|
164
148
|
}
|
|
165
|
-
|
|
166
149
|
return `${parentParts}[${encodeURIComponent(name)}]`;
|
|
167
150
|
}
|
|
168
|
-
|
|
169
151
|
return encodeURIComponent(name);
|
|
170
152
|
}
|
|
171
|
-
|
|
172
153
|
function varValue(value) {
|
|
173
154
|
return encodeURIComponent(value);
|
|
174
155
|
}
|
|
175
|
-
|
|
176
156
|
Object.keys(obj).forEach(prop => {
|
|
177
157
|
let toPush;
|
|
178
|
-
|
|
179
158
|
if (Array.isArray(obj[prop])) {
|
|
180
159
|
toPush = [];
|
|
181
|
-
|
|
182
160
|
for (let i = 0; i < obj[prop].length; i += 1) {
|
|
183
161
|
if (!Array.isArray(obj[prop][i]) && typeof obj[prop][i] === 'object') {
|
|
184
162
|
newParents = parents.slice();
|
|
@@ -189,7 +167,6 @@ export function serializeObject(obj, parents) {
|
|
|
189
167
|
toPush.push(`${varName(prop)}[]=${varValue(obj[prop][i])}`);
|
|
190
168
|
}
|
|
191
169
|
}
|
|
192
|
-
|
|
193
170
|
if (toPush.length > 0) resultArray.push(toPush.join(separator));
|
|
194
171
|
} else if (obj[prop] === null || obj[prop] === '') {
|
|
195
172
|
resultArray.push(`${varName(prop)}=`);
|
|
@@ -213,39 +190,31 @@ export function merge() {
|
|
|
213
190
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
214
191
|
args[_key] = arguments[_key];
|
|
215
192
|
}
|
|
216
|
-
|
|
217
193
|
const to = args[0];
|
|
218
194
|
args.splice(0, 1);
|
|
219
195
|
const from = args;
|
|
220
|
-
|
|
221
196
|
for (let i = 0; i < from.length; i += 1) {
|
|
222
197
|
const nextSource = args[i];
|
|
223
|
-
|
|
224
198
|
if (nextSource !== undefined && nextSource !== null) {
|
|
225
199
|
const keysArray = Object.keys(Object(nextSource));
|
|
226
|
-
|
|
227
200
|
for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {
|
|
228
201
|
const nextKey = keysArray[nextIndex];
|
|
229
202
|
const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
|
|
230
|
-
|
|
231
203
|
if (desc !== undefined && desc.enumerable) {
|
|
232
204
|
to[nextKey] = nextSource[nextKey];
|
|
233
205
|
}
|
|
234
206
|
}
|
|
235
207
|
}
|
|
236
208
|
}
|
|
237
|
-
|
|
238
209
|
return to;
|
|
239
210
|
}
|
|
240
211
|
export function extend() {
|
|
241
212
|
let deep = true;
|
|
242
213
|
let to;
|
|
243
214
|
let from;
|
|
244
|
-
|
|
245
215
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
246
216
|
args[_key2] = arguments[_key2];
|
|
247
217
|
}
|
|
248
|
-
|
|
249
218
|
if (typeof args[0] === 'boolean') {
|
|
250
219
|
deep = args[0];
|
|
251
220
|
to = args[1];
|
|
@@ -256,17 +225,13 @@ export function extend() {
|
|
|
256
225
|
args.splice(0, 1);
|
|
257
226
|
from = args;
|
|
258
227
|
}
|
|
259
|
-
|
|
260
228
|
for (let i = 0; i < from.length; i += 1) {
|
|
261
229
|
const nextSource = args[i];
|
|
262
|
-
|
|
263
230
|
if (nextSource !== undefined && nextSource !== null) {
|
|
264
231
|
const keysArray = Object.keys(Object(nextSource));
|
|
265
|
-
|
|
266
232
|
for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {
|
|
267
233
|
const nextKey = keysArray[nextIndex];
|
|
268
234
|
const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
|
|
269
|
-
|
|
270
235
|
if (desc !== undefined && desc.enumerable) {
|
|
271
236
|
if (!deep) {
|
|
272
237
|
to[nextKey] = nextSource[nextKey];
|
|
@@ -282,7 +247,6 @@ export function extend() {
|
|
|
282
247
|
}
|
|
283
248
|
}
|
|
284
249
|
}
|
|
285
|
-
|
|
286
250
|
return to;
|
|
287
251
|
}
|
|
288
252
|
export function colorHexToRgb(hex) {
|
|
@@ -299,11 +263,8 @@ export function colorRgbToHex(r, g, b) {
|
|
|
299
263
|
}
|
|
300
264
|
export function colorRgbToHsl(r, g, b) {
|
|
301
265
|
r /= 255; // eslint-disable-line
|
|
302
|
-
|
|
303
266
|
g /= 255; // eslint-disable-line
|
|
304
|
-
|
|
305
267
|
b /= 255; // eslint-disable-line
|
|
306
|
-
|
|
307
268
|
const max = Math.max(r, g, b);
|
|
308
269
|
const min = Math.min(r, g, b);
|
|
309
270
|
const d = max - min;
|
|
@@ -319,11 +280,9 @@ export function colorHslToRgb(h, s, l) {
|
|
|
319
280
|
const hp = h / 60;
|
|
320
281
|
const x = c * (1 - Math.abs(hp % 2 - 1));
|
|
321
282
|
let rgb1;
|
|
322
|
-
|
|
323
283
|
if (Number.isNaN(h) || typeof h === 'undefined') {
|
|
324
284
|
rgb1 = [0, 0, 0];
|
|
325
285
|
} else if (hp <= 1) rgb1 = [c, x, 0];else if (hp <= 2) rgb1 = [x, c, 0];else if (hp <= 3) rgb1 = [0, c, x];else if (hp <= 4) rgb1 = [0, x, c];else if (hp <= 5) rgb1 = [x, 0, c];else if (hp <= 6) rgb1 = [c, 0, x];
|
|
326
|
-
|
|
327
286
|
const m = l - c / 2;
|
|
328
287
|
return rgb1.map(n => Math.max(0, Math.min(255, Math.round(255 * (n + m)))));
|
|
329
288
|
}
|
|
@@ -358,14 +317,23 @@ export function colorHslToHsb(h, s, l) {
|
|
|
358
317
|
HSB.s = HSL.l > 0 ? 2 * t / HSB.b : HSB.s;
|
|
359
318
|
return [HSB.h, HSB.s, HSB.b];
|
|
360
319
|
}
|
|
320
|
+
const getShadeTintColors = rgb => {
|
|
321
|
+
const hsl = colorRgbToHsl(...rgb);
|
|
322
|
+
const hslShade = [hsl[0], hsl[1], Math.max(0, hsl[2] - 0.08)];
|
|
323
|
+
const hslTint = [hsl[0], hsl[1], Math.max(0, hsl[2] + 0.08)];
|
|
324
|
+
const shade = colorRgbToHex(...colorHslToRgb(...hslShade));
|
|
325
|
+
const tint = colorRgbToHex(...colorHslToRgb(...hslTint));
|
|
326
|
+
return {
|
|
327
|
+
shade,
|
|
328
|
+
tint
|
|
329
|
+
};
|
|
330
|
+
};
|
|
361
331
|
export function colorThemeCSSProperties() {
|
|
362
332
|
let hex;
|
|
363
333
|
let rgb;
|
|
364
|
-
|
|
365
334
|
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
366
335
|
args[_key3] = arguments[_key3];
|
|
367
336
|
}
|
|
368
|
-
|
|
369
337
|
if (args.length === 1) {
|
|
370
338
|
hex = args[0];
|
|
371
339
|
rgb = colorHexToRgb(hex);
|
|
@@ -373,18 +341,53 @@ export function colorThemeCSSProperties() {
|
|
|
373
341
|
rgb = args;
|
|
374
342
|
hex = colorRgbToHex(...rgb);
|
|
375
343
|
}
|
|
376
|
-
|
|
377
344
|
if (!rgb) return {};
|
|
378
|
-
const
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
const
|
|
345
|
+
const {
|
|
346
|
+
light,
|
|
347
|
+
dark
|
|
348
|
+
} = materialColors(hex);
|
|
349
|
+
const shadeTintIos = getShadeTintColors(rgb);
|
|
350
|
+
const shadeTintMdLight = getShadeTintColors(colorHexToRgb(light['--f7-md-primary']));
|
|
351
|
+
const shadeTintMdDark = getShadeTintColors(colorHexToRgb(dark['--f7-md-primary']));
|
|
352
|
+
Object.keys(light).forEach(key => {
|
|
353
|
+
if (key.includes('surface-')) {
|
|
354
|
+
light[`${key}-rgb`] = colorHexToRgb(light[key]);
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
Object.keys(dark).forEach(key => {
|
|
358
|
+
if (key.includes('surface-')) {
|
|
359
|
+
dark[`${key}-rgb`] = colorHexToRgb(dark[key]);
|
|
360
|
+
}
|
|
361
|
+
});
|
|
383
362
|
return {
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
363
|
+
ios: {
|
|
364
|
+
'--f7-theme-color': 'var(--f7-ios-primary)',
|
|
365
|
+
'--f7-theme-color-rgb': 'var(--f7-ios-primary-rgb)',
|
|
366
|
+
'--f7-theme-color-shade': 'var(--f7-ios-primary-shade)',
|
|
367
|
+
'--f7-theme-color-tint': 'var(--f7-ios-primary-tint)'
|
|
368
|
+
},
|
|
369
|
+
md: {
|
|
370
|
+
'--f7-theme-color': 'var(--f7-md-primary)',
|
|
371
|
+
'--f7-theme-color-rgb': 'var(--f7-md-primary-rgb)',
|
|
372
|
+
'--f7-theme-color-shade': 'var(--f7-md-primary-shade)',
|
|
373
|
+
'--f7-theme-color-tint': 'var(--f7-md-primary-tint)'
|
|
374
|
+
},
|
|
375
|
+
light: {
|
|
376
|
+
'--f7-ios-primary': hex,
|
|
377
|
+
'--f7-ios-primary-shade': shadeTintIos.shade,
|
|
378
|
+
'--f7-ios-primary-tint': shadeTintIos.tint,
|
|
379
|
+
'--f7-ios-primary-rgb': rgb.join(', '),
|
|
380
|
+
'--f7-md-primary-shade': shadeTintMdLight.shade,
|
|
381
|
+
'--f7-md-primary-tint': shadeTintMdLight.tint,
|
|
382
|
+
'--f7-md-primary-rgb': colorHexToRgb(light['--f7-md-primary']).join(', '),
|
|
383
|
+
...light
|
|
384
|
+
},
|
|
385
|
+
dark: {
|
|
386
|
+
'--f7-md-primary-shade': shadeTintMdDark.shade,
|
|
387
|
+
'--f7-md-primary-tint': shadeTintMdDark.tint,
|
|
388
|
+
'--f7-md-primary-rgb': colorHexToRgb(dark['--f7-md-primary']).join(', '),
|
|
389
|
+
...dark
|
|
390
|
+
}
|
|
388
391
|
};
|
|
389
392
|
}
|
|
390
393
|
export function bindMethods(instance, obj) {
|
|
@@ -396,19 +399,136 @@ export function bindMethods(instance, obj) {
|
|
|
396
399
|
}
|
|
397
400
|
});
|
|
398
401
|
}
|
|
399
|
-
|
|
400
402
|
instance[key] = obj[key];
|
|
401
403
|
});
|
|
402
404
|
}
|
|
403
405
|
export function flattenArray() {
|
|
404
406
|
const arr = [];
|
|
405
|
-
|
|
406
407
|
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
407
408
|
args[_key4] = arguments[_key4];
|
|
408
409
|
}
|
|
409
|
-
|
|
410
410
|
args.forEach(arg => {
|
|
411
411
|
if (Array.isArray(arg)) arr.push(...flattenArray(...arg));else arr.push(arg);
|
|
412
412
|
});
|
|
413
413
|
return arr;
|
|
414
|
+
}
|
|
415
|
+
export function colorThemeCSSStyles(colors) {
|
|
416
|
+
if (colors === void 0) {
|
|
417
|
+
colors = {};
|
|
418
|
+
}
|
|
419
|
+
const stringifyObject = obj => {
|
|
420
|
+
let res = '';
|
|
421
|
+
Object.keys(obj).forEach(key => {
|
|
422
|
+
res += `${key}:${obj[key]};`;
|
|
423
|
+
});
|
|
424
|
+
return res;
|
|
425
|
+
};
|
|
426
|
+
const colorVars = colorThemeCSSProperties(colors.primary);
|
|
427
|
+
const primary = [`:root{`, stringifyObject(colorVars.light), `--swiper-theme-color:var(--f7-theme-color);`, ...Object.keys(colors).map(colorName => `--f7-color-${colorName}: ${colors[colorName]};`), `}`, `.dark{`, stringifyObject(colorVars.dark), `}`, `.ios{`, stringifyObject(colorVars.ios), '}', `.md{`, stringifyObject(colorVars.md), '}'].join('');
|
|
428
|
+
const restVars = {};
|
|
429
|
+
Object.keys(colors).forEach(colorName => {
|
|
430
|
+
const colorValue = colors[colorName];
|
|
431
|
+
restVars[colorName] = colorThemeCSSProperties(colorValue);
|
|
432
|
+
});
|
|
433
|
+
|
|
434
|
+
// rest
|
|
435
|
+
let rest = '';
|
|
436
|
+
Object.keys(colors).forEach(colorName => {
|
|
437
|
+
const {
|
|
438
|
+
light,
|
|
439
|
+
dark,
|
|
440
|
+
ios,
|
|
441
|
+
md
|
|
442
|
+
} = restVars[colorName];
|
|
443
|
+
const whiteColorVars = `
|
|
444
|
+
--f7-ios-primary: #ffffff;
|
|
445
|
+
--f7-ios-primary-shade: #ebebeb;
|
|
446
|
+
--f7-ios-primary-tint: #ffffff;
|
|
447
|
+
--f7-ios-primary-rgb: 255, 255, 255;
|
|
448
|
+
--f7-md-primary-shade: #eee;
|
|
449
|
+
--f7-md-primary-tint: #fff;
|
|
450
|
+
--f7-md-primary-rgb: 255, 255, 255;
|
|
451
|
+
--f7-md-primary: #fff;
|
|
452
|
+
--f7-md-on-primary: #000;
|
|
453
|
+
--f7-md-primary-container: #fff;
|
|
454
|
+
--f7-md-on-primary-container: #000;
|
|
455
|
+
--f7-md-secondary: #fff;
|
|
456
|
+
--f7-md-on-secondary: #000;
|
|
457
|
+
--f7-md-secondary-container: #555;
|
|
458
|
+
--f7-md-on-secondary-container: #fff;
|
|
459
|
+
--f7-md-surface: #fff;
|
|
460
|
+
--f7-md-on-surface: #000;
|
|
461
|
+
--f7-md-surface-variant: #333;
|
|
462
|
+
--f7-md-on-surface-variant: #fff;
|
|
463
|
+
--f7-md-outline: #fff;
|
|
464
|
+
--f7-md-outline-variant: #fff;
|
|
465
|
+
--f7-md-inverse-surface: #000;
|
|
466
|
+
--f7-md-inverse-on-surface: #fff;
|
|
467
|
+
--f7-md-inverse-primary: #000;
|
|
468
|
+
--f7-md-surface-1: #f8f8f8;
|
|
469
|
+
--f7-md-surface-2: #f1f1f1;
|
|
470
|
+
--f7-md-surface-3: #e7e7e7;
|
|
471
|
+
--f7-md-surface-4: #e1e1e1;
|
|
472
|
+
--f7-md-surface-5: #d7d7d7;
|
|
473
|
+
--f7-md-surface-variant-rgb: 51, 51, 51;
|
|
474
|
+
--f7-md-on-surface-variant-rgb: 255, 255, 255;
|
|
475
|
+
--f7-md-surface-1-rgb: 248, 248, 248;
|
|
476
|
+
--f7-md-surface-2-rgb: 241, 241, 241;
|
|
477
|
+
--f7-md-surface-3-rgb: 231, 231, 231;
|
|
478
|
+
--f7-md-surface-4-rgb: 225, 225, 225;
|
|
479
|
+
--f7-md-surface-5-rgb: 215, 215, 215;
|
|
480
|
+
`;
|
|
481
|
+
const blackColorVars = `
|
|
482
|
+
--f7-ios-primary: #000;
|
|
483
|
+
--f7-ios-primary-shade: #000;
|
|
484
|
+
--f7-ios-primary-tint: #232323;
|
|
485
|
+
--f7-ios-primary-rgb: 0, 0, 0;
|
|
486
|
+
--f7-md-primary-shade: #000;
|
|
487
|
+
--f7-md-primary-tint: #232323;
|
|
488
|
+
--f7-md-primary-rgb: 0, 0, 0;
|
|
489
|
+
--f7-md-primary: #000;
|
|
490
|
+
--f7-md-on-primary: #fff;
|
|
491
|
+
--f7-md-primary-container: #000;
|
|
492
|
+
--f7-md-on-primary-container: #fff;
|
|
493
|
+
--f7-md-secondary: #000;
|
|
494
|
+
--f7-md-on-secondary: #fff;
|
|
495
|
+
--f7-md-secondary-container: #aaa;
|
|
496
|
+
--f7-md-on-secondary-container: #000;
|
|
497
|
+
--f7-md-surface: #000;
|
|
498
|
+
--f7-md-on-surface: #fff;
|
|
499
|
+
--f7-md-surface-variant: #ccc;
|
|
500
|
+
--f7-md-on-surface-variant: #000;
|
|
501
|
+
--f7-md-outline: #000;
|
|
502
|
+
--f7-md-outline-variant: #000;
|
|
503
|
+
--f7-md-inverse-surface: #fff;
|
|
504
|
+
--f7-md-inverse-on-surface: #000;
|
|
505
|
+
--f7-md-inverse-primary: #fff;
|
|
506
|
+
--f7-md-surface-1: #070707;
|
|
507
|
+
--f7-md-surface-2: #161616;
|
|
508
|
+
--f7-md-surface-3: #232323;
|
|
509
|
+
--f7-md-surface-4: #303030;
|
|
510
|
+
--f7-md-surface-5: #373737;
|
|
511
|
+
--f7-md-surface-variant-rgb: 204, 204, 204;
|
|
512
|
+
--f7-md-on-surface-variant-rgb: 0, 0, 0;
|
|
513
|
+
--f7-md-surface-1-rgb: 7, 7, 7;
|
|
514
|
+
--f7-md-surface-2-rgb: 22, 22, 22;
|
|
515
|
+
--f7-md-surface-3-rgb: 35, 35, 35;
|
|
516
|
+
--f7-md-surface-4-rgb: 48, 48, 48;
|
|
517
|
+
--f7-md-surface-5-rgb: 55, 55, 55;
|
|
518
|
+
`;
|
|
519
|
+
/* eslint-disable */
|
|
520
|
+
const lightString = colorName === 'white' ? whiteColorVars : colorName === 'black' ? blackColorVars : stringifyObject(light);
|
|
521
|
+
const darkString = colorName === 'white' ? whiteColorVars : colorName === 'black' ? blackColorVars : stringifyObject(dark);
|
|
522
|
+
/* eslint-enable */
|
|
523
|
+
rest += [`.color-${colorName} {`, lightString, `--swiper-theme-color: var(--f7-theme-color);`, `}`, `.color-${colorName}.dark, .color-${colorName} .dark, .dark .color-${colorName} {`, darkString, `--swiper-theme-color: var(--f7-theme-color);`, `}`, `.ios .color-${colorName}, .ios.color-${colorName} {`, stringifyObject(ios), `}`, `.md .color-${colorName}, .md.color-${colorName} {`, stringifyObject(md), `}`,
|
|
524
|
+
// text color
|
|
525
|
+
`.text-color-${colorName} {`, `--f7-theme-color-text-color: ${colors[colorName]};`, `}`,
|
|
526
|
+
// bg color
|
|
527
|
+
`.bg-color-${colorName} {`, `--f7-theme-color-bg-color: ${colors[colorName]};`, `}`,
|
|
528
|
+
// border color
|
|
529
|
+
`.border-color-${colorName} {`, `--f7-theme-color-border-color: ${colors[colorName]};`, `}`,
|
|
530
|
+
// ripple color
|
|
531
|
+
`.ripple-color-${colorName} {`, `--f7-theme-color-ripple-color: rgba(${light['--f7-ios-primary-rgb']}, 0.3);`, `}`].join('');
|
|
532
|
+
});
|
|
533
|
+
return `${primary}${rest}`;
|
|
414
534
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function framework7ComponentLoader(e,o){void 0===o&&(o=!0);var t=e.$,n=e.utils,i=(e.getDevice,e.getSupport,e.Class,e.Modal,e.ConstructorMethods,e.ModalMethods,e.$jsx,n.nextFrame),c=n.bindMethods;const r={toggleClicked(e){let o=e.closest(".accordion-item").eq(0);o.length||(o=e.parents("li").eq(0));const t=e.parents(".accordion-item-content").eq(0);t.length&&t.parents(o).length||e.parents("li").length>1&&e.parents("li")[0]!==o[0]||this.accordion.toggle(o)},open(e){const o=this,n=t(e);let c=!1;function r(){c=!0}if(n.trigger("accordion:beforeopen",{prevent:r},r),o.emit("accordionBeforeOpen",n[0],r),c)return;const s=n.parents(".accordion-list").eq(0);let a=n.children(".accordion-item-content");if(a.removeAttr("aria-hidden"),0===a.length&&(a=n.find(".accordion-item-content")),0===a.length)return;const d=s.length>0&&n.parent().children(".accordion-item-opened");d.length>0&&o.accordion.close(d),a.transitionEnd((()=>{n.hasClass("accordion-item-opened")?(a.transition(0),a.css("height","auto"),i((()=>{a.transition(""),n.trigger("accordion:opened"),o.emit("accordionOpened",n[0])}))):(a.css("height",""),n.trigger("accordion:closed"),o.emit("accordionClosed",n[0]))})),a.css("height",`${a[0].scrollHeight}px`),n.trigger("accordion:open"),n.addClass("accordion-item-opened"),o.emit("accordionOpen",n[0])},close(e){const o=this,n=t(e);let c=!1;function r(){c=!0}if(n.trigger("accordion:beforeclose",{prevent:r},r),o.emit("accordionBeforeClose",n[0],r),c)return;let s=n.children(".accordion-item-content");0===s.length&&(s=n.find(".accordion-item-content")),n.removeClass("accordion-item-opened"),s.attr("aria-hidden",!0),s.transition(0),s.css("height",`${s[0].scrollHeight}px`),s.transitionEnd((()=>{n.hasClass("accordion-item-opened")?(s.transition(0),s.css("height","auto"),i((()=>{s.transition(""),n.trigger("accordion:opened"),o.emit("accordionOpened",n[0])}))):(s.css("height",""),n.trigger("accordion:closed"),o.emit("accordionClosed",n[0]))})),i((()=>{s.transition(""),s.css("height",""),n.trigger("accordion:close"),o.emit("accordionClose",n[0])}))},toggle(e){const o=t(e);0!==o.length&&(o.hasClass("accordion-item-opened")?this.accordion.close(e):this.accordion.open(e))}};var s={name:"accordion",create(){c(this,{accordion:r})},clicks:{".accordion-item .item-link, .accordion-item-toggle, .links-list.accordion-list > ul > li > a":function(e){r.toggleClicked.call(this,e)}}};if(o){if(e.prototype.modules&&e.prototype.modules[s.name])return;e.use(s),e.instance&&(e.instance.useModuleParams(s,e.instance.params),e.instance.useModule(s))}return s}(Framework7, typeof Framework7AutoInstallComponent === 'undefined' ? undefined : Framework7AutoInstallComponent))
|