framework7-react 6.3.15 → 7.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/{accordion-content/accordion-content.d.ts → accordion-content.d.ts} +0 -0
- package/{esm/components → components}/accordion-content.js +15 -15
- package/components/{accordion-item/accordion-item.d.ts → accordion-item.d.ts} +0 -0
- package/{esm/components → components}/accordion-item.js +28 -28
- package/components/{accordion-toggle/accordion-toggle.d.ts → accordion-toggle.d.ts} +0 -0
- package/{esm/components → components}/accordion-toggle.js +15 -15
- package/components/{accordion/accordion.d.ts → accordion.d.ts} +0 -0
- package/components/accordion.js +29 -0
- package/components/{actions-button/actions-button.d.ts → actions-button.d.ts} +0 -0
- package/{esm/components → components}/actions-button.js +20 -21
- package/components/{actions-group/actions-group.d.ts → actions-group.d.ts} +0 -0
- package/{esm/components → components}/actions-group.js +15 -15
- package/components/{actions-label/actions-label.d.ts → actions-label.d.ts} +0 -0
- package/{esm/components → components}/actions-label.js +17 -17
- package/components/{actions/actions.d.ts → actions.d.ts} +0 -0
- package/components/actions.js +138 -0
- package/components/{app/app.d.ts → app.d.ts} +0 -0
- package/{esm/components → components}/app.js +24 -27
- package/components/{appbar/appbar.d.ts → appbar.d.ts} +0 -0
- package/{esm/components → components}/appbar.js +22 -23
- package/components/{area-chart/area-chart.d.ts → area-chart.d.ts} +0 -0
- package/components/area-chart.js +354 -0
- package/components/{badge/badge.d.ts → badge.d.ts} +0 -0
- package/{esm/components → components}/badge.js +16 -16
- package/components/{block-footer/block-footer.d.ts → block-footer.d.ts} +0 -0
- package/{esm/components → components}/block-footer.js +15 -15
- package/components/{block-header/block-header.d.ts → block-header.d.ts} +0 -0
- package/{esm/components → components}/block-header.js +15 -15
- package/components/{block-title/block-title.d.ts → block-title.d.ts} +0 -0
- package/{esm/components → components}/block-title.js +17 -17
- package/components/{block/block.d.ts → block.d.ts} +0 -0
- package/components/block.js +63 -0
- package/components/breadcrumbs-collapsed.d.ts +16 -0
- package/components/breadcrumbs-collapsed.js +32 -0
- package/components/breadcrumbs-item.d.ts +17 -0
- package/components/breadcrumbs-item.js +33 -0
- package/components/breadcrumbs-separator.d.ts +15 -0
- package/components/breadcrumbs-separator.js +25 -0
- package/components/breadcrumbs.d.ts +15 -0
- package/components/breadcrumbs.js +26 -0
- package/components/{button/button.d.ts → button.d.ts} +0 -0
- package/{esm/components → components}/button.js +64 -65
- package/components/{card-content/card-content.d.ts → card-content.d.ts} +0 -0
- package/{esm/components → components}/card-content.js +16 -17
- package/components/{card-footer/card-footer.d.ts → card-footer.d.ts} +0 -0
- package/{esm/components → components}/card-footer.js +15 -15
- package/components/{card-header/card-header.d.ts → card-header.d.ts} +0 -0
- package/{esm/components → components}/card-header.js +15 -15
- package/components/{card/card.d.ts → card.d.ts} +0 -0
- package/{esm/components → components}/card.js +62 -62
- package/components/{checkbox/checkbox.d.ts → checkbox.d.ts} +0 -0
- package/{esm/components → components}/checkbox.js +29 -29
- package/components/{chip/chip.d.ts → chip.d.ts} +0 -0
- package/{esm/components → components}/chip.js +30 -30
- package/components/{col/col.d.ts → col.d.ts} +0 -0
- package/components/col.js +75 -0
- package/components/{fab-backdrop/fab-backdrop.d.ts → fab-backdrop.d.ts} +0 -0
- package/{esm/components → components}/fab-backdrop.js +14 -14
- package/components/{fab-button/fab-button.d.ts → fab-button.d.ts} +0 -0
- package/{esm/components → components}/fab-button.js +21 -21
- package/components/{fab-buttons/fab-buttons.d.ts → fab-buttons.d.ts} +0 -0
- package/components/fab-buttons.js +29 -0
- package/components/{fab/fab.d.ts → fab.d.ts} +0 -0
- package/{esm/components → components}/fab.js +36 -37
- package/components/{gauge/gauge.d.ts → gauge.d.ts} +0 -0
- package/components/gauge.js +104 -0
- package/components/{icon/icon.d.ts → icon.d.ts} +0 -0
- package/{esm/components → components}/icon.js +34 -34
- package/components/{input/input.d.ts → input.d.ts} +0 -0
- package/{esm/components → components}/input.js +132 -146
- package/components/{link/link.d.ts → link.d.ts} +0 -0
- package/components/link.js +102 -0
- package/components/{list-button/list-button.d.ts → list-button.d.ts} +0 -0
- package/{esm/components → components}/list-button.js +37 -34
- package/components/{list-group/list-group.d.ts → list-group.d.ts} +0 -0
- package/{esm/components → components}/list-group.js +24 -24
- package/components/{list-index/list-index.d.ts → list-index.d.ts} +0 -0
- package/components/list-index.js +94 -0
- package/components/{list-input/list-input.d.ts → list-input.d.ts} +0 -0
- package/{esm/components → components}/list-input.js +146 -163
- package/components/{list-item-cell/list-item-cell.d.ts → list-item-cell.d.ts} +0 -0
- package/{esm/components → components}/list-item-cell.js +15 -15
- package/components/{list-item-content/list-item-content.d.ts → list-item-content.d.ts} +0 -0
- package/{esm/components → components}/list-item-content.js +55 -53
- package/components/{list-item-row/list-item-row.d.ts → list-item-row.d.ts} +0 -0
- package/{esm/components → components}/list-item-row.js +15 -15
- package/components/{list-item/list-item.d.ts → list-item.d.ts} +0 -0
- package/{esm/components → components}/list-item.js +99 -108
- package/components/{list/list.d.ts → list.d.ts} +0 -0
- package/{esm/components → components}/list.js +104 -101
- package/components/{login-screen-title/login-screen-title.d.ts → login-screen-title.d.ts} +0 -0
- package/{esm/components → components}/login-screen-title.js +15 -15
- package/components/{login-screen/login-screen.d.ts → login-screen.d.ts} +0 -0
- package/components/login-screen.js +119 -0
- package/components/{menu-dropdown-item/menu-dropdown-item.d.ts → menu-dropdown-item.d.ts} +0 -0
- package/{esm/components → components}/menu-dropdown-item.js +31 -31
- package/components/{menu-dropdown/menu-dropdown.d.ts → menu-dropdown.d.ts} +0 -0
- package/{esm/components → components}/menu-dropdown.js +21 -21
- package/components/{menu-item/menu-item.d.ts → menu-item.d.ts} +0 -0
- package/{esm/components → components}/menu-item.js +44 -44
- package/components/{menu/menu.d.ts → menu.d.ts} +0 -0
- package/{esm/components → components}/menu.js +15 -15
- package/components/{message/message.d.ts → message.d.ts} +0 -0
- package/{esm/components → components}/message.js +40 -41
- package/components/{messagebar-attachment/messagebar-attachment.d.ts → messagebar-attachment.d.ts} +0 -0
- package/{esm/components → components}/messagebar-attachment.js +19 -20
- package/components/{messagebar-attachments/messagebar-attachments.d.ts → messagebar-attachments.d.ts} +0 -0
- package/{esm/components → components}/messagebar-attachments.js +15 -15
- package/components/{messagebar-sheet-image/messagebar-sheet-image.d.ts → messagebar-sheet-image.d.ts} +0 -0
- package/{esm/components → components}/messagebar-sheet-image.js +22 -23
- package/components/{messagebar-sheet-item/messagebar-sheet-item.d.ts → messagebar-sheet-item.d.ts} +0 -0
- package/{esm/components → components}/messagebar-sheet-item.js +15 -15
- package/components/{messagebar-sheet/messagebar-sheet.d.ts → messagebar-sheet.d.ts} +0 -0
- package/{esm/components → components}/messagebar-sheet.js +15 -15
- package/components/{messagebar/messagebar.d.ts → messagebar.d.ts} +0 -0
- package/components/messagebar.js +202 -0
- package/components/{messages-title/messages-title.d.ts → messages-title.d.ts} +0 -0
- package/{esm/components → components}/messages-title.js +15 -15
- package/components/{messages/messages.d.ts → messages.d.ts} +0 -0
- package/components/messages.js +139 -0
- package/components/{nav-left/nav-left.d.ts → nav-left.d.ts} +0 -0
- package/{esm/components → components}/nav-left.js +28 -28
- package/components/{nav-right/nav-right.d.ts → nav-right.d.ts} +0 -0
- package/{esm/components → components}/nav-right.js +17 -17
- package/components/{nav-title-large/nav-title-large.d.ts → nav-title-large.d.ts} +0 -0
- package/{esm/components → components}/nav-title-large.js +15 -15
- package/components/{nav-title/nav-title.d.ts → nav-title.d.ts} +0 -0
- package/{esm/components → components}/nav-title.js +20 -20
- package/components/{navbar/navbar.d.ts → navbar.d.ts} +0 -0
- package/{esm/components → components}/navbar.js +80 -81
- package/components/{page-content/page-content.d.ts → page-content.d.ts} +0 -0
- package/{esm/components → components}/page-content.js +50 -52
- package/components/{page/page.d.ts → page.d.ts} +0 -0
- package/{esm/components → components}/page.js +104 -107
- package/components/{panel/panel.d.ts → panel.d.ts} +0 -0
- package/components/panel.js +198 -0
- package/components/{photo-browser/photo-browser.d.ts → photo-browser.d.ts} +0 -0
- package/components/photo-browser.js +164 -0
- package/components/{pie-chart/pie-chart.d.ts → pie-chart.d.ts} +0 -0
- package/components/pie-chart.js +171 -0
- package/components/{popover/popover.d.ts → popover.d.ts} +0 -0
- package/components/popover.js +134 -0
- package/components/{popup/popup.d.ts → popup.d.ts} +0 -0
- package/components/popup.js +155 -0
- package/components/{preloader/preloader.d.ts → preloader.d.ts} +0 -0
- package/{esm/components → components}/preloader.js +23 -23
- package/components/{progressbar/progressbar.d.ts → progressbar.d.ts} +0 -0
- package/components/progressbar.js +46 -0
- package/components/{radio/radio.d.ts → radio.d.ts} +0 -0
- package/{esm/components → components}/radio.js +24 -24
- package/components/{range/range.d.ts → range.d.ts} +0 -0
- package/components/range.js +130 -0
- package/components/{routable-modals/routable-modals.d.ts → routable-modals.d.ts} +0 -0
- package/{esm/components → components}/routable-modals.js +23 -25
- package/components/{row/row.d.ts → row.d.ts} +0 -0
- package/{esm/components → components}/row.js +29 -31
- package/components/{searchbar/searchbar.d.ts → searchbar.d.ts} +0 -0
- package/components/searchbar.js +226 -0
- package/components/{segmented/segmented.d.ts → segmented.d.ts} +0 -0
- package/{esm/components → components}/segmented.js +29 -30
- package/components/{sheet/sheet.d.ts → sheet.d.ts} +0 -0
- package/components/sheet.js +184 -0
- package/components/{skeleton-avatar/skeleton-avatar.d.ts → skeleton-avatar.d.ts} +1 -0
- package/{esm/components → components}/skeleton-avatar.js +1 -0
- package/components/{skeleton-block/skeleton-block.d.ts → skeleton-block.d.ts} +1 -0
- package/{esm/components → components}/skeleton-block.js +1 -0
- package/components/{skeleton-image/skeleton-image.d.ts → skeleton-image.d.ts} +1 -0
- package/{esm/components → components}/skeleton-image.js +1 -0
- package/components/{skeleton-text/skeleton-text.d.ts → skeleton-text.d.ts} +1 -0
- package/{esm/components → components}/skeleton-text.js +1 -0
- package/components/{stepper/stepper.d.ts → stepper.d.ts} +0 -0
- package/components/stepper.js +223 -0
- package/components/{subnavbar/subnavbar.d.ts → subnavbar.d.ts} +0 -0
- package/{esm/components → components}/subnavbar.js +19 -20
- package/components/{swipeout-actions/swipeout-actions.d.ts → swipeout-actions.d.ts} +0 -0
- package/{esm/components → components}/swipeout-actions.js +19 -19
- package/components/{swipeout-button/swipeout-button.d.ts → swipeout-button.d.ts} +0 -0
- package/{esm/components → components}/swipeout-button.js +23 -23
- package/components/{swiper-slide/swiper-slide.d.ts → swiper-slide.d.ts} +0 -0
- package/{esm/components → components}/swiper-slide.js +0 -0
- package/components/{swiper/swiper.d.ts → swiper.d.ts} +0 -0
- package/{esm/components → components}/swiper.js +0 -0
- package/components/{tab/tab.d.ts → tab.d.ts} +0 -0
- package/{esm/components → components}/tab.js +45 -45
- package/components/{tabs/tabs.d.ts → tabs.d.ts} +0 -0
- package/{esm/components → components}/tabs.js +23 -23
- package/components/{text-editor/text-editor.d.ts → text-editor.d.ts} +0 -0
- package/components/text-editor.js +141 -0
- package/components/{toggle/toggle.d.ts → toggle.d.ts} +0 -0
- package/components/toggle.js +114 -0
- package/components/{toolbar/toolbar.d.ts → toolbar.d.ts} +0 -0
- package/{esm/components → components}/toolbar.js +47 -48
- package/components/{treeview-item/treeview-item.d.ts → treeview-item.d.ts} +0 -0
- package/{esm/components → components}/treeview-item.js +45 -44
- package/components/{treeview/treeview.d.ts → treeview.d.ts} +0 -0
- package/{esm/components → components}/treeview.js +15 -15
- package/components/{view/view.d.ts → view.d.ts} +0 -0
- package/components/view.js +238 -0
- package/components/{views/views.d.ts → views.d.ts} +0 -0
- package/{esm/components → components}/views.js +17 -17
- package/framework7-react.d.ts +5 -1
- package/framework7-react.js +119 -0
- package/package.json +6 -4
- package/{esm/shared → shared}/components-router.js +78 -68
- package/{esm/shared → shared}/f7.js +15 -23
- package/shared/get-router-initial-component.js +39 -0
- package/{esm/shared → shared}/list-context.js +1 -1
- package/{esm/shared → shared}/mixins.js +91 -77
- package/shared/modal-state-classes.js +9 -0
- package/{esm/shared → shared}/plugin.js +13 -14
- package/shared/router-context.js +6 -0
- package/shared/router-open-in.js +106 -0
- package/shared/tabbar-context.js +5 -0
- package/{esm/shared → shared}/use-async-component.js +2 -2
- package/shared/use-icon.js +35 -0
- package/{esm/shared → shared}/use-isomorphic-layout-effect.js +0 -0
- package/{esm/shared → shared}/use-route-props.js +5 -6
- package/{esm/shared → shared}/use-smart-select.js +8 -8
- package/shared/use-store.js +35 -0
- package/{esm/shared → shared}/use-tab.js +10 -10
- package/shared/use-theme.js +13 -0
- package/{esm/shared → shared}/use-tooltip.js +13 -11
- package/{esm/shared → shared}/utils.js +42 -69
- package/{esm/shared → shared}/watch-prop.js +4 -4
- package/cjs/components/accordion-content.js +0 -40
- package/cjs/components/accordion-item.js +0 -112
- package/cjs/components/accordion-toggle.js +0 -41
- package/cjs/components/accordion.js +0 -41
- package/cjs/components/actions-button.js +0 -68
- package/cjs/components/actions-group.js +0 -40
- package/cjs/components/actions-label.js +0 -50
- package/cjs/components/actions.js +0 -160
- package/cjs/components/app.js +0 -77
- package/cjs/components/appbar.js +0 -58
- package/cjs/components/area-chart.js +0 -397
- package/cjs/components/badge.js +0 -48
- package/cjs/components/block-footer.js +0 -40
- package/cjs/components/block-header.js +0 -40
- package/cjs/components/block-title.js +0 -45
- package/cjs/components/block.js +0 -76
- package/cjs/components/button.js +0 -167
- package/cjs/components/card-content.js +0 -44
- package/cjs/components/card-footer.js +0 -40
- package/cjs/components/card-header.js +0 -40
- package/cjs/components/card.js +0 -196
- package/cjs/components/checkbox.js +0 -79
- package/cjs/components/chip.js +0 -89
- package/cjs/components/col.js +0 -84
- package/cjs/components/fab-backdrop.js +0 -38
- package/cjs/components/fab-button.js +0 -65
- package/cjs/components/fab-buttons.js +0 -41
- package/cjs/components/fab.js +0 -98
- package/cjs/components/gauge.js +0 -127
- package/cjs/components/icon.js +0 -109
- package/cjs/components/input.js +0 -469
- package/cjs/components/link.js +0 -124
- package/cjs/components/list-button.js +0 -75
- package/cjs/components/list-group.js +0 -62
- package/cjs/components/list-index.js +0 -120
- package/cjs/components/list-input.js +0 -472
- package/cjs/components/list-item-cell.js +0 -40
- package/cjs/components/list-item-content.js +0 -180
- package/cjs/components/list-item-row.js +0 -40
- package/cjs/components/list-item.js +0 -406
- package/cjs/components/list.js +0 -250
- package/cjs/components/login-screen-title.js +0 -40
- package/cjs/components/login-screen.js +0 -142
- package/cjs/components/menu-dropdown-item.js +0 -72
- package/cjs/components/menu-dropdown.js +0 -54
- package/cjs/components/menu-item.js +0 -120
- package/cjs/components/menu.js +0 -42
- package/cjs/components/message.js +0 -133
- package/cjs/components/messagebar-attachment.js +0 -59
- package/cjs/components/messagebar-attachments.js +0 -40
- package/cjs/components/messagebar-sheet-image.js +0 -59
- package/cjs/components/messagebar-sheet-item.js +0 -40
- package/cjs/components/messagebar-sheet.js +0 -40
- package/cjs/components/messagebar.js +0 -230
- package/cjs/components/messages-title.js +0 -40
- package/cjs/components/messages.js +0 -164
- package/cjs/components/nav-left.js +0 -76
- package/cjs/components/nav-right.js +0 -43
- package/cjs/components/nav-title-large.js +0 -42
- package/cjs/components/nav-title.js +0 -53
- package/cjs/components/navbar.js +0 -279
- package/cjs/components/page-content.js +0 -173
- package/cjs/components/page.js +0 -423
- package/cjs/components/panel.js +0 -231
- package/cjs/components/photo-browser.js +0 -180
- package/cjs/components/pie-chart.js +0 -202
- package/cjs/components/popover.js +0 -157
- package/cjs/components/popup.js +0 -183
- package/cjs/components/preloader.js +0 -101
- package/cjs/components/progressbar.js +0 -60
- package/cjs/components/radio.js +0 -68
- package/cjs/components/range.js +0 -164
- package/cjs/components/routable-modals.js +0 -71
- package/cjs/components/row.js +0 -79
- package/cjs/components/searchbar.js +0 -257
- package/cjs/components/segmented.js +0 -71
- package/cjs/components/sheet.js +0 -213
- package/cjs/components/skeleton-avatar.js +0 -9
- package/cjs/components/skeleton-block.js +0 -9
- package/cjs/components/skeleton-image.js +0 -9
- package/cjs/components/skeleton-text.js +0 -9
- package/cjs/components/stepper.js +0 -260
- package/cjs/components/subnavbar.js +0 -50
- package/cjs/components/swipeout-actions.js +0 -50
- package/cjs/components/swipeout-button.js +0 -61
- package/cjs/components/swiper-slide.js +0 -9
- package/cjs/components/swiper.js +0 -9
- package/cjs/components/tab.js +0 -141
- package/cjs/components/tabs.js +0 -72
- package/cjs/components/text-editor.js +0 -160
- package/cjs/components/toggle.js +0 -137
- package/cjs/components/toolbar.js +0 -125
- package/cjs/components/treeview-item.js +0 -131
- package/cjs/components/treeview.js +0 -40
- package/cjs/components/view.js +0 -284
- package/cjs/components/views.js +0 -43
- package/cjs/framework7-react.js +0 -416
- package/cjs/shared/components-router.js +0 -243
- package/cjs/shared/f7.js +0 -105
- package/cjs/shared/get-router-initial-component.js +0 -48
- package/cjs/shared/list-context.js +0 -17
- package/cjs/shared/mixins.js +0 -165
- package/cjs/shared/modal-state-classes.js +0 -17
- package/cjs/shared/plugin.js +0 -56
- package/cjs/shared/router-context.js +0 -15
- package/cjs/shared/tabbar-context.js +0 -14
- package/cjs/shared/use-async-component.js +0 -20
- package/cjs/shared/use-icon.js +0 -50
- package/cjs/shared/use-isomorphic-layout-effect.js +0 -12
- package/cjs/shared/use-route-props.js +0 -25
- package/cjs/shared/use-smart-select.js +0 -38
- package/cjs/shared/use-store.js +0 -47
- package/cjs/shared/use-tab.js +0 -46
- package/cjs/shared/use-theme.js +0 -24
- package/cjs/shared/use-tooltip.js +0 -61
- package/cjs/shared/utils.js +0 -199
- package/cjs/shared/watch-prop.js +0 -21
- package/components/accordion/package.json +0 -9
- package/components/accordion-content/package.json +0 -9
- package/components/accordion-item/package.json +0 -9
- package/components/accordion-toggle/package.json +0 -9
- package/components/actions/package.json +0 -9
- package/components/actions-button/package.json +0 -9
- package/components/actions-group/package.json +0 -9
- package/components/actions-label/package.json +0 -9
- package/components/app/package.json +0 -9
- package/components/appbar/package.json +0 -9
- package/components/area-chart/package.json +0 -9
- package/components/badge/package.json +0 -9
- package/components/block/package.json +0 -9
- package/components/block-footer/package.json +0 -9
- package/components/block-header/package.json +0 -9
- package/components/block-title/package.json +0 -9
- package/components/button/package.json +0 -9
- package/components/card/package.json +0 -9
- package/components/card-content/package.json +0 -9
- package/components/card-footer/package.json +0 -9
- package/components/card-header/package.json +0 -9
- package/components/checkbox/package.json +0 -9
- package/components/chip/package.json +0 -9
- package/components/col/package.json +0 -9
- package/components/fab/package.json +0 -9
- package/components/fab-backdrop/package.json +0 -9
- package/components/fab-button/package.json +0 -9
- package/components/fab-buttons/package.json +0 -9
- package/components/gauge/package.json +0 -9
- package/components/icon/package.json +0 -9
- package/components/input/package.json +0 -9
- package/components/link/package.json +0 -9
- package/components/list/package.json +0 -9
- package/components/list-button/package.json +0 -9
- package/components/list-group/package.json +0 -9
- package/components/list-index/package.json +0 -9
- package/components/list-input/package.json +0 -9
- package/components/list-item/package.json +0 -9
- package/components/list-item-cell/package.json +0 -9
- package/components/list-item-content/package.json +0 -9
- package/components/list-item-row/package.json +0 -9
- package/components/login-screen/package.json +0 -9
- package/components/login-screen-title/package.json +0 -9
- package/components/menu/package.json +0 -9
- package/components/menu-dropdown/package.json +0 -9
- package/components/menu-dropdown-item/package.json +0 -9
- package/components/menu-item/package.json +0 -9
- package/components/message/package.json +0 -9
- package/components/messagebar/package.json +0 -9
- package/components/messagebar-attachment/package.json +0 -9
- package/components/messagebar-attachments/package.json +0 -9
- package/components/messagebar-sheet/package.json +0 -9
- package/components/messagebar-sheet-image/package.json +0 -9
- package/components/messagebar-sheet-item/package.json +0 -9
- package/components/messages/package.json +0 -9
- package/components/messages-title/package.json +0 -9
- package/components/nav-left/package.json +0 -9
- package/components/nav-right/package.json +0 -9
- package/components/nav-title/package.json +0 -9
- package/components/nav-title-large/package.json +0 -9
- package/components/navbar/package.json +0 -9
- package/components/page/package.json +0 -9
- package/components/page-content/package.json +0 -9
- package/components/panel/package.json +0 -9
- package/components/photo-browser/package.json +0 -9
- package/components/pie-chart/package.json +0 -9
- package/components/popover/package.json +0 -9
- package/components/popup/package.json +0 -9
- package/components/preloader/package.json +0 -9
- package/components/progressbar/package.json +0 -9
- package/components/radio/package.json +0 -9
- package/components/range/package.json +0 -9
- package/components/routable-modals/package.json +0 -9
- package/components/row/package.json +0 -9
- package/components/searchbar/package.json +0 -9
- package/components/segmented/package.json +0 -9
- package/components/sheet/package.json +0 -9
- package/components/skeleton-avatar/package.json +0 -9
- package/components/skeleton-block/package.json +0 -9
- package/components/skeleton-image/package.json +0 -9
- package/components/skeleton-text/package.json +0 -9
- package/components/stepper/package.json +0 -9
- package/components/subnavbar/package.json +0 -9
- package/components/swipeout-actions/package.json +0 -9
- package/components/swipeout-button/package.json +0 -9
- package/components/swiper/package.json +0 -9
- package/components/swiper-slide/package.json +0 -9
- package/components/tab/package.json +0 -9
- package/components/tabs/package.json +0 -9
- package/components/text-editor/package.json +0 -9
- package/components/toggle/package.json +0 -9
- package/components/toolbar/package.json +0 -9
- package/components/treeview/package.json +0 -9
- package/components/treeview-item/package.json +0 -9
- package/components/view/package.json +0 -9
- package/components/views/package.json +0 -9
- package/esm/components/accordion.js +0 -29
- package/esm/components/actions.js +0 -144
- package/esm/components/area-chart.js +0 -385
- package/esm/components/block.js +0 -63
- package/esm/components/col.js +0 -71
- package/esm/components/fab-buttons.js +0 -29
- package/esm/components/gauge.js +0 -117
- package/esm/components/link.js +0 -104
- package/esm/components/list-index.js +0 -105
- package/esm/components/login-screen.js +0 -126
- package/esm/components/messagebar.js +0 -211
- package/esm/components/messages.js +0 -149
- package/esm/components/panel.js +0 -216
- package/esm/components/photo-browser.js +0 -170
- package/esm/components/pie-chart.js +0 -190
- package/esm/components/popover.js +0 -141
- package/esm/components/popup.js +0 -167
- package/esm/components/progressbar.js +0 -46
- package/esm/components/range.js +0 -149
- package/esm/components/searchbar.js +0 -243
- package/esm/components/sheet.js +0 -196
- package/esm/components/stepper.js +0 -244
- package/esm/components/text-editor.js +0 -145
- package/esm/components/toggle.js +0 -119
- package/esm/components/view.js +0 -261
- package/esm/framework7-react.js +0 -115
- package/esm/shared/get-router-initial-component.js +0 -40
- package/esm/shared/modal-state-classes.js +0 -10
- package/esm/shared/router-context.js +0 -6
- package/esm/shared/tabbar-context.js +0 -5
- package/esm/shared/use-icon.js +0 -38
- package/esm/shared/use-store.js +0 -38
- package/esm/shared/use-theme.js +0 -15
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
2
|
+
import { useIsomorphicLayoutEffect } from '../shared/use-isomorphic-layout-effect.js';
|
|
3
|
+
import { extend, emit } from '../shared/utils.js';
|
|
4
|
+
import { watchProp } from '../shared/watch-prop.js';
|
|
5
|
+
import { f7ready, f7 } from '../shared/f7.js';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
const PhotoBrowser = /*#__PURE__*/forwardRef((props, ref) => {
|
|
9
|
+
const f7PhotoBrowser = useRef(null);
|
|
10
|
+
const {
|
|
11
|
+
init = true,
|
|
12
|
+
params,
|
|
13
|
+
photos,
|
|
14
|
+
exposition = true,
|
|
15
|
+
expositionHideCaptions = false,
|
|
16
|
+
type,
|
|
17
|
+
navbar = true,
|
|
18
|
+
toolbar = true,
|
|
19
|
+
theme,
|
|
20
|
+
captionsTheme,
|
|
21
|
+
iconsColor,
|
|
22
|
+
swipeToClose = true,
|
|
23
|
+
pageBackLinkText,
|
|
24
|
+
popupCloseLinkText,
|
|
25
|
+
navbarOfText,
|
|
26
|
+
navbarShowCount,
|
|
27
|
+
swiper,
|
|
28
|
+
url,
|
|
29
|
+
routableModals = false,
|
|
30
|
+
virtualSlides = true,
|
|
31
|
+
view,
|
|
32
|
+
renderNavbar,
|
|
33
|
+
renderToolbar,
|
|
34
|
+
renderCaption,
|
|
35
|
+
renderObject,
|
|
36
|
+
renderLazyPhoto,
|
|
37
|
+
renderPhoto,
|
|
38
|
+
renderPage,
|
|
39
|
+
renderPopup,
|
|
40
|
+
renderStandalone
|
|
41
|
+
} = props;
|
|
42
|
+
|
|
43
|
+
const open = index => {
|
|
44
|
+
return f7PhotoBrowser.current.open(index);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const close = () => {
|
|
48
|
+
return f7PhotoBrowser.current.close();
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const expositionToggle = () => {
|
|
52
|
+
return f7PhotoBrowser.current.expositionToggle();
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const expositionEnable = () => {
|
|
56
|
+
return f7PhotoBrowser.current.expositionEnable();
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const expositionDisable = () => {
|
|
60
|
+
return f7PhotoBrowser.current.expositionDisable();
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
useImperativeHandle(ref, () => ({
|
|
64
|
+
f7PhotoBrowser: () => f7PhotoBrowser.current,
|
|
65
|
+
open,
|
|
66
|
+
close,
|
|
67
|
+
expositionToggle,
|
|
68
|
+
expositionEnable,
|
|
69
|
+
expositionDisable
|
|
70
|
+
}));
|
|
71
|
+
watchProp(photos, newValue => {
|
|
72
|
+
const pb = f7PhotoBrowser.current;
|
|
73
|
+
if (!pb) return;
|
|
74
|
+
pb.params.photos = newValue;
|
|
75
|
+
|
|
76
|
+
if (pb.opened && pb.swiper) {
|
|
77
|
+
pb.swiper.update();
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
const onMount = () => {
|
|
82
|
+
if (!init) return;
|
|
83
|
+
f7ready(() => {
|
|
84
|
+
let paramsComputed;
|
|
85
|
+
|
|
86
|
+
if (typeof params !== 'undefined') {
|
|
87
|
+
paramsComputed = params;
|
|
88
|
+
} else {
|
|
89
|
+
paramsComputed = {
|
|
90
|
+
photos,
|
|
91
|
+
exposition,
|
|
92
|
+
expositionHideCaptions,
|
|
93
|
+
type,
|
|
94
|
+
navbar,
|
|
95
|
+
toolbar,
|
|
96
|
+
theme,
|
|
97
|
+
captionsTheme,
|
|
98
|
+
iconsColor,
|
|
99
|
+
swipeToClose,
|
|
100
|
+
pageBackLinkText,
|
|
101
|
+
popupCloseLinkText,
|
|
102
|
+
navbarOfText,
|
|
103
|
+
navbarShowCount,
|
|
104
|
+
swiper,
|
|
105
|
+
url,
|
|
106
|
+
routableModals,
|
|
107
|
+
virtualSlides,
|
|
108
|
+
view,
|
|
109
|
+
renderNavbar,
|
|
110
|
+
renderToolbar,
|
|
111
|
+
renderCaption,
|
|
112
|
+
renderObject,
|
|
113
|
+
renderLazyPhoto,
|
|
114
|
+
renderPhoto,
|
|
115
|
+
renderPage,
|
|
116
|
+
renderPopup,
|
|
117
|
+
renderStandalone
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
Object.keys(paramsComputed).forEach(param => {
|
|
122
|
+
if (typeof paramsComputed[param] === 'undefined' || paramsComputed[param] === '') delete paramsComputed[param];
|
|
123
|
+
});
|
|
124
|
+
paramsComputed = extend({}, paramsComputed, {
|
|
125
|
+
on: {
|
|
126
|
+
open() {
|
|
127
|
+
emit(props, 'photoBrowserOpen');
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
close() {
|
|
131
|
+
emit(props, 'photoBrowserClose');
|
|
132
|
+
},
|
|
133
|
+
|
|
134
|
+
opened() {
|
|
135
|
+
emit(props, 'photoBrowserOpened');
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
closed() {
|
|
139
|
+
emit(props, 'photoBrowserClosed');
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
swipeToClose() {
|
|
143
|
+
emit(props, 'photoBrowserSwipeToClose');
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
f7PhotoBrowser.current = f7.photoBrowser.create(paramsComputed);
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const onDestroy = () => {
|
|
153
|
+
if (f7PhotoBrowser.current && f7PhotoBrowser.current.destroy) f7PhotoBrowser.current.destroy();
|
|
154
|
+
f7PhotoBrowser.current = null;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
useIsomorphicLayoutEffect(() => {
|
|
158
|
+
onMount();
|
|
159
|
+
return onDestroy;
|
|
160
|
+
}, []);
|
|
161
|
+
return null;
|
|
162
|
+
});
|
|
163
|
+
PhotoBrowser.displayName = 'f7-photo-browser';
|
|
164
|
+
export default PhotoBrowser;
|
|
File without changes
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import React, { forwardRef, useRef, useImperativeHandle, useState, useEffect } from 'react';
|
|
4
|
+
import { classNames, getExtraAttrs, emit } from '../shared/utils.js';
|
|
5
|
+
import { f7 } from '../shared/f7.js';
|
|
6
|
+
|
|
7
|
+
const PieChart = /*#__PURE__*/forwardRef((props, ref) => {
|
|
8
|
+
const {
|
|
9
|
+
className,
|
|
10
|
+
id,
|
|
11
|
+
style,
|
|
12
|
+
size = 320,
|
|
13
|
+
tooltip = false,
|
|
14
|
+
datasets = [],
|
|
15
|
+
formatTooltip,
|
|
16
|
+
children
|
|
17
|
+
} = props;
|
|
18
|
+
const extraAttrs = getExtraAttrs(props);
|
|
19
|
+
const [currentIndex, setCurrentIndex] = useState(null);
|
|
20
|
+
const previousIndex = useRef(null);
|
|
21
|
+
const elRef = useRef(null);
|
|
22
|
+
const f7Tooltip = useRef(null);
|
|
23
|
+
useImperativeHandle(ref, () => ({
|
|
24
|
+
el: elRef.current
|
|
25
|
+
}));
|
|
26
|
+
|
|
27
|
+
const getSummValue = () => {
|
|
28
|
+
let summ = 0;
|
|
29
|
+
datasets.map(d => d.value || 0).forEach(value => {
|
|
30
|
+
summ += value;
|
|
31
|
+
});
|
|
32
|
+
return summ;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const getPaths = () => {
|
|
36
|
+
const paths = [];
|
|
37
|
+
let cumulativePercentage = 0;
|
|
38
|
+
|
|
39
|
+
function getCoordinatesForPercentage(percentage) {
|
|
40
|
+
const x = Math.cos(2 * Math.PI * percentage) * (size / 3);
|
|
41
|
+
const y = Math.sin(2 * Math.PI * percentage) * (size / 3);
|
|
42
|
+
return [x, y];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
datasets.forEach(({
|
|
46
|
+
value,
|
|
47
|
+
label,
|
|
48
|
+
color
|
|
49
|
+
}) => {
|
|
50
|
+
const percentage = value / getSummValue();
|
|
51
|
+
const [startX, startY] = getCoordinatesForPercentage(cumulativePercentage);
|
|
52
|
+
cumulativePercentage += percentage;
|
|
53
|
+
const [endX, endY] = getCoordinatesForPercentage(cumulativePercentage);
|
|
54
|
+
const largeArcFlag = percentage > 0.5 ? 1 : 0;
|
|
55
|
+
const points = [`M ${startX} ${startY}`, // Move
|
|
56
|
+
`A ${size / 3} ${size / 3} 0 ${largeArcFlag} 1 ${endX} ${endY}`, // Arc
|
|
57
|
+
'L 0 0' // Line
|
|
58
|
+
].join(' ');
|
|
59
|
+
paths.push({
|
|
60
|
+
points,
|
|
61
|
+
label,
|
|
62
|
+
color
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
return paths;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const formatTooltipText = () => {
|
|
69
|
+
if (currentIndex === null) return '';
|
|
70
|
+
const {
|
|
71
|
+
value,
|
|
72
|
+
label,
|
|
73
|
+
color
|
|
74
|
+
} = datasets[currentIndex];
|
|
75
|
+
const percentage = value / getSummValue() * 100;
|
|
76
|
+
|
|
77
|
+
const round = v => {
|
|
78
|
+
if (parseInt(v, 10) === v) return v;
|
|
79
|
+
return Math.round(v * 100) / 100;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
if (formatTooltip) {
|
|
83
|
+
return formatTooltip({
|
|
84
|
+
index: currentIndex,
|
|
85
|
+
value,
|
|
86
|
+
label,
|
|
87
|
+
color,
|
|
88
|
+
percentage
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const tooltipText = `${label ? `${label}: ` : ''}${round(value)} (${round(percentage)}%)`;
|
|
93
|
+
return `
|
|
94
|
+
<div class="pie-chart-tooltip-label">
|
|
95
|
+
<span class="pie-chart-tooltip-color" style="background-color: ${color};"></span> ${tooltipText}
|
|
96
|
+
</div>
|
|
97
|
+
`;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const setTooltip = () => {
|
|
101
|
+
if (currentIndex === null && !f7Tooltip.current) return;
|
|
102
|
+
if (!tooltip || !elRef.current || !f7) return;
|
|
103
|
+
|
|
104
|
+
if (currentIndex !== null && !f7Tooltip.current) {
|
|
105
|
+
f7Tooltip.current = f7.tooltip.create({
|
|
106
|
+
trigger: 'manual',
|
|
107
|
+
containerEl: elRef.current,
|
|
108
|
+
targetEl: elRef.current.querySelector(`path[data-index="${currentIndex}"]`),
|
|
109
|
+
text: formatTooltipText(),
|
|
110
|
+
cssClass: 'pie-chart-tooltip'
|
|
111
|
+
});
|
|
112
|
+
f7Tooltip.current.show();
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (!f7Tooltip.current) return;
|
|
117
|
+
|
|
118
|
+
if (currentIndex !== null) {
|
|
119
|
+
f7Tooltip.current.setText(formatTooltipText());
|
|
120
|
+
f7Tooltip.current.setTargetEl(elRef.current.querySelector(`path[data-index="${currentIndex}"]`));
|
|
121
|
+
f7Tooltip.current.show();
|
|
122
|
+
} else {
|
|
123
|
+
f7Tooltip.current.hide();
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
useEffect(() => {
|
|
128
|
+
if (previousIndex.current === currentIndex) return;
|
|
129
|
+
previousIndex.current = currentIndex;
|
|
130
|
+
emit(props, 'select', currentIndex, datasets[currentIndex]);
|
|
131
|
+
setTooltip();
|
|
132
|
+
}, [currentIndex]);
|
|
133
|
+
useEffect(() => {
|
|
134
|
+
return () => {
|
|
135
|
+
if (f7Tooltip.current && f7Tooltip.current.destroy) {
|
|
136
|
+
f7Tooltip.current.destroy();
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
f7Tooltip.current = null;
|
|
140
|
+
};
|
|
141
|
+
}, []);
|
|
142
|
+
const classes = classNames('pie-chart', className);
|
|
143
|
+
const paths = getPaths();
|
|
144
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
145
|
+
id: id,
|
|
146
|
+
style: style,
|
|
147
|
+
className: classes,
|
|
148
|
+
ref: elRef
|
|
149
|
+
}, extraAttrs), /*#__PURE__*/React.createElement("svg", {
|
|
150
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
151
|
+
width: size,
|
|
152
|
+
height: size,
|
|
153
|
+
viewBox: `-${size / 3} -${size / 3} ${size * 2 / 3} ${size * 2 / 3}`,
|
|
154
|
+
style: {
|
|
155
|
+
transform: 'rotate(-90deg)'
|
|
156
|
+
}
|
|
157
|
+
}, paths.map((path, index) => /*#__PURE__*/React.createElement("path", {
|
|
158
|
+
key: path.label || index,
|
|
159
|
+
d: path.points,
|
|
160
|
+
fill: path.color,
|
|
161
|
+
"data-index": index,
|
|
162
|
+
className: classNames({
|
|
163
|
+
'pie-chart-hidden': currentIndex !== null && currentIndex !== index
|
|
164
|
+
}),
|
|
165
|
+
onClick: () => setCurrentIndex(index),
|
|
166
|
+
onMouseEnter: () => setCurrentIndex(index),
|
|
167
|
+
onMouseLeave: () => setCurrentIndex(null)
|
|
168
|
+
}))), children);
|
|
169
|
+
});
|
|
170
|
+
PieChart.displayName = 'f7-pie-chart';
|
|
171
|
+
export default PieChart;
|
|
File without changes
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
|
+
import { useIsomorphicLayoutEffect } from '../shared/use-isomorphic-layout-effect.js';
|
|
5
|
+
import { classNames, getExtraAttrs, emit } from '../shared/utils.js';
|
|
6
|
+
import { colorClasses } from '../shared/mixins.js';
|
|
7
|
+
import { f7ready, f7 } from '../shared/f7.js';
|
|
8
|
+
import { watchProp } from '../shared/watch-prop.js';
|
|
9
|
+
import { modalStateClasses } from '../shared/modal-state-classes.js';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
const Popover = /*#__PURE__*/forwardRef((props, ref) => {
|
|
13
|
+
const f7Popover = useRef(null);
|
|
14
|
+
const {
|
|
15
|
+
className,
|
|
16
|
+
id,
|
|
17
|
+
style,
|
|
18
|
+
children,
|
|
19
|
+
opened,
|
|
20
|
+
animate,
|
|
21
|
+
targetEl,
|
|
22
|
+
backdrop,
|
|
23
|
+
backdropEl,
|
|
24
|
+
closeByBackdropClick,
|
|
25
|
+
closeByOutsideClick,
|
|
26
|
+
closeOnEscape,
|
|
27
|
+
containerEl
|
|
28
|
+
} = props;
|
|
29
|
+
const extraAttrs = getExtraAttrs(props);
|
|
30
|
+
const elRef = useRef(null);
|
|
31
|
+
const isOpened = useRef(opened);
|
|
32
|
+
const isClosing = useRef(false);
|
|
33
|
+
|
|
34
|
+
const onOpen = instance => {
|
|
35
|
+
isOpened.current = true;
|
|
36
|
+
isClosing.current = false;
|
|
37
|
+
emit(props, 'popoverOpen', instance);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const onOpened = instance => {
|
|
41
|
+
emit(props, 'popoverOpened', instance);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const onClose = instance => {
|
|
45
|
+
isOpened.current = false;
|
|
46
|
+
isClosing.current = true;
|
|
47
|
+
emit(props, 'popoverClose', instance);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const onClosed = instance => {
|
|
51
|
+
isClosing.current = false;
|
|
52
|
+
emit(props, 'popoverClosed', instance);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
useImperativeHandle(ref, () => ({
|
|
56
|
+
el: elRef.current,
|
|
57
|
+
f7Popover: () => f7Popover.current
|
|
58
|
+
}));
|
|
59
|
+
watchProp(opened, value => {
|
|
60
|
+
if (!f7Popover.current) return;
|
|
61
|
+
|
|
62
|
+
if (value) {
|
|
63
|
+
f7Popover.current.open();
|
|
64
|
+
} else {
|
|
65
|
+
f7Popover.current.close();
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
const modalEvents = method => {
|
|
70
|
+
if (!f7Popover.current) return;
|
|
71
|
+
f7Popover.current[method]('open', onOpen);
|
|
72
|
+
f7Popover.current[method]('opened', onOpened);
|
|
73
|
+
f7Popover.current[method]('close', onClose);
|
|
74
|
+
f7Popover.current[method]('closed', onClosed);
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const onMount = () => {
|
|
78
|
+
if (!elRef.current) return;
|
|
79
|
+
const popoverParams = {
|
|
80
|
+
el: elRef.current
|
|
81
|
+
};
|
|
82
|
+
if (targetEl) popoverParams.targetEl = targetEl;
|
|
83
|
+
if ('closeByBackdropClick' in props) popoverParams.closeByBackdropClick = closeByBackdropClick;
|
|
84
|
+
if ('closeByOutsideClick' in props) popoverParams.closeByOutsideClick = closeByOutsideClick;
|
|
85
|
+
if ('closeOnEscape' in props) popoverParams.closeOnEscape = closeOnEscape;
|
|
86
|
+
if ('backdrop' in props) popoverParams.backdrop = backdrop;
|
|
87
|
+
if ('backdropEl' in props) popoverParams.backdropEl = backdropEl;
|
|
88
|
+
if ('animate' in props) popoverParams.animate = animate;
|
|
89
|
+
if ('containerEl' in props) popoverParams.containerEl = containerEl;
|
|
90
|
+
f7ready(() => {
|
|
91
|
+
f7Popover.current = f7.popover.create(popoverParams);
|
|
92
|
+
modalEvents('on');
|
|
93
|
+
|
|
94
|
+
if (opened && targetEl) {
|
|
95
|
+
f7Popover.current.open(targetEl, false);
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const onDestroy = () => {
|
|
101
|
+
if (f7Popover.current) {
|
|
102
|
+
f7Popover.current.destroy();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
f7Popover.current = null;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
useIsomorphicLayoutEffect(() => {
|
|
109
|
+
modalEvents('on');
|
|
110
|
+
return () => {
|
|
111
|
+
modalEvents('off');
|
|
112
|
+
};
|
|
113
|
+
});
|
|
114
|
+
useIsomorphicLayoutEffect(() => {
|
|
115
|
+
onMount();
|
|
116
|
+
return onDestroy;
|
|
117
|
+
}, []);
|
|
118
|
+
const classes = classNames(className, 'popover', modalStateClasses({
|
|
119
|
+
isOpened,
|
|
120
|
+
isClosing
|
|
121
|
+
}), colorClasses(props));
|
|
122
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
123
|
+
id: id,
|
|
124
|
+
style: style,
|
|
125
|
+
className: classes,
|
|
126
|
+
ref: elRef
|
|
127
|
+
}, extraAttrs), /*#__PURE__*/React.createElement("div", {
|
|
128
|
+
className: "popover-angle"
|
|
129
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
130
|
+
className: "popover-inner"
|
|
131
|
+
}, children));
|
|
132
|
+
});
|
|
133
|
+
Popover.displayName = 'f7-popover';
|
|
134
|
+
export default Popover;
|
|
File without changes
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import React, { forwardRef, useImperativeHandle, useRef } from 'react';
|
|
4
|
+
import { f7, f7ready } from '../shared/f7.js';
|
|
5
|
+
import { colorClasses } from '../shared/mixins.js';
|
|
6
|
+
import { modalStateClasses } from '../shared/modal-state-classes.js';
|
|
7
|
+
import { useIsomorphicLayoutEffect } from '../shared/use-isomorphic-layout-effect.js';
|
|
8
|
+
import { classNames, emit, getExtraAttrs } from '../shared/utils.js';
|
|
9
|
+
import { watchProp } from '../shared/watch-prop.js';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
const Popup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
13
|
+
const f7Popup = useRef(null);
|
|
14
|
+
const {
|
|
15
|
+
className,
|
|
16
|
+
id,
|
|
17
|
+
style,
|
|
18
|
+
children,
|
|
19
|
+
tabletFullscreen,
|
|
20
|
+
push,
|
|
21
|
+
opened,
|
|
22
|
+
closeByBackdropClick,
|
|
23
|
+
backdrop,
|
|
24
|
+
backdropEl,
|
|
25
|
+
animate,
|
|
26
|
+
closeOnEscape,
|
|
27
|
+
swipeToClose = false,
|
|
28
|
+
swipeHandler,
|
|
29
|
+
containerEl
|
|
30
|
+
} = props;
|
|
31
|
+
const extraAttrs = getExtraAttrs(props);
|
|
32
|
+
const elRef = useRef(null);
|
|
33
|
+
const isOpened = useRef(opened);
|
|
34
|
+
const isClosing = useRef(false);
|
|
35
|
+
|
|
36
|
+
const onSwipeStart = instance => {
|
|
37
|
+
emit(props, 'popupSwipeStart', instance);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const onSwipeMove = instance => {
|
|
41
|
+
emit(props, 'popupSwipeMove', instance);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const onSwipeEnd = instance => {
|
|
45
|
+
emit(props, 'popupSwipeEnd', instance);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const onSwipeClose = instance => {
|
|
49
|
+
emit(props, 'popupSwipeClose', instance);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const onOpen = instance => {
|
|
53
|
+
isOpened.current = true;
|
|
54
|
+
isClosing.current = false;
|
|
55
|
+
emit(props, 'popupOpen', instance);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const onOpened = instance => {
|
|
59
|
+
emit(props, 'popupOpened', instance);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const onClose = instance => {
|
|
63
|
+
isOpened.current = false;
|
|
64
|
+
isClosing.current = true;
|
|
65
|
+
emit(props, 'popupClose', instance);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const onClosed = instance => {
|
|
69
|
+
isClosing.current = false;
|
|
70
|
+
emit(props, 'popupClosed', instance);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
useImperativeHandle(ref, () => ({
|
|
74
|
+
el: elRef.current,
|
|
75
|
+
f7Popup: () => f7Popup.current
|
|
76
|
+
}));
|
|
77
|
+
watchProp(opened, value => {
|
|
78
|
+
if (!f7Popup.current) return;
|
|
79
|
+
|
|
80
|
+
if (value) {
|
|
81
|
+
f7Popup.current.open();
|
|
82
|
+
} else {
|
|
83
|
+
f7Popup.current.close();
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
const modalEvents = method => {
|
|
88
|
+
if (!f7Popup.current) return;
|
|
89
|
+
f7Popup.current[method]('swipeStart', onSwipeStart);
|
|
90
|
+
f7Popup.current[method]('swipeMove', onSwipeMove);
|
|
91
|
+
f7Popup.current[method]('swipeEnd', onSwipeEnd);
|
|
92
|
+
f7Popup.current[method]('swipeClose', onSwipeClose);
|
|
93
|
+
f7Popup.current[method]('open', onOpen);
|
|
94
|
+
f7Popup.current[method]('opened', onOpened);
|
|
95
|
+
f7Popup.current[method]('close', onClose);
|
|
96
|
+
f7Popup.current[method]('closed', onClosed);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const onMount = () => {
|
|
100
|
+
if (!elRef.current) return;
|
|
101
|
+
const popupParams = {
|
|
102
|
+
el: elRef.current
|
|
103
|
+
};
|
|
104
|
+
if ('closeByBackdropClick' in props) popupParams.closeByBackdropClick = closeByBackdropClick;
|
|
105
|
+
if ('closeOnEscape' in props) popupParams.closeOnEscape = closeOnEscape;
|
|
106
|
+
if ('animate' in props) popupParams.animate = animate;
|
|
107
|
+
if ('backdrop' in props) popupParams.backdrop = backdrop;
|
|
108
|
+
if ('backdropEl' in props) popupParams.backdropEl = backdropEl;
|
|
109
|
+
if ('swipeToClose' in props) popupParams.swipeToClose = swipeToClose;
|
|
110
|
+
if ('swipeHandler' in props) popupParams.swipeHandler = swipeHandler;
|
|
111
|
+
if ('containerEl' in props) popupParams.containerEl = containerEl;
|
|
112
|
+
f7ready(() => {
|
|
113
|
+
f7Popup.current = f7.popup.create(popupParams);
|
|
114
|
+
modalEvents('on');
|
|
115
|
+
|
|
116
|
+
if (opened) {
|
|
117
|
+
f7Popup.current.open(false);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
const onDestroy = () => {
|
|
123
|
+
if (f7Popup.current) {
|
|
124
|
+
f7Popup.current.destroy();
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
f7Popup.current = null;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
useIsomorphicLayoutEffect(() => {
|
|
131
|
+
modalEvents('on');
|
|
132
|
+
return () => {
|
|
133
|
+
modalEvents('off');
|
|
134
|
+
};
|
|
135
|
+
});
|
|
136
|
+
useIsomorphicLayoutEffect(() => {
|
|
137
|
+
onMount();
|
|
138
|
+
return onDestroy;
|
|
139
|
+
}, []);
|
|
140
|
+
const classes = classNames(className, 'popup', {
|
|
141
|
+
'popup-tablet-fullscreen': tabletFullscreen,
|
|
142
|
+
'popup-push': push
|
|
143
|
+
}, modalStateClasses({
|
|
144
|
+
isOpened,
|
|
145
|
+
isClosing
|
|
146
|
+
}), colorClasses(props));
|
|
147
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
148
|
+
id: id,
|
|
149
|
+
style: style,
|
|
150
|
+
className: classes,
|
|
151
|
+
ref: elRef
|
|
152
|
+
}, extraAttrs), children);
|
|
153
|
+
});
|
|
154
|
+
Popup.displayName = 'f7-popup';
|
|
155
|
+
export default Popup;
|
|
File without changes
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React, { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
|
-
import { classNames, getExtraAttrs, extend } from '../shared/utils';
|
|
5
|
-
import { colorClasses } from '../shared/mixins';
|
|
6
|
-
import { useTheme } from '../shared/use-theme';
|
|
4
|
+
import { classNames, getExtraAttrs, extend } from '../shared/utils.js';
|
|
5
|
+
import { colorClasses } from '../shared/mixins.js';
|
|
6
|
+
import { useTheme } from '../shared/use-theme.js';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
const Preloader = /*#__PURE__*/forwardRef((props, ref) => {
|
|
9
|
+
const theme = useTheme();
|
|
10
|
+
const {
|
|
11
|
+
className,
|
|
12
|
+
id,
|
|
13
|
+
style,
|
|
14
|
+
size
|
|
15
|
+
} = props;
|
|
16
|
+
const extraAttrs = getExtraAttrs(props);
|
|
17
|
+
const elRef = useRef(null);
|
|
18
|
+
useImperativeHandle(ref, () => ({
|
|
19
|
+
el: elRef.current
|
|
20
|
+
}));
|
|
21
|
+
const preloaderStyle = {};
|
|
22
|
+
let sizeComputed = size;
|
|
23
23
|
|
|
24
24
|
if (sizeComputed && typeof sizeComputed === 'string' && sizeComputed.indexOf('px') >= 0) {
|
|
25
25
|
sizeComputed = sizeComputed.replace('px', '');
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
if (sizeComputed) {
|
|
29
|
-
preloaderStyle.width = sizeComputed
|
|
30
|
-
preloaderStyle.height = sizeComputed
|
|
31
|
-
preloaderStyle['--f7-preloader-size'] = sizeComputed
|
|
29
|
+
preloaderStyle.width = `${sizeComputed}px`;
|
|
30
|
+
preloaderStyle.height = `${sizeComputed}px`;
|
|
31
|
+
preloaderStyle['--f7-preloader-size'] = `${sizeComputed}px`;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
if (style) extend(preloaderStyle, style || {});
|
|
35
|
-
|
|
35
|
+
let innerEl;
|
|
36
36
|
|
|
37
37
|
if (theme && theme.md) {
|
|
38
38
|
innerEl = /*#__PURE__*/React.createElement("span", {
|
|
@@ -76,7 +76,7 @@ var Preloader = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
const classes = classNames(className, 'preloader', colorClasses(props));
|
|
80
80
|
return /*#__PURE__*/React.createElement("span", _extends({
|
|
81
81
|
id: id,
|
|
82
82
|
style: preloaderStyle,
|
|
File without changes
|