@v-miniapp/ui-react 1.0.47 → 1.0.60

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 (254) hide show
  1. package/dist/components/app/app.d.ts +17 -0
  2. package/dist/components/app/bottom-tab-bar-layout/hook.d.ts +21 -0
  3. package/dist/components/app/bottom-tab-bar-layout/store.d.ts +13 -0
  4. package/dist/components/app/bottom-tab-bar-layout/type.d.ts +13 -0
  5. package/dist/components/app/data-theme.d.ts +8 -0
  6. package/dist/components/app/index.d.ts +9 -18
  7. package/dist/components/app/navigation-bar-layout/hook.d.ts +17 -0
  8. package/dist/components/app/navigation-bar-layout/store.d.ts +13 -0
  9. package/dist/components/app/navigation-bar-layout/type.d.ts +7 -0
  10. package/dist/components/app/page-layout/hook.d.ts +21 -0
  11. package/dist/components/app/page-layout/store.d.ts +13 -0
  12. package/dist/components/app/page-layout/type.d.ts +8 -0
  13. package/dist/components/app/type.d.ts +27 -0
  14. package/dist/components/calendar/default-render.d.ts +1 -1
  15. package/dist/components/calendar/utils.d.ts +1 -1
  16. package/dist/components/input-wrapper/input-wrapper.d.ts +2 -2
  17. package/dist/components/layout/page.d.ts +8 -1
  18. package/dist/external/index.js +11456 -8093
  19. package/dist/external/styles.css +1 -1
  20. package/dist/index.d.ts +4 -1
  21. package/dist/index.js +3787 -3991
  22. package/dist/styles.css +1 -1
  23. package/dist/utils/event-emitter.d.ts +4 -0
  24. package/dist-storybook/assets/App-CJxOxRXd.js +93 -0
  25. package/dist-storybook/assets/{Color-AVL7NMMY-OD8SQvXt.js → Color-AVL7NMMY-DwohVA43.js} +1 -1
  26. package/dist-storybook/assets/DEEPLINK-B5vUshJ4.js +33 -0
  27. package/dist-storybook/assets/{DocsRenderer-PQXLIZUC-D8kbgtPd.js → DocsRenderer-PQXLIZUC-vNsl3A7z.js} +2 -2
  28. package/dist-storybook/assets/EVENTS-DIl-sE2t.js +65 -0
  29. package/dist-storybook/assets/GETTING_STARTED-CR4dG_o7.js +62 -0
  30. package/dist-storybook/assets/GETTING_STARTED-CS2BpDsP.js +80 -0
  31. package/dist-storybook/assets/GETTING_STARTED-CtonLhRi.js +64 -0
  32. package/dist-storybook/assets/{INFINITE_SCROLL-O36i5W8i.js → INFINITE_SCROLL-BerukJIr.js} +1 -1
  33. package/dist-storybook/assets/LocalesProvider-CehS9yzW.js +53 -0
  34. package/dist-storybook/assets/MIGRATE_DARKMODE_TO_THEME-CRf-7Wcz.js +107 -0
  35. package/dist-storybook/assets/{MIGRATION_GUIDE-Dn2gFk5v.js → MIGRATION_GUIDE-CRIHuXpT.js} +3 -3
  36. package/dist-storybook/assets/OVERVIEW-DayETux4.js +51 -0
  37. package/dist-storybook/assets/Router-CGsO5Wd_.js +71 -0
  38. package/dist-storybook/assets/{TAILWIND_INTEGRATION-CVrohRXO.js → TAILWIND_INTEGRATION-RPvFP-GI.js} +1 -1
  39. package/dist-storybook/assets/THEME-C-pA_uq_.js +103 -0
  40. package/dist-storybook/assets/_baseClone-4nOrhHpR.js +1 -0
  41. package/dist-storybook/assets/alert-D3VdqAYm.js +1 -0
  42. package/dist-storybook/assets/{alert.stories-XyvS4WTm.js → alert.stories-CFBhdabd.js} +3 -3
  43. package/dist-storybook/assets/app-B__CxZQv.js +1 -0
  44. package/dist-storybook/assets/avatar-BVV1WSnD.js +1 -0
  45. package/dist-storybook/assets/{avatar.stories-glTjw5Kd.js → avatar.stories-D0RA2Mhh.js} +6 -6
  46. package/dist-storybook/assets/{axe-B8nlqekz.js → axe-Cj9fkEY9.js} +1 -1
  47. package/dist-storybook/assets/badge-DLt8CmDs.js +1 -0
  48. package/dist-storybook/assets/{badge.stories-CeNmmdtv.js → badge.stories-DhVKBE64.js} +3 -3
  49. package/dist-storybook/assets/{blocks-CpOj9FQ_.js → blocks-D4qvS4eZ.js} +3 -3
  50. package/dist-storybook/assets/{bottom-tab-bar-BsPd0FD7.js → bottom-tab-bar-UaYvPAic.js} +1 -1
  51. package/dist-storybook/assets/{bottom-tab-bar.stories-BG1ee2eN.js → bottom-tab-bar.stories--7Qh-68J.js} +3 -3
  52. package/dist-storybook/assets/button-CbLEqALK.js +1 -0
  53. package/dist-storybook/assets/{button.stories-3d_T0h_Z.js → button.stories-DgRH6oVV.js} +3 -3
  54. package/dist-storybook/assets/calendar-C7tiySn0.js +1 -0
  55. package/dist-storybook/assets/{calendar.stories-DEleEKoa.js → calendar.stories-B0K_T9ak.js} +3 -3
  56. package/dist-storybook/assets/carousel-C1nQGnJZ.js +37 -0
  57. package/dist-storybook/assets/{carousel.stories-DY9nDa3M.js → carousel.stories-C5d6yLzd.js} +3 -3
  58. package/dist-storybook/assets/checkbox-Bs8ghsWP.js +1 -0
  59. package/dist-storybook/assets/{checkbox.stories-BY8W9TRC.js → checkbox.stories-CG74gIlt.js} +3 -3
  60. package/dist-storybook/assets/chip-D4_ukvFv.js +1 -0
  61. package/dist-storybook/assets/{chip.stories-CXh30Tdq.js → chip.stories-D0908ZyT.js} +3 -3
  62. package/dist-storybook/assets/{date-Ci5dIit0.js → date-C1W0DfQy.js} +1 -1
  63. package/dist-storybook/assets/date-field-range-DSAQp9qR.js +1 -0
  64. package/dist-storybook/assets/date-field.stories-Dx6-qeWT.js +129 -0
  65. package/dist-storybook/assets/date-picker--PiU9sOL.js +1 -0
  66. package/dist-storybook/assets/{date-picker.stories-DUaL7sft.js → date-picker.stories-Bahq3f1W.js} +3 -3
  67. package/dist-storybook/assets/dialog-8K5u-kre.js +1 -0
  68. package/dist-storybook/assets/{dialog.stories-BtQMDA-1.js → dialog.stories-BxYc78Eo.js} +3 -3
  69. package/dist-storybook/assets/{chip-zY6gJxDk.js → dropdown-BeoO7m-R.js} +2 -2
  70. package/dist-storybook/assets/{dropdown.stories-DF69os0J.js → dropdown.stories-Bfhg63tZ.js} +3 -3
  71. package/dist-storybook/assets/{embla-carousel-react.esm-CCQjHA-d.js → embla-carousel-react.esm-Pp2OIUrN.js} +1 -1
  72. package/dist-storybook/assets/icon-CgGksgRS.js +1 -0
  73. package/dist-storybook/assets/{icon.stories-Ch36FMIn.js → icon.stories-qg8UAHBM.js} +3 -3
  74. package/dist-storybook/assets/iframe-BKfReaAn.css +1 -0
  75. package/dist-storybook/assets/{iframe-CLEfhyJc.js → iframe-C0PGuV5s.js} +42 -42
  76. package/dist-storybook/assets/image-BdsCB1je.js +9 -0
  77. package/dist-storybook/assets/{image.stories-CJPB43ys.js → image.stories-sQtCaoL2.js} +3 -3
  78. package/dist-storybook/assets/{index-CaMbLGUB.js → index-1AHvPexM.js} +1 -1
  79. package/dist-storybook/assets/index-BLzgbpm2.js +1 -0
  80. package/dist-storybook/assets/{index-DRIh_SUo.js → index-DWjPAWoJ.js} +1 -1
  81. package/dist-storybook/assets/{index-7xlKHfV2.js → index-SzFZQQjs.js} +1 -1
  82. package/dist-storybook/assets/input-wrapper-DkEl0Eih.js +1 -0
  83. package/dist-storybook/assets/{label-fI1oWVKU.js → label-CHVpMhb5.js} +1 -1
  84. package/dist-storybook/assets/{label.stories-C3xDUHd-.js → label.stories-CCtGPDrS.js} +3 -3
  85. package/dist-storybook/assets/{navigation-bar-CiGSH7u8.js → navigation-bar-TpF0DSXB.js} +2 -2
  86. package/dist-storybook/assets/{navigation-bar.stories-BvGp7uJf.js → navigation-bar.stories-CNXAxMYL.js} +3 -3
  87. package/dist-storybook/assets/number-field-CvCF5adO.js +1 -0
  88. package/dist-storybook/assets/{number-field.stories-B_Bj8RqE.js → number-field.stories-Dsb_eChm.js} +3 -3
  89. package/dist-storybook/assets/omit-D04qL5V_.js +1 -0
  90. package/dist-storybook/assets/option-item-Bmby544G.js +1 -0
  91. package/dist-storybook/assets/{option-item.stories-BjtolfPz.js → option-item.stories-ClUj8qVT.js} +3 -3
  92. package/dist-storybook/assets/pagination-MBP1YLhT.js +1 -0
  93. package/dist-storybook/assets/{pagination.stories-CrGsYeRw.js → pagination.stories-C9j6mE5z.js} +4 -4
  94. package/dist-storybook/assets/proxy-edvPwIiD.js +1 -0
  95. package/dist-storybook/assets/radio-DRPO7cjx.js +1 -0
  96. package/dist-storybook/assets/{radio.stories-BEG-zTwI.js → radio.stories-D8_YUTw1.js} +3 -3
  97. package/dist-storybook/assets/rating-CTv8C1tH.js +1 -0
  98. package/dist-storybook/assets/{rating.stories-Dwk8Ov3Q.js → rating.stories-BIftLeu2.js} +3 -3
  99. package/dist-storybook/assets/{react-18-4mLDkQmf.js → react-18-CacBUmwb.js} +1 -1
  100. package/dist-storybook/assets/{react-mAVd1wAc.js → react-zqqxT5R_.js} +1 -1
  101. package/dist-storybook/assets/search-field-CophTGGH.js +1 -0
  102. package/dist-storybook/assets/{search-field.stories-BnsT36yY.js → search-field.stories-D1okdN8e.js} +3 -3
  103. package/dist-storybook/assets/section-content-dVOJuOaN.js +1 -0
  104. package/dist-storybook/assets/{section.stories-B5IhLkbG.js → section.stories-Cq5CY978.js} +3 -3
  105. package/dist-storybook/assets/sheet-footer-BL2JAvmb.js +1 -0
  106. package/dist-storybook/assets/{sheet.stories-COzxyiqj.js → sheet.stories-DPcC0I5i.js} +3 -3
  107. package/dist-storybook/assets/skeleton-CmGRbWqE.js +1 -0
  108. package/dist-storybook/assets/{skeleton.stories-B71MlMyi.js → skeleton.stories-CD3J1XrJ.js} +3 -3
  109. package/dist-storybook/assets/{store-D2RudmNr.js → store-BmYgrUro.js} +5 -5
  110. package/dist-storybook/assets/switch-Cc-NvT4X.js +1 -0
  111. package/dist-storybook/assets/{switch.stories-DMBBwZef.js → switch.stories-C5SDbdGL.js} +3 -3
  112. package/dist-storybook/assets/{tab-bar-DZ3oOU50.js → tab-bar-DTyg7tFP.js} +1 -1
  113. package/dist-storybook/assets/{tab-bar.stories-Bp9w6nc3.js → tab-bar.stories-zKrihgXo.js} +3 -3
  114. package/dist-storybook/assets/text-area-WRb8Dkvn.js +1 -0
  115. package/dist-storybook/assets/{text-area.stories-BZ3HXtij.js → text-area.stories-3Z574UAD.js} +3 -3
  116. package/dist-storybook/assets/text-field-DrODy0yz.js +1 -0
  117. package/dist-storybook/assets/{text-field.stories-vSXYvs0U.js → text-field.stories-DzjpcKin.js} +3 -3
  118. package/dist-storybook/assets/toast-provider-ChNGFQlt.js +9 -0
  119. package/dist-storybook/assets/{toast.stories-DQKbk7dO.js → toast.stories-Zj4qfKO_.js} +1 -1
  120. package/dist-storybook/assets/tooltip-CrxOWTXS.js +1 -0
  121. package/dist-storybook/assets/{tooltip.stories-wuthZ3Sv.js → tooltip.stories-DEnYdL1d.js} +3 -3
  122. package/dist-storybook/assets/typography-BcLxefPi.js +1 -0
  123. package/dist-storybook/assets/{typography.stories-DD9HLY16.js → typography.stories-DWxFgTz3.js} +3 -3
  124. package/dist-storybook/assets/{uploader.stories-sModULvT.js → uploader.stories-DQN8yjt-.js} +3 -3
  125. package/dist-storybook/assets/use-app-pause-CyjeIEPG.js +21 -0
  126. package/dist-storybook/assets/use-app-resume-DntO6Rkm.js +21 -0
  127. package/dist-storybook/assets/use-bottom-tab-bar-Da7gjw6y.js +49 -0
  128. package/dist-storybook/assets/use-custom-icon-event-BEYPYrKY.js +26 -0
  129. package/dist-storybook/assets/use-did-hide-Do-KOSzV.js +30 -0
  130. package/dist-storybook/assets/use-did-show-Bv9k7DdG.js +30 -0
  131. package/dist-storybook/assets/use-histories-Ci1HfRe-.js +30 -0
  132. package/dist-storybook/assets/use-history-CkVE1jRy.js +33 -0
  133. package/dist-storybook/assets/use-language-Bg-LzpzQ.js +46 -0
  134. package/dist-storybook/assets/use-load-more-eaC8W6Cc.js +42 -0
  135. package/dist-storybook/assets/use-location-BMrQnhPi.js +39 -0
  136. package/dist-storybook/assets/use-navigate-BwwmhToy.js +36 -0
  137. package/dist-storybook/assets/use-navigation-bar-DzgWeTpM.js +42 -0
  138. package/dist-storybook/assets/use-navigation-type-DNvXTqYH.js +27 -0
  139. package/dist-storybook/assets/use-page-layout-BA2HvjAQ.js +37 -0
  140. package/dist-storybook/assets/use-page-scroll-D_gjlV-S.js +42 -0
  141. package/dist-storybook/assets/use-pull-to-refresh-SZfswIA6.js +38 -0
  142. package/dist-storybook/assets/use-settings-changed-D2gdx5rD.js +30 -0
  143. package/dist-storybook/assets/use-translate-BTC2AQ0k.js +59 -0
  144. package/dist-storybook/assets/{visibility-sensor-huP-8j4n.js → visibility-sensor-FN9n9CLs.js} +1 -1
  145. package/dist-storybook/iframe.html +2 -2
  146. package/dist-storybook/index.json +1 -1
  147. package/dist-storybook/project.json +1 -1
  148. package/dist-storybook/sb-addons/a11y-2/manager-bundle.js +2 -2
  149. package/dist-storybook/sb-addons/docs-1/manager-bundle.js +2 -2
  150. package/dist-storybook/sb-addons/storybook-build-3/manager-bundle.js +1 -1
  151. package/dist-storybook/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +4 -4
  152. package/dist-storybook/stories-data.json +152 -122
  153. package/package.json +3 -1
  154. package/dist/components/app/components/app.d.ts +0 -13
  155. package/dist/components/app/components/link.d.ts +0 -8
  156. package/dist/components/app/components/navigation-analytic.d.ts +0 -2
  157. package/dist/components/app/components/pages-render.d.ts +0 -2
  158. package/dist/components/app/context/location-key.d.ts +0 -4
  159. package/dist/components/app/hooks/use-app-pause.d.ts +0 -1
  160. package/dist/components/app/hooks/use-app-resume.d.ts +0 -1
  161. package/dist/components/app/hooks/use-app-state.d.ts +0 -7
  162. package/dist/components/app/hooks/use-bottom-tab-bar.d.ts +0 -13
  163. package/dist/components/app/hooks/use-did-hide.d.ts +0 -1
  164. package/dist/components/app/hooks/use-did-show.d.ts +0 -1
  165. package/dist/components/app/hooks/use-history.d.ts +0 -2
  166. package/dist/components/app/hooks/use-location.d.ts +0 -1
  167. package/dist/components/app/hooks/use-navigate.d.ts +0 -1
  168. package/dist/components/app/hooks/use-navigation-bar.d.ts +0 -12
  169. package/dist/components/app/hooks/use-navigation-type.d.ts +0 -1
  170. package/dist/components/app/hooks/use-page-config.d.ts +0 -1
  171. package/dist/components/app/hooks/use-page-layout.d.ts +0 -14
  172. package/dist/components/app/hooks/use-page-scroll.d.ts +0 -5
  173. package/dist/components/app/hooks/use-page-state.d.ts +0 -6
  174. package/dist/components/app/stores/app.d.ts +0 -24
  175. package/dist/components/app/stores/app.selector.d.ts +0 -11
  176. package/dist/components/app/types/app.d.ts +0 -65
  177. package/dist/components/app/types/navigation.d.ts +0 -30
  178. package/dist/components/app/utils/animation.d.ts +0 -2
  179. package/dist/components/app/utils/data-theme.d.ts +0 -4
  180. package/dist/components/app/utils/history.d.ts +0 -7
  181. package/dist/hooks/use-analytic.d.ts +0 -1
  182. package/dist/hooks/use-is-using-app.d.ts +0 -1
  183. package/dist/hooks/use-is-using-locales.d.ts +0 -1
  184. package/dist/locales/defaultResources/en.d.ts +0 -27
  185. package/dist/locales/defaultResources/vi.d.ts +0 -27
  186. package/dist/locales/fns.d.ts +0 -6
  187. package/dist/locales/hooks.d.ts +0 -9
  188. package/dist/locales/index.d.ts +0 -4
  189. package/dist/locales/provider.d.ts +0 -6
  190. package/dist/locales/store.d.ts +0 -13
  191. package/dist/locales/types.d.ts +0 -37
  192. package/dist/locales/utils.d.ts +0 -2
  193. package/dist-storybook/assets/ANIMATION-DLCDVwPI.js +0 -99
  194. package/dist-storybook/assets/APP_FRAMEWORK-B9Mrudgl.js +0 -197
  195. package/dist-storybook/assets/BOTTOM_TAB_BAR-Bgfy-nnv.js +0 -175
  196. package/dist-storybook/assets/CUSTOM_ERROR_BOUNDARY-G_i_6aho.js +0 -250
  197. package/dist-storybook/assets/GETTING_STARTED-Bf6ENjZo.js +0 -77
  198. package/dist-storybook/assets/KEEP_ALIVE-CicDtVw6.js +0 -126
  199. package/dist-storybook/assets/LOCALE-D_43J3RD.js +0 -465
  200. package/dist-storybook/assets/MOBILE_BEHAVIOURS-D5jOxNiz.js +0 -177
  201. package/dist-storybook/assets/PAGE_LAYOUT-C0sW9iZo.js +0 -192
  202. package/dist-storybook/assets/ROUTING_NAVIGATION-Bpj_mu5r.js +0 -335
  203. package/dist-storybook/assets/THEME_MODE-Sc8cgznR.js +0 -111
  204. package/dist-storybook/assets/_setToString-CjYxL0rS.js +0 -1
  205. package/dist-storybook/assets/alert-abKmNYys.js +0 -1
  206. package/dist-storybook/assets/avatar-B-jvPnzm.js +0 -1
  207. package/dist-storybook/assets/badge-Cc9u7jBX.js +0 -1
  208. package/dist-storybook/assets/button-GtWXUngt.js +0 -1
  209. package/dist-storybook/assets/calendar-CJ5_NxYx.js +0 -1
  210. package/dist-storybook/assets/carousel-sbzGq2WF.js +0 -37
  211. package/dist-storybook/assets/checkbox-CMpJJxvm.js +0 -1
  212. package/dist-storybook/assets/classname-DoNrELT0.js +0 -1
  213. package/dist-storybook/assets/date-field.stories-CerGwXZy.js +0 -129
  214. package/dist-storybook/assets/date-picker-BCIW_1-h.js +0 -1
  215. package/dist-storybook/assets/icon-TJ3FHxUI.js +0 -1
  216. package/dist-storybook/assets/iframe-yMKl6hJA.css +0 -1
  217. package/dist-storybook/assets/image-D6Yo4ht9.js +0 -9
  218. package/dist-storybook/assets/input-wrapper-D_9hAdHZ.js +0 -1
  219. package/dist-storybook/assets/number-field-DNj4myBV.js +0 -1
  220. package/dist-storybook/assets/omit-CStFhbPt.js +0 -1
  221. package/dist-storybook/assets/option-item-BloohEvW.js +0 -1
  222. package/dist-storybook/assets/pagination-Dcazh6R_.js +0 -1
  223. package/dist-storybook/assets/pick-DbIUGM9R.js +0 -1
  224. package/dist-storybook/assets/radio-t2E8E0Oc.js +0 -1
  225. package/dist-storybook/assets/rating-DsULci27.js +0 -1
  226. package/dist-storybook/assets/search-field-CuiHMy7j.js +0 -1
  227. package/dist-storybook/assets/section-content-pkGNuEs6.js +0 -1
  228. package/dist-storybook/assets/skeleton-Dn8rwbgX.js +0 -1
  229. package/dist-storybook/assets/store-DxAqU1JB.js +0 -1
  230. package/dist-storybook/assets/switch-BziC1t_8.js +0 -1
  231. package/dist-storybook/assets/text-area-CAmJ2yms.js +0 -1
  232. package/dist-storybook/assets/text-field-CjrgfYOZ.js +0 -1
  233. package/dist-storybook/assets/toast-provider-B9k1NBG6.js +0 -9
  234. package/dist-storybook/assets/tooltip-VnA8Hy0S.js +0 -1
  235. package/dist-storybook/assets/typography-DoV67nnS.js +0 -1
  236. package/dist-storybook/assets/use-app-pause-BQYQ2_kc.js +0 -29
  237. package/dist-storybook/assets/use-app-resume-BHDCAORn.js +0 -29
  238. package/dist-storybook/assets/use-custom-icon-event-BCGSFwaE.js +0 -29
  239. package/dist-storybook/assets/use-did-hide-Cosc0Bts.js +0 -48
  240. package/dist-storybook/assets/use-did-show-CTWe5NYk.js +0 -49
  241. package/dist-storybook/assets/use-histories-CAcE6nVz.js +0 -50
  242. package/dist-storybook/assets/use-history-FuEbPpap.js +0 -67
  243. package/dist-storybook/assets/use-location-CdUC1tic.js +0 -56
  244. package/dist-storybook/assets/use-navigate-DP9paY1K.js +0 -84
  245. package/dist-storybook/assets/use-navigation-type-BWVxMUtZ.js +0 -44
  246. package/dist-storybook/assets/use-page-config-5u8OF-8L.js +0 -48
  247. package/dist-storybook/assets/use-page-scroll-nPQcBn5B.js +0 -69
  248. package/dist-storybook/assets/use-page-state-CULl52gw.js +0 -79
  249. package/dist-storybook/assets/use-settings-changed-2GP5ZsJS.js +0 -29
  250. /package/dist/components/app/{components/bottom-tab-bar.d.ts → bottom-tab-bar-layout/index.d.ts} +0 -0
  251. /package/dist/components/app/{components/navigation-bar.d.ts → navigation-bar-layout/index.d.ts} +0 -0
  252. /package/dist/components/app/{components/page-layout.d.ts → page-layout/index.d.ts} +0 -0
  253. /package/dist/{components/app/hooks → hooks}/use-custom-icon-event.d.ts +0 -0
  254. /package/dist/{components/app/hooks → hooks}/use-settings-changed.d.ts +0 -0
