@v-miniapp/ui-react 1.0.60 → 1.0.71
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/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 +13357 -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 +139 -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,16 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { SinglePicker as s } from "./single-picker.js";
|
|
3
|
+
import { RangePicker as o } from "./range-picker.js";
|
|
4
|
+
import { useIsUsingLocales as t, useLanguage as g } from "@v-miniapp/locale";
|
|
5
|
+
const a = ({ type: n = "single", ...e }) => n === "single" ? /* @__PURE__ */ r(
|
|
6
|
+
s,
|
|
7
|
+
{
|
|
8
|
+
...e
|
|
9
|
+
}
|
|
10
|
+
) : /* @__PURE__ */ r(o, { ...e }), l = ({ lang: n, ...e }) => {
|
|
11
|
+
const { language: i } = g();
|
|
12
|
+
return /* @__PURE__ */ r(a, { lang: n || i, ...e });
|
|
13
|
+
}, L = (n) => t() ? /* @__PURE__ */ r(a, { ...n }) : /* @__PURE__ */ r(l, { ...n });
|
|
14
|
+
export {
|
|
15
|
+
L as Calendar
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { translate as t } from "@v-miniapp/locale";
|
|
2
|
+
const r = (a) => ({
|
|
3
|
+
date: (e) => e.getDate(),
|
|
4
|
+
headerLabel: (e, n) => t(
|
|
5
|
+
"calendar.headerLabel",
|
|
6
|
+
{
|
|
7
|
+
month: t(`calendar.monthLabel[${e}]`, void 0, a),
|
|
8
|
+
year: n
|
|
9
|
+
},
|
|
10
|
+
a
|
|
11
|
+
),
|
|
12
|
+
weekday: (e) => t(`calendar.weekdayLabel[${e}]`, void 0, a)
|
|
13
|
+
}), o = (a, e) => ({ ...e, ...r(a === "en" ? "en" : "vi") });
|
|
14
|
+
export {
|
|
15
|
+
o as getRenderText
|
|
16
|
+
};
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { jsxs as N, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useControllableValue as _e } from "ahooks";
|
|
3
|
+
import { useState as P, useMemo as q, useEffect as X } from "react";
|
|
4
|
+
import { dateFns as h } from "./utils.js";
|
|
5
|
+
import { getPrefixClassName as ge } from "../../utils/classname.js";
|
|
6
|
+
import { getRenderText as be } from "./default-render.js";
|
|
7
|
+
import { Button as F } from "../button/button.js";
|
|
8
|
+
import { Icon as A } from "../icon/icon.js";
|
|
9
|
+
import { Typography as y } from "../typography/typography.js";
|
|
10
|
+
import i from "classnames";
|
|
11
|
+
const ae = ge("calendar"), e = ae + "-range-picker", ve = new Date(1900, 0, 1), $e = new Date(2099, 11, 31), Ne = (t) => {
|
|
12
|
+
const o = {};
|
|
13
|
+
return (t.defaultValue !== void 0 || t.defaultValue === null) && (o.defaultValue = t.defaultValue), (t.value !== void 0 || t.value === null) && (o.value = t.value), t.onChange !== void 0 && (o.onChange = t.onChange), o;
|
|
14
|
+
}, Z = (t) => {
|
|
15
|
+
const o = /* @__PURE__ */ new Date();
|
|
16
|
+
if (t) {
|
|
17
|
+
const [_, g] = t;
|
|
18
|
+
return _ ? _.getMonth() : g ? g.getMonth() : o.getMonth();
|
|
19
|
+
}
|
|
20
|
+
return o.getMonth();
|
|
21
|
+
}, ee = (t) => {
|
|
22
|
+
const o = /* @__PURE__ */ new Date();
|
|
23
|
+
if (t) {
|
|
24
|
+
const [_, g] = t;
|
|
25
|
+
return _ ? _.getFullYear() : g ? g.getFullYear() : o.getFullYear();
|
|
26
|
+
}
|
|
27
|
+
return o.getFullYear();
|
|
28
|
+
}, te = (t) => {
|
|
29
|
+
if (!t) return null;
|
|
30
|
+
const [o] = t;
|
|
31
|
+
return o;
|
|
32
|
+
}, ne = (t) => {
|
|
33
|
+
if (!t) return null;
|
|
34
|
+
const [, o] = t;
|
|
35
|
+
return o;
|
|
36
|
+
}, Fe = (t) => {
|
|
37
|
+
const {
|
|
38
|
+
className: o,
|
|
39
|
+
renderText: _,
|
|
40
|
+
lang: g,
|
|
41
|
+
navigationMode: p = "month-year",
|
|
42
|
+
defaultValue: Me,
|
|
43
|
+
onChange: De,
|
|
44
|
+
value: f,
|
|
45
|
+
minDate: V = ve,
|
|
46
|
+
maxDate: I = $e,
|
|
47
|
+
onPick: w,
|
|
48
|
+
...re
|
|
49
|
+
} = t, [C, G] = _e(
|
|
50
|
+
Ne(t)
|
|
51
|
+
), le = be(g, _), {
|
|
52
|
+
date: d,
|
|
53
|
+
dateSubText: u,
|
|
54
|
+
headerLabel: R,
|
|
55
|
+
weekday: T
|
|
56
|
+
} = le, [b, D] = P(
|
|
57
|
+
te(C)
|
|
58
|
+
), [v, S] = P(ne(C)), oe = /* @__PURE__ */ new Date(), [c, O] = P(Z(C)), [a, x] = P(ee(C)), M = (new Date(a, c, 1).getDay() + 6) % 7, j = h.getNumDaysInMonth(c, a), ce = M + j, se = Math.ceil(ce / 7), H = I.getMonth(), Y = I.getFullYear(), J = V.getMonth(), z = V.getFullYear(), ie = a < Y || a === Y && c < H, de = a > z || a === z && c > J, ue = a < Y || a + 1 === Y && c <= H, me = a > z || a - 1 === z && c >= J, $ = q(() => {
|
|
59
|
+
let m = a, n = c - 1;
|
|
60
|
+
return n < 0 && (m--, n = 11), { month: n, year: m };
|
|
61
|
+
}, [c, a]), E = q(() => {
|
|
62
|
+
let m = a, n = c + 1;
|
|
63
|
+
return n > 11 && (m++, n = 0), { month: n, year: m };
|
|
64
|
+
}, [c, a]), he = q(() => h.getNumDaysInMonth($.month, $.year), [$]), fe = (m) => {
|
|
65
|
+
const n = new Date(a, c, m);
|
|
66
|
+
return h.isSameOrAfter(n, V) && h.isSameOrBefore(n, I);
|
|
67
|
+
};
|
|
68
|
+
return X(() => {
|
|
69
|
+
f != null && (O(Z(f)), x(ee(f)));
|
|
70
|
+
}, [f?.[0]?.getTime()]), X(() => {
|
|
71
|
+
f != null && (D(te(f)), S(ne(f)));
|
|
72
|
+
}, [f]), /* @__PURE__ */ N(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
className: i(ae, e, o),
|
|
76
|
+
...re,
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ N("div", { className: `${e}__header`, children: [
|
|
79
|
+
p === "month-year" && /* @__PURE__ */ r(
|
|
80
|
+
F,
|
|
81
|
+
{
|
|
82
|
+
type: "ghost",
|
|
83
|
+
theme: "neutral",
|
|
84
|
+
disabled: !me,
|
|
85
|
+
onClick: () => {
|
|
86
|
+
x(a - 1);
|
|
87
|
+
},
|
|
88
|
+
children: /* @__PURE__ */ r(A, { size: 20, name: "double-chevron-left" })
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
p !== "time-only" && /* @__PURE__ */ r(
|
|
92
|
+
F,
|
|
93
|
+
{
|
|
94
|
+
type: "ghost",
|
|
95
|
+
theme: "neutral",
|
|
96
|
+
disabled: !de,
|
|
97
|
+
onClick: () => {
|
|
98
|
+
O($.month), x($.year);
|
|
99
|
+
},
|
|
100
|
+
children: /* @__PURE__ */ r(A, { size: 20, name: "chevron-left" })
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
/* @__PURE__ */ r(y, { className: `${e}__header-label`, children: typeof R == "function" ? R?.(c, a) : R }),
|
|
104
|
+
p !== "time-only" && /* @__PURE__ */ r(
|
|
105
|
+
F,
|
|
106
|
+
{
|
|
107
|
+
type: "ghost",
|
|
108
|
+
theme: "neutral",
|
|
109
|
+
disabled: !ie,
|
|
110
|
+
onClick: () => {
|
|
111
|
+
O(E.month), x(E.year);
|
|
112
|
+
},
|
|
113
|
+
children: /* @__PURE__ */ r(A, { size: 20, name: "chevron-right" })
|
|
114
|
+
}
|
|
115
|
+
),
|
|
116
|
+
p === "month-year" && /* @__PURE__ */ r(
|
|
117
|
+
F,
|
|
118
|
+
{
|
|
119
|
+
type: "ghost",
|
|
120
|
+
theme: "neutral",
|
|
121
|
+
disabled: !ue,
|
|
122
|
+
onClick: () => {
|
|
123
|
+
x(a + 1);
|
|
124
|
+
},
|
|
125
|
+
children: /* @__PURE__ */ r(A, { size: 20, name: "double-chevron-right" })
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
] }),
|
|
129
|
+
/* @__PURE__ */ r("div", { children: /* @__PURE__ */ N("div", { className: `${e}__grid`, children: [
|
|
130
|
+
Array.from({ length: 7 }, (m, n) => {
|
|
131
|
+
const B = (n + 1) % 7;
|
|
132
|
+
return /* @__PURE__ */ r("div", { className: i(`${e}__cell-container`), children: /* @__PURE__ */ r(
|
|
133
|
+
"div",
|
|
134
|
+
{
|
|
135
|
+
className: i(
|
|
136
|
+
`${e}__cell`,
|
|
137
|
+
`${e}__cell-week`
|
|
138
|
+
),
|
|
139
|
+
children: /* @__PURE__ */ r(y, { color: "alias-object-secondary", children: typeof T == "function" ? T(B) : T })
|
|
140
|
+
}
|
|
141
|
+
) });
|
|
142
|
+
}),
|
|
143
|
+
Array.from({ length: se * 7 }, (m, n) => {
|
|
144
|
+
if (n < M) {
|
|
145
|
+
const s = he - M + n + 1, k = new Date(
|
|
146
|
+
$.year,
|
|
147
|
+
$.month,
|
|
148
|
+
s
|
|
149
|
+
);
|
|
150
|
+
return /* @__PURE__ */ r(
|
|
151
|
+
"div",
|
|
152
|
+
{
|
|
153
|
+
className: i(`${e}__cell-container`),
|
|
154
|
+
children: /* @__PURE__ */ N(
|
|
155
|
+
y,
|
|
156
|
+
{
|
|
157
|
+
size: "base",
|
|
158
|
+
role: "button",
|
|
159
|
+
className: i(
|
|
160
|
+
`${e}__cell`,
|
|
161
|
+
`${e}__cell-day`,
|
|
162
|
+
`${e}__cell-day-filler`
|
|
163
|
+
),
|
|
164
|
+
children: [
|
|
165
|
+
typeof d == "function" ? d(k) : d,
|
|
166
|
+
/* @__PURE__ */ r(
|
|
167
|
+
y,
|
|
168
|
+
{
|
|
169
|
+
size: "2x-small",
|
|
170
|
+
className: `${e}__cell-day-sub-title`,
|
|
171
|
+
children: typeof u == "function" ? u(k) : u
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
]
|
|
175
|
+
}
|
|
176
|
+
)
|
|
177
|
+
},
|
|
178
|
+
n
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
if (n >= M + j) {
|
|
182
|
+
const s = n - (M + j) + 1, k = new Date(
|
|
183
|
+
E.year,
|
|
184
|
+
E.month,
|
|
185
|
+
s
|
|
186
|
+
);
|
|
187
|
+
return /* @__PURE__ */ r(
|
|
188
|
+
"div",
|
|
189
|
+
{
|
|
190
|
+
className: i(`${e}__cell-container`),
|
|
191
|
+
children: /* @__PURE__ */ N(
|
|
192
|
+
y,
|
|
193
|
+
{
|
|
194
|
+
size: "base",
|
|
195
|
+
role: "button",
|
|
196
|
+
className: i(
|
|
197
|
+
`${e}__cell`,
|
|
198
|
+
`${e}__cell-day`,
|
|
199
|
+
`${e}__cell-day-filler`
|
|
200
|
+
),
|
|
201
|
+
children: [
|
|
202
|
+
typeof d == "function" ? d(k) : d,
|
|
203
|
+
/* @__PURE__ */ r(
|
|
204
|
+
y,
|
|
205
|
+
{
|
|
206
|
+
size: "2x-small",
|
|
207
|
+
className: `${e}__cell-day-sub-title`,
|
|
208
|
+
children: typeof u == "function" ? u(k) : u
|
|
209
|
+
}
|
|
210
|
+
)
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
)
|
|
214
|
+
},
|
|
215
|
+
n
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
const B = n % 7 === 6, ye = n % 7 === 0, K = n - M + 1, l = new Date(a, c, K), Q = !fe(K), L = b && h.isSame(l, b), W = v && h.isSame(l, v), U = (function() {
|
|
219
|
+
return b && v ? h.isSameOrAfter(l, b) && h.isSameOrBefore(l, v) : !1;
|
|
220
|
+
})();
|
|
221
|
+
return /* @__PURE__ */ N(
|
|
222
|
+
"div",
|
|
223
|
+
{
|
|
224
|
+
className: i(`${e}__cell-container`),
|
|
225
|
+
children: [
|
|
226
|
+
U && /* @__PURE__ */ r(
|
|
227
|
+
"div",
|
|
228
|
+
{
|
|
229
|
+
className: i(
|
|
230
|
+
`${e}__cell-range-background`,
|
|
231
|
+
{
|
|
232
|
+
[`${e}__cell-range-background-start`]: L,
|
|
233
|
+
[`${e}__cell-range-background-end`]: W,
|
|
234
|
+
[`${e}__cell-range-background-start-end-row`]: L && B,
|
|
235
|
+
[`${e}__cell-range-background-end-start-row`]: W && ye
|
|
236
|
+
}
|
|
237
|
+
)
|
|
238
|
+
}
|
|
239
|
+
),
|
|
240
|
+
/* @__PURE__ */ N(
|
|
241
|
+
y,
|
|
242
|
+
{
|
|
243
|
+
size: "base",
|
|
244
|
+
role: "button",
|
|
245
|
+
onClick: () => {
|
|
246
|
+
if (Q)
|
|
247
|
+
return;
|
|
248
|
+
if (b && v) {
|
|
249
|
+
D(l), S(null), w?.([l, null]);
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
if (!b && !v) {
|
|
253
|
+
D(l), w?.([l, null]);
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
const s = b || v;
|
|
257
|
+
if (l < s) {
|
|
258
|
+
D(l), S(s), G?.([l, s]), w?.([l, s]);
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
D(s), S(l), G?.([s, l]), w?.([s, l]);
|
|
262
|
+
},
|
|
263
|
+
className: i(
|
|
264
|
+
`${e}__cell`,
|
|
265
|
+
`${e}__cell-day`,
|
|
266
|
+
{
|
|
267
|
+
[`${e}__cell-day--disabled`]: Q,
|
|
268
|
+
[`${e}__cell-day--today`]: h.isSame(
|
|
269
|
+
l,
|
|
270
|
+
oe
|
|
271
|
+
),
|
|
272
|
+
[`${e}__cell-day--in-range-picker`]: U,
|
|
273
|
+
[`${e}__cell-day--selected`]: L || W
|
|
274
|
+
}
|
|
275
|
+
),
|
|
276
|
+
children: [
|
|
277
|
+
typeof d == "function" ? d(l) : d,
|
|
278
|
+
/* @__PURE__ */ r(
|
|
279
|
+
y,
|
|
280
|
+
{
|
|
281
|
+
size: "2x-small",
|
|
282
|
+
className: `${e}__cell-day-sub-title`,
|
|
283
|
+
children: typeof u == "function" ? u(l) : u
|
|
284
|
+
}
|
|
285
|
+
)
|
|
286
|
+
]
|
|
287
|
+
}
|
|
288
|
+
)
|
|
289
|
+
]
|
|
290
|
+
},
|
|
291
|
+
n
|
|
292
|
+
);
|
|
293
|
+
})
|
|
294
|
+
] }) })
|
|
295
|
+
]
|
|
296
|
+
}
|
|
297
|
+
);
|
|
298
|
+
};
|
|
299
|
+
export {
|
|
300
|
+
Fe as RangePicker
|
|
301
|
+
};
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { jsxs as x, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { getPrefixClassName as ne } from "../../utils/classname.js";
|
|
3
|
+
import { dateFns as u } from "./utils.js";
|
|
4
|
+
import { useState as A, useMemo as I } from "react";
|
|
5
|
+
import { useControllableValue as ae } from "ahooks";
|
|
6
|
+
import { getRenderText as le } from "./default-render.js";
|
|
7
|
+
import { Button as C } from "../button/button.js";
|
|
8
|
+
import { Icon as p } from "../icon/icon.js";
|
|
9
|
+
import { Typography as k } from "../typography/typography.js";
|
|
10
|
+
import g from "classnames";
|
|
11
|
+
const B = ne("calendar"), a = B + "-single-picker", re = new Date(1900, 0, 1), oe = new Date(2099, 11, 31), se = (o) => {
|
|
12
|
+
const c = {};
|
|
13
|
+
return o.defaultValue !== void 0 && (c.defaultValue = o.defaultValue), o.value !== void 0 && (c.value = o.value), o.onChange !== void 0 && (c.onChange = o.onChange), c;
|
|
14
|
+
}, Me = (o) => {
|
|
15
|
+
const {
|
|
16
|
+
className: c,
|
|
17
|
+
renderText: R,
|
|
18
|
+
lang: O,
|
|
19
|
+
navigationMode: _ = "month-year",
|
|
20
|
+
defaultValue: ce,
|
|
21
|
+
onChange: ie,
|
|
22
|
+
value: de,
|
|
23
|
+
minDate: $ = re,
|
|
24
|
+
maxDate: w = oe,
|
|
25
|
+
...L
|
|
26
|
+
} = o, [i, W] = ae(
|
|
27
|
+
se(o)
|
|
28
|
+
), q = le(O, R), {
|
|
29
|
+
date: Y,
|
|
30
|
+
dateSubText: F,
|
|
31
|
+
headerLabel: P,
|
|
32
|
+
weekday: S
|
|
33
|
+
} = q, T = /* @__PURE__ */ new Date(), [l, E] = A(() => i ? i.getMonth() : T.getMonth()), [t, b] = A(() => i ? i.getFullYear() : T.getFullYear()), d = (new Date(t, l, 1).getDay() + 6) % 7, V = u.getNumDaysInMonth(l, t), G = d + V, H = Math.ceil(G / 7), K = w.getMonth(), v = w.getFullYear(), j = $.getMonth(), D = $.getFullYear(), J = t < v || t === v && l < K, Q = t > D || t === D && l > j, U = t < v || t + 1 === v && l <= K, X = t > D || t - 1 === D && l >= j, s = I(() => {
|
|
34
|
+
let r = t, e = l - 1;
|
|
35
|
+
return e < 0 && (r--, e = 11), { month: e, year: r };
|
|
36
|
+
}, [l, t]), M = I(() => {
|
|
37
|
+
let r = t, e = l + 1;
|
|
38
|
+
return e > 11 && (r++, e = 0), { month: e, year: r };
|
|
39
|
+
}, [l, t]), Z = I(() => u.getNumDaysInMonth(s.month, s.year), [s]), ee = (r) => {
|
|
40
|
+
const e = new Date(t, l, r);
|
|
41
|
+
return u.isSameOrAfter(e, $) && u.isSameOrBefore(e, w);
|
|
42
|
+
}, z = (r) => {
|
|
43
|
+
const { date: e, cellKey: m, isFiller: h, disabled: N, onClick: y } = r, f = u.isSame(e, T), te = !!(i && u.isSame(e, i));
|
|
44
|
+
return /* @__PURE__ */ n(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
className: g(`${a}__cell-container`),
|
|
48
|
+
children: /* @__PURE__ */ x(
|
|
49
|
+
k,
|
|
50
|
+
{
|
|
51
|
+
size: "base",
|
|
52
|
+
role: "button",
|
|
53
|
+
onClick: h ? void 0 : y,
|
|
54
|
+
className: g(
|
|
55
|
+
`${a}__cell`,
|
|
56
|
+
`${a}__cell-day`,
|
|
57
|
+
{ [`${a}__cell-day-filler`]: h },
|
|
58
|
+
{
|
|
59
|
+
[`${a}__cell-day--disabled`]: N,
|
|
60
|
+
[`${a}__cell-day--today`]: f,
|
|
61
|
+
[`${a}__cell-day--selected`]: te
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
children: [
|
|
65
|
+
typeof Y == "function" ? Y(e) : Y,
|
|
66
|
+
/* @__PURE__ */ n(
|
|
67
|
+
k,
|
|
68
|
+
{
|
|
69
|
+
size: "2x-small",
|
|
70
|
+
className: `${a}__cell-day-sub-title`,
|
|
71
|
+
children: typeof F == "function" ? F(e) : F
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
},
|
|
78
|
+
m
|
|
79
|
+
);
|
|
80
|
+
};
|
|
81
|
+
return /* @__PURE__ */ x(
|
|
82
|
+
"div",
|
|
83
|
+
{
|
|
84
|
+
className: g(B, a, c),
|
|
85
|
+
...L,
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ x("div", { className: `${a}__header`, children: [
|
|
88
|
+
_ === "month-year" && /* @__PURE__ */ n(
|
|
89
|
+
C,
|
|
90
|
+
{
|
|
91
|
+
type: "ghost",
|
|
92
|
+
theme: "neutral",
|
|
93
|
+
disabled: !X,
|
|
94
|
+
onClick: () => {
|
|
95
|
+
b(t - 1);
|
|
96
|
+
},
|
|
97
|
+
children: /* @__PURE__ */ n(p, { size: 20, name: "double-chevron-left" })
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
_ !== "time-only" && /* @__PURE__ */ n(
|
|
101
|
+
C,
|
|
102
|
+
{
|
|
103
|
+
type: "ghost",
|
|
104
|
+
theme: "neutral",
|
|
105
|
+
disabled: !Q,
|
|
106
|
+
onClick: () => {
|
|
107
|
+
E(s.month), b(s.year);
|
|
108
|
+
},
|
|
109
|
+
children: /* @__PURE__ */ n(p, { size: 20, name: "chevron-left" })
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
/* @__PURE__ */ n(k, { className: `${a}__header-label`, children: typeof P == "function" ? P?.(l, t) : P }),
|
|
113
|
+
_ !== "time-only" && /* @__PURE__ */ n(
|
|
114
|
+
C,
|
|
115
|
+
{
|
|
116
|
+
type: "ghost",
|
|
117
|
+
theme: "neutral",
|
|
118
|
+
disabled: !J,
|
|
119
|
+
onClick: () => {
|
|
120
|
+
E(M.month), b(M.year);
|
|
121
|
+
},
|
|
122
|
+
children: /* @__PURE__ */ n(p, { size: 20, name: "chevron-right" })
|
|
123
|
+
}
|
|
124
|
+
),
|
|
125
|
+
_ === "month-year" && /* @__PURE__ */ n(
|
|
126
|
+
C,
|
|
127
|
+
{
|
|
128
|
+
type: "ghost",
|
|
129
|
+
theme: "neutral",
|
|
130
|
+
disabled: !U,
|
|
131
|
+
onClick: () => {
|
|
132
|
+
b(t + 1);
|
|
133
|
+
},
|
|
134
|
+
children: /* @__PURE__ */ n(p, { size: 20, name: "double-chevron-right" })
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
] }),
|
|
138
|
+
/* @__PURE__ */ n("div", { children: /* @__PURE__ */ x("div", { className: `${a}__grid`, children: [
|
|
139
|
+
Array.from({ length: 7 }, (r, e) => {
|
|
140
|
+
const m = (e + 1) % 7;
|
|
141
|
+
return /* @__PURE__ */ n("div", { className: g(`${a}__cell-container`), children: /* @__PURE__ */ n(
|
|
142
|
+
"div",
|
|
143
|
+
{
|
|
144
|
+
className: g(
|
|
145
|
+
`${a}__cell`,
|
|
146
|
+
`${a}__cell-week`
|
|
147
|
+
),
|
|
148
|
+
children: /* @__PURE__ */ n(k, { color: "alias-object-secondary", children: typeof S == "function" ? S(m) : S })
|
|
149
|
+
}
|
|
150
|
+
) });
|
|
151
|
+
}),
|
|
152
|
+
Array.from({ length: H * 7 }, (r, e) => {
|
|
153
|
+
if (e < d) {
|
|
154
|
+
const y = Z - d + e + 1, f = new Date(
|
|
155
|
+
s.year,
|
|
156
|
+
s.month,
|
|
157
|
+
y
|
|
158
|
+
);
|
|
159
|
+
return z({ date: f, cellKey: e, isFiller: !0 });
|
|
160
|
+
}
|
|
161
|
+
if (e >= d + V) {
|
|
162
|
+
const y = e - (d + V) + 1, f = new Date(
|
|
163
|
+
M.year,
|
|
164
|
+
M.month,
|
|
165
|
+
y
|
|
166
|
+
);
|
|
167
|
+
return z({ date: f, cellKey: e, isFiller: !0 });
|
|
168
|
+
}
|
|
169
|
+
const m = e - d + 1, h = new Date(t, l, m), N = !ee(m);
|
|
170
|
+
return z({
|
|
171
|
+
date: h,
|
|
172
|
+
cellKey: e,
|
|
173
|
+
disabled: N,
|
|
174
|
+
onClick: () => {
|
|
175
|
+
!h || N || W(h);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
})
|
|
179
|
+
] }) })
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
);
|
|
183
|
+
};
|
|
184
|
+
export {
|
|
185
|
+
Me as SinglePicker
|
|
186
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { dayjs as t } from "../../utils/date.js";
|
|
2
|
+
class a {
|
|
3
|
+
getNumDaysInMonth(e, r) {
|
|
4
|
+
return new Date(r, e + 1, 0).getDate();
|
|
5
|
+
}
|
|
6
|
+
isSame(e, r) {
|
|
7
|
+
return t(e).isSame(t(r), "day");
|
|
8
|
+
}
|
|
9
|
+
isBefore(e, r) {
|
|
10
|
+
return t(e).isBefore(t(r), "day");
|
|
11
|
+
}
|
|
12
|
+
isAfter(e, r) {
|
|
13
|
+
return t(e).isAfter(t(r), "day");
|
|
14
|
+
}
|
|
15
|
+
isSameOrBefore(e, r) {
|
|
16
|
+
return t(e).isSameOrBefore(t(r), "day");
|
|
17
|
+
}
|
|
18
|
+
isSameOrAfter(e, r) {
|
|
19
|
+
return t(e).isSameOrAfter(t(r), "day");
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const i = new a();
|
|
23
|
+
export {
|
|
24
|
+
i as dateFns
|
|
25
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsxs as f, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { getPrefixClassName as l } from "../../utils/classname.js";
|
|
3
|
+
import { forwardRef as d, useImperativeHandle as c } from "react";
|
|
4
|
+
import { useCarousel as x } from "./use-carousel.js";
|
|
5
|
+
import { Pagination as v } from "../pagination/pagination.js";
|
|
6
|
+
import o from "classnames";
|
|
7
|
+
const r = l("carousel"), h = d(
|
|
8
|
+
({ className: s, carousel: e, options: a, pagination: i = !0, children: m }, p) => {
|
|
9
|
+
const n = x(a);
|
|
10
|
+
return e = e || n, c(p, () => e), /* @__PURE__ */ f(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
className: o(r, s),
|
|
14
|
+
style: {
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
"--carousel-gap": typeof e.options.gap == "number" ? e.options.gap + "px" : "8px"
|
|
18
|
+
},
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ t("div", { className: `${r}__viewport`, ref: e.ref, children: /* @__PURE__ */ t("div", { className: `${r}__tracks`, children: m }) }),
|
|
21
|
+
!!i && /* @__PURE__ */ t(
|
|
22
|
+
v,
|
|
23
|
+
{
|
|
24
|
+
total: e.snaps.length,
|
|
25
|
+
activeIndex: e.activeIndex
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
), $ = ({
|
|
33
|
+
children: s,
|
|
34
|
+
className: e,
|
|
35
|
+
...a
|
|
36
|
+
}) => /* @__PURE__ */ t(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
className: o(`${r}__item`, e),
|
|
40
|
+
...a,
|
|
41
|
+
children: s
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
export {
|
|
45
|
+
h as Carousel,
|
|
46
|
+
$ as CarouselItem
|
|
47
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import H from "embla-carousel-react";
|
|
2
|
+
import T from "embla-carousel-autoplay";
|
|
3
|
+
import k from "embla-carousel-auto-height";
|
|
4
|
+
import { useCallback as s, useState as n, useEffect as L } from "react";
|
|
5
|
+
const B = (l = {}) => {
|
|
6
|
+
const {
|
|
7
|
+
align: i = "center",
|
|
8
|
+
initialIndex: u = 0,
|
|
9
|
+
autoplay: p = !1,
|
|
10
|
+
delay: m = 3e3,
|
|
11
|
+
duration: x = 25,
|
|
12
|
+
loop: f,
|
|
13
|
+
autoHeight: v = !0
|
|
14
|
+
} = l, [S, e] = H(
|
|
15
|
+
{
|
|
16
|
+
axis: "x",
|
|
17
|
+
align: i,
|
|
18
|
+
startIndex: u,
|
|
19
|
+
duration: x,
|
|
20
|
+
loop: f
|
|
21
|
+
},
|
|
22
|
+
[
|
|
23
|
+
T({ playOnInit: !0, delay: m, active: p }),
|
|
24
|
+
k({ active: v })
|
|
25
|
+
]
|
|
26
|
+
), r = e?.scrollNext, d = s(
|
|
27
|
+
(t) => r?.(t.jump),
|
|
28
|
+
[r]
|
|
29
|
+
), c = e?.scrollPrev, I = s(
|
|
30
|
+
(t) => c?.(t.jump),
|
|
31
|
+
[c]
|
|
32
|
+
), a = e?.scrollTo, C = s(
|
|
33
|
+
(t, E) => a?.(t, E.jump),
|
|
34
|
+
[a]
|
|
35
|
+
), [N, P] = n(!1), [y, A] = n(!1), [b, g] = n(0), [j, h] = n([]), o = s(() => {
|
|
36
|
+
e && (A(!!e?.canScrollPrev()), P(!!e?.canScrollNext()), h(e.scrollSnapList()), g(e.selectedScrollSnap()));
|
|
37
|
+
}, [e]);
|
|
38
|
+
return L(() => {
|
|
39
|
+
e && (o(), e.on("reInit", o).on("select", o));
|
|
40
|
+
}, [e, o]), {
|
|
41
|
+
ref: S,
|
|
42
|
+
next: d,
|
|
43
|
+
prev: I,
|
|
44
|
+
toSlide: C,
|
|
45
|
+
activeIndex: b,
|
|
46
|
+
canNext: N,
|
|
47
|
+
canPrev: y,
|
|
48
|
+
snaps: j,
|
|
49
|
+
options: l
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export {
|
|
53
|
+
B as useCarousel
|
|
54
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
const r = ({ fill: e = "white", ...o }) => /* @__PURE__ */ t(
|
|
4
|
+
"svg",
|
|
5
|
+
{
|
|
6
|
+
width: "15",
|
|
7
|
+
height: "15",
|
|
8
|
+
viewBox: "0 0 15 15",
|
|
9
|
+
fill: "none",
|
|
10
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11
|
+
...o,
|
|
12
|
+
children: /* @__PURE__ */ t(
|
|
13
|
+
"path",
|
|
14
|
+
{
|
|
15
|
+
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",
|
|
16
|
+
fill: e
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
export {
|
|
22
|
+
r as default
|
|
23
|
+
};
|