framework7 7.0.9 → 8.0.0-beta.1

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.
Files changed (579) hide show
  1. package/components/accordion/accordion.js +2 -16
  2. package/components/accordion/accordion.less +0 -3
  3. package/components/actions/actions-class.js +13 -58
  4. package/components/actions/actions-ios.less +42 -0
  5. package/components/actions/actions-md.less +12 -0
  6. package/components/actions/actions-rtl.css +1 -1
  7. package/components/actions/actions-vars.less +17 -42
  8. package/components/actions/actions.css +1 -1
  9. package/components/actions/actions.d.ts +2 -2
  10. package/components/actions/actions.js +0 -4
  11. package/components/actions/actions.lazy.js +1 -1
  12. package/components/actions/actions.less +5 -35
  13. package/components/app/app-class.d.ts +14 -12
  14. package/components/app/app-class.js +93 -75
  15. package/components/app/app-ios.less +0 -2
  16. package/components/app/app-md.less +0 -2
  17. package/components/app/app-vars.less +13 -96
  18. package/components/app/app.less +1 -4
  19. package/components/app/load-module.js +17 -36
  20. package/components/area-chart/area-chart-class.js +8 -64
  21. package/components/area-chart/area-chart.js +0 -3
  22. package/components/area-chart/area-chart.less +0 -3
  23. package/components/autocomplete/autocomplete-class.js +30 -175
  24. package/components/autocomplete/autocomplete-ios.less +0 -8
  25. package/components/autocomplete/autocomplete-rtl.css +1 -1
  26. package/components/autocomplete/autocomplete-vars.less +8 -22
  27. package/components/autocomplete/autocomplete.css +1 -1
  28. package/components/autocomplete/autocomplete.d.ts +1 -3
  29. package/components/autocomplete/autocomplete.js +1 -6
  30. package/components/autocomplete/autocomplete.lazy.js +1 -1
  31. package/components/autocomplete/autocomplete.less +6 -18
  32. package/components/badge/badge-vars.less +3 -6
  33. package/components/badge/badge.less +1 -3
  34. package/components/block/block-vars.less +25 -52
  35. package/components/block/block.less +37 -12
  36. package/components/breadcrumbs/breadcrumbs-rtl.css +1 -1
  37. package/components/breadcrumbs/breadcrumbs-vars.less +31 -15
  38. package/components/breadcrumbs/breadcrumbs.css +1 -1
  39. package/components/breadcrumbs/breadcrumbs.js +0 -2
  40. package/components/breadcrumbs/breadcrumbs.less +4 -10
  41. package/components/button/button-vars.less +42 -43
  42. package/components/button/button.less +24 -26
  43. package/components/calendar/calendar-class.js +81 -401
  44. package/components/calendar/calendar-rtl.css +1 -1
  45. package/components/calendar/calendar-vars.less +32 -46
  46. package/components/calendar/calendar.css +1 -1
  47. package/components/calendar/calendar.js +6 -4
  48. package/components/calendar/calendar.lazy.js +1 -1
  49. package/components/calendar/calendar.less +10 -21
  50. package/components/card/card-rtl.css +1 -1
  51. package/components/card/card-vars.less +41 -44
  52. package/components/card/card.css +1 -1
  53. package/components/card/card.js +0 -108
  54. package/components/card/card.less +18 -24
  55. package/components/checkbox/checkbox-rtl.css +1 -1
  56. package/components/checkbox/checkbox-vars.less +0 -8
  57. package/components/checkbox/checkbox.css +1 -1
  58. package/components/checkbox/checkbox.less +10 -3
  59. package/components/chip/chip-ios.less +3 -0
  60. package/components/chip/chip-md.less +4 -3
  61. package/components/chip/chip-rtl.css +1 -1
  62. package/components/chip/chip-vars.less +17 -20
  63. package/components/chip/chip.css +1 -1
  64. package/components/chip/chip.less +16 -21
  65. package/components/color-picker/color-picker-class.js +27 -158
  66. package/components/color-picker/color-picker-rtl.css +1 -1
  67. package/components/color-picker/color-picker.css +1 -1
  68. package/components/color-picker/color-picker.js +0 -4
  69. package/components/color-picker/color-picker.lazy.js +1 -1
  70. package/components/color-picker/color-picker.less +18 -8
  71. package/components/color-picker/modules/alpha-slider.js +0 -12
  72. package/components/color-picker/modules/brightness-slider.js +0 -8
  73. package/components/color-picker/modules/current-color.js +0 -2
  74. package/components/color-picker/modules/hex.js +0 -12
  75. package/components/color-picker/modules/hs-spectrum.js +0 -20
  76. package/components/color-picker/modules/hsb-sliders.js +0 -18
  77. package/components/color-picker/modules/hue-slider.js +0 -7
  78. package/components/color-picker/modules/initial-current-colors.js +0 -7
  79. package/components/color-picker/modules/palette.js +2 -10
  80. package/components/color-picker/modules/rgb-bars.js +0 -17
  81. package/components/color-picker/modules/rgb-sliders.js +0 -17
  82. package/components/color-picker/modules/sb-spectrum.js +0 -20
  83. package/components/color-picker/modules/wheel.js +0 -28
  84. package/components/contacts-list/contacts-list-md.less +4 -3
  85. package/components/contacts-list/contacts-list-rtl.css +1 -1
  86. package/components/contacts-list/contacts-list-vars.less +3 -15
  87. package/components/contacts-list/contacts-list.css +1 -1
  88. package/components/contacts-list/contacts-list.less +0 -3
  89. package/components/data-table/data-table-class.js +10 -32
  90. package/components/data-table/data-table-rtl.css +1 -1
  91. package/components/data-table/data-table-vars.less +6 -39
  92. package/components/data-table/data-table.css +1 -1
  93. package/components/data-table/data-table.js +0 -8
  94. package/components/data-table/data-table.less +0 -3
  95. package/components/dialog/dialog-class.js +7 -41
  96. package/components/dialog/dialog-ios.less +0 -3
  97. package/components/dialog/dialog-md.less +9 -9
  98. package/components/dialog/dialog-rtl.css +1 -1
  99. package/components/dialog/dialog-vars.less +25 -70
  100. package/components/dialog/dialog.css +1 -1
  101. package/components/dialog/dialog.d.ts +2 -2
  102. package/components/dialog/dialog.js +12 -48
  103. package/components/dialog/dialog.lazy.js +1 -1
  104. package/components/dialog/dialog.less +8 -4
  105. package/components/fab/fab-rtl.css +1 -1
  106. package/components/fab/fab-vars.less +20 -14
  107. package/components/fab/fab.css +1 -1
  108. package/components/fab/fab.js +0 -21
  109. package/components/fab/fab.less +50 -53
  110. package/components/form/form.d.ts +4 -4
  111. package/components/form/form.js +58 -94
  112. package/components/form/form.lazy.js +1 -1
  113. package/components/form/form.less +0 -3
  114. package/components/gauge/gauge-class.js +4 -20
  115. package/components/gauge/gauge.js +0 -9
  116. package/components/gauge/gauge.less +0 -3
  117. package/components/grid/grid-rtl.css +1 -1
  118. package/components/grid/grid-vars.less +0 -7
  119. package/components/grid/grid.css +1 -1
  120. package/components/grid/grid.d.ts +2 -8
  121. package/components/grid/grid.js +1 -225
  122. package/components/grid/grid.lazy.js +1 -1
  123. package/components/grid/grid.less +54 -184
  124. package/components/icon/icon.less +0 -3
  125. package/components/infinite-scroll/infinite-scroll-rtl.css +1 -1
  126. package/components/infinite-scroll/infinite-scroll.css +1 -1
  127. package/components/infinite-scroll/infinite-scroll.js +0 -16
  128. package/components/infinite-scroll/infinite-scroll.less +0 -3
  129. package/components/input/input-ios.less +49 -41
  130. package/components/input/input-md.less +87 -19
  131. package/components/input/input-rtl.css +1 -1
  132. package/components/input/input-vars.less +26 -60
  133. package/components/input/input.css +1 -1
  134. package/components/input/input.js +8 -67
  135. package/components/input/input.less +67 -153
  136. package/components/link/link-vars.less +0 -5
  137. package/components/link/link.less +3 -3
  138. package/components/list/list-md.less +0 -7
  139. package/components/list/list-vars.less +59 -108
  140. package/components/list/list.less +122 -90
  141. package/components/list-index/list-index-class.js +12 -69
  142. package/components/list-index/list-index-rtl.css +1 -1
  143. package/components/list-index/list-index-vars.less +0 -7
  144. package/components/list-index/list-index.css +1 -1
  145. package/components/list-index/list-index.d.ts +1 -3
  146. package/components/list-index/list-index.js +0 -8
  147. package/components/list-index/list-index.lazy.js +1 -1
  148. package/components/list-index/list-index.less +4 -7
  149. package/components/login-screen/login-screen-class.js +4 -9
  150. package/components/login-screen/login-screen-rtl.css +1 -1
  151. package/components/login-screen/login-screen-vars.less +13 -12
  152. package/components/login-screen/login-screen.css +1 -1
  153. package/components/login-screen/login-screen.js +0 -4
  154. package/components/login-screen/login-screen.less +2 -8
  155. package/components/messagebar/messagebar-class.js +18 -79
  156. package/components/messagebar/messagebar-ios.less +36 -0
  157. package/components/messagebar/messagebar-md.less +96 -16
  158. package/components/messagebar/messagebar-rtl.css +1 -1
  159. package/components/messagebar/messagebar-vars.less +27 -50
  160. package/components/messagebar/messagebar.css +1 -1
  161. package/components/messagebar/messagebar.js +0 -8
  162. package/components/messagebar/messagebar.less +11 -42
  163. package/components/messages/messages-class.js +17 -110
  164. package/components/messages/messages-ios.less +9 -0
  165. package/components/messages/messages-md.less +63 -28
  166. package/components/messages/messages-rtl.css +1 -1
  167. package/components/messages/messages-vars.less +43 -50
  168. package/components/messages/messages.css +1 -1
  169. package/components/messages/messages.js +0 -8
  170. package/components/messages/messages.lazy.js +1 -1
  171. package/components/messages/messages.less +0 -11
  172. package/components/modal/custom-modal-class.js +4 -14
  173. package/components/modal/modal-class.js +19 -55
  174. package/components/modal/modal.js +0 -3
  175. package/components/navbar/navbar-ios.less +3 -39
  176. package/components/navbar/navbar-md.less +12 -0
  177. package/components/navbar/navbar-vars.less +20 -49
  178. package/components/navbar/navbar.d.ts +0 -2
  179. package/components/navbar/navbar.js +37 -166
  180. package/components/navbar/navbar.less +4 -26
  181. package/components/notification/notification-class.js +4 -39
  182. package/components/notification/notification-md.less +18 -8
  183. package/components/notification/notification-rtl.css +1 -1
  184. package/components/notification/notification-vars.less +15 -54
  185. package/components/notification/notification.css +1 -1
  186. package/components/notification/notification.js +0 -2
  187. package/components/notification/notification.lazy.js +1 -1
  188. package/components/notification/notification.less +0 -3
  189. package/components/page/page-md.less +40 -10
  190. package/components/page/page-transitions/circle.less +15 -9
  191. package/components/page/page-transitions/fade.less +17 -11
  192. package/components/page/page-transitions/flip.less +9 -4
  193. package/components/page/page-vars.less +3 -19
  194. package/components/page/page.less +2 -10
  195. package/components/panel/panel-class.js +23 -127
  196. package/components/panel/panel-md.less +9 -0
  197. package/components/panel/panel-rtl.css +1 -1
  198. package/components/panel/panel-vars.less +7 -21
  199. package/components/panel/panel.css +1 -1
  200. package/components/panel/panel.d.ts +2 -2
  201. package/components/panel/panel.js +0 -34
  202. package/components/panel/panel.lazy.js +1 -1
  203. package/components/panel/panel.less +56 -48
  204. package/components/panel/resizable-panel.js +2 -32
  205. package/components/panel/swipe-panel.js +16 -71
  206. package/components/photo-browser/photo-browser-class.js +41 -171
  207. package/components/photo-browser/photo-browser-rtl.css +1 -1
  208. package/components/photo-browser/photo-browser-vars.less +0 -3
  209. package/components/photo-browser/photo-browser.css +1 -1
  210. package/components/photo-browser/photo-browser.d.ts +2 -4
  211. package/components/photo-browser/photo-browser.js +1 -6
  212. package/components/photo-browser/photo-browser.lazy.js +1 -1
  213. package/components/photo-browser/photo-browser.less +0 -4
  214. package/components/picker/picker-class.js +26 -133
  215. package/components/picker/picker-column.js +11 -31
  216. package/components/picker/picker-ios.less +10 -0
  217. package/components/picker/picker-md.less +6 -0
  218. package/components/picker/picker-rtl.css +1 -1
  219. package/components/picker/picker-vars.less +9 -25
  220. package/components/picker/picker.css +1 -1
  221. package/components/picker/picker.js +0 -4
  222. package/components/picker/picker.lazy.js +1 -1
  223. package/components/picker/picker.less +0 -11
  224. package/components/pie-chart/pie-chart-class.js +8 -31
  225. package/components/pie-chart/pie-chart.js +0 -3
  226. package/components/pie-chart/pie-chart.less +0 -3
  227. package/components/popover/popover-class.js +72 -126
  228. package/components/popover/popover-ios.less +0 -50
  229. package/components/popover/popover-rtl.css +1 -1
  230. package/components/popover/popover-vars.less +6 -23
  231. package/components/popover/popover.css +1 -1
  232. package/components/popover/popover.d.ts +2 -0
  233. package/components/popover/popover.js +1 -12
  234. package/components/popover/popover.lazy.js +1 -1
  235. package/components/popover/popover.less +62 -5
  236. package/components/popup/popup-class.js +12 -78
  237. package/components/popup/popup-rtl.css +1 -1
  238. package/components/popup/popup-vars.less +7 -9
  239. package/components/popup/popup.css +1 -1
  240. package/components/popup/popup.js +0 -4
  241. package/components/popup/popup.lazy.js +1 -1
  242. package/components/popup/popup.less +4 -4
  243. package/components/preloader/preloader-ios.less +3 -1
  244. package/components/preloader/preloader-md.less +5 -1
  245. package/components/preloader/preloader-rtl.css +1 -1
  246. package/components/preloader/preloader-vars.less +0 -6
  247. package/components/preloader/preloader.css +1 -1
  248. package/components/preloader/preloader.js +8 -25
  249. package/components/preloader/preloader.lazy.js +1 -1
  250. package/components/preloader/preloader.less +6 -3
  251. package/components/progressbar/progressbar-rtl.css +1 -1
  252. package/components/progressbar/progressbar-vars.less +2 -12
  253. package/components/progressbar/progressbar.css +1 -1
  254. package/components/progressbar/progressbar.js +2 -31
  255. package/components/progressbar/progressbar.less +0 -3
  256. package/components/pull-to-refresh/pull-to-refresh-class.js +15 -107
  257. package/components/pull-to-refresh/pull-to-refresh-md.less +2 -1
  258. package/components/pull-to-refresh/pull-to-refresh-rtl.css +1 -1
  259. package/components/pull-to-refresh/pull-to-refresh-vars.less +0 -4
  260. package/components/pull-to-refresh/pull-to-refresh.css +1 -1
  261. package/components/pull-to-refresh/pull-to-refresh.js +0 -8
  262. package/components/pull-to-refresh/pull-to-refresh.lazy.js +1 -1
  263. package/components/pull-to-refresh/pull-to-refresh.less +0 -3
  264. package/components/radio/radio-rtl.css +1 -1
  265. package/components/radio/radio-vars.less +0 -7
  266. package/components/radio/radio.css +1 -1
  267. package/components/radio/radio.less +12 -5
  268. package/components/range/range-class.js +27 -112
  269. package/components/range/range-rtl.css +1 -1
  270. package/components/range/range-vars.less +10 -32
  271. package/components/range/range.css +1 -1
  272. package/components/range/range.js +0 -12
  273. package/components/range/range.less +0 -3
  274. package/components/searchbar/remove-diacritics.js +0 -4
  275. package/components/searchbar/searchbar-class.js +17 -138
  276. package/components/searchbar/searchbar-md.less +41 -16
  277. package/components/searchbar/searchbar-rtl.css +1 -1
  278. package/components/searchbar/searchbar-vars.less +25 -76
  279. package/components/searchbar/searchbar.css +1 -1
  280. package/components/searchbar/searchbar.d.ts +2 -2
  281. package/components/searchbar/searchbar.js +0 -15
  282. package/components/searchbar/searchbar.lazy.js +1 -1
  283. package/components/searchbar/searchbar.less +14 -28
  284. package/components/sheet/sheet-class.js +15 -110
  285. package/components/sheet/sheet-rtl.css +1 -1
  286. package/components/sheet/sheet-vars.less +17 -6
  287. package/components/sheet/sheet.css +1 -1
  288. package/components/sheet/sheet.js +0 -9
  289. package/components/sheet/sheet.lazy.js +1 -1
  290. package/components/sheet/sheet.less +10 -3
  291. package/components/skeleton/skeleton.less +1 -4
  292. package/components/smart-select/smart-select-class.js +36 -173
  293. package/components/smart-select/smart-select.d.ts +1 -3
  294. package/components/smart-select/smart-select.js +1 -14
  295. package/components/smart-select/smart-select.lazy.js +1 -1
  296. package/components/smart-select/smart-select.less +0 -3
  297. package/components/sortable/sortable-rtl.css +1 -1
  298. package/components/sortable/sortable-vars.less +8 -8
  299. package/components/sortable/sortable.css +1 -1
  300. package/components/sortable/sortable.js +0 -44
  301. package/components/sortable/sortable.less +0 -3
  302. package/components/statusbar/statusbar.js +0 -36
  303. package/components/statusbar/statusbar.less +0 -3
  304. package/components/stepper/stepper-class.js +10 -83
  305. package/components/stepper/stepper-rtl.css +1 -1
  306. package/components/stepper/stepper-vars.less +12 -24
  307. package/components/stepper/stepper.css +1 -1
  308. package/components/stepper/stepper.js +0 -12
  309. package/components/stepper/stepper.less +12 -23
  310. package/components/subnavbar/subnavbar-vars.less +3 -18
  311. package/components/subnavbar/subnavbar.js +0 -3
  312. package/components/subnavbar/subnavbar.less +1 -11
  313. package/components/swipeout/swipeout-rtl.css +1 -1
  314. package/components/swipeout/swipeout-vars.less +7 -6
  315. package/components/swipeout/swipeout.css +1 -1
  316. package/components/swipeout/swipeout.js +2 -99
  317. package/components/swipeout/swipeout.less +2 -7
  318. package/components/swiper/swiper-rtl.css +1 -1
  319. package/components/swiper/swiper.css +1 -1
  320. package/components/swiper/swiper.js +9 -30
  321. package/components/swiper/swiper.lazy.js +1 -1
  322. package/components/swiper/swiper.less +1 -16
  323. package/components/tabs/tabs-rtl.css +1 -1
  324. package/components/tabs/tabs.css +1 -1
  325. package/components/tabs/tabs.js +23 -60
  326. package/components/tabs/tabs.lazy.js +1 -1
  327. package/components/tabs/tabs.less +1 -3
  328. package/components/text-editor/text-editor-class.js +16 -102
  329. package/components/text-editor/text-editor-rtl.css +1 -1
  330. package/components/text-editor/text-editor-vars.less +12 -16
  331. package/components/text-editor/text-editor.css +1 -1
  332. package/components/text-editor/text-editor.js +0 -8
  333. package/components/text-editor/text-editor.lazy.js +1 -1
  334. package/components/text-editor/text-editor.less +0 -6
  335. package/components/timeline/timeline-rtl.css +1 -1
  336. package/components/timeline/timeline-vars.less +13 -47
  337. package/components/timeline/timeline.css +1 -1
  338. package/components/timeline/timeline.less +2 -9
  339. package/components/toast/toast-class.js +2 -16
  340. package/components/toast/toast-rtl.css +1 -1
  341. package/components/toast/toast-vars.less +5 -9
  342. package/components/toast/toast.css +1 -1
  343. package/components/toast/toast.js +0 -3
  344. package/components/toast/toast.less +0 -3
  345. package/components/toggle/toggle-class.js +6 -30
  346. package/components/toggle/toggle-ios.less +5 -1
  347. package/components/toggle/toggle-md.less +27 -11
  348. package/components/toggle/toggle-rtl.css +1 -1
  349. package/components/toggle/toggle-vars.less +19 -21
  350. package/components/toggle/toggle.css +1 -1
  351. package/components/toggle/toggle.js +0 -8
  352. package/components/toggle/toggle.less +0 -4
  353. package/components/toolbar/toolbar-ios.less +2 -2
  354. package/components/toolbar/toolbar-md.less +28 -4
  355. package/components/toolbar/toolbar-vars.less +17 -52
  356. package/components/toolbar/toolbar.js +5 -43
  357. package/components/toolbar/toolbar.less +27 -45
  358. package/components/tooltip/tooltip-class.js +10 -64
  359. package/components/tooltip/tooltip-rtl.css +1 -1
  360. package/components/tooltip/tooltip-vars.less +12 -3
  361. package/components/tooltip/tooltip.css +1 -1
  362. package/components/tooltip/tooltip.js +0 -15
  363. package/components/tooltip/tooltip.less +0 -3
  364. package/components/touch-ripple/touch-ripple-class.js +0 -13
  365. package/components/touch-ripple/touch-ripple.js +0 -4
  366. package/components/touch-ripple/touch-ripple.less +1 -5
  367. package/components/treeview/treeview-rtl.css +1 -1
  368. package/components/treeview/treeview-vars.less +0 -3
  369. package/components/treeview/treeview.css +1 -1
  370. package/components/treeview/treeview.js +2 -11
  371. package/components/treeview/treeview.lazy.js +1 -1
  372. package/components/treeview/treeview.less +0 -3
  373. package/components/typography/typography-rtl.css +1 -1
  374. package/components/typography/typography.css +1 -1
  375. package/components/typography/typography.less +25 -3
  376. package/components/view/resizable-view.js +2 -24
  377. package/components/view/view-class.js +28 -53
  378. package/components/view/view.d.ts +0 -14
  379. package/components/view/view.js +8 -32
  380. package/components/view/view.less +1 -4
  381. package/components/virtual-list/virtual-list-class.js +58 -146
  382. package/components/virtual-list/virtual-list.d.ts +1 -1
  383. package/components/virtual-list/virtual-list.js +0 -2
  384. package/components/virtual-list/virtual-list.lazy.js +1 -1
  385. package/components/virtual-list/virtual-list.less +0 -3
  386. package/framework7-bundle-rtl.css +3593 -5977
  387. package/framework7-bundle-rtl.min.css +3 -3
  388. package/framework7-bundle.css +3591 -5978
  389. package/framework7-bundle.esm.js +4 -10
  390. package/framework7-bundle.js +6063 -12044
  391. package/framework7-bundle.js.map +1 -1
  392. package/framework7-bundle.less +2 -27
  393. package/framework7-bundle.min.css +3 -3
  394. package/framework7-bundle.min.js +3 -3
  395. package/framework7-bundle.min.js.map +1 -1
  396. package/framework7-lite-bundle.esm.js +4 -10
  397. package/framework7-lite.esm.js +4 -6
  398. package/framework7-lite.js +31 -0
  399. package/framework7-rtl.css +803 -1591
  400. package/framework7-rtl.min.css +3 -3
  401. package/framework7-types.d.ts +1 -32
  402. package/framework7.css +803 -1594
  403. package/framework7.d.ts +1 -32
  404. package/framework7.esm.js +4 -6
  405. package/framework7.js +1770 -3407
  406. package/framework7.js.map +1 -1
  407. package/framework7.less +2 -23
  408. package/framework7.min.css +3 -3
  409. package/framework7.min.js +3 -3
  410. package/framework7.min.js.map +1 -1
  411. package/less/mixins.less +7 -88
  412. package/less/plugin.js +15 -0
  413. package/modules/clicks/clicks.js +10 -22
  414. package/modules/component/$h.js +0 -3
  415. package/modules/component/$jsx.js +0 -5
  416. package/modules/component/component-class.js +13 -66
  417. package/modules/component/component.d.ts +1 -2
  418. package/modules/component/component.js +0 -8
  419. package/modules/component/eventslisteners.js +12 -20
  420. package/modules/component/parse-component.js +18 -20
  421. package/modules/component/snabbdom/h.js +3 -12
  422. package/modules/component/snabbdom/helpers/attachto.js +9 -14
  423. package/modules/component/snabbdom/htmldomapi.js +0 -16
  424. package/modules/component/snabbdom/modules/attributes.js +7 -11
  425. package/modules/component/snabbdom/modules/class.js +4 -8
  426. package/modules/component/snabbdom/modules/dataset.js +3 -7
  427. package/modules/component/snabbdom/modules/eventlisteners.js +16 -22
  428. package/modules/component/snabbdom/modules/hero.js +4 -44
  429. package/modules/component/snabbdom/modules/props.js +5 -9
  430. package/modules/component/snabbdom/modules/style.js +13 -30
  431. package/modules/component/snabbdom/snabbdom.bundle.js +0 -6
  432. package/modules/component/snabbdom/snabbdom.js +13 -72
  433. package/modules/component/snabbdom/thunk.js +3 -11
  434. package/modules/component/snabbdom/tovnode.js +1 -6
  435. package/modules/component/vdom.js +4 -62
  436. package/modules/demo-module.js +0 -8
  437. package/modules/device/device.js +6 -11
  438. package/modules/history/history.js +0 -1
  439. package/modules/resize/resize.js +8 -11
  440. package/modules/router/async-component.js +0 -3
  441. package/modules/router/back.js +86 -275
  442. package/modules/router/clear-previous-history.js +5 -18
  443. package/modules/router/component-loader.js +4 -25
  444. package/modules/router/modal.js +16 -43
  445. package/modules/router/navigate.js +80 -249
  446. package/modules/router/process-route-queue.js +0 -12
  447. package/modules/router/redirect.js +0 -8
  448. package/modules/router/router-class.js +92 -315
  449. package/modules/router/router.d.ts +3 -5
  450. package/modules/router/router.js +0 -3
  451. package/modules/router/swipe-back.js +35 -139
  452. package/modules/router/tab.js +14 -43
  453. package/modules/service-worker/service-worker.js +0 -11
  454. package/modules/store/create-store.js +10 -29
  455. package/modules/touch/touch.d.ts +2 -4
  456. package/modules/touch/touch.js +13 -108
  457. package/package.json +4 -18
  458. package/shared/$jsx.js +0 -6
  459. package/shared/class.js +18 -43
  460. package/shared/constructor-methods.js +0 -11
  461. package/shared/events-class.js +0 -17
  462. package/shared/get-device.js +18 -34
  463. package/shared/get-support.js +2 -8
  464. package/shared/history.js +2 -30
  465. package/shared/material-color-utils.js +728 -0
  466. package/shared/material-colors.js +75 -0
  467. package/shared/modal-methods.js +0 -18
  468. package/shared/utils.d.ts +0 -4
  469. package/shared/utils.js +191 -71
  470. package/components/accordion/accordion-aurora.less +0 -2
  471. package/components/actions/actions-aurora.less +0 -9
  472. package/components/app/app-aurora.less +0 -10
  473. package/components/appbar/appbar-aurora.less +0 -2
  474. package/components/appbar/appbar-ios.less +0 -2
  475. package/components/appbar/appbar-md.less +0 -2
  476. package/components/appbar/appbar-rtl.css +0 -1
  477. package/components/appbar/appbar-vars.less +0 -28
  478. package/components/appbar/appbar.css +0 -1
  479. package/components/appbar/appbar.d.ts +0 -14
  480. package/components/appbar/appbar.js +0 -3
  481. package/components/appbar/appbar.lazy.js +0 -1
  482. package/components/appbar/appbar.less +0 -106
  483. package/components/area-chart/area-chart-aurora.less +0 -2
  484. package/components/autocomplete/autocomplete-aurora.less +0 -17
  485. package/components/badge/badge-aurora.less +0 -2
  486. package/components/block/block-aurora.less +0 -2
  487. package/components/breadcrumbs/breadcrumbs-aurora.less +0 -2
  488. package/components/button/button-aurora.less +0 -25
  489. package/components/calendar/calendar-aurora.less +0 -2
  490. package/components/card/card-aurora.less +0 -2
  491. package/components/checkbox/checkbox-aurora.less +0 -39
  492. package/components/chip/chip-aurora.less +0 -14
  493. package/components/color-picker/color-picker-aurora.less +0 -2
  494. package/components/contacts-list/contacts-list-aurora.less +0 -2
  495. package/components/data-table/data-table-aurora.less +0 -64
  496. package/components/dialog/dialog-aurora.less +0 -112
  497. package/components/elevation/elevation-aurora.less +0 -2
  498. package/components/elevation/elevation-ios.less +0 -2
  499. package/components/elevation/elevation-md.less +0 -2
  500. package/components/elevation/elevation-rtl.css +0 -1
  501. package/components/elevation/elevation-vars.less +0 -51
  502. package/components/elevation/elevation.css +0 -1
  503. package/components/elevation/elevation.d.ts +0 -14
  504. package/components/elevation/elevation.js +0 -3
  505. package/components/elevation/elevation.lazy.js +0 -1
  506. package/components/elevation/elevation.less +0 -54
  507. package/components/fab/fab-aurora.less +0 -2
  508. package/components/form/form-aurora.less +0 -0
  509. package/components/gauge/gauge-aurora.less +0 -2
  510. package/components/grid/grid-aurora.less +0 -2
  511. package/components/icon/icon-aurora.less +0 -49
  512. package/components/infinite-scroll/infinite-scroll-aurora.less +0 -6
  513. package/components/input/input-aurora.less +0 -120
  514. package/components/lazy/lazy-aurora.less +0 -2
  515. package/components/lazy/lazy-ios.less +0 -2
  516. package/components/lazy/lazy-md.less +0 -2
  517. package/components/lazy/lazy-rtl.css +0 -1
  518. package/components/lazy/lazy.css +0 -1
  519. package/components/lazy/lazy.d.ts +0 -57
  520. package/components/lazy/lazy.js +0 -283
  521. package/components/lazy/lazy.lazy.js +0 -1
  522. package/components/lazy/lazy.less +0 -23
  523. package/components/link/link-aurora.less +0 -15
  524. package/components/list/list-aurora.less +0 -25
  525. package/components/list-index/list-index-aurora.less +0 -21
  526. package/components/login-screen/login-screen-aurora.less +0 -2
  527. package/components/menu/menu-aurora.less +0 -8
  528. package/components/menu/menu-ios.less +0 -2
  529. package/components/menu/menu-md.less +0 -2
  530. package/components/menu/menu-rtl.css +0 -1
  531. package/components/menu/menu-vars.less +0 -27
  532. package/components/menu/menu.css +0 -1
  533. package/components/menu/menu.d.ts +0 -32
  534. package/components/menu/menu.js +0 -87
  535. package/components/menu/menu.lazy.js +0 -1
  536. package/components/menu/menu.less +0 -232
  537. package/components/messagebar/messagebar-aurora.less +0 -53
  538. package/components/messages/messages-aurora.less +0 -137
  539. package/components/navbar/navbar-aurora.less +0 -70
  540. package/components/notification/notification-aurora.less +0 -59
  541. package/components/page/page-aurora.less +0 -49
  542. package/components/panel/panel-aurora.less +0 -2
  543. package/components/photo-browser/photo-browser-aurora.less +0 -2
  544. package/components/picker/picker-aurora.less +0 -2
  545. package/components/pie-chart/pie-chart-aurora.less +0 -2
  546. package/components/popover/popover-aurora.less +0 -56
  547. package/components/popup/popup-aurora.less +0 -2
  548. package/components/preloader/preloader-aurora.less +0 -53
  549. package/components/progressbar/progressbar-aurora.less +0 -72
  550. package/components/pull-to-refresh/pull-to-refresh-aurora.less +0 -122
  551. package/components/radio/radio-aurora.less +0 -86
  552. package/components/range/range-aurora.less +0 -9
  553. package/components/searchbar/searchbar-aurora.less +0 -86
  554. package/components/sheet/sheet-aurora.less +0 -2
  555. package/components/skeleton/skeleton-aurora.less +0 -2
  556. package/components/smart-select/smart-select-aurora.less +0 -2
  557. package/components/sortable/sortable-aurora.less +0 -7
  558. package/components/statusbar/statusbar-aurora.less +0 -2
  559. package/components/stepper/stepper-aurora.less +0 -32
  560. package/components/subnavbar/subnavbar-aurora.less +0 -51
  561. package/components/swipeout/swipeout-aurora.less +0 -2
  562. package/components/swiper/swiper-aurora.less +0 -2
  563. package/components/tabs/tabs-aurora.less +0 -2
  564. package/components/text-editor/text-editor-aurora.less +0 -9
  565. package/components/timeline/timeline-aurora.less +0 -7
  566. package/components/toast/toast-aurora.less +0 -64
  567. package/components/toggle/toggle-aurora.less +0 -26
  568. package/components/toolbar/toolbar-aurora.less +0 -43
  569. package/components/tooltip/tooltip-aurora.less +0 -2
  570. package/components/touch-ripple/touch-ripple-aurora.less +0 -2
  571. package/components/treeview/treeview-aurora.less +0 -31
  572. package/components/typography/typography-aurora.less +0 -2
  573. package/components/view/view-aurora.less +0 -2
  574. package/components/virtual-list/virtual-list-aurora.less +0 -2
  575. package/modules/request/request.d.ts +0 -15
  576. package/modules/request/request.js +0 -11
  577. package/postinstall.js +0 -3
  578. package/shared/request.d.ts +0 -115
  579. package/shared/request.js +0 -512