@@ -1,335 +0,0 @@
1
- import{j as n}from"./iframe-CLEfhyJc.js";import{useMDXComponents as c}from"./index-7xlKHfV2.js";import{b as r,M as o}from"./blocks-CpOj9FQ_.js";import"./preload-helper-PPVm8Dsz.js";import"./index-CaMbLGUB.js";function s(i){const e={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...c(),...i.components};return n.jsxs(n.Fragment,{children:[`
2
- `,`
3
- `,n.jsx(r,{title:"App Framework/Routing & Navigation"}),`
4
- `,n.jsx(e.h1,{id:"routing--navigation",children:"Routing & Navigation"}),`
5
- `,n.jsxs(e.p,{children:["Hệ thống routing và navigation của ",n.jsx(e.code,{children:"App"})," framework cung cấp các hooks và utilities để quản lý navigation, truy cập thông tin page, và xử lý các lifecycle events."]}),`
6
- `,n.jsx(e.h2,{id:"routing",children:"Routing"}),`
7
- `,n.jsxs(e.p,{children:["Hệ thống routing sử dụng ",n.jsx(e.strong,{children:"exact path matching"})," - mỗi page được định nghĩa với một ",n.jsx(e.code,{children:"pathname"})," cụ thể và chỉ match khi pathname khớp chính xác."]}),`
8
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Lưu ý:"})}),`
9
- `,n.jsxs(e.ul,{children:[`
10
- `,n.jsxs(e.li,{children:["Không hỗ trợ dynamic pathname như ",n.jsx(e.code,{children:"/:id"})," hoặc nested routes"]}),`
11
- `,n.jsxs(e.li,{children:["Hỗ trợ query parameters thông qua ",n.jsx(e.code,{children:"params"})," trong navigate options"]}),`
12
- `,n.jsx(e.li,{children:"Sử dụng browser history API để quản lý navigation stack"}),`
13
- `]}),`
14
- `,n.jsx(e.h2,{id:"navigation",children:"Navigation"}),`
15
- `,n.jsxs(e.p,{children:["Navigation được thực hiện thông qua function ",n.jsx(e.code,{children:"navigate"})," từ hook ",n.jsx(e.code,{children:"useNavigate()"}),". Có 2 cách navigate:"]}),`
16
- `,n.jsxs(e.ol,{children:[`
17
- `,n.jsxs(e.li,{children:[n.jsx(e.strong,{children:"Navigate bằng pathname"}),": ",n.jsx(e.code,{children:"navigate('/pathname', options)"})]}),`
18
- `,n.jsxs(e.li,{children:[n.jsx(e.strong,{children:"Navigate bằng delta"}),": ",n.jsx(e.code,{children:"navigate(delta)"})," - điều hướng trong history stack (back/forward)"]}),`
19
- `]}),`
20
- `,n.jsx(e.h2,{id:"hooks",children:"Hooks"}),`
21
- `,n.jsx(e.h3,{id:"usenavigate",children:"useNavigate"}),`
22
- `,n.jsxs(e.p,{children:["Hook để lấy function ",n.jsx(e.code,{children:"navigate"})," để điều hướng giữa các pages."]}),`
23
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Import:"})}),`
24
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-typescript",children:`import { useNavigate } from '@v-miniapp/ui-react'
25
- `})}),`
26
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Returns:"})}),`
27
- `,n.jsxs(e.ul,{children:[`
28
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"navigate"}),": Function để điều hướng với type ",n.jsx(e.code,{children:"INavigate"}),":",`
29
- `,n.jsxs(e.ul,{children:[`
30
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"navigate(pathname: string, options?: INavigatePathnameOptions): void"})," - Navigate bằng pathname"]}),`
31
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"navigate(delta: number, options?: INavigateDeltaOptions): void"})," - Navigate bằng delta (back/forward)"]}),`
32
- `]}),`
33
- `]}),`
34
- `]}),`
35
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Cách sử dụng:"})}),`
36
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-tsx",children:`import { useNavigate } from '@v-miniapp/ui-react'
37
-
38
- const MyPage = () => {
39
- const navigate = useNavigate()
40
-
41
- const handleClick = () => {
42
- // Navigate đến page khác
43
- navigate('/settings', {
44
- params: { id: '123' },
45
- state: { from: 'home' },
46
- replace: false, // true để replace thay vì push
47
- })
48
- }
49
-
50
- const handleBack = () => {
51
- // Navigate back
52
- navigate(-1)
53
- }
54
-
55
- return <button onClick={handleClick}>Go to Settings</button>
56
- }
57
- `})}),`
58
- `,n.jsxs(e.p,{children:[n.jsx(e.strong,{children:"Xem chi tiết:"})," ",n.jsx(e.a,{href:"?path=/docs/hooks-usenavigate--docs",children:"useNavigate Hook"})]}),`
59
- `,n.jsx(e.hr,{}),`
60
- `,n.jsx(e.h3,{id:"usehistory",children:"useHistory"}),`
61
- `,n.jsx(e.p,{children:"Hook để lấy history entry hiện tại của page."}),`
62
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Import:"})}),`
63
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-typescript",children:`import { useHistory } from '@v-miniapp/ui-react'
64
- `})}),`
65
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Returns:"})}),`
66
- `,n.jsxs(e.ul,{children:[`
67
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"history"}),": ",n.jsx(e.code,{children:"IHistory"})," object chứa:",`
68
- `,n.jsxs(e.ul,{children:[`
69
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"action"}),": ",n.jsx(e.code,{children:"'PUSH' | 'REPLACE' | 'POP'"})]}),`
70
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"location"}),": ",n.jsx(e.code,{children:"ILocation"})," object chứa ",n.jsx(e.code,{children:"key"}),", ",n.jsx(e.code,{children:"pathname"}),", ",n.jsx(e.code,{children:"params?"}),", ",n.jsx(e.code,{children:"state?"})]}),`
71
- `]}),`
72
- `]}),`
73
- `]}),`
74
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Cách sử dụng:"})}),`
75
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-tsx",children:`import { useHistory } from '@v-miniapp/ui-react'
76
-
77
- const MyPage = () => {
78
- const history = useHistory()
79
-
80
- console.log(history.location.pathname) // '/home'
81
- console.log(history.location.params) // { id: '123' }
82
- console.log(history.action) // 'PUSH' | 'REPLACE' | 'POP'
83
-
84
- return <div>Current path: {history.location.pathname}</div>
85
- }
86
- `})}),`
87
- `,n.jsxs(e.p,{children:[n.jsx(e.strong,{children:"Xem chi tiết:"})," ",n.jsx(e.a,{href:"?path=/docs/hooks-usehistory--docs",children:"useHistory Hook"})]}),`
88
- `,n.jsx(e.hr,{}),`
89
- `,n.jsx(e.h3,{id:"usehistories",children:"useHistories"}),`
90
- `,n.jsx(e.p,{children:"Hook để lấy toàn bộ history stack."}),`
91
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Import:"})}),`
92
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-typescript",children:`import { useHistories } from '@v-miniapp/ui-react'
93
- `})}),`
94
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Returns:"})}),`
95
- `,n.jsxs(e.ul,{children:[`
96
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"histories"}),": ",n.jsx(e.code,{children:"IHistory[]"})," - Mảng các history entries"]}),`
97
- `]}),`
98
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Cách sử dụng:"})}),`
99
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-tsx",children:`import { useHistories } from '@v-miniapp/ui-react'
100
-
101
- const MyPage = () => {
102
- const histories = useHistories()
103
-
104
- console.log(histories.length) // Số lượng pages trong stack
105
-
106
- return <div>History stack length: {histories.length}</div>
107
- }
108
- `})}),`
109
- `,n.jsxs(e.p,{children:[n.jsx(e.strong,{children:"Xem chi tiết:"})," ",n.jsx(e.a,{href:"?path=/docs/hooks-usehistories--docs",children:"useHistories Hook"})]}),`
110
- `,n.jsx(e.hr,{}),`
111
- `,n.jsx(e.h3,{id:"uselocation",children:"useLocation"}),`
112
- `,n.jsx(e.p,{children:"Hook để lấy location object hiện tại (pathname, params, state, key)."}),`
113
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Import:"})}),`
114
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-typescript",children:`import { useLocation } from '@v-miniapp/ui-react'
115
- `})}),`
116
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Returns:"})}),`
117
- `,n.jsxs(e.ul,{children:[`
118
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"location"}),": ",n.jsx(e.code,{children:"ILocation"})," object hoặc ",n.jsx(e.code,{children:"undefined"})," chứa:",`
119
- `,n.jsxs(e.ul,{children:[`
120
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"key"}),": ",n.jsx(e.code,{children:"string"})]}),`
121
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"pathname"}),": ",n.jsx(e.code,{children:"string"})]}),`
122
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"params?"}),": ",n.jsx(e.code,{children:"Record<string, string>"})]}),`
123
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"state?"}),": ",n.jsx(e.code,{children:"any"})]}),`
124
- `]}),`
125
- `]}),`
126
- `]}),`
127
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Cách sử dụng:"})}),`
128
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-tsx",children:`import { useLocation } from '@v-miniapp/ui-react'
129
-
130
- const MyPage = () => {
131
- const location = useLocation()
132
-
133
- console.log(location.pathname) // '/home'
134
- console.log(location.params) // { id: '123' }
135
- console.log(location.state) // { from: 'home' }
136
- console.log(location.key) // Unique key cho location này
137
-
138
- return <div>Path: {location.pathname}</div>
139
- }
140
- `})}),`
141
- `,n.jsxs(e.p,{children:[n.jsx(e.strong,{children:"Xem chi tiết:"})," ",n.jsx(e.a,{href:"?path=/docs/hooks-uselocation--docs",children:"useLocation Hook"})]}),`
142
- `,n.jsx(e.hr,{}),`
143
- `,n.jsx(e.h3,{id:"usepageconfig",children:"usePageConfig"}),`
144
- `,n.jsx(e.p,{children:"Hook để lấy config của page hiện tại."}),`
145
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Import:"})}),`
146
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-typescript",children:`import { usePageConfig } from '@v-miniapp/ui-react'
147
- `})}),`
148
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Returns:"})}),`
149
- `,n.jsxs(e.ul,{children:[`
150
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"pageConfig"}),": ",n.jsx(e.code,{children:"IPageConfig"})," của page hiện tại hoặc ",n.jsx(e.code,{children:"undefined"})]}),`
151
- `]}),`
152
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Cách sử dụng:"})}),`
153
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-tsx",children:`import { usePageConfig } from '@v-miniapp/ui-react'
154
-
155
- const MyPage = () => {
156
- const pageConfig = usePageConfig()
157
-
158
- if (!pageConfig) return null
159
-
160
- console.log(pageConfig.pathname) // '/home'
161
- console.log(pageConfig.Component) // Component của page
162
- console.log(pageConfig.navigationBar) // Navigation bar config
163
-
164
- return <div>Page: {pageConfig.pathname}</div>
165
- }
166
- `})}),`
167
- `,n.jsxs(e.p,{children:[n.jsx(e.strong,{children:"Xem chi tiết:"})," ",n.jsx(e.a,{href:"?path=/docs/hooks-usepageconfig--docs",children:"usePageConfig Hook"})]}),`
168
- `,n.jsx(e.hr,{}),`
169
- `,n.jsx(e.h3,{id:"usenavigationtype",children:"useNavigationType"}),`
170
- `,n.jsx(e.p,{children:"Hook để lấy navigation action type (PUSH, REPLACE, POP)."}),`
171
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Import:"})}),`
172
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-typescript",children:`import { useNavigationType } from '@v-miniapp/ui-react'
173
- `})}),`
174
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Returns:"})}),`
175
- `,n.jsxs(e.ul,{children:[`
176
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"action"}),": ",n.jsx(e.code,{children:"'PUSH' | 'REPLACE' | 'POP'"})," hoặc ",n.jsx(e.code,{children:"undefined"})]}),`
177
- `]}),`
178
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Cách sử dụng:"})}),`
179
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-tsx",children:`import { useNavigationType } from '@v-miniapp/ui-react'
180
-
181
- const MyPage = () => {
182
- const action = useNavigationType()
183
-
184
- console.log(action) // 'PUSH' | 'REPLACE' | 'POP'
185
-
186
- return <div>Navigation type: {action}</div>
187
- }
188
- `})}),`
189
- `,n.jsxs(e.p,{children:[n.jsx(e.strong,{children:"Xem chi tiết:"})," ",n.jsx(e.a,{href:"?path=/docs/hooks-usenavigationtype--docs",children:"useNavigationType Hook"})]}),`
190
- `,n.jsx(e.hr,{}),`
191
- `,n.jsx(e.h3,{id:"usedidshow",children:"useDidShow"}),`
192
- `,n.jsx(e.p,{children:"Hook để xử lý khi page được hiển thị (show)."}),`
193
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Import:"})}),`
194
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-typescript",children:`import { useDidShow } from '@v-miniapp/ui-react'
195
- `})}),`
196
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Parameters:"})}),`
197
- `,n.jsxs(e.ul,{children:[`
198
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"func?: () => void"}),": Callback function được gọi khi page show"]}),`
199
- `]}),`
200
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Returns:"})}),`
201
- `,n.jsxs(e.ul,{children:[`
202
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"didShow"}),": Boolean cho biết page có đang được hiển thị không"]}),`
203
- `]}),`
204
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Cách sử dụng:"})}),`
205
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-tsx",children:`import { useDidShow } from '@v-miniapp/ui-react'
206
-
207
- const MyPage = () => {
208
- const didShow = useDidShow(() => {
209
- console.log('Page is shown')
210
- // Fetch data, track analytics, etc.
211
- })
212
-
213
- return <div>Page is {didShow ? 'visible' : 'hidden'}</div>
214
- }
215
- `})}),`
216
- `,n.jsxs(e.p,{children:[n.jsx(e.strong,{children:"Xem chi tiết:"})," ",n.jsx(e.a,{href:"?path=/docs/hooks-usedidshow--docs",children:"useDidShow Hook"})]}),`
217
- `,n.jsx(e.hr,{}),`
218
- `,n.jsx(e.h3,{id:"usedidhide",children:"useDidHide"}),`
219
- `,n.jsx(e.p,{children:"Hook để xử lý khi page bị ẩn (hide)."}),`
220
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Import:"})}),`
221
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-typescript",children:`import { useDidHide } from '@v-miniapp/ui-react'
222
- `})}),`
223
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Parameters:"})}),`
224
- `,n.jsxs(e.ul,{children:[`
225
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"func?: () => void"}),": Callback function được gọi khi page hide"]}),`
226
- `]}),`
227
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Returns:"})}),`
228
- `,n.jsxs(e.ul,{children:[`
229
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"didHide"}),": Boolean cho biết page có đang bị ẩn không"]}),`
230
- `]}),`
231
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Cách sử dụng:"})}),`
232
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-tsx",children:`import { useDidHide } from '@v-miniapp/ui-react'
233
-
234
- const MyPage = () => {
235
- const didHide = useDidHide(() => {
236
- console.log('Page is hidden')
237
- // Cleanup, pause timers, etc.
238
- })
239
-
240
- return <div>Page is {didHide ? 'hidden' : 'visible'}</div>
241
- }
242
- `})}),`
243
- `,n.jsxs(e.p,{children:[n.jsx(e.strong,{children:"Xem chi tiết:"})," ",n.jsx(e.a,{href:"?path=/docs/hooks-usedidhide--docs",children:"useDidHide Hook"})]}),`
244
- `,n.jsx(e.hr,{}),`
245
- `,n.jsx(e.h3,{id:"usepagescroll",children:"usePageScroll"}),`
246
- `,n.jsx(e.p,{children:"Hook để lắng nghe sự kiện scroll của page."}),`
247
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Import:"})}),`
248
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-typescript",children:`import { usePageScroll } from '@v-miniapp/ui-react'
249
- `})}),`
250
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Parameters:"})}),`
251
- `,n.jsxs(e.ul,{children:[`
252
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"callback: (target: HTMLDivElement, event: Event) => void"}),": Callback được gọi khi scroll"]}),`
253
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"options?: IUsePageScrollOptions"}),": Options cho throttle"]}),`
254
- `]}),`
255
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Cách sử dụng:"})}),`
256
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-tsx",children:`import { usePageScroll } from '@v-miniapp/ui-react'
257
-
258
- const MyPage = () => {
259
- usePageScroll((target, event) => {
260
- console.log('Scroll position:', target.scrollTop)
261
- // Handle scroll event
262
- }, {
263
- throttle: {
264
- wait: 200, // Throttle 200ms
265
- }
266
- })
267
-
268
- return <div>Scroll me</div>
269
- }
270
- `})}),`
271
- `,n.jsxs(e.p,{children:[n.jsx(e.strong,{children:"Xem chi tiết:"})," ",n.jsx(e.a,{href:"?path=/docs/hooks-usepagescroll--docs",children:"usePageScroll Hook"})]}),`
272
- `,n.jsx(e.hr,{}),`
273
- `,n.jsx(e.h3,{id:"usepagestate",children:"usePageState"}),`
274
- `,n.jsx(e.p,{children:"Hook để quản lý state của page hiện tại."}),`
275
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Import:"})}),`
276
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-typescript",children:`import { usePageState } from '@v-miniapp/ui-react'
277
- `})}),`
278
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Returns:"})}),`
279
- `,n.jsxs(e.ul,{children:[`
280
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"pageState"}),": ",n.jsx(e.code,{children:"IPageState"})," của page hiện tại hoặc ",n.jsx(e.code,{children:"undefined"})]}),`
281
- `,n.jsxs(e.li,{children:[n.jsx(e.code,{children:"setPageState"}),": ",n.jsx(e.code,{children:"Dispatch<SetStateAction<IPageState | undefined>>"})," - Function để update page state"]}),`
282
- `]}),`
283
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Cách sử dụng:"})}),`
284
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-tsx",children:`import { usePageState } from '@v-miniapp/ui-react'
285
-
286
- const MyPage = () => {
287
- const { pageState, setPageState } = usePageState()
288
-
289
- const updateNavigationBar = () => {
290
- setPageState({
291
- navigationBar: {
292
- title: 'New Title',
293
- },
294
- })
295
- }
296
-
297
- return <button onClick={updateNavigationBar}>Update Title</button>
298
- }
299
- `})}),`
300
- `,n.jsxs(e.p,{children:[n.jsx(e.strong,{children:"Xem chi tiết:"})," ",n.jsx(e.a,{href:"?path=/docs/hooks-usepagestate--docs",children:"usePageState Hook"})]}),`
301
- `,n.jsx(e.hr,{}),`
302
- `,n.jsx(e.h2,{id:"navigate-options",children:"Navigate Options"}),`
303
- `,n.jsxs(e.p,{children:["Khi sử dụng ",n.jsx(e.code,{children:"navigate(pathname, options)"}),", bạn có thể truyền các options sau:"]}),`
304
- `,n.jsx(o,{children:"\n| Option | Type | Mô tả |\n| :--- | :--- | :--- |\n| `params` | `Record&lt;string, string&gt;` | Query parameters (sẽ được thêm vào URL) |\n| `state` | `any` | State object (không hiển thị trong URL, lưu trong history) |\n| `replace` | `boolean` | Nếu `true`, replace history entry thay vì push mới |\n| `animation` | `IAppAnimationState` | Override animation cho navigation này |\n| `navigationBar` | `IAppNavigationBarState` | Override navigation bar cho page này |\n| `bottomTabBar` | `IAppBottomTabBarState` | Override bottom tab bar cho page này |\n| `keepAlive` | `boolean | IAppKeepAliveState` | Override keep-alive cho page này |\n| `pageLayout` | `IAppPageLayoutState` | Override page layout cho page này |\n"}),`
305
- `,n.jsxs(e.p,{children:[n.jsx(e.strong,{children:"Lưu ý:"})," ",n.jsx(e.code,{children:"INavigatePathnameOptions"})," extends ",n.jsx(e.code,{children:"IPageState"}),", nên bạn có thể truyền các page-level config trong navigate options để override config cho page mới."]}),`
306
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Ví dụ:"})}),`
307
- `,n.jsx(e.pre,{children:n.jsx(e.code,{className:"language-tsx",children:`const navigate = useNavigate()
308
-
309
- // Navigate với params và state
310
- navigate('/detail', {
311
- params: { id: '123' }, // ?id=123
312
- state: { from: 'home' }, // Không hiển thị trong URL
313
- replace: false, // Push vào history stack
314
- })
315
-
316
- // Navigate back
317
- navigate(-1) // Quay lại 1 page
318
-
319
- // Navigate forward
320
- navigate(1) // Tiến tới 1 page
321
- `})}),`
322
- `,n.jsx(e.hr,{}),`
323
- `,n.jsx(e.h2,{id:"lifecycle-events",children:"Lifecycle Events"}),`
324
- `,n.jsx(e.p,{children:"Khi navigate giữa các pages, các lifecycle events được trigger:"}),`
325
- `,n.jsxs(e.ol,{children:[`
326
- `,n.jsxs(e.li,{children:[n.jsx(e.strong,{children:"beforeLocationChangeP1"}),": Trigger trước khi location thay đổi (phase 1)"]}),`
327
- `,n.jsxs(e.li,{children:[n.jsx(e.strong,{children:"beforeLocationChangeP2"}),": Trigger trước khi location thay đổi (phase 2)"]}),`
328
- `,n.jsxs(e.li,{children:[n.jsx(e.strong,{children:"useDidShow"}),": Trigger khi page được hiển thị"]}),`
329
- `,n.jsxs(e.li,{children:[n.jsx(e.strong,{children:"useDidHide"}),": Trigger khi page bị ẩn"]}),`
330
- `]}),`
331
- `,n.jsx(e.p,{children:n.jsx(e.strong,{children:"Thứ tự:"})}),`
332
- `,n.jsxs(e.ul,{children:[`
333
- `,n.jsxs(e.li,{children:["Page A hide → ",n.jsx(e.code,{children:"useDidHide"})," của Page A"]}),`
334
- `,n.jsxs(e.li,{children:["Page B show → ",n.jsx(e.code,{children:"useDidShow"})," của Page B"]}),`
335
- `]})]})}function g(i={}){const{wrapper:e}={...c(),...i.components};return e?n.jsx(e,{...i,children:n.jsx(s,{...i})}):s(i)}export{g as default};
@@ -1,111 +0,0 @@
1
- import{j as e}from"./iframe-CLEfhyJc.js";import{useMDXComponents as d}from"./index-7xlKHfV2.js";import{b as c,M as i}from"./blocks-CpOj9FQ_.js";import"./preload-helper-PPVm8Dsz.js";import"./index-CaMbLGUB.js";function h(t){const n={code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...d(),...t.components};return e.jsxs(e.Fragment,{children:[`
2
- `,`
3
- `,e.jsx(c,{title:"App Framework/Theme Mode"}),`
4
- `,e.jsx(n.h1,{id:"theme-mode",children:"Theme Mode"}),`
5
- `,e.jsx(n.p,{children:"Theme config cho phép bạn cấu hình theme mặc định cho ứng dụng, hỗ trợ light mode, dark mode và system preference."}),`
6
- `,e.jsx(n.h2,{id:"cấu-trúc",children:"Cấu trúc"}),`
7
- `,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-typescript",children:`type IThemeConfig = {
8
- defaultMode?: 'dark' | 'light' | 'system'
9
- }
10
- `})}),`
11
- `,e.jsx(n.h2,{id:"thuộc-tính",children:"Thuộc tính"}),`
12
- `,e.jsx(i,{children:"\n| Thuộc tính | Kiểu dữ liệu | Mặc định | Mô tả |\n| :--- | :--- | :--- | :--- |\n| `defaultMode` | `'dark' \\| 'light' \\| 'system'` | `'light'` | Thiết lập theme mặc định khi khởi động ứng dụng |\n"}),`
13
- `,e.jsx(n.h2,{id:"các-chế-độ-theme",children:"Các chế độ theme"}),`
14
- `,e.jsxs(n.ul,{children:[`
15
- `,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"'light'"})}),": Áp dụng light mode (theme sáng)"]}),`
16
- `,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"'dark'"})}),": Áp dụng dark mode (theme tối)"]}),`
17
- `,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"'system'"})}),": Tự động theo cài đặt hệ thống của người dùng (sử dụng ",e.jsx(n.code,{children:"prefers-color-scheme"}),")"]}),`
18
- `]}),`
19
- `,e.jsx(n.h2,{id:"cách-hoạt-động",children:"Cách hoạt động"}),`
20
- `,e.jsxs(n.p,{children:["Khi ứng dụng khởi động, theme sẽ được thiết lập dựa trên giá trị ",e.jsx(n.code,{children:"defaultMode"}),":"]}),`
21
- `,e.jsxs(n.ul,{children:[`
22
- `,e.jsxs(n.li,{children:[e.jsx(n.code,{children:"'light'"}),": Xóa ",e.jsx(n.code,{children:"data-theme"})," attribute trên ",e.jsx(n.code,{children:"document.documentElement"})," (mặc định là light)"]}),`
23
- `,e.jsxs(n.li,{children:[e.jsx(n.code,{children:"'dark'"}),": Set ",e.jsx(n.code,{children:'data-theme="dark"'})," trên ",e.jsx(n.code,{children:"document.documentElement"})]}),`
24
- `,e.jsxs(n.li,{children:[e.jsx(n.code,{children:"'system'"}),": Tự động detect và áp dụng theme theo system preference (",e.jsx(n.code,{children:"prefers-color-scheme"}),")"]}),`
25
- `]}),`
26
- `,e.jsx(n.h2,{id:"cấu-hình",children:"Cấu hình"}),`
27
- `,e.jsx(n.h3,{id:"app-level-config",children:"App-level Config"}),`
28
- `,e.jsx(n.p,{children:"Cấu hình theme mặc định:"}),`
29
- `,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-tsx",children:`const appConfig: IAppConfig = {
30
- theme: {
31
- defaultMode: 'dark', // 'light' | 'dark' | 'system'
32
- },
33
- pages: [
34
- // Tất cả pages sẽ sử dụng theme đã cấu hình
35
- ],
36
- }
37
- `})}),`
38
- `,e.jsx(n.h3,{id:"ví-dụ",children:"Ví dụ"}),`
39
- `,e.jsx(n.h4,{id:"sử-dụng-theme-mode-tối-mặc-định",children:"Sử dụng theme mode tối mặc định"}),`
40
- `,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-tsx",children:`const appConfig: IAppConfig = {
41
- theme: {
42
- defaultMode: 'dark',
43
- },
44
- pages: [
45
- {
46
- pathname: '/home',
47
- Component: HomePage,
48
- },
49
- {
50
- pathname: '/settings',
51
- Component: SettingsPage,
52
- },
53
- ],
54
- }
55
- `})}),`
56
- `,e.jsx(n.h4,{id:"sử-dụng-light-mode-mặc-định",children:"Sử dụng light mode mặc định"}),`
57
- `,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-tsx",children:`const appConfig: IAppConfig = {
58
- theme: {
59
- defaultMode: 'light', // hoặc không cần khai báo (mặc định là light)
60
- },
61
- pages: [
62
- {
63
- pathname: '/home',
64
- Component: HomePage,
65
- },
66
- ],
67
- }
68
- `})}),`
69
- `,e.jsx(n.h4,{id:"theo-cài-đặt-hệ-thống",children:"Theo cài đặt hệ thống"}),`
70
- `,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-tsx",children:`const appConfig: IAppConfig = {
71
- theme: {
72
- defaultMode: 'system', // Tự động theo system preference
73
- },
74
- pages: [
75
- {
76
- pathname: '/home',
77
- Component: HomePage,
78
- },
79
- ],
80
- }
81
- `})}),`
82
- `,e.jsx(n.h2,{id:"thay-đổi-theme-động",children:"Thay đổi theme động"}),`
83
- `,e.jsx(n.p,{children:"Bạn có thể thay đổi theme động bằng cách sử dụng các utility functions:"}),`
84
- `,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-tsx",children:`import { setDataTheme, toggleDataTheme, getDataTheme } from '@v-miniapp/ui-react'
85
-
86
- // Set theme cụ thể
87
- setDataTheme('dark') // Chuyển sang theme tối
88
- setDataTheme('light') // Chuyển sang theme sáng
89
-
90
- // Toggle theme
91
- toggleDataTheme() // Chuyển đổi giữa theme sáng và tối
92
-
93
- // Lấy theme hiện tại
94
- const currentTheme = getDataTheme() // 'dark' | 'light'
95
- `})}),`
96
- `,e.jsxs(n.p,{children:["Hoặc thay đổi trực tiếp ",e.jsx(n.code,{children:"data-theme"})," attribute:"]}),`
97
- `,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-tsx",children:`// Set theme tối
98
- document.documentElement.setAttribute('data-theme', 'dark')
99
-
100
- // Set theme sáng
101
- document.documentElement.removeAttribute('data-theme')
102
- // hoặc
103
- document.documentElement.setAttribute('data-theme', 'light')
104
- `})}),`
105
- `,e.jsx(n.h2,{id:"lưu-ý",children:"Lưu ý"}),`
106
- `,e.jsxs(n.ul,{children:[`
107
- `,e.jsxs(n.li,{children:["Theme config chỉ có ở ",e.jsx(n.strong,{children:"app-level"}),", không có ở page-level"]}),`
108
- `,e.jsx(n.li,{children:"Theme được áp dụng ngay khi ứng dụng khởi động"}),`
109
- `,e.jsxs(n.li,{children:["Theme sử dụng CSS variables và ",e.jsx(n.code,{children:"data-theme"})," attribute để thay đổi giao diện"]}),`
110
- `,e.jsxs(n.li,{children:["Khi ",e.jsx(n.code,{children:"defaultMode: 'system'"}),", ứng dụng sẽ tự động cập nhật khi người dùng thay đổi system preference"]}),`
111
- `]})]})}function a(t={}){const{wrapper:n}={...d(),...t.components};return n?e.jsx(n,{...t,children:e.jsx(h,{...t})}):h(t)}export{a as default};
@@ -1 +0,0 @@
1
- import{c as j}from"./iframe-CLEfhyJc.js";var D,se;function R(){if(se)return D;se=1;function r(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}return D=r,D}var G,oe;function Ht(){if(oe)return G;oe=1;var r=typeof j=="object"&&j&&j.Object===Object&&j;return G=r,G}var L,ce;function d(){if(ce)return L;ce=1;var r=Ht(),e=typeof self=="object"&&self&&self.Object===Object&&self,t=r||e||Function("return this")();return L=t,L}var M,fe;function kt(){if(fe)return M;fe=1;var r=d(),e=r.Symbol;return M=e,M}var H,ve;function ta(){if(ve)return H;ve=1;var r=kt(),e=Object.prototype,t=e.hasOwnProperty,a=e.toString,n=r?r.toStringTag:void 0;function i(u){var s=t.call(u,n),o=u[n];try{u[n]=void 0;var c=!0}catch{}var v=a.call(u);return c&&(s?u[n]=o:delete u[n]),v}return H=i,H}var k,he;function aa(){if(he)return k;he=1;var r=Object.prototype,e=r.toString;function t(a){return e.call(a)}return k=t,k}var E,_e;function O(){if(_e)return E;_e=1;var r=kt(),e=ta(),t=aa(),a="[object Null]",n="[object Undefined]",i=r?r.toStringTag:void 0;function u(s){return s==null?s===void 0?n:a:i&&i in Object(s)?e(s):t(s)}return E=u,E}var U,le;function A(){if(le)return U;le=1;function r(e){return e!=null&&typeof e=="object"}return U=r,U}var F,pe;function na(){if(pe)return F;pe=1;function r(e,t){return function(a){return e(t(a))}}return F=r,F}var N,de;function Et(){if(de)return N;de=1;var r=na(),e=r(Object.getPrototypeOf,Object);return N=e,N}var K,ye;function nn(){if(ye)return K;ye=1;var r=O(),e=Et(),t=A(),a="[object Object]",n=Function.prototype,i=Object.prototype,u=n.toString,s=i.hasOwnProperty,o=u.call(Object);function c(v){if(!t(v)||r(v)!=a)return!1;var h=e(v);if(h===null)return!0;var _=s.call(h,"constructor")&&h.constructor;return typeof _=="function"&&_ instanceof _&&u.call(_)==o}return K=c,K}var B,be;function ia(){if(be)return B;be=1;function r(){this.__data__=[],this.size=0}return B=r,B}var z,ge;function Ut(){if(ge)return z;ge=1;function r(e,t){return e===t||e!==e&&t!==t}return z=r,z}var V,qe;function S(){if(qe)return V;qe=1;var r=Ut();function e(t,a){for(var n=t.length;n--;)if(r(t[n][0],a))return n;return-1}return V=e,V}var J,Ce;function ua(){if(Ce)return J;Ce=1;var r=S(),e=Array.prototype,t=e.splice;function a(n){var i=this.__data__,u=r(i,n);if(u<0)return!1;var s=i.length-1;return u==s?i.pop():t.call(i,u,1),--this.size,!0}return J=a,J}var X,Te;function sa(){if(Te)return X;Te=1;var r=S();function e(t){var a=this.__data__,n=r(a,t);return n<0?void 0:a[n][1]}return X=e,X}var W,je;function oa(){if(je)return W;je=1;var r=S();function e(t){return r(this.__data__,t)>-1}return W=e,W}var Y,Re;function ca(){if(Re)return Y;Re=1;var r=S();function e(t,a){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,a])):n[i][1]=a,this}return Y=e,Y}var Z,Oe;function I(){if(Oe)return Z;Oe=1;var r=ia(),e=ua(),t=sa(),a=oa(),n=ca();function i(u){var s=-1,o=u==null?0:u.length;for(this.clear();++s<o;){var c=u[s];this.set(c[0],c[1])}}return i.prototype.clear=r,i.prototype.delete=e,i.prototype.get=t,i.prototype.has=a,i.prototype.set=n,Z=i,Z}var $,Ae;function fa(){if(Ae)return $;Ae=1;var r=I();function e(){this.__data__=new r,this.size=0}return $=e,$}var Q,Se;function va(){if(Se)return Q;Se=1;function r(e){var t=this.__data__,a=t.delete(e);return this.size=t.size,a}return Q=r,Q}var rr,Ie;function ha(){if(Ie)return rr;Ie=1;function r(e){return this.__data__.get(e)}return rr=r,rr}var er,me;function _a(){if(me)return er;me=1;function r(e){return this.__data__.has(e)}return er=r,er}var tr,Pe;function Ft(){if(Pe)return tr;Pe=1;var r=O(),e=R(),t="[object AsyncFunction]",a="[object Function]",n="[object GeneratorFunction]",i="[object Proxy]";function u(s){if(!e(s))return!1;var o=r(s);return o==a||o==n||o==t||o==i}return tr=u,tr}var ar,xe;function la(){if(xe)return ar;xe=1;var r=d(),e=r["__core-js_shared__"];return ar=e,ar}var nr,we;function pa(){if(we)return nr;we=1;var r=la(),e=(function(){var a=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""})();function t(a){return!!e&&e in a}return nr=t,nr}var ir,De;function da(){if(De)return ir;De=1;var r=Function.prototype,e=r.toString;function t(a){if(a!=null){try{return e.call(a)}catch{}try{return a+""}catch{}}return""}return ir=t,ir}var ur,Ge;function ya(){if(Ge)return ur;Ge=1;var r=Ft(),e=pa(),t=R(),a=da(),n=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,o=u.toString,c=s.hasOwnProperty,v=RegExp("^"+o.call(c).replace(n,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(_){if(!t(_)||e(_))return!1;var p=r(_)?v:i;return p.test(a(_))}return ur=h,ur}var sr,Le;function ba(){if(Le)return sr;Le=1;function r(e,t){return e?.[t]}return sr=r,sr}var or,Me;function ue(){if(Me)return or;Me=1;var r=ya(),e=ba();function t(a,n){var i=e(a,n);return r(i)?i:void 0}return or=t,or}var cr,He;function Nt(){if(He)return cr;He=1;var r=ue(),e=d(),t=r(e,"Map");return cr=t,cr}var fr,ke;function m(){if(ke)return fr;ke=1;var r=ue(),e=r(Object,"create");return fr=e,fr}var vr,Ee;function ga(){if(Ee)return vr;Ee=1;var r=m();function e(){this.__data__=r?r(null):{},this.size=0}return vr=e,vr}var hr,Ue;function qa(){if(Ue)return hr;Ue=1;function r(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}return hr=r,hr}var _r,Fe;function Ca(){if(Fe)return _r;Fe=1;var r=m(),e="__lodash_hash_undefined__",t=Object.prototype,a=t.hasOwnProperty;function n(i){var u=this.__data__;if(r){var s=u[i];return s===e?void 0:s}return a.call(u,i)?u[i]:void 0}return _r=n,_r}var lr,Ne;function Ta(){if(Ne)return lr;Ne=1;var r=m(),e=Object.prototype,t=e.hasOwnProperty;function a(n){var i=this.__data__;return r?i[n]!==void 0:t.call(i,n)}return lr=a,lr}var pr,Ke;function ja(){if(Ke)return pr;Ke=1;var r=m(),e="__lodash_hash_undefined__";function t(a,n){var i=this.__data__;return this.size+=this.has(a)?0:1,i[a]=r&&n===void 0?e:n,this}return pr=t,pr}var dr,Be;function Ra(){if(Be)return dr;Be=1;var r=ga(),e=qa(),t=Ca(),a=Ta(),n=ja();function i(u){var s=-1,o=u==null?0:u.length;for(this.clear();++s<o;){var c=u[s];this.set(c[0],c[1])}}return i.prototype.clear=r,i.prototype.delete=e,i.prototype.get=t,i.prototype.has=a,i.prototype.set=n,dr=i,dr}var yr,ze;function Oa(){if(ze)return yr;ze=1;var r=Ra(),e=I(),t=Nt();function a(){this.size=0,this.__data__={hash:new r,map:new(t||e),string:new r}}return yr=a,yr}var br,Ve;function Aa(){if(Ve)return br;Ve=1;function r(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}return br=r,br}var gr,Je;function P(){if(Je)return gr;Je=1;var r=Aa();function e(t,a){var n=t.__data__;return r(a)?n[typeof a=="string"?"string":"hash"]:n.map}return gr=e,gr}var qr,Xe;function Sa(){if(Xe)return qr;Xe=1;var r=P();function e(t){var a=r(this,t).delete(t);return this.size-=a?1:0,a}return qr=e,qr}var Cr,We;function Ia(){if(We)return Cr;We=1;var r=P();function e(t){return r(this,t).get(t)}return Cr=e,Cr}var Tr,Ye;function ma(){if(Ye)return Tr;Ye=1;var r=P();function e(t){return r(this,t).has(t)}return Tr=e,Tr}var jr,Ze;function Pa(){if(Ze)return jr;Ze=1;var r=P();function e(t,a){var n=r(this,t),i=n.size;return n.set(t,a),this.size+=n.size==i?0:1,this}return jr=e,jr}var Rr,$e;function xa(){if($e)return Rr;$e=1;var r=Oa(),e=Sa(),t=Ia(),a=ma(),n=Pa();function i(u){var s=-1,o=u==null?0:u.length;for(this.clear();++s<o;){var c=u[s];this.set(c[0],c[1])}}return i.prototype.clear=r,i.prototype.delete=e,i.prototype.get=t,i.prototype.has=a,i.prototype.set=n,Rr=i,Rr}var Or,Qe;function wa(){if(Qe)return Or;Qe=1;var r=I(),e=Nt(),t=xa(),a=200;function n(i,u){var s=this.__data__;if(s instanceof r){var o=s.__data__;if(!e||o.length<a-1)return o.push([i,u]),this.size=++s.size,this;s=this.__data__=new t(o)}return s.set(i,u),this.size=s.size,this}return Or=n,Or}var Ar,rt;function un(){if(rt)return Ar;rt=1;var r=I(),e=fa(),t=va(),a=ha(),n=_a(),i=wa();function u(s){var o=this.__data__=new r(s);this.size=o.size}return u.prototype.clear=e,u.prototype.delete=t,u.prototype.get=a,u.prototype.has=n,u.prototype.set=i,Ar=u,Ar}var Sr,et;function Kt(){if(et)return Sr;et=1;var r=ue(),e=(function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch{}})();return Sr=e,Sr}var Ir,tt;function Bt(){if(tt)return Ir;tt=1;var r=Kt();function e(t,a,n){a=="__proto__"&&r?r(t,a,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[a]=n}return Ir=e,Ir}var b={exports:{}};b.exports;var at;function sn(){return at||(at=1,(function(r,e){var t=d(),a=e&&!e.nodeType&&e,n=a&&!0&&r&&!r.nodeType&&r,i=n&&n.exports===a,u=i?t.Buffer:void 0,s=u?u.allocUnsafe:void 0;function o(c,v){if(v)return c.slice();var h=c.length,_=s?s(h):new c.constructor(h);return c.copy(_),_}r.exports=o})(b,b.exports)),b.exports}var mr,nt;function Da(){if(nt)return mr;nt=1;var r=d(),e=r.Uint8Array;return mr=e,mr}var Pr,it;function Ga(){if(it)return Pr;it=1;var r=Da();function e(t){var a=new t.constructor(t.byteLength);return new r(a).set(new r(t)),a}return Pr=e,Pr}var xr,ut;function on(){if(ut)return xr;ut=1;var r=Ga();function e(t,a){var n=a?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}return xr=e,xr}var wr,st;function cn(){if(st)return wr;st=1;function r(e,t){var a=-1,n=e.length;for(t||(t=Array(n));++a<n;)t[a]=e[a];return t}return wr=r,wr}var Dr,ot;function La(){if(ot)return Dr;ot=1;var r=R(),e=Object.create,t=(function(){function a(){}return function(n){if(!r(n))return{};if(e)return e(n);a.prototype=n;var i=new a;return a.prototype=void 0,i}})();return Dr=t,Dr}var Gr,ct;function zt(){if(ct)return Gr;ct=1;var r=Object.prototype;function e(t){var a=t&&t.constructor,n=typeof a=="function"&&a.prototype||r;return t===n}return Gr=e,Gr}var Lr,ft;function fn(){if(ft)return Lr;ft=1;var r=La(),e=Et(),t=zt();function a(n){return typeof n.constructor=="function"&&!t(n)?r(e(n)):{}}return Lr=a,Lr}var Mr,vt;function Ma(){if(vt)return Mr;vt=1;var r=O(),e=A(),t="[object Arguments]";function a(n){return e(n)&&r(n)==t}return Mr=a,Mr}var Hr,ht;function Ha(){if(ht)return Hr;ht=1;var r=Ma(),e=A(),t=Object.prototype,a=t.hasOwnProperty,n=t.propertyIsEnumerable,i=r((function(){return arguments})())?r:function(u){return e(u)&&a.call(u,"callee")&&!n.call(u,"callee")};return Hr=i,Hr}var kr,_t;function ka(){if(_t)return kr;_t=1;var r=Array.isArray;return kr=r,kr}var Er,lt;function Vt(){if(lt)return Er;lt=1;var r=9007199254740991;function e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=r}return Er=e,Er}var Ur,pt;function Ea(){if(pt)return Ur;pt=1;var r=Ft(),e=Vt();function t(a){return a!=null&&e(a.length)&&!r(a)}return Ur=t,Ur}var g={exports:{}},Fr,dt;function Ua(){if(dt)return Fr;dt=1;function r(){return!1}return Fr=r,Fr}g.exports;var yt;function Fa(){return yt||(yt=1,(function(r,e){var t=d(),a=Ua(),n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,u=i&&i.exports===n,s=u?t.Buffer:void 0,o=s?s.isBuffer:void 0,c=o||a;r.exports=c})(g,g.exports)),g.exports}var Nr,bt;function Na(){if(bt)return Nr;bt=1;var r=O(),e=Vt(),t=A(),a="[object Arguments]",n="[object Array]",i="[object Boolean]",u="[object Date]",s="[object Error]",o="[object Function]",c="[object Map]",v="[object Number]",h="[object Object]",_="[object RegExp]",p="[object Set]",C="[object String]",T="[object WeakMap]",y="[object ArrayBuffer]",x="[object DataView]",l="[object Float32Array]",Jt="[object Float64Array]",Xt="[object Int8Array]",Wt="[object Int16Array]",Yt="[object Int32Array]",Zt="[object Uint8Array]",$t="[object Uint8ClampedArray]",Qt="[object Uint16Array]",ra="[object Uint32Array]",f={};f[l]=f[Jt]=f[Xt]=f[Wt]=f[Yt]=f[Zt]=f[$t]=f[Qt]=f[ra]=!0,f[a]=f[n]=f[y]=f[i]=f[x]=f[u]=f[s]=f[o]=f[c]=f[v]=f[h]=f[_]=f[p]=f[C]=f[T]=!1;function ea(w){return t(w)&&e(w.length)&&!!f[r(w)]}return Nr=ea,Nr}var Kr,gt;function Ka(){if(gt)return Kr;gt=1;function r(e){return function(t){return e(t)}}return Kr=r,Kr}var q={exports:{}};q.exports;var qt;function Ba(){return qt||(qt=1,(function(r,e){var t=Ht(),a=e&&!e.nodeType&&e,n=a&&!0&&r&&!r.nodeType&&r,i=n&&n.exports===a,u=i&&t.process,s=(function(){try{var o=n&&n.require&&n.require("util").types;return o||u&&u.binding&&u.binding("util")}catch{}})();r.exports=s})(q,q.exports)),q.exports}var Br,Ct;function za(){if(Ct)return Br;Ct=1;var r=Na(),e=Ka(),t=Ba(),a=t&&t.isTypedArray,n=a?e(a):r;return Br=n,Br}var zr,Tt;function Va(){if(Tt)return zr;Tt=1;var r=Bt(),e=Ut(),t=Object.prototype,a=t.hasOwnProperty;function n(i,u,s){var o=i[u];(!(a.call(i,u)&&e(o,s))||s===void 0&&!(u in i))&&r(i,u,s)}return zr=n,zr}var Vr,jt;function vn(){if(jt)return Vr;jt=1;var r=Va(),e=Bt();function t(a,n,i,u){var s=!i;i||(i={});for(var o=-1,c=n.length;++o<c;){var v=n[o],h=u?u(i[v],a[v],v,i,a):void 0;h===void 0&&(h=a[v]),s?e(i,v,h):r(i,v,h)}return i}return Vr=t,Vr}var Jr,Rt;function Ja(){if(Rt)return Jr;Rt=1;function r(e,t){for(var a=-1,n=Array(e);++a<e;)n[a]=t(a);return n}return Jr=r,Jr}var Xr,Ot;function Xa(){if(Ot)return Xr;Ot=1;var r=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function t(a,n){var i=typeof a;return n=n??r,!!n&&(i=="number"||i!="symbol"&&e.test(a))&&a>-1&&a%1==0&&a<n}return Xr=t,Xr}var Wr,At;function Wa(){if(At)return Wr;At=1;var r=Ja(),e=Ha(),t=ka(),a=Fa(),n=Xa(),i=za(),u=Object.prototype,s=u.hasOwnProperty;function o(c,v){var h=t(c),_=!h&&e(c),p=!h&&!_&&a(c),C=!h&&!_&&!p&&i(c),T=h||_||p||C,y=T?r(c.length,String):[],x=y.length;for(var l in c)(v||s.call(c,l))&&!(T&&(l=="length"||p&&(l=="offset"||l=="parent")||C&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||n(l,x)))&&y.push(l);return y}return Wr=o,Wr}var Yr,St;function Ya(){if(St)return Yr;St=1;function r(e){var t=[];if(e!=null)for(var a in Object(e))t.push(a);return t}return Yr=r,Yr}var Zr,It;function Za(){if(It)return Zr;It=1;var r=R(),e=zt(),t=Ya(),a=Object.prototype,n=a.hasOwnProperty;function i(u){if(!r(u))return t(u);var s=e(u),o=[];for(var c in u)c=="constructor"&&(s||!n.call(u,c))||o.push(c);return o}return Zr=i,Zr}var $r,mt;function hn(){if(mt)return $r;mt=1;var r=Wa(),e=Za(),t=Ea();function a(n){return t(n)?r(n,!0):e(n)}return $r=a,$r}var Qr,Pt;function $a(){if(Pt)return Qr;Pt=1;function r(e){return e}return Qr=r,Qr}var re,xt;function Qa(){if(xt)return re;xt=1;function r(e,t,a){switch(a.length){case 0:return e.call(t);case 1:return e.call(t,a[0]);case 2:return e.call(t,a[0],a[1]);case 3:return e.call(t,a[0],a[1],a[2])}return e.apply(t,a)}return re=r,re}var ee,wt;function _n(){if(wt)return ee;wt=1;var r=Qa(),e=Math.max;function t(a,n,i){return n=e(n===void 0?a.length-1:n,0),function(){for(var u=arguments,s=-1,o=e(u.length-n,0),c=Array(o);++s<o;)c[s]=u[n+s];s=-1;for(var v=Array(n+1);++s<n;)v[s]=u[s];return v[n]=i(c),r(a,this,v)}}return ee=t,ee}var te,Dt;function rn(){if(Dt)return te;Dt=1;function r(e){return function(){return e}}return te=r,te}var ae,Gt;function en(){if(Gt)return ae;Gt=1;var r=rn(),e=Kt(),t=$a(),a=e?function(n,i){return e(n,"toString",{configurable:!0,enumerable:!1,value:r(i),writable:!0})}:t;return ae=a,ae}var ne,Lt;function tn(){if(Lt)return ne;Lt=1;var r=800,e=16,t=Date.now;function a(n){var i=0,u=0;return function(){var s=t(),o=e-(s-u);if(u=s,o>0){if(++i>=r)return arguments[0]}else i=0;return n.apply(void 0,arguments)}}return ne=a,ne}var ie,Mt;function ln(){if(Mt)return ie;Mt=1;var r=en(),e=tn(),t=e(r);return ie=t,ie}export{zt as A,Wa as B,Et as C,ue as D,d as E,Nt as F,da as G,Ga as H,kt as I,Ba as J,Ka as K,xa as L,R as a,Xa as b,Ha as c,ka as d,Vt as e,Bt as f,Ut as g,Ea as h,A as i,vn as j,hn as k,sn as l,on as m,cn as n,fn as o,Fa as p,Ft as q,Va as r,nn as s,za as t,un as u,$a as v,_n as w,ln as x,O as y,na as z};
@@ -1 +0,0 @@
1
- import{j as e}from"./iframe-CLEfhyJc.js";import{I as a}from"./icon-TJ3FHxUI.js";import{c as p,g as d}from"./classname-DoNrELT0.js";import{T as t}from"./typography-DoV67nnS.js";const s=d("alert"),f=({type:i="informative",title:r,message:l,closeable:c,action:o,className:n,...m})=>e.jsxs("div",{className:p(s,`${s}--${i}`,n),...m,children:[e.jsxs("div",{className:`${s}__icon`,children:[i==="informative"&&e.jsx(a,{name:"circle-info",type:"fill",size:20,color:"alias-object-secondary"}),i==="positive"&&e.jsx(a,{name:"circle-check",type:"fill",size:20,color:"alias-support-positive"}),i==="negative"&&e.jsx(a,{name:"triangle-warning",type:"fill",size:20,color:"alias-support-negative"})]}),e.jsxs("div",{className:`${s}__content`,children:[!!r&&e.jsx(t,{size:"small",weight:"bold",color:{informative:"alias-object-primary",positive:"alias-support-positive",negative:"alias-support-negative"}[i],children:r}),!!l&&e.jsx(t,{size:"small",children:l})]}),!!o&&e.jsx("div",{className:`${s}__action`,children:o}),c&&e.jsx("div",{className:`${s}__close`,children:e.jsx(a,{name:"xmark",size:20})})]});f.__docgenInfo={description:"",methods:[],displayName:"Alert",props:{type:{defaultValue:{value:"'informative'",computed:!1},required:!1}}};export{f as A};
@@ -1 +0,0 @@
1
- import{r as b,j as o}from"./iframe-CLEfhyJc.js";import{c as x,g as h}from"./classname-DoNrELT0.js";import{T as v}from"./typography-DoV67nnS.js";import{I as $}from"./image-D6Yo4ht9.js";const r=h("avatar"),y=({size:e=40,shape:a="rounded",border:l,label:d,labelColor:c,labelSize:S,color:j,style:u,className:z,src:s,srcSet:m,...p})=>{const[g,n]=b.useState(!1),f=I(e),i=!g&&(!!s||!!m);return b.useEffect(()=>{n(!1)},[s,m]),o.jsxs("div",{className:x(r,`${r}--${a}`,{[`${r}--show-image`]:i},z),style:{...u,width:e,height:e},children:[!!l&&o.jsx("div",{className:`${r}__border ${r}__border--${f.borderSize} ${r}--${a}`}),i&&o.jsx($,{...p,onError:()=>n(!0),width:e,height:e,src:s}),!!d&&!i&&o.jsx(v,{size:S||f.labelSize,color:c||"global-dynamic-red-dynamic-red-60",weight:600,children:d})]})},t=[[112,{labelSize:"4x-large",borderSize:2}],[80,{labelSize:"2x-large",borderSize:2}],[56,{labelSize:"large",borderSize:2}],[48,{labelSize:"base",borderSize:1}],[40,{labelSize:"small",borderSize:1}],[32,{labelSize:"x-small",borderSize:1}],[24,{labelSize:"2x-small",borderSize:1}],[0,{labelSize:"3x-small",borderSize:1}]],I=e=>{for(const[a,l]of t)if(e>=a)return l;return t[t.length-1][1]};y.__docgenInfo={description:"",methods:[],displayName:"Avatar",props:{size:{defaultValue:{value:"40",computed:!1},required:!1},shape:{defaultValue:{value:"'rounded'",computed:!1},required:!1}}};export{y as A};
@@ -1 +0,0 @@
1
- import{j as t}from"./iframe-CLEfhyJc.js";import{c as r,g as i}from"./classname-DoNrELT0.js";import{T as m}from"./typography-DoV67nnS.js";const a=i("badge"),d=({outline:e,children:s,className:o,...n})=>t.jsx(m,{...n,size:"2x-small",className:r(a,{[`${a}--outline`]:e,[`${a}--dot`]:!s},o),children:s}),p=({children:e,className:s,...o})=>t.jsx("div",{className:r(`${a}-container`,s),...o,children:e});d.__docgenInfo={description:"",methods:[],displayName:"Badge"};p.__docgenInfo={description:"",methods:[],displayName:"BadgeContainer"};export{d as B,p as a};
@@ -1 +0,0 @@
1
- import{j as u}from"./iframe-CLEfhyJc.js";import{r as N}from"./icon-TJ3FHxUI.js";import{c as f,g as b}from"./classname-DoNrELT0.js";import{T as j}from"./typography-DoV67nnS.js";const v={medium:"small",large:"base"},e=b("button"),g=({shape:p="rounded",size:m="medium",type:c="solid",theme:a="default",disabled:i,loading:s,children:r,className:$,leadingIcon:o,trailingIcon:l,htmlType:_,block:x,...d})=>{a=a==="default"?"brand":a;const n=(t,y)=>t?u.jsx("span",{className:f(`${e}__icon`,y),children:N(t)}):null;return u.jsxs("button",{...d,onClick:t=>{i||s||d.onClick?.(t)},disabled:i,type:_,className:f(e,{[`${e}--${p}`]:!0,[`${e}--${m}`]:!0,[`${e}--${c}`]:!0,[`${e}--block`]:x,[`${e}--theme-${a}`]:!0,[`${e}--icon-only`]:!r&&(o&&!l||!o&&l),[`${e}--loading`]:s},$),children:[u.jsx("span",{className:`${e}__overlay`}),!!s&&n({name:"loader",animation:"spin"},`${e}__icon--loading`),!s&&n(o,`${e}__icon--leading`),!!r&&u.jsx(j,{size:v[m],weight:"medium",children:r}),n(l,`${e}__icon--trailing`)]})};g.__docgenInfo={description:"",methods:[],displayName:"Button",props:{shape:{defaultValue:{value:"'rounded'",computed:!1},required:!1},size:{defaultValue:{value:"'medium'",computed:!1},required:!1},type:{defaultValue:{value:"'solid'",computed:!1},required:!1},theme:{defaultValue:{value:"'default'",computed:!1},required:!1}}};export{g as B};
@@ -1 +0,0 @@
1
- import{r as b,j as e}from"./iframe-CLEfhyJc.js";import{c as i,g as ye}from"./classname-DoNrELT0.js";import{d as w}from"./date-Ci5dIit0.js";import{I as E}from"./icon-TJ3FHxUI.js";import{B as A}from"./button-GtWXUngt.js";import{T as m}from"./typography-DoV67nnS.js";import{u as ge}from"./index-DRIh_SUo.js";import{u as ee}from"./store-DxAqU1JB.js";class we{getNumDaysInMonth(t,o){return new Date(o,t+1,0).getDate()}isSame(t,o){return w(t).isSame(w(o),"day")}isBefore(t,o){return w(t).isBefore(w(o),"day")}isAfter(t,o){return w(t).isAfter(w(o),"day")}isSameOrBefore(t,o){return w(t).isSameOrBefore(w(o),"day")}isSameOrAfter(t,o){return w(t).isSameOrAfter(w(o),"day")}}const x=new we,ce=(n,t,o)=>{const y=ee.getState().translate;return y(n,t,o)};function Ce(){const n=ee(y=>y.language),t=ee(y=>y.systemLanguage),o=ee(y=>y.setLanguage);return{language:n,systemLanguage:t,setLanguage:o}}const Se=n=>({date:t=>t.getDate(),headerLabel:(t,o)=>ce("calendar.headerLabel",{month:ce(`calendar.monthLabel[${t}]`,void 0,n),year:o},n),weekday:t=>ce(`calendar.weekdayLabel[${t}]`,void 0,n)}),xe=(n,t)=>({...t,...Se(n==="en"?"en":"vi")}),be=ye("calendar"),l=be+"-single-picker",pe=new Date(1900,0,1),ze=new Date(2099,11,31),Ie=n=>{const t={};return n.defaultValue!==void 0&&(t.defaultValue=n.defaultValue),n.value!==void 0&&(t.value=n.value),n.onChange!==void 0&&(t.onChange=n.onChange),t},$e=n=>{const{className:t,renderText:o,lang:y,navigationMode:C="month-year",defaultValue:Me,onChange:De,value:S,minDate:F=pe,maxDate:V=ze,...U}=n,[z,W]=ge(Ie(n)),te=xe(y,o),{date:N,dateSubText:h,headerLabel:$,weekday:R}=te,T=new Date,[d,I]=b.useState(()=>z?z.getMonth():T.getMonth()),[c,p]=b.useState(()=>z?z.getFullYear():T.getFullYear()),Y=(new Date(c,d,1).getDay()+6)%7,f=x.getNumDaysInMonth(d,c),K=Y+f,u=Math.ceil(K/7),L=V.getMonth(),M=V.getFullYear(),q=F.getMonth(),G=F.getFullYear(),Q=c<M||c===M&&d<L,H=c>G||c===G&&d>q,O=c<M||c+1===M&&d<=L,X=c>G||c-1===G&&d>=q,v=b.useMemo(()=>{if(!H)return null;let g=c,s=d-1;return s<0&&(g--,s=11),{month:s,year:g}},[d,H,c]),D=b.useMemo(()=>{if(!Q)return null;let g=c,s=d+1;return s>11&&(g++,s=0),{month:s,year:g}},[d,Q,c]),J=b.useMemo(()=>v?x.getNumDaysInMonth(v.month,v.year):null,[v]),ne=b.useMemo(()=>D?x.getNumDaysInMonth(D.month,D.year):null,[D]),ae=g=>{const s=new Date(c,d,g);return x.isSameOrAfter(s,F)&&x.isSameOrBefore(s,V)};return e.jsxs("div",{className:i(be,l,t),...U,children:[e.jsxs("div",{className:`${l}__header`,children:[C==="month-year"&&e.jsx(A,{type:"ghost",theme:"neutral",disabled:!X,onClick:()=>{X&&p(c-1)},children:e.jsx(E,{size:20,name:"double-chevron-left"})}),C!=="time-only"&&e.jsx(A,{type:"ghost",theme:"neutral",disabled:!H,onClick:()=>{v&&(I(v.month),p(v.year))},children:e.jsx(E,{size:20,name:"chevron-left"})}),e.jsx(m,{className:`${l}__header-label`,children:typeof $=="function"?$?.(d,c):$}),C!=="time-only"&&e.jsx(A,{type:"ghost",theme:"neutral",disabled:!Q,onClick:()=>{D&&(I(D.month),p(D.year))},children:e.jsx(E,{size:20,name:"chevron-right"})}),C==="month-year"&&e.jsx(A,{type:"ghost",theme:"neutral",disabled:!O,onClick:()=>{O&&p(c+1)},children:e.jsx(E,{size:20,name:"double-chevron-right"})})]}),e.jsx("div",{children:e.jsxs("div",{className:`${l}__grid`,children:[Array.from({length:7},(g,s)=>{const B=(s+1)%7;return e.jsx("div",{className:i(`${l}__cell-container`),children:e.jsx("div",{className:i(`${l}__cell`,`${l}__cell-week`),children:e.jsx(m,{color:"alias-object-secondary",children:typeof R=="function"?R(B):R})})})}),Array.from({length:u*7},(g,s)=>{if(s<Y){if(!J)return e.jsx("div",{className:i(`${l}__cell-container`),children:e.jsx(m,{size:"base",role:"button",className:i(`${l}__cell`,`${l}__cell-day`,`${l}__cell-day-filler`),children:"null"})},s);const j=J-Y+s+1,r=new Date(c,d,j);return e.jsx("div",{className:i(`${l}__cell-container`),children:e.jsxs(m,{size:"base",role:"button",className:i(`${l}__cell`,`${l}__cell-day`,`${l}__cell-day-filler`),children:[typeof N=="function"?N(r):N,e.jsx(m,{size:"2x-small",className:`${l}__cell-day-sub-title`,children:typeof h=="function"?h(r):h})]})},s)}if(s>=Y+f){if(!ne)return e.jsx("div",{className:i(`${l}__cell-container`),children:e.jsx(m,{size:"base",role:"button",className:i(`${l}__cell`,`${l}__cell-day`,`${l}__cell-day-filler`),children:"null"})},s);const j=s-(Y+f)+1,r=new Date(c,d,j);return e.jsx("div",{className:i(`${l}__cell-container`),children:e.jsxs(m,{size:"base",role:"button",className:i(`${l}__cell`,`${l}__cell-day`,`${l}__cell-day-filler`),children:[typeof N=="function"?N(r):N,e.jsx(m,{size:"2x-small",className:`${l}__cell-day-sub-title`,children:typeof h=="function"?h(r):h})]})},s)}const B=s-Y+1,P=new Date(c,d,B),le=!ae(B);return e.jsx("div",{className:i(`${l}__cell-container`),children:e.jsxs(m,{size:"base",role:"button",onClick:()=>{!P||le||W(P)},className:i(`${l}__cell`,`${l}__cell-day`,{[`${l}__cell-day--disabled`]:le,[`${l}__cell-day--today`]:x.isSame(P,T),[`${l}__cell-day--selected`]:z&&x.isSame(P,z)}),children:[typeof N=="function"?N(P):N,e.jsx(m,{size:"2x-small",className:`${l}__cell-day-sub-title`,children:typeof h=="function"?h(P):h})]})},s)})]})})]})};$e.__docgenInfo={description:"",methods:[],displayName:"SinglePicker"};const je=ye("calendar"),a=je+"-range-picker",Ye=new Date(1900,0,1),Le=new Date(2099,11,31),Pe=n=>{const t={};return(n.defaultValue!==void 0||n.defaultValue===null)&&(t.defaultValue=n.defaultValue),(n.value!==void 0||n.value===null)&&(t.value=n.value),n.onChange!==void 0&&(t.onChange=n.onChange),t},me=n=>{const t=new Date;if(n){const[o,y]=n;return o?o.getMonth():y?y.getMonth():t.getMonth()}return t.getMonth()},he=n=>{const t=new Date;if(n){const[o,y]=n;return o?o.getFullYear():y?y.getFullYear():t.getFullYear()}return t.getFullYear()},fe=n=>{if(!n)return null;const[t]=n;return t},_e=n=>{if(!n)return null;const[,t]=n;return t},ve=n=>{const{className:t,renderText:o,lang:y,navigationMode:C="month-year",defaultValue:Me,onChange:De,value:S,minDate:F=Ye,maxDate:V=Le,onPick:U,...z}=n,[W,te]=ge(Pe(n)),N=xe(y,o),{date:h,dateSubText:$,headerLabel:R,weekday:T}=N,[d,I]=b.useState(fe(W)),[c,p]=b.useState(_e(W)),Y=new Date,[f,K]=b.useState(me(W)),[u,L]=b.useState(he(W)),M=(new Date(u,f,1).getDay()+6)%7,q=x.getNumDaysInMonth(f,u),G=M+q,Q=Math.ceil(G/7),H=V.getMonth(),O=V.getFullYear(),X=F.getMonth(),v=F.getFullYear(),D=u<O||u===O&&f<H,J=u>v||u===v&&f>X,ne=u<O||u+1===O&&f<=H,ae=u>v||u-1===v&&f>=X,g=b.useMemo(()=>{if(!J)return null;let j=u,r=f-1;return r<0&&(j--,r=11),{month:r,year:j}},[f,J,u]),s=b.useMemo(()=>{if(!D)return null;let j=u,r=f+1;return r>11&&(j++,r=0),{month:r,year:j}},[f,D,u]),B=b.useMemo(()=>g?x.getNumDaysInMonth(g.month,g.year):null,[g]),P=b.useMemo(()=>s?x.getNumDaysInMonth(s.month,s.year):null,[s]),le=j=>{const r=new Date(u,f,j);return x.isSameOrAfter(r,F)&&x.isSameOrBefore(r,V)};return b.useEffect(()=>{S!=null&&(K(me(S)),L(he(S)))},[S?.[0]?.getTime()]),b.useEffect(()=>{S!=null&&(I(fe(S)),p(_e(S)))},[S]),e.jsxs("div",{className:i(je,a,t),...z,children:[e.jsxs("div",{className:`${a}__header`,children:[C==="month-year"&&e.jsx(A,{type:"ghost",theme:"neutral",disabled:!ae,onClick:()=>{ae&&L(u-1)},children:e.jsx(E,{size:20,name:"double-chevron-left"})}),C!=="time-only"&&e.jsx(A,{type:"ghost",theme:"neutral",disabled:!J,onClick:()=>{g&&(K(g.month),L(g.year))},children:e.jsx(E,{size:20,name:"chevron-left"})}),e.jsx(m,{className:`${a}__header-label`,children:typeof R=="function"?R?.(f,u):R}),C!=="time-only"&&e.jsx(A,{type:"ghost",theme:"neutral",disabled:!D,onClick:()=>{s&&(K(s.month),L(s.year))},children:e.jsx(E,{size:20,name:"chevron-right"})}),C==="month-year"&&e.jsx(A,{type:"ghost",theme:"neutral",disabled:!ne,onClick:()=>{ne&&L(u+1)},children:e.jsx(E,{size:20,name:"double-chevron-right"})})]}),e.jsx("div",{children:e.jsxs("div",{className:`${a}__grid`,children:[Array.from({length:7},(j,r)=>{const se=(r+1)%7;return e.jsx("div",{className:i(`${a}__cell-container`),children:e.jsx("div",{className:i(`${a}__cell`,`${a}__cell-week`),children:e.jsx(m,{color:"alias-object-secondary",children:typeof T=="function"?T(se):T})})})}),Array.from({length:Q*7},(j,r)=>{if(r<M){if(!B)return e.jsx("div",{className:i(`${a}__cell-container`),children:e.jsx(m,{size:"base",role:"button",className:i(`${a}__cell`,`${a}__cell-day`,`${a}__cell-day-filler`),children:"null"})},r);const k=B-M+r+1,Z=new Date(u,f,k);return e.jsx("div",{className:i(`${a}__cell-container`),children:e.jsxs(m,{size:"base",role:"button",className:i(`${a}__cell`,`${a}__cell-day`,`${a}__cell-day-filler`),children:[typeof h=="function"?h(Z):h,e.jsx(m,{size:"2x-small",className:`${a}__cell-day-sub-title`,children:typeof $=="function"?$(Z):$})]})},r)}if(r>=M+q){if(!P)return e.jsx("div",{className:i(`${a}__cell-container`),children:e.jsx(m,{size:"base",role:"button",className:i(`${a}__cell`,`${a}__cell-day`,`${a}__cell-day-filler`),children:"null"})},r);const k=r-(M+q)+1,Z=new Date(u,f,k);return e.jsx("div",{className:i(`${a}__cell-container`),children:e.jsxs(m,{size:"base",role:"button",className:i(`${a}__cell`,`${a}__cell-day`,`${a}__cell-day-filler`),children:[typeof h=="function"?h(Z):h,e.jsx(m,{size:"2x-small",className:`${a}__cell-day-sub-title`,children:typeof $=="function"?$(Z):$})]})},r)}const se=r%7===6,ke=r%7===0,ie=r-M+1,_=new Date(u,f,ie),de=!le(ie),re=d&&x.isSame(_,d),oe=c&&x.isSame(_,c),ue=(function(){return d&&c?x.isSameOrAfter(_,d)&&x.isSameOrBefore(_,c):!1})();return e.jsxs("div",{className:i(`${a}__cell-container`),children:[ue&&e.jsx("div",{className:i(`${a}__cell-range-background`,{[`${a}__cell-range-background-start`]:re,[`${a}__cell-range-background-end`]:oe,[`${a}__cell-range-background-start-end-row`]:re&&se,[`${a}__cell-range-background-end-start-row`]:oe&&ke})}),e.jsxs(m,{size:"base",role:"button",onClick:()=>{if(de)return;if(d&&c){I(_),p(null),U?.([_,null]);return}if(!d&&!c){I(_),U?.([_,null]);return}const k=d||c;if(_<k){I(_),p(k),te?.([_,k]),U?.([_,k]);return}I(k),p(_),te?.([k,_]),U?.([k,_])},className:i(`${a}__cell`,`${a}__cell-day`,{[`${a}__cell-day--disabled`]:de,[`${a}__cell-day--today`]:x.isSame(_,Y),[`${a}__cell-day--in-range-picker`]:ue,[`${a}__cell-day--selected`]:re||oe}),children:[typeof h=="function"?h(_):h,e.jsx(m,{size:"2x-small",className:`${a}__cell-day-sub-title`,children:typeof $=="function"?$(_):$})]})]},r)})]})})]})};ve.__docgenInfo={description:"",methods:[],displayName:"RangePicker"};const Ee=()=>ee(t=>t.initialized),Ne=({type:n="single",...t})=>n==="single"?e.jsx($e,{...t}):e.jsx(ve,{...t}),Ae=({lang:n,...t})=>{const{language:o}=Ce();return e.jsx(Ne,{lang:n||o,...t})},Fe=n=>Ee()?e.jsx(Ne,{...n}):e.jsx(Ae,{...n});Fe.__docgenInfo={description:"",methods:[],displayName:"Calendar"};export{Fe as C};
@@ -1,37 +0,0 @@
1
- import{r as u,j as I}from"./iframe-CLEfhyJc.js";import{c as R,g as z}from"./classname-DoNrELT0.js";import{u as B}from"./embla-carousel-react.esm-CCQjHA-d.js";import{P as G}from"./pagination-Dcazh6R_.js";const J={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function K(a,e){const n=a.scrollSnapList();return typeof e=="number"?n.map(()=>e):e(n,a)}function Q(a,e){const n=a.rootNode();return e&&e(n)||n}function H(a={}){let e,n,s,f,p=null,l=0,o=!1,g=!1,t=!1,i=!1;function y(r,x){n=r;const{mergeOptions:q,optionsAtMedia:D}=x,U=q(J,H.globalOptions),$=q(U,a);if(e=D($),n.scrollSnapList().length<=1)return;i=e.jump,s=!1,f=K(n,e.delay);const{eventStore:C,ownerDocument:W}=n.internalEngine(),_=!!n.internalEngine().options.watchDrag,L=Q(n,e.rootNode);C.add(W,"visibilitychange",j),_&&n.on("pointerDown",w),_&&!e.stopOnInteraction&&n.on("pointerUp",S),e.stopOnMouseEnter&&C.add(L,"mouseenter",E),e.stopOnMouseEnter&&!e.stopOnInteraction&&C.add(L,"mouseleave",T),e.stopOnFocusIn&&n.on("slideFocusStart",d),e.stopOnFocusIn&&!e.stopOnInteraction&&C.add(n.containerNode(),"focusout",m),e.playOnInit&&m()}function c(){n.off("pointerDown",w).off("pointerUp",S).off("slideFocusStart",d),d(),s=!0,o=!1}function O(){const{ownerWindow:r}=n.internalEngine();r.clearTimeout(l),l=r.setTimeout(F,f[n.selectedScrollSnap()]),p=new Date().getTime(),n.emit("autoplay:timerset")}function h(){const{ownerWindow:r}=n.internalEngine();r.clearTimeout(l),l=0,p=null,n.emit("autoplay:timerstopped")}function m(){if(!s){if(k()){t=!0;return}o||n.emit("autoplay:play"),O(),o=!0}}function d(){s||(o&&n.emit("autoplay:stop"),h(),o=!1)}function j(){if(k())return t=o,d();t&&m()}function k(){const{ownerDocument:r}=n.internalEngine();return r.visibilityState==="hidden"}function w(){g||d()}function S(){g||m()}function E(){g=!0,d()}function T(){g=!1,m()}function A(r){typeof r<"u"&&(i=r),m()}function b(){o&&d()}function v(){o&&m()}function P(){return o}function F(){const{index:r}=n.internalEngine(),x=r.clone().add(1).get(),q=n.scrollSnapList().length-1,D=e.stopOnLastSnap&&x===q;if(n.canScrollNext()?n.scrollNext(i):n.scrollTo(0,i),n.emit("autoplay:select"),D)return d();m()}function M(){if(!p)return null;const r=f[n.selectedScrollSnap()],x=new Date().getTime()-p;return r-x}return{name:"autoplay",options:a,init:y,destroy:c,play:A,stop:b,reset:v,isPlaying:P,timeUntilNext:M}}H.globalOptions=void 0;function V(a={}){let e,n=[];const s=["select","slideFocus"];function f(t){e=t;const{options:{axis:i},slideRects:y}=e.internalEngine();i!=="y"&&(n=y.map(c=>c.height),s.forEach(c=>e.on(c,o)),o())}function p(){s.forEach(i=>e.off(i,o));const t=e.containerNode();t.style.height="",t.getAttribute("style")||t.removeAttribute("style")}function l(){const{slideRegistry:t}=e.internalEngine(),i=t[e.selectedScrollSnap()];return i?i.map(y=>n[y]).reduce((y,c)=>Math.max(y,c),0):null}function o(){l()!==null&&(e.containerNode().style.height=`${l()}px`)}return{name:"autoHeight",options:a,init:f,destroy:p}}V.globalOptions=void 0;const X=(a={})=>{const{align:e="center",initialIndex:n=0,autoplay:s=!1,delay:f=3e3,duration:p=25,loop:l,autoHeight:o=!0}=a,[g,t]=B({axis:"x",align:e,startIndex:n,duration:p,loop:l},[H({playOnInit:!0,delay:f,active:s}),V({active:o})]),i=t?.scrollNext,y=u.useCallback(v=>i?.(v.jump),[i]),c=t?.scrollPrev,O=u.useCallback(v=>c?.(v.jump),[c]),h=t?.scrollTo,m=u.useCallback((v,P)=>h?.(v,P.jump),[h]),[d,j]=u.useState(!1),[k,w]=u.useState(!1),[S,E]=u.useState(0),[T,A]=u.useState([]),b=u.useCallback(()=>{t&&(w(!!t?.canScrollPrev()),j(!!t?.canScrollNext()),A(t.scrollSnapList()),E(t.selectedScrollSnap()))},[t]);return u.useEffect(()=>{t&&(b(),t.on("reInit",b).on("select",b))},[t,b]),{ref:g,next:y,prev:O,toSlide:m,activeIndex:S,canNext:d,canPrev:k,snaps:T,options:a}},N=z("carousel"),Y=u.forwardRef(({className:a,carousel:e,options:n,pagination:s=!0,children:f},p)=>{const l=X(n);return e=e||l,u.useImperativeHandle(p,()=>e),I.jsxs("div",{className:R(N,a),style:{"--carousel-gap":typeof e.options.gap=="number"?e.options.gap+"px":"8px"},children:[I.jsx("div",{className:`${N}__viewport`,ref:e.ref,children:I.jsx("div",{className:`${N}__tracks`,children:f})}),!!s&&I.jsx(G,{total:e.snaps.length,activeIndex:e.activeIndex})]})}),Z=({children:a,className:e,...n})=>I.jsx("div",{className:R(`${N}__item`,e),...n,children:a});Y.__docgenInfo={description:"",methods:[],displayName:"Carousel",props:{className:{required:!1,tsType:{name:"string"},description:""},children:{required:!0,tsType:{name:"ReactNode"},description:""},carousel:{required:!1,tsType:{name:"signature",type:"object",raw:`{
2
- ref: ICarouselViewPortRef
3
- next: (options: ICarouselToOptions) => void
4
- prev: (options: ICarouselToOptions) => void
5
- toSlide: (index: number, options: ICarouselToOptions) => void
6
- activeIndex: number
7
- canNext: boolean
8
- canPrev: boolean
9
- snaps: number[]
10
- options: ICarouselOptions
11
- }`,signature:{properties:[{key:"ref",value:{name:"signature",type:"function",raw:`<ViewportElement extends HTMLElement>(
12
- instance: ViewportElement | null,
13
- ) => void`,signature:{arguments:[{type:{name:"union",raw:"ViewportElement | null",elements:[{name:"ViewportElement"},{name:"null"}]},name:"instance"}],return:{name:"void"}},required:!0}},{key:"next",value:{name:"signature",type:"function",raw:"(options: ICarouselToOptions) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:`{
14
- jump?: boolean
15
- }`,signature:{properties:[{key:"jump",value:{name:"boolean",required:!1}}]}},name:"options"}],return:{name:"void"}},required:!0}},{key:"prev",value:{name:"signature",type:"function",raw:"(options: ICarouselToOptions) => void",signature:{arguments:[{type:{name:"signature",type:"object",raw:`{
16
- jump?: boolean
17
- }`,signature:{properties:[{key:"jump",value:{name:"boolean",required:!1}}]}},name:"options"}],return:{name:"void"}},required:!0}},{key:"toSlide",value:{name:"signature",type:"function",raw:"(index: number, options: ICarouselToOptions) => void",signature:{arguments:[{type:{name:"number"},name:"index"},{type:{name:"signature",type:"object",raw:`{
18
- jump?: boolean
19
- }`,signature:{properties:[{key:"jump",value:{name:"boolean",required:!1}}]}},name:"options"}],return:{name:"void"}},required:!0}},{key:"activeIndex",value:{name:"number",required:!0}},{key:"canNext",value:{name:"boolean",required:!0}},{key:"canPrev",value:{name:"boolean",required:!0}},{key:"snaps",value:{name:"Array",elements:[{name:"number"}],raw:"number[]",required:!0}},{key:"options",value:{name:"signature",type:"object",raw:`{
20
- align?: ICarouselAlign
21
- initialIndex?: number
22
- loop?: boolean
23
- duration?: number
24
- autoplay?: boolean
25
- delay?: number
26
- autoHeight?: boolean
27
- gap?: number
28
- }`,signature:{properties:[{key:"align",value:{name:"union",raw:"'start' | 'center' | 'end'",elements:[{name:"literal",value:"'start'"},{name:"literal",value:"'center'"},{name:"literal",value:"'end'"}],required:!1}},{key:"initialIndex",value:{name:"number",required:!1}},{key:"loop",value:{name:"boolean",required:!1}},{key:"duration",value:{name:"number",required:!1}},{key:"autoplay",value:{name:"boolean",required:!1}},{key:"delay",value:{name:"number",required:!1}},{key:"autoHeight",value:{name:"boolean",required:!1}},{key:"gap",value:{name:"number",required:!1}}]},required:!0}}]}},description:""},options:{required:!1,tsType:{name:"signature",type:"object",raw:`{
29
- align?: ICarouselAlign
30
- initialIndex?: number
31
- loop?: boolean
32
- duration?: number
33
- autoplay?: boolean
34
- delay?: number
35
- autoHeight?: boolean
36
- gap?: number
37
- }`,signature:{properties:[{key:"align",value:{name:"union",raw:"'start' | 'center' | 'end'",elements:[{name:"literal",value:"'start'"},{name:"literal",value:"'center'"},{name:"literal",value:"'end'"}],required:!1}},{key:"initialIndex",value:{name:"number",required:!1}},{key:"loop",value:{name:"boolean",required:!1}},{key:"duration",value:{name:"number",required:!1}},{key:"autoplay",value:{name:"boolean",required:!1}},{key:"delay",value:{name:"number",required:!1}},{key:"autoHeight",value:{name:"boolean",required:!1}},{key:"gap",value:{name:"number",required:!1}}]}},description:""},pagination:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}}}};Z.__docgenInfo={description:"",methods:[],displayName:"CarouselItem"};export{Y as C,Z as a,X as u};
@@ -1 +0,0 @@
1
- import{j as t,r as d}from"./iframe-CLEfhyJc.js";import{c as B,g as F}from"./classname-DoNrELT0.js";import{u as p}from"./index-DRIh_SUo.js";import{T as b}from"./typography-DoV67nnS.js";const g=({fill:n="white",...l})=>t.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...l,children:t.jsx("path",{d:"M5.11112 12.4445H5.10934C4.90756 12.4445 4.71645 12.352 4.59112 12.1947L1.03556 7.75026C0.805341 7.46226 0.851563 7.04359 1.13956 6.81337C1.42845 6.58315 1.84712 6.63026 2.07645 6.91737L5.11467 10.7147L12.1485 2.02492C12.3805 1.7387 12.7991 1.69337 13.0862 1.92626C13.3725 2.15826 13.4169 2.57781 13.1849 2.86403L5.62934 12.1974C5.50223 12.3538 5.31201 12.4445 5.11112 12.4445Z",fill:n})});g.__docgenInfo={description:"",methods:[],displayName:"CheckIcon",props:{fill:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"'white'",computed:!1}}}};const x=({fill:n="white",...l})=>t.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...l,children:t.jsx("rect",{x:"2",y:"6.5",width:"11",height:"2",rx:"1",fill:n})});x.__docgenInfo={description:"",methods:[],displayName:"IndeterminateIcon",props:{fill:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"'white'",computed:!1}}}};const a=F("checkbox"),S=d.forwardRef((n,l)=>{const{disabled:r=!1,theme:C="brand",variant:s="default",className:N,style:k,checked:V,defaultChecked:L,onChange:R,number:T,defaultNumber:q,onNumberChange:z,children:m,typography:_,...h}=n,v=C||"brand",u=d.useRef(null),[w,i]=d.useState(!1),[f,j]=p(n,{valuePropName:"checked",defaultValuePropName:"defaultChecked",trigger:"onChange"}),[o,y]=p(n,{valuePropName:"number",defaultValuePropName:"defaultNumber",trigger:"onNumberChange"}),c=o!==void 0?!0:f;d.useImperativeHandle(l,()=>({focus:()=>u.current?.focus?.(),blur:()=>u.current?.blur?.()}));const $=e=>{if(e.preventDefault(),r)return;const P=o===void 0?1:o+1;y(P)},I=()=>s==="number"?t.jsx("input",{...h,type:"text",inputMode:"numeric",value:o??"",disabled:r,readOnly:!0,ref:u,className:`${a}__input`,onClick:e=>e.stopPropagation(),onFocus:e=>{i(!0),n.onFocus?.(e)},onBlur:e=>{i(!1),n.onBlur?.(e)}}):t.jsx("input",{...h,type:"checkbox",checked:f,disabled:r,onChange:e=>j(e.target.checked),ref:u,className:`${a}__input`,onFocus:e=>{i(!0),n.onFocus?.(e)},onBlur:e=>{i(!1),n.onBlur?.(e)}});return t.jsxs("label",{className:B(a,{[`${a}--checked`]:c,[`${a}--unchecked`]:!c,[`${a}--disabled`]:r,[`${a}--focus`]:w,[`${a}--theme-${v}`]:!0,[`${a}--variant-${s}`]:s!=="default"},N),style:k,onClick:s==="number"?$:void 0,children:[t.jsxs("span",{className:`${a}__button`,children:[t.jsx("span",{className:`${a}__overlay`}),c&&s==="number"&&o!==void 0?t.jsx(b,{component:"span",size:"x-small",weight:700,color:r?"alias-border-disabled":"alias-object-on-brand",className:`${a}__number`,children:o}):c&&s==="indeterminate"?t.jsx(x,{fill:r?"var(--color-alias-border-disabled, rgba(10, 10, 10, 0.25))":"white"}):c?t.jsx(g,{fill:r?"var(--color-alias-border-disabled, rgba(10, 10, 10, 0.25))":"white"}):null,I()]}),m&&t.jsx(b,{component:"span",..._,size:"base",children:m})]})});S.__docgenInfo={description:"",methods:[{name:"focus",docblock:null,modifiers:[],params:[],returns:null},{name:"blur",docblock:null,modifiers:[],params:[],returns:null}],displayName:"Checkbox"};export{S as C};
@@ -1 +0,0 @@
1
- import{g as c}from"./iframe-CLEfhyJc.js";var o={exports:{}};var i;function p(){return i||(i=1,(function(n){(function(){var f={}.hasOwnProperty;function e(){for(var t="",r=0;r<arguments.length;r++){var s=arguments[r];s&&(t=a(t,u(s)))}return t}function u(t){if(typeof t=="string"||typeof t=="number")return t;if(typeof t!="object")return"";if(Array.isArray(t))return e.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var r="";for(var s in t)f.call(t,s)&&t[s]&&(r=a(r,s));return r}function a(t,r){return r?t?t+" "+r:t+r:t}n.exports?(e.default=e,n.exports=e):window.classNames=e})()})(o)),o.exports}var l=p();const x=c(l),v=n=>`vsf-${n}`;export{x as c,v as g};