@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.
Files changed (676) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +32 -0
  3. package/components/accordion/accordion-ios.less +2 -0
  4. package/components/accordion/accordion-md.less +2 -0
  5. package/components/accordion/accordion-rtl.css +1 -0
  6. package/components/accordion/accordion-vars.less +0 -0
  7. package/components/accordion/accordion.css +1 -0
  8. package/components/accordion/accordion.d.ts +55 -0
  9. package/components/accordion/accordion.js +118 -0
  10. package/components/accordion/accordion.less +215 -0
  11. package/components/actions/actions-class.js +325 -0
  12. package/components/actions/actions-ios.less +51 -0
  13. package/components/actions/actions-md.less +24 -0
  14. package/components/actions/actions-rtl.css +1 -0
  15. package/components/actions/actions-vars.less +72 -0
  16. package/components/actions/actions.css +1 -0
  17. package/components/actions/actions.d.ts +164 -0
  18. package/components/actions/actions.js +47 -0
  19. package/components/actions/actions.less +182 -0
  20. package/components/app/app-class.d.ts +189 -0
  21. package/components/app/app-class.js +349 -0
  22. package/components/app/app-ios.less +23 -0
  23. package/components/app/app-md.less +8 -0
  24. package/components/app/app-vars.less +122 -0
  25. package/components/app/app.less +121 -0
  26. package/components/app/load-module.js +125 -0
  27. package/components/area-chart/area-chart-class.js +467 -0
  28. package/components/area-chart/area-chart-ios.less +2 -0
  29. package/components/area-chart/area-chart-md.less +2 -0
  30. package/components/area-chart/area-chart-rtl.css +1 -0
  31. package/components/area-chart/area-chart-vars.less +35 -0
  32. package/components/area-chart/area-chart.css +1 -0
  33. package/components/area-chart/area-chart.d.ts +128 -0
  34. package/components/area-chart/area-chart.js +44 -0
  35. package/components/area-chart/area-chart.less +131 -0
  36. package/components/autocomplete/autocomplete-class.js +813 -0
  37. package/components/autocomplete/autocomplete-ios.less +9 -0
  38. package/components/autocomplete/autocomplete-md.less +30 -0
  39. package/components/autocomplete/autocomplete-rtl.css +1 -0
  40. package/components/autocomplete/autocomplete-vars.less +36 -0
  41. package/components/autocomplete/autocomplete.css +1 -0
  42. package/components/autocomplete/autocomplete.d.ts +193 -0
  43. package/components/autocomplete/autocomplete.js +81 -0
  44. package/components/autocomplete/autocomplete.less +102 -0
  45. package/components/badge/badge-ios.less +2 -0
  46. package/components/badge/badge-md.less +2 -0
  47. package/components/badge/badge-vars.less +18 -0
  48. package/components/badge/badge.d.ts +14 -0
  49. package/components/badge/badge.js +3 -0
  50. package/components/badge/badge.less +45 -0
  51. package/components/block/block-ios.less +2 -0
  52. package/components/block/block-md.less +2 -0
  53. package/components/block/block-vars.less +77 -0
  54. package/components/block/block.d.ts +14 -0
  55. package/components/block/block.js +3 -0
  56. package/components/block/block.less +209 -0
  57. package/components/breadcrumbs/breadcrumbs-ios.less +2 -0
  58. package/components/breadcrumbs/breadcrumbs-md.less +2 -0
  59. package/components/breadcrumbs/breadcrumbs-rtl.css +1 -0
  60. package/components/breadcrumbs/breadcrumbs-vars.less +52 -0
  61. package/components/breadcrumbs/breadcrumbs.css +1 -0
  62. package/components/breadcrumbs/breadcrumbs.d.ts +15 -0
  63. package/components/breadcrumbs/breadcrumbs.js +11 -0
  64. package/components/breadcrumbs/breadcrumbs.less +91 -0
  65. package/components/button/button-ios.less +21 -0
  66. package/components/button/button-md.less +11 -0
  67. package/components/button/button-vars.less +114 -0
  68. package/components/button/button.d.ts +14 -0
  69. package/components/button/button.js +3 -0
  70. package/components/button/button.less +421 -0
  71. package/components/calendar/calendar-class.js +1872 -0
  72. package/components/calendar/calendar-ios.less +2 -0
  73. package/components/calendar/calendar-md.less +2 -0
  74. package/components/calendar/calendar-rtl.css +1 -0
  75. package/components/calendar/calendar-vars.less +108 -0
  76. package/components/calendar/calendar.css +1 -0
  77. package/components/calendar/calendar.d.ts +312 -0
  78. package/components/calendar/calendar.js +118 -0
  79. package/components/calendar/calendar.less +448 -0
  80. package/components/card/card-ios.less +2 -0
  81. package/components/card/card-md.less +2 -0
  82. package/components/card/card-rtl.css +1 -0
  83. package/components/card/card-vars.less +80 -0
  84. package/components/card/card.css +1 -0
  85. package/components/card/card.d.ts +69 -0
  86. package/components/card/card.js +504 -0
  87. package/components/card/card.less +307 -0
  88. package/components/checkbox/checkbox-ios.less +23 -0
  89. package/components/checkbox/checkbox-md.less +17 -0
  90. package/components/checkbox/checkbox-rtl.css +1 -0
  91. package/components/checkbox/checkbox-vars.less +25 -0
  92. package/components/checkbox/checkbox.css +1 -0
  93. package/components/checkbox/checkbox.d.ts +14 -0
  94. package/components/checkbox/checkbox.js +3 -0
  95. package/components/checkbox/checkbox.less +155 -0
  96. package/components/chip/chip-ios.less +25 -0
  97. package/components/chip/chip-md.less +30 -0
  98. package/components/chip/chip-rtl.css +1 -0
  99. package/components/chip/chip-vars.less +42 -0
  100. package/components/chip/chip.css +1 -0
  101. package/components/chip/chip.d.ts +14 -0
  102. package/components/chip/chip.js +3 -0
  103. package/components/chip/chip.less +106 -0
  104. package/components/color-picker/color-picker-class.js +871 -0
  105. package/components/color-picker/color-picker-ios.less +2 -0
  106. package/components/color-picker/color-picker-md.less +2 -0
  107. package/components/color-picker/color-picker-rtl.css +1 -0
  108. package/components/color-picker/color-picker-vars.less +39 -0
  109. package/components/color-picker/color-picker.css +1 -0
  110. package/components/color-picker/color-picker.d.ts +233 -0
  111. package/components/color-picker/color-picker.js +92 -0
  112. package/components/color-picker/color-picker.less +557 -0
  113. package/components/color-picker/modules/alpha-slider.js +91 -0
  114. package/components/color-picker/modules/brightness-slider.js +80 -0
  115. package/components/color-picker/modules/current-color.js +14 -0
  116. package/components/color-picker/modules/hex.js +71 -0
  117. package/components/color-picker/modules/hs-spectrum.js +118 -0
  118. package/components/color-picker/modules/hsb-sliders.js +191 -0
  119. package/components/color-picker/modules/hue-slider.js +73 -0
  120. package/components/color-picker/modules/initial-current-colors.js +43 -0
  121. package/components/color-picker/modules/palette.js +46 -0
  122. package/components/color-picker/modules/rgb-bars.js +183 -0
  123. package/components/color-picker/modules/rgb-sliders.js +185 -0
  124. package/components/color-picker/modules/sb-spectrum.js +119 -0
  125. package/components/color-picker/modules/wheel.js +173 -0
  126. package/components/contacts-list/contacts-list-ios.less +2 -0
  127. package/components/contacts-list/contacts-list-md.less +21 -0
  128. package/components/contacts-list/contacts-list-rtl.css +1 -0
  129. package/components/contacts-list/contacts-list-vars.less +24 -0
  130. package/components/contacts-list/contacts-list.css +1 -0
  131. package/components/contacts-list/contacts-list.d.ts +14 -0
  132. package/components/contacts-list/contacts-list.js +3 -0
  133. package/components/contacts-list/contacts-list.less +26 -0
  134. package/components/data-table/data-table-class.js +141 -0
  135. package/components/data-table/data-table-ios.less +70 -0
  136. package/components/data-table/data-table-md.less +88 -0
  137. package/components/data-table/data-table-rtl.css +1 -0
  138. package/components/data-table/data-table-vars.less +77 -0
  139. package/components/data-table/data-table.css +1 -0
  140. package/components/data-table/data-table.d.ts +61 -0
  141. package/components/data-table/data-table.js +64 -0
  142. package/components/data-table/data-table.less +429 -0
  143. package/components/dialog/dialog-class.js +196 -0
  144. package/components/dialog/dialog-ios.less +94 -0
  145. package/components/dialog/dialog-md.less +86 -0
  146. package/components/dialog/dialog-rtl.css +1 -0
  147. package/components/dialog/dialog-vars.less +93 -0
  148. package/components/dialog/dialog.css +1 -0
  149. package/components/dialog/dialog.d.ts +245 -0
  150. package/components/dialog/dialog.js +242 -0
  151. package/components/dialog/dialog.less +142 -0
  152. package/components/fab/fab-ios.less +9 -0
  153. package/components/fab/fab-md.less +11 -0
  154. package/components/fab/fab-rtl.css +1 -0
  155. package/components/fab/fab-vars.less +46 -0
  156. package/components/fab/fab.css +1 -0
  157. package/components/fab/fab.d.ts +32 -0
  158. package/components/fab/fab.js +172 -0
  159. package/components/fab/fab.less +523 -0
  160. package/components/form/form-ios.less +0 -0
  161. package/components/form/form-md.less +0 -0
  162. package/components/form/form-rtl.css +0 -0
  163. package/components/form/form.css +0 -0
  164. package/components/form/form.d.ts +64 -0
  165. package/components/form/form.js +311 -0
  166. package/components/form/form.less +7 -0
  167. package/components/gauge/gauge-class.js +298 -0
  168. package/components/gauge/gauge-ios.less +2 -0
  169. package/components/gauge/gauge-md.less +2 -0
  170. package/components/gauge/gauge-rtl.css +1 -0
  171. package/components/gauge/gauge.css +1 -0
  172. package/components/gauge/gauge.d.ts +100 -0
  173. package/components/gauge/gauge.js +90 -0
  174. package/components/gauge/gauge.less +24 -0
  175. package/components/grid/grid-ios.less +2 -0
  176. package/components/grid/grid-md.less +2 -0
  177. package/components/grid/grid-rtl.css +1 -0
  178. package/components/grid/grid-vars.less +3 -0
  179. package/components/grid/grid.css +1 -0
  180. package/components/grid/grid.d.ts +15 -0
  181. package/components/grid/grid.js +3 -0
  182. package/components/grid/grid.less +78 -0
  183. package/components/icon/icon-ios.less +44 -0
  184. package/components/icon/icon-md.less +56 -0
  185. package/components/icon/icon.d.ts +14 -0
  186. package/components/icon/icon.js +3 -0
  187. package/components/icon/icon.less +33 -0
  188. package/components/infinite-scroll/infinite-scroll-ios.less +11 -0
  189. package/components/infinite-scroll/infinite-scroll-md.less +6 -0
  190. package/components/infinite-scroll/infinite-scroll-rtl.css +1 -0
  191. package/components/infinite-scroll/infinite-scroll.css +1 -0
  192. package/components/infinite-scroll/infinite-scroll.d.ts +27 -0
  193. package/components/infinite-scroll/infinite-scroll.js +94 -0
  194. package/components/infinite-scroll/infinite-scroll.less +15 -0
  195. package/components/input/input-ios.less +129 -0
  196. package/components/input/input-md.less +171 -0
  197. package/components/input/input-rtl.css +1 -0
  198. package/components/input/input-vars.less +94 -0
  199. package/components/input/input.css +1 -0
  200. package/components/input/input.d.ts +60 -0
  201. package/components/input/input.js +339 -0
  202. package/components/input/input.less +355 -0
  203. package/components/link/link-ios.less +9 -0
  204. package/components/link/link-md.less +2 -0
  205. package/components/link/link-vars.less +9 -0
  206. package/components/link/link.d.ts +14 -0
  207. package/components/link/link.js +3 -0
  208. package/components/link/link.less +37 -0
  209. package/components/list/list-ios.less +15 -0
  210. package/components/list/list-md.less +5 -0
  211. package/components/list/list-vars.less +184 -0
  212. package/components/list/list.d.ts +14 -0
  213. package/components/list/list.js +3 -0
  214. package/components/list/list.less +718 -0
  215. package/components/list-index/list-index-class.js +333 -0
  216. package/components/list-index/list-index-ios.less +21 -0
  217. package/components/list-index/list-index-md.less +7 -0
  218. package/components/list-index/list-index-rtl.css +1 -0
  219. package/components/list-index/list-index-vars.less +25 -0
  220. package/components/list-index/list-index.css +1 -0
  221. package/components/list-index/list-index.d.ts +101 -0
  222. package/components/list-index/list-index.js +65 -0
  223. package/components/list-index/list-index.less +130 -0
  224. package/components/login-screen/login-screen-class.js +38 -0
  225. package/components/login-screen/login-screen-ios.less +2 -0
  226. package/components/login-screen/login-screen-md.less +2 -0
  227. package/components/login-screen/login-screen-rtl.css +1 -0
  228. package/components/login-screen/login-screen-vars.less +33 -0
  229. package/components/login-screen/login-screen.css +1 -0
  230. package/components/login-screen/login-screen.d.ts +99 -0
  231. package/components/login-screen/login-screen.js +32 -0
  232. package/components/login-screen/login-screen.less +100 -0
  233. package/components/messagebar/messagebar-class.js +367 -0
  234. package/components/messagebar/messagebar-ios.less +88 -0
  235. package/components/messagebar/messagebar-md.less +114 -0
  236. package/components/messagebar/messagebar-rtl.css +1 -0
  237. package/components/messagebar/messagebar-vars.less +75 -0
  238. package/components/messagebar/messagebar.css +1 -0
  239. package/components/messagebar/messagebar.d.ts +165 -0
  240. package/components/messagebar/messagebar.js +66 -0
  241. package/components/messagebar/messagebar.less +162 -0
  242. package/components/messages/messages-class.js +487 -0
  243. package/components/messages/messages-ios.less +165 -0
  244. package/components/messages/messages-md.less +140 -0
  245. package/components/messages/messages-rtl.css +1 -0
  246. package/components/messages/messages-vars.less +82 -0
  247. package/components/messages/messages.css +1 -0
  248. package/components/messages/messages.d.ts +162 -0
  249. package/components/messages/messages.js +65 -0
  250. package/components/messages/messages.less +218 -0
  251. package/components/modal/custom-modal-class.js +66 -0
  252. package/components/modal/modal-class.js +224 -0
  253. package/components/modal/modal.d.ts +82 -0
  254. package/components/modal/modal.js +22 -0
  255. package/components/modal/modal.less +14 -0
  256. package/components/navbar/navbar-ios.less +755 -0
  257. package/components/navbar/navbar-md.less +65 -0
  258. package/components/navbar/navbar-vars.less +74 -0
  259. package/components/navbar/navbar.d.ts +77 -0
  260. package/components/navbar/navbar.js +712 -0
  261. package/components/navbar/navbar.less +311 -0
  262. package/components/notification/notification-class.js +212 -0
  263. package/components/notification/notification-ios.less +55 -0
  264. package/components/notification/notification-md.less +87 -0
  265. package/components/notification/notification-rtl.css +1 -0
  266. package/components/notification/notification-vars.less +75 -0
  267. package/components/notification/notification.css +1 -0
  268. package/components/notification/notification.d.ts +122 -0
  269. package/components/notification/notification.js +33 -0
  270. package/components/notification/notification.less +94 -0
  271. package/components/page/page-ios.less +154 -0
  272. package/components/page/page-md.less +83 -0
  273. package/components/page/page-transitions/circle.less +107 -0
  274. package/components/page/page-transitions/cover-v.less +61 -0
  275. package/components/page/page-transitions/cover.less +71 -0
  276. package/components/page/page-transitions/dive.less +77 -0
  277. package/components/page/page-transitions/fade.less +53 -0
  278. package/components/page/page-transitions/flip.less +91 -0
  279. package/components/page/page-transitions/parallax.less +75 -0
  280. package/components/page/page-transitions/push.less +75 -0
  281. package/components/page/page-vars.less +47 -0
  282. package/components/page/page.d.ts +14 -0
  283. package/components/page/page.js +3 -0
  284. package/components/page/page.less +204 -0
  285. package/components/panel/panel-class.js +556 -0
  286. package/components/panel/panel-ios.less +2 -0
  287. package/components/panel/panel-md.less +11 -0
  288. package/components/panel/panel-rtl.css +3 -0
  289. package/components/panel/panel-vars.less +24 -0
  290. package/components/panel/panel.css +3 -0
  291. package/components/panel/panel.d.ts +198 -0
  292. package/components/panel/panel.js +189 -0
  293. package/components/panel/panel.less +403 -0
  294. package/components/panel/resizable-panel.js +160 -0
  295. package/components/panel/swipe-panel.js +311 -0
  296. package/components/photo-browser/photo-browser-class.js +734 -0
  297. package/components/photo-browser/photo-browser-ios.less +2 -0
  298. package/components/photo-browser/photo-browser-md.less +2 -0
  299. package/components/photo-browser/photo-browser-rtl.css +1 -0
  300. package/components/photo-browser/photo-browser-vars.less +16 -0
  301. package/components/photo-browser/photo-browser.css +1 -0
  302. package/components/photo-browser/photo-browser.d.ts +204 -0
  303. package/components/photo-browser/photo-browser.js +73 -0
  304. package/components/photo-browser/photo-browser.less +358 -0
  305. package/components/picker/picker-class.js +588 -0
  306. package/components/picker/picker-column.js +121 -0
  307. package/components/picker/picker-ios.less +12 -0
  308. package/components/picker/picker-md.less +8 -0
  309. package/components/picker/picker-rtl.css +1 -0
  310. package/components/picker/picker-vars.less +35 -0
  311. package/components/picker/picker.css +1 -0
  312. package/components/picker/picker.d.ts +209 -0
  313. package/components/picker/picker.js +59 -0
  314. package/components/picker/picker.less +180 -0
  315. package/components/pie-chart/pie-chart-class.js +250 -0
  316. package/components/pie-chart/pie-chart-ios.less +2 -0
  317. package/components/pie-chart/pie-chart-md.less +2 -0
  318. package/components/pie-chart/pie-chart-rtl.css +1 -0
  319. package/components/pie-chart/pie-chart.css +1 -0
  320. package/components/pie-chart/pie-chart.d.ts +99 -0
  321. package/components/pie-chart/pie-chart.js +32 -0
  322. package/components/pie-chart/pie-chart.less +43 -0
  323. package/components/popover/popover-class.js +293 -0
  324. package/components/popover/popover-ios.less +6 -0
  325. package/components/popover/popover-md.less +41 -0
  326. package/components/popover/popover-rtl.css +1 -0
  327. package/components/popover/popover-vars.less +25 -0
  328. package/components/popover/popover.css +1 -0
  329. package/components/popover/popover.d.ts +137 -0
  330. package/components/popover/popover.js +75 -0
  331. package/components/popover/popover.less +168 -0
  332. package/components/popup/popup-class.js +329 -0
  333. package/components/popup/popup-ios.less +2 -0
  334. package/components/popup/popup-md.less +2 -0
  335. package/components/popup/popup-rtl.css +1 -0
  336. package/components/popup/popup-vars.less +21 -0
  337. package/components/popup/popup.css +1 -0
  338. package/components/popup/popup.d.ts +143 -0
  339. package/components/popup/popup.js +46 -0
  340. package/components/popup/popup.less +204 -0
  341. package/components/preloader/preloader-ios.less +57 -0
  342. package/components/preloader/preloader-md.less +114 -0
  343. package/components/preloader/preloader-rtl.css +1 -0
  344. package/components/preloader/preloader-vars.less +16 -0
  345. package/components/preloader/preloader.css +1 -0
  346. package/components/preloader/preloader.d.ts +26 -0
  347. package/components/preloader/preloader.js +106 -0
  348. package/components/preloader/preloader.less +60 -0
  349. package/components/progressbar/progressbar-ios.less +59 -0
  350. package/components/progressbar/progressbar-md.less +141 -0
  351. package/components/progressbar/progressbar-rtl.css +1 -0
  352. package/components/progressbar/progressbar-vars.less +22 -0
  353. package/components/progressbar/progressbar.css +1 -0
  354. package/components/progressbar/progressbar.d.ts +31 -0
  355. package/components/progressbar/progressbar.js +150 -0
  356. package/components/progressbar/progressbar.less +111 -0
  357. package/components/pull-to-refresh/pull-to-refresh-class.js +512 -0
  358. package/components/pull-to-refresh/pull-to-refresh-ios.less +88 -0
  359. package/components/pull-to-refresh/pull-to-refresh-md.less +129 -0
  360. package/components/pull-to-refresh/pull-to-refresh-rtl.css +1 -0
  361. package/components/pull-to-refresh/pull-to-refresh-vars.less +14 -0
  362. package/components/pull-to-refresh/pull-to-refresh.css +1 -0
  363. package/components/pull-to-refresh/pull-to-refresh.d.ts +103 -0
  364. package/components/pull-to-refresh/pull-to-refresh.js +62 -0
  365. package/components/pull-to-refresh/pull-to-refresh.less +38 -0
  366. package/components/radio/radio-ios.less +61 -0
  367. package/components/radio/radio-md.less +64 -0
  368. package/components/radio/radio-rtl.css +1 -0
  369. package/components/radio/radio-vars.less +24 -0
  370. package/components/radio/radio.css +1 -0
  371. package/components/radio/radio.d.ts +14 -0
  372. package/components/radio/radio.js +3 -0
  373. package/components/radio/radio.less +64 -0
  374. package/components/range/range-class.js +577 -0
  375. package/components/range/range-ios.less +9 -0
  376. package/components/range/range-md.less +41 -0
  377. package/components/range/range-rtl.css +1 -0
  378. package/components/range/range-vars.less +61 -0
  379. package/components/range/range.css +1 -0
  380. package/components/range/range.d.ts +143 -0
  381. package/components/range/range.js +75 -0
  382. package/components/range/range.less +235 -0
  383. package/components/searchbar/remove-diacritics.js +271 -0
  384. package/components/searchbar/searchbar-class.js +592 -0
  385. package/components/searchbar/searchbar-ios.less +107 -0
  386. package/components/searchbar/searchbar-md.less +147 -0
  387. package/components/searchbar/searchbar-rtl.css +1 -0
  388. package/components/searchbar/searchbar-vars.less +77 -0
  389. package/components/searchbar/searchbar.css +1 -0
  390. package/components/searchbar/searchbar.d.ts +161 -0
  391. package/components/searchbar/searchbar.js +122 -0
  392. package/components/searchbar/searchbar.less +322 -0
  393. package/components/sheet/sheet-class.js +673 -0
  394. package/components/sheet/sheet-ios.less +2 -0
  395. package/components/sheet/sheet-md.less +9 -0
  396. package/components/sheet/sheet-rtl.css +1 -0
  397. package/components/sheet/sheet-vars.less +27 -0
  398. package/components/sheet/sheet.css +1 -0
  399. package/components/sheet/sheet.d.ts +170 -0
  400. package/components/sheet/sheet.js +76 -0
  401. package/components/sheet/sheet.less +196 -0
  402. package/components/skeleton/skeleton-ios.less +2 -0
  403. package/components/skeleton/skeleton-md.less +2 -0
  404. package/components/skeleton/skeleton-rtl.css +1 -0
  405. package/components/skeleton/skeleton-vars.less +8 -0
  406. package/components/skeleton/skeleton.css +1 -0
  407. package/components/skeleton/skeleton.d.ts +14 -0
  408. package/components/skeleton/skeleton.js +3 -0
  409. package/components/skeleton/skeleton.less +11 -0
  410. package/components/smart-select/smart-select-class.js +874 -0
  411. package/components/smart-select/smart-select-ios.less +2 -0
  412. package/components/smart-select/smart-select-md.less +2 -0
  413. package/components/smart-select/smart-select-rtl.css +1 -0
  414. package/components/smart-select/smart-select-vars.less +6 -0
  415. package/components/smart-select/smart-select.css +1 -0
  416. package/components/smart-select/smart-select.d.ts +204 -0
  417. package/components/smart-select/smart-select.js +138 -0
  418. package/components/smart-select/smart-select.less +42 -0
  419. package/components/sortable/sortable-ios.less +7 -0
  420. package/components/sortable/sortable-md.less +7 -0
  421. package/components/sortable/sortable-rtl.css +1 -0
  422. package/components/sortable/sortable-vars.less +22 -0
  423. package/components/sortable/sortable.css +1 -0
  424. package/components/sortable/sortable.d.ts +50 -0
  425. package/components/sortable/sortable.js +286 -0
  426. package/components/sortable/sortable.less +133 -0
  427. package/components/statusbar/statusbar-ios.less +2 -0
  428. package/components/statusbar/statusbar-md.less +2 -0
  429. package/components/statusbar/statusbar.d.ts +54 -0
  430. package/components/statusbar/statusbar.js +190 -0
  431. package/components/statusbar/statusbar.less +7 -0
  432. package/components/stepper/stepper-class.js +403 -0
  433. package/components/stepper/stepper-ios.less +36 -0
  434. package/components/stepper/stepper-md.less +16 -0
  435. package/components/stepper/stepper-rtl.css +1 -0
  436. package/components/stepper/stepper-vars.less +40 -0
  437. package/components/stepper/stepper.css +1 -0
  438. package/components/stepper/stepper.d.ts +121 -0
  439. package/components/stepper/stepper.js +82 -0
  440. package/components/stepper/stepper.less +178 -0
  441. package/components/subnavbar/subnavbar-ios.less +51 -0
  442. package/components/subnavbar/subnavbar-md.less +47 -0
  443. package/components/subnavbar/subnavbar-vars.less +36 -0
  444. package/components/subnavbar/subnavbar.d.ts +11 -0
  445. package/components/subnavbar/subnavbar.js +17 -0
  446. package/components/subnavbar/subnavbar.less +128 -0
  447. package/components/swipeout/swipeout-ios.less +2 -0
  448. package/components/swipeout/swipeout-md.less +2 -0
  449. package/components/swipeout/swipeout-rtl.css +1 -0
  450. package/components/swipeout/swipeout-vars.less +24 -0
  451. package/components/swipeout/swipeout.css +1 -0
  452. package/components/swipeout/swipeout.d.ts +68 -0
  453. package/components/swipeout/swipeout.js +513 -0
  454. package/components/swipeout/swipeout.less +109 -0
  455. package/components/swiper/swiper-ios.less +2 -0
  456. package/components/swiper/swiper-md.less +2 -0
  457. package/components/swiper/swiper-rtl.css +1 -0
  458. package/components/swiper/swiper.css +1 -0
  459. package/components/swiper/swiper.d.ts +25 -0
  460. package/components/swiper/swiper.js +141 -0
  461. package/components/swiper/swiper.less +5 -0
  462. package/components/tabs/tabs-ios.less +2 -0
  463. package/components/tabs/tabs-md.less +2 -0
  464. package/components/tabs/tabs-rtl.css +1 -0
  465. package/components/tabs/tabs.css +1 -0
  466. package/components/tabs/tabs.d.ts +39 -0
  467. package/components/tabs/tabs.js +243 -0
  468. package/components/tabs/tabs.less +45 -0
  469. package/components/text-editor/text-editor-class.js +516 -0
  470. package/components/text-editor/text-editor-ios.less +9 -0
  471. package/components/text-editor/text-editor-md.less +11 -0
  472. package/components/text-editor/text-editor-rtl.css +1 -0
  473. package/components/text-editor/text-editor-vars.less +51 -0
  474. package/components/text-editor/text-editor.css +1 -0
  475. package/components/text-editor/text-editor.d.ts +166 -0
  476. package/components/text-editor/text-editor.js +81 -0
  477. package/components/text-editor/text-editor.less +153 -0
  478. package/components/timeline/timeline-ios.less +11 -0
  479. package/components/timeline/timeline-md.less +7 -0
  480. package/components/timeline/timeline-rtl.css +1 -0
  481. package/components/timeline/timeline-vars.less +64 -0
  482. package/components/timeline/timeline.css +1 -0
  483. package/components/timeline/timeline.d.ts +14 -0
  484. package/components/timeline/timeline.js +3 -0
  485. package/components/timeline/timeline.less +413 -0
  486. package/components/toast/toast-class.js +105 -0
  487. package/components/toast/toast-ios.less +81 -0
  488. package/components/toast/toast-md.less +72 -0
  489. package/components/toast/toast-rtl.css +1 -0
  490. package/components/toast/toast-vars.less +24 -0
  491. package/components/toast/toast.css +1 -0
  492. package/components/toast/toast.d.ts +121 -0
  493. package/components/toast/toast.js +40 -0
  494. package/components/toast/toast.less +62 -0
  495. package/components/toggle/toggle-class.js +165 -0
  496. package/components/toggle/toggle-ios.less +70 -0
  497. package/components/toggle/toggle-md.less +44 -0
  498. package/components/toggle/toggle-rtl.css +1 -0
  499. package/components/toggle/toggle-vars.less +30 -0
  500. package/components/toggle/toggle.css +1 -0
  501. package/components/toggle/toggle.d.ts +73 -0
  502. package/components/toggle/toggle.js +57 -0
  503. package/components/toggle/toggle.less +52 -0
  504. package/components/toolbar/toolbar-ios.less +47 -0
  505. package/components/toolbar/toolbar-md.less +77 -0
  506. package/components/toolbar/toolbar-vars.less +71 -0
  507. package/components/toolbar/toolbar.d.ts +43 -0
  508. package/components/toolbar/toolbar.js +198 -0
  509. package/components/toolbar/toolbar.less +306 -0
  510. package/components/tooltip/tooltip-class.js +336 -0
  511. package/components/tooltip/tooltip-ios.less +2 -0
  512. package/components/tooltip/tooltip-md.less +2 -0
  513. package/components/tooltip/tooltip-rtl.css +1 -0
  514. package/components/tooltip/tooltip-vars.less +19 -0
  515. package/components/tooltip/tooltip.css +1 -0
  516. package/components/tooltip/tooltip.d.ts +105 -0
  517. package/components/tooltip/tooltip.js +129 -0
  518. package/components/tooltip/tooltip.less +39 -0
  519. package/components/touch-ripple/touch-ripple-class.js +85 -0
  520. package/components/touch-ripple/touch-ripple-ios.less +2 -0
  521. package/components/touch-ripple/touch-ripple-md.less +2 -0
  522. package/components/touch-ripple/touch-ripple-vars.less +8 -0
  523. package/components/touch-ripple/touch-ripple.d.ts +25 -0
  524. package/components/touch-ripple/touch-ripple.js +18 -0
  525. package/components/touch-ripple/touch-ripple.less +114 -0
  526. package/components/treeview/treeview-ios.less +2 -0
  527. package/components/treeview/treeview-md.less +2 -0
  528. package/components/treeview/treeview-rtl.css +1 -0
  529. package/components/treeview/treeview-vars.less +38 -0
  530. package/components/treeview/treeview.css +1 -0
  531. package/components/treeview/treeview.d.ts +42 -0
  532. package/components/treeview/treeview.js +74 -0
  533. package/components/treeview/treeview.less +160 -0
  534. package/components/typography/typography-ios.less +2 -0
  535. package/components/typography/typography-md.less +2 -0
  536. package/components/typography/typography-rtl.css +1 -0
  537. package/components/typography/typography-vars.less +4 -0
  538. package/components/typography/typography.css +1 -0
  539. package/components/typography/typography.d.ts +14 -0
  540. package/components/typography/typography.js +3 -0
  541. package/components/typography/typography.less +220 -0
  542. package/components/view/resizable-view.js +125 -0
  543. package/components/view/view-class.js +206 -0
  544. package/components/view/view-ios.less +2 -0
  545. package/components/view/view-md.less +2 -0
  546. package/components/view/view.d.ts +199 -0
  547. package/components/view/view.js +173 -0
  548. package/components/view/view.less +35 -0
  549. package/components/virtual-list/virtual-list-class.js +583 -0
  550. package/components/virtual-list/virtual-list-ios.less +2 -0
  551. package/components/virtual-list/virtual-list-md.less +2 -0
  552. package/components/virtual-list/virtual-list-rtl.css +0 -0
  553. package/components/virtual-list/virtual-list.css +0 -0
  554. package/components/virtual-list/virtual-list.d.ts +142 -0
  555. package/components/virtual-list/virtual-list.js +17 -0
  556. package/components/virtual-list/virtual-list.less +7 -0
  557. package/framework7-bundle-rtl.css +19821 -0
  558. package/framework7-bundle-rtl.min.css +19 -0
  559. package/framework7-bundle.css +19802 -0
  560. package/framework7-bundle.esm.js +93 -0
  561. package/framework7-bundle.js +48416 -0
  562. package/framework7-bundle.js.map +1 -0
  563. package/framework7-bundle.less +92 -0
  564. package/framework7-bundle.min.css +19 -0
  565. package/framework7-bundle.min.js +14 -0
  566. package/framework7-bundle.min.js.map +1 -0
  567. package/framework7-lite-bundle.esm.js +86 -0
  568. package/framework7-lite.esm.js +37 -0
  569. package/framework7-lite.js +31 -0
  570. package/framework7-rtl.css +5252 -0
  571. package/framework7-rtl.min.css +17 -0
  572. package/framework7-types.d.ts +336 -0
  573. package/framework7.css +5245 -0
  574. package/framework7.d.ts +322 -0
  575. package/framework7.esm.js +41 -0
  576. package/framework7.js +42 -0
  577. package/framework7.less +41 -0
  578. package/framework7.min.css +17 -0
  579. package/less/mixins.less +281 -0
  580. package/less/plugin.js +15 -0
  581. package/less/vars.less +7 -0
  582. package/modules/clicks/clicks.d.ts +19 -0
  583. package/modules/clicks/clicks.js +94 -0
  584. package/modules/component/$h.js +15 -0
  585. package/modules/component/$jsx.js +17 -0
  586. package/modules/component/component-class.js +517 -0
  587. package/modules/component/component.d.ts +111 -0
  588. package/modules/component/component.js +44 -0
  589. package/modules/component/custom-components.js +1 -0
  590. package/modules/component/eventslisteners.js +74 -0
  591. package/modules/component/parse-component.js +79 -0
  592. package/modules/component/patch.js +8 -0
  593. package/modules/component/snabbdom/h.d.ts +10 -0
  594. package/modules/component/snabbdom/h.js +50 -0
  595. package/modules/component/snabbdom/helpers/attachto.d.ts +9 -0
  596. package/modules/component/snabbdom/helpers/attachto.js +49 -0
  597. package/modules/component/snabbdom/hooks.d.ts +23 -0
  598. package/modules/component/snabbdom/hooks.js +0 -0
  599. package/modules/component/snabbdom/htmldomapi.d.ts +19 -0
  600. package/modules/component/snabbdom/htmldomapi.js +67 -0
  601. package/modules/component/snabbdom/is.d.ts +2 -0
  602. package/modules/component/snabbdom/is.js +4 -0
  603. package/modules/component/snabbdom/modules/attributes.d.ts +4 -0
  604. package/modules/component/snabbdom/modules/attributes.js +51 -0
  605. package/modules/component/snabbdom/modules/class.d.ts +4 -0
  606. package/modules/component/snabbdom/modules/class.js +27 -0
  607. package/modules/component/snabbdom/modules/dataset.d.ts +4 -0
  608. package/modules/component/snabbdom/modules/dataset.js +37 -0
  609. package/modules/component/snabbdom/modules/eventlisteners.d.ts +8 -0
  610. package/modules/component/snabbdom/modules/eventlisteners.js +93 -0
  611. package/modules/component/snabbdom/modules/hero.d.ts +6 -0
  612. package/modules/component/snabbdom/modules/hero.js +147 -0
  613. package/modules/component/snabbdom/modules/module.d.ts +9 -0
  614. package/modules/component/snabbdom/modules/module.js +0 -0
  615. package/modules/component/snabbdom/modules/props.d.ts +4 -0
  616. package/modules/component/snabbdom/modules/props.js +29 -0
  617. package/modules/component/snabbdom/modules/style.d.ts +7 -0
  618. package/modules/component/snabbdom/modules/style.js +93 -0
  619. package/modules/component/snabbdom/snabbdom.bundle.d.ts +5 -0
  620. package/modules/component/snabbdom/snabbdom.bundle.js +13 -0
  621. package/modules/component/snabbdom/snabbdom.d.ts +6 -0
  622. package/modules/component/snabbdom/snabbdom.js +282 -0
  623. package/modules/component/snabbdom/thunk.d.ts +14 -0
  624. package/modules/component/snabbdom/thunk.js +50 -0
  625. package/modules/component/snabbdom/tovnode.d.ts +4 -0
  626. package/modules/component/snabbdom/tovnode.js +40 -0
  627. package/modules/component/snabbdom/vnode.d.ts +36 -0
  628. package/modules/component/snabbdom/vnode.js +12 -0
  629. package/modules/component/vdom.js +319 -0
  630. package/modules/demo-module.js +44 -0
  631. package/modules/device/device.d.ts +14 -0
  632. package/modules/device/device.js +44 -0
  633. package/modules/history/history.js +12 -0
  634. package/modules/resize/resize.d.ts +25 -0
  635. package/modules/resize/resize.js +62 -0
  636. package/modules/router/app-router-check.js +5 -0
  637. package/modules/router/async-component.js +27 -0
  638. package/modules/router/back.js +723 -0
  639. package/modules/router/clear-previous-history.js +31 -0
  640. package/modules/router/component-loader.js +200 -0
  641. package/modules/router/modal.js +223 -0
  642. package/modules/router/navigate.js +814 -0
  643. package/modules/router/process-route-queue.js +66 -0
  644. package/modules/router/redirect.js +38 -0
  645. package/modules/router/router-class.js +1268 -0
  646. package/modules/router/router.d.ts +354 -0
  647. package/modules/router/router.js +26 -0
  648. package/modules/router/swipe-back.js +589 -0
  649. package/modules/router/tab.js +230 -0
  650. package/modules/service-worker/service-worker.d.ts +38 -0
  651. package/modules/service-worker/service-worker.js +86 -0
  652. package/modules/store/create-store.js +138 -0
  653. package/modules/store/store.d.ts +40 -0
  654. package/modules/store/store.js +11 -0
  655. package/modules/support/support.d.ts +15 -0
  656. package/modules/support/support.js +7 -0
  657. package/modules/touch/touch.d.ts +60 -0
  658. package/modules/touch/touch.js +482 -0
  659. package/modules/utils/utils.d.ts +15 -0
  660. package/modules/utils/utils.js +10 -0
  661. package/package.json +458 -0
  662. package/shared/$jsx.js +21 -0
  663. package/shared/class.js +146 -0
  664. package/shared/constructor-methods.js +52 -0
  665. package/shared/dom7.js +7 -0
  666. package/shared/events-class.js +95 -0
  667. package/shared/get-device.d.ts +52 -0
  668. package/shared/get-device.js +147 -0
  669. package/shared/get-support.d.ts +12 -0
  670. package/shared/get-support.js +35 -0
  671. package/shared/history.js +171 -0
  672. package/shared/material-color-utils.js +1377 -0
  673. package/shared/material-colors.js +75 -0
  674. package/shared/modal-methods.js +80 -0
  675. package/shared/utils.d.ts +88 -0
  676. package/shared/utils.js +535 -0
@@ -0,0 +1,325 @@
1
+ /* eslint indent: ["off"] */
2
+ import { getWindow, getDocument } from 'ssr-window';
3
+ import { getDevice } from '../../shared/get-device.js';
4
+ import { extend, nextTick } from '../../shared/utils.js';
5
+ import Modal from '../modal/modal-class.js';
6
+ import $ from '../../shared/dom7.js';
7
+ /** @jsx $jsx */
8
+ import $jsx from '../../shared/$jsx.js';
9
+ class Actions extends Modal {
10
+ constructor(app, params) {
11
+ const extendedParams = extend({
12
+ on: {}
13
+ }, app.params.actions, params);
14
+
15
+ // Extends with open/close Modal methods;
16
+ super(app, extendedParams);
17
+ const actions = this;
18
+ const device = getDevice();
19
+ const window = getWindow();
20
+ const document = getDocument();
21
+ actions.params = extendedParams;
22
+
23
+ // Buttons
24
+ let groups;
25
+ if (actions.params.buttons) {
26
+ groups = actions.params.buttons;
27
+ if (!Array.isArray(groups[0])) groups = [groups];
28
+ }
29
+ actions.groups = groups;
30
+
31
+ // Find Element
32
+ let $el;
33
+ if (actions.params.el) {
34
+ $el = $(actions.params.el).eq(0);
35
+ } else if (actions.params.content) {
36
+ $el = $(actions.params.content).filter(node => node.nodeType === 1).eq(0);
37
+ } else if (actions.params.buttons) {
38
+ if (actions.params.convertToPopover) {
39
+ actions.popoverHtml = actions.renderPopover();
40
+ }
41
+ actions.actionsHtml = actions.render();
42
+ }
43
+ if ($el && $el.length > 0 && $el[0].f7Modal) {
44
+ return $el[0].f7Modal;
45
+ }
46
+ if ($el && $el.length === 0 && !(actions.actionsHtml || actions.popoverHtml)) {
47
+ return actions.destroy();
48
+ }
49
+
50
+ // Backdrop
51
+ let $backdropEl;
52
+ if (actions.params.backdrop && actions.params.backdropEl) {
53
+ $backdropEl = $(actions.params.backdropEl);
54
+ } else if (actions.params.backdrop) {
55
+ if (actions.params.backdropUnique) {
56
+ $backdropEl = $('<div class="popup-backdrop popup-backdrop-unique"></div>');
57
+ actions.$containerEl.append($backdropEl);
58
+ } else {
59
+ $backdropEl = actions.$containerEl.children('.actions-backdrop');
60
+ }
61
+ if ($backdropEl.length === 0) {
62
+ $backdropEl = $('<div class="actions-backdrop"></div>');
63
+ actions.$containerEl.append($backdropEl);
64
+ }
65
+ }
66
+ const originalOpen = actions.open;
67
+ const originalClose = actions.close;
68
+ let popover;
69
+ function buttonOnClick(e) {
70
+ const $buttonEl = $(this);
71
+ let buttonIndex;
72
+ let groupIndex;
73
+ if ($buttonEl.hasClass('list-button') || $buttonEl.hasClass('item-link')) {
74
+ buttonIndex = $buttonEl.parents('li').index();
75
+ groupIndex = $buttonEl.parents('.list').index();
76
+ } else {
77
+ buttonIndex = $buttonEl.index();
78
+ groupIndex = $buttonEl.parents('.actions-group').index();
79
+ }
80
+ if (typeof groups !== 'undefined') {
81
+ const button = groups[groupIndex][buttonIndex];
82
+ if (button.onClick) button.onClick(actions, e);
83
+ if (actions.params.onClick) actions.params.onClick(actions, e);
84
+ if (button.close !== false) actions.close();
85
+ }
86
+ }
87
+ actions.open = function open(animate) {
88
+ let convertToPopover = false;
89
+ const {
90
+ targetEl,
91
+ targetX,
92
+ targetY,
93
+ targetWidth,
94
+ targetHeight
95
+ } = actions.params;
96
+ if (actions.params.convertToPopover && (targetEl || targetX !== undefined && targetY !== undefined)) {
97
+ // Popover
98
+ if (actions.params.forceToPopover || device.ios && device.ipad || app.width >= 768 || device.desktop) {
99
+ convertToPopover = true;
100
+ }
101
+ }
102
+ if (convertToPopover && actions.popoverHtml) {
103
+ popover = app.popover.create({
104
+ containerEl: actions.params.containerEl,
105
+ content: actions.popoverHtml,
106
+ backdrop: actions.params.backdrop,
107
+ targetEl,
108
+ targetX,
109
+ targetY,
110
+ targetWidth,
111
+ targetHeight,
112
+ on: {
113
+ open() {
114
+ if (!actions.$el) {
115
+ actions.$el = popover.$el;
116
+ }
117
+ actions.$el.trigger(`modal:open ${actions.type.toLowerCase()}:open`);
118
+ actions.emit(`local::open modalOpen ${actions.type}Open`, actions);
119
+ },
120
+ opened() {
121
+ if (!actions.$el) {
122
+ actions.$el = popover.$el;
123
+ }
124
+ actions.$el.trigger(`modal:opened ${actions.type.toLowerCase()}:opened`);
125
+ actions.emit(`local::opened modalOpened ${actions.type}Opened`, actions);
126
+ },
127
+ close() {
128
+ if (!actions.$el) {
129
+ actions.$el = popover.$el;
130
+ }
131
+ actions.$el.trigger(`modal:close ${actions.type.toLowerCase()}:close`);
132
+ actions.emit(`local::close modalClose ${actions.type}Close`, actions);
133
+ },
134
+ closed() {
135
+ if (!actions.$el) {
136
+ actions.$el = popover.$el;
137
+ }
138
+ actions.$el.trigger(`modal:closed ${actions.type.toLowerCase()}:closed`);
139
+ actions.emit(`local::closed modalClosed ${actions.type}Closed`, actions);
140
+ }
141
+ }
142
+ });
143
+ popover.open(animate);
144
+ popover.once('popoverOpened', () => {
145
+ popover.$el.find('.list-button, .item-link').each(buttonEl => {
146
+ $(buttonEl).on('click', buttonOnClick);
147
+ });
148
+ });
149
+ popover.once('popoverClosed', () => {
150
+ popover.$el.find('.list-button, .item-link').each(buttonEl => {
151
+ $(buttonEl).off('click', buttonOnClick);
152
+ });
153
+ nextTick(() => {
154
+ popover.destroy();
155
+ popover = undefined;
156
+ });
157
+ });
158
+ } else {
159
+ actions.$el = actions.actionsHtml ? $(actions.actionsHtml) : actions.$el;
160
+ actions.$el[0].f7Modal = actions;
161
+ if (actions.groups) {
162
+ actions.$el.find('.actions-button').each(buttonEl => {
163
+ $(buttonEl).on('click', buttonOnClick);
164
+ });
165
+ actions.once('actionsClosed', () => {
166
+ actions.$el.find('.actions-button').each(buttonEl => {
167
+ $(buttonEl).off('click', buttonOnClick);
168
+ });
169
+ });
170
+ }
171
+ actions.el = actions.$el[0];
172
+ originalOpen.call(actions, animate);
173
+ }
174
+ return actions;
175
+ };
176
+ actions.close = function close(animate) {
177
+ if (popover) {
178
+ popover.close(animate);
179
+ } else {
180
+ originalClose.call(actions, animate);
181
+ }
182
+ return actions;
183
+ };
184
+ extend(actions, {
185
+ app,
186
+ $el,
187
+ el: $el ? $el[0] : undefined,
188
+ $backdropEl,
189
+ backdropEl: $backdropEl && $backdropEl[0],
190
+ type: 'actions'
191
+ });
192
+ function handleClick(e) {
193
+ const target = e.target;
194
+ const $target = $(target);
195
+ const keyboardOpened = !device.desktop && device.cordova && (window.Keyboard && window.Keyboard.isVisible || window.cordova.plugins && window.cordova.plugins.Keyboard && window.cordova.plugins.Keyboard.isVisible);
196
+ if (keyboardOpened) return;
197
+ if ($target.closest(actions.el).length === 0) {
198
+ if (actions.params.closeByBackdropClick && actions.params.backdrop && actions.backdropEl && actions.backdropEl === target) {
199
+ actions.close();
200
+ } else if (actions.params.closeByOutsideClick) {
201
+ actions.close();
202
+ }
203
+ }
204
+ }
205
+ function onKeyDown(e) {
206
+ const keyCode = e.keyCode;
207
+ if (keyCode === 27 && actions.params.closeOnEscape) {
208
+ actions.close();
209
+ }
210
+ }
211
+ if (actions.params.closeOnEscape) {
212
+ actions.on('open', () => {
213
+ $(document).on('keydown', onKeyDown);
214
+ });
215
+ actions.on('close', () => {
216
+ $(document).off('keydown', onKeyDown);
217
+ });
218
+ }
219
+ actions.on('opened', () => {
220
+ if (actions.params.closeByBackdropClick || actions.params.closeByOutsideClick) {
221
+ app.on('click', handleClick);
222
+ }
223
+ });
224
+ actions.on('close', () => {
225
+ if (actions.params.closeByBackdropClick || actions.params.closeByOutsideClick) {
226
+ app.off('click', handleClick);
227
+ }
228
+ });
229
+ if ($el) {
230
+ $el[0].f7Modal = actions;
231
+ }
232
+ return actions;
233
+ }
234
+ render() {
235
+ const actions = this;
236
+ if (actions.params.render) return actions.params.render.call(actions, actions);
237
+ const {
238
+ groups
239
+ } = actions;
240
+ const cssClass = actions.params.cssClass;
241
+ return $jsx("div", {
242
+ class: `actions-modal${actions.params.grid ? ' actions-grid' : ''} ${cssClass || ''}`
243
+ }, groups.map(group => $jsx("div", {
244
+ class: "actions-group"
245
+ }, group.map(button => {
246
+ const buttonClasses = [`actions-${button.label ? 'label' : 'button'}`];
247
+ const {
248
+ color,
249
+ bg,
250
+ strong,
251
+ disabled,
252
+ label,
253
+ text,
254
+ icon
255
+ } = button;
256
+ if (color) buttonClasses.push(`color-${color}`);
257
+ if (bg) buttonClasses.push(`bg-color-${bg}`);
258
+ if (strong) buttonClasses.push('actions-button-strong');
259
+ if (disabled) buttonClasses.push('disabled');
260
+ if (label) {
261
+ return $jsx("div", {
262
+ class: buttonClasses.join(' ')
263
+ }, text);
264
+ }
265
+ return $jsx("div", {
266
+ class: buttonClasses.join(' ')
267
+ }, icon && $jsx("div", {
268
+ class: "actions-button-media"
269
+ }, icon), $jsx("div", {
270
+ class: "actions-button-text"
271
+ }, text));
272
+ }))));
273
+ }
274
+ renderPopover() {
275
+ const actions = this;
276
+ if (actions.params.renderPopover) return actions.params.renderPopover.call(actions, actions);
277
+ const {
278
+ groups
279
+ } = actions;
280
+ const cssClass = actions.params.cssClass;
281
+ return $jsx("div", {
282
+ class: `popover popover-from-actions ${cssClass || ''}`
283
+ }, $jsx("div", {
284
+ class: "popover-inner"
285
+ }, groups.map(group => $jsx("div", {
286
+ class: "list"
287
+ }, $jsx("ul", null, group.map(button => {
288
+ const itemClasses = [];
289
+ const {
290
+ color,
291
+ bg,
292
+ strong,
293
+ disabled,
294
+ label,
295
+ text,
296
+ icon
297
+ } = button;
298
+ if (color) itemClasses.push(`color-${color}`);
299
+ if (bg) itemClasses.push(`bg-color-${bg}`);
300
+ if (strong) itemClasses.push('popover-from-actions-strong');
301
+ if (disabled) itemClasses.push('disabled');
302
+ if (label) {
303
+ itemClasses.push('popover-from-actions-label');
304
+ return `<li class="${itemClasses.join(' ')}">${text}</li>`;
305
+ }
306
+ if (icon) {
307
+ itemClasses.push('item-link item-content');
308
+ return $jsx("li", null, $jsx("a", {
309
+ class: itemClasses.join(' ')
310
+ }, $jsx("div", {
311
+ class: "item-media"
312
+ }, icon), $jsx("div", {
313
+ class: "item-inner"
314
+ }, $jsx("div", {
315
+ class: "item-title"
316
+ }, text))));
317
+ }
318
+ itemClasses.push('list-button');
319
+ return $jsx("li", null, $jsx("a", {
320
+ class: itemClasses.join(' ')
321
+ }, text));
322
+ }))))));
323
+ }
324
+ }
325
+ export default Actions;
@@ -0,0 +1,51 @@
1
+ .ios {
2
+ .actions-group {
3
+ border-radius: var(--f7-actions-border-radius);
4
+ }
5
+ .actions-button,
6
+ .actions-label {
7
+ background: var(--f7-actions-bg-color);
8
+ .ios-translucent-modals(var(--f7-actions-bg-color-rgb));
9
+ &:first-child {
10
+ border-radius: var(--f7-actions-border-radius) var(--f7-actions-border-radius) 0 0;
11
+ }
12
+ &:last-child {
13
+ .hairline-remove(bottom);
14
+ border-radius: 0 0 var(--f7-actions-border-radius) var(--f7-actions-border-radius);
15
+ }
16
+ &:first-child:last-child {
17
+ border-radius: var(--f7-actions-border-radius);
18
+ }
19
+ b,
20
+ &.actions-button-strong {
21
+ font-weight: 600;
22
+ }
23
+ }
24
+ .actions-grid {
25
+ .actions-group {
26
+ border-radius: 0;
27
+ background: var(--f7-actions-bg-color);
28
+ .ios-translucent-modals(var(--f7-actions-bg-color-rgb));
29
+ &:first-child {
30
+ border-radius: var(--f7-actions-border-radius) var(--f7-actions-border-radius) 0 0;
31
+ }
32
+ &:last-child {
33
+ border-radius: 0 0 var(--f7-actions-border-radius) var(--f7-actions-border-radius);
34
+ }
35
+ &:first-child:last-child {
36
+ border-radius: var(--f7-actions-border-radius);
37
+ }
38
+ }
39
+ .actions-button,
40
+ .actions-label {
41
+ border-radius: 0 !important;
42
+ }
43
+ }
44
+ .actions-button-media {
45
+ margin-left: 16px;
46
+ + .actions-button-text {
47
+ text-align: left;
48
+ margin-left: 16px;
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,24 @@
1
+ .md {
2
+ .actions-modal {
3
+ background-color: var(--f7-actions-bg-color);
4
+ border-radius: var(--f7-actions-border-radius) var(--f7-actions-border-radius) 0 0;
5
+ padding-bottom: var(--f7-safe-area-bottom);
6
+ }
7
+ .actions-button {
8
+ transition-duration: 300ms;
9
+ }
10
+ .actions-button,
11
+ .actions-label {
12
+ b,
13
+ &.actions-button-strong {
14
+ font-weight: 500;
15
+ }
16
+ }
17
+
18
+ .actions-button-media {
19
+ min-width: 40px;
20
+ + .actions-button-text {
21
+ margin-left: 16px;
22
+ }
23
+ }
24
+ }
@@ -0,0 +1 @@
1
+ :root{--f7-actions-grid-button-font-size:12px;--f7-actions-grid-button-icon-size:48px}.ios{--f7-actions-transition-timing-function:initial;--f7-actions-border-radius:13px;--f7-actions-grid-button-text-color:#757575;--f7-actions-button-padding:0px;--f7-actions-button-text-align:center;--f7-actions-button-height:57px;--f7-actions-button-height-landscape:44px;--f7-actions-button-font-size:20px;--f7-actions-button-icon-size:28px;--f7-actions-button-justify-content:center;--f7-actions-label-padding:8px 10px;--f7-actions-label-font-weight:400;--f7-actions-label-font-size:13px;--f7-actions-label-justify-content:center;--f7-actions-group-border-color:transparent;--f7-actions-group-margin:8px;--f7-actions-bg-color:rgba(255, 255, 255, 0.95);--f7-actions-bg-color-rgb:255,255,255;--f7-actions-button-border-color:rgba(0, 0, 0, 0.2);--f7-actions-button-pressed-bg-color:rgba(230, 230, 230, 0.9);--f7-actions-button-pressed-bg-color-rgb:230,230,230;--f7-actions-label-text-color:#8a8a8a}.ios .dark,.ios.dark{--f7-actions-bg-color:rgba(45, 45, 45, 0.95);--f7-actions-bg-color-rgb:45,45,45;--f7-actions-button-border-color:rgba(255, 255, 255, 0.15);--f7-actions-button-pressed-bg-color:rgba(50, 50, 50, 0.9);--f7-actions-button-pressed-bg-color-rgb:50,50,50;--f7-actions-label-text-color:rgba(255, 255, 255, 0.55)}.md{--f7-actions-transition-timing-function:cubic-bezier(0, 0.8, 0.34, 1);--f7-actions-border-radius:16px;--f7-actions-button-border-color:transparent;--f7-actions-button-padding:0 16px;--f7-actions-button-text-align:left;--f7-actions-button-height:48px;--f7-actions-button-height-landscape:48px;--f7-actions-button-font-size:16px;--f7-actions-button-icon-size:24px;--f7-actions-button-justify-content:space-between;--f7-actions-label-padding:12px 16px;--f7-actions-label-font-size:14px;--f7-actions-label-font-weight:500;--f7-actions-label-justify-content:flex-start;--f7-actions-group-margin:0px;--f7-actions-button-pressed-bg-color:#e5e5e5}.md .dark,.md.dark{--f7-actions-button-pressed-bg-color:#2e2e2e}.md,.md .dark,.md [class*=color-]{--f7-actions-button-text-color:var(--f7-md-on-surface);--f7-actions-bg-color:var(--f7-md-surface-3);--f7-actions-group-border-color:var(--f7-md-outline);--f7-actions-label-text-color:var(--f7-theme-color);--f7-actions-grid-button-text-color:var(--f7-md-on-surface)}.actions-backdrop-unique{z-index:13500}.actions-modal{position:absolute;left:0;bottom:0;z-index:13500;width:100%;transform:translate3d(0,100%,0);display:none;max-height:100%;overflow:auto;-webkit-overflow-scrolling:touch;transition-property:transform;will-change:transform}.actions-modal.modal-in,.actions-modal.modal-out{transition-duration:.3s}.actions-modal.not-animated{transition-duration:0s}.ios .actions-modal.modal-in{transform:translate3d(0,calc(-1 * var(--f7-safe-area-bottom)),0)}.md .actions-modal.modal-in{transform:translate3d(0,0,0)}.actions-modal.modal-out{z-index:13499;transform:translate3d(0,100%,0)}@media (min-width:496px){.actions-modal{width:480px;left:50%;margin-left:-240px}}@media (orientation:landscape){.actions-modal{--f7-actions-button-height:var(--f7-actions-button-height-landscape)}}.actions-backdrop,.actions-modal{transition-timing-function:var(--f7-actions-transition-timing-function)}.actions-group{overflow:hidden;position:relative;margin:var(--f7-actions-group-margin);transform:translate3d(0,0,0)}.actions-group:after{content:'';position:absolute;background-color:var(--f7-actions-group-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)))}.actions-group:last-child:after{display:none!important}.actions-button,.actions-label{width:100%;font-weight:400;margin:0;box-sizing:border-box;display:block;position:relative;overflow:hidden;text-align:var(--f7-actions-button-text-align)}.actions-button:after,.actions-label:after{content:'';position:absolute;background-color:var(--f7-actions-button-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)))}.actions-button a,.actions-label a{text-decoration:none;color:inherit;display:block}.actions-button{cursor:pointer;display:flex;color:var(--f7-actions-button-text-color,var(--f7-theme-color));font-size:var(--f7-actions-button-font-size);height:var(--f7-actions-button-height);line-height:var(--f7-actions-button-height);padding:var(--f7-actions-button-padding);justify-content:var(--f7-actions-button-justify-content);z-index:10}.actions-button.active-state{background-color:var(--f7-actions-button-pressed-bg-color)!important}.actions-button[class*=color-]{color:var(--f7-theme-color)}@supports ((-webkit-backdrop-filter:blur(20px)) or (backdrop-filter:blur(20px))){.ios-translucent-modals .actions-button.active-state{background-color:rgba(var(--f7-actions-button-pressed-bg-color-rgb),.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}.actions-button-media{flex-shrink:0;display:flex;align-items:center}.actions-button-media i.icon{width:var(--f7-actions-button-icon-size);height:var(--f7-actions-button-icon-size);font-size:var(--f7-actions-button-icon-size)}.actions-button a,.actions-button-text{position:relative;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.actions-button-text{width:100%;flex-shrink:1;text-align:var(--f7-actions-button-text-align)}.actions-label{line-height:1.3;display:flex;align-items:center;font-size:var(--f7-actions-label-font-size);font-weight:var(--f7-actions-label-font-weight);color:var(--f7-actions-label-text-color);padding:var(--f7-actions-label-padding);justify-content:var(--f7-actions-label-justify-content);min-height:var(--f7-actions-label-min-height,var(--f7-actions-button-height))}.actions-label[class*=' color-']{--f7-actions-label-text-color:var(--f7-theme-color)}.actions-grid .actions-group{display:flex;flex-wrap:wrap;justify-content:flex-start;margin-top:0}.actions-grid .actions-group:not(:last-child){margin-bottom:0}.actions-grid .actions-button,.actions-grid .actions-label{background:0 0}.actions-grid .actions-button{width:33.33333333%;display:block;color:var(--f7-actions-grid-button-text-color);height:auto;line-height:1;padding:16px}.actions-grid .actions-button:after{display:none!important}.actions-grid .actions-button-media{margin-left:auto!important;margin-right:auto!important;width:var(--f7-actions-grid-button-icon-size);height:var(--f7-actions-grid-button-icon-size)}.actions-grid .actions-button-media i.icon{width:var(--f7-actions-grid-button-icon-size);height:var(--f7-actions-grid-button-icon-size);font-size:var(--f7-actions-grid-button-icon-size)}.actions-grid .actions-button-text{margin-left:0!important;text-align:center!important;margin-top:8px;line-height:1.33em;height:1.33em;font-size:var(--f7-actions-grid-button-font-size)}.ios .actions-group{border-radius:var(--f7-actions-border-radius)}.ios .actions-button,.ios .actions-label{background:var(--f7-actions-bg-color)}@supports ((-webkit-backdrop-filter:blur(20px)) or (backdrop-filter:blur(20px))){.ios-translucent-modals .ios .actions-button,.ios-translucent-modals .ios .actions-label{background-color:rgba(var(--f7-actions-bg-color-rgb),.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}.ios .actions-button:first-child,.ios .actions-label:first-child{border-radius:var(--f7-actions-border-radius) var(--f7-actions-border-radius) 0 0}.ios .actions-button:last-child,.ios .actions-label:last-child{border-radius:0 0 var(--f7-actions-border-radius) var(--f7-actions-border-radius)}.ios .actions-button:last-child:after,.ios .actions-label:last-child:after{display:none!important}.ios .actions-button:first-child:last-child,.ios .actions-label:first-child:last-child{border-radius:var(--f7-actions-border-radius)}.ios .actions-button b,.ios .actions-button.actions-button-strong,.ios .actions-label b,.ios .actions-label.actions-button-strong{font-weight:600}.ios .actions-grid .actions-group{border-radius:0;background:var(--f7-actions-bg-color)}@supports ((-webkit-backdrop-filter:blur(20px)) or (backdrop-filter:blur(20px))){.ios-translucent-modals .ios .actions-grid .actions-group{background-color:rgba(var(--f7-actions-bg-color-rgb),.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}.ios .actions-grid .actions-group:first-child{border-radius:var(--f7-actions-border-radius) var(--f7-actions-border-radius) 0 0}.ios .actions-grid .actions-group:last-child{border-radius:0 0 var(--f7-actions-border-radius) var(--f7-actions-border-radius)}.ios .actions-grid .actions-group:first-child:last-child{border-radius:var(--f7-actions-border-radius)}.ios .actions-grid .actions-button,.ios .actions-grid .actions-label{border-radius:0!important}.ios .actions-button-media{margin-left:16px}.ios .actions-button-media+.actions-button-text{text-align:left;margin-left:16px}.md .actions-modal{background-color:var(--f7-actions-bg-color);border-radius:var(--f7-actions-border-radius) var(--f7-actions-border-radius) 0 0;padding-bottom:var(--f7-safe-area-bottom)}.md .actions-button{transition-duration:.3s}.md .actions-button b,.md .actions-button.actions-button-strong,.md .actions-label b,.md .actions-label.actions-button-strong{font-weight:500}.md .actions-button-media{min-width:40px}.md .actions-button-media+.actions-button-text{margin-left:16px}
@@ -0,0 +1,72 @@
1
+ :root {
2
+ --f7-actions-grid-button-font-size: 12px;
3
+ --f7-actions-grid-button-icon-size: 48px;
4
+ }
5
+ .ios-vars({
6
+ --f7-actions-transition-timing-function: initial;
7
+ --f7-actions-border-radius: 13px;
8
+ /*
9
+ --f7-actions-button-text-color: var(--f7-theme-color);
10
+ */
11
+ --f7-actions-grid-button-text-color: #757575;
12
+ --f7-actions-button-padding: 0px;
13
+ --f7-actions-button-text-align: center;
14
+ --f7-actions-button-height: 57px;
15
+ --f7-actions-button-height-landscape: 44px;
16
+ --f7-actions-button-font-size: 20px;
17
+ --f7-actions-button-icon-size: 28px;
18
+ --f7-actions-button-justify-content: center;
19
+ --f7-actions-label-padding: 8px 10px;
20
+ --f7-actions-label-font-weight: 400;
21
+ --f7-actions-label-font-size: 13px;
22
+ --f7-actions-label-justify-content: center;
23
+ --f7-actions-group-border-color: transparent;
24
+ --f7-actions-group-margin: 8px;
25
+ .light-vars({
26
+ --f7-actions-bg-color: rgba(255,255,255,0.95);
27
+ --f7-actions-bg-color-rgb: 255, 255, 255;
28
+ --f7-actions-button-border-color: rgba(0,0,0,0.2);
29
+ --f7-actions-button-pressed-bg-color: rgba(230,230,230,0.9);
30
+ --f7-actions-button-pressed-bg-color-rgb: 230, 230, 230;
31
+ --f7-actions-label-text-color: #8a8a8a;
32
+ });
33
+ .dark-vars({
34
+ --f7-actions-bg-color: rgba(45,45,45,0.95);
35
+ --f7-actions-bg-color-rgb: 45, 45, 45;
36
+ --f7-actions-button-border-color: rgba(255, 255, 255, 0.15);
37
+ --f7-actions-button-pressed-bg-color: rgba(50,50,50,0.9);
38
+ --f7-actions-button-pressed-bg-color-rgb: 50, 50, 50;
39
+ --f7-actions-label-text-color:rgba(255,255,255,0.55);
40
+
41
+ })
42
+ });
43
+ .md-vars({
44
+ --f7-actions-transition-timing-function: cubic-bezier(0, 0.8, 0.34, 1);
45
+ --f7-actions-border-radius: 16px;
46
+ --f7-actions-button-border-color: transparent;
47
+ --f7-actions-button-padding: 0 16px;
48
+ --f7-actions-button-text-align: left;
49
+ --f7-actions-button-height: 48px;
50
+ --f7-actions-button-height-landscape: 48px;
51
+ --f7-actions-button-font-size: 16px;
52
+ --f7-actions-button-icon-size: 24px;
53
+ --f7-actions-button-justify-content: space-between;
54
+ --f7-actions-label-padding: 12px 16px;
55
+ --f7-actions-label-font-size: 14px;
56
+ --f7-actions-label-font-weight: 500;
57
+ --f7-actions-label-justify-content: flex-start;
58
+ --f7-actions-group-margin: 0px;
59
+ .light-vars({
60
+ --f7-actions-button-pressed-bg-color: #e5e5e5;
61
+ });
62
+ .dark-vars({
63
+ --f7-actions-button-pressed-bg-color: #2e2e2e;
64
+ });
65
+ });
66
+ .md-color-vars({
67
+ --f7-actions-button-text-color: var(--f7-md-on-surface);
68
+ --f7-actions-bg-color: var(--f7-md-surface-3);
69
+ --f7-actions-group-border-color: var(--f7-md-outline);
70
+ --f7-actions-label-text-color: var(--f7-theme-color);
71
+ --f7-actions-grid-button-text-color: var(--f7-md-on-surface);
72
+ });
@@ -0,0 +1 @@
1
+ :root{--f7-actions-grid-button-font-size:12px;--f7-actions-grid-button-icon-size:48px}.ios{--f7-actions-transition-timing-function:initial;--f7-actions-border-radius:13px;--f7-actions-grid-button-text-color:#757575;--f7-actions-button-padding:0px;--f7-actions-button-text-align:center;--f7-actions-button-height:57px;--f7-actions-button-height-landscape:44px;--f7-actions-button-font-size:20px;--f7-actions-button-icon-size:28px;--f7-actions-button-justify-content:center;--f7-actions-label-padding:8px 10px;--f7-actions-label-font-weight:400;--f7-actions-label-font-size:13px;--f7-actions-label-justify-content:center;--f7-actions-group-border-color:transparent;--f7-actions-group-margin:8px;--f7-actions-bg-color:rgba(255, 255, 255, 0.95);--f7-actions-bg-color-rgb:255,255,255;--f7-actions-button-border-color:rgba(0, 0, 0, 0.2);--f7-actions-button-pressed-bg-color:rgba(230, 230, 230, 0.9);--f7-actions-button-pressed-bg-color-rgb:230,230,230;--f7-actions-label-text-color:#8a8a8a}.ios .dark,.ios.dark{--f7-actions-bg-color:rgba(45, 45, 45, 0.95);--f7-actions-bg-color-rgb:45,45,45;--f7-actions-button-border-color:rgba(255, 255, 255, 0.15);--f7-actions-button-pressed-bg-color:rgba(50, 50, 50, 0.9);--f7-actions-button-pressed-bg-color-rgb:50,50,50;--f7-actions-label-text-color:rgba(255, 255, 255, 0.55)}.md{--f7-actions-transition-timing-function:cubic-bezier(0, 0.8, 0.34, 1);--f7-actions-border-radius:16px;--f7-actions-button-border-color:transparent;--f7-actions-button-padding:0 16px;--f7-actions-button-text-align:left;--f7-actions-button-height:48px;--f7-actions-button-height-landscape:48px;--f7-actions-button-font-size:16px;--f7-actions-button-icon-size:24px;--f7-actions-button-justify-content:space-between;--f7-actions-label-padding:12px 16px;--f7-actions-label-font-size:14px;--f7-actions-label-font-weight:500;--f7-actions-label-justify-content:flex-start;--f7-actions-group-margin:0px;--f7-actions-button-pressed-bg-color:#e5e5e5}.md .dark,.md.dark{--f7-actions-button-pressed-bg-color:#2e2e2e}.md,.md .dark,.md [class*=color-]{--f7-actions-button-text-color:var(--f7-md-on-surface);--f7-actions-bg-color:var(--f7-md-surface-3);--f7-actions-group-border-color:var(--f7-md-outline);--f7-actions-label-text-color:var(--f7-theme-color);--f7-actions-grid-button-text-color:var(--f7-md-on-surface)}.actions-backdrop-unique{z-index:13500}.actions-modal{position:absolute;left:0;bottom:0;z-index:13500;width:100%;transform:translate3d(0,100%,0);display:none;max-height:100%;overflow:auto;-webkit-overflow-scrolling:touch;transition-property:transform;will-change:transform}.actions-modal.modal-in,.actions-modal.modal-out{transition-duration:.3s}.actions-modal.not-animated{transition-duration:0s}.ios .actions-modal.modal-in{transform:translate3d(0,calc(-1 * var(--f7-safe-area-bottom)),0)}.md .actions-modal.modal-in{transform:translate3d(0,0,0)}.actions-modal.modal-out{z-index:13499;transform:translate3d(0,100%,0)}@media (min-width:496px){.actions-modal{width:480px;left:50%;margin-left:-240px}}@media (orientation:landscape){.actions-modal{--f7-actions-button-height:var(--f7-actions-button-height-landscape)}}.actions-backdrop,.actions-modal{transition-timing-function:var(--f7-actions-transition-timing-function)}.actions-group{overflow:hidden;position:relative;margin:var(--f7-actions-group-margin);transform:translate3d(0,0,0)}.actions-group:after{content:'';position:absolute;background-color:var(--f7-actions-group-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)))}.actions-group:last-child:after{display:none!important}.actions-button,.actions-label{width:100%;font-weight:400;margin:0;box-sizing:border-box;display:block;position:relative;overflow:hidden;text-align:var(--f7-actions-button-text-align)}.actions-button:after,.actions-label:after{content:'';position:absolute;background-color:var(--f7-actions-button-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)))}.actions-button a,.actions-label a{text-decoration:none;color:inherit;display:block}.actions-button{cursor:pointer;display:flex;color:var(--f7-actions-button-text-color,var(--f7-theme-color));font-size:var(--f7-actions-button-font-size);height:var(--f7-actions-button-height);line-height:var(--f7-actions-button-height);padding:var(--f7-actions-button-padding);justify-content:var(--f7-actions-button-justify-content);z-index:10}.actions-button.active-state{background-color:var(--f7-actions-button-pressed-bg-color)!important}.actions-button[class*=color-]{color:var(--f7-theme-color)}@supports ((-webkit-backdrop-filter:blur(20px)) or (backdrop-filter:blur(20px))){.ios-translucent-modals .actions-button.active-state{background-color:rgba(var(--f7-actions-button-pressed-bg-color-rgb),.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}.actions-button-media{flex-shrink:0;display:flex;align-items:center}.actions-button-media i.icon{width:var(--f7-actions-button-icon-size);height:var(--f7-actions-button-icon-size);font-size:var(--f7-actions-button-icon-size)}.actions-button a,.actions-button-text{position:relative;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.actions-button-text{width:100%;flex-shrink:1;text-align:var(--f7-actions-button-text-align)}.actions-label{line-height:1.3;display:flex;align-items:center;font-size:var(--f7-actions-label-font-size);font-weight:var(--f7-actions-label-font-weight);color:var(--f7-actions-label-text-color);padding:var(--f7-actions-label-padding);justify-content:var(--f7-actions-label-justify-content);min-height:var(--f7-actions-label-min-height,var(--f7-actions-button-height))}.actions-label[class*=' color-']{--f7-actions-label-text-color:var(--f7-theme-color)}.actions-grid .actions-group{display:flex;flex-wrap:wrap;justify-content:flex-start;margin-top:0}.actions-grid .actions-group:not(:last-child){margin-bottom:0}.actions-grid .actions-button,.actions-grid .actions-label{background:0 0}.actions-grid .actions-button{width:33.33333333%;display:block;color:var(--f7-actions-grid-button-text-color);height:auto;line-height:1;padding:16px}.actions-grid .actions-button:after{display:none!important}.actions-grid .actions-button-media{margin-left:auto!important;margin-right:auto!important;width:var(--f7-actions-grid-button-icon-size);height:var(--f7-actions-grid-button-icon-size)}.actions-grid .actions-button-media i.icon{width:var(--f7-actions-grid-button-icon-size);height:var(--f7-actions-grid-button-icon-size);font-size:var(--f7-actions-grid-button-icon-size)}.actions-grid .actions-button-text{margin-left:0!important;text-align:center!important;margin-top:8px;line-height:1.33em;height:1.33em;font-size:var(--f7-actions-grid-button-font-size)}.ios .actions-group{border-radius:var(--f7-actions-border-radius)}.ios .actions-button,.ios .actions-label{background:var(--f7-actions-bg-color)}@supports ((-webkit-backdrop-filter:blur(20px)) or (backdrop-filter:blur(20px))){.ios-translucent-modals .ios .actions-button,.ios-translucent-modals .ios .actions-label{background-color:rgba(var(--f7-actions-bg-color-rgb),.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}.ios .actions-button:first-child,.ios .actions-label:first-child{border-radius:var(--f7-actions-border-radius) var(--f7-actions-border-radius) 0 0}.ios .actions-button:last-child,.ios .actions-label:last-child{border-radius:0 0 var(--f7-actions-border-radius) var(--f7-actions-border-radius)}.ios .actions-button:last-child:after,.ios .actions-label:last-child:after{display:none!important}.ios .actions-button:first-child:last-child,.ios .actions-label:first-child:last-child{border-radius:var(--f7-actions-border-radius)}.ios .actions-button b,.ios .actions-button.actions-button-strong,.ios .actions-label b,.ios .actions-label.actions-button-strong{font-weight:600}.ios .actions-grid .actions-group{border-radius:0;background:var(--f7-actions-bg-color)}@supports ((-webkit-backdrop-filter:blur(20px)) or (backdrop-filter:blur(20px))){.ios-translucent-modals .ios .actions-grid .actions-group{background-color:rgba(var(--f7-actions-bg-color-rgb),.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}.ios .actions-grid .actions-group:first-child{border-radius:var(--f7-actions-border-radius) var(--f7-actions-border-radius) 0 0}.ios .actions-grid .actions-group:last-child{border-radius:0 0 var(--f7-actions-border-radius) var(--f7-actions-border-radius)}.ios .actions-grid .actions-group:first-child:last-child{border-radius:var(--f7-actions-border-radius)}.ios .actions-grid .actions-button,.ios .actions-grid .actions-label{border-radius:0!important}.ios .actions-button-media{margin-left:16px}.ios .actions-button-media+.actions-button-text{text-align:left;margin-left:16px}.md .actions-modal{background-color:var(--f7-actions-bg-color);border-radius:var(--f7-actions-border-radius) var(--f7-actions-border-radius) 0 0;padding-bottom:var(--f7-safe-area-bottom)}.md .actions-button{transition-duration:.3s}.md .actions-button b,.md .actions-button.actions-button-strong,.md .actions-label b,.md .actions-label.actions-button-strong{font-weight:500}.md .actions-button-media{min-width:40px}.md .actions-button-media+.actions-button-text{margin-left:16px}
@@ -0,0 +1,164 @@
1
+ import { Dom7Array } from 'dom7';
2
+ import Framework7, {
3
+ CSSSelector,
4
+ Framework7EventsClass,
5
+ Framework7Plugin,
6
+ } from '../app/app-class.js';
7
+
8
+ export namespace Actions {
9
+ interface Actions extends Framework7EventsClass<Events> {
10
+ /** Link to global app instance */
11
+ app: Framework7;
12
+ /** Action sheet HTML element */
13
+ el: HTMLElement;
14
+ /** Dom7 instance with action sheet HTML element */
15
+ $el: Dom7Array;
16
+ /** Backdrop HTML element */
17
+ backdropEl: HTMLElement;
18
+ /** Dom7 instance with backdrop HTML element */
19
+ $backdropEl: Dom7Array;
20
+ /** Action sheet instance parameters */
21
+ params: Parameters;
22
+ /** Boolean prop indicating whether action sheet is opened or not */
23
+ opened: boolean;
24
+
25
+ /** Open action sheet. Where animate - boolean (by default true) - defines whether it should be opened with animation */
26
+ open(animate?: boolean): void;
27
+ /** Close action sheet. Where animate - boolean (by default true) - defines whether it should be closed with animation */
28
+ close(animate?: boolean): void;
29
+ /** Destroy action sheet */
30
+ destroy(): void;
31
+ }
32
+
33
+ interface Button {
34
+ /** String with Button's text (could be HTML string) */
35
+ text: string;
36
+ /** HTML string of icon */
37
+ icon?: string;
38
+ /** Enables strong button text */
39
+ strong?: boolean;
40
+ /** Button color, one of default colors */
41
+ color?: string;
42
+ /** Button background color, one of default colors */
43
+ bg?: string;
44
+ /** If enabled then it will be rendered as label instead of button */
45
+ label?: boolean;
46
+ /** Defines whether the button is disabled or not. */
47
+ disabled?: boolean;
48
+ /** If enabled then button click will close Action Sheet */
49
+ close?: boolean;
50
+ /** Callback function that will be executed after click on this button */
51
+ onClick?: (actions: Actions, e: unknown) => void;
52
+ }
53
+
54
+ interface Parameters {
55
+ /** Action Sheet element. Can be useful if you already have Action Sheet element in your HTML and want to create new instance using this element*/
56
+ el?: HTMLElement | CSSSelector;
57
+ /** Full Action Sheet HTML content string. Can be useful if you want to create Action Sheet element with custom HTML*/
58
+ content?: string;
59
+ /** Enables Action Sheet backdrop (dark semi transparent layer behind)*/
60
+ backdrop?: boolean;
61
+ /** Backdrop element to share across instances */
62
+ backdropEl?: HTMLElement | CSSSelector;
63
+ /** If enabled it creates unique backdrop element exclusively for this modal (default false) */
64
+ backdropUnique?: boolean;
65
+ /** Custom css class added to Actions Sheet element */
66
+ cssClass?: string;
67
+ /** When enabled, action sheet will be closed on backdrop click*/
68
+ closeByBackdropClick?: boolean;
69
+ /** When enabled, action sheet will be closed on when click outside of it*/
70
+ closeByOutsideClick?: boolean;
71
+ /** When enabled, action sheet will be closed on ESC keyboard key press (default false) */
72
+ closeOnEscape?: boolean;
73
+ /** Whether the Action Sheet should be opened/closed with animation or not. Can be overwritten in .open() and .close() methods*/
74
+ animate?: boolean;
75
+ /** Action sheet groups/buttons. In this case Actions layout will be generated dynamically based on passed groups and buttons. In case of groups it should array where each item represent array with buttons for group.*/
76
+ buttons?: Button[] | Button[][];
77
+ /** Enables grid buttons layout*/
78
+ grid?: boolean;
79
+ /** When enabled, action sheet will be converted to Popover on large screens.*/
80
+ convertToPopover?: boolean;
81
+ /** When enabled, action sheet will be always converted to Popover.*/
82
+ forceToPopover?: boolean;
83
+ /** HTML element or string CSS selector of target element. Required when conversion to popover is in use*/
84
+ targetEl?: HTMLElement | CSSSelector;
85
+ /** Virtual target element horizontal offset from left side of the screen. Required when conversion to popover is in use without using real target element (targetEl)*/
86
+ targetX?: number;
87
+ /** Virtual target element vertical offset from top of the screen. Required when conversion to popover is in use without using real target element (targetEl)*/
88
+ targetY?: number;
89
+ /** Virtual target element width (in px). Required when conversion to popover is in use without using real target element (targetEl)*/
90
+ targetWidth?: number;
91
+ /** Virtual target element height (in px). Required when conversion to popover is in use without using real target element (targetEl)*/
92
+ targetHeight?: number;
93
+ /** Element to mount modal to. (default app.el) */
94
+ containerEl?: HTMLElement | CSSSelector;
95
+ /** Callback function that will be executed after click on the Action Sheet button*/
96
+ onClick?: (actions: Actions, e: unknown) => void;
97
+ /** Custom function to render Action Sheet. Must return Action Sheet html*/
98
+ render?: () => string;
99
+ /** Custom function to render Popover when conversion to popover is in use. Must return Popover html*/
100
+ renderPopover?: () => string;
101
+ /** Object with event handlers */
102
+ on?: {
103
+ [event in keyof Events]?: Events[event];
104
+ };
105
+ }
106
+
107
+ interface Events {
108
+ /** Event will be triggered when Action Sheet starts its opening animation. As an argument event handler receives action sheet instance */
109
+ open: (actions: Actions) => void;
110
+ /** Event will be triggered after Action Sheet completes its opening animation. As an argument event handler receives action sheet instance */
111
+ opened: (actions: Actions) => void;
112
+ /** Event will be triggered when Action Sheet starts its closing animation. As an argument event handler receives action sheet instance */
113
+ close: (actions: Actions) => void;
114
+ /** Event will be triggered after Action Sheet completes its closing animation. As an argument event handler receives action sheet instance */
115
+ closed: (actions: Actions) => void;
116
+ /** Event will be triggered right before Action Sheet instance will be destroyed. As an argument event handler receives action sheet instance */
117
+ beforeDestroy: (actions: Actions) => void;
118
+ }
119
+
120
+ interface DomEvents {
121
+ /** Event will be triggered when Action Sheet starts its opening animation */
122
+ 'actions:open': (actions: Actions) => void;
123
+ /** Event will be triggered after Action Sheet completes its opening animation */
124
+ 'actions:opened': (actions: Actions) => void;
125
+ /** Event will be triggered when Action Sheet starts its closing animation */
126
+ 'actions:close': (actions: Actions) => void;
127
+ /** Event will be triggered after Action Sheet completes its closing animation */
128
+ 'actions:closed': (actions: Actions) => void;
129
+ }
130
+
131
+ interface AppMethods {
132
+ actions: {
133
+ /** create Action Sheet instance */
134
+ create(parameters: Parameters): Actions;
135
+ /** destroy Action Sheet instance */
136
+ destroy(el: HTMLElement | CSSSelector | Actions): void;
137
+ /** get Action Sheet instance by HTML element */
138
+ get(el?: HTMLElement | CSSSelector): Actions;
139
+ /** opens Action Sheet */
140
+ open(el?: HTMLElement | CSSSelector, animate?: boolean): Actions;
141
+ /** closes Action Sheet */
142
+ close(el?: HTMLElement | CSSSelector, animate?: boolean): Actions;
143
+ };
144
+ }
145
+ interface AppParams {
146
+ actions?: Parameters | undefined;
147
+ }
148
+ interface AppEvents {
149
+ /** Event will be triggered when Action Sheet starts its opening animation. As an argument event handler receives action sheet instance */
150
+ actionsOpen: (actions: Actions) => void;
151
+ /** Event will be triggered after Action Sheet completes its opening animation. As an argument event handler receives action sheet instance */
152
+ actionsOpened: (actions: Actions) => void;
153
+ /** Event will be triggered when Action Sheet starts its closing animation. As an argument event handler receives action sheet instance */
154
+ actionsClose: (actions: Actions) => void;
155
+ /** Event will be triggered after Action Sheet completes its closing animation. As an argument event handler receives action sheet instance */
156
+ actionsClosed: (actions: Actions) => void;
157
+ /** Event will be triggered right before Action Sheet instance will be destroyed. As an argument event handler receives action sheet instance */
158
+ actionsBeforeDestroy: (actions: Actions) => void;
159
+ }
160
+ }
161
+
162
+ declare const ActionsComponent: Framework7Plugin;
163
+
164
+ export default ActionsComponent;