@xenknight/framework7 0.0.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/LICENSE +20 -0
- package/README.md +32 -0
- package/components/accordion/accordion-ios.less +2 -0
- package/components/accordion/accordion-md.less +2 -0
- package/components/accordion/accordion-rtl.css +1 -0
- package/components/accordion/accordion-vars.less +0 -0
- package/components/accordion/accordion.css +1 -0
- package/components/accordion/accordion.d.ts +55 -0
- package/components/accordion/accordion.js +118 -0
- package/components/accordion/accordion.less +215 -0
- package/components/actions/actions-class.js +325 -0
- package/components/actions/actions-ios.less +51 -0
- package/components/actions/actions-md.less +24 -0
- package/components/actions/actions-rtl.css +1 -0
- package/components/actions/actions-vars.less +72 -0
- package/components/actions/actions.css +1 -0
- package/components/actions/actions.d.ts +164 -0
- package/components/actions/actions.js +47 -0
- package/components/actions/actions.less +182 -0
- package/components/app/app-class.d.ts +189 -0
- package/components/app/app-class.js +349 -0
- package/components/app/app-ios.less +23 -0
- package/components/app/app-md.less +8 -0
- package/components/app/app-vars.less +122 -0
- package/components/app/app.less +121 -0
- package/components/app/load-module.js +125 -0
- package/components/area-chart/area-chart-class.js +467 -0
- package/components/area-chart/area-chart-ios.less +2 -0
- package/components/area-chart/area-chart-md.less +2 -0
- package/components/area-chart/area-chart-rtl.css +1 -0
- package/components/area-chart/area-chart-vars.less +35 -0
- package/components/area-chart/area-chart.css +1 -0
- package/components/area-chart/area-chart.d.ts +128 -0
- package/components/area-chart/area-chart.js +44 -0
- package/components/area-chart/area-chart.less +131 -0
- package/components/autocomplete/autocomplete-class.js +813 -0
- package/components/autocomplete/autocomplete-ios.less +9 -0
- package/components/autocomplete/autocomplete-md.less +30 -0
- package/components/autocomplete/autocomplete-rtl.css +1 -0
- package/components/autocomplete/autocomplete-vars.less +36 -0
- package/components/autocomplete/autocomplete.css +1 -0
- package/components/autocomplete/autocomplete.d.ts +193 -0
- package/components/autocomplete/autocomplete.js +81 -0
- package/components/autocomplete/autocomplete.less +102 -0
- package/components/badge/badge-ios.less +2 -0
- package/components/badge/badge-md.less +2 -0
- package/components/badge/badge-vars.less +18 -0
- package/components/badge/badge.d.ts +14 -0
- package/components/badge/badge.js +3 -0
- package/components/badge/badge.less +45 -0
- package/components/block/block-ios.less +2 -0
- package/components/block/block-md.less +2 -0
- package/components/block/block-vars.less +77 -0
- package/components/block/block.d.ts +14 -0
- package/components/block/block.js +3 -0
- package/components/block/block.less +209 -0
- package/components/breadcrumbs/breadcrumbs-ios.less +2 -0
- package/components/breadcrumbs/breadcrumbs-md.less +2 -0
- package/components/breadcrumbs/breadcrumbs-rtl.css +1 -0
- package/components/breadcrumbs/breadcrumbs-vars.less +52 -0
- package/components/breadcrumbs/breadcrumbs.css +1 -0
- package/components/breadcrumbs/breadcrumbs.d.ts +15 -0
- package/components/breadcrumbs/breadcrumbs.js +11 -0
- package/components/breadcrumbs/breadcrumbs.less +91 -0
- package/components/button/button-ios.less +21 -0
- package/components/button/button-md.less +11 -0
- package/components/button/button-vars.less +114 -0
- package/components/button/button.d.ts +14 -0
- package/components/button/button.js +3 -0
- package/components/button/button.less +421 -0
- package/components/calendar/calendar-class.js +1872 -0
- package/components/calendar/calendar-ios.less +2 -0
- package/components/calendar/calendar-md.less +2 -0
- package/components/calendar/calendar-rtl.css +1 -0
- package/components/calendar/calendar-vars.less +108 -0
- package/components/calendar/calendar.css +1 -0
- package/components/calendar/calendar.d.ts +312 -0
- package/components/calendar/calendar.js +118 -0
- package/components/calendar/calendar.less +448 -0
- package/components/card/card-ios.less +2 -0
- package/components/card/card-md.less +2 -0
- package/components/card/card-rtl.css +1 -0
- package/components/card/card-vars.less +80 -0
- package/components/card/card.css +1 -0
- package/components/card/card.d.ts +69 -0
- package/components/card/card.js +504 -0
- package/components/card/card.less +307 -0
- package/components/checkbox/checkbox-ios.less +23 -0
- package/components/checkbox/checkbox-md.less +17 -0
- package/components/checkbox/checkbox-rtl.css +1 -0
- package/components/checkbox/checkbox-vars.less +25 -0
- package/components/checkbox/checkbox.css +1 -0
- package/components/checkbox/checkbox.d.ts +14 -0
- package/components/checkbox/checkbox.js +3 -0
- package/components/checkbox/checkbox.less +155 -0
- package/components/chip/chip-ios.less +25 -0
- package/components/chip/chip-md.less +30 -0
- package/components/chip/chip-rtl.css +1 -0
- package/components/chip/chip-vars.less +42 -0
- package/components/chip/chip.css +1 -0
- package/components/chip/chip.d.ts +14 -0
- package/components/chip/chip.js +3 -0
- package/components/chip/chip.less +106 -0
- package/components/color-picker/color-picker-class.js +871 -0
- package/components/color-picker/color-picker-ios.less +2 -0
- package/components/color-picker/color-picker-md.less +2 -0
- package/components/color-picker/color-picker-rtl.css +1 -0
- package/components/color-picker/color-picker-vars.less +39 -0
- package/components/color-picker/color-picker.css +1 -0
- package/components/color-picker/color-picker.d.ts +233 -0
- package/components/color-picker/color-picker.js +92 -0
- package/components/color-picker/color-picker.less +557 -0
- package/components/color-picker/modules/alpha-slider.js +91 -0
- package/components/color-picker/modules/brightness-slider.js +80 -0
- package/components/color-picker/modules/current-color.js +14 -0
- package/components/color-picker/modules/hex.js +71 -0
- package/components/color-picker/modules/hs-spectrum.js +118 -0
- package/components/color-picker/modules/hsb-sliders.js +191 -0
- package/components/color-picker/modules/hue-slider.js +73 -0
- package/components/color-picker/modules/initial-current-colors.js +43 -0
- package/components/color-picker/modules/palette.js +46 -0
- package/components/color-picker/modules/rgb-bars.js +183 -0
- package/components/color-picker/modules/rgb-sliders.js +185 -0
- package/components/color-picker/modules/sb-spectrum.js +119 -0
- package/components/color-picker/modules/wheel.js +173 -0
- package/components/contacts-list/contacts-list-ios.less +2 -0
- package/components/contacts-list/contacts-list-md.less +21 -0
- package/components/contacts-list/contacts-list-rtl.css +1 -0
- package/components/contacts-list/contacts-list-vars.less +24 -0
- package/components/contacts-list/contacts-list.css +1 -0
- package/components/contacts-list/contacts-list.d.ts +14 -0
- package/components/contacts-list/contacts-list.js +3 -0
- package/components/contacts-list/contacts-list.less +26 -0
- package/components/data-table/data-table-class.js +141 -0
- package/components/data-table/data-table-ios.less +70 -0
- package/components/data-table/data-table-md.less +88 -0
- package/components/data-table/data-table-rtl.css +1 -0
- package/components/data-table/data-table-vars.less +77 -0
- package/components/data-table/data-table.css +1 -0
- package/components/data-table/data-table.d.ts +61 -0
- package/components/data-table/data-table.js +64 -0
- package/components/data-table/data-table.less +429 -0
- package/components/dialog/dialog-class.js +196 -0
- package/components/dialog/dialog-ios.less +94 -0
- package/components/dialog/dialog-md.less +86 -0
- package/components/dialog/dialog-rtl.css +1 -0
- package/components/dialog/dialog-vars.less +93 -0
- package/components/dialog/dialog.css +1 -0
- package/components/dialog/dialog.d.ts +245 -0
- package/components/dialog/dialog.js +242 -0
- package/components/dialog/dialog.less +142 -0
- package/components/fab/fab-ios.less +9 -0
- package/components/fab/fab-md.less +11 -0
- package/components/fab/fab-rtl.css +1 -0
- package/components/fab/fab-vars.less +46 -0
- package/components/fab/fab.css +1 -0
- package/components/fab/fab.d.ts +32 -0
- package/components/fab/fab.js +172 -0
- package/components/fab/fab.less +523 -0
- package/components/form/form-ios.less +0 -0
- package/components/form/form-md.less +0 -0
- package/components/form/form-rtl.css +0 -0
- package/components/form/form.css +0 -0
- package/components/form/form.d.ts +64 -0
- package/components/form/form.js +311 -0
- package/components/form/form.less +7 -0
- package/components/gauge/gauge-class.js +298 -0
- package/components/gauge/gauge-ios.less +2 -0
- package/components/gauge/gauge-md.less +2 -0
- package/components/gauge/gauge-rtl.css +1 -0
- package/components/gauge/gauge.css +1 -0
- package/components/gauge/gauge.d.ts +100 -0
- package/components/gauge/gauge.js +90 -0
- package/components/gauge/gauge.less +24 -0
- package/components/grid/grid-ios.less +2 -0
- package/components/grid/grid-md.less +2 -0
- package/components/grid/grid-rtl.css +1 -0
- package/components/grid/grid-vars.less +3 -0
- package/components/grid/grid.css +1 -0
- package/components/grid/grid.d.ts +15 -0
- package/components/grid/grid.js +3 -0
- package/components/grid/grid.less +78 -0
- package/components/icon/icon-ios.less +44 -0
- package/components/icon/icon-md.less +56 -0
- package/components/icon/icon.d.ts +14 -0
- package/components/icon/icon.js +3 -0
- package/components/icon/icon.less +33 -0
- package/components/infinite-scroll/infinite-scroll-ios.less +11 -0
- package/components/infinite-scroll/infinite-scroll-md.less +6 -0
- package/components/infinite-scroll/infinite-scroll-rtl.css +1 -0
- package/components/infinite-scroll/infinite-scroll.css +1 -0
- package/components/infinite-scroll/infinite-scroll.d.ts +27 -0
- package/components/infinite-scroll/infinite-scroll.js +94 -0
- package/components/infinite-scroll/infinite-scroll.less +15 -0
- package/components/input/input-ios.less +129 -0
- package/components/input/input-md.less +171 -0
- package/components/input/input-rtl.css +1 -0
- package/components/input/input-vars.less +94 -0
- package/components/input/input.css +1 -0
- package/components/input/input.d.ts +60 -0
- package/components/input/input.js +339 -0
- package/components/input/input.less +355 -0
- package/components/link/link-ios.less +9 -0
- package/components/link/link-md.less +2 -0
- package/components/link/link-vars.less +9 -0
- package/components/link/link.d.ts +14 -0
- package/components/link/link.js +3 -0
- package/components/link/link.less +37 -0
- package/components/list/list-ios.less +15 -0
- package/components/list/list-md.less +5 -0
- package/components/list/list-vars.less +184 -0
- package/components/list/list.d.ts +14 -0
- package/components/list/list.js +3 -0
- package/components/list/list.less +718 -0
- package/components/list-index/list-index-class.js +333 -0
- package/components/list-index/list-index-ios.less +21 -0
- package/components/list-index/list-index-md.less +7 -0
- package/components/list-index/list-index-rtl.css +1 -0
- package/components/list-index/list-index-vars.less +25 -0
- package/components/list-index/list-index.css +1 -0
- package/components/list-index/list-index.d.ts +101 -0
- package/components/list-index/list-index.js +65 -0
- package/components/list-index/list-index.less +130 -0
- package/components/login-screen/login-screen-class.js +38 -0
- package/components/login-screen/login-screen-ios.less +2 -0
- package/components/login-screen/login-screen-md.less +2 -0
- package/components/login-screen/login-screen-rtl.css +1 -0
- package/components/login-screen/login-screen-vars.less +33 -0
- package/components/login-screen/login-screen.css +1 -0
- package/components/login-screen/login-screen.d.ts +99 -0
- package/components/login-screen/login-screen.js +32 -0
- package/components/login-screen/login-screen.less +100 -0
- package/components/messagebar/messagebar-class.js +367 -0
- package/components/messagebar/messagebar-ios.less +88 -0
- package/components/messagebar/messagebar-md.less +114 -0
- package/components/messagebar/messagebar-rtl.css +1 -0
- package/components/messagebar/messagebar-vars.less +75 -0
- package/components/messagebar/messagebar.css +1 -0
- package/components/messagebar/messagebar.d.ts +165 -0
- package/components/messagebar/messagebar.js +66 -0
- package/components/messagebar/messagebar.less +162 -0
- package/components/messages/messages-class.js +487 -0
- package/components/messages/messages-ios.less +165 -0
- package/components/messages/messages-md.less +140 -0
- package/components/messages/messages-rtl.css +1 -0
- package/components/messages/messages-vars.less +82 -0
- package/components/messages/messages.css +1 -0
- package/components/messages/messages.d.ts +162 -0
- package/components/messages/messages.js +65 -0
- package/components/messages/messages.less +218 -0
- package/components/modal/custom-modal-class.js +66 -0
- package/components/modal/modal-class.js +224 -0
- package/components/modal/modal.d.ts +82 -0
- package/components/modal/modal.js +22 -0
- package/components/modal/modal.less +14 -0
- package/components/navbar/navbar-ios.less +755 -0
- package/components/navbar/navbar-md.less +65 -0
- package/components/navbar/navbar-vars.less +74 -0
- package/components/navbar/navbar.d.ts +77 -0
- package/components/navbar/navbar.js +712 -0
- package/components/navbar/navbar.less +311 -0
- package/components/notification/notification-class.js +212 -0
- package/components/notification/notification-ios.less +55 -0
- package/components/notification/notification-md.less +87 -0
- package/components/notification/notification-rtl.css +1 -0
- package/components/notification/notification-vars.less +75 -0
- package/components/notification/notification.css +1 -0
- package/components/notification/notification.d.ts +122 -0
- package/components/notification/notification.js +33 -0
- package/components/notification/notification.less +94 -0
- package/components/page/page-ios.less +154 -0
- package/components/page/page-md.less +83 -0
- package/components/page/page-transitions/circle.less +107 -0
- package/components/page/page-transitions/cover-v.less +61 -0
- package/components/page/page-transitions/cover.less +71 -0
- package/components/page/page-transitions/dive.less +77 -0
- package/components/page/page-transitions/fade.less +53 -0
- package/components/page/page-transitions/flip.less +91 -0
- package/components/page/page-transitions/parallax.less +75 -0
- package/components/page/page-transitions/push.less +75 -0
- package/components/page/page-vars.less +47 -0
- package/components/page/page.d.ts +14 -0
- package/components/page/page.js +3 -0
- package/components/page/page.less +204 -0
- package/components/panel/panel-class.js +556 -0
- package/components/panel/panel-ios.less +2 -0
- package/components/panel/panel-md.less +11 -0
- package/components/panel/panel-rtl.css +3 -0
- package/components/panel/panel-vars.less +24 -0
- package/components/panel/panel.css +3 -0
- package/components/panel/panel.d.ts +198 -0
- package/components/panel/panel.js +189 -0
- package/components/panel/panel.less +403 -0
- package/components/panel/resizable-panel.js +160 -0
- package/components/panel/swipe-panel.js +311 -0
- package/components/photo-browser/photo-browser-class.js +734 -0
- package/components/photo-browser/photo-browser-ios.less +2 -0
- package/components/photo-browser/photo-browser-md.less +2 -0
- package/components/photo-browser/photo-browser-rtl.css +1 -0
- package/components/photo-browser/photo-browser-vars.less +16 -0
- package/components/photo-browser/photo-browser.css +1 -0
- package/components/photo-browser/photo-browser.d.ts +204 -0
- package/components/photo-browser/photo-browser.js +73 -0
- package/components/photo-browser/photo-browser.less +358 -0
- package/components/picker/picker-class.js +588 -0
- package/components/picker/picker-column.js +121 -0
- package/components/picker/picker-ios.less +12 -0
- package/components/picker/picker-md.less +8 -0
- package/components/picker/picker-rtl.css +1 -0
- package/components/picker/picker-vars.less +35 -0
- package/components/picker/picker.css +1 -0
- package/components/picker/picker.d.ts +209 -0
- package/components/picker/picker.js +59 -0
- package/components/picker/picker.less +180 -0
- package/components/pie-chart/pie-chart-class.js +250 -0
- package/components/pie-chart/pie-chart-ios.less +2 -0
- package/components/pie-chart/pie-chart-md.less +2 -0
- package/components/pie-chart/pie-chart-rtl.css +1 -0
- package/components/pie-chart/pie-chart.css +1 -0
- package/components/pie-chart/pie-chart.d.ts +99 -0
- package/components/pie-chart/pie-chart.js +32 -0
- package/components/pie-chart/pie-chart.less +43 -0
- package/components/popover/popover-class.js +293 -0
- package/components/popover/popover-ios.less +6 -0
- package/components/popover/popover-md.less +41 -0
- package/components/popover/popover-rtl.css +1 -0
- package/components/popover/popover-vars.less +25 -0
- package/components/popover/popover.css +1 -0
- package/components/popover/popover.d.ts +137 -0
- package/components/popover/popover.js +75 -0
- package/components/popover/popover.less +168 -0
- package/components/popup/popup-class.js +329 -0
- package/components/popup/popup-ios.less +2 -0
- package/components/popup/popup-md.less +2 -0
- package/components/popup/popup-rtl.css +1 -0
- package/components/popup/popup-vars.less +21 -0
- package/components/popup/popup.css +1 -0
- package/components/popup/popup.d.ts +143 -0
- package/components/popup/popup.js +46 -0
- package/components/popup/popup.less +204 -0
- package/components/preloader/preloader-ios.less +57 -0
- package/components/preloader/preloader-md.less +114 -0
- package/components/preloader/preloader-rtl.css +1 -0
- package/components/preloader/preloader-vars.less +16 -0
- package/components/preloader/preloader.css +1 -0
- package/components/preloader/preloader.d.ts +26 -0
- package/components/preloader/preloader.js +106 -0
- package/components/preloader/preloader.less +60 -0
- package/components/progressbar/progressbar-ios.less +59 -0
- package/components/progressbar/progressbar-md.less +141 -0
- package/components/progressbar/progressbar-rtl.css +1 -0
- package/components/progressbar/progressbar-vars.less +22 -0
- package/components/progressbar/progressbar.css +1 -0
- package/components/progressbar/progressbar.d.ts +31 -0
- package/components/progressbar/progressbar.js +150 -0
- package/components/progressbar/progressbar.less +111 -0
- package/components/pull-to-refresh/pull-to-refresh-class.js +512 -0
- package/components/pull-to-refresh/pull-to-refresh-ios.less +88 -0
- package/components/pull-to-refresh/pull-to-refresh-md.less +129 -0
- package/components/pull-to-refresh/pull-to-refresh-rtl.css +1 -0
- package/components/pull-to-refresh/pull-to-refresh-vars.less +14 -0
- package/components/pull-to-refresh/pull-to-refresh.css +1 -0
- package/components/pull-to-refresh/pull-to-refresh.d.ts +103 -0
- package/components/pull-to-refresh/pull-to-refresh.js +62 -0
- package/components/pull-to-refresh/pull-to-refresh.less +38 -0
- package/components/radio/radio-ios.less +61 -0
- package/components/radio/radio-md.less +64 -0
- package/components/radio/radio-rtl.css +1 -0
- package/components/radio/radio-vars.less +24 -0
- package/components/radio/radio.css +1 -0
- package/components/radio/radio.d.ts +14 -0
- package/components/radio/radio.js +3 -0
- package/components/radio/radio.less +64 -0
- package/components/range/range-class.js +577 -0
- package/components/range/range-ios.less +9 -0
- package/components/range/range-md.less +41 -0
- package/components/range/range-rtl.css +1 -0
- package/components/range/range-vars.less +61 -0
- package/components/range/range.css +1 -0
- package/components/range/range.d.ts +143 -0
- package/components/range/range.js +75 -0
- package/components/range/range.less +235 -0
- package/components/searchbar/remove-diacritics.js +271 -0
- package/components/searchbar/searchbar-class.js +592 -0
- package/components/searchbar/searchbar-ios.less +107 -0
- package/components/searchbar/searchbar-md.less +147 -0
- package/components/searchbar/searchbar-rtl.css +1 -0
- package/components/searchbar/searchbar-vars.less +77 -0
- package/components/searchbar/searchbar.css +1 -0
- package/components/searchbar/searchbar.d.ts +161 -0
- package/components/searchbar/searchbar.js +122 -0
- package/components/searchbar/searchbar.less +322 -0
- package/components/sheet/sheet-class.js +673 -0
- package/components/sheet/sheet-ios.less +2 -0
- package/components/sheet/sheet-md.less +9 -0
- package/components/sheet/sheet-rtl.css +1 -0
- package/components/sheet/sheet-vars.less +27 -0
- package/components/sheet/sheet.css +1 -0
- package/components/sheet/sheet.d.ts +170 -0
- package/components/sheet/sheet.js +76 -0
- package/components/sheet/sheet.less +196 -0
- package/components/skeleton/skeleton-ios.less +2 -0
- package/components/skeleton/skeleton-md.less +2 -0
- package/components/skeleton/skeleton-rtl.css +1 -0
- package/components/skeleton/skeleton-vars.less +8 -0
- package/components/skeleton/skeleton.css +1 -0
- package/components/skeleton/skeleton.d.ts +14 -0
- package/components/skeleton/skeleton.js +3 -0
- package/components/skeleton/skeleton.less +11 -0
- package/components/smart-select/smart-select-class.js +874 -0
- package/components/smart-select/smart-select-ios.less +2 -0
- package/components/smart-select/smart-select-md.less +2 -0
- package/components/smart-select/smart-select-rtl.css +1 -0
- package/components/smart-select/smart-select-vars.less +6 -0
- package/components/smart-select/smart-select.css +1 -0
- package/components/smart-select/smart-select.d.ts +204 -0
- package/components/smart-select/smart-select.js +138 -0
- package/components/smart-select/smart-select.less +42 -0
- package/components/sortable/sortable-ios.less +7 -0
- package/components/sortable/sortable-md.less +7 -0
- package/components/sortable/sortable-rtl.css +1 -0
- package/components/sortable/sortable-vars.less +22 -0
- package/components/sortable/sortable.css +1 -0
- package/components/sortable/sortable.d.ts +50 -0
- package/components/sortable/sortable.js +286 -0
- package/components/sortable/sortable.less +133 -0
- package/components/statusbar/statusbar-ios.less +2 -0
- package/components/statusbar/statusbar-md.less +2 -0
- package/components/statusbar/statusbar.d.ts +54 -0
- package/components/statusbar/statusbar.js +190 -0
- package/components/statusbar/statusbar.less +7 -0
- package/components/stepper/stepper-class.js +403 -0
- package/components/stepper/stepper-ios.less +36 -0
- package/components/stepper/stepper-md.less +16 -0
- package/components/stepper/stepper-rtl.css +1 -0
- package/components/stepper/stepper-vars.less +40 -0
- package/components/stepper/stepper.css +1 -0
- package/components/stepper/stepper.d.ts +121 -0
- package/components/stepper/stepper.js +82 -0
- package/components/stepper/stepper.less +178 -0
- package/components/subnavbar/subnavbar-ios.less +51 -0
- package/components/subnavbar/subnavbar-md.less +47 -0
- package/components/subnavbar/subnavbar-vars.less +36 -0
- package/components/subnavbar/subnavbar.d.ts +11 -0
- package/components/subnavbar/subnavbar.js +17 -0
- package/components/subnavbar/subnavbar.less +128 -0
- package/components/swipeout/swipeout-ios.less +2 -0
- package/components/swipeout/swipeout-md.less +2 -0
- package/components/swipeout/swipeout-rtl.css +1 -0
- package/components/swipeout/swipeout-vars.less +24 -0
- package/components/swipeout/swipeout.css +1 -0
- package/components/swipeout/swipeout.d.ts +68 -0
- package/components/swipeout/swipeout.js +513 -0
- package/components/swipeout/swipeout.less +109 -0
- package/components/swiper/swiper-ios.less +2 -0
- package/components/swiper/swiper-md.less +2 -0
- package/components/swiper/swiper-rtl.css +1 -0
- package/components/swiper/swiper.css +1 -0
- package/components/swiper/swiper.d.ts +25 -0
- package/components/swiper/swiper.js +141 -0
- package/components/swiper/swiper.less +5 -0
- package/components/tabs/tabs-ios.less +2 -0
- package/components/tabs/tabs-md.less +2 -0
- package/components/tabs/tabs-rtl.css +1 -0
- package/components/tabs/tabs.css +1 -0
- package/components/tabs/tabs.d.ts +39 -0
- package/components/tabs/tabs.js +243 -0
- package/components/tabs/tabs.less +45 -0
- package/components/text-editor/text-editor-class.js +516 -0
- package/components/text-editor/text-editor-ios.less +9 -0
- package/components/text-editor/text-editor-md.less +11 -0
- package/components/text-editor/text-editor-rtl.css +1 -0
- package/components/text-editor/text-editor-vars.less +51 -0
- package/components/text-editor/text-editor.css +1 -0
- package/components/text-editor/text-editor.d.ts +166 -0
- package/components/text-editor/text-editor.js +81 -0
- package/components/text-editor/text-editor.less +153 -0
- package/components/timeline/timeline-ios.less +11 -0
- package/components/timeline/timeline-md.less +7 -0
- package/components/timeline/timeline-rtl.css +1 -0
- package/components/timeline/timeline-vars.less +64 -0
- package/components/timeline/timeline.css +1 -0
- package/components/timeline/timeline.d.ts +14 -0
- package/components/timeline/timeline.js +3 -0
- package/components/timeline/timeline.less +413 -0
- package/components/toast/toast-class.js +105 -0
- package/components/toast/toast-ios.less +81 -0
- package/components/toast/toast-md.less +72 -0
- package/components/toast/toast-rtl.css +1 -0
- package/components/toast/toast-vars.less +24 -0
- package/components/toast/toast.css +1 -0
- package/components/toast/toast.d.ts +121 -0
- package/components/toast/toast.js +40 -0
- package/components/toast/toast.less +62 -0
- package/components/toggle/toggle-class.js +165 -0
- package/components/toggle/toggle-ios.less +70 -0
- package/components/toggle/toggle-md.less +44 -0
- package/components/toggle/toggle-rtl.css +1 -0
- package/components/toggle/toggle-vars.less +30 -0
- package/components/toggle/toggle.css +1 -0
- package/components/toggle/toggle.d.ts +73 -0
- package/components/toggle/toggle.js +57 -0
- package/components/toggle/toggle.less +52 -0
- package/components/toolbar/toolbar-ios.less +47 -0
- package/components/toolbar/toolbar-md.less +77 -0
- package/components/toolbar/toolbar-vars.less +71 -0
- package/components/toolbar/toolbar.d.ts +43 -0
- package/components/toolbar/toolbar.js +198 -0
- package/components/toolbar/toolbar.less +306 -0
- package/components/tooltip/tooltip-class.js +336 -0
- package/components/tooltip/tooltip-ios.less +2 -0
- package/components/tooltip/tooltip-md.less +2 -0
- package/components/tooltip/tooltip-rtl.css +1 -0
- package/components/tooltip/tooltip-vars.less +19 -0
- package/components/tooltip/tooltip.css +1 -0
- package/components/tooltip/tooltip.d.ts +105 -0
- package/components/tooltip/tooltip.js +129 -0
- package/components/tooltip/tooltip.less +39 -0
- package/components/touch-ripple/touch-ripple-class.js +85 -0
- package/components/touch-ripple/touch-ripple-ios.less +2 -0
- package/components/touch-ripple/touch-ripple-md.less +2 -0
- package/components/touch-ripple/touch-ripple-vars.less +8 -0
- package/components/touch-ripple/touch-ripple.d.ts +25 -0
- package/components/touch-ripple/touch-ripple.js +18 -0
- package/components/touch-ripple/touch-ripple.less +114 -0
- package/components/treeview/treeview-ios.less +2 -0
- package/components/treeview/treeview-md.less +2 -0
- package/components/treeview/treeview-rtl.css +1 -0
- package/components/treeview/treeview-vars.less +38 -0
- package/components/treeview/treeview.css +1 -0
- package/components/treeview/treeview.d.ts +42 -0
- package/components/treeview/treeview.js +74 -0
- package/components/treeview/treeview.less +160 -0
- package/components/typography/typography-ios.less +2 -0
- package/components/typography/typography-md.less +2 -0
- package/components/typography/typography-rtl.css +1 -0
- package/components/typography/typography-vars.less +4 -0
- package/components/typography/typography.css +1 -0
- package/components/typography/typography.d.ts +14 -0
- package/components/typography/typography.js +3 -0
- package/components/typography/typography.less +220 -0
- package/components/view/resizable-view.js +125 -0
- package/components/view/view-class.js +206 -0
- package/components/view/view-ios.less +2 -0
- package/components/view/view-md.less +2 -0
- package/components/view/view.d.ts +199 -0
- package/components/view/view.js +173 -0
- package/components/view/view.less +35 -0
- package/components/virtual-list/virtual-list-class.js +583 -0
- package/components/virtual-list/virtual-list-ios.less +2 -0
- package/components/virtual-list/virtual-list-md.less +2 -0
- package/components/virtual-list/virtual-list-rtl.css +0 -0
- package/components/virtual-list/virtual-list.css +0 -0
- package/components/virtual-list/virtual-list.d.ts +142 -0
- package/components/virtual-list/virtual-list.js +17 -0
- package/components/virtual-list/virtual-list.less +7 -0
- package/framework7-bundle-rtl.css +19821 -0
- package/framework7-bundle-rtl.min.css +19 -0
- package/framework7-bundle.css +19802 -0
- package/framework7-bundle.esm.js +93 -0
- package/framework7-bundle.js +48416 -0
- package/framework7-bundle.js.map +1 -0
- package/framework7-bundle.less +92 -0
- package/framework7-bundle.min.css +19 -0
- package/framework7-bundle.min.js +14 -0
- package/framework7-bundle.min.js.map +1 -0
- package/framework7-lite-bundle.esm.js +86 -0
- package/framework7-lite.esm.js +37 -0
- package/framework7-lite.js +31 -0
- package/framework7-rtl.css +5252 -0
- package/framework7-rtl.min.css +17 -0
- package/framework7-types.d.ts +336 -0
- package/framework7.css +5245 -0
- package/framework7.d.ts +322 -0
- package/framework7.esm.js +41 -0
- package/framework7.js +42 -0
- package/framework7.less +41 -0
- package/framework7.min.css +17 -0
- package/less/mixins.less +281 -0
- package/less/plugin.js +15 -0
- package/less/vars.less +7 -0
- package/modules/clicks/clicks.d.ts +19 -0
- package/modules/clicks/clicks.js +94 -0
- package/modules/component/$h.js +15 -0
- package/modules/component/$jsx.js +17 -0
- package/modules/component/component-class.js +517 -0
- package/modules/component/component.d.ts +111 -0
- package/modules/component/component.js +44 -0
- package/modules/component/custom-components.js +1 -0
- package/modules/component/eventslisteners.js +74 -0
- package/modules/component/parse-component.js +79 -0
- package/modules/component/patch.js +8 -0
- package/modules/component/snabbdom/h.d.ts +10 -0
- package/modules/component/snabbdom/h.js +50 -0
- package/modules/component/snabbdom/helpers/attachto.d.ts +9 -0
- package/modules/component/snabbdom/helpers/attachto.js +49 -0
- package/modules/component/snabbdom/hooks.d.ts +23 -0
- package/modules/component/snabbdom/hooks.js +0 -0
- package/modules/component/snabbdom/htmldomapi.d.ts +19 -0
- package/modules/component/snabbdom/htmldomapi.js +67 -0
- package/modules/component/snabbdom/is.d.ts +2 -0
- package/modules/component/snabbdom/is.js +4 -0
- package/modules/component/snabbdom/modules/attributes.d.ts +4 -0
- package/modules/component/snabbdom/modules/attributes.js +51 -0
- package/modules/component/snabbdom/modules/class.d.ts +4 -0
- package/modules/component/snabbdom/modules/class.js +27 -0
- package/modules/component/snabbdom/modules/dataset.d.ts +4 -0
- package/modules/component/snabbdom/modules/dataset.js +37 -0
- package/modules/component/snabbdom/modules/eventlisteners.d.ts +8 -0
- package/modules/component/snabbdom/modules/eventlisteners.js +93 -0
- package/modules/component/snabbdom/modules/hero.d.ts +6 -0
- package/modules/component/snabbdom/modules/hero.js +147 -0
- package/modules/component/snabbdom/modules/module.d.ts +9 -0
- package/modules/component/snabbdom/modules/module.js +0 -0
- package/modules/component/snabbdom/modules/props.d.ts +4 -0
- package/modules/component/snabbdom/modules/props.js +29 -0
- package/modules/component/snabbdom/modules/style.d.ts +7 -0
- package/modules/component/snabbdom/modules/style.js +93 -0
- package/modules/component/snabbdom/snabbdom.bundle.d.ts +5 -0
- package/modules/component/snabbdom/snabbdom.bundle.js +13 -0
- package/modules/component/snabbdom/snabbdom.d.ts +6 -0
- package/modules/component/snabbdom/snabbdom.js +282 -0
- package/modules/component/snabbdom/thunk.d.ts +14 -0
- package/modules/component/snabbdom/thunk.js +50 -0
- package/modules/component/snabbdom/tovnode.d.ts +4 -0
- package/modules/component/snabbdom/tovnode.js +40 -0
- package/modules/component/snabbdom/vnode.d.ts +36 -0
- package/modules/component/snabbdom/vnode.js +12 -0
- package/modules/component/vdom.js +319 -0
- package/modules/demo-module.js +44 -0
- package/modules/device/device.d.ts +14 -0
- package/modules/device/device.js +44 -0
- package/modules/history/history.js +12 -0
- package/modules/resize/resize.d.ts +25 -0
- package/modules/resize/resize.js +62 -0
- package/modules/router/app-router-check.js +5 -0
- package/modules/router/async-component.js +27 -0
- package/modules/router/back.js +723 -0
- package/modules/router/clear-previous-history.js +31 -0
- package/modules/router/component-loader.js +200 -0
- package/modules/router/modal.js +223 -0
- package/modules/router/navigate.js +814 -0
- package/modules/router/process-route-queue.js +66 -0
- package/modules/router/redirect.js +38 -0
- package/modules/router/router-class.js +1268 -0
- package/modules/router/router.d.ts +354 -0
- package/modules/router/router.js +26 -0
- package/modules/router/swipe-back.js +589 -0
- package/modules/router/tab.js +230 -0
- package/modules/service-worker/service-worker.d.ts +38 -0
- package/modules/service-worker/service-worker.js +86 -0
- package/modules/store/create-store.js +138 -0
- package/modules/store/store.d.ts +40 -0
- package/modules/store/store.js +11 -0
- package/modules/support/support.d.ts +15 -0
- package/modules/support/support.js +7 -0
- package/modules/touch/touch.d.ts +60 -0
- package/modules/touch/touch.js +482 -0
- package/modules/utils/utils.d.ts +15 -0
- package/modules/utils/utils.js +10 -0
- package/package.json +458 -0
- package/shared/$jsx.js +21 -0
- package/shared/class.js +146 -0
- package/shared/constructor-methods.js +52 -0
- package/shared/dom7.js +7 -0
- package/shared/events-class.js +95 -0
- package/shared/get-device.d.ts +52 -0
- package/shared/get-device.js +147 -0
- package/shared/get-support.d.ts +12 -0
- package/shared/get-support.js +35 -0
- package/shared/history.js +171 -0
- package/shared/material-color-utils.js +1377 -0
- package/shared/material-colors.js +75 -0
- package/shared/modal-methods.js +80 -0
- package/shared/utils.d.ts +88 -0
- package/shared/utils.js +535 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import $ from '../../shared/dom7.js';
|
|
2
|
+
import { bindMethods, iosPreloaderContent, mdPreloaderContent } from '../../shared/utils.js';
|
|
3
|
+
const Treeview = {
|
|
4
|
+
open(itemEl) {
|
|
5
|
+
const app = this;
|
|
6
|
+
const $itemEl = $(itemEl).eq(0);
|
|
7
|
+
if (!$itemEl.length) return;
|
|
8
|
+
$itemEl.addClass('treeview-item-opened');
|
|
9
|
+
$itemEl.trigger('treeview:open');
|
|
10
|
+
app.emit('treeviewOpen', $itemEl[0]);
|
|
11
|
+
function done(cancel) {
|
|
12
|
+
if (cancel) {
|
|
13
|
+
$itemEl.removeClass('treeview-item-opened');
|
|
14
|
+
$itemEl.trigger('treeview:close');
|
|
15
|
+
app.emit('treeviewClose', $itemEl[0]);
|
|
16
|
+
} else {
|
|
17
|
+
$itemEl[0].f7TreeviewChildrenLoaded = true;
|
|
18
|
+
}
|
|
19
|
+
$itemEl.find('.treeview-toggle').removeClass('treeview-toggle-hidden');
|
|
20
|
+
$itemEl.find('.treeview-preloader').remove();
|
|
21
|
+
}
|
|
22
|
+
if ($itemEl.hasClass('treeview-load-children') && !$itemEl[0].f7TreeviewChildrenLoaded) {
|
|
23
|
+
const preloaders = {
|
|
24
|
+
iosPreloaderContent,
|
|
25
|
+
mdPreloaderContent
|
|
26
|
+
};
|
|
27
|
+
$itemEl.trigger('treeview:loadchildren', done);
|
|
28
|
+
app.emit('treeviewLoadChildren', $itemEl[0], done);
|
|
29
|
+
$itemEl.find('.treeview-toggle').addClass('treeview-toggle-hidden');
|
|
30
|
+
$itemEl.find('.treeview-item-root').prepend(`<div class="preloader treeview-preloader">${preloaders[`${app.theme}PreloaderContent`]}</div>`);
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
close(itemEl) {
|
|
34
|
+
const app = this;
|
|
35
|
+
const $itemEl = $(itemEl).eq(0);
|
|
36
|
+
if (!$itemEl.length) return;
|
|
37
|
+
$itemEl.removeClass('treeview-item-opened');
|
|
38
|
+
$itemEl.trigger('treeview:close');
|
|
39
|
+
app.emit('treeviewClose', $itemEl[0]);
|
|
40
|
+
},
|
|
41
|
+
toggle(itemEl) {
|
|
42
|
+
const app = this;
|
|
43
|
+
const $itemEl = $(itemEl).eq(0);
|
|
44
|
+
if (!$itemEl.length) return;
|
|
45
|
+
const wasOpened = $itemEl.hasClass('treeview-item-opened');
|
|
46
|
+
app.treeview[wasOpened ? 'close' : 'open']($itemEl);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
export default {
|
|
50
|
+
name: 'treeview',
|
|
51
|
+
create() {
|
|
52
|
+
const app = this;
|
|
53
|
+
bindMethods(app, {
|
|
54
|
+
treeview: Treeview
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
clicks: {
|
|
58
|
+
'.treeview-toggle': function toggle($clickedEl, clickedData, e) {
|
|
59
|
+
const app = this;
|
|
60
|
+
if ($clickedEl.parents('.treeview-item-toggle').length) return;
|
|
61
|
+
const $treeviewItemEl = $clickedEl.parents('.treeview-item').eq(0);
|
|
62
|
+
if (!$treeviewItemEl.length) return;
|
|
63
|
+
e.preventF7Router = true;
|
|
64
|
+
app.treeview.toggle($treeviewItemEl[0]);
|
|
65
|
+
},
|
|
66
|
+
'.treeview-item-toggle': function toggle($clickedEl, clickedData, e) {
|
|
67
|
+
const app = this;
|
|
68
|
+
const $treeviewItemEl = $clickedEl.closest('.treeview-item').eq(0);
|
|
69
|
+
if (!$treeviewItemEl.length) return;
|
|
70
|
+
e.preventF7Router = true;
|
|
71
|
+
app.treeview.toggle($treeviewItemEl[0]);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/* === Treeview === */
|
|
2
|
+
@import './treeview-vars.less';
|
|
3
|
+
|
|
4
|
+
.treeview-item-root {
|
|
5
|
+
.ltr({
|
|
6
|
+
padding-left: var(--f7-treeview-item-padding-left);
|
|
7
|
+
padding-right: var(--f7-treeview-item-padding-right);
|
|
8
|
+
});
|
|
9
|
+
.rtl({
|
|
10
|
+
padding-right: var(--f7-treeview-item-padding-left);
|
|
11
|
+
padding-left: var(--f7-treeview-item-padding-right);
|
|
12
|
+
});
|
|
13
|
+
min-height: var(--f7-treeview-item-height);
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: flex-start;
|
|
17
|
+
}
|
|
18
|
+
.treeview-item-content {
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: flex-start;
|
|
21
|
+
align-items: center;
|
|
22
|
+
> i,
|
|
23
|
+
> .f7-icons,
|
|
24
|
+
> .material-icons {
|
|
25
|
+
font-size: var(--f7-treeview-icon-size);
|
|
26
|
+
color: var(--f7-treeview-icon-color);
|
|
27
|
+
}
|
|
28
|
+
&:first-child {
|
|
29
|
+
.ltr({
|
|
30
|
+
margin-left: calc(var(--f7-treeview-toggle-size) + 5px);
|
|
31
|
+
});
|
|
32
|
+
.rtl({
|
|
33
|
+
margin-right: calc(var(--f7-treeview-toggle-size) + 5px);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
> * + * {
|
|
37
|
+
.ltr({
|
|
38
|
+
margin-left: 5px;
|
|
39
|
+
});
|
|
40
|
+
.rtl({
|
|
41
|
+
margin-right: 5px;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
.treeview-item-label {
|
|
46
|
+
font-size: var(--f7-treeview-label-font-size);
|
|
47
|
+
font-weight: var(--f7-treeview-label-font-weight);
|
|
48
|
+
color: var(--f7-treeview-label-text-color);
|
|
49
|
+
}
|
|
50
|
+
.treeview-toggle {
|
|
51
|
+
width: var(--f7-treeview-toggle-size);
|
|
52
|
+
height: var(--f7-treeview-toggle-size);
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
border-radius: 4px;
|
|
55
|
+
background-color: rgba(0, 0, 0, 0);
|
|
56
|
+
transition-duration: 200ms;
|
|
57
|
+
position: relative;
|
|
58
|
+
.ltr({
|
|
59
|
+
margin-right: 5px;;
|
|
60
|
+
});
|
|
61
|
+
.rtl({
|
|
62
|
+
margin-left: 5px;
|
|
63
|
+
});
|
|
64
|
+
&.active-state {
|
|
65
|
+
background-color: var(--f7-treeview-toggle-pressed-bg-color);
|
|
66
|
+
}
|
|
67
|
+
&:after {
|
|
68
|
+
transition-duration: 200ms;
|
|
69
|
+
content: '';
|
|
70
|
+
position: absolute;
|
|
71
|
+
left: 50%;
|
|
72
|
+
top: 50%;
|
|
73
|
+
width: 0;
|
|
74
|
+
height: 0;
|
|
75
|
+
border-top: 5px solid transparent;
|
|
76
|
+
border-bottom: 5px solid transparent;
|
|
77
|
+
transform: translate(-50%, -50%);
|
|
78
|
+
.ltr({
|
|
79
|
+
border-left: 6px solid var(--f7-treeview-toggle-color);
|
|
80
|
+
});
|
|
81
|
+
.rtl({
|
|
82
|
+
border-right: 6px solid var(--f7-treeview-toggle-color);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
.treeview-toggle-hidden {
|
|
87
|
+
opacity: 0;
|
|
88
|
+
pointer-events: none;
|
|
89
|
+
visibility: hidden;
|
|
90
|
+
}
|
|
91
|
+
.treeview-preloader {
|
|
92
|
+
--f7-preloader-size: var(--f7-treeview-toggle-size);
|
|
93
|
+
.ltr({
|
|
94
|
+
margin-right: calc(-1 * var(--f7-treeview-toggle-size));
|
|
95
|
+
});
|
|
96
|
+
.rtl({
|
|
97
|
+
margin-left: calc(-1 * var(--f7-treeview-toggle-size));
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
.treeview-item-children {
|
|
101
|
+
display: none;
|
|
102
|
+
}
|
|
103
|
+
.treeview-item-opened {
|
|
104
|
+
> .treeview-item-children {
|
|
105
|
+
display: block;
|
|
106
|
+
}
|
|
107
|
+
> .treeview-item-root .treeview-toggle:after {
|
|
108
|
+
.ltr({
|
|
109
|
+
transform: translate(-50%, -50%) rotate(90deg);
|
|
110
|
+
});
|
|
111
|
+
.rtl({
|
|
112
|
+
transform: translate(-50%, -50%) rotate(-90deg);
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
a.treeview-item-root {
|
|
117
|
+
color: var(--f7-treeview-label-text-color);
|
|
118
|
+
}
|
|
119
|
+
.treeview-item-selectable > .treeview-item-root,
|
|
120
|
+
.treeview-item-selectable.treeview-item-root {
|
|
121
|
+
cursor: pointer;
|
|
122
|
+
transition-duration: 150ms;
|
|
123
|
+
}
|
|
124
|
+
a.treeview-item-root {
|
|
125
|
+
transition-duration: 150ms;
|
|
126
|
+
&.active-state {
|
|
127
|
+
background: var(--f7-treeview-link-pressed-bg-color);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
.treeview-item-toggle > .treeview-item-root,
|
|
131
|
+
.treeview-item-toggle.treeview-item-root {
|
|
132
|
+
cursor: pointer;
|
|
133
|
+
}
|
|
134
|
+
.treeview-item-selected > .treeview-item-root,
|
|
135
|
+
.treeview-item-selected.treeview-item-root {
|
|
136
|
+
background: var(--f7-treeview-selectable-selected-bg-color, rgba(var(--f7-theme-color-rgb), 0.2));
|
|
137
|
+
}
|
|
138
|
+
.generate-treeview-children(@n, @i: 1) when (@i <= @n) {
|
|
139
|
+
.treeview-item {
|
|
140
|
+
.treeview-item-root {
|
|
141
|
+
.ltr({
|
|
142
|
+
padding-left: calc(var(--f7-treeview-item-padding-left) + var(--f7-treeview-children-offset) * @i);
|
|
143
|
+
});
|
|
144
|
+
.rtl({
|
|
145
|
+
padding-right: calc(var(--f7-treeview-item-padding-left) + var(--f7-treeview-children-offset) * @i);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
.generate-treeview-children(@n, (@i + 1));
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
.treeview-item {
|
|
152
|
+
.generate-treeview-children(10);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.if-ios-theme({
|
|
156
|
+
@import './treeview-ios.less';
|
|
157
|
+
});
|
|
158
|
+
.if-md-theme({
|
|
159
|
+
@import './treeview-md.less';
|
|
160
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--f7-typography-padding:16px;--f7-typography-margin:16px}.display-flex{display:flex!important}.display-block{display:block!important}.display-inline-flex{display:inline-flex!important}.display-inline-block{display:inline-block!important}.display-inline{display:inline!important}.display-none{display:none!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-shrink-2{flex-shrink:2!important}.flex-shrink-3{flex-shrink:3!important}.flex-shrink-4{flex-shrink:4!important}.flex-shrink-5{flex-shrink:5!important}.flex-shrink-6{flex-shrink:6!important}.flex-shrink-7{flex-shrink:7!important}.flex-shrink-8{flex-shrink:8!important}.flex-shrink-9{flex-shrink:9!important}.flex-shrink-10{flex-shrink:10!important}.flex-direction-row{flex-direction:row!important}.flex-direction-row-reverse{flex-direction:row-reverse!important}.flex-direction-column{flex-direction:column!important}.flex-direction-column-reverse{flex-direction:column-reverse!important}.justify-content-flex-start{justify-content:flex-start!important}.justify-content-center{justify-content:center!important}.justify-content-flex-end{justify-content:flex-end!important}.justify-content-space-between{justify-content:space-between!important}.justify-content-space-around{justify-content:space-around!important}.justify-content-space-evenly{justify-content:space-evenly!important}.justify-content-stretch{justify-content:stretch!important}.justify-content-start{justify-content:start!important}.justify-content-end{justify-content:end!important}.justify-content-left{justify-content:left!important}.justify-content-right{justify-content:right!important}.align-content-flex-start{align-content:flex-start!important}.align-content-flex-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-space-between{align-content:space-between!important}.align-content-space-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-items-baseline{align-items:baseline!important}.align-items-flex-start{align-items:flex-start!important}.align-items-flex-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-stretch{align-items:stretch!important}.align-self-flex-start{align-self:flex-start!important}.align-self-flex-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-stretch{align-self:stretch!important}.text-align-left{text-align:left!important}.text-align-center{text-align:center!important}.text-align-right{text-align:right!important}.text-align-justify{text-align:justify!important}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}.vertical-align-bottom{vertical-align:bottom!important}.vertical-align-middle{vertical-align:middle!important}.vertical-align-top{vertical-align:top!important}.no-padding{padding:0!important}.no-padding-left{padding-left:0!important}.no-padding-right{padding-right:0!important}.no-padding-horizontal{padding-left:0!important;padding-right:0!important}.no-padding-top{padding-top:0!important}.no-padding-bottom{padding-bottom:0!important}.no-padding-vertical{padding-top:0!important;padding-bottom:0!important}.no-margin{margin:0!important}.no-margin-left{margin-left:0!important}.no-margin-right{margin-right:0!important}.no-margin-horizontal{margin-left:0!important;margin-right:0!important}.no-margin-top{margin-top:0!important}.no-margin-bottom{margin-bottom:0!important}.no-margin-vertical{margin-top:0!important;margin-bottom:0!important}.width-auto{width:auto!important}.width-100{width:100%!important}.padding{padding:var(--f7-typography-padding)!important}.padding-half{padding:calc(var(--f7-typography-padding)/ 2)!important}.padding-top{padding-top:var(--f7-typography-padding)!important}.padding-top-half{padding-top:calc(var(--f7-typography-padding)/ 2)!important}.padding-bottom{padding-bottom:var(--f7-typography-padding)!important}.padding-bottom-half{padding-bottom:calc(var(--f7-typography-padding)/ 2)!important}.padding-left{padding-left:var(--f7-typography-padding)!important}.padding-left-half{padding-left:calc(var(--f7-typography-padding)/ 2)!important}.padding-right{padding-right:var(--f7-typography-padding)!important}.padding-right-half{padding-right:calc(var(--f7-typography-padding)/ 2)!important}.padding-vertical{padding-top:var(--f7-typography-padding)!important;padding-bottom:var(--f7-typography-padding)!important}.padding-vertical-half{padding-top:calc(var(--f7-typography-padding)/ 2)!important;padding-bottom:calc(var(--f7-typography-padding)/ 2)!important}.padding-horizontal{padding-left:var(--f7-typography-padding)!important;padding-right:var(--f7-typography-padding)!important}.padding-horizontal-half{padding-left:calc(var(--f7-typography-padding)/ 2)!important;padding-right:calc(var(--f7-typography-padding)/ 2)!important}.margin{margin:var(--f7-typography-margin)!important}.margin-half{margin:calc(var(--f7-typography-margin)/ 2)!important}.margin-top{margin-top:var(--f7-typography-margin)!important}.margin-top-half{margin-top:calc(var(--f7-typography-margin)/ 2)!important}.margin-bottom{margin-bottom:var(--f7-typography-margin)!important}.margin-bottom-half{margin-bottom:calc(var(--f7-typography-margin)/ 2)!important}.margin-left{margin-left:var(--f7-typography-margin)!important}.margin-left-half{margin-left:calc(var(--f7-typography-margin)/ 2)!important}.margin-right{margin-right:var(--f7-typography-margin)!important}.margin-right-half{margin-right:calc(var(--f7-typography-margin)/ 2)!important}.margin-vertical{margin-top:var(--f7-typography-margin)!important;margin-bottom:var(--f7-typography-margin)!important}.margin-vertical-half{margin-top:calc(var(--f7-typography-margin)/ 2)!important;margin-bottom:calc(var(--f7-typography-margin)/ 2)!important}.margin-horizontal{margin-left:var(--f7-typography-margin)!important;margin-right:var(--f7-typography-margin)!important}.margin-horizontal-half{margin-left:calc(var(--f7-typography-margin)/ 2)!important;margin-right:calc(var(--f7-typography-margin)/ 2)!important}[class*=text-color-]{color:var(--f7-theme-color-text-color)!important}[class*=bg-color-]{background-color:var(--f7-theme-color-bg-color)!important}[class*=border-color-]{border-color:var(--f7-theme-color-border-color)!important}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--f7-typography-padding:16px;--f7-typography-margin:16px}.display-flex{display:flex!important}.display-block{display:block!important}.display-inline-flex{display:inline-flex!important}.display-inline-block{display:inline-block!important}.display-inline{display:inline!important}.display-none{display:none!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-shrink-2{flex-shrink:2!important}.flex-shrink-3{flex-shrink:3!important}.flex-shrink-4{flex-shrink:4!important}.flex-shrink-5{flex-shrink:5!important}.flex-shrink-6{flex-shrink:6!important}.flex-shrink-7{flex-shrink:7!important}.flex-shrink-8{flex-shrink:8!important}.flex-shrink-9{flex-shrink:9!important}.flex-shrink-10{flex-shrink:10!important}.flex-direction-row{flex-direction:row!important}.flex-direction-row-reverse{flex-direction:row-reverse!important}.flex-direction-column{flex-direction:column!important}.flex-direction-column-reverse{flex-direction:column-reverse!important}.justify-content-flex-start{justify-content:flex-start!important}.justify-content-center{justify-content:center!important}.justify-content-flex-end{justify-content:flex-end!important}.justify-content-space-between{justify-content:space-between!important}.justify-content-space-around{justify-content:space-around!important}.justify-content-space-evenly{justify-content:space-evenly!important}.justify-content-stretch{justify-content:stretch!important}.justify-content-start{justify-content:start!important}.justify-content-end{justify-content:end!important}.justify-content-left{justify-content:left!important}.justify-content-right{justify-content:right!important}.align-content-flex-start{align-content:flex-start!important}.align-content-flex-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-space-between{align-content:space-between!important}.align-content-space-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-items-baseline{align-items:baseline!important}.align-items-flex-start{align-items:flex-start!important}.align-items-flex-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-stretch{align-items:stretch!important}.align-self-flex-start{align-self:flex-start!important}.align-self-flex-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-stretch{align-self:stretch!important}.text-align-left{text-align:left!important}.text-align-center{text-align:center!important}.text-align-right{text-align:right!important}.text-align-justify{text-align:justify!important}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}.vertical-align-bottom{vertical-align:bottom!important}.vertical-align-middle{vertical-align:middle!important}.vertical-align-top{vertical-align:top!important}.no-padding{padding:0!important}.no-padding-left{padding-left:0!important}.no-padding-right{padding-right:0!important}.no-padding-horizontal{padding-left:0!important;padding-right:0!important}.no-padding-top{padding-top:0!important}.no-padding-bottom{padding-bottom:0!important}.no-padding-vertical{padding-top:0!important;padding-bottom:0!important}.no-margin{margin:0!important}.no-margin-left{margin-left:0!important}.no-margin-right{margin-right:0!important}.no-margin-horizontal{margin-left:0!important;margin-right:0!important}.no-margin-top{margin-top:0!important}.no-margin-bottom{margin-bottom:0!important}.no-margin-vertical{margin-top:0!important;margin-bottom:0!important}.width-auto{width:auto!important}.width-100{width:100%!important}.padding{padding:var(--f7-typography-padding)!important}.padding-half{padding:calc(var(--f7-typography-padding)/ 2)!important}.padding-top{padding-top:var(--f7-typography-padding)!important}.padding-top-half{padding-top:calc(var(--f7-typography-padding)/ 2)!important}.padding-bottom{padding-bottom:var(--f7-typography-padding)!important}.padding-bottom-half{padding-bottom:calc(var(--f7-typography-padding)/ 2)!important}.padding-left{padding-left:var(--f7-typography-padding)!important}.padding-left-half{padding-left:calc(var(--f7-typography-padding)/ 2)!important}.padding-right{padding-right:var(--f7-typography-padding)!important}.padding-right-half{padding-right:calc(var(--f7-typography-padding)/ 2)!important}.padding-vertical{padding-top:var(--f7-typography-padding)!important;padding-bottom:var(--f7-typography-padding)!important}.padding-vertical-half{padding-top:calc(var(--f7-typography-padding)/ 2)!important;padding-bottom:calc(var(--f7-typography-padding)/ 2)!important}.padding-horizontal{padding-left:var(--f7-typography-padding)!important;padding-right:var(--f7-typography-padding)!important}.padding-horizontal-half{padding-left:calc(var(--f7-typography-padding)/ 2)!important;padding-right:calc(var(--f7-typography-padding)/ 2)!important}.margin{margin:var(--f7-typography-margin)!important}.margin-half{margin:calc(var(--f7-typography-margin)/ 2)!important}.margin-top{margin-top:var(--f7-typography-margin)!important}.margin-top-half{margin-top:calc(var(--f7-typography-margin)/ 2)!important}.margin-bottom{margin-bottom:var(--f7-typography-margin)!important}.margin-bottom-half{margin-bottom:calc(var(--f7-typography-margin)/ 2)!important}.margin-left{margin-left:var(--f7-typography-margin)!important}.margin-left-half{margin-left:calc(var(--f7-typography-margin)/ 2)!important}.margin-right{margin-right:var(--f7-typography-margin)!important}.margin-right-half{margin-right:calc(var(--f7-typography-margin)/ 2)!important}.margin-vertical{margin-top:var(--f7-typography-margin)!important;margin-bottom:var(--f7-typography-margin)!important}.margin-vertical-half{margin-top:calc(var(--f7-typography-margin)/ 2)!important;margin-bottom:calc(var(--f7-typography-margin)/ 2)!important}.margin-horizontal{margin-left:var(--f7-typography-margin)!important;margin-right:var(--f7-typography-margin)!important}.margin-horizontal-half{margin-left:calc(var(--f7-typography-margin)/ 2)!important;margin-right:calc(var(--f7-typography-margin)/ 2)!important}[class*=text-color-]{color:var(--f7-theme-color-text-color)!important}[class*=bg-color-]{background-color:var(--f7-theme-color-bg-color)!important}[class*=border-color-]{border-color:var(--f7-theme-color-border-color)!important}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Framework7, {
|
|
2
|
+
CSSSelector,
|
|
3
|
+
Framework7EventsClass,
|
|
4
|
+
Framework7Plugin,
|
|
5
|
+
} from '../app/app-class.js';
|
|
6
|
+
|
|
7
|
+
export namespace Typography {
|
|
8
|
+
interface AppMethods {}
|
|
9
|
+
interface AppParams {}
|
|
10
|
+
interface AppEvents {}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare const TypographyComponent: Framework7Plugin;
|
|
14
|
+
export default TypographyComponent;
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
/* === Typography === */
|
|
2
|
+
@import './typography-vars.less';
|
|
3
|
+
|
|
4
|
+
.rules-loop(@values, @ruleName) {
|
|
5
|
+
each(@values, {
|
|
6
|
+
.@{ruleName}-@{value} {
|
|
7
|
+
@{ruleName}: @value !important;
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Display
|
|
13
|
+
@display: flex, block, inline-flex, inline-block, inline, none;
|
|
14
|
+
.rules-loop(@display, display);
|
|
15
|
+
|
|
16
|
+
// Flex Shrink
|
|
17
|
+
@shrinks: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;
|
|
18
|
+
.rules-loop(@shrinks, flex-shrink);
|
|
19
|
+
|
|
20
|
+
// Flex Direction
|
|
21
|
+
@directions: row, row-reverse, column, column-reverse;
|
|
22
|
+
.rules-loop(@directions, flex-direction);
|
|
23
|
+
|
|
24
|
+
// Justify Content
|
|
25
|
+
@justify: flex-start, center, flex-end, space-between, space-around, space-evenly, stretch, start,
|
|
26
|
+
end, left, right;
|
|
27
|
+
.rules-loop(@justify, justify-content);
|
|
28
|
+
|
|
29
|
+
// Align Content
|
|
30
|
+
@alignContent: flex-start, flex-end, center, space-between, space-around, stretch;
|
|
31
|
+
.rules-loop(@alignContent, align-content);
|
|
32
|
+
|
|
33
|
+
// Align Items
|
|
34
|
+
@alignItems: baseline, flex-start, flex-end, center, stretch;
|
|
35
|
+
.rules-loop(@alignItems, align-items);
|
|
36
|
+
|
|
37
|
+
// Align Self
|
|
38
|
+
@alignSelf: flex-start, flex-end, center, stretch;
|
|
39
|
+
.rules-loop(@alignSelf, align-self);
|
|
40
|
+
|
|
41
|
+
// Text Align
|
|
42
|
+
@textAlign: left, center, right, justify;
|
|
43
|
+
.rules-loop(@textAlign, text-align);
|
|
44
|
+
|
|
45
|
+
// Float
|
|
46
|
+
@float: left, right, none;
|
|
47
|
+
.rules-loop(@float, float);
|
|
48
|
+
|
|
49
|
+
// Vertical Align
|
|
50
|
+
@verticalAlign: bottom, middle, top;
|
|
51
|
+
.rules-loop(@verticalAlign, vertical-align);
|
|
52
|
+
|
|
53
|
+
// Padding
|
|
54
|
+
.no-padding {
|
|
55
|
+
padding: 0 !important;
|
|
56
|
+
}
|
|
57
|
+
.no-padding-left {
|
|
58
|
+
padding-left: 0 !important;
|
|
59
|
+
}
|
|
60
|
+
.no-padding-right {
|
|
61
|
+
padding-right: 0 !important;
|
|
62
|
+
}
|
|
63
|
+
.no-padding-horizontal {
|
|
64
|
+
padding-left: 0 !important;
|
|
65
|
+
padding-right: 0 !important;
|
|
66
|
+
}
|
|
67
|
+
.no-padding-top {
|
|
68
|
+
padding-top: 0 !important;
|
|
69
|
+
}
|
|
70
|
+
.no-padding-bottom {
|
|
71
|
+
padding-bottom: 0 !important;
|
|
72
|
+
}
|
|
73
|
+
.no-padding-vertical {
|
|
74
|
+
padding-top: 0 !important;
|
|
75
|
+
padding-bottom: 0 !important;
|
|
76
|
+
}
|
|
77
|
+
// Margin
|
|
78
|
+
.no-margin {
|
|
79
|
+
margin: 0 !important;
|
|
80
|
+
}
|
|
81
|
+
.no-margin-left {
|
|
82
|
+
margin-left: 0 !important;
|
|
83
|
+
}
|
|
84
|
+
.no-margin-right {
|
|
85
|
+
margin-right: 0 !important;
|
|
86
|
+
}
|
|
87
|
+
.no-margin-horizontal {
|
|
88
|
+
margin-left: 0 !important;
|
|
89
|
+
margin-right: 0 !important;
|
|
90
|
+
}
|
|
91
|
+
.no-margin-top {
|
|
92
|
+
margin-top: 0 !important;
|
|
93
|
+
}
|
|
94
|
+
.no-margin-bottom {
|
|
95
|
+
margin-bottom: 0 !important;
|
|
96
|
+
}
|
|
97
|
+
.no-margin-vertical {
|
|
98
|
+
margin-top: 0 !important;
|
|
99
|
+
margin-bottom: 0 !important;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Width
|
|
103
|
+
.width-auto {
|
|
104
|
+
width: auto !important;
|
|
105
|
+
}
|
|
106
|
+
.width-100 {
|
|
107
|
+
width: 100% !important;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Padding
|
|
111
|
+
.padding {
|
|
112
|
+
padding: var(--f7-typography-padding) !important;
|
|
113
|
+
}
|
|
114
|
+
.padding-half {
|
|
115
|
+
padding: calc(var(--f7-typography-padding) / 2) !important;
|
|
116
|
+
}
|
|
117
|
+
.padding-top {
|
|
118
|
+
padding-top: var(--f7-typography-padding) !important;
|
|
119
|
+
}
|
|
120
|
+
.padding-top-half {
|
|
121
|
+
padding-top: calc(var(--f7-typography-padding) / 2) !important;
|
|
122
|
+
}
|
|
123
|
+
.padding-bottom {
|
|
124
|
+
padding-bottom: var(--f7-typography-padding) !important;
|
|
125
|
+
}
|
|
126
|
+
.padding-bottom-half {
|
|
127
|
+
padding-bottom: calc(var(--f7-typography-padding) / 2) !important;
|
|
128
|
+
}
|
|
129
|
+
.padding-left {
|
|
130
|
+
padding-left: var(--f7-typography-padding) !important;
|
|
131
|
+
}
|
|
132
|
+
.padding-left-half {
|
|
133
|
+
padding-left: calc(var(--f7-typography-padding) / 2) !important;
|
|
134
|
+
}
|
|
135
|
+
.padding-right {
|
|
136
|
+
padding-right: var(--f7-typography-padding) !important;
|
|
137
|
+
}
|
|
138
|
+
.padding-right-half {
|
|
139
|
+
padding-right: calc(var(--f7-typography-padding) / 2) !important;
|
|
140
|
+
}
|
|
141
|
+
.padding-vertical {
|
|
142
|
+
padding-top: var(--f7-typography-padding) !important;
|
|
143
|
+
padding-bottom: var(--f7-typography-padding) !important;
|
|
144
|
+
}
|
|
145
|
+
.padding-vertical-half {
|
|
146
|
+
padding-top: calc(var(--f7-typography-padding) / 2) !important;
|
|
147
|
+
padding-bottom: calc(var(--f7-typography-padding) / 2) !important;
|
|
148
|
+
}
|
|
149
|
+
.padding-horizontal {
|
|
150
|
+
padding-left: var(--f7-typography-padding) !important;
|
|
151
|
+
padding-right: var(--f7-typography-padding) !important;
|
|
152
|
+
}
|
|
153
|
+
.padding-horizontal-half {
|
|
154
|
+
padding-left: calc(var(--f7-typography-padding) / 2) !important;
|
|
155
|
+
padding-right: calc(var(--f7-typography-padding) / 2) !important;
|
|
156
|
+
}
|
|
157
|
+
// Margin
|
|
158
|
+
.margin {
|
|
159
|
+
margin: var(--f7-typography-margin) !important;
|
|
160
|
+
}
|
|
161
|
+
.margin-half {
|
|
162
|
+
margin: calc(var(--f7-typography-margin) / 2) !important;
|
|
163
|
+
}
|
|
164
|
+
.margin-top {
|
|
165
|
+
margin-top: var(--f7-typography-margin) !important;
|
|
166
|
+
}
|
|
167
|
+
.margin-top-half {
|
|
168
|
+
margin-top: calc(var(--f7-typography-margin) / 2) !important;
|
|
169
|
+
}
|
|
170
|
+
.margin-bottom {
|
|
171
|
+
margin-bottom: var(--f7-typography-margin) !important;
|
|
172
|
+
}
|
|
173
|
+
.margin-bottom-half {
|
|
174
|
+
margin-bottom: calc(var(--f7-typography-margin) / 2) !important;
|
|
175
|
+
}
|
|
176
|
+
.margin-left {
|
|
177
|
+
margin-left: var(--f7-typography-margin) !important;
|
|
178
|
+
}
|
|
179
|
+
.margin-left-half {
|
|
180
|
+
margin-left: calc(var(--f7-typography-margin) / 2) !important;
|
|
181
|
+
}
|
|
182
|
+
.margin-right {
|
|
183
|
+
margin-right: var(--f7-typography-margin) !important;
|
|
184
|
+
}
|
|
185
|
+
.margin-right-half {
|
|
186
|
+
margin-right: calc(var(--f7-typography-margin) / 2) !important;
|
|
187
|
+
}
|
|
188
|
+
.margin-vertical {
|
|
189
|
+
margin-top: var(--f7-typography-margin) !important;
|
|
190
|
+
margin-bottom: var(--f7-typography-margin) !important;
|
|
191
|
+
}
|
|
192
|
+
.margin-vertical-half {
|
|
193
|
+
margin-top: calc(var(--f7-typography-margin) / 2) !important;
|
|
194
|
+
margin-bottom: calc(var(--f7-typography-margin) / 2) !important;
|
|
195
|
+
}
|
|
196
|
+
.margin-horizontal {
|
|
197
|
+
margin-left: var(--f7-typography-margin) !important;
|
|
198
|
+
margin-right: var(--f7-typography-margin) !important;
|
|
199
|
+
}
|
|
200
|
+
.margin-horizontal-half {
|
|
201
|
+
margin-left: calc(var(--f7-typography-margin) / 2) !important;
|
|
202
|
+
margin-right: calc(var(--f7-typography-margin) / 2) !important;
|
|
203
|
+
}
|
|
204
|
+
// Colors
|
|
205
|
+
[class*='text-color-'] {
|
|
206
|
+
color: var(--f7-theme-color-text-color) !important;
|
|
207
|
+
}
|
|
208
|
+
[class*='bg-color-'] {
|
|
209
|
+
background-color: var(--f7-theme-color-bg-color) !important;
|
|
210
|
+
}
|
|
211
|
+
[class*='border-color-'] {
|
|
212
|
+
border-color: var(--f7-theme-color-border-color) !important;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.if-ios-theme({
|
|
216
|
+
@import './typography-ios.less';
|
|
217
|
+
});
|
|
218
|
+
.if-md-theme({
|
|
219
|
+
@import './typography-md.less';
|
|
220
|
+
});
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import $ from '../../shared/dom7.js';
|
|
2
|
+
import { extend } from '../../shared/utils.js';
|
|
3
|
+
import { getSupport } from '../../shared/get-support.js';
|
|
4
|
+
function resizableView(view) {
|
|
5
|
+
const app = view.app;
|
|
6
|
+
const support = getSupport();
|
|
7
|
+
if (view.resizableInitialized) return;
|
|
8
|
+
extend(view, {
|
|
9
|
+
resizable: true,
|
|
10
|
+
resizableWidth: null,
|
|
11
|
+
resizableInitialized: true
|
|
12
|
+
});
|
|
13
|
+
const $htmlEl = $('html');
|
|
14
|
+
const {
|
|
15
|
+
$el
|
|
16
|
+
} = view;
|
|
17
|
+
if (!$el) return;
|
|
18
|
+
let $resizeHandlerEl;
|
|
19
|
+
let isTouched;
|
|
20
|
+
let isMoved;
|
|
21
|
+
const touchesStart = {};
|
|
22
|
+
let touchesDiff;
|
|
23
|
+
let width;
|
|
24
|
+
let minWidth;
|
|
25
|
+
let maxWidth;
|
|
26
|
+
function transformCSSWidth(v) {
|
|
27
|
+
if (!v) return null;
|
|
28
|
+
if (v.indexOf('%') >= 0 || v.indexOf('vw') >= 0) {
|
|
29
|
+
return parseInt(v, 10) / 100 * app.width;
|
|
30
|
+
}
|
|
31
|
+
const newV = parseInt(v, 10);
|
|
32
|
+
if (Number.isNaN(newV)) return null;
|
|
33
|
+
return newV;
|
|
34
|
+
}
|
|
35
|
+
function isResizable() {
|
|
36
|
+
return view.resizable && $el.hasClass('view-resizable') && $el.hasClass('view-master-detail');
|
|
37
|
+
}
|
|
38
|
+
function handleTouchStart(e) {
|
|
39
|
+
if (!isResizable()) return;
|
|
40
|
+
touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
|
|
41
|
+
touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
|
|
42
|
+
isMoved = false;
|
|
43
|
+
isTouched = true;
|
|
44
|
+
const $pageMasterEl = $el.children('.page-master');
|
|
45
|
+
minWidth = transformCSSWidth($pageMasterEl.css('min-width'));
|
|
46
|
+
maxWidth = transformCSSWidth($pageMasterEl.css('max-width'));
|
|
47
|
+
}
|
|
48
|
+
function handleTouchMove(e) {
|
|
49
|
+
if (!isTouched) return;
|
|
50
|
+
e.f7PreventSwipePanel = true;
|
|
51
|
+
const pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
|
|
52
|
+
if (!isMoved) {
|
|
53
|
+
width = $resizeHandlerEl[0].offsetLeft + $resizeHandlerEl[0].offsetWidth;
|
|
54
|
+
$el.addClass('view-resizing');
|
|
55
|
+
$htmlEl.css('cursor', 'col-resize');
|
|
56
|
+
}
|
|
57
|
+
isMoved = true;
|
|
58
|
+
e.preventDefault();
|
|
59
|
+
touchesDiff = pageX - touchesStart.x;
|
|
60
|
+
let newWidth = width + touchesDiff;
|
|
61
|
+
if (minWidth && !Number.isNaN(minWidth)) {
|
|
62
|
+
newWidth = Math.max(newWidth, minWidth);
|
|
63
|
+
}
|
|
64
|
+
if (maxWidth && !Number.isNaN(maxWidth)) {
|
|
65
|
+
newWidth = Math.min(newWidth, maxWidth);
|
|
66
|
+
}
|
|
67
|
+
newWidth = Math.min(Math.max(newWidth, 0), app.width);
|
|
68
|
+
view.resizableWidth = newWidth;
|
|
69
|
+
$htmlEl[0].style.setProperty('--f7-page-master-width', `${newWidth}px`);
|
|
70
|
+
$el.trigger('view:resize', newWidth);
|
|
71
|
+
view.emit('local::resize viewResize', view, newWidth);
|
|
72
|
+
}
|
|
73
|
+
function handleTouchEnd() {
|
|
74
|
+
$('html').css('cursor', '');
|
|
75
|
+
if (!isTouched || !isMoved) {
|
|
76
|
+
isTouched = false;
|
|
77
|
+
isMoved = false;
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
isTouched = false;
|
|
81
|
+
isMoved = false;
|
|
82
|
+
$htmlEl[0].style.setProperty('--f7-page-master-width', `${view.resizableWidth}px`);
|
|
83
|
+
$el.removeClass('view-resizing');
|
|
84
|
+
}
|
|
85
|
+
function handleResize() {
|
|
86
|
+
if (!view.resizableWidth) return;
|
|
87
|
+
minWidth = transformCSSWidth($resizeHandlerEl.css('min-width'));
|
|
88
|
+
maxWidth = transformCSSWidth($resizeHandlerEl.css('max-width'));
|
|
89
|
+
if (minWidth && !Number.isNaN(minWidth) && view.resizableWidth < minWidth) {
|
|
90
|
+
view.resizableWidth = Math.max(view.resizableWidth, minWidth);
|
|
91
|
+
}
|
|
92
|
+
if (maxWidth && !Number.isNaN(maxWidth) && view.resizableWidth > maxWidth) {
|
|
93
|
+
view.resizableWidth = Math.min(view.resizableWidth, maxWidth);
|
|
94
|
+
}
|
|
95
|
+
view.resizableWidth = Math.min(Math.max(view.resizableWidth, 0), app.width);
|
|
96
|
+
$htmlEl[0].style.setProperty('--f7-page-master-width', `${view.resizableWidth}px`);
|
|
97
|
+
}
|
|
98
|
+
$resizeHandlerEl = view.$el.children('.view-resize-handler');
|
|
99
|
+
if (!$resizeHandlerEl.length) {
|
|
100
|
+
view.$el.append('<div class="view-resize-handler"></div>');
|
|
101
|
+
$resizeHandlerEl = view.$el.children('.view-resize-handler');
|
|
102
|
+
}
|
|
103
|
+
view.$resizeHandlerEl = $resizeHandlerEl;
|
|
104
|
+
$el.addClass('view-resizable');
|
|
105
|
+
|
|
106
|
+
// Add Events
|
|
107
|
+
const passive = support.passiveListener ? {
|
|
108
|
+
passive: true
|
|
109
|
+
} : false;
|
|
110
|
+
view.$el.on(app.touchEvents.start, '.view-resize-handler', handleTouchStart, passive);
|
|
111
|
+
app.on('touchmove:active', handleTouchMove);
|
|
112
|
+
app.on('touchend:passive', handleTouchEnd);
|
|
113
|
+
app.on('resize', handleResize);
|
|
114
|
+
view.on('beforeOpen', handleResize);
|
|
115
|
+
view.once('viewDestroy', () => {
|
|
116
|
+
$el.removeClass('view-resizable');
|
|
117
|
+
view.$resizeHandlerEl.remove();
|
|
118
|
+
view.$el.off(app.touchEvents.start, '.view-resize-handler', handleTouchStart, passive);
|
|
119
|
+
app.off('touchmove:active', handleTouchMove);
|
|
120
|
+
app.off('touchend:passive', handleTouchEnd);
|
|
121
|
+
app.off('resize', handleResize);
|
|
122
|
+
view.off('beforeOpen', handleResize);
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
export default resizableView;
|