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