@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,125 @@
|
|
|
1
|
+
import { getWindow, getDocument } from 'ssr-window';
|
|
2
|
+
import { id } from '../../shared/utils.js';
|
|
3
|
+
import $ from '../../shared/dom7.js';
|
|
4
|
+
const fetchedModules = [];
|
|
5
|
+
function loadModule(moduleToLoad) {
|
|
6
|
+
const Framework7 = this;
|
|
7
|
+
const window = getWindow();
|
|
8
|
+
const document = getDocument();
|
|
9
|
+
return new Promise((resolve, reject) => {
|
|
10
|
+
const app = Framework7.instance;
|
|
11
|
+
let modulePath;
|
|
12
|
+
let moduleObj;
|
|
13
|
+
let moduleFunc;
|
|
14
|
+
if (!moduleToLoad) {
|
|
15
|
+
reject(new Error('Framework7: Lazy module must be specified'));
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
function install(module) {
|
|
19
|
+
Framework7.use(module);
|
|
20
|
+
if (app) {
|
|
21
|
+
app.useModuleParams(module, app.params);
|
|
22
|
+
app.useModule(module);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (typeof moduleToLoad === 'string') {
|
|
26
|
+
const matchNamePattern = moduleToLoad.match(/([a-z0-9-]*)/i);
|
|
27
|
+
if (moduleToLoad.indexOf('.') < 0 && matchNamePattern && matchNamePattern[0].length === moduleToLoad.length) {
|
|
28
|
+
if (!app || app && !app.params.lazyModulesPath) {
|
|
29
|
+
reject(new Error('Framework7: "lazyModulesPath" app parameter must be specified to fetch module by name'));
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
modulePath = `${app.params.lazyModulesPath}/${moduleToLoad}/${moduleToLoad}.lazy.js`;
|
|
33
|
+
} else {
|
|
34
|
+
modulePath = moduleToLoad;
|
|
35
|
+
}
|
|
36
|
+
} else if (typeof moduleToLoad === 'function') {
|
|
37
|
+
moduleFunc = moduleToLoad;
|
|
38
|
+
} else {
|
|
39
|
+
// considering F7-Plugin object
|
|
40
|
+
moduleObj = moduleToLoad;
|
|
41
|
+
}
|
|
42
|
+
if (moduleFunc) {
|
|
43
|
+
const module = moduleFunc(Framework7, false);
|
|
44
|
+
if (!module) {
|
|
45
|
+
reject(new Error("Framework7: Can't find Framework7 component in specified component function"));
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
// Check if it was added
|
|
49
|
+
if (Framework7.prototype.modules && Framework7.prototype.modules[module.name]) {
|
|
50
|
+
resolve();
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
// Install It
|
|
54
|
+
install(module);
|
|
55
|
+
resolve();
|
|
56
|
+
}
|
|
57
|
+
if (moduleObj) {
|
|
58
|
+
const module = moduleObj;
|
|
59
|
+
if (!module) {
|
|
60
|
+
reject(new Error("Framework7: Can't find Framework7 component in specified component"));
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
// Check if it was added
|
|
64
|
+
if (Framework7.prototype.modules && Framework7.prototype.modules[module.name]) {
|
|
65
|
+
resolve();
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
// Install It
|
|
69
|
+
install(module);
|
|
70
|
+
resolve();
|
|
71
|
+
}
|
|
72
|
+
if (modulePath) {
|
|
73
|
+
if (fetchedModules.indexOf(modulePath) >= 0) {
|
|
74
|
+
resolve();
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
fetchedModules.push(modulePath);
|
|
78
|
+
const scriptLoad = new Promise((resolveScript, rejectScript) => {
|
|
79
|
+
fetch(modulePath).then(res => res.text()).then(scriptContent => {
|
|
80
|
+
const callbackId = id();
|
|
81
|
+
const callbackLoadName = `f7_component_loader_callback_${callbackId}`;
|
|
82
|
+
const scriptEl = document.createElement('script');
|
|
83
|
+
scriptEl.innerHTML = `window.${callbackLoadName} = function (Framework7, Framework7AutoInstallComponent) {return ${scriptContent.trim()}}`;
|
|
84
|
+
$('head').append(scriptEl);
|
|
85
|
+
const componentLoader = window[callbackLoadName];
|
|
86
|
+
delete window[callbackLoadName];
|
|
87
|
+
$(scriptEl).remove();
|
|
88
|
+
const module = componentLoader(Framework7, false);
|
|
89
|
+
if (!module) {
|
|
90
|
+
rejectScript(new Error(`Framework7: Can't find Framework7 component in ${modulePath} file`));
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Check if it was added
|
|
95
|
+
if (Framework7.prototype.modules && Framework7.prototype.modules[module.name]) {
|
|
96
|
+
resolveScript();
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Install It
|
|
101
|
+
install(module);
|
|
102
|
+
resolveScript();
|
|
103
|
+
}).catch(err => {
|
|
104
|
+
rejectScript(err);
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
const styleLoad = new Promise(resolveStyle => {
|
|
108
|
+
fetch(modulePath.replace('.lazy.js', app.rtl ? '.rtl.css' : '.css').replace('.js', app.rtl ? '.rtl.css' : '.css')).then(res => res.text()).then(styleContent => {
|
|
109
|
+
const styleEl = document.createElement('style');
|
|
110
|
+
styleEl.innerHTML = styleContent;
|
|
111
|
+
$('head').append(styleEl);
|
|
112
|
+
resolveStyle();
|
|
113
|
+
}).catch(() => {
|
|
114
|
+
resolveStyle();
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
Promise.all([scriptLoad, styleLoad]).then(() => {
|
|
118
|
+
resolve();
|
|
119
|
+
}).catch(err => {
|
|
120
|
+
reject(err);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
export default loadModule;
|
|
@@ -0,0 +1,467 @@
|
|
|
1
|
+
import $ from '../../shared/dom7.js';
|
|
2
|
+
import { extend, deleteProps } from '../../shared/utils.js';
|
|
3
|
+
import Framework7Class from '../../shared/class.js';
|
|
4
|
+
/** @jsx $jsx */
|
|
5
|
+
import $jsx from '../../shared/$jsx.js';
|
|
6
|
+
class AreaChart extends Framework7Class {
|
|
7
|
+
constructor(app, params) {
|
|
8
|
+
if (params === void 0) {
|
|
9
|
+
params = {};
|
|
10
|
+
}
|
|
11
|
+
super(params, [app]);
|
|
12
|
+
const self = this;
|
|
13
|
+
const defaults = extend({}, app.params.areaChart);
|
|
14
|
+
|
|
15
|
+
// Extend defaults with modules params
|
|
16
|
+
self.useModulesParams(defaults);
|
|
17
|
+
self.params = extend(defaults, params);
|
|
18
|
+
const {
|
|
19
|
+
el
|
|
20
|
+
} = self.params;
|
|
21
|
+
if (!el) return self;
|
|
22
|
+
const $el = $(el);
|
|
23
|
+
if ($el.length === 0) return self;
|
|
24
|
+
if ($el[0].f7AreaChart) return $el[0].f7AreaChart;
|
|
25
|
+
extend(self, {
|
|
26
|
+
app,
|
|
27
|
+
$el,
|
|
28
|
+
el: $el && $el[0],
|
|
29
|
+
currentIndex: null,
|
|
30
|
+
hiddenDatasets: [],
|
|
31
|
+
f7Tooltip: null,
|
|
32
|
+
linesOffsets: null
|
|
33
|
+
});
|
|
34
|
+
$el[0].f7AreaChart = self;
|
|
35
|
+
|
|
36
|
+
// Install Modules
|
|
37
|
+
self.useModules();
|
|
38
|
+
self.onMouseEnter = self.onMouseEnter.bind(self);
|
|
39
|
+
self.onMouseMove = self.onMouseMove.bind(self);
|
|
40
|
+
self.onMouseLeave = self.onMouseLeave.bind(self);
|
|
41
|
+
self.onLegendClick = self.onLegendClick.bind(self);
|
|
42
|
+
self.init();
|
|
43
|
+
return self;
|
|
44
|
+
}
|
|
45
|
+
getVisibleLabels() {
|
|
46
|
+
const {
|
|
47
|
+
maxAxisLabels,
|
|
48
|
+
axisLabels
|
|
49
|
+
} = this.params;
|
|
50
|
+
if (!maxAxisLabels || axisLabels.length <= maxAxisLabels) return axisLabels;
|
|
51
|
+
const skipStep = Math.ceil(axisLabels.length / maxAxisLabels);
|
|
52
|
+
const filtered = axisLabels.filter((label, index) => index % skipStep === 0);
|
|
53
|
+
return filtered;
|
|
54
|
+
}
|
|
55
|
+
getSummValues() {
|
|
56
|
+
const {
|
|
57
|
+
datasets
|
|
58
|
+
} = this.params;
|
|
59
|
+
const {
|
|
60
|
+
hiddenDatasets
|
|
61
|
+
} = this;
|
|
62
|
+
const summValues = [];
|
|
63
|
+
datasets.filter((dataset, index) => !hiddenDatasets.includes(index)).forEach(_ref => {
|
|
64
|
+
let {
|
|
65
|
+
values
|
|
66
|
+
} = _ref;
|
|
67
|
+
values.forEach((value, valueIndex) => {
|
|
68
|
+
if (!summValues[valueIndex]) summValues[valueIndex] = 0;
|
|
69
|
+
summValues[valueIndex] += value;
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
return summValues;
|
|
73
|
+
}
|
|
74
|
+
getChartData() {
|
|
75
|
+
const {
|
|
76
|
+
datasets,
|
|
77
|
+
lineChart,
|
|
78
|
+
width,
|
|
79
|
+
height
|
|
80
|
+
} = this.params;
|
|
81
|
+
const {
|
|
82
|
+
hiddenDatasets
|
|
83
|
+
} = this;
|
|
84
|
+
const data = [];
|
|
85
|
+
if (!datasets.length) {
|
|
86
|
+
return data;
|
|
87
|
+
}
|
|
88
|
+
const lastValues = datasets[0].values.map(() => 0);
|
|
89
|
+
let maxValue = 0;
|
|
90
|
+
if (lineChart) {
|
|
91
|
+
datasets.filter((dataset, index) => !hiddenDatasets.includes(index)).forEach(_ref2 => {
|
|
92
|
+
let {
|
|
93
|
+
values
|
|
94
|
+
} = _ref2;
|
|
95
|
+
const datasetMaxValue = Math.max(...values);
|
|
96
|
+
if (datasetMaxValue > maxValue) maxValue = datasetMaxValue;
|
|
97
|
+
});
|
|
98
|
+
} else {
|
|
99
|
+
maxValue = Math.max(...this.getSummValues());
|
|
100
|
+
}
|
|
101
|
+
datasets.filter((dataset, index) => !hiddenDatasets.includes(index)).forEach(_ref3 => {
|
|
102
|
+
let {
|
|
103
|
+
label,
|
|
104
|
+
values,
|
|
105
|
+
color
|
|
106
|
+
} = _ref3;
|
|
107
|
+
const points = values.map((originalValue, valueIndex) => {
|
|
108
|
+
lastValues[valueIndex] += originalValue;
|
|
109
|
+
const value = lineChart ? originalValue : lastValues[valueIndex];
|
|
110
|
+
const x = valueIndex / (values.length - 1) * width;
|
|
111
|
+
const y = height - value / maxValue * height;
|
|
112
|
+
if (lineChart) {
|
|
113
|
+
return `${valueIndex === 0 ? 'M' : 'L'}${x},${y}`;
|
|
114
|
+
}
|
|
115
|
+
return `${x} ${y}`;
|
|
116
|
+
});
|
|
117
|
+
if (!lineChart) {
|
|
118
|
+
points.push(`${width} ${height} 0 ${height}`);
|
|
119
|
+
}
|
|
120
|
+
data.push({
|
|
121
|
+
label,
|
|
122
|
+
points: points.join(' '),
|
|
123
|
+
color
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
return data.reverse();
|
|
127
|
+
}
|
|
128
|
+
getVerticalLines() {
|
|
129
|
+
const {
|
|
130
|
+
datasets,
|
|
131
|
+
width
|
|
132
|
+
} = this.params;
|
|
133
|
+
const lines = [];
|
|
134
|
+
if (!datasets.length) {
|
|
135
|
+
return lines;
|
|
136
|
+
}
|
|
137
|
+
const values = datasets[0].values;
|
|
138
|
+
values.forEach((value, valueIndex) => {
|
|
139
|
+
const x = valueIndex / (values.length - 1) * width;
|
|
140
|
+
lines.push(x);
|
|
141
|
+
});
|
|
142
|
+
return lines;
|
|
143
|
+
}
|
|
144
|
+
toggleDataset(index) {
|
|
145
|
+
const {
|
|
146
|
+
hiddenDatasets,
|
|
147
|
+
params: {
|
|
148
|
+
toggleDatasets
|
|
149
|
+
}
|
|
150
|
+
} = this;
|
|
151
|
+
if (!toggleDatasets) return;
|
|
152
|
+
if (hiddenDatasets.includes(index)) {
|
|
153
|
+
hiddenDatasets.splice(hiddenDatasets.indexOf(index), 1);
|
|
154
|
+
} else {
|
|
155
|
+
hiddenDatasets.push(index);
|
|
156
|
+
}
|
|
157
|
+
if (this.$legendEl) {
|
|
158
|
+
this.$legendEl.find('.area-chart-legend-item').removeClass('area-chart-legend-item-hidden');
|
|
159
|
+
hiddenDatasets.forEach(i => {
|
|
160
|
+
this.$legendEl.find(`.area-chart-legend-item[data-index="${i}"]`).addClass('area-chart-legend-item-hidden');
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
this.update({}, true);
|
|
164
|
+
}
|
|
165
|
+
formatAxisLabel(label) {
|
|
166
|
+
const {
|
|
167
|
+
formatAxisLabel
|
|
168
|
+
} = this.params;
|
|
169
|
+
if (formatAxisLabel) return formatAxisLabel.call(this, label);
|
|
170
|
+
return label;
|
|
171
|
+
}
|
|
172
|
+
formatLegendLabel(label) {
|
|
173
|
+
const {
|
|
174
|
+
formatLegendLabel
|
|
175
|
+
} = this.params;
|
|
176
|
+
if (formatLegendLabel) return formatLegendLabel.call(this, label);
|
|
177
|
+
return label;
|
|
178
|
+
}
|
|
179
|
+
calcLinesOffsets() {
|
|
180
|
+
const lines = this.svgEl.querySelectorAll('line');
|
|
181
|
+
this.linesOffsets = [];
|
|
182
|
+
for (let i = 0; i < lines.length; i += 1) {
|
|
183
|
+
this.linesOffsets.push(lines[i].getBoundingClientRect().left);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
formatTooltip() {
|
|
187
|
+
const self = this;
|
|
188
|
+
const {
|
|
189
|
+
currentIndex,
|
|
190
|
+
hiddenDatasets,
|
|
191
|
+
params: {
|
|
192
|
+
datasets,
|
|
193
|
+
axisLabels,
|
|
194
|
+
formatTooltip,
|
|
195
|
+
formatTooltipTotal,
|
|
196
|
+
formatTooltipAxisLabel,
|
|
197
|
+
formatTooltipDataset
|
|
198
|
+
}
|
|
199
|
+
} = self;
|
|
200
|
+
if (currentIndex === null) return '';
|
|
201
|
+
let total = 0;
|
|
202
|
+
const currentValues = datasets.filter((dataset, index) => !hiddenDatasets.includes(index)).map(dataset => ({
|
|
203
|
+
color: dataset.color,
|
|
204
|
+
label: dataset.label,
|
|
205
|
+
value: dataset.values[currentIndex]
|
|
206
|
+
}));
|
|
207
|
+
currentValues.forEach(dataset => {
|
|
208
|
+
total += dataset.value;
|
|
209
|
+
});
|
|
210
|
+
if (formatTooltip) {
|
|
211
|
+
return formatTooltip({
|
|
212
|
+
index: currentIndex,
|
|
213
|
+
total,
|
|
214
|
+
datasets: currentValues
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
let labelText = formatTooltipAxisLabel ? formatTooltipAxisLabel.call(self, axisLabels[currentIndex]) : this.formatAxisLabel(axisLabels[currentIndex]);
|
|
218
|
+
if (!labelText) labelText = '';
|
|
219
|
+
const totalText = formatTooltipTotal ? formatTooltipTotal.call(self, total) : total;
|
|
220
|
+
// prettier-ignore
|
|
221
|
+
const datasetsText = currentValues.length > 0 ? `
|
|
222
|
+
<ul class="area-chart-tooltip-list">
|
|
223
|
+
${currentValues.map(_ref4 => {
|
|
224
|
+
let {
|
|
225
|
+
label,
|
|
226
|
+
color,
|
|
227
|
+
value
|
|
228
|
+
} = _ref4;
|
|
229
|
+
const valueText = formatTooltipDataset ? formatTooltipDataset.call(self, label, value, color) : `${label ? `${label}: ` : ''}${value}`;
|
|
230
|
+
return `
|
|
231
|
+
<li><span style="background-color: ${color};"></span>${valueText}</li>
|
|
232
|
+
`;
|
|
233
|
+
}).join('')}
|
|
234
|
+
</ul>` : '';
|
|
235
|
+
// prettier-ignore
|
|
236
|
+
return `
|
|
237
|
+
<div class="area-chart-tooltip-label">${labelText}</div>
|
|
238
|
+
<div class="area-chart-tooltip-total">${totalText}</div>
|
|
239
|
+
${datasetsText}
|
|
240
|
+
`;
|
|
241
|
+
}
|
|
242
|
+
setTooltip() {
|
|
243
|
+
const self = this;
|
|
244
|
+
const {
|
|
245
|
+
app,
|
|
246
|
+
el,
|
|
247
|
+
svgEl,
|
|
248
|
+
hiddenDatasets,
|
|
249
|
+
currentIndex,
|
|
250
|
+
params: {
|
|
251
|
+
tooltip,
|
|
252
|
+
datasets
|
|
253
|
+
}
|
|
254
|
+
} = self;
|
|
255
|
+
if (!tooltip) return;
|
|
256
|
+
const hasVisibleDataSets = datasets.filter((dataset, index) => !hiddenDatasets.includes(index)).length > 0;
|
|
257
|
+
if (!hasVisibleDataSets) {
|
|
258
|
+
if (self.f7Tooltip && self.f7Tooltip.hide) self.f7Tooltip.hide();
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
if (currentIndex !== null && !self.f7Tooltip) {
|
|
262
|
+
self.f7Tooltip = app.tooltip.create({
|
|
263
|
+
trigger: 'manual',
|
|
264
|
+
containerEl: el,
|
|
265
|
+
targetEl: svgEl.querySelector(`line[data-index="${currentIndex}"]`),
|
|
266
|
+
text: self.formatTooltip(),
|
|
267
|
+
cssClass: 'area-chart-tooltip'
|
|
268
|
+
});
|
|
269
|
+
if (self.f7Tooltip && self.f7Tooltip.show) {
|
|
270
|
+
self.f7Tooltip.show();
|
|
271
|
+
}
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
if (!self.f7Tooltip || !self.f7Tooltip.hide || !self.f7Tooltip.show) {
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
if (currentIndex !== null) {
|
|
278
|
+
self.f7Tooltip.setText(self.formatTooltip());
|
|
279
|
+
self.f7Tooltip.setTargetEl(svgEl.querySelector(`line[data-index="${currentIndex}"]`));
|
|
280
|
+
self.f7Tooltip.show();
|
|
281
|
+
} else {
|
|
282
|
+
self.f7Tooltip.hide();
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
setCurrentIndex(index) {
|
|
286
|
+
if (index === this.currentIndex) return;
|
|
287
|
+
this.currentIndex = index;
|
|
288
|
+
this.$el.trigger('areachart:select', {
|
|
289
|
+
index
|
|
290
|
+
});
|
|
291
|
+
this.emit('local::select areaChartSelect', this, index);
|
|
292
|
+
this.$svgEl.find('line').removeClass('area-chart-current-line');
|
|
293
|
+
this.$svgEl.find(`line[data-index="${index}"]`).addClass('area-chart-current-line');
|
|
294
|
+
this.setTooltip();
|
|
295
|
+
}
|
|
296
|
+
onLegendClick(e) {
|
|
297
|
+
const index = parseInt($(e.target).closest('.area-chart-legend-item').attr('data-index'), 10);
|
|
298
|
+
this.toggleDataset(index);
|
|
299
|
+
}
|
|
300
|
+
onMouseEnter() {
|
|
301
|
+
this.calcLinesOffsets();
|
|
302
|
+
}
|
|
303
|
+
onMouseMove(e) {
|
|
304
|
+
const self = this;
|
|
305
|
+
if (!self.linesOffsets) {
|
|
306
|
+
self.calcLinesOffsets();
|
|
307
|
+
}
|
|
308
|
+
let currentLeft = e.pageX;
|
|
309
|
+
if (typeof currentLeft === 'undefined') currentLeft = 0;
|
|
310
|
+
const distances = self.linesOffsets.map(left => Math.abs(currentLeft - left));
|
|
311
|
+
const minDistance = Math.min(...distances);
|
|
312
|
+
const closestIndex = distances.indexOf(minDistance);
|
|
313
|
+
self.setCurrentIndex(closestIndex);
|
|
314
|
+
}
|
|
315
|
+
onMouseLeave() {
|
|
316
|
+
this.setCurrentIndex(null);
|
|
317
|
+
}
|
|
318
|
+
attachEvents() {
|
|
319
|
+
const {
|
|
320
|
+
svgEl,
|
|
321
|
+
$el
|
|
322
|
+
} = this;
|
|
323
|
+
if (!svgEl) return;
|
|
324
|
+
svgEl.addEventListener('mouseenter', this.onMouseEnter);
|
|
325
|
+
svgEl.addEventListener('mousemove', this.onMouseMove);
|
|
326
|
+
svgEl.addEventListener('mouseleave', this.onMouseLeave);
|
|
327
|
+
$el.on('click', '.area-chart-legend-item', this.onLegendClick);
|
|
328
|
+
}
|
|
329
|
+
detachEvents() {
|
|
330
|
+
const {
|
|
331
|
+
svgEl,
|
|
332
|
+
$el
|
|
333
|
+
} = this;
|
|
334
|
+
if (!svgEl) return;
|
|
335
|
+
svgEl.removeEventListener('mouseenter', this.onMouseEnter);
|
|
336
|
+
svgEl.removeEventListener('mousemove', this.onMouseMove);
|
|
337
|
+
svgEl.removeEventListener('mouseleave', this.onMouseLeave);
|
|
338
|
+
$el.off('click', '.area-chart-legend-item', this.onLegendClick);
|
|
339
|
+
}
|
|
340
|
+
render() {
|
|
341
|
+
const self = this;
|
|
342
|
+
const {
|
|
343
|
+
lineChart,
|
|
344
|
+
toggleDatasets,
|
|
345
|
+
width,
|
|
346
|
+
height,
|
|
347
|
+
axis,
|
|
348
|
+
axisLabels,
|
|
349
|
+
legend,
|
|
350
|
+
datasets
|
|
351
|
+
} = self.params;
|
|
352
|
+
const chartData = self.getChartData();
|
|
353
|
+
const verticalLines = self.getVerticalLines();
|
|
354
|
+
const visibleLegends = self.getVisibleLabels();
|
|
355
|
+
const LegendItemTag = toggleDatasets ? 'button' : 'span';
|
|
356
|
+
return $jsx("div", null, $jsx("svg", {
|
|
357
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
358
|
+
width: width,
|
|
359
|
+
height: height,
|
|
360
|
+
viewBox: `0 0 ${width} ${height}`,
|
|
361
|
+
preserveAspectRatio: "none"
|
|
362
|
+
}, chartData.map(data => lineChart ? $jsx("path", {
|
|
363
|
+
stroke: data.color,
|
|
364
|
+
"fill-rule": "evenodd",
|
|
365
|
+
d: data.points
|
|
366
|
+
}) : $jsx("polygon", {
|
|
367
|
+
fill: data.color,
|
|
368
|
+
"fill-rule": "evenodd",
|
|
369
|
+
points: data.points
|
|
370
|
+
})), verticalLines.map((line, index) => $jsx("line", {
|
|
371
|
+
"data-index": index,
|
|
372
|
+
fill: "#000",
|
|
373
|
+
x1: line,
|
|
374
|
+
y1: 0,
|
|
375
|
+
x2: line,
|
|
376
|
+
y2: height
|
|
377
|
+
}))), axis && $jsx("div", {
|
|
378
|
+
class: "area-chart-axis"
|
|
379
|
+
}, axisLabels.map(label => $jsx("span", null, visibleLegends.includes(label) && $jsx("span", null, self.formatAxisLabel(label))))), legend && $jsx("div", {
|
|
380
|
+
class: "area-chart-legend"
|
|
381
|
+
}, datasets.map((dataset, index) => $jsx(LegendItemTag, {
|
|
382
|
+
"data-index": index,
|
|
383
|
+
class: `area-chart-legend-item ${toggleDatasets ? 'area-chart-legend-button' : ''}`,
|
|
384
|
+
_type: toggleDatasets ? 'button' : undefined
|
|
385
|
+
}, $jsx("span", {
|
|
386
|
+
style: `background-color: ${dataset.color}`
|
|
387
|
+
}), self.formatLegendLabel(dataset.label)))));
|
|
388
|
+
}
|
|
389
|
+
update(newParams, onlySvg) {
|
|
390
|
+
if (newParams === void 0) {
|
|
391
|
+
newParams = {};
|
|
392
|
+
}
|
|
393
|
+
if (onlySvg === void 0) {
|
|
394
|
+
onlySvg = false;
|
|
395
|
+
}
|
|
396
|
+
const self = this;
|
|
397
|
+
const {
|
|
398
|
+
params
|
|
399
|
+
} = self;
|
|
400
|
+
Object.keys(newParams).forEach(param => {
|
|
401
|
+
if (typeof newParams[param] !== 'undefined') {
|
|
402
|
+
params[param] = newParams[param];
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
if (self.$svgEl.length === 0) return self;
|
|
406
|
+
self.detachEvents();
|
|
407
|
+
self.$svgEl.remove();
|
|
408
|
+
if (!onlySvg) {
|
|
409
|
+
self.$axisEl.remove();
|
|
410
|
+
self.$legendEl.remove();
|
|
411
|
+
}
|
|
412
|
+
const $rendered = $(self.render());
|
|
413
|
+
const $svgEl = $rendered.find('svg');
|
|
414
|
+
extend(self, {
|
|
415
|
+
svgEl: $svgEl && $svgEl[0],
|
|
416
|
+
$svgEl
|
|
417
|
+
});
|
|
418
|
+
if (!onlySvg) {
|
|
419
|
+
const $axisEl = $rendered.find('.area-chart-axis');
|
|
420
|
+
const $legendEl = $rendered.find('.area-chart-legend');
|
|
421
|
+
extend(self, {
|
|
422
|
+
$axisEl,
|
|
423
|
+
$legendEl
|
|
424
|
+
});
|
|
425
|
+
self.$el.append($axisEl);
|
|
426
|
+
self.$el.append($legendEl);
|
|
427
|
+
}
|
|
428
|
+
self.$el.prepend($svgEl);
|
|
429
|
+
self.attachEvents();
|
|
430
|
+
return self;
|
|
431
|
+
}
|
|
432
|
+
init() {
|
|
433
|
+
const self = this;
|
|
434
|
+
const $rendered = $(self.render());
|
|
435
|
+
const $svgEl = $rendered.find('svg');
|
|
436
|
+
const $axisEl = $rendered.find('.area-chart-axis');
|
|
437
|
+
const $legendEl = $rendered.find('.area-chart-legend');
|
|
438
|
+
extend(self, {
|
|
439
|
+
svgEl: $svgEl && $svgEl[0],
|
|
440
|
+
$svgEl,
|
|
441
|
+
$axisEl,
|
|
442
|
+
$legendEl
|
|
443
|
+
});
|
|
444
|
+
self.$el.append($svgEl);
|
|
445
|
+
self.$el.append($axisEl);
|
|
446
|
+
self.$el.append($legendEl);
|
|
447
|
+
self.attachEvents();
|
|
448
|
+
return self;
|
|
449
|
+
}
|
|
450
|
+
destroy() {
|
|
451
|
+
const self = this;
|
|
452
|
+
if (!self.$el || self.destroyed) return;
|
|
453
|
+
self.$el.trigger('piechart:beforedestroy');
|
|
454
|
+
self.emit('local::beforeDestroy areaChartBeforeDestroy', self);
|
|
455
|
+
self.detachEvents();
|
|
456
|
+
self.$svgEl.remove();
|
|
457
|
+
self.$axisEl.remove();
|
|
458
|
+
self.$legendEl.remove();
|
|
459
|
+
if (self.f7Tooltip && self.f7Tooltip.destroy) {
|
|
460
|
+
self.f7Tooltip.destroy();
|
|
461
|
+
}
|
|
462
|
+
delete self.$el[0].f7AreaChart;
|
|
463
|
+
deleteProps(self);
|
|
464
|
+
self.destroyed = true;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
export default AreaChart;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--f7-area-chart-current-line-stroke-width:2px;--f7-area-chart-current-line-stroke:rgba(0, 0, 0, 0.15);--f7-area-chart-axis-text-color:inherit;--f7-area-chart-axis-height:1px;--f7-area-chart-axis-font-size:10px;--f7-area-chart-axis-font-weight:500;--f7-area-chart-tooltip-font-size:12px;--f7-area-chart-tooltip-total-font-size:16px;--f7-area-chart-tooltip-total-font-weight:bold;--f7-area-chart-tooltip-color-size:10px;--f7-area-chart-legend-font-size:14px;--f7-area-chart-legend-font-weight:500;--f7-area-chart-legend-text-color:inherit;--f7-area-chart-legend-padding:4px 8px;--f7-area-chart-legend-border-radius:4px;--f7-area-chart-legend-color-size:14px;--f7-area-chart-line-stroke-width:2px;--f7-area-chart-axis-bg-color:rgba(0, 0, 0, 0.15);--f7-area-chart-legend-disabled-text-color:rgba(0, 0, 0, 0.22)}:root .dark,:root.dark{--f7-area-chart-axis-bg-color:rgba(255, 255, 255, 0.15);--f7-area-chart-legend-disabled-text-color:rgba(255, 255, 255, 0.22)}.ios{--f7-area-chart-tooltip-total-label-text-color:rgba(255, 255, 255, 0.75)}.md{--f7-area-chart-tooltip-total-label-text-color:inherit}.area-chart{position:relative}.area-chart svg{display:block;width:100%;font-size:0;height:auto;margin:0 auto}.area-chart path{fill:none;stroke-width:var(--f7-area-chart-line-stroke-width)}.area-chart-current-line{stroke:var(--f7-area-chart-current-line-stroke);stroke-width:var(--f7-area-chart-current-line-stroke-width)}.area-chart-axis{height:var(--f7-area-chart-axis-height);background:var(--f7-area-chart-axis-bg-color);color:var(--f7-area-chart-axis-text-color);display:flex;font-size:var(--f7-area-chart-axis-font-size);font-weight:var(--f7-area-chart-axis-font-weight);justify-content:space-between;line-height:1;margin-bottom:2em}.area-chart-axis>span{padding-top:10px;width:0;display:flex;align-items:flex-start;justify-content:center;white-space:nowrap}.area-chart-axis>span:first-child{justify-content:flex-start}.area-chart-axis>span:last-child{justify-content:flex-end}.area-chart-tooltip{pointer-events:none;text-align:left;font-size:var(--f7-area-chart-tooltip-font-size);line-height:1.4}.area-chart-tooltip-label{color:var(--f7-area-chart-tooltip-total-label-text-color)}.area-chart-tooltip-total{font-size:var(--f7-area-chart-tooltip-total-font-size);font-weight:var(--f7-area-chart-tooltip-total-font-weight)}.area-chart-tooltip-list{list-style:none;margin:0;padding:0}.area-chart-tooltip-list li{white-space:nowrap}.area-chart-tooltip-list span{display:inline-block;width:var(--f7-area-chart-tooltip-color-size);height:var(--f7-area-chart-tooltip-color-size);border-radius:50%;margin-right:4px}.area-chart-axis~.area-chart-legend{margin-top:2em}.area-chart-legend{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;font-size:var(--f7-area-chart-legend-font-size);width:100%;margin-top:1em}.area-chart-legend-button{-webkit-appearance:none!important;appearance:none!important;background-color:transparent;border-radius:0;border:none;outline:0!important;cursor:pointer;font-family:inherit;font-size:inherit;box-shadow:none!important}.area-chart-legend-item{position:relative;color:var(--f7-area-chart-legend-text-color);width:auto;display:flex;align-items:center;font-weight:var(--f7-area-chart-legend-font-weight);transition-duration:.2s;padding:var(--f7-area-chart-legend-padding);border-radius:var(--f7-area-chart-legend-border-radius);overflow:hidden}.area-chart-legend-item span{width:var(--f7-area-chart-legend-color-size);height:var(--f7-area-chart-legend-color-size);margin-right:4px;border-radius:50%;transition-duration:.2s}.area-chart-legend-item-hidden{color:var(--f7-area-chart-legend-disabled-text-color)}.area-chart-legend-item-hidden span{background-color:var(--f7-area-chart-legend-disabled-text-color)!important}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--f7-area-chart-current-line-stroke-width: 2px;
|
|
3
|
+
--f7-area-chart-current-line-stroke: rgba(0, 0, 0, 0.15);
|
|
4
|
+
--f7-area-chart-axis-text-color: inherit;
|
|
5
|
+
--f7-area-chart-axis-height: 1px;
|
|
6
|
+
--f7-area-chart-axis-font-size: 10px;
|
|
7
|
+
--f7-area-chart-axis-font-weight: 500;
|
|
8
|
+
--f7-area-chart-tooltip-font-size: 12px;
|
|
9
|
+
--f7-area-chart-tooltip-total-font-size: 16px;
|
|
10
|
+
--f7-area-chart-tooltip-total-font-weight: bold;
|
|
11
|
+
--f7-area-chart-tooltip-color-size: 10px;
|
|
12
|
+
--f7-area-chart-legend-font-size: 14px;
|
|
13
|
+
--f7-area-chart-legend-font-weight: 500;
|
|
14
|
+
--f7-area-chart-legend-text-color: inherit;
|
|
15
|
+
--f7-area-chart-legend-padding: 4px 8px;
|
|
16
|
+
--f7-area-chart-legend-border-radius: 4px;
|
|
17
|
+
--f7-area-chart-legend-color-size: 14px;
|
|
18
|
+
--f7-area-chart-line-stroke-width: 2px;
|
|
19
|
+
|
|
20
|
+
.light-vars({
|
|
21
|
+
--f7-area-chart-axis-bg-color: rgba(0, 0, 0, 0.15);
|
|
22
|
+
--f7-area-chart-legend-disabled-text-color: rgba(0,0,0,0.22);
|
|
23
|
+
});
|
|
24
|
+
.dark-vars({
|
|
25
|
+
--f7-area-chart-axis-bg-color: rgba(255, 255, 255, 0.15);
|
|
26
|
+
--f7-area-chart-legend-disabled-text-color: rgba(255, 255, 255, 0.22);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.ios-vars({
|
|
31
|
+
--f7-area-chart-tooltip-total-label-text-color: rgba(255, 255, 255, 0.75);
|
|
32
|
+
});
|
|
33
|
+
.md-vars({
|
|
34
|
+
--f7-area-chart-tooltip-total-label-text-color: inherit;
|
|
35
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--f7-area-chart-current-line-stroke-width:2px;--f7-area-chart-current-line-stroke:rgba(0, 0, 0, 0.15);--f7-area-chart-axis-text-color:inherit;--f7-area-chart-axis-height:1px;--f7-area-chart-axis-font-size:10px;--f7-area-chart-axis-font-weight:500;--f7-area-chart-tooltip-font-size:12px;--f7-area-chart-tooltip-total-font-size:16px;--f7-area-chart-tooltip-total-font-weight:bold;--f7-area-chart-tooltip-color-size:10px;--f7-area-chart-legend-font-size:14px;--f7-area-chart-legend-font-weight:500;--f7-area-chart-legend-text-color:inherit;--f7-area-chart-legend-padding:4px 8px;--f7-area-chart-legend-border-radius:4px;--f7-area-chart-legend-color-size:14px;--f7-area-chart-line-stroke-width:2px;--f7-area-chart-axis-bg-color:rgba(0, 0, 0, 0.15);--f7-area-chart-legend-disabled-text-color:rgba(0, 0, 0, 0.22)}:root .dark,:root.dark{--f7-area-chart-axis-bg-color:rgba(255, 255, 255, 0.15);--f7-area-chart-legend-disabled-text-color:rgba(255, 255, 255, 0.22)}.ios{--f7-area-chart-tooltip-total-label-text-color:rgba(255, 255, 255, 0.75)}.md{--f7-area-chart-tooltip-total-label-text-color:inherit}.area-chart{position:relative}.area-chart svg{display:block;width:100%;font-size:0;height:auto;margin:0 auto}.area-chart path{fill:none;stroke-width:var(--f7-area-chart-line-stroke-width)}.area-chart-current-line{stroke:var(--f7-area-chart-current-line-stroke);stroke-width:var(--f7-area-chart-current-line-stroke-width)}.area-chart-axis{height:var(--f7-area-chart-axis-height);background:var(--f7-area-chart-axis-bg-color);color:var(--f7-area-chart-axis-text-color);display:flex;font-size:var(--f7-area-chart-axis-font-size);font-weight:var(--f7-area-chart-axis-font-weight);justify-content:space-between;line-height:1;margin-bottom:2em}.area-chart-axis>span{padding-top:10px;width:0;display:flex;align-items:flex-start;justify-content:center;white-space:nowrap}.area-chart-axis>span:first-child{justify-content:flex-start}.area-chart-axis>span:last-child{justify-content:flex-end}.area-chart-tooltip{pointer-events:none;text-align:left;font-size:var(--f7-area-chart-tooltip-font-size);line-height:1.4}.area-chart-tooltip-label{color:var(--f7-area-chart-tooltip-total-label-text-color)}.area-chart-tooltip-total{font-size:var(--f7-area-chart-tooltip-total-font-size);font-weight:var(--f7-area-chart-tooltip-total-font-weight)}.area-chart-tooltip-list{list-style:none;margin:0;padding:0}.area-chart-tooltip-list li{white-space:nowrap}.area-chart-tooltip-list span{display:inline-block;width:var(--f7-area-chart-tooltip-color-size);height:var(--f7-area-chart-tooltip-color-size);border-radius:50%;margin-right:4px}.area-chart-axis~.area-chart-legend{margin-top:2em}.area-chart-legend{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;font-size:var(--f7-area-chart-legend-font-size);width:100%;margin-top:1em}.area-chart-legend-button{-webkit-appearance:none!important;appearance:none!important;background-color:transparent;border-radius:0;border:none;outline:0!important;cursor:pointer;font-family:inherit;font-size:inherit;box-shadow:none!important}.area-chart-legend-item{position:relative;color:var(--f7-area-chart-legend-text-color);width:auto;display:flex;align-items:center;font-weight:var(--f7-area-chart-legend-font-weight);transition-duration:.2s;padding:var(--f7-area-chart-legend-padding);border-radius:var(--f7-area-chart-legend-border-radius);overflow:hidden}.area-chart-legend-item span{width:var(--f7-area-chart-legend-color-size);height:var(--f7-area-chart-legend-color-size);margin-right:4px;border-radius:50%;transition-duration:.2s}.area-chart-legend-item-hidden{color:var(--f7-area-chart-legend-disabled-text-color)}.area-chart-legend-item-hidden span{background-color:var(--f7-area-chart-legend-disabled-text-color)!important}
|