@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,592 @@
|
|
|
1
|
+
import { getDocument } from 'ssr-window';
|
|
2
|
+
import $ from '../../shared/dom7.js';
|
|
3
|
+
import { extend, nextTick, deleteProps } from '../../shared/utils.js';
|
|
4
|
+
import FrameworkClass from '../../shared/class.js';
|
|
5
|
+
import { getDevice } from '../../shared/get-device.js';
|
|
6
|
+
import removeDiacritics from './remove-diacritics.js';
|
|
7
|
+
class Searchbar extends FrameworkClass {
|
|
8
|
+
constructor(app, params) {
|
|
9
|
+
if (params === void 0) {
|
|
10
|
+
params = {};
|
|
11
|
+
}
|
|
12
|
+
super(params, [app]);
|
|
13
|
+
const sb = this;
|
|
14
|
+
const defaults = {
|
|
15
|
+
el: undefined,
|
|
16
|
+
inputEl: undefined,
|
|
17
|
+
inputEvents: 'change input compositionend',
|
|
18
|
+
disableButton: true,
|
|
19
|
+
disableButtonEl: undefined,
|
|
20
|
+
backdropEl: undefined,
|
|
21
|
+
searchContainer: undefined,
|
|
22
|
+
// container to search, HTMLElement or CSS selector
|
|
23
|
+
searchItem: 'li',
|
|
24
|
+
// single item selector, CSS selector
|
|
25
|
+
searchIn: undefined,
|
|
26
|
+
// where to search in item, CSS selector
|
|
27
|
+
searchGroup: '.list-group',
|
|
28
|
+
searchGroupTitle: '.list-group-title',
|
|
29
|
+
ignore: '.searchbar-ignore',
|
|
30
|
+
foundEl: '.searchbar-found',
|
|
31
|
+
notFoundEl: '.searchbar-not-found',
|
|
32
|
+
hideOnEnableEl: '.searchbar-hide-on-enable',
|
|
33
|
+
hideOnSearchEl: '.searchbar-hide-on-search',
|
|
34
|
+
backdrop: true,
|
|
35
|
+
removeDiacritics: true,
|
|
36
|
+
customSearch: false,
|
|
37
|
+
hideGroupTitles: true,
|
|
38
|
+
hideGroups: true,
|
|
39
|
+
disableOnBackdropClick: true,
|
|
40
|
+
expandable: false,
|
|
41
|
+
inline: false
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// Extend defaults with modules params
|
|
45
|
+
sb.useModulesParams(defaults);
|
|
46
|
+
sb.params = extend(defaults, params);
|
|
47
|
+
const $el = $(sb.params.el);
|
|
48
|
+
if ($el.length === 0) return sb;
|
|
49
|
+
if ($el[0].f7Searchbar) return $el[0].f7Searchbar;
|
|
50
|
+
$el[0].f7Searchbar = sb;
|
|
51
|
+
let $pageEl;
|
|
52
|
+
const $navbarEl = $el.parents('.navbar');
|
|
53
|
+
if ($el.parents('.page').length > 0) {
|
|
54
|
+
$pageEl = $el.parents('.page');
|
|
55
|
+
} else if ($navbarEl.length > 0) {
|
|
56
|
+
$pageEl = $(app.navbar.getPageByEl($navbarEl[0]));
|
|
57
|
+
if (!$pageEl.length) {
|
|
58
|
+
const $currentPageEl = $el.parents('.view').find('.page-current');
|
|
59
|
+
if ($currentPageEl[0] && $currentPageEl[0].f7Page && $currentPageEl[0].f7Page.navbarEl === $navbarEl[0]) {
|
|
60
|
+
$pageEl = $currentPageEl;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
let $foundEl;
|
|
65
|
+
if (params.foundEl) {
|
|
66
|
+
$foundEl = $(params.foundEl);
|
|
67
|
+
} else if (typeof sb.params.foundEl === 'string' && $pageEl) {
|
|
68
|
+
$foundEl = $pageEl.find(sb.params.foundEl);
|
|
69
|
+
}
|
|
70
|
+
let $notFoundEl;
|
|
71
|
+
if (params.notFoundEl) {
|
|
72
|
+
$notFoundEl = $(params.notFoundEl);
|
|
73
|
+
} else if (typeof sb.params.notFoundEl === 'string' && $pageEl) {
|
|
74
|
+
$notFoundEl = $pageEl.find(sb.params.notFoundEl);
|
|
75
|
+
}
|
|
76
|
+
let $hideOnEnableEl;
|
|
77
|
+
if (params.hideOnEnableEl) {
|
|
78
|
+
$hideOnEnableEl = $(params.hideOnEnableEl);
|
|
79
|
+
} else if (typeof sb.params.hideOnEnableEl === 'string' && $pageEl) {
|
|
80
|
+
$hideOnEnableEl = $pageEl.find(sb.params.hideOnEnableEl);
|
|
81
|
+
}
|
|
82
|
+
let $hideOnSearchEl;
|
|
83
|
+
if (params.hideOnSearchEl) {
|
|
84
|
+
$hideOnSearchEl = $(params.hideOnSearchEl);
|
|
85
|
+
} else if (typeof sb.params.hideOnSearchEl === 'string' && $pageEl) {
|
|
86
|
+
$hideOnSearchEl = $pageEl.find(sb.params.hideOnSearchEl);
|
|
87
|
+
}
|
|
88
|
+
const expandable = sb.params.expandable || $el.hasClass('searchbar-expandable');
|
|
89
|
+
const inline = sb.params.inline || $el.hasClass('searchbar-inline');
|
|
90
|
+
if (typeof sb.params.backdrop === 'undefined') {
|
|
91
|
+
sb.params.backdrop = !inline;
|
|
92
|
+
}
|
|
93
|
+
let $backdropEl;
|
|
94
|
+
if (sb.params.backdrop) {
|
|
95
|
+
if (sb.params.backdropEl) {
|
|
96
|
+
$backdropEl = $(sb.params.backdropEl);
|
|
97
|
+
} else if ($pageEl && $pageEl.length > 0) {
|
|
98
|
+
$backdropEl = $pageEl.find('.searchbar-backdrop');
|
|
99
|
+
} else {
|
|
100
|
+
$backdropEl = $el.siblings('.searchbar-backdrop');
|
|
101
|
+
}
|
|
102
|
+
if ($backdropEl.length === 0) {
|
|
103
|
+
$backdropEl = $('<div class="searchbar-backdrop"></div>');
|
|
104
|
+
if ($pageEl && $pageEl.length) {
|
|
105
|
+
if ($el.parents($pageEl).length > 0 && $navbarEl && $el.parents($navbarEl).length === 0) {
|
|
106
|
+
$backdropEl.insertBefore($el);
|
|
107
|
+
} else {
|
|
108
|
+
$backdropEl.insertBefore($pageEl.find('.page-content').eq(0));
|
|
109
|
+
}
|
|
110
|
+
} else {
|
|
111
|
+
$backdropEl.insertBefore($el);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
let $searchContainer;
|
|
116
|
+
if (sb.params.searchContainer) {
|
|
117
|
+
$searchContainer = $(sb.params.searchContainer);
|
|
118
|
+
}
|
|
119
|
+
let $inputEl;
|
|
120
|
+
if (sb.params.inputEl) {
|
|
121
|
+
$inputEl = $(sb.params.inputEl);
|
|
122
|
+
} else {
|
|
123
|
+
$inputEl = $el.find('input[type="search"]').eq(0);
|
|
124
|
+
}
|
|
125
|
+
let $disableButtonEl;
|
|
126
|
+
if (sb.params.disableButton) {
|
|
127
|
+
if (sb.params.disableButtonEl) {
|
|
128
|
+
$disableButtonEl = $(sb.params.disableButtonEl);
|
|
129
|
+
} else {
|
|
130
|
+
$disableButtonEl = $el.find('.searchbar-disable-button');
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
extend(sb, {
|
|
134
|
+
app,
|
|
135
|
+
view: app.views.get($el.parents('.view')),
|
|
136
|
+
$el,
|
|
137
|
+
el: $el[0],
|
|
138
|
+
$backdropEl,
|
|
139
|
+
backdropEl: $backdropEl && $backdropEl[0],
|
|
140
|
+
$searchContainer,
|
|
141
|
+
searchContainer: $searchContainer && $searchContainer[0],
|
|
142
|
+
$inputEl,
|
|
143
|
+
inputEl: $inputEl[0],
|
|
144
|
+
$disableButtonEl,
|
|
145
|
+
disableButtonEl: $disableButtonEl && $disableButtonEl[0],
|
|
146
|
+
disableButtonHasMargin: false,
|
|
147
|
+
$pageEl,
|
|
148
|
+
pageEl: $pageEl && $pageEl[0],
|
|
149
|
+
$navbarEl,
|
|
150
|
+
navbarEl: $navbarEl && $navbarEl[0],
|
|
151
|
+
$foundEl,
|
|
152
|
+
foundEl: $foundEl && $foundEl[0],
|
|
153
|
+
$notFoundEl,
|
|
154
|
+
notFoundEl: $notFoundEl && $notFoundEl[0],
|
|
155
|
+
$hideOnEnableEl,
|
|
156
|
+
hideOnEnableEl: $hideOnEnableEl && $hideOnEnableEl[0],
|
|
157
|
+
$hideOnSearchEl,
|
|
158
|
+
hideOnSearchEl: $hideOnSearchEl && $hideOnSearchEl[0],
|
|
159
|
+
previousQuery: '',
|
|
160
|
+
query: '',
|
|
161
|
+
isVirtualList: $searchContainer && $searchContainer.hasClass('virtual-list'),
|
|
162
|
+
virtualList: undefined,
|
|
163
|
+
enabled: false,
|
|
164
|
+
expandable,
|
|
165
|
+
inline
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
// Events
|
|
169
|
+
function preventSubmit(e) {
|
|
170
|
+
e.preventDefault();
|
|
171
|
+
}
|
|
172
|
+
function onInputFocus(e) {
|
|
173
|
+
sb.enable(e);
|
|
174
|
+
sb.$el.addClass('searchbar-focused');
|
|
175
|
+
}
|
|
176
|
+
function onInputBlur() {
|
|
177
|
+
sb.$el.removeClass('searchbar-focused');
|
|
178
|
+
}
|
|
179
|
+
function onInputChange() {
|
|
180
|
+
const value = sb.$inputEl.val().trim();
|
|
181
|
+
if (sb.$searchContainer && sb.$searchContainer.length > 0 && (sb.params.searchIn || sb.isVirtualList || sb.params.searchIn === sb.params.searchItem) || sb.params.customSearch) {
|
|
182
|
+
sb.search(value, true);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
function onInputClear(e, previousValue) {
|
|
186
|
+
sb.$el.trigger('searchbar:clear', previousValue);
|
|
187
|
+
sb.emit('local::clear searchbarClear', sb, previousValue);
|
|
188
|
+
}
|
|
189
|
+
function disableOnClick(e) {
|
|
190
|
+
sb.disable(e);
|
|
191
|
+
}
|
|
192
|
+
function onPageBeforeOut() {
|
|
193
|
+
if (!sb || sb && !sb.$el) return;
|
|
194
|
+
if (sb.enabled) {
|
|
195
|
+
sb.$el.removeClass('searchbar-enabled');
|
|
196
|
+
if (sb.expandable) {
|
|
197
|
+
sb.$el.parents('.navbar').removeClass('with-searchbar-expandable-enabled with-searchbar-expandable-enabled-no-transition');
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
function onPageBeforeIn() {
|
|
202
|
+
if (!sb || sb && !sb.$el) return;
|
|
203
|
+
if (sb.enabled) {
|
|
204
|
+
sb.$el.addClass('searchbar-enabled');
|
|
205
|
+
if (sb.expandable) {
|
|
206
|
+
sb.$el.parents('.navbar').addClass('with-searchbar-expandable-enabled-no-transition');
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
sb.attachEvents = function attachEvents() {
|
|
211
|
+
$el.on('submit', preventSubmit);
|
|
212
|
+
if (sb.params.disableButton) {
|
|
213
|
+
sb.$disableButtonEl.on('click', disableOnClick);
|
|
214
|
+
}
|
|
215
|
+
if (sb.params.disableOnBackdropClick && sb.$backdropEl) {
|
|
216
|
+
sb.$backdropEl.on('click', disableOnClick);
|
|
217
|
+
}
|
|
218
|
+
if (sb.expandable && app.theme === 'ios' && sb.view && $navbarEl.length && sb.$pageEl) {
|
|
219
|
+
sb.$pageEl.on('page:beforeout', onPageBeforeOut);
|
|
220
|
+
sb.$pageEl.on('page:beforein', onPageBeforeIn);
|
|
221
|
+
}
|
|
222
|
+
sb.$inputEl.on('focus', onInputFocus);
|
|
223
|
+
sb.$inputEl.on('blur', onInputBlur);
|
|
224
|
+
sb.$inputEl.on(sb.params.inputEvents, onInputChange);
|
|
225
|
+
sb.$inputEl.on('input:clear', onInputClear);
|
|
226
|
+
};
|
|
227
|
+
sb.detachEvents = function detachEvents() {
|
|
228
|
+
$el.off('submit', preventSubmit);
|
|
229
|
+
if (sb.params.disableButton) {
|
|
230
|
+
sb.$disableButtonEl.off('click', disableOnClick);
|
|
231
|
+
}
|
|
232
|
+
if (sb.params.disableOnBackdropClick && sb.$backdropEl) {
|
|
233
|
+
sb.$backdropEl.off('click', disableOnClick);
|
|
234
|
+
}
|
|
235
|
+
if (sb.expandable && app.theme === 'ios' && sb.view && $navbarEl.length && sb.$pageEl) {
|
|
236
|
+
sb.$pageEl.off('page:beforeout', onPageBeforeOut);
|
|
237
|
+
sb.$pageEl.off('page:beforein', onPageBeforeIn);
|
|
238
|
+
}
|
|
239
|
+
sb.$inputEl.off('focus', onInputFocus);
|
|
240
|
+
sb.$inputEl.off('blur', onInputBlur);
|
|
241
|
+
sb.$inputEl.off(sb.params.inputEvents, onInputChange);
|
|
242
|
+
sb.$inputEl.off('input:clear', onInputClear);
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
// Install Modules
|
|
246
|
+
sb.useModules();
|
|
247
|
+
|
|
248
|
+
// Init
|
|
249
|
+
sb.init();
|
|
250
|
+
return sb;
|
|
251
|
+
}
|
|
252
|
+
clear(e) {
|
|
253
|
+
const sb = this;
|
|
254
|
+
if (!sb.query && e && $(e.target).hasClass('searchbar-clear')) {
|
|
255
|
+
sb.disable();
|
|
256
|
+
return sb;
|
|
257
|
+
}
|
|
258
|
+
const previousQuery = sb.value;
|
|
259
|
+
sb.$inputEl.val('').trigger('change').focus();
|
|
260
|
+
sb.$el.trigger('searchbar:clear', previousQuery);
|
|
261
|
+
sb.emit('local::clear searchbarClear', sb, previousQuery);
|
|
262
|
+
return sb;
|
|
263
|
+
}
|
|
264
|
+
setDisableButtonMargin() {
|
|
265
|
+
const sb = this;
|
|
266
|
+
if (sb.expandable) return;
|
|
267
|
+
const app = sb.app;
|
|
268
|
+
sb.$disableButtonEl.transition(0).show();
|
|
269
|
+
sb.$disableButtonEl.css(`margin-${app.rtl ? 'left' : 'right'}`, `${-sb.disableButtonEl.offsetWidth}px`);
|
|
270
|
+
/* eslint no-underscore-dangle: ["error", { "allow": ["_clientLeft"] }] */
|
|
271
|
+
sb._clientLeft = sb.$disableButtonEl[0].clientLeft;
|
|
272
|
+
sb.$disableButtonEl.transition('');
|
|
273
|
+
sb.disableButtonHasMargin = true;
|
|
274
|
+
}
|
|
275
|
+
enable(setFocus) {
|
|
276
|
+
const sb = this;
|
|
277
|
+
if (sb.enabled) return sb;
|
|
278
|
+
const app = sb.app;
|
|
279
|
+
const document = getDocument();
|
|
280
|
+
const device = getDevice();
|
|
281
|
+
sb.enabled = true;
|
|
282
|
+
function enable() {
|
|
283
|
+
if (sb.$backdropEl && (sb.$searchContainer && sb.$searchContainer.length || sb.params.customSearch) && !sb.$el.hasClass('searchbar-enabled') && !sb.query) {
|
|
284
|
+
sb.backdropShow();
|
|
285
|
+
}
|
|
286
|
+
sb.$el.addClass('searchbar-enabled');
|
|
287
|
+
if (!sb.$disableButtonEl || sb.$disableButtonEl && sb.$disableButtonEl.length === 0) {
|
|
288
|
+
sb.$el.addClass('searchbar-enabled-no-disable-button');
|
|
289
|
+
}
|
|
290
|
+
if (!sb.expandable && sb.$disableButtonEl && sb.$disableButtonEl.length > 0 && app.theme !== 'md') {
|
|
291
|
+
if (!sb.disableButtonHasMargin) {
|
|
292
|
+
sb.setDisableButtonMargin();
|
|
293
|
+
}
|
|
294
|
+
sb.$disableButtonEl.css(`margin-${app.rtl ? 'left' : 'right'}`, '0px');
|
|
295
|
+
}
|
|
296
|
+
if (sb.expandable) {
|
|
297
|
+
const $navbarEl = sb.$el.parents('.navbar');
|
|
298
|
+
if ($navbarEl.hasClass('navbar-large') && sb.$pageEl) {
|
|
299
|
+
const $pageContentEl = sb.$pageEl.find('.page-content');
|
|
300
|
+
const $titleLargeEl = $navbarEl.find('.title-large');
|
|
301
|
+
$pageContentEl.addClass('with-searchbar-expandable-enabled');
|
|
302
|
+
if ($navbarEl.hasClass('navbar-large') && $navbarEl.hasClass('navbar-large-collapsed') && $titleLargeEl.length && $pageContentEl.length) {
|
|
303
|
+
$pageContentEl.transition(0);
|
|
304
|
+
$pageContentEl[0].scrollTop -= $titleLargeEl[0].offsetHeight;
|
|
305
|
+
setTimeout(() => {
|
|
306
|
+
$pageContentEl.transition('');
|
|
307
|
+
}, 200);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
if (app.theme === 'md' && $navbarEl.length) {
|
|
311
|
+
$navbarEl.addClass('with-searchbar-expandable-enabled');
|
|
312
|
+
} else {
|
|
313
|
+
$navbarEl.addClass('with-searchbar-expandable-enabled');
|
|
314
|
+
if ($navbarEl.hasClass('navbar-large')) {
|
|
315
|
+
$navbarEl.addClass('navbar-large-collapsed');
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
if (sb.$hideOnEnableEl) sb.$hideOnEnableEl.addClass('hidden-by-searchbar');
|
|
320
|
+
sb.$el.trigger('searchbar:enable');
|
|
321
|
+
sb.emit('local::enable searchbarEnable', sb);
|
|
322
|
+
}
|
|
323
|
+
let needsFocus = false;
|
|
324
|
+
if (setFocus === true) {
|
|
325
|
+
if (document.activeElement !== sb.inputEl) {
|
|
326
|
+
needsFocus = true;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
const isIos = device.ios && app.theme === 'ios';
|
|
330
|
+
if (isIos) {
|
|
331
|
+
if (sb.expandable) {
|
|
332
|
+
if (needsFocus) sb.$inputEl.focus();
|
|
333
|
+
enable();
|
|
334
|
+
} else {
|
|
335
|
+
if (needsFocus) sb.$inputEl.focus();
|
|
336
|
+
if (setFocus && (setFocus.type === 'focus' || setFocus === true)) {
|
|
337
|
+
nextTick(() => {
|
|
338
|
+
enable();
|
|
339
|
+
}, 400);
|
|
340
|
+
} else {
|
|
341
|
+
enable();
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
} else {
|
|
345
|
+
if (needsFocus) sb.$inputEl.focus();
|
|
346
|
+
if (app.theme === 'md' && sb.expandable) {
|
|
347
|
+
sb.$el.parents('.page, .view, .navbar-inner, .navbar').scrollLeft(app.rtl ? 100 : 0);
|
|
348
|
+
}
|
|
349
|
+
enable();
|
|
350
|
+
}
|
|
351
|
+
return sb;
|
|
352
|
+
}
|
|
353
|
+
disable() {
|
|
354
|
+
const sb = this;
|
|
355
|
+
if (!sb.enabled) return sb;
|
|
356
|
+
const app = sb.app;
|
|
357
|
+
sb.$inputEl.val('').trigger('change');
|
|
358
|
+
sb.$el.removeClass('searchbar-enabled searchbar-focused searchbar-enabled-no-disable-button');
|
|
359
|
+
if (sb.expandable) {
|
|
360
|
+
const $navbarEl = sb.$el.parents('.navbar');
|
|
361
|
+
const $pageContentEl = sb.$pageEl && sb.$pageEl.find('.page-content');
|
|
362
|
+
if ($navbarEl.hasClass('navbar-large') && $pageContentEl.length) {
|
|
363
|
+
const $titleLargeEl = $navbarEl.find('.title-large');
|
|
364
|
+
sb.$el.transitionEnd(() => {
|
|
365
|
+
$pageContentEl.removeClass('with-searchbar-expandable-closing');
|
|
366
|
+
});
|
|
367
|
+
if ($navbarEl.hasClass('navbar-large') && $navbarEl.hasClass('navbar-large-collapsed') && $titleLargeEl.length) {
|
|
368
|
+
const scrollTop = $pageContentEl[0].scrollTop;
|
|
369
|
+
const titleLargeHeight = $titleLargeEl[0].offsetHeight;
|
|
370
|
+
if (scrollTop > titleLargeHeight) {
|
|
371
|
+
$pageContentEl.transition(0);
|
|
372
|
+
$pageContentEl[0].scrollTop = scrollTop + titleLargeHeight;
|
|
373
|
+
setTimeout(() => {
|
|
374
|
+
$pageContentEl.transition('');
|
|
375
|
+
}, 200);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
$pageContentEl.removeClass('with-searchbar-expandable-enabled').addClass('with-searchbar-expandable-closing');
|
|
379
|
+
}
|
|
380
|
+
if (app.theme === 'md' && $navbarEl.length) {
|
|
381
|
+
$navbarEl.removeClass('with-searchbar-expandable-enabled with-searchbar-expandable-enabled-no-transition').addClass('with-searchbar-expandable-closing');
|
|
382
|
+
sb.$el.transitionEnd(() => {
|
|
383
|
+
$navbarEl.removeClass('with-searchbar-expandable-closing');
|
|
384
|
+
});
|
|
385
|
+
} else {
|
|
386
|
+
$navbarEl.removeClass('with-searchbar-expandable-enabled with-searchbar-expandable-enabled-no-transition').addClass('with-searchbar-expandable-closing');
|
|
387
|
+
sb.$el.transitionEnd(() => {
|
|
388
|
+
$navbarEl.removeClass('with-searchbar-expandable-closing');
|
|
389
|
+
});
|
|
390
|
+
if (sb.$pageEl) {
|
|
391
|
+
sb.$pageEl.find('.page-content').trigger('scroll');
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
if (!sb.expandable && sb.$disableButtonEl && sb.$disableButtonEl.length > 0 && app.theme !== 'md') {
|
|
396
|
+
sb.$disableButtonEl.css(`margin-${app.rtl ? 'left' : 'right'}`, `${-sb.disableButtonEl.offsetWidth}px`);
|
|
397
|
+
}
|
|
398
|
+
if (sb.$backdropEl && (sb.$searchContainer && sb.$searchContainer.length || sb.params.customSearch)) {
|
|
399
|
+
sb.backdropHide();
|
|
400
|
+
}
|
|
401
|
+
sb.enabled = false;
|
|
402
|
+
sb.$inputEl.blur();
|
|
403
|
+
if (sb.$hideOnEnableEl) sb.$hideOnEnableEl.removeClass('hidden-by-searchbar');
|
|
404
|
+
sb.$el.trigger('searchbar:disable');
|
|
405
|
+
sb.emit('local::disable searchbarDisable', sb);
|
|
406
|
+
return sb;
|
|
407
|
+
}
|
|
408
|
+
toggle() {
|
|
409
|
+
const sb = this;
|
|
410
|
+
if (sb.enabled) sb.disable();else sb.enable(true);
|
|
411
|
+
return sb;
|
|
412
|
+
}
|
|
413
|
+
backdropShow() {
|
|
414
|
+
const sb = this;
|
|
415
|
+
if (sb.$backdropEl) {
|
|
416
|
+
sb.$backdropEl.addClass('searchbar-backdrop-in');
|
|
417
|
+
}
|
|
418
|
+
return sb;
|
|
419
|
+
}
|
|
420
|
+
backdropHide() {
|
|
421
|
+
const sb = this;
|
|
422
|
+
if (sb.$backdropEl) {
|
|
423
|
+
sb.$backdropEl.removeClass('searchbar-backdrop-in');
|
|
424
|
+
}
|
|
425
|
+
return sb;
|
|
426
|
+
}
|
|
427
|
+
search(query, internal) {
|
|
428
|
+
const sb = this;
|
|
429
|
+
sb.previousQuery = sb.query || '';
|
|
430
|
+
if (query === sb.previousQuery) return sb;
|
|
431
|
+
if (!internal) {
|
|
432
|
+
if (!sb.enabled) {
|
|
433
|
+
sb.enable();
|
|
434
|
+
}
|
|
435
|
+
sb.$inputEl.val(query);
|
|
436
|
+
sb.$inputEl.trigger('input');
|
|
437
|
+
}
|
|
438
|
+
sb.query = query;
|
|
439
|
+
sb.value = query;
|
|
440
|
+
const {
|
|
441
|
+
$searchContainer,
|
|
442
|
+
$el,
|
|
443
|
+
$foundEl,
|
|
444
|
+
$notFoundEl,
|
|
445
|
+
$hideOnSearchEl,
|
|
446
|
+
isVirtualList
|
|
447
|
+
} = sb;
|
|
448
|
+
|
|
449
|
+
// Hide on search element
|
|
450
|
+
if (query.length > 0 && $hideOnSearchEl) {
|
|
451
|
+
$hideOnSearchEl.addClass('hidden-by-searchbar');
|
|
452
|
+
} else if ($hideOnSearchEl) {
|
|
453
|
+
$hideOnSearchEl.removeClass('hidden-by-searchbar');
|
|
454
|
+
}
|
|
455
|
+
// Add active/inactive classes on overlay
|
|
456
|
+
if ($searchContainer && $searchContainer.length && $el.hasClass('searchbar-enabled') || sb.params.customSearch && $el.hasClass('searchbar-enabled')) {
|
|
457
|
+
if (query.length === 0) {
|
|
458
|
+
sb.backdropShow();
|
|
459
|
+
} else {
|
|
460
|
+
sb.backdropHide();
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
if (sb.params.customSearch) {
|
|
464
|
+
$el.trigger('searchbar:search', {
|
|
465
|
+
query,
|
|
466
|
+
previousQuery: sb.previousQuery
|
|
467
|
+
});
|
|
468
|
+
sb.emit('local::search searchbarSearch', sb, query, sb.previousQuery);
|
|
469
|
+
return sb;
|
|
470
|
+
}
|
|
471
|
+
let foundItems = [];
|
|
472
|
+
let vlQuery;
|
|
473
|
+
if (isVirtualList) {
|
|
474
|
+
sb.virtualList = $searchContainer[0].f7VirtualList;
|
|
475
|
+
if (query.trim() === '') {
|
|
476
|
+
sb.virtualList.resetFilter();
|
|
477
|
+
if ($notFoundEl) $notFoundEl.hide();
|
|
478
|
+
if ($foundEl) $foundEl.show();
|
|
479
|
+
$el.trigger('searchbar:search', {
|
|
480
|
+
query,
|
|
481
|
+
previousQuery: sb.previousQuery
|
|
482
|
+
});
|
|
483
|
+
sb.emit('local::search searchbarSearch', sb, query, sb.previousQuery);
|
|
484
|
+
return sb;
|
|
485
|
+
}
|
|
486
|
+
vlQuery = sb.params.removeDiacritics ? removeDiacritics(query) : query;
|
|
487
|
+
if (sb.virtualList.params.searchAll) {
|
|
488
|
+
foundItems = sb.virtualList.params.searchAll(vlQuery, sb.virtualList.items) || [];
|
|
489
|
+
} else if (sb.virtualList.params.searchByItem) {
|
|
490
|
+
for (let i = 0; i < sb.virtualList.items.length; i += 1) {
|
|
491
|
+
if (sb.virtualList.params.searchByItem(vlQuery, sb.virtualList.items[i], i)) {
|
|
492
|
+
foundItems.push(i);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
} else {
|
|
497
|
+
let values;
|
|
498
|
+
if (sb.params.removeDiacritics) values = removeDiacritics(query.trim().toLowerCase()).split(' ');else {
|
|
499
|
+
values = query.trim().toLowerCase().split(' ');
|
|
500
|
+
}
|
|
501
|
+
$searchContainer.find(sb.params.searchItem).removeClass('hidden-by-searchbar').each(itemEl => {
|
|
502
|
+
const $itemEl = $(itemEl);
|
|
503
|
+
let compareWithText = [];
|
|
504
|
+
let $searchIn = sb.params.searchIn ? $itemEl.find(sb.params.searchIn) : $itemEl;
|
|
505
|
+
if (sb.params.searchIn === sb.params.searchItem) {
|
|
506
|
+
$searchIn = $itemEl;
|
|
507
|
+
}
|
|
508
|
+
$searchIn.each(searchInEl => {
|
|
509
|
+
let itemText = $(searchInEl).text().trim().toLowerCase();
|
|
510
|
+
if (sb.params.removeDiacritics) itemText = removeDiacritics(itemText);
|
|
511
|
+
compareWithText.push(itemText);
|
|
512
|
+
});
|
|
513
|
+
compareWithText = compareWithText.join(' ');
|
|
514
|
+
let wordsMatch = 0;
|
|
515
|
+
for (let i = 0; i < values.length; i += 1) {
|
|
516
|
+
if (compareWithText.indexOf(values[i]) >= 0) wordsMatch += 1;
|
|
517
|
+
}
|
|
518
|
+
if (wordsMatch !== values.length && !(sb.params.ignore && $itemEl.is(sb.params.ignore))) {
|
|
519
|
+
$itemEl.addClass('hidden-by-searchbar');
|
|
520
|
+
} else {
|
|
521
|
+
foundItems.push($itemEl[0]);
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
if (sb.params.hideGroupTitles) {
|
|
525
|
+
$searchContainer.find(sb.params.searchGroupTitle).each(titleEl => {
|
|
526
|
+
const $titleEl = $(titleEl);
|
|
527
|
+
const $nextElements = $titleEl.nextAll(sb.params.searchItem);
|
|
528
|
+
let hide = true;
|
|
529
|
+
for (let i = 0; i < $nextElements.length; i += 1) {
|
|
530
|
+
const $nextEl = $nextElements.eq(i);
|
|
531
|
+
if ($nextEl.is(sb.params.searchGroupTitle)) break;
|
|
532
|
+
if (!$nextEl.hasClass('hidden-by-searchbar')) {
|
|
533
|
+
hide = false;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
const ignore = sb.params.ignore && $titleEl.is(sb.params.ignore);
|
|
537
|
+
if (hide && !ignore) $titleEl.addClass('hidden-by-searchbar');else $titleEl.removeClass('hidden-by-searchbar');
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
if (sb.params.hideGroups) {
|
|
541
|
+
$searchContainer.find(sb.params.searchGroup).each(groupEl => {
|
|
542
|
+
const $groupEl = $(groupEl);
|
|
543
|
+
const ignore = sb.params.ignore && $groupEl.is(sb.params.ignore);
|
|
544
|
+
// eslint-disable-next-line
|
|
545
|
+
const notHidden = $groupEl.find(sb.params.searchItem).filter(el => {
|
|
546
|
+
return !$(el).hasClass('hidden-by-searchbar');
|
|
547
|
+
});
|
|
548
|
+
if (notHidden.length === 0 && !ignore) {
|
|
549
|
+
$groupEl.addClass('hidden-by-searchbar');
|
|
550
|
+
} else {
|
|
551
|
+
$groupEl.removeClass('hidden-by-searchbar');
|
|
552
|
+
}
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
if (foundItems.length === 0) {
|
|
557
|
+
if ($notFoundEl) $notFoundEl.show();
|
|
558
|
+
if ($foundEl) $foundEl.hide();
|
|
559
|
+
} else {
|
|
560
|
+
if ($notFoundEl) $notFoundEl.hide();
|
|
561
|
+
if ($foundEl) $foundEl.show();
|
|
562
|
+
}
|
|
563
|
+
if (isVirtualList && sb.virtualList) {
|
|
564
|
+
sb.virtualList.filterItems(foundItems);
|
|
565
|
+
}
|
|
566
|
+
$el.trigger('searchbar:search', {
|
|
567
|
+
query,
|
|
568
|
+
previousQuery: sb.previousQuery,
|
|
569
|
+
foundItems
|
|
570
|
+
});
|
|
571
|
+
sb.emit('local::search searchbarSearch', sb, query, sb.previousQuery, foundItems);
|
|
572
|
+
return sb;
|
|
573
|
+
}
|
|
574
|
+
init() {
|
|
575
|
+
const sb = this;
|
|
576
|
+
if (sb.expandable && sb.$el) sb.$el.addClass('searchbar-expandable');
|
|
577
|
+
if (sb.inline && sb.$el) sb.$el.addClass('searchbar-inline');
|
|
578
|
+
sb.attachEvents();
|
|
579
|
+
}
|
|
580
|
+
destroy() {
|
|
581
|
+
const sb = this;
|
|
582
|
+
sb.emit('local::beforeDestroy searchbarBeforeDestroy', sb);
|
|
583
|
+
sb.$el.trigger('searchbar:beforedestroy');
|
|
584
|
+
sb.detachEvents();
|
|
585
|
+
if (sb.$el[0]) {
|
|
586
|
+
sb.$el[0].f7Searchbar = null;
|
|
587
|
+
delete sb.$el[0].f7Searchbar;
|
|
588
|
+
}
|
|
589
|
+
deleteProps(sb);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
export default Searchbar;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
.ios {
|
|
2
|
+
.searchbar {
|
|
3
|
+
input[type='search'],
|
|
4
|
+
input[type='text'] {
|
|
5
|
+
z-index: 30;
|
|
6
|
+
}
|
|
7
|
+
.input-clear-button {
|
|
8
|
+
z-index: 40;
|
|
9
|
+
.ltr({
|
|
10
|
+
right: 7px;
|
|
11
|
+
});
|
|
12
|
+
.rtl({
|
|
13
|
+
left: 7px;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
.searchbar-icon {
|
|
18
|
+
width: 13px;
|
|
19
|
+
height: 13px;
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: 50%;
|
|
22
|
+
margin-top: -6px;
|
|
23
|
+
z-index: 40;
|
|
24
|
+
&:after {
|
|
25
|
+
content: 'search_ios';
|
|
26
|
+
line-height: 13px;
|
|
27
|
+
}
|
|
28
|
+
.ltr({
|
|
29
|
+
left: 8px;
|
|
30
|
+
});
|
|
31
|
+
.rtl({
|
|
32
|
+
right: 8px;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.searchbar-disable-button {
|
|
37
|
+
font-size: 17px;
|
|
38
|
+
flex-shrink: 0;
|
|
39
|
+
transform: translate3d(0, 0, 0);
|
|
40
|
+
transition-duration: 300ms;
|
|
41
|
+
color: var(--f7-searchbar-link-color, var(--f7-bars-link-color, var(--f7-theme-color)));
|
|
42
|
+
display: none;
|
|
43
|
+
&.active-state {
|
|
44
|
+
transition-duration: 0ms;
|
|
45
|
+
opacity: 0.3 !important;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
.searchbar-enabled {
|
|
49
|
+
.searchbar-disable-button {
|
|
50
|
+
pointer-events: auto;
|
|
51
|
+
opacity: 1;
|
|
52
|
+
.ltr({ margin-left: 8px; });
|
|
53
|
+
.rtl({ margin-right: 8px; });
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
.searchbar:not(.searchbar-enabled) {
|
|
57
|
+
.searchbar-disable-button {
|
|
58
|
+
transition-duration: 300ms !important;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
.searchbar-expandable {
|
|
62
|
+
.ltr({ left: 0; });
|
|
63
|
+
.rtl({ right: 0; });
|
|
64
|
+
bottom: 0;
|
|
65
|
+
opacity: 1;
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: 0%;
|
|
68
|
+
transform: translate3d(0, 0, 0);
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
.searchbar-disable-button {
|
|
71
|
+
.ltr({ margin-left: 8px; });
|
|
72
|
+
.rtl({ margin-right: 8px; });
|
|
73
|
+
opacity: 1;
|
|
74
|
+
display: block;
|
|
75
|
+
}
|
|
76
|
+
.searchbar-inner {
|
|
77
|
+
height: var(--f7-searchbar-expandable-size);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
.navbar.with-searchbar-expandable-enabled,
|
|
81
|
+
.navbar.with-searchbar-expandable-closing {
|
|
82
|
+
.navbar-bg {
|
|
83
|
+
transition-property: transform, opacity;
|
|
84
|
+
}
|
|
85
|
+
.navbar-bg,
|
|
86
|
+
.left,
|
|
87
|
+
.title,
|
|
88
|
+
.right {
|
|
89
|
+
transition-duration: 300ms;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
.navbar.with-searchbar-expandable-enabled,
|
|
93
|
+
.navbar.with-searchbar-expandable-enabled-no-transition {
|
|
94
|
+
.left,
|
|
95
|
+
.title,
|
|
96
|
+
.right {
|
|
97
|
+
transform: translateY(calc(-1 * var(--f7-navbar-height)));
|
|
98
|
+
opacity: 0 !important;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.searchbar-expandable.searchbar-enabled {
|
|
103
|
+
opacity: 1;
|
|
104
|
+
height: var(--f7-searchbar-expandable-size);
|
|
105
|
+
pointer-events: auto;
|
|
106
|
+
}
|
|
107
|
+
}
|