@v-miniapp/ui-react 1.0.60 → 1.0.72
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/_virtual/_cloneBuffer.js +4 -0
- package/dist/_virtual/_commonjsHelpers.js +8 -0
- package/dist/_virtual/_nodeUtil.js +4 -0
- package/dist/_virtual/cloneDeepWith.js +7 -0
- package/dist/_virtual/isBuffer.js +4 -0
- package/dist/_virtual/isObject.js +7 -0
- package/dist/_virtual/isSameOrAfter.js +7 -0
- package/dist/_virtual/isSameOrAfter2.js +4 -0
- package/dist/_virtual/isSameOrBefore.js +7 -0
- package/dist/_virtual/isSameOrBefore2.js +4 -0
- package/dist/_virtual/merge.js +7 -0
- package/dist/_virtual/omit.js +7 -0
- package/dist/_virtual/pick.js +7 -0
- package/dist/_virtual/throttle.js +7 -0
- package/dist/assets/icons/loader.svg.js +5 -0
- package/dist/assets/icons/placeholder.svg.js +5 -0
- package/dist/assets/images/broken-image.svg.js +5 -0
- package/dist/assets/images/default-error.png.js +4 -0
- package/dist/assets/images/image.svg.js +5 -0
- package/dist/components/ai-app/ai-app.d.ts +7 -0
- package/dist/components/ai-app/ai-app.js +20 -0
- package/dist/components/ai-app/index.d.ts +1 -0
- package/dist/components/alert/alert.js +76 -0
- package/dist/components/app/app.d.ts +1 -6
- package/dist/components/app/app.js +78 -0
- package/dist/components/app/app.store.d.ts +6 -0
- package/dist/components/app/app.store.js +8 -0
- package/dist/components/app/bottom-tab-bar-layout/hook.js +36 -0
- package/dist/components/app/bottom-tab-bar-layout/index.js +38 -0
- package/dist/components/app/bottom-tab-bar-layout/store.js +54 -0
- package/dist/components/app/data-theme.js +29 -0
- package/dist/components/app/navigation-bar-layout/hook.js +39 -0
- package/dist/components/app/navigation-bar-layout/index.js +46 -0
- package/dist/components/app/navigation-bar-layout/store.js +60 -0
- package/dist/components/app/page-layout/hook.js +62 -0
- package/dist/components/app/page-layout/index.js +21 -0
- package/dist/components/app/page-layout/store.js +52 -0
- package/dist/components/avatar/avatar.js +79 -0
- package/dist/components/badge/badge.js +40 -0
- package/dist/components/bottom-tab-bar/bottom-tab-bar.js +90 -0
- package/dist/components/button/button.const.js +7 -0
- package/dist/components/button/button.js +62 -0
- package/dist/components/calendar/calendar-range-sheet.js +66 -0
- package/dist/components/calendar/calendar-single-sheet.js +64 -0
- package/dist/components/calendar/calendar.js +16 -0
- package/dist/components/calendar/default-render.js +16 -0
- package/dist/components/calendar/range-picker.js +301 -0
- package/dist/components/calendar/single-picker.js +186 -0
- package/dist/components/calendar/utils.js +25 -0
- package/dist/components/carousel/carousel.js +47 -0
- package/dist/components/carousel/use-carousel.js +54 -0
- package/dist/components/checkbox/check-icon.js +23 -0
- package/dist/components/checkbox/checkbox.js +131 -0
- package/dist/components/checkbox/indeterminate-icon.js +20 -0
- package/dist/components/chip/chip.js +80 -0
- package/dist/components/date-field/date-field-range.js +153 -0
- package/dist/components/date-field/date-field.js +100 -0
- package/dist/components/date-field/input.js +53 -0
- package/dist/components/date-picker/date-picker-base.js +214 -0
- package/dist/components/date-picker/date-picker-item.js +69 -0
- package/dist/components/date-picker/date-picker-sheet.js +54 -0
- package/dist/components/date-picker/date-picker.constant.js +11 -0
- package/dist/components/date-picker/date-picker.js +76 -0
- package/dist/components/date-picker/date-picker.utils.js +58 -0
- package/dist/components/dialog/dialog.js +115 -0
- package/dist/components/dropdown/dropdown-base.js +22 -0
- package/dist/components/dropdown/dropdown.js +148 -0
- package/dist/components/error/error-boundary.js +28 -0
- package/dist/components/error/error.js +25 -0
- package/dist/components/icon/icon-mapping.js +260 -0
- package/dist/components/icon/icon.js +54 -0
- package/dist/components/image/image.js +70 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/input-wrapper/input-wrapper.js +153 -0
- package/dist/components/label/label.js +58 -0
- package/dist/components/layout/page-loading.js +39 -0
- package/dist/components/layout/page.js +103 -0
- package/dist/components/list-item/list-item.js +36 -0
- package/dist/components/navigation-bar/navigation-bar.d.ts +1 -4
- package/dist/components/navigation-bar/navigation-bar.js +106 -0
- package/dist/components/number-field/number-field.js +162 -0
- package/dist/components/option-item/option-item.js +56 -0
- package/dist/components/pagination/pagination.js +20 -0
- package/dist/components/pull-to-refresh/pull-to-refresh.js +120 -0
- package/dist/components/radio/radio.js +72 -0
- package/dist/components/rating/rating.js +62 -0
- package/dist/components/rating/star.js +22 -0
- package/dist/components/search-field/search-field.js +40 -0
- package/dist/components/section/section-content.js +10 -0
- package/dist/components/section/section-title.js +32 -0
- package/dist/components/section/section.js +21 -0
- package/dist/components/seo/seo.js +18 -0
- package/dist/components/sheet/sheet-body.js +25 -0
- package/dist/components/sheet/sheet-footer.js +11 -0
- package/dist/components/sheet/sheet-header.js +52 -0
- package/dist/components/sheet/sheet.js +72 -0
- package/dist/components/skeleton/skeleton.js +50 -0
- package/dist/components/switch/switch.js +68 -0
- package/dist/components/tab-bar/tab-bar.js +130 -0
- package/dist/components/tab-bar/tab.js +55 -0
- package/dist/components/text-area/text-area.js +75 -0
- package/dist/components/text-field/text-field.js +63 -0
- package/dist/components/toast/index.d.ts +1 -0
- package/dist/components/toast/toast-provider.js +45 -0
- package/dist/components/toast/toast.js +66 -0
- package/dist/components/toast/toast.store.js +35 -0
- package/dist/components/tooltip/tooltip.js +43 -0
- package/dist/components/typography/typography.js +28 -0
- package/dist/components/uploader/helper.js +21 -0
- package/dist/components/uploader/uploader.js +93 -0
- package/dist/components/visibility-sensor/visibility-sensor.js +17 -0
- package/dist/docs/ui-react/icon-list-grid.d.ts +1 -0
- package/dist/external/index.js +13358 -13497
- package/dist/external/styles.css +1 -1
- package/dist/hooks/use-custom-icon-event.js +16 -0
- package/dist/hooks/use-settings-changed.js +16 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +141 -7488
- package/dist/locales/en.json.js +30 -0
- package/dist/locales/index.d.ts +2 -0
- package/dist/locales/index.js +10 -0
- package/dist/locales/vi.json.js +30 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isSameOrAfter.js +18 -0
- package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isSameOrBefore.js +18 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_DataView.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Hash.js +22 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_ListCache.js +22 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Map.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_MapCache.js +22 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Promise.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Set.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Stack.js +20 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Symbol.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_Uint8Array.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_WeakMap.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_apply.js +22 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_arrayEach.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_arrayFilter.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_arrayLikeKeys.js +26 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_arrayMap.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_arrayPush.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_assignMergeValue.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_assignValue.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_assocIndexOf.js +17 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseAssign.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseAssignIn.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseAssignValue.js +19 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseClone.js +70 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseCreate.js +23 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseFlatten.js +20 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseFor.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseGet.js +18 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseGetAllKeys.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseGetTag.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseHasIn.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseIsArguments.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseIsMap.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseIsNative.js +22 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseIsSet.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseIsTypedArray.js +17 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseKeys.js +20 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseKeysIn.js +21 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseMerge.js +27 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseMergeDeep.js +38 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_basePick.js +17 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_basePickBy.js +20 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseRest.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseSet.js +31 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseSetToString.js +20 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseSlice.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseTimes.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseToString.js +24 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseTrim.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseUnary.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseUnset.js +34 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_castPath.js +17 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_cloneArrayBuffer.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_cloneBuffer.js +19 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_cloneDataView.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_cloneRegExp.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_cloneSymbol.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_cloneTypedArray.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_copyArray.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_copyObject.js +21 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_copySymbols.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_copySymbolsIn.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_coreJsData.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_createAssigner.js +22 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_createBaseFor.js +19 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_customOmitClone.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_defineProperty.js +17 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_flatRest.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_freeGlobal.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getAllKeys.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getAllKeysIn.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getMapData.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getNative.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getPrototype.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getRawTag.js +21 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getSymbols.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getSymbolsIn.js +18 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getTag.js +33 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_getValue.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hasPath.js +26 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashClear.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashDelete.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashGet.js +19 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashHas.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hashSet.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_initCloneArray.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_initCloneByTag.js +48 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_initCloneObject.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isFlattenable.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isIndex.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isIterateeCall.js +20 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isKey.js +18 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isKeyable.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isMasked.js +17 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_isPrototype.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheClear.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheDelete.js +18 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheGet.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheHas.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_listCacheSet.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheClear.js +20 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheDelete.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheGet.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheHas.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_mapCacheSet.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_memoizeCapped.js +17 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_nativeCreate.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_nativeKeys.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_nativeKeysIn.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_nodeUtil.js +19 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_objectToString.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_overArg.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_overRest.js +21 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_parent.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_root.js +11 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_safeGet.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_setToString.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_shortOut.js +22 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_stackClear.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_stackDelete.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_stackGet.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_stackHas.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_stackSet.js +23 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_stringToPath.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_toKey.js +17 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_toSource.js +23 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_trimmedEndIndex.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/cloneDeepWith.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/constant.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/debounce.js +60 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/eq.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/flatten.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/hasIn.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/identity.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isArguments.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isArray.js +10 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isArrayLike.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isArrayLikeObject.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isBuffer.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isFunction.js +18 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isLength.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isMap.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isObject.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isObjectLike.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isPlainObject.js +22 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isSet.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isSymbol.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/isTypedArray.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/keys.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/keysIn.js +16 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/last.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/memoize.js +23 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/merge.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/now.js +13 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/omit.js +29 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/pick.js +14 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/stubArray.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/stubFalse.js +12 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/throttle.js +22 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/toNumber.js +28 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/toPlainObject.js +15 -0
- package/dist/node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/toString.js +14 -0
- package/dist/styles.css +1 -1
- package/dist/utils/bound.js +7 -0
- package/dist/utils/can-use-dom.js +4 -0
- package/dist/utils/classname.js +6 -0
- package/dist/utils/colors.gen.js +371 -0
- package/dist/utils/colors.js +8 -0
- package/dist/utils/convert-px.js +14 -0
- package/dist/utils/date.d.ts +2 -1
- package/dist/utils/date.js +9 -0
- package/dist/utils/deep-clone.js +10 -0
- package/dist/utils/dev-log.js +7 -0
- package/dist/utils/get-scroll-parent.js +20 -0
- package/dist/utils/is-dev.js +4 -0
- package/dist/utils/rubberband.js +11 -0
- package/dist/utils/sleep.js +4 -0
- package/dist/utils/supports-passive.js +15 -0
- package/dist/utils/to-css-length.js +6 -0
- package/dist/vsf/choose-image.js +14 -0
- package/dist-storybook/assets/AIApp-C4keJkW8.js +37 -0
- package/dist-storybook/assets/{App-CJxOxRXd.js → App-BkiRuUOF.js} +1 -1
- package/dist-storybook/assets/Color-6BZIO3FS-EdXZe4iv.js +1 -0
- package/dist-storybook/assets/{DEEPLINK-B5vUshJ4.js → DEEPLINK-CvpIbZVm.js} +1 -1
- package/dist-storybook/assets/DocsRenderer-LL677BLK-Ch7ovClC.js +2 -0
- package/dist-storybook/assets/{EVENTS-DIl-sE2t.js → EVENTS-Bnl2ehlm.js} +1 -1
- package/dist-storybook/assets/{GETTING_STARTED-CR4dG_o7.js → GETTING_STARTED-BYcN9hg3.js} +1 -1
- package/dist-storybook/assets/{GETTING_STARTED-CtonLhRi.js → GETTING_STARTED-BmHWFQQE.js} +1 -1
- package/dist-storybook/assets/GETTING_STARTED-C1AOB25Z.js +45 -0
- package/dist-storybook/assets/{GETTING_STARTED-CS2BpDsP.js → GETTING_STARTED-CBY9dL2_.js} +1 -1
- package/dist-storybook/assets/ICON-BaZgXbtw.js +6 -0
- package/dist-storybook/assets/ICON-CT1pTB1A.js +6 -0
- package/dist-storybook/assets/{INFINITE_SCROLL-BerukJIr.js → INFINITE_SCROLL-BJeWhgO7.js} +1 -1
- package/dist-storybook/assets/{LocalesProvider-CehS9yzW.js → LocalesProvider-CQEwtoq3.js} +1 -1
- package/dist-storybook/assets/{MIGRATE_DARKMODE_TO_THEME-CRf-7Wcz.js → MIGRATE_DARKMODE_TO_THEME-DCxXgvQC.js} +1 -1
- package/dist-storybook/assets/{MIGRATION_GUIDE-CRIHuXpT.js → MIGRATION_GUIDE-BN_V-xNj.js} +1 -1
- package/dist-storybook/assets/OVERVIEW-AI-CLWBzviY.js +35 -0
- package/dist-storybook/assets/{OVERVIEW-DayETux4.js → OVERVIEW-Byly3lQV.js} +1 -1
- package/dist-storybook/assets/{Router-CGsO5Wd_.js → Router-CO6rjSXr.js} +1 -1
- package/dist-storybook/assets/{TAILWIND_INTEGRATION-RPvFP-GI.js → TAILWIND_INTEGRATION-CpN4_fSu.js} +1 -1
- package/dist-storybook/assets/{THEME-C-pA_uq_.js → THEME-B9Y39f9D.js} +1 -1
- package/dist-storybook/assets/WithTooltip-65CFNBJE-D6J_7FjK.js +9 -0
- package/dist-storybook/assets/{alert.stories-CFBhdabd.js → alert.stories-CUItfPLn.js} +12 -12
- package/dist-storybook/assets/app.store-BJVKVv1J.js +1 -0
- package/dist-storybook/assets/avatar.stories-8_vV7Bb0.js +136 -0
- package/dist-storybook/assets/{axe-Cj9fkEY9.js → axe-4EaTvypG.js} +13 -13
- package/dist-storybook/assets/badge-Gh2kTOE3.js +1 -0
- package/dist-storybook/assets/{badge.stories-DhVKBE64.js → badge.stories-BXGAtgaV.js} +3 -3
- package/dist-storybook/assets/blocks-CB7UwFa4.js +758 -0
- package/dist-storybook/assets/bottom-tab-bar.stories-OrY-k1sb.js +280 -0
- package/dist-storybook/assets/button-BLW8SOpg.js +1 -0
- package/dist-storybook/assets/{button.stories-DgRH6oVV.js → button.stories--0kpp_af.js} +3 -3
- package/dist-storybook/assets/calendar-ySr-9cXG.js +1 -0
- package/dist-storybook/assets/{calendar.stories-B0K_T9ak.js → calendar.stories-4MQj1nsX.js} +1 -1
- package/dist-storybook/assets/carousel.stories-CMtljvBR.js +253 -0
- package/dist-storybook/assets/checkbox.stories-xYjsVg2X.js +201 -0
- package/dist-storybook/assets/{chip.stories-D0908ZyT.js → chip.stories-DYEfUGq3.js} +12 -12
- package/dist-storybook/assets/classname-Bl5epEs-.js +1 -0
- package/dist-storybook/assets/client-CN8vOzuD.js +9 -0
- package/dist-storybook/assets/{date-C1W0DfQy.js → date-DWIyMGld.js} +1 -1
- package/dist-storybook/assets/date-field.stories-5Tlzdpvr.js +129 -0
- package/dist-storybook/assets/date-picker-DeB43YU4.js +1 -0
- package/dist-storybook/assets/{date-picker.stories-Bahq3f1W.js → date-picker.stories-Shn-MmVG.js} +1 -1
- package/dist-storybook/assets/dialog.stories-DeNKN0oJ.js +212 -0
- package/dist-storybook/assets/dropdown.stories-Bqmu2_KM.js +449 -0
- package/dist-storybook/assets/{embla-carousel-react.esm-Pp2OIUrN.js → embla-carousel-react.esm-DOEAp-w3.js} +1 -1
- package/dist-storybook/assets/{en-Cs9O0XWn.js → en-IjeCvZ5U.js} +1 -1
- package/dist-storybook/assets/formatter-EIJCOSYU-DZLV30KU.js +1 -0
- package/dist-storybook/assets/icon-Cc9W858e.js +1 -0
- package/dist-storybook/assets/icon-list-grid-CSnpdoAW.js +1 -0
- package/dist-storybook/assets/{icon.stories-qg8UAHBM.js → icon.stories-DE484rTd.js} +3 -3
- package/dist-storybook/assets/iframe-BBKyXin_.css +1 -0
- package/dist-storybook/assets/iframe-Crg_lbde.js +1119 -0
- package/dist-storybook/assets/image-CB4oeTy-.js +9 -0
- package/dist-storybook/assets/{image.stories-sQtCaoL2.js → image.stories-BlYIb_Qu.js} +1 -1
- package/dist-storybook/assets/index-B24pfkXD.js +1 -0
- package/dist-storybook/assets/{index-1AHvPexM.js → index-CdnALcTP.js} +1 -1
- package/dist-storybook/assets/{index-DWjPAWoJ.js → index-hDlmuyu2.js} +1 -1
- package/dist-storybook/assets/input-wrapper-Gd3QJKqj.js +1 -0
- package/dist-storybook/assets/label-zfqCJTGJ.js +22 -0
- package/dist-storybook/assets/{label.stories-CCtGPDrS.js → label.stories-C-MVt-cu.js} +3 -3
- package/dist-storybook/assets/matchers-5TDFFDYO-HJu_DfWo.js +14 -0
- package/dist-storybook/assets/navigation-bar.stories-CZ-y3eDE.js +136 -0
- package/dist-storybook/assets/number-field.stories-BA0FySSU.js +167 -0
- package/dist-storybook/assets/omit-CRXr8Lio.js +1 -0
- package/dist-storybook/assets/option-item-DFWc14Up.js +1 -0
- package/dist-storybook/assets/{option-item.stories-ClUj8qVT.js → option-item.stories-DqA-ydWX.js} +3 -3
- package/dist-storybook/assets/pagination-CjgiVNvu.js +1 -0
- package/dist-storybook/assets/{pagination.stories-C9j6mE5z.js → pagination.stories-BsKHvdF4.js} +4 -4
- package/dist-storybook/assets/{radio.stories-D8_YUTw1.js → radio.stories-CBmxZRxo.js} +10 -10
- package/dist-storybook/assets/{rating.stories-BIftLeu2.js → rating.stories-CcdFtcNH.js} +9 -9
- package/dist-storybook/assets/react-18-D2tl8ksm.js +1 -0
- package/dist-storybook/assets/{react-zqqxT5R_.js → react-DO0-owxu.js} +1 -1
- package/dist-storybook/assets/search-field-zl4ROLfn.js +1 -0
- package/dist-storybook/assets/{search-field.stories-D1okdN8e.js → search-field.stories-DoclnxtC.js} +1 -1
- package/dist-storybook/assets/{section.stories-Cq5CY978.js → section.stories-Bqz_QgYp.js} +8 -8
- package/dist-storybook/assets/sheet-body-2dWL2AE5.js +1 -0
- package/dist-storybook/assets/sheet-footer-DuPhbVOb.js +1 -0
- package/dist-storybook/assets/{sheet.stories-DPcC0I5i.js → sheet.stories-CoXnt4LG.js} +4 -4
- package/dist-storybook/assets/skeleton-BVLpHxKT.js +1 -0
- package/dist-storybook/assets/{skeleton.stories-CD3J1XrJ.js → skeleton.stories-B-OfMZId.js} +3 -3
- package/dist-storybook/assets/{store-BmYgrUro.js → store-BwIebEt6.js} +5 -5
- package/dist-storybook/assets/{switch.stories-C5SDbdGL.js → switch.stories-D4PQjgbo.js} +9 -9
- package/dist-storybook/assets/syntaxhighlighter-ED5Y7EFY-BxRQp_WE.js +6 -0
- package/dist-storybook/assets/tab-bar.stories-BrcQMypS.js +164 -0
- package/dist-storybook/assets/{text-area.stories-3Z574UAD.js → text-area.stories-Bpaw2_4A.js} +10 -10
- package/dist-storybook/assets/text-field-CqJG0bIl.js +1 -0
- package/dist-storybook/assets/{text-field.stories-DzjpcKin.js → text-field.stories-PQoP3DbL.js} +1 -1
- package/dist-storybook/assets/toast.stories-DmPy9T3m.js +209 -0
- package/dist-storybook/assets/{tooltip.stories-DEnYdL1d.js → tooltip.stories-Be_kIaDc.js} +8 -8
- package/dist-storybook/assets/typography-CMIMyivt.js +1 -0
- package/dist-storybook/assets/{typography.stories-DWxFgTz3.js → typography.stories-DSt5W_AG.js} +3 -3
- package/dist-storybook/assets/uploader.stories-C5CmeXEk.js +65 -0
- package/dist-storybook/assets/{use-app-pause-CyjeIEPG.js → use-app-pause-_ycnhKwZ.js} +3 -3
- package/dist-storybook/assets/{use-app-resume-DntO6Rkm.js → use-app-resume-CWb2s-wo.js} +1 -1
- package/dist-storybook/assets/{use-bottom-tab-bar-Da7gjw6y.js → use-bottom-tab-bar--DRl-8c4.js} +1 -1
- package/dist-storybook/assets/{use-custom-icon-event-BEYPYrKY.js → use-custom-icon-event-BXcRPkLg.js} +1 -1
- package/dist-storybook/assets/{use-did-hide-Do-KOSzV.js → use-did-hide-LBcrwoUo.js} +1 -1
- package/dist-storybook/assets/{use-did-show-Bv9k7DdG.js → use-did-show-BXLstTgt.js} +1 -1
- package/dist-storybook/assets/{use-histories-Ci1HfRe-.js → use-histories-Cz7ncXaj.js} +1 -1
- package/dist-storybook/assets/{use-history-CkVE1jRy.js → use-history-B_w6SPwr.js} +1 -1
- package/dist-storybook/assets/{use-language-Bg-LzpzQ.js → use-language-D84C9QNT.js} +1 -1
- package/dist-storybook/assets/{use-load-more-eaC8W6Cc.js → use-load-more-Bb9YFkAE.js} +1 -1
- package/dist-storybook/assets/{use-location-BMrQnhPi.js → use-location-DnxJ5FvJ.js} +1 -1
- package/dist-storybook/assets/{use-navigate-BwwmhToy.js → use-navigate-OLqoL3vR.js} +3 -3
- package/dist-storybook/assets/{use-navigation-bar-DzgWeTpM.js → use-navigation-bar-D5BX6S-r.js} +15 -15
- package/dist-storybook/assets/{use-navigation-type-DNvXTqYH.js → use-navigation-type-Cq7T35ur.js} +1 -1
- package/dist-storybook/assets/{use-page-layout-BA2HvjAQ.js → use-page-layout-BrFRWwC6.js} +1 -1
- package/dist-storybook/assets/{use-page-scroll-D_gjlV-S.js → use-page-scroll-BZ8XiPza.js} +1 -1
- package/dist-storybook/assets/{use-pull-to-refresh-SZfswIA6.js → use-pull-to-refresh-BEjtxiFn.js} +1 -1
- package/dist-storybook/assets/{use-settings-changed-D2gdx5rD.js → use-settings-changed-UaQRSWAg.js} +1 -1
- package/dist-storybook/assets/{use-translate-BTC2AQ0k.js → use-translate-BO8E9Sde.js} +1 -1
- package/dist-storybook/iframe.html +58 -40
- package/dist-storybook/index.html +8 -16
- package/dist-storybook/index.json +1 -1
- package/dist-storybook/project.json +1 -1
- package/dist-storybook/sb-addons/a11y-2/manager-bundle.js +55 -3
- package/dist-storybook/sb-addons/docs-1/manager-bundle.js +1 -149
- package/dist-storybook/sb-addons/storybook-build-3/manager-bundle.js +19 -1
- package/dist-storybook/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +93 -436
- package/dist-storybook/sb-manager/globals-runtime.js +73307 -65142
- package/dist-storybook/sb-manager/globals.js +6 -16
- package/dist-storybook/sb-manager/manager-stores.js +23 -0
- package/dist-storybook/sb-manager/runtime.js +17679 -10455
- package/dist-storybook/stories-data.json +91 -27
- package/dist-storybook/vite-inject-mocker-entry.js +2 -2
- package/package.json +5 -5
- package/dist-storybook/assets/Color-AVL7NMMY-DwohVA43.js +0 -1
- package/dist-storybook/assets/DocsRenderer-PQXLIZUC-vNsl3A7z.js +0 -2
- package/dist-storybook/assets/_baseClone-4nOrhHpR.js +0 -1
- package/dist-storybook/assets/alert-D3VdqAYm.js +0 -1
- package/dist-storybook/assets/app-B__CxZQv.js +0 -1
- package/dist-storybook/assets/avatar-BVV1WSnD.js +0 -1
- package/dist-storybook/assets/avatar.stories-D0RA2Mhh.js +0 -136
- package/dist-storybook/assets/badge-DLt8CmDs.js +0 -1
- package/dist-storybook/assets/blocks-D4qvS4eZ.js +0 -1243
- package/dist-storybook/assets/bottom-tab-bar-UaYvPAic.js +0 -115
- package/dist-storybook/assets/bottom-tab-bar.stories--7Qh-68J.js +0 -186
- package/dist-storybook/assets/button-CbLEqALK.js +0 -1
- package/dist-storybook/assets/calendar-C7tiySn0.js +0 -1
- package/dist-storybook/assets/carousel-C1nQGnJZ.js +0 -37
- package/dist-storybook/assets/carousel.stories-C5d6yLzd.js +0 -217
- package/dist-storybook/assets/checkbox-Bs8ghsWP.js +0 -1
- package/dist-storybook/assets/checkbox.stories-CG74gIlt.js +0 -201
- package/dist-storybook/assets/chip-D4_ukvFv.js +0 -1
- package/dist-storybook/assets/date-field-range-DSAQp9qR.js +0 -1
- package/dist-storybook/assets/date-field.stories-Dx6-qeWT.js +0 -129
- package/dist-storybook/assets/date-picker--PiU9sOL.js +0 -1
- package/dist-storybook/assets/dialog-8K5u-kre.js +0 -1
- package/dist-storybook/assets/dialog.stories-BxYc78Eo.js +0 -212
- package/dist-storybook/assets/dropdown-BeoO7m-R.js +0 -247
- package/dist-storybook/assets/dropdown.stories-Bfhg63tZ.js +0 -200
- package/dist-storybook/assets/icon-CgGksgRS.js +0 -1
- package/dist-storybook/assets/iframe-BKfReaAn.css +0 -1
- package/dist-storybook/assets/iframe-C0PGuV5s.js +0 -1071
- package/dist-storybook/assets/image-BdsCB1je.js +0 -9
- package/dist-storybook/assets/index-BLzgbpm2.js +0 -1
- package/dist-storybook/assets/index-SzFZQQjs.js +0 -1
- package/dist-storybook/assets/input-wrapper-DkEl0Eih.js +0 -1
- package/dist-storybook/assets/label-CHVpMhb5.js +0 -27
- package/dist-storybook/assets/matchers-7Z3WT2CE-Dw4MQV_s.js +0 -14
- package/dist-storybook/assets/navigation-bar-TpF0DSXB.js +0 -79
- package/dist-storybook/assets/navigation-bar.stories-CNXAxMYL.js +0 -73
- package/dist-storybook/assets/number-field-CvCF5adO.js +0 -1
- package/dist-storybook/assets/number-field.stories-Dsb_eChm.js +0 -167
- package/dist-storybook/assets/omit-D04qL5V_.js +0 -1
- package/dist-storybook/assets/option-item-Bmby544G.js +0 -1
- package/dist-storybook/assets/pagination-MBP1YLhT.js +0 -1
- package/dist-storybook/assets/proxy-edvPwIiD.js +0 -1
- package/dist-storybook/assets/radio-DRPO7cjx.js +0 -1
- package/dist-storybook/assets/rating-CTv8C1tH.js +0 -1
- package/dist-storybook/assets/react-18-CacBUmwb.js +0 -9
- package/dist-storybook/assets/search-field-CophTGGH.js +0 -1
- package/dist-storybook/assets/section-content-dVOJuOaN.js +0 -1
- package/dist-storybook/assets/sheet-footer-BL2JAvmb.js +0 -1
- package/dist-storybook/assets/skeleton-CmGRbWqE.js +0 -1
- package/dist-storybook/assets/switch-Cc-NvT4X.js +0 -1
- package/dist-storybook/assets/tab-bar-DTyg7tFP.js +0 -31
- package/dist-storybook/assets/tab-bar.stories-zKrihgXo.js +0 -136
- package/dist-storybook/assets/text-area-WRb8Dkvn.js +0 -1
- package/dist-storybook/assets/text-field-DrODy0yz.js +0 -1
- package/dist-storybook/assets/toast-provider-ChNGFQlt.js +0 -9
- package/dist-storybook/assets/toast.stories-Zj4qfKO_.js +0 -201
- package/dist-storybook/assets/tooltip-CrxOWTXS.js +0 -1
- package/dist-storybook/assets/typography-BcLxefPi.js +0 -1
- package/dist-storybook/assets/uploader.stories-DQN8yjt-.js +0 -65
- package/dist-storybook/assets/visibility-sensor-FN9n9CLs.js +0 -1
- package/dist-storybook/sb-manager/globals-module-info.js +0 -799
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { useCallback as t } from "react";
|
|
2
|
+
import h from "../../../_virtual/merge.js";
|
|
3
|
+
import { useNavigationBarLayoutStore as l } from "./store.js";
|
|
4
|
+
import { useLocation as y } from "@v-miniapp/router";
|
|
5
|
+
const x = () => {
|
|
6
|
+
const { pages: v, app: B, setPage: n, setApp: s, resetApp: i, resetPage: p } = l(), c = y(), e = c.key, g = c.pathname, m = v[e] || {}, u = B, N = h(
|
|
7
|
+
{ divider: !0, transparent: "none" },
|
|
8
|
+
u,
|
|
9
|
+
m
|
|
10
|
+
), a = t(
|
|
11
|
+
(r) => n(e, r),
|
|
12
|
+
[n, e]
|
|
13
|
+
), o = t(
|
|
14
|
+
(r) => s(r),
|
|
15
|
+
[s]
|
|
16
|
+
), d = t(() => {
|
|
17
|
+
a({ hidden: !0 });
|
|
18
|
+
}, [a]), P = t(() => {
|
|
19
|
+
o({ hidden: !0 });
|
|
20
|
+
}, [o]), A = t(() => {
|
|
21
|
+
p(e, g);
|
|
22
|
+
}, [p, e, g]), f = t(() => {
|
|
23
|
+
i();
|
|
24
|
+
}, [i]);
|
|
25
|
+
return {
|
|
26
|
+
state: N,
|
|
27
|
+
pageState: m,
|
|
28
|
+
appState: u,
|
|
29
|
+
setPageNavigationBar: a,
|
|
30
|
+
setAppNavigationBar: o,
|
|
31
|
+
removePageNavigationBar: d,
|
|
32
|
+
removeAppNavigationBar: P,
|
|
33
|
+
resetPageNavigationBar: A,
|
|
34
|
+
resetAppNavigationBar: f
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
x as useNavigationBar
|
|
39
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsxs as l, Fragment as p, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as f, createElement as v } from "react";
|
|
3
|
+
import { getPrefixClassName as g } from "../../../utils/classname.js";
|
|
4
|
+
import { useNavigate as d, useLocation as h, useHistories as u } from "@v-miniapp/router";
|
|
5
|
+
import { useNavigationBar as y } from "./hook.js";
|
|
6
|
+
import { NavigationBar as N } from "../../navigation-bar/navigation-bar.js";
|
|
7
|
+
import n from "classnames";
|
|
8
|
+
const i = g("navigation-bar-layout"), j = ({ children: s }) => {
|
|
9
|
+
const c = d(), a = h(), m = u(), { state: t } = y(), e = !t || t.hidden, o = t.transparent && t.transparent !== "none";
|
|
10
|
+
return f(() => {
|
|
11
|
+
document.body?.style?.setProperty(
|
|
12
|
+
"--vsf-current-navigation-bar-height",
|
|
13
|
+
e ? "0px" : "var(--vsf-title-bar-height, 56px)"
|
|
14
|
+
);
|
|
15
|
+
}, [e]), /* @__PURE__ */ l(p, { children: [
|
|
16
|
+
!e && /* @__PURE__ */ r(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
className: n(`${i}`, {
|
|
20
|
+
[`${i}--sticky`]: o
|
|
21
|
+
}),
|
|
22
|
+
children: /* @__PURE__ */ v(
|
|
23
|
+
N,
|
|
24
|
+
{
|
|
25
|
+
onBackClick: () => m.length > 1 ? c(-1) : vsf.exitMiniApp(),
|
|
26
|
+
...t,
|
|
27
|
+
locationKey: a.key,
|
|
28
|
+
key: a.key
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
/* @__PURE__ */ r(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
className: n(`${i}__children`, {
|
|
37
|
+
[`${i}__children--full`]: e || o
|
|
38
|
+
}),
|
|
39
|
+
children: s
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
] });
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
j as NavigationBarLayout
|
|
46
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { create as l } from "zustand";
|
|
2
|
+
import s from "../../../_virtual/merge.js";
|
|
3
|
+
import { deepCloneWithoutComponent as p } from "../../../utils/deep-clone.js";
|
|
4
|
+
import { routerEvents as f } from "@v-miniapp/router";
|
|
5
|
+
const g = {
|
|
6
|
+
hidden: !0,
|
|
7
|
+
divider: !0,
|
|
8
|
+
transparent: "none",
|
|
9
|
+
title: "",
|
|
10
|
+
backIcon: !1,
|
|
11
|
+
leftIcon: !1,
|
|
12
|
+
rightIcon: !1
|
|
13
|
+
}, i = l((o) => ({
|
|
14
|
+
pageConfigs: {},
|
|
15
|
+
appConfig: g,
|
|
16
|
+
pages: {},
|
|
17
|
+
app: g,
|
|
18
|
+
setPage: (t, n) => o((e) => ({
|
|
19
|
+
pages: s({}, e.pages, {
|
|
20
|
+
[t]: n
|
|
21
|
+
})
|
|
22
|
+
})),
|
|
23
|
+
setApp: (t) => o((n) => ({
|
|
24
|
+
app: s({}, n.app, t)
|
|
25
|
+
})),
|
|
26
|
+
resetPage: (t, n) => o((e) => ({
|
|
27
|
+
pages: {
|
|
28
|
+
...e.pages,
|
|
29
|
+
[t]: p(e.pageConfigs[n])
|
|
30
|
+
}
|
|
31
|
+
})),
|
|
32
|
+
resetApp: () => o((t) => ({
|
|
33
|
+
app: p(t.appConfig)
|
|
34
|
+
}))
|
|
35
|
+
}));
|
|
36
|
+
f.on("afterInit", (o) => {
|
|
37
|
+
const { pageConfigs: t, appConfig: n } = i.getState(), e = p(n), r = Object.fromEntries(
|
|
38
|
+
o.histories.map((a) => {
|
|
39
|
+
const c = t[a.location.pathname];
|
|
40
|
+
return [a.location.key, p(c)];
|
|
41
|
+
})
|
|
42
|
+
);
|
|
43
|
+
i.setState({
|
|
44
|
+
app: e,
|
|
45
|
+
pages: r
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
f.on("afterHistoryChange", (o) => {
|
|
49
|
+
const { pageConfigs: t, pages: n } = i.getState(), e = { ...n }, r = o.history.location.key;
|
|
50
|
+
r in e || (e[r] = p(
|
|
51
|
+
t[o.history.location.pathname]
|
|
52
|
+
)), o.histories.forEach((a) => {
|
|
53
|
+
a.location.key in e || delete e[a.location.key];
|
|
54
|
+
}), i.setState({
|
|
55
|
+
pages: e
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
export {
|
|
59
|
+
i as useNavigationBarLayoutStore
|
|
60
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { useRef as P, useEffect as l, useCallback as a } from "react";
|
|
2
|
+
import v from "../../../_virtual/merge.js";
|
|
3
|
+
import { usePageLayoutStore as E } from "./store.js";
|
|
4
|
+
import { useLocation as O } from "@v-miniapp/router";
|
|
5
|
+
const f = () => {
|
|
6
|
+
const { pages: t, app: o, setPage: e, setApp: s, resetApp: n, resetPage: c } = E(), y = O(), r = y.key, L = y.pathname, i = t[r] || {}, m = o, R = v({ scrollRestoration: !0 }, m, i), u = a(
|
|
7
|
+
(p) => e(r, p),
|
|
8
|
+
[e, r]
|
|
9
|
+
), g = a(
|
|
10
|
+
(p) => s(p),
|
|
11
|
+
[s]
|
|
12
|
+
), h = a(() => {
|
|
13
|
+
u({ hidden: !0 });
|
|
14
|
+
}, [u]), S = a(() => {
|
|
15
|
+
g({ hidden: !0 });
|
|
16
|
+
}, [g]), d = a(() => {
|
|
17
|
+
c(r, L);
|
|
18
|
+
}, [c, r, L]), A = a(() => {
|
|
19
|
+
n();
|
|
20
|
+
}, [n]);
|
|
21
|
+
return {
|
|
22
|
+
state: R,
|
|
23
|
+
pageState: i,
|
|
24
|
+
appState: m,
|
|
25
|
+
setPagePageLayout: u,
|
|
26
|
+
setAppPageLayout: g,
|
|
27
|
+
removePagePageLayout: h,
|
|
28
|
+
removeAppPageLayout: S,
|
|
29
|
+
resetPagePageLayout: d,
|
|
30
|
+
resetAppPageLayout: A
|
|
31
|
+
};
|
|
32
|
+
}, J = (t) => {
|
|
33
|
+
const { setPagePageLayout: o } = f(), e = P(t);
|
|
34
|
+
e.current = t, l(() => {
|
|
35
|
+
o({
|
|
36
|
+
pullToRefresh: {
|
|
37
|
+
onRefresh: () => e.current()
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}, [o]);
|
|
41
|
+
}, K = (t, o) => {
|
|
42
|
+
const { setPagePageLayout: e } = f(), s = P(t);
|
|
43
|
+
s.current = t, l(() => {
|
|
44
|
+
e({
|
|
45
|
+
onPageScroll: (n, c) => s.current?.(n, c),
|
|
46
|
+
pageScrollOptions: o
|
|
47
|
+
});
|
|
48
|
+
}, [e, JSON.stringify(o)]);
|
|
49
|
+
}, M = (t) => {
|
|
50
|
+
const { setPagePageLayout: o } = f(), e = P(t);
|
|
51
|
+
e.current = t, l(() => {
|
|
52
|
+
o({
|
|
53
|
+
onEndReached: () => e.current()
|
|
54
|
+
});
|
|
55
|
+
}, [o]);
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
M as useLoadMore,
|
|
59
|
+
f as usePageLayout,
|
|
60
|
+
K as usePageScroll,
|
|
61
|
+
J as usePullToRefresh
|
|
62
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { useLocation as f, routerEvents as g } from "@v-miniapp/router";
|
|
3
|
+
import { useEffect as p } from "react";
|
|
4
|
+
import { usePageLayout as d } from "./hook.js";
|
|
5
|
+
import { Page as l } from "../../layout/page.js";
|
|
6
|
+
const n = (t) => `vsf-page-${t}`, E = ({ children: t }) => {
|
|
7
|
+
const a = f(), o = n(a.key), {
|
|
8
|
+
state: { scrollRestoration: e, hidden: s, ...i }
|
|
9
|
+
} = d();
|
|
10
|
+
return p(() => g.on("beforeHistoryChange", ({ history: c }) => {
|
|
11
|
+
const m = n(c.location.key), r = document.getElementById(m);
|
|
12
|
+
!r || e || r.scrollTo({
|
|
13
|
+
top: 0,
|
|
14
|
+
behavior: "instant"
|
|
15
|
+
});
|
|
16
|
+
}), [o, e]), s ? t : /* @__PURE__ */ u(l, { ...i, id: o, children: t });
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
E as PageLayout,
|
|
20
|
+
n as getPageId
|
|
21
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { create as m } from "zustand";
|
|
2
|
+
import s from "../../../_virtual/merge.js";
|
|
3
|
+
import { deepCloneWithoutComponent as a } from "../../../utils/deep-clone.js";
|
|
4
|
+
import { routerEvents as f } from "@v-miniapp/router";
|
|
5
|
+
const g = {}, i = m((t) => ({
|
|
6
|
+
pageConfigs: {},
|
|
7
|
+
appConfig: g,
|
|
8
|
+
pages: {},
|
|
9
|
+
app: g,
|
|
10
|
+
setPage: (o, p) => t((e) => ({
|
|
11
|
+
pages: s({}, e.pages, {
|
|
12
|
+
[o]: p
|
|
13
|
+
})
|
|
14
|
+
})),
|
|
15
|
+
setApp: (o) => t((p) => ({
|
|
16
|
+
app: s({}, p.app, o)
|
|
17
|
+
})),
|
|
18
|
+
resetPage: (o, p) => t((e) => ({
|
|
19
|
+
pages: {
|
|
20
|
+
...e.pages,
|
|
21
|
+
[o]: a(e.pageConfigs[p])
|
|
22
|
+
}
|
|
23
|
+
})),
|
|
24
|
+
resetApp: () => t((o) => ({
|
|
25
|
+
app: a(o.appConfig)
|
|
26
|
+
}))
|
|
27
|
+
}));
|
|
28
|
+
f.on("afterInit", (t) => {
|
|
29
|
+
const { pageConfigs: o, appConfig: p } = i.getState(), e = a(p), r = Object.fromEntries(
|
|
30
|
+
t.histories.map((n) => {
|
|
31
|
+
const c = o[n.location.pathname];
|
|
32
|
+
return [n.location.key, a(c)];
|
|
33
|
+
})
|
|
34
|
+
);
|
|
35
|
+
i.setState({
|
|
36
|
+
app: e,
|
|
37
|
+
pages: r
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
f.on("afterHistoryChange", (t) => {
|
|
41
|
+
const { pageConfigs: o, pages: p } = i.getState(), e = { ...p }, r = t.history.location.key;
|
|
42
|
+
r in e || (e[r] = a(
|
|
43
|
+
o[t.history.location.pathname]
|
|
44
|
+
)), t.histories.forEach((n) => {
|
|
45
|
+
n.location.key in e || delete e[n.location.key];
|
|
46
|
+
}), i.setState({
|
|
47
|
+
pages: e
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
export {
|
|
51
|
+
i as usePageLayoutStore
|
|
52
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsxs as p, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { getPrefixClassName as x } from "../../utils/classname.js";
|
|
3
|
+
import { useState as $, useEffect as u } from "react";
|
|
4
|
+
import { Image as y } from "../image/image.js";
|
|
5
|
+
import { Typography as v } from "../typography/typography.js";
|
|
6
|
+
import w from "classnames";
|
|
7
|
+
const r = x("avatar"), M = ({
|
|
8
|
+
size: e = 40,
|
|
9
|
+
shape: o = "rounded",
|
|
10
|
+
border: a,
|
|
11
|
+
label: m,
|
|
12
|
+
labelColor: S,
|
|
13
|
+
labelSize: f,
|
|
14
|
+
color: N,
|
|
15
|
+
style: z,
|
|
16
|
+
className: c,
|
|
17
|
+
src: i,
|
|
18
|
+
srcSet: d,
|
|
19
|
+
...g
|
|
20
|
+
}) => {
|
|
21
|
+
const [h, n] = $(!1), b = I(e), l = !h && (!!i || !!d);
|
|
22
|
+
return u(() => {
|
|
23
|
+
n(!1);
|
|
24
|
+
}, [i, d]), /* @__PURE__ */ p(
|
|
25
|
+
"div",
|
|
26
|
+
{
|
|
27
|
+
className: w(
|
|
28
|
+
r,
|
|
29
|
+
`${r}--${o}`,
|
|
30
|
+
{ [`${r}--show-image`]: l },
|
|
31
|
+
c
|
|
32
|
+
),
|
|
33
|
+
style: { ...z, width: e, height: e },
|
|
34
|
+
children: [
|
|
35
|
+
!!a && /* @__PURE__ */ t(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
className: `${r}__border ${r}__border--${b.borderSize} ${r}--${o}`
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
l && /* @__PURE__ */ t(
|
|
42
|
+
y,
|
|
43
|
+
{
|
|
44
|
+
...g,
|
|
45
|
+
onError: () => n(!0),
|
|
46
|
+
width: e,
|
|
47
|
+
height: e,
|
|
48
|
+
src: i
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
!!m && !l && /* @__PURE__ */ t(
|
|
52
|
+
v,
|
|
53
|
+
{
|
|
54
|
+
size: f || b.labelSize,
|
|
55
|
+
color: S || "global-dynamic-red-dynamic-red-60",
|
|
56
|
+
weight: 600,
|
|
57
|
+
children: m
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}, s = [
|
|
64
|
+
[112, { labelSize: "4x-large", borderSize: 2 }],
|
|
65
|
+
[80, { labelSize: "2x-large", borderSize: 2 }],
|
|
66
|
+
[56, { labelSize: "large", borderSize: 2 }],
|
|
67
|
+
[48, { labelSize: "base", borderSize: 1 }],
|
|
68
|
+
[40, { labelSize: "small", borderSize: 1 }],
|
|
69
|
+
[32, { labelSize: "x-small", borderSize: 1 }],
|
|
70
|
+
[24, { labelSize: "2x-small", borderSize: 1 }],
|
|
71
|
+
[0, { labelSize: "3x-small", borderSize: 1 }]
|
|
72
|
+
], I = (e) => {
|
|
73
|
+
for (const [o, a] of s)
|
|
74
|
+
if (e >= o) return a;
|
|
75
|
+
return s[s.length - 1][1];
|
|
76
|
+
};
|
|
77
|
+
export {
|
|
78
|
+
M as Avatar
|
|
79
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { getPrefixClassName as i } from "../../utils/classname.js";
|
|
3
|
+
import { Typography as n } from "../typography/typography.js";
|
|
4
|
+
import t from "classnames";
|
|
5
|
+
const e = i("badge"), g = ({
|
|
6
|
+
outline: o,
|
|
7
|
+
children: a,
|
|
8
|
+
className: r,
|
|
9
|
+
...m
|
|
10
|
+
}) => /* @__PURE__ */ s(
|
|
11
|
+
n,
|
|
12
|
+
{
|
|
13
|
+
...m,
|
|
14
|
+
size: "2x-small",
|
|
15
|
+
className: t(
|
|
16
|
+
e,
|
|
17
|
+
{
|
|
18
|
+
[`${e}--outline`]: o,
|
|
19
|
+
[`${e}--dot`]: !a
|
|
20
|
+
},
|
|
21
|
+
r
|
|
22
|
+
),
|
|
23
|
+
children: a
|
|
24
|
+
}
|
|
25
|
+
), x = ({
|
|
26
|
+
children: o,
|
|
27
|
+
className: a,
|
|
28
|
+
...r
|
|
29
|
+
}) => /* @__PURE__ */ s(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
className: t(`${e}-container`, a),
|
|
33
|
+
...r,
|
|
34
|
+
children: o
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
export {
|
|
38
|
+
g as Badge,
|
|
39
|
+
x as BadgeContainer
|
|
40
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsxs as t, jsx as c, Fragment as u } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as h, useEffect as N } from "react";
|
|
3
|
+
import { getPrefixClassName as y } from "../../utils/classname.js";
|
|
4
|
+
import { renderIcon as p } from "../icon/icon.js";
|
|
5
|
+
import { Typography as _ } from "../typography/typography.js";
|
|
6
|
+
import b from "classnames";
|
|
7
|
+
const e = y("bottom-tab-bar"), T = ({
|
|
8
|
+
items: o,
|
|
9
|
+
activeId: r,
|
|
10
|
+
className: f,
|
|
11
|
+
indicator: l = !0,
|
|
12
|
+
setCssVariable: i,
|
|
13
|
+
onItemClick: x,
|
|
14
|
+
safeAreaBottomOffset: s = !0
|
|
15
|
+
}) => {
|
|
16
|
+
const m = h(() => r ? o.findIndex((a) => a.id === r) : -1, [r, o]), n = h(() => o.some((a) => !!a.icon), [o]);
|
|
17
|
+
return N(() => {
|
|
18
|
+
i && (s ? document.body?.style?.setProperty(
|
|
19
|
+
"--vsf-bottom-tab-bar-height",
|
|
20
|
+
n ? "calc(var(--safe-area-inset-bottom, 0px) + 52px)" : "calc(var(--safe-area-inset-bottom, 0px) + 40px)"
|
|
21
|
+
) : document.body?.style?.setProperty(
|
|
22
|
+
"--vsf-bottom-tab-bar-height",
|
|
23
|
+
n ? "52px" : "40px"
|
|
24
|
+
));
|
|
25
|
+
}, [n, s, i]), /* @__PURE__ */ t(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: b(
|
|
29
|
+
e,
|
|
30
|
+
{
|
|
31
|
+
[`${e}--safe-area-bottom-offset`]: s,
|
|
32
|
+
[`${e}--has-icon`]: n
|
|
33
|
+
},
|
|
34
|
+
f
|
|
35
|
+
),
|
|
36
|
+
children: [
|
|
37
|
+
!!l && /* @__PURE__ */ c("div", { className: `${e}__divider` }),
|
|
38
|
+
!!l && m >= 0 && /* @__PURE__ */ c(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
className: `${e}__indicator`,
|
|
42
|
+
style: {
|
|
43
|
+
left: `calc(100% * ${m} / ${o.length})`,
|
|
44
|
+
width: `calc(100% / ${o.length})`
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
o.map((a, v) => {
|
|
49
|
+
const $ = a.id === r, d = !!a.icon;
|
|
50
|
+
return /* @__PURE__ */ t(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
className: b(`${e}__item`, {
|
|
54
|
+
[`${e}__item--active`]: $,
|
|
55
|
+
[`${e}__item--has-icon`]: d
|
|
56
|
+
}),
|
|
57
|
+
onClick: () => x?.(a, v),
|
|
58
|
+
children: [
|
|
59
|
+
d && /* @__PURE__ */ t(u, { children: [
|
|
60
|
+
/* @__PURE__ */ c("div", { className: `${e}__icon`, children: p(a.icon) }),
|
|
61
|
+
/* @__PURE__ */ c("div", { className: `${e}__icon-active`, children: p(a.activeIcon || a.icon) })
|
|
62
|
+
] }),
|
|
63
|
+
/* @__PURE__ */ c(
|
|
64
|
+
_,
|
|
65
|
+
{
|
|
66
|
+
size: a.icon ? "2x-small" : "small",
|
|
67
|
+
className: `${e}__label`,
|
|
68
|
+
children: a.name
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
/* @__PURE__ */ c(
|
|
72
|
+
_,
|
|
73
|
+
{
|
|
74
|
+
size: a.icon ? "2x-small" : "small",
|
|
75
|
+
className: `${e}__label-active`,
|
|
76
|
+
children: a.name
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
a.id
|
|
82
|
+
);
|
|
83
|
+
})
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
export {
|
|
89
|
+
T as BottomTabBar
|
|
90
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsxs as x, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { getPrefixClassName as y } from "../../utils/classname.js";
|
|
4
|
+
import { buttonLabelSizeMapping as C } from "./button.const.js";
|
|
5
|
+
import { Typography as k } from "../typography/typography.js";
|
|
6
|
+
import { renderIcon as j } from "../icon/icon.js";
|
|
7
|
+
import l from "classnames";
|
|
8
|
+
const r = y("button"), P = ({
|
|
9
|
+
shape: c = "rounded",
|
|
10
|
+
size: u = "medium",
|
|
11
|
+
type: f = "solid",
|
|
12
|
+
theme: o = "default",
|
|
13
|
+
disabled: $,
|
|
14
|
+
loading: t,
|
|
15
|
+
children: n,
|
|
16
|
+
className: _,
|
|
17
|
+
leadingIcon: m,
|
|
18
|
+
trailingIcon: a,
|
|
19
|
+
htmlType: d,
|
|
20
|
+
block: N,
|
|
21
|
+
...p
|
|
22
|
+
}) => {
|
|
23
|
+
o = o === "default" ? "brand" : o;
|
|
24
|
+
const i = (e, b) => e ? /* @__PURE__ */ s("span", { className: l(`${r}__icon`, b), children: j(e) }) : null;
|
|
25
|
+
return /* @__PURE__ */ x(
|
|
26
|
+
"button",
|
|
27
|
+
{
|
|
28
|
+
...p,
|
|
29
|
+
onClick: (e) => {
|
|
30
|
+
$ || t || p.onClick?.(e);
|
|
31
|
+
},
|
|
32
|
+
disabled: $,
|
|
33
|
+
type: d,
|
|
34
|
+
className: l(
|
|
35
|
+
r,
|
|
36
|
+
{
|
|
37
|
+
[`${r}--${c}`]: !0,
|
|
38
|
+
[`${r}--${u}`]: !0,
|
|
39
|
+
[`${r}--${f}`]: !0,
|
|
40
|
+
[`${r}--block`]: N,
|
|
41
|
+
[`${r}--theme-${o}`]: !0,
|
|
42
|
+
[`${r}--icon-only`]: !n && (m && !a || !m && a),
|
|
43
|
+
[`${r}--loading`]: t
|
|
44
|
+
},
|
|
45
|
+
_
|
|
46
|
+
),
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ s("span", { className: `${r}__overlay` }),
|
|
49
|
+
!!t && i(
|
|
50
|
+
{ name: "loader", animation: "spin" },
|
|
51
|
+
`${r}__icon--loading`
|
|
52
|
+
),
|
|
53
|
+
!t && i(m, `${r}__icon--leading`),
|
|
54
|
+
!!n && /* @__PURE__ */ s(k, { size: C[u], weight: "medium", children: n }),
|
|
55
|
+
i(a, `${r}__icon--trailing`)
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
P as Button
|
|
62
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsxs as u, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as C, useCallback as S, useEffect as x } from "react";
|
|
3
|
+
import { getPrefixClassName as N } from "../../utils/classname.js";
|
|
4
|
+
import { Sheet as g } from "../sheet/sheet.js";
|
|
5
|
+
import { SheetHeader as k } from "../sheet/sheet-header.js";
|
|
6
|
+
import { SheetBody as b } from "../sheet/sheet-body.js";
|
|
7
|
+
import { Calendar as y } from "./calendar.js";
|
|
8
|
+
import { SheetFooter as j } from "../sheet/sheet-footer.js";
|
|
9
|
+
import { Button as B } from "../button/button.js";
|
|
10
|
+
import P from "classnames";
|
|
11
|
+
const i = N("calendar-sheet"), $ = ({
|
|
12
|
+
className: m,
|
|
13
|
+
title: a,
|
|
14
|
+
confirmButton: c,
|
|
15
|
+
open: t,
|
|
16
|
+
onCancel: f,
|
|
17
|
+
value: e,
|
|
18
|
+
defaultValue: d,
|
|
19
|
+
onSelect: h,
|
|
20
|
+
...p
|
|
21
|
+
}) => {
|
|
22
|
+
const n = e !== void 0, [o, r] = C(
|
|
23
|
+
e || d || [null, null]
|
|
24
|
+
), s = S(() => {
|
|
25
|
+
n && r(e || [null, null]);
|
|
26
|
+
}, [n, e]);
|
|
27
|
+
return x(() => {
|
|
28
|
+
e === null && r([null, null]), e && r(e);
|
|
29
|
+
}, [e]), /* @__PURE__ */ u(g, { open: t, className: P(i, m), children: [
|
|
30
|
+
/* @__PURE__ */ l(
|
|
31
|
+
k,
|
|
32
|
+
{
|
|
33
|
+
title: a,
|
|
34
|
+
closeIcon: !0,
|
|
35
|
+
onCloseClick: () => {
|
|
36
|
+
f?.(), s();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
/* @__PURE__ */ l(b, { className: `${i}__body`, children: t && /* @__PURE__ */ l(
|
|
41
|
+
y,
|
|
42
|
+
{
|
|
43
|
+
type: "range",
|
|
44
|
+
...p,
|
|
45
|
+
value: o,
|
|
46
|
+
onPick: r
|
|
47
|
+
}
|
|
48
|
+
) }),
|
|
49
|
+
/* @__PURE__ */ l(j, { children: /* @__PURE__ */ l(
|
|
50
|
+
B,
|
|
51
|
+
{
|
|
52
|
+
size: "large",
|
|
53
|
+
children: "Xác nhận",
|
|
54
|
+
theme: "neutral",
|
|
55
|
+
...c,
|
|
56
|
+
disabled: !o || o[0] === null || o[1] === null,
|
|
57
|
+
onClick: () => {
|
|
58
|
+
h?.(o), s();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
) })
|
|
62
|
+
] });
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
$ as CalendarRangeSheet
|
|
66
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsxs as C, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as g, useCallback as u, useEffect as S } from "react";
|
|
3
|
+
import { getPrefixClassName as x } from "../../utils/classname.js";
|
|
4
|
+
import { Calendar as N } from "./calendar.js";
|
|
5
|
+
import { Sheet as b } from "../sheet/sheet.js";
|
|
6
|
+
import { SheetHeader as k } from "../sheet/sheet-header.js";
|
|
7
|
+
import { SheetBody as y } from "../sheet/sheet-body.js";
|
|
8
|
+
import { SheetFooter as T } from "../sheet/sheet-footer.js";
|
|
9
|
+
import { Button as j } from "../button/button.js";
|
|
10
|
+
import B from "classnames";
|
|
11
|
+
const m = x("calendar-sheet"), $ = ({
|
|
12
|
+
title: n,
|
|
13
|
+
confirmButton: c,
|
|
14
|
+
open: i,
|
|
15
|
+
onCancel: a,
|
|
16
|
+
value: e,
|
|
17
|
+
defaultValue: f,
|
|
18
|
+
onSelect: d,
|
|
19
|
+
className: h,
|
|
20
|
+
...p
|
|
21
|
+
}) => {
|
|
22
|
+
const l = e !== void 0, [o, t] = g(e || f || null), s = u(() => {
|
|
23
|
+
l && o?.getTime() !== e?.getTime() && t(e || null);
|
|
24
|
+
}, [l, o, e]);
|
|
25
|
+
return S(() => {
|
|
26
|
+
e === null && t(null), e && t(e);
|
|
27
|
+
}, [e?.getTime()]), /* @__PURE__ */ C(b, { open: i, className: B(m, h), children: [
|
|
28
|
+
/* @__PURE__ */ r(
|
|
29
|
+
k,
|
|
30
|
+
{
|
|
31
|
+
title: n,
|
|
32
|
+
closeIcon: !0,
|
|
33
|
+
onCloseClick: () => {
|
|
34
|
+
a?.(), s();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
/* @__PURE__ */ r(y, { className: `${m}__body`, children: i && /* @__PURE__ */ r(
|
|
39
|
+
N,
|
|
40
|
+
{
|
|
41
|
+
type: "single",
|
|
42
|
+
...p,
|
|
43
|
+
onChange: t,
|
|
44
|
+
value: o
|
|
45
|
+
}
|
|
46
|
+
) }),
|
|
47
|
+
/* @__PURE__ */ r(T, { children: /* @__PURE__ */ r(
|
|
48
|
+
j,
|
|
49
|
+
{
|
|
50
|
+
size: "large",
|
|
51
|
+
children: "Xác nhận",
|
|
52
|
+
theme: "neutral",
|
|
53
|
+
...c,
|
|
54
|
+
disabled: !o,
|
|
55
|
+
onClick: () => {
|
|
56
|
+
o && (d?.(o), s());
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
) })
|
|
60
|
+
] });
|
|
61
|
+
};
|
|
62
|
+
export {
|
|
63
|
+
$ as CalendarSingleSheet
|
|
64
|
+
};
|