@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,50 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { getPrefixClassName as i } from "../../utils/classname.js";
|
|
3
|
+
import m from "classnames";
|
|
4
|
+
const r = i("skeleton"), n = ({
|
|
5
|
+
animated: e = !0,
|
|
6
|
+
className: s,
|
|
7
|
+
width: t,
|
|
8
|
+
height: a,
|
|
9
|
+
shape: o = "square",
|
|
10
|
+
...c
|
|
11
|
+
}) => /* @__PURE__ */ l(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
...c,
|
|
15
|
+
className: m(
|
|
16
|
+
r,
|
|
17
|
+
`${r}--${o}`,
|
|
18
|
+
{ [`${r}--animated`]: e },
|
|
19
|
+
s
|
|
20
|
+
),
|
|
21
|
+
style: {
|
|
22
|
+
...t ? { "--width": t + (typeof t == "number" ? "px" : "") } : {},
|
|
23
|
+
...a ? { "--height": a + (typeof a == "number" ? "px" : "") } : {}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
), N = (e) => /* @__PURE__ */ l(
|
|
27
|
+
n,
|
|
28
|
+
{
|
|
29
|
+
...e,
|
|
30
|
+
className: m(`${r}--title`, e.className)
|
|
31
|
+
}
|
|
32
|
+
), x = ({
|
|
33
|
+
lineCount: e = 3,
|
|
34
|
+
...s
|
|
35
|
+
}) => /* @__PURE__ */ l("div", { children: new Array(e).fill(0).map((t, a) => /* @__PURE__ */ l(
|
|
36
|
+
n,
|
|
37
|
+
{
|
|
38
|
+
...s,
|
|
39
|
+
className: m(
|
|
40
|
+
`${r}__paragraph-line`,
|
|
41
|
+
s.className
|
|
42
|
+
)
|
|
43
|
+
},
|
|
44
|
+
a
|
|
45
|
+
)) });
|
|
46
|
+
export {
|
|
47
|
+
n as Skeleton,
|
|
48
|
+
x as SkeletonParagraph,
|
|
49
|
+
N as SkeletonTitle
|
|
50
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsxs as k, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p, useRef as C, useState as N, useImperativeHandle as b } from "react";
|
|
3
|
+
import { getPrefixClassName as _ } from "../../utils/classname.js";
|
|
4
|
+
import { useControllableValue as $ } from "ahooks";
|
|
5
|
+
import g from "classnames";
|
|
6
|
+
const e = _("switch"), j = p(
|
|
7
|
+
(s, u) => {
|
|
8
|
+
const {
|
|
9
|
+
disabled: r = !1,
|
|
10
|
+
theme: n = "brand",
|
|
11
|
+
className: d,
|
|
12
|
+
style: m,
|
|
13
|
+
checked: x,
|
|
14
|
+
defaultChecked: P,
|
|
15
|
+
onChange: S,
|
|
16
|
+
...f
|
|
17
|
+
} = s, c = C(null), [h, l] = N(!1), [t, i] = $(s, {
|
|
18
|
+
defaultValuePropName: "defaultChecked",
|
|
19
|
+
valuePropName: "checked",
|
|
20
|
+
trigger: "onChange"
|
|
21
|
+
});
|
|
22
|
+
return b(u, () => ({
|
|
23
|
+
focus: () => c.current?.focus?.(),
|
|
24
|
+
blur: () => c.current?.blur?.()
|
|
25
|
+
})), /* @__PURE__ */ k(
|
|
26
|
+
"label",
|
|
27
|
+
{
|
|
28
|
+
className: g(
|
|
29
|
+
e,
|
|
30
|
+
{
|
|
31
|
+
[`${e}--checked`]: t,
|
|
32
|
+
[`${e}--unchecked`]: !t,
|
|
33
|
+
[`${e}--disabled`]: r,
|
|
34
|
+
[`${e}--focus`]: h,
|
|
35
|
+
[`${e}--theme-${n}`]: !0
|
|
36
|
+
},
|
|
37
|
+
d
|
|
38
|
+
),
|
|
39
|
+
style: m,
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ o("span", { className: `${e}__overlay` }),
|
|
42
|
+
/* @__PURE__ */ o("span", { className: `${e}__thumb` }),
|
|
43
|
+
/* @__PURE__ */ o(
|
|
44
|
+
"input",
|
|
45
|
+
{
|
|
46
|
+
...f,
|
|
47
|
+
type: "checkbox",
|
|
48
|
+
checked: t,
|
|
49
|
+
disabled: r,
|
|
50
|
+
onChange: (a) => i(a.target.checked),
|
|
51
|
+
ref: c,
|
|
52
|
+
className: `${e}__input`,
|
|
53
|
+
onFocus: (a) => {
|
|
54
|
+
l(!0), s.onFocus?.(a);
|
|
55
|
+
},
|
|
56
|
+
onBlur: (a) => {
|
|
57
|
+
l(!1), s.onBlur?.(a);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
export {
|
|
67
|
+
j as Switch
|
|
68
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { jsxs as q, jsx as $ } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as u, useState as D, useCallback as k, useLayoutEffect as F, useEffect as p } from "react";
|
|
3
|
+
import { getPrefixClassName as G } from "../../utils/classname.js";
|
|
4
|
+
import { TabBarItem as H } from "./tab.js";
|
|
5
|
+
import { useControllableValue as J } from "ahooks";
|
|
6
|
+
import K from "classnames";
|
|
7
|
+
const N = G("tab-bar"), tt = (l) => {
|
|
8
|
+
const [n, z] = J(l, {
|
|
9
|
+
trigger: "onItemClick",
|
|
10
|
+
valuePropName: "activeId",
|
|
11
|
+
defaultValuePropName: "defaultActiveId"
|
|
12
|
+
}), { items: I, className: V, tabWidth: d } = l, T = !l.theme || l.theme === "default" ? "brand" : l.theme, C = u(I);
|
|
13
|
+
C.current = I;
|
|
14
|
+
const f = u(null), i = u(/* @__PURE__ */ new Map()), P = u(!0), [h, x] = D({ left: 0, width: 0 }), o = k(() => {
|
|
15
|
+
if (!n || !f.current) {
|
|
16
|
+
x({ left: 0, width: 0 });
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const t = i.current.get(n);
|
|
20
|
+
if (!t) {
|
|
21
|
+
x({ left: 0, width: 0 });
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const e = t.offsetLeft, r = t.offsetWidth;
|
|
25
|
+
x({
|
|
26
|
+
left: e,
|
|
27
|
+
width: r
|
|
28
|
+
});
|
|
29
|
+
}, [n]), v = k(
|
|
30
|
+
(t = "smooth") => {
|
|
31
|
+
const e = C.current;
|
|
32
|
+
if (!n || !f.current) return;
|
|
33
|
+
const r = i.current.get(n);
|
|
34
|
+
if (!r) return;
|
|
35
|
+
const a = f.current, L = a.clientWidth, S = a.scrollLeft, w = r.offsetLeft, A = r.offsetWidth, B = w + A, _ = S, y = S + L, M = w >= _ && B <= y, m = e.findIndex((s) => s.id === n), g = m === e.length - 1;
|
|
36
|
+
if (M && !g && m >= 0) {
|
|
37
|
+
const s = e[m + 1]?.id, c = s ? i.current.get(s) : null;
|
|
38
|
+
if (c) {
|
|
39
|
+
const W = c.offsetLeft, E = c.offsetWidth, b = W + E * 0.5;
|
|
40
|
+
if (b <= y)
|
|
41
|
+
return;
|
|
42
|
+
const R = b - L;
|
|
43
|
+
a.scrollTo({
|
|
44
|
+
left: Math.max(0, R),
|
|
45
|
+
behavior: t
|
|
46
|
+
});
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (!M) {
|
|
51
|
+
if (!g && m >= 0) {
|
|
52
|
+
const s = e[m + 1]?.id, c = s ? i.current.get(s) : null;
|
|
53
|
+
if (c) {
|
|
54
|
+
const W = c.offsetLeft, E = c.offsetWidth, R = W + E * 0.5 - L;
|
|
55
|
+
a.scrollTo({
|
|
56
|
+
left: Math.max(0, R),
|
|
57
|
+
behavior: t
|
|
58
|
+
});
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
a.scrollTo({
|
|
63
|
+
left: Math.max(0, w),
|
|
64
|
+
behavior: t
|
|
65
|
+
});
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
[n]
|
|
70
|
+
);
|
|
71
|
+
F(() => {
|
|
72
|
+
o();
|
|
73
|
+
}, [o, d]), p(() => {
|
|
74
|
+
if (!n) return;
|
|
75
|
+
const t = setTimeout(() => {
|
|
76
|
+
P.current ? (v("instant"), P.current = !1) : v("smooth");
|
|
77
|
+
}, 100);
|
|
78
|
+
return () => clearTimeout(t);
|
|
79
|
+
}, [v, n]), p(() => {
|
|
80
|
+
const t = () => {
|
|
81
|
+
o();
|
|
82
|
+
};
|
|
83
|
+
return window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
|
|
84
|
+
}, [o]), p(() => {
|
|
85
|
+
const t = f.current;
|
|
86
|
+
if (!t) return;
|
|
87
|
+
const e = () => {
|
|
88
|
+
o();
|
|
89
|
+
};
|
|
90
|
+
return t.addEventListener("scroll", e, { passive: !0 }), () => t.removeEventListener("scroll", e);
|
|
91
|
+
}, [o]);
|
|
92
|
+
const j = (t, e) => {
|
|
93
|
+
e ? i.current.set(t, e) : i.current.delete(t);
|
|
94
|
+
};
|
|
95
|
+
return /* @__PURE__ */ q(
|
|
96
|
+
"div",
|
|
97
|
+
{
|
|
98
|
+
ref: f,
|
|
99
|
+
className: K(N, V, {
|
|
100
|
+
[`${N}--theme-${T}`]: T
|
|
101
|
+
}),
|
|
102
|
+
children: [
|
|
103
|
+
h.width > 0 && /* @__PURE__ */ $(
|
|
104
|
+
"div",
|
|
105
|
+
{
|
|
106
|
+
className: `${N}__indicator`,
|
|
107
|
+
style: {
|
|
108
|
+
left: `${h.left}px`,
|
|
109
|
+
width: `${h.width}px`
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
),
|
|
113
|
+
I.map((t, e) => /* @__PURE__ */ $(
|
|
114
|
+
H,
|
|
115
|
+
{
|
|
116
|
+
ref: (r) => j(t.id, r),
|
|
117
|
+
onItemClick: () => z(t, e),
|
|
118
|
+
active: t.id === n,
|
|
119
|
+
style: d ? { width: d, minWidth: d } : {},
|
|
120
|
+
...t
|
|
121
|
+
},
|
|
122
|
+
t.id
|
|
123
|
+
))
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
};
|
|
128
|
+
export {
|
|
129
|
+
tt as TabBar
|
|
130
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsxs as s, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as _ } from "react";
|
|
3
|
+
import { getPrefixClassName as h } from "../../utils/classname.js";
|
|
4
|
+
import { BadgeContainer as N, Badge as a } from "../badge/badge.js";
|
|
5
|
+
import x from "classnames";
|
|
6
|
+
import { renderIcon as C } from "../icon/icon.js";
|
|
7
|
+
import { Typography as $ } from "../typography/typography.js";
|
|
8
|
+
const t = h("tab-bar__item"), k = _(
|
|
9
|
+
({ className: i, id: b, active: m, icon: o, name: c, badge: r, onItemClick: l, ...p }, f) => {
|
|
10
|
+
const d = () => {
|
|
11
|
+
if (!o) return null;
|
|
12
|
+
const e = /* @__PURE__ */ n("span", { className: `${t}__icon`, children: C(o) });
|
|
13
|
+
return r ? /* @__PURE__ */ s(N, { children: [
|
|
14
|
+
e,
|
|
15
|
+
/* @__PURE__ */ n(a, { ...r === !0 ? {} : r })
|
|
16
|
+
] }) : e;
|
|
17
|
+
}, u = () => {
|
|
18
|
+
const e = /* @__PURE__ */ n(
|
|
19
|
+
$,
|
|
20
|
+
{
|
|
21
|
+
component: "span",
|
|
22
|
+
size: "base",
|
|
23
|
+
className: `${t}__label`,
|
|
24
|
+
children: c
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
return !r || o ? e : /* @__PURE__ */ s("div", { className: `${t}__label-with-badge`, children: [
|
|
28
|
+
e,
|
|
29
|
+
/* @__PURE__ */ n(a, { ...r === !0 ? {} : r })
|
|
30
|
+
] });
|
|
31
|
+
};
|
|
32
|
+
return /* @__PURE__ */ s(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
ref: f,
|
|
36
|
+
className: x(
|
|
37
|
+
t,
|
|
38
|
+
{
|
|
39
|
+
[`${t}--active`]: m
|
|
40
|
+
},
|
|
41
|
+
i
|
|
42
|
+
),
|
|
43
|
+
onClick: () => l?.(),
|
|
44
|
+
...p,
|
|
45
|
+
children: [
|
|
46
|
+
d(),
|
|
47
|
+
u()
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
export {
|
|
54
|
+
k as TabBarItem
|
|
55
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { getPrefixClassName as f } from "../../utils/classname.js";
|
|
3
|
+
import { forwardRef as d, useState as x, useRef as N, useImperativeHandle as C } from "react";
|
|
4
|
+
import { useControllableValue as _ } from "ahooks";
|
|
5
|
+
import { getInputProps as b, InputWrapper as v } from "../input-wrapper/input-wrapper.js";
|
|
6
|
+
import u from "classnames";
|
|
7
|
+
import { Skeleton as m } from "../skeleton/skeleton.js";
|
|
8
|
+
import { Typography as w } from "../typography/typography.js";
|
|
9
|
+
const a = f("text-area"), k = d(
|
|
10
|
+
(p, c) => {
|
|
11
|
+
const { wrapper: s, props: e } = b(p), [h, l] = x(e.autoFocus), o = N(null), [n, g] = _(e, {
|
|
12
|
+
trigger: "onChange",
|
|
13
|
+
valuePropName: "value"
|
|
14
|
+
});
|
|
15
|
+
return C(c, () => ({
|
|
16
|
+
focus: () => o.current?.focus?.(),
|
|
17
|
+
blur: () => o.current?.blur?.()
|
|
18
|
+
})), /* @__PURE__ */ r(
|
|
19
|
+
v,
|
|
20
|
+
{
|
|
21
|
+
...s,
|
|
22
|
+
className: u(a, s.className),
|
|
23
|
+
align: "start",
|
|
24
|
+
isFocus: h,
|
|
25
|
+
onClick: () => o.current?.focus(),
|
|
26
|
+
bottomInput: e.maxLength ? /* @__PURE__ */ i(
|
|
27
|
+
w,
|
|
28
|
+
{
|
|
29
|
+
size: "x-small",
|
|
30
|
+
weight: 400,
|
|
31
|
+
color: "alias-object-secondary",
|
|
32
|
+
className: `${a}__count`,
|
|
33
|
+
children: [
|
|
34
|
+
"(",
|
|
35
|
+
n?.length || 0,
|
|
36
|
+
"/",
|
|
37
|
+
e.maxLength,
|
|
38
|
+
")"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
) : null,
|
|
42
|
+
loadingNode: e.loading && /* @__PURE__ */ i("div", { className: `${a}__loading`, children: [
|
|
43
|
+
/* @__PURE__ */ r(m, { width: 128, height: 12, shape: "pill" }),
|
|
44
|
+
/* @__PURE__ */ r(m, { width: 40, height: 12, shape: "pill" })
|
|
45
|
+
] }),
|
|
46
|
+
children: /* @__PURE__ */ r(
|
|
47
|
+
"textarea",
|
|
48
|
+
{
|
|
49
|
+
rows: 3,
|
|
50
|
+
...e,
|
|
51
|
+
maxLength: e.maxLength,
|
|
52
|
+
value: n,
|
|
53
|
+
onChange: (t) => g?.(t.target.value),
|
|
54
|
+
disabled: s.disabled,
|
|
55
|
+
onFocus: (t) => {
|
|
56
|
+
l(!0), e.onFocus?.(t);
|
|
57
|
+
},
|
|
58
|
+
onBlur: (t) => {
|
|
59
|
+
l(!1), e.onBlur?.(t);
|
|
60
|
+
},
|
|
61
|
+
ref: o,
|
|
62
|
+
className: u(
|
|
63
|
+
`${a}__input`,
|
|
64
|
+
{ [`${a}__input--auto-height`]: e.autoHeight },
|
|
65
|
+
e.inputClassName
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
export {
|
|
74
|
+
k as TextArea
|
|
75
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { getPrefixClassName as d } from "../../utils/classname.js";
|
|
3
|
+
import { forwardRef as m, useState as f, useRef as g, useImperativeHandle as h } from "react";
|
|
4
|
+
import x from "../../_virtual/omit.js";
|
|
5
|
+
import { getInputProps as N, InputWrapper as F } from "../input-wrapper/input-wrapper.js";
|
|
6
|
+
import C from "classnames";
|
|
7
|
+
import { Skeleton as p } from "../skeleton/skeleton.js";
|
|
8
|
+
const n = d("text-field"), b = m(
|
|
9
|
+
(t, i) => {
|
|
10
|
+
const { wrapper: a, props: e } = N(t), [u, l] = f(e.autoFocus), s = g(null);
|
|
11
|
+
return h(i, () => ({
|
|
12
|
+
focus: () => s.current?.focus?.(),
|
|
13
|
+
blur: () => s.current?.blur?.()
|
|
14
|
+
})), /* @__PURE__ */ r(
|
|
15
|
+
F,
|
|
16
|
+
{
|
|
17
|
+
...a,
|
|
18
|
+
isFocus: u,
|
|
19
|
+
onClick: () => s.current?.focus(),
|
|
20
|
+
loadingNode: e.loading && /* @__PURE__ */ c(
|
|
21
|
+
"div",
|
|
22
|
+
{
|
|
23
|
+
className: `${n}__loading ${n}__loading--${e.loadingType}`,
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ r(
|
|
26
|
+
p,
|
|
27
|
+
{
|
|
28
|
+
width: e.loadingType === "search" ? 24 : 40,
|
|
29
|
+
height: e.loadingType === "search" ? 24 : 13,
|
|
30
|
+
shape: "pill"
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
/* @__PURE__ */ r(p, { width: 128, height: 13, shape: "pill" })
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
children: /* @__PURE__ */ r(
|
|
38
|
+
"input",
|
|
39
|
+
{
|
|
40
|
+
...x(e, ["loadingType"]),
|
|
41
|
+
onChange: (o) => e.onChange?.(o.target.value),
|
|
42
|
+
disabled: a.disabled,
|
|
43
|
+
onFocus: (o) => {
|
|
44
|
+
l(!0), e.onFocus?.(o);
|
|
45
|
+
},
|
|
46
|
+
onBlur: (o) => {
|
|
47
|
+
l(!1), e.onBlur?.(o);
|
|
48
|
+
},
|
|
49
|
+
ref: s,
|
|
50
|
+
className: C(n, e.inputClassName)
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
), R = ({
|
|
57
|
+
countryCode: t,
|
|
58
|
+
...i
|
|
59
|
+
}) => /* @__PURE__ */ r(b, { type: "tel", ...i, prefix: t });
|
|
60
|
+
export {
|
|
61
|
+
R as PhoneNumberField,
|
|
62
|
+
b as TextField
|
|
63
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsxs as a, Fragment as l, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { getPrefixClassName as m } from "../../utils/classname.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { createPortal as r } from "react-dom";
|
|
5
|
+
import { Toast as e } from "./toast.js";
|
|
6
|
+
import { AnimatePresence as d, motion as p } from "framer-motion";
|
|
7
|
+
import { useToastStore as f } from "./toast.store.js";
|
|
8
|
+
const c = m("toast-provider"), s = ({ position: i }) => {
|
|
9
|
+
const { items: n } = f();
|
|
10
|
+
return /* @__PURE__ */ t("div", { className: `${c} ${c}--${i}`, children: /* @__PURE__ */ t(d, { mode: "popLayout", children: n.filter((o) => o.config.position === i).map((o) => /* @__PURE__ */ t(
|
|
11
|
+
p.div,
|
|
12
|
+
{
|
|
13
|
+
style: {
|
|
14
|
+
display: "flex",
|
|
15
|
+
flexDirection: "column",
|
|
16
|
+
justifyContent: i === "bottom" ? "flex-start" : "flex-end"
|
|
17
|
+
},
|
|
18
|
+
initial: { height: 0, opacity: 0 },
|
|
19
|
+
animate: { height: "auto", opacity: 1 },
|
|
20
|
+
exit: {
|
|
21
|
+
opacity: 0,
|
|
22
|
+
y: n.length > 1 ? "0%" : i === "top" ? "-100%" : "100%"
|
|
23
|
+
},
|
|
24
|
+
children: /* @__PURE__ */ t(
|
|
25
|
+
e,
|
|
26
|
+
{
|
|
27
|
+
...o.config,
|
|
28
|
+
onActionClick: () => {
|
|
29
|
+
e.hide(o.id), o.config.onActionClick?.();
|
|
30
|
+
},
|
|
31
|
+
onCloseActionClick: () => {
|
|
32
|
+
e.hide(o.id), o.config.onCloseActionClick?.();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
},
|
|
37
|
+
o.id
|
|
38
|
+
)) }) });
|
|
39
|
+
}, b = () => /* @__PURE__ */ a(l, { children: [
|
|
40
|
+
r(/* @__PURE__ */ t(s, { position: "top" }), document.body),
|
|
41
|
+
r(/* @__PURE__ */ t(s, { position: "bottom" }), document.body)
|
|
42
|
+
] });
|
|
43
|
+
export {
|
|
44
|
+
b as ToastProvider
|
|
45
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { getPrefixClassName as d } from "../../utils/classname.js";
|
|
3
|
+
import { useMemo as g } from "react";
|
|
4
|
+
import { useToastStore as n } from "./toast.store.js";
|
|
5
|
+
import { renderIcon as v, Icon as m } from "../icon/icon.js";
|
|
6
|
+
import { Typography as N } from "../typography/typography.js";
|
|
7
|
+
import { Button as x } from "../button/button.js";
|
|
8
|
+
import _ from "classnames";
|
|
9
|
+
const i = d("toast"), c = ({
|
|
10
|
+
type: e = "informative",
|
|
11
|
+
message: l,
|
|
12
|
+
closeAction: f = !0,
|
|
13
|
+
onCloseActionClick: u,
|
|
14
|
+
action: o,
|
|
15
|
+
onActionClick: h,
|
|
16
|
+
icon: t
|
|
17
|
+
}) => {
|
|
18
|
+
const a = g(() => {
|
|
19
|
+
if (t) return v(t);
|
|
20
|
+
const s = {
|
|
21
|
+
neutral: null,
|
|
22
|
+
informative: "circle-info",
|
|
23
|
+
positive: "circle-check",
|
|
24
|
+
negative: "triangle-warning"
|
|
25
|
+
}[e];
|
|
26
|
+
if (s)
|
|
27
|
+
return /* @__PURE__ */ r(m, { name: s, type: "fill", size: 24 });
|
|
28
|
+
}, [t, e]);
|
|
29
|
+
return /* @__PURE__ */ p("div", { className: _(i, `${i}--${e}`), children: [
|
|
30
|
+
!!a && /* @__PURE__ */ r("span", { className: `${i}__icon`, children: a }),
|
|
31
|
+
/* @__PURE__ */ r(
|
|
32
|
+
N,
|
|
33
|
+
{
|
|
34
|
+
component: "div",
|
|
35
|
+
size: "base",
|
|
36
|
+
weight: "regular",
|
|
37
|
+
color: "inherit",
|
|
38
|
+
className: `${i}__content`,
|
|
39
|
+
children: l
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
o && /* @__PURE__ */ r(
|
|
43
|
+
x,
|
|
44
|
+
{
|
|
45
|
+
size: "medium",
|
|
46
|
+
type: "ghost",
|
|
47
|
+
theme: e === "informative" || e === "neutral" ? "neutral-inverse" : "neutral",
|
|
48
|
+
onClick: h,
|
|
49
|
+
children: o
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
f && /* @__PURE__ */ r(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
onClick: u,
|
|
56
|
+
className: `${i}__close-icon`,
|
|
57
|
+
children: /* @__PURE__ */ r(m, { name: "xmark", size: 16 })
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
] });
|
|
61
|
+
};
|
|
62
|
+
c.show = (e) => n.getState().add(e);
|
|
63
|
+
c.hide = (e) => e ? n.getState().remove(e) : n.getState().clear();
|
|
64
|
+
export {
|
|
65
|
+
c as Toast
|
|
66
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { create as u } from "zustand";
|
|
2
|
+
const f = 3e3, T = u((i, c) => {
|
|
3
|
+
let p = 0;
|
|
4
|
+
const d = () => ++p;
|
|
5
|
+
return {
|
|
6
|
+
items: [],
|
|
7
|
+
add: (t) => {
|
|
8
|
+
const e = d();
|
|
9
|
+
return i((s) => {
|
|
10
|
+
const o = t.position || "top", m = s.items.filter(
|
|
11
|
+
(n) => n.config.position === "top"
|
|
12
|
+
), r = s.items.filter(
|
|
13
|
+
(n) => n.config.position === "bottom"
|
|
14
|
+
);
|
|
15
|
+
return o === "top" ? m.push({ config: { ...t, position: o }, id: e }) : r.push({ config: { ...t, position: o }, id: e }), { items: [
|
|
16
|
+
...m.slice(-3),
|
|
17
|
+
...r.slice(-3)
|
|
18
|
+
] };
|
|
19
|
+
}), setTimeout(() => {
|
|
20
|
+
c().remove(e);
|
|
21
|
+
}, t.duration || f), e;
|
|
22
|
+
},
|
|
23
|
+
remove: (t) => {
|
|
24
|
+
i((e) => (e.items.find((o) => o.id === t)?.config?.onHide?.(), {
|
|
25
|
+
items: e.items.filter((o) => o.id !== t)
|
|
26
|
+
}));
|
|
27
|
+
},
|
|
28
|
+
clear: () => {
|
|
29
|
+
i({ items: [] });
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
export {
|
|
34
|
+
T as useToastStore
|
|
35
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsxs as p, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { getPrefixClassName as n } from "../../utils/classname.js";
|
|
4
|
+
import e from "classnames";
|
|
5
|
+
import { Icon as _ } from "../icon/icon.js";
|
|
6
|
+
const s = n("tooltip"), v = (a) => {
|
|
7
|
+
const {
|
|
8
|
+
type: r = "default",
|
|
9
|
+
position: t = "top",
|
|
10
|
+
closeable: i,
|
|
11
|
+
className: m,
|
|
12
|
+
children: l,
|
|
13
|
+
...c
|
|
14
|
+
} = a;
|
|
15
|
+
return /* @__PURE__ */ p(
|
|
16
|
+
"div",
|
|
17
|
+
{
|
|
18
|
+
className: e(
|
|
19
|
+
s,
|
|
20
|
+
`${s}--${r}`,
|
|
21
|
+
m
|
|
22
|
+
),
|
|
23
|
+
...c,
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ o(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: e(
|
|
29
|
+
`${s}__arrow`,
|
|
30
|
+
`${s}__arrow--${t}`,
|
|
31
|
+
`${s}__arrow--${r}`
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ o("div", { className: `${s}__content`, children: l }),
|
|
36
|
+
i && /* @__PURE__ */ o("div", { className: `${s}__close`, children: /* @__PURE__ */ o(_, { name: "xmark", size: 16 }) })
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
v as Tooltip
|
|
43
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { getPrefixClassName as n } from "../../utils/classname.js";
|
|
4
|
+
import { getColor as a } from "../../utils/colors.js";
|
|
5
|
+
import l from "classnames";
|
|
6
|
+
const o = n("typography"), x = ({
|
|
7
|
+
component: r,
|
|
8
|
+
size: t = "inherit",
|
|
9
|
+
weight: e = "inherit",
|
|
10
|
+
color: m,
|
|
11
|
+
className: s,
|
|
12
|
+
...i
|
|
13
|
+
}) => /* @__PURE__ */ p(
|
|
14
|
+
r || "div",
|
|
15
|
+
{
|
|
16
|
+
className: l(
|
|
17
|
+
o,
|
|
18
|
+
`${o}__size--${t}`,
|
|
19
|
+
`${o}__weight--${e}`,
|
|
20
|
+
s
|
|
21
|
+
),
|
|
22
|
+
...i,
|
|
23
|
+
style: { color: a(m) }
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
export {
|
|
27
|
+
x as Typography
|
|
28
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { chooseImage as c } from "../../vsf/choose-image.js";
|
|
2
|
+
async function l(a) {
|
|
3
|
+
try {
|
|
4
|
+
const { count: e = 1 } = a || {}, r = await c({
|
|
5
|
+
count: e,
|
|
6
|
+
includeBase64: !0
|
|
7
|
+
}), t = [];
|
|
8
|
+
return (r.tempFiles || []).forEach((o) => {
|
|
9
|
+
if (!o.data) return;
|
|
10
|
+
const s = {
|
|
11
|
+
tempFile: o
|
|
12
|
+
};
|
|
13
|
+
t.push(s);
|
|
14
|
+
}), t;
|
|
15
|
+
} catch (e) {
|
|
16
|
+
return console.error("Failed to upload image", e), [];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
l as uploadImage
|
|
21
|
+
};
|