@v-miniapp/ui-react 1.0.45 → 1.0.59
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/dist/components/app/app.d.ts +17 -0
- package/dist/components/app/bottom-tab-bar-layout/hook.d.ts +21 -0
- package/dist/components/app/bottom-tab-bar-layout/store.d.ts +13 -0
- package/dist/components/app/bottom-tab-bar-layout/type.d.ts +13 -0
- package/dist/components/app/data-theme.d.ts +8 -0
- package/dist/components/app/index.d.ts +9 -18
- package/dist/components/app/navigation-bar-layout/hook.d.ts +17 -0
- package/dist/components/app/navigation-bar-layout/store.d.ts +13 -0
- package/dist/components/app/navigation-bar-layout/type.d.ts +7 -0
- package/dist/components/app/page-layout/hook.d.ts +21 -0
- package/dist/components/app/page-layout/store.d.ts +13 -0
- package/dist/components/app/page-layout/type.d.ts +8 -0
- package/dist/components/app/type.d.ts +27 -0
- package/dist/components/calendar/default-render.d.ts +1 -1
- package/dist/components/calendar/utils.d.ts +1 -1
- package/dist/components/carousel/index.d.ts +1 -0
- package/dist/components/input-wrapper/input-wrapper.d.ts +2 -2
- package/dist/components/layout/page.d.ts +8 -1
- package/dist/external/index.js +11344 -7959
- package/dist/external/styles.css +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +4194 -4376
- package/dist/styles.css +1 -1
- package/dist/utils/event-emitter.d.ts +4 -0
- package/dist-storybook/assets/App-Dp1UG-xp.js +93 -0
- package/dist-storybook/assets/{Color-AVL7NMMY-1_8XTICv.js → Color-AVL7NMMY-XA8cFKdV.js} +1 -1
- package/dist-storybook/assets/DEEPLINK-cjgFMuRJ.js +33 -0
- package/dist-storybook/assets/{DocsRenderer-PQXLIZUC-BO86igwd.js → DocsRenderer-PQXLIZUC-D10-0Yfb.js} +2 -2
- package/dist-storybook/assets/EVENTS-BY66PjI7.js +65 -0
- package/dist-storybook/assets/GETTING_STARTED-580o-9Mx.js +64 -0
- package/dist-storybook/assets/GETTING_STARTED-BiQMvjvo.js +62 -0
- package/dist-storybook/assets/GETTING_STARTED-CIVMqKZW.js +80 -0
- package/dist-storybook/assets/{INFINITE_SCROLL-BtM3uoX0.js → INFINITE_SCROLL-BbeR5HeP.js} +1 -1
- package/dist-storybook/assets/LocalesProvider-CMlmwAyY.js +53 -0
- package/dist-storybook/assets/MIGRATE_DARKMODE_TO_THEME-CBDyZyg2.js +107 -0
- package/dist-storybook/assets/{MIGRATION_GUIDE-2LONslE4.js → MIGRATION_GUIDE-FZyRWI-B.js} +3 -3
- package/dist-storybook/assets/OVERVIEW-C9_6gX5Q.js +51 -0
- package/dist-storybook/assets/Router-B5U8bubH.js +71 -0
- package/dist-storybook/assets/{TAILWIND_INTEGRATION-_T-VfvkM.js → TAILWIND_INTEGRATION-BJdy5DAv.js} +1 -1
- package/dist-storybook/assets/THEME-CRbvH7KT.js +103 -0
- package/dist-storybook/assets/_baseClone-DQVxEhny.js +1 -0
- package/dist-storybook/assets/alert-CKwsuaPI.js +1 -0
- package/dist-storybook/assets/{alert.stories-B-vuojPh.js → alert.stories-D0X5wUHk.js} +3 -3
- package/dist-storybook/assets/app-CTv8lFU3.js +1 -0
- package/dist-storybook/assets/avatar-rWcYGe6j.js +1 -0
- package/dist-storybook/assets/{avatar.stories-KYFztAc8.js → avatar.stories-8lrbhMma.js} +6 -6
- package/dist-storybook/assets/{axe-CmvD4WV5.js → axe-BHGdSCoA.js} +1 -1
- package/dist-storybook/assets/badge-VcjGVEum.js +1 -0
- package/dist-storybook/assets/{badge.stories-Be2ItCmQ.js → badge.stories-BEFNaUA1.js} +3 -3
- package/dist-storybook/assets/{blocks-BuaOUtiH.js → blocks-DKR3P4qW.js} +3 -3
- package/dist-storybook/assets/{bottom-tab-bar-CtcTAxuI.js → bottom-tab-bar-B6IAoRwz.js} +1 -1
- package/dist-storybook/assets/{bottom-tab-bar.stories-CDmEve6z.js → bottom-tab-bar.stories-DXzLlO5o.js} +3 -3
- package/dist-storybook/assets/button-DJH3RlJl.js +1 -0
- package/dist-storybook/assets/{button.stories-CaqLWQiY.js → button.stories-DgYDJ6x7.js} +3 -3
- package/dist-storybook/assets/calendar-C4Xe_TW2.js +1 -0
- package/dist-storybook/assets/{calendar.stories-DLWZldet.js → calendar.stories-IVvRAjWN.js} +3 -3
- package/dist-storybook/assets/carousel-DJlgMyS5.js +37 -0
- package/dist-storybook/assets/{carousel.stories-B8YbGOOr.js → carousel.stories-3rA3nxdL.js} +3 -3
- package/dist-storybook/assets/checkbox-JOxcmyCZ.js +1 -0
- package/dist-storybook/assets/{checkbox.stories-CLvfZPiw.js → checkbox.stories-ge3pgfBb.js} +3 -3
- package/dist-storybook/assets/chip-Crt60rph.js +1 -0
- package/dist-storybook/assets/{chip.stories-BbwJb5eD.js → chip.stories-D7E6fdiV.js} +3 -3
- package/dist-storybook/assets/{date-Cg-Uk_pp.js → date-B3PFMb6s.js} +1 -1
- package/dist-storybook/assets/date-field-range-B-sv9nbW.js +1 -0
- package/dist-storybook/assets/date-field.stories-B9G2heHt.js +129 -0
- package/dist-storybook/assets/date-picker-BPzKPdhO.js +1 -0
- package/dist-storybook/assets/{date-picker.stories-BuGWvzFL.js → date-picker.stories-CIFgk4q_.js} +3 -3
- package/dist-storybook/assets/dialog-BAfGQzk5.js +1 -0
- package/dist-storybook/assets/{dialog.stories-DJ0WsSkA.js → dialog.stories-vDMKz9Tw.js} +3 -3
- package/dist-storybook/assets/{chip-kG4p82WT.js → dropdown-Dtomaqpw.js} +2 -2
- package/dist-storybook/assets/{dropdown.stories-D6JUYP73.js → dropdown.stories-Cj0HM0VI.js} +3 -3
- package/dist-storybook/assets/{embla-carousel-react.esm-BYjpaHZ9.js → embla-carousel-react.esm-5D5fs7OQ.js} +1 -1
- package/dist-storybook/assets/icon-CdiFzFyf.js +1 -0
- package/dist-storybook/assets/{icon.stories-B-ZvRzFf.js → icon.stories-DWwbUUY-.js} +3 -3
- package/dist-storybook/assets/iframe-BHaCv4dM.css +1 -0
- package/dist-storybook/assets/{iframe-CQAwSt4E.js → iframe-DfPay7Zl.js} +42 -42
- package/dist-storybook/assets/image-CMKb-R3x.js +9 -0
- package/dist-storybook/assets/{image.stories-C4l8D3ju.js → image.stories-BhZU057W.js} +3 -3
- package/dist-storybook/assets/index-BWpuenI4.js +1 -0
- package/dist-storybook/assets/{index-CgMRTj-o.js → index-DqZh6B0b.js} +1 -1
- package/dist-storybook/assets/{index-BV0AJWP6.js → index-EGt7xBnA.js} +1 -1
- package/dist-storybook/assets/{index-DHiZ-gXR.js → index-cMNObl2z.js} +1 -1
- package/dist-storybook/assets/input-wrapper-CgaUwbbE.js +1 -0
- package/dist-storybook/assets/{label-DV2iCDmN.js → label-D44azUgi.js} +1 -1
- package/dist-storybook/assets/{label.stories-BwTIPFXX.js → label.stories-CXJjdYf_.js} +3 -3
- package/dist-storybook/assets/{navigation-bar-vI-FPasP.js → navigation-bar-DK3TxcTu.js} +2 -2
- package/dist-storybook/assets/{navigation-bar.stories-DYuFaJFD.js → navigation-bar.stories-CB3Kg-sH.js} +3 -3
- package/dist-storybook/assets/number-field-Bz7su9S1.js +1 -0
- package/dist-storybook/assets/{number-field.stories--fn26TJu.js → number-field.stories-DSxPSzLv.js} +3 -3
- package/dist-storybook/assets/omit-BWHsnDSR.js +1 -0
- package/dist-storybook/assets/option-item-CpeNcb5w.js +1 -0
- package/dist-storybook/assets/{option-item.stories-snjAvgay.js → option-item.stories-BvXoc8WX.js} +3 -3
- package/dist-storybook/assets/pagination-Cp-DHO4Q.js +1 -0
- package/dist-storybook/assets/{pagination.stories-BoEs0jzS.js → pagination.stories-_5qj2nTS.js} +4 -4
- package/dist-storybook/assets/proxy-B4G9nIBd.js +1 -0
- package/dist-storybook/assets/radio-D0aV0RIg.js +1 -0
- package/dist-storybook/assets/{radio.stories-DuN-Awi_.js → radio.stories-BNR-wwuw.js} +3 -3
- package/dist-storybook/assets/rating-D2e8RTGl.js +1 -0
- package/dist-storybook/assets/{rating.stories-BCcQjMEx.js → rating.stories-CI0LG0Qq.js} +3 -3
- package/dist-storybook/assets/{react-18-CNyWQ7je.js → react-18-C7pDmBBf.js} +1 -1
- package/dist-storybook/assets/{react-hufnxGVs.js → react-I9jCW2VV.js} +1 -1
- package/dist-storybook/assets/search-field-DINESW8Y.js +1 -0
- package/dist-storybook/assets/{search-field.stories-DiCZbhng.js → search-field.stories-CKXC6-Za.js} +3 -3
- package/dist-storybook/assets/section-content-D49PabBW.js +1 -0
- package/dist-storybook/assets/{section.stories-C2I_kKhu.js → section.stories-9vd48AgB.js} +3 -3
- package/dist-storybook/assets/sheet-footer-nEdxsYan.js +1 -0
- package/dist-storybook/assets/{sheet.stories-wk1JaKU5.js → sheet.stories-C3gLIQsn.js} +3 -3
- package/dist-storybook/assets/skeleton-B12XbNAJ.js +1 -0
- package/dist-storybook/assets/{skeleton.stories-BCmX-VNr.js → skeleton.stories-C0y1o1Y_.js} +3 -3
- package/dist-storybook/assets/{store-D2RudmNr.js → store-Ce3Ikv5g.js} +5 -5
- package/dist-storybook/assets/switch-D0Z9tWin.js +1 -0
- package/dist-storybook/assets/{switch.stories-BqPLNKB9.js → switch.stories-BdWFln-M.js} +3 -3
- package/dist-storybook/assets/{tab-bar-CSeCmtIZ.js → tab-bar-kExoGg5P.js} +1 -1
- package/dist-storybook/assets/{tab-bar.stories-Cb6v8H2w.js → tab-bar.stories-BgDXX0of.js} +3 -3
- package/dist-storybook/assets/text-area-GKy5HL12.js +1 -0
- package/dist-storybook/assets/{text-area.stories-By8bCfgc.js → text-area.stories-DCt3RB3A.js} +3 -3
- package/dist-storybook/assets/text-field-CGWNqitB.js +1 -0
- package/dist-storybook/assets/{text-field.stories-CrWBAhvI.js → text-field.stories-Bqv7f948.js} +3 -3
- package/dist-storybook/assets/toast-provider-DKSrfhJD.js +9 -0
- package/dist-storybook/assets/{toast.stories-iWAToAZA.js → toast.stories-CcFzS6QI.js} +1 -1
- package/dist-storybook/assets/tooltip-B9rDI6z9.js +1 -0
- package/dist-storybook/assets/{tooltip.stories-RC6SuPPD.js → tooltip.stories-DDdsuU3U.js} +3 -3
- package/dist-storybook/assets/typography-CB8hPDyK.js +1 -0
- package/dist-storybook/assets/{typography.stories-Bu8qFugR.js → typography.stories-BzCxaZQU.js} +3 -3
- package/dist-storybook/assets/{uploader.stories-B2wW9qVy.js → uploader.stories-izVumFqZ.js} +3 -3
- package/dist-storybook/assets/use-app-pause-ClsUnndr.js +21 -0
- package/dist-storybook/assets/use-app-resume-D_EcIvMd.js +21 -0
- package/dist-storybook/assets/use-bottom-tab-bar-BC1cz2uE.js +49 -0
- package/dist-storybook/assets/use-custom-icon-event-cUk4Md0Y.js +26 -0
- package/dist-storybook/assets/use-did-hide-BmABiaUE.js +30 -0
- package/dist-storybook/assets/use-did-show-CQuySkkT.js +30 -0
- package/dist-storybook/assets/use-histories-CBm09Lno.js +30 -0
- package/dist-storybook/assets/use-history-7yguNz6O.js +33 -0
- package/dist-storybook/assets/use-language-DPyWMce2.js +46 -0
- package/dist-storybook/assets/use-load-more-KlDJZhj2.js +42 -0
- package/dist-storybook/assets/use-location-C7kE1yla.js +39 -0
- package/dist-storybook/assets/use-navigate-BpIyvtwc.js +36 -0
- package/dist-storybook/assets/use-navigation-bar-guzwhM_u.js +42 -0
- package/dist-storybook/assets/use-navigation-type-DOndDqQH.js +27 -0
- package/dist-storybook/assets/use-page-layout-dO6ylI1b.js +37 -0
- package/dist-storybook/assets/use-page-scroll-CCG2d2Gb.js +42 -0
- package/dist-storybook/assets/use-pull-to-refresh-lhumDu1H.js +38 -0
- package/dist-storybook/assets/use-settings-changed-Bt58DJ-c.js +30 -0
- package/dist-storybook/assets/use-translate-Jhz6jTXo.js +59 -0
- package/dist-storybook/assets/{visibility-sensor-CwrzJO06.js → visibility-sensor-Jf-Nmil6.js} +1 -1
- package/dist-storybook/iframe.html +2 -2
- package/dist-storybook/index.json +1 -1
- package/dist-storybook/project.json +1 -1
- package/dist-storybook/sb-addons/a11y-2/manager-bundle.js +2 -2
- package/dist-storybook/sb-addons/docs-1/manager-bundle.js +2 -2
- package/dist-storybook/sb-addons/storybook-build-3/manager-bundle.js +1 -1
- package/dist-storybook/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +4 -4
- package/dist-storybook/stories-data.json +152 -122
- package/package.json +3 -1
- package/dist/components/app/components/app.d.ts +0 -13
- package/dist/components/app/components/link.d.ts +0 -8
- package/dist/components/app/components/navigation-analytic.d.ts +0 -2
- package/dist/components/app/components/pages-render.d.ts +0 -2
- package/dist/components/app/context/location-key.d.ts +0 -4
- package/dist/components/app/hooks/use-app-pause.d.ts +0 -1
- package/dist/components/app/hooks/use-app-resume.d.ts +0 -1
- package/dist/components/app/hooks/use-app-state.d.ts +0 -7
- package/dist/components/app/hooks/use-bottom-tab-bar.d.ts +0 -13
- package/dist/components/app/hooks/use-did-hide.d.ts +0 -1
- package/dist/components/app/hooks/use-did-show.d.ts +0 -1
- package/dist/components/app/hooks/use-history.d.ts +0 -2
- package/dist/components/app/hooks/use-location.d.ts +0 -1
- package/dist/components/app/hooks/use-navigate.d.ts +0 -1
- package/dist/components/app/hooks/use-navigation-bar.d.ts +0 -12
- package/dist/components/app/hooks/use-navigation-type.d.ts +0 -1
- package/dist/components/app/hooks/use-page-config.d.ts +0 -1
- package/dist/components/app/hooks/use-page-layout.d.ts +0 -14
- package/dist/components/app/hooks/use-page-scroll.d.ts +0 -5
- package/dist/components/app/hooks/use-page-state.d.ts +0 -6
- package/dist/components/app/stores/app.d.ts +0 -24
- package/dist/components/app/stores/app.selector.d.ts +0 -11
- package/dist/components/app/types/app.d.ts +0 -55
- package/dist/components/app/types/navigation.d.ts +0 -30
- package/dist/components/app/utils/animation.d.ts +0 -2
- package/dist/components/app/utils/data-theme.d.ts +0 -5
- package/dist/components/app/utils/history.d.ts +0 -7
- package/dist/hooks/use-analytic.d.ts +0 -1
- package/dist/hooks/use-is-using-app.d.ts +0 -1
- package/dist/hooks/use-is-using-locales.d.ts +0 -1
- package/dist/locales/defaultResources/en.d.ts +0 -27
- package/dist/locales/defaultResources/vi.d.ts +0 -27
- package/dist/locales/fns.d.ts +0 -6
- package/dist/locales/hooks.d.ts +0 -9
- package/dist/locales/index.d.ts +0 -4
- package/dist/locales/provider.d.ts +0 -6
- package/dist/locales/store.d.ts +0 -13
- package/dist/locales/types.d.ts +0 -37
- package/dist/locales/utils.d.ts +0 -2
- package/dist-storybook/assets/ANIMATION-CUdn1GTK.js +0 -99
- package/dist-storybook/assets/APP_FRAMEWORK-ljbIOHYd.js +0 -197
- package/dist-storybook/assets/BOTTOM_TAB_BAR-DxCwCfBK.js +0 -175
- package/dist-storybook/assets/CUSTOM_ERROR_BOUNDARY-B4wTQNZc.js +0 -250
- package/dist-storybook/assets/DARK_MODE-CoHseCDO.js +0 -57
- package/dist-storybook/assets/GETTING_STARTED-H_vVi5cv.js +0 -77
- package/dist-storybook/assets/KEEP_ALIVE-CL2au0al.js +0 -126
- package/dist-storybook/assets/LOCALE-XTCey55y.js +0 -465
- package/dist-storybook/assets/MOBILE_BEHAVIOURS-DZ6alKTX.js +0 -177
- package/dist-storybook/assets/PAGE_LAYOUT-BuOpN-1Y.js +0 -192
- package/dist-storybook/assets/ROUTING_NAVIGATION-BCPHXNto.js +0 -335
- package/dist-storybook/assets/_setToString-CbM921C9.js +0 -1
- package/dist-storybook/assets/alert-DLW8CoyB.js +0 -1
- package/dist-storybook/assets/avatar-GxcYPA1p.js +0 -1
- package/dist-storybook/assets/badge-D_LzMVtw.js +0 -1
- package/dist-storybook/assets/button-CL7GeC23.js +0 -1
- package/dist-storybook/assets/calendar-dOCsjhVU.js +0 -1
- package/dist-storybook/assets/carousel-1Kww3hIz.js +0 -37
- package/dist-storybook/assets/checkbox-MGytNNRt.js +0 -1
- package/dist-storybook/assets/classname-CUR_zgkh.js +0 -1
- package/dist-storybook/assets/date-field.stories-Diptwqfv.js +0 -129
- package/dist-storybook/assets/date-picker-Dnq_-0Md.js +0 -1
- package/dist-storybook/assets/icon-DdQsMyRa.js +0 -1
- package/dist-storybook/assets/iframe-yMKl6hJA.css +0 -1
- package/dist-storybook/assets/image-C3EsNRhz.js +0 -9
- package/dist-storybook/assets/input-wrapper-BKHgnPy6.js +0 -1
- package/dist-storybook/assets/number-field-CXKmnfKe.js +0 -1
- package/dist-storybook/assets/omit-Bsx5nTI0.js +0 -1
- package/dist-storybook/assets/option-item-LRh_OyV4.js +0 -1
- package/dist-storybook/assets/pagination-DZHoBs_4.js +0 -1
- package/dist-storybook/assets/pick-BhmhLmLe.js +0 -1
- package/dist-storybook/assets/radio-B5NJxG_l.js +0 -1
- package/dist-storybook/assets/rating-BdXViYBv.js +0 -1
- package/dist-storybook/assets/search-field-CQqgFbfg.js +0 -1
- package/dist-storybook/assets/section-content-DGNB4eLN.js +0 -1
- package/dist-storybook/assets/skeleton-C91JgehG.js +0 -1
- package/dist-storybook/assets/store-CPumdfcU.js +0 -1
- package/dist-storybook/assets/switch-p-aXI-ev.js +0 -1
- package/dist-storybook/assets/text-area-DwSXyqOe.js +0 -1
- package/dist-storybook/assets/text-field-jK6rpOo2.js +0 -1
- package/dist-storybook/assets/toast-provider-DurnMJhd.js +0 -9
- package/dist-storybook/assets/tooltip-QDdel5My.js +0 -1
- package/dist-storybook/assets/typography-DEpAJl_i.js +0 -1
- package/dist-storybook/assets/use-app-pause-B_tWHKJK.js +0 -29
- package/dist-storybook/assets/use-app-resume--900G-dV.js +0 -29
- package/dist-storybook/assets/use-custom-icon-event-3VExRzvC.js +0 -29
- package/dist-storybook/assets/use-did-hide-BUsL73ab.js +0 -48
- package/dist-storybook/assets/use-did-show-C1-VLDxi.js +0 -49
- package/dist-storybook/assets/use-histories-E4E2jJEY.js +0 -50
- package/dist-storybook/assets/use-history-o1im8IDj.js +0 -67
- package/dist-storybook/assets/use-location-CUEaBO4P.js +0 -56
- package/dist-storybook/assets/use-navigate-C4CTuFSZ.js +0 -84
- package/dist-storybook/assets/use-navigation-type-Dcz4hgKo.js +0 -44
- package/dist-storybook/assets/use-page-config-DSJBVQbq.js +0 -48
- package/dist-storybook/assets/use-page-scroll-dY-U1Vv4.js +0 -69
- package/dist-storybook/assets/use-page-state-CtNpwGPN.js +0 -79
- package/dist-storybook/assets/use-settings-changed-BBJwIHTE.js +0 -29
- /package/dist/components/app/{components/bottom-tab-bar.d.ts → bottom-tab-bar-layout/index.d.ts} +0 -0
- /package/dist/components/app/{components/navigation-bar.d.ts → navigation-bar-layout/index.d.ts} +0 -0
- /package/dist/components/app/{components/page-layout.d.ts → page-layout/index.d.ts} +0 -0
- /package/dist/{components/app/hooks → hooks}/use-custom-icon-event.d.ts +0 -0
- /package/dist/{components/app/hooks → hooks}/use-settings-changed.d.ts +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, FC, ReactNode } from 'react';
|
|
2
|
+
import { ILocalesConfig, IResourceKey, ITemplateParams } from '@v-miniapp/locale';
|
|
3
|
+
import { IAppConfig } from './type';
|
|
4
|
+
export type IAppConfigContext = {
|
|
5
|
+
t: (key: IResourceKey, params?: ITemplateParams) => ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export type IAppConfigFunction = (context: IAppConfigContext) => IAppConfig;
|
|
8
|
+
export type IAppProps = ComponentPropsWithRef<'div'> & {
|
|
9
|
+
config?: IAppConfig | IAppConfigFunction;
|
|
10
|
+
localesConfig?: ILocalesConfig;
|
|
11
|
+
};
|
|
12
|
+
type IAppComponent = FC<IAppProps> & {
|
|
13
|
+
isUsingApp: boolean;
|
|
14
|
+
isUsingRouter: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare const App: IAppComponent;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IAppBottomTabBarState, IPageBottomTabBarState } from './type';
|
|
2
|
+
export declare const useBottomTabBar: () => {
|
|
3
|
+
state: Partial<Omit<import('../..').IBottomTabBarProps, "items" | "activeId">> & {
|
|
4
|
+
items: Array<import('../..').IBottomTabBarItem & {
|
|
5
|
+
path: string;
|
|
6
|
+
params?: Record<string, string>;
|
|
7
|
+
}>;
|
|
8
|
+
hidden?: boolean;
|
|
9
|
+
} & {
|
|
10
|
+
bottomTabBarId?: string;
|
|
11
|
+
};
|
|
12
|
+
pageState: import('./type').IPageBottomTabBarConfig;
|
|
13
|
+
appState: import('./type').IAppBottomTabBarConfig;
|
|
14
|
+
hidden: boolean;
|
|
15
|
+
setPageBottomTabBar: (bottomTabBar: Partial<IPageBottomTabBarState>) => void;
|
|
16
|
+
setAppBottomTabBar: (bottomTabBar: Partial<IAppBottomTabBarState>) => void;
|
|
17
|
+
removePageBottomTabBar: () => void;
|
|
18
|
+
removeAppBottomTabBar: () => void;
|
|
19
|
+
resetPageBottomTabBar: () => void;
|
|
20
|
+
resetAppBottomTabBar: () => void;
|
|
21
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IAppBottomTabBarConfig, IAppBottomTabBarState, IPageBottomTabBarConfig, IPageBottomTabBarState } from './type';
|
|
2
|
+
type IBottomTabBarState = {
|
|
3
|
+
pageConfigs: Record<string, IPageBottomTabBarConfig>;
|
|
4
|
+
appConfig: IAppBottomTabBarConfig;
|
|
5
|
+
pages: Record<string, IPageBottomTabBarState>;
|
|
6
|
+
app: IAppBottomTabBarState;
|
|
7
|
+
setPage: (key: string, bottomTabBar: Partial<IPageBottomTabBarState>) => void;
|
|
8
|
+
setApp: (bottomTabBar: Partial<IAppBottomTabBarState>) => void;
|
|
9
|
+
resetPage: (key: string, pagePath: string) => void;
|
|
10
|
+
resetApp: () => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const useBottomTabBarLayoutStore: import('zustand').UseBoundStore<import('zustand').StoreApi<IBottomTabBarState>>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IBottomTabBarItem, IBottomTabBarProps } from '../../bottom-tab-bar';
|
|
2
|
+
export type IAppBottomTabBarConfig = Partial<Omit<IBottomTabBarProps, 'activeId' | 'items'>> & {
|
|
3
|
+
items: Array<IBottomTabBarItem & {
|
|
4
|
+
path: string;
|
|
5
|
+
params?: Record<string, string>;
|
|
6
|
+
}>;
|
|
7
|
+
hidden?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type IPageBottomTabBarConfig = IAppBottomTabBarConfig & {
|
|
10
|
+
bottomTabBarId?: string;
|
|
11
|
+
};
|
|
12
|
+
export type IPageBottomTabBarState = IPageBottomTabBarConfig;
|
|
13
|
+
export type IAppBottomTabBarState = IAppBottomTabBarConfig;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type IDataTheme = 'dark' | 'light';
|
|
2
|
+
type IThemeMode = IDataTheme | 'system';
|
|
3
|
+
export declare const initThemeMode: (mode?: IThemeMode) => void;
|
|
4
|
+
export declare const getDataTheme: () => IDataTheme;
|
|
5
|
+
export declare const setDataTheme: (theme: IDataTheme) => void;
|
|
6
|
+
export declare const setDataThemeBySystem: () => void;
|
|
7
|
+
export declare const toggleDataTheme: () => void;
|
|
8
|
+
export {};
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export
|
|
10
|
-
export * from './hooks/use-page-layout';
|
|
11
|
-
export * from './hooks/use-page-scroll';
|
|
12
|
-
export * from './hooks/use-app-pause';
|
|
13
|
-
export * from './hooks/use-app-resume';
|
|
14
|
-
export * from './hooks/use-settings-changed';
|
|
15
|
-
export * from './hooks/use-custom-icon-event';
|
|
16
|
-
export * from './utils/data-theme';
|
|
17
|
-
export type * from './types/app';
|
|
18
|
-
export type * from './types/navigation';
|
|
1
|
+
export * from './app';
|
|
2
|
+
export * from './bottom-tab-bar-layout/hook';
|
|
3
|
+
export * from './navigation-bar-layout/hook';
|
|
4
|
+
export * from './page-layout/hook';
|
|
5
|
+
export type * from './type';
|
|
6
|
+
export type * from './bottom-tab-bar-layout/type';
|
|
7
|
+
export type * from './navigation-bar-layout/type';
|
|
8
|
+
export type * from './page-layout/type';
|
|
9
|
+
export { getDataTheme, setDataTheme, toggleDataTheme } from './data-theme';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IAppNavigationBarState, IPageNavigationBarState } from './type';
|
|
2
|
+
export declare const useNavigationBar: () => {
|
|
3
|
+
state: {
|
|
4
|
+
divider: boolean;
|
|
5
|
+
transparent: string;
|
|
6
|
+
} & import('../..').INavigationBarProps & {
|
|
7
|
+
hidden?: boolean;
|
|
8
|
+
};
|
|
9
|
+
pageState: import('./type').IAppNavigationBarConfig;
|
|
10
|
+
appState: import('./type').IAppNavigationBarConfig;
|
|
11
|
+
setPageNavigationBar: (navigationBar: Partial<IPageNavigationBarState>) => void;
|
|
12
|
+
setAppNavigationBar: (navigationBar: Partial<IAppNavigationBarState>) => void;
|
|
13
|
+
removePageNavigationBar: () => void;
|
|
14
|
+
removeAppNavigationBar: () => void;
|
|
15
|
+
resetPageNavigationBar: () => void;
|
|
16
|
+
resetAppNavigationBar: () => void;
|
|
17
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IAppNavigationBarConfig, IAppNavigationBarState, IPageNavigationBarConfig, IPageNavigationBarState } from './type';
|
|
2
|
+
type INavigationBarState = {
|
|
3
|
+
pageConfigs: Record<string, IPageNavigationBarConfig>;
|
|
4
|
+
appConfig: IAppNavigationBarConfig;
|
|
5
|
+
pages: Record<string, IPageNavigationBarState>;
|
|
6
|
+
app: IAppNavigationBarState;
|
|
7
|
+
setPage: (key: string, navigationBar: Partial<IPageNavigationBarState>) => void;
|
|
8
|
+
setApp: (navigationBar: Partial<IAppNavigationBarState>) => void;
|
|
9
|
+
resetPage: (key: string, pagePath: string) => void;
|
|
10
|
+
resetApp: () => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const useNavigationBarLayoutStore: import('zustand').UseBoundStore<import('zustand').StoreApi<INavigationBarState>>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { INavigationBarProps } from '../../navigation-bar';
|
|
2
|
+
export type IAppNavigationBarConfig = INavigationBarProps & {
|
|
3
|
+
hidden?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export type IPageNavigationBarConfig = IAppNavigationBarConfig;
|
|
6
|
+
export type IPageNavigationBarState = IAppNavigationBarConfig;
|
|
7
|
+
export type IAppNavigationBarState = IAppNavigationBarConfig;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IAppPageState, IPagePageState } from './type';
|
|
2
|
+
import { IPageBaseProps } from '../../layout';
|
|
3
|
+
export declare const usePageLayout: () => {
|
|
4
|
+
state: {
|
|
5
|
+
scrollRestoration: boolean;
|
|
6
|
+
} & IPageBaseProps & {
|
|
7
|
+
hidden?: boolean;
|
|
8
|
+
scrollRestoration?: boolean;
|
|
9
|
+
};
|
|
10
|
+
pageState: import('./type').IAppPageConfig;
|
|
11
|
+
appState: import('./type').IAppPageConfig;
|
|
12
|
+
setPagePageLayout: (bottomTabBar: Partial<IPagePageState>) => void;
|
|
13
|
+
setAppPageLayout: (bottomTabBar: Partial<IAppPageState>) => void;
|
|
14
|
+
removePagePageLayout: () => void;
|
|
15
|
+
removeAppPageLayout: () => void;
|
|
16
|
+
resetPagePageLayout: () => void;
|
|
17
|
+
resetAppPageLayout: () => void;
|
|
18
|
+
};
|
|
19
|
+
export declare const usePullToRefresh: (onRefresh: () => Promise<unknown> | unknown) => void;
|
|
20
|
+
export declare const usePageScroll: (callback: IPageBaseProps["onPageScroll"], options?: IPageBaseProps["pageScrollOptions"]) => void;
|
|
21
|
+
export declare const useLoadMore: (onEndReached: () => void) => void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IAppPageConfig, IAppPageState, IPagePageConfig, IPagePageState } from './type';
|
|
2
|
+
type IPageState = {
|
|
3
|
+
pageConfigs: Record<string, IPagePageConfig>;
|
|
4
|
+
appConfig: IAppPageConfig;
|
|
5
|
+
pages: Record<string, IPagePageState>;
|
|
6
|
+
app: IAppPageState;
|
|
7
|
+
setPage: (key: string, bottomTabBar: Partial<IPagePageState>) => void;
|
|
8
|
+
setApp: (bottomTabBar: Partial<IAppPageState>) => void;
|
|
9
|
+
resetPage: (key: string, pagePath: string) => void;
|
|
10
|
+
resetApp: () => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const usePageLayoutStore: import('zustand').UseBoundStore<import('zustand').StoreApi<IPageState>>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IPageBaseProps } from '../../layout';
|
|
2
|
+
export type IAppPageConfig = IPageBaseProps & {
|
|
3
|
+
hidden?: boolean;
|
|
4
|
+
scrollRestoration?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export type IPagePageConfig = IAppPageConfig;
|
|
7
|
+
export type IPagePageState = IAppPageConfig;
|
|
8
|
+
export type IAppPageState = IAppPageConfig;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IRouterPageConfig, IRouterConfig } from '@v-miniapp/router';
|
|
2
|
+
import { IAppNavigationBarConfig, IPageNavigationBarConfig } from './navigation-bar-layout/type';
|
|
3
|
+
import { IAppBottomTabBarConfig, IPageBottomTabBarConfig } from './bottom-tab-bar-layout/type';
|
|
4
|
+
import { IAppPageConfig, IPagePageConfig } from './page-layout/type';
|
|
5
|
+
export type IPageConfig = IRouterPageConfig & {
|
|
6
|
+
bottomTabBarId?: string;
|
|
7
|
+
navigationBar?: IPageNavigationBarConfig;
|
|
8
|
+
bottomTabBar?: IPageBottomTabBarConfig;
|
|
9
|
+
pageLayout?: IPagePageConfig;
|
|
10
|
+
};
|
|
11
|
+
export type IAppConfig = Omit<IRouterConfig, 'pages'> & {
|
|
12
|
+
pages: IPageConfig[];
|
|
13
|
+
navigationBar?: IAppNavigationBarConfig;
|
|
14
|
+
bottomTabBar?: IAppBottomTabBarConfig;
|
|
15
|
+
pageLayout?: IAppPageConfig;
|
|
16
|
+
theme?: IThemeConfig;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated This will be removed soon. Use `theme.defaultMode` instead.
|
|
19
|
+
*/
|
|
20
|
+
darkMode?: IDarkModeConfig;
|
|
21
|
+
};
|
|
22
|
+
export type IDarkModeConfig = {
|
|
23
|
+
defaultEnabled?: boolean;
|
|
24
|
+
};
|
|
25
|
+
export type IThemeConfig = {
|
|
26
|
+
mode?: 'dark' | 'light' | 'system';
|
|
27
|
+
};
|
|
@@ -27,7 +27,7 @@ export type IInputWrapperProps = IOverride<ComponentProps<'div'>, IBasicInputPro
|
|
|
27
27
|
loadingNode?: ReactNode;
|
|
28
28
|
}>;
|
|
29
29
|
export declare function getInputProps<T extends IBasicInputProps>(allProps: T): {
|
|
30
|
-
wrapper: Pick<T, "label" | "className" | "disabled" | "
|
|
31
|
-
props: import('lodash').Omit<T, "label" | "className" | "disabled" | "
|
|
30
|
+
wrapper: Pick<T, "label" | "className" | "disabled" | "error" | "prefix" | "shape" | "leadingIcon" | "trailingIcon" | "suffix" | "success" | "successMessage" | "errorMessage" | "onLeadingIconClick" | "onTrailingIconClick">;
|
|
31
|
+
props: import('lodash').Omit<T, "label" | "className" | "disabled" | "error" | "prefix" | "shape" | "leadingIcon" | "trailingIcon" | "suffix" | "success" | "successMessage" | "errorMessage" | "onLeadingIconClick" | "onTrailingIconClick">;
|
|
32
32
|
};
|
|
33
33
|
export declare const InputWrapper: FC<IInputWrapperProps>;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { ComponentPropsWithRef, FC } from 'react';
|
|
1
|
+
import { ComponentPropsWithRef, FC, UIEvent } from 'react';
|
|
2
2
|
import { IPullToRefreshBasProps } from '../pull-to-refresh';
|
|
3
3
|
import { IOverride } from '../../types/util';
|
|
4
|
+
export type IPageScrollOptions = {
|
|
5
|
+
wait?: number;
|
|
6
|
+
leading?: boolean;
|
|
7
|
+
trailing?: boolean;
|
|
8
|
+
};
|
|
4
9
|
export type IPageBaseProps = {
|
|
5
10
|
hasSpacing?: boolean;
|
|
6
11
|
headerOffset?: boolean;
|
|
@@ -10,6 +15,8 @@ export type IPageBaseProps = {
|
|
|
10
15
|
pullToRefresh?: IPullToRefreshBasProps;
|
|
11
16
|
onEndReached?: () => void;
|
|
12
17
|
onEndReachedThreshold?: number;
|
|
18
|
+
onPageScroll?: (target: HTMLDivElement, event: UIEvent<HTMLDivElement, globalThis.UIEvent>) => void;
|
|
19
|
+
pageScrollOptions?: IPageScrollOptions;
|
|
13
20
|
id?: string;
|
|
14
21
|
className?: string;
|
|
15
22
|
style?: React.CSSProperties;
|