@@ -26,15 +26,15 @@ const textEditorButtonsMap = {
26
26
  indent: ['increase_indent', 'format_indent_increase', 'indent'],
27
27
  outdent: ['decrease_indent', 'format_indent_decrease', 'outdent']
28
28
  };
29
-
30
29
  class TextEditor extends Framework7Class {
31
30
  constructor(app, params) {
32
31
  super(params, [app]);
33
32
  const self = this;
34
33
  const document = getDocument();
35
34
  const device = getDevice();
36
- const defaults = extend({}, app.params.textEditor); // Extend defaults with modules params
35
+ const defaults = extend({}, app.params.textEditor);
37
36
 
37
+ // Extend defaults with modules params
38
38
  self.useModulesParams(defaults);
39
39
  self.params = extend(defaults, params);
40
40
  const el = self.params.el;
@@ -43,12 +43,10 @@ class TextEditor extends Framework7Class {
43
43
  if ($el.length === 0) return self;
44
44
  if ($el[0].f7TextEditor) return $el[0].f7TextEditor;
45
45
  let $contentEl = $el.children('.text-editor-content');
46
-
47
46
  if (!$contentEl.length) {
48
47
  $el.append('<div class="text-editor-content" contenteditable></div>');
49
48
  $contentEl = $el.children('.text-editor-content');
50
49
  }
51
-
52
50
  extend(self, {
53
51
  app,
54
52
  $el,
@@ -56,17 +54,14 @@ class TextEditor extends Framework7Class {
56
54
  $contentEl,
57
55
  contentEl: $contentEl[0]
58
56
  });
59
-
60
57
  if ('value' in params) {
61
58
  self.value = self.params.value;
62
59
  }
63
-
64
60
  if (self.params.mode === 'keyboard-toolbar') {
65
61
  if (!(device.cordova || device.capacitor) && !device.android) {
66
62
  self.params.mode = 'popover';
67
63
  }
68
64
  }
69
-
70
65
  if (typeof self.params.buttons === 'string') {
71
66
  try {
72
67
  self.params.buttons = JSON.parse(self.params.buttons);
@@ -74,66 +69,60 @@ class TextEditor extends Framework7Class {
74
69
  throw new Error('Framework7: TextEditor: wrong "buttons" parameter format');
75
70
  }
76
71
  }
72
+ $el[0].f7TextEditor = self;
77
73
 
78
- $el[0].f7TextEditor = self; // Bind
79
-
74
+ // Bind
80
75
  self.onButtonClick = self.onButtonClick.bind(self);
81
76
  self.onFocus = self.onFocus.bind(self);
82
77
  self.onBlur = self.onBlur.bind(self);
83
78
  self.onInput = self.onInput.bind(self);
84
79
  self.onPaste = self.onPaste.bind(self);
85
80
  self.onSelectionChange = self.onSelectionChange.bind(self);
86
- self.closeKeyboardToolbar = self.closeKeyboardToolbar.bind(self); // Handle Events
81
+ self.closeKeyboardToolbar = self.closeKeyboardToolbar.bind(self);
87
82
 
83
+ // Handle Events
88
84
  self.attachEvents = function attachEvents() {
89
85
  if (self.params.mode === 'toolbar') {
90
86
  self.$el.find('.text-editor-toolbar').on('click', 'button', self.onButtonClick);
91
87
  }
92
-
93
88
  if (self.params.mode === 'keyboard-toolbar') {
94
89
  self.$keyboardToolbarEl.on('click', 'button', self.onButtonClick);
95
90
  self.$el.parents('.page').on('page:beforeout', self.closeKeyboardToolbar);
96
91
  }
97
-
98
92
  if (self.params.mode === 'popover' && self.popover) {
99
93
  self.popover.$el.on('click', 'button', self.onButtonClick);
100
94
  }
101
-
102
95
  self.$contentEl.on('paste', self.onPaste);
103
96
  self.$contentEl.on('focus', self.onFocus);
104
97
  self.$contentEl.on('blur', self.onBlur);
105
98
  self.$contentEl.on('input', self.onInput, true);
106
99
  $(document).on('selectionchange', self.onSelectionChange);
107
100
  };
108
-
109
101
  self.detachEvents = function detachEvents() {
110
102
  if (self.params.mode === 'toolbar') {
111
103
  self.$el.find('.text-editor-toolbar').off('click', 'button', self.onButtonClick);
112
104
  }
113
-
114
105
  if (self.params.mode === 'keyboard-toolbar') {
115
106
  self.$keyboardToolbarEl.off('click', 'button', self.onButtonClick);
116
107
  self.$el.parents('.page').off('page:beforeout', self.closeKeyboardToolbar);
117
108
  }
118
-
119
109
  if (self.params.mode === 'popover' && self.popover) {
120
110
  self.popover.$el.off('click', 'button', self.onButtonClick);
121
111
  }
122
-
123
112
  self.$contentEl.off('paste', self.onPaste);
124
113
  self.$contentEl.off('focus', self.onFocus);
125
114
  self.$contentEl.off('blur', self.onBlur);
126
115
  self.$contentEl.off('input', self.onInput, true);
127
116
  $(document).off('selectionchange', self.onSelectionChange);
128
- }; // Install Modules
129
-
117
+ };
130
118
 
131
- self.useModules(); // Init
119
+ // Install Modules
120
+ self.useModules();
132
121
 
122
+ // Init
133
123
  self.init();
134
124
  return self;
135
125
  }
136
-
137
126
  setValue(newValue) {
138
127
  const self = this;
139
128
  const currentValue = self.value;
@@ -144,23 +133,18 @@ class TextEditor extends Framework7Class {
144
133
  self.emit('local::change textEditorChange', self, self.value);
145
134
  return self;
146
135
  }
147
-
148
136
  getValue() {
149
137
  const self = this;
150
138
  return self.value;
151
139
  }
152
-
153
140
  clearValue() {
154
141
  const self = this;
155
142
  self.setValue('');
156
-
157
143
  if (self.params.placeholder && !self.$contentEl.html()) {
158
144
  self.insertPlaceholder();
159
145
  }
160
-
161
146
  return self;
162
147
  }
163
-
164
148
  createLink() {
165
149
  const self = this;
166
150
  const window = getWindow();
@@ -168,28 +152,21 @@ class TextEditor extends Framework7Class {
168
152
  const currentSelection = window.getSelection();
169
153
  const selectedNodes = [];
170
154
  let $selectedLinks;
171
-
172
155
  if (currentSelection && currentSelection.anchorNode && $(currentSelection.anchorNode).parents(self.$el).length) {
173
156
  let anchorNode = currentSelection.anchorNode;
174
-
175
157
  while (anchorNode) {
176
158
  selectedNodes.push(anchorNode);
177
-
178
159
  if (!anchorNode.nextSibling || anchorNode === currentSelection.focusNode) {
179
160
  anchorNode = null;
180
161
  }
181
-
182
162
  if (anchorNode) {
183
163
  anchorNode = anchorNode.nextSibling;
184
164
  }
185
165
  }
186
-
187
166
  const selectedNodesLinks = [];
188
167
  const $selectedNodes = $(selectedNodes);
189
-
190
168
  for (let i = 0; i < $selectedNodes.length; i += 1) {
191
169
  const childNodes = $selectedNodes[i].children;
192
-
193
170
  if (childNodes) {
194
171
  for (let j = 0; j < childNodes.length; j += 1) {
195
172
  if ($(childNodes[j]).is('a')) {
@@ -198,10 +175,8 @@ class TextEditor extends Framework7Class {
198
175
  }
199
176
  }
200
177
  }
201
-
202
178
  $selectedLinks = $selectedNodes.closest('a').add($(selectedNodesLinks));
203
179
  }
204
-
205
180
  if ($selectedLinks && $selectedLinks.length) {
206
181
  $selectedLinks.each(linkNode => {
207
182
  const selection = window.getSelection();
@@ -214,10 +189,9 @@ class TextEditor extends Framework7Class {
214
189
  });
215
190
  return self;
216
191
  }
217
-
218
192
  const currentRange = self.getSelectionRange();
219
193
  if (!currentRange) return self;
220
- const dialog = self.app.dialog.prompt(self.params.linkUrlText, '', link => {
194
+ const dialog = self.app.dialog.prompt('', self.params.linkUrlText, link => {
221
195
  if (link && link.trim().length) {
222
196
  self.setSelectionRange(currentRange);
223
197
  document.execCommand('createLink', false, link.trim());
@@ -230,13 +204,12 @@ class TextEditor extends Framework7Class {
230
204
  dialog.$el.find('input').focus();
231
205
  return self;
232
206
  }
233
-
234
207
  insertImage() {
235
208
  const self = this;
236
209
  const document = getDocument();
237
210
  const currentRange = self.getSelectionRange();
238
211
  if (!currentRange) return self;
239
- const dialog = self.app.dialog.prompt(self.params.imageUrlText, '', imageUrl => {
212
+ const dialog = self.app.dialog.prompt('', self.params.imageUrlText, imageUrl => {
240
213
  if (imageUrl && imageUrl.trim().length) {
241
214
  self.setSelectionRange(currentRange);
242
215
  document.execCommand('insertImage', false, imageUrl.trim());
@@ -249,17 +222,14 @@ class TextEditor extends Framework7Class {
249
222
  dialog.$el.find('input').focus();
250
223
  return self;
251
224
  }
252
-
253
225
  removePlaceholder() {
254
226
  const self = this;
255
227
  self.$contentEl.find('.text-editor-placeholder').remove();
256
228
  }
257
-
258
229
  insertPlaceholder() {
259
230
  const self = this;
260
231
  self.$contentEl.append(`<div class="text-editor-placeholder">${self.params.placeholder}</div>`);
261
232
  }
262
-
263
233
  onSelectionChange() {
264
234
  const self = this;
265
235
  const window = getWindow();
@@ -267,25 +237,20 @@ class TextEditor extends Framework7Class {
267
237
  if (self.params.mode === 'toolbar') return;
268
238
  const selection = window.getSelection();
269
239
  const selectionIsInContent = $(selection.anchorNode).parents(self.contentEl).length || selection.anchorNode === self.contentEl;
270
-
271
240
  if (self.params.mode === 'keyboard-toolbar') {
272
241
  if (!selectionIsInContent) {
273
242
  self.closeKeyboardToolbar();
274
243
  } else {
275
244
  self.openKeyboardToolbar();
276
245
  }
277
-
278
246
  return;
279
247
  }
280
-
281
248
  if (self.params.mode === 'popover') {
282
249
  const selectionIsInPopover = $(selection.anchorNode).parents(self.popover.el).length || selection.anchorNode === self.popover.el;
283
-
284
250
  if (!selectionIsInContent && !selectionIsInPopover) {
285
251
  self.closePopover();
286
252
  return;
287
253
  }
288
-
289
254
  if (!selection.isCollapsed && selection.rangeCount) {
290
255
  const range = selection.getRangeAt(0);
291
256
  const rect = range.getBoundingClientRect();
@@ -296,18 +261,15 @@ class TextEditor extends Framework7Class {
296
261
  }
297
262
  }
298
263
  }
299
-
300
264
  onPaste(e) {
301
265
  const self = this;
302
266
  const document = getDocument();
303
-
304
267
  if (self.params.clearFormattingOnPaste && e.clipboardData && e.clipboardData.getData) {
305
268
  const text = e.clipboardData.getData('text/plain');
306
269
  e.preventDefault();
307
270
  document.execCommand('insertText', false, text);
308
271
  }
309
272
  }
310
-
311
273
  onInput() {
312
274
  const self = this;
313
275
  const value = self.$contentEl.html();
@@ -317,7 +279,6 @@ class TextEditor extends Framework7Class {
317
279
  self.$el.trigger('texteditor:change', self.value);
318
280
  self.emit('local::change textEditorChange', self, self.value);
319
281
  }
320
-
321
282
  onFocus() {
322
283
  const self = this;
323
284
  self.removePlaceholder();
@@ -325,39 +286,31 @@ class TextEditor extends Framework7Class {
325
286
  self.$el.trigger('texteditor:focus');
326
287
  self.emit('local::focus textEditorFocus', self);
327
288
  }
328
-
329
289
  onBlur() {
330
290
  const self = this;
331
291
  const window = getWindow();
332
292
  const document = getDocument();
333
-
334
293
  if (self.params.placeholder && self.$contentEl.html() === '') {
335
294
  self.insertPlaceholder();
336
295
  }
337
-
338
296
  if (self.params.mode === 'popover') {
339
297
  const selection = window.getSelection();
340
298
  const selectionIsInContent = $(selection.anchorNode).parents(self.contentEl).length || selection.anchorNode === self.contentEl;
341
299
  const inPopover = document.activeElement && self.popover && $(document.activeElement).closest(self.popover.$el).length;
342
-
343
300
  if (!inPopover && !selectionIsInContent) {
344
301
  self.closePopover();
345
302
  }
346
303
  }
347
-
348
304
  if (self.params.mode === 'keyboard-toolbar') {
349
305
  const selection = window.getSelection();
350
306
  const selectionIsInContent = $(selection.anchorNode).parents(self.contentEl).length || selection.anchorNode === self.contentEl;
351
-
352
307
  if (!selectionIsInContent) {
353
308
  self.closeKeyboardToolbar();
354
309
  }
355
310
  }
356
-
357
311
  self.$el.trigger('texteditor:blur');
358
312
  self.emit('local::blur textEditorBlur', self);
359
313
  }
360
-
361
314
  onButtonClick(e) {
362
315
  const self = this;
363
316
  const window = getWindow();
@@ -366,73 +319,59 @@ class TextEditor extends Framework7Class {
366
319
  const selectionIsInContent = $(selection.anchorNode).parents(self.contentEl).length || selection.anchorNode === self.contentEl;
367
320
  if (!selectionIsInContent) return;
368
321
  const $buttonEl = $(e.target).closest('button');
369
-
370
322
  if ($buttonEl.parents('form').length) {
371
323
  e.preventDefault();
372
324
  }
373
-
374
325
  const button = $buttonEl.attr('data-button');
375
326
  const buttonData = self.params.customButtons && self.params.customButtons[button];
376
327
  if (!button || !(textEditorButtonsMap[button] || buttonData)) return;
377
328
  $buttonEl.trigger('texteditor:buttonclick', button);
378
329
  self.emit('local::buttonClick textEditorButtonClick', self, button);
379
-
380
330
  if (buttonData) {
381
331
  if (buttonData.onClick) buttonData.onClick(self, $buttonEl[0]);
382
332
  return;
383
333
  }
384
-
385
334
  const command = textEditorButtonsMap[button][2];
386
-
387
335
  if (command === 'createLink') {
388
336
  self.createLink();
389
337
  return;
390
338
  }
391
-
392
339
  if (command === 'insertImage') {
393
340
  self.insertImage();
394
341
  return;
395
342
  }
396
-
397
343
  if (command.indexOf('formatBlock') === 0) {
398
344
  const tagName = command.split('.')[1];
399
345
  const $anchorNode = $(selection.anchorNode);
400
-
401
346
  if ($anchorNode.parents(tagName.toLowerCase()).length || $anchorNode.is(tagName)) {
402
347
  document.execCommand('formatBlock', false, 'div');
403
348
  } else {
404
349
  document.execCommand('formatBlock', false, tagName);
405
350
  }
406
-
407
351
  return;
408
352
  }
409
-
410
353
  document.execCommand(command, false);
411
- } // eslint-disable-next-line
412
-
354
+ }
413
355
 
356
+ // eslint-disable-next-line
414
357
  getSelectionRange() {
415
358
  const window = getWindow();
416
359
  const document = getDocument();
417
-
418
360
  if (window.getSelection) {
419
361
  const sel = window.getSelection();
420
-
421
362
  if (sel.getRangeAt && sel.rangeCount) {
422
363
  return sel.getRangeAt(0);
423
364
  }
424
365
  } else if (document.selection && document.selection.createRange) {
425
366
  return document.selection.createRange();
426
367
  }
427
-
428
368
  return null;
429
- } // eslint-disable-next-line
430
-
369
+ }
431
370
 
371
+ // eslint-disable-next-line
432
372
  setSelectionRange(range) {
433
373
  const window = getWindow();
434
374
  const document = getDocument();
435
-
436
375
  if (range) {
437
376
  if (window.getSelection) {
438
377
  const sel = window.getSelection();
@@ -443,30 +382,24 @@ class TextEditor extends Framework7Class {
443
382
  }
444
383
  }
445
384
  }
446
-
447
385
  renderButtons() {
448
386
  const self = this;
449
387
  let html = '';
450
-
451
388
  function renderButton(button) {
452
389
  const iconClass = self.app.theme === 'md' ? 'material-icons' : 'f7-icons';
453
-
454
390
  if (self.params.customButtons && self.params.customButtons[button]) {
455
391
  const buttonData = self.params.customButtons[button];
456
392
  return `<button type="button" class="text-editor-button" data-button="${button}">${buttonData.content || ''}</button>`;
457
393
  }
458
-
459
394
  if (!textEditorButtonsMap[button]) return '';
460
395
  const iconContent = textEditorButtonsMap[button][self.app.theme === 'md' ? 1 : 0];
461
396
  return `<button type="button" class="text-editor-button" data-button="${button}">${iconContent.indexOf('<') >= 0 ? iconContent : `<i class="${iconClass}">${iconContent}</i>`}</button>`.trim();
462
397
  }
463
-
464
398
  self.params.buttons.forEach((button, buttonIndex) => {
465
399
  if (Array.isArray(button)) {
466
400
  button.forEach(b => {
467
401
  html += renderButton(b);
468
402
  });
469
-
470
403
  if (buttonIndex < self.params.buttons.length - 1 && self.params.dividers) {
471
404
  html += '<div class="text-editor-button-divider"></div>';
472
405
  }
@@ -476,17 +409,14 @@ class TextEditor extends Framework7Class {
476
409
  });
477
410
  return html;
478
411
  }
479
-
480
412
  createToolbar() {
481
413
  const self = this;
482
414
  self.$el.prepend(`<div class="text-editor-toolbar">${self.renderButtons()}</div>`);
483
415
  }
484
-
485
416
  createKeyboardToolbar() {
486
417
  const self = this;
487
418
  self.$keyboardToolbarEl = $(`<div class="toolbar toolbar-bottom text-editor-keyboard-toolbar"><div class="toolbar-inner">${self.renderButtons()}</div></div>`);
488
419
  }
489
-
490
420
  createPopover() {
491
421
  const self = this;
492
422
  self.popover = self.app.popover.create({
@@ -499,7 +429,6 @@ class TextEditor extends Framework7Class {
499
429
  backdrop: false
500
430
  });
501
431
  }
502
-
503
432
  openKeyboardToolbar() {
504
433
  const self = this;
505
434
  if (self.$keyboardToolbarEl.parent(self.app.$el).length) return;
@@ -507,14 +436,12 @@ class TextEditor extends Framework7Class {
507
436
  self.emit('local::keyboardOpen textEditorKeyboardOpen', self);
508
437
  self.app.$el.append(self.$keyboardToolbarEl);
509
438
  }
510
-
511
439
  closeKeyboardToolbar() {
512
440
  const self = this;
513
441
  self.$keyboardToolbarEl.remove();
514
442
  self.$el.trigger('texteditor:keyboardclose');
515
443
  self.emit('local::keyboardClose textEditorKeyboardClose', self);
516
444
  }
517
-
518
445
  openPopover(targetX, targetY, targetWidth, targetHeight) {
519
446
  const self = this;
520
447
  if (!self.popover) return;
@@ -527,7 +454,6 @@ class TextEditor extends Framework7Class {
527
454
  clearTimeout(self.popoverTimeout);
528
455
  self.popoverTimeout = setTimeout(() => {
529
456
  if (!self.popover) return;
530
-
531
457
  if (self.popover.opened) {
532
458
  self.popover.resize();
533
459
  } else {
@@ -537,7 +463,6 @@ class TextEditor extends Framework7Class {
537
463
  }
538
464
  }, 400);
539
465
  }
540
-
541
466
  closePopover() {
542
467
  const self = this;
543
468
  clearTimeout(self.popoverTimeout);
@@ -549,20 +474,16 @@ class TextEditor extends Framework7Class {
549
474
  self.popover.close();
550
475
  }, 400);
551
476
  }
552
-
553
477
  init() {
554
478
  const self = this;
555
-
556
479
  if (self.value) {
557
480
  self.$contentEl.html(self.value);
558
481
  } else {
559
482
  self.value = self.$contentEl.html();
560
483
  }
561
-
562
484
  if (self.params.placeholder && self.value === '') {
563
485
  self.insertPlaceholder();
564
486
  }
565
-
566
487
  if (self.params.mode === 'toolbar') {
567
488
  self.createToolbar();
568
489
  } else if (self.params.mode === 'popover') {
@@ -570,33 +491,26 @@ class TextEditor extends Framework7Class {
570
491
  } else if (self.params.mode === 'keyboard-toolbar') {
571
492
  self.createKeyboardToolbar();
572
493
  }
573
-
574
494
  self.attachEvents();
575
495
  self.$el.trigger('texteditor:init');
576
496
  self.emit('local::init textEditorInit', self);
577
497
  return self;
578
498
  }
579
-
580
499
  destroy() {
581
500
  let self = this;
582
501
  self.$el.trigger('texteditor:beforedestroy');
583
502
  self.emit('local::beforeDestroy textEditorBeforeDestroy', self);
584
503
  self.detachEvents();
585
-
586
504
  if (self.params.mode === 'keyboard-toolbar' && self.$keyboardToolbarEl) {
587
505
  self.$keyboardToolbarEl.remove();
588
506
  }
589
-
590
507
  if (self.popover) {
591
508
  self.popover.close(false);
592
509
  self.popover.destroy();
593
510
  }
594
-
595
511
  delete self.$el[0].f7TextEditor;
596
512
  deleteProps(self);
597
513
  self = null;
598
514
  }
599
-
600
515
  }
601
-
602
516
  export default TextEditor;
@@ -1 +1 @@
1
- :root{--f7-text-editor-font-size:inherit;--f7-text-editor-font-weight:inherit;--f7-text-editor-border-width:1px;--f7-text-editor-height:250px;--f7-text-editor-margin:16px;--f7-text-editor-padding:8px;--f7-text-editor-button-bg-color:transparent;--f7-text-editor-button-size:28px;--f7-text-editor-button-icon-size:20px;--f7-text-editor-button-margin:2px;--f7-text-editor-button-border-radius:2px;--f7-text-editor-text-color:#000;--f7-text-editor-bg-color:#fff;--f7-text-editor-border-color:rgba(0, 0, 0, 0.1);--f7-text-editor-toolbar-bg-color:#fff;--f7-text-editor-button-text-color:#333;--f7-text-editor-button-divider-color:rgba(0, 0, 0, 0.15);--f7-text-editor-placeholder-color:rgba(0, 0, 0, 0.35)}:root .dark,:root.dark{--f7-text-editor-bg-color:#121212;--f7-text-editor-border-color:rgba(255, 255, 255, 0.1);--f7-text-editor-toolbar-bg-color:#202020;--f7-text-editor-text-color:#fff;--f7-text-editor-placeholder-color:rgba(255, 255, 255, 0.35);--f7-text-editor-button-text-color:#fff;--f7-text-editor-button-divider-color:rgba(255, 255, 255, 0.15)}.ios{--f7-text-editor-toolbar-padding:6px;--f7-text-editor-toolbar-border-color:rgba(0, 0, 0, 0.25)}.ios .dark,.ios.dark{--f7-text-editor-toolbar-bg-color:#121212;--f7-text-editor-toolbar-border-color:rgba(255, 255, 255, 0.1)}.md{--f7-text-editor-toolbar-padding:8px;--f7-text-editor-toolbar-box-shadow:0px 2px 3px -1px rgba(0, 0, 0, 0.25)}.aurora{--f7-text-editor-toolbar-padding:8px;--f7-text-editor-toolbar-border-color:rgba(0, 0, 0, 0.25)}.aurora .dark,.aurora.dark{--f7-text-editor-toolbar-border-color:rgba(255, 255, 255, 0.1)}.text-editor{margin:var(--f7-text-editor-margin);background-color:var(--f7-text-editor-bg-color);display:block;position:relative;border:var(--f7-text-editor-border-width) solid var(--f7-text-editor-border-color);display:flex;flex-direction:column;align-items:stretch;height:var(--f7-text-editor-height);box-sizing:border-box}.text-editor.text-editor-resizable{height:auto}.text-editor-toolbar{display:flex;flex-wrap:wrap;background:var(--f7-text-editor-toolbar-bg-color);z-index:100;position:relative;position:sticky;left:0;top:0;padding:var(--f7-text-editor-toolbar-padding);flex-shrink:0;box-shadow:var(--f7-text-editor-toolbar-box-shadow);box-sizing:border-box}.text-editor-toolbar:after{content:'';position:absolute;background-color:var(--f7-text-editor-toolbar-border-color);display:block;z-index:15;top:auto;right:auto;bottom:0;left:0;height:1px;width:100%;transform-origin:50% 100%;transform:scaleY(calc(1 / var(--f7-device-pixel-ratio)))}button.text-editor-button{-webkit-appearance:none;appearance:none;border:none;padding:0;margin:0;outline:0;font-family:inherit;background:0 0;cursor:pointer;box-shadow:none;border-radius:var(--f7-text-editor-button-border-radius);position:relative;z-index:1;display:flex;width:auto;overflow:hidden;width:var(--f7-text-editor-button-size);height:var(--f7-text-editor-button-size);align-items:center;justify-content:center;margin:var(--f7-text-editor-button-margin);box-sizing:border-box;color:var(--f7-text-editor-button-text-color);background-color:var(--f7-text-editor-button-bg-color);flex-shrink:0}button.text-editor-button .f7-icons,button.text-editor-button .material-icons,button.text-editor-button i{font-size:var(--f7-text-editor-button-icon-size);font-style:normal}button.text-editor-button .f7-icons sub,button.text-editor-button .f7-icons sup,button.text-editor-button .material-icons sub,button.text-editor-button .material-icons sup,button.text-editor-button i sub,button.text-editor-button i sup{font-size:60%}.text-editor-button-divider{width:1px;background:var(--f7-text-editor-button-divider-color);margin:0 2px;flex-shrink:0}.text-editor-content{-webkit-user-modify:read-write;-webkit-appearance:none;appearance:none;border:none;outline:0;height:100%;-webkit-user-select:text;user-select:text;padding:var(--f7-text-editor-padding);overflow:auto;flex-shrink:10;box-sizing:border-box;color:var(--f7-text-editor-text-color);font-size:var(--f7-text-editor-font-size);font-weight:var(--f7-text-editor-font-weight)}.text-editor-content .text-editor-placeholder{pointer-events:none;color:var(--f7-text-editor-placeholder-color)}.text-editor-content img{max-width:100%}.text-editor-content a{pointer-events:none}.text-editor-popover{z-index:12500;width:auto;max-width:80vw}.text-editor-popover .popover-inner{display:flex;flex-wrap:wrap;padding:3px}.text-editor-keyboard-toolbar{position:absolute;z-index:6000;--f7-safe-area-bottom:0px}.text-editor-keyboard-toolbar .toolbar-inner{justify-content:flex-start!important;overflow:auto;-webkit-overflow-scrolling:touch}.text-editor-keyboard-toolbar .toolbar-inner::-webkit-scrollbar{display:none}.text-editor-keyboard-toolbar .toolbar-inner .text-editor-button-divider{height:100%}.item-input .text-editor{border:none;margin:0;background-color:var(--f7-input-bg-color,transparent)}.item-input .text-editor-content{padding-top:var(--f7-textarea-padding-vertical);padding-bottom:var(--f7-textarea-padding-vertical);padding-left:var(--f7-input-padding-left);padding-right:var(--f7-input-padding-right);color:var(--f7-input-text-color);font-size:var(--f7-input-font-size)}.item-input .text-editor-toolbar{box-shadow:none}.item-input .text-editor-toolbar:after{display:none!important}.item-input-outline .text-editor-content{border-radius:var(--f7-input-outline-border-radius);padding-left:var(--f7-input-outline-padding-horizontal);padding-right:var(--f7-input-outline-padding-horizontal)}.ios button.text-editor-button{transition:opacity .3s}.ios button.text-editor-button.active-state{opacity:.3;transition-duration:0s}.md button.text-editor-button{--f7-touch-ripple-color:rgba(var(--f7-theme-color-rgb), 0.25)}.md button.text-editor-button:before{content:'';width:152%;height:152%;left:-26%;top:-26%;position:absolute;background-image:radial-gradient(circle at center,var(--f7-link-highlight-color) 66%,rgba(255,255,255,0) 66%);background-repeat:no-repeat;background-position:center;background-size:100% 100%;opacity:0;pointer-events:none;transition-duration:.3s;transition-property:opacity}.md button.text-editor-button.icon-only:before,.md button.text-editor-button.input-clear-button:before,.md button.text-editor-button.notification-close-button:before,.md button.text-editor-button.ripple-inset:before,.md button.text-editor-button.searchbar-disable-button:before{width:100%;height:100%;left:0;top:0;background-image:radial-gradient(circle at center,var(--f7-link-highlight-color) 71%,rgba(255,255,255,0) 71%)}.md button.text-editor-button.active-state:before{opacity:1;transition-duration:150ms}.md .text-editor-keyboard-toolbar .toolbar-inner{padding-left:8px;padding-right:8px}.aurora button.text-editor-button{transition:opacity .3s}.aurora button.text-editor-button.active-state{opacity:.3;transition-duration:0s}
1
+ :root{--f7-text-editor-font-size:inherit;--f7-text-editor-font-weight:inherit;--f7-text-editor-border-width:1px;--f7-text-editor-height:250px;--f7-text-editor-margin:16px;--f7-text-editor-padding:8px;--f7-text-editor-button-bg-color:transparent;--f7-text-editor-button-size:28px;--f7-text-editor-button-icon-size:20px;--f7-text-editor-button-margin:2px;--f7-text-editor-text-color:#000;--f7-text-editor-bg-color:#fff;--f7-text-editor-button-divider-color:rgba(0, 0, 0, 0.15);--f7-text-editor-placeholder-color:rgba(0, 0, 0, 0.35)}:root .dark,:root.dark{--f7-text-editor-bg-color:#121212;--f7-text-editor-text-color:#fff;--f7-text-editor-placeholder-color:rgba(255, 255, 255, 0.35);--f7-text-editor-button-divider-color:rgba(255, 255, 255, 0.15)}.ios{--f7-text-editor-toolbar-padding:6px;--f7-text-editor-button-border-radius:2px;--f7-text-editor-toolbar-border-color:rgba(0, 0, 0, 0.25);--f7-text-editor-toolbar-bg-color:#fff;--f7-text-editor-border-color:rgba(0, 0, 0, 0.1);--f7-text-editor-button-text-color:#333}.ios .dark,.ios.dark{--f7-text-editor-toolbar-bg-color:#121212;--f7-text-editor-toolbar-border-color:rgba(255, 255, 255, 0.1);--f7-text-editor-toolbar-bg-color:#202020;--f7-text-editor-border-color:rgba(255, 255, 255, 0.1);--f7-text-editor-button-text-color:#fff}.md{--f7-text-editor-button-border-radius:8px;--f7-text-editor-toolbar-padding:8px}.md,.md .dark,.md [class*=color-]{--f7-text-editor-toolbar-bg-color:var(--f7-md-surface-1);--f7-text-editor-border-color:var(--f7-md-outline);--f7-text-editor-button-text-color:var(--f7-md-on-surface)}.text-editor{margin:var(--f7-text-editor-margin);background-color:var(--f7-text-editor-bg-color);display:block;position:relative;border:var(--f7-text-editor-border-width) solid var(--f7-text-editor-border-color);display:flex;flex-direction:column;align-items:stretch;height:var(--f7-text-editor-height);box-sizing:border-box}.text-editor.text-editor-resizable{height:auto}.text-editor-toolbar{display:flex;flex-wrap:wrap;background:var(--f7-text-editor-toolbar-bg-color);z-index:100;position:relative;position:sticky;left:0;top:0;padding:var(--f7-text-editor-toolbar-padding);flex-shrink:0;box-sizing:border-box}.text-editor-toolbar:after{content:'';position:absolute;background-color:var(--f7-text-editor-toolbar-border-color);display:block;z-index:15;top:auto;right:auto;bottom:0;left:0;height:1px;width:100%;transform-origin:50% 100%;transform:scaleY(calc(1 / var(--f7-device-pixel-ratio)))}button.text-editor-button{-webkit-appearance:none;appearance:none;border:none;padding:0;margin:0;outline:0;font-family:inherit;background:0 0;cursor:pointer;box-shadow:none;border-radius:var(--f7-text-editor-button-border-radius);position:relative;z-index:1;display:flex;width:auto;overflow:hidden;width:var(--f7-text-editor-button-size);height:var(--f7-text-editor-button-size);align-items:center;justify-content:center;margin:var(--f7-text-editor-button-margin);box-sizing:border-box;color:var(--f7-text-editor-button-text-color);background-color:var(--f7-text-editor-button-bg-color);flex-shrink:0}button.text-editor-button .f7-icons,button.text-editor-button .material-icons,button.text-editor-button i{font-size:var(--f7-text-editor-button-icon-size);font-style:normal}button.text-editor-button .f7-icons sub,button.text-editor-button .f7-icons sup,button.text-editor-button .material-icons sub,button.text-editor-button .material-icons sup,button.text-editor-button i sub,button.text-editor-button i sup{font-size:60%}.text-editor-button-divider{width:1px;background:var(--f7-text-editor-button-divider-color);margin:0 2px;flex-shrink:0}.text-editor-content{-webkit-user-modify:read-write;-webkit-appearance:none;appearance:none;border:none;outline:0;height:100%;-webkit-user-select:text;user-select:text;padding:var(--f7-text-editor-padding);overflow:auto;flex-shrink:10;box-sizing:border-box;color:var(--f7-text-editor-text-color);font-size:var(--f7-text-editor-font-size);font-weight:var(--f7-text-editor-font-weight)}.text-editor-content .text-editor-placeholder{pointer-events:none;color:var(--f7-text-editor-placeholder-color)}.text-editor-content img{max-width:100%}.text-editor-content a{pointer-events:none}.text-editor-popover{z-index:12500;width:auto;max-width:80vw}.text-editor-popover .popover-inner{display:flex;flex-wrap:wrap;padding:3px}.text-editor-keyboard-toolbar{position:absolute;z-index:6000;--f7-safe-area-bottom:0px}.text-editor-keyboard-toolbar .toolbar-inner{justify-content:flex-start!important;overflow:auto;-webkit-overflow-scrolling:touch}.text-editor-keyboard-toolbar .toolbar-inner::-webkit-scrollbar{display:none}.text-editor-keyboard-toolbar .toolbar-inner .text-editor-button-divider{height:100%}.item-input .text-editor{border:none;margin:0;background-color:var(--f7-input-bg-color,transparent)}.item-input .text-editor-content{padding-top:var(--f7-textarea-padding-vertical);padding-bottom:var(--f7-textarea-padding-vertical);padding-left:var(--f7-input-padding-left);padding-right:var(--f7-input-padding-right);color:var(--f7-input-text-color);font-size:var(--f7-input-font-size)}.item-input .text-editor-toolbar{box-shadow:none}.item-input .text-editor-toolbar:after{display:none!important}.item-input-outline .text-editor-content{border-radius:var(--f7-input-outline-border-radius)}.ios button.text-editor-button{transition:opacity .3s}.ios button.text-editor-button.active-state{opacity:.3;transition-duration:0s}.md button.text-editor-button{--f7-touch-ripple-color:rgba(var(--f7-theme-color-rgb), 0.25)}.md button.text-editor-button:before{content:'';width:152%;height:152%;left:-26%;top:-26%;position:absolute;background-image:radial-gradient(circle at center,var(--f7-link-highlight-color) 66%,rgba(255,255,255,0) 66%);background-repeat:no-repeat;background-position:center;background-size:100% 100%;opacity:0;pointer-events:none;transition-duration:.3s;transition-property:opacity}.md button.text-editor-button.icon-only:before,.md button.text-editor-button.input-clear-button:before,.md button.text-editor-button.notification-close-button:before,.md button.text-editor-button.ripple-inset:before,.md button.text-editor-button.searchbar-disable-button:before{width:100%;height:100%;left:0;top:0;background-image:radial-gradient(circle at center,var(--f7-link-highlight-color) 71%,rgba(255,255,255,0) 71%)}.md button.text-editor-button.active-state:before{opacity:1;transition-duration:150ms}.md .text-editor-keyboard-toolbar .toolbar-inner{padding-left:8px;padding-right:8px}
@@ -9,46 +9,42 @@
9
9
  --f7-text-editor-button-size: 28px;
10
10
  --f7-text-editor-button-icon-size: 20px;
11
11
  --f7-text-editor-button-margin: 2px;
12
- --f7-text-editor-button-border-radius: 2px;
13
12
  .light-vars({
14
13
  --f7-text-editor-text-color: #000;
15
14
  --f7-text-editor-bg-color: #fff;
16
- --f7-text-editor-border-color: rgba(0,0,0,0.1);
17
- --f7-text-editor-toolbar-bg-color: #fff;
18
- --f7-text-editor-button-text-color: #333;
19
15
  --f7-text-editor-button-divider-color: rgba(0,0,0,0.15);
20
16
  --f7-text-editor-placeholder-color: rgba(0,0,0,0.35);
21
17
  });
22
18
  .dark-vars({
23
19
  --f7-text-editor-bg-color: #121212;
24
- --f7-text-editor-border-color: rgba(255,255,255,0.1);
25
- --f7-text-editor-toolbar-bg-color: #202020;
26
20
  --f7-text-editor-text-color: #fff;
27
21
  --f7-text-editor-placeholder-color: rgba(255,255,255,0.35);
28
- --f7-text-editor-button-text-color: #fff;
29
22
  --f7-text-editor-button-divider-color: rgba(255,255,255,0.15);
30
23
  });
31
24
  }
32
25
  .ios-vars({
33
26
  --f7-text-editor-toolbar-padding: 6px;
27
+ --f7-text-editor-button-border-radius: 2px;
34
28
  .light-vars({
35
29
  --f7-text-editor-toolbar-border-color: rgba(0,0,0,0.25);
30
+ --f7-text-editor-toolbar-bg-color: #fff;
31
+ --f7-text-editor-border-color: rgba(0,0,0,0.1);
32
+ --f7-text-editor-button-text-color: #333;
36
33
  });
37
34
  .dark-vars({
38
35
  --f7-text-editor-toolbar-bg-color: #121212;
39
36
  --f7-text-editor-toolbar-border-color: rgba(255,255,255,0.1);
37
+ --f7-text-editor-toolbar-bg-color: #202020;
38
+ --f7-text-editor-border-color: rgba(255,255,255,0.1);
39
+ --f7-text-editor-button-text-color: #fff;
40
40
  });
41
41
  });
42
42
  .md-vars({
43
+ --f7-text-editor-button-border-radius: 8px;
43
44
  --f7-text-editor-toolbar-padding: 8px;
44
- --f7-text-editor-toolbar-box-shadow: 0px 2px 3px -1px rgba(0,0,0,0.25);
45
45
  });
46
- .aurora-vars({
47
- --f7-text-editor-toolbar-padding: 8px;
48
- .light-vars({
49
- --f7-text-editor-toolbar-border-color: rgba(0,0,0,0.25);
50
- });
51
- .dark-vars({
52
- --f7-text-editor-toolbar-border-color: rgba(255,255,255,0.1);
53
- });
46
+ .md-color-vars({
47
+ --f7-text-editor-toolbar-bg-color: var(--f7-md-surface-1);
48
+ --f7-text-editor-border-color: var(--f7-md-outline);
49
+ --f7-text-editor-button-text-color: var(--f7-md-on-surface);
54
50
  });
@@ -1 +1 @@
1
- :root{--f7-text-editor-font-size:inherit;--f7-text-editor-font-weight:inherit;--f7-text-editor-border-width:1px;--f7-text-editor-height:250px;--f7-text-editor-margin:16px;--f7-text-editor-padding:8px;--f7-text-editor-button-bg-color:transparent;--f7-text-editor-button-size:28px;--f7-text-editor-button-icon-size:20px;--f7-text-editor-button-margin:2px;--f7-text-editor-button-border-radius:2px;--f7-text-editor-text-color:#000;--f7-text-editor-bg-color:#fff;--f7-text-editor-border-color:rgba(0, 0, 0, 0.1);--f7-text-editor-toolbar-bg-color:#fff;--f7-text-editor-button-text-color:#333;--f7-text-editor-button-divider-color:rgba(0, 0, 0, 0.15);--f7-text-editor-placeholder-color:rgba(0, 0, 0, 0.35)}:root .dark,:root.dark{--f7-text-editor-bg-color:#121212;--f7-text-editor-border-color:rgba(255, 255, 255, 0.1);--f7-text-editor-toolbar-bg-color:#202020;--f7-text-editor-text-color:#fff;--f7-text-editor-placeholder-color:rgba(255, 255, 255, 0.35);--f7-text-editor-button-text-color:#fff;--f7-text-editor-button-divider-color:rgba(255, 255, 255, 0.15)}.ios{--f7-text-editor-toolbar-padding:6px;--f7-text-editor-toolbar-border-color:rgba(0, 0, 0, 0.25)}.ios .dark,.ios.dark{--f7-text-editor-toolbar-bg-color:#121212;--f7-text-editor-toolbar-border-color:rgba(255, 255, 255, 0.1)}.md{--f7-text-editor-toolbar-padding:8px;--f7-text-editor-toolbar-box-shadow:0px 2px 3px -1px rgba(0, 0, 0, 0.25)}.aurora{--f7-text-editor-toolbar-padding:8px;--f7-text-editor-toolbar-border-color:rgba(0, 0, 0, 0.25)}.aurora .dark,.aurora.dark{--f7-text-editor-toolbar-border-color:rgba(255, 255, 255, 0.1)}.text-editor{margin:var(--f7-text-editor-margin);background-color:var(--f7-text-editor-bg-color);display:block;position:relative;border:var(--f7-text-editor-border-width) solid var(--f7-text-editor-border-color);display:flex;flex-direction:column;align-items:stretch;height:var(--f7-text-editor-height);box-sizing:border-box}.text-editor.text-editor-resizable{height:auto}.text-editor-toolbar{display:flex;flex-wrap:wrap;background:var(--f7-text-editor-toolbar-bg-color);z-index:100;position:relative;position:sticky;left:0;top:0;padding:var(--f7-text-editor-toolbar-padding);flex-shrink:0;box-shadow:var(--f7-text-editor-toolbar-box-shadow);box-sizing:border-box}.text-editor-toolbar:after{content:'';position:absolute;background-color:var(--f7-text-editor-toolbar-border-color);display:block;z-index:15;top:auto;right:auto;bottom:0;left:0;height:1px;width:100%;transform-origin:50% 100%;transform:scaleY(calc(1 / var(--f7-device-pixel-ratio)))}button.text-editor-button{-webkit-appearance:none;appearance:none;border:none;padding:0;margin:0;outline:0;font-family:inherit;background:0 0;cursor:pointer;box-shadow:none;border-radius:var(--f7-text-editor-button-border-radius);position:relative;z-index:1;display:flex;width:auto;overflow:hidden;width:var(--f7-text-editor-button-size);height:var(--f7-text-editor-button-size);align-items:center;justify-content:center;margin:var(--f7-text-editor-button-margin);box-sizing:border-box;color:var(--f7-text-editor-button-text-color);background-color:var(--f7-text-editor-button-bg-color);flex-shrink:0}button.text-editor-button .f7-icons,button.text-editor-button .material-icons,button.text-editor-button i{font-size:var(--f7-text-editor-button-icon-size);font-style:normal}button.text-editor-button .f7-icons sub,button.text-editor-button .f7-icons sup,button.text-editor-button .material-icons sub,button.text-editor-button .material-icons sup,button.text-editor-button i sub,button.text-editor-button i sup{font-size:60%}.text-editor-button-divider{width:1px;background:var(--f7-text-editor-button-divider-color);margin:0 2px;flex-shrink:0}.text-editor-content{-webkit-user-modify:read-write;-webkit-appearance:none;appearance:none;border:none;outline:0;height:100%;-webkit-user-select:text;user-select:text;padding:var(--f7-text-editor-padding);overflow:auto;flex-shrink:10;box-sizing:border-box;color:var(--f7-text-editor-text-color);font-size:var(--f7-text-editor-font-size);font-weight:var(--f7-text-editor-font-weight)}.text-editor-content .text-editor-placeholder{pointer-events:none;color:var(--f7-text-editor-placeholder-color)}.text-editor-content img{max-width:100%}.text-editor-content a{pointer-events:none}.text-editor-popover{z-index:12500;width:auto;max-width:80vw}.text-editor-popover .popover-inner{display:flex;flex-wrap:wrap;padding:3px}.text-editor-keyboard-toolbar{position:absolute;z-index:6000;--f7-safe-area-bottom:0px}.text-editor-keyboard-toolbar .toolbar-inner{justify-content:flex-start!important;overflow:auto;-webkit-overflow-scrolling:touch}.text-editor-keyboard-toolbar .toolbar-inner::-webkit-scrollbar{display:none}.text-editor-keyboard-toolbar .toolbar-inner .text-editor-button-divider{height:100%}.item-input .text-editor{border:none;margin:0;background-color:var(--f7-input-bg-color,transparent)}.item-input .text-editor-content{padding-top:var(--f7-textarea-padding-vertical);padding-bottom:var(--f7-textarea-padding-vertical);padding-left:var(--f7-input-padding-left);padding-right:var(--f7-input-padding-right);color:var(--f7-input-text-color);font-size:var(--f7-input-font-size)}.item-input .text-editor-toolbar{box-shadow:none}.item-input .text-editor-toolbar:after{display:none!important}.item-input-outline .text-editor-content{border-radius:var(--f7-input-outline-border-radius);padding-left:var(--f7-input-outline-padding-horizontal);padding-right:var(--f7-input-outline-padding-horizontal)}.ios button.text-editor-button{transition:opacity .3s}.ios button.text-editor-button.active-state{opacity:.3;transition-duration:0s}.md button.text-editor-button{--f7-touch-ripple-color:rgba(var(--f7-theme-color-rgb), 0.25)}.md button.text-editor-button:before{content:'';width:152%;height:152%;left:-26%;top:-26%;position:absolute;background-image:radial-gradient(circle at center,var(--f7-link-highlight-color) 66%,rgba(255,255,255,0) 66%);background-repeat:no-repeat;background-position:center;background-size:100% 100%;opacity:0;pointer-events:none;transition-duration:.3s;transition-property:opacity}.md button.text-editor-button.icon-only:before,.md button.text-editor-button.input-clear-button:before,.md button.text-editor-button.notification-close-button:before,.md button.text-editor-button.ripple-inset:before,.md button.text-editor-button.searchbar-disable-button:before{width:100%;height:100%;left:0;top:0;background-image:radial-gradient(circle at center,var(--f7-link-highlight-color) 71%,rgba(255,255,255,0) 71%)}.md button.text-editor-button.active-state:before{opacity:1;transition-duration:150ms}.md .text-editor-keyboard-toolbar .toolbar-inner{padding-left:8px;padding-right:8px}.aurora button.text-editor-button{transition:opacity .3s}.aurora button.text-editor-button.active-state{opacity:.3;transition-duration:0s}
1
+ :root{--f7-text-editor-font-size:inherit;--f7-text-editor-font-weight:inherit;--f7-text-editor-border-width:1px;--f7-text-editor-height:250px;--f7-text-editor-margin:16px;--f7-text-editor-padding:8px;--f7-text-editor-button-bg-color:transparent;--f7-text-editor-button-size:28px;--f7-text-editor-button-icon-size:20px;--f7-text-editor-button-margin:2px;--f7-text-editor-text-color:#000;--f7-text-editor-bg-color:#fff;--f7-text-editor-button-divider-color:rgba(0, 0, 0, 0.15);--f7-text-editor-placeholder-color:rgba(0, 0, 0, 0.35)}:root .dark,:root.dark{--f7-text-editor-bg-color:#121212;--f7-text-editor-text-color:#fff;--f7-text-editor-placeholder-color:rgba(255, 255, 255, 0.35);--f7-text-editor-button-divider-color:rgba(255, 255, 255, 0.15)}.ios{--f7-text-editor-toolbar-padding:6px;--f7-text-editor-button-border-radius:2px;--f7-text-editor-toolbar-border-color:rgba(0, 0, 0, 0.25);--f7-text-editor-toolbar-bg-color:#fff;--f7-text-editor-border-color:rgba(0, 0, 0, 0.1);--f7-text-editor-button-text-color:#333}.ios .dark,.ios.dark{--f7-text-editor-toolbar-bg-color:#121212;--f7-text-editor-toolbar-border-color:rgba(255, 255, 255, 0.1);--f7-text-editor-toolbar-bg-color:#202020;--f7-text-editor-border-color:rgba(255, 255, 255, 0.1);--f7-text-editor-button-text-color:#fff}.md{--f7-text-editor-button-border-radius:8px;--f7-text-editor-toolbar-padding:8px}.md,.md .dark,.md [class*=color-]{--f7-text-editor-toolbar-bg-color:var(--f7-md-surface-1);--f7-text-editor-border-color:var(--f7-md-outline);--f7-text-editor-button-text-color:var(--f7-md-on-surface)}.text-editor{margin:var(--f7-text-editor-margin);background-color:var(--f7-text-editor-bg-color);display:block;position:relative;border:var(--f7-text-editor-border-width) solid var(--f7-text-editor-border-color);display:flex;flex-direction:column;align-items:stretch;height:var(--f7-text-editor-height);box-sizing:border-box}.text-editor.text-editor-resizable{height:auto}.text-editor-toolbar{display:flex;flex-wrap:wrap;background:var(--f7-text-editor-toolbar-bg-color);z-index:100;position:relative;position:sticky;left:0;top:0;padding:var(--f7-text-editor-toolbar-padding);flex-shrink:0;box-sizing:border-box}.text-editor-toolbar:after{content:'';position:absolute;background-color:var(--f7-text-editor-toolbar-border-color);display:block;z-index:15;top:auto;right:auto;bottom:0;left:0;height:1px;width:100%;transform-origin:50% 100%;transform:scaleY(calc(1 / var(--f7-device-pixel-ratio)))}button.text-editor-button{-webkit-appearance:none;appearance:none;border:none;padding:0;margin:0;outline:0;font-family:inherit;background:0 0;cursor:pointer;box-shadow:none;border-radius:var(--f7-text-editor-button-border-radius);position:relative;z-index:1;display:flex;width:auto;overflow:hidden;width:var(--f7-text-editor-button-size);height:var(--f7-text-editor-button-size);align-items:center;justify-content:center;margin:var(--f7-text-editor-button-margin);box-sizing:border-box;color:var(--f7-text-editor-button-text-color);background-color:var(--f7-text-editor-button-bg-color);flex-shrink:0}button.text-editor-button .f7-icons,button.text-editor-button .material-icons,button.text-editor-button i{font-size:var(--f7-text-editor-button-icon-size);font-style:normal}button.text-editor-button .f7-icons sub,button.text-editor-button .f7-icons sup,button.text-editor-button .material-icons sub,button.text-editor-button .material-icons sup,button.text-editor-button i sub,button.text-editor-button i sup{font-size:60%}.text-editor-button-divider{width:1px;background:var(--f7-text-editor-button-divider-color);margin:0 2px;flex-shrink:0}.text-editor-content{-webkit-user-modify:read-write;-webkit-appearance:none;appearance:none;border:none;outline:0;height:100%;-webkit-user-select:text;user-select:text;padding:var(--f7-text-editor-padding);overflow:auto;flex-shrink:10;box-sizing:border-box;color:var(--f7-text-editor-text-color);font-size:var(--f7-text-editor-font-size);font-weight:var(--f7-text-editor-font-weight)}.text-editor-content .text-editor-placeholder{pointer-events:none;color:var(--f7-text-editor-placeholder-color)}.text-editor-content img{max-width:100%}.text-editor-content a{pointer-events:none}.text-editor-popover{z-index:12500;width:auto;max-width:80vw}.text-editor-popover .popover-inner{display:flex;flex-wrap:wrap;padding:3px}.text-editor-keyboard-toolbar{position:absolute;z-index:6000;--f7-safe-area-bottom:0px}.text-editor-keyboard-toolbar .toolbar-inner{justify-content:flex-start!important;overflow:auto;-webkit-overflow-scrolling:touch}.text-editor-keyboard-toolbar .toolbar-inner::-webkit-scrollbar{display:none}.text-editor-keyboard-toolbar .toolbar-inner .text-editor-button-divider{height:100%}.item-input .text-editor{border:none;margin:0;background-color:var(--f7-input-bg-color,transparent)}.item-input .text-editor-content{padding-top:var(--f7-textarea-padding-vertical);padding-bottom:var(--f7-textarea-padding-vertical);padding-left:var(--f7-input-padding-left);padding-right:var(--f7-input-padding-right);color:var(--f7-input-text-color);font-size:var(--f7-input-font-size)}.item-input .text-editor-toolbar{box-shadow:none}.item-input .text-editor-toolbar:after{display:none!important}.item-input-outline .text-editor-content{border-radius:var(--f7-input-outline-border-radius)}.ios button.text-editor-button{transition:opacity .3s}.ios button.text-editor-button.active-state{opacity:.3;transition-duration:0s}.md button.text-editor-button{--f7-touch-ripple-color:rgba(var(--f7-theme-color-rgb), 0.25)}.md button.text-editor-button:before{content:'';width:152%;height:152%;left:-26%;top:-26%;position:absolute;background-image:radial-gradient(circle at center,var(--f7-link-highlight-color) 66%,rgba(255,255,255,0) 66%);background-repeat:no-repeat;background-position:center;background-size:100% 100%;opacity:0;pointer-events:none;transition-duration:.3s;transition-property:opacity}.md button.text-editor-button.icon-only:before,.md button.text-editor-button.input-clear-button:before,.md button.text-editor-button.notification-close-button:before,.md button.text-editor-button.ripple-inset:before,.md button.text-editor-button.searchbar-disable-button:before{width:100%;height:100%;left:0;top:0;background-image:radial-gradient(circle at center,var(--f7-link-highlight-color) 71%,rgba(255,255,255,0) 71%)}.md button.text-editor-button.active-state:before{opacity:1;transition-duration:150ms}.md .text-editor-keyboard-toolbar .toolbar-inner{padding-left:8px;padding-right:8px}