@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,183 @@
|
|
|
1
|
+
import $ from '../../../shared/dom7.js';
|
|
2
|
+
/** @jsx $jsx */
|
|
3
|
+
import $jsx from '../../../shared/$jsx.js';
|
|
4
|
+
export default {
|
|
5
|
+
render(self) {
|
|
6
|
+
const {
|
|
7
|
+
barLabel,
|
|
8
|
+
barValue,
|
|
9
|
+
barValueEditable,
|
|
10
|
+
redLabelText,
|
|
11
|
+
greenLabelText,
|
|
12
|
+
blueLabelText
|
|
13
|
+
} = self.params;
|
|
14
|
+
return $jsx("div", {
|
|
15
|
+
class: "color-picker-module color-picker-module-rgb-bars"
|
|
16
|
+
}, $jsx("div", {
|
|
17
|
+
class: "color-picker-bar-wrap"
|
|
18
|
+
}, barLabel && $jsx("div", {
|
|
19
|
+
class: "color-picker-bar-label"
|
|
20
|
+
}, redLabelText), $jsx("div", {
|
|
21
|
+
class: "range-slider color-picker-bar color-picker-bar-red"
|
|
22
|
+
}), barValue && $jsx("div", {
|
|
23
|
+
class: "color-picker-bar-value"
|
|
24
|
+
}, barValueEditable ? $jsx("input", {
|
|
25
|
+
type: "number",
|
|
26
|
+
step: "1",
|
|
27
|
+
min: "0",
|
|
28
|
+
max: "255",
|
|
29
|
+
class: "color-picker-value-bar-red",
|
|
30
|
+
"data-color-index": "0"
|
|
31
|
+
}) : $jsx("span", {
|
|
32
|
+
class: "color-picker-value-bar-red"
|
|
33
|
+
}))), $jsx("div", {
|
|
34
|
+
class: "color-picker-bar-wrap"
|
|
35
|
+
}, barLabel && $jsx("div", {
|
|
36
|
+
class: "color-picker-bar-label"
|
|
37
|
+
}, greenLabelText), $jsx("div", {
|
|
38
|
+
class: "range-slider color-picker-bar color-picker-bar-green"
|
|
39
|
+
}), barValue && $jsx("div", {
|
|
40
|
+
class: "color-picker-bar-value"
|
|
41
|
+
}, barValueEditable ? $jsx("input", {
|
|
42
|
+
type: "number",
|
|
43
|
+
step: "1",
|
|
44
|
+
min: "0",
|
|
45
|
+
max: "255",
|
|
46
|
+
class: "color-picker-value-bar-green",
|
|
47
|
+
"data-color-index": "1"
|
|
48
|
+
}) : $jsx("span", {
|
|
49
|
+
class: "color-picker-value-bar-green"
|
|
50
|
+
}))), $jsx("div", {
|
|
51
|
+
class: "color-picker-bar-wrap"
|
|
52
|
+
}, barLabel && $jsx("div", {
|
|
53
|
+
class: "color-picker-bar-label"
|
|
54
|
+
}, blueLabelText), $jsx("div", {
|
|
55
|
+
class: "range-slider color-picker-bar color-picker-bar-blue"
|
|
56
|
+
}), barValue && $jsx("div", {
|
|
57
|
+
class: "color-picker-bar-value"
|
|
58
|
+
}, barValueEditable ? $jsx("input", {
|
|
59
|
+
type: "number",
|
|
60
|
+
step: "1",
|
|
61
|
+
min: "0",
|
|
62
|
+
max: "255",
|
|
63
|
+
class: "color-picker-value-bar-blue",
|
|
64
|
+
"data-color-index": "2"
|
|
65
|
+
}) : $jsx("span", {
|
|
66
|
+
class: "color-picker-value-bar-blue"
|
|
67
|
+
}))));
|
|
68
|
+
},
|
|
69
|
+
init(self) {
|
|
70
|
+
self.redBar = self.app.range.create({
|
|
71
|
+
el: self.$el.find('.color-picker-bar-red'),
|
|
72
|
+
min: 0,
|
|
73
|
+
max: 255,
|
|
74
|
+
step: 1,
|
|
75
|
+
value: 0,
|
|
76
|
+
vertical: true,
|
|
77
|
+
on: {
|
|
78
|
+
change(range, value) {
|
|
79
|
+
self.setValue({
|
|
80
|
+
rgb: [value, self.value.rgb[1], self.value.rgb[2]]
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
self.greenBar = self.app.range.create({
|
|
86
|
+
el: self.$el.find('.color-picker-bar-green'),
|
|
87
|
+
min: 0,
|
|
88
|
+
max: 255,
|
|
89
|
+
step: 1,
|
|
90
|
+
value: 0,
|
|
91
|
+
vertical: true,
|
|
92
|
+
on: {
|
|
93
|
+
change(range, value) {
|
|
94
|
+
self.setValue({
|
|
95
|
+
rgb: [self.value.rgb[0], value, self.value.rgb[2]]
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
self.blueBar = self.app.range.create({
|
|
101
|
+
el: self.$el.find('.color-picker-bar-blue'),
|
|
102
|
+
min: 0,
|
|
103
|
+
max: 255,
|
|
104
|
+
step: 1,
|
|
105
|
+
value: 0,
|
|
106
|
+
vertical: true,
|
|
107
|
+
on: {
|
|
108
|
+
change(range, value) {
|
|
109
|
+
self.setValue({
|
|
110
|
+
rgb: [self.value.rgb[0], self.value.rgb[1], value]
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
function handleInputChange(e) {
|
|
116
|
+
const rgb = [...self.value.rgb];
|
|
117
|
+
const index = parseInt($(e.target).attr('data-color-index'), 10);
|
|
118
|
+
let value = parseInt(e.target.value, 10);
|
|
119
|
+
if (Number.isNaN(value)) {
|
|
120
|
+
e.target.value = rgb[index];
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
value = Math.max(0, Math.min(255, value));
|
|
124
|
+
rgb[index] = value;
|
|
125
|
+
self.setValue({
|
|
126
|
+
rgb
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
self.$el.on('change', '.color-picker-module-rgb-bars input', handleInputChange);
|
|
130
|
+
self.destroyRgbBarsEvents = function destroyRgbBarsEvents() {
|
|
131
|
+
self.$el.off('change', '.color-picker-module-rgb-bars input', handleInputChange);
|
|
132
|
+
};
|
|
133
|
+
},
|
|
134
|
+
update(self) {
|
|
135
|
+
const {
|
|
136
|
+
value,
|
|
137
|
+
redBar,
|
|
138
|
+
greenBar,
|
|
139
|
+
blueBar
|
|
140
|
+
} = self;
|
|
141
|
+
const {
|
|
142
|
+
barValue,
|
|
143
|
+
barValueEditable
|
|
144
|
+
} = self.params;
|
|
145
|
+
const {
|
|
146
|
+
rgb
|
|
147
|
+
} = value;
|
|
148
|
+
redBar.value = rgb[0];
|
|
149
|
+
greenBar.value = rgb[1];
|
|
150
|
+
blueBar.value = rgb[2];
|
|
151
|
+
redBar.layout();
|
|
152
|
+
greenBar.layout();
|
|
153
|
+
blueBar.layout();
|
|
154
|
+
redBar.$el.find('.range-bar').css('background-image', `linear-gradient(to top, rgb(0, ${rgb[1]}, ${rgb[2]}), rgb(255, ${rgb[1]}, ${rgb[2]}))`);
|
|
155
|
+
greenBar.$el.find('.range-bar').css('background-image', `linear-gradient(to top, rgb(${rgb[0]}, 0, ${rgb[2]}), rgb(${rgb[0]}, 255, ${rgb[2]}))`);
|
|
156
|
+
blueBar.$el.find('.range-bar').css('background-image', `linear-gradient(to top, rgb(${rgb[0]}, ${rgb[1]}, 0), rgb(${rgb[0]}, ${rgb[1]}, 255))`);
|
|
157
|
+
if (barValue && barValueEditable) {
|
|
158
|
+
self.$el.find('input.color-picker-value-bar-red').val(rgb[0]);
|
|
159
|
+
self.$el.find('input.color-picker-value-bar-green').val(rgb[1]);
|
|
160
|
+
self.$el.find('input.color-picker-value-bar-blue').val(rgb[2]);
|
|
161
|
+
} else if (barValue) {
|
|
162
|
+
self.$el.find('span.color-picker-value-bar-red').text(rgb[0]);
|
|
163
|
+
self.$el.find('span.color-picker-value-bar-green').text(rgb[1]);
|
|
164
|
+
self.$el.find('span.color-picker-value-bar-blue').text(rgb[2]);
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
destroy(self) {
|
|
168
|
+
if (self.redBar && self.redBar.destroy) {
|
|
169
|
+
self.redBar.destroy();
|
|
170
|
+
}
|
|
171
|
+
if (self.greenBar && self.greenBar.destroy) {
|
|
172
|
+
self.greenBar.destroy();
|
|
173
|
+
}
|
|
174
|
+
if (self.blueBar && self.blueBar.destroy) {
|
|
175
|
+
self.blueBar.destroy();
|
|
176
|
+
}
|
|
177
|
+
delete self.redBar;
|
|
178
|
+
delete self.greenBar;
|
|
179
|
+
delete self.blueBar;
|
|
180
|
+
if (self.destroyRgbBarsEvents) self.destroyRgbBarsEvents();
|
|
181
|
+
delete self.destroyRgbBarsEvents;
|
|
182
|
+
}
|
|
183
|
+
};
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import $ from '../../../shared/dom7.js';
|
|
2
|
+
/** @jsx $jsx */
|
|
3
|
+
import $jsx from '../../../shared/$jsx.js';
|
|
4
|
+
export default {
|
|
5
|
+
render(self) {
|
|
6
|
+
const {
|
|
7
|
+
sliderLabel,
|
|
8
|
+
sliderValue,
|
|
9
|
+
sliderValueEditable,
|
|
10
|
+
redLabelText,
|
|
11
|
+
greenLabelText,
|
|
12
|
+
blueLabelText
|
|
13
|
+
} = self.params;
|
|
14
|
+
return $jsx("div", {
|
|
15
|
+
class: "color-picker-module color-picker-module-rgb-sliders"
|
|
16
|
+
}, $jsx("div", {
|
|
17
|
+
class: "color-picker-slider-wrap"
|
|
18
|
+
}, sliderLabel && $jsx("div", {
|
|
19
|
+
class: "color-picker-slider-label"
|
|
20
|
+
}, redLabelText), $jsx("div", {
|
|
21
|
+
class: "range-slider color-picker-slider color-picker-slider-red"
|
|
22
|
+
}), sliderValue && $jsx("div", {
|
|
23
|
+
class: "color-picker-slider-value"
|
|
24
|
+
}, sliderValueEditable ? $jsx("input", {
|
|
25
|
+
type: "number",
|
|
26
|
+
step: "1",
|
|
27
|
+
min: "0",
|
|
28
|
+
max: "255",
|
|
29
|
+
class: "color-picker-value-red",
|
|
30
|
+
"data-color-index": "0"
|
|
31
|
+
}) : $jsx("span", {
|
|
32
|
+
class: "color-picker-value-red"
|
|
33
|
+
}))), $jsx("div", {
|
|
34
|
+
class: "color-picker-slider-wrap"
|
|
35
|
+
}, sliderLabel && $jsx("div", {
|
|
36
|
+
class: "color-picker-slider-label"
|
|
37
|
+
}, greenLabelText), $jsx("div", {
|
|
38
|
+
class: "range-slider color-picker-slider color-picker-slider-green"
|
|
39
|
+
}), sliderValue && $jsx("div", {
|
|
40
|
+
class: "color-picker-slider-value"
|
|
41
|
+
}, sliderValueEditable ? $jsx("input", {
|
|
42
|
+
type: "number",
|
|
43
|
+
step: "1",
|
|
44
|
+
min: "0",
|
|
45
|
+
max: "255",
|
|
46
|
+
class: "color-picker-value-green",
|
|
47
|
+
"data-color-index": "1"
|
|
48
|
+
}) : $jsx("span", {
|
|
49
|
+
class: "color-picker-value-green"
|
|
50
|
+
}))), $jsx("div", {
|
|
51
|
+
class: "color-picker-slider-wrap"
|
|
52
|
+
}, sliderLabel && $jsx("div", {
|
|
53
|
+
class: "color-picker-slider-label"
|
|
54
|
+
}, blueLabelText), $jsx("div", {
|
|
55
|
+
class: "range-slider color-picker-slider color-picker-slider-blue"
|
|
56
|
+
}), sliderValue && $jsx("div", {
|
|
57
|
+
class: "color-picker-slider-value"
|
|
58
|
+
}, sliderValueEditable ? $jsx("input", {
|
|
59
|
+
type: "number",
|
|
60
|
+
step: "1",
|
|
61
|
+
min: "0",
|
|
62
|
+
max: "255",
|
|
63
|
+
class: "color-picker-value-blue",
|
|
64
|
+
"data-color-index": "2"
|
|
65
|
+
}) : $jsx("span", {
|
|
66
|
+
class: "color-picker-value-blue"
|
|
67
|
+
}))));
|
|
68
|
+
},
|
|
69
|
+
init(self) {
|
|
70
|
+
self.redRangeSlider = self.app.range.create({
|
|
71
|
+
el: self.$el.find('.color-picker-slider-red'),
|
|
72
|
+
min: 0,
|
|
73
|
+
max: 255,
|
|
74
|
+
step: 1,
|
|
75
|
+
value: 0,
|
|
76
|
+
on: {
|
|
77
|
+
change(range, value) {
|
|
78
|
+
self.setValue({
|
|
79
|
+
rgb: [value, self.value.rgb[1], self.value.rgb[2]]
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
self.greenRangeSlider = self.app.range.create({
|
|
85
|
+
el: self.$el.find('.color-picker-slider-green'),
|
|
86
|
+
min: 0,
|
|
87
|
+
max: 255,
|
|
88
|
+
step: 1,
|
|
89
|
+
value: 0,
|
|
90
|
+
on: {
|
|
91
|
+
change(range, value) {
|
|
92
|
+
self.setValue({
|
|
93
|
+
rgb: [self.value.rgb[0], value, self.value.rgb[2]]
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
self.blueRangeSlider = self.app.range.create({
|
|
99
|
+
el: self.$el.find('.color-picker-slider-blue'),
|
|
100
|
+
min: 0,
|
|
101
|
+
max: 255,
|
|
102
|
+
step: 1,
|
|
103
|
+
value: 0,
|
|
104
|
+
on: {
|
|
105
|
+
change(range, value) {
|
|
106
|
+
self.setValue({
|
|
107
|
+
rgb: [self.value.rgb[0], self.value.rgb[1], value]
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
function handleInputChange(e) {
|
|
113
|
+
const rgb = [...self.value.rgb];
|
|
114
|
+
const index = parseInt($(e.target).attr('data-color-index'), 10);
|
|
115
|
+
let value = parseInt(e.target.value, 10);
|
|
116
|
+
if (Number.isNaN(value)) {
|
|
117
|
+
e.target.value = rgb[index];
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
value = Math.max(0, Math.min(255, value));
|
|
121
|
+
rgb[index] = value;
|
|
122
|
+
self.setValue({
|
|
123
|
+
rgb
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
self.$el.on('change', '.color-picker-module-rgb-sliders input', handleInputChange);
|
|
127
|
+
self.destroyRgbSlidersEvents = function destroyRgbSlidersEvents() {
|
|
128
|
+
self.$el.off('change', '.color-picker-module-rgb-sliders input', handleInputChange);
|
|
129
|
+
};
|
|
130
|
+
},
|
|
131
|
+
update(self) {
|
|
132
|
+
const {
|
|
133
|
+
app,
|
|
134
|
+
value,
|
|
135
|
+
redRangeSlider,
|
|
136
|
+
greenRangeSlider,
|
|
137
|
+
blueRangeSlider
|
|
138
|
+
} = self;
|
|
139
|
+
const {
|
|
140
|
+
sliderValue,
|
|
141
|
+
sliderValueEditable
|
|
142
|
+
} = self.params;
|
|
143
|
+
const {
|
|
144
|
+
rgb
|
|
145
|
+
} = value;
|
|
146
|
+
redRangeSlider.value = rgb[0];
|
|
147
|
+
greenRangeSlider.value = rgb[1];
|
|
148
|
+
blueRangeSlider.value = rgb[2];
|
|
149
|
+
redRangeSlider.layout();
|
|
150
|
+
greenRangeSlider.layout();
|
|
151
|
+
blueRangeSlider.layout();
|
|
152
|
+
redRangeSlider.$el[0].style.setProperty('--f7-range-knob-color', `rgb(${rgb[0]}, ${rgb[1]}, ${rgb[2]})`);
|
|
153
|
+
greenRangeSlider.$el[0].style.setProperty('--f7-range-knob-color', `rgb(${rgb[0]}, ${rgb[1]}, ${rgb[2]})`);
|
|
154
|
+
blueRangeSlider.$el[0].style.setProperty('--f7-range-knob-color', `rgb(${rgb[0]}, ${rgb[1]}, ${rgb[2]})`);
|
|
155
|
+
const direction = app.rtl ? 'to left' : 'to right';
|
|
156
|
+
redRangeSlider.$el.find('.range-bar').css('background-image', `linear-gradient(${direction}, rgb(0, ${rgb[1]}, ${rgb[2]}), rgb(255, ${rgb[1]}, ${rgb[2]}))`);
|
|
157
|
+
greenRangeSlider.$el.find('.range-bar').css('background-image', `linear-gradient(${direction}, rgb(${rgb[0]}, 0, ${rgb[2]}), rgb(${rgb[0]}, 255, ${rgb[2]}))`);
|
|
158
|
+
blueRangeSlider.$el.find('.range-bar').css('background-image', `linear-gradient(${direction}, rgb(${rgb[0]}, ${rgb[1]}, 0), rgb(${rgb[0]}, ${rgb[1]}, 255))`);
|
|
159
|
+
if (sliderValue && sliderValueEditable) {
|
|
160
|
+
self.$el.find('input.color-picker-value-red').val(rgb[0]);
|
|
161
|
+
self.$el.find('input.color-picker-value-green').val(rgb[1]);
|
|
162
|
+
self.$el.find('input.color-picker-value-blue').val(rgb[2]);
|
|
163
|
+
} else if (sliderValue) {
|
|
164
|
+
self.$el.find('span.color-picker-value-red').text(rgb[0]);
|
|
165
|
+
self.$el.find('span.color-picker-value-green').text(rgb[1]);
|
|
166
|
+
self.$el.find('span.color-picker-value-blue').text(rgb[2]);
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
destroy(self) {
|
|
170
|
+
if (self.redRangeSlider && self.redRangeSlider.destroy) {
|
|
171
|
+
self.redRangeSlider.destroy();
|
|
172
|
+
}
|
|
173
|
+
if (self.greenRangeSlider && self.greenRangeSlider.destroy) {
|
|
174
|
+
self.greenRangeSlider.destroy();
|
|
175
|
+
}
|
|
176
|
+
if (self.blueRangeSlider && self.blueRangeSlider.destroy) {
|
|
177
|
+
self.blueRangeSlider.destroy();
|
|
178
|
+
}
|
|
179
|
+
delete self.redRangeSlider;
|
|
180
|
+
delete self.greenRangeSlider;
|
|
181
|
+
delete self.blueRangeSlider;
|
|
182
|
+
if (self.destroyRgbSlidersEvents) self.destroyRgbSlidersEvents();
|
|
183
|
+
delete self.destroyRgbSlidersEvents;
|
|
184
|
+
}
|
|
185
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import $ from '../../../shared/dom7.js';
|
|
2
|
+
import { getSupport } from '../../../shared/get-support.js';
|
|
3
|
+
/** @jsx $jsx */
|
|
4
|
+
import $jsx from '../../../shared/$jsx.js';
|
|
5
|
+
export default {
|
|
6
|
+
render() {
|
|
7
|
+
return $jsx("div", {
|
|
8
|
+
class: "color-picker-module color-picker-module-sb-spectrum"
|
|
9
|
+
}, $jsx("div", {
|
|
10
|
+
class: "color-picker-sb-spectrum",
|
|
11
|
+
style: "background-color: hsl(0, 100%, 50%)"
|
|
12
|
+
}, $jsx("div", {
|
|
13
|
+
class: "color-picker-sb-spectrum-handle"
|
|
14
|
+
})));
|
|
15
|
+
},
|
|
16
|
+
init(self) {
|
|
17
|
+
const {
|
|
18
|
+
app
|
|
19
|
+
} = self;
|
|
20
|
+
let isTouched;
|
|
21
|
+
let isMoved;
|
|
22
|
+
let touchStartX;
|
|
23
|
+
let touchStartY;
|
|
24
|
+
let touchCurrentX;
|
|
25
|
+
let touchCurrentY;
|
|
26
|
+
let specterRect;
|
|
27
|
+
let specterIsTouched;
|
|
28
|
+
let specterHandleIsTouched;
|
|
29
|
+
const {
|
|
30
|
+
$el
|
|
31
|
+
} = self;
|
|
32
|
+
function setSBFromSpecterCoords(x, y) {
|
|
33
|
+
let s = (x - specterRect.left) / specterRect.width;
|
|
34
|
+
let b = (y - specterRect.top) / specterRect.height;
|
|
35
|
+
s = Math.max(0, Math.min(1, s));
|
|
36
|
+
b = 1 - Math.max(0, Math.min(1, b));
|
|
37
|
+
self.setValue({
|
|
38
|
+
hsb: [self.value.hue, s, b]
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function handleTouchStart(e) {
|
|
42
|
+
if (isMoved || isTouched) return;
|
|
43
|
+
touchStartX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
|
|
44
|
+
touchCurrentX = touchStartX;
|
|
45
|
+
touchStartY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
|
|
46
|
+
touchCurrentY = touchStartY;
|
|
47
|
+
const $targetEl = $(e.target);
|
|
48
|
+
specterHandleIsTouched = $targetEl.closest('.color-picker-sb-spectrum-handle').length > 0;
|
|
49
|
+
if (!specterHandleIsTouched) {
|
|
50
|
+
specterIsTouched = $targetEl.closest('.color-picker-sb-spectrum').length > 0;
|
|
51
|
+
}
|
|
52
|
+
if (specterIsTouched) {
|
|
53
|
+
specterRect = $el.find('.color-picker-sb-spectrum')[0].getBoundingClientRect();
|
|
54
|
+
setSBFromSpecterCoords(touchStartX, touchStartY);
|
|
55
|
+
}
|
|
56
|
+
if (specterHandleIsTouched || specterIsTouched) {
|
|
57
|
+
$el.find('.color-picker-sb-spectrum-handle').addClass('color-picker-sb-spectrum-handle-pressed');
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function handleTouchMove(e) {
|
|
61
|
+
if (!(specterIsTouched || specterHandleIsTouched)) return;
|
|
62
|
+
touchCurrentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
|
|
63
|
+
touchCurrentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
if (!isMoved) {
|
|
66
|
+
// First move
|
|
67
|
+
isMoved = true;
|
|
68
|
+
if (specterHandleIsTouched) {
|
|
69
|
+
specterRect = $el.find('.color-picker-sb-spectrum')[0].getBoundingClientRect();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (specterIsTouched || specterHandleIsTouched) {
|
|
73
|
+
setSBFromSpecterCoords(touchCurrentX, touchCurrentY);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function handleTouchEnd() {
|
|
77
|
+
isMoved = false;
|
|
78
|
+
if (specterIsTouched || specterHandleIsTouched) {
|
|
79
|
+
$el.find('.color-picker-sb-spectrum-handle').removeClass('color-picker-sb-spectrum-handle-pressed');
|
|
80
|
+
}
|
|
81
|
+
specterIsTouched = false;
|
|
82
|
+
specterHandleIsTouched = false;
|
|
83
|
+
}
|
|
84
|
+
function handleResize() {
|
|
85
|
+
self.modules['sb-spectrum'].update(self);
|
|
86
|
+
}
|
|
87
|
+
const passiveListener = app.touchEvents.start === 'touchstart' && getSupport().passiveListener ? {
|
|
88
|
+
passive: true,
|
|
89
|
+
capture: false
|
|
90
|
+
} : false;
|
|
91
|
+
self.$el.on(app.touchEvents.start, handleTouchStart, passiveListener);
|
|
92
|
+
app.on('touchmove:active', handleTouchMove);
|
|
93
|
+
app.on('touchend:passive', handleTouchEnd);
|
|
94
|
+
app.on('resize', handleResize);
|
|
95
|
+
self.destroySpectrumEvents = function destroySpectrumEvents() {
|
|
96
|
+
self.$el.off(app.touchEvents.start, handleTouchStart, passiveListener);
|
|
97
|
+
app.off('touchmove:active', handleTouchMove);
|
|
98
|
+
app.off('touchend:passive', handleTouchEnd);
|
|
99
|
+
app.off('resize', handleResize);
|
|
100
|
+
};
|
|
101
|
+
},
|
|
102
|
+
update(self) {
|
|
103
|
+
const {
|
|
104
|
+
value
|
|
105
|
+
} = self;
|
|
106
|
+
const {
|
|
107
|
+
hsl,
|
|
108
|
+
hsb
|
|
109
|
+
} = value;
|
|
110
|
+
const specterWidth = self.$el.find('.color-picker-sb-spectrum')[0].offsetWidth;
|
|
111
|
+
const specterHeight = self.$el.find('.color-picker-sb-spectrum')[0].offsetHeight;
|
|
112
|
+
self.$el.find('.color-picker-sb-spectrum').css('background-color', `hsl(${hsl[0]}, 100%, 50%)`);
|
|
113
|
+
self.$el.find('.color-picker-sb-spectrum-handle').css('background-color', `hsl(${hsl[0]}, ${hsl[1] * 100}%, ${hsl[2] * 100}%)`).transform(`translate(${specterWidth * hsb[1]}px, ${specterHeight * (1 - hsb[2])}px)`);
|
|
114
|
+
},
|
|
115
|
+
destroy(self) {
|
|
116
|
+
if (self.destroySpectrumEvents) self.destroySpectrumEvents();
|
|
117
|
+
delete self.destroySpectrumEvents;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import $ from '../../../shared/dom7.js';
|
|
2
|
+
import { getSupport } from '../../../shared/get-support.js';
|
|
3
|
+
/** @jsx $jsx */
|
|
4
|
+
import $jsx from '../../../shared/$jsx.js';
|
|
5
|
+
function svgWheelCircles() {
|
|
6
|
+
const total = 256;
|
|
7
|
+
let circles = '';
|
|
8
|
+
for (let i = total; i > 0; i -= 1) {
|
|
9
|
+
const angle = i * Math.PI / (total / 2);
|
|
10
|
+
const hue = 360 / total * i;
|
|
11
|
+
circles += `<circle cx="${150 - Math.sin(angle) * 125}" cy="${150 - Math.cos(angle) * 125}" r="25" fill="hsl(${hue}, 100%, 50%)"></circle>`;
|
|
12
|
+
}
|
|
13
|
+
return circles;
|
|
14
|
+
}
|
|
15
|
+
export default {
|
|
16
|
+
render() {
|
|
17
|
+
return $jsx("div", {
|
|
18
|
+
class: "color-picker-module color-picker-module-wheel"
|
|
19
|
+
}, $jsx("div", {
|
|
20
|
+
class: "color-picker-wheel"
|
|
21
|
+
}, $jsx("svg", {
|
|
22
|
+
viewBox: "0 0 300 300",
|
|
23
|
+
width: "300",
|
|
24
|
+
height: "300"
|
|
25
|
+
}, svgWheelCircles()), $jsx("div", {
|
|
26
|
+
class: "color-picker-wheel-handle"
|
|
27
|
+
}), $jsx("div", {
|
|
28
|
+
class: "color-picker-sb-spectrum",
|
|
29
|
+
style: "background-color: hsl(0, 100%, 50%)"
|
|
30
|
+
}, $jsx("div", {
|
|
31
|
+
class: "color-picker-sb-spectrum-handle"
|
|
32
|
+
}))));
|
|
33
|
+
},
|
|
34
|
+
init(self) {
|
|
35
|
+
const {
|
|
36
|
+
app
|
|
37
|
+
} = self;
|
|
38
|
+
let isTouched;
|
|
39
|
+
let isMoved;
|
|
40
|
+
let touchStartX;
|
|
41
|
+
let touchStartY;
|
|
42
|
+
let touchCurrentX;
|
|
43
|
+
let touchCurrentY;
|
|
44
|
+
let wheelRect;
|
|
45
|
+
let wheelIsTouched;
|
|
46
|
+
let wheelHandleIsTouched;
|
|
47
|
+
let specterRect;
|
|
48
|
+
let specterIsTouched;
|
|
49
|
+
let specterHandleIsTouched;
|
|
50
|
+
const {
|
|
51
|
+
$el
|
|
52
|
+
} = self;
|
|
53
|
+
function setHueFromWheelCoords(x, y) {
|
|
54
|
+
const wheelCenterX = wheelRect.left + wheelRect.width / 2;
|
|
55
|
+
const wheelCenterY = wheelRect.top + wheelRect.height / 2;
|
|
56
|
+
const angleRad = Math.atan2(y - wheelCenterY, x - wheelCenterX);
|
|
57
|
+
let angleDeg = angleRad * 180 / Math.PI + 90;
|
|
58
|
+
if (angleDeg < 0) angleDeg += 360;
|
|
59
|
+
angleDeg = 360 - angleDeg;
|
|
60
|
+
self.setValue({
|
|
61
|
+
hue: angleDeg
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function setSBFromSpecterCoords(x, y) {
|
|
65
|
+
let s = (x - specterRect.left) / specterRect.width;
|
|
66
|
+
let b = (y - specterRect.top) / specterRect.height;
|
|
67
|
+
s = Math.max(0, Math.min(1, s));
|
|
68
|
+
b = 1 - Math.max(0, Math.min(1, b));
|
|
69
|
+
self.setValue({
|
|
70
|
+
hsb: [self.value.hue, s, b]
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function handleTouchStart(e) {
|
|
74
|
+
if (isMoved || isTouched) return;
|
|
75
|
+
touchStartX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
|
|
76
|
+
touchCurrentX = touchStartX;
|
|
77
|
+
touchStartY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
|
|
78
|
+
touchCurrentY = touchStartY;
|
|
79
|
+
const $targetEl = $(e.target);
|
|
80
|
+
wheelHandleIsTouched = $targetEl.closest('.color-picker-wheel-handle').length > 0;
|
|
81
|
+
wheelIsTouched = $targetEl.closest('circle').length > 0;
|
|
82
|
+
specterHandleIsTouched = $targetEl.closest('.color-picker-sb-spectrum-handle').length > 0;
|
|
83
|
+
if (!specterHandleIsTouched) {
|
|
84
|
+
specterIsTouched = $targetEl.closest('.color-picker-sb-spectrum').length > 0;
|
|
85
|
+
}
|
|
86
|
+
if (wheelIsTouched) {
|
|
87
|
+
wheelRect = $el.find('.color-picker-wheel')[0].getBoundingClientRect();
|
|
88
|
+
setHueFromWheelCoords(touchStartX, touchStartY);
|
|
89
|
+
}
|
|
90
|
+
if (specterIsTouched) {
|
|
91
|
+
specterRect = $el.find('.color-picker-sb-spectrum')[0].getBoundingClientRect();
|
|
92
|
+
setSBFromSpecterCoords(touchStartX, touchStartY);
|
|
93
|
+
}
|
|
94
|
+
if (specterHandleIsTouched || specterIsTouched) {
|
|
95
|
+
$el.find('.color-picker-sb-spectrum-handle').addClass('color-picker-sb-spectrum-handle-pressed');
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function handleTouchMove(e) {
|
|
99
|
+
if (!(wheelIsTouched || wheelHandleIsTouched) && !(specterIsTouched || specterHandleIsTouched)) return;
|
|
100
|
+
touchCurrentX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
|
|
101
|
+
touchCurrentY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
|
|
102
|
+
e.preventDefault();
|
|
103
|
+
if (!isMoved) {
|
|
104
|
+
// First move
|
|
105
|
+
isMoved = true;
|
|
106
|
+
if (wheelHandleIsTouched) {
|
|
107
|
+
wheelRect = $el.find('.color-picker-wheel')[0].getBoundingClientRect();
|
|
108
|
+
}
|
|
109
|
+
if (specterHandleIsTouched) {
|
|
110
|
+
specterRect = $el.find('.color-picker-sb-spectrum')[0].getBoundingClientRect();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (wheelIsTouched || wheelHandleIsTouched) {
|
|
114
|
+
setHueFromWheelCoords(touchCurrentX, touchCurrentY);
|
|
115
|
+
}
|
|
116
|
+
if (specterIsTouched || specterHandleIsTouched) {
|
|
117
|
+
setSBFromSpecterCoords(touchCurrentX, touchCurrentY);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function handleTouchEnd() {
|
|
121
|
+
isMoved = false;
|
|
122
|
+
if (specterIsTouched || specterHandleIsTouched) {
|
|
123
|
+
$el.find('.color-picker-sb-spectrum-handle').removeClass('color-picker-sb-spectrum-handle-pressed');
|
|
124
|
+
}
|
|
125
|
+
wheelIsTouched = false;
|
|
126
|
+
wheelHandleIsTouched = false;
|
|
127
|
+
specterIsTouched = false;
|
|
128
|
+
specterHandleIsTouched = false;
|
|
129
|
+
}
|
|
130
|
+
function handleResize() {
|
|
131
|
+
self.modules.wheel.update(self);
|
|
132
|
+
}
|
|
133
|
+
const passiveListener = app.touchEvents.start === 'touchstart' && getSupport().passiveListener ? {
|
|
134
|
+
passive: true,
|
|
135
|
+
capture: false
|
|
136
|
+
} : false;
|
|
137
|
+
self.$el.on(app.touchEvents.start, handleTouchStart, passiveListener);
|
|
138
|
+
app.on('touchmove:active', handleTouchMove);
|
|
139
|
+
app.on('touchend:passive', handleTouchEnd);
|
|
140
|
+
app.on('resize', handleResize);
|
|
141
|
+
self.destroyWheelEvents = function destroyWheelEvents() {
|
|
142
|
+
self.$el.off(app.touchEvents.start, handleTouchStart, passiveListener);
|
|
143
|
+
app.off('touchmove:active', handleTouchMove);
|
|
144
|
+
app.off('touchend:passive', handleTouchEnd);
|
|
145
|
+
app.off('resize', handleResize);
|
|
146
|
+
};
|
|
147
|
+
},
|
|
148
|
+
update(self) {
|
|
149
|
+
const {
|
|
150
|
+
value
|
|
151
|
+
} = self;
|
|
152
|
+
const {
|
|
153
|
+
hsl,
|
|
154
|
+
hsb
|
|
155
|
+
} = value;
|
|
156
|
+
const specterWidth = self.$el.find('.color-picker-sb-spectrum')[0].offsetWidth;
|
|
157
|
+
const specterHeight = self.$el.find('.color-picker-sb-spectrum')[0].offsetHeight;
|
|
158
|
+
const wheelSize = self.$el.find('.color-picker-wheel')[0].offsetWidth;
|
|
159
|
+
const wheelHalfSize = wheelSize / 2;
|
|
160
|
+
const angleRad = value.hue * Math.PI / 180;
|
|
161
|
+
const handleSize = wheelSize / 6;
|
|
162
|
+
const handleHalfSize = handleSize / 2;
|
|
163
|
+
const tX = wheelHalfSize - Math.sin(angleRad) * (wheelHalfSize - handleHalfSize) - handleHalfSize;
|
|
164
|
+
const tY = wheelHalfSize - Math.cos(angleRad) * (wheelHalfSize - handleHalfSize) - handleHalfSize;
|
|
165
|
+
self.$el.find('.color-picker-wheel-handle').css('background-color', `hsl(${hsl[0]}, 100%, 50%)`).transform(`translate(${tX}px, ${tY}px)`);
|
|
166
|
+
self.$el.find('.color-picker-sb-spectrum').css('background-color', `hsl(${hsl[0]}, 100%, 50%)`);
|
|
167
|
+
self.$el.find('.color-picker-sb-spectrum-handle').css('background-color', `hsl(${hsl[0]}, ${hsl[1] * 100}%, ${hsl[2] * 100}%)`).transform(`translate(${specterWidth * hsb[1]}px, ${specterHeight * (1 - hsb[2])}px)`);
|
|
168
|
+
},
|
|
169
|
+
destroy(self) {
|
|
170
|
+
if (self.destroyWheelEvents) self.destroyWheelEvents();
|
|
171
|
+
delete self.destroyWheelEvents;
|
|
172
|
+
}
|
|
173
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.md {
|
|
2
|
+
.contacts-list {
|
|
3
|
+
.list-group-title {
|
|
4
|
+
pointer-events: none;
|
|
5
|
+
overflow: visible;
|
|
6
|
+
width: 40px;
|
|
7
|
+
+ li {
|
|
8
|
+
margin-top: calc(var(--f7-contacts-list-title-height) * -1);
|
|
9
|
+
}
|
|
10
|
+
.hairline-remove(top);
|
|
11
|
+
}
|
|
12
|
+
li:not(.list-group-title) {
|
|
13
|
+
.ltr({
|
|
14
|
+
padding-left: 40px;
|
|
15
|
+
});
|
|
16
|
+
.rtl({
|
|
17
|
+
padding-right: 40px;
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ios{--f7-contacts-list-title-font-size:inherit;--f7-contacts-list-title-font-weight:600;--f7-contacts-list-title-height:22px;--f7-contacts-list-title-text-color:#000;--f7-contacts-list-title-bg-color:#f7f7f7}.ios .dark,.ios.dark{--f7-contacts-list-title-text-color:#fff;--f7-contacts-list-title-bg-color:#323234}.md{--f7-contacts-list-title-font-size:20px;--f7-contacts-list-title-font-weight:500;--f7-contacts-list-title-height:48px;--f7-contacts-list-title-bg-color:transparent}.md,.md .dark,.md [class*=color-]{--f7-contacts-list-title-text-color:var(--f7-theme-color)}.contacts-list{--f7-list-margin-vertical:0px}.contacts-list .list-group-title,.contacts-list li.list-group-title{background-color:var(--f7-contacts-list-title-bg-color,var(--f7-list-group-title-bg-color));font-weight:var(--f7-contacts-list-title-font-weight,var(--f7-list-group-title-font-weight));font-size:var(--f7-contacts-list-title-font-size, var(--f7-list-group-title-font-size));color:var(--f7-contacts-list-title-text-color,var(--f7-theme-color));line-height:var(--f7-contacts-list-title-height, var(--f7-list-group-title-height));height:var(--f7-contacts-list-title-height,var(--f7-list-group-title-height))}.contacts-list .list-group:first-child ul:before{display:none!important}.contacts-list .list-group:last-child ul:after{display:none!important}.md .contacts-list .list-group-title{pointer-events:none;overflow:visible;width:40px}.md .contacts-list .list-group-title+li{margin-top:calc(var(--f7-contacts-list-title-height) * -1)}.md .contacts-list .list-group-title:before{display:none!important}.md .contacts-list li:not(.list-group-title){padding-right:40px}
